All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lugins.graylog-plugin-pipeline-processor.2.4.2.source-code.plugin.org.graylog.plugins.pipelineprocessor.PipelineProcessorPlugin.ad62bdccc024e82f7dea.js Maven / Gradle / Ivy

There is a newer version: 2.5.2
Show newest version
!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.d=function(exports,e,n){t.o(exports,e)||Object.defineProperty(exports,e,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=206)}([function(e,exports,t){e.exports=t(8)(1)},function(e,exports,t){e.exports=t(8)(928)},function(e,exports,t){e.exports=t(8)(582)},function(e,exports,t){e.exports=t(8)(819)},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(68),i=n(r),o=t(45),a=n(o),s=t(53),l=n(s),u=t(274),c=n(u),d={parser:new c.default,qualifyUrl:function(e){return new a.default(l.default.gl2ServerUrl()+e).normalizePathname().toString()},appPrefixed:function(e){return this.concatURLPath(l.default.gl2AppPathPrefix(),e)},getParsedSearch:function(e){var t={},n=e.search;return n&&0===n.indexOf("?")&&n.length>1&&(n=n.substr(1,n.length-1),t=i.default.parse(n)),t},getParsedHash:function(e){var t={},n=e.hash;return n&&0===n.indexOf("#")&&n.length>1&&(n=n.substr(1,n.length-1),t=i.default.parse(n)),t},replaceHashParam:function(e,t){var n=this.getParsedHash(window.location);n[e]=t,window.location.replace("#"+i.default.stringify(n))},concatURLPath:function(){for(var e=arguments.length,t=Array(e),n=0;n=0&&y.splice(t,1)}function a(e){var t=document.createElement("style");return e.attrs.type="text/css",l(t,e.attrs),i(e,t),t}function s(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",l(t,e.attrs),i(e,t),t}function l(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function u(e,t){var n,r,i,l;if(t.transform&&e.css){if(!(l=t.transform(e.css)))return function(){};e.css=l}if(t.singleton){var u=v++;n=m||(m=a(t)),r=c.bind(null,n,u,!1),i=c.bind(null,n,u,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=s(t),r=h.bind(null,n,t),i=function(){o(n),n.href&&URL.revokeObjectURL(n.href)}):(n=a(t),r=d.bind(null,n),i=function(){o(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}function c(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=_(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function d(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function h(e,t,n){var r=n.css,i=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(r=b(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}var f={},p=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),g=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e.call(this,n)),t[n]}}(function(e){return document.querySelector(e)}),m=null,v=0,y=[],b=t(402);e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},t.attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||(t.singleton=p()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var i=r(e,t);return n(i,t),function(e){for(var o=[],a=0;a0)return void(u[r]=function(){for(var e=arguments.length,r=Array(e),o=0;o>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?p(e)+t:t}function m(){return!0}function v(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function y(e,t){return _(e,t,0)}function b(e,t){return _(e,t,t)}function _(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}function w(e){this.next=e}function C(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function A(){return{value:void 0,done:!0}}function E(e){return!!F(e)}function S(e){return e&&"function"==typeof e.next}function x(e){var t=F(e);return t&&t.call(e)}function F(e){var t=e&&(An&&e[An]||e[En]);if("function"==typeof t)return t}function k(e){return e&&"number"==typeof e.length}function D(e){return null===e||void 0===e?N():o(e)?e.toSeq():H(e)}function T(e){return null===e||void 0===e?N().toKeyedSeq():o(e)?a(e)?e.toSeq():e.fromEntrySeq():j(e)}function M(e){return null===e||void 0===e?N():o(e)?a(e)?e.entrySeq():e.toIndexedSeq():z(e)}function R(e){return(null===e||void 0===e?N():o(e)?a(e)?e.entrySeq():e:z(e)).toSetSeq()}function O(e){this._array=e,this.size=e.length}function L(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function P(e){this._iterable=e,this.size=e.length||e.size}function B(e){this._iterator=e,this._iteratorCache=[]}function I(e){return!(!e||!e[xn])}function N(){return Fn||(Fn=new O([]))}function j(e){var t=Array.isArray(e)?new O(e).fromEntrySeq():S(e)?new B(e).fromEntrySeq():E(e)?new P(e).fromEntrySeq():"object"==typeof e?new L(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function z(e){var t=U(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function H(e){var t=U(e)||"object"==typeof e&&new L(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function U(e){return k(e)?new O(e):S(e)?new B(e):E(e)?new P(e):void 0}function V(e,t,n,r){var i=e._cache;if(i){for(var o=i.length-1,a=0;a<=o;a++){var s=i[n?o-a:a];if(!1===t(s[1],r?s[0]:a,e))return a+1}return a}return e.__iterateUncached(t,n)}function G(e,t,n,r){var i=e._cache;if(i){var o=i.length-1,a=0;return new w(function(){var e=i[n?o-a:a];return a++>o?A():C(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function W(e,t){return t?q(t,e,"",{"":e}):K(e)}function q(e,t,n,r){return Array.isArray(t)?e.call(r,n,M(t).map(function(n,r){return q(e,n,r,t)})):Y(t)?e.call(r,n,T(t).map(function(n,r){return q(e,n,r,t)})):t}function K(e){return Array.isArray(e)?M(e).map(K).toList():Y(e)?T(e).map(K).toMap():e}function Y(e){return e&&(e.constructor===Object||void 0===e.constructor)}function X(e,t){if(e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if(e=e.valueOf(),t=t.valueOf(),e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function Q(e,t){if(e===t)return!0;if(!o(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||a(e)!==a(t)||s(e)!==s(t)||u(e)!==u(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!l(e);if(u(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&X(i[1],e)&&(n||X(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var c=e;e=t,t=c}var d=!0,h=t.__iterate(function(t,r){if(n?!e.has(t):i?!X(t,e.get(r,vn)):!X(e.get(r,vn),t))return d=!1,!1});return d&&e.size===h}function Z(e,t){if(!(this instanceof Z))return new Z(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(kn)return kn;kn=this}}function J(e,t){if(!e)throw new Error(t)}function ee(e,t,n){if(!(this instanceof ee))return new ee(e,t,n);if(J(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t>>1&1073741824|3221225471&e}function ae(e){if(!1===e||null===e||void 0===e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null===e||void 0===e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!==e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)e/=4294967295,n^=e;return oe(n)}if("string"===t)return e.length>In?se(e):le(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return ue(e);if("function"==typeof e.toString)return le(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function se(e){var t=jn[e];return void 0===t&&(t=le(e),Nn===$n&&(Nn=0,jn={}),Nn++,jn[e]=t),t}function le(e){for(var t=0,n=0;n0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}function de(e){J(e!==1/0,"Cannot perform this action with an infinite size.")}function he(e){return null===e||void 0===e?Ae():fe(e)&&!u(e)?e:Ae().withMutations(function(t){var r=n(e);de(r.size),r.forEach(function(e,n){return t.set(n,e)})})}function fe(e){return!(!e||!e[zn])}function pe(e,t){this.ownerID=e,this.entries=t}function ge(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function me(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function ve(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function ye(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function be(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&we(e._root)}function _e(e,t){return C(e,t[0],t[1])}function we(e,t){return{node:e,index:0,__prev:t}}function Ce(e,t,n,r){var i=Object.create(Hn);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Ae(){return Un||(Un=Ce(0))}function Ee(e,t,n){var r,i;if(e._root){var o=c(yn),a=c(bn);if(r=Se(e._root,e.__ownerID,0,void 0,t,n,o,a),!a.value)return e;i=e.size+(o.value?n===vn?-1:1:0)}else{if(n===vn)return e;i=1,r=new pe(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?Ce(i,r):Ae()}function Se(e,t,n,r,i,o,a,s){return e?e.update(t,n,r,i,o,a,s):o===vn?e:(d(s),d(a),new ye(t,r,[i,o]))}function xe(e){return e.constructor===ye||e.constructor===ve}function Fe(e,t,n,r,i){if(e.keyHash===r)return new ve(t,r,[e.entry,i]);var o,a=(0===n?e.keyHash:e.keyHash>>>n)&mn,s=(0===n?r:r>>>n)&mn;return new ge(t,1<>>=1)a[s]=1&n?t[o++]:void 0;return a[r]=i,new me(e,o+1,a)}function Me(e,t,r){for(var i=[],a=0;a>1&1431655765,e=(858993459&e)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function Ie(e,t,n,r){var i=r?e:f(e);return i[t]=n,i}function $e(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var o=new Array(i),a=0,s=0;s0&&io?0:o-n,u=a-n;return u>gn&&(u=gn),function(){if(i===u)return Xn;var e=t?--u:i++;return r&&r[e]}}function i(e,r,i){var s,l=e&&e.array,u=i>o?0:o-i>>r,c=1+(a-i>>r);return c>gn&&(c=gn),function(){for(;;){if(s){var e=s();if(e!==Xn)return e;s=null}if(u===c)return Xn;var o=t?--c:u++;s=n(l&&l[o],r-pn,i+(o<=e.size||t<0)return e.withMutations(function(e){t<0?Xe(e,t).set(0,n):Xe(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,o=c(bn);return t>=Ze(e._capacity)?r=qe(r,e.__ownerID,0,t,n,o):i=qe(i,e.__ownerID,e._level,t,n,o),o.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):Ve(e._origin,e._capacity,e._level,i,r):e}function qe(e,t,n,r,i,o){var a=r>>>n&mn,s=e&&a0){var u=e&&e.array[a],c=qe(u,t,n-pn,r,i,o);return c===u?e:(l=Ke(e,t),l.array[a]=c,l)}return s&&e.array[a]===i?e:(d(o),l=Ke(e,t),void 0===i&&a===l.array.length-1?l.array.pop():l.array[a]=i,l)}function Ke(e,t){return t&&e&&t===e.ownerID?e:new He(e?e.array.slice():[],t)}function Ye(e,t){if(t>=Ze(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&mn],r-=pn;return n}}function Xe(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new h,i=e._origin,o=e._capacity,a=i+t,s=void 0===n?o:n<0?o+n:i+n;if(a===i&&s===o)return e;if(a>=s)return e.clear();for(var l=e._level,u=e._root,c=0;a+c<0;)u=new He(u&&u.array.length?[void 0,u]:[],r),l+=pn,c+=1<=1<d?new He([],r):p;if(p&&f>d&&apn;v-=pn){var y=d>>>v&mn;m=m.array[y]=Ke(m.array[y],r)}m.array[d>>>pn&mn]=p}if(s=f)a-=f,s-=f,l=pn,u=null,g=g&&g.removeBefore(r,0,a);else if(a>i||f>>l&mn;if(b!==f>>>l&mn)break;b&&(c+=(1<i&&(u=u.removeBefore(r,l,a-c)),u&&fa&&(a=u.size),o(l)||(u=u.map(function(e){return W(e)})),i.push(u)}return a>e.size&&(e=e.setSize(a)),Le(e,t,i)}function Ze(e){return e>>pn<=gn&&a.size>=2*o.size?(i=a.filter(function(e,t){return void 0!==e&&s!==t}),r=i.toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=o.remove(t),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(l){if(n===a.get(s)[1])return e;r=o,i=a.set(s,[t,n])}else r=o.set(t,a.size),i=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):tt(r,i)}function it(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function ot(e){this._iter=e,this.size=e.size}function at(e){this._iter=e,this.size=e.size}function st(e){this._iter=e,this.size=e.size}function lt(e){var t=Dt(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Tt,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return!1!==t(n,e,r)},n)},t.__iteratorUncached=function(t,n){if(t===Cn){var r=e.__iterator(t,n);return new w(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===wn?_n:wn,n)},t}function ut(e,t,n){var r=Dt(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var o=e.get(r,vn);return o===vn?i:t.call(n,o,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate(function(e,i,a){return!1!==r(t.call(n,e,i,a),i,o)},i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(Cn,i);return new w(function(){var i=o.next();if(i.done)return i;var a=i.value,s=a[0];return C(r,s,t.call(n,a[1],s,e),i)})},r}function ct(e,t){var n=Dt(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=lt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=Tt,n.__iterate=function(t,n){var r=this;return e.__iterate(function(e,n){return t(e,n,r)},!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function dt(e,t,n,r){var i=Dt(e);return r&&(i.has=function(r){var i=e.get(r,vn);return i!==vn&&!!t.call(n,i,r,e)},i.get=function(r,i){var o=e.get(r,vn);return o!==vn&&t.call(n,o,r,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return e.__iterate(function(e,o,l){if(t.call(n,e,o,l))return s++,i(e,r?o:s-1,a)},o),s},i.__iteratorUncached=function(i,o){var a=e.__iterator(Cn,o),s=0;return new w(function(){for(;;){var o=a.next();if(o.done)return o;var l=o.value,u=l[0],c=l[1];if(t.call(n,c,u,e))return C(i,r?u:s++,c,o)}})},i}function ht(e,t,n){var r=he().asMutable();return e.__iterate(function(i,o){r.update(t.call(n,i,o,e),0,function(e){return e+1})}),r.asImmutable()}function ft(e,t,n){var r=a(e),i=(u(e)?Je():he()).asMutable();e.__iterate(function(o,a){i.update(t.call(n,o,a,e),function(e){return e=e||[],e.push(r?[a,o]:o),e})});var o=kt(e);return i.map(function(t){return St(e,o(t))})}function pt(e,t,n,r){var i=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=i:n|=0),v(t,n,i))return e;var o=y(t,i),a=b(n,i);if(o!==o||a!==a)return pt(e.toSeq().cacheResult(),t,n,r);var s,l=a-o;l===l&&(s=l<0?0:l);var u=Dt(e);return u.size=0===s?s:e.size&&s||void 0,!r&&I(e)&&s>=0&&(u.get=function(t,n){return t=g(this,t),t>=0&&ts)return A();var e=i.next();return r||t===wn?e:t===_n?C(t,l-1,void 0,e):C(t,l-1,e.value[1],e)})},u}function gt(e,t,n){var r=Dt(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return e.__iterate(function(e,i,s){return t.call(n,e,i,s)&&++a&&r(e,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(Cn,i),s=!0;return new w(function(){if(!s)return A();var e=a.next();if(e.done)return e;var i=e.value,l=i[0],u=i[1];return t.call(n,u,l,o)?r===Cn?e:C(r,l,u,e):(s=!1,A())})},r}function mt(e,t,n,r){var i=Dt(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,l=0;return e.__iterate(function(e,o,u){if(!s||!(s=t.call(n,e,o,u)))return l++,i(e,r?o:l-1,a)}),l},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=e.__iterator(Cn,o),l=!0,u=0;return new w(function(){var e,o,c;do{if(e=s.next(),e.done)return r||i===wn?e:i===_n?C(i,u++,void 0,e):C(i,u++,e.value[1],e);var d=e.value;o=d[0],c=d[1],l&&(l=t.call(n,c,o,a))}while(l);return i===Cn?e:C(i,o,c,e)})},i}function vt(e,t){var r=a(e),i=[e].concat(t).map(function(e){return o(e)?r&&(e=n(e)):e=r?j(e):z(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===i.length)return e;if(1===i.length){var l=i[0];if(l===e||r&&a(l)||s(e)&&s(l))return l}var u=new O(i);return r?u=u.toKeyedSeq():s(e)||(u=u.toSetSeq()),u=u.flatten(!0),u.size=i.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),u}function yt(e,t,n){var r=Dt(e);return r.__iterateUncached=function(r,i){function a(e,u){var c=this;e.__iterate(function(e,i){return(!t||u0}function Et(e,n,r){var i=Dt(e);return i.size=new O(r).map(function(e){return e.size}).min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(wn,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var o=r.map(function(e){return e=t(e),x(i?e.reverse():e)}),a=0,s=!1;return new w(function(){var t;return s||(t=o.map(function(e){return e.next()}),s=t.some(function(e){return e.done})),s?A():C(e,a++,n.apply(null,t.map(function(e){return e.value})))})},i}function St(e,t){return I(e)?t:e.constructor(t)}function xt(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Ft(e){return de(e.size),p(e)}function kt(e){return a(e)?n:s(e)?r:i}function Dt(e){return Object.create((a(e)?T:s(e)?M:R).prototype)}function Tt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):D.prototype.cacheResult.call(this)}function Mt(e,t){return e>t?1:et?-1:0}function an(e){if(e.size===1/0)return 0;var t=u(e),n=a(e),r=t?1:0;return sn(e.__iterate(n?t?function(e,t){r=31*r+ln(ae(e),ae(t))|0}:function(e,t){r=r+ln(ae(e),ae(t))|0}:t?function(e){r=31*r+ae(e)|0}:function(e){r=r+ae(e)|0}),r)}function sn(e,t){return t=Mn(t,3432918353),t=Mn(t<<15|t>>>-15,461845907),t=Mn(t<<13|t>>>-13,5),t=(t+3864292196|0)^e,t=Mn(t^t>>>16,2246822507),t=Mn(t^t>>>13,3266489909),t=oe(t^t>>>16)}function ln(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}var un=Array.prototype.slice;e(n,t),e(r,t),e(i,t),t.isIterable=o,t.isKeyed=a,t.isIndexed=s,t.isAssociative=l,t.isOrdered=u,t.Keyed=n,t.Indexed=r,t.Set=i;var cn="@@__IMMUTABLE_ITERABLE__@@",dn="@@__IMMUTABLE_KEYED__@@",hn="@@__IMMUTABLE_INDEXED__@@",fn="@@__IMMUTABLE_ORDERED__@@",pn=5,gn=1<r?A():C(e,i,n[t?r-i++:i++])})},e(L,T),L.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},L.prototype.has=function(e){return this._object.hasOwnProperty(e)},L.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var a=r[t?i-o:o];if(!1===e(n[a],a,this))return o+1}return o},L.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length-1,o=0;return new w(function(){var a=r[t?i-o:o];return o++>i?A():C(e,a,n[a])})},L.prototype[fn]=!0,e(P,M),P.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=this._iterable,r=x(n),i=0;if(S(r))for(var o;!(o=r.next()).done&&!1!==e(o.value,i++,this););return i},P.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterable,r=x(n);if(!S(r))return new w(A);var i=0;return new w(function(){var t=r.next();return t.done?t:C(e,i++,t.value)})},e(B,M),B.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n=this._iterator,r=this._iteratorCache,i=0;i=r.length){var t=n.next();if(t.done)return t;r[i]=t.value}return C(e,i,r[i++])})};var Fn;e(Z,M),Z.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Z.prototype.get=function(e,t){return this.has(e)?this._value:t},Z.prototype.includes=function(e){return X(this._value,e)},Z.prototype.slice=function(e,t){var n=this.size;return v(e,t,n)?this:new Z(this._value,b(t,n)-y(e,n))},Z.prototype.reverse=function(){return this},Z.prototype.indexOf=function(e){return X(this._value,e)?0:-1},Z.prototype.lastIndexOf=function(e){return X(this._value,e)?this.size:-1},Z.prototype.__iterate=function(e,t){for(var n=0;n=0&&t=0&&nn?A():C(e,o++,a)})},ee.prototype.equals=function(e){return e instanceof ee?this._start===e._start&&this._end===e._end&&this._step===e._step:Q(this,e)};var Dn;e(te,t),e(ne,te),e(re,te),e(ie,te),te.Keyed=ne,te.Indexed=re,te.Set=ie;var Tn,Mn="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){e|=0,t|=0;var n=65535&e,r=65535&t;return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0},Rn=Object.isExtensible,On=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}(),Ln="function"==typeof WeakMap;Ln&&(Tn=new WeakMap);var Pn=0,Bn="__immutablehash__";"function"==typeof Symbol&&(Bn=Symbol(Bn));var In=16,$n=255,Nn=0,jn={};e(he,ne),he.of=function(){var e=un.call(arguments,0);return Ae().withMutations(function(t){for(var n=0;n=e.length)throw new Error("Missing value for key: "+e[n]);t.set(e[n],e[n+1])}})},he.prototype.toString=function(){return this.__toString("Map {","}")},he.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},he.prototype.set=function(e,t){return Ee(this,e,t)},he.prototype.setIn=function(e,t){return this.updateIn(e,vn,function(){return t})},he.prototype.remove=function(e){return Ee(this,e,vn)},he.prototype.deleteIn=function(e){return this.updateIn(e,function(){return vn})},he.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},he.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=Pe(this,Rt(e),t,n);return r===vn?void 0:r},he.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Ae()},he.prototype.merge=function(){return Me(this,void 0,arguments)},he.prototype.mergeWith=function(e){return Me(this,e,un.call(arguments,1))},he.prototype.mergeIn=function(e){var t=un.call(arguments,1);return this.updateIn(e,Ae(),function(e){return"function"==typeof e.merge?e.merge.apply(e,t):t[t.length-1]})},he.prototype.mergeDeep=function(){return Me(this,Re,arguments)},he.prototype.mergeDeepWith=function(e){var t=un.call(arguments,1);return Me(this,Oe(e),t)},he.prototype.mergeDeepIn=function(e){var t=un.call(arguments,1);return this.updateIn(e,Ae(),function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,t):t[t.length-1]})},he.prototype.sort=function(e){return Je(wt(this,e))},he.prototype.sortBy=function(e,t){return Je(wt(this,t,e))},he.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},he.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new h)},he.prototype.asImmutable=function(){return this.__ensureOwner()},he.prototype.wasAltered=function(){return this.__altered},he.prototype.__iterator=function(e,t){return new be(this,e,t)},he.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},he.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Ce(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},he.isMap=fe;var zn="@@__IMMUTABLE_MAP__@@",Hn=he.prototype;Hn[zn]=!0,Hn.delete=Hn.remove,Hn.removeIn=Hn.deleteIn,pe.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o=Vn)return ke(e,l,r,i);var p=e&&e===this.ownerID,g=p?l:f(l);return h?s?u===c-1?g.pop():g[u]=g.pop():g[u]=[r,i]:g.push([r,i]),p?(this.entries=g,this):new pe(e,g)}},ge.prototype.get=function(e,t,n,r){void 0===t&&(t=ae(n));var i=1<<((0===e?t:t>>>e)&mn),o=this.bitmap;return 0==(o&i)?r:this.nodes[Be(o&i-1)].get(e+pn,t,n,r)},ge.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=ae(r));var s=(0===t?n:n>>>t)&mn,l=1<=Gn)return Te(e,h,u,s,p);if(c&&!p&&2===h.length&&xe(h[1^d]))return h[1^d];if(c&&p&&1===h.length&&xe(p))return p;var g=e&&e===this.ownerID,m=c?p?u:u^l:u|l,v=c?p?Ie(h,d,p,g):Ne(h,d,g):$e(h,d,p,g);return g?(this.bitmap=m,this.nodes=v,this):new ge(e,m,v)},me.prototype.get=function(e,t,n,r){void 0===t&&(t=ae(n));var i=(0===e?t:t>>>e)&mn,o=this.nodes[i];return o?o.get(e+pn,t,n,r):r},me.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=ae(r));var s=(0===t?n:n>>>t)&mn,l=i===vn,u=this.nodes,c=u[s];if(l&&!c)return this;var d=Se(c,e,t+pn,n,r,i,o,a);if(d===c)return this;var h=this.count;if(c){if(!d&&--h=0&&e>>t&mn;if(r>=this.array.length)return new He([],e);var i,o=0===r;if(t>0){var a=this.array[r];if((i=a&&a.removeBefore(e,t-pn,n))===a&&o)return this}if(o&&!i)return this;var s=Ke(this,e);if(!o)for(var l=0;l>>t&mn;if(r>=this.array.length)return this;var i;if(t>0){var o=this.array[r];if((i=o&&o.removeAfter(e,t-pn,n))===o&&r===this.array.length-1)return this}var a=Ke(this,e);return a.array.splice(r+1),i&&(a.array[r]=i),a};var Yn,Xn={};e(Je,he),Je.of=function(){return this(arguments)},Je.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Je.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Je.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):nt()},Je.prototype.set=function(e,t){return rt(this,e,t)},Je.prototype.remove=function(e){return rt(this,e,vn)},Je.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Je.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},Je.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Je.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?tt(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Je.isOrderedMap=et,Je.prototype[fn]=!0,Je.prototype.delete=Je.prototype.remove;var Qn;e(it,T),it.prototype.get=function(e,t){return this._iter.get(e,t)},it.prototype.has=function(e){return this._iter.has(e)},it.prototype.valueSeq=function(){return this._iter.valueSeq()},it.prototype.reverse=function(){var e=this,t=ct(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},it.prototype.map=function(e,t){var n=this,r=ut(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},it.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?Ft(this):0,function(i){return e(i,t?--n:n++,r)}),t)},it.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(wn,t),r=t?Ft(this):0;return new w(function(){var i=n.next();return i.done?i:C(e,t?--r:r++,i.value,i)})},it.prototype[fn]=!0,e(ot,M),ot.prototype.includes=function(e){return this._iter.includes(e)},ot.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate(function(t){return e(t,r++,n)},t)},ot.prototype.__iterator=function(e,t){var n=this._iter.__iterator(wn,t),r=0;return new w(function(){var t=n.next();return t.done?t:C(e,r++,t.value,t)})},e(at,R),at.prototype.has=function(e){return this._iter.includes(e)},at.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},at.prototype.__iterator=function(e,t){var n=this._iter.__iterator(wn,t);return new w(function(){var t=n.next();return t.done?t:C(e,t.value,t.value,t)})},e(st,T),st.prototype.entrySeq=function(){return this._iter.toSeq()},st.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){xt(t);var r=o(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},st.prototype.__iterator=function(e,t){var n=this._iter.__iterator(wn,t);return new w(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){xt(r);var i=o(r);return C(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},ot.prototype.cacheResult=it.prototype.cacheResult=at.prototype.cacheResult=st.prototype.cacheResult=Tt,e(Ot,ne),Ot.prototype.toString=function(){return this.__toString(Pt(this)+" {","}")},Ot.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},Ot.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},Ot.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=Lt(this,Ae()))},Ot.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+Pt(this));if(this._map&&!this._map.has(e)){if(t===this._defaultValues[e])return this}var n=this._map&&this._map.set(e,t);return this.__ownerID||n===this._map?this:Lt(this,n)},Ot.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:Lt(this,t)},Ot.prototype.wasAltered=function(){return this._map.wasAltered()},Ot.prototype.__iterator=function(e,t){var r=this;return n(this._defaultValues).map(function(e,t){return r.get(t)}).__iterator(e,t)},Ot.prototype.__iterate=function(e,t){var r=this;return n(this._defaultValues).map(function(e,t){return r.get(t)}).__iterate(e,t)},Ot.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?Lt(this,t,e):(this.__ownerID=e,this._map=t,this)};var Zn=Ot.prototype;Zn.delete=Zn.remove,Zn.deleteIn=Zn.removeIn=Hn.removeIn,Zn.merge=Hn.merge,Zn.mergeWith=Hn.mergeWith,Zn.mergeIn=Hn.mergeIn,Zn.mergeDeep=Hn.mergeDeep,Zn.mergeDeepWith=Hn.mergeDeepWith,Zn.mergeDeepIn=Hn.mergeDeepIn,Zn.setIn=Hn.setIn,Zn.update=Hn.update,Zn.updateIn=Hn.updateIn,Zn.withMutations=Hn.withMutations,Zn.asMutable=Hn.asMutable,Zn.asImmutable=Hn.asImmutable,e($t,ie),$t.of=function(){return this(arguments)},$t.fromKeys=function(e){return this(n(e).keySeq())},$t.prototype.toString=function(){return this.__toString("Set {","}")},$t.prototype.has=function(e){return this._map.has(e)},$t.prototype.add=function(e){return jt(this,this._map.set(e,!0))},$t.prototype.remove=function(e){return jt(this,this._map.remove(e))},$t.prototype.clear=function(){return jt(this,this._map.clear())},$t.prototype.union=function(){var e=un.call(arguments,0);return e=e.filter(function(e){return 0!==e.size}),0===e.length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations(function(t){for(var n=0;n=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Yt(e,t)},qt.prototype.pushAll=function(e){if(e=r(e),0===e.size)return this;de(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Yt(t,n)},qt.prototype.pop=function(){return this.slice(1)},qt.prototype.unshift=function(){return this.push.apply(this,arguments)},qt.prototype.unshiftAll=function(e){return this.pushAll(e)},qt.prototype.shift=function(){return this.pop.apply(this,arguments)},qt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Xt()},qt.prototype.slice=function(e,t){if(v(e,t,this.size))return this;var n=y(e,this.size);if(b(t,this.size)!==this.size)return re.prototype.slice.call(this,e,t);for(var r=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=r,this._head=i,this.__hash=void 0,this.__altered=!0,this):Yt(r,i)},qt.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Yt(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},qt.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},qt.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new w(function(){if(r){var t=r.value;return r=r.next,C(e,n++,t)}return A()})},qt.isStack=Kt;var ir="@@__IMMUTABLE_STACK__@@",or=qt.prototype;or[ir]=!0,or.withMutations=Hn.withMutations,or.asMutable=Hn.asMutable,or.asImmutable=Hn.asImmutable,or.wasAltered=Hn.wasAltered;var ar;t.Iterator=w,Qt(t,{toArray:function(){de(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate(function(t,n){e[n]=t}),e},toIndexedSeq:function(){return new ot(this)},toJS:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJS?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new it(this,!0)},toMap:function(){return he(this.toKeyedSeq())},toObject:function(){de(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e},toOrderedMap:function(){return Je(this.toKeyedSeq())},toOrderedSet:function(){return Ut(a(this)?this.valueSeq():this)},toSet:function(){return $t(a(this)?this.valueSeq():this)},toSetSeq:function(){return new at(this)},toSeq:function(){return s(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return qt(a(this)?this.valueSeq():this)},toList:function(){return je(a(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){return St(this,vt(this,un.call(arguments,0)))},includes:function(e){return this.some(function(t){return X(t,e)})},entries:function(){return this.__iterator(Cn)},every:function(e,t){de(this.size);var n=!0;return this.__iterate(function(r,i,o){if(!e.call(t,r,i,o))return n=!1,!1}),n},filter:function(e,t){return St(this,dt(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return de(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){de(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!==r&&void 0!==r?r.toString():""}),t},keys:function(){return this.__iterator(_n)},map:function(e,t){return St(this,ut(this,e,t))},reduce:function(e,t,n){de(this.size);var r,i;return arguments.length<2?i=!0:r=t,this.__iterate(function(t,o,a){i?(i=!1,r=t):r=e.call(n,r,t,o,a)}),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return St(this,ct(this,!0))},slice:function(e,t){return St(this,pt(this,e,t,!0))},some:function(e,t){return!this.every(en(e),t)},sort:function(e){return St(this,wt(this,e))},values:function(){return this.__iterator(wn)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return p(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return ht(this,e,t)},equals:function(e){return Q(this,e)},entrySeq:function(){var e=this;if(e._cache)return new O(e._cache);var t=e.toSeq().map(Jt).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(en(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,i,o){if(e.call(t,n,i,o))return r=[i,n],!1}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(m)},flatMap:function(e,t){return St(this,bt(this,e,t))},flatten:function(e){return St(this,yt(this,e,!0))},fromEntrySeq:function(){return new st(this)},get:function(e,t){return this.find(function(t,n){return X(n,e)},void 0,t)},getIn:function(e,t){for(var n,r=this,i=Rt(e);!(n=i.next()).done;){var o=n.value;if((r=r&&r.get?r.get(o,vn):vn)===vn)return t}return r},groupBy:function(e,t){return ft(this,e,t)},has:function(e){return this.get(e,vn)!==vn},hasIn:function(e){return this.getIn(e,vn)!==vn},isSubset:function(e){return e="function"==typeof e.includes?e:t(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return e="function"==typeof e.isSubset?e:t(e),e.isSubset(this)},keyOf:function(e){return this.findKey(function(t){return X(t,e)})},keySeq:function(){return this.toSeq().map(Zt).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return Ct(this,e)},maxBy:function(e,t){return Ct(this,t,e)},min:function(e){return Ct(this,e?tn(e):on)},minBy:function(e,t){return Ct(this,t?tn(t):on,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return St(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return St(this,mt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(en(e),t)},sortBy:function(e,t){return St(this,wt(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return St(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return St(this,gt(this,e,t))},takeUntil:function(e,t){return this.takeWhile(en(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=an(this))}});var sr=t.prototype;sr[cn]=!0,sr[Sn]=sr.values,sr.__toJS=sr.toArray,sr.__toStringMapper=nn,sr.inspect=sr.toSource=function(){return this.toString()},sr.chain=sr.flatMap,sr.contains=sr.includes,Qt(n,{flip:function(){return St(this,lt(this))},mapEntries:function(e,t){var n=this,r=0;return St(this,this.toSeq().map(function(i,o){return e.call(t,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return St(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var lr=n.prototype;return lr[dn]=!0,lr[Sn]=sr.entries,lr.__toJS=sr.toObject,lr.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+nn(e)},Qt(r,{toKeyedSeq:function(){return new it(this,!1)},filter:function(e,t){return St(this,dt(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return St(this,ct(this,!1))},slice:function(e,t){return St(this,pt(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=y(e,e<0?this.count():this.size);var r=this.slice(0,e);return St(this,1===n?r:r.concat(f(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return St(this,yt(this,e,!1))},get:function(e,t){return e=g(this,e),e<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return(e=g(this,e))>=0&&(void 0!==this.size?this.size===1/0||et-i&&(o=new RegExp("\\.?0{1,"+(r-(t-i))+"}$"),s=s.replace(o,"")),s}function o(e,t,n){return 0===e._value&&null!==_.zeroFormat?_.zeroFormat:null===e._value&&null!==_.nullFormat?_.nullFormat:t.indexOf("$")>-1?a(e,t,n):t.indexOf("%")>-1?s(e,t,n):t.indexOf(":")>-1?c(e):t.indexOf("b")>-1||t.indexOf("ib")>-1?l(e,t,n):t.indexOf("o")>-1?u(e,t,n):d(e._value,t,n)}function a(e,t,n){var r,i,o=t.indexOf("$"),a=t.indexOf("("),s=t.indexOf("-"),l="";return t.indexOf(" $")>-1?(l=" ",t=t.replace(" $","")):t.indexOf("$ ")>-1?(l=" ",t=t.replace("$ ","")):t=t.replace("$",""),i=d(e._value,t,n),o<=1?i.indexOf("(")>-1||i.indexOf("-")>-1?(i=i.split(""),r=1,(o-1?(i=i.split(""),i.splice(-1,0,l+y[_.currentLanguage].currency.symbol),i=i.join("")):i=i+l+y[_.currentLanguage].currency.symbol,i}function s(e,t,n){var r,i="",o=100*e._value;return t.indexOf(" %")>-1?(i=" ",t=t.replace(" %","")):t=t.replace("%",""),r=d(o,t,n),r.indexOf(")")>-1?(r=r.split(""),r.splice(-1,0,i+"%"),r=r.join("")):r=r+i+"%",r}function l(e,t,n){var r,i,o,a=t.indexOf("ib")>-1?w.iec:w.bytes,s=e._value,l="";for(t.indexOf(" b")>-1||t.indexOf(" ib")>-1?(l=" ",t=t.replace(" ib","").replace(" b","")):t=t.replace("ib","").replace("b",""),r=0;r<=a.length;r++)if(i=Math.pow(1024,r),o=Math.pow(1024,r+1),null===s||0===s||s>=i&&s0&&(s/=i);break}return d(s,t,n)+l}function u(e,t,n){var r="";return t.indexOf(" o")>-1?(r=" ",t=t.replace(" o","")):t=t.replace("o",""),r+=y[_.currentLanguage].ordinal(e._value),d(e._value,t,n)+r}function c(e){var t=Math.floor(e._value/60/60),n=Math.floor((e._value-60*t*60)/60),r=Math.round(e._value-60*t*60-60*n);return t+":"+(n<10?"0"+n:n)+":"+(r<10?"0"+r:r)}function d(e,t,n){var r,o,a,s,l=!1,u=!1,c=!1,d="",h=!1,f=!1,p=!1,g=!1,m=!1,v="",b=!1;return null===e&&(e=0),r=Math.abs(e),t.indexOf("(")>-1?(l=!0,t=t.slice(1,-1)):t.indexOf("+")>-1&&(u=!0,t=t.replace(/\+/g,"")),t.indexOf("a")>-1&&(h=t.indexOf("aK")>=0,f=t.indexOf("aM")>=0,p=t.indexOf("aB")>=0,g=t.indexOf("aT")>=0,m=h||f||p||g,t.indexOf(" a")>-1&&(d=" "),t=t.replace(new RegExp(d+"a[KMBT]?"),""),r>=Math.pow(10,12)&&!m||g?(d+=y[_.currentLanguage].abbreviations.trillion,e/=Math.pow(10,12)):r=Math.pow(10,9)&&!m||p?(d+=y[_.currentLanguage].abbreviations.billion,e/=Math.pow(10,9)):r=Math.pow(10,6)&&!m||f?(d+=y[_.currentLanguage].abbreviations.million,e/=Math.pow(10,6)):(r=Math.pow(10,3)&&!m||h)&&(d+=y[_.currentLanguage].abbreviations.thousand,e/=Math.pow(10,3))),t.indexOf("[.]")>-1&&(c=!0,t=t.replace("[.]",".")),o=e.toString().split(".")[0],a=t.split(".")[1],s=t.indexOf(","),a?(a.indexOf("[")>-1?(a=a.replace("]",""),a=a.split("["),v=i(e,a[0].length+a[1].length,n,a[1].length)):v=i(e,a.length,n),o=v.split(".")[0],v=v.indexOf(".")>-1?y[_.currentLanguage].delimiters.decimal+v.split(".")[1]:"",c&&0===Number(v.slice(1))&&(v="")):o=i(e,null,n),o.indexOf("-")>-1&&(o=o.slice(1),b=!0),s>-1&&(o=o.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+y[_.currentLanguage].delimiters.thousands)),0===t.indexOf(".")&&(o=""),(l&&b?"(":"")+(!l&&b?"-":"")+(!b&&u?"+":"")+o+v+(d||"")+(l&&b?")":"")}function h(e,t){var n,r,i,o,a,s,l=t,u=!1;if(t.indexOf(":")>-1)s=f(t);else if(t===_.zeroFormat||t===_.nullFormat)s=0;else{for("."!==y[_.currentLanguage].delimiters.decimal&&(t=t.replace(/\./g,"").replace(y[_.currentLanguage].delimiters.decimal,".")),n=new RegExp("[^a-zA-Z]"+y[_.currentLanguage].abbreviations.thousand+"(?:\\)|(\\"+y[_.currentLanguage].currency.symbol+")?(?:\\))?)?$"),r=new RegExp("[^a-zA-Z]"+y[_.currentLanguage].abbreviations.million+"(?:\\)|(\\"+y[_.currentLanguage].currency.symbol+")?(?:\\))?)?$"),i=new RegExp("[^a-zA-Z]"+y[_.currentLanguage].abbreviations.billion+"(?:\\)|(\\"+y[_.currentLanguage].currency.symbol+")?(?:\\))?)?$"),o=new RegExp("[^a-zA-Z]"+y[_.currentLanguage].abbreviations.trillion+"(?:\\)|(\\"+y[_.currentLanguage].currency.symbol+")?(?:\\))?)?$"),a=1;a<=w.bytes.length&&!(u=(t.indexOf(w.bytes[a])>-1||t.indexOf(w.iec[a])>-1)&&Math.pow(1024,a));a++);s=u||1,s*=l.match(n)?Math.pow(10,3):1,s*=l.match(r)?Math.pow(10,6):1,s*=l.match(i)?Math.pow(10,9):1,s*=l.match(o)?Math.pow(10,12):1,s*=t.indexOf("%")>-1?.01:1,s*=(t.split("-").length+Math.min(t.split("(").length-1,t.split(")").length-1))%2?1:-1,s*=Number(t.replace(/[^0-9\.]+/g,"")),s=u?Math.ceil(s):s}return e._value=s,e._value}function f(e){var t=e.split(":"),n=0;return 3===t.length?(n+=60*Number(t[0])*60,n+=60*Number(t[1]),n+=Number(t[2])):2===t.length&&(n+=60*Number(t[0]),n+=Number(t[1])),Number(n)}function p(e,t){y[e]=t}function g(e){var t=e.toString().split(".");return t.length<2?1:Math.pow(10,t[1].length)}function m(){return Array.prototype.slice.call(arguments).reduce(function(e,t){var n=g(e),r=g(t);return n>r?n:r},-1/0)}var v,y={},b={currentLanguage:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0"},_={currentLanguage:b.currentLanguage,zeroFormat:b.zeroFormat,nullFormat:b.nullFormat,defaultFormat:b.defaultFormat},w={bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],iec:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]};v=function(e){return e=v.isNumeral(e)?e.value():0===e||void 0===e?0:null===e?null:Number(e)?Number(e):v.fn.unformat(e),new t(e)},v.version="1.5.6",v.isNumeral=function(e){return e instanceof t},v.language=function(e,t){if(!e)return _.currentLanguage;if((e=e.toLowerCase())&&!t){if(!y[e])throw new Error("Unknown language : "+e);_.currentLanguage=e}return!t&&y[e]||p(e,t),v},v.reset=function(){for(var e in b)_[e]=b[e]},v.languageData=function(e){if(!e)return y[_.currentLanguage];if(!y[e])throw new Error("Unknown language : "+e);return y[e]},v.language("en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$"}}),v.zeroFormat=function(e){_.zeroFormat="string"==typeof e?e:null},v.nullFormat=function(e){_.nullFormat="string"==typeof e?e:null},v.defaultFormat=function(e){_.defaultFormat="string"==typeof e?e:"0.0"},v.validate=function(e,t){var n,r,i,o,a,s,l,u;if("string"!=typeof e&&(e+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",e)),e=e.trim(),e.match(/^\d+$/))return!0;if(""===e)return!1;try{l=v.languageData(t)}catch(e){l=v.languageData(v.language())}return i=l.currency.symbol,a=l.abbreviations,n=l.delimiters.decimal,r="."===l.delimiters.thousands?"\\.":l.delimiters.thousands,(null===(u=e.match(/^[^\d]+/))||(e=e.substr(1),u[0]===i))&&((null===(u=e.match(/[^\d]+$/))||(e=e.slice(0,-1),u[0]===a.thousand||u[0]===a.million||u[0]===a.billion||u[0]===a.trillion))&&(s=new RegExp(r+"{2}"),!e.match(/[^\d.,]/g)&&(o=e.split(n),!(o.length>2)&&(o.length<2?!!o[0].match(/^\d+.*\d$/)&&!o[0].match(s):1===o[0].length?!!o[0].match(/^\d+$/)&&!o[0].match(s)&&!!o[1].match(/^\d+$/):!!o[0].match(/^\d+.*\d$/)&&!o[0].match(s)&&!!o[1].match(/^\d+$/)))))},Array.prototype.reduce||(Array.prototype.reduce=function(e){"use strict";if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof e)throw new TypeError(e+" is not a function");var t,n=Object(this),r=n.length>>>0,i=0;if(2===arguments.length)t=arguments[1];else{for(;i=r)throw new TypeError("Reduce of empty array with no initial value");t=n[i++]}for(;i'+t+""}},{key:"versionedDocsHomePage",value:function(){return this.toString("")}}]),e}(),s=new a;exports.default=s,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r={tempDocument:document.createElement("textarea"),capitalizeFirstLetter:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},escapeHTML:function(e){return this.tempDocument.textContent=e,this.tempDocument.innerHTML},unescapeHTML:function(e){return this.tempDocument.innerHTML=e,this.tempDocument.textContent},pluralize:function(e,t,n){return 1===e||"1"===e?t:n},stringify:function(e){return("object"===(void 0===e?"undefined":n(e))?JSON.stringify(e):String(e))||""}};exports.default=r,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(621);Object.defineProperty(exports,"AddDecoratorButton",{enumerable:!0,get:function(){return n(r).default}});var i=t(623);Object.defineProperty(exports,"AddSearchCountToDashboard",{enumerable:!0,get:function(){return n(i).default}});var o=t(658);Object.defineProperty(exports,"ChangedMessageField",{enumerable:!0,get:function(){return n(o).default}});var a=t(661);Object.defineProperty(exports,"DecoratedMessageFieldMarker",{enumerable:!0,get:function(){return n(a).default}});var s=t(662);Object.defineProperty(exports,"DecoratedSidebarMessageField",{enumerable:!0,get:function(){return n(s).default}});var l=t(663);Object.defineProperty(exports,"Decorator",{enumerable:!0,get:function(){return n(l).default}});var u=t(664);Object.defineProperty(exports,"DecoratorList",{enumerable:!0,get:function(){return n(u).default}});var c=t(665);Object.defineProperty(exports,"DecoratorSidebar",{enumerable:!0,get:function(){return n(c).default}});var d=t(666);Object.defineProperty(exports,"FieldAnalyzersSidebar",{enumerable:!0,get:function(){return n(d).default}});var h=t(667);Object.defineProperty(exports,"LegacyHistogram",{enumerable:!0,get:function(){return n(h).default}});var f=t(670);Object.defineProperty(exports,"MalformedSearchQuery",{enumerable:!0,get:function(){return n(f).default}});var p=t(116);Object.defineProperty(exports,"MessageDetail",{enumerable:!0,get:function(){return n(p).default}});var g=t(673);Object.defineProperty(exports,"MessageFieldDescription",{enumerable:!0,get:function(){return n(g).default}});var m=t(674);Object.defineProperty(exports,"MessageFieldExtractorActions",{enumerable:!0,get:function(){return n(m).default}});var v=t(675);Object.defineProperty(exports,"MessageField",{enumerable:!0,get:function(){return n(v).default}});var y=t(187);Object.defineProperty(exports,"MessageFields",{enumerable:!0,get:function(){return n(y).default}});var b=t(193);Object.defineProperty(exports,"MessageFieldSearchActions",{enumerable:!0,get:function(){return n(b).default}});var _=t(115);Object.defineProperty(exports,"MessageShow",{enumerable:!0,get:function(){return n(_).default}});var w=t(676);Object.defineProperty(exports,"MessageTableEntry",{enumerable:!0,get:function(){return n(w).default}});var C=t(677);Object.defineProperty(exports,"MessageTablePaginator",{enumerable:!0,get:function(){return n(C).default}});var A=t(679);Object.defineProperty(exports,"NoSearchResults",{enumerable:!0,get:function(){return n(A).default}});var E=t(682);Object.defineProperty(exports,"RefreshControls",{enumerable:!0,get:function(){return n(E).default}});var S=t(683);Object.defineProperty(exports,"ResultTable",{enumerable:!0,get:function(){return n(S).default}});var x=t(684);Object.defineProperty(exports,"SavedSearchControls",{enumerable:!0,get:function(){return n(x).default}});var F=t(685);Object.defineProperty(exports,"SearchBar",{enumerable:!0,get:function(){return n(F).default}});var k=t(686);Object.defineProperty(exports,"SearchExecutionError",{enumerable:!0,get:function(){return n(k).default}});var D=t(687);Object.defineProperty(exports,"SearchResult",{enumerable:!0,get:function(){return n(D).default}});var T=t(697);Object.defineProperty(exports,"SearchSidebar",{enumerable:!0,get:function(){return n(T).default}});var M=t(715);Object.defineProperty(exports,"ShowQueryModal",{enumerable:!0,get:function(){return n(M).default}});var R=t(716);Object.defineProperty(exports,"SidebarMessageField",{enumerable:!0,get:function(){return n(R).default}});var O=t(201);Object.defineProperty(exports,"SurroundingSearchButton",{enumerable:!0,get:function(){return n(O).default}});var L=t(719);Object.defineProperty(exports,"QueryInput",{enumerable:!0,get:function(){return n(L).default}})},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(27),l=n(s),u=a.default.createClass({displayName:"DocumentationLink",propTypes:{page:i.default.string.isRequired,text:i.default.node.isRequired,title:i.default.string},render:function(){return a.default.createElement("a",{href:l.default.toString(this.props.page),title:this.props.title,target:"_blank"},this.props.text)}});exports.default=u,e.exports=exports.default},function(e,exports,t){var n,r;!function(){function i(e){return e&&(e.ownerDocument||e.document||e).documentElement}function o(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}function a(e,t){return et?1:e>=t?0:NaN}function s(e){return null===e?NaN:+e}function l(e){return!isNaN(e)}function u(e){return{left:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}function c(e){return e.length}function d(e){for(var t=1;e*t%1;)t*=10;return t}function h(e,t){for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}function f(){this._=Object.create(null)}function p(e){return(e+="")===Ea||e[0]===Sa?Sa+e:e}function g(e){return(e+="")[0]===Sa?e.slice(1):e}function m(e){return p(e)in this._}function v(e){return(e=p(e))in this._&&delete this._[e]}function y(){var e=[];for(var t in this._)e.push(g(t));return e}function b(){var e=0;for(var t in this._)++e;return e}function _(){for(var e in this._)return!1;return!0}function w(){this._=Object.create(null)}function C(e){return e}function A(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}function E(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var n=0,r=xa.length;n=t&&(t=i+1);!(a=s[t])&&++t0&&(e=e.slice(0,s));var u=Ba.get(e);return u&&(e=u,l=J),s?t?i:r:t?S:o}function Z(e,t){return function(n){var r=fa.event;fa.event=n,t[0]=this.__data__;try{e.apply(this,t)}finally{fa.event=r}}}function J(e,t){var n=Z(e,t);return function(e){var t=this,r=e.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||n.call(t,e)}}function ee(e){var t=".dragsuppress-"+ ++$a,n="click"+t,r=fa.select(o(e)).on("touchmove"+t,k).on("dragstart"+t,k).on("selectstart"+t,k);if(null==Ia&&(Ia=!("onselectstart"in e)&&E(e.style,"userSelect")),Ia){var a=i(e).style,s=a[Ia];a[Ia]="none"}return function(e){if(r.on(t,null),Ia&&(a[Ia]=s),e){var i=function(){r.on(n,null)};r.on(n,function(){k(),i()},!0),setTimeout(i,0)}}}function te(e,t){t.changedTouches&&(t=t.changedTouches[0]);var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();if(Na<0){var i=o(e);if(i.scrollX||i.scrollY){n=fa.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=n[0][0].getScreenCTM();Na=!(a.f||a.e),n.remove()}}return Na?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}var s=e.getBoundingClientRect();return[t.clientX-s.left-e.clientLeft,t.clientY-s.top-e.clientTop]}function ne(){return fa.event.changedTouches[0].identifier}function re(e){return e>0?1:e<0?-1:0}function ie(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function oe(e){return e>1?0:e<-1?Ha:Math.acos(e)}function ae(e){return e>1?Ga:e<-1?-Ga:Math.asin(e)}function se(e){return((e=Math.exp(e))-1/e)/2}function le(e){return((e=Math.exp(e))+1/e)/2}function ue(e){return((e=Math.exp(2*e))-1)/(e+1)}function ce(e){return(e=Math.sin(e/2))*e}function de(){}function he(e,t,n){return this instanceof he?(this.h=+e,this.s=+t,void(this.l=+n)):arguments.length<2?e instanceof he?new he(e.h,e.s,e.l):xe(""+e,Fe,he):new he(e,t,n)}function fe(e,t,n){function r(e){return e>360?e-=360:e<0&&(e+=360),e<60?o+(a-o)*e/60:e<180?a:e<240?o+(a-o)*(240-e)/60:o}function i(e){return Math.round(255*r(e))}var o,a;return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)?0:t<0?0:t>1?1:t,n=n<0?0:n>1?1:n,a=n<=.5?n*(1+t):n+t-n*t,o=2*n-a,new Ce(i(e+120),i(e),i(e-120))}function pe(e,t,n){return this instanceof pe?(this.h=+e,this.c=+t,void(this.l=+n)):arguments.length<2?e instanceof pe?new pe(e.h,e.c,e.l):e instanceof me?ye(e.l,e.a,e.b):ye((e=ke((e=fa.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new pe(e,t,n)}function ge(e,t,n){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new me(n,Math.cos(e*=Wa)*t,Math.sin(e)*t)}function me(e,t,n){return this instanceof me?(this.l=+e,this.a=+t,void(this.b=+n)):arguments.length<2?e instanceof me?new me(e.l,e.a,e.b):e instanceof pe?ge(e.h,e.c,e.l):ke((e=Ce(e)).r,e.g,e.b):new me(e,t,n)}function ve(e,t,n){var r=(e+16)/116,i=r+t/500,o=r-n/200;return i=be(i)*ts,r=be(r)*ns,o=be(o)*rs,new Ce(we(3.2404542*i-1.5371385*r-.4985314*o),we(-.969266*i+1.8760108*r+.041556*o),we(.0556434*i-.2040259*r+1.0572252*o))}function ye(e,t,n){return e>0?new pe(Math.atan2(n,t)*qa,Math.sqrt(t*t+n*n),e):new pe(NaN,NaN,e)}function be(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function _e(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function we(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function Ce(e,t,n){return this instanceof Ce?(this.r=~~e,this.g=~~t,void(this.b=~~n)):arguments.length<2?e instanceof Ce?new Ce(e.r,e.g,e.b):xe(""+e,Ce,fe):new Ce(e,t,n)}function Ae(e){return new Ce(e>>16,e>>8&255,255&e)}function Ee(e){return Ae(e)+""}function Se(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function xe(e,t,n){var r,i,o,a=0,s=0,l=0;if(r=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(Te(i[0]),Te(i[1]),Te(i[2]))}return(o=as.get(e))?t(o.r,o.g,o.b):(null==e||"#"!==e.charAt(0)||isNaN(o=parseInt(e.slice(1),16))||(4===e.length?(a=(3840&o)>>4,a|=a>>4,s=240&o,s|=s>>4,l=15&o,l|=l<<4):7===e.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,l=255&o)),t(a,s,l))}function Fe(e,t,n){var r,i,o=Math.min(e/=255,t/=255,n/=255),a=Math.max(e,t,n),s=a-o,l=(a+o)/2;return s?(i=l<.5?s/(a+o):s/(2-a-o),r=e==a?(t-n)/s+(t0&&l<1?0:r),new he(r,i,l)}function ke(e,t,n){e=De(e),t=De(t),n=De(n);var r=_e((.4124564*e+.3575761*t+.1804375*n)/ts),i=_e((.2126729*e+.7151522*t+.072175*n)/ns);return me(116*i-16,500*(r-i),200*(i-_e((.0193339*e+.119192*t+.9503041*n)/rs)))}function De(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Te(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}function Me(e){return"function"==typeof e?e:function(){return e}}function Re(e){return function(t,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),Oe(t,n,e,r)}}function Oe(e,t,n,r){function i(){var e,t=l.status;if(!t&&Pe(l)||t>=200&&t<300||304===t){try{e=n.call(o,l)}catch(e){return void a.error.call(o,e)}a.load.call(o,e)}else a.error.call(o,l)}var o={},a=fa.dispatch("beforesend","progress","load","error"),s={},l=new XMLHttpRequest,u=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(e)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=i:l.onreadystatechange=function(){l.readyState>3&&i()},l.onprogress=function(e){var t=fa.event;fa.event=e;try{a.progress.call(o,l)}finally{fa.event=t}},o.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?s[e]:(null==t?delete s[e]:s[e]=t+"",o)},o.mimeType=function(e){return arguments.length?(t=null==e?null:e+"",o):t},o.responseType=function(e){return arguments.length?(u=e,o):u},o.response=function(e){return n=e,o},["get","post"].forEach(function(e){o[e]=function(){return o.send.apply(o,[e].concat(ga(arguments)))}}),o.send=function(n,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),l.open(n,e,!0),null==t||"accept"in s||(s.accept=t+",*/*"),l.setRequestHeader)for(var c in s)l.setRequestHeader(c,s[c]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=u&&(l.responseType=u),null!=i&&o.on("error",i).on("load",function(e){i(null,e)}),a.beforesend.call(o,l),l.send(null==r?null:r),o},o.abort=function(){return l.abort(),o},fa.rebind(o,a,"on"),null==r?o:o.get(Le(r))}function Le(e){return 1===e.length?function(t,n){e(null==t?n:null)}:e}function Pe(e){var t=e.responseType;return t&&"text"!==t?e.response:e.responseText}function Be(e,t,n){var r=arguments.length;r<2&&(t=0),r<3&&(n=Date.now());var i=n+t,o={c:e,t:i,n:null};return ls?ls.n=o:ss=o,ls=o,us||(cs=clearTimeout(cs),us=1,ds(Ie)),o}function Ie(){var e=$e(),t=Ne()-e;t>24?(isFinite(t)&&(clearTimeout(cs),cs=setTimeout(Ie,t)),us=0):(us=1,ds(Ie))}function $e(){for(var e=Date.now(),t=ss;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function Ne(){for(var e,t=ss,n=1/0;t;)t.c?(t.t8?function(e){return e/n}:function(e){return e*n},symbol:e}}function He(e){var t=e.decimal,n=e.thousands,r=e.grouping,i=e.currency,o=r&&n?function(e,t){for(var i=e.length,o=[],a=0,s=r[0],l=0;i>0&&s>0&&(l+s+1>t&&(s=Math.max(1,t-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>t));)s=r[a=(a+1)%r.length];return o.reverse().join(n)}:C;return function(e){var n=fs.exec(e),r=n[1]||" ",a=n[2]||">",s=n[3]||"-",l=n[4]||"",u=n[5],c=+n[6],d=n[7],h=n[8],f=n[9],p=1,g="",m="",v=!1,y=!0;switch(h&&(h=+h.substring(1)),(u||"0"===r&&"="===a)&&(u=r="0",a="="),f){case"n":d=!0,f="g";break;case"%":p=100,m="%",f="f";break;case"p":p=100,m="%",f="r";break;case"b":case"o":case"x":case"X":"#"===l&&(g="0"+f.toLowerCase());case"c":y=!1;case"d":v=!0,h=0;break;case"s":p=-1,f="r"}"$"===l&&(g=i[0],m=i[1]),"r"!=f||h||(f="g"),null!=h&&("g"==f?h=Math.max(1,Math.min(21,h)):"e"!=f&&"f"!=f||(h=Math.max(0,Math.min(20,h)))),f=ps.get(f)||Ue;var b=u&&d;return function(e){var n=m;if(v&&e%1)return"";var i=e<0||0===e&&1/e<0?(e=-e,"-"):"-"===s?"":s;if(p<0){var l=fa.formatPrefix(e,h);e=l.scale(e),n=l.symbol+m}else e*=p;e=f(e,h);var _,w,C=e.lastIndexOf(".");if(C<0){var A=y?e.lastIndexOf("e"):-1;A<0?(_=e,w=""):(_=e.substring(0,A),w=e.substring(A))}else _=e.substring(0,C),w=t+e.substring(C+1);!u&&d&&(_=o(_,1/0));var E=g.length+_.length+w.length+(b?0:i.length),S=E"===a?S+i+e:"^"===a?S.substring(0,E>>=1)+i+e+S.substring(E):i+(b?e:S+e))+n}}}function Ue(e){return e+""}function Ve(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ge(e,t,n){function r(t){var n=e(t),r=o(n,1);return t-n1)for(;a=u)return-1;if(37===(i=t.charCodeAt(s++))){if(a=t.charAt(s++),!(o=D[a in ys?t.charAt(s++):a])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}function r(e,t,n){C.lastIndex=0;var r=C.exec(t.slice(n));return r?(e.w=A.get(r[0].toLowerCase()),n+r[0].length):-1}function i(e,t,n){_.lastIndex=0;var r=_.exec(t.slice(n));return r?(e.w=w.get(r[0].toLowerCase()),n+r[0].length):-1}function o(e,t,n){x.lastIndex=0;var r=x.exec(t.slice(n));return r?(e.m=F.get(r[0].toLowerCase()),n+r[0].length):-1}function a(e,t,n){E.lastIndex=0;var r=E.exec(t.slice(n));return r?(e.m=S.get(r[0].toLowerCase()),n+r[0].length):-1}function s(e,t,r){return n(e,k.c.toString(),t,r)}function l(e,t,r){return n(e,k.x.toString(),t,r)}function u(e,t,r){return n(e,k.X.toString(),t,r)}function c(e,t,n){var r=b.get(t.slice(n,n+=2).toLowerCase());return null==r?-1:(e.p=r,n)}var d=e.dateTime,h=e.date,f=e.time,p=e.periods,g=e.days,m=e.shortDays,v=e.months,y=e.shortMonths;t.utc=function(e){function n(e){try{ms=Ve;var t=new ms;return t._=e,r(t)}finally{ms=Date}}var r=t(e);return n.parse=function(e){try{ms=Ve;var t=r.parse(e);return t&&t._}finally{ms=Date}},n.toString=r.toString,n},t.multi=t.utc.multi=ft;var b=fa.map(),_=Ye(g),w=Xe(g),C=Ye(m),A=Xe(m),E=Ye(v),S=Xe(v),x=Ye(y),F=Xe(y);p.forEach(function(e,t){b.set(e.toLowerCase(),t)});var k={a:function(e){return m[e.getDay()]},A:function(e){return g[e.getDay()]},b:function(e){return y[e.getMonth()]},B:function(e){return v[e.getMonth()]},c:t(d),d:function(e,t){return Ke(e.getDate(),t,2)},e:function(e,t){return Ke(e.getDate(),t,2)},H:function(e,t){return Ke(e.getHours(),t,2)},I:function(e,t){return Ke(e.getHours()%12||12,t,2)},j:function(e,t){return Ke(1+gs.dayOfYear(e),t,3)},L:function(e,t){return Ke(e.getMilliseconds(),t,3)},m:function(e,t){return Ke(e.getMonth()+1,t,2)},M:function(e,t){return Ke(e.getMinutes(),t,2)},p:function(e){return p[+(e.getHours()>=12)]},S:function(e,t){return Ke(e.getSeconds(),t,2)},U:function(e,t){return Ke(gs.sundayOfYear(e),t,2)},w:function(e){return e.getDay()},W:function(e,t){return Ke(gs.mondayOfYear(e),t,2)},x:t(h),X:t(f),y:function(e,t){return Ke(e.getFullYear()%100,t,2)},Y:function(e,t){return Ke(e.getFullYear()%1e4,t,4)},Z:dt,"%":function(){return"%"}},D={a:r,A:i,b:o,B:a,c:s,d:ot,e:ot,H:st,I:st,j:at,L:ct,m:it,M:lt,p:c,S:ut,U:Ze,w:Qe,W:Je,x:l,X:u,y:tt,Y:et,Z:nt,"%":ht};return t}function Ke(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o68?1900:2e3)}function it(e,t,n){bs.lastIndex=0;var r=bs.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ot(e,t,n){bs.lastIndex=0;var r=bs.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function at(e,t,n){bs.lastIndex=0;var r=bs.exec(t.slice(n,n+3));return r?(e.j=+r[0],n+r[0].length):-1}function st(e,t,n){bs.lastIndex=0;var r=bs.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function lt(e,t,n){bs.lastIndex=0;var r=bs.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ut(e,t,n){bs.lastIndex=0;var r=bs.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function ct(e,t,n){bs.lastIndex=0;var r=bs.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function dt(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=Aa(t)/60|0,i=Aa(t)%60;return n+Ke(r,"0",2)+Ke(i,"0",2)}function ht(e,t,n){_s.lastIndex=0;var r=_s.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function ft(e){for(var t=e.length,n=-1;++n=0?1:-1,s=a*n,l=Math.cos(t),u=Math.sin(t),c=o*u,d=i*l+c*Math.cos(s),h=c*a*Math.sin(s);xs.add(Math.atan2(h,d)),r=e,i=l,o=u}var t,n,r,i,o;Fs.point=function(a,s){Fs.point=e,r=(t=a)*Wa,i=Math.cos(s=(n=s)*Wa/2+Ha/4),o=Math.sin(s)},Fs.lineEnd=function(){e(t,n)}}function _t(e){var t=e[0],n=e[1],r=Math.cos(n);return[r*Math.cos(t),r*Math.sin(t),Math.sin(n)]}function wt(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Ct(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 At(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Et(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function St(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function xt(e){return[Math.atan2(e[1],e[0]),ae(e[2])]}function Ft(e,t){return Aa(e[0]-t[0])=0;--s)i.point((d=c[s])[0],d[1])}else r(f.x,f.p.x,-1,i);f=f.p}f=f.o,c=f.z,p=!p}while(!f.v);i.lineEnd()}}}function Bt(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r0){for(w||(o.polygonStart(),w=!0),o.lineStart();++a1&&2&t&&n.push(n.pop().concat(n.shift())),f.push(n.filter(Nt))}var f,p,g,m=t(o),v=i.invert(r[0],r[1]),y={point:a,lineStart:l,lineEnd:u,polygonStart:function(){y.point=c,y.lineStart=d,y.lineEnd=h,f=[],p=[]},polygonEnd:function(){y.point=a,y.lineStart=l,y.lineEnd=u,f=fa.merge(f);var e=Gt(v,p);f.length?(w||(o.polygonStart(),w=!0),Pt(f,zt,e,n,o)):e&&(w||(o.polygonStart(),w=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),w&&(o.polygonEnd(),w=!1),f=p=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}},b=jt(),_=t(b),w=!1;return y}}function Nt(e){return e.length>1}function jt(){var e,t=[];return{lineStart:function(){t.push(e=[])},point:function(t,n){e.push([t,n])},lineEnd:S,buffer:function(){var n=t;return t=[],e=null,n},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function zt(e,t){return((e=e.x)[0]<0?e[1]-Ga-ja:Ga-e[1])-((t=t.x)[0]<0?t[1]-Ga-ja:Ga-t[1])}function Ht(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(o,a){var s=o>0?Ha:-Ha,l=Aa(o-n);Aa(l-Ha)0?Ga:-Ga),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(o,r),t=0):i!==s&&l>=Ha&&(Aa(n-i)ja?Math.atan((Math.sin(t)*(o=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(t))*Math.sin(e))/(i*o*a)):(t+r)/2}function Vt(e,t,n,r){var i;if(null==e)i=n*Ga,r.point(-Ha,i),r.point(0,i),r.point(Ha,i),r.point(Ha,0),r.point(Ha,-i),r.point(0,-i),r.point(-Ha,-i),r.point(-Ha,0),r.point(-Ha,i);else if(Aa(e[0]-t[0])>ja){var o=e[0]=0?1:-1,A=C*w,E=A>Ha,S=p*b;if(xs.add(Math.atan2(S*C*Math.sin(A),g*_+S*Math.cos(A))),o+=E?w+C*Ua:w,E^h>=n^v>=n){var x=Ct(_t(d),_t(e));St(x);var F=Ct(i,x);St(F);var k=(E^w>=0?-1:1)*ae(F[2]);(r>k||r===k&&(x[0]||x[1]))&&(a+=E^w>=0?1:-1)}if(!m++)break;h=v,p=b,g=_,d=e}}return(o<-ja||oo}function n(e){var n,o,l,u,c;return{lineStart:function(){u=l=!1,c=1},point:function(d,h){var f,p=[d,h],g=t(d,h),m=a?g?0:i(d,h):g?i(d+(d<0?Ha:-Ha),h):0;if(!n&&(u=l=g)&&e.lineStart(),g!==l&&(f=r(n,p),(Ft(n,f)||Ft(p,f))&&(p[0]+=ja,p[1]+=ja,g=t(p[0],p[1]))),g!==l)c=0,g?(e.lineStart(),f=r(p,n),e.point(f[0],f[1])):(f=r(n,p),e.point(f[0],f[1]),e.lineEnd()),n=f;else if(s&&n&&a^g){var v;m&o||!(v=r(p,n,!0))||(c=0,a?(e.lineStart(),e.point(v[0][0],v[0][1]),e.point(v[1][0],v[1][1]),e.lineEnd()):(e.point(v[1][0],v[1][1]),e.lineEnd(),e.lineStart(),e.point(v[0][0],v[0][1])))}!g||n&&Ft(n,p)||e.point(p[0],p[1]),n=p,l=g,o=m},lineEnd:function(){l&&e.lineEnd(),n=null},clean:function(){return c|(u&&l)<<1}}}function r(e,t,n){var r=_t(e),i=_t(t),a=[1,0,0],s=Ct(r,i),l=wt(s,s),u=s[0],c=l-u*u;if(!c)return!n&&e;var d=o*l/c,h=-o*u/c,f=Ct(a,s),p=Et(a,d);At(p,Et(s,h));var g=f,m=wt(p,g),v=wt(g,g),y=m*m-v*(wt(p,p)-1);if(!(y<0)){var b=Math.sqrt(y),_=Et(g,(-m-b)/v);if(At(_,p),_=xt(_),!n)return _;var w,C=e[0],A=t[0],E=e[1],S=t[1];A0^_[1]<(Aa(_[0]-C)Ha^(C<=_[0]&&_[0]<=A)){var D=Et(g,(-m+b)/v);return At(D,p),[_,xt(D)]}}}function i(t,n){var r=a?e:Ha-e,i=0;return t<-r?i|=1:t>r&&(i|=2),n<-r?i|=4:n>r&&(i|=8),i}var o=Math.cos(e),a=o>0,s=Aa(o)>ja;return $t(t,n,_n(e,6*Wa),a?[0,-e]:[-Ha,e-Ha])}function qt(e,t,n,r){return function(i){var o,a=i.a,s=i.b,l=a.x,u=a.y,c=s.x,d=s.y,h=0,f=1,p=c-l,g=d-u;if(o=e-l,p||!(o>0)){if(o/=p,p<0){if(o0){if(o>f)return;o>h&&(h=o)}if(o=n-l,p||!(o<0)){if(o/=p,p<0){if(o>f)return;o>h&&(h=o)}else if(p>0){if(o0)){if(o/=g,g<0){if(o0){if(o>f)return;o>h&&(h=o)}if(o=r-u,g||!(o<0)){if(o/=g,g<0){if(o>f)return;o>h&&(h=o)}else if(g>0){if(o0&&(i.a={x:l+h*p,y:u+h*g}),f<1&&(i.b={x:l+f*p,y:u+f*g}),i}}}}}}function Kt(e,t,n,r){function i(r,i){return Aa(r[0]-e)0?0:3:Aa(r[0]-n)0?2:1:Aa(r[1]-t)0?1:0:i>0?3:2}function o(e,t){return a(e.x,t.x)}function a(e,t){var n=i(e,1),r=i(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(s){function l(e){for(var t=0,n=m.length,r=e[1],i=0;ir&&ie(u,o,e)>0&&++t:o[1]<=r&&ie(u,o,e)<0&&--t,u=o;return 0!==t}function u(o,s,l,u){var c=0,d=0;if(null==o||(c=i(o,l))!==(d=i(s,l))||a(o,s)<0^l>0)do{u.point(0===c||3===c?e:n,c>1?r:t)}while((c=(c+l+4)%4)!==d);else u.point(s[0],s[1])}function c(i,o){return e<=i&&i<=n&&t<=o&&o<=r}function d(e,t){c(e,t)&&s.point(e,t)}function h(){D.point=p,m&&m.push(v=[]),E=!0,A=!1,w=C=NaN}function f(){g&&(p(y,b),_&&A&&F.rejoin(),g.push(F.buffer())),D.point=d,A&&s.lineEnd()}function p(e,t){e=Math.max(-zs,Math.min(zs,e)),t=Math.max(-zs,Math.min(zs,t));var n=c(e,t);if(m&&v.push([e,t]),E)y=e,b=t,_=n,E=!1,n&&(s.lineStart(),s.point(e,t));else if(n&&A)s.point(e,t);else{var r={a:{x:w,y:C},b:{x:e,y:t}};k(r)?(A||(s.lineStart(),s.point(r.a.x,r.a.y)),s.point(r.b.x,r.b.y),n||s.lineEnd(),S=!1):n&&(s.lineStart(),s.point(e,t),S=!1)}w=e,C=t,A=n}var g,m,v,y,b,_,w,C,A,E,S,x=s,F=jt(),k=qt(e,t,n,r),D={point:d,lineStart:h,lineEnd:f,polygonStart:function(){s=F,g=[],m=[],S=!0},polygonEnd:function(){s=x,g=fa.merge(g);var t=l([e,r]),n=S&&t,i=g.length;(n||i)&&(s.polygonStart(),n&&(s.lineStart(),u(null,null,1,s),s.lineEnd()),i&&Pt(g,o,t,u,s),s.polygonEnd()),g=m=v=null}};return D}}function Yt(e){var t=0,n=Ha/3,r=hn(e),i=r(t,n);return i.parallels=function(e){return arguments.length?r(t=e[0]*Ha/180,n=e[1]*Ha/180):[t/Ha*180,n/Ha*180]},i}function Xt(e,t){function n(e,t){var n=Math.sqrt(o-2*i*Math.sin(t))/i;return[n*Math.sin(e*=i),a-n*Math.cos(e)]}var r=Math.sin(e),i=(r+Math.sin(t))/2,o=1+r*(2*i-r),a=Math.sqrt(o)/i;return n.invert=function(e,t){var n=a-t;return[Math.atan2(e,n)/i,ae((o-(e*e+n*n)*i*i)/(2*i))]},n}function Qt(){function e(e,t){Us+=i*e-r*t,r=e,i=t}var t,n,r,i;Ks.point=function(o,a){Ks.point=e,t=r=o,n=i=a},Ks.lineEnd=function(){e(t,n)}}function Zt(e,t){eWs&&(Ws=e),tqs&&(qs=t)}function Jt(){function e(e,t){a.push("M",e,",",t,o)}function t(e,t){a.push("M",e,",",t),s.point=n}function n(e,t){a.push("L",e,",",t)}function r(){s.point=e}function i(){a.push("Z")}var o=en(4.5),a=[],s={point:e,lineStart:function(){s.point=t},lineEnd:r,polygonStart:function(){s.lineEnd=i},polygonEnd:function(){s.lineEnd=r,s.point=e},pointRadius:function(e){return o=en(e),s},result:function(){if(a.length){var e=a.join("");return a=[],e}}};return s}function en(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function tn(e,t){Ts+=e,Ms+=t,++Rs}function nn(){function e(e,r){var i=e-t,o=r-n,a=Math.sqrt(i*i+o*o);Os+=a*(t+e)/2,Ls+=a*(n+r)/2,Ps+=a,tn(t=e,n=r)}var t,n;Xs.point=function(r,i){Xs.point=e,tn(t=r,n=i)}}function rn(){Xs.point=tn}function on(){function e(e,t){var n=e-r,o=t-i,a=Math.sqrt(n*n+o*o);Os+=a*(r+e)/2,Ls+=a*(i+t)/2,Ps+=a,a=i*e-r*t,Bs+=a*(r+e),Is+=a*(i+t),$s+=3*a,tn(r=e,i=t)}var t,n,r,i;Xs.point=function(o,a){Xs.point=e,tn(t=r=o,n=i=a)},Xs.lineEnd=function(){e(t,n)}}function an(e){function t(t,n){e.moveTo(t+a,n),e.arc(t,n,a,0,Ua)}function n(t,n){e.moveTo(t,n),s.point=r}function r(t,n){e.lineTo(t,n)}function i(){s.point=t}function o(){e.closePath()}var a=4.5,s={point:t,lineStart:function(){s.point=n},lineEnd:i,polygonStart:function(){s.lineEnd=o},polygonEnd:function(){s.lineEnd=i,s.point=t},pointRadius:function(e){return a=e,s},result:S};return s}function sn(e){function t(e){return(s?r:n)(e)}function n(t){return cn(t,function(n,r){n=e(n,r),t.point(n[0],n[1])})}function r(t){function n(n,r){n=e(n,r),t.point(n[0],n[1])}function r(){b=NaN,E.point=o,t.lineStart()}function o(n,r){var o=_t([n,r]),a=e(n,r);i(b,_,y,w,C,A,b=a[0],_=a[1],y=n,w=o[0],C=o[1],A=o[2],s,t),t.point(b,_)}function a(){E.point=n,t.lineEnd()}function l(){r(),E.point=u,E.lineEnd=c}function u(e,t){o(d=e,h=t),f=b,p=_,g=w,m=C,v=A,E.point=o}function c(){i(b,_,y,w,C,A,f,p,d,g,m,v,s,t),E.lineEnd=a,a()}var d,h,f,p,g,m,v,y,b,_,w,C,A,E={point:n,lineStart:r,lineEnd:a,polygonStart:function(){t.polygonStart(),E.lineStart=l},polygonEnd:function(){t.polygonEnd(),E.lineStart=r}};return E}function i(t,n,r,s,l,u,c,d,h,f,p,g,m,v){var y=c-t,b=d-n,_=y*y+b*b;if(_>4*o&&m--){var w=s+f,C=l+p,A=u+g,E=Math.sqrt(w*w+C*C+A*A),S=Math.asin(A/=E),x=Aa(Aa(A)-1)o||Aa((y*T+b*M)/_-.5)>.3||s*f+l*p+u*g0&&16,t):Math.sqrt(o)},t}function ln(e){var t=sn(function(t,n){return e([t*qa,n*qa])});return function(e){return fn(t(e))}}function un(e){this.stream=e}function cn(e,t){return{point:t,sphere:function(){e.sphere()},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}}}function dn(e){return hn(function(){return e})()}function hn(e){function t(e){return e=s(e[0]*Wa,e[1]*Wa),[e[0]*h+l,u-e[1]*h]}function n(e){return(e=s.invert((e[0]-l)/h,(u-e[1])/h))&&[e[0]*qa,e[1]*qa]}function r(){s=Ot(a=mn(v,y,b),o);var e=o(g,m);return l=f-e[0]*h,u=p+e[1]*h,i()}function i(){return c&&(c.valid=!1,c=null),t}var o,a,s,l,u,c,d=sn(function(e,t){return e=o(e,t),[e[0]*h+l,u-e[1]*h]}),h=150,f=480,p=250,g=0,m=0,v=0,y=0,b=0,_=js,w=C,A=null,E=null;return t.stream=function(e){return c&&(c.valid=!1),c=fn(_(a,d(w(e)))),c.valid=!0,c},t.clipAngle=function(e){return arguments.length?(_=null==e?(A=e,js):Wt((A=+e)*Wa),i()):A},t.clipExtent=function(e){return arguments.length?(E=e,w=e?Kt(e[0][0],e[0][1],e[1][0],e[1][1]):C,i()):E},t.scale=function(e){return arguments.length?(h=+e,r()):h},t.translate=function(e){return arguments.length?(f=+e[0],p=+e[1],r()):[f,p]},t.center=function(e){return arguments.length?(g=e[0]%360*Wa,m=e[1]%360*Wa,r()):[g*qa,m*qa]},t.rotate=function(e){return arguments.length?(v=e[0]%360*Wa,y=e[1]%360*Wa,b=e.length>2?e[2]%360*Wa:0,r()):[v*qa,y*qa,b*qa]},fa.rebind(t,d,"precision"),function(){return o=e.apply(this,arguments),t.invert=o.invert&&n,r()}}function fn(e){return cn(e,function(t,n){e.point(t*Wa,n*Wa)})}function pn(e,t){return[e,t]}function gn(e,t){return[e>Ha?e-Ua:e<-Ha?e+Ua:e,t]}function mn(e,t,n){return e?t||n?Ot(yn(e),bn(t,n)):yn(e):t||n?bn(t,n):gn}function vn(e){return function(t,n){return t+=e,[t>Ha?t-Ua:t<-Ha?t+Ua:t,n]}}function yn(e){var t=vn(e);return t.invert=vn(-e),t}function bn(e,t){function n(e,t){var n=Math.cos(t),s=Math.cos(e)*n,l=Math.sin(e)*n,u=Math.sin(t),c=u*r+s*i;return[Math.atan2(l*o-c*a,s*r-u*i),ae(c*o+l*a)]}var r=Math.cos(e),i=Math.sin(e),o=Math.cos(t),a=Math.sin(t);return n.invert=function(e,t){var n=Math.cos(t),s=Math.cos(e)*n,l=Math.sin(e)*n,u=Math.sin(t),c=u*o-l*a;return[Math.atan2(l*o+u*a,s*r+c*i),ae(c*r-s*i)]},n}function _n(e,t){var n=Math.cos(e),r=Math.sin(e);return function(i,o,a,s){var l=a*t;null!=i?(i=wn(n,i),o=wn(n,o),(a>0?io)&&(i+=a*Ua)):(i=e+a*Ua,o=e-.5*l);for(var u,c=i;a>0?c>o:c0?t<-Ga+ja&&(t=-Ga+ja):t>Ga-ja&&(t=Ga-ja);var n=a/Math.pow(i(t),o);return[n*Math.sin(o*e),a-n*Math.cos(o*e)]}var r=Math.cos(e),i=function(e){return Math.tan(Ha/4+e/2)},o=e===t?Math.sin(e):Math.log(r/Math.cos(t))/Math.log(i(t)/i(e)),a=r*Math.pow(i(e),o)/o;return o?(n.invert=function(e,t){var n=a-t,r=re(o)*Math.sqrt(e*e+n*n);return[Math.atan2(e,n)/o,2*Math.atan(Math.pow(a/r,1/o))-Ga]},n):Mn}function Tn(e,t){function n(e,t){var n=o-t;return[n*Math.sin(i*e),o-n*Math.cos(i*e)]}var r=Math.cos(e),i=e===t?Math.sin(e):(r-Math.cos(t))/(t-e),o=r/i+e;return Aa(i)1&&ie(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function In(e,t){return e[0]-t[0]||e[1]-t[1]}function $n(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function Nn(e,t,n,r){var i=e[0],o=n[0],a=t[0]-i,s=r[0]-o,l=e[1],u=n[1],c=t[1]-l,d=r[1]-u,h=(s*(l-u)-d*(i-o))/(d*a-s*c);return[i+h*a,l+h*c]}function jn(e){var t=e[0],n=e[e.length-1];return!(t[0]-n[0]||t[1]-n[1])}function zn(){lr(this),this.edge=this.site=this.circle=null}function Hn(e){var t=cl.pop()||new zn;return t.site=e,t}function Un(e){Jn(e),sl.remove(e),cl.push(e),lr(e)}function Vn(e){var t=e.circle,n=t.x,r=t.cy,i={x:n,y:r},o=e.P,a=e.N,s=[e];Un(e);for(var l=o;l.circle&&Aa(n-l.circle.x)ja)s=s.L;else{if(!((i=o-qn(s,a))>ja)){r>-ja?(t=s.P,n=s):i>-ja?(t=s,n=s.N):t=n=s;break}if(!s.R){t=s;break}s=s.R}var l=Hn(e);if(sl.insert(t,l),t||n){if(t===n)return Jn(t),n=Hn(t.site),sl.insert(l,n),l.edge=n.edge=rr(t.site,l.site),Zn(t),void Zn(n);if(!n)return void(l.edge=rr(t.site,l.site));Jn(t),Jn(n);var u=t.site,c=u.x,d=u.y,h=e.x-c,f=e.y-d,p=n.site,g=p.x-c,m=p.y-d,v=2*(h*m-f*g),y=h*h+f*f,b=g*g+m*m,_={x:(m*y-f*b)/v+c,y:(h*b-g*y)/v+d};or(n.edge,u,p,_),l.edge=rr(u,e,null,_),n.edge=rr(e,p,null,_),Zn(t),Zn(n)}}function Wn(e,t){var n=e.site,r=n.x,i=n.y,o=i-t;if(!o)return r;var a=e.P;if(!a)return-1/0;n=a.site;var s=n.x,l=n.y,u=l-t;if(!u)return s;var c=s-r,d=1/o-1/u,h=c/u;return d?(-h+Math.sqrt(h*h-2*d*(c*c/(-2*u)-l+u/2+i-o/2)))/d+r:(r+s)/2}function qn(e,t){var n=e.N;if(n)return Wn(n,t);var r=e.site;return r.y===t?r.x:1/0}function Kn(e){this.site=e,this.edges=[]}function Yn(e){for(var t,n,r,i,o,a,s,l,u,c,d=e[0][0],h=e[1][0],f=e[0][1],p=e[1][1],g=al,m=g.length;m--;)if((o=g[m])&&o.prepare())for(s=o.edges,l=s.length,a=0;aja||Aa(i-n)>ja)&&(s.splice(a,0,new ar(ir(o.site,c,Aa(r-d)ja?{x:d,y:Aa(t-d)ja?{x:Aa(n-p)ja?{x:h,y:Aa(t-h)ja?{x:Aa(n-f)=-za)){var f=l*l+u*u,p=c*c+d*d,g=(d*f-u*p)/h,m=(l*p-c*f)/h,d=m+s,v=dl.pop()||new Qn;v.arc=e,v.site=i,v.x=g+a,v.y=d+Math.sqrt(g*g+m*m),v.cy=d,e.circle=v;for(var y=null,b=ul._;b;)if(v.y=s)return;if(h>p){if(o){if(o.y>=u)return}else o={x:m,y:l};n={x:m,y:u}}else{if(o){if(o.y1)if(h>p){if(o){if(o.y>=u)return}else o={x:(l-i)/r,y:l};n={x:(u-i)/r,y:u}}else{if(o){if(o.y=s)return}else o={x:a,y:r*a+i};n={x:s,y:r*s+i}}else{if(o){if(o.xo||d>a||h=_,A=n>=w,E=A<<1|C,S=E+4;Eo&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Cr(n,r)})),o=pl.lastIndex;return o=0&&!(n=fa.interpolators[r](e,t)););return n}function Sr(e,t){var n,r=[],i=[],o=e.length,a=t.length,s=Math.min(e.length,t.length);for(n=0;n=1?1:e(t)}}function Fr(e){return function(t){return 1-e(1-t)}}function kr(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function Dr(e){return e*e}function Tr(e){return e*e*e}function Mr(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}function Rr(e){return function(t){return Math.pow(t,e)}}function Or(e){return 1-Math.cos(e*Ga)}function Lr(e){return Math.pow(2,10*(e-1))}function Pr(e){return 1-Math.sqrt(1-e*e)}function Br(e,t){var n;return arguments.length<2&&(t=.45),arguments.length?n=t/Ua*Math.asin(1/e):(e=1,n=t/4),function(r){return 1+e*Math.pow(2,-10*r)*Math.sin((r-n)*Ua/t)}}function Ir(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}}function $r(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function Nr(e,t){e=fa.hcl(e),t=fa.hcl(t);var n=e.h,r=e.c,i=e.l,o=t.h-n,a=t.c-r,s=t.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?t.c:r),isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return ge(n+o*e,r+a*e,i+s*e)+""}}function jr(e,t){e=fa.hsl(e),t=fa.hsl(t);var n=e.h,r=e.s,i=e.l,o=t.h-n,a=t.s-r,s=t.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?t.s:r),isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return fe(n+o*e,r+a*e,i+s*e)+""}}function zr(e,t){e=fa.lab(e),t=fa.lab(t);var n=e.l,r=e.a,i=e.b,o=t.l-n,a=t.a-r,s=t.b-i;return function(e){return ve(n+o*e,r+a*e,i+s*e)+""}}function Hr(e,t){return t-=e,function(n){return Math.round(e+t*n)}}function Ur(e){var t=[e.a,e.b],n=[e.c,e.d],r=Gr(t),i=Vr(t,n),o=Gr(Wr(n,t,-i))||0;t[0]*n[1]180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(qr(n)+"rotate(",null,")")-2,x:Cr(e,t)})):t&&n.push(qr(n)+"rotate("+t+")")}function Xr(e,t,n,r){e!==t?r.push({i:n.push(qr(n)+"skewX(",null,")")-2,x:Cr(e,t)}):t&&n.push(qr(n)+"skewX("+t+")")}function Qr(e,t,n,r){if(e[0]!==t[0]||e[1]!==t[1]){var i=n.push(qr(n)+"scale(",null,",",null,")");r.push({i:i-4,x:Cr(e[0],t[0])},{i:i-2,x:Cr(e[1],t[1])})}else 1===t[0]&&1===t[1]||n.push(qr(n)+"scale("+t+")")}function Zr(e,t){var n=[],r=[];return e=fa.transform(e),t=fa.transform(t),Kr(e.translate,t.translate,n,r),Yr(e.rotate,t.rotate,n,r),Xr(e.skew,t.skew,n,r),Qr(e.scale,t.scale,n,r),e=t=null,function(e){for(var t,i=-1,o=r.length;++i=0;)n.push(i[r])}function di(e,t){for(var n=[e],r=[];null!=(e=n.pop());)if(r.push(e),(o=e.children)&&(i=o.length))for(var i,o,a=-1;++ai&&(r=n,i=t);return r}function Ci(e){return e.reduce(Ai,0)}function Ai(e,t){return e+t[1]}function Ei(e,t){return Si(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function Si(e,t){for(var n=-1,r=+e[0],i=(e[1]-r)/t,o=[];++n<=t;)o[n]=i*n+r;return o}function xi(e){return[fa.min(e),fa.max(e)]}function Fi(e,t){return e.value-t.value}function ki(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function Di(e,t){e._pack_next=t,t._pack_prev=e}function Ti(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return.999*i*i>n*n+r*r}function Mi(e){function t(e){c=Math.min(e.x-e.r,c),d=Math.max(e.x+e.r,d),h=Math.min(e.y-e.r,h),f=Math.max(e.y+e.r,f)}if((n=e.children)&&(u=n.length)){var n,r,i,o,a,s,l,u,c=1/0,d=-1/0,h=1/0,f=-1/0;if(n.forEach(Ri),r=n[0],r.x=-r.r,r.y=0,t(r),u>1&&(i=n[1],i.x=i.r,i.y=0,t(i),u>2))for(o=n[2],Pi(r,i,o),t(o),ki(r,o),r._pack_prev=o,ki(o,i),i=r._pack_next,a=3;a=0;)t=i[o],t.z+=n,t.m+=n,n+=t.s+(r+=t.c)}function zi(e,t,n){return e.a.parent===t.parent?e.a:n}function Hi(e){return 1+fa.max(e,function(e){return e.y})}function Ui(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}function Vi(e){var t=e.children;return t&&t.length?Vi(t[0]):e}function Gi(e){var t,n=e.children;return n&&(t=n.length)?Gi(n[t-1]):e}function Wi(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function qi(e,t){var n=e.x+t[3],r=e.y+t[0],i=e.dx-t[1]-t[3],o=e.dy-t[0]-t[2];return i<0&&(n+=i/2,i=0),o<0&&(r+=o/2,o=0),{x:n,y:r,dx:i,dy:o}}function Ki(e){var t=e[0],n=e[e.length-1];return t2?Ji:Xi,l=r?ei:Jr;return a=i(e,t,l,n),s=i(t,e,l,Er),o}function o(e){return a(e)}var a,s;return o.invert=function(e){return s(e)},o.domain=function(t){return arguments.length?(e=t.map(Number),i()):e},o.range=function(e){return arguments.length?(t=e,i()):t},o.rangeRound=function(e){return o.range(e).interpolate(Hr)},o.clamp=function(e){return arguments.length?(r=e,i()):r},o.interpolate=function(e){return arguments.length?(n=e,i()):n},o.ticks=function(t){return io(e,t)},o.tickFormat=function(t,n){return oo(e,t,n)},o.nice=function(t){return no(e,t),i()},o.copy=function(){return eo(e,t,n,r)},i()}function to(e,t){return fa.rebind(e,t,"range","rangeRound","interpolate","clamp")}function no(e,t){return Qi(e,Zi(ro(e,t)[2])),Qi(e,Zi(ro(e,t)[2])),e}function ro(e,t){null==t&&(t=10);var n=Ki(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),o=t/r*i;return o<=.15?i*=10:o<=.35?i*=5:o<=.75&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+.5*i,n[2]=i,n}function io(e,t){return fa.range.apply(fa,ro(e,t))}function oo(e,t,n){var r=ro(e,t);if(n){var i=fs.exec(n);if(i.shift(),"s"===i[8]){var o=fa.formatPrefix(Math.max(Aa(r[0]),Aa(r[1])));return i[7]||(i[7]="."+ao(o.scale(r[2]))),i[8]="f",n=fa.format(i.join("")),function(e){return n(o.scale(e))+o.symbol}}i[7]||(i[7]="."+so(i[8],r)),n=i.join("")}else n=",."+ao(r[2])+"f";return fa.format(n)}function ao(e){return-Math.floor(Math.log(e)/Math.LN10+.01)}function so(e,t){var n=ao(t[2]);return e in xl?Math.abs(n-ao(Math.max(Aa(t[0]),Aa(t[1]))))+ +("e"!==e):n-2*("%"===e)}function lo(e,t,n,r){function i(e){return(n?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function o(e){return n?Math.pow(t,e):-Math.pow(t,-e)}function a(t){return e(i(t))}return a.invert=function(t){return o(e.invert(t))},a.domain=function(t){return arguments.length?(n=t[0]>=0,e.domain((r=t.map(Number)).map(i)),a):r},a.base=function(n){return arguments.length?(t=+n,e.domain(r.map(i)),a):t},a.nice=function(){var t=Qi(r.map(i),n?Math:kl);return e.domain(t),r=t.map(o),a},a.ticks=function(){var e=Ki(r),a=[],s=e[0],l=e[1],u=Math.floor(i(s)),c=Math.ceil(i(l)),d=t%1?2:t;if(isFinite(c-u)){if(n){for(;u0;h--)a.push(o(u)*h);for(u=0;a[u]l;c--);a=a.slice(u,c)}return a},a.tickFormat=function(e,n){if(!arguments.length)return Fl;arguments.length<2?n=Fl:"function"!=typeof n&&(n=fa.format(n));var r=Math.max(1,t*e/a.ticks().length);return function(e){var a=e/o(Math.round(i(e)));return a*t0?i[n-1]:e[0],n0?0:1}function Eo(e,t,n,r,i){var o=e[0]-t[0],a=e[1]-t[1],s=(i?r:-r)/Math.sqrt(o*o+a*a),l=s*a,u=-s*o,c=e[0]+l,d=e[1]+u,h=t[0]+l,f=t[1]+u,p=(c+h)/2,g=(d+f)/2,m=h-c,v=f-d,y=m*m+v*v,b=n-r,_=c*f-h*d,w=(v<0?-1:1)*Math.sqrt(Math.max(0,b*b*y-_*_)),C=(_*v-m*w)/y,A=(-_*m-v*w)/y,E=(_*v+m*w)/y,S=(-_*m+v*w)/y,x=C-p,F=A-g,k=E-p,D=S-g;return x*x+F*F>k*k+D*D&&(C=E,A=S),[[C-l,A-u],[C*n/b,A*n/b]]}function So(e){function t(t){function a(){u.push("M",o(e(c),s))}for(var l,u=[],c=[],d=-1,h=t.length,f=Me(n),p=Me(r);++d1?e.join("L"):e+"Z"}function Fo(e){return e.join("L")+"Z"}function ko(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t1&&i.push("H",r[0]),i.join("")}function Do(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t1){s=t[1],o=e[l],l++,r+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var u=2;u9&&(i=3*t/Math.sqrt(i),a[s]=i*n,a[s+1]=i*r));for(s=-1;++s<=l;)i=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([i||0,a[s]*i||0]);return o}function Go(e){return e.length<3?xo(e):e[0]+Lo(e,Vo(e))}function Wo(e){for(var t,n,r,i=-1,o=e.length;++i0;)h[--s].call(e,a);if(o>=1)return g.event&&g.event.end.call(e,e.__data__,t),--p.count?delete p[r]:delete e[n],1}var l,u,c,d,h,p=e[n]||(e[n]={active:0,count:0}),g=p[r];g||(l=i.time,u=Be(o,0,l),g=p[r]={tween:new f,time:l,timer:u,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++p.count)}function aa(e,t,n){e.attr("transform",function(e){var r=t(e);return"translate("+(isFinite(r)?r:n(e))+",0)"})}function sa(e,t,n){e.attr("transform",function(e){var r=t(e);return"translate(0,"+(isFinite(r)?r:n(e))+")"})}function la(e){return e.toISOString()}function ua(e,t,n){function r(t){return e(t)}function i(e,n){var r=e[1]-e[0],i=r/n,o=fa.bisect(Jl,i);return o==Jl.length?[t.year,ro(e.map(function(e){return e/31536e6}),n)[2]]:o?t[i/Jl[o-1]1?{floor:function(t){for(;n(t=e.floor(t));)t=ca(t-1);return t},ceil:function(t){for(;n(t=e.ceil(t));)t=ca(+t+1);return t}}:e))},r.ticks=function(e,t){var n=Ki(r.domain()),o=null==e?i(n,10):"number"==typeof e?i(n,e):!e.range&&[{range:e},t];return o&&(e=o[0],t=o[1]),e.range(n[0],ca(+n[1]+1),t<1?1:t)},r.tickFormat=function(){return n},r.copy=function(){return ua(e.copy(),t,n)},to(r,e)}function ca(e){return new Date(e)}function da(e){return JSON.parse(e.responseText)}function ha(e){var t=ma.createRange();return t.selectNode(ma.body),t.createContextualFragment(e.responseText)}var fa={version:"3.5.17"},pa=[].slice,ga=function(e){return pa.call(e)},ma=this.document;if(ma)try{ga(ma.documentElement.childNodes)[0].nodeType}catch(e){ga=function(e){for(var t=e.length,n=new Array(t);t--;)n[t]=e[t];return n}}if(Date.now||(Date.now=function(){return+new Date}),ma)try{ma.createElement("DIV").style.setProperty("opacity",0,"")}catch(e){var va=this.Element.prototype,ya=va.setAttribute,ba=va.setAttributeNS,_a=this.CSSStyleDeclaration.prototype,wa=_a.setProperty;va.setAttribute=function(e,t){ya.call(this,e,t+"")},va.setAttributeNS=function(e,t,n){ba.call(this,e,t,n+"")},_a.setProperty=function(e,t,n){wa.call(this,e,t+"",n)}}fa.ascending=a,fa.descending=function(e,t){return te?1:t>=e?0:NaN},fa.min=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i=r){n=r;break}for(;++ir&&(n=r)}else{for(;++i=r){n=r;break}for(;++ir&&(n=r)}return n},fa.max=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i=r){n=r;break}for(;++in&&(n=r)}else{for(;++i=r){n=r;break}for(;++in&&(n=r)}return n},fa.extent=function(e,t){var n,r,i,o=-1,a=e.length;if(1===arguments.length){for(;++o=r){n=i=r;break}for(;++or&&(n=r),i=r){n=i=r;break}for(;++or&&(n=r),i1)return a/(c-1)},fa.deviation=function(){var e=fa.variance.apply(this,arguments);return e?Math.sqrt(e):e};var Ca=u(a);fa.bisectLeft=Ca.left,fa.bisect=fa.bisectRight=Ca.right,fa.bisector=function(e){return u(1===e.length?function(t,n){return a(e(t),n)}:e)},fa.shuffle=function(e,t,n){(o=arguments.length)<3&&(n=e.length,o<2&&(t=0));for(var r,i,o=n-t;o;)i=Math.random()*o--|0,r=e[o+t],e[o+t]=e[i+t],e[i+t]=r;return e},fa.permute=function(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r},fa.pairs=function(e){for(var t=0,n=e.length-1,r=e[0],i=new Array(n<0?0:n);t=0;)for(r=e[i],t=r.length;--t>=0;)n[--a]=r[t];return n};var Aa=Math.abs;fa.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n==1/0)throw new Error("infinite range");var r,i=[],o=d(Aa(n)),a=-1;if(e*=o,t*=o,n*=o,n<0)for(;(r=e+n*++a)>t;)i.push(r/o);else for(;(r=e+n*++a)=o.length)return r?r.call(i,a):n?a.sort(n):a;for(var l,u,c,d,h=-1,p=a.length,g=o[s++],m=new f;++h=o.length)return e;var r=[],i=a[n++];return e.forEach(function(e,i){r.push({key:e,values:t(i,n)})}),i?r.sort(function(e,t){return i(e.key,t.key)}):r}var n,r,i={},o=[],a=[];return i.map=function(t,n){return e(n,t,0)},i.entries=function(n){return t(e(fa.map,n,0),0)},i.key=function(e){return o.push(e),i},i.sortKeys=function(e){return a[o.length-1]=e,i},i.sortValues=function(e){return n=e,i},i.rollup=function(e){return r=e,i},i},fa.set=function(e){var t=new w;if(e)for(var n=0,r=e.length;n=0&&(r=e.slice(n+1),e=e.slice(0,n)),e)return arguments.length<2?this[e].on(r):this[e].on(r,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(r,null);return this}},fa.event=null,fa.requote=function(e){return e.replace(Fa,"\\$&")};var Fa=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,ka={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]},Da=function(e,t){return t.querySelector(e)},Ta=function(e,t){return t.querySelectorAll(e)},Ma=function(e,t){var n=e.matches||e[E(e,"matchesSelector")];return(Ma=function(e,t){return n.call(e,t)})(e,t)};"function"==typeof Sizzle&&(Da=function(e,t){return Sizzle(e,t)[0]||null},Ta=Sizzle,Ma=Sizzle.matchesSelector),fa.selection=function(){return fa.select(ma.documentElement)};var Ra=fa.selection.prototype=[];Ra.select=function(e){var t,n,r,i,o=[];e=R(e);for(var a=-1,s=this.length;++a=0&&"xmlns"!==(n=e.slice(0,t))&&(e=e.slice(t+1)),La.hasOwnProperty(n)?{space:La[n],local:e}:e}},Ra.attr=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node();return e=fa.ns.qualify(e),e.local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(L(t,e[t]));return this}return this.each(L(e,t))},Ra.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node(),r=(e=I(e)).length,i=-1;if(t=n.classList){for(;++i=0;)(n=r[i])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n);return this},Ra.sort=function(e){e=q.apply(this,arguments);for(var t=-1,n=this.length;++t0&&(t=t.transition().duration(F)),t.call(e.event)}function s(){w&&w.domain(_.range().map(function(e){return(e-E.x)/E.k}).map(_.invert)),A&&A.domain(C.range().map(function(e){return(e-E.y)/E.k}).map(C.invert))}function l(e){D++||e({type:"zoomstart"})}function u(e){s(),e({type:"zoom",scale:E.k,translate:[E.x,E.y]})}function c(e){--D||(e({type:"zoomend"}),m=null)}function d(){function e(){s=1,i(fa.mouse(r),h),u(a)}function n(){d.on(R,null).on(O,null),f(s),c(a)}var r=this,a=P.of(r,arguments),s=0,d=fa.select(o(r)).on(R,e).on(O,n),h=t(fa.mouse(r)),f=ee(r);Ul.call(r),l(a)}function h(){function e(){var e=fa.touches(p);return f=E.k,e.forEach(function(e){e.identifier in m&&(m[e.identifier]=t(e))}),e}function n(){var t=fa.event.target;fa.select(t).on(_,o).on(w,s),C.push(t);for(var n=fa.event.changedTouches,r=0,i=n.length;r1){var c=l[0],d=l[1],h=c[0]-d[0],f=c[1]-d[1];v=h*h+f*f}}function o(){var e,t,n,o,a=fa.touches(p);Ul.call(p);for(var s=0,l=a.length;s=u)return a;if(i)return i=!1,o;var t=c;if(34===e.charCodeAt(t)){for(var n=t;n++=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,ps=fa.map({b:function(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(e,t){return(e=fa.round(e,je(e,t))).toFixed(Math.max(0,Math.min(20,je(e*(1+1e-15),t))))}}),gs=fa.time={},ms=Date;Ve.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){vs.setUTCDate.apply(this._,arguments)},setDay:function(){vs.setUTCDay.apply(this._,arguments)},setFullYear:function(){vs.setUTCFullYear.apply(this._,arguments)},setHours:function(){vs.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){vs.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){vs.setUTCMinutes.apply(this._,arguments)},setMonth:function(){vs.setUTCMonth.apply(this._,arguments)},setSeconds:function(){vs.setUTCSeconds.apply(this._,arguments)},setTime:function(){vs.setTime.apply(this._,arguments)}};var vs=Date.prototype;gs.year=Ge(function(e){return e=gs.day(e),e.setMonth(0,1),e},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e){return e.getFullYear()}),gs.years=gs.year.range,gs.years.utc=gs.year.utc.range,gs.day=Ge(function(e){var t=new ms(2e3,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t},function(e,t){e.setDate(e.getDate()+t)},function(e){return e.getDate()-1}),gs.days=gs.day.range,gs.days.utc=gs.day.utc.range,gs.dayOfYear=function(e){var t=gs.year(e);return Math.floor((e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(e,t){t=7-t;var n=gs[e]=Ge(function(e){return(e=gs.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e},function(e,t){e.setDate(e.getDate()+7*Math.floor(t))},function(e){var n=gs.year(e).getDay();return Math.floor((gs.dayOfYear(e)+(n+t)%7)/7)-(n!==t)});gs[e+"s"]=n.range,gs[e+"s"].utc=n.utc.range,gs[e+"OfYear"]=function(e){var n=gs.year(e).getDay();return Math.floor((gs.dayOfYear(e)+(n+t)%7)/7)}}),gs.week=gs.sunday,gs.weeks=gs.sunday.range,gs.weeks.utc=gs.sunday.utc.range,gs.weekOfYear=gs.sundayOfYear;var ys={"-":"",_:" ",0:"0"},bs=/^\s*\d+/,_s=/^%/;fa.locale=function(e){return{numberFormat:He(e),timeFormat:qe(e)}};var ws=fa.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});fa.format=ws.numberFormat,fa.geo={},pt.prototype={s:0,t:0,add:function(e){gt(e,this.t,Cs),gt(Cs.s,this.s,this),this.s?this.t+=Cs.t:this.s=Cs.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var Cs=new pt;fa.geo.stream=function(e,t){e&&As.hasOwnProperty(e.type)?As[e.type](e,t):mt(e,t)};var As={Feature:function(e,t){mt(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++rf&&(f=t)}function t(t,n){var r=_t([t*Wa,n*Wa]);if(v){var i=Ct(v,r),o=[i[1],-i[0],0],a=Ct(o,i);St(a),a=xt(a);var l=t-p,u=l>0?1:-1,g=a[0]*qa*u,m=Aa(l)>180;if(m^(u*pf&&(f=y)}else if(g=(g+360)%360-180,m^(u*pf&&(f=n);m?ts(c,h)&&(h=t):s(t,h)>s(c,h)&&(c=t):h>=c?(th&&(h=t)):t>p?s(c,t)>s(c,h)&&(h=t):s(t,h)>s(c,h)&&(c=t)}else e(t,n);v=r,p=t}function n(){w.point=t}function r(){_[0]=c,_[1]=h,w.point=e,v=null}function i(e,n){if(v){var r=e-p;y+=Aa(r)>180?r+(r>0?360:-360):r}else g=e,m=n;Fs.point(e,n),t(e,n)}function o(){Fs.lineStart()}function a(){i(g,m),Fs.lineEnd(),Aa(y)>ja&&(c=-(h=180)),_[0]=c,_[1]=h,v=null}function s(e,t){return(t-=e)<0?t+360:t}function l(e,t){return e[0]-t[0]}function u(e,t){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:eja?f=90:y<-ja&&(d=-90),_[0]=c,_[1]=h}};return function(e){f=h=-(c=d=1/0),b=[],fa.geo.stream(e,w);var t=b.length;if(t){b.sort(l);for(var n,r=1,i=b[0],o=[i];rs(i[0],i[1])&&(i[1]=n[1]),s(n[0],i[1])>s(i[0],i[1])&&(i[0]=n[0])):o.push(i=n);for(var a,n,p=-1/0,t=o.length-1,r=0,i=o[t];r<=t;i=n,++r)n=o[r],(a=s(i[1],n[0]))>p&&(p=a,c=n[0],h=i[1])}return b=_=null,c===1/0||d===1/0?[[NaN,NaN],[NaN,NaN]]:[[c,d],[h,f]]}}(),fa.geo.centroid=function(e){ks=Ds=Ts=Ms=Rs=Os=Ls=Ps=Bs=Is=$s=0,fa.geo.stream(e,Ns);var t=Bs,n=Is,r=$s,i=t*t+n*n+r*r;return i=.12&&i<.234&&r>=-.425&&r<-.214?a:i>=.166&&i<.234&&r>=-.214&&r<-.115?s:o).invert(e)},e.stream=function(e){var t=o.stream(e),n=a.stream(e),r=s.stream(e);return{point:function(e,i){t.point(e,i),n.point(e,i),r.point(e,i)},sphere:function(){t.sphere(),n.sphere(),r.sphere()},lineStart:function(){t.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},e.precision=function(t){return arguments.length?(o.precision(t),a.precision(t),s.precision(t),e):o.precision()},e.scale=function(t){return arguments.length?(o.scale(t),a.scale(.35*t),s.scale(t),e.translate(o.translate())):o.scale()},e.translate=function(t){if(!arguments.length)return o.translate();var u=o.scale(),c=+t[0],d=+t[1];return n=o.translate(t).clipExtent([[c-.455*u,d-.238*u],[c+.455*u,d+.238*u]]).stream(l).point,r=a.translate([c-.307*u,d+.201*u]).clipExtent([[c-.425*u+ja,d+.12*u+ja],[c-.214*u-ja,d+.234*u-ja]]).stream(l).point,i=s.translate([c-.205*u,d+.212*u]).clipExtent([[c-.214*u+ja,d+.166*u+ja],[c-.115*u-ja,d+.234*u-ja]]).stream(l).point,e},e.scale(1070)};var Hs,Us,Vs,Gs,Ws,qs,Ks={point:S,lineStart:S,lineEnd:S,polygonStart:function(){Us=0,Ks.lineStart=Qt},polygonEnd:function(){Ks.lineStart=Ks.lineEnd=Ks.point=S,Hs+=Aa(Us/2)}},Ys={point:Zt,lineStart:S,lineEnd:S,polygonStart:S,polygonEnd:S},Xs={point:tn,lineStart:nn,lineEnd:rn,polygonStart:function(){Xs.lineStart=on},polygonEnd:function(){Xs.point=tn,Xs.lineStart=nn,Xs.lineEnd=rn}};fa.geo.path=function(){function e(e){return e&&("function"==typeof s&&o.pointRadius(+s.apply(this,arguments)),a&&a.valid||(a=i(o)),fa.geo.stream(e,a)),o.result()}function t(){return a=null,e}var n,r,i,o,a,s=4.5;return e.area=function(e){return Hs=0,fa.geo.stream(e,i(Ks)),Hs},e.centroid=function(e){return Ts=Ms=Rs=Os=Ls=Ps=Bs=Is=$s=0,fa.geo.stream(e,i(Xs)),$s?[Bs/$s,Is/$s]:Ps?[Os/Ps,Ls/Ps]:Rs?[Ts/Rs,Ms/Rs]:[NaN,NaN]},e.bounds=function(e){return Ws=qs=-(Vs=Gs=1/0),fa.geo.stream(e,i(Ys)),[[Vs,Gs],[Ws,qs]]},e.projection=function(e){return arguments.length?(i=(n=e)?e.stream||ln(e):C,t()):n},e.context=function(e){return arguments.length?(o=null==(r=e)?new Jt:new an(e),"function"!=typeof s&&o.pointRadius(s),t()):r},e.pointRadius=function(t){return arguments.length?(s="function"==typeof t?t:(o.pointRadius(+t),+t),e):s},e.projection(fa.geo.albersUsa()).context(null)},fa.geo.transform=function(e){return{stream:function(t){var n=new un(t);for(var r in e)n[r]=e[r];return n}}},un.prototype={point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},fa.geo.projection=dn,fa.geo.projectionMutator=hn,(fa.geo.equirectangular=function(){return dn(pn)}).raw=pn.invert=pn,fa.geo.rotation=function(e){function t(t){return t=e(t[0]*Wa,t[1]*Wa),t[0]*=qa,t[1]*=qa,t}return e=mn(e[0]%360*Wa,e[1]*Wa,e.length>2?e[2]*Wa:0),t.invert=function(t){return t=e.invert(t[0]*Wa,t[1]*Wa),t[0]*=qa,t[1]*=qa,t},t},gn.invert=pn,fa.geo.circle=function(){function e(){var e="function"==typeof r?r.apply(this,arguments):r,t=mn(-e[0]*Wa,-e[1]*Wa,0).invert,i=[];return n(null,null,1,{point:function(e,n){i.push(e=t(e,n)),e[0]*=qa,e[1]*=qa}}),{type:"Polygon",coordinates:[i]}}var t,n,r=[0,0],i=6;return e.origin=function(t){return arguments.length?(r=t,e):r},e.angle=function(r){return arguments.length?(n=_n((t=+r)*Wa,i*Wa),e):t},e.precision=function(r){return arguments.length?(n=_n(t*Wa,(i=+r)*Wa),e):i},e.angle(90)},fa.geo.distance=function(e,t){var n,r=(t[0]-e[0])*Wa,i=e[1]*Wa,o=t[1]*Wa,a=Math.sin(r),s=Math.cos(r),l=Math.sin(i),u=Math.cos(i),c=Math.sin(o),d=Math.cos(o);return Math.atan2(Math.sqrt((n=d*a)*n+(n=u*c-l*d*s)*n),l*c+u*d*s)},fa.geo.graticule=function(){function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return fa.range(Math.ceil(o/m)*m,i,m).map(h).concat(fa.range(Math.ceil(u/v)*v,l,v).map(f)).concat(fa.range(Math.ceil(r/p)*p,n,p).filter(function(e){return Aa(e%m)>ja}).map(c)).concat(fa.range(Math.ceil(s/g)*g,a,g).filter(function(e){return Aa(e%v)>ja}).map(d))}var n,r,i,o,a,s,l,u,c,d,h,f,p=10,g=p,m=90,v=360,y=2.5;return e.lines=function(){return t().map(function(e){return{type:"LineString",coordinates:e}})},e.outline=function(){return{type:"Polygon",coordinates:[h(o).concat(f(l).slice(1),h(i).reverse().slice(1),f(u).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.majorExtent(t).minorExtent(t):e.minorExtent()},e.majorExtent=function(t){return arguments.length?(o=+t[0][0],i=+t[1][0],u=+t[0][1],l=+t[1][1],o>i&&(t=o,o=i,i=t),u>l&&(t=u,u=l,l=t),e.precision(y)):[[o,u],[i,l]]},e.minorExtent=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),s>a&&(t=s,s=a,a=t),e.precision(y)):[[r,s],[n,a]]},e.step=function(t){return arguments.length?e.majorStep(t).minorStep(t):e.minorStep()},e.majorStep=function(t){return arguments.length?(m=+t[0],v=+t[1],e):[m,v]},e.minorStep=function(t){return arguments.length?(p=+t[0],g=+t[1],e):[p,g]},e.precision=function(t){return arguments.length?(y=+t,c=Cn(s,a,90),d=An(r,n,y),h=Cn(u,l,90),f=An(o,i,y),e):y},e.majorExtent([[-180,-90+ja],[180,90-ja]]).minorExtent([[-180,-80-ja],[180,80+ja]])},fa.geo.greatArc=function(){function e(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),n||i.apply(this,arguments)]}}var t,n,r=En,i=Sn;return e.distance=function(){return fa.geo.distance(t||r.apply(this,arguments),n||i.apply(this,arguments))},e.source=function(n){return arguments.length?(r=n,t="function"==typeof n?null:n,e):r},e.target=function(t){return arguments.length?(i=t,n="function"==typeof t?null:t,e):i},e.precision=function(){return arguments.length?e:0},e},fa.geo.interpolate=function(e,t){return xn(e[0]*Wa,e[1]*Wa,t[0]*Wa,t[1]*Wa)},fa.geo.length=function(e){return Qs=0,fa.geo.stream(e,Zs),Qs};var Qs,Zs={sphere:S,point:S,lineStart:Fn,lineEnd:S,polygonStart:S,polygonEnd:S},Js=kn(function(e){return Math.sqrt(2/(1+e))},function(e){return 2*Math.asin(e/2)});(fa.geo.azimuthalEqualArea=function(){return dn(Js)}).raw=Js;var el=kn(function(e){var t=Math.acos(e);return t&&t/Math.sin(t)},C);(fa.geo.azimuthalEquidistant=function(){return dn(el)}).raw=el,(fa.geo.conicConformal=function(){return Yt(Dn)}).raw=Dn,(fa.geo.conicEquidistant=function(){return Yt(Tn)}).raw=Tn;var tl=kn(function(e){return 1/e},Math.atan);(fa.geo.gnomonic=function(){return dn(tl)}).raw=tl,Mn.invert=function(e,t){return[e,2*Math.atan(Math.exp(t))-Ga]},(fa.geo.mercator=function(){return Rn(Mn)}).raw=Mn;var nl=kn(function(){return 1},Math.asin);(fa.geo.orthographic=function(){return dn(nl)}).raw=nl;var rl=kn(function(e){return 1/(1+e)},function(e){return 2*Math.atan(e)});(fa.geo.stereographic=function(){return dn(rl)}).raw=rl,On.invert=function(e,t){return[-t,2*Math.atan(Math.exp(e))-Ga]},(fa.geo.transverseMercator=function(){var e=Rn(On),t=e.center,n=e.rotate;return e.center=function(e){return e?t([-e[1],e[0]]):(e=t(),[e[1],-e[0]])},e.rotate=function(e){return e?n([e[0],e[1],e.length>2?e[2]+90:90]):(e=n(),[e[0],e[1],e[2]-90])},n([0,0,90])}).raw=On,fa.geom={},fa.geom.hull=function(e){function t(e){if(e.length<3)return[];var t,i=Me(n),o=Me(r),a=e.length,s=[],l=[];for(t=0;t=0;--t)f.push(e[s[u[t]][2]]);for(t=+d;t=r&&u.x<=o&&u.y>=i&&u.y<=a?[[r,a],[o,a],[o,i],[r,i]]:[]).point=e[s]}),t}function n(e){return e.map(function(e,t){return{x:Math.round(o(e,t)/ja)*ja,y:Math.round(a(e,t)/ja)*ja,i:t}})}var r=Ln,i=Pn,o=r,a=i,s=hl;return e?t(e):(t.links=function(e){return hr(n(e)).edges.filter(function(e){return e.l&&e.r}).map(function(t){return{source:e[t.l.i],target:e[t.r.i]}})},t.triangles=function(e){var t=[];return hr(n(e)).cells.forEach(function(n,r){for(var i,o=n.site,a=n.edges.sort(Xn),s=-1,l=a.length,u=a[l-1].edge,c=u.l===o?u.r:u.l;++s=u,h=r>=c,f=h<<1|d;e.leaf=!1,e=e.nodes[f]||(e.nodes[f]=vr()),d?i=u:s=u,h?a=c:l=c,o(e,t,n,r,i,a,s,l)}var c,d,h,f,p,g,m,v,y,b=Me(s),_=Me(l);if(null!=t)g=t,m=n,v=r,y=i;else if(v=y=-(g=m=1/0),d=[],h=[],p=e.length,a)for(f=0;fv&&(v=c.x),c.y>y&&(y=c.y),d.push(c.x),h.push(c.y);else for(f=0;fv&&(v=w),C>y&&(y=C),d.push(w),h.push(C)}var A=v-g,E=y-m;A>E?y=m+A:v=g+E;var S=vr();if(S.add=function(e){o(S,e,+b(e,++f),+_(e,f),g,m,v,y)},S.visit=function(e){yr(e,S,g,m,v,y)},S.find=function(e){return br(S,e[0],e[1],g,m,v,y)},f=-1,null==t){for(;++f=0?e.slice(0,t):e,r=t>=0?e.slice(t+1):"in";return n=ml.get(n)||gl,r=vl.get(r)||C,xr(r(n.apply(null,pa.call(arguments,1))))},fa.interpolateHcl=Nr,fa.interpolateHsl=jr,fa.interpolateLab=zr,fa.interpolateRound=Hr,fa.transform=function(e){var t=ma.createElementNS(fa.ns.prefix.svg,"g");return(fa.transform=function(e){if(null!=e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate()}return new Ur(n?n.matrix:yl)})(e)},Ur.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var yl={a:1,b:0,c:0,d:1,e:0,f:0};fa.interpolateTransform=Zr,fa.layout={},fa.layout.bundle=function(){return function(e){for(var t=[],n=-1,r=e.length;++n0?i=e:(n.c=null,n.t=NaN,n=null,u.end({type:"end",alpha:i=0})):e>0&&(u.start({type:"start",alpha:i=e}),n=Be(l.tick)),l):i},l.start=function(){function e(e,r){if(!n){for(n=new Array(i),l=0;l=0;)a.push(c=u[l]),c.parent=o,c.depth=o.depth+1;r&&(o.value=0),o.children=u}else r&&(o.value=+r.call(e,o,o.depth)||0),delete o.children;return di(i,function(e){var n,i;t&&(n=e.children)&&n.sort(t),r&&(i=e.parent)&&(i.value+=e.value)}),s}var t=pi,n=hi,r=fi;return e.sort=function(n){return arguments.length?(t=n,e):t},e.children=function(t){return arguments.length?(n=t,e):n},e.value=function(t){return arguments.length?(r=t,e):r},e.revalue=function(t){return r&&(ci(t,function(e){e.children&&(e.value=0)}),di(t,function(t){var n;t.children||(t.value=+r.call(e,t,t.depth)||0),(n=t.parent)&&(n.value+=t.value)})),t},e},fa.layout.partition=function(){function e(t,n,r,i){var o=t.children;if(t.x=n,t.y=t.depth*i,t.dx=r,t.dy=i,o&&(a=o.length)){var a,s,l,u=-1;for(r=t.value?r/t.value:0;++us&&(s=r),a.push(r)}for(n=0;n0)for(o=-1;++o=c[0]&&s<=c[1]&&(a=l[fa.bisect(d,s,1,f)-1],a.y+=p,a.push(e[o]));return l}var t=!0,n=Number,r=xi,i=Ei;return e.value=function(t){return arguments.length?(n=t,e):n},e.range=function(t){return arguments.length?(r=Me(t),e):r},e.bins=function(t){return arguments.length?(i="number"==typeof t?function(e){return Si(e,t)}:Me(t),e):i},e.frequency=function(n){return arguments.length?(t=!!n,e):t},e},fa.layout.pack=function(){function e(e,o){var a=n.call(this,e,o),s=a[0],l=i[0],u=i[1],c=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,di(s,function(e){e.r=+c(e.value)}),di(s,Mi),r){var d=r*(t?1:Math.max(2*s.r/l,2*s.r/u))/2;di(s,function(e){e.r+=d}),di(s,Mi),di(s,function(e){e.r-=d})}return Li(s,l/2,u/2,t?1:1/Math.max(2*s.r/l,2*s.r/u)),a}var t,n=fa.layout.hierarchy().sort(Fi),r=0,i=[1,1];return e.size=function(t){return arguments.length?(i=t,e):i},e.radius=function(n){return arguments.length?(t=null==n||"function"==typeof n?n:+n,e):t},e.padding=function(t){return arguments.length?(r=+t,e):r},ui(e,n)},fa.layout.tree=function(){function e(e,i){var c=a.call(this,e,i),d=c[0],h=t(d);if(di(h,n),h.parent.m=-h.z,ci(h,r),u)ci(d,o);else{var f=d,p=d,g=d;ci(d,function(e){e.xp.x&&(p=e),e.depth>g.depth&&(g=e)});var m=s(f,p)/2-f.x,v=l[0]/(p.x+s(p,f)/2+m),y=l[1]/(g.depth||1);ci(d,function(e){e.x=(e.x+m)*v,e.y=e.depth*y})}return c}function t(e){for(var t,n={A:null,children:[e]},r=[n];null!=(t=r.pop());)for(var i,o=t.children,a=0,s=o.length;a0&&(Ni(zi(a,e,n),e,r),u+=r,c+=r),d+=a.m,u+=i.m,h+=l.m,c+=o.m;a&&!$i(o)&&(o.t=a,o.m+=d-c),i&&!Ii(l)&&(l.t=i,l.m+=u-h,n=e)}return n}function o(e){e.x*=l[0],e.y=e.depth*l[1]}var a=fa.layout.hierarchy().sort(null).value(null),s=Bi,l=[1,1],u=null;return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=null==(l=t)?o:null,e):u?null:l},e.nodeSize=function(t){return arguments.length?(u=null==(l=t)?null:o,e):u?l:null},ui(e,a)},fa.layout.cluster=function(){function e(e,o){var a,s=t.call(this,e,o),l=s[0],u=0;di(l,function(e){var t=e.children;t&&t.length?(e.x=Ui(t),e.y=Hi(t)):(e.x=a?u+=n(e,a):0,e.y=0,a=e)});var c=Vi(l),d=Gi(l),h=c.x-n(c,d)/2,f=d.x+n(d,c)/2;return di(l,i?function(e){e.x=(e.x-l.x)*r[0],e.y=(l.y-e.y)*r[1]}:function(e){e.x=(e.x-h)/(f-h)*r[0],e.y=(1-(l.y?e.y/l.y:1))*r[1]}),s}var t=fa.layout.hierarchy().sort(null).value(null),n=Bi,r=[1,1],i=!1;return e.separation=function(t){return arguments.length?(n=t,e):n},e.size=function(t){return arguments.length?(i=null==(r=t),e):i?null:r},e.nodeSize=function(t){return arguments.length?(i=null!=(r=t),e):i?r:null},ui(e,t)},fa.layout.treemap=function(){function e(e,t){for(var n,r,i=-1,o=e.length;++i0;)c.push(a=h[l-1]),c.area+=a.area,"squarify"!==f||(s=r(c,g))<=p?(h.pop(),p=s):(c.area-=c.pop().area,i(c,g,u,!1),g=Math.min(u.dx,u.dy),c.length=c.area=0,p=1/0);c.length&&(i(c,g,u,!0),c.length=c.area=0),o.forEach(t)}}function n(t){var r=t.children;if(r&&r.length){var o,a=d(t),s=r.slice(),l=[];for(e(s,a.dx*a.dy/t.value),l.area=0;o=s.pop();)l.push(o),l.area+=o.area,null!=o.z&&(i(l,o.z?a.dx:a.dy,a,!s.length),l.length=l.area=0);r.forEach(n)}}function r(e,t){for(var n,r=e.area,i=0,o=1/0,a=-1,s=e.length;++ai&&(i=n));return r*=r,t*=t,r?Math.max(t*i*p/r,r/(t*o*p)):1/0}function i(e,t,n,r){var i,o=-1,a=e.length,s=n.x,u=n.y,c=t?l(e.area/t):0;if(t==n.dx){for((r||c>n.dy)&&(c=n.dy);++on.dx)&&(c=n.dx);++o1);return e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=fa.random.normal.apply(fa,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=fa.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,n=0;nd?0:1;if(u=Va)return t(u,f)+(e?t(e,1-f):"")+"Z";var p,g,m,v,y,b,_,w,C,A,E,S,x=0,F=0,k=[];if((v=(+l.apply(this,arguments)||0)/2)&&(m=o===Ol?Math.sqrt(e*e+u*u):+o.apply(this,arguments),f||(F*=-1),u&&(F=ae(m/u*Math.sin(v))),e&&(x=ae(m/e*Math.sin(v)))),u){y=u*Math.cos(c+F),b=u*Math.sin(c+F),_=u*Math.cos(d-F),w=u*Math.sin(d-F);var D=Math.abs(d-c-2*F)<=Ha?0:1;if(F&&Ao(y,b,_,w)===f^D){var T=(c+d)/2;y=u*Math.cos(T),b=u*Math.sin(T),_=w=null}}else y=b=0;if(e){C=e*Math.cos(d-x),A=e*Math.sin(d-x),E=e*Math.cos(c+x),S=e*Math.sin(c+x);var M=Math.abs(c-d+2*x)<=Ha?0:1;if(x&&Ao(C,A,E,S)===1-f^M){var R=(c+d)/2;C=e*Math.cos(R),A=e*Math.sin(R),E=S=null}}else C=A=0;if(h>ja&&(p=Math.min(Math.abs(u-e)/2,+i.apply(this,arguments)))>.001){g=eHa)+",1 "+t}function i(e,t,n,r){return"Q 0,0 "+r}var o=En,a=Sn,s=Ko,l=_o,u=wo;return e.radius=function(t){return arguments.length?(s=Me(t),e):s},e.source=function(t){return arguments.length?(o=Me(t),e):o},e.target=function(t){return arguments.length?(a=Me(t),e):a},e.startAngle=function(t){return arguments.length?(l=Me(t),e):l},e.endAngle=function(t){return arguments.length?(u=Me(t),e):u},e},fa.svg.diagonal=function(){function e(e,i){var o=t.call(this,e,i),a=n.call(this,e,i),s=(o.y+a.y)/2,l=[o,{x:o.x,y:s},{x:a.x,y:s},a];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=En,n=Sn,r=Yo;return e.source=function(n){return arguments.length?(t=Me(n),e):t},e.target=function(t){return arguments.length?(n=Me(t),e):n},e.projection=function(t){return arguments.length?(r=t,e):r},e},fa.svg.diagonal.radial=function(){var e=fa.svg.diagonal(),t=Yo,n=e.projection;return e.projection=function(e){return arguments.length?n(Xo(t=e)):t},e},fa.svg.symbol=function(){function e(e,r){return($l.get(t.call(this,e,r))||Jo)(n.call(this,e,r))}var t=Zo,n=Qo;return e.type=function(n){return arguments.length?(t=Me(n),e):t},e.size=function(t){return arguments.length?(n=Me(t),e):n},e};var $l=fa.map({circle:Jo,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*jl)),n=t*jl;return"M0,"+-t+"L"+n+",0 0,"+t+" "+-n+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Nl),n=t*Nl/2;return"M0,"+n+"L"+t+","+-n+" "+-t+","+-n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Nl),n=t*Nl/2;return"M0,"+-n+"L"+t+","+n+" "+-t+","+n+"Z"}});fa.svg.symbolTypes=$l.keys();var Nl=Math.sqrt(3),jl=Math.tan(30*Wa);Ra.transition=function(e){for(var t,n,r=zl||++Gl,i=ia(e),o=[],a=Hl||{time:Date.now(),ease:Mr,delay:0,duration:250},s=-1,l=this.length;++srect,.s>rect").attr("width",d[1]-d[0])}function r(e){e.select(".extent").attr("y",h[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){32==fa.event.keyCode&&(D||(b=null,M[0]-=d[1],M[1]-=h[1],D=2),k())}function g(){32==fa.event.keyCode&&2==D&&(M[0]+=d[1],M[1]+=h[1],D=0,k())}function m(){var e=fa.mouse(w),i=!1;_&&(e[0]+=_[0],e[1]+=_[1]),D||(fa.event.altKey?(b||(b=[(d[0]+d[1])/2,(h[0]+h[1])/2]),M[0]=d[+(e[0]-1}function f(e,t,n){for(var r=-1,i=null==e?0:e.length;++r-1;);return n}function N(e,t){for(var n=e.length;n--&&A(t,e[n],0)>-1;);return n}function j(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}function z(e){return"\\"+kn[e]}function H(e,t){return null==e?ie:e[t]}function U(e){return bn.test(e)}function V(e){return _n.test(e)}function G(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function W(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function q(e,t){return function(n){return e(t(n))}}function K(e,t){for(var n=-1,r=e.length,i=0,o=[];++n>>1,Ne=[["ary",Ae],["bind",me],["bindKey",ve],["curry",be],["curryRight",_e],["flip",Se],["partial",we],["partialRight",Ce],["rearg",Ee]],je="[object Arguments]",ze="[object Array]",He="[object AsyncFunction]",Ue="[object Boolean]",Ve="[object Date]",Ge="[object DOMException]",We="[object Error]",qe="[object Function]",Ke="[object GeneratorFunction]",Ye="[object Map]",Xe="[object Number]",Qe="[object Null]",Ze="[object Object]",Je="[object Proxy]",et="[object RegExp]",tt="[object Set]",nt="[object String]",rt="[object Symbol]",it="[object Undefined]",ot="[object WeakMap]",at="[object WeakSet]",st="[object ArrayBuffer]",lt="[object DataView]",ut="[object Float32Array]",ct="[object Float64Array]",dt="[object Int8Array]",ht="[object Int16Array]",ft="[object Int32Array]",pt="[object Uint8Array]",gt="[object Uint8ClampedArray]",mt="[object Uint16Array]",vt="[object Uint32Array]",yt=/\b__p \+= '';/g,bt=/\b(__p \+=) '' \+/g,_t=/(__e\(.*?\)|\b__t\)) \+\n'';/g,wt=/&(?:amp|lt|gt|quot|#39);/g,Ct=/[&<>"']/g,At=RegExp(wt.source),Et=RegExp(Ct.source),St=/<%-([\s\S]+?)%>/g,xt=/<%([\s\S]+?)%>/g,Ft=/<%=([\s\S]+?)%>/g,kt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Dt=/^\w*$/,Tt=/^\./,Mt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rt=/[\\^$.*+?()[\]{}|]/g,Ot=RegExp(Rt.source),Lt=/^\s+|\s+$/g,Pt=/^\s+/,Bt=/\s+$/,It=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,$t=/\{\n\/\* \[wrapped with (.+)\] \*/,Nt=/,? & /,jt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,zt=/\\(\\)?/g,Ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ut=/\w*$/,Vt=/^[-+]0x[0-9a-f]+$/i,Gt=/^0b[01]+$/i,Wt=/^\[object .+?Constructor\]$/,qt=/^0o[0-7]+$/i,Kt=/^(?:0|[1-9]\d*)$/,Yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Xt=/($^)/,Qt=/['\n\r\u2028\u2029\\]/g,Zt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Jt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",en="["+Jt+"]",tn="["+Zt+"]",nn="[a-z\\xdf-\\xf6\\xf8-\\xff]",rn="[^\\ud800-\\udfff"+Jt+"\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",on="\\ud83c[\\udffb-\\udfff]",an="(?:\\ud83c[\\udde6-\\uddff]){2}",sn="[\\ud800-\\udbff][\\udc00-\\udfff]",ln="[A-Z\\xc0-\\xd6\\xd8-\\xde]",un="(?:"+nn+"|"+rn+")",cn="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",dn="(?:\\u200d(?:"+["[^\\ud800-\\udfff]",an,sn].join("|")+")[\\ufe0e\\ufe0f]?"+cn+")*",hn="[\\ufe0e\\ufe0f]?"+cn+dn,fn="(?:"+["[\\u2700-\\u27bf]",an,sn].join("|")+")"+hn,pn="(?:"+["[^\\ud800-\\udfff]"+tn+"?",tn,an,sn,"[\\ud800-\\udfff]"].join("|")+")",gn=RegExp("['’]","g"),mn=RegExp(tn,"g"),vn=RegExp(on+"(?="+on+")|"+pn+hn,"g"),yn=RegExp([ln+"?"+nn+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[en,ln,"$"].join("|")+")","(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[en,ln+un,"$"].join("|")+")",ln+"?"+un+"+(?:['’](?:d|ll|m|re|s|t|ve))?",ln+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)","\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)","\\d+",fn].join("|"),"g"),bn=RegExp("[\\u200d\\ud800-\\udfff"+Zt+"\\ufe0e\\ufe0f]"),_n=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,wn=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Cn=-1,An={};An[ut]=An[ct]=An[dt]=An[ht]=An[ft]=An[pt]=An[gt]=An[mt]=An[vt]=!0,An[je]=An[ze]=An[st]=An[Ue]=An[lt]=An[Ve]=An[We]=An[qe]=An[Ye]=An[Xe]=An[Ze]=An[et]=An[tt]=An[nt]=An[ot]=!1;var En={};En[je]=En[ze]=En[st]=En[lt]=En[Ue]=En[Ve]=En[ut]=En[ct]=En[dt]=En[ht]=En[ft]=En[Ye]=En[Xe]=En[Ze]=En[et]=En[tt]=En[nt]=En[rt]=En[pt]=En[gt]=En[mt]=En[vt]=!0,En[We]=En[qe]=En[ot]=!1;var Sn={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},xn={"&":"&","<":"<",">":">",'"':""","'":"'"},Fn={"&":"&","<":"<",">":">",""":'"',"'":"'"},kn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Dn=parseFloat,Tn=parseInt,Mn="object"==typeof e&&e&&e.Object===Object&&e,Rn="object"==typeof self&&self&&self.Object===Object&&self,On=Mn||Rn||Function("return this")(),Ln="object"==typeof exports&&exports&&!exports.nodeType&&exports,Pn=Ln&&"object"==typeof n&&n&&!n.nodeType&&n,Bn=Pn&&Pn.exports===Ln,In=Bn&&Mn.process,$n=function(){try{return In&&In.binding&&In.binding("util")}catch(e){}}(),Nn=$n&&$n.isArrayBuffer,jn=$n&&$n.isDate,zn=$n&&$n.isMap,Hn=$n&&$n.isRegExp,Un=$n&&$n.isSet,Vn=$n&&$n.isTypedArray,Gn=F("length"),Wn=k(Sn),qn=k(xn),Kn=k(Fn),Yn=function e(t){function n(e){if(al(e)&&!vh(e)&&!(e instanceof k)){if(e instanceof b)return e;if(vc.call(e,"__wrapped__"))return ra(e)}return new b(e)}function r(){}function b(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=ie}function k(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Be,this.__views__=[]}function Q(){var e=new k(this.__wrapped__);return e.__actions__=$i(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=$i(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=$i(this.__views__),e}function te(){if(this.__filtered__){var e=new k(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function ne(){var e=this.__wrapped__.value(),t=this.__dir__,n=vh(e),r=t<0,i=n?e.length:0,o=ko(0,i,this.__views__),a=o.start,s=o.end,l=s-a,u=r?s:a-1,c=this.__iteratees__,d=c.length,h=0,f=qc(l,this.__takeCount__);if(!n||!r&&i==l&&f==l)return bi(e,this.__actions__);var p=[];e:for(;l--&&h-1}function un(e,t){var n=this.__data__,r=Qn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function cn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function ir(e,t,n,r,i,o){var a,s=t&de,u=t&he,c=t&fe;if(n&&(a=i?n(e,r,i,o):n(e)),a!==ie)return a;if(!ol(e))return e;var d=vh(e);if(d){if(a=Mo(e),!s)return $i(e,a)}else{var h=Fd(e),f=h==qe||h==Ke;if(bh(e))return xi(e,s);if(h==Ze||h==je||f&&!i){if(a=u||f?{}:Ro(e),!s)return u?zi(e,er(a,e)):ji(e,Jn(a,e))}else{if(!En[h])return i?e:{};a=Oo(e,h,ir,s)}}o||(o=new Sn);var p=o.get(e);if(p)return p;o.set(e,a);var g=c?u?_o:bo:u?Hl:zl,m=d?ie:g(e);return l(m||e,function(r,i){m&&(i=r,r=e[i]),Xn(a,i,ir(r,t,n,i,e,o))}),a}function or(e){var t=zl(e);return function(n){return ar(n,e,t)}}function ar(e,t,n){var r=n.length;if(null==e)return!r;for(e=lc(e);r--;){var i=n[r],o=t[i],a=e[i];if(a===ie&&!(i in e)||!o(a))return!1}return!0}function sr(e,t,n){if("function"!=typeof e)throw new dc(se);return Td(function(){e.apply(ie,n)},t)}function lr(e,t,n,r){var i=-1,o=h,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;n&&(t=p(t,L(n))),r?(o=f,a=!1):t.length>=oe&&(o=B,a=!1,t=new yn(t));e:for(;++ii?0:i+n),r=r===ie||r>i?i:Al(r),r<0&&(r+=i),r=n>r?0:El(r);n0&&n(s)?t>1?fr(s,t-1,n,r,i):g(i,s):r||(i[i.length]=s)}return i}function pr(e,t){return e&&vd(e,t,zl)}function gr(e,t){return e&&yd(e,t,zl)}function mr(e,t){return d(t,function(t){return nl(e[t])})}function vr(e,t){t=Ei(t,e);for(var n=0,r=t.length;null!=e&&nt}function wr(e,t){return null!=e&&vc.call(e,t)}function Cr(e,t){return null!=e&&t in lc(e)}function Ar(e,t,n){return e>=qc(t,n)&&e=120&&c.length>=120)?new yn(a&&c):ie}c=e[0];var d=-1,g=s[0];e:for(;++d-1;)s!==e&&Mc.call(s,l,1),Mc.call(e,l,1);return e}function Jr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;Bo(i)?Mc.call(e,i,1):mi(e,i)}}return e}function ei(e,t){return e+jc(Xc()*(t-e+1))}function ti(e,t,n,r){for(var i=-1,o=Wc(Nc((t-e)/(n||1)),0),a=rc(o);o--;)a[r?o:++i]=e,e+=n;return a}function ni(e,t){var n="";if(!e||t<1||t>Oe)return n;do{t%2&&(n+=e),(t=jc(t/2))&&(e+=e)}while(t);return n}function ri(e,t){return Md(Ko(e,t,Mu),e+"")}function ii(e){return Pn(eu(e))}function oi(e,t){var n=eu(e);return Jo(n,rr(t,0,n.length))}function ai(e,t,n,r){if(!ol(e))return e;t=Ei(t,e);for(var i=-1,o=t.length,a=o-1,s=e;null!=s&&++ii?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=rc(i);++r>>1,a=e[o];null!==a&&!vl(a)&&(n?a<=t:a=oe){var u=t?null:Ad(e);if(u)return Y(u);a=!1,i=B,l=new yn}else l=t?[]:s;e:for(;++r=r?e:li(e,t,n)}function xi(e,t){if(t)return e.slice();var n=e.length,r=Fc?Fc(n):new e.constructor(n);return e.copy(r),r}function Fi(e){var t=new e.constructor(e.byteLength);return new xc(t).set(new xc(e)),t}function ki(e,t){var n=t?Fi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Di(e,t,n){return m(t?n(W(e),de):W(e),i,new e.constructor)}function Ti(e){var t=new e.constructor(e.source,Ut.exec(e));return t.lastIndex=e.lastIndex,t}function Mi(e,t,n){return m(t?n(Y(e),de):Y(e),o,new e.constructor)}function Ri(e){return hd?lc(hd.call(e)):{}}function Oi(e,t){var n=t?Fi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Li(e,t){if(e!==t){var n=e!==ie,r=null===e,i=e===e,o=vl(e),a=t!==ie,s=null===t,l=t===t,u=vl(t);if(!s&&!u&&!o&&e>t||o&&a&&l&&!s&&!u||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!u&&e=s)return l;return l*("desc"==n[r]?-1:1)}}return e.index-t.index}function Bi(e,t,n,r){for(var i=-1,o=e.length,a=n.length,s=-1,l=t.length,u=Wc(o-a,0),c=rc(l+u),d=!r;++s1?n[i-1]:ie,a=i>2?n[2]:ie;for(o=e.length>3&&"function"==typeof o?(i--,o):ie,a&&Io(n[0],n[1],a)&&(o=i<3?ie:o,i=1),t=lc(t);++r-1?i[o?t[a]:a]:ie}}function Zi(e){return yo(function(t){var n=t.length,r=n,i=b.prototype.thru;for(e&&t.reverse();r--;){var o=t[r];if("function"!=typeof o)throw new dc(se);if(i&&!a&&"wrapper"==wo(o))var a=new b([],!0)}for(r=a?r:n;++r1&&y.reverse(),d&&ls))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var c=-1,d=!0,h=n&ge?new yn:ie;for(o.set(e,t),o.set(t,e);++c1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(It,"{\n/* [wrapped with "+t+"] */\n")}function Po(e){return vh(e)||mh(e)||!!(Rc&&e&&e[Rc])}function Bo(e,t){return!!(t=null==t?Oe:t)&&("number"==typeof e||Kt.test(e))&&e>-1&&e%1==0&&e0){if(++t>=ke)return arguments[0]}else t=0;return e.apply(ie,arguments)}}function Jo(e,t){var n=-1,r=e.length,i=r-1;for(t=t===ie?r:t;++n=this.__values__.length;return{done:e,value:e?ie:this.__values__[this.__index__++]}}function rs(){return this}function is(e){for(var t,n=this;n instanceof r;){var i=ra(n);i.__index__=0,i.__values__=ie,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t}function os(){var e=this.__wrapped__;if(e instanceof k){var t=e;return this.__actions__.length&&(t=new k(this)),t=t.reverse(),t.__actions__.push({func:Ja,args:[Da],thisArg:ie}),new b(t,this.__chain__)}return this.thru(Da)}function as(){return bi(this.__wrapped__,this.__actions__)}function ss(e,t,n){var r=vh(e)?c:ur;return n&&Io(e,t,n)&&(t=ie),r(e,Ao(t,3))}function ls(e,t){return(vh(e)?d:hr)(e,Ao(t,3))}function us(e,t){return fr(gs(e,t),1)}function cs(e,t){return fr(gs(e,t),Re)}function ds(e,t,n){return n=n===ie?1:Al(n),fr(gs(e,t),n)}function hs(e,t){return(vh(e)?l:gd)(e,Ao(t,3))}function fs(e,t){return(vh(e)?u:md)(e,Ao(t,3))}function ps(e,t,n,r){e=qs(e)?e:eu(e),n=n&&!r?Al(n):0;var i=e.length;return n<0&&(n=Wc(i+n,0)),ml(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&A(e,t,n)>-1}function gs(e,t){return(vh(e)?p:Hr)(e,Ao(t,3))}function ms(e,t,n,r){return null==e?[]:(vh(t)||(t=null==t?[]:[t]),n=r?ie:n,vh(n)||(n=null==n?[]:[n]),Kr(e,t,n))}function vs(e,t,n){var r=vh(e)?m:D,i=arguments.length<3;return r(e,Ao(t,4),n,i,gd)}function ys(e,t,n){var r=vh(e)?v:D,i=arguments.length<3;return r(e,Ao(t,4),n,i,md)}function bs(e,t){return(vh(e)?d:hr)(e,Os(Ao(t,3)))}function _s(e){return(vh(e)?Pn:ii)(e)}function ws(e,t,n){return t=(n?Io(e,t,n):t===ie)?1:Al(t),(vh(e)?In:oi)(e,t)}function Cs(e){return(vh(e)?$n:si)(e)}function As(e){if(null==e)return 0;if(qs(e))return ml(e)?J(e):e.length;var t=Fd(e);return t==Ye||t==tt?e.size:Nr(e).length}function Es(e,t,n){var r=vh(e)?y:ui;return n&&Io(e,t,n)&&(t=ie),r(e,Ao(t,3))}function Ss(e,t){if("function"!=typeof t)throw new dc(se);return e=Al(e),function(){if(--e<1)return t.apply(this,arguments)}}function xs(e,t,n){return t=n?ie:t,t=e&&null==t?e.length:t,co(e,Ae,ie,ie,ie,ie,t)}function Fs(e,t){var n;if("function"!=typeof t)throw new dc(se);return e=Al(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=ie),n}}function ks(e,t,n){t=n?ie:t;var r=co(e,be,ie,ie,ie,ie,ie,t);return r.placeholder=ks.placeholder,r}function Ds(e,t,n){t=n?ie:t;var r=co(e,_e,ie,ie,ie,ie,ie,t);return r.placeholder=Ds.placeholder,r}function Ts(e,t,n){function r(t){var n=h,r=f;return h=f=ie,y=t,g=e.apply(r,n)}function i(e){return y=e,m=Td(s,t),b?r(e):g}function o(e){var n=e-v,r=e-y,i=t-n;return _?qc(i,p-r):i}function a(e){var n=e-v,r=e-y;return v===ie||n>=t||n<0||_&&r>=p}function s(){var e=oh();if(a(e))return l(e);m=Td(s,o(e))}function l(e){return m=ie,w&&h?r(e):(h=f=ie,g)}function u(){m!==ie&&Cd(m),y=0,h=v=f=m=ie}function c(){return m===ie?g:l(oh())}function d(){var e=oh(),n=a(e);if(h=arguments,f=this,v=e,n){if(m===ie)return i(v);if(_)return m=Td(s,t),r(v)}return m===ie&&(m=Td(s,t)),g}var h,f,p,g,m,v,y=0,b=!1,_=!1,w=!0;if("function"!=typeof e)throw new dc(se);return t=Sl(t)||0,ol(n)&&(b=!!n.leading,_="maxWait"in n,p=_?Wc(Sl(n.maxWait)||0,t):p,w="trailing"in n?!!n.trailing:w),d.cancel=u,d.flush=c,d}function Ms(e){return co(e,Se)}function Rs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new dc(se);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Rs.Cache||cn),n}function Os(e){if("function"!=typeof e)throw new dc(se);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Ls(e){return Fs(2,e)}function Ps(e,t){if("function"!=typeof e)throw new dc(se);return t=t===ie?t:Al(t),ri(e,t)}function Bs(e,t){if("function"!=typeof e)throw new dc(se);return t=null==t?0:Wc(Al(t),0),ri(function(n){var r=n[t],i=Si(n,0,t);return r&&g(i,r),a(e,this,i)})}function Is(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new dc(se);return ol(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ts(e,t,{leading:r,maxWait:t,trailing:i})}function $s(e){return xs(e,1)}function Ns(e,t){return dh(Ai(t),e)}function js(){if(!arguments.length)return[];var e=arguments[0];return vh(e)?e:[e]}function zs(e){return ir(e,fe)}function Hs(e,t){return t="function"==typeof t?t:ie,ir(e,fe,t)}function Us(e){return ir(e,de|fe)}function Vs(e,t){return t="function"==typeof t?t:ie,ir(e,de|fe,t)}function Gs(e,t){return null==t||ar(e,t,zl(t))}function Ws(e,t){return e===t||e!==e&&t!==t}function qs(e){return null!=e&&il(e.length)&&!nl(e)}function Ks(e){return al(e)&&qs(e)}function Ys(e){return!0===e||!1===e||al(e)&&br(e)==Ue}function Xs(e){return al(e)&&1===e.nodeType&&!pl(e)}function Qs(e){if(null==e)return!0;if(qs(e)&&(vh(e)||"string"==typeof e||"function"==typeof e.splice||bh(e)||Eh(e)||mh(e)))return!e.length;var t=Fd(e);if(t==Ye||t==tt)return!e.size;if(Ho(e))return!Nr(e).length;for(var n in e)if(vc.call(e,n))return!1;return!0}function Zs(e,t){return Tr(e,t)}function Js(e,t,n){n="function"==typeof n?n:ie;var r=n?n(e,t):ie;return r===ie?Tr(e,t,ie,n):!!r}function el(e){if(!al(e))return!1;var t=br(e);return t==We||t==Ge||"string"==typeof e.message&&"string"==typeof e.name&&!pl(e)}function tl(e){return"number"==typeof e&&Uc(e)}function nl(e){if(!ol(e))return!1;var t=br(e);return t==qe||t==Ke||t==He||t==Je}function rl(e){return"number"==typeof e&&e==Al(e)}function il(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Oe}function ol(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function al(e){return null!=e&&"object"==typeof e}function sl(e,t){return e===t||Or(e,t,So(t))}function ll(e,t,n){return n="function"==typeof n?n:ie,Or(e,t,So(t),n)}function ul(e){return fl(e)&&e!=+e}function cl(e){if(kd(e))throw new oc(ae);return Lr(e)}function dl(e){return null===e}function hl(e){return null==e}function fl(e){return"number"==typeof e||al(e)&&br(e)==Xe}function pl(e){if(!al(e)||br(e)!=Ze)return!1;var t=kc(e);if(null===t)return!0;var n=vc.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&mc.call(n)==wc}function gl(e){return rl(e)&&e>=-Oe&&e<=Oe}function ml(e){return"string"==typeof e||!vh(e)&&al(e)&&br(e)==nt}function vl(e){return"symbol"==typeof e||al(e)&&br(e)==rt}function yl(e){return e===ie}function bl(e){return al(e)&&Fd(e)==ot}function _l(e){return al(e)&&br(e)==at}function wl(e){if(!e)return[];if(qs(e))return ml(e)?ee(e):$i(e);if(Oc&&e[Oc])return G(e[Oc]());var t=Fd(e);return(t==Ye?W:t==tt?Y:eu)(e)}function Cl(e){if(!e)return 0===e?e:0;if((e=Sl(e))===Re||e===-Re){return(e<0?-1:1)*Le}return e===e?e:0}function Al(e){var t=Cl(e),n=t%1;return t===t?n?t-n:t:0}function El(e){return e?rr(Al(e),0,Be):0}function Sl(e){if("number"==typeof e)return e;if(vl(e))return Pe;if(ol(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ol(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Lt,"");var n=Gt.test(e);return n||qt.test(e)?Tn(e.slice(2),n?2:8):Vt.test(e)?Pe:+e}function xl(e){return Ni(e,Hl(e))}function Fl(e){return e?rr(Al(e),-Oe,Oe):0===e?e:0}function kl(e){return null==e?"":pi(e)}function Dl(e,t){var n=pd(e);return null==t?n:Jn(n,t)}function Tl(e,t){return w(e,Ao(t,3),pr)}function Ml(e,t){return w(e,Ao(t,3),gr)}function Rl(e,t){return null==e?e:vd(e,Ao(t,3),Hl)}function Ol(e,t){return null==e?e:yd(e,Ao(t,3),Hl)}function Ll(e,t){return e&&pr(e,Ao(t,3))}function Pl(e,t){return e&&gr(e,Ao(t,3))}function Bl(e){return null==e?[]:mr(e,zl(e))}function Il(e){return null==e?[]:mr(e,Hl(e))}function $l(e,t,n){var r=null==e?ie:vr(e,t);return r===ie?n:r}function Nl(e,t){return null!=e&&To(e,t,wr)}function jl(e,t){return null!=e&&To(e,t,Cr)}function zl(e){return qs(e)?Ln(e):Nr(e)}function Hl(e){return qs(e)?Ln(e,!0):jr(e)}function Ul(e,t){var n={};return t=Ao(t,3),pr(e,function(e,r,i){tr(n,t(e,r,i),e)}),n}function Vl(e,t){var n={};return t=Ao(t,3),pr(e,function(e,r,i){tr(n,r,t(e,r,i))}),n}function Gl(e,t){return Wl(e,Os(Ao(t)))}function Wl(e,t){if(null==e)return{};var n=p(_o(e),function(e){return[e]});return t=Ao(t),Xr(e,n,function(e,n){return t(e,n[0])})}function ql(e,t,n){t=Ei(t,e);var r=-1,i=t.length;for(i||(i=1,e=ie);++rt){var r=e;e=t,t=r}if(n||e%1||t%1){var i=Xc();return qc(e+i*(t-e+Dn("1e-"+((i+"").length-1))),t)}return ei(e,t)}function ou(e){return Xh(kl(e).toLowerCase())}function au(e){return(e=kl(e))&&e.replace(Yt,Wn).replace(mn,"")}function su(e,t,n){e=kl(e),t=pi(t);var r=e.length;n=n===ie?r:rr(Al(n),0,r);var i=n;return(n-=t.length)>=0&&e.slice(n,i)==t}function lu(e){return e=kl(e),e&&Et.test(e)?e.replace(Ct,qn):e}function uu(e){return e=kl(e),e&&Ot.test(e)?e.replace(Rt,"\\$&"):e}function cu(e,t,n){e=kl(e),t=Al(t);var r=t?J(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return ro(jc(i),n)+e+ro(Nc(i),n)}function du(e,t,n){e=kl(e),t=Al(t);var r=t?J(e):0;return t&&r>>0)?(e=kl(e),e&&("string"==typeof t||null!=t&&!Ch(t))&&!(t=pi(t))&&U(e)?Si(ee(e),0,n):e.split(t,n)):[]}function vu(e,t,n){return e=kl(e),n=null==n?0:rr(Al(n),0,e.length),t=pi(t),e.slice(n,n+t.length)==t}function yu(e,t,r){var i=n.templateSettings;r&&Io(e,t,r)&&(t=ie),e=kl(e),t=Dh({},t,i,ho);var o,a,s=Dh({},t.imports,i.imports,ho),l=zl(s),u=P(s,l),c=0,d=t.interpolate||Xt,h="__p += '",f=uc((t.escape||Xt).source+"|"+d.source+"|"+(d===Ft?Ht:Xt).source+"|"+(t.evaluate||Xt).source+"|$","g"),p="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++Cn+"]")+"\n";e.replace(f,function(t,n,r,i,s,l){return r||(r=i),h+=e.slice(c,l).replace(Qt,z),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=l+t.length,t}),h+="';\n";var g=t.variable;g||(h="with (obj) {\n"+h+"\n}\n"),h=(a?h.replace(yt,""):h).replace(bt,"$1").replace(_t,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var m=Qh(function(){return ac(l,p+"return "+h).apply(ie,u)});if(m.source=h,el(m))throw m;return m}function bu(e){return kl(e).toLowerCase()}function _u(e){return kl(e).toUpperCase()}function wu(e,t,n){if((e=kl(e))&&(n||t===ie))return e.replace(Lt,"");if(!e||!(t=pi(t)))return e;var r=ee(e),i=ee(t);return Si(r,I(r,i),N(r,i)+1).join("")}function Cu(e,t,n){if((e=kl(e))&&(n||t===ie))return e.replace(Bt,"");if(!e||!(t=pi(t)))return e;var r=ee(e);return Si(r,0,N(r,ee(t))+1).join("")}function Au(e,t,n){if((e=kl(e))&&(n||t===ie))return e.replace(Pt,"");if(!e||!(t=pi(t)))return e;var r=ee(e);return Si(r,I(r,ee(t))).join("")}function Eu(e,t){var n=xe,r=Fe;if(ol(t)){var i="separator"in t?t.separator:i;n="length"in t?Al(t.length):n,r="omission"in t?pi(t.omission):r}e=kl(e);var o=e.length;if(U(e)){var a=ee(e);o=a.length}if(n>=o)return e;var s=n-J(r);if(s<1)return r;var l=a?Si(a,0,s).join(""):e.slice(0,s);if(i===ie)return l+r;if(a&&(s+=l.length-s),Ch(i)){if(e.slice(s).search(i)){var u,c=l;for(i.global||(i=uc(i.source,kl(Ut.exec(i))+"g")),i.lastIndex=0;u=i.exec(c);)var d=u.index;l=l.slice(0,d===ie?s:d)}}else if(e.indexOf(pi(i),s)!=s){var h=l.lastIndexOf(i);h>-1&&(l=l.slice(0,h))}return l+r}function Su(e){return e=kl(e),e&&At.test(e)?e.replace(wt,Kn):e}function xu(e,t,n){return e=kl(e),t=n?ie:t,t===ie?V(e)?re(e):_(e):e.match(t)||[]}function Fu(e){var t=null==e?0:e.length,n=Ao();return e=t?p(e,function(e){if("function"!=typeof e[1])throw new dc(se);return[n(e[0]),e[1]]}):[],ri(function(n){for(var r=-1;++rOe)return[];var n=Be,r=qc(e,Be);t=Ao(t),e-=Be;for(var i=R(r,t);++n1?e[t-1]:ie;return n="function"==typeof n?(e.pop(),n):ie,Ka(e,n)}),Xd=yo(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return nr(t,e)};return!(t>1||this.__actions__.length)&&r instanceof k&&Bo(n)?(r=r.slice(n,+n+(t?1:0)),r.__actions__.push({func:Ja,args:[i],thisArg:ie}),new b(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(ie),e})):this.thru(i)}),Qd=Hi(function(e,t,n){vc.call(e,n)?++e[n]:tr(e,n,1)}),Zd=Qi(ha),Jd=Qi(fa),eh=Hi(function(e,t,n){vc.call(e,n)?e[n].push(t):tr(e,n,[t])}),th=ri(function(e,t,n){var r=-1,i="function"==typeof t,o=qs(e)?rc(e.length):[];return gd(e,function(e){o[++r]=i?a(t,e,n):xr(e,t,n)}),o}),nh=Hi(function(e,t,n){tr(e,n,t)}),rh=Hi(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),ih=ri(function(e,t){if(null==e)return[];var n=t.length;return n>1&&Io(e,t[0],t[1])?t=[]:n>2&&Io(t[0],t[1],t[2])&&(t=[t[0]]),Kr(e,fr(t,1),[])}),oh=Ic||function(){return On.Date.now()},ah=ri(function(e,t,n){var r=me;if(n.length){var i=K(n,Co(ah));r|=we}return co(e,r,t,n,i)}),sh=ri(function(e,t,n){var r=me|ve;if(n.length){var i=K(n,Co(sh));r|=we}return co(t,r,e,n,i)}),lh=ri(function(e,t){return sr(e,1,t)}),uh=ri(function(e,t,n){return sr(e,Sl(t)||0,n)});Rs.Cache=cn;var ch=wd(function(e,t){t=1==t.length&&vh(t[0])?p(t[0],L(Ao())):p(fr(t,1),L(Ao()));var n=t.length;return ri(function(r){for(var i=-1,o=qc(r.length,n);++i=t}),mh=Fr(function(){return arguments}())?Fr:function(e){return al(e)&&vc.call(e,"callee")&&!Tc.call(e,"callee")},vh=rc.isArray,yh=Nn?L(Nn):kr,bh=Hc||Hu,_h=jn?L(jn):Dr,wh=zn?L(zn):Rr,Ch=Hn?L(Hn):Pr,Ah=Un?L(Un):Br,Eh=Vn?L(Vn):Ir,Sh=ao(zr),xh=ao(function(e,t){return e<=t}),Fh=Ui(function(e,t){if(Ho(t)||qs(t))return void Ni(t,zl(t),e);for(var n in t)vc.call(t,n)&&Xn(e,n,t[n])}),kh=Ui(function(e,t){Ni(t,Hl(t),e)}),Dh=Ui(function(e,t,n,r){Ni(t,Hl(t),e,r)}),Th=Ui(function(e,t,n,r){Ni(t,zl(t),e,r)}),Mh=yo(nr),Rh=ri(function(e){return e.push(ie,ho),a(Dh,ie,e)}),Oh=ri(function(e){return e.push(ie,fo),a($h,ie,e)}),Lh=eo(function(e,t,n){e[t]=n},Du(Mu)),Ph=eo(function(e,t,n){vc.call(e,t)?e[t].push(n):e[t]=[n]},Ao),Bh=ri(xr),Ih=Ui(function(e,t,n){Gr(e,t,n)}),$h=Ui(function(e,t,n,r){Gr(e,t,n,r)}),Nh=yo(function(e,t){var n={};if(null==e)return n;var r=!1;t=p(t,function(t){return t=Ei(t,e),r||(r=t.length>1),t}),Ni(e,_o(e),n),r&&(n=ir(n,de|he|fe,po));for(var i=t.length;i--;)mi(n,t[i]);return n}),jh=yo(function(e,t){return null==e?{}:Yr(e,t)}),zh=uo(zl),Hh=uo(Hl),Uh=Ki(function(e,t,n){return t=t.toLowerCase(),e+(n?ou(t):t)}),Vh=Ki(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Gh=Ki(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Wh=qi("toLowerCase"),qh=Ki(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Kh=Ki(function(e,t,n){return e+(n?" ":"")+Xh(t)}),Yh=Ki(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Xh=qi("toUpperCase"),Qh=ri(function(e,t){try{return a(e,ie,t)}catch(e){return el(e)?e:new oc(e)}}),Zh=yo(function(e,t){return l(t,function(t){t=ea(t),tr(e,t,ah(e[t],e))}),e}),Jh=Zi(),ef=Zi(!0),tf=ri(function(e,t){return function(n){return xr(n,e,t)}}),nf=ri(function(e,t){return function(n){return xr(e,n,t)}}),rf=no(p),of=no(c),af=no(y),sf=oo(),lf=oo(!0),uf=to(function(e,t){return e+t},0),cf=lo("ceil"),df=to(function(e,t){return e/t},1),hf=lo("floor"),ff=to(function(e,t){return e*t},1),pf=lo("round"),gf=to(function(e,t){return e-t},0);return n.after=Ss,n.ary=xs,n.assign=Fh,n.assignIn=kh,n.assignInWith=Dh,n.assignWith=Th,n.at=Mh,n.before=Fs,n.bind=ah,n.bindAll=Zh,n.bindKey=sh,n.castArray=js,n.chain=Qa,n.chunk=ia,n.compact=oa,n.concat=aa,n.cond=Fu,n.conforms=ku,n.constant=Du,n.countBy=Qd,n.create=Dl,n.curry=ks,n.curryRight=Ds,n.debounce=Ts,n.defaults=Rh,n.defaultsDeep=Oh,n.defer=lh,n.delay=uh,n.difference=Od,n.differenceBy=Ld,n.differenceWith=Pd,n.drop=sa,n.dropRight=la,n.dropRightWhile=ua,n.dropWhile=ca,n.fill=da,n.filter=ls,n.flatMap=us,n.flatMapDeep=cs,n.flatMapDepth=ds,n.flatten=pa,n.flattenDeep=ga,n.flattenDepth=ma,n.flip=Ms,n.flow=Jh,n.flowRight=ef,n.fromPairs=va,n.functions=Bl,n.functionsIn=Il,n.groupBy=eh,n.initial=_a,n.intersection=Bd,n.intersectionBy=Id,n.intersectionWith=$d,n.invert=Lh,n.invertBy=Ph,n.invokeMap=th,n.iteratee=Ru,n.keyBy=nh,n.keys=zl,n.keysIn=Hl,n.map=gs,n.mapKeys=Ul,n.mapValues=Vl,n.matches=Ou,n.matchesProperty=Lu,n.memoize=Rs,n.merge=Ih,n.mergeWith=$h,n.method=tf,n.methodOf=nf,n.mixin=Pu,n.negate=Os,n.nthArg=$u,n.omit=Nh,n.omitBy=Gl,n.once=Ls,n.orderBy=ms,n.over=rf,n.overArgs=ch,n.overEvery=of,n.overSome=af,n.partial=dh,n.partialRight=hh,n.partition=rh,n.pick=jh,n.pickBy=Wl,n.property=Nu,n.propertyOf=ju,n.pull=Nd,n.pullAll=Sa,n.pullAllBy=xa,n.pullAllWith=Fa,n.pullAt=jd,n.range=sf,n.rangeRight=lf,n.rearg=fh,n.reject=bs,n.remove=ka,n.rest=Ps,n.reverse=Da,n.sampleSize=ws,n.set=Kl,n.setWith=Yl,n.shuffle=Cs,n.slice=Ta,n.sortBy=ih,n.sortedUniq=Ia,n.sortedUniqBy=$a,n.split=mu,n.spread=Bs,n.tail=Na,n.take=ja,n.takeRight=za,n.takeRightWhile=Ha,n.takeWhile=Ua,n.tap=Za,n.throttle=Is,n.thru=Ja,n.toArray=wl,n.toPairs=zh,n.toPairsIn=Hh,n.toPath=qu,n.toPlainObject=xl,n.transform=Xl,n.unary=$s,n.union=zd,n.unionBy=Hd,n.unionWith=Ud,n.uniq=Va,n.uniqBy=Ga,n.uniqWith=Wa,n.unset=Ql,n.unzip=qa,n.unzipWith=Ka,n.update=Zl,n.updateWith=Jl,n.values=eu,n.valuesIn=tu,n.without=Vd,n.words=xu,n.wrap=Ns,n.xor=Gd,n.xorBy=Wd,n.xorWith=qd,n.zip=Kd,n.zipObject=Ya,n.zipObjectDeep=Xa,n.zipWith=Yd,n.entries=zh,n.entriesIn=Hh,n.extend=kh,n.extendWith=Dh,Pu(n,n),n.add=uf,n.attempt=Qh,n.camelCase=Uh,n.capitalize=ou,n.ceil=cf,n.clamp=nu,n.clone=zs,n.cloneDeep=Us,n.cloneDeepWith=Vs,n.cloneWith=Hs,n.conformsTo=Gs,n.deburr=au,n.defaultTo=Tu,n.divide=df,n.endsWith=su,n.eq=Ws,n.escape=lu,n.escapeRegExp=uu,n.every=ss,n.find=Zd,n.findIndex=ha,n.findKey=Tl,n.findLast=Jd,n.findLastIndex=fa,n.findLastKey=Ml,n.floor=hf,n.forEach=hs,n.forEachRight=fs,n.forIn=Rl,n.forInRight=Ol,n.forOwn=Ll,n.forOwnRight=Pl,n.get=$l,n.gt=ph,n.gte=gh,n.has=Nl,n.hasIn=jl,n.head=ya,n.identity=Mu,n.includes=ps,n.indexOf=ba,n.inRange=ru,n.invoke=Bh,n.isArguments=mh,n.isArray=vh,n.isArrayBuffer=yh,n.isArrayLike=qs,n.isArrayLikeObject=Ks,n.isBoolean=Ys,n.isBuffer=bh,n.isDate=_h,n.isElement=Xs,n.isEmpty=Qs,n.isEqual=Zs,n.isEqualWith=Js,n.isError=el,n.isFinite=tl,n.isFunction=nl,n.isInteger=rl,n.isLength=il,n.isMap=wh,n.isMatch=sl,n.isMatchWith=ll,n.isNaN=ul,n.isNative=cl,n.isNil=hl,n.isNull=dl,n.isNumber=fl,n.isObject=ol,n.isObjectLike=al,n.isPlainObject=pl,n.isRegExp=Ch,n.isSafeInteger=gl,n.isSet=Ah,n.isString=ml,n.isSymbol=vl,n.isTypedArray=Eh,n.isUndefined=yl,n.isWeakMap=bl,n.isWeakSet=_l,n.join=wa,n.kebabCase=Vh,n.last=Ca,n.lastIndexOf=Aa,n.lowerCase=Gh,n.lowerFirst=Wh,n.lt=Sh,n.lte=xh,n.max=Yu,n.maxBy=Xu,n.mean=Qu,n.meanBy=Zu,n.min=Ju,n.minBy=ec,n.stubArray=zu,n.stubFalse=Hu,n.stubObject=Uu,n.stubString=Vu,n.stubTrue=Gu,n.multiply=ff,n.nth=Ea,n.noConflict=Bu,n.noop=Iu,n.now=oh,n.pad=cu,n.padEnd=du,n.padStart=hu,n.parseInt=fu,n.random=iu,n.reduce=vs,n.reduceRight=ys,n.repeat=pu,n.replace=gu,n.result=ql,n.round=pf,n.runInContext=e,n.sample=_s,n.size=As,n.snakeCase=qh,n.some=Es,n.sortedIndex=Ma,n.sortedIndexBy=Ra,n.sortedIndexOf=Oa,n.sortedLastIndex=La,n.sortedLastIndexBy=Pa,n.sortedLastIndexOf=Ba,n.startCase=Kh,n.startsWith=vu,n.subtract=gf,n.sum=tc,n.sumBy=nc,n.template=yu,n.times=Wu,n.toFinite=Cl,n.toInteger=Al,n.toLength=El,n.toLower=bu,n.toNumber=Sl,n.toSafeInteger=Fl,n.toString=kl,n.toUpper=_u,n.trim=wu,n.trimEnd=Cu,n.trimStart=Au,n.truncate=Eu,n.unescape=Su,n.uniqueId=Ku,n.upperCase=Yh,n.upperFirst=Xh,n.each=hs,n.eachRight=fs,n.first=ya,Pu(n,function(){var e={};return pr(n,function(t,r){vc.call(n.prototype,r)||(e[r]=t)}),e}(),{chain:!1}),n.VERSION="4.17.4",l(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){n[e].placeholder=n}),l(["drop","take"],function(e,t){k.prototype[e]=function(n){n=n===ie?1:Wc(Al(n),0);var r=this.__filtered__&&!t?new k(this):this.clone();return r.__filtered__?r.__takeCount__=qc(n,r.__takeCount__):r.__views__.push({size:qc(n,Be),type:e+(r.__dir__<0?"Right":"")}),r},k.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),l(["filter","map","takeWhile"],function(e,t){var n=t+1,r=n==Te||3==n;k.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Ao(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),l(["head","last"],function(e,t){var n="take"+(t?"Right":"");k.prototype[e]=function(){return this[n](1).value()[0]}}),l(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");k.prototype[e]=function(){return this.__filtered__?new k(this):this[n](1)}}),k.prototype.compact=function(){return this.filter(Mu)},k.prototype.find=function(e){return this.filter(e).head()},k.prototype.findLast=function(e){return this.reverse().find(e)},k.prototype.invokeMap=ri(function(e,t){return"function"==typeof e?new k(this):this.map(function(n){return xr(n,e,t)})}),k.prototype.reject=function(e){return this.filter(Os(Ao(e)))},k.prototype.slice=function(e,t){e=Al(e);var n=this;return n.__filtered__&&(e>0||t<0)?new k(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==ie&&(t=Al(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},k.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},k.prototype.toArray=function(){return this.take(Be)},pr(k.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=n[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(n.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,l=t instanceof k,u=s[0],c=l||vh(t),d=function(e){var t=o.apply(n,g([e],s));return i&&h?t[0]:t};c&&r&&"function"==typeof u&&1!=u.length&&(l=c=!1);var h=this.__chain__,f=!!this.__actions__.length,p=a&&!h,m=l&&!f;if(!a&&c){t=m?t:new k(this);var v=e.apply(t,s);return v.__actions__.push({func:Ja,args:[d],thisArg:ie}),new b(v,h)}return p&&m?e.apply(this,s):(v=this.thru(d),p?i?v.value()[0]:v.value():v)})}),l(["pop","push","shift","sort","splice","unshift"],function(e){var t=hc[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);n.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var n=this.value();return t.apply(vh(n)?n:[],e)}return this[r](function(n){return t.apply(vh(n)?n:[],e)})}}),pr(k.prototype,function(e,t){var r=n[t];if(r){var i=r.name+"";(od[i]||(od[i]=[])).push({name:t,func:r})}}),od[Ji(ie,ve).name]=[{name:"wrapper",func:ie}],k.prototype.clone=Q,k.prototype.reverse=te,k.prototype.value=ne,n.prototype.at=Xd,n.prototype.chain=es,n.prototype.commit=ts,n.prototype.next=ns,n.prototype.plant=is,n.prototype.reverse=os,n.prototype.toJSON=n.prototype.valueOf=n.prototype.value=as,n.prototype.first=n.prototype.head,Oc&&(n.prototype[Oc]=rs),n}();On._=Yn,(r=function(){return Yn}.call(exports,t,exports,n))!==ie&&(n.exports=r)}).call(this)}).call(exports,t(21),t(40)(e))},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n={_isWildCard:function(e){return e.indexOf("*")>-1},_permissionPredicate:function(e,t){if(e.indexOf(t)>-1||e.indexOf("*")>-1)return!0;var n=t.split(":");if(n.length>=2){var r=n[0],i=n[0]+":"+n[1];return e.indexOf(r)>-1||e.indexOf(r+":*")>-1||e.indexOf(i)>-1||e.indexOf(i+":*")>-1}return e.indexOf(t+":*")>-1},isPermitted:function(e,t){var n=this;return!!this._isWildCard(e)||(t.every?t.every(function(t){return n._permissionPredicate(e,t)}):this._permissionPredicate(e,t))},isAnyPermitted:function(e,t){var n=this;return!!this._isWildCard(e)||t.some(function(t){return n._permissionPredicate(e,t)})}};exports.default=n,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ModifierPropType=void 0;var n=Object.assign||function(e){for(var t=1;t0?this._renderDashboardMenu():this._renderNoDashboardsMenu());var t=this.props,n=t.appendMenus,r=t.children,i=this.state.loading;return a.default.createElement("div",{style:{display:"inline-block"}},a.default.createElement(u.ButtonToolbar,{className:w.default.toolbar},a.default.createElement(u.ButtonGroup,null,e,n),r),a.default.createElement(y.WidgetCreationModal,{ref:"widgetModal",widgetType:this.props.widgetType,onConfigurationSaved:this._saveWidget,fields:this.props.fields,loading:i}))}});exports.default=x,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(642);Object.defineProperty(exports,"CountWidgetCreateConfiguration",{enumerable:!0,get:function(){return n(r).default}});var i=t(643);Object.defineProperty(exports,"CountWidgetEditConfiguration",{enumerable:!0,get:function(){return n(i).default}});var o=t(644);Object.defineProperty(exports,"FieldChartWidgetConfiguration",{enumerable:!0,get:function(){return n(o).default}});var a=t(645);Object.defineProperty(exports,"QueryConfiguration",{enumerable:!0,get:function(){return n(a).default}});var s=t(646);Object.defineProperty(exports,"QuickValuesConfiguration",{enumerable:!0,get:function(){return n(s).default}});var l=t(647);Object.defineProperty(exports,"QuickValuesWidgetCreateConfiguration",{enumerable:!0,get:function(){return n(l).default}});var u=t(648);Object.defineProperty(exports,"QuickValuesWidgetEditConfiguration",{enumerable:!0,get:function(){return n(u).default}});var c=t(649);Object.defineProperty(exports,"QuickValuesHistogramWidgetCreateConfiguration",{enumerable:!0,get:function(){return n(c).default}});var d=t(650);Object.defineProperty(exports,"QuickValuesHistogramWidgetEditConfiguration",{enumerable:!0,get:function(){return n(d).default}});var h=t(651);Object.defineProperty(exports,"StackedChartWidgetConfiguration",{enumerable:!0,get:function(){return n(h).default}});var f=t(652);Object.defineProperty(exports,"StatisticalCountWidgetCreateConfiguration",{enumerable:!0,get:function(){return n(f).default}});var p=t(653);Object.defineProperty(exports,"StatisticalCountWidgetEditConfiguration",{enumerable:!0,get:function(){return n(p).default}})},function(e,exports,t){var n,r,i;/*!
 * URI.js - Mutating URLs
 *
 * Version: 1.19.0
 *
 * Author: Rodney Rehm
 * Web: http://medialize.github.io/URI.js/
 *
 * Licensed under
 *   MIT License http://www.opensource.org/licenses/mit-license
 *
 */
!function(o,a){"use strict";"object"==typeof e&&e.exports?e.exports=a(t(121),t(122),t(123)):(r=[t(121),t(122),t(123)],n=a,void 0!==(i="function"==typeof n?n.apply(exports,r):n)&&(e.exports=i))}(0,function(e,t,n,r){"use strict";function i(e,t){var n=arguments.length>=1,r=arguments.length>=2;if(!(this instanceof i))return n?r?new i(e,t):new i(e):new i;if(void 0===e){if(n)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!=typeof location?location.href+"":""}if(null===e&&n)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}function o(e){return/^[0-9]+$/.test(e)}function a(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function s(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function l(e){return"Array"===s(e)}function u(e,t){var n,r,i={};if("RegExp"===s(t))i=null;else if(l(t))for(n=0,r=t.length;n]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,i.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},i.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},i.hostProtocols=["http","https"],i.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,i.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},i.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return i.domAttributes[t]}},i.encode=p,i.decode=decodeURIComponent,i.iso8859=function(){i.encode=escape,i.decode=unescape},i.unicode=function(){i.encode=p,i.decode=decodeURIComponent},i.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},i.encodeQuery=function(e,t){var n=i.encode(e+"");return void 0===t&&(t=i.escapeQuerySpace),t?n.replace(/%20/g,"+"):n},i.decodeQuery=function(e,t){e+="",void 0===t&&(t=i.escapeQuerySpace);try{return i.decode(t?e.replace(/\+/g,"%20"):e)}catch(t){return e}};var _,w={encode:"encode",decode:"decode"},C=function(e,t){return function(n){try{return i[t](n+"").replace(i.characters[e][t].expression,function(n){return i.characters[e][t].map[n]})}catch(e){return n}}};for(_ in w)i[_+"PathSegment"]=C("pathname",w[_]),i[_+"UrnPathSegment"]=C("urnpath",w[_]);var A=function(e,t,n){return function(r){var o;o=n?function(e){return i[t](i[n](e))}:i[t];for(var a=(r+"").split(e),s=0,l=a.length;s-1&&(t.fragment=e.substring(n+1)||null,e=e.substring(0,n)),n=e.indexOf("?"),n>-1&&(t.query=e.substring(n+1)||null,e=e.substring(0,n)),"//"===e.substring(0,2)?(t.protocol=null,e=e.substring(2),e=i.parseAuthority(e,t)):(n=e.indexOf(":"))>-1&&(t.protocol=e.substring(0,n)||null,t.protocol&&!t.protocol.match(i.protocol_expression)?t.protocol=void 0:"//"===e.substring(n+1,n+3)?(e=e.substring(n+3),e=i.parseAuthority(e,t)):(e=e.substring(n+1),t.urn=!0)),t.path=e,t},i.parseHost=function(e,t){e||(e=""),e=e.replace(/\\/g,"/");var n,r,o=e.indexOf("/");if(-1===o&&(o=e.length),"["===e.charAt(0))n=e.indexOf("]"),t.hostname=e.substring(1,n)||null,t.port=e.substring(n+2,o)||null,"/"===t.port&&(t.port=null);else{var a=e.indexOf(":"),s=e.indexOf("/"),l=e.indexOf(":",a+1);-1!==l&&(-1===s||l-1?r:e.length-1);return o>-1&&(-1===r||o-1?f.slice(0,p)+f.slice(p).replace(a,""):f.replace(a,""),!(f.length<=u[0].length||n.ignore&&n.ignore.test(f))){h=c+f.length;var v=t(f,c,h,e);void 0!==v?(v=String(v),e=e.slice(0,c)+v+e.slice(h),r.lastIndex=c+v.length):r.lastIndex=h}}return r.lastIndex=0,e},i.ensureValidHostname=function(t,n){var r=!!t,o=!!n,a=!1;if(o&&(a=c(i.hostProtocols,n)),a&&!r)throw new TypeError("Hostname cannot be empty, if protocol is "+n);if(t&&t.match(i.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(i.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}},i.ensureValidPort=function(e){if(e){var t=Number(e);if(!(o(t)&&t>0&&t<65536))throw new TypeError('Port "'+e+'" is not a valid port')}},i.noConflict=function(e){if(e){var t={URI:this.noConflict()};return r.URITemplate&&"function"==typeof r.URITemplate.noConflict&&(t.URITemplate=r.URITemplate.noConflict()),r.IPv6&&"function"==typeof r.IPv6.noConflict&&(t.IPv6=r.IPv6.noConflict()),r.SecondLevelDomains&&"function"==typeof r.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=r.SecondLevelDomains.noConflict()),t}return r.URI===this&&(r.URI=v),this},y.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=i.build(this._parts),this._deferred_build=!1),this},y.clone=function(){return new i(this)},y.valueOf=y.toString=function(){return this.build(!1)._string},y.protocol=g("protocol"),y.username=g("username"),y.password=g("password"),y.hostname=g("hostname"),y.port=g("port"),y.query=m("query","?"),y.fragment=m("fragment","#"),y.search=function(e,t){var n=this.query(e,t);return"string"==typeof n&&n.length?"?"+n:n},y.hash=function(e,t){var n=this.fragment(e,t);return"string"==typeof n&&n.length?"#"+n:n},y.pathname=function(e,t){if(void 0===e||!0===e){var n=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?i.decodeUrnPath:i.decodePath)(n):n}return this._parts.urn?this._parts.path=e?i.recodeUrnPath(e):"":this._parts.path=e?i.recodePath(e):"/",this.build(!t),this},y.path=y.pathname,y.href=function(e,t){var n;if(void 0===e)return this.toString();this._string="",this._parts=i._parts();var r=e instanceof i,o="object"==typeof e&&(e.hostname||e.path||e.pathname);if(e.nodeName){e=e[i.getDomAttribute(e)]||"",o=!1}if(!r&&o&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=i.parse(String(e),this._parts);else{if(!r&&!o)throw new TypeError("invalid input");var a=r?e._parts:e;for(n in a)b.call(this._parts,n)&&(this._parts[n]=a[n])}return this.build(!t),this},y.is=function(e){var t=!1,r=!1,o=!1,a=!1,s=!1,l=!1,u=!1,c=!this._parts.urn;switch(this._parts.hostname&&(c=!1,r=i.ip4_expression.test(this._parts.hostname),o=i.ip6_expression.test(this._parts.hostname),t=r||o,a=!t,s=a&&n&&n.has(this._parts.hostname),l=a&&i.idn_expression.test(this._parts.hostname),u=a&&i.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return c;case"absolute":return!c;case"domain":case"name":return a;case"sld":return s;case"ip":return t;case"ip4":case"ipv4":case"inet4":return r;case"ip6":case"ipv6":case"inet6":return o;case"idn":return l;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return u}return null};var E=y.protocol,S=y.port,x=y.hostname;y.protocol=function(e,t){if(e&&(e=e.replace(/:(\/\/)?$/,""),!e.match(i.protocol_expression)))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return E.call(this,e,t)},y.scheme=y.protocol,y.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(e+="",":"===e.charAt(0)&&(e=e.substring(1)),i.ensureValidPort(e))),S.call(this,e,t))},y.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var n={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==i.parseHost(e,n))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=n.hostname,this._parts.preventInvalidHostname&&i.ensureValidHostname(e,this._parts.protocol)}return x.call(this,e,t)},y.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var n=this.protocol();return this.authority()?(n?n+"://":"")+this.authority():""}var r=i(e);return this.protocol(r.protocol()).authority(r.authority()).build(!t),this},y.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildHost(this._parts):"";if("/"!==i.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},y.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildAuthority(this._parts):"";if("/"!==i.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},y.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var n=i.buildUserinfo(this._parts);return n?n.substring(0,n.length-1):n}return"@"!==e[e.length-1]&&(e+="@"),i.parseUserinfo(e,this._parts),this.build(!t),this},y.resource=function(e,t){var n;return void 0===e?this.path()+this.search()+this.hash():(n=i.parse(e),this._parts.path=n.path,this._parts.query=n.query,this._parts.fragment=n.fragment,this.build(!t),this)},y.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,n)||""}var r=this._parts.hostname.length-this.domain().length,o=this._parts.hostname.substring(0,r),s=new RegExp("^"+a(o));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return e&&i.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(s,e),this.build(!t),this},y.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.match(/\./g);if(n&&n.length<2)return this._parts.hostname;var r=this._parts.hostname.length-this.tld(t).length-1;return r=this._parts.hostname.lastIndexOf(".",r-1)+1,this._parts.hostname.substring(r)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(i.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var o=new RegExp(a(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(o,e)}return this.build(!t),this},y.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.lastIndexOf("."),i=this._parts.hostname.substring(r+1);return!0!==t&&n&&n.list[i.toLowerCase()]?n.get(this._parts.hostname)||i:i}var o;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!n||!n.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');o=new RegExp(a(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(o,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");o=new RegExp(a(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(o,e)}return this.build(!t),this},y.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var n=this._parts.path.length-this.filename().length-1,r=this._parts.path.substring(0,n)||(this._parts.hostname?"/":"");return e?i.decodePath(r):r}var o=this._parts.path.length-this.filename().length,s=this._parts.path.substring(0,o),l=new RegExp("^"+a(s));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=i.recodePath(e),this._parts.path=this._parts.path.replace(l,e),this.build(!t),this},y.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var n=this._parts.path.lastIndexOf("/"),r=this._parts.path.substring(n+1);return e?i.decodePathSegment(r):r}var o=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(o=!0);var s=new RegExp(a(this.filename())+"$");return e=i.recodePath(e),this._parts.path=this._parts.path.replace(s,e),o?this.normalizePath(t):this.build(!t),this},y.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var n,r,o=this.filename(),s=o.lastIndexOf(".");return-1===s?"":(n=o.substring(s+1),r=/^[a-z0-9%]+$/i.test(n)?n:"",e?i.decodePathSegment(r):r)}"."===e.charAt(0)&&(e=e.substring(1));var l,u=this.suffix();if(u)l=e?new RegExp(a(u)+"$"):new RegExp(a("."+u)+"$");else{if(!e)return this;this._parts.path+="."+i.recodePath(e)}return l&&(e=i.recodePath(e),this._parts.path=this._parts.path.replace(l,e)),this.build(!t),this},y.segment=function(e,t,n){var r=this._parts.urn?":":"/",i=this.path(),o="/"===i.substring(0,1),a=i.split(r);if(void 0!==e&&"number"!=typeof e&&(n=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(o&&a.shift(),e<0&&(e=Math.max(a.length+e,0)),void 0===t)return void 0===e?a:a[e];if(null===e||void 0===a[e])if(l(t)){a=[];for(var s=0,u=t.length;s6&&void 0!==arguments[6]&&arguments[6],d=[],h=i&&i>0?i:4e3;if("object"===(void 0===e?"undefined":r(e))&&!Array.isArray(e)){var f=this._firstDataPointTimestamp(e,t.from,a),p=o.default.utc(t.to),g=(0,o.default)(f),m=o.default.duration(1,n),v=((p.valueOf()-f.valueOf())/m.as("milliseconds")).toFixed(),y=v>h?(v/h).toFixed():1,b=0;for(g=s.default.startOfResolution(g,n);g.isBefore(p)||g.isSame(p);){if(b%y==0){var _=String(g.unix()),w=e[_],C=0;null!==w&&void 0!==w&&("object"===(void 0===w?"undefined":r(w))?w.hasOwnProperty(l)&&(C=w[l]):C=w),d.push({x:c?g.unix():g.valueOf(),y:u.default.normalizeGraphNumber(C)})}b+=1,g.add(m)}}return d}};exports.default=c,e.exports=exports.default},function(e,exports,t){function n(e,t){return o(i(e,t,r),e+"")}var r=t(162),i=t(494),o=t(495);e.exports=n},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(65),a=n(o),s=t(7),l=n(s),u=t(4),c=n(u),d=t(5),h=n(d),f=t(64),p=n(f),g="/plugins/org.graylog.plugins.pipelineprocessor",m=i.default.createStore({listenables:[a.default],rules:void 0,functionDescriptors:void 0,getInitialState:function(){return{rules:this.rules,functionDescriptors:this.functionDescriptors}},_updateRulesState:function(e){if(this.rules){this.rules.some(function(t){return t.id===e.id})?this.rules=this.rules.map(function(t){return t.id===e.id?e:t}):this.rules.push(e)}else this.rules=[e];this.trigger({rules:this.rules,functionDescriptors:this.functionDescriptors})},_updateFunctionDescriptors:function(e){e&&(this.functionDescriptors=e.sort(function(e,t){return(0,p.default)(e.name,t.name)})),this.trigger({rules:this.rules,functionDescriptors:this.functionDescriptors})},list:function(){var e=this,t=function(e){l.default.error("Fetching rules failed with status: "+e.message,"Could not retrieve processing rules")},n=c.default.qualifyUrl(g+"/system/pipelines/rule");return(0,h.default)("GET",n).then(function(t){e.rules=t,e.trigger({rules:t,functionDescriptors:e.functionDescriptors})},t)},get:function(e){var t=function(t){l.default.error('Fetching rule "'+e+'" failed with status: '+t.message,'Could not retrieve processing rule "'+e+'"')},n=c.default.qualifyUrl(g+"/system/pipelines/rule/"+e),r=(0,h.default)("GET",n);return r.then(this._updateRulesState,t),r},save:function(e){var t=this,n=function(t){l.default.error('Saving rule "'+e.title+'" failed with status: '+t.message,'Could not save processing rule "'+e.title+'"')},r=c.default.qualifyUrl(g+"/system/pipelines/rule"),i={title:e.title,description:e.description,source:e.source},o=(0,h.default)("POST",r,i);return o.then(function(e){t._updateRulesState(e),l.default.success('Rule "'+e.title+'" created successfully')},n),a.default.save.promise(o),o},update:function(e){var t=this,n=function(t){l.default.error('Updating rule "'+e.title+'" failed with status: '+t.message,'Could not update processing rule "'+e.title+'"')},r=c.default.qualifyUrl(g+"/system/pipelines/rule/"+e.id),i={id:e.id,title:e.title,description:e.description,source:e.source},o=(0,h.default)("PUT",r,i);return o.then(function(e){t._updateRulesState(e),l.default.success('Rule "'+e.title+'" updated successfully')},n),a.default.update.promise(o),o},delete:function(e){var t=this,n=function(t){l.default.error('Deleting rule "'+e.title+'" failed with status: '+t.message,'Could not delete processing rule "'+e.title+'"')},r=c.default.qualifyUrl(g+"/system/pipelines/rule/"+e.id);return(0,h.default)("DELETE",r).then(function(){t.rules=t.rules.filter(function(t){return t.id!==e.id}),t.trigger({rules:t.rules,functionDescriptors:t.functionDescriptors}),l.default.success('Rule "'+e.title+'" was deleted successfully')},n)},parse:function(e,t){var n=c.default.qualifyUrl(g+"/system/pipelines/rule/parse"),r={title:e.title,description:e.description,source:e.source};return(0,h.default)("POST",n,r).then(function(e){t([])},function(e){var n=e.additional.res;400===n.status&&t(n.body)})},multiple:function(e,t){var n=c.default.qualifyUrl(g+"/system/pipelines/rule/multiple"),r=(0,h.default)("POST",n,{rules:e});return r.then(t),r},loadFunctions:function(){if(!this.functionDescriptors){var e=c.default.qualifyUrl(g+"/system/pipelines/rule/functions");return(0,h.default)("GET",e).then(this._updateFunctionDescriptors)}}});exports.default=m,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(611);Object.defineProperty(exports,"BooleanField",{enumerable:!0,get:function(){return n(r).default}});var i=t(612);Object.defineProperty(exports,"ConfigurationForm",{enumerable:!0,get:function(){return n(i).default}});var o=t(613);Object.defineProperty(exports,"ConfigurationWell",{enumerable:!0,get:function(){return n(o).default}});var a=t(614);Object.defineProperty(exports,"DropdownField",{enumerable:!0,get:function(){return n(a).default}});var s=t(66);Object.defineProperty(exports,"FieldHelpers",{enumerable:!0,get:function(){return n(s).default}});var l=t(615);Object.defineProperty(exports,"ListField",{enumerable:!0,get:function(){return n(l).default}});var u=t(616);Object.defineProperty(exports,"NumberField",{enumerable:!0,get:function(){return n(u).default}});var c=t(617);Object.defineProperty(exports,"TextField",{enumerable:!0,get:function(){return n(c).default}});var d=t(618);Object.defineProperty(exports,"TitleField",{enumerable:!0,get:function(){return n(d).default}})},function(e,exports,t){var n=t(622);"string"==typeof n&&(n=[[e.i,n,""]]);var r={};r.transform=void 0;t(15)(n,r);n.locals&&(e.exports=n.locals)},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n={gl2ServerUrl:function(){return this.appConfig().gl2ServerUrl},gl2AppPathPrefix:function(){return this.appConfig().gl2AppPathPrefix},gl2DevMode:function(){return"undefined"!=typeof DEVELOPMENT&&DEVELOPMENT},rootTimeZone:function(){return this.appConfig().rootTimeZone},appConfig:function(){return window.appConfig||{}}};exports.default=n,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(exports,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n1}},{interval:"month",unit:"month",step:1,condition:function(e){return 1===e.years()||e.months()>1}},{interval:"day",unit:"date",step:2,condition:function(e){return 1===e.months()||e.days()>10}},{interval:"day",unit:"date",step:1,condition:function(e){return e.days()>3}},{interval:"hour",unit:"hour",step:12,condition:function(e){return e.days()>1}},{interval:"hour",unit:"hour",step:3,condition:function(e){return 1===e.days()}},{interval:"hour",unit:"hour",step:1,condition:function(e){return e.hours()>1}},{interval:"minute",unit:"minute",step:10,condition:function(e){return 1===e.hours()||e.minutes()>30}},{interval:"minute",unit:"minute",step:5,condition:function(e){return e.minutes()>15}},{interval:"minute",unit:"minute",step:1,condition:function(){return!0}}],customDateTimeFormat:function(e){var t=this;return void 0===e&&(e=null),function(n){var r=void 0,o=void 0;return null===e?r=new i.default(n).toMoment():(r=(0,a.default)(n),r.utcOffset(e)),t.dateTimeFormats.some(function(e){if(!0===e.condition(r))return o=r.format(e.formatString),!0}),o}},customTickInterval:function(e){var t=this;return void 0===e&&(e=null),function(n,r,o){var s=[],l=void 0,u=void 0;if(null===e?(l=new i.default(n).toMoment(),u=new i.default(r).toMoment()):(l=(0,a.default)(n),u=(0,a.default)(r),l.utcOffset(e),u.utcOffset(e)),!l.isValid()||!u.isValid())return s;var c=void 0,d=void 0,h=a.default.duration(u.valueOf()-l.valueOf());if(t.intervalResolutions.some(function(e){if(e.condition(h))return c=e.interval,d=e.unit,o=e.step,!0}),l.add(1,c).startOf(c),o>1)for(;l.isBefore(u);)l.get(d)%o==0&&s.push(new Date(l.valueOf())),l.add(1,c);else for(;l.isBefore(u);)s.push(new Date(l.valueOf())),l.add(1,c);return s}}},e.exports=exports.default},function(e,exports,t){e.exports=t(325).crossfilter},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(31),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i={glColourPalette:function(){return r.default.scale.ordinal().range(["#16ACE3","#FBB040","#ED8EEF","#7CE255","#8DB3ED","#EAF253","#CED945","#EF8DB6","#D4A8ED","#F495D9"])},tooltipRenderlet:function(e,t,n){e.on("renderlet.tooltip",function(e){r.default.select(e.root()[0][0]).selectAll(t).attr("rel","tooltip").attr("data-original-title",n)})}};exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;nn(t).setHours(0,0,0,0)}function s(e){var t=new Date;return t.setHours(0,0,0,0),o(e,t)}function l(e){var t=new Date((new Date).getTime()+864e5);return t.setHours(0,0,0,0),e>=t}function u(e,t,r){var i=n(e);return i.setHours(0,0,0,0),a(i,t)&&o(i,r)||a(i,r)&&o(i,t)}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:null,to:null},n=t.from,r=t.to;return n?n&&r&&i(n,r)&&i(e,n)?(n=null,r=null):r&&o(e,n)?n=e:r&&i(e,r)?(n=e,r=e):(r=e,o(r,n)&&(r=n,n=e)):n=e,{from:n,to:r}}function d(e,t){var n=t.from,r=t.to;return n&&i(e,n)||r&&i(e,r)||n&&r&&u(e,n,r)}function h(e){var t=n(e);return t.setHours(0,0,0),t.setDate(t.getDate()+4-(t.getDay()||7)),Math.ceil(((t-new Date(t.getFullYear(),0,1))/864e5+1)/7)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.clone=n,exports.addMonths=r,exports.isSameDay=i,exports.isDayBefore=o,exports.isDayAfter=a,exports.isPastDay=s,exports.isFutureDay=l,exports.isDayBetween=u,exports.addDayToRange=c,exports.isDayInRange=d,exports.getWeekNumber=h,exports.default={addDayToRange:c,addMonths:r,clone:n,getWeekNumber:h,isDayAfter:a,isDayBefore:o,isDayBetween:u,isDayInRange:d,isFutureDay:l,isPastDay:s,isSameDay:i}},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e){for(var t=0,n=void 0,r=0,i=e.length;rt&&(t=n);return t}function i(e){for(var t=Array(e.length),n=0,r=e.length;n=t.x+t.w)&&(!(e.y+e.h<=t.y)&&!(e.y>=t.y+t.h))))}function l(e,t){for(var n=p(e),r=_(e),i=Array(e.length),a=0,s=r.length;a0&&!h(e,t);)t.y--;for(var i=void 0;i=h(e,t);)t.y=i.y+i.h;return t}function c(e,t){for(var n=p(e),r=0,i=e.length;rt.cols&&(o.x=t.cols-o.w),o.x<0&&(o.x=0,o.w=t.cols),o.static)for(;h(n,o);)o.y++;else n.push(o)}return e}function d(e,t){for(var n=0,r=e.length;nr;"number"==typeof n&&(t.x=n),"number"==typeof r&&(t.y=r),t.moved=!0;var a=_(e);o&&(a=a.reverse());for(var s=f(a,t),l=0,u=s.length;lc.y&&t.y-c.y>c.h/4||(e=c.static?m(e,c,t,i):m(e,t,c,i)))}return e}function m(e,t,n,r){if(r){var i={x:n.x,y:n.y,w:n.w,h:n.h,i:"-1"};if(i.y=Math.max(t.y-n.h,0),!h(e,i))return g(e,n,void 0,i.y)}return g(e,n,void 0,n.y+1)}function v(e){return 100*e+"%"}function y(e){var t=e.top,n=e.left,r=e.width,i=e.height,o="translate("+n+"px,"+t+"px)";return{transform:o,WebkitTransform:o,MozTransform:o,msTransform:o,OTransform:o,width:r+"px",height:i+"px",position:"absolute"}}function b(e){return{top:e.top+"px",left:e.left+"px",width:e.width+"px",height:e.height+"px",position:"absolute"}}function _(e){return[].concat(e).sort(function(e,t){return e.y>t.y||e.y===t.y&&e.x>t.x?1:e.y===t.y&&e.x===t.x?0:-1})}function w(e,t,n,i){e=e||[];var a=[];return k.default.Children.forEach(t,function(t,n){var i=d(e,t.key||"1");if(i)a[n]=o(i);else{!D&&t.props._grid&&console.warn("`_grid` properties on children have been deprecated as of React 15.2. Please use `data-grid` or add your properties directly to the `layout`.");var s=t.props["data-grid"]||t.props._grid;s?(D||C([s],"ReactGridLayout.children"),a[n]=o(E({},s,{i:t.key}))):a[n]=o({w:1,h:1,x:0,y:r(a),i:t.key||"1"})}}),a=c(a,{cols:n}),a=l(a,i)}function C(e,t){t=t||"Layout";var n=["x","y","w","h"];if(!Array.isArray(e))throw new Error(t+" must be an array!");for(var r=0,i=e.length;rm)return 1}for(var v=0,y=Math.max(f.length,p.length);vi)return 1}return 0}},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({delete:{asyncResult:!0},list:{asyncResult:!0},get:{asyncResult:!0},save:{asyncResult:!0},update:{asyncResult:!0},parse:{asyncResult:!0},multiple:{asyncResult:!0},loadFunctions:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(0),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i={hasAttribute:function(e,t){return e.indexOf(t)>-1},optionalMarker:function(e){return e.is_optional?r.default.createElement("span",{className:"configuration-field-optional"},"(optional)"):null}};exports.default=i,e.exports=exports.default},function(e,exports){e.exports=function e(t,n){"use strict";var r,i,o=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,a=/(^[ ]*|[ ]*$)/g,s=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,l=/^0x[0-9a-f]+$/i,u=/^0/,c=function(t){return e.insensitive&&(""+t).toLowerCase()||""+t},d=c(t).replace(a,"")||"",h=c(n).replace(a,"")||"",f=d.replace(o,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),p=h.replace(o,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),g=parseInt(d.match(l),16)||1!==f.length&&d.match(s)&&Date.parse(d),m=parseInt(h.match(l),16)||g&&h.match(s)&&Date.parse(h)||null;if(m){if(gm)return 1}for(var v=0,y=Math.max(f.length,p.length);vi)return 1}return 0}},function(e,exports,t){"use strict";var n=t(272),r=t(273),i=t(126);e.exports={formats:i,parse:r,stringify:n}},function(e,exports,t){(function(t,n,r){/* @preserve
 * The MIT License (MIT)
 * 
 * Copyright (c) 2013-2017 Petka Antonov
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 * 
 */
!function(t){e.exports=t()}(function(){var e,i,exports;return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var l="function"==typeof _dereq_&&_dereq_;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return i(n||e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof _dereq_&&_dereq_,a=0;a0;){var t=e.shift();if("function"==typeof t){var n=e.shift(),r=e.shift();t.call(n,r)}else t._settlePromises()}},r.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},n.exports=r,n.exports.firstLineError=s},{"./queue":26,"./schedule":29,"./util":36}],3:[function(e,t,exports){"use strict";t.exports=function(e,t,n,r){var i=!1,o=function(e,t){this._reject(t)},a=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(o,o,null,this,e)},s=function(e,t){0==(50397184&this._bitField)&&this._resolveCallback(t.target)},l=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(o){i||(i=!0,e.prototype._propagateFrom=r.propagateFromFunction(),e.prototype._boundValue=r.boundValueFunction());var u=n(o),c=new e(t);c._propagateFrom(this,1);var d=this._target();if(c._setBoundTo(u),u instanceof e){var h={promiseRejectionQueued:!1,promise:c,target:d,bindingPromise:u};d._then(t,a,void 0,c,h),u._then(s,l,void 0,c,h),c._setOnCancel(u)}else c._resolveCallback(d);return c},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=2097152|this._bitField,this._boundTo=e):this._bitField=-2097153&this._bitField},e.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},e.bind=function(t,n){return e.resolve(n).bind(t)}}},{}],4:[function(e,t,exports){"use strict";function n(){try{Promise===i&&(Promise=r)}catch(e){}return i}var r;"undefined"!=typeof Promise&&(r=Promise);var i=e("./promise")();i.noConflict=n,t.exports=i},{"./promise":22}],5:[function(e,t,exports){"use strict";var n=Object.create;if(n){var r=n(null),i=n(null);r[" size"]=i[" size"]=0}t.exports=function(t){function n(e,n){var r;if(null!=e&&(r=e[n]),"function"!=typeof r){var i="Object "+s.classString(e)+" has no method '"+s.toString(n)+"'";throw new t.TypeError(i)}return r}function r(e){return n(e,this.pop()).apply(e,this)}function i(e){return e[this]}function o(e){var t=+this;return t<0&&(t=Math.max(0,t+e.length)),e[t]}var a,s=e("./util"),l=s.canEvaluate;s.isIdentifier;t.prototype.call=function(e){var t=[].slice.call(arguments,1);return t.push(e),this._then(r,void 0,void 0,t,void 0)},t.prototype.get=function(e){var t,n="number"==typeof e;if(n)t=o;else if(l){var r=a(e);t=null!==r?r:i}else t=i;return this._then(t,void 0,void 0,e,void 0)}}},{"./util":36}],6:[function(e,t,exports){"use strict";t.exports=function(t,n,r,i){var o=e("./util"),a=o.tryCatch,s=o.errorObj,l=t._async;t.prototype.break=t.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var e=this,t=e;e._isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var n=e._cancellationParent;if(null==n||!n._isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}e._isFollowing()&&e._followee().cancel(),e._setWillBeCancelled(),t=e,e=n}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},t.prototype._cancelBy=function(e){return e===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},t.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),l.invoke(this._cancelPromises,this,void 0))},t.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},t.prototype._unsetOnCancel=function(){this._onCancelField=void 0},t.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},t.prototype._doInvokeOnCancel=function(e,t){if(o.isArray(e))for(var n=0;n=0)return o[e]}var i=!1,o=[];return e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.prototype._peekContext=function(){},t.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},t.prototype._popContext=function(){if(void 0!==this._trace){var e=o.pop(),t=e._promiseCreated;return e._promiseCreated=null,t}return null},t.CapturedTrace=null,t.create=n,t.deactivateLongStackTraces=function(){},t.activateLongStackTraces=function(){var n=e.prototype._pushContext,o=e.prototype._popContext,a=e._peekContext,s=e.prototype._peekContext,l=e.prototype._promiseCreated;t.deactivateLongStackTraces=function(){e.prototype._pushContext=n,e.prototype._popContext=o,e._peekContext=a,e.prototype._peekContext=s,e.prototype._promiseCreated=l,i=!1},i=!0,e.prototype._pushContext=t.prototype._pushContext,e.prototype._popContext=t.prototype._popContext,e._peekContext=e.prototype._peekContext=r,e.prototype._promiseCreated=function(){var e=this._peekContext();e&&null==e._promiseCreated&&(e._promiseCreated=this)}},t}},{}],9:[function(e,n,exports){"use strict";n.exports=function(n,r){function i(e,t){return{promise:t}}function o(){return!1}function a(e,t,n){var r=this;try{e(t,n,function(e){if("function"!=typeof e)throw new TypeError("onCancel must be a function, got: "+j.toString(e));r._attachCancellationCallback(e)})}catch(e){return e}}function s(e){if(!this._isCancellable())return this;var t=this._onCancel();void 0!==t?j.isArray(t)?t.push(e):this._setOnCancel([t,e]):this._setOnCancel(e)}function l(){return this._onCancelField}function u(e){this._onCancelField=e}function c(){this._cancellationParent=void 0,this._onCancelField=void 0}function d(e,t){if(0!=(1&t)){this._cancellationParent=e;var n=e._branchesRemainingToCancel;void 0===n&&(n=0),e._branchesRemainingToCancel=n+1}0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}function h(e,t){0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}function f(){var e=this._boundTo;return void 0!==e&&e instanceof n?e.isFulfilled()?e.value():void 0:e}function p(){this._trace=new R(this._peekContext())}function g(e,t){if(z(e)){var n=this._trace;if(void 0!==n&&t&&(n=n._parent),void 0!==n)n.attachExtraTrace(e);else if(!e.__stackCleaned__){var r=E(e);j.notEnumerableProp(e,"stack",r.message+"\n"+r.stack.join("\n")),j.notEnumerableProp(e,"__stackCleaned__",!0)}}}function m(e,t,n,r,i){if(void 0===e&&null!==t&&Q){if(void 0!==i&&i._returnedNonUndefined())return;if(0==(65535&r._bitField))return;n&&(n+=" ");var o="",a="";if(t._trace){for(var s=t._trace.stack.split("\n"),l=C(s),u=l.length-1;u>=0;--u){var c=l[u];if(!U.test(c)){var d=c.match(V);d&&(o="at "+d[1]+":"+d[2]+":"+d[3]+" ");break}}if(l.length>0)for(var h=l[0],u=0;u0&&(a="\n"+s[u-1]);break}}var f="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+a;r._warn(f,!0,t)}}function v(e,t){var n=e+" is deprecated and will be removed in a future version.";return t&&(n+=" Use "+t+" instead."),y(n)}function y(e,t,r){if(se.warnings){var i,o=new N(e);if(t)r._attachExtraTrace(o);else if(se.longStackTraces&&(i=n._peekContext()))i.attachExtraTrace(o);else{var a=E(o);o.stack=a.message+"\n"+a.stack.join("\n")}ne("warning",o)||S(o,"",!0)}}function b(e,t){for(var n=0;n=0;--s)if(r[s]===o){a=s;break}for(var s=a;s>=0;--s){var l=r[s];if(t[i]!==l)break;t.pop(),i--}t=r}}function C(e){for(var t=[],n=0;n0&&"SyntaxError"!=e.name&&(t=t.slice(n)),t}function E(e){var t=e.stack,n=e.toString();return t="string"==typeof t&&t.length>0?A(e):["    (No stack trace)"],{message:n,stack:"SyntaxError"==e.name?t:C(t)}}function S(e,t,n){if("undefined"!=typeof console){var r;if(j.isObject(e)){var i=e.stack;r=t+W(i,e)}else r=t+String(e);"function"==typeof P?P(r,n):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(r)}}function x(e,t,n,r){var i=!1;try{"function"==typeof t&&(i=!0,"rejectionHandled"===e?t(r):t(n,r))}catch(e){I.throwLater(e)}"unhandledRejection"===e?ne(e,n,r)||i||S(n,"Unhandled rejection "):ne(e,r)}function F(e){var t;if("function"==typeof e)t="[function "+(e.name||"anonymous")+"]";else{t=e&&"function"==typeof e.toString?e.toString():j.toString(e);if(/\[object [a-zA-Z0-9$_]+\]/.test(t))try{t=JSON.stringify(e)}catch(e){}0===t.length&&(t="(empty array)")}return"(<"+k(t)+">, no stack trace)"}function k(e){return e.length<41?e:e.substr(0,38)+"..."}function D(){return"function"==typeof ae}function T(e){var t=e.match(oe);if(t)return{fileName:t[1],line:parseInt(t[2],10)}}function M(e,t){if(D()){for(var n,r,i=e.stack.split("\n"),o=t.stack.split("\n"),a=-1,s=-1,l=0;l=s||(ie=function(e){if(H.test(e))return!0;var t=T(e);return!!(t&&t.fileName===n&&a<=t.line&&t.line<=s)})}}function R(e){this._parent=e,this._promisesCreated=0;var t=this._length=1+(void 0===e?0:e._length);ae(this,R),t>32&&this.uncycle()}var O,L,P,B=n._getDomain,I=n._async,N=e("./errors").Warning,j=e("./util"),z=j.canAttachTrace,H=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,U=/\((?:timers\.js):\d+:\d+\)/,V=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,G=null,W=null,q=!1,K=!(0==j.env("BLUEBIRD_DEBUG")),Y=!(0==j.env("BLUEBIRD_WARNINGS")||!K&&!j.env("BLUEBIRD_WARNINGS")),X=!(0==j.env("BLUEBIRD_LONG_STACK_TRACES")||!K&&!j.env("BLUEBIRD_LONG_STACK_TRACES")),Q=0!=j.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(Y||!!j.env("BLUEBIRD_W_FORGOTTEN_RETURN"));n.prototype.suppressUnhandledRejections=function(){var e=this._target();e._bitField=-1048577&e._bitField|524288},n.prototype._ensurePossibleRejectionHandled=function(){if(0==(524288&this._bitField)){this._setRejectionIsUnhandled();var e=this;setTimeout(function(){e._notifyUnhandledRejection()},1)}},n.prototype._notifyUnhandledRejectionIsHandled=function(){x("rejectionHandled",O,void 0,this)},n.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},n.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},n.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._settledValue();this._setUnhandledRejectionIsNotified(),x("unhandledRejection",L,e,this)}},n.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},n.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},n.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},n.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},n.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},n.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},n.prototype._warn=function(e,t,n){return y(e,t,n||this)},n.onPossiblyUnhandledRejection=function(e){var t=B();L="function"==typeof e?null===t?e:j.domainBind(t,e):void 0},n.onUnhandledRejectionHandled=function(e){var t=B();O="function"==typeof e?null===t?e:j.domainBind(t,e):void 0};var Z=function(){};n.longStackTraces=function(){if(I.haveItemsQueued()&&!se.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n    See http://goo.gl/MqrFmX\n");if(!se.longStackTraces&&D()){var e=n.prototype._captureStackTrace,t=n.prototype._attachExtraTrace;se.longStackTraces=!0,Z=function(){if(I.haveItemsQueued()&&!se.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n    See http://goo.gl/MqrFmX\n");n.prototype._captureStackTrace=e,n.prototype._attachExtraTrace=t,r.deactivateLongStackTraces(),I.enableTrampoline(),se.longStackTraces=!1},n.prototype._captureStackTrace=p,n.prototype._attachExtraTrace=g,r.activateLongStackTraces(),I.disableTrampolineIfNecessary()}},n.hasLongStackTraces=function(){return se.longStackTraces&&D()};var J=function(){try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return j.global.dispatchEvent(e),function(e,t){var n=new CustomEvent(e.toLowerCase(),{detail:t,cancelable:!0});return!j.global.dispatchEvent(n)}}if("function"==typeof Event){var e=new Event("CustomEvent");return j.global.dispatchEvent(e),function(e,t){var n=new Event(e.toLowerCase(),{cancelable:!0});return n.detail=t,!j.global.dispatchEvent(n)}}var e=document.createEvent("CustomEvent");return e.initCustomEvent("testingtheevent",!1,!0,{}),j.global.dispatchEvent(e),function(e,t){var n=document.createEvent("CustomEvent");return n.initCustomEvent(e.toLowerCase(),!1,!0,t),!j.global.dispatchEvent(n)}}catch(e){}return function(){return!1}}(),ee=function(){return j.isNode?function(){return t.emit.apply(t,arguments)}:j.global?function(e){var t="on"+e.toLowerCase(),n=j.global[t];return!!n&&(n.apply(j.global,[].slice.call(arguments,1)),!0)}:function(){return!1}}(),te={promiseCreated:i,promiseFulfilled:i,promiseRejected:i,promiseResolved:i,promiseCancelled:i,promiseChained:function(e,t,n){return{promise:t,child:n}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,n){return{reason:t,promise:n}},rejectionHandled:i},ne=function(e){var t=!1;try{t=ee.apply(null,arguments)}catch(e){I.throwLater(e),t=!0}var n=!1;try{n=J(e,te[e].apply(null,arguments))}catch(e){I.throwLater(e),n=!0}return n||t};n.config=function(e){if(e=Object(e),"longStackTraces"in e&&(e.longStackTraces?n.longStackTraces():!e.longStackTraces&&n.hasLongStackTraces()&&Z()),"warnings"in e){var t=e.warnings;se.warnings=!!t,Q=se.warnings,j.isObject(t)&&"wForgottenReturn"in t&&(Q=!!t.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!se.cancellation){if(I.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");n.prototype._clearCancellationData=c,n.prototype._propagateFrom=d,n.prototype._onCancel=l,n.prototype._setOnCancel=u,n.prototype._attachCancellationCallback=s,n.prototype._execute=a,re=d,se.cancellation=!0}return"monitoring"in e&&(e.monitoring&&!se.monitoring?(se.monitoring=!0,n.prototype._fireEvent=ne):!e.monitoring&&se.monitoring&&(se.monitoring=!1,n.prototype._fireEvent=o)),n},n.prototype._fireEvent=o,n.prototype._execute=function(e,t,n){try{e(t,n)}catch(e){return e}},n.prototype._onCancel=function(){},n.prototype._setOnCancel=function(e){},n.prototype._attachCancellationCallback=function(e){},n.prototype._captureStackTrace=function(){},n.prototype._attachExtraTrace=function(){},n.prototype._clearCancellationData=function(){},n.prototype._propagateFrom=function(e,t){};var re=h,ie=function(){return!1},oe=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;j.inherits(R,Error),r.CapturedTrace=R,R.prototype.uncycle=function(){var e=this._length;if(!(e<2)){for(var t=[],n={},r=0,i=this;void 0!==i;++r)t.push(i),i=i._parent;e=this._length=r;for(var r=e-1;r>=0;--r){var o=t[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;r0&&(t[s-1]._parent=void 0,t[s-1]._length=1),t[r]._parent=void 0,t[r]._length=1;var l=r>0?t[r-1]:this;s=0;--c)t[c]._length=u,u++;return}}}},R.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=E(e),n=t.message,r=[t.stack],i=this;void 0!==i;)r.push(C(i.stack.split("\n"))),i=i._parent;w(r),_(r),j.notEnumerableProp(e,"stack",b(n,r)),j.notEnumerableProp(e,"__stackCleaned__",!0)}};var ae=function(){var e=/^\s*at\s*/,t=function(e,t){return"string"==typeof e?e:void 0!==t.name&&void 0!==t.message?t.toString():F(t)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,G=e,W=t;var n=Error.captureStackTrace;return ie=function(e){return H.test(e)},function(e,t){Error.stackTraceLimit+=6,n(e,t),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return G=/@/,W=t,q=!0,function(e){e.stack=(new Error).stack};var i;try{throw new Error}catch(e){i="stack"in e}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(W=function(e,t){return"string"==typeof e?e:"object"!=typeof t&&"function"!=typeof t||void 0===t.name||void 0===t.message?F(t):t.toString()},null):(G=e,W=t,function(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6})}();"undefined"!=typeof console&&void 0!==console.warn&&(P=function(e){console.warn(e)},j.isNode&&t.stderr.isTTY?P=function(e,t){var n=t?"":"";console.warn(n+e+"\n")}:j.isNode||"string"!=typeof(new Error).stack||(P=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}));var se={warnings:Y,longStackTraces:!1,cancellation:!1,monitoring:!1};return X&&n.longStackTraces(),{longStackTraces:function(){return se.longStackTraces},warnings:function(){return se.warnings},cancellation:function(){return se.cancellation},monitoring:function(){return se.monitoring},propagateFromFunction:function(){return re},boundValueFunction:function(){return f},checkForgottenReturns:m,setBounds:M,warn:y,deprecated:v,CapturedTrace:R,fireDomEvent:J,fireGlobalEvent:ee}}},{"./errors":12,"./util":36}],10:[function(e,t,exports){"use strict";t.exports=function(e){function t(){return this.value}function n(){throw this.reason}e.prototype.return=e.prototype.thenReturn=function(n){return n instanceof e&&n.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:n},void 0)},e.prototype.throw=e.prototype.thenThrow=function(e){return this._then(n,void 0,void 0,{reason:e},void 0)},e.prototype.catchThrow=function(e){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:e},void 0);var t=arguments[1],r=function(){throw t};return this.caught(e,r)},e.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof e&&n.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:n},void 0);var r=arguments[1];r instanceof e&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],11:[function(e,t,exports){"use strict";t.exports=function(e,t){function n(){return o(this)}function r(e,n){return i(e,n,t,t)}var i=e.reduce,o=e.all;e.prototype.each=function(e){return i(this,e,t,0)._then(n,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(e){return i(this,e,t,t)},e.each=function(e,r){return i(e,r,t,0)._then(n,void 0,void 0,e,void 0)},e.mapSeries=r}},{}],12:[function(e,t,exports){"use strict";function n(e,t){function n(r){if(!(this instanceof n))return new n(r);c(this,"message","string"==typeof r?r:t),c(this,"name",e),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return u(n,Error),n}function r(e){if(!(this instanceof r))return new r(e);c(this,"name","OperationalError"),c(this,"message",e),this.cause=e,this.isOperational=!0,e instanceof Error?(c(this,"message",e.message),c(this,"stack",e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}var i,o,a=e("./es5"),s=a.freeze,l=e("./util"),u=l.inherits,c=l.notEnumerableProp,d=n("Warning","warning"),h=n("CancellationError","cancellation error"),f=n("TimeoutError","timeout error"),p=n("AggregateError","aggregate error");try{i=TypeError,o=RangeError}catch(e){i=n("TypeError","type error"),o=n("RangeError","range error")}for(var g="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),m=0;m1?e.cancelPromise._reject(t):e.cancelPromise._cancel(),e.cancelPromise=null,!0)}function s(){return u.call(this,this.promise._target()._settledValue())}function l(e){if(!a(this,e))return h.e=e,h}function u(e){var i=this.promise,u=this.handler;if(!this.called){this.called=!0;var c=this.isFinallyHandler()?u.call(i._boundValue()):u.call(i._boundValue(),e);if(c===r)return c;if(void 0!==c){i._setReturnedNonUndefined();var f=n(c,i);if(f instanceof t){if(null!=this.cancelPromise){if(f._isCancelled()){var p=new d("late cancellation observer");return i._attachExtraTrace(p),h.e=p,h}f.isPending()&&f._attachCancellationCallback(new o(this))}return f._then(s,l,void 0,this,void 0)}}}return i.isRejected()?(a(this),h.e=e,h):(a(this),e)}var c=e("./util"),d=t.CancellationError,h=c.errorObj,f=e("./catch_filter")(r);return i.prototype.isFinallyHandler=function(){return 0===this.type},o.prototype._resultCancelled=function(){a(this.finallyHandler)},t.prototype._passThrough=function(e,t,n,r){return"function"!=typeof e?this.then():this._then(n,r,void 0,new i(this,t,e),void 0)},t.prototype.lastly=t.prototype.finally=function(e){return this._passThrough(e,0,u,u)},t.prototype.tap=function(e){return this._passThrough(e,1,u)},t.prototype.tapCatch=function(e){var n=arguments.length;if(1===n)return this._passThrough(e,1,void 0,u);var r,i=new Array(n-1),o=0;for(r=0;r0&&"function"==typeof arguments[t]){e=arguments[t];var r}var i=[].slice.call(arguments);e&&i.pop();var r=new n(i).promise();return void 0!==e?r.spread(e):r}}},{"./util":36}],18:[function(e,t,exports){"use strict";t.exports=function(t,n,r,i,o,a){function s(e,t,n,r){this.constructor$(e),this._promise._captureStackTrace();var i=u();this._callback=null===i?t:c.domainBind(i,t),this._preservedValues=r===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],f.invoke(this._asyncInit,this,void 0)}function l(e,n,i,o){if("function"!=typeof n)return r("expecting a function but got "+c.classString(n));var a=0;if(void 0!==i){if("object"!=typeof i||null===i)return t.reject(new TypeError("options argument must be an object but it is "+c.classString(i)));if("number"!=typeof i.concurrency)return t.reject(new TypeError("'concurrency' must be a number but it is "+c.classString(i.concurrency)));a=i.concurrency}return a="number"==typeof a&&isFinite(a)&&a>=1?a:0,new s(e,n,a,o).promise()}var u=t._getDomain,c=e("./util"),d=c.tryCatch,h=c.errorObj,f=t._async;c.inherits(s,n),s.prototype._asyncInit=function(){this._init$(void 0,-2)},s.prototype._init=function(){},s.prototype._promiseFulfilled=function(e,n){var r=this._values,o=this.length(),s=this._preservedValues,l=this._limit;if(n<0){if(n=-1*n-1,r[n]=e,l>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(l>=1&&this._inFlight>=l)return r[n]=e,this._queue.push(n),!1;null!==s&&(s[n]=e);var u=this._promise,c=this._callback,f=u._boundValue();u._pushContext();var p=d(c).call(f,e,n,o),g=u._popContext();if(a.checkForgottenReturns(p,g,null!==s?"Promise.filter":"Promise.map",u),p===h)return this._reject(p.e),!0;var m=i(p,this._promise);if(m instanceof t){m=m._target();var v=m._bitField;if(0==(50397184&v))return l>=1&&this._inFlight++,r[n]=m,m._proxy(this,-1*(n+1)),!1;if(0==(33554432&v))return 0!=(16777216&v)?(this._reject(m._reason()),!0):(this._cancel(),!0);p=m._value()}r[n]=p}return++this._totalResolved>=o&&(null!==s?this._filter(r,s):this._resolve(r),!0)},s.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,n=this._values;e.length>0&&this._inFlight1){o.deprecated("calling Promise.try with more than 1 argument");var u=arguments[1],c=arguments[2];l=a.isArray(u)?s(e).apply(c,u):s(e).call(c,u)}else l=s(e)();var d=r._popContext();return o.checkForgottenReturns(l,d,"Promise.try",r),r._resolveFromSyncValue(l),r},t.prototype._resolveFromSyncValue=function(e){e===a.errorObj?this._rejectCallback(e.e,!1):this._resolveCallback(e,!0)}}},{"./util":36}],20:[function(e,t,exports){"use strict";function n(e){return e instanceof Error&&u.getPrototypeOf(e)===Error.prototype}function r(e){var t;if(n(e)){t=new l(e),t.name=e.name,t.message=e.message,t.stack=e.stack;for(var r=u.keys(e),i=0;i1){var n,r=new Array(t-1),i=0;for(n=0;n0&&"function"!=typeof e&&"function"!=typeof t){var n=".then() only accepts functions but was passed: "+p.classString(e);arguments.length>1&&(n+=", "+p.classString(t)),this._warn(n)}return this._then(e,t,void 0,void 0,void 0)},o.prototype.done=function(e,t){this._then(e,t,void 0,void 0,void 0)._setIsFinal()},o.prototype.spread=function(e){return"function"!=typeof e?h("expecting a function but got "+p.classString(e)):this.all()._then(e,void 0,void 0,C,void 0)},o.prototype.toJSON=function(){var e={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(e.fulfillmentValue=this.value(),e.isFulfilled=!0):this.isRejected()&&(e.rejectionReason=this.reason(),e.isRejected=!0),e},o.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new S(this).promise()},o.prototype.error=function(e){return this.caught(p.originatesFromRejection,e)},o.getNewLibraryCopy=n.exports,o.is=function(e){return e instanceof o},o.fromNode=o.fromCallback=function(e){var t=new o(w);t._captureStackTrace();var n=arguments.length>1&&!!Object(arguments[1]).multiArgs,r=O(e)(M(t,n));return r===R&&t._rejectCallback(r.e,!0),t._isFateSealed()||t._setAsyncGuaranteed(),t},o.all=function(e){return new S(e).promise()},o.cast=function(e){var t=E(e);return t instanceof o||(t=new o(w),t._captureStackTrace(),t._setFulfilled(),t._rejectionHandler0=e),t},o.resolve=o.fulfilled=o.cast,o.reject=o.rejected=function(e){var t=new o(w);return t._captureStackTrace(),t._rejectCallback(e,!0),t},o.setScheduler=function(e){if("function"!=typeof e)throw new b("expecting a function but got "+p.classString(e));return v.setScheduler(e)},o.prototype._then=function(e,t,n,r,i){var a=void 0!==i,s=a?i:new o(w),l=this._target(),c=l._bitField;a||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===r&&0!=(2097152&this._bitField)&&(r=0!=(50397184&c)?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var d=u();if(0!=(50397184&c)){var h,f,g=l._settlePromiseCtx;0!=(33554432&c)?(f=l._rejectionHandler0,h=e):0!=(16777216&c)?(f=l._fulfillmentHandler0,h=t,l._unsetRejectionIsUnhandled()):(g=l._settlePromiseLateCancellationObserver,f=new _("late cancellation observer"),l._attachExtraTrace(f),h=t),v.invoke(g,l,{handler:null===d?h:"function"==typeof h&&p.domainBind(d,h),promise:s,receiver:r,value:f})}else l._addCallbacks(e,t,s,r,d);return s},o.prototype._length=function(){return 65535&this._bitField},o.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},o.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},o.prototype._setLength=function(e){this._bitField=-65536&this._bitField|65535&e},o.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},o.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},o.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},o.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},o.prototype._isFinal=function(){return(4194304&this._bitField)>0},o.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},o.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},o.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},o.prototype._setAsyncGuaranteed=function(){v.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},o.prototype._receiverAt=function(e){var t=0===e?this._receiver0:this[4*e-4+3];if(t!==f)return void 0===t&&this._isBound()?this._boundValue():t},o.prototype._promiseAt=function(e){return this[4*e-4+2]},o.prototype._fulfillmentHandlerAt=function(e){return this[4*e-4+0]},o.prototype._rejectionHandlerAt=function(e){return this[4*e-4+1]},o.prototype._boundValue=function(){},o.prototype._migrateCallback0=function(e){var t=(e._bitField,e._fulfillmentHandler0),n=e._rejectionHandler0,r=e._promise0,i=e._receiverAt(0);void 0===i&&(i=f),this._addCallbacks(t,n,r,i,null)},o.prototype._migrateCallbackAt=function(e,t){var n=e._fulfillmentHandlerAt(t),r=e._rejectionHandlerAt(t),i=e._promiseAt(t),o=e._receiverAt(t);void 0===o&&(o=f),this._addCallbacks(n,r,i,o,null)},o.prototype._addCallbacks=function(e,t,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof e&&(this._fulfillmentHandler0=null===i?e:p.domainBind(i,e)),"function"==typeof t&&(this._rejectionHandler0=null===i?t:p.domainBind(i,t));else{var a=4*o-4;this[a+2]=n,this[a+3]=r,"function"==typeof e&&(this[a+0]=null===i?e:p.domainBind(i,e)),"function"==typeof t&&(this[a+1]=null===i?t:p.domainBind(i,t))}return this._setLength(o+1),o},o.prototype._proxy=function(e,t){this._addCallbacks(void 0,void 0,t,e,null)},o.prototype._resolveCallback=function(e,t){if(0==(117506048&this._bitField)){if(e===this)return this._rejectCallback(c(),!1);var n=E(e,this);if(!(n instanceof o))return this._fulfill(e);t&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(c());var i=r._bitField;if(0==(50397184&i)){var a=this._length();a>0&&r._migrateCallback0(this);for(var s=1;s>>16)){if(e===this){var n=c();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=e,(65535&t)>0&&(0!=(134217728&t)?this._settlePromises():v.settlePromises(this))}},o.prototype._reject=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=e,this._isFinal())return v.fatalError(e,p.isNode);(65535&t)>0?v.settlePromises(this):this._ensurePossibleRejectionHandled()}},o.prototype._fulfillPromises=function(e,t){for(var n=1;n0){if(0!=(16842752&e)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,e),this._rejectPromises(t,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,e),this._fulfillPromises(t,r)}this._setLength(0)}this._clearCancellationData()},o.prototype._settledValue=function(){var e=this._bitField;return 0!=(33554432&e)?this._rejectionHandler0:0!=(16777216&e)?this._fulfillmentHandler0:void 0},o.defer=o.pending=function(){return k.deprecated("Promise.defer","new Promise"),{promise:new o(w),resolve:a,reject:s}},p.notEnumerableProp(o,"_makeSelfResolutionError",c),e("./method")(o,w,E,h,k),e("./bind")(o,w,E,k),e("./cancel")(o,S,h,k),e("./direct_resolve")(o),e("./synchronous_inspection")(o),e("./join")(o,S,E,w,v,u),o.Promise=o,o.version="3.5.1",e("./map.js")(o,S,h,E,w,k),e("./call_get.js")(o),e("./using.js")(o,h,E,F,w,k),e("./timers.js")(o,w,k),e("./generators.js")(o,h,w,E,r,k),e("./nodeify.js")(o),e("./promisify.js")(o,w),e("./props.js")(o,S,E,h),e("./race.js")(o,w,E,h),e("./reduce.js")(o,S,h,E,w,k),e("./settle.js")(o,S,k),e("./some.js")(o,S,h),e("./filter.js")(o,w),e("./each.js")(o,w),e("./any.js")(o),p.toFastProperties(o),p.toFastProperties(o.prototype),l({a:1}),l({b:2}),l({c:3}),l(1),l(function(){}),l(void 0),l(!1),l(new o(w)),k.setBounds(m.firstLineError,p.lastLineError),o}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(e,t,exports){"use strict";t.exports=function(t,n,r,i,o){function a(e){switch(e){case-2:return[];case-3:return{};case-6:return new Map}}function s(e){var r=this._promise=new t(n);e instanceof t&&r._propagateFrom(e,3),r._setOnCancel(this),this._values=e,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var l=e("./util");l.isArray;return l.inherits(s,o),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function e(n,o){var s=r(this._values,this._promise);if(s instanceof t){s=s._target();var u=s._bitField;if(this._values=s,0==(50397184&u))return this._promise._setAsyncGuaranteed(),s._then(e,this._reject,void 0,this,o);if(0==(33554432&u))return 0!=(16777216&u)?this._reject(s._reason()):this._cancel();s=s._value()}if(null===(s=l.asArray(s))){var c=i("expecting an array or an iterable object but got "+l.classString(s)).reason();return void this._promise._rejectCallback(c,!1)}if(0===s.length)return void(-5===o?this._resolveEmptyArray():this._resolve(a(o)));this._iterate(s)},s.prototype._iterate=function(e){var n=this.getActualLength(e.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,a=null,s=0;s=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(e){return this._totalResolved++,this._reject(e),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var n=0;n=this._length){var n;if(this._isMap)n=h(this._values);else{n={};for(var r=this.length(),i=0,o=this.length();i>1},t.prototype.props=function(){return a(this)},t.props=function(e){return a(e)}}},{"./es5":13,"./util":36}],26:[function(e,t,exports){"use strict";function n(e,t,n,r,i){for(var o=0;o=this._length&&(this._resolve(this._values),!0)},i.prototype._promiseFulfilled=function(e,t){var n=new o;return n._bitField=33554432,n._settledValueField=e,this._promiseResolved(t,n)},i.prototype._promiseRejected=function(e,t){var n=new o;return n._bitField=16777216,n._settledValueField=e,this._promiseResolved(t,n)},t.settle=function(e){return r.deprecated(".settle()",".reflect()"),new i(e).promise()},t.prototype.settle=function(){return t.settle(this)}}},{"./util":36}],31:[function(e,t,exports){"use strict";t.exports=function(t,n,r){function i(e){this.constructor$(e),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(e,t){if((0|t)!==t||t<0)return r("expecting a positive integer\n\n    See http://goo.gl/MqrFmX\n");var n=new i(e),o=n.promise();return n.setHowMany(t),n.init(),o}var a=e("./util"),s=e("./errors").RangeError,l=e("./errors").AggregateError,u=a.isArray,c={};a.inherits(i,n),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var e=u(this._values);!this._isResolved()&&e&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(e){this._howMany=e},i.prototype._promiseFulfilled=function(e){return this._addFulfilled(e),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},i.prototype._promiseRejected=function(e){return this._addRejected(e),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(c),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var e=new l,t=this.length();t0?this._reject(e):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(e){this._values.push(e)},i.prototype._addFulfilled=function(e){this._values[this._totalResolved++]=e},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(e){var t="Input array must contain at least "+this._howMany+" items but contains only "+e+" items";return new s(t)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(e,t){return o(e,t)},t.prototype.some=function(e){return o(this,e)},t._SomePromiseArray=i}},{"./errors":12,"./util":36}],32:[function(e,t,exports){"use strict";t.exports=function(e){function t(e){void 0!==e?(e=e._target(),this._bitField=e._bitField,this._settledValueField=e._isFateSealed()?e._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}t.prototype._settledValue=function(){return this._settledValueField};var n=t.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n    See http://goo.gl/MqrFmX\n");return this._settledValue()},r=t.prototype.error=t.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n    See http://goo.gl/MqrFmX\n");return this._settledValue()},i=t.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},o=t.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},a=t.prototype.isPending=function(){return 0==(50397184&this._bitField)},s=t.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};t.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},e.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},e.prototype._isCancelled=function(){return this._target().__isCancelled()},e.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},e.prototype.isPending=function(){return a.call(this._target())},e.prototype.isRejected=function(){return o.call(this._target())},e.prototype.isFulfilled=function(){return i.call(this._target())},e.prototype.isResolved=function(){return s.call(this._target())},e.prototype.value=function(){return n.call(this._target())},e.prototype.reason=function(){var e=this._target();return e._unsetRejectionIsUnhandled(),r.call(e)},e.prototype._value=function(){return this._settledValue()},e.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},e.PromiseInspection=t}},{}],33:[function(e,t,exports){"use strict";t.exports=function(t,n){function r(e,r){if(c(e)){if(e instanceof t)return e;var i=o(e);if(i===u){r&&r._pushContext();var l=t.reject(i.e);return r&&r._popContext(),l}if("function"==typeof i){if(a(e)){var l=new t(n);return e._then(l._fulfill,l._reject,void 0,l,null),l}return s(e,i,r)}}return e}function i(e){return e.then}function o(e){try{return i(e)}catch(e){return u.e=e,u}}function a(e){try{return d.call(e,"_promise0")}catch(e){return!1}}function s(e,r,i){function o(e){s&&(s._resolveCallback(e),s=null)}function a(e){s&&(s._rejectCallback(e,d,!0),s=null)}var s=new t(n),c=s;i&&i._pushContext(),s._captureStackTrace(),i&&i._popContext();var d=!0,h=l.tryCatch(r).call(e,o,a);return d=!1,s&&h===u&&(s._rejectCallback(h.e,!0,!0),s=null),c}var l=e("./util"),u=l.errorObj,c=l.isObject,d={}.hasOwnProperty;return r}},{"./util":36}],34:[function(e,t,exports){"use strict";t.exports=function(t,n,r){function i(e){this.handle=e}function o(e){return clearTimeout(this.handle),e}function a(e){throw clearTimeout(this.handle),e}var s=e("./util"),l=t.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var u=function(e){return c(+this).thenReturn(e)},c=t.delay=function(e,o){var a,s;return void 0!==o?(a=t.resolve(o)._then(u,null,null,e,void 0),r.cancellation()&&o instanceof t&&a._setOnCancel(o)):(a=new t(n),s=setTimeout(function(){a._fulfill()},+e),r.cancellation()&&a._setOnCancel(new i(s)),a._captureStackTrace()),a._setAsyncGuaranteed(),a};t.prototype.delay=function(e){return c(e,this)};var d=function(e,t,n){var r;r="string"!=typeof t?t instanceof Error?t:new l("operation timed out"):new l(t),s.markAsOriginatingFromRejection(r),e._attachExtraTrace(r),e._reject(r),null!=n&&n.cancel()};t.prototype.timeout=function(e,t){e=+e;var n,s,l=new i(setTimeout(function(){n.isPending()&&d(n,t,s)},e));return r.cancellation()?(s=this.then(),n=s._then(o,a,void 0,l,void 0),n._setOnCancel(l)):n=this._then(o,a,void 0,l,void 0),n}}},{"./util":36}],35:[function(e,t,exports){"use strict";t.exports=function(t,n,r,i,o,a){function s(e){setTimeout(function(){throw e},0)}function l(e){var t=r(e);return t!==e&&"function"==typeof e._isDisposable&&"function"==typeof e._getDisposer&&e._isDisposable()&&t._setDisposable(e._getDisposer()),t}function u(e,n){function i(){if(a>=u)return c._fulfill();var o=l(e[a++]);if(o instanceof t&&o._isDisposable()){try{o=r(o._getDisposer().tryDispose(n),e.promise)}catch(e){return s(e)}if(o instanceof t)return o._then(i,s,null,null,null)}i()}var a=0,u=e.length,c=new t(o);return i(),c}function c(e,t,n){this._data=e,this._promise=t,this._context=n}function d(e,t,n){this.constructor$(e,t,n)}function h(e){return c.isDisposer(e)?(this.resources[this.index]._setDisposable(e),e.promise()):e}function f(e){this.length=e,this.promise=null,this[e-1]=null}var p=e("./util"),g=e("./errors").TypeError,m=e("./util").inherits,v=p.errorObj,y=p.tryCatch,b={};c.prototype.data=function(){return this._data},c.prototype.promise=function(){return this._promise},c.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():b},c.prototype.tryDispose=function(e){var t=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=t!==b?this.doDispose(t,e):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},c.isDisposer=function(e){return null!=e&&"function"==typeof e.resource&&"function"==typeof e.tryDispose},m(d,c),d.prototype.doDispose=function(e,t){return this.data().call(e,e,t)},f.prototype._resultCancelled=function(){for(var e=this.length,n=0;n0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},t.prototype.disposer=function(e){if("function"==typeof e)return new d(e,this,i());throw new g}}},{"./errors":12,"./util":36}],36:[function(e,r,exports){"use strict";function i(){try{var e=T;return T=null,e.apply(this,arguments)}catch(e){return D.e=e,D}}function o(e){return T=e,i}function a(e){return null==e||!0===e||!1===e||"string"==typeof e||"number"==typeof e}function s(e){return"function"==typeof e||"object"==typeof e&&null!==e}function l(e){return a(e)?new Error(v(e)):e}function u(e,t){var n,r=e.length,i=new Array(r+1);for(n=0;n1,r=t.length>0&&!(1===t.length&&"constructor"===t[0]),i=L.test(e+"")&&F.names(e).length>0;if(n||r||i)return!0}return!1}catch(e){return!1}}function p(e){function t(){}t.prototype=e;for(var n=8;n--;)new t;return e}function g(e){return P.test(e)}function m(e,t,n){for(var r=new Array(e),i=0;i10||e[0]>0}(),H.isNode&&H.toFastProperties(t);try{throw new Error}catch(e){H.lastLineError=e}r.exports=H},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(exports,t(277),t(21),t(127).setImmediate)},function(e,exports,t){e.exports=t(8)(81)},function(e,exports,t){var n,r;!function(i,o){n=[t(31)],void 0!==(r=function(e){return i.Rickshaw=o(e)}.apply(exports,n))&&(e.exports=r)}(this,function(e){var t={version:"1.6.3",namespace:function(e,n){for(var r=e.split("."),i=t,o=1,a=r.length;o0){var t=e.data[0].x,n=e.data[0].y;if("number"!=typeof t||"number"!=typeof n&&null!==n)throw"x and y properties of points should be numbers instead of "+typeof t+" and "+typeof n}if(e.data.length>=3&&(e.data[2].xthis.window.xMax&&(t=!1),t}return!0},this.onUpdate=function(e){this.updateCallbacks.push(e)},this.onConfigure=function(e){this.configureCallbacks.push(e)},this.registerRenderer=function(e){this._renderers=this._renderers||{},this._renderers[e.name]=e},this.configure=function(e){this.config=this.config||{},(e.width||e.height)&&this.setSize(e),t.keys(this.defaults).forEach(function(t){this.config[t]=t in e?e[t]:t in this?this[t]:this.defaults[t]},this),t.keys(this.config).forEach(function(e){this[e]=this.config[e]},this),"stack"in e&&(e.unstack=!e.stack);var n=e.renderer||this.renderer&&this.renderer.name||"stack";this.setRenderer(n,e),this.configureCallbacks.forEach(function(t){t(e)})},this.setRenderer=function(e,t){if("function"==typeof e)this.renderer=new e({graph:r}),this.registerRenderer(this.renderer);else{if(!this._renderers[e])throw"couldn't find renderer "+e;this.renderer=this._renderers[e]}"object"==typeof t&&this.renderer.configure(t)},this.setSize=function(e){if(e=e||{},"undefined"!=typeof window)var t=window.getComputedStyle(this.element,null),n=parseInt(t.getPropertyValue("width"),10),r=parseInt(t.getPropertyValue("height"),10);this.width=e.width||n||400,this.height=e.height||r||250,this.vis&&this.vis.attr("width",this.width).attr("height",this.height)},this.initialize(n)},t.namespace("Rickshaw.Fixtures.Color"),t.Fixtures.Color=function(){this.schemes={},this.schemes.spectrum14=["#ecb796","#dc8f70","#b2a470","#92875a","#716c49","#d2ed82","#bbe468","#a1d05d","#e7cbe6","#d8aad6","#a888c2","#9dc2d3","#649eb9","#387aa3"].reverse(),this.schemes.spectrum2000=["#57306f","#514c76","#646583","#738394","#6b9c7d","#84b665","#a7ca50","#bfe746","#e2f528","#fff726","#ecdd00","#d4b11d","#de8800","#de4800","#c91515","#9a0000","#7b0429","#580839","#31082b"],this.schemes.spectrum2001=["#2f243f","#3c2c55","#4a3768","#565270","#6b6b7c","#72957f","#86ad6e","#a1bc5e","#b8d954","#d3e04e","#ccad2a","#cc8412","#c1521d","#ad3821","#8a1010","#681717","#531e1e","#3d1818","#320a1b"],this.schemes.classic9=["#423d4f","#4a6860","#848f39","#a2b73c","#ddcb53","#c5a32f","#7d5836","#963b20","#7c2626","#491d37","#2f254a"].reverse(),this.schemes.httpStatus={503:"#ea5029",502:"#d23f14",500:"#bf3613",410:"#efacea",409:"#e291dc",403:"#f457e8",408:"#e121d2",401:"#b92dae",405:"#f47ceb",404:"#a82a9f",400:"#b263c6",301:"#6fa024",302:"#87c32b",307:"#a0d84c",304:"#28b55c",200:"#1a4f74",206:"#27839f",201:"#52adc9",202:"#7c979f",203:"#a5b8bd",204:"#c1cdd1"},this.schemes.colorwheel=["#b5b6a9","#858772","#785f43","#96557e","#4682b4","#65b9ac","#73c03a","#cb513a"].reverse(),this.schemes.cool=["#5e9d2f","#73c03a","#4682b4","#7bc3b8","#a9884e","#c1b266","#a47493","#c09fb5"],this.schemes.munin=["#00cc00","#0066b3","#ff8000","#ffcc00","#330099","#990099","#ccff00","#ff0000","#808080","#008f00","#00487d","#b35a00","#b38f00","#6b006b","#8fb300","#b30000","#bebebe","#80ff80","#80c9ff","#ffc080","#ffe680","#aa80ff","#ee00cc","#ff8080","#666600","#ffbfff","#00ffcc","#cc6699","#999900"]},t.namespace("Rickshaw.Fixtures.RandomData"),t.Fixtures.RandomData=function(e){e=e||1;var t=200,n=Math.floor((new Date).getTime()/1e3);this.addData=function(r){var i=100*Math.random()+15+t,o=r[0].length,a=1;r.forEach(function(t){var r=20*Math.random(),s=i/25+a+++15*(Math.cos(o*a*11/960)+2)+7*(Math.cos(o/7)+2)+1*(Math.cos(o/17)+2);t.push({x:o*e+n,y:s+r})}),t=.85*i},this.removeData=function(t){t.forEach(function(e){e.shift()}),n+=e}},t.namespace("Rickshaw.Fixtures.Time"),t.Fixtures.Time=function(){var t=this;this.months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],this.units=[{name:"decade",seconds:315576e3,formatter:function(e){return 10*parseInt(e.getUTCFullYear()/10,10)}},{name:"year",seconds:31557600,formatter:function(e){return e.getUTCFullYear()}},{name:"month",seconds:2635200,formatter:function(e){return t.months[e.getUTCMonth()]}},{name:"week",seconds:604800,formatter:function(e){return t.formatDate(e)}},{name:"day",seconds:86400,formatter:function(e){return e.getUTCDate()}},{name:"6 hour",seconds:21600,formatter:function(e){return t.formatTime(e)}},{name:"hour",seconds:3600,formatter:function(e){return t.formatTime(e)}},{name:"15 minute",seconds:900,formatter:function(e){return t.formatTime(e)}},{name:"minute",seconds:60,formatter:function(e){return e.getUTCMinutes()+"m"}},{name:"15 second",seconds:15,formatter:function(e){return e.getUTCSeconds()+"s"}},{name:"second",seconds:1,formatter:function(e){return e.getUTCSeconds()+"s"}},{name:"decisecond",seconds:.1,formatter:function(e){return e.getUTCMilliseconds()+"ms"}},{name:"centisecond",seconds:.01,formatter:function(e){return e.getUTCMilliseconds()+"ms"}}],this.unit=function(e){return this.units.filter(function(t){return e==t.name}).shift()},this.formatDate=function(t){return e.time.format("%b %e")(t)},this.formatTime=function(e){return e.toUTCString().match(/(\d+:\d+):/)[1]},this.ceil=function(e,t){var n,r;if("month"==t.name){if(n=new Date(1e3*e),Date.UTC(n.getUTCFullYear(),n.getUTCMonth())/1e3==e)return e;r=n.getUTCFullYear();var i=n.getUTCMonth();return 11==i?(i=0,r+=1):i+=1,Date.UTC(r,i)/1e3}return"year"==t.name?(n=new Date(1e3*e),Date.UTC(n.getUTCFullYear(),0)/1e3==e?e:(r=n.getUTCFullYear()+1,Date.UTC(r,0)/1e3)):Math.ceil(e/t.seconds)*t.seconds}},t.namespace("Rickshaw.Fixtures.Time.Local"),t.Fixtures.Time.Local=function(){var t=this;this.months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],this.units=[{name:"decade",seconds:315576e3,formatter:function(e){return 10*parseInt(e.getFullYear()/10,10)}},{name:"year",seconds:31557600,formatter:function(e){return e.getFullYear()}},{name:"month",seconds:2635200,formatter:function(e){return t.months[e.getMonth()]}},{name:"week",seconds:604800,formatter:function(e){return t.formatDate(e)}},{name:"day",seconds:86400,formatter:function(e){return e.getDate()}},{name:"6 hour",seconds:21600,formatter:function(e){return t.formatTime(e)}},{name:"hour",seconds:3600,formatter:function(e){return t.formatTime(e)}},{name:"15 minute",seconds:900,formatter:function(e){return t.formatTime(e)}},{name:"minute",seconds:60,formatter:function(e){return e.getMinutes()}},{name:"15 second",seconds:15,formatter:function(e){return e.getSeconds()+"s"}},{name:"second",seconds:1,formatter:function(e){return e.getSeconds()+"s"}},{name:"decisecond",seconds:.1,formatter:function(e){return e.getMilliseconds()+"ms"}},{name:"centisecond",seconds:.01,formatter:function(e){return e.getMilliseconds()+"ms"}}],this.unit=function(e){return this.units.filter(function(t){return e==t.name}).shift()},this.formatDate=function(t){return e.time.format("%b %e")(t)},this.formatTime=function(e){return e.toString().match(/(\d+:\d+):/)[1]},this.ceil=function(e,t){var n,r,i;if("day"==t.name){var o=new Date(1e3*(e+t.seconds-1)),a=new Date(0);return a.setFullYear(o.getFullYear()),a.setMonth(o.getMonth()),a.setDate(o.getDate()),a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(0),a.getTime()/1e3}if("month"==t.name){if(n=new Date(1e3*e),new Date(n.getFullYear(),n.getMonth()).getTime()/1e3==e)return e;r=n.getFullYear();var s=n.getMonth();return 11==s?(s=0,r+=1):s+=1,new Date(r,s).getTime()/1e3}return"year"==t.name?(n=new Date(1e3*e),new Date(n.getUTCFullYear(),0).getTime()/1e3==e?e:(r=n.getFullYear()+1,new Date(r,0).getTime()/1e3)):(i=60*new Date(1e3*e).getTimezoneOffset(),Math.ceil((e-i)/t.seconds)*t.seconds+i)}},t.namespace("Rickshaw.Fixtures.Number"),t.Fixtures.Number.formatKMBT=function(e){var t=Math.abs(e);return t>=1e12?e/1e12+"T":t>=1e9?e/1e9+"B":t>=1e6?e/1e6+"M":t>=1e3?e/1e3+"K":t<1&&t>0?e.toFixed(2):0===t?"":e},t.Fixtures.Number.formatBase1024KMGTP=function(e){var t=Math.abs(e);return t>=0x4000000000000?e/0x4000000000000+"P":t>=1099511627776?e/1099511627776+"T":t>=1073741824?e/1073741824+"G":t>=1048576?e/1048576+"M":t>=1024?e/1024+"K":t<1&&t>0?e.toFixed(2):0===t?"":e},t.namespace("Rickshaw.Color.Palette"),t.Color.Palette=function(n){var r=new t.Fixtures.Color;if(n=n||{},this.schemes={},this.scheme=r.schemes[n.scheme]||n.scheme||r.schemes.colorwheel,this.runningIndex=0,this.generatorIndex=0,n.interpolatedStopCount){var i,o,a=this.scheme.length-1,s=[];for(i=0;in.graph.x.range()[1])return t.element&&(t.line.classList.add("offscreen"),t.element.style.display="none"),void t.boxes.forEach(function(e){e.rangeElement&&e.rangeElement.classList.add("offscreen")});if(!t.element){var i=t.element=document.createElement("div");i.classList.add("annotation"),this.elements.timeline.appendChild(i),i.addEventListener("click",function(e){i.classList.toggle("active"),t.line.classList.toggle("active"),t.boxes.forEach(function(e){e.rangeElement&&e.rangeElement.classList.toggle("active")})},!1)}t.element.style.left=r+"px",t.element.style.display="block",t.boxes.forEach(function(e){var i=e.element;if(i||(i=e.element=document.createElement("div"),i.classList.add("content"),i.innerHTML=e.content,t.element.appendChild(i),t.line=document.createElement("div"),t.line.classList.add("annotation_line"),n.graph.element.appendChild(t.line),e.end&&(e.rangeElement=document.createElement("div"),e.rangeElement.classList.add("annotation_range"),n.graph.element.appendChild(e.rangeElement))),e.end){var o=r,a=Math.min(n.graph.x(e.end),n.graph.x.range()[1]);o>a&&(a=r,o=Math.max(n.graph.x(e.end),n.graph.x.range()[0]));var s=a-o;e.rangeElement.style.left=o+"px",e.rangeElement.style.width=s+"px",e.rangeElement.classList.remove("offscreen")}t.line.classList.remove("offscreen"),t.line.style.left=r+"px"})},this)},this.graph.onUpdate(function(){n.update()})},t.namespace("Rickshaw.Graph.Axis.Time"),t.Graph.Axis.Time=function(e){var n=this;this.graph=e.graph,this.elements=[],this.ticksTreatment=e.ticksTreatment||"plain",this.fixedTimeUnit=e.timeUnit;var r=e.timeFixture||new t.Fixtures.Time;this.appropriateTimeUnit=function(){var e,t=r.units,n=this.graph.x.domain(),i=n[1]-n[0];return t.forEach(function(t){Math.floor(i/t.seconds)>=2&&(e=e||t)}),e||r.units[r.units.length-1]},this.tickOffsets=function(){for(var e=this.graph.x.domain(),t=this.fixedTimeUnit||this.appropriateTimeUnit(),n=Math.ceil((e[1]-e[0])/t.seconds),i=e[0],o=[],a=0;an.graph.x.range()[1])){var t=document.createElement("div");t.style.left=n.graph.x(e.value)+"px",t.classList.add("x_tick"),t.classList.add(n.ticksTreatment);var r=document.createElement("div");r.classList.add("title"),r.innerHTML=e.unit.formatter(new Date(1e3*e.value)),t.appendChild(r),n.graph.element.appendChild(t),n.elements.push(t)}})},this.graph.onUpdate(function(){n.render()})},t.namespace("Rickshaw.Graph.Axis.X"),t.Graph.Axis.X=function(t){var n=this;this.initialize=function(t){this.graph=t.graph,this.orientation=t.orientation||"top",this.pixelsPerTick=t.pixelsPerTick||75,t.ticks&&(this.staticTicks=t.ticks),t.tickValues&&(this.tickValues=t.tickValues),this.tickSize=t.tickSize||4,this.ticksTreatment=t.ticksTreatment||"plain",t.element?(this.element=t.element,this._discoverSize(t.element,t),this.vis=e.select(t.element).append("svg:svg").attr("height",this.height).attr("width",this.width).attr("class","rickshaw_graph x_axis_d3"),this.element=this.vis[0][0],this.element.style.position="relative",this.setSize({width:t.width,height:t.height})):this.vis=this.graph.vis,this.graph.onUpdate(function(){n.render()})},this.setSize=function(e){if(e=e||{},this.element){this._discoverSize(this.element.parentNode,e),this.vis.attr("height",this.height).attr("width",1.1*this.width);var t=Math.floor(.1*this.width/2);this.element.style.left=-1*t+"px"}},this.render=function(){void 0!==this._renderWidth&&this.graph.width!==this._renderWidth&&this.setSize({auto:!0});var n=e.svg.axis().scale(this.graph.x).orient(this.orientation);n.tickFormat(t.tickFormat||function(e){return e}),this.tickValues&&n.tickValues(this.tickValues),this.ticks=this.staticTicks||Math.floor(this.graph.width/this.pixelsPerTick);var r,i=Math.floor(.1*this.width/2)||0,o="bar"==this.graph.renderer.name&&Math.ceil(.95*this.graph.width/this.graph.series[0].data.length/2)||0;if("top"==this.orientation){r="translate("+(i+o)+","+(this.height||this.graph.height)+")"}else r="translate("+(i+o)+", 0)";this.element&&this.vis.selectAll("*").remove(),this.vis.append("svg:g").attr("class",["x_ticks_d3",this.ticksTreatment].join(" ")).attr("transform",r).call(n.ticks(this.ticks).tickSubdivide(0).tickSize(this.tickSize));var a=("bottom"==this.orientation?1:-1)*this.graph.height;this.graph.vis.append("svg:g").attr("class","x_grid_d3").call(n.ticks(this.ticks).tickSubdivide(0).tickSize(a)).selectAll("text").each(function(){this.parentNode.setAttribute("data-x-value",this.textContent)}),this._renderHeight=this.graph.height},this._discoverSize=function(e,t){if("undefined"!=typeof window){var n=window.getComputedStyle(e,null),r=parseInt(n.getPropertyValue("height"),10);if(!t.auto)var i=parseInt(n.getPropertyValue("width"),10)}this.width=1.1*(t.width||i||this.graph.width),this.height=t.height||r||40},this.initialize(t)},t.namespace("Rickshaw.Graph.Axis.Y"),t.Graph.Axis.Y=t.Class.create({initialize:function(t){this.graph=t.graph,this.orientation=t.orientation||"right",this.pixelsPerTick=t.pixelsPerTick||75,t.ticks&&(this.staticTicks=t.ticks),t.tickValues&&(this.tickValues=t.tickValues),this.tickSize=t.tickSize||4,this.ticksTreatment=t.ticksTreatment||"plain",this.tickFormat=t.tickFormat||function(e){return e},this.berthRate=.1,t.element?(this.element=t.element,this.vis=e.select(t.element).append("svg:svg").attr("class","rickshaw_graph y_axis"),this.element=this.vis[0][0],this.element.style.position="relative",this.setSize({width:t.width,height:t.height})):this.vis=this.graph.vis;var n=this;this.graph.onUpdate(function(){n.render()})},setSize:function(e){if(e=e||{},this.element){if("undefined"!=typeof window){var t=window.getComputedStyle(this.element.parentNode,null),n=parseInt(t.getPropertyValue("width"),10);if(!e.auto)var r=parseInt(t.getPropertyValue("height"),10)}this.width=e.width||n||this.graph.width*this.berthRate,this.height=e.height||r||this.graph.height,this.vis.attr("width",this.width).attr("height",this.height*(1+this.berthRate));var i=this.height*this.berthRate;"left"==this.orientation&&(this.element.style.top=-1*i+"px")}},render:function(){void 0!==this._renderHeight&&this.graph.height!==this._renderHeight&&this.setSize({auto:!0}),this.ticks=this.staticTicks||Math.floor(this.graph.height/this.pixelsPerTick);var e=this._drawAxis(this.graph.y);this._drawGrid(e),this._renderHeight=this.graph.height},_drawAxis:function(t){var n=e.svg.axis().scale(t).orient(this.orientation);if(n.tickFormat(this.tickFormat),this.tickValues&&n.tickValues(this.tickValues),"left"==this.orientation)var r=this.height*this.berthRate,i="translate("+this.width+", "+r+")";return this.element&&this.vis.selectAll("*").remove(),this.vis.append("svg:g").attr("class",["y_ticks",this.ticksTreatment].join(" ")).attr("transform",i).call(n.ticks(this.ticks).tickSubdivide(0).tickSize(this.tickSize)),n},_drawGrid:function(e){var t=("right"==this.orientation?1:-1)*this.graph.width;this.graph.vis.append("svg:g").attr("class","y_grid").call(e.ticks(this.ticks).tickSubdivide(0).tickSize(t)).selectAll("text").each(function(){this.parentNode.setAttribute("data-y-value",this.textContent)})}}),t.namespace("Rickshaw.Graph.Axis.Y.Scaled"),t.Graph.Axis.Y.Scaled=t.Class.create(t.Graph.Axis.Y,{initialize:function($super,e){if(void 0===e.scale)throw new Error("Scaled requires scale");this.scale=e.scale,void 0===e.grid?this.grid=!0:this.grid=e.grid,$super(e)},_drawAxis:function($super,t){var n=this.scale.domain(),r=this.graph.renderer.domain().y,i=[Math.min.apply(Math,n),Math.max.apply(Math,n)],o=e.scale.linear().domain([0,1]).range(i),a=[o(r[0]),o(r[1])],s=e.scale.linear().domain(i).range(a);return $super(this.scale.copy().domain(n.map(s)).range(t.range()))},_drawGrid:function($super,e){this.grid&&$super(e)}}),t.namespace("Rickshaw.Graph.Behavior.Series.Highlight"),t.Graph.Behavior.Series.Highlight=function(t){this.graph=t.graph,this.legend=t.legend;var n=this,r={},i=null,o=t.disabledColor||function(t){return e.interpolateRgb(t,e.rgb("#d8d8d8"))(.8).toString()};this.addHighlightEvents=function(e){e.element.addEventListener("mouseover",function(t){i||(i=e,n.legend.lines.forEach(function(t){if(e!==t)r[t.series.name]=r[t.series.name]||t.series.color,t.series.color=o(t.series.color);else if(n.graph.renderer.unstack&&(!t.series.renderer||t.series.renderer.unstack)){var i=n.graph.series.indexOf(t.series);t.originalIndex=i;var a=n.graph.series.splice(i,1)[0];n.graph.series.push(a)}}),n.graph.update())},!1),e.element.addEventListener("mouseout",function(t){i&&(i=null,n.legend.lines.forEach(function(t){if(e===t&&t.hasOwnProperty("originalIndex")){var i=n.graph.series.pop();n.graph.series.splice(t.originalIndex,0,i),delete t.originalIndex}r[t.series.name]&&(t.series.color=r[t.series.name])}),n.graph.update())},!1)},this.legend&&this.legend.lines.forEach(function(e){n.addHighlightEvents(e)})},t.namespace("Rickshaw.Graph.Behavior.Series.Order"),t.Graph.Behavior.Series.Order=function(e){this.graph=e.graph,this.legend=e.legend;var t=this;if(void 0===window.jQuery)throw"couldn't find jQuery at window.jQuery";if(void 0===window.jQuery.ui)throw"couldn't find jQuery UI at window.jQuery.ui";jQuery(function(){jQuery(t.legend.list).sortable({containment:"parent",tolerance:"pointer",update:function(e,n){var r=[];jQuery(t.legend.list).find("li").each(function(e,t){t.series&&r.push(t.series)});for(var i=t.graph.series.length-1;i>=0;i--)t.graph.series[i]=r.shift();t.graph.update()}}),jQuery(t.legend.list).disableSelection()}),this.graph.onUpdate(function(){var e=window.getComputedStyle(t.legend.element).height;t.legend.element.style.height=e})},t.namespace("Rickshaw.Graph.Behavior.Series.Toggle"),t.Graph.Behavior.Series.Toggle=function(e){this.graph=e.graph,this.legend=e.legend;var t=this;this.addAnchor=function(e){var n=document.createElement("a");n.innerHTML="✔",n.classList.add("action"),e.element.insertBefore(n,e.element.firstChild),n.onclick=function(n){if(e.series.disabled)e.series.enable(),e.element.classList.remove("disabled");else{if(this.graph.series.filter(function(e){return!e.disabled}).length<=1)return;e.series.disable(),e.element.classList.add("disabled")}t.graph.update()}.bind(this),e.element.getElementsByTagName("span")[0].onclick=function(n){var r=e.series.disabled;if(!r)for(var i=0;il.svgWidth-1||t<1)){var n=[c.startPX,t].sort(o),r=n[1]-n[0];if(isNaN(r))return i(this);s.attr("fill",l.fill).attr("x",n[0]).attr("width",r)}}function r(){var r=e.select(this);s=r.append("rect").style("opacity",l.opacity).attr("y",0).attr("height","100%"),e.event.preventDefault?e.event.preventDefault():e.event.returnValue=!1,c.target=e.event.target,c.startDt=a(e.event),c.startPX=e.event.offsetX||e.event.layerX,r.on("mousemove",n),e.select(document).on("mouseup",t),e.select(document).on("keyup",function(){e.event.keyCode===u&&i(this)})}function i(t){e.select(t).on("mousemove",null),e.select(document).on("mouseup",null),c={},s.remove()}function o(e,t){return e-t}function a(e){return Math.floor(l.graph.x.invert(e.offsetX||e.layerX))}var s,l=this,u=27,c={startDt:null,stopDt:null,startPX:null,stopPX:null};this.svg.on("mousedown",r)}}),t.namespace("Rickshaw.Graph.HoverDetail"),t.Graph.HoverDetail=t.Class.create({initialize:function(e){var t=this.graph=e.graph;this.xFormatter=e.xFormatter||function(e){return new Date(1e3*e).toUTCString()},this.yFormatter=e.yFormatter||function(e){return null===e?e:e.toFixed(2)};var n=this.element=document.createElement("div");n.className="detail inactive",this.visible=!0,t.element.appendChild(n),this.lastEvent=null,this._addListeners(),this.onShow=e.onShow,this.onHide=e.onHide,this.onRender=e.onRender,this.formatter=e.formatter||this.formatter},formatter:function(e,t,n,r,i,o){return e.name+": "+i},update:function(t){if((t=t||this.lastEvent)&&(this.lastEvent=t,t.target.nodeName.match(/^(path|svg|rect|circle)$/))){var n,r=this.graph,i=t.layerX||t.offsetX,o=t.layerY||t.offsetY,a=0,s=[];if(this.graph.series.active().forEach(function(t){var l=this.graph.stackedData[a++];if(l.length){var u=r.x.invert(i),c=e.scale.linear().domain([l[0].x,l.slice(-1)[0].x]).range([0,l.length-1]),d=Math.round(c(u));d==l.length-1&&d--;for(var h=Math.min(d||0,l.length-1),f=d;fu){h=Math.abs(u-l[f].x)0){d.forEach(function(e){e.classList.remove("left"),e.classList.add("right")});this._calcLayoutError(d)>h&&d.forEach(function(e){e.classList.remove("right"),e.classList.add("left")})}"function"==typeof this.onRender&&this.onRender(e)}},_calcLayoutError:function(e){var t=this.element.parentNode.getBoundingClientRect(),n=0;e.forEach(function(e){var r=e.getBoundingClientRect();r.width&&(r.right>t.right&&(n+=r.right-t.right),r.left=u.previewWidth&&(i[0]-=i[1]-u.previewWidth,i[1]=u.previewWidth)),u.graphs.forEach(function(t){var n=e.scale.linear().interpolate(e.interpolateNumber).domain([0,u.previewWidth]).range(t.dataDomain()),r=[n(i[0]),n(i[1])];u.slideCallbacks.forEach(function(e){e(t,r[0],r[1])}),0===i[0]&&(r[0]=void 0),i[1]===u.previewWidth&&(r[1]=void 0),t.window.xMin=r[0],t.window.xMax=r[1],t.update()})}function n(){l.target=e.event.target,l.start=u._getClientXFromEvent(e.event,l),u.frameBeforeDrag=u.currentFrame.slice(),e.event.preventDefault?e.event.preventDefault():e.event.returnValue=!1,e.select(document).on("mousemove.rickshaw_range_slider_preview",t),e.select(document).on("mouseup.rickshaw_range_slider_preview",a),e.select(document).on("touchmove.rickshaw_range_slider_preview",t),e.select(document).on("touchend.rickshaw_range_slider_preview",a),e.select(document).on("touchcancel.rickshaw_range_slider_preview",a)}function r(e,t){l.left=!0,n()}function i(e,t){l.right=!0,n()}function o(e,t){l.left=!0,l.right=!0,l.rigid=!0,n()}function a(t,n){e.select(document).on("mousemove.rickshaw_range_slider_preview",null),e.select(document).on("mouseup.rickshaw_range_slider_preview",null),e.select(document).on("touchmove.rickshaw_range_slider_preview",null),e.select(document).on("touchend.rickshaw_range_slider_preview",null),e.select(document).on("touchcancel.rickshaw_range_slider_preview",null),delete u.frameBeforeDrag,l.left=!1,l.right=!1,l.rigid=!1}var s=e.select(this.element),l={target:null,start:null,stop:null,left:!1,right:!1,rigid:!1},u=this;s.select("rect.left_handle").on("mousedown",r),s.select("rect.right_handle").on("mousedown",i),s.select("rect.middle_handle").on("mousedown",o),s.select("rect.left_handle").on("touchstart",r),s.select("rect.right_handle").on("touchstart",i),s.select("rect.middle_handle").on("touchstart",o)},_getClientXFromEvent:function(e,t){switch(e.type){case"touchstart":case"touchmove":for(var n=e.changedTouches,r=null,i=0;io&&(o=t)}}),e.length&&(e[0].xr&&(r=e[e.length-1].x))}),n-=(r-n)*this.padding.left,r+=(r-n)*this.padding.right,i="auto"===this.graph.min?i:this.graph.min||0,o=void 0===this.graph.max?o:this.graph.max,("auto"===this.graph.min||i<0)&&(i-=(o-i)*this.padding.bottom),void 0===this.graph.max&&(o+=(o-i)*this.padding.top),{x:[n,r],y:[i,o]}},render:function(e){e=e||{};var t=this.graph,n=e.series||t.series,r=e.vis||t.vis;r.selectAll("*").remove();var i=n.filter(function(e){return!e.disabled}).map(function(e){return e.stack}),o=r.selectAll("path.path").data(i).enter().append("svg:path").classed("path",!0).attr("d",this.seriesPathFactory());if(this.stroke)var a=r.selectAll("path.stroke").data(i).enter().append("svg:path").classed("stroke",!0).attr("d",this.seriesStrokeFactory());var s=0;n.forEach(function(e){e.disabled||(e.path=o[0][s],this.stroke&&(e.stroke=a[0][s]),this._styleSeries(e),s++)},this)},_styleSeries:function(t){var n=this.fill?t.color:"none",r=this.stroke?t.color:"none",i=t.strokeWidth?t.strokeWidth:this.strokeWidth,o=t.opacity?t.opacity:this.opacity;t.path.setAttribute("fill",n),t.path.setAttribute("stroke",r),t.path.setAttribute("stroke-width",i),t.path.setAttribute("opacity",o),t.className&&e.select(t.path).classed(t.className,!0),t.className&&this.stroke&&e.select(t.stroke).classed(t.className,!0)},configure:function(e){e=e||{},t.keys(this.defaults()).forEach(function(n){if(!e.hasOwnProperty(n))return void(this[n]=this[n]||this.graph[n]||this.defaults()[n]);"object"==typeof this.defaults()[n]?t.keys(this.defaults()[n]).forEach(function(t){this[n][t]=void 0!==e[n][t]?e[n][t]:void 0!==this[n][t]?this[n][t]:this.defaults()[n][t]},this):this[n]=void 0!==e[n]?e[n]:void 0!==this[n]?this[n]:void 0!==this.graph[n]?this.graph[n]:this.defaults()[n]},this)},setStrokeWidth:function(e){void 0!==e&&(this.strokeWidth=e)},setTension:function(e){void 0!==e&&(this.tension=e)}}),t.namespace("Rickshaw.Graph.Renderer.Line"),t.Graph.Renderer.Line=t.Class.create(t.Graph.Renderer,{name:"line",defaults:function($super){return t.extend($super(),{unstack:!0,fill:!1,stroke:!0})},seriesPathFactory:function(){var t=this.graph,n=e.svg.line().x(function(e){return t.x(e.x)}).y(function(e){return t.y(e.y)}).interpolate(this.graph.interpolation).tension(this.tension);return n.defined&&n.defined(function(e){return null!==e.y}),n}}),t.namespace("Rickshaw.Graph.Renderer.Stack"),t.Graph.Renderer.Stack=t.Class.create(t.Graph.Renderer,{name:"stack",defaults:function($super){return t.extend($super(),{fill:!0,stroke:!1,unstack:!1})},seriesPathFactory:function(){var t=this.graph,n=e.svg.area().x(function(e){return t.x(e.x)}).y0(function(e){return t.y(e.y0)}).y1(function(e){return t.y(e.y+e.y0)}).interpolate(this.graph.interpolation).tension(this.tension);return n.defined&&n.defined(function(e){return null!==e.y}),n}}),t.namespace("Rickshaw.Graph.Renderer.Bar"),t.Graph.Renderer.Bar=t.Class.create(t.Graph.Renderer,{name:"bar",defaults:function($super){var e=t.extend($super(),{gapSize:.05,unstack:!1,opacity:1});return delete e.tension,e},initialize:function($super,e){e=e||{},this.gapSize=e.gapSize||this.gapSize,$super(e)},domain:function($super){var e=$super(),t=this._frequentInterval(this.graph.stackedData.slice(-1).shift());return e.x[1]+=Number(t.magnitude),e},barWidth:function(e){var t=this._frequentInterval(e.stack);return this.graph.x.magnitude(t.magnitude)*(1-this.gapSize)},render:function(e){e=e||{};var t=this.graph,n=e.series||t.series,r=e.vis||t.vis;r.selectAll("*").remove();var i=this.barWidth(n.active()[0]),o=0,a=n.filter(function(e){return!e.disabled}).length,s=this.unstack?i/a:i,l=function(e){return"matrix("+[1,0,0,e.y<0?-1:1,0,e.y<0?2*t.y.magnitude(Math.abs(e.y)):0].join(",")+")"};n.forEach(function(e){if(!e.disabled){var n=(this.barWidth(e),r.selectAll("path").data(e.stack.filter(function(e){return null!==e.y})).enter().append("svg:rect").attr("x",function(e){return t.x(e.x)+o}).attr("y",function(e){return t.y(e.y0+Math.abs(e.y))*(e.y<0?-1:1)}).attr("width",s).attr("height",function(e){return t.y.magnitude(Math.abs(e.y))}).attr("opacity",e.opacity).attr("transform",l));Array.prototype.forEach.call(n[0],function(t){t.setAttribute("fill",e.color)}),this.unstack&&(o+=s)}},this)},_frequentInterval:function(e){for(var n={},r=0;r0?this[0].data.forEach(function(t){e.data.push({x:t.x,y:0})}):0===e.data.length&&e.data.push({x:this.timeBase-(this.timeInterval||0),y:0}),this.push(e),this.legend&&this.legend.addLine(this.itemByName(e.name))},addData:function(e,n){var r=this.getIndex();t.keys(e).forEach(function(e){this.itemByName(e)||this.addItem({name:e})},this),this.forEach(function(t){t.data.push({x:n||(r*this.timeInterval||1)+this.timeBase,y:e[t.name]||0})},this)},getIndex:function(){return this[0]&&this[0].data&&this[0].data.length?this[0].data.length:0},itemByName:function(e){for(var t=0;t1;i--)this.currentSize+=1,this.currentIndex+=1,this.forEach(function(e){e.data.unshift({x:((i-1)*this.timeInterval||1)+this.timeBase,y:0,i:i})},this)},addData:function($super,e,t){if($super(e,t),this.currentSize+=1,this.currentIndex+=1,void 0!==this.maxDataPoints)for(;this.currentSize>this.maxDataPoints;)this.dropData()},dropData:function(){this.forEach(function(e){e.data.splice(0,1)}),this.currentSize-=1},getIndex:function(){return this.currentIndex}}),t})},function(e,exports,t){var n,r,i;/*!
 *  dc 2.0.5
 *  http://dc-js.github.io/dc.js/
 *  Copyright 2012-2016 Nick Zhu & the dc.js Developers
 *  https://github.com/dc-js/dc.js/blob/master/AUTHORS
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
!function(){function o(e,t){"use strict";var n={version:"2.0.5",constants:{CHART_CLASS:"dc-chart",DEBUG_GROUP_CLASS:"debug",STACK_CLASS:"stack",DESELECTED_CLASS:"deselected",SELECTED_CLASS:"selected",NODE_INDEX_NAME:"__index__",GROUP_INDEX_NAME:"__group_index__",DEFAULT_CHART_GROUP:"__default_chart_group__",EVENT_DELAY:40,NEGLIGIBLE_NUMBER:1e-10},_renderlet:null};n.chartRegistry=function(){function e(e){return e||(e=n.constants.DEFAULT_CHART_GROUP),t[e]||(t[e]=[]),e}var t={};return{has:function(e){for(var n in t)if(t[n].indexOf(e)>=0)return!0;return!1},register:function(n,r){r=e(r),t[r].push(n)},deregister:function(n,r){r=e(r);for(var i=0;i=0||void 0!==t)&&(o=o.duration(t)),(r>=0||void 0!==r)&&(o=o.delay(r)),o},n.optionalTransition=function(e,t,r,i){return e?function(e){return n.transition(e,t,r,i)}:function(e){return e}},n.afterTransition=function(e,t){if(e.empty()||!e.duration)t.call(e);else{var n=0;e.each(function(){++n}).each("end",function(){--n||t.call(e)})}},n.units={},n.units.integers=function(e,t){return Math.abs(t-e)},n.units.ordinal=function(e,t,n){return n},n.units.fp={},n.units.fp.precision=function(e){var t=function(e,r){var i=Math.abs((r-e)/t.resolution);return n.utils.isNegligible(i-Math.floor(i))?Math.floor(i):Math.ceil(i)};return t.resolution=e,t},n.round={},n.round.floor=function(e){return Math.floor(e)},n.round.ceil=function(e){return Math.ceil(e)},n.round.round=function(e){return Math.round(e)},n.override=function(e,t,n){var r=e[t];e["_"+t]=r,e[t]=n},n.renderlet=function(e){return arguments.length?(n._renderlet=e,n):n._renderlet},n.instanceOfChart=function(e){return e instanceof Object&&e.__dcFlag__&&!0},n.errors={},n.errors.Exception=function(e){var t=e||"Unexpected internal error";this.message=t,this.toString=function(){return t},this.stack=(new Error).stack},n.errors.Exception.prototype=Object.create(Error.prototype),n.errors.Exception.prototype.constructor=n.errors.Exception,n.errors.InvalidStateException=function(){n.errors.Exception.apply(this,arguments)},n.errors.InvalidStateException.prototype=Object.create(n.errors.Exception.prototype),n.errors.InvalidStateException.prototype.constructor=n.errors.InvalidStateException,n.errors.BadArgumentException=function(){n.errors.Exception.apply(this,arguments)},n.errors.BadArgumentException.prototype=Object.create(n.errors.Exception.prototype),n.errors.BadArgumentException.prototype.constructor=n.errors.BadArgumentException,n.dateFormat=e.time.format("%m/%d/%Y"),n.printers={},n.printers.filters=function(e){for(var t="",r=0;r0&&(t+=", "),t+=n.printers.filter(e[r]);return t},n.printers.filter=function(e){var t="";return void 0!==e&&null!==e&&(e instanceof Array?e.length>=2?t="["+n.utils.printSingleValue(e[0])+" -> "+n.utils.printSingleValue(e[1])+"]":e.length>=1&&(t=n.utils.printSingleValue(e[0])):t=n.utils.printSingleValue(e)),t},n.pluck=function(e,t){return t?function(n,r){return t.call(n,n[e],r)}:function(t){return t[e]}},n.utils={},n.utils.printSingleValue=function(e){var t=""+e;return e instanceof Date?t=n.dateFormat(e):"string"==typeof e?t=e:n.utils.isFloat(e)?t=n.utils.printSingleValue.fformat(e):n.utils.isInteger(e)&&(t=Math.round(e)),t},n.utils.printSingleValue.fformat=e.format(".2f"),n.utils.add=function(t,n,r){if("string"==typeof n&&(n=n.replace("%","")),t instanceof Date)return"string"==typeof n&&(n=+n),"millis"===r?new Date(t.getTime()+n):(r=r||"day",e.time[r].offset(t,n));if("string"==typeof n){var i=+n/100;return t>0?t*(1+i):t*(1-i)}return t+n},n.utils.subtract=function(t,n,r){if("string"==typeof n&&(n=n.replace("%","")),t instanceof Date)return"string"==typeof n&&(n=+n),"millis"===r?new Date(t.getTime()-n):(r=r||"day",e.time[r].offset(t,-n));if("string"==typeof n){var i=+n/100;return t<0?t*(1+i):t*(1-i)}return t-n},n.utils.isNumber=function(e){return e===+e},n.utils.isFloat=function(e){return e===+e&&e!==(0|e)},n.utils.isInteger=function(e){return e===+e&&e===(0|e)},n.utils.isNegligible=function(e){return!n.utils.isNumber(e)||e-n.constants.NEGLIGIBLE_NUMBER},n.utils.clamp=function(e,t,n){return en?n:e};var r=0;return n.utils.uniqueId=function(){return++r},n.utils.nameToId=function(e){return e.toLowerCase().replace(/[\s]/g,"_").replace(/[\.']/g,"")},n.utils.appendOrSelect=function(e,t,n){n=n||t;var r=e.select(t);return r.empty()&&(r=e.append(n)),r},n.utils.safeNumber=function(e){return n.utils.isNumber(+e)?+e:0},n.logger={},n.logger.enableDebugLog=!1,n.logger.warn=function(e){return console&&(console.warn?console.warn(e):console.log&&console.log(e)),n.logger},n.logger.debug=function(e){return n.logger.enableDebugLog&&console&&(console.debug?console.debug(e):console.log&&console.log(e)),n.logger},n.logger.deprecate=function(e,t){function r(){return i||(n.logger.warn(t),i=!0),e.apply(this,arguments)}var i=!1;return r},n.events={current:null},n.events.trigger=function(e,t){if(!t)return void e();n.events.current=e,setTimeout(function(){e===n.events.current&&e()},t)},n.filters={},n.filters.RangedFilter=function(e,t){var n=new Array(e,t);return n.isFiltered=function(e){return e>=this[0]&&e=t[0][0]&&n=t[0][1]&&rb?t:b},w=_,C=200,A=function(e){var t=e&&e.getBoundingClientRect&&e.getBoundingClientRect().height;return t&&t>C?t:C},E=A,S=n.pluck("key"),x=n.pluck("value"),F=n.pluck("key"),k=n.pluck("key"),D=!1,T=function(e){return r.keyAccessor()(e)+": "+r.valueAccessor()(e)},M=!0,R=!1,O=750,L=0,P=n.printers.filters,B=["dimension","group"],I=n.constants.DEFAULT_CHART_GROUP,N=e.dispatch("preRender","postRender","preRedraw","postRedraw","filtered","zoomed","renderlet","pretransition"),j=[],z=function(e,t){return 0===t.length?e.filter(null):1!==t.length||t[0].isFiltered?1===t.length&&"RangedFilter"===t[0].filterType?e.filterRange(t[0]):e.filterFunction(function(e){for(var n=0;n=e)return!0}return!1}):e.filterExact(t[0]),t},H=function(e){return e.all()};r.height=function(t){return arguments.length?(E=e.functor(t||A),g=void 0,r):(n.utils.isNumber(g)||(g=E(d.node())),g)},r.width=function(t){return arguments.length?(w=e.functor(t||_),p=void 0,r):(n.utils.isNumber(p)||(p=w(d.node())),p)},r.minWidth=function(e){return arguments.length?(b=e,r):b},r.minHeight=function(e){return arguments.length?(C=e,r):C},r.dimension=function(e){return arguments.length?(l=e,r.expireCache(),r):l},r.data=function(t){return arguments.length?(H=e.functor(t),r.expireCache(),r):H.call(r,u)},r.group=function(e,t){return arguments.length?(u=e,r._groupName=t,r.expireCache(),r):u},r.ordering=function(e){return arguments.length?(k=e,m=t.quicksort.by(k),r.expireCache(),r):k},r._computeOrderedGroups=function(e){var n=e.slice(0);return n.length<=1?n:(m||(m=t.quicksort.by(k)),m(n,0,n.length))},r.filterAll=function(){return r.filter(null)},r.select=function(e){return d.select(e)},r.selectAll=function(e){return d?d.selectAll(e):null},r.anchor=function(t,i){if(!arguments.length)return c;if(n.instanceOfChart(t))c=t.anchor(),d=t.root(),f=!0;else{if(!t)throw new n.errors.BadArgumentException("parent must be defined");c=t.select&&t.classed?t.node():t,d=e.select(c),d.classed(n.constants.CHART_CLASS,!0),n.registerChart(r,i),f=!1}return I=i,r},r.anchorName=function(){var e=r.anchor();return e&&e.id?e.id:e&&e.replace?e.replace("#",""):"dc-chart"+r.chartID()},r.root=function(e){return arguments.length?(d=e,r):d},r.svg=function(e){return arguments.length?(h=e,r):h},r.resetSvg=function(){return r.select("svg").remove(),o()},r.filterPrinter=function(e){return arguments.length?(P=e,r):P},r.controlsUseVisibility=function(e){return arguments.length?(R=e,r):R},r.turnOnControls=function(){if(d){var e=r.controlsUseVisibility()?"visibility":"display";r.selectAll(".reset").style(e,null),r.selectAll(".filter").text(P(r.filters())).style(e,null)}return r},r.turnOffControls=function(){if(d){var e=r.controlsUseVisibility()?"visibility":"display",t=r.controlsUseVisibility()?"hidden":"none";r.selectAll(".reset").style(e,t),r.selectAll(".filter").style(e,t).text(r.filter())}return r},r.transitionDuration=function(e){return arguments.length?(O=e,r):O},r.transitionDelay=function(e){return arguments.length?(L=e,r):L},r._mandatoryAttributes=function(e){return arguments.length?(B=e,r):B},r.render=function(){g=p=void 0,N.preRender(r),B&&B.forEach(a);var e=r._doRender();return v&&v.render(),r._activateRenderlets("postRender"),e},r._activateRenderlets=function(e){N.pretransition(r),r.transitionDuration()>0&&h?h.transition().duration(r.transitionDuration()).delay(r.transitionDelay()).each("end",function(){N.renderlet(r),e&&N[e](r)}):(N.renderlet(r),e&&N[e](r))},r.redraw=function(){i(),N.preRedraw(r);var e=r._doRedraw();return v&&v.render(),r._activateRenderlets("postRedraw"),e},r.commitHandler=function(e){return arguments.length?(y=e,r):y},r.redrawGroup=function(){return y?y(!1,function(e,t){e?console.log(e):n.redrawAll(r.chartGroup())}):n.redrawAll(r.chartGroup()),r},r.renderGroup=function(){return y?y(!1,function(e,t){e?console.log(e):n.renderAll(r.chartGroup())}):n.renderAll(r.chartGroup()),r},r._invokeFilteredListener=function(e){void 0!==e&&N.filtered(r,e)},r._invokeZoomedListener=function(){N.zoomed(r)};var U=function(e,t){return null===t||void 0===t?e.length>0:e.some(function(e){return t<=e&&t>=e})};r.hasFilterHandler=function(e){return arguments.length?(U=e,r):U},r.hasFilter=function(e){return U(j,e)};var V=function(e,t){for(var n=0;n=t){e.splice(n,1);break}return e};r.removeFilterHandler=function(e){return arguments.length?(V=e,r):V};var G=function(e,t){return e.push(t),e};r.addFilterHandler=function(e){return arguments.length?(G=e,r):G};var W=function(e){return[]};return r.resetFilterHandler=function(e){return arguments.length?(W=e,r):W},r.replaceFilter=function(e){return j=W(j),r.filter(e),r},r.filter=function(e){return arguments.length?(e instanceof Array&&e[0]instanceof Array&&!e.isFiltered?e[0].forEach(function(e){r.hasFilter(e)?V(j,e):G(j,e)}):null===e?j=W(j):r.hasFilter(e)?V(j,e):G(j,e),s(),r._invokeFilteredListener(e),null!==d&&r.hasFilter()?r.turnOnControls():r.turnOffControls(),r):j.length>0?j[0]:null},r.filters=function(){return j},r.highlightSelected=function(t){e.select(t).classed(n.constants.SELECTED_CLASS,!0),e.select(t).classed(n.constants.DESELECTED_CLASS,!1)},r.fadeDeselected=function(t){e.select(t).classed(n.constants.SELECTED_CLASS,!1),e.select(t).classed(n.constants.DESELECTED_CLASS,!0)},r.resetHighlight=function(t){e.select(t).classed(n.constants.SELECTED_CLASS,!1),e.select(t).classed(n.constants.DESELECTED_CLASS,!1)},r.onClick=function(e){var t=r.keyAccessor()(e);n.events.trigger(function(){r.filter(t),r.redrawGroup()})},r.filterHandler=function(e){return arguments.length?(z=e,r):z},r._doRender=function(){return r},r._doRedraw=function(){return r},r.legendables=function(){return[]},r.legendHighlight=function(){},r.legendReset=function(){},r.legendToggle=function(){},r.isLegendableHidden=function(){return!1},r.keyAccessor=function(e){return arguments.length?(S=e,r):S},r.valueAccessor=function(e){return arguments.length?(x=e,r):x},r.label=function(e,t){return arguments.length?(F=e,(void 0===t||t)&&(D=!0),r):F},r.renderLabel=function(e){return arguments.length?(D=e,r):D},r.title=function(e){return arguments.length?(T=e,r):T},r.renderTitle=function(e){return arguments.length?(M=e,r):M},r.renderlet=n.logger.deprecate(function(e){return r.on("renderlet."+n.utils.uniqueId(),e),r},'chart.renderlet has been deprecated.  Please use chart.on("renderlet.", renderletFunction)'),r.chartGroup=function(e){return arguments.length?(f||n.deregisterChart(r,I),I=e,f||n.registerChart(r,I),r):I},r.expireCache=function(){return r},r.legend=function(e){return arguments.length?(v=e,v.parent(r),r):v},r.chartID=function(){return r.__dcFlag__},r.options=function(e){var t=["anchor","group","xAxisLabel","yAxisLabel","stack","title","point","getColor","overlayGeoJson"];for(var i in e)"function"==typeof r[i]?e[i]instanceof Array&&-1!==t.indexOf(i)?r[i].apply(r,e[i]):r[i].call(r,e[i]):n.logger.debug("Not a valid option setter name: "+i);return r},r.on=function(e,t){return N.on(e,t),r},r},n.marginMixin=function(e){var t={top:10,right:50,bottom:30,left:30};return e.margins=function(n){return arguments.length?(t=n,e):t},e.effectiveWidth=function(){return e.width()-e.margins().left-e.margins().right},e.effectiveHeight=function(){return e.height()-e.margins().top-e.margins().bottom},e},n.colorMixin=function(t){var r=e.scale.category20c(),i=!0,o=function(e){return t.keyAccessor()(e)};return t.colors=function(n){return arguments.length?(r=n instanceof Array?e.scale.quantize().range(n):e.functor(n),t):r},t.ordinalColors=function(n){return t.colors(e.scale.ordinal().range(n))},t.linearColors=function(n){return t.colors(e.scale.linear().range(n).interpolate(e.interpolateHcl))},t.colorAccessor=function(e){return arguments.length?(o=e,i=!1,t):o},t.defaultColorAccessor=function(){return i},t.colorDomain=function(e){return arguments.length?(r.domain(e),t):r.domain()},t.calculateColorDomain=function(){var n=[e.min(t.data(),t.colorAccessor()),e.max(t.data(),t.colorAccessor())];return r.domain(n),t},t.getColor=function(e,t){return r(o.call(this,e,t))},t.colorCalculator=n.logger.deprecate(function(e){return arguments.length?(t.getColor=e,t):t.getColor},"colorMixin.colorCalculator has been deprecated. Please colorMixin.colors and colorMixin.colorAccessor instead"),t},n.coordinateGridMixin=function(t){function r(e,t){return!e||!t||e.length!==t.length||e.some(function(e,n){return e&&t[n]?e.toString()!==t[n].toString():e===t[n]})}function i(e,n){t.isOrdinal()?(t.elasticX()||0===w.domain().length)&&w.domain(t._ordinalXDomain()):t.elasticX()&&w.domain([t.xAxisMin(),t.xAxisMax()]);var i=w.domain();(n||r(E,i))&&t.rescale(),E=i,t.isOrdinal()?w.rangeBands([0,t.xAxisLength()],ne,t._useOuterPadding()?te:0):w.range([0,t.xAxisLength()]),M=M.scale(t.x()),o(e)}function o(e){var r=e.select("g."+v);if(G){r.empty()&&(r=e.insert("g",":first-child").attr("class",m+" "+v).attr("transform","translate("+t.margins().left+","+t.margins().top+")"));var i=M.tickValues()?M.tickValues():"function"==typeof w.ticks?w.ticks(M.ticks()[0]):w.domain(),o=r.selectAll("line").data(i),a=o.enter().append("line").attr("x1",function(e){return w(e)}).attr("y1",t._xAxisY()-t.margins().top).attr("x2",function(e){return w(e)}).attr("y2",0).attr("opacity",0);n.transition(a,t.transitionDuration(),t.transitionDelay()).attr("opacity",1),n.transition(o,t.transitionDuration(),t.transitionDelay()).attr("x1",function(e){return w(e)}).attr("y1",t._xAxisY()-t.margins().top).attr("x2",function(e){return w(e)}).attr("y2",0),o.exit().remove()}else r.selectAll("line").remove()}function a(){return t._xAxisY()-t.margins().top}function s(){return t.anchorName().replace(/[ .#=\[\]"]/g,"-")+"-clip"}function l(){var e=n.utils.appendOrSelect(y,"defs"),r=s(),i=n.utils.appendOrSelect(e,"#"+r,"clipPath").attr("id",r),o=2*ee;n.utils.appendOrSelect(i,"rect").attr("width",t.xAxisLength()+o).attr("height",t.yAxisHeight()+o).attr("transform","translate(-"+ee+", -"+ee+")")}function u(e){t.isOrdinal()&&(U=!1),i(t.g(),e),t._prepareYAxis(t.g()),t.plotData(),(t.elasticX()||q||e)&&t.renderXAxis(t.g()),(t.elasticY()||q||e)&&t.renderYAxis(t.g()),e?t.renderBrush(t.g(),!1):t.redrawBrush(t.g(),q),t.fadeDeselectedArea(),q=!1}function c(){J?t._enableMouseZoom():Z&&t._disableMouseZoom()}function d(){if(W=!0,Y){var e=C;D&&(e=h(e,D.x().domain()));var r=f(t.x().domain(),e);r&&t.x().domain(r)}var i=t.x().domain(),o=n.filters.RangedFilter(i[0],i[1]);t.replaceFilter(o),t.rescale(),t.redraw(),D&&!p(t.filter(),D.filter())&&n.events.trigger(function(){D.replaceFilter(o),D.redraw()}),t._invokeZoomedListener(),n.events.trigger(function(){t.redrawGroup()},n.constants.EVENT_DELAY),W=!p(i,C)}function h(e,t){return(e[0]>t[1]||e[1]t[1]?[Math.max(t[0],n.utils.subtract(t[1],r,"millis")),t[1]]:null}function p(e,t){return!e&&!t||!(!e||!t)&&(0===e.length&&0===t.length||e[0].valueOf()===t[0].valueOf()&&e[1].valueOf()===t[1].valueOf())}function g(e){return e instanceof Array&&e.length>1}var m="grid-line",v="vertical";t=n.colorMixin(n.marginMixin(n.baseMixin(t))),t.colors(e.scale.category10()),t._mandatoryAttributes().push("x");var y,b,_,w,C,A,E,S,x,F,k,D,T,M=e.svg.axis().orient("bottom"),R=n.units.integers,O=0,L="day",P=!1,B=0,I=e.svg.axis().orient("left"),N=0,j=!1,z=0,H=e.svg.brush(),U=!0,V=!1,G=!1,W=!1,q=!1,K=[1,1/0],Y=!0,X=e.behavior.zoom().on("zoom",d),Q=e.behavior.zoom().on("zoom",null),Z=!1,J=!1,ee=0,te=.5,ne=0,re=!1;return t.rescale=function(){return k=void 0,q=!0,t},t.resizing=function(){return q},t.rangeChart=function(e){return arguments.length?(D=e,D.focusChart(t),t):D},t.zoomScale=function(e){return arguments.length?(K=e,t):K},t.zoomOutRestrict=function(e){return arguments.length?(K[0]=e?1:0,Y=e,t):Y},t._generateG=function(e){y=void 0===e?t.svg():e;var n=window.location.href.split("#")[0];return b=y.append("g"),_=b.append("g").attr("class","chart-body").attr("transform","translate("+t.margins().left+", "+t.margins().top+")").attr("clip-path","url("+n+"#"+s()+")"),b},t.g=function(e){return arguments.length?(b=e,t):b},t.mouseZoomable=function(e){return arguments.length?(J=e,t):J},t.chartBodyG=function(e){return arguments.length?(_=e,t):_},t.x=function(e){return arguments.length?(w=e,C=w.domain(),t.rescale(),t):w},t.xOriginalDomain=function(){return C},t.xUnits=function(e){return arguments.length?(R=e,t):R},t.xAxis=function(e){return arguments.length?(M=e,t):M},t.elasticX=function(e){return arguments.length?(P=e,t):P},t.xAxisPadding=function(e){return arguments.length?(O=e,t):O},t.xAxisPaddingUnit=function(e){return arguments.length?(L=e,t):L},t.xUnitCount=function(){if(void 0===k){var e=t.xUnits()(t.x().domain()[0],t.x().domain()[1],t.x().domain());k=e instanceof Array?e.length:e}return k},t.useRightYAxis=function(e){return arguments.length?(re=e,t):re},t.isOrdinal=function(){return t.xUnits()===n.units.ordinal},t._useOuterPadding=function(){return!0},t._ordinalXDomain=function(){return t._computeOrderedGroups(t.data()).map(t.keyAccessor())},t.renderXAxis=function(e){var r=e.select("g.x");r.empty()&&(r=e.append("g").attr("class","axis x").attr("transform","translate("+t.margins().left+","+t._xAxisY()+")"));var i=e.select("text.x-axis-label");i.empty()&&t.xAxisLabel()&&(i=e.append("text").attr("class","x-axis-label").attr("transform","translate("+(t.margins().left+t.xAxisLength()/2)+","+(t.height()-B)+")").attr("text-anchor","middle")),t.xAxisLabel()&&i.text()!==t.xAxisLabel()&&i.text(t.xAxisLabel()),n.transition(r,t.transitionDuration(),t.transitionDelay()).attr("transform","translate("+t.margins().left+","+t._xAxisY()+")").call(M),n.transition(i,t.transitionDuration(),t.transitionDelay()).attr("transform","translate("+(t.margins().left+t.xAxisLength()/2)+","+(t.height()-B)+")")},t._xAxisY=function(){return t.height()-t.margins().bottom},t.xAxisLength=function(){return t.effectiveWidth()},t.xAxisLabel=function(e,n){return arguments.length?(A=e,t.margins().bottom-=B,B=void 0===n?12:n,t.margins().bottom+=B,t):A},t._prepareYAxis=function(n){if(void 0===S||t.elasticY()){void 0===S&&(S=e.scale.linear());var r=t.yAxisMin()||0,i=t.yAxisMax()||0;S.domain([r,i]).rangeRound([t.yAxisHeight(),0])}S.range([t.yAxisHeight(),0]),I=I.scale(S),re&&I.orient("right"),t._renderHorizontalGridLinesForAxis(n,S,I)},t.renderYAxisLabel=function(e,r,i,o){o=o||z;var a=t.g().select("text.y-axis-label."+e+"-label"),s=t.margins().top+t.yAxisHeight()/2;a.empty()&&r&&(a=t.g().append("text").attr("transform","translate("+o+","+s+"),rotate("+i+")").attr("class","y-axis-label "+e+"-label").attr("text-anchor","middle").text(r)),r&&a.text()!==r&&a.text(r),n.transition(a,t.transitionDuration(),t.transitionDelay()).attr("transform","translate("+o+","+s+"),rotate("+i+")")},t.renderYAxisAt=function(e,r,i){var o=t.g().select("g."+e);o.empty()&&(o=t.g().append("g").attr("class","axis "+e).attr("transform","translate("+i+","+t.margins().top+")")),n.transition(o,t.transitionDuration(),t.transitionDelay()).attr("transform","translate("+i+","+t.margins().top+")").call(r)},t.renderYAxis=function(){var e=re?t.width()-t.margins().right:t._yAxisX();t.renderYAxisAt("y",I,e);var n=re?t.width()-z:z,r=re?90:-90;t.renderYAxisLabel("y",t.yAxisLabel(),r,n)},t._renderHorizontalGridLinesForAxis=function(e,r,i){var o=e.select("g.horizontal");if(V){var a=i.tickValues()?i.tickValues():r.ticks(i.ticks()[0]);o.empty()&&(o=e.insert("g",":first-child").attr("class",m+" horizontal").attr("transform","translate("+t.margins().left+","+t.margins().top+")"));var s=o.selectAll("line").data(a),l=s.enter().append("line").attr("x1",1).attr("y1",function(e){return r(e)}).attr("x2",t.xAxisLength()).attr("y2",function(e){return r(e)}).attr("opacity",0);n.transition(l,t.transitionDuration(),t.transitionDelay()).attr("opacity",1),n.transition(s,t.transitionDuration(),t.transitionDelay()).attr("x1",1).attr("y1",function(e){return r(e)}).attr("x2",t.xAxisLength()).attr("y2",function(e){return r(e)}),s.exit().remove()}else o.selectAll("line").remove()},t._yAxisX=function(){return t.useRightYAxis()?t.width()-t.margins().right:t.margins().left},t.yAxisLabel=function(e,n){return arguments.length?(x=e,t.margins().left-=z,z=void 0===n?12:n,t.margins().left+=z,t):x},t.y=function(e){return arguments.length?(S=e,t.rescale(),t):S},t.yAxis=function(e){return arguments.length?(I=e,t):I},t.elasticY=function(e){return arguments.length?(j=e,t):j},t.renderHorizontalGridLines=function(e){return arguments.length?(V=e,t):V},t.renderVerticalGridLines=function(e){return arguments.length?(G=e,t):G},t.xAxisMin=function(){var r=e.min(t.data(),function(e){return t.keyAccessor()(e)});return n.utils.subtract(r,O,L)},t.xAxisMax=function(){var r=e.max(t.data(),function(e){return t.keyAccessor()(e)});return n.utils.add(r,O,L)},t.yAxisMin=function(){var r=e.min(t.data(),function(e){return t.valueAccessor()(e)});return n.utils.subtract(r,N)},t.yAxisMax=function(){var r=e.max(t.data(),function(e){return t.valueAccessor()(e)});return n.utils.add(r,N)},t.yAxisPadding=function(e){return arguments.length?(N=e,t):N},t.yAxisHeight=function(){return t.effectiveHeight()},t.round=function(e){return arguments.length?(F=e,t):F},t._rangeBandPadding=function(e){return arguments.length?(ne=e,t):ne},t._outerRangeBandPadding=function(e){return arguments.length?(te=e,t):te},n.override(t,"filter",function(e){return arguments.length?(t._filter(e),e?t.brush().extent(e):t.brush().clear(),t):t._filter()}),t.brush=function(e){return arguments.length?(H=e,t):H},t.renderBrush=function(e){if(U){H.on("brush",t._brushing),H.on("brushstart",t._disableMouseZoom),H.on("brushend",c);var n=e.append("g").attr("class","brush").attr("transform","translate("+t.margins().left+","+t.margins().top+")").call(H.x(t.x()));t.setBrushY(n,!1),t.setHandlePaths(n),t.hasFilter()&&t.redrawBrush(e,!1)}},t.setHandlePaths=function(e){e.selectAll(".resize").append("path").attr("d",t.resizeHandlePath)},t.setBrushY=function(e){e.selectAll("rect").attr("height",a()),e.selectAll(".resize path").attr("d",t.resizeHandlePath)},t.extendBrush=function(){var e=H.extent();return t.round()&&(e[0]=e.map(t.round())[0],e[1]=e.map(t.round())[1],b.select(".brush").call(H.extent(e))),e},t.brushIsEmpty=function(e){return H.empty()||!e||e[1]<=e[0]},t._brushing=function(){var e=t.extendBrush();if(t.redrawBrush(b,!1),t.brushIsEmpty(e))n.events.trigger(function(){t.filter(null),t.redrawGroup()},n.constants.EVENT_DELAY);else{var r=n.filters.RangedFilter(e[0],e[1]);n.events.trigger(function(){t.replaceFilter(r),t.redrawGroup()},n.constants.EVENT_DELAY)}},t.redrawBrush=function(e,r){if(U){t.filter()&&t.brush().empty()&&t.brush().extent(t.filter());var i=n.optionalTransition(r,t.transitionDuration(),t.transitionDelay())(e.select("g.brush"));t.setBrushY(i),i.call(t.brush().x(t.x()).extent(t.brush().extent()))}t.fadeDeselectedArea()},t.fadeDeselectedArea=function(){},t.resizeHandlePath=function(e){var t=+("e"===e),n=t?1:-1,r=a()/3;return"M"+.5*n+","+r+"A6,6 0 0 "+t+" "+6.5*n+","+(r+6)+"V"+(2*r-6)+"A6,6 0 0 "+t+" "+.5*n+","+2*r+"ZM"+2.5*n+","+(r+8)+"V"+(2*r-8)+"M"+4.5*n+","+(r+8)+"V"+(2*r-8)},t.clipPadding=function(e){return arguments.length?(ee=e,t):ee},t._preprocessData=function(){},t._doRender=function(){return t.resetSvg(),t._preprocessData(),t._generateG(),l(),u(!0),c(),t},t._doRedraw=function(){return t._preprocessData(),u(!1),l(),t},t._enableMouseZoom=function(){Z=!0,X.x(t.x()).scaleExtent(K).size([t.width(),t.height()]).duration(t.transitionDuration()),t.root().call(X)},t._disableMouseZoom=function(){t.root().call(Q)},t.focus=function(e){g(e)?t.x().domain(e):t.x().domain(C),X.x(t.x()),d()},t.refocused=function(){return W},t.focusChart=function(e){return arguments.length?(T=e,t.on("filtered",function(e){e.filter()?p(e.filter(),T.filter())||n.events.trigger(function(){T.focus(e.filter())}):n.events.trigger(function(){T.x().domain(T.xOriginalDomain())})}),t):T},t.brushOn=function(e){return arguments.length?(U=e,t):U},t},n.stackMixin=function(t){function r(e,n){var r=e.accessor||t.valueAccessor();return e.name=String(e.name||n),e.values=e.group.all().map(function(n,i){return{x:t.keyAccessor()(n,i),y:e.hidden?null:r(n,i),data:n,layer:e.name,hidden:e.hidden}}),e.values=e.values.filter(i()),e.values}function i(){if(!t.x()||h)return e.functor(!0);var n=t.x().domain();return t.isOrdinal()?function(){return!0}:t.elasticX()?function(){return!0}:function(e){return e.x>=n[0]&&e.x<=n[n.length-1]}}function o(e){var t=u.map(n.pluck("name")).indexOf(e);return u[t]}function a(){var e=t.data().map(function(e){return e.values});return Array.prototype.concat.apply([],e)}function s(e){return!e.hidden}var l=e.layout.stack().values(r),u=[],c={},d=!1,h=!1;return t.stack=function(e,n,r){if(!arguments.length)return u;arguments.length<=2&&(r=n);var i={group:e};return"string"==typeof n&&(i.name=n),"function"==typeof r&&(i.accessor=r),u.push(i),t},n.override(t,"group",function(e,n,r){return arguments.length?(u=[],c={},t.stack(e,n),r&&t.valueAccessor(r),t._group(e,n)):t._group()}),t.hidableStacks=function(e){return arguments.length?(d=e,t):d},t.hideStack=function(e){var n=o(e);return n&&(n.hidden=!0),t},t.showStack=function(e){var n=o(e);return n&&(n.hidden=!1),t},t.getValueAccessorByIndex=function(e){return u[e].accessor||t.valueAccessor()},t.yAxisMin=function(){var r=e.min(a(),function(e){return e.y<0?e.y+e.y0:e.y0});return n.utils.subtract(r,t.yAxisPadding())},t.yAxisMax=function(){var r=e.max(a(),function(e){return e.y>0?e.y+e.y0:e.y0});return n.utils.add(r,t.yAxisPadding())},t.xAxisMin=function(){var r=e.min(a(),n.pluck("x"));return n.utils.subtract(r,t.xAxisPadding(),t.xAxisPaddingUnit())},t.xAxisMax=function(){var r=e.max(a(),n.pluck("x"));return n.utils.add(r,t.xAxisPadding(),t.xAxisPaddingUnit())},n.override(t,"title",function(e,n){return e?"function"==typeof e?t._title(e):e===t._groupName&&"function"==typeof n?t._title(n):"function"!=typeof n?c[e]||t._title():(c[e]=n,t):t._title()}),t.stackLayout=function(n){return arguments.length?(l=n,l.values()===e.layout.stack().values()&&l.values(r),t):l},t.evadeDomainFilter=function(e){return arguments.length?(h=e,t):h},t.data(function(){var e=u.filter(s);return e.length?t.stackLayout()(e):[]}),t._ordinalXDomain=function(){var e=a().map(n.pluck("data"));return t._computeOrderedGroups(e).map(t.keyAccessor())},t.colorAccessor(function(e){return this.layer||this.name||e.name||e.layer}),t.legendables=function(){return u.map(function(e,n){return{chart:t,name:e.name,hidden:e.hidden||!1,color:t.getColor.call(e,e.values,n)}})},t.isLegendableHidden=function(e){var t=o(e.name);return!!t&&t.hidden},t.legendToggle=function(e){d&&(t.isLegendableHidden(e)?t.showStack(e.name):t.hideStack(e.name),t.renderGroup())},t},n.capMixin=function(t){var r=1/0,i="Others",o=function(n){var r=e.sum(n,t.valueAccessor()),i=t.group().all(),o=e.sum(i,t.valueAccessor()),a=n.map(t.keyAccessor()),s=i.map(t.keyAccessor()),l=e.set(a),u=s.filter(function(e){return!l.has(e)});return o>r?n.concat([{others:u,key:t.othersLabel(),value:o-r}]):n};return t.cappedKeyAccessor=function(e,n){return e.others?e.key:t.keyAccessor()(e,n)},t.cappedValueAccessor=function(e,n){return e.others?e.value:t.valueAccessor()(e,n)},t.data(function(e){if(r===1/0)return t._computeOrderedGroups(e.all());var n=e.top(r);return n=t._computeOrderedGroups(n),o?o(n):n}),t.cap=function(e){return arguments.length?(r=e,t):r},t.othersLabel=function(e){return arguments.length?(i=e,t):i},t.othersGrouper=function(e){return arguments.length?(o=e,t):o},n.override(t,"onClick",function(e){e.others&&t.filter([e.others]),t._onClick(e)}),t},n.bubbleMixin=function(t){var r=.3,i=10;t.BUBBLE_NODE_CLASS="node",t.BUBBLE_CLASS="bubble",t.MIN_RADIUS=10,t=n.colorMixin(t),t.renderLabel(!0),t.data(function(e){return e.top(1/0)});var o=e.scale.linear().domain([0,100]),a=function(e){return e.r};t.r=function(e){return arguments.length?(o=e,t):o},t.radiusValueAccessor=function(e){return arguments.length?(a=e,t):a},t.rMin=function(){return e.min(t.data(),function(e){return t.radiusValueAccessor()(e)})},t.rMax=function(){return e.max(t.data(),function(e){return t.radiusValueAccessor()(e)})},t.bubbleR=function(e){var n=t.radiusValueAccessor()(e),r=t.r()(n);return(isNaN(r)||n<=0)&&(r=0),r};var s=function(e){return t.label()(e)},l=function(e){return t.bubbleR(e)>i},u=function(e){return l(e)?1:0},c=function(e){return l(e)?"all":"none"};t._doRenderLabel=function(e){if(t.renderLabel()){var r=e.select("text");r.empty()&&(r=e.append("text").attr("text-anchor","middle").attr("dy",".3em").on("click",t.onClick)),r.attr("opacity",0).attr("pointer-events",c).text(s),n.transition(r,t.transitionDuration(),t.transitionDelay()).attr("opacity",u)}},t.doUpdateLabels=function(e){if(t.renderLabel()){var r=e.select("text").attr("pointer-events",c).text(s);n.transition(r,t.transitionDuration(),t.transitionDelay()).attr("opacity",u)}};var d=function(e){return t.title()(e)};return t._doRenderTitles=function(e){if(t.renderTitle()){e.select("title").empty()&&e.append("title").text(d)}},t.doUpdateTitles=function(e){t.renderTitle()&&e.select("title").text(d)},t.minRadius=function(e){return arguments.length?(t.MIN_RADIUS=e,t):t.MIN_RADIUS},t.minRadiusWithLabel=function(e){return arguments.length?(i=e,t):i},t.maxBubbleRelativeSize=function(e){return arguments.length?(r=e,t):r},t.fadeDeselectedArea=function(){t.hasFilter()?t.selectAll("g."+t.BUBBLE_NODE_CLASS).each(function(e){t.isSelectedNode(e)?t.highlightSelected(this):t.fadeDeselected(this)}):t.selectAll("g."+t.BUBBLE_NODE_CLASS).each(function(){t.resetHighlight(this)})},t.isSelectedNode=function(e){return t.hasFilter(e.key)},t.onClick=function(e){var r=e.key;n.events.trigger(function(){t.filter(r),t.redrawGroup()})},t},n.pieChart=function(t,r){function i(){var t=e.min([K.width(),K.height()])/2;M=R&&R=0&&(r="M0,0"),r}function D(t,n){var r;return r=B?e.svg.arc().outerRadius(M-G+B).innerRadius(M-G+B).centroid(t):n.centroid(t),isNaN(r[0])||isNaN(r[1])?"translate(0,0)":"translate("+r+")"}function T(t,n){K.selectAll("g.pie-slice").each(function(r){t.name===r.data.key&&e.select(this).classed("highlight",n)})}var M,R,O,L,P,B,I="pie-slice",N="pie-label",j="pie-slice-group",z="pie-label-group",H="empty-chart",U="empty",V=0,G=0,W=.5,q=!1,K=n.capMixin(n.colorMixin(n.baseMixin({})));return K.colorAccessor(K.cappedKeyAccessor),K.title(function(e){return K.cappedKeyAccessor(e)+": "+K.cappedValueAccessor(e)}),K.slicesCap=K.cap,K.label(K.cappedKeyAccessor),K.renderLabel(!0),K.transitionDuration(350),K.transitionDelay(0),K._doRender=function(){return K.resetSvg(),O=K.svg().append("g").attr("transform","translate("+K.cx()+","+K.cy()+")"),O.append("g").attr("class",j),O.append("g").attr("class",z),i(),K},K._applyLabelText=function(e){e.text(function(e){return!A(e.data)&&!C(e)||_(e)?K.label()(e.data):""})},K.externalRadiusPadding=function(e){return arguments.length?(G=e,K):G},K.innerRadius=function(e){return arguments.length?(V=e,K):V},K.radius=function(e){return arguments.length?(R=e,K):R},K.cx=function(e){return arguments.length?(L=e,K):L||K.width()/2},K.cy=function(e){return arguments.length?(P=e,K):P||K.height()/2},K._doRedraw=function(){return i(),K},K.minAngleForLabel=function(e){return arguments.length?(W=e,K):W},K.emptyTitle=function(e){return 0===arguments.length?U:(U=e,K)},K.externalLabels=function(e){return 0===arguments.length?B:(B=e||void 0,K)},K.drawPaths=function(e){return 0===arguments.length?q:(q=e,K)},K.legendables=function(){return K.data().map(function(e,t){var n={name:e.key,data:e.value,others:e.others,chart:K};return n.color=K.getColor(e,t),n})},K.legendHighlight=function(e){T(e,!0)},K.legendReset=function(e){T(e,!1)},K.legendToggle=function(e){K.onClick({key:e.name,others:e.others})},K.anchor(t,r)},n.barChart=function(t,r){function i(e){return n.utils.safeNumber(Math.abs(h.y()(e.y+e.y0)-h.y()(e.y0)))}function o(e,t,r){var o=e.selectAll("text.barLabel").data(r.values,n.pluck("x"));o.enter().append("text").attr("class","barLabel").attr("text-anchor","middle"),h.isOrdinal()&&(o.on("click",h.onClick),o.attr("cursor","pointer")),n.transition(o,h.transitionDuration(),h.transitionDelay()).attr("x",function(e){var t=h.x()(e.x);return p||(t+=u/2),n.utils.safeNumber(t)}).attr("y",function(e){var t=h.y()(e.y+e.y0);return e.y<0&&(t-=i(e)),n.utils.safeNumber(t-d)}).text(function(e){return h.label()(e)}),n.transition(o.exit(),h.transitionDuration(),h.transitionDelay()).attr("height",0).remove()}function a(e,t,r){var o=e.selectAll("rect.bar").data(r.values,n.pluck("x")),a=o.enter().append("rect").attr("class","bar").attr("fill",n.pluck("data",h.getColor)).attr("y",h.yAxisHeight()).attr("height",0);h.renderTitle()&&a.append("title").text(n.pluck("data",h.title(r.name))),h.isOrdinal()&&o.on("click",h.onClick),n.transition(o,h.transitionDuration(),h.transitionDelay()).attr("x",function(e){var t=h.x()(e.x);return p&&(t-=u/2),h.isOrdinal()&&void 0!==f&&(t+=f/2),n.utils.safeNumber(t)}).attr("y",function(e){var t=h.y()(e.y+e.y0);return e.y<0&&(t-=i(e)),n.utils.safeNumber(t)}).attr("width",u).attr("height",function(e){return i(e)}).attr("fill",n.pluck("data",h.getColor)).select("title").text(n.pluck("data",h.title(r.name))),n.transition(o.exit(),h.transitionDuration(),h.transitionDelay()).attr("x",function(e){return h.x()(e.x)}).attr("width",.9*u).remove()}function s(){if(void 0===u){var e=h.xUnitCount();u=h.isOrdinal()&&void 0===f?Math.floor(h.x().rangeBand()):f?Math.floor((h.xAxisLength()-(e-1)*f)/e):Math.floor(h.xAxisLength()/(1+h.barPadding())/e),(u===1/0||isNaN(u)||u=i})}},h.centerBar=function(e){return arguments.length?(p=e,h):p},n.override(h,"onClick",function(e){h._onClick(e.data)}),h.barPadding=function(e){return arguments.length?(h._rangeBandPadding(e),f=void 0,h):h._rangeBandPadding()},h._useOuterPadding=function(){return void 0===f},h.outerPadding=h._outerRangeBandPadding,h.gap=function(e){return arguments.length?(f=e,h):f},h.extendBrush=function(){var e=h.brush().extent();return!h.round()||p&&!g||(e[0]=e.map(h.round())[0],e[1]=e.map(h.round())[1],h.chartBodyG().select(".brush").call(h.brush().extent(e))),e},h.alwaysUseRounding=function(e){return arguments.length?(g=e,h):g},h.legendHighlight=function(e){h.isLegendableHidden(e)||h.g().selectAll("rect.bar").classed("highlight",l(e.color)).classed("fadeout",l(e.color,!0))},h.legendReset=function(){h.g().selectAll("rect.bar").classed("highlight",!1).classed("fadeout",!1)},n.override(h,"xAxisMax",function(){var e=this._xAxisMax();if("resolution"in h.xUnits()){e+=h.xUnits().resolution}return e}),h.anchor(t,r)},n.lineChart=function(t,r){function i(e,t){return S.getColor.call(e,e.values,t)}function o(t,r){var o=e.svg.line().x(function(e){return S.x()(e.x)}).y(function(e){return S.y()(e.y+e.y0)}).interpolate(M).tension(R);y&&o.defined(y);var a=t.append("path").attr("class","line").attr("stroke",i);b&&a.attr("stroke-dasharray",b),n.transition(r.select("path.line"),S.transitionDuration(),S.transitionDelay()).attr("stroke",i).attr("d",function(e){return s(o(e.values))})}function a(t,r){if(x){var o=e.svg.area().x(function(e){return S.x()(e.x)}).y(function(e){return S.y()(e.y+e.y0)}).y0(function(e){return S.y()(e.y0)}).interpolate(M).tension(R);y&&o.defined(y),t.append("path").attr("class","area").attr("fill",i).attr("d",function(e){return s(o(e.values))}),n.transition(r.select("path.area"),S.transitionDuration(),S.transitionDelay()).attr("fill",i).attr("d",function(e){return s(o(e.values))})}}function s(e){return!e||e.indexOf("NaN")>=0?"M0,0":e}function l(t,r){if("always"===S.xyTipsOn()||!S.brushOn()&&S.xyTipsOn()){var i=_+"-list",o=t.select("g."+i);o.empty()&&(o=t.append("g").attr("class",i)),r.each(function(t,r){var i=t.values;y&&(i=i.filter(y));var a=o.select("g."+_+"._"+r);a.empty()&&(a=o.append("g").attr("class",_+" _"+r)),c(a);var s=a.selectAll("circle."+w).data(i,n.pluck("x"));s.enter().append("circle").attr("class",w).attr("r",f()).style("fill-opacity",D).style("stroke-opacity",T).attr("fill",S.getColor).on("mousemove",function(){var t=e.select(this);d(t),h(t,a)}).on("mouseout",function(){p(e.select(this)),g(a)}),s.call(m,t),n.transition(s,S.transitionDuration()).attr("cx",function(e){return n.utils.safeNumber(S.x()(e.x))}).attr("cy",function(e){return n.utils.safeNumber(S.y()(e.y+e.y0))}).attr("fill",S.getColor),s.exit().remove()})}}function u(t){t.each(function(t,r){var i=e.select(this),o=i.selectAll("text.lineLabel").data(t.values,n.pluck("x"));o.enter().append("text").attr("class","lineLabel").attr("text-anchor","middle"),n.transition(o,S.transitionDuration()).attr("x",function(e){return n.utils.safeNumber(S.x()(e.x))}).attr("y",function(e){var t=S.y()(e.y+e.y0)-E;return n.utils.safeNumber(t)}).text(function(e){return S.label()(e)}),n.transition(o.exit(),S.transitionDuration()).attr("height",0).remove()})}function c(e){(e.select("path."+C).empty()?e.append("path").attr("class",C):e.select("path."+C)).style("display","none").attr("stroke-dasharray","5,5"),(e.select("path."+A).empty()?e.append("path").attr("class",A):e.select("path."+A)).style("display","none").attr("stroke-dasharray","5,5")}function d(e){return e.style("fill-opacity",.8),e.style("stroke-opacity",.8),e.attr("r",F),e}function h(e,t){var n=e.attr("cx"),r=e.attr("cy"),i=S._yAxisX()-S.margins().left,o="M"+i+" "+r+"L"+n+" "+r,a="M"+n+" "+S.yAxisHeight()+"L"+n+" "+r;t.select("path."+C).style("display","").attr("d",o),t.select("path."+A).style("display","").attr("d",a)}function f(){return k||F}function p(e){e.style("fill-opacity",D).style("stroke-opacity",T).attr("r",f())}function g(e){e.select("path."+C).style("display","none"),e.select("path."+A).style("display","none")}function m(e,t){S.renderTitle()&&(e.select("title").remove(),e.append("title").text(n.pluck("data",S.title(t.name))))}function v(t,n,r){return function(){var i=e.select(this),o=i.attr("stroke")===t&&i.attr("stroke-dasharray")===(n instanceof Array?n.join(","):null)||i.attr("fill")===t;return r?!o:o}}var y,b,_="dc-tooltip",w="dot",C="yRef",A="xRef",E=3,S=n.stackMixin(n.coordinateGridMixin({})),x=!1,F=5,k=null,D=1e-6,T=1e-6,M="linear",R=.7,O=!0;return S.transitionDuration(500),S.transitionDelay(0),S._rangeBandPadding(1),S.plotData=function(){var e=S.chartBodyG(),t=e.select("g.stack-list");t.empty()&&(t=e.append("g").attr("class","stack-list"));var n=t.selectAll("g.stack").data(S.data()),r=n.enter().append("g").attr("class",function(e,t){return"stack _"+t});o(r,n),a(r,n),l(e,n),S.renderLabel()&&u(n)},S.interpolate=function(e){return arguments.length?(M=e,S):M},S.tension=function(e){return arguments.length?(R=e,S):R},S.defined=function(e){return arguments.length?(y=e,S):y},S.dashStyle=function(e){return arguments.length?(b=e,S):b},S.renderArea=function(e){return arguments.length?(x=e,S):x},S.label(function(e){return n.utils.printSingleValue(e.y0+e.y)},!1),S.xyTipsOn=function(e){return arguments.length?(O=e,S):O},S.dotRadius=function(e){return arguments.length?(F=e,S):F},S.renderDataPoints=function(e){return arguments.length?(e?(D=e.fillOpacity||.8,T=e.strokeOpacity||.8,k=e.radius||2):(D=1e-6,T=1e-6,k=null),S):{fillOpacity:D,strokeOpacity:T,radius:k}},S.legendHighlight=function(e){S.isLegendableHidden(e)||S.g().selectAll("path.line, path.area").classed("highlight",v(e.color,e.dashstyle)).classed("fadeout",v(e.color,e.dashstyle,!0))},S.legendReset=function(){S.g().selectAll("path.line, path.area").classed("highlight",!1).classed("fadeout",!1)},n.override(S,"legendables",function(){var e=S._legendables();return b?e.map(function(e){return e.dashstyle=b,e}):e}),S.anchor(t,r)},n.dataCount=function(t,r){var i=e.format(",d"),o=n.baseMixin({}),a={some:"",all:""};return o.html=function(e){return arguments.length?(e.all&&(a.all=e.all),e.some&&(a.some=e.some),o):a},o.formatNumber=function(e){return arguments.length?(i=e,o):i},o._doRender=function(){var e=o.dimension().size(),t=o.group().value(),n=i(e),r=i(t);return e===t&&""!==a.all?o.root().html(a.all.replace("%total-count",n).replace("%filter-count",r)):""!==a.some?o.root().html(a.some.replace("%total-count",n).replace("%filter-count",r)):(o.selectAll(".total-count").text(n),o.selectAll(".filter-count").text(r)),o},o._doRedraw=function(){return o._doRender()},o.anchor(t,r)},n.dataTable=function(t,r){function i(){var e=!0;if(g.forEach(function(t){e&="function"==typeof t}),!e){var t=f.selectAll("thead").data([0]);t.enter().append("thead"),t.exit().remove();var n=t.selectAll("tr").data([0]);n.enter().append("tr"),n.exit().remove();var r=n.selectAll("th").data(g);r.enter().append("th"),r.exit().remove(),r.attr("class",h).html(function(e){return f._doColumnHeaderFormat(e)})}var i=f.root().selectAll("tbody").data(o(),function(e){return f.keyAccessor()(e)}),a=i.enter().append("tbody");return!0===b&&a.append("tr").attr("class",d).append("td").attr("class",l).attr("colspan",g.length).html(function(e){return f.keyAccessor()(e)}),i.exit().remove(),a}function o(){var t;return t=v===e.ascending?f.dimension().bottom(p):f.dimension().top(p),e.nest().key(f.group()).sortKeys(v).entries(t.sort(function(e,t){return v(m(e),m(t))}).slice(y,s))}function a(e){var t=e.order().selectAll("tr."+u).data(function(e){return e.values}),n=t.enter().append("tr").attr("class",u);return g.forEach(function(e,t){n.append("td").attr("class",c+" _"+t).html(function(t){return f._doColumnValueFormat(e,t)})}),t.exit().remove(),t}var s,l="dc-table-label",u="dc-table-row",c="dc-table-column",d="dc-table-group",h="dc-table-head",f=n.baseMixin({}),p=25,g=[],m=function(e){return e},v=e.ascending,y=0,b=!0;return f._doRender=function(){return f.selectAll("tbody").remove(),a(i()),f},f._doColumnValueFormat=function(e,t){return"function"==typeof e?e(t):"string"==typeof e?t[e]:e.format(t)},f._doColumnHeaderFormat=function(e){return"function"==typeof e?f._doColumnHeaderFnToString(e):"string"==typeof e?f._doColumnHeaderCapitalize(e):String(e.label)},f._doColumnHeaderCapitalize=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},f._doColumnHeaderFnToString=function(e){var t=String(e),n=t.indexOf("return ");if(n>=0){var r=t.lastIndexOf(";");if(r>=0){t=t.substring(n+7,r);t.indexOf("numberFormat")>=0&&(t=t.replace("numberFormat",""))}}return t},f._doRedraw=function(){return f._doRender()},f.size=function(e){return arguments.length?(p=e,f):p},f.beginSlice=function(e){return arguments.length?(y=e,f):y},f.endSlice=function(e){return arguments.length?(s=e,f):s},f.columns=function(e){return arguments.length?(g=e,f):g},f.sortBy=function(e){return arguments.length?(m=e,f):m},f.order=function(e){return arguments.length?(v=e,f):v},f.showGroups=function(e){return arguments.length?(b=e,f):b},f.anchor(t,r)},n.dataGrid=function(t,r){function i(){var e=c.root().selectAll("div."+u).data(o(),function(e){return c.keyAccessor()(e)}),t=e.enter().append("div").attr("class",u);return m&&t.html(function(e){return m(e)}),e.exit().remove(),t}function o(){var t=c.dimension().top(d);return e.nest().key(c.group()).sortKeys(p).entries(t.sort(function(e,t){return p(f(e),f(t))}).slice(g,s))}function a(e){var t=e.order().selectAll("div."+l).data(function(e){return e.values});return t.enter().append("div").attr("class",l).html(function(e){return h(e)}),t.exit().remove(),t}var s,l="dc-grid-item",u="dc-grid-top",c=n.baseMixin({}),d=999,h=function(e){return"you need to provide an html() handling param:  "+JSON.stringify(e)},f=function(e){return e},p=e.ascending,g=0,m=function(e){return"

"+c.keyAccessor()(e)+"

"};return c._doRender=function(){return c.selectAll("div."+u).remove(),a(i()),c},c._doRedraw=function(){return c._doRender()},c.beginSlice=function(e){return arguments.length?(g=e,c):g},c.endSlice=function(e){return arguments.length?(s=e,c):s},c.size=function(e){return arguments.length?(d=e,c):d},c.html=function(e){return arguments.length?(h=e,c):h},c.htmlGroup=function(e){return arguments.length?(m=e,c):m},c.sortBy=function(e){return arguments.length?(f=e,c):f},c.order=function(e){return arguments.length?(p=e,c):p},c.anchor(t,r)},n.bubbleChart=function(t,r){function i(e){var t=e.enter().append("g");t.attr("class",u.BUBBLE_NODE_CLASS).attr("transform",h).append("circle").attr("class",function(e,t){return u.BUBBLE_CLASS+" _"+t}).on("click",u.onClick).attr("fill",u.getColor).attr("r",0),n.transition(e,u.transitionDuration(),u.transitionDelay()).select("circle."+u.BUBBLE_CLASS).attr("r",function(e){return u.bubbleR(e)}).attr("opacity",function(e){return u.bubbleR(e)>0?1:0}),u._doRenderLabel(t),u._doRenderTitles(t)}function o(e){n.transition(e,u.transitionDuration(),u.transitionDelay()).attr("transform",h).select("circle."+u.BUBBLE_CLASS).attr("fill",u.getColor).attr("r",function(e){return u.bubbleR(e)}).attr("opacity",function(e){return u.bubbleR(e)>0?1:0}),u.doUpdateLabels(e),u.doUpdateTitles(e)}function a(e){e.exit().remove()}function s(e){var t=u.x()(u.keyAccessor()(e));return isNaN(t)&&(t=0),t}function l(e){var t=u.y()(u.valueAccessor()(e));return isNaN(t)&&(t=0),t}var u=n.bubbleMixin(n.coordinateGridMixin({})),c=!1,d=!1;u.transitionDuration(750),u.transitionDelay(0);var h=function(e){return"translate("+s(e)+","+l(e)+")"};return u.elasticRadius=function(e){return arguments.length?(c=e,u):c},u.sortBubbleSize=function(e){return arguments.length?(d=e,u):d},u.plotData=function(){c&&u.r().domain([u.rMin(),u.rMax()]),u.r().range([u.MIN_RADIUS,u.xAxisLength()*u.maxBubbleRelativeSize()]);var t=u.data();if(d){var n=u.radiusValueAccessor();t.sort(function(t,r){return e.descending(n(t),n(r))})}var r=u.chartBodyG().selectAll("g."+u.BUBBLE_NODE_CLASS).data(t,function(e){return e.key});d&&r.order(),i(r),o(r),a(r),u.fadeDeselectedArea()},u.renderBrush=function(){},u.redrawBrush=function(){u.fadeDeselectedArea()},u.anchor(t,r)},n.compositeChart=function(t,r){function i(e,t){var n,r,i,a,s;return e&&(n=h(),r=g()),t&&(i=f(),a=m()),w.alignYAxes()&&e&&t&&(s=o(n,r,i,a)),s||{lyAxisMin:n,lyAxisMax:r,ryAxisMin:i,ryAxisMax:a}}function o(e,t,n,r){var i=(r-n)/(t-e);return{lyAxisMin:Math.min(e,n/i),lyAxisMax:Math.max(t,r/i),ryAxisMin:Math.min(n,e*i),ryAxisMax:Math.max(r,t*i)}}function a(t){var n=void 0===w.rightY()||w.elasticY(),r=n||w.resizing();void 0===w.rightY()&&w.rightY(e.scale.linear()),n&&w.rightY().domain([t.ryAxisMin,t.ryAxisMax]),r&&w.rightY().rangeRound([w.yAxisHeight(),0]),w.rightY().range([w.yAxisHeight(),0]),w.rightYAxis(w.rightYAxis().scale(w.rightY())),w.rightYAxis().orient("right")}function s(t){var n=void 0===w.y()||w.elasticY(),r=n||w.resizing();void 0===w.y()&&w.y(e.scale.linear()),n&&w.y().domain([t.lyAxisMin,t.lyAxisMax]),r&&w.y().rangeRound([w.yAxisHeight(),0]),w.y().range([w.yAxisHeight(),0]),w.yAxis(w.yAxis().scale(w.y())),w.yAxis().orient("left")}function l(e,t){e._generateG(w.g()),e.g().attr("class",_+" _"+t)}function u(){return C.filter(function(e){return!e.useRightYAxis()})}function c(){return C.filter(function(e){return e.useRightYAxis()})}function d(e){return e.map(function(e){return e.yAxisMin()})}function h(){return e.min(d(u()))}function f(){return e.min(d(c()))}function p(e){return e.map(function(e){return e.yAxisMax()})}function g(){return n.utils.add(e.max(p(u())),w.yAxisPadding())}function m(){return n.utils.add(e.max(p(c())),w.yAxisPadding())}function v(){return C.map(function(e){return e.xAxisMin()})}function y(){return C.map(function(e){return e.xAxisMax()})}var b,_="sub",w=n.coordinateGridMixin({}),C=[],A={},E=!1,S=!0,x=!1,F=e.svg.axis(),k=0,D=12,T=!1;return w._mandatoryAttributes([]),w.transitionDuration(500),w.transitionDelay(0),n.override(w,"_generateG",function(){for(var e=this.__generateG(),t=0;t0&&!T?w._renderHorizontalGridLinesForAxis(w.g(),w.y(),w.yAxis()):c().length>0&&w._renderHorizontalGridLinesForAxis(w.g(),b,F)},w.renderYAxis=function(){0!==u().length&&(w.renderYAxisAt("y",w.yAxis(),w.margins().left),w.renderYAxisLabel("y",w.yAxisLabel(),-90)),0!==c().length&&(w.renderYAxisAt("yr",w.rightYAxis(),w.width()-w.margins().right),w.renderYAxisLabel("yr",w.rightYAxisLabel(),90,w.width()-D))},w.plotData=function(){for(var e=0;e0&&(t[0]=0),t[1]<0&&(t[1]=0),b=e.scale.linear().domain(t).range([0,R.effectiveWidth()])}O.scale(b)}function o(){var e=y.select("g.axis");i(),e.empty()&&(e=y.append("g").attr("class","axis")),e.attr("transform","translate(0, "+R.effectiveHeight()+")"),n.transition(e,R.transitionDuration(),R.transitionDelay()).call(O)}function a(){y.selectAll("g.tick").select("line.grid-line").remove(),y.selectAll("g.tick").append("line").attr("class","grid-line").attr("x1",0).attr("y1",0).attr("x2",0).attr("y2",function(){return-R.effectiveHeight()})}function s(){w=R.data(),o(),a();var e=y.selectAll("g."+D).data(w);l(e),u(e),d(e)}function l(e){var t=e.enter().append("g").attr("class",function(e,t){return D+" _"+t});t.append("rect").attr("width",0),f(t)}function u(e){e.exit().remove()}function c(){var e=b(0);return e===-1/0||e!==e?b(1):e}function d(e){var t,r=w.length;t=k||(R.effectiveHeight()-(r+1)*F)/r,E||(A=t/2);var i=e.attr("transform",function(e,n){return"translate(0,"+((n+1)*F+n*t)+")"}).select("rect").attr("height",t).attr("fill",R.getColor).on("click",g).classed("deselected",function(e){return!!R.hasFilter()&&!v(e)}).classed("selected",function(e){return!!R.hasFilter()&&v(e)});n.transition(i,R.transitionDuration(),R.transitionDelay()).attr("width",function(e){return Math.abs(c()-b(R.valueAccessor()(e)))}).attr("transform",m),h(e),p(e)}function h(e){R.renderTitle()&&(e.select("title").remove(),e.append("title").text(R.title()))}function f(e){R.renderLabel()&&e.append("text").on("click",g),R.renderTitleLabel()&&e.append("text").attr("class",T).on("click",g)}function p(e){if(R.renderLabel()){var t=e.select("text").attr("x",C).attr("y",A).attr("dy",S).on("click",g).attr("class",function(e,t){return D+" _"+t}).text(function(e){return R.label()(e)});n.transition(t,R.transitionDuration(),R.transitionDelay()).attr("transform",m)}if(R.renderTitleLabel()){var r=e.select("."+T).attr("x",R.effectiveWidth()-x).attr("y",A).attr("dy",S).attr("text-anchor","end").on("click",g).attr("class",function(e,t){return T+" _"+t}).text(function(e){return R.title()(e)});n.transition(r,R.transitionDuration(),R.transitionDelay()).attr("transform",m)}}function g(e){R.onClick(e)}function m(e){var t=b(R.cappedValueAccessor(e)),n=c();return"translate("+(t>n?n:t)+",0)"}function v(e){return R.hasFilter(R.cappedKeyAccessor(e))}var y,b,_,w,C=10,A=15,E=!1,S="0.35em",x=2,F=5,k=!1,D="row",T="titlerow",M=!1,R=n.capMixin(n.marginMixin(n.colorMixin(n.baseMixin({})))),O=e.svg.axis().orient("bottom");return R.rowsCap=R.cap,R._doRender=function(){return R.resetSvg(),y=R.svg().append("g").attr("transform","translate("+R.margins().left+","+R.margins().top+")"),s(),R},R.title(function(e){return R.cappedKeyAccessor(e)+": "+R.cappedValueAccessor(e)}),R.label(R.cappedKeyAccessor),R.x=function(e){return arguments.length?(b=e,R):b},R.renderTitleLabel=function(e){return arguments.length?(M=e,R):M},R._doRedraw=function(){return s(),R},R.xAxis=function(){return O},R.fixedBarHeight=function(e){return arguments.length?(k=e,R):k},R.gap=function(e){return arguments.length?(F=e,R):F},R.elasticX=function(e){return arguments.length?(_=e,R):_},R.labelOffsetX=function(e){return arguments.length?(C=e,R):C},R.labelOffsetY=function(e){return arguments.length?(A=e,E=!0,R):A},R.titleLabelOffsetX=function(e){return arguments.length?(x=e,R):x},R.anchor(t,r)},n.legend=function(){function e(){return u+l}var t,r,i,o={},a=0,s=0,l=12,u=5,c=!1,d=560,h=70,f=!1,p=n.pluck("name");return o.parent=function(e){return arguments.length?(t=e,o):t},o.render=function(){t.svg().select("g.dc-legend").remove(),i=t.svg().append("g").attr("class","dc-legend").attr("transform","translate("+a+","+s+")");var o=t.legendables();void 0!==r&&(o=o.slice(0,r));var g=i.selectAll("g.dc-legend-item").data(o).enter().append("g").attr("class","dc-legend-item").on("mouseover",function(e){t.legendHighlight(e)}).on("mouseout",function(e){t.legendReset(e)}).on("click",function(e){e.chart.legendToggle(e)});i.selectAll("g.dc-legend-item").classed("fadeout",function(e){return e.chart.isLegendableHidden(e)}),o.some(n.pluck("dashstyle"))?g.append("line").attr("x1",0).attr("y1",l/2).attr("x2",l).attr("y2",l/2).attr("stroke-width",2).attr("stroke-dasharray",n.pluck("dashstyle")).attr("stroke",n.pluck("color")):g.append("rect").attr("width",l).attr("height",l).attr("fill",function(e){return e?e.color:"blue"}),g.append("text").text(p).attr("x",l+2).attr("y",function(){return l/2+(this.clientHeight?this.clientHeight:13)/2-2});var m=0,v=0;g.attr("transform",function(t,n){if(c){var r=!0===f?this.getBBox().width+u:h;m+r>d&&m>0&&(++v,m=0);var i="translate("+m+","+v*e()+")";return m+=r,i}return"translate(0,"+n*e()+")"})},o.x=function(e){return arguments.length?(a=e,o):a},o.y=function(e){return arguments.length?(s=e,o):s},o.gap=function(e){return arguments.length?(u=e,o):u},o.itemHeight=function(e){return arguments.length?(l=e,o):l},o.horizontal=function(e){return arguments.length?(c=e,o):c},o.legendWidth=function(e){return arguments.length?(d=e,o):d},o.itemWidth=function(e){return arguments.length?(h=e,o):h},o.autoItemWidth=function(e){return arguments.length?(f=e,o):f},o.legendText=function(e){return arguments.length?(p=e,o):p},o.maxItems=function(e){return arguments.length?(r=n.utils.isNumber(e)?e:void 0,o):r},o},n.scatterPlot=function(t,r){function i(e,t){return u(e)?w[t]?Math.pow(f,2):Math.pow(p,2):Math.pow(v,2)}function o(e,t){s.renderTitle()&&(e.selectAll("title").remove(),e.append("title").text(function(e){return s.title()(e)}))}function a(t,r){var i=s.chartBodyG().selectAll(".chart-body path.symbol").filter(function(){return t(e.select(this))}),o=l.size();l.size(Math.pow(r,2)),n.transition(i,s.transitionDuration(),s.transitionDelay()).attr("d",l),l.size(o)}var s=n.coordinateGridMixin({}),l=e.svg.symbol(),u=function(e){return e.value},c=s.keyAccessor();s.keyAccessor(function(e){return c(e)[0]}),s.valueAccessor(function(e){return c(e)[1]}),s.colorAccessor(function(){return s._groupName}),s.title(function(e){return s.keyAccessor()(e)+","+s.valueAccessor()(e)+": "+s.existenceAccessor()(e)});var d=function(e){return"translate("+s.x()(s.keyAccessor()(e))+","+s.y()(s.valueAccessor()(e))+")"},h=7,f=5,p=3,g=null,m=1,v=0,y=0,b=1,_=null,w=[];return l.size(i),n.override(s,"_filter",function(e){return arguments.length?s.__filter(n.filters.RangedTwoDimensionalFilter(e)):s.__filter()}),s.plotData=function(){var e=s.chartBodyG().selectAll("path.symbol").data(s.data());e.enter().append("path").attr("class","symbol").attr("opacity",0).attr("fill",s.getColor).attr("transform",d),e.call(o,s.data()),e.each(function(e,t){w[t]=!s.filter()||s.filter().isFiltered([e.key[0],e.key[1]])}),n.transition(e,s.transitionDuration(),s.transitionDelay()).attr("opacity",function(e,t){return u(e)?w[t]?b:s.excludedOpacity():y}).attr("fill",function(e,t){return _&&!u(e)?_:s.excludedColor()&&!w[t]?s.excludedColor():s.getColor(e)}).attr("transform",d).attr("d",l),n.transition(e.exit(),s.transitionDuration(),s.transitionDelay()).attr("opacity",0).remove()},s.existenceAccessor=function(e){return arguments.length?(u=e,this):u},s.symbol=function(e){return arguments.length?(l.type(e),s):l.type()},s.customSymbol=function(e){return arguments.length?(l=e,l.size(i),s):l},s.symbolSize=function(e){return arguments.length?(f=e,s):f},s.highlightedSize=function(e){return arguments.length?(h=e,s):h},s.excludedSize=function(e){return arguments.length?(p=e,s):p},s.excludedColor=function(e){return arguments.length?(g=e,s):g},s.excludedOpacity=function(e){return arguments.length?(m=e,s):m},s.hiddenSize=s.emptySize=function(e){return arguments.length?(v=e,s):v},s.emptyColor=function(e){return arguments.length?(_=e,s):_},s.emptyOpacity=function(e){return arguments.length?(y=e,s):y},s.nonemptyOpacity=function(e){return arguments.length?(b=e,s):y},s.legendables=function(){return[{chart:s,name:s._groupName,color:s.getColor()}]},s.legendHighlight=function(t){a(function(e){return e.attr("fill")===t.color},h),s.chartBodyG().selectAll(".chart-body path.symbol").filter(function(){return e.select(this).attr("fill")!==t.color}).classed("fadeout",!0)},s.legendReset=function(t){a(function(e){return e.attr("fill")===t.color},f),s.chartBodyG().selectAll(".chart-body path.symbol").filter(function(){return e.select(this).attr("fill")!==t.color}).classed("fadeout",!1)},s.setHandlePaths=function(){},s.extendBrush=function(){var e=s.brush().extent();return s.round()&&(e[0]=e[0].map(s.round()),e[1]=e[1].map(s.round()),s.g().select(".brush").call(s.brush().extent(e))),e},s.brushIsEmpty=function(e){return s.brush().empty()||!e||e[0][0]>=e[1][0]||e[0][1]>=e[1][1]},s._brushing=function(){var e=s.extendBrush();if(s.redrawBrush(s.g()),s.brushIsEmpty(e))n.events.trigger(function(){s.filter(null),s.redrawGroup()});else{var t=n.filters.RangedTwoDimensionalFilter(e);n.events.trigger(function(){s.filter(null),s.filter(t),s.redrawGroup()},n.constants.EVENT_DELAY)}},s.setBrushY=function(e){e.call(s.brush().y(s.y()))},s.anchor(t,r)},n.numberDisplay=function(t,r){var i,o=e.format(".2s"),a=n.baseMixin({}),s={one:"",some:"",none:""};return a._mandatoryAttributes(["group"]),a.html=function(e){return arguments.length?(e.none?s.none=e.none:e.one?s.none=e.one:e.some&&(s.none=e.some),e.one?s.one=e.one:e.some&&(s.one=e.some),e.some?s.some=e.some:e.one&&(s.some=e.one),a):s},a.value=function(){return a.data()},a.data(function(e){var t=e.value?e.value():e.top(1)[0];return a.valueAccessor()(t)}),a.transitionDuration(250),a.transitionDelay(0),a._doRender=function(){var t=a.value(),n=a.selectAll(".number-display");n.empty()&&(n=n.data([0]).enter().append("span").attr("class","number-display")),n.transition().duration(a.transitionDuration()).delay(a.transitionDelay()).ease("quad-out-in").tween("text",function(){var n=isFinite(i)?i:0,r=e.interpolateNumber(n||0,t);return i=t,function(e){var n=null,i=a.formatNumber()(r(e));0===t&&""!==s.none?n=s.none:1===t&&""!==s.one?n=s.one:""!==s.some&&(n=s.some),this.innerHTML=n?n.replace("%number",i):i}})},a._doRedraw=function(){return a._doRender()},a.formatNumber=function(e){return arguments.length?(o=e,a):o},a.anchor(t,r)},n.heatMap=function(t,r){function i(e,t){var r=d.selectAll(".box-group").filter(function(n){return n.key[e]===t}),i=r.filter(function(e){return!d.hasFilter(e.key)});n.events.trigger(function(){var e=i.empty()?r:i,t=e.data().map(function(e){return n.filters.TwoDimensionalFilter(e.key)});d._filter([t]),d.redrawGroup()})}function o(e,t,n){return!t||n[t-1]!==e}var a,s,l,u=6.75,c=6.75,d=n.colorMixin(n.marginMixin(n.baseMixin({})));d._mandatoryAttributes(["group"]),d.title(d.colorAccessor());var h=function(e){return e},f=function(e){return e};d.colsLabel=function(e){return arguments.length?(h=e,d):h},d.rowsLabel=function(e){return arguments.length?(f=e,d):f};var p=function(e){i(0,e)},g=function(e){i(1,e)},m=function(e){var t=e.key;n.events.trigger(function(){d.filter(t),d.redrawGroup()})};return n.override(d,"filter",function(e){return arguments.length?d._filter(n.filters.TwoDimensionalFilter(e)):d._filter()}),d.rows=function(t){if(arguments.length)return l=t,d;if(l)return l;var n=d.data().map(d.valueAccessor());return n.sort(e.ascending),e.scale.ordinal().domain(n.filter(o))},d.cols=function(t){if(arguments.length)return s=t,d;if(s)return s;var n=d.data().map(d.keyAccessor());return n.sort(e.ascending),e.scale.ordinal().domain(n.filter(o))},d._doRender=function(){return d.resetSvg(),a=d.svg().append("g").attr("class","heatmap").attr("transform","translate("+d.margins().left+","+d.margins().top+")"),d._doRedraw()},d._doRedraw=function(){var e=d.rows(),t=d.cols(),r=e.domain().length,i=t.domain().length,o=Math.floor(d.effectiveWidth()/i),s=Math.floor(d.effectiveHeight()/r);t.rangeRoundBands([0,d.effectiveWidth()]),e.rangeRoundBands([d.effectiveHeight(),0]);var l=a.selectAll("g.box-group").data(d.data(),function(e,t){return d.keyAccessor()(e,t)+"\0"+d.valueAccessor()(e,t)}),h=l.enter().append("g").attr("class","box-group");h.append("rect").attr("class","heat-box").attr("fill","white").on("click",d.boxOnClick()),d.renderTitle()&&(h.append("title"),l.select("title").text(d.title())),n.transition(l.select("rect"),d.transitionDuration(),d.transitionDelay()).attr("x",function(e,n){return t(d.keyAccessor()(e,n))}).attr("y",function(t,n){return e(d.valueAccessor()(t,n))}).attr("rx",u).attr("ry",c).attr("fill",d.getColor).attr("width",o).attr("height",s),l.exit().remove();var f=a.select("g.cols");f.empty()&&(f=a.append("g").attr("class","cols axis"));var p=f.selectAll("text").data(t.domain());p.enter().append("text").attr("x",function(e){return t(e)+o/2}).style("text-anchor","middle").attr("y",d.effectiveHeight()).attr("dy",12).on("click",d.xAxisOnClick()).text(d.colsLabel()),n.transition(p,d.transitionDuration(),d.transitionDelay()).text(d.colsLabel()).attr("x",function(e){return t(e)+o/2}).attr("y",d.effectiveHeight()),p.exit().remove();var g=a.select("g.rows");g.empty()&&(g=a.append("g").attr("class","rows axis"));var m=g.selectAll("text").data(e.domain());return m.enter().append("text").attr("dy",6).style("text-anchor","end").attr("x",0).attr("dx",-2).on("click",d.yAxisOnClick()).text(d.rowsLabel()),n.transition(m,d.transitionDuration(),d.transitionDelay()).text(d.rowsLabel()).attr("y",function(t){return e(t)+s/2}),m.exit().remove(),d.hasFilter()?d.selectAll("g.box-group").each(function(e){d.isSelectedNode(e)?d.highlightSelected(this):d.fadeDeselected(this)}):d.selectAll("g.box-group").each(function(){d.resetHighlight(this)}),d},d.boxOnClick=function(e){return arguments.length?(m=e,d):m},d.xAxisOnClick=function(e){return arguments.length?(p=e,d):p},d.yAxisOnClick=function(e){return arguments.length?(g=e,d):g},d.xBorderRadius=function(e){return arguments.length?(u=e,d):u},d.yBorderRadius=function(e){return arguments.length?(c=e,d):c},d.isSelectedNode=function(e){return d.hasFilter(e.key)},d.anchor(t,r)},function(){function t(e){return[0,e.length-1]}function n(t){return[e.quantile(t,.25),e.quantile(t,.5),e.quantile(t,.75)]}e.box=function(){function r(t){t.each(function(t,n){t=t.map(u).sort(e.ascending);var r=e.select(this),f=t.length,p=t[0],g=t[f-1],m=t.quartiles=d(t),v=c&&c.call(this,t,n),y=v&&v.map(function(e){return t[e]}),b=v?e.range(0,v[0]).concat(e.range(v[1]+1,f)):e.range(f),_=e.scale.linear().domain(l&&l.call(this,t,n)||[p,g]).range([o,0]),w=this.__chart__||e.scale.linear().domain([0,1/0]).range(_.range());this.__chart__=_;var C=r.selectAll("line.center").data(y?[y]:[]);C.enter().insert("line","rect").attr("class","center").attr("x1",i/2).attr("y1",function(e){return w(e[0])}).attr("x2",i/2).attr("y2",function(e){return w(e[1])}).style("opacity",1e-6).transition().duration(a).delay(s).style("opacity",1).attr("y1",function(e){return _(e[0])}).attr("y2",function(e){return _(e[1])}),C.transition().duration(a).delay(s).style("opacity",1).attr("x1",i/2).attr("x2",i/2).attr("y1",function(e){return _(e[0])}).attr("y2",function(e){return _(e[1])}),C.exit().transition().duration(a).delay(s).style("opacity",1e-6).attr("y1",function(e){return _(e[0])}).attr("y2",function(e){return _(e[1])}).remove();var A=r.selectAll("rect.box").data([m]);A.enter().append("rect").attr("class","box").attr("x",0).attr("y",function(e){return w(e[2])}).attr("width",i).attr("height",function(e){return w(e[0])-w(e[2])}).transition().duration(a).delay(s).attr("y",function(e){return _(e[2])}).attr("height",function(e){return _(e[0])-_(e[2])}),A.transition().duration(a).delay(s).attr("width",i).attr("y",function(e){return _(e[2])}).attr("height",function(e){return _(e[0])-_(e[2])});var E=r.selectAll("line.median").data([m[1]]);E.enter().append("line").attr("class","median").attr("x1",0).attr("y1",w).attr("x2",i).attr("y2",w).transition().duration(a).delay(s).attr("y1",_).attr("y2",_),E.transition().duration(a).delay(s).attr("x1",0).attr("x2",i).attr("y1",_).attr("y2",_);var S=r.selectAll("line.whisker").data(y||[]);S.enter().insert("line","circle, text").attr("class","whisker").attr("x1",0).attr("y1",w).attr("x2",i).attr("y2",w).style("opacity",1e-6).transition().duration(a).delay(s).attr("y1",_).attr("y2",_).style("opacity",1),S.transition().duration(a).delay(s).attr("x1",0).attr("x2",i).attr("y1",_).attr("y2",_).style("opacity",1),S.exit().transition().duration(a).delay(s).attr("y1",_).attr("y2",_).style("opacity",1e-6).remove();var x=r.selectAll("circle.outlier").data(b,Number);x.enter().insert("circle","text").attr("class","outlier").attr("r",5).attr("cx",i/2).attr("cy",function(e){return w(t[e])}).style("opacity",1e-6).transition().duration(a).delay(s).attr("cy",function(e){return _(t[e])}).style("opacity",1),x.transition().duration(a).delay(s).attr("cx",i/2).attr("cy",function(e){return _(t[e])}).style("opacity",1),x.exit().transition().duration(a).delay(s).attr("cy",function(e){return _(t[e])}).style("opacity",1e-6).remove();var F=h||_.tickFormat(8),k=r.selectAll("text.box").data(m);k.enter().append("text").attr("class","box").attr("dy",".3em").attr("dx",function(e,t){return 1&t?6:-6}).attr("x",function(e,t){return 1&t?i:0}).attr("y",w).attr("text-anchor",function(e,t){return 1&t?"start":"end"}).text(F).transition().duration(a).delay(s).attr("y",_),k.transition().duration(a).delay(s).text(F).attr("x",function(e,t){return 1&t?i:0}).attr("y",_);var D=r.selectAll("text.whisker").data(y||[]);D.enter().append("text").attr("class","whisker").attr("dy",".3em").attr("dx",6).attr("x",i).attr("y",w).text(F).style("opacity",1e-6).transition().duration(a).delay(s).attr("y",_).style("opacity",1),D.transition().duration(a).delay(s).text(F).attr("x",i).attr("y",_).style("opacity",1),D.exit().transition().duration(a).delay(s).attr("y",_).style("opacity",1e-6).remove()}),e.timer.flush()}var i=1,o=1,a=0,s=0,l=null,u=Number,c=t,d=n,h=null;return r.width=function(e){return arguments.length?(i=e,r):i},r.height=function(e){return arguments.length?(o=e,r):o},r.tickFormat=function(e){return arguments.length?(h=e,r):h},r.duration=function(e){return arguments.length?(a=e,r):a},r.domain=function(t){return arguments.length?(l=null===t?t:e.functor(t),r):l},r.value=function(e){return arguments.length?(u=e,r):u},r.whiskers=function(e){return arguments.length?(c=e,r):c},r.quartiles=function(e){return arguments.length?(d=e,r):d},r}}(),n.boxPlot=function(t,r){function i(e){return function(t){var n=t.quartiles[0],r=t.quartiles[2],i=(r-n)*e,o=-1,a=t.length;do{++o}while(t[o]r+i);return[o,a]}}function o(e){e.enter().append("g").attr("class","box").attr("transform",p).call(d).on("click",function(e){l.filter(l.keyAccessor()(e)),l.redrawGroup()})}function a(t){n.transition(t,l.transitionDuration(),l.transitionDelay()).attr("transform",p).call(d).each(function(){e.select(this).select("rect.box").attr("fill",l.getColor)})}function s(e){e.exit().remove().call(d)}var l=n.coordinateGridMixin({}),u=i,c=u(1.5),d=e.box(),h=null,f=function(e,t){return l.isOrdinal()?l.x().rangeBand():e/(1+l.boxPadding())/t};l.yAxisPadding(12),l.x(e.scale.ordinal()),l.xUnits(n.units.ordinal),l.data(function(e){return e.all().map(function(e){return e.map=function(t){return t.call(e,e)},e}).filter(function(e){return 0!==l.valueAccessor()(e).length})}),l.boxPadding=l._rangeBandPadding,l.boxPadding(.8),l.outerPadding=l._outerRangeBandPadding,l.outerPadding(.5),l.boxWidth=function(t){return arguments.length?(f=e.functor(t),l):f};var p=function(e,t){return"translate("+l.x()(l.keyAccessor()(e,t))+", 0)"};return l._preprocessData=function(){l.elasticX()&&l.x().domain([])},l.plotData=function(){var e=f(l.effectiveWidth(),l.xUnitCount());d.whiskers(c).width(e).height(l.effectiveHeight()).value(l.valueAccessor()).domain(l.y().domain()).duration(l.transitionDuration()).tickFormat(h);var t=l.chartBodyG().selectAll("g.box").data(l.data(),l.keyAccessor());o(t),a(t),s(t),l.fadeDeselectedArea()},l.fadeDeselectedArea=function(){if(l.hasFilter())if(l.isOrdinal())l.g().selectAll("g.box").each(function(e){l.isSelectedNode(e)?l.highlightSelected(this):l.fadeDeselected(this)});else{var e=l.brush().extent(),t=e[0],n=e[1],r=l.keyAccessor();l.g().selectAll("g.box").each(function(e){var i=r(e);i=n?l.fadeDeselected(this):l.highlightSelected(this)})}else l.g().selectAll("g.box").each(function(){l.resetHighlight(this)})},l.isSelectedNode=function(e){return l.hasFilter(l.keyAccessor()(e))},l.yAxisMin=function(){var t=e.min(l.data(),function(t){return e.min(l.valueAccessor()(t))});return n.utils.subtract(t,l.yAxisPadding())},l.yAxisMax=function(){var t=e.max(l.data(),function(t){return e.max(l.valueAccessor()(t))});return n.utils.add(t,l.yAxisPadding())},l.tickFormat=function(e){return arguments.length?(h=e,l):h},l.anchor(t,r)},n.abstractBubbleChart=n.bubbleMixin,n.baseChart=n.baseMixin,n.capped=n.capMixin,n.colorChart=n.colorMixin,n.coordinateGridChart=n.coordinateGridMixin,n.marginable=n.marginMixin,n.stackableChart=n.stackMixin,n.d3=e,n.crossfilter=t,n}r=[t(31),t(326)],n=o,void 0!==(i="function"==typeof n?n.apply(exports,r):n)&&(e.exports=i)}()},function(e,exports){+function($){"use strict";function e(e){return this.each(function(){var n=$(this),r=n.data("bs.tooltip"),i="object"==typeof e&&e;!r&&/destroy|hide/.test(e)||(r||n.data("bs.tooltip",r=new t(this,i)),"string"==typeof e&&r[e]())})}var t=function(e,t){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",e,t)};t.VERSION="3.3.7",t.TRANSITION_DURATION=150,t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},t.prototype.init=function(e,t,n){if(this.enabled=!0,this.type=e,this.$element=$(t),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&$($.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var r=this.options.trigger.split(" "),i=r.length;i--;){var o=r[i];if("click"==o)this.$element.on("click."+this.type,this.options.selector,$.proxy(this.toggle,this));else if("manual"!=o){var a="hover"==o?"mouseenter":"focusin",s="hover"==o?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,$.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,$.proxy(this.leave,this))}}this.options.selector?this._options=$.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.getOptions=function(e){return e=$.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},t.prototype.getDelegateOptions=function(){var e={},t=this.getDefaults();return this._options&&$.each(this._options,function(n,r){t[n]!=r&&(e[n]=r)}),e},t.prototype.enter=function(e){var t=e instanceof this.constructor?e:$(e.currentTarget).data("bs."+this.type);return t||(t=new this.constructor(e.currentTarget,this.getDelegateOptions()),$(e.currentTarget).data("bs."+this.type,t)),e instanceof $.Event&&(t.inState["focusin"==e.type?"focus":"hover"]=!0),t.tip().hasClass("in")||"in"==t.hoverState?void(t.hoverState="in"):(clearTimeout(t.timeout),t.hoverState="in",t.options.delay&&t.options.delay.show?void(t.timeout=setTimeout(function(){"in"==t.hoverState&&t.show()},t.options.delay.show)):t.show())},t.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},t.prototype.leave=function(e){var t=e instanceof this.constructor?e:$(e.currentTarget).data("bs."+this.type);if(t||(t=new this.constructor(e.currentTarget,this.getDelegateOptions()),$(e.currentTarget).data("bs."+this.type,t)),e instanceof $.Event&&(t.inState["focusout"==e.type?"focus":"hover"]=!1),!t.isInStateTrue()){if(clearTimeout(t.timeout),t.hoverState="out",!t.options.delay||!t.options.delay.hide)return t.hide();t.timeout=setTimeout(function(){"out"==t.hoverState&&t.hide()},t.options.delay.hide)}},t.prototype.show=function(){var e=$.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var n=$.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!n)return;var r=this,i=this.tip(),o=this.getUID(this.type);this.setContent(),i.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&i.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,l=s.test(a);l&&(a=a.replace(s,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?i.appendTo(this.options.container):i.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var u=this.getPosition(),c=i[0].offsetWidth,d=i[0].offsetHeight;if(l){var h=a,f=this.getPosition(this.$viewport);a="bottom"==a&&u.bottom+d>f.bottom?"top":"top"==a&&u.top-df.width?"left":"left"==a&&u.left-ca.top+a.height&&(i.top=a.top+a.height-l)}else{var u=t.left-o,c=t.left+o+n;ua.right&&(i.left=a.left+a.width-c)}return i},t.prototype.getTitle=function(){var e=this.$element,t=this.options;return e.attr("data-original-title")||("function"==typeof t.title?t.title.call(e[0]):t.title)},t.prototype.getUID=function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},t.prototype.tip=function(){if(!this.$tip&&(this.$tip=$(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.toggleEnabled=function(){this.enabled=!this.enabled},t.prototype.toggle=function(e){var t=this;e&&((t=$(e.currentTarget).data("bs."+this.type))||(t=new this.constructor(e.currentTarget,this.getDelegateOptions()),$(e.currentTarget).data("bs."+this.type,t))),e?(t.inState.click=!t.inState.click,t.isInStateTrue()?t.enter(t):t.leave(t)):t.tip().hasClass("in")?t.leave(t):t.enter(t)},t.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide(function(){e.$element.off("."+e.type).removeData("bs."+e.type),e.$tip&&e.$tip.detach(),e.$tip=null,e.$arrow=null,e.$viewport=null,e.$element=null})};var n=$.fn.tooltip;$.fn.tooltip=e,$.fn.tooltip.Constructor=t,$.fn.tooltip.noConflict=function(){return $.fn.tooltip=n,this}}(jQuery)},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0,clientOffset:null},n=t.publishSource,r=t.clientOffset,i=t.getSourceClientOffset;(0,c.default)((0,h.default)(e),"Expected sourceIds to be an array.");var o=this.getMonitor(),a=this.getRegistry();(0,c.default)(!o.isDragging(),"Cannot call beginDrag while dragging.");for(var s=0;s=0;u--)if(o.canDragSource(e[u])){l=e[u];break}if(null!==l){var d=null;r&&((0,c.default)("function"==typeof i,"When clientOffset is provided, getSourceClientOffset must be a function."),d=i(l));var f=a.getSource(l),g=f.beginDrag(o,l);(0,c.default)((0,p.default)(g),"Item must be an object."),a.pinSource(l);var m=a.getSourceType(l);return{type:v,itemType:m,item:g,sourceId:l,clientOffset:r,sourceClientOffset:d,isSourcePublic:n}}}function i(){if(this.getMonitor().isDragging())return{type:y}}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.clientOffset,r=void 0===n?null:n;(0,c.default)((0,h.default)(e),"Expected targetIds to be an array.");var i=e.slice(0),o=this.getMonitor(),a=this.getRegistry();(0,c.default)(o.isDragging(),"Cannot call hover while not dragging."),(0,c.default)(!o.didDrop(),"Cannot call hover after drop.");for(var s=0;s=0;f--){var p=i[f],g=a.getTargetType(p);(0,m.default)(g,d)||i.splice(f,1)}for(var v=0;v0&&void 0!==arguments[0]?arguments[0]:{},n=this.getMonitor(),r=this.getRegistry();(0,c.default)(n.isDragging(),"Cannot call drop while not dragging."),(0,c.default)(!n.didDrop(),"Cannot call drop twice during one drag operation.");var i=n.getTargetIds().filter(n.canDropOnTarget,n);i.reverse(),i.forEach(function(i,o){var a=r.getTarget(i),s=a.drop(n,i);(0,c.default)(void 0===s||(0,p.default)(s),"Drop result must either be an object or undefined."),void 0===s&&(s=0===o?{}:n.getDropResult()),e.store.dispatch({type:_,dropResult:l({},t,s)})})}function s(){var e=this.getMonitor(),t=this.getRegistry();(0,c.default)(e.isDragging(),"Cannot call endDrag while not dragging.");var n=e.getSourceId();return t.getSource(n,!0).endDrag(e,n),t.unpinSource(),{type:w}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.END_DRAG=exports.DROP=exports.HOVER=exports.PUBLISH_DRAG_SOURCE=exports.BEGIN_DRAG=void 0;var l=Object.assign||function(e){for(var t=1;t",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,n){n=$(n||this.defaultElement||this)[0],this.element=$(n),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=$(),this.hoverable=$(),this.focusable=$(),this.classesElementLookup={},n!==this&&($.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===n&&this.destroy()}}),this.document=$(n.style?n.ownerDocument:n.document||n),this.window=$(this.document[0].defaultView||this.document[0].parentWindow)),this.options=$.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:$.noop,_create:$.noop,_init:$.noop,destroy:function(){var e=this;this._destroy(),$.each(this.classesElementLookup,function(t,n){e._removeClass(n,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:$.noop,widget:function(){return this.element},option:function(e,t){var n,r,i,o=e;if(0===arguments.length)return $.widget.extend({},this.options);if("string"==typeof e)if(o={},n=e.split("."),e=n.shift(),n.length){for(r=o[e]=$.widget.extend({},this.options[e]),i=0;i'+P.getReadableFieldChartStatisticalFunction(this.props.config.valuetype)+" "+this.props.config.field+": "+n+'
'+t+"
"},_resizeVisualization:function(e,t){this.graph.width(e).height(t),this.triggerRender=!0},drawData:function(){var e=this;this.graph.xUnits(function(){return Math.max(e.state.dataPoints.length-1,1)}),this.graphData.remove(),this.graphData.add(this.state.dataPoints),this.triggerRender?(this.graph.render(),this.triggerRender=!1):this.graph.redraw(),this.props.config.threshold&&this.renderThreshold()},renderThreshold:function(){var e=this.props.config.threshold,t=this.props.config.threshold_color||"#f00",n=this.props.config.threshold_tooltip||"threshold: "+e;this.graph.on("renderlet.threshold",function(r){var i=[{x:r.x().range()[0],y:r.y()(e)},{x:r.x().range()[1],y:r.y()(e)}],o=v.default.svg.line().x(function(e){return e.x}).y(function(e){return e.y}).interpolate("linear"),a=r.select("g.chart-body"),s=a.selectAll("path.threshold").data([i]);s.attr("stroke",t).attr("d",o),s.enter().append("path").attr("class","threshold").attr("stroke",t).attr("stroke-width",1).attr("stroke-dasharray","2").attr("d",o),s.exit().remove();var l=r.data().reduce(function(e,t){return t.values.forEach(function(t){return e.push(t.x)}),e},[]),u=a.selectAll("circle.threshold").data(l);u.enter().append("circle").attr("class","threshold").attr("r",4).attr("rel","tooltip").attr("data-original-title",function(){return'
'+w.default.escape(n)+"
"}).style("stroke-opacity",1e-6).style("fill-opacity",1e-6).on("mousemove",function(){v.default.select(this).style("stroke-opacity",.8).style("fill-opacity",.8)}).on("mouseout",function(){v.default.select(this).style("stroke-opacity",1e-6).style("fill-opacity",1e-6)}),u.attr("cx",function(e){return g.default.utils.safeNumber(r.x()(e))}).attr("cy",function(){return g.default.utils.safeNumber(r.y()(e))}).attr("data-original-title",function(){return'
'+n+"
"}).attr("fill",t),u.exit().remove()})},renderGraph:function(){var e=u.default.findDOMNode(this);this.graph=L.create(this.props.config,e,this._formatTooltipTitle),this.graph.width(this.props.width).height(this.props.height).margins({left:50,right:15,top:10,bottom:35}).dimension(this.dimension).group(this.group).x(v.default.time.scale()).elasticX(!0).elasticY(!0).renderHorizontalGridLines(!0).brushOn(!1).xAxisLabel("Time").yAxisLabel(this.props.config.field).renderTitle(!1).colors(F.default.glColourPalette()),(0,O.default)(e).tooltip({selector:'[rel="tooltip"]',container:"body",placement:"auto",delay:{show:300,hide:100},html:!0}),this.graph.xAxis().ticks(M.default.customTickInterval()).tickFormat(M.default.customDateTimeFormat()),this.graph.yAxis().ticks(3).tickFormat(function(e){return Math.abs(e)>1e30?e.toPrecision(1):v.default.format(".2s")(e)}),this.graph.render()},render:function(){return s.default.createElement("div",{id:"visualization-"+this.props.id,className:"graph "+this.props.config.renderer})}});exports.default=P,e.exports=exports.default}).call(exports,t(21))},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(23),i=n(r),o=t(360),a=n(o),s={formatMessageSummary:function(e){var t=e.message;return this.formatMessage(t._id,e.index,t,t,e.highlight_ranges,e.decoration_stats)},formatResultMessage:function(e){var t=e.message;return this.formatMessage(t.id,e.index,t,t.fields,e.highlight_ranges,e.decoration_stats)},formatMessage:function(e,t,n,r,o,s){var l=a.default.filterFields(r);return{id:e,timestamp:(0,i.default)(n.timestamp).unix(),filtered_fields:l,formatted_fields:l,fields:r,index:t,source_node_id:r.gl2_source_node,source_input_id:r.gl2_source_input,stream_ids:n.streams,highlight_ranges:o,decoration_stats:s}}};exports.default=s,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n={nowInSeconds:function(){return Math.floor(Date.now()/1e3)}};exports.default=n,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={container:"DayPicker",interactionDisabled:"DayPicker--interactionDisabled",month:"DayPicker-Month",navBar:"DayPicker-NavBar",navButtonPrev:"DayPicker-NavButton DayPicker-NavButton--prev",navButtonNext:"DayPicker-NavButton DayPicker-NavButton--next",caption:"DayPicker-Caption",weekdays:"DayPicker-Weekdays",weekdaysRow:"DayPicker-WeekdaysRow",weekday:"DayPicker-Weekday",body:"DayPicker-Body",week:"DayPicker-Week",weekNumber:"DayPicker-WeekNumber",day:"DayPicker-Day",footer:"DayPicker-Footer",todayButton:"DayPicker-TodayButton",today:"today",selected:"selected",disabled:"disabled",outside:"outside"}},function(e,exports,t){"use strict";function n(e){e.preventDefault(),e.stopPropagation()}function r(e){return new Date(e.getFullYear(),e.getMonth(),1,12)}function i(e){var t=r(e);return t.setMonth(t.getMonth()+1),t.setDate(t.getDate()-1),t.getDate()}function o(e){var t=d({},e.modifiers);return e.selectedDays&&(t[e.classNames.selected]=e.selectedDays),e.disabledDays&&(t[e.classNames.disabled]=e.disabledDays),t}function a(e){var t=e.firstDayOfWeek,n=e.locale,r=void 0===n?"en":n,i=e.localeUtils,o=void 0===i?{}:i;return isNaN(t)?o.getFirstDayOfWeek?o.getFirstDayOfWeek(r):0:t}function s(e){return!!(e&&e.from&&e.to)}function l(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}function u(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,f.getFirstDayOfWeek)(),n=arguments[2],r=i(e),o=[],a=[],s=[],l=1;l<=r;l+=1)o.push(new Date(e.getFullYear(),e.getMonth(),l,12));o.forEach(function(e){a.length>0&&e.getDay()===t&&(s.push(a),a=[]),a.push(e),o.indexOf(e)===o.length-1&&s.push(a)});for(var u=s[0],c=7-u.length;c>0;c-=1){var d=(0,h.clone)(u[0]);d.setDate(u[0].getDate()-1),u.unshift(d)}for(var p=s[s.length-1],g=p.length;g<7;g+=1){var m=(0,h.clone)(p[p.length-1]);m.setDate(p[p.length-1].getDate()+1),p.push(m)}if(n&&s.length<6)for(var v=void 0,y=s.length;y<6;y+=1){v=s[s.length-1];for(var b=v[v.length-1],_=[],w=0;w<7;w+=1){var C=(0,h.clone)(b);C.setDate(b.getDate()+w+1),_.push(C)}s.push(_)}return s}function c(e){var t=(0,h.clone)(e);return t.setDate(1),t.setHours(12,0,0,0),t}Object.defineProperty(exports,"__esModule",{value:!0});var d=Object.assign||function(e){for(var t=1;t-1}function w(e,t){var n=this.__data__,r=N(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function C(e){var t=-1,n=null==e?0:e.length;for(this.clear();++tu))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var h=-1,f=!0,p=n&_e?new k:void 0;for(s.set(e,t),s.set(t,e);++h-1&&e%1==0&&e-1&&e%1==0&&e<=we}function he(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function fe(e){return null!=e&&"object"==typeof e}function pe(e){return le(e)?I(e):q(e)}function ge(){return[]}function me(){return!1}var ve=200,ye="__lodash_hash_undefined__",be=1,_e=2,we=9007199254740991,Ce="[object Arguments]",Ae="[object Array]",Ee="[object AsyncFunction]",Se="[object Boolean]",xe="[object Date]",Fe="[object Error]",ke="[object Function]",De="[object GeneratorFunction]",Te="[object Map]",Me="[object Number]",Re="[object Null]",Oe="[object Object]",Le="[object Proxy]",Pe="[object RegExp]",Be="[object Set]",Ie="[object String]",$e="[object Symbol]",Ne="[object Undefined]",je="[object ArrayBuffer]",ze="[object DataView]",He=/[\\^$.*+?()[\]{}|]/g,Ue=/^\[object .+?Constructor\]$/,Ve=/^(?:0|[1-9]\d*)$/,Ge={};Ge["[object Float32Array]"]=Ge["[object Float64Array]"]=Ge["[object Int8Array]"]=Ge["[object Int16Array]"]=Ge["[object Int32Array]"]=Ge["[object Uint8Array]"]=Ge["[object Uint8ClampedArray]"]=Ge["[object Uint16Array]"]=Ge["[object Uint32Array]"]=!0,Ge[Ce]=Ge[Ae]=Ge[je]=Ge[Se]=Ge[ze]=Ge[xe]=Ge[Fe]=Ge[ke]=Ge[Te]=Ge[Me]=Ge[Oe]=Ge[Pe]=Ge[Be]=Ge[Ie]=Ge["[object WeakMap]"]=!1;var We="object"==typeof e&&e&&e.Object===Object&&e,qe="object"==typeof self&&self&&self.Object===Object&&self,Ke=We||qe||Function("return this")(),Ye="object"==typeof exports&&exports&&!exports.nodeType&&exports,Xe=Ye&&"object"==typeof t&&t&&!t.nodeType&&t,Qe=Xe&&Xe.exports===Ye,Ze=Qe&&We.process,Je=function(){try{return Ze&&Ze.binding&&Ze.binding("util")}catch(e){}}(),et=Je&&Je.isTypedArray,tt=Array.prototype,nt=Function.prototype,rt=Object.prototype,it=Ke["__core-js_shared__"],ot=nt.toString,at=rt.hasOwnProperty,st=function(){var e=/[^.]+$/.exec(it&&it.keys&&it.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),lt=rt.toString,ut=RegExp("^"+ot.call(at).replace(He,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ct=Qe?Ke.Buffer:void 0,dt=Ke.Symbol,ht=Ke.Uint8Array,ft=rt.propertyIsEnumerable,pt=tt.splice,gt=dt?dt.toStringTag:void 0,mt=Object.getOwnPropertySymbols,vt=ct?ct.isBuffer:void 0,yt=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),bt=J(Ke,"DataView"),_t=J(Ke,"Map"),wt=J(Ke,"Promise"),Ct=J(Ke,"Set"),At=J(Ke,"WeakMap"),Et=J(Object,"create"),St=ae(bt),xt=ae(_t),Ft=ae(wt),kt=ae(Ct),Dt=ae(At),Tt=dt?dt.prototype:void 0,Mt=Tt?Tt.valueOf:void 0;c.prototype.clear=d,c.prototype.delete=h,c.prototype.get=f,c.prototype.has=p,c.prototype.set=g,m.prototype.clear=v,m.prototype.delete=y,m.prototype.get=b,m.prototype.has=_,m.prototype.set=w,C.prototype.clear=A,C.prototype.delete=E,C.prototype.get=S,C.prototype.has=x,C.prototype.set=F,k.prototype.add=k.prototype.push=D,k.prototype.has=T,M.prototype.clear=R,M.prototype.delete=O,M.prototype.get=L,M.prototype.has=P,M.prototype.set=B;var Rt=mt?function(e){return null==e?[]:(e=Object(e),n(mt(e),function(t){return ft.call(e,t)}))}:ge,Ot=z;(bt&&Ot(new bt(new ArrayBuffer(1)))!=ze||_t&&Ot(new _t)!=Te||wt&&"[object Promise]"!=Ot(wt.resolve())||Ct&&Ot(new Ct)!=Be||At&&"[object WeakMap]"!=Ot(new At))&&(Ot=function(e){var t=z(e),n=t==Oe?e.constructor:void 0,r=n?ae(n):"";if(r)switch(r){case St:return ze;case xt:return Te;case Ft:return"[object Promise]";case kt:return Be;case Dt:return"[object WeakMap]"}return t});var Lt=H(function(){return arguments}())?H:function(e){return fe(e)&&at.call(e,"callee")&&!ft.call(e,"callee")},Pt=Array.isArray,Bt=vt||me,It=et?function(e){return function(t){return e(t)}}(et):W;t.exports=ue}).call(exports,t(21),t(40)(e))},function(e,exports,t){var n=t(61),r=n.Symbol;e.exports=r},function(e,exports,t){function n(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t-1}var r=t(490);e.exports=n},function(e,exports){function t(e,t,n){for(var r=-1,i=null==e?0:e.length;++r=this.maxSize&&(this.list.remove(i),delete this.hash[i.key],this.size--),(n=this.hash[e])?(n.val=t,this.list.moveToFront(n)):(n=new r(e,t),this.list.add(n),this.hash[e]=n,this.size++)},get:function(e){var t=this.hash[e];if(t)return this.list.moveToFront(t),t.val},reset:function(){this.size=0,this.hash={},this.list=new n}}),e.mixin(n.prototype,{add:function(e){this.head&&(e.next=this.head,this.head.prev=e),this.head=e,this.tail=this.tail||e},remove:function(e){e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev},moveToFront:function(e){this.remove(e),this.add(e)}}),t}(),i=function(){"use strict";function t(t,n){this.prefix=["__",t,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+e.escapeRegExChars(this.prefix)),this.ls=n||a,!this.ls&&this._noop()}function n(){return(new Date).getTime()}function r(t){return JSON.stringify(e.isUndefined(t)?null:t)}function i(e){return $.parseJSON(e)}function o(e){var t,n,r=[],i=a.length;for(t=0;tr)}}),t}(),o=function(){"use strict";function t(e){e=e||{},this.cancelled=!1,this.lastReq=null,this._send=e.transport,this._get=e.limiter?e.limiter(this._get):this._get,this._cache=!1===e.cache?new r(0):a}var n=0,i={},o=6,a=new r(10);return t.setMaxPendingRequests=function(e){o=e},t.resetCache=function(){a.reset()},e.mixin(t.prototype,{_fingerprint:function(e){return e=e||{},e.url+e.type+$.param(e.data||{})},_get:function(e,t){function r(e){t(null,e),c._cache.set(l,e)}function a(){t(!0)}function s(){n--,delete i[l],c.onDeckRequestArgs&&(c._get.apply(c,c.onDeckRequestArgs),c.onDeckRequestArgs=null)}var l,u,c=this;l=this._fingerprint(e),this.cancelled||l!==this.lastReq||((u=i[l])?u.done(r).fail(a):nt[r]?r++:(i.push(e[n]),n++,r++);return i}var a="c",s="i";return e.mixin(t.prototype,{bootstrap:function(e){this.datums=e.datums,this.trie=e.trie},add:function(t){var i=this;t=e.isArray(t)?t:[t],e.each(t,function(t){var o,l;i.datums[o=i.identify(t)]=t,l=n(i.datumTokenizer(t)),e.each(l,function(e){var t,n,l;for(t=i.trie,n=e.split("");l=n.shift();)t=t[a][l]||(t[a][l]=r()),t[s].push(o)})})},get:function(t){var n=this;return e.map(t,function(e){return n.datums[e]})},search:function(t){var r,l,u=this;return r=n(this.queryTokenizer(t)),e.each(r,function(e){var t,n,r,i;if(l&&0===l.length)return!1;for(t=u.trie,n=e.split("");t&&(r=n.shift());)t=t[a][r];if(!t||0!==n.length)return l=[],!1;i=t[s].slice(0),l=l?o(l,i):i}),l?e.map(i(l),function(e){return u.datums[e]}):[]},all:function(){var e=[];for(var t in this.datums)e.push(this.datums[t]);return e},reset:function(){this.datums={},this.trie=r()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),t}(),s=function(){"use strict";function t(e){this.url=e.url,this.ttl=e.ttl,this.cache=e.cache,this.prepare=e.prepare,this.transform=e.transform,this.transport=e.transport,this.thumbprint=e.thumbprint,this.storage=new i(e.cacheKey)}var n;return n={data:"data",protocol:"protocol",thumbprint:"thumbprint"},e.mixin(t.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},store:function(e){this.cache&&(this.storage.set(n.data,e,this.ttl),this.storage.set(n.protocol,location.protocol,this.ttl),this.storage.set(n.thumbprint,this.thumbprint,this.ttl))},fromCache:function(){var e,t={};return this.cache?(t.data=this.storage.get(n.data),t.protocol=this.storage.get(n.protocol),t.thumbprint=this.storage.get(n.thumbprint),e=t.thumbprint!==this.thumbprint||t.protocol!==location.protocol,t.data&&!e?t.data:null):null},fromNetwork:function(e){function t(){e(!0)}function n(t){e(null,i.transform(t))}var r,i=this;e&&(r=this.prepare(this._settings()),this.transport(r).fail(t).done(n))},clear:function(){return this.storage.clear(),this}}),t}(),l=function(){"use strict";function t(e){this.url=e.url,this.prepare=e.prepare,this.transform=e.transform,this.transport=new o({cache:e.cache,limiter:e.limiter,transport:e.transport})}return e.mixin(t.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},get:function(e,t){function n(e,n){t(e?[]:i.transform(n))}var r,i=this;if(t)return e=e||"",r=this.prepare(e,this._settings()),this.transport.get(r,n)},cancelLastRequest:function(){this.transport.cancel()}}),t}(),u=function(){"use strict";function n(n){var r;return n?(r={url:null,ttl:864e5,cache:!0,cacheKey:null,thumbprint:"",prepare:e.identity,transform:e.identity,transport:null},n=e.isString(n)?{url:n}:n,n=e.mixin(r,n),!n.url&&$.error("prefetch requires url to be set"),n.transform=n.filter||n.transform,n.cacheKey=n.cacheKey||n.url,n.thumbprint=t+n.thumbprint,n.transport=n.transport?a(n.transport):$.ajax,n):null}function r(t){var n;if(t)return n={url:null,cache:!0,prepare:null,replace:null,wildcard:null,limiter:null,rateLimitBy:"debounce",rateLimitWait:300,transform:e.identity,transport:null},t=e.isString(t)?{url:t}:t,t=e.mixin(n,t),!t.url&&$.error("remote requires url to be set"),t.transform=t.filter||t.transform,t.prepare=i(t),t.limiter=o(t),t.transport=t.transport?a(t.transport):$.ajax,delete t.replace,delete t.wildcard,delete t.rateLimitBy,delete t.rateLimitWait,t}function i(e){function t(e,t){return t.url=o(t.url,e),t}function n(e,t){return t.url=t.url.replace(a,encodeURIComponent(e)),t}function r(e,t){return t}var i,o,a;return i=e.prepare,o=e.replace,a=e.wildcard,i||(i=o?t:e.wildcard?n:r)}function o(t){var n,r,i;return n=t.limiter,r=t.rateLimitBy,i=t.rateLimitWait,n||(n=/^throttle$/i.test(r)?function(t){return function(n){return e.throttle(n,t)}}(i):function(t){return function(n){return e.debounce(n,t)}}(i)),n}function a(t){return function(n){function r(t){e.defer(function(){o.resolve(t)})}function i(t){e.defer(function(){o.reject(t)})}var o=$.Deferred();return t(n,r,i),o}}return function(t){var i,o;return i={initialize:!0,identify:e.stringify,datumTokenizer:null,queryTokenizer:null,sufficient:5,sorter:null,local:[],prefetch:null,remote:null},t=e.mixin(i,t||{}),!t.datumTokenizer&&$.error("datumTokenizer is required"),!t.queryTokenizer&&$.error("queryTokenizer is required"),o=t.sorter,t.sorter=o?function(e){return e.sort(o)}:e.identity,t.local=e.isFunction(t.local)?t.local():t.local,t.prefetch=n(t.prefetch),t.remote=r(t.remote),t}}();return function(){"use strict";function t(e){e=u(e),this.sorter=e.sorter,this.identify=e.identify,this.sufficient=e.sufficient,this.local=e.local,this.remote=e.remote?new l(e.remote):null,this.prefetch=e.prefetch?new s(e.prefetch):null,this.index=new a({identify:this.identify,datumTokenizer:e.datumTokenizer,queryTokenizer:e.queryTokenizer}),!1!==e.initialize&&this.initialize()}var r;return r=window&&window.Bloodhound,t.noConflict=function(){return window&&(window.Bloodhound=r),t},t.tokenizers=n,e.mixin(t.prototype,{__ttAdapter:function(){function e(e,t,r){return n.search(e,t,r)}function t(e,t){return n.search(e,t)}var n=this;return this.remote?e:t},_loadPrefetch:function(){function e(e,n){if(e)return t.reject();r.add(n),r.prefetch.store(r.index.serialize()),t.resolve()}var t,n,r=this;return t=$.Deferred(),this.prefetch?(n=this.prefetch.fromCache())?(this.index.bootstrap(n),t.resolve()):this.prefetch.fromNetwork(e):t.resolve(),t.promise()},_initialize:function(){function e(){t.add(t.local)}var t=this;return this.clear(),(this.initPromise=this._loadPrefetch()).done(e),this.initPromise},initialize:function(e){return!this.initPromise||e?this._initialize():this.initPromise},add:function(e){return this.index.add(e),this},get:function(t){return t=e.isArray(t)?t:[].slice.call(arguments),this.index.get(t)},search:function(t,n,r){function i(t){var n=[];e.each(t,function(t){!e.some(o,function(e){return a.identify(t)===a.identify(e)})&&n.push(t)}),r&&r(n)}var o,a=this;return o=this.sorter(this.index.search(t)),n(this.remote?o.slice():o),this.remote&&o.length',menu:'
'}}function r(t){var n={};return e.each(t,function(e,t){n[t]="."+e}),n}function i(){var t={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},menu:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};return e.isMsie()&&e.mixin(t.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),t}var o={wrapper:"twitter-typeahead",input:"tt-input",hint:"tt-hint",menu:"tt-menu",dataset:"tt-dataset",suggestion:"tt-suggestion",selectable:"tt-selectable",empty:"tt-empty",open:"tt-open",cursor:"tt-cursor",highlight:"tt-highlight"};return t}(),r=function(){"use strict";function t(e){e&&e.el||$.error("EventBus initialized without el"),this.$el=$(e.el)}var n,r;return n="typeahead:",r={render:"rendered",cursorchange:"cursorchanged",select:"selected",autocomplete:"autocompleted"},e.mixin(t.prototype,{_trigger:function(e,t){var r;return r=$.Event(n+e),(t=t||[]).unshift(r),this.$el.trigger.apply(this.$el,t),r},before:function(e){var t,n;return t=[].slice.call(arguments,1),n=this._trigger("before"+e,t),n.isDefaultPrevented()},trigger:function(e){var t;this._trigger(e,[].slice.call(arguments,1)),(t=r[e])&&this._trigger(t,[].slice.call(arguments,1))}}),t}(),i=function(){"use strict";function e(e,t,n,r){var i;if(!n)return this;for(t=t.split(l),n=r?s(n,r):n,this._callbacks=this._callbacks||{};i=t.shift();)this._callbacks[i]=this._callbacks[i]||{sync:[],async:[]},this._callbacks[i][e].push(n);return this}function t(t,n,r){return e.call(this,"async",t,n,r)}function r(t,n,r){return e.call(this,"sync",t,n,r)}function i(e){var t;if(!this._callbacks)return this;for(e=e.split(l);t=e.shift();)delete this._callbacks[t];return this}function o(e){var t,n,r,i,o;if(!this._callbacks)return this;for(e=e.split(l),r=[].slice.call(arguments,1);(t=e.shift())&&(n=this._callbacks[t]);)i=a(n.sync,this,[t].concat(r)),o=a(n.async,this,[t].concat(r)),i()&&u(o);return this}function a(e,t,n){function r(){for(var r,i=0,o=e.length;!r&&i
")}}),t}(),s=function(){"use strict";function t(t,i){t=t||{},t.templates=t.templates||{},t.templates.notFound=t.templates.notFound||t.templates.empty,t.source||$.error("missing source"),t.node||$.error("missing node"),t.name&&!a(t.name)&&$.error("invalid dataset name: "+t.name),i.mixin(this),this.highlight=!!t.highlight,this.name=t.name||l(),this.limit=t.limit||5,this.displayFn=n(t.display||t.displayKey),this.templates=r(t.templates,this.displayFn),this.source=t.source.__ttAdapter?t.source.__ttAdapter():t.source,this.async=e.isUndefined(t.async)?this.source.length>2:!!t.async,this._resetLastSuggestion(),this.$el=$(t.node).addClass(this.classes.dataset).addClass(this.classes.dataset+"-"+this.name)}function n(t){function n(e){return e[t]}return t=t||e.stringify,e.isFunction(t)?t:n}function r(t,n){function r(e){return $("
").text(n(e))}return{notFound:t.notFound&&e.templatify(t.notFound),pending:t.pending&&e.templatify(t.pending),header:t.header&&e.templatify(t.header),footer:t.footer&&e.templatify(t.footer),suggestion:t.suggestion||r}}function a(e){return/^[_a-zA-Z0-9-]+$/.test(e)}var s,l;return s={val:"tt-selectable-display",obj:"tt-selectable-object"},l=e.getIdGenerator(),t.extractData=function(e){var t=$(e);return t.data(s.obj)?{val:t.data(s.val)||"",obj:t.data(s.obj)||null}:null},e.mixin(t.prototype,i,{_overwrite:function(e,t){t=t||[],t.length?this._renderSuggestions(e,t):this.async&&this.templates.pending?this._renderPending(e):!this.async&&this.templates.notFound?this._renderNotFound(e):this._empty(),this.trigger("rendered",this.name,t,!1)},_append:function(e,t){t=t||[],t.length&&this.$lastSuggestion.length?this._appendSuggestions(e,t):t.length?this._renderSuggestions(e,t):!this.$lastSuggestion.length&&this.templates.notFound&&this._renderNotFound(e),this.trigger("rendered",this.name,t,!0)},_renderSuggestions:function(e,t){var n;n=this._getSuggestionsFragment(e,t),this.$lastSuggestion=n.children().last(),this.$el.html(n).prepend(this._getHeader(e,t)).append(this._getFooter(e,t))},_appendSuggestions:function(e,t){var n,r;n=this._getSuggestionsFragment(e,t),r=n.children().last(),this.$lastSuggestion.after(n),this.$lastSuggestion=r},_renderPending:function(e){var t=this.templates.pending;this._resetLastSuggestion(),t&&this.$el.html(t({query:e,dataset:this.name}))},_renderNotFound:function(e){var t=this.templates.notFound;this._resetLastSuggestion(),t&&this.$el.html(t({query:e,dataset:this.name}))},_empty:function(){this.$el.empty(),this._resetLastSuggestion()},_getSuggestionsFragment:function(t,n){var r,i=this;return r=document.createDocumentFragment(),e.each(n,function(e){var n,o;o=i._injectQuery(t,e),n=$(i.templates.suggestion(o)).data(s.obj,e).data(s.val,i.displayFn(e)).addClass(i.classes.suggestion+" "+i.classes.selectable),r.appendChild(n[0])}),this.highlight&&o({className:this.classes.highlight,node:r,pattern:t}),$(r)},_getFooter:function(e,t){return this.templates.footer?this.templates.footer({query:e,suggestions:t,dataset:this.name}):null},_getHeader:function(e,t){return this.templates.header?this.templates.header({query:e,suggestions:t,dataset:this.name}):null},_resetLastSuggestion:function(){this.$lastSuggestion=$()},_injectQuery:function(t,n){return e.isObject(n)?e.mixin({_query:t},n):n},update:function(e){function t(t){o||(o=!0,t=(t||[]).slice(0,r.limit),a=t.length,r._overwrite(e,t),a")}}),t}(),l=function(){"use strict";function t(t,n){function r(e){var t=i.$node.find(e.node).first();return e.node=t.length?t:$("
").appendTo(i.$node),new s(e,n)}var i=this;t=t||{},t.node||$.error("node is required"),n.mixin(this),this.$node=$(t.node),this.query=null,this.datasets=e.map(t.datasets,r)}return e.mixin(t.prototype,i,{_onSelectableClick:function(e){this.trigger("selectableClicked",$(e.currentTarget))},_onRendered:function(e,t,n,r){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty()),this.trigger("datasetRendered",t,n,r)},_onCleared:function(){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty()),this.trigger("datasetCleared")},_propagate:function(){this.trigger.apply(this,arguments)},_allDatasetsEmpty:function(){function t(e){return e.isEmpty()}return e.every(this.datasets,t)},_getSelectables:function(){return this.$node.find(this.selectors.selectable)},_removeCursor:function(){var e=this.getActiveSelectable();e&&e.removeClass(this.classes.cursor)},_ensureVisible:function(e){var t,n,r,i;t=e.position().top,n=t+e.outerHeight(!0),r=this.$node.scrollTop(),i=this.$node.height()+parseInt(this.$node.css("paddingTop"),10)+parseInt(this.$node.css("paddingBottom"),10),t<0?this.$node.scrollTop(r+t):i"),e.each(this.datasets,t)}}),t}(),u=function(){"use strict";function t(){l.apply(this,[].slice.call(arguments,0))}var n=l.prototype;return e.mixin(t.prototype,l.prototype,{open:function(){return!this._allDatasetsEmpty()&&this._show(),n.open.apply(this,[].slice.call(arguments,0))},close:function(){return this._hide(),n.close.apply(this,[].slice.call(arguments,0))},_onRendered:function(){return this._allDatasetsEmpty()?this._hide():this.isOpen()&&this._show(),n._onRendered.apply(this,[].slice.call(arguments,0))},_onCleared:function(){return this._allDatasetsEmpty()?this._hide():this.isOpen()&&this._show(),n._onCleared.apply(this,[].slice.call(arguments,0))},setLanguageDirection:function(e){return this.$node.css("ltr"===e?this.css.ltr:this.css.rtl),n.setLanguageDirection.apply(this,[].slice.call(arguments,0))},_hide:function(){this.$node.hide()},_show:function(){this.$node.css("display","block")}}),t}(),c=function(){"use strict";function t(t,r){var i,o,a,s,l,u,c,d,h,f,p;t=t||{},t.input||$.error("missing input"),t.menu||$.error("missing menu"),t.eventBus||$.error("missing event bus"),r.mixin(this),this.eventBus=t.eventBus,this.minLength=e.isNumber(t.minLength)?t.minLength:1,this.input=t.input,this.menu=t.menu,this.enabled=!0,this.active=!1,this.input.hasFocus()&&this.activate(),this.dir=this.input.getLangDir(),this._hacks(),this.menu.bind().onSync("selectableClicked",this._onSelectableClicked,this).onSync("asyncRequested",this._onAsyncRequested,this).onSync("asyncCanceled",this._onAsyncCanceled,this).onSync("asyncReceived",this._onAsyncReceived,this).onSync("datasetRendered",this._onDatasetRendered,this).onSync("datasetCleared",this._onDatasetCleared,this),i=n(this,"activate","open","_onFocused"),o=n(this,"deactivate","_onBlurred"),a=n(this,"isActive","isOpen","_onEnterKeyed"),s=n(this,"isActive","isOpen","_onTabKeyed"),l=n(this,"isActive","_onEscKeyed"),u=n(this,"isActive","open","_onUpKeyed"),c=n(this,"isActive","open","_onDownKeyed"),d=n(this,"isActive","isOpen","_onLeftKeyed"),h=n(this,"isActive","isOpen","_onRightKeyed"),f=n(this,"_openIfActive","_onQueryChanged"),p=n(this,"_openIfActive","_onWhitespaceChanged"),this.input.bind().onSync("focused",i,this).onSync("blurred",o,this).onSync("enterKeyed",a,this).onSync("tabKeyed",s,this).onSync("escKeyed",l,this).onSync("upKeyed",u,this).onSync("downKeyed",c,this).onSync("leftKeyed",d,this).onSync("rightKeyed",h,this).onSync("queryChanged",f,this).onSync("whitespaceChanged",p,this).onSync("langDirChanged",this._onLangDirChanged,this)}function n(t){var n=[].slice.call(arguments,1);return function(){var r=[].slice.call(arguments);e.each(n,function(e){return t[e].apply(t,r)})}}return e.mixin(t.prototype,{_hacks:function(){var t,n;t=this.input.$input||$("
"),n=this.menu.$node||$("
"),t.on("blur.tt",function(r){var i,o,a;i=document.activeElement,o=n.is(i),a=n.has(i).length>0,e.isMsie()&&(o||a)&&(r.preventDefault(),r.stopImmediatePropagation(),e.defer(function(){t.focus()}))}),n.on("mousedown.tt",function(e){e.preventDefault()})},_onSelectableClicked:function(e,t){this.select(t)},_onDatasetCleared:function(){this._updateHint()},_onDatasetRendered:function(e,t,n,r){this._updateHint(),this.eventBus.trigger("render",n,r,t)},_onAsyncRequested:function(e,t,n){this.eventBus.trigger("asyncrequest",n,t)},_onAsyncCanceled:function(e,t,n){this.eventBus.trigger("asynccancel",n,t)},_onAsyncReceived:function(e,t,n){this.eventBus.trigger("asyncreceive",n,t)},_onFocused:function(){this._minLengthMet()&&this.menu.update(this.input.getQuery())},_onBlurred:function(){this.input.hasQueryChangedSinceLastFocus()&&this.eventBus.trigger("change",this.input.getQuery())},_onEnterKeyed:function(e,t){var n;(n=this.menu.getActiveSelectable())&&this.select(n)&&t.preventDefault()},_onTabKeyed:function(e,t){var n;(n=this.menu.getActiveSelectable())?this.select(n)&&t.preventDefault():(n=this.menu.getTopSelectable())&&this.autocomplete(n)&&t.preventDefault()},_onEscKeyed:function(){this.close()},_onUpKeyed:function(){this.moveCursor(-1)},_onDownKeyed:function(){this.moveCursor(1)},_onLeftKeyed:function(){"rtl"===this.dir&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getTopSelectable())},_onRightKeyed:function(){"ltr"===this.dir&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getTopSelectable())},_onQueryChanged:function(e,t){this._minLengthMet(t)?this.menu.update(t):this.menu.empty()},_onWhitespaceChanged:function(){this._updateHint()},_onLangDirChanged:function(e,t){this.dir!==t&&(this.dir=t,this.menu.setLanguageDirection(t))},_openIfActive:function(){this.isActive()&&this.open()},_minLengthMet:function(t){return t=e.isString(t)?t:this.input.getQuery()||"",t.length>=this.minLength},_updateHint:function(){var t,n,r,i,o,s,l;t=this.menu.getTopSelectable(),n=this.menu.getSelectableData(t),r=this.input.getInputValue(),!n||e.isBlankString(r)||this.input.hasOverflow()?this.input.clearHint():(i=a.normalizeQuery(r),o=e.escapeRegExChars(i),s=new RegExp("^(?:"+o+")(.+$)","i"),(l=s.exec(n.val))&&this.input.setHint(r+l[1]))},isEnabled:function(){return this.enabled},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},isActive:function(){return this.active},activate:function(){return!!this.isActive()||!(!this.isEnabled()||this.eventBus.before("active"))&&(this.active=!0,this.eventBus.trigger("active"),!0)},deactivate:function(){return!this.isActive()||!this.eventBus.before("idle")&&(this.active=!1,this.close(),this.eventBus.trigger("idle"),!0)},isOpen:function(){return this.menu.isOpen()},open:function(){return this.isOpen()||this.eventBus.before("open")||(this.menu.open(),this._updateHint(),this.eventBus.trigger("open")),this.isOpen()},close:function(){return this.isOpen()&&!this.eventBus.before("close")&&(this.menu.close(),this.input.clearHint(),this.input.resetInputValue(),this.eventBus.trigger("close")),!this.isOpen()},setVal:function(t){this.input.setQuery(e.toStr(t))},getVal:function(){return this.input.getQuery()},select:function(e){var t=this.menu.getSelectableData(e);return!(!t||this.eventBus.before("select",t.obj))&&(this.input.setQuery(t.val,!0),this.eventBus.trigger("select",t.obj),this.close(),!0)},autocomplete:function(e){var t,n;return t=this.input.getQuery(),n=this.menu.getSelectableData(e),!(!(n&&t!==n.val)||this.eventBus.before("autocomplete",n.obj))&&(this.input.setQuery(n.val),this.eventBus.trigger("autocomplete",n.obj),!0)},moveCursor:function(e){var t,n,r,i;return t=this.input.getQuery(),n=this.menu.selectableRelativeToCursor(e),r=this.menu.getSelectableData(n),i=r?r.obj:null,!(this._minLengthMet()&&this.menu.update(t))&&!this.eventBus.before("cursorchange",i)&&(this.menu.setCursor(n),r?this.input.setInputValue(r.val):(this.input.resetInputValue(),this._updateHint()),this.eventBus.trigger("cursorchange",i),!0)},destroy:function(){this.input.destroy(),this.menu.destroy()}}),t}();!function(){"use strict";function n(e,t){e.each(function(){var e,n=$(this);(e=n.data(p.typeahead))&&t(e,n)})}function i(e,t){return e.clone().addClass(t.classes.hint).removeData().css(t.css.hint).css(s(e)).prop("readonly",!0).removeAttr("id name placeholder required").attr({autocomplete:"off",spellcheck:"false",tabindex:-1})}function o(e,t){e.data(p.attrs,{dir:e.attr("dir"),autocomplete:e.attr("autocomplete"),spellcheck:e.attr("spellcheck"),style:e.attr("style")}),e.addClass(t.classes.input).attr({autocomplete:"off",spellcheck:!1});try{!e.attr("dir")&&e.attr("dir","auto")}catch(e){}return e}function s(e){return{backgroundAttachment:e.css("background-attachment"),backgroundClip:e.css("background-clip"),backgroundColor:e.css("background-color"),backgroundImage:e.css("background-image"),backgroundOrigin:e.css("background-origin"),backgroundPosition:e.css("background-position"),backgroundRepeat:e.css("background-repeat"),backgroundSize:e.css("background-size")}}function d(t){var n,r;n=t.data(p.www),r=t.parent().filter(n.selectors.wrapper),e.each(t.data(p.attrs),function(n,r){e.isUndefined(n)?t.removeAttr(r):t.attr(r,n)}),t.removeData(p.typeahead).removeData(p.www).removeData(p.attr).removeClass(n.classes.input),r.length&&(t.detach().insertAfter(r),r.remove())}function h(t){var n,r;return n=e.isJQuery(t)||e.isElement(t),r=n?$(t).first():[],r.length?r:null}var f,p,g;f=$.fn.typeahead,p={www:"tt-www",attrs:"tt-attrs",typeahead:"tt-typeahead"},g={initialize:function(n,s){function d(){var t,d,g,m,v,y,b,_,w,C,A;e.each(s,function(e){e.highlight=!!n.highlight}),t=$(this),d=$(f.html.wrapper),g=h(n.hint),m=h(n.menu),v=!1!==n.hint&&!g,y=!1!==n.menu&&!m,v&&(g=i(t,f)),y&&(m=$(f.html.menu).css(f.css.menu)),g&&g.val(""),t=o(t,f),(v||y)&&(d.css(f.css.wrapper),t.css(v?f.css.input:f.css.inputWithNoHint),t.wrap(d).parent().prepend(v?g:null).append(y?m:null)),A=y?u:l,b=new r({el:t}),_=new a({hint:g,input:t},f),w=new A({node:m,datasets:s},f),C=new c({input:_,menu:w,eventBus:b,minLength:n.minLength},f),t.data(p.www,f),t.data(p.typeahead,C)}var f;return s=e.isArray(s)?s:[].slice.call(arguments,1),n=n||{},f=t(n.classNames),this.each(d)},isEnabled:function(){var e;return n(this.first(),function(t){e=t.isEnabled()}),e},enable:function(){return n(this,function(e){e.enable()}),this},disable:function(){return n(this,function(e){e.disable()}),this},isActive:function(){var e;return n(this.first(),function(t){e=t.isActive()}),e},activate:function(){return n(this,function(e){e.activate()}),this},deactivate:function(){return n(this,function(e){e.deactivate()}),this},isOpen:function(){var e;return n(this.first(),function(t){e=t.isOpen()}),e},open:function(){return n(this,function(e){e.open()}),this},close:function(){return n(this,function(e){e.close()}),this},select:function(e){var t=!1,r=$(e);return n(this.first(),function(e){t=e.select(r)}),t},autocomplete:function(e){var t=!1,r=$(e);return n(this.first(),function(e){t=e.autocomplete(r)}),t},moveCursor:function(e){var t=!1;return n(this.first(),function(n){t=n.moveCursor(e)}),t},val:function(e){var t;return arguments.length?(n(this,function(t){t.setVal(e)}),this):(n(this.first(),function(e){t=e.getVal()}),t)},destroy:function(){return n(this,function(e,t){d(t),e.destroy()}),this}},$.fn.typeahead=function(e){return g[e]?g[e].apply(this,[].slice.call(arguments,1)):g.initialize.apply(this,arguments)},$.fn.typeahead.noConflict=function(){return $.fn.typeahead=f,this}}()})}).call(exports,t(127).setImmediate)},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(86),a=n(o),s=t(7),l=n(s),u=t(4),c=n(u),d=t(5),h=n(d),f="/plugins/org.graylog.plugins.pipelineprocessor",p=i.default.createStore({listenables:[a.default],pipelines:void 0,getInitialState:function(){return{pipelines:this.pipelines}},_updatePipelinesState:function(e){if(this.pipelines){this.pipelines.some(function(t){return t.id===e.id})?this.pipelines=this.pipelines.map(function(t){return t.id===e.id?e:t}):this.pipelines.push(e)}else this.pipelines=[e];this.trigger({pipelines:this.pipelines})},list:function(){var e=this,t=function(e){l.default.error("Fetching pipelines failed with status: "+e.message,"Could not retrieve processing pipelines")},n=c.default.qualifyUrl(f+"/system/pipelines/pipeline");return(0,h.default)("GET",n).then(function(t){e.pipelines=t,e.trigger({pipelines:t})},t)},get:function(e){var t=function(t){l.default.error("Fetching pipeline failed with status: "+t.message,'Could not retrieve processing pipeline "'+e+'"')},n=c.default.qualifyUrl(f+"/system/pipelines/pipeline/"+e);(0,h.default)("GET",n).then(this._updatePipelinesState,t)},save:function(e){var t=this,n=function(e){l.default.error("Saving pipeline failed with status: "+e.message,"Could not save processing pipeline")},r=c.default.qualifyUrl(f+"/system/pipelines/pipeline"),i={title:e.title,description:e.description,source:e.source},o=(0,h.default)("POST",r,i);o.then(function(e){t._updatePipelinesState(e),l.default.success('Pipeline "'+i.title+'" created successfully')},n),a.default.save.promise(o)},update:function(e){var t=this,n=function(e){l.default.error("Updating pipeline failed with status: "+e.message,"Could not update processing pipeline")},r=c.default.qualifyUrl(f+"/system/pipelines/pipeline/"+e.id),i={id:e.id,title:e.title,description:e.description,source:e.source},o=(0,h.default)("PUT",r,i);o.then(function(e){t._updatePipelinesState(e),l.default.success('Pipeline "'+i.title+'" updated successfully')},n),a.default.update.promise(o)},delete:function(e){var t=this,n=function(t){l.default.error("Deleting pipeline failed with status: "+t.message,'Could not delete processing pipeline "'+e+'"')},r=c.default.qualifyUrl(f+"/system/pipelines/pipeline/"+e);return(0,h.default)("DELETE",r).then(function(){var n=t.pipelines||[];t.pipelines=n.filter(function(t){return t.id!==e}),t.trigger({pipelines:t.pipelines}),l.default.success('Pipeline "'+e+'" deleted successfully')},n)},parse:function(e,t){var n=c.default.qualifyUrl(f+"/system/pipelines/pipeline/parse"),r={title:e.title,description:e.description,source:e.source};return(0,h.default)("POST",n,r).then(function(){t([])},function(e){var n=e.additional.res;400===n.status&&t(n.body)})}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({list:{asyncResult:!0},connectToStream:{asyncResult:!0},connectToPipeline:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t0&&a.default.createElement("dt",null,"Routed into streams"),t.size>0&&a.default.createElement("dd",{className:"stream-list"},a.default.createElement("ul",null,n)))),a.default.createElement(s.Col,{md:9},a.default.createElement("div",{ref:"messageList"},a.default.createElement(m.default,{message:this.props.message,possiblyHighlight:this.props.possiblyHighlight,disableFieldActions:this.props.disableFieldActions,customFieldActions:this.props.customFieldActions,showDecoration:this.state.showOriginal})))))}});exports.default=A,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.WidgetVisualizationNotFound=exports.WidgetHeader=exports.WidgetFooter=exports.WidgetEditConfigModal=exports.WidgetCreationModal=exports.WidgetConfigModal=exports.Widget=void 0;var r=t(624);Object.defineProperty(exports,"Widget",{enumerable:!0,get:function(){return n(r).default}});var i=t(625);Object.defineProperty(exports,"WidgetConfigModal",{enumerable:!0,get:function(){return n(i).default}});var o=t(626);Object.defineProperty(exports,"WidgetCreationModal",{enumerable:!0,get:function(){return n(o).default}});var a=t(627);Object.defineProperty(exports,"WidgetEditConfigModal",{enumerable:!0,get:function(){return n(a).default}});var s=t(628);Object.defineProperty(exports,"WidgetFooter",{enumerable:!0,get:function(){return n(s).default}});var l=t(629);Object.defineProperty(exports,"WidgetHeader",{enumerable:!0,get:function(){return n(l).default}});var u=t(630);Object.defineProperty(exports,"WidgetVisualizationNotFound",{enumerable:!0,get:function(){return n(u).default}}),t(631)},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(671);Object.defineProperty(exports,"ContactUs",{enumerable:!0,get:function(){return n(r).default}});var i=t(30);Object.defineProperty(exports,"DocumentationLink",{enumerable:!0,get:function(){return n(i).default}});var o=t(672);Object.defineProperty(exports,"SmallSupportLink",{enumerable:!0,get:function(){return n(o).default}});var a=t(148);Object.defineProperty(exports,"SupportLink",{enumerable:!0,get:function(){return n(a).default}})},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(12),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i={NAVBAR_HEIGHT:55,scrollToHint:function(e){var t=this;if(!this.isElementVisible(e)){var n=(0,r.default)("#scroll-to-hint");n.fadeIn("fast").delay(1500).fadeOut("fast").on("click",function(i){i.preventDefault();var o=window.pageYOffset-t.NAVBAR_HEIGHT+e.getBoundingClientRect().top;(0,r.default)("html, body").animate({scrollTop:o},"fast"),n.off("click")})}},isElementVisible:function(e){var t=e.getBoundingClientRect();return t.top>0&&t.bottom>0}};exports.default=i,e.exports=exports.default},function(e,exports,t){e.exports=t(8)(647)},function(e,exports,t){(function(e,n){var r;!function(i){function o(e){throw new RangeError(M[e])}function a(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function s(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(T,"."),r+a(e.split("."),t).join(".")}function l(e){for(var t,n,r=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(e-=65536,t+=L(e>>>10&1023|55296),e=56320|1023&e),t+=L(e)}).join("")}function c(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:_}function d(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function h(e,t,n){var r=0;for(e=n?O(e/E):e>>1,e+=O(e/t);e>R*C>>1;r+=_)e=O(e/R);return O(r+(R+1)*e/(e+A))}function f(e){var t,n,r,i,a,s,l,d,f,p,g=[],m=e.length,v=0,y=x,A=S;for(n=e.lastIndexOf(F),n<0&&(n=0),r=0;r=128&&o("not-basic"),g.push(e.charCodeAt(r));for(i=n>0?n+1:0;i=m&&o("invalid-input"),d=c(e.charCodeAt(i++)),(d>=_||d>O((b-v)/s))&&o("overflow"),v+=d*s,f=l<=A?w:l>=A+C?C:l-A,!(dO(b/p)&&o("overflow"),s*=p;t=g.length+1,A=h(v-a,t,0==a),O(v/t)>b-y&&o("overflow"),y+=O(v/t),v%=t,g.splice(v++,0,y)}return u(g)}function p(e){var t,n,r,i,a,s,u,c,f,p,g,m,v,y,A,E=[];for(e=l(e),m=e.length,t=x,n=0,a=S,s=0;s=t&&gO((b-n)/v)&&o("overflow"),n+=(u-t)*v,t=u,s=0;sb&&o("overflow"),g==t){for(c=n,f=_;p=f<=a?w:f>=a+C?C:f-a,!(c= 0x80 (not a basic code point)","invalid-input":"Invalid input"},R=_-w,O=Math.floor,L=String.fromCharCode;y={version:"1.3.2",ucs2:{decode:l,encode:u},decode:f,encode:p,toASCII:m,toUnicode:g},void 0!==(r=function(){return y}.call(exports,t,exports,e))&&(e.exports=r)}()}).call(exports,t(40)(e),t(21))},function(e,exports,t){var n,r;/*! * URI.js - Mutating URLs * IPv6 Support * * Version: 1.19.0 * * Author: Rodney Rehm * Web: http://medialize.github.io/URI.js/ * * Licensed under * MIT License http://www.opensource.org/licenses/mit-license * */ !function(i,o){"use strict";"object"==typeof e&&e.exports?e.exports=o():(n=o,void 0!==(r="function"==typeof n?n.call(exports,t,exports,e):n)&&(e.exports=r))}(0,function(e){"use strict";function t(e){var t=e.toLowerCase(),n=t.split(":"),r=n.length,i=8;""===n[0]&&""===n[1]&&""===n[2]?(n.shift(),n.shift()):""===n[0]&&""===n[1]?n.shift():""===n[r-1]&&""===n[r-2]&&n.pop(),r=n.length,-1!==n[r-1].indexOf(".")&&(i=7);var o;for(o=0;o1);l++)a.splice(0,1);n[s]=a.join("")}var u=-1,c=0,d=0,h=-1,f=!1;for(s=0;sc&&(u=h,c=d)):"0"===n[s]&&(f=!0,h=s,d=1);d>c&&(u=h,c=d),c>1&&n.splice(u,c,""),r=n.length;var p="";for(""===n[0]&&(p=":"),s=0;s=e.length-1)return!1;var r=e.lastIndexOf(".",t-1);if(r<=0||r>=t-1)return!1;var i=n.list[e.slice(t+1)];return!!i&&i.indexOf(" "+e.slice(r+1,t)+" ")>=0},is:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;if(e.lastIndexOf(".",t-1)>=0)return!1;var r=n.list[e.slice(t+1)];return!!r&&r.indexOf(" "+e.slice(0,t)+" ")>=0},get:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return null;var r=e.lastIndexOf(".",t-1);if(r<=0||r>=t-1)return null;var i=n.list[e.slice(t+1)];return i?i.indexOf(" "+e.slice(r+1,t)+" ")<0?null:e.slice(r+1):null},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return n})},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({list:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";var n=Object.prototype.hasOwnProperty,r=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),i=function(e){for(var t;e.length;){var n=e.pop();if(t=n.obj[n.prop],Array.isArray(t)){for(var r=[],i=0;i=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122?n+=t.charAt(i):o<128?n+=r[o]:o<2048?n+=r[192|o>>6]+r[128|63&o]:o<55296||o>=57344?n+=r[224|o>>12]+r[128|o>>6&63]+r[128|63&o]:(i+=1,o=65536+((1023&o)<<10|1023&t.charCodeAt(i)),n+=r[240|o>>18]+r[128|o>>12&63]+r[128|o>>6&63]+r[128|63&o])}return n},exports.compact=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r0&&(h=h.filter(function(t){return t!==e}),0===h.length&&d())}var u=e(t),d=void 0,h=[];return o({},u,{listenBeforeUnload:i,registerBeforeUnloadHook:c.default(a,"registerBeforeUnloadHook is deprecated; use listenBeforeUnload instead"),unregisterBeforeUnloadHook:c.default(l,"unregisterBeforeUnloadHook is deprecated; use the callback returned from listenBeforeUnload instead")})}}exports.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t0)&&(this.handle=this._getHandle(e),!!this.handle&&(this._blurActiveElement(e),this._blockFrames(!0===t.iframeFix?"iframe":t.iframeFix),!0))},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=$(this);return $("
").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var t=$.ui.safeActiveElement(this.document[0]);$(e.target).closest(t).length||$.ui.safeBlur(t)},_mouseStart:function(e){var t=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),$.ui.ddmanager&&($.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===$(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,t.cursorAt&&this._adjustOffsetFromHelper(t.cursorAt),this._setContainment(),!1===this._trigger("start",e)?(this._clear(),!1):(this._cacheHelperProportions(),$.ui.ddmanager&&!t.dropBehaviour&&$.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),$.ui.ddmanager&&$.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(e){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(e,t){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!t){var n=this._uiHash();if(!1===this._trigger("drag",e,n))return this._mouseUp(new $.Event("mouseup",e)),!1;this.position=n.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",$.ui.ddmanager&&$.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var t=this,n=!1;return $.ui.ddmanager&&!this.options.dropBehaviour&&(n=$.ui.ddmanager.drop(this,e)),this.dropped&&(n=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||!0===this.options.revert||$.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?$(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==t._trigger("stop",e)&&t._clear()}):!1!==this._trigger("stop",e)&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),$.ui.ddmanager&&$.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),$.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new $.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!$(e.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var t=this.options,n=$.isFunction(t.helper),r=n?$(t.helper.apply(this.element[0],[e])):"clone"===t.helper?this.element.clone().removeAttr("id"):this.element;return r.parents("body").length||r.appendTo("parent"===t.appendTo?this.element[0].parentNode:t.appendTo),n&&r[0]===this.element[0]&&this._setPositionRelative(),r[0]===this.element[0]||/(fixed|absolute)/.test(r.css("position"))||r.css("position","absolute"),r},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),$.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),t=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==t&&$.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,t,n,r=this.options,i=this.document[0];return this.relativeContainer=null,r.containment?"window"===r.containment?void(this.containment=[$(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,$(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,$(window).scrollLeft()+$(window).width()-this.helperProportions.width-this.margins.left,$(window).scrollTop()+($(window).height()||i.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===r.containment?void(this.containment=[0,0,$(i).width()-this.helperProportions.width-this.margins.left,($(i).height()||i.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):r.containment.constructor===Array?void(this.containment=r.containment):("parent"===r.containment&&(r.containment=this.helper[0].parentNode),t=$(r.containment),void((n=t[0])&&(e=/(scroll|auto)/.test(t.css("overflow")),this.containment=[(parseInt(t.css("borderLeftWidth"),10)||0)+(parseInt(t.css("paddingLeft"),10)||0),(parseInt(t.css("borderTopWidth"),10)||0)+(parseInt(t.css("paddingTop"),10)||0),(e?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(t.css("borderRightWidth"),10)||0)-(parseInt(t.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(t.css("borderBottomWidth"),10)||0)-(parseInt(t.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=t))):void(this.containment=null)},_convertPositionTo:function(e,t){t||(t=this.position);var n="absolute"===e?1:-1,r=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top)*n,left:t.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)*n}},_generatePosition:function(e,t){var n,r,i,o,a=this.options,s=this._isRootNode(this.scrollParent[0]),l=e.pageX,u=e.pageY;return s&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(r=this.relativeContainer.offset(),n=[this.containment[0]+r.left,this.containment[1]+r.top,this.containment[2]+r.left,this.containment[3]+r.top]):n=this.containment,e.pageX-this.offset.click.leftn[2]&&(l=n[2]+this.offset.click.left),e.pageY-this.offset.click.top>n[3]&&(u=n[3]+this.offset.click.top)),a.grid&&(i=a.grid[1]?this.originalPageY+Math.round((u-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,u=n?i-this.offset.click.top>=n[1]||i-this.offset.click.top>n[3]?i:i-this.offset.click.top>=n[1]?i-a.grid[1]:i+a.grid[1]:i,o=a.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,l=n?o-this.offset.click.left>=n[0]||o-this.offset.click.left>n[2]?o:o-this.offset.click.left>=n[0]?o-a.grid[0]:o+a.grid[0]:o),"y"===a.axis&&(l=this.originalPageX),"x"===a.axis&&(u=this.originalPageY)),{top:u-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,t,n){return n=n||this._uiHash(),$.ui.plugin.call(this,e,[t,n,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),n.offset=this.positionAbs),$.Widget.prototype._trigger.call(this,e,t,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),$.ui.plugin.add("draggable","connectToSortable",{start:function(e,t,n){var r=$.extend({},t,{item:n.element});n.sortables=[],$(n.options.connectToSortable).each(function(){var t=$(this).sortable("instance");t&&!t.options.disabled&&(n.sortables.push(t),t.refreshPositions(),t._trigger("activate",e,r))})},stop:function(e,t,n){var r=$.extend({},t,{item:n.element});n.cancelHelperRemoval=!1,$.each(n.sortables,function(){var t=this;t.isOver?(t.isOver=0,n.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,r))})},drag:function(e,t,n){$.each(n.sortables,function(){var r=!1,i=this;i.positionAbs=n.positionAbs,i.helperProportions=n.helperProportions,i.offset.click=n.offset.click,i._intersectsWith(i.containerCache)&&(r=!0,$.each(n.sortables,function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,this!==i&&this._intersectsWith(this.containerCache)&&$.contains(i.element[0],this.element[0])&&(r=!1),r})),r?(i.isOver||(i.isOver=1,n._parent=t.helper.parent(),i.currentItem=t.helper.appendTo(i.element).data("ui-sortable-item",!0),i.options._helper=i.options.helper,i.options.helper=function(){return t.helper[0]},e.target=i.currentItem[0],i._mouseCapture(e,!0),i._mouseStart(e,!0,!0),i.offset.click.top=n.offset.click.top,i.offset.click.left=n.offset.click.left,i.offset.parent.left-=n.offset.parent.left-i.offset.parent.left,i.offset.parent.top-=n.offset.parent.top-i.offset.parent.top,n._trigger("toSortable",e),n.dropped=i.element,$.each(n.sortables,function(){this.refreshPositions()}),n.currentItem=n.element,i.fromOutside=n),i.currentItem&&(i._mouseDrag(e),t.position=i.position)):i.isOver&&(i.isOver=0,i.cancelHelperRemoval=!0,i.options._revert=i.options.revert,i.options.revert=!1,i._trigger("out",e,i._uiHash(i)),i._mouseStop(e,!0),i.options.revert=i.options._revert,i.options.helper=i.options._helper,i.placeholder&&i.placeholder.remove(),t.helper.appendTo(n._parent),n._refreshOffsets(e),t.position=n._generatePosition(e,!0),n._trigger("fromSortable",e),n.dropped=!1,$.each(n.sortables,function(){this.refreshPositions()}))})}}),$.ui.plugin.add("draggable","cursor",{start:function(e,t,n){var r=$("body"),i=n.options;r.css("cursor")&&(i._cursor=r.css("cursor")),r.css("cursor",i.cursor)},stop:function(e,t,n){var r=n.options;r._cursor&&$("body").css("cursor",r._cursor)}}),$.ui.plugin.add("draggable","opacity",{start:function(e,t,n){var r=$(t.helper),i=n.options;r.css("opacity")&&(i._opacity=r.css("opacity")),r.css("opacity",i.opacity)},stop:function(e,t,n){var r=n.options;r._opacity&&$(t.helper).css("opacity",r._opacity)}}),$.ui.plugin.add("draggable","scroll",{start:function(e,t,n){n.scrollParentNotHidden||(n.scrollParentNotHidden=n.helper.scrollParent(!1)),n.scrollParentNotHidden[0]!==n.document[0]&&"HTML"!==n.scrollParentNotHidden[0].tagName&&(n.overflowOffset=n.scrollParentNotHidden.offset())},drag:function(e,t,n){var r=n.options,i=!1,o=n.scrollParentNotHidden[0],a=n.document[0];o!==a&&"HTML"!==o.tagName?(r.axis&&"x"===r.axis||(n.overflowOffset.top+o.offsetHeight-e.pageY=0;d--)s=n.snapElements[d].left-n.margins.left,l=s+n.snapElements[d].width,u=n.snapElements[d].top-n.margins.top,c=u+n.snapElements[d].height,ml+p||yc+p||!$.contains(n.snapElements[d].item.ownerDocument,n.snapElements[d].item)?(n.snapElements[d].snapping&&n.options.snap.release&&n.options.snap.release.call(n.element,e,$.extend(n._uiHash(),{snapItem:n.snapElements[d].item})),n.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(r=Math.abs(u-y)<=p,i=Math.abs(c-v)<=p,o=Math.abs(s-m)<=p,a=Math.abs(l-g)<=p,r&&(t.position.top=n._convertPositionTo("relative",{top:u-n.helperProportions.height,left:0}).top),i&&(t.position.top=n._convertPositionTo("relative",{top:c,left:0}).top),o&&(t.position.left=n._convertPositionTo("relative",{top:0,left:s-n.helperProportions.width}).left),a&&(t.position.left=n._convertPositionTo("relative",{top:0,left:l}).left)),h=r||i||o||a,"outer"!==f.snapMode&&(r=Math.abs(u-v)<=p,i=Math.abs(c-y)<=p,o=Math.abs(s-g)<=p,a=Math.abs(l-m)<=p,r&&(t.position.top=n._convertPositionTo("relative",{top:u,left:0}).top),i&&(t.position.top=n._convertPositionTo("relative",{top:c-n.helperProportions.height,left:0}).top),o&&(t.position.left=n._convertPositionTo("relative",{top:0,left:s}).left),a&&(t.position.left=n._convertPositionTo("relative",{top:0,left:l-n.helperProportions.width}).left)),!n.snapElements[d].snapping&&(r||i||o||a||h)&&n.options.snap.snap&&n.options.snap.snap.call(n.element,e,$.extend(n._uiHash(),{snapItem:n.snapElements[d].item})),n.snapElements[d].snapping=r||i||o||a||h)}}),$.ui.plugin.add("draggable","stack",{start:function(e,t,n){var r,i=n.options,o=$.makeArray($(i.stack)).sort(function(e,t){return(parseInt($(e).css("zIndex"),10)||0)-(parseInt($(t).css("zIndex"),10)||0)});o.length&&(r=parseInt($(o[0]).css("zIndex"),10)||0,$(o).each(function(e){$(this).css("zIndex",r+e)}),this.css("zIndex",r+o.length))}}),$.ui.plugin.add("draggable","zIndex",{start:function(e,t,n){var r=$(t.helper),i=n.options;r.css("zIndex")&&(i._zIndex=r.css("zIndex")),r.css("zIndex",i.zIndex)},stop:function(e,t,n){var r=n.options;r._zIndex&&$(t.helper).css("zIndex",r._zIndex)}}),$.ui.draggable})},function(e,exports,t){var n,r,i;/*! * jQuery UI Mouse 1.12.1 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license */ !function(o){r=[t(12),t(316),t(26),t(91)],n=o,void 0!==(i="function"==typeof n?n.apply(exports,r):n)&&(e.exports=i)}(function($){var e=!1;return $(document).on("mouseup",function(){e=!1}),$.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(t){if(!0===$.data(t.target,e.widgetName+".preventClickEvent"))return $.removeData(t.target,e.widgetName+".preventClickEvent"),t.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!e){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var n=this,r=1===t.which,i=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&$(t.target).closest(this.options.cancel).length;return!(r&&!i&&this._mouseCapture(t))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),!0):(!0===$.data(t.target,this.widgetName+".preventClickEvent")&&$.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return n._mouseMove(e)},this._mouseUpDelegate=function(e){return n._mouseUp(e)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),e=!0,!0))}},_mouseMove:function(e){if(this._mouseMoved){if($.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&$.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,e=!1,t.preventDefault()},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(71),i=n(r),o=t(23),a=n(o),s=t(55),l=n(s);i.default.namespace("Rickshaw.Fixtures.Graylog2Time");var u=function(){var e=this;this.months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],this.units=[{name:"decade",seconds:315576e3,formatter:function(t){return e.formatDate(t)}},{name:"year",seconds:31557600,formatter:function(t){return e.formatDate(t)}},{name:"month",seconds:2635200,formatter:function(t){return e.formatDate(t)}},{name:"week",seconds:604800,formatter:function(t){return e.formatDate(t)}},{name:"day",seconds:86400,formatter:function(t){return e.formatDate(t)}},{name:"3 hours",seconds:10800,formatter:function(t){return e.formatDateTime(t)}},{name:"hour",seconds:3600,formatter:function(t){return e.formatDateTime(t)}},{name:"15 minutes",seconds:900,formatter:function(t){return e.formatDateTime(t)}},{name:"5 minutes",seconds:300,formatter:function(t){return e.formatDateTime(t)}},{name:"minute",seconds:60,formatter:function(t){return e.formatDateTime(t)}},{name:"15 second",seconds:15,formatter:function(t){return e.formatDateTime(t)}},{name:"second",seconds:1,formatter:function(t){return e.formatDateTime(t)}},{name:"millisecond",seconds:.001,formatter:function(t){return e.formatDateTime(t)}}],this.unit=function(e){return this.units.filter(function(t){return e==t.name}).shift()},this.formatDateTime=l.default.customDateTimeFormat(),this.formatDate=l.default.customDateTimeFormat(0),this.ceil=function(e,t){var n=void 0,r=void 0;if("week"==t.name){var i=a.default.utc(1e3*e);return i.startOf("isoWeek"),i.unix()==e?e:(i.add(1,"week"),i.unix())}if("month"==t.name){if(n=new Date(1e3*e),Date.UTC(n.getUTCFullYear(),n.getUTCMonth())/1e3==e)return e;r=n.getUTCFullYear();var o=n.getUTCMonth();return 11==o?(o=0,r+=1):o+=1,Date.UTC(r,o)/1e3}return"year"==t.name?(n=new Date(1e3*e),Date.UTC(n.getUTCFullYear(),0)/1e3==e?e:(r=n.getUTCFullYear()+1,Date.UTC(r,0)/1e3)):Math.ceil(e/t.seconds)*t.seconds}};i.default.Fixtures.Graylog2Time=u,exports.default=u,e.exports=exports.default},function(t,exports,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var i=n(12),o=r(i);n(323);var a=n(71),s=r(a),l=n(32),u=r(l),c=n(20),d=r(c),h=n(9),f=r(h),p=f.default.getStore("Search");s.default.namespace("Rickshaw.Graph.Graylog2Selector");var g=s.default.Class.create({initialize:function(e){var t=this,n=e.graph;this.graph=e.graph,this.build(),n.onUpdate(function(){t.update()})},build:function(){var t=this.graph,n=t.element.getElementsByTagName("svg")[0],r=!1,i=this.position={},a=document.createElement("div");a.setAttribute("class","graph-range-selector"),t.element.appendChild(a),n.oncontextmenu=function(){e.preventDefault()};var s=function(){a.style.transition="opacity 0.2s ease-out",a.style.opacity=0,setTimeout(function(){a.style.width=0,a.style.height=0,a.style.top=0,a.style.left=0},200),n.style.pointerEvents="auto",t.element.style.cursor="auto"},l=function(e){!0===r&&(n.style.pointerEvents="none"),t.element.style.cursor="crosshair",t.element.addEventListener("mousemove",function(t){if(!0!==r)return!1;i.x=t.offsetX|t.layerX,i.deltaX=Math.round(Math.max(i.x,e)-Math.min(i.x,e)),i.minX=Math.min(i.x,e),i.maxX=i.minX+i.deltaX,a.style.transition="none",a.style.opacity="1",a.style.width=i.deltaX+"px",a.style.height="100%",a.style.left=i.minX+"px"},!1)};t.element.addEventListener("mousedown",function(e){if(e.stopPropagation(),e.preventDefault(),0===e.button|1===e.button){var t=e.layerX;a.style.left=e.layerX,r=!0,l(t)}},!0),t.element.addEventListener("mouseup",function(e){r=!1,i.xMin=Math.round(t.x.invert(i.minX)),i.xMax=Math.round(t.x.invert(i.maxX));(0,o.default)("#universalsearch .absolute .absolute-from-human"),(0,o.default)("#universalsearch .absolute .absolute-to-human");if(!u.default.isNumber(i.xMin)||!u.default.isNumber(i.xMax))return void s();var n=new d.default(1e3*i.xMin),a=new d.default(1e3*i.xMax);p.changeTimeRange("absolute",{from:n.toString(),to:a.toString()}),(0,o.default)(".timerange-selector-container").effect("bounce"),s()},!1),t.dataDomain()[0]===i.xMin&&(t.window.xMin=void 0),t.dataDomain()[1]===i.xMax&&(t.window.xMax=void 0),t.window.xMin=i.xMin,t.window.xMax=i.xMax},update:function(){var e=this.graph,t=this.position;e.window.xMin=t.xMin,e.window.xMax=t.xMax,null===e.window.xMin&&(t.xMin=e.dataDomain()[0]),null===e.window.xMax&&(t.xMax=e.dataDomain()[1]),t.xMin=e.window.xMin,t.xMax=e.window.xMax}});s.default.Graph.Graylog2Selector=g,exports.default=g,t.exports=exports.default},function(e,exports,t){!function(){var n=t(357),r=t(141).utf8,i=t(358),o=t(141).bin,a=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?o.stringToBytes(e):r.stringToBytes(e):i(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||(e=e.toString());for(var s=n.bytesToWords(e),l=8*e.length,u=1732584193,c=-271733879,d=-1732584194,h=271733878,f=0;f>>24)|4278255360&(s[f]<<24|s[f]>>>8);s[l>>>5]|=128<>>9<<4)]=l;for(var p=a._ff,g=a._gg,m=a._hh,v=a._ii,f=0;f>>0,c=c+b>>>0,d=d+_>>>0,h=h+w>>>0}return n.endian([u,c,d,h])};a._ff=function(e,t,n,r,i,o,a){var s=e+(t&n|~t&r)+(i>>>0)+a;return(s<>>32-o)+t},a._gg=function(e,t,n,r,i,o,a){var s=e+(t&r|n&~r)+(i>>>0)+a;return(s<>>32-o)+t},a._hh=function(e,t,n,r,i,o,a){var s=e+(t^n^r)+(i>>>0)+a;return(s<>>32-o)+t},a._ii=function(e,t,n,r,i,o,a){var s=e+(n^(t|~r))+(i>>>0)+a;return(s<>>32-o)+t},a._blocksize=16,a._digestsize=16,e.exports=function(e,t){if(void 0===e||null===e)throw new Error("Illegal argument "+e);var r=n.wordsToBytes(a(e,t));return t&&t.asBytes?r:t&&t.asString?o.bytesToString(r):n.bytesToHex(r)}}()},function(e,exports){var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).reduce(function(r,i){var o=t[i];return n(e,o)&&r.push(i),r},[])}Object.defineProperty(exports,"__esModule",{value:!0}),exports.dayMatchesModifier=n,exports.getModifiersForDay=r;var i=t(59),o=t(96);exports.default={dayMatchesModifier:n,getModifiersForDay:r}},function(e,exports,t){e.exports=t(8)(283)},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(148),u=n(l),c=a.default.createClass({displayName:"PageHeader",propTypes:{title:i.default.oneOfType([i.default.node,i.default.string]).isRequired,children:i.default.oneOfType([i.default.array,i.default.node]),experimental:i.default.bool,subpage:i.default.bool},getDefaultProps:function(){return{experimental:!1,subpage:!1}},render:function(){var e=void 0!==this.props.children&&void 0!==this.props.children.length?this.props.children:[this.props.children],t=void 0;this.props.experimental&&(t=a.default.createElement("span",{style:{cursor:"help",marginLeft:5,fontSize:14,lineHeight:"20px",verticalAlign:"text-top"}},a.default.createElement(s.OverlayTrigger,{placement:"bottom",overlay:a.default.createElement(s.Tooltip,{id:"experimental"},"This feature of Graylog is new and should be considered experimental.")},a.default.createElement(s.Label,{bsStyle:"primary"},"Experimental"))));var n=this.props.subpage?"content-head":"content content-head";return a.default.createElement("div",null,a.default.createElement(s.Row,{className:n},a.default.createElement(s.Col,{sm:12},e[2]&&a.default.createElement("div",{className:"actions-lg visible-lg visible-md"},a.default.createElement("div",{className:"actions-container"},e[2])),a.default.createElement("h1",null,this.props.title," ",a.default.createElement("small",null,t)),e[0]&&a.default.createElement("p",{className:"description"},e[0]),e[1]&&a.default.createElement(u.default,null,e[1])),e[2]&&a.default.createElement(s.Col,{sm:12,lgHidden:!0,mdHidden:!0,className:"actions-sm"},e[2])))}});exports.default=c,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=a.default.createClass({displayName:"SupportLink",propTypes:{small:i.default.bool,children:i.default.node.isRequired},render:function(){var e=this.props.small?"fa-stack":"fa-stack fa-lg";return a.default.createElement("table",{className:"description-tooltips",style:{marginBottom:"10px"}},a.default.createElement("tbody",null,a.default.createElement("tr",null,a.default.createElement("td",{style:{width:"40px"}},a.default.createElement("span",{className:e},a.default.createElement("i",{className:"fa fa-circle fa-stack-2x"}),a.default.createElement("i",{className:"fa fa-lightbulb-o fa-stack-1x fa-inverse"}))),a.default.createElement("td",null,a.default.createElement("strong",null,this.props.children)))))}});exports.default=s,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}exports.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}},{key:"componentDidMount",value:function(){"undefined"!=typeof SVGElement&&g.default.findDOMNode(this)instanceof SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillReceiveProps",value:function(e){!e.position||this.props.position&&e.position.x===this.props.position.x&&e.position.y===this.props.position.y||this.setState({x:e.position.x,y:e.position.y})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"render",value:function(){var e,t={},n=null,i=Boolean(this.props.position),o=!i||this.state.dragging,a=this.props.position||this.props.defaultPosition,l={x:(0,b.canDragX)(this)&&o?this.state.x:a.x,y:(0,b.canDragY)(this)&&o?this.state.y:a.y};this.state.isElementSVG?n=(0,y.createSVGTransform)(l):t=(0,y.createCSSTransform)(l);var u=this.props,c=u.defaultClassName,h=u.defaultClassNameDragging,f=u.defaultClassNameDragged,p=(0,v.default)(this.props.children.props.className||"",c,(e={},r(e,h,this.state.dragging),r(e,f,this.state.dragged),e));return d.default.createElement(C.default,s({},this.props,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),d.default.cloneElement(d.default.Children.only(this.props.children),{className:p,style:s({},this.props.children.props.style,t),transform:n}))}}]),t}(d.default.Component);S.displayName="Draggable",S.propTypes=s({},C.default.propTypes,{axis:f.default.oneOf(["both","x","y","none"]),bounds:f.default.oneOfType([f.default.shape({left:f.default.number,right:f.default.number,top:f.default.number,bottom:f.default.number}),f.default.string,f.default.oneOf([!1])]),defaultClassName:f.default.string,defaultClassNameDragging:f.default.string,defaultClassNameDragged:f.default.string,defaultPosition:f.default.shape({x:f.default.number,y:f.default.number}),position:f.default.shape({x:f.default.number,y:f.default.number}),className:_.dontSetMe,style:_.dontSetMe,transform:_.dontSetMe}),S.defaultProps=s({},C.default.defaultProps,{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},position:null}),exports.default=S},function(t,exports){t.exports=e},function(e,exports,t){if("production"!=={DRAGGABLE_DEBUG:void 0}.NODE_ENV){var n="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,r=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n};e.exports=t(4)(r,!0)}else e.exports=t(10)()},function(e,exports,t){"use strict";var n=t(5),r=t(6),i=t(7),o=t(8),a=t(9);e.exports=function(e,t){function s(e){var t=e&&(A&&e[A]||e[E]);if("function"==typeof t)return t}function l(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t}function u(e){this.message=e,this.stack=""}function c(e){function n(n,l,c,d,h,f,p){if(d=d||S,f=f||c,p!==o)if(t)r(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("production"!=={DRAGGABLE_DEBUG:void 0}.NODE_ENV&&"undefined"!=typeof console){var g=d+":"+c;!a[g]&&s<3&&(i(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",f,d),a[g]=!0,s++)}return null==l[c]?n?new u(null===l[c]?"The "+h+" `"+f+"` is marked as required in `"+d+"`, but its value is `null`.":"The "+h+" `"+f+"` is marked as required in `"+d+"`, but its value is `undefined`."):null:e(l,c,d,h,f)}if("production"!=={DRAGGABLE_DEBUG:void 0}.NODE_ENV)var a={},s=0;var l=n.bind(null,!1);return l.isRequired=n.bind(null,!0),l}function d(e){function t(t,n,r,i,o,a){var s=t[n];if(_(s)!==e)return new u("Invalid "+i+" `"+o+"` of type `"+w(s)+"` supplied to `"+r+"`, expected `"+e+"`.");return null}return c(t)}function h(e){function t(t,n,r,i,a){if("function"!=typeof e)return new u("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s)){return new u("Invalid "+i+" `"+a+"` of type `"+_(s)+"` supplied to `"+r+"`, expected an array.")}for(var l=0;l1?t-1:0),r=1;r2?r-2:0),o=2;o0&&void 0!==arguments[0]?arguments[0]:{};return b({touchAction:"none"},e)}Object.defineProperty(exports,"__esModule",{value:!0});var b=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window||void 0===window.document)return"";var t=window.document.documentElement.style;if(e in t)return"";for(var r=0;r1)for(var n=1;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}exports.__esModule=!0;var s=Object.assign||function(e){for(var t=1;te[s]&&(r=s)}return r}function r(e,t){if(!t[e])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+e+" is missing!");return t[e]}function i(e,t,n,r,i,s){if(e[n])return(0,a.cloneLayout)(e[n]);for(var l=e[r],u=o(t),c=u.slice(u.indexOf(n)),d=0,h=c.length;d0&&void 0!==arguments[0]?arguments[0]:l,t=arguments[1];switch(t.type){case s.BEGIN_DRAG:return{initialSourceClientOffset:t.sourceClientOffset,initialClientOffset:t.clientOffset,clientOffset:t.clientOffset};case s.HOVER:return n(e.clientOffset,t.clientOffset)?e:a({},e,{clientOffset:t.clientOffset});case s.END_DRAG:case s.DROP:return l;default:return e}}function i(e){var t=e.clientOffset,n=e.initialClientOffset,r=e.initialSourceClientOffset;return t&&n&&r?{x:t.x+r.x-n.x,y:t.y+r.y-n.y}:null}function o(e){var t=e.clientOffset,n=e.initialClientOffset;return t&&n?{x:t.x-n.x,y:t.y-n.y}:null}Object.defineProperty(exports,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t=u&&(h=l,f=!1,t=new r(t));e:for(;++d-1&&e%1==0&&e<=n}var n=9007199254740991;e.exports=t},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(){var e=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],arguments[1]),t=arguments[2];switch(e.type){case u.HOVER:break;case c.ADD_SOURCE:case c.ADD_TARGET:case c.REMOVE_TARGET:case c.REMOVE_SOURCE:return d;case u.BEGIN_DRAG:case u.PUBLISH_DRAG_SOURCE:case u.END_DRAG:case u.DROP:default:return h}var n=e.targetIds,r=t.targetIds,i=(0,a.default)(n,r),o=!1;if(0===i.length){for(var s=0;s0)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r,exports.areDirty=i;var o=t(500),a=n(o),s=t(508),l=n(s),u=t(77),c=t(84),d=[],h=[]},function(e,exports,t){function n(e,t,o,a,s){var l=-1,u=e.length;for(o||(o=i),s||(s=[]);++l0&&o(c)?t>1?n(c,t-1,o,a,s):r(s,c):a||(s[s.length]=c)}return s}var r=t(503),i=t(504);e.exports=n},function(e,exports,t){var n=t(505),r=t(62),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(e){return r(e)&&o.call(e,"callee")&&!a.call(e,"callee")};e.exports=s},function(e,exports,t){function n(e,t,n){var c=-1,d=i,h=e.length,f=!0,p=[],g=p;if(n)f=!1,d=o;else if(h>=u){var m=t?null:s(e);if(m)return l(m);f=!1,d=a,g=new r}else g=t?[]:p;e:for(;++c, or turn it into a drag source or a drop target itself.")}}function r(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!(0,o.isValidElement)(t)){return void e(t,r)}var i=t;n(i);var a=r?function(t){return e(t,r)}:e;return(0,s.default)(i,a)}}function i(e){var t={};return Object.keys(e).forEach(function(n){var i=e[n],o=r(i);t[n]=function(){return o}}),t}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=i;var o=t(0),a=t(531),s=function(e){return e&&e.__esModule?e:{default:e}}(a)},function(e,exports,t){"use strict";function n(e,t){return t===e||null!==t&&null!==e&&(0,i.default)(t,e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=n;var r=t(108),i=function(e){return e&&e.__esModule?e:{default:e}}(r)},function(e,exports,t){"use strict";function n(e,t){return"string"==typeof e||"symbol"===(void 0===e?"undefined":r(e))||t&&(0,o.default)(e)&&e.every(function(e){return n(e,!1)})}Object.defineProperty(exports,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};exports.default=n;var i=t(42),o=function(e){return e&&e.__esModule?e:{default:e}}(i)},function(e,exports,t){function n(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var r=t(164);e.exports=n},function(e,exports){function t(e,t){return!!(t=null==t?n:t)&&("number"==typeof e||r.test(e))&&e>-1&&e%1==0&&ei&&l>a||(e.moveItem(r,i),t.getItem().index=i)}}},y=l.default.createClass({displayName:"SortableListItem",propTypes:{connectDragSource:a.default.func.isRequired,connectDropTarget:a.default.func.isRequired,content:a.default.any.isRequired,disableDragging:a.default.bool,index:a.default.number.isRequired,isDragging:a.default.bool.isRequired,isOver:a.default.bool.isRequired,id:a.default.any.isRequired,moveItem:a.default.func.isRequired},getDefaultProps:function(){return{disableDragging:!1}},render:function(){var e=this.props,t=e.content,n=e.isDragging,r=e.isOver,i=e.connectDragSource,o=e.connectDropTarget,a=[p.default.listGroupItem];n&&a.push("dragging"),r&&a.push("over");var s=l.default.createElement("span",{className:p.default.itemHandle},l.default.createElement("i",{className:"fa fa-sort"})),u=l.default.createElement("div",{className:"sortable-list-item"},l.default.createElement(d.ListGroupItem,{className:a.join(" ")},l.default.createElement("div",null,this.props.disableDragging?null:s,t)));return this.props.disableDragging?u:i(o(u))}});exports.default=(0,h.DropTarget)(g.ITEM,v,i)((0,h.DragSource)(g.ITEM,m,r)(y)),e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(12),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=!1,o={init:function(){i||((0,r.default)("#scroll-to-search-hint, #scroll-to-search-hint i").on("click",function(){(0,r.default)("html, body").animate({scrollTop:0},"fast")}),i=!0)},escape:function(e){return e.replace(/(&&|\|\||[:\\\/\+\-!\(\)\{\}\[\]\^"~*\?])/g,"\\$&")},_query:function(){return(0,r.default)("#universalsearch-query")},setQuery:function(e){var t=this._query();t.val(e),t.effect("bounce"),this.scrollToSearchbarHint()},getQuery:function(){return this._query().val()},submit:function(){(0,r.default)("#universalsearch form").submit()},createSourceQuery:function(e){return"source:"+this.escape(e)},queryContainsSegment:function(e){return this.getQuery().split(" ").some(function(t){return t===e})},addSegment:function(e,t){var n=this.getQuery();if(!this.queryContainsSegment(e)){"*"===n&&(n="");var r="";void 0!==t&&""!==n&&(r=n+" "+t+" "),r+=e,this.setQuery(r)}},andOperator:function(){return"AND"},orOperator:function(){return"OR"},notOperator:function(){return"NOT"},scrollToSearchbarHint:function(){(0,r.default)(document).scrollTop()>50&&(0,r.default)("#scroll-to-search-hint").fadeIn("fast").delay(1500).fadeOut("fast")},substringMatcher:function(e,t,n){return function(r,i){var o=[];e.forEach(function(e){if(o.length=0},count:function(e){return t(588)(this.s,e)},dasherize:function(){var e=this.trim().s.replace(/[_\s]+/g,"-").replace(/([A-Z])/g,"-$1").replace(/-+/g,"-").toLowerCase();return new this.constructor(e)},equalsIgnoreCase:function(e){return this.s.toLowerCase()==e.toLowerCase()},latinise:function(){var e=this.replace(/[^A-Za-z0-9\[\] ]/g,function(e){return p[e]||e});return new this.constructor(e)},decodeHtmlEntities:function(){var e=this.s;return e=e.replace(/&#(\d+);?/g,function(e,t){return String.fromCharCode(t)}).replace(/&#[xX]([A-Fa-f0-9]+);?/g,function(e,t){return String.fromCharCode(parseInt(t,16))}).replace(/&([^;\W]+;?)/g,function(e,t){var n=t.replace(/;$/,""),r=f[t]||t.match(/;$/)&&f[n];return"number"==typeof r?String.fromCharCode(r):"string"==typeof r?r:e}),new this.constructor(e)},endsWith:function(){for(var e=Array.prototype.slice.call(arguments,0),t=0;t=0&&this.s.indexOf(e[t],n)===n)return!0}return!1},escapeHTML:function(){return new this.constructor(this.s.replace(/[&<>"']/g,function(e){return"&"+w[e]+";"}))},ensureLeft:function(e){var t=this.s;return 0===t.indexOf(e)?this:new this.constructor(e+t)},ensureRight:function(e){var t=this.s;return this.endsWith(e)?this:new this.constructor(t+e)},humanize:function(){if(null===this.s||void 0===this.s)return new this.constructor("");var e=this.underscore().replace(/_id$/,"").replace(/_/g," ").trim().capitalize();return new this.constructor(e)},isAlpha:function(){return!/[^a-z\xDF-\xFF]|^$/.test(this.s.toLowerCase())},isAlphaNumeric:function(){return!/[^0-9a-z\xDF-\xFF]/.test(this.s.toLowerCase())},isEmpty:function(){return null===this.s||void 0===this.s||/^[\s\xa0]*$/.test(this.s)},isLower:function(){return this.isAlpha()&&this.s.toLowerCase()===this.s},isNumeric:function(){return!/[^0-9]/.test(this.s)},isUpper:function(){return this.isAlpha()&&this.s.toUpperCase()===this.s},left:function(e){if(e>=0){var t=this.s.substr(0,e);return new this.constructor(t)}return this.right(-e)},lines:function(){return this.replaceAll("\r\n","\n").s.split("\n")},pad:function(e,t){if(null==t&&(t=" "),this.s.length>=e)return new this.constructor(this.s);e-=this.s.length;var n=Array(Math.ceil(e/2)+1).join(t),r=Array(Math.floor(e/2)+1).join(t);return new this.constructor(n+this.s+r)},padLeft:function(e,t){return null==t&&(t=" "),this.s.length>=e?new this.constructor(this.s):new this.constructor(Array(e-this.s.length+1).join(t)+this.s)},padRight:function(e,t){return null==t&&(t=" "),this.s.length>=e?new this.constructor(this.s):new this.constructor(this.s+Array(e-this.s.length+1).join(t))},parseCSV:function(e,t,n,r){e=e||",",n=n||"\\",void 0===t&&(t='"');var i=0,o=[],a=[],s=this.s.length,l=!1,u=!1,c=this,d=function(e){return c.s.charAt(e)};if(void 0!==r)var h=[];for(t||(l=!0);i=0){var t=this.s.substr(this.s.length-e,e);return new this.constructor(t)}return this.left(-e)},setValue:function(e){return i(this,e),this},slugify:function(){var e=new o(new o(this.s).latinise().s.replace(/[^\w\s-]/g,"").toLowerCase()).dasherize().s;return"-"===e.charAt(0)&&(e=e.substr(1)),new this.constructor(e)},startsWith:function(){for(var e=Array.prototype.slice.call(arguments,0),t=0;t0?arguments:[""],function(t){e=e.replace(RegExp("]*>","gi"),"")}),new this.constructor(e)},template:function(e,t,n){var r=this.s,t=t||u.TMPL_OPEN,n=n||u.TMPL_CLOSE,i=t.replace(/[-[\]()*\s]/g,"\\$&").replace(/\$/g,"\\$"),o=n.replace(/[-[\]()*\s]/g,"\\$&").replace(/\$/g,"\\$"),a=new RegExp(i+"(.+?)"+o,"g");return(r.match(a)||[]).forEach(function(i){var o=i.substring(t.length,i.length-n.length).trim(),a=void 0===e[o]?"":e[o];r=r.replace(i,a)}),new this.constructor(r)},times:function(e){return new this.constructor(new Array(e+1).join(this.s))},titleCase:function(){var e=this.s;return e&&(e=e.replace(/(^[a-z]| [a-z]|-[a-z]|_[a-z])/g,function(e){return e.toUpperCase()})),new this.constructor(e)},toBoolean:function(){if("string"==typeof this.orig){var e=this.s.toLowerCase();return"true"===e||"yes"===e||"on"===e||"1"===e}return!0===this.orig||1===this.orig},toFloat:function(e){var t=parseFloat(this.s);return e?parseFloat(t.toFixed(e)):t},toInt:function(){return/^\s*-?0x/i.test(this.s)?parseInt(this.s,16):parseInt(this.s,10)},trim:function(){var e;return e=void 0===g.trim?this.s.replace(/(^\s*|\s*$)/g,""):this.s.trim(),new this.constructor(e)},trimLeft:function(){var e;return e=g.trimLeft?this.s.trimLeft():this.s.replace(/(^\s*)/g,""),new this.constructor(e)},trimRight:function(){var e;return e=g.trimRight?this.s.trimRight():this.s.replace(/\s+$/,""),new this.constructor(e)},truncate:function(e,t){var n=this.s;if(e=~~e,t=t||"...",n.length<=e)return new this.constructor(n);var r=function(e){return e.toUpperCase()!==e.toLowerCase()?"A":" "},i=n.slice(0,e+1).replace(/.(?=\W*\w*$)/g,r);return i=i.slice(i.length-2).match(/\w\w/)?i.replace(/\s*\S+$/,""):new o(i.slice(0,i.length-1)).trimRight().s,new o((i+t).length>n.length?n:n.slice(0,i.length)+t)},toCSV:function(){var e=",",t='"',n="\\",r=!0,i=!1,a=[];if("object"==typeof arguments[0]?(e=arguments[0].delimiter||e,e=arguments[0].separator||e,t=arguments[0].qualifier||t,r=!!arguments[0].encloseNumbers,n=arguments[0].escape||n,i=!!arguments[0].keys):"string"==typeof arguments[0]&&(e=arguments[0]),"string"==typeof arguments[1]&&(t=arguments[1]),null===arguments[1]&&(t=null),this.orig instanceof Array)a=this.orig;else for(var s in this.orig)this.orig.hasOwnProperty(s)&&(i?a.push(s):a.push(this.orig[s]));for(var l=n+t,u=[],c=0;c",this,""),new this.constructor(n)}},v=[],y=function(){for(var e=l(),t={},n=0;n",quot:'"',apos:"'",amp:"&"},w={};for(var C in _)w[_[C]]=C;f={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,"OElig;":338,"oelig;":339,"Scaron;":352,"scaron;":353,"Yuml;":376,"fnof;":402,"circ;":710,"tilde;":732,"Alpha;":913,"Beta;":914,"Gamma;":915,"Delta;":916,"Epsilon;":917,"Zeta;":918,"Eta;":919,"Theta;":920,"Iota;":921,"Kappa;":922,"Lambda;":923,"Mu;":924,"Nu;":925,"Xi;":926,"Omicron;":927,"Pi;":928,"Rho;":929,"Sigma;":931,"Tau;":932,"Upsilon;":933,"Phi;":934,"Chi;":935,"Psi;":936,"Omega;":937,"alpha;":945,"beta;":946,"gamma;":947,"delta;":948,"epsilon;":949,"zeta;":950,"eta;":951,"theta;":952,"iota;":953,"kappa;":954,"lambda;":955,"mu;":956,"nu;":957,"xi;":958,"omicron;":959,"pi;":960,"rho;":961,"sigmaf;":962,"sigma;":963,"tau;":964,"upsilon;":965,"phi;":966,"chi;":967,"psi;":968,"omega;":969,"thetasym;":977,"upsih;":978,"piv;":982,"ensp;":8194,"emsp;":8195,"thinsp;":8201,"zwnj;":8204,"zwj;":8205,"lrm;":8206,"rlm;":8207,"ndash;":8211,"mdash;":8212,"lsquo;":8216,"rsquo;":8217,"sbquo;":8218,"ldquo;":8220,"rdquo;":8221,"bdquo;":8222,"dagger;":8224,"Dagger;":8225,"bull;":8226,"hellip;":8230,"permil;":8240,"prime;":8242,"Prime;":8243,"lsaquo;":8249,"rsaquo;":8250,"oline;":8254,"frasl;":8260,"euro;":8364,"image;":8465,"weierp;":8472,"real;":8476,"trade;":8482,"alefsym;":8501,"larr;":8592,"uarr;":8593,"rarr;":8594,"darr;":8595,"harr;":8596,"crarr;":8629,"lArr;":8656,"uArr;":8657,"rArr;":8658,"dArr;":8659,"hArr;":8660,"forall;":8704,"part;":8706,"exist;":8707,"empty;":8709,"nabla;":8711,"isin;":8712,"notin;":8713,"ni;":8715,"prod;":8719,"sum;":8721,"minus;":8722,"lowast;":8727,"radic;":8730,"prop;":8733,"infin;":8734,"ang;":8736,"and;":8743,"or;":8744,"cap;":8745,"cup;":8746,"int;":8747,"there4;":8756,"sim;":8764,"cong;":8773,"asymp;":8776,"ne;":8800,"equiv;":8801,"le;":8804,"ge;":8805,"sub;":8834,"sup;":8835,"nsub;":8836,"sube;":8838,"supe;":8839,"oplus;":8853,"otimes;":8855,"perp;":8869,"sdot;":8901,"lceil;":8968,"rceil;":8969,"lfloor;":8970,"rfloor;":8971,"lang;":9001,"rang;":9002,"loz;":9674,"spades;":9824,"clubs;":9827,"hearts;":9829,"diams;":9830}}).call(this)},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(64),l=n(s),u=a.default.createClass({displayName:"PipelineConnectionsList",propTypes:{pipeline:i.default.object.isRequired,connections:i.default.array.isRequired,streams:i.default.array.isRequired,streamsFormatter:i.default.func.isRequired,noConnectionsMessage:i.default.any},getDefaultProps:function(){return{noConnectionsMessage:"Pipeline not connected to any streams"}},render:function(){var e=this,t=this.props.connections.filter(function(t){return t.pipeline_ids&&t.pipeline_ids.includes(e.props.pipeline.id)}).filter(function(t){return e.props.streams.some(function(e){return e.id===t.stream_id})}).map(function(t){return e.props.streams.find(function(e){return e.id===t.stream_id})}).sort(function(e,t){return(0,l.default)(e.title,t.title)});return a.default.createElement("span",null,0===t.length?this.props.noConnectionsMessage:this.props.streamsFormatter(t))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(7),a=n(o),s=t(4),l=n(s),u=t(5),c=n(u),d=t(114),h=n(d),f="/plugins/org.graylog.plugins.pipelineprocessor",p=i.default.createStore({listenables:[h.default],connections:void 0,getInitialState:function(){return{connections:this.connections}},list:function(){var e=this,t=function(e){a.default.error("Fetching pipeline connections failed with status: "+e.message,"Could not retrieve pipeline connections")},n=l.default.qualifyUrl(f+"/system/pipelines/connections");(0,c.default)("GET",n).then(function(t){e.connections=t,e.trigger({connections:t})},t)},connectToStream:function(e){var t=this,n=l.default.qualifyUrl(f+"/system/pipelines/connections/to_stream"),r={stream_id:e.stream,pipeline_ids:e.pipelines};(0,c.default)("POST",n,r).then(function(e){t.connections.filter(function(t){return t.stream_id===e.stream_id})[0]?t.connections=t.connections.map(function(t){return t.stream_id===e.stream_id?e:t}):t.connections.push(e),t.trigger({connections:t.connections}),a.default.success("Pipeline connections updated successfully")},this._failUpdateCallback)},connectToPipeline:function(e){var t=this,n=l.default.qualifyUrl(f+"/system/pipelines/connections/to_pipeline"),r={pipeline_id:e.pipeline,stream_ids:e.streams};(0,c.default)("POST",n,r).then(function(e){e.forEach(function(e){t.connections.filter(function(t){return t.stream_id===e.stream_id})[0]?t.connections=t.connections.map(function(t){return t.stream_id===e.stream_id?e:t}):t.connections.push(e)}),t.trigger({connections:t.connections}),a.default.success("Pipeline connections updated successfully")},this._failUpdateCallback)},_failUpdateCallback:function(e){a.default.error("Updating pipeline connections failed with status: "+e.message,"Could not update pipeline connections")}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(2),l=n(s),u=t(3),c=t(19),d=t(11),h=t(13),f=t(33),p=n(f),g=t(39),m=n(g),v=t(50),y=n(v),b=t(16),_=n(b),w=a.default.createClass({displayName:"StageForm",propTypes:{stage:i.default.object,create:i.default.bool,save:i.default.func.isRequired,validateStage:i.default.func.isRequired},mixins:[l.default.connect(y.default)],getDefaultProps:function(){return{stage:{stage:0,match_all:!1,rules:[]}}},getInitialState:function(){var e=p.default.clone(this.props.stage);return{stage:{stage:e.stage,match_all:e.match_all,rules:e.rules}}},openModal:function(){this.refs.modal.open()},_onChange:function(e){var t=p.default.clone(this.state.stage);t[e.target.name]=m.default.getValueFromInput(e.target),this.setState({stage:t})},_onRulesChange:function(e){var t=p.default.clone(this.state.stage);t.rules=e,this.setState({stage:t})},_closeModal:function(){this.refs.modal.close()},_saved:function(){this._closeModal(),this.props.create&&this.setState(this.getInitialState())},_save:function(){this.props.save(this.state.stage,this._saved)},_getFormattedOptions:function(e){return e?e.map(function(e){return{value:e.title,label:e.title}}):[]},render:function(){var e=void 0;e=this.props.create?"Add new stage":a.default.createElement("span",null,"Edit");var t=a.default.createElement("span",null,"Select the rules evaluated on this stage, or create one in the"," ",a.default.createElement(c.LinkContainer,{to:_.default.pluginRoute("SYSTEM_PIPELINES_RULES")},a.default.createElement("a",null,"Pipeline Rules page")),".");return a.default.createElement("span",null,a.default.createElement(u.Button,{onClick:this.openModal,bsStyle:this.props.create?"success":"info"},e),a.default.createElement(h.BootstrapModalForm,{ref:"modal",title:(this.props.create?"Add new":"Edit")+" stage "+this.state.stage.stage,onSubmitForm:this._save,submitButtonText:"Save"},a.default.createElement("fieldset",null,a.default.createElement(h.Input,{type:"number",id:"stage",name:"stage",label:"Stage",autoFocus:!0,onChange:this._onChange,help:"Stage priority. The lower the number, the earlier it will execute.",value:this.state.stage.stage}),a.default.createElement(h.Input,{label:"Continue processing on next stage when"},a.default.createElement(h.Input,{type:"radio",id:"match_all",name:"match_all",value:"true",label:"All rules on this stage match the message",onChange:this._onChange,checked:this.state.stage.match_all}),a.default.createElement(h.Input,{type:"radio",id:"match_any",name:"match_all",value:"false",label:"At least one of the rules on this stage matches the message",onChange:this._onChange,checked:!this.state.stage.match_all}),a.default.createElement(h.Input,{label:"Stage rules",help:t},a.default.createElement(d.SelectableList,{options:this._getFormattedOptions(this.state.rules),isLoading:!this.state.rules,onChange:this._onRulesChange,selectedOptions:this.state.stage.rules}))))))}});exports.default=w,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(11),u=t(602),c=n(u),d=t(38),h=a.default.createClass({displayName:"PipelineDetails",propTypes:{pipeline:i.default.object,create:i.default.bool,onChange:i.default.func.isRequired,onCancel:i.default.func},render:function(){if(this.props.create)return a.default.createElement(c.default,{create:!0,save:this.props.onChange,onCancel:this.props.onCancel,modal:!1});var e=this.props.pipeline;return a.default.createElement("div",null,a.default.createElement(s.Row,null,a.default.createElement(s.Col,{md:12},a.default.createElement("div",{className:"pull-right"},a.default.createElement(c.default,{pipeline:e,save:this.props.onChange})),a.default.createElement("h2",null,"Details"),a.default.createElement("dl",{className:"dl-horizontal pipeline-dl",style:{marginTop:10}},a.default.createElement("dt",null,"Title"),a.default.createElement("dd",null,e.title),a.default.createElement("dt",null,"Description"),a.default.createElement("dd",null,e.description),a.default.createElement("dt",null,"Created"),a.default.createElement("dd",null,a.default.createElement(l.Timestamp,{dateTime:e.created_at,relative:!0})),a.default.createElement("dt",null,"Last modified"),a.default.createElement("dd",null,a.default.createElement(l.Timestamp,{dateTime:e.modified_at,relative:!0})),a.default.createElement("dt",null,"Current throughput"),a.default.createElement("dd",null,a.default.createElement(d.MetricContainer,{name:"org.graylog.plugins.pipelineprocessor.ast.Pipeline."+e.id+".executed"},a.default.createElement(d.CounterRate,{suffix:"msg/s"})))))),a.default.createElement("hr",null))}});exports.default=h,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;tthis.getPositionTopMax()?void("bottom"===this.state.affixed?this.updateStateAtBottom():this.setState({affixed:"bottom",position:"absolute",top:null},function(){e._isMounted&&e.updateStateAtBottom()})):void this.updateState("affix","fixed",r)}}},{key:"getPositionTopMax",value:function(){return(0,F.default)((0,D.default)(this))-(0,d.default)(A.default.findDOMNode(this))-this.props.offsetBottom}},{key:"updateState",value:function(e,t,n){var r=this;if(e!==this.state.affixed||t!==this.state.position||n!==this.state.top){var i="affix"===e?"":e.charAt(0).toUpperCase()+e.substr(1);this.props["onAffix"+i]&&this.props["onAffix"+i](),this.setState({affixed:e,position:t,top:n},function(){r.props["onAffixed"+i]&&r.props["onAffixed"+i]()})}}},{key:"updateStateAtBottom",value:function(){var e=this.getPositionTopMax(),t=(0,g.default)(A.default.findDOMNode(this)),n=(0,f.default)(t).top;this.updateState("bottom","absolute",e-n)}},{key:"render",value:function(){var e=w.default.Children.only(this.props.children),t=e.props,n=t.className,r=t.style,i=this.state,o=i.affixed,s=i.position,l=i.top,c={position:s,top:l},d=void 0,h=void 0;return"top"===o?(d=this.props.topClassName,h=this.props.topStyle):"bottom"===o?(d=this.props.bottomClassName,h=this.props.bottomStyle):(d=this.props.affixClassName,h=this.props.affixStyle),w.default.cloneElement(e,{className:(0,u.default)(d,n),style:a({},c,h,r)})}}]),t}(w.default.Component);R.propTypes={offsetTop:w.default.PropTypes.number,viewportOffsetTop:w.default.PropTypes.number,offsetBottom:w.default.PropTypes.number,topClassName:w.default.PropTypes.string,topStyle:w.default.PropTypes.object,affixClassName:w.default.PropTypes.string,affixStyle:w.default.PropTypes.object,bottomClassName:w.default.PropTypes.string,bottomStyle:w.default.PropTypes.object,onAffix:w.default.PropTypes.func,onAffixed:w.default.PropTypes.func,onAffixTop:w.default.PropTypes.func,onAffixedTop:w.default.PropTypes.func,onAffixBottom:w.default.PropTypes.func,onAffixedBottom:w.default.PropTypes.func},R.defaultProps={offsetTop:0,viewportOffsetTop:null,offsetBottom:0},exports.default=R,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-c)),r=setTimeout(e,n);return c=t,r}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(703),i=function(e){return e&&e.__esModule?e:{default:e}}(r),o=["","webkit","moz","o","ms"],a="clearTimeout",s=n,l=void 0,u=function(e,t){return e+(e?t[0].toUpperCase()+t.substr(1):t)+"AnimationFrame"};i.default&&o.some(function(e){var t=u(e,"request");if(t in window)return a=u(e,"cancel"),s=function(e){return window[t](e)}});var c=(new Date).getTime();l=function(e){return s(e)},l.cancel=function(e){window[a]&&"function"==typeof window[a]&&window[a](e)},exports.default=l,e.exports=exports.default},function(e,exports,t){e.exports=t(8)(269)},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(e){return Math.max(e.documentElement.offsetHeight||0,e.height||0,e.body.scrollHeight||0,e.body.offsetHeight||0)},e.exports=exports.default},function(e,exports,t){e.exports=t(8)(56)},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(e){return(0,a.default)(i.default.findDOMNode(e))};var r=t(17),i=n(r),o=t(704),a=n(o);e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(67),u=n(l),c=t(9),d=n(c),h=t(23),f=n(h),p=d.default.getStore("Search"),g=a.default.createClass({displayName:"SurroundingSearchButton",propTypes:{id:i.default.string.isRequired,timestamp:i.default.number.isRequired,searchConfig:i.default.object.isRequired,messageFields:i.default.object.isRequired},_buildTimeRangeOptions:function(e){var t={};return Object.keys(e.surrounding_timerange_options).forEach(function(n){t[f.default.duration(n).asSeconds()]=e.surrounding_timerange_options[n]}),t},_buildFilterFields:function(){var e=this,t={};return this.props.searchConfig&&this.props.searchConfig.surrounding_filter_fields.forEach(function(n){t[n]=e.props.messageFields[n]}),t},_searchLink:function(e){var t=f.default.unix(this.props.timestamp-Number(e)).toISOString(),n=f.default.unix(this.props.timestamp+Number(e)).toISOString();return p.searchSurroundingMessages(this.props.id,t,n,this._buildFilterFields())},render:function(){var e=this,t=this._buildTimeRangeOptions(this.props.searchConfig),n=Object.keys(t).sort(function(e,t){return(0,u.default)(e,t)}).map(function(n,r){return a.default.createElement(s.MenuItem,{key:r,href:e._searchLink(n)},t[n])});return a.default.createElement(s.DropdownButton,{title:"Show surrounding messages",bsSize:"small",id:"surrounding-search-dropdown"},n)}});exports.default=g,e.exports=exports.default},function(e,exports,t){"use strict";var n=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(exports,"__esModule",{value:!0});var r;!function(e){e[e.EOF=0]="EOF",e[e.WS=1]="WS",e[e.TERM=2]="TERM",e[e.PHRASE=3]="PHRASE",e[e.AND=4]="AND",e[e.OR=5]="OR",e[e.NOT=6]="NOT",e[e.COLON=7]="COLON",e[e.MUST=8]="MUST",e[e.MUST_NOT=9]="MUST_NOT",e[e.ERROR=10]="ERROR"}(r=exports.TokenType||(exports.TokenType={}));var i=function(){function e(){this.hiddenPrefix=[],this.hiddenSuffix=[]}return e}();exports.AST=i;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(i);exports.MissingAST=o;var a=function(e){function t(t,n){var r=e.call(this)||this;return r.modifier=t,r.right=n,r.hiddenModifierPrefix=[],r.hiddenModifierSuffix=[],r}return n(t,e),t.prototype.isNOTModifier=function(){return this.modifier.type===r.NOT},t}(i);exports.ModifierAST=a;var s=function(e){function t(t,n,r){var i=e.call(this)||this;return i.left=t,i.op=n,i.right=r,i.hiddenOpPrefix=[],i.hiddenOpSuffix=[],i}return n(t,e),t}(i);exports.ExpressionAST=s;var l=function(e){function t(t){var n=e.call(this)||this;return n.term=t,n}return n(t,e),t.prototype.isPhrase=function(){return-1!==this.term.asString().indexOf(" ")},t.prototype.isInclusiveRange=function(){return 0===this.term.asString().indexOf("[")},t.prototype.isExclusiveRange=function(){return 0===this.term.asString().indexOf("{")},t}(i);exports.TermAST=l;var u=function(e){function t(t,n,r){var i=e.call(this,r)||this;return i.field=t,i.colon=n,i.hiddenColonPrefix=[],i.hiddenColonSuffix=[],i}return n(t,e),t}(l);exports.TermWithFieldAST=u;var c=function(e){function t(){for(var t=[],n=0;n=this.tokenBuffer.length;){var t=this.lexer.next();if(t.type===r.EOF)return t;this.tokenBuffer.push(t)}return this.tokenBuffer[e]},e.prototype.skipHidden=function(){var e=this,t=this.syncWhile(r.WS,r.ERROR);return t.filter(function(e){return e.type===r.ERROR}).forEach(function(t){e.errors.push({position:t.beginPos,message:"Unexpected input: '"+t.asString()+"'"})}),t},e.prototype.syncWhile=function(){for(var e=this,t=[],n=0;n",license:"GPL-3.0",dependencies:{brace:"^0.7.0","react-ace":"^3.1.0"},devDependencies:{"graylog-web-plugin":"file:../../graylog2-server/graylog2-web-interface/packages/graylog-web-plugin"}}},function(e,exports,t){e.exports={PluginManifest:t(210),PluginStore:t(211)}},function(e,exports,t){"use strict";var n=function(e,exports){return{metadata:e,exports:exports}};e.exports=n},function(e,exports,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===h(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=(0,d.default)(e,"click",function(e){return t.onClick(e)})}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new u.default({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return l("action",e)}},{key:"defaultTarget",value:function(e){var t=l("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return l("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach(function(e){n=n&&!!document.queryCommandSupported(e)}),n}}]),t}(c.default);e.exports=p})},function(e,exports,t){var n,r,i;!function(o,a){r=[e,t(216)],n=a,void 0!==(i="function"==typeof n?n.apply(exports,r):n)&&(e.exports=i)}(0,function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(e){return e&&e.__esModule?e:{default:e}}(t),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var e=this,t="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[t?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,r.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,r.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==(void 0===e?"undefined":i(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}]),e}();e.exports=a})},function(e,exports){function t(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var r=window.getSelection(),i=document.createRange();i.selectNodeContents(e),r.removeAllRanges(),r.addRange(i),t=r.toString()}return t}e.exports=t},function(e,exports){function t(){}t.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){function r(){i.off(e,r),t.apply(n,arguments)}var i=this;return r._=t,this.on(e,r,n)},emit:function(e){var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,i=n.length;for(r;r0}function s(e){var t=parseInt(e.val());return t>0&&t<65535}function l(e){return parseInt(e.val())>0}function u(e){return parseInt(e.val())<0}function c(e){return e.val().match("^\\w*$")}function d(e){return l(e)||0==parseInt(e.val())}function h(e){return isNumber(e.val())}function f(e){var t=(0,y.default)(e).val();try{return m.default.parseFromString(t),!0}catch(e){}return!1}function p(e){var t=(0,y.default)(e).parent().parent(),n=(0,y.default)("input[name='from']",t).val(),r=(0,y.default)("input[name='to']",t).val();try{var i=m.default.parseFromString(n).toMoment(),o=m.default.parseFromString(r).toMoment();return i.isBefore(o)||i.isSame(o)}catch(e){}return!1}Object.defineProperty(exports,"__esModule",{value:!0}),exports.validate=r;var g=t(20),m=n(g),v=t(12),y=n(v);e.jQuery=y.default,t(73),t(388)}).call(exports,t(21))},function(e,exports,t){e.exports=t(8)(769)},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({list:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({delete:{asyncResult:!0},list:{asyncResult:!0},save:{asyncResult:!0},update:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({available:{asyncResult:!0},delete:{asyncResult:!0},list:{asyncResult:!0},listAll:{asyncResult:!0},save:{asyncResult:!0},update:{asyncResult:!0},get:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({available:{asyncResult:!0},listAll:{asyncResult:!0},testAlert:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({get:{asyncResult:!0},list:{asyncResult:!0},listPaginated:{asyncResult:!0},listAllPaginated:{asyncResult:!0},listAllStreams:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({load:{asyncResult:!0},update:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({traffic:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({list:{asyncResult:!0},listSearchesClusterConfig:{asyncResult:!0},listMessageProcessorsConfig:{asyncResult:!0},update:{asyncResult:!0},updateMessageProcessorsConfig:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({apply:{asyncResult:!0},create:{asyncResult:!0},delete:{asyncResult:!0},export:{asyncResult:!0},list:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({create:{asyncResult:!0},delete:{asyncResult:!0},get:{asyncResult:!0},list:{asyncResult:!0},update:{asyncResult:!0},updatePositions:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({available:{asyncResult:!0},create:{asyncResult:!0},list:{asyncResult:!0},remove:{asyncResult:!0},update:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({cycle:{asyncResult:!0},list:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({list:{asyncResult:!0},get:{asyncResult:!0},create:{asyncResult:!0},save:{asyncResult:!0},update:{asyncResult:!0},delete:{asyncResult:!0},order:{asyncResult:!0},import:{}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({get:{asyncResult:!0},getHistogram:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({getStatus:{asyncResult:!0},dismiss:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({load:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({health:{asyncResult:!0},name:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({list:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({list:{asyncResult:!0},recalculate:{asyncResult:!0},recalculateIndex:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({list:{asyncResult:!0},listPaginated:{asyncResult:!0},get:{asyncResult:!0},update:{asyncResult:!0},create:{asyncResult:!0},delete:{asyncResult:!0},setDefault:{asyncResult:!0},stats:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({list:{asyncResult:!0},listAll:{asyncResult:!0},close:{asyncResult:!0},delete:{asyncResult:!0},multiple:{asyncResult:!0},reopen:{asyncResult:!0},subscribe:{asyncResult:!1},unsubscribe:{asyncResult:!1}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({loadRotationStrategies:{asyncResult:!0},loadRetentionStrategies:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({list:{asyncResult:!0},get:{asyncResult:!0},getOptional:{asyncResult:!0},create:{asyncResult:!0},delete:{asyncResult:!0},update:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({list:{asyncResult:!0},get:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({loadSettings:{asyncResult:!0},update:{asyncResult:!0},testServerConnection:{asyncResult:!0},testLogin:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({loadGroups:{asyncResult:!0},loadMapping:{asyncResult:!0},saveMapping:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({loggers:{asyncResult:!0},subsystems:{asyncResult:!0},setSubsystemLoggerLevel:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({searchPaginated:{asyncResult:!0},reloadPage:{asyncResult:!0},get:{asyncResult:!0},create:{asyncResult:!0},delete:{asyncResult:!0},update:{asyncResult:!0},getTypes:{asyncResult:!0},validate:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({searchPaginated:{asyncResult:!0},reloadPage:{asyncResult:!0},get:{asyncResult:!0},create:{asyncResult:!0},delete:{asyncResult:!0},update:{asyncResult:!0},getTypes:{asyncResult:!0},lookup:{asyncResult:!0},validate:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({searchPaginated:{asyncResult:!0},reloadPage:{asyncResult:!0},get:{asyncResult:!0},create:{asyncResult:!0},delete:{asyncResult:!0},update:{asyncResult:!0},getErrors:{asyncResult:!0},lookup:{asyncResult:!0},purgeKey:{asyncResult:!0},purgeAll:{asyncResult:!0},validate:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({total:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({loadMessage:{asyncResult:!0},fieldTerms:{asyncResult:!0},loadRawMessage:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({add:{asyncResult:!0},addGlobal:{asyncResult:!0},clear:{asyncResult:!0},filter:{asyncResult:!0},list:{asyncResult:!0},names:{asyncResult:!0},remove:{asyncResult:!0},removeGlobal:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({list:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({delete:{asyncResult:!0},list:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions(["changeInterval","disable","enable"]);exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({create:{asyncResult:!0},update:{asyncResult:!0},list:{asyncResult:!0},execute:{asyncResult:!0},delete:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions(["reportError","reportSuccess"]);exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({login:{asyncResult:!0},logout:{asyncResult:!0},validate:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({get:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({list:{asyncResult:!0},create:{asyncResult:!0},update:{asyncResult:!0},delete:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({list:{asyncResult:!0},getJob:{asyncResult:!0},cancelJob:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({removeWidget:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(5),l=n(s),u=t(7),c=n(u),d=t(10),h=n(d),f=t(6),p=n(f),g=p.default.getActions("AlarmCallbackHistory"),m=i.default.createStore({listenables:[g],histories:void 0,getInitialState:function(){return{histories:this.histories}},list:function(e,t){var n=this,r=a.default.qualifyUrl(h.default.AlarmCallbackHistoryApiController.list(e,t).url),i=(0,l.default)("GET",r).then(function(e){return n.histories=e.histories,n.trigger({histories:n.histories}),n.histories},function(e){c.default.error("Fetching notification history for alert '"+t+"' failed with status: "+e,"Could not retrieve notification history.")});g.list.promise(i)}});exports.default=m,e.exports=exports.default},function(e,exports,t){"use strict";var n=t(125),r=t(126),i={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},o=Date.prototype.toISOString,a={delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,serializeDate:function(e){return o.call(e)},skipNulls:!1,strictNullHandling:!1},s=function e(t,r,i,o,s,l,u,c,d,h,f,p){var g=t;if("function"==typeof u)g=u(r,g);else if(g instanceof Date)g=h(g);else if(null===g){if(o)return l&&!p?l(r,a.encoder):r;g=""}if("string"==typeof g||"number"==typeof g||"boolean"==typeof g||n.isBuffer(g)){if(l){return[f(p?r:l(r,a.encoder))+"="+f(l(g,a.encoder))]}return[f(r)+"="+f(String(g))]}var m=[];if(void 0===g)return m;var v;if(Array.isArray(u))v=u;else{var y=Object.keys(g);v=c?y.sort(c):y}for(var b=0;b0?F+x:""}},function(e,exports,t){"use strict";var n=t(125),r=Object.prototype.hasOwnProperty,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:n.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},o=function(e,t){for(var n={},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,s=o.split(t.delimiter,a),l=0;l=0;--i){var o,a=e[i];if("[]"===a)o=[],o=o.concat(r);else{o=n.plainObjects?Object.create(null):{};var s="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,l=parseInt(s,10);!isNaN(l)&&a!==s&&String(l)===s&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(o=[],o[l]=r):o[s]=r}r=o}return r},s=function(e,t,n){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,l=o.exec(i),u=l?i.slice(0,l.index):i,c=[];if(u){if(!n.plainObjects&&r.call(Object.prototype,u)&&!n.allowPrototypes)return;c.push(u)}for(var d=0;null!==(l=s.exec(i))&&d0?2==o.length?"function"==typeof o[1]?this[o[0]]=o[1].call(this,s):this[o[0]]=o[1]:3==o.length?"function"!=typeof o[1]||o[1].exec&&o[1].test?this[o[0]]=s?s.replace(o[1],o[2]):void 0:this[o[0]]=s?o[1].call(this,s,o[2]):void 0:4==o.length&&(this[o[0]]=s?o[3].call(this,s.replace(o[1],o[2])):void 0):this[o]=s||void 0;l+=2}},str:function(e,t){for(var n in t)if("object"==typeof t[n]&&t[n].length>0){for(var r=0;r=400){var s="cannot "+t.method+" "+t.url+" ("+a.status+")";e=new o(s),e.status=a.status,e.body=a.body,e.res=a,r(e)}else i?r(new o(i.message,i)):n(a)}),"function"==typeof i&&i(function(){t.abort()})})},i.prototype.then=function(){var e=this.promise();return e.then.apply(e,arguments)},i.prototype.catch=function(){var e=this.promise();return e.catch.apply(e,arguments)}},function(e,exports,t){e.exports=t(8)(586)},function(e,exports,t){function n(){}function r(e){if(!p(e))return e;var t=[];for(var n in e)i(t,n,e[n]);return t.join("&")}function i(e,t,n){if(null!=n)if(Array.isArray(n))n.forEach(function(n){i(e,t,n)});else if(p(n))for(var r in n)i(e,t+"["+r+"]",n[r]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(n));else null===n&&e.push(encodeURIComponent(t))}function o(e){for(var t,n,r={},i=e.split("&"),o=0,a=i.length;o=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4==n){var r;try{r=t.status}catch(e){r=0}if(!r){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var r=function(t,n){n.total>0&&(n.percent=n.loaded/n.total*100),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.onprogress=r.bind(null,"download"),t.upload&&(t.upload.onprogress=r.bind(null,"upload"))}catch(e){}try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof n&&!this._isHost(n)){var i=this._header["content-type"],o=this._serializer||v.serialize[i?i.split(";")[0]:""];!o&&s(i)&&(o=v.serialize["application/json"]),o&&(n=o(n))}for(var a in this.header)null!=this.header[a]&&this.header.hasOwnProperty(a)&&t.setRequestHeader(a,this.header[a]);return this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0!==n?n:null),this},v.agent=function(){return new m},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(e){m.prototype[e.toLowerCase()]=function(t,n){var r=new v.Request(e,t);return this._setDefaults(r),n&&r.end(n),r}}),m.prototype.del=m.prototype.delete,v.get=function(e,t,n){var r=v("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},v.head=function(e,t,n){var r=v("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},v.options=function(e,t,n){var r=v("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},v.del=c,v.delete=c,v.patch=function(e,t,n){var r=v("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},v.post=function(e,t,n){var r=v("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},v.put=function(e,t,n){var r=v("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}},function(e,exports,t){function n(e){if(e)return r(e)}function r(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}e.exports=n,n.prototype.on=n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},n.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r,i=0;i=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!=t.status)return!0;if(e){if(e.code&&~o.indexOf(e.code))return!0;if(e.timeout&&"ECONNABORTED"==e.code)return!0;if(e.crossDomain)return!0}return!1},n.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},n.prototype.then=function(e,t){if(!this._fullfilledPromise){var n=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(e,t){n.end(function(n,r){n?t(n):e(r)})})}return this._fullfilledPromise.then(e,t)},n.prototype.catch=function(e){return this.then(void 0,e)},n.prototype.use=function(e){return e(this),this},n.prototype.ok=function(e){if("function"!=typeof e)throw Error("Callback required");return this._okCallback=e,this},n.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},n.prototype.get=function(e){return this._header[e.toLowerCase()]},n.prototype.getHeader=n.prototype.get,n.prototype.set=function(e,t){if(i(e)){for(var n in e)this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},n.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},n.prototype.field=function(e,t){if(null===e||void 0===e)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),i(e)){for(var n in e)this.field(n,e[n]);return this}if(Array.isArray(t)){for(var r in t)this.field(e,t[r]);return this}if(null===t||void 0===t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=""+t),this._getFormData().append(e,t),this},n.prototype.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},n.prototype._auth=function(e,t,n,r){switch(n.type){case"basic":this.set("Authorization","Basic "+r(e+":"+t));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer "+e)}return this},n.prototype.withCredentials=function(e){return void 0==e&&(e=!0),this._withCredentials=e,this},n.prototype.redirects=function(e){return this._maxRedirects=e,this},n.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw TypeError("Invalid argument");return this._maxResponseSize=e,this},n.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},n.prototype.send=function(e){var t=i(e),n=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(t&&i(this._data))for(var r in e)this._data[r]=e[r];else"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"==n?this._data?this._data+"&"+e:e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)?this:(n||this.type("json"),this)},n.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},n.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var n=this.url.substring(t+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.substring(0,t)+"?"+n.join("&")}}},n.prototype._appendQueryString=function(){console.trace("Unsupported")},n.prototype._timeoutError=function(e,t,n){if(!this._aborted){var r=new Error(e+t+"ms exceeded");r.timeout=t,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.abort(),this.callback(r)}},n.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},function(e,exports,t){"use strict";function n(e){if(e)return r(e)}function r(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}var i=t(282);e.exports=n,n.prototype.get=function(e){return this.header[e.toLowerCase()]},n.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=i.type(t);var n=i.params(t);for(var r in n)this[r]=n[r];this.links={};try{e.link&&(this.links=i.parseLinks(e.link))}catch(e){}},n.prototype._setStatusProperties=function(e){var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.redirect=3==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.forbidden=403==e,this.notFound=404==e}},function(e,exports,t){"use strict";exports.type=function(e){return e.split(/ *; */).shift()},exports.params=function(e){return e.split(/ *; */).reduce(function(e,t){var n=t.split(/ *= */),r=n.shift(),i=n.shift();return r&&i&&(e[r]=i),e},{})},exports.parseLinks=function(e){return e.split(/ *, */).reduce(function(e,t){var n=t.split(/ *; */),r=n[0].slice(1,-1);return e[n[1].split(/ *= */)[1].slice(1,-1)]=r,e},{})},exports.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e}},function(e,exports){function t(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach(function(e){t.prototype[e]=function(){return this._defaults.push({fn:e,arguments:arguments}),this}}),t.prototype._setDefaults=function(e){this._defaults.forEach(function(t){e[t.fn].apply(e,t.arguments)})},e.exports=t},function(e,exports,t){"use strict";var n=function(e,exports){return{metadata:e,exports:exports}};e.exports=n},function(e,exports,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n=0;n--)u($(t[n]),e)}function u(e,t,n){var r=!(!n||!n.force)&&n.force;return!(!e||!r&&0!==$(":focus",e).length)&&(e[t.hideMethod]({duration:t.hideDuration,easing:t.hideEasing,complete:function(){g(e)}}),!0)}function c(e){return m=$("
").attr("id",e.containerId).addClass(e.positionClass),m.appendTo($(e.target)),m}function d(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,closeOnHover:!0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'',closeClass:"toast-close-button",newestOnTop:!0,preventDuplicates:!1,progressBar:!1,progressClass:"toast-progress",rtl:!1}}function h(e){v&&v(e)}function f(e){function n(e){return null==e&&(e=""),e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function r(){var t="";switch(e.iconClass){case"toast-success":case"toast-info":t="polite";break;default:t="assertive"}E.attr("aria-live",t)}function i(){e.iconClass&&E.addClass(w.toastClass).addClass(C)}function o(){w.newestOnTop?m.prepend(E):m.append(E)}function a(){if(e.title){var t=e.title;w.escapeHtml&&(t=n(e.title)),S.append(t).addClass(w.titleClass),E.append(S)}}function s(){if(e.message){var t=e.message;w.escapeHtml&&(t=n(e.message)),x.append(t).addClass(w.messageClass),E.append(x)}}function l(){w.closeButton&&(k.addClass(w.closeClass).attr("role","button"),E.prepend(k))}function u(){w.progressBar&&(F.addClass(w.progressClass),E.prepend(F))}function c(){w.rtl&&E.addClass("rtl")}function d(e){var t=e&&!1!==w.closeMethod?w.closeMethod:w.hideMethod,n=e&&!1!==w.closeDuration?w.closeDuration:w.hideDuration,r=e&&!1!==w.closeEasing?w.closeEasing:w.hideEasing;if(!$(":focus",E).length||e)return clearTimeout(D.intervalId),E[t]({duration:n,easing:r,complete:function(){g(E),clearTimeout(A),w.onHidden&&"hidden"!==T.state&&w.onHidden(),T.state="hidden",T.endTime=new Date,h(T)}})}function f(){(w.timeOut>0||w.extendedTimeOut>0)&&(A=setTimeout(d,w.extendedTimeOut),D.maxHideTime=parseFloat(w.extendedTimeOut),D.hideEta=(new Date).getTime()+D.maxHideTime)}function v(){clearTimeout(A),D.hideEta=0,E.stop(!0,!0)[w.showMethod]({duration:w.showDuration,easing:w.showEasing})}function _(){var e=(D.hideEta-(new Date).getTime())/D.maxHideTime*100;F.width(e+"%")}var w=p(),C=e.iconClass||w.iconClass;if(void 0!==e.optionsOverride&&(w=$.extend(w,e.optionsOverride),C=e.optionsOverride.iconClass||C),!function(e,t){if(e.preventDuplicates){if(t.message===y)return!0;y=t.message}return!1}(w,e)){b++,m=t(w,!0);var A=null,E=$("
"),S=$("
"),x=$("
"),F=$("
"),k=$(w.closeHtml),D={intervalId:null,hideEta:null,maxHideTime:null},T={toastId:b,state:"visible",startTime:new Date,options:w,map:e};return function(){i(),a(),s(),l(),u(),c(),o(),r()}(),function(){E.hide(),E[w.showMethod]({duration:w.showDuration,easing:w.showEasing,complete:w.onShown}),w.timeOut>0&&(A=setTimeout(d,w.timeOut),D.maxHideTime=parseFloat(w.timeOut),D.hideEta=(new Date).getTime()+D.maxHideTime,w.progressBar&&(D.intervalId=setInterval(_,10)))}(),function(){w.closeOnHover&&E.hover(v,f),!w.onclick&&w.tapToDismiss&&E.click(d),w.closeButton&&k&&k.click(function(e){e.stopPropagation?e.stopPropagation():void 0!==e.cancelBubble&&!0!==e.cancelBubble&&(e.cancelBubble=!0),w.onCloseClick&&w.onCloseClick(e),d(!0)}),w.onclick&&E.click(function(e){w.onclick(e),d()})}(),h(T),w.debug&&console&&console.log(T),E}}function p(){return $.extend({},d(),w.options)}function g(e){m||(m=t()),e.is(":visible")||(e.remove(),e=null,0===m.children().length&&(m.remove(),y=void 0))}var m,v,y,b=0,_={error:"error",info:"info",success:"success",warning:"warning"},w={clear:a,remove:s,error:e,getContainer:t,info:n,options:{},subscribe:r,success:i,version:"2.1.4",warning:o};return w}()}.apply(exports,n))&&(e.exports=r)}(t(89))},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(6),a=n(o),s=t(7),l=n(s),u=t(4),c=n(u),d=t(10),h=n(d),f=t(5),p=n(f),g=a.default.getActions("AlarmCallbacks"),m=i.default.createStore({listenables:[g],list:function(e){var t=function(e){return l.default.error("Fetching alert notifications failed with status: "+e.message,"Could not retrieve alert notification")},n=c.default.qualifyUrl(h.default.AlarmCallbacksApiController.list(e).url),r=(0,p.default)("GET",n).then(function(e){return e.alarmcallbacks},t);g.list.promise(r)},save:function(e,t){var n=function(e){var t=e.additional&&400===e.additional.status?e.additional.body.message:e.message;l.default.error("Saving alert notification failed with status: "+t,"Could not save alert notification")},r=c.default.qualifyUrl(h.default.AlarmCallbacksApiController.create(e).url),i=(0,p.default)("POST",r,t);i.then(function(){return l.default.success("Alert notification saved successfully")},n),g.save.promise(i)},delete:function(e,t){var n=function(e){return l.default.error("Removing alert notification failed with status: "+e.message,"Could not remove alert notification")},r=c.default.qualifyUrl(h.default.AlarmCallbacksApiController.delete(e,t).url),i=(0,p.default)("DELETE",r);i.then(function(){return l.default.success("Alert notification deleted successfully")},n),g.delete.promise(i)},update:function(e,t,n){var r=function(e){var n=e.additional&&400===e.additional.status?e.additional.body.message:e.message;l.default.error("Updating alert notification '"+t+"' failed with status: "+n,"Could not update alert notification")},i=c.default.qualifyUrl(h.default.AlarmCallbacksApiController.update(e,t).url),o=(0,p.default)("PUT",i,n);o.then(function(){return l.default.success("Alert notification updated successfully")},r),g.update.promise(o)}});exports.default=m,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(35),a=n(o),s=t(7),l=n(s),u=t(4),c=n(u),d=t(10),h=n(d),f=t(5),p=n(f),g=t(6),m=n(g),v=m.default.getActions("AlertConditions"),y=i.default.createStore({listenables:v,init:function(){this.available()},getInitialState:function(){return{types:this.types,allAlertConditions:this.allAlertConditions}},available:function(){var e=this,t=c.default.qualifyUrl(h.default.AlertConditionsApiController.available().url),n=(0,p.default)("GET",t).then(function(t){e.types=t,e.trigger(e.getInitialState())});return v.available.promise(n),n},delete:function(e,t){var n=function(e){l.default.error("Removing Alert Condition failed with status: "+e,"Could not remove Alert Conditions")},r=c.default.qualifyUrl(h.default.StreamAlertsApiController.delete(e,t).url),i=(0,p.default)("DELETE",r).then(function(){v.listAll(),l.default.success("Condition deleted successfully")},n);return v.delete.promise(i),i},listAll:function(){var e=this,t=c.default.qualifyUrl(h.default.AlertConditionsApiController.list().url),n=(0,p.default)("GET",t).then(function(t){return e.allAlertConditions=t.conditions,e.trigger({allAlertConditions:e.allAlertConditions}),e.allAlertConditions},function(e){l.default.error("Fetching alert conditions failed with status: "+e,"Could not get alert conditions")});v.listAll.promise(n)},list:function(e){var t=this,n=function(e){l.default.error("Fetching Alert Conditions failed with status: "+e,"Could not retrieve Alert Conditions")},r=c.default.qualifyUrl(h.default.StreamAlertsApiController.list(e).url),i=(0,p.default)("GET",r).then(function(n){var r=n.conditions.map(function(t){var n=a.default.clone(t);return n.stream_id=e,n});return t.trigger({alertConditions:r}),r},n);return v.list.promise(i),i},save:function(e,t){var n=function(e){l.default.error("Saving Alert Condition failed with status: "+e,"Could not save Alert Condition")},r=c.default.qualifyUrl(h.default.StreamAlertsApiController.create(e).url),i=(0,p.default)("POST",r,t).then(function(e){return l.default.success("Condition created successfully"),e.alert_condition_id},n);return v.save.promise(i),i},update:function(e,t,n){var r=function(e){l.default.error("Saving Alert Condition failed with status: "+e,"Could not save Alert Condition")},i=c.default.qualifyUrl(h.default.StreamAlertsApiController.update(e,t).url),o=(0,p.default)("PUT",i,n).then(function(e){return l.default.success("Condition updated successfully"),e},r);return v.update.promise(o),o},get:function(e,t,n){var r=this,i=function(e){l.default.error("Fetching Alert Condition "+t+" failed with status: "+e,"Could not retrieve Alert Condition")},o=c.default.qualifyUrl(h.default.StreamAlertsApiController.get(e,t).url),a=(0,p.default)("GET",o);a.then(function(e){return r.trigger({alertCondition:e}),e},function(e){return"function"==typeof n?n(e):i(e)}),v.get.promise(a)}});exports.default=y,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(6),a=n(o),s=t(7),l=n(s),u=t(4),c=n(u),d=t(10),h=n(d),f=t(5),p=n(f),g=a.default.getActions("AlertNotifications"),m=i.default.createStore({listenables:[g],availableNotifications:void 0,allNotifications:void 0,getInitialState:function(){return{availableNotifications:this.availableNotifications,allNotifications:this.allNotifications}},available:function(){var e=this,t=c.default.qualifyUrl(h.default.AlarmCallbacksApiController.available().url),n=(0,p.default)("GET",t);n.then(function(t){return e.availableNotifications=t.types,e.trigger({availableNotifications:e.availableNotifications}),e.availableNotifications},function(e){l.default.error("Fetching available alert notification types failed with status: "+e.message,"Could not retrieve available alert notifications")}),g.available.promise(n)},listAll:function(){var e=this,t=c.default.qualifyUrl(h.default.AlarmCallbacksApiController.listAll().url),n=(0,p.default)("GET",t);n.then(function(t){return e.allNotifications=t.alarmcallbacks,e.trigger({allNotifications:e.allNotifications}),e.allNotifications},function(e){l.default.error("Fetching alert notifications failed with status: "+e.message,"Could not retrieve alert notifications")}),g.listAll.promise(n)},testAlert:function(e){var t=c.default.qualifyUrl(h.default.AlarmCallbacksApiController.testAlert(e).url),n=(0,p.default)("POST",t);return n.then(function(){return l.default.success("Test notification was sent successfully")},function(e){var t=e.additional&&e.additional.body&&e.additional.body.message?e.additional.body.message:e.message;l.default.error("Sending test alert notification failed with message: "+t,"Could not send test alert notification")}),g.testAlert.promise(n),n}});exports.default=m,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(10),a=n(o),s=t(5),l=n(s),u=t(4),c=n(u),d=t(7),h=n(d),f=t(6),p=n(f),g=p.default.getActions("Alerts"),m=i.default.createStore({listenables:[g],list:function(e,t){var n=this,r=c.default.qualifyUrl(a.default.AlertsApiController.list(e.id,t).url),i=(0,l.default)("GET",r);i.then(function(e){return n.trigger({alerts:e})},function(t){h.default.error('Fetching alerts for stream "'+e.title+'" failed with status: '+t.message,'Could not retrieve alerts for stream "'+e.title+'".')}),g.list.promise(i)},listPaginated:function(e,t,n){var r=this,i=c.default.qualifyUrl(a.default.AlertsApiController.listPaginated(e,t,n).url),o=(0,l.default)("GET",i);o.then(function(e){return r.trigger({alerts:e})},function(e){h.default.error("Fetching alerts failed with status: "+e.message,"Could not retrieve alerts.")}),g.listPaginated.promise(o)},listAllPaginated:function(e,t,n){var r=this,i=c.default.qualifyUrl(a.default.AlertsApiController.listAllPaginated(e,t,n).url),o=(0,l.default)("GET",i);o.then(function(e){return r.trigger({alerts:e})},function(e){h.default.error("Fetching alerts failed with status: "+e.message,"Could not retrieve alerts.")}),g.listAllPaginated.promise(o)},listAllStreams:function(e){var t=this,n=c.default.qualifyUrl(a.default.AlertsApiController.listAllStreams(e).url),r=(0,l.default)("GET",n);r.then(function(e){return t.trigger({alerts:e})},function(e){h.default.error("Fetching alerts failed with status: "+e.message,"Could not retrieve alerts.")}),g.listAllStreams.promise(r)},get:function(e){var t=this,n=c.default.qualifyUrl(a.default.AlertsApiController.get(e).url),r=(0,l.default)("GET",n);r.then(function(e){return t.trigger({alert:e}),e},function(t){h.default.error("Fetching alert '"+e+"' failed with status: "+t.message,"Could not retrieve alert.")}),g.get.promise(r)}});exports.default=m,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(5),l=n(s),u=t(7),c=n(u),d=t(6),h=n(d),f=h.default.getActions("Authentication"),p=i.default.createStore({listenables:[f],sourceUrl:"/system/authentication/config",getInitialState:function(){return{authenticators:null}},load:function(){var e=this,t=a.default.qualifyUrl(this.sourceUrl),n=(0,l.default)("GET",t).then(function(t){return e.trigger({authenticators:t}),t},function(e){return c.default.error("Unable to load authentication configuration: "+e,"Could not load authenticators")});f.load.promise(n)},update:function(e,t){var n=this,r=a.default.qualifyUrl(this.sourceUrl);if("providers"===e){var i=(0,l.default)("PUT",r,t).then(function(e){return n.trigger({authenticators:e}),c.default.success("Configuration updated successfully"),e},function(e){return c.default.error("Unable to save authentication provider configuration: "+e,"Could not save configuration")});f.update.promise(i)}}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(7),l=n(s),u=t(5),c=n(u),d=t(9),h=n(d),f=h.default.getStore("Nodes"),p=h.default.getStore("SystemProcessing"),g=h.default.getStore("SystemLoadBalancer"),m=i.default.createStore({sourceUrl:"/cluster",clusterOverview:void 0,init:function(){this.cluster(),this.listenTo(p,this.cluster),this.listenTo(g,this.cluster),this.listenTo(f,this.cluster)},getInitialState:function(){return{clusterOverview:this.clusterOverview}},cluster:function(){var e=this,t=(0,c.default)("GET",a.default.qualifyUrl(this.sourceUrl));return t.then(function(t){e.clusterOverview=t,e.trigger({clusterOverview:e.clusterOverview})},function(e){return l.default.error("Getting cluster overview failed: "+e,"Could not get cluster overview")}),t},threadDump:function(e){return(0,c.default)("GET",a.default.qualifyUrl(this.sourceUrl+"/"+e+"/threaddump")).then(function(e){return e.threaddump},function(t){return l.default.error("Getting thread dump for node '"+e+"' failed: "+t,"Could not get thread dump")})},jvm:function(e){var t=(0,c.default)("GET",a.default.qualifyUrl(this.sourceUrl+"/"+e+"/jvm"));return t.catch(function(t){return l.default.error("Getting JVM information for node '"+e+"' failed: "+t,"Could not get JVM information")}),t}});exports.default=m,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(5),l=n(s),u=t(6),c=n(u),d=c.default.getActions("ClusterTraffic"),h=i.default.createStore({listenables:d,traffic:function(){var e=this,t=(0,l.default)("GET",a.default.qualifyUrl("/system/cluster/traffic"));return t.then(function(t){e.trigger(t)}),t}});exports.default=h,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(10),a=n(o),s=t(5),l=n(s),u=t(4),c=n(u),d=t(7),h=n(d),f=t(124),p=n(f),g=i.default.createStore({listenables:[p.default],codecTypes:void 0,getInitialState:function(){return{codecTypes:this.codecTypes}},list:function(){var e=this,t=(0,l.default)("GET",c.default.qualifyUrl(a.default.CodecTypesController.list().url));t.then(function(t){e.codecTypes=t,e.trigger(e.getInitialState())},function(e){h.default.error("Fetching codec types failed with status: "+e,"Could not retrieve codec types")}),p.default.list.promise(t)}});exports.default=g,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(5),l=n(s),u=t(10),c=n(u),d=t(6),h=n(d),f=t(9),p=n(f),g=h.default.getActions("Session"),m=h.default.getActions("ConfigurationBundles"),v=p.default.getStore("Session"),y=i.default.createStore({listenables:[m],apply:function(e){var t=(0,l.default)("POST",a.default.qualifyUrl(c.default.BundlesApiController.apply(e).url));m.apply.promise(t)},create:function(e){var t=(0,l.default)("POST",a.default.qualifyUrl(c.default.BundlesApiController.create().url),e);m.create.promise(t)},createCompleted:function(){this.list()},delete:function(e){var t=(0,l.default)("DELETE",a.default.qualifyUrl(c.default.BundlesApiController.delete(e).url));m.delete.promise(t)},deleteCompleted:function(){this.list()},export:function(e){var t=new s.Builder("POST",a.default.qualifyUrl(c.default.BundlesApiController.export().url)).authenticated().build(),n=t.type("json").accept("json").send(e).then(function(e){if(e.ok)return e.text;throw new s.FetchError(e.statusText,e)},function(e){throw 401===e.status&&g.logout(v.getSessionId()),new s.FetchError(e.statusText,e)});m.export.promise(n)},list:function(){var e=this,t=(0,l.default)("GET",a.default.qualifyUrl(c.default.BundlesApiController.list().url)).then(function(t){return e.trigger({configurationBundles:t}),t});m.list.promise(t)}});exports.default=y,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(5),l=n(s),u=t(7),c=n(u),d=t(6),h=n(d),f=h.default.getActions("Configuration"),p=i.default.createStore({listenables:[f],configuration:{},_url:function(e){return a.default.qualifyUrl("/system/cluster_config"+e)},list:function(e){var t=this,n=(0,l.default)("GET",this._url("/"+e));n.then(function(n){return t.configuration[e]=n,t.trigger({configuration:t.configuration}),n}),f.list.promise(n)},listSearchesClusterConfig:function(){var e=this,t=(0,l.default)("GET",this._url("/org.graylog2.indexer.searches.SearchesClusterConfig")).then(function(t){return e.trigger({searchesClusterConfig:t}),t});f.listSearchesClusterConfig.promise(t)},listMessageProcessorsConfig:function(e){var t=this,n=(0,l.default)("GET",a.default.qualifyUrl("/system/messageprocessors/config")).then(function(n){return t.configuration[e]=n,t.trigger({configuration:t.configuration}),n});f.listMessageProcessorsConfig.promise(n)},update:function(e,t){var n=this,r=(0,l.default)("PUT",this._url("/"+e),t);r.then(function(t){return n.configuration[e]=t,n.trigger({configuration:n.configuration}),c.default.success("Configuration updated successfully"),t},function(t){c.default.error("Search config update failed: "+t,"Could not update search config: "+e)}),f.update.promise(r)},updateMessageProcessorsConfig:function(e,t){var n=this,r=(0,l.default)("PUT",a.default.qualifyUrl("/system/messageprocessors/config"),t);r.then(function(t){return n.configuration[e]=t,n.trigger({configuration:n.configuration}),c.default.success("Configuration updated successfully"),t},function(t){c.default.error("Message processors config update failed: "+t,"Could not update config: "+e)}),f.updateMessageProcessorsConfig.promise(r)}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(5),l=n(s),u=t(10),c=n(u),d=t(25),h=n(d),f=h.default.get("Session"),p=f.SessionStore,g=f.SessionActions,m=h.default.get("Startpage"),v=m.StartpageStore,y=i.default.createStore({listenables:[g],currentUser:void 0,init:function(){this.listenTo(p,this.sessionUpdate,this.sessionUpdate),this.listenTo(v,this.reload,this.reload)},getInitialState:function(){return{currentUser:this.currentUser}},get:function(){return this.currentUser},sessionUpdate:function(e){if(e.sessionId&&e.username){var t=e.username;this.update(t)}else this.currentUser=void 0,this.trigger({currentUser:this.currentUser})},reload:function(){if(void 0!==this.currentUser)return this.update(this.currentUser.username)},update:function(e){var t=this;return(0,l.default)("GET",a.default.qualifyUrl(c.default.UsersApiController.load(encodeURIComponent(e)).url)).then(function(e){t.currentUser=e,t.trigger({currentUser:t.currentUser})})}});exports.default=y,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(18),a=n(o),s=t(6),l=n(s),u=t(10),c=n(u),d=t(25),h=n(d),f=t(5),p=n(f),g=t(36),m=n(g),v=t(4),y=n(v),b=t(7),_=n(b),w=h.default.get("CurrentUser"),C=w.CurrentUserStore,A=l.default.getActions("Dashboards");exports.default=i.default.createStore({listenables:[A],dashboards:void 0,writableDashboards:void 0,permissions:[],init:function(){this.listenTo(C,this.currentUserUpdated,this.currentUserUpdated),A.list()},currentUserUpdated:function(e){e&&e.currentUser&&(this.permissions=e.currentUser.permissions,A.list())},getInitialState:function(){return{dashboards:this.dashboards,writableDashboards:this.writableDashboards}},create:function(e,t){var n=y.default.qualifyUrl(c.default.DashboardsApiController.create().url),r=(0,p.default)("POST",n,{title:e,description:t}).then(function(e){return _.default.success("Dashboard successfully created"),e.dashboard_id},function(t){_.default.error('Creating dashboard "'+e+'" failed with status: '+t,"Could not create dashboard")});return A.create.promise(r),r},createCompleted:function(){C.reload(),A.list()},delete:function(e){var t=y.default.qualifyUrl(c.default.DashboardsApiController.delete(e.id).url),n=(0,p.default)("DELETE",t);return n.then(function(){_.default.success("Dashboard successfully deleted")},function(t){_.default.error('Deleting dashboard "'+e.title+'" failed with status: '+t,"Could not delete dashboard")}),A.delete.promise(n),n},deleteCompleted:function(){A.list()},get:function(e){var t=y.default.qualifyUrl(c.default.DashboardsApiController.get(e).url),n=(0,f.fetchPeriodically)("GET",t);return n.catch(function(e){e.additional&&404!==e.additional.status&&_.default.error("Loading your dashboard failed with status: "+e.message,"Could not load your dashboard")}),A.get.promise(n),n},list:function(){var e=this,t=y.default.qualifyUrl(c.default.DashboardsApiController.index().url),n=(0,p.default)("GET",t).then(function(t){var n=a.default.List(t.dashboards),r=e.getWritableDashboardList(n,e.permissions);e.dashboards=n,e.writableDashboards=r;var i={dashboards:n,writableDashboards:r};return e.trigger(i),i},function(e){e.additional&&404===e.additional.status||_.default.error("Loading dashboard list failed with status: "+e,"Could not load dashboards")});return A.list.promise(n),n},getWritableDashboardList:function(e,t){return e.filter(function(e){return m.default.isPermitted(t,"dashboards:edit:"+e.id)})},update:function(e){var t=y.default.qualifyUrl(c.default.DashboardsApiController.update(e.id).url),n=(0,p.default)("PUT",t,{title:e.title,description:e.description});return n.then(function(){_.default.success("Dashboard successfully updated")},function(t){_.default.error('Saving dashboard "'+e.title+'" failed with status: '+t,"Could not save dashboard")}),A.update.promise(n),n},updateCompleted:function(){A.list()},updatePositions:function(e,t){var n=y.default.qualifyUrl(c.default.DashboardsApiController.updatePositions(e.id).url),r=(0,p.default)("PUT",n,{positions:t}).catch(function(t){return _.default.error('Updating widget positions for dashboard "'+e.title+'" failed with status: '+t.message,"Could not update dashboard"),t});return A.updatePositions.promise(r),r}}),e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(10),l=n(s),u=t(5),c=n(u),d=t(6),h=n(d),f=h.default.getActions("Decorators"),p=i.default.createStore({listenables:[f],state:{},getInitialState:function(){return this.state},init:function(){f.available(),f.list()},list:function(){var e=this,t=a.default.qualifyUrl(l.default.DecoratorsResource.get().url),n=(0,c.default)("GET",t);return n.then(function(t){e.trigger({decorators:t}),e.state.decorators=t}),f.list.promise(n),n},available:function(){var e=this,t=a.default.qualifyUrl(l.default.DecoratorsResource.available().url),n=(0,c.default)("GET",t);return n.then(function(t){e.trigger({types:t}),e.state.types=t}),f.available.promise(n),n},create:function(e){var t=a.default.qualifyUrl(l.default.DecoratorsResource.create().url),n=(0,c.default)("POST",t,e);return f.create.promise(n),n},createCompleted:function(){f.list()},remove:function(e){var t=a.default.qualifyUrl(l.default.DecoratorsResource.remove(e).url),n=(0,c.default)("DELETE",t);return f.remove.promise(n),n},removeCompleted:function(){f.list()},update:function(e,t){var n=a.default.qualifyUrl(l.default.DecoratorsResource.update(e).url),r=(0,c.default)("PUT",n,t);return f.update.promise(r),r},updateCompleted:function(){f.list()}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(10),l=n(s),u=t(5),c=n(u),d=t(6),h=n(d),f=h.default.getActions("Deflector"),p=i.default.createStore({listenables:[f],deflector:{info:void 0},getInitialState:function(){return{deflector:this.deflector}},cycle:function(e){var t=a.default.qualifyUrl(l.default.DeflectorApiController.cycle(e).url),n=(0,c.default)("POST",t);f.cycle.promise(n)},list:function(e){var t=this,n=a.default.qualifyUrl(l.default.DeflectorApiController.list(e).url),r=(0,c.default)("GET",n).then(function(e){t.deflector.info=e,t.trigger({deflector:t.deflector})});f.list.promise(r)}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e){var t={};e.converters.forEach(function(e){t[e.type]=e.config});var n=e.condition_type&&"none"!==e.condition_type?e.condition_value:"";return{title:e.title,cut_or_copy:e.cursor_strategy||"copy",source_field:e.source_field,target_field:e.target_field,extractor_type:e.type||e.extractor_type,extractor_config:e.extractor_config,converters:t,condition_type:e.condition_type||"none",condition_value:n,order:e.order}}Object.defineProperty(exports,"__esModule",{value:!0});var i=t(2),o=n(i),a=t(10),s=n(a),l=t(5),u=n(l),c=t(6),d=n(c),h=t(90),f=n(h),p=t(69),g=n(p),m=t(4),v=n(m),y=t(7),b=n(y),_=d.default.getActions("Extractors"),w=o.default.createStore({listenables:[_],sourceUrl:"/system/inputs/",extractors:void 0,extractor:void 0,init:function(){this.trigger({extractors:this.extractors,extractor:this.extractor})},list:function(e){var t=this,n=(0,u.default)("GET",v.default.qualifyUrl(v.default.concatURLPath(this.sourceUrl,e,"extractors")));n.then(function(e){t.extractors=e.extractors,t.trigger({extractors:t.extractors})}),_.list.promise(n)},new:function(e,t){if(-1===f.default.EXTRACTOR_TYPES.indexOf(e))throw new Error("Invalid extractor type provided: "+e);return{type:e,source_field:t,converters:[],extractor_config:{},target_field:""}},get:function(e,t){var n=this,r=(0,u.default)("GET",v.default.qualifyUrl(v.default.concatURLPath(this.sourceUrl,e,"extractors",t)));r.then(function(e){n.extractor=e,n.trigger({extractor:n.extractor})}),_.get.promise(r)},save:function(e,t){var n=void 0;n=t.id?this.update(e,t,!0):this.create(e,t,!0),_.save.promise(n)},_silentExtractorCreate:function(e,t){var n=v.default.qualifyUrl(s.default.ExtractorsController.create(e).url);return(0,u.default)("POST",n,r(t))},create:function(e,t,n){var r=this,i=this._silentExtractorCreate(e,t);return i.then(function(){b.default.success("Extractor "+t.title+" created successfully"),r.extractor&&_.get.triggerPromise(e,t.id)}).catch(function(e){b.default.error("Creating extractor failed: "+e,"Could not create extractor")}),n||_.create.promise(i),i},update:function(e,t,n){var i=this,o=v.default.qualifyUrl(s.default.ExtractorsController.update(e,t.id).url),a=(0,u.default)("PUT",o,r(t));return a.then(function(){b.default.success('Extractor "'+t.title+'" updated successfully'),i.extractor&&_.get.triggerPromise(e,t.id)}).catch(function(e){b.default.error("Updating extractor failed: "+e,"Could not update extractor")}),n||_.update.promise(a),a},delete:function(e,t){var n=this,r=v.default.qualifyUrl(s.default.ExtractorsController.delete(e,t.id).url),i=(0,u.default)("DELETE",r);i.then(function(){b.default.success('Extractor "'+t.title+'" deleted successfully'),n.extractors&&_.list.triggerPromise(e)}).catch(function(e){b.default.error("Deleting extractor failed: "+e,"Could not delete extractor "+t.title)}),_.delete.promise(i)},order:function(e,t){var n=this,r=v.default.qualifyUrl(s.default.ExtractorsController.order(e).url),i={};t.forEach(function(e,t){return i[t]=e.id});var o=(0,u.default)("POST",r,{order:i});o.then(function(){b.default.success("Extractor positions updated successfully"),n.extractors&&_.list.triggerPromise(e)}),o.catch(function(e){b.default.error("Changing extractor positions failed: "+e,"Could not update extractor positions")}),_.order.promise(o)},import:function(e,t){var n=this,r=0,i=0,o=[];t.forEach(function(t){var a=n._silentExtractorCreate(e,t);a.then(function(){return r++}).catch(function(){return i++}),o.push(a)}),g.default.settle(o).then(function(){0===i?b.default.success("Import results: "+r+" extractor(s) imported.","Import operation successful"):b.default.warning("Import results: "+r+" extractor(s) imported, "+i+" error(s).","Import operation completed")})}});exports.default=w,e.exports=exports.default},function(e,exports,t){"use strict";var $=t(12),n=t(18),r=t(135),i=t(315),o=i.generateId,a=i.FieldChart,s=t(58),l=t(7),u=function(){function e(){var e=this;this.resetStore(),this._eventsThrottle=new s,$(document).on("created.graylog.fieldgraph",function(t,n){e.saveGraph(n.graphOptions.chartid,n.graphOptions),e.combineStackedGraphs(n.graphOptions.chartid),e.renderedGraphs.add(n.graphOptions.chartid),"function"==typeof e.onFieldGraphCreated&&e.onFieldGraphCreated(n.graphOptions.chartid)}),$(document).on("failed.graylog.fieldgraph",function(t,n){l.error(n.errorMessage,"Could not create field graph"),e.deleteGraph(n.graphId)}),$(document).on("updated.graylog.fieldgraph",function(t,n){e.saveGraph(n.graphOptions.chartid,n.graphOptions)}),$(document).on("merged.graylog.fieldgraph",function(t,n){e.updateStackedGraphs(n.targetGraphId,n.draggedGraphId)}),window.addEventListener("resize",function(){e._eventsThrottle.throttle(function(){return e.redrawGraphs()})})}return e.prototype.resetStore=function(){this.renderedGraphs=n.Set(),this._fieldGraphs=n.Map(r.get("pinned-field-charts")),this._stackedGraphs=n.fromJS(r.get("stacked-graphs")||{},function(e,t){return n.Iterable.isIndexed(t)?t.toSet():t.toMap()}),a.reload()},Object.defineProperty(e.prototype,"fieldGraphs",{get:function(){return this._fieldGraphs},set:function(e){this._fieldGraphs=e,r.set("pinned-field-charts",e.toJS()),"function"==typeof this.onFieldGraphsUpdated&&this.onFieldGraphsUpdated(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stackedGraphs",{get:function(){return this._stackedGraphs},set:function(e){this._stackedGraphs=e,r.set("stacked-graphs",e.toJS()),"function"==typeof this.onFieldGraphsMerged&&this.onFieldGraphsMerged(e)},enumerable:!0,configurable:!0}),e.prototype.combineStackedGraphs=function(e){var t=this;if(this.renderedGraphs=this.renderedGraphs.add(e),this.stackedGraphs.has(e)){this.stackedGraphs.get(e).forEach(function(n){t.renderedGraphs.has(n)&&t.stackGraphs(e,n)})}else this.stackedGraphs.forEach(function(n,r){n.has(e)&&t.renderedGraphs.has(r)&&t.stackGraphs(r,e)})},e.prototype.saveGraph=function(e,t){this.fieldGraphs=this.fieldGraphs.set(e,t)},e.prototype.deleteGraph=function(e){this.fieldGraphs.has(e)&&(this.fieldGraphs=this.fieldGraphs.delete(e),this.stackedGraphs.has(e)&&this.deleteStackedGraphs(e))},e.prototype.updateStackedGraphs=function(e,t){var r=this.stackedGraphs;if(r.has(e))r=r.set(e,r.get(e).add(t));else if(r.has(t)){var i=r.get(t);r=r.set(e,i.add(t)),r=r.delete(t)}else r=r.set(e,n.Set().add(t));this.stackedGraphs=r},e.prototype.deleteStackedGraphs=function(e){var t=this;this.stackedGraphs.get(e).forEach(function(e){return t.deleteGraph(e)}),this.stackedGraphs=this.stackedGraphs.delete(e)},e.prototype.newFieldGraph=function(e,t){var r=o(),i=n.Map(t),a=n.Map({chartid:r,field:e});this.saveGraph(r,a.merge(i).toJS())},e.prototype.renderFieldGraph=function(e,t,n){void 0===n&&(n={new:!0}),n.new?a.renderNewFieldChart(e,t):a.renderFieldChart(e,t,{newGraph:!1})},e.prototype.updateFieldGraphData=function(e,t){var n,r=e,i=this.fieldGraphs.get(e);this.stackedGraphs.some(function(t,r){if(t.has(e))return n=r,!0}),n||(n=e),a.updateFieldChartData(n,i,r,$(t))},e.prototype.stackGraphs=function(e,t){a.stackGraphs(e,t)},e.prototype.getFieldGraphAsCreateWidgetRequestParams=function(e,t){var n=this.fieldGraphs.get(e);if(void 0===n)throw'Invalid graph ID "'+e+'"';var r={valuetype:n.valuetype,renderer:n.renderer,interpolation:n.interpolation,interval:n.interval,field:n.field,query:n.query,rangeType:n.rangetype};switch(n.rangetype){case"relative":r.relative=n.range.relative;break;case"absolute":r.from=n.range.from,r.to=n.range.to;break;case"keyword":r.keyword=n.range.keyword}return r},e.prototype.getSeriesInformation=function(e){return{query:e.query,field:e.field,statistical_function:e.valuetype}},e.prototype.getStackedGraphAsCreateWidgetRequestParams=function(e,t){var n=this,r=this.fieldGraphs.get(e);if(void 0===r)throw'Invalid graph ID "'+e+'"';var i={renderer:r.renderer,interpolation:r.interpolation,interval:r.interval},o=[this.getSeriesInformation(r)];return this.stackedGraphs.get(e).forEach(function(e){var t=n.fieldGraphs.get(e);o.push(n.getSeriesInformation(t))},this),i.series=o,i},e.prototype.redrawGraphs=function(){this.fieldGraphs.forEach(function(e,t){return a.redraw(t)})},e.FUNCTIONS=n.OrderedMap({count:"Total",mean:"Mean",min:"Minimum",max:"Maximum",total:"Sum",cardinality:"Cardinality"}),e}(),c=new u;e.exports=c},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(){return Math.random().toString(36).substr(2,9)}function i(){for(var e="",t=0;t<4;t++)e+=r();return e}function o(e,t){(0,c.default)(document).trigger("failed.graylog.fieldgraph",{graphId:e,errorMessage:t})}function a(e){(0,c.default)(document).trigger("created.graylog.fieldgraph",{graphOptions:e})}function s(e){(0,c.default)(document).trigger("updated.graylog.fieldgraph",{graphOptions:e})}function l(e,t){(0,c.default)(document).trigger("merged.graylog.fieldgraph",{targetGraphId:e,draggedGraphId:t})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.FieldChart=void 0,exports.generateId=i;var u=t(12),c=n(u);t(136),t(322);var d=t(23),h=n(d),f=t(24),p=n(f),g=t(71),m=n(g),v=t(138),y=(n(v),t(139)),b=(n(y),t(20)),_=n(b),w=t(92),C=n(w),A=t(4),E=n(A),S=t(5),x=n(S),F=t(10),k=n(F),D=t(7),T=n(D),M=t(28),R=n(M),O=t(48),L=n(O),P=t(9),B=n(P),I=B.default.getStore("Search"),N=exports.FieldChart={fieldGraphs:{},GRAPH_HEIGHT:120,palette:new m.default.Color.Palette({scheme:"colorwheel"}),reload:function(){this.palette=new m.default.Color.Palette({scheme:"colorwheel"})},_getDefaultOptions:function(e){var t=I.getOriginalSearchParams().toJS();switch(void 0===e.chartid&&(e.chartid=i()),void 0===e.interval&&(e.interval=t.interval||"minute"),void 0===e.interpolation&&(e.interpolation="linear"),void 0===e.renderer&&(e.renderer="bar"),void 0===e.valuetype&&(e.valuetype="count"),void 0===e.query&&(e.query=t.query),void 0===e.createdAt&&(e.createdAt=(0,h.default)().valueOf()),e.streamid=t.streamId,e.rangetype=t.range_type,e.range={},e.rangetype){case"relative":e.range.relative=t.relative;break;case"absolute":e.range.from=t.from,e.range.to=t.to;break;case"keyword":e.range.keyword=t.keyword}return e},_getTimeRangeParams:function(e){var t={};switch(e.rangetype){case"relative":t.range=e.range.relative;break;case"absolute":t.from=e.range.from,t.to=e.range.to;break;case"keyword":t.keyword=e.range.keyword}return t},_onFieldHistogramLoad:function(e,t,n,r,i){r.query.trim().length>0?(0,c.default)(".field-graph-query",e).text(r.query):(0,c.default)(".field-graph-query",e).text("*");var o=[];o.push(JSON.stringify(r)),e.attr("data-lines",o),this._updateStatisticalFunctionText(e,r);var a=(void 0!==e.data("from")&&i.from,new m.default.Graph({element:t[0],width:t.width(),height:this.GRAPH_HEIGHT,interpolation:r.interpolation,renderer:r.renderer,resolution:i.interval,series:[{name:r.chartid,data:i.values,color:"#26ADE4",gl2_query:r.query,valuetype:C.default.getReadableFieldChartStatisticalFunction(r.valuetype),field:r.field}]}));new m.default.Graph.Axis.Y({graph:a,tickFormat:m.default.Fixtures.Number.formatKMBT,orientation:"left",element:n[0],pixelsPerTick:30}),new m.default.Graph.Axis.Time({graph:a,ticksTreatment:"glow",timeFixture:new m.default.Fixtures.Graylog2Time}),new m.default.Graph.HoverDetail({graph:a,formatter:function(e,t,n){var r=''+new _.default(1e3*t).toString(_.default.Formats.COMPLETE)+"";return'['+e.valuetype+"] "+e.field+": "+(0,p.default)(n).format("0,0.[000]")+"
"+r}}),new m.default.Graph.Graylog2Selector({graph:a}),"scatterplot"===r.renderer&&(a.renderer.dotSize=2),"area"===r.renderer&&(a.renderer.stroke=!0),a.render(),this.fieldGraphs[r.chartid]=a,e.draggable({handle:".reposition-handle",cursor:"move",scope:"#field-graphs",revert:"invalid",opacity:.5,containment:(0,c.default)("#field-graphs"),axis:"y",snap:(0,c.default)(".field-graph-container"),snapMode:"inner"});var s=this;e.droppable({scope:"#field-graphs",tolerance:"intersect",activate:function(e,t){(0,c.default)("#field-graphs .merge-hint").not((0,c.default)(".merge-hint",t.draggable)).show()},deactivate:function(){(0,c.default)("#field-graphs .merge-hint").hide()},over:function(){(0,c.default)(this).css("background-color","#C7E2ED"),(0,c.default)(".merge-hint span",(0,c.default)(this)).switchClass("alpha80","merge-drop-ready")},out:function(){(0,c.default)(this).css("background-color","#fff"),(0,c.default)(".merge-hint span",(0,c.default)(this)).switchClass("merge-drop-ready","alpha80")},drop:function(e,t){var n=(0,c.default)(this).attr("data-chart-id"),r=t.draggable.attr("data-chart-id");t.draggable.hide(),(0,c.default)(this).css("background-color","#fff"),s._mergeCharts(n,r)}})},_onFieldHistogramFail:function(e,t,n){if(n.additional&&400===n.additional.status)o(t.chartid,"Field graphs are only available for numeric fields.");else{var r=(0,c.default)("
").addClass("alert").addClass("alert-warning").text("Field graph could not be loaded, please try again after reloading the page.");e.html(r);var i=n.additional?" with status "+n.additional.status:" with error: "+n.message;T.default.error("Loading field graph for '"+t.field+"' failed "+i),console.error(n)}},_chartOptionsFromContainer:function(e){try{return JSON.parse(e.attr("data-lines"))}catch(e){return this._getDefaultOptions()}},_changeGraphConfig:function(e,t,n){var r=this._chartOptionsFromContainer(e);r[t]=n,e.attr("data-lines",JSON.stringify(r)),s(r)},_insertSpinner:function(e,t){t&&(this._getGraphElement(e).hide(),this._getGraphYAxis(e).hide());var n=(0,c.default)('
');e.append(n)},_deleteSpinner:function(e,t){(0,c.default)(".spinner",e).remove(),t&&(this._getGraphElement(e).show(),this._getGraphYAxis(e).show())},_fetchData:function(e,t){var n=k.default.UniversalSearchApiController.fieldHistogram(e.rangetype,e.query||"*",e.field,e.interval,t,e.streamid,"cardinality"===e.valuetype).url;return(0,x.default)("GET",E.default.qualifyUrl(n)).then(function(t){var n={time:t.time,interval:t.interval,from:t.queried_timerange.from,to:t.queried_timerange.to};return n.values=L.default.format(t.results,t.queried_timerange,e.interval,(0,c.default)(window).width(),"relative"===e.rangetype&&0===e.range.relative,e.valuetype,!0),n})},_getGraphElement:function(e){return(0,c.default)(".field-graph",e)},_getGraphYAxis:function(e){return(0,c.default)(".field-graph-y-axis",e)},renderFieldChart:function(e,t,n){var r=this,i=n||{},o=(0,c.default)(t),s=this._getGraphElement(o),l=this._getGraphYAxis(o);i.newGraph&&this._insertSpinner(o),e=this._getDefaultOptions(e);var u=this._getTimeRangeParams(e);this._fetchData(e,u).then(function(t){s.html(""),l.html(""),l.hide(),r._onFieldHistogramLoad(o,s,l,e,t),i.newGraph&&a(e)}).catch(function(t){return r._onFieldHistogramFail(s,e,t)}).finally(function(){l.show(),i.newGraph&&r._deleteSpinner(o)})},updateFieldChartData:function(e,t,n,r){var i=this;t=this._getDefaultOptions(t);var o=this._getTimeRangeParams(t);this._insertSpinner(r,!0),this._fetchData(t,o).then(function(r){var o=i.fieldGraphs[e];if(o){var a=o.series.filter(function(e){return e.name===n})[0];a&&(a.valuetype=C.default.getReadableFieldChartStatisticalFunction(t.valuetype),a.data=r.values,o.update())}},function(e){T.default.error("Updating field graph data failed: "+e,"Could not update field graph data")}).finally(function(){i._deleteSpinner(r,!0)})},_updateStatisticalFunctionText:function(e,t){(0,c.default)(".type-description",e).text("["+C.default.getReadableFieldChartStatisticalFunction(t.valuetype)+"] "+t.field+", ")},renderNewFieldChart:function(e,t){this.renderFieldChart(e,t,{newGraph:!0})},changeInterpolation:function(e,t){var n=this._chartOptionsFromContainer(e);this._changeGraphConfig(e,"interpolation",t);var r=this.fieldGraphs[n.chartid];r.interpolation=t,r.render()},changeRenderer:function(e,t){var n=this._chartOptionsFromContainer(e);this._changeGraphConfig(e,"renderer",t);var r=this.fieldGraphs[n.chartid];r.setRenderer(t),"scatterplot"===t&&(r.renderer.dotSize=2),"area"===t&&(r.renderer.stroke=!0),r.renderer.unstack=!0,r.render()},changeResolution:function(e,t){var n=this._chartOptionsFromContainer(e);n.interval=t,this._changeGraphConfig(e,"interval",t),this.updateFieldChartData(n.chartid,n,n.chartid,e)},changeStatisticalFunction:function(e,t){var n=this._chartOptionsFromContainer(e);n.valuetype=t,this._changeGraphConfig(e,"valuetype",t),this.updateFieldChartData(n.chartid,n,n.chartid,e),this._updateStatisticalFunctionText(e,n)},_mergeCharts:function(e,t){for(var n=this.fieldGraphs[e],r=this.fieldGraphs[t],i=(0,c.default)(".field-graph-container[data-chart-id='"+e+"']"),o=0;o
['+R.default.escapeHTML(s.valuetype)+"] "+s.field+', Query: '+R.default.escapeHTML(u)+"";(0,c.default)("ul.field-graph-query-container",i).append("
  • "+d+"
  • ");var h={name:s.name,color:a,gl2_query:u,valuetype:s.valuetype,field:s.field};h.data=s.data,n.series.push(h)}n.renderer.unstack=!0,l(e,t),n.update(),n.render()},stackGraphs:function(e,t){this._mergeCharts(e,t),(0,c.default)('.field-graph-container[data-chart-id="'+t+'"]').hide()},redraw:function(e){var t=this.fieldGraphs[e];if(t){var n=(0,c.default)('.field-graph-container[data-chart-id="'+e+'"]'),r=(0,c.default)(".field-graph",n);t.configure({width:r.width()}),t.render()}}};(0,c.default)(document).on("click",".field-graph-container ul.renderer-selector li a",function(e){e.preventDefault();var t=(0,c.default)(this).closest(".field-graph-container"),n=(0,c.default)(this).attr("data-type");N.changeRenderer(t,n)}),(0,c.default)(document).on("click",".field-graph-container ul.interpolation-selector li a",function(e){e.preventDefault();var t=(0,c.default)(this).closest(".field-graph-container"),n=(0,c.default)(this).attr("data-type");N.changeInterpolation(t,n)}),(0,c.default)(document).on("click",".field-graph-container ul.interval-selector li a",function(e){e.preventDefault();var t=(0,c.default)(this).closest(".field-graph-container"),n=(0,c.default)(this).attr("data-type");N.changeResolution(t,n)}),(0,c.default)(document).on("click",".field-graph-container ul.valuetype-selector li a",function(e){e.preventDefault();var t=(0,c.default)(this).closest(".field-graph-container"),n=(0,c.default)(this).attr("data-type");N.changeStatisticalFunction(t,n)})},function(e,exports,t){var n,r,i;!function(o){r=[t(12),t(26)],n=o,void 0!==(i="function"==typeof n?n.apply(exports,r):n)&&(e.exports=i)}(function($){return $.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase())})},function(e,exports,t){var n,r,i;/*! * jQuery UI :data 1.12.1 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license */ !function(o){r=[t(12),t(26)],n=o,void 0!==(i="function"==typeof n?n.apply(exports,r):n)&&(e.exports=i)}(function($){return $.extend($.expr[":"],{data:$.expr.createPseudo?$.expr.createPseudo(function(e){return function(t){return!!$.data(t,e)}}):function(e,t,n){return!!$.data(e,n[3])}})})},function(e,exports,t){var n,r,i;!function(o){r=[t(12),t(26)],n=o,void 0!==(i="function"==typeof n?n.apply(exports,r):n)&&(e.exports=i)}(function($){return $.ui.plugin={add:function(e,t,n){var r,i=$.ui[e].prototype;for(r in n)i.plugins[r]=i.plugins[r]||[],i.plugins[r].push([t,n[r]])},call:function(e,t,n,r){var i,o=e.plugins[t];if(o&&(r||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(i=0;i=t&&e=c&&a<=h||l>=c&&l<=h||ah)&&(o>=u&&o<=d||s>=u&&s<=d||od);default:return!1}}}();return $.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(e,t){var n,r,i=$.ui.ddmanager.droppables[e.options.scope]||[],o=t?t.type:null,a=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();e:for(n=0;ne?0:r.max")[0],f=e.each;h.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=h.style.backgroundColor.indexOf("rgba")>-1,f(u,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),l.fn=e.extend(l.prototype,{parse:function(t,i,a,s){if(void 0===t)return this._rgba=[null,null,null,null],this;(t.jquery||t.nodeType)&&(t=e(t).css(i),i=void 0);var c=this,d=e.type(t),h=this._rgba=[];return void 0!==i&&(t=[t,i,a,s],d="array"),"string"===d?this.parse(r(t)||o._default):"array"===d?(f(u.rgba.props,function(e,r){h[r.idx]=n(t[r.idx],r)}),this):"object"===d?(t instanceof l?f(u,function(e,n){t[n.cache]&&(c[n.cache]=t[n.cache].slice())}):f(u,function(r,i){var o=i.cache;f(i.props,function(e,r){if(!c[o]&&i.to){if("alpha"===e||null==t[e])return;c[o]=i.to(c._rgba)}c[o][r.idx]=n(t[e],r,!0)}),c[o]&&e.inArray(null,c[o].slice(0,3))<0&&(c[o][3]=1,i.from&&(c._rgba=i.from(c[o])))}),this):void 0},is:function(e){var t=l(e),n=!0,r=this;return f(u,function(e,i){var o,a=t[i.cache];return a&&(o=r[i.cache]||i.to&&i.to(r._rgba)||[],f(i.props,function(e,t){if(null!=a[t.idx])return n=a[t.idx]===o[t.idx]})),n}),n},_space:function(){var e=[],t=this;return f(u,function(n,r){t[r.cache]&&e.push(n)}),e.pop()},transition:function(e,t){var r=l(e),i=r._space(),o=u[i],a=0===this.alpha()?l("transparent"):this,s=a[o.cache]||o.to(a._rgba),d=s.slice();return r=r[o.cache],f(o.props,function(e,i){var o=i.idx,a=s[o],l=r[o],u=c[i.type]||{};null!==l&&(null===a?d[o]=l:(u.mod&&(l-a>u.mod/2?a+=u.mod:a-l>u.mod/2&&(a-=u.mod)),d[o]=n((l-a)*t+a,i)))}),this[i](d)},blend:function(t){if(1===this._rgba[3])return this;var n=this._rgba.slice(),r=n.pop(),i=l(t)._rgba;return l(e.map(n,function(e,t){return(1-r)*i[t]+r*e}))},toRgbaString:function(){var t="rgba(",n=e.map(this._rgba,function(e,t){return null==e?t>2?1:0:e});return 1===n[3]&&(n.pop(),t="rgb("),t+n.join()+")"},toHslaString:function(){var t="hsla(",n=e.map(this.hsla(),function(e,t){return null==e&&(e=t>2?1:0),t&&t<3&&(e=Math.round(100*e)+"%"),e});return 1===n[3]&&(n.pop(),t="hsl("),t+n.join()+")"},toHexString:function(t){var n=this._rgba.slice(),r=n.pop();return t&&n.push(~~(255*r)),"#"+e.map(n,function(e){return e=(e||0).toString(16),1===e.length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,u.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,n,r=e[0]/255,i=e[1]/255,o=e[2]/255,a=e[3],s=Math.max(r,i,o),l=Math.min(r,i,o),u=s-l,c=s+l,d=.5*c;return t=l===s?0:r===s?60*(i-o)/u+360:i===s?60*(o-r)/u+120:60*(r-i)/u+240,n=0===u?0:d<=.5?u/c:u/(2-c),[Math.round(t)%360,n,d,null==a?1:a]},u.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,n=e[1],r=e[2],o=e[3],a=r<=.5?r*(1+n):r+n-r*n,s=2*r-a;return[Math.round(255*i(s,a,t+1/3)),Math.round(255*i(s,a,t)),Math.round(255*i(s,a,t-1/3)),o]},f(u,function(t,r){var i=r.props,o=r.cache,s=r.to,u=r.from;l.fn[t]=function(t){if(s&&!this[o]&&(this[o]=s(this._rgba)),void 0===t)return this[o].slice();var r,a=e.type(t),c="array"===a||"object"===a?t:arguments,d=this[o].slice();return f(i,function(e,t){var r=c["object"===a?e:t.idx];null==r&&(r=d[t.idx]),d[t.idx]=n(r,t)}),u?(r=l(u(d)),r[o]=d,r):l(d)},f(i,function(n,r){l.fn[n]||(l.fn[n]=function(i){var o,s=e.type(i),l="alpha"===n?this._hsla?"hsla":"rgba":t,u=this[l](),c=u[r.idx];return"undefined"===s?c:("function"===s&&(i=i.call(this,c),s=e.type(i)),null==i&&r.empty?this:("string"===s&&(o=a.exec(i))&&(i=c+parseFloat(o[2])*("+"===o[1]?1:-1)),u[r.idx]=i,this[l](u)))})})}),l.hook=function(t){var n=t.split(" ");f(n,function(t,n){e.cssHooks[n]={set:function(t,i){var o,a,s="";if("transparent"!==i&&("string"!==e.type(i)||(o=r(i)))){if(i=l(o||i),!d.rgba&&1!==i._rgba[3]){for(a="backgroundColor"===n?t.parentNode:t;(""===s||"transparent"===s)&&a&&a.style;)try{s=e.css(a,"backgroundColor"),a=a.parentNode}catch(e){}i=i.blend(s&&"transparent"!==s?s:"_default")}i=i.toRgbaString()}try{t.style[n]=i}catch(e){}}},e.fx.step[n]=function(t){t.colorInit||(t.start=l(t.elem,n),t.end=l(t.end),t.colorInit=!0),e.cssHooks[n].set(t.elem,t.start.transition(t.end,t.pos))}})},l.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),e.cssHooks.borderColor={expand:function(e){var t={};return f(["Top","Right","Bottom","Left"],function(n,r){t["border"+r+"Color"]=e}),t}},o=e.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(t),function(){function e(e){var t,n,r=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,i={};if(r&&r.length&&r[0]&&r[r[0]])for(n=r.length;n--;)t=r[n],"string"==typeof r[t]&&(i[$.camelCase(t)]=r[t]);else for(t in r)"string"==typeof r[t]&&(i[t]=r[t]);return i}function n(e,t){var n,r,o={};for(n in t)r=t[n],e[n]!==r&&(i[n]||!$.fx.step[n]&&isNaN(parseFloat(r))||(o[n]=r));return o}var r=["add","remove","toggle"],i={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};$.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,n){$.fx.step[n]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(t.style(e.elem,n,e.end),e.setAttr=!0)}}),$.fn.addBack||($.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),$.effects.animateClass=function(t,i,o,a){var s=$.speed(i,o,a);return this.queue(function(){var i,o=$(this),a=o.attr("class")||"",l=s.children?o.find("*").addBack():o;l=l.map(function(){return{el:$(this),start:e(this)}}),i=function(){$.each(r,function(e,n){t[n]&&o[n+"Class"](t[n])})},i(),l=l.map(function(){return this.end=e(this.el[0]),this.diff=n(this.start,this.end),this}),o.attr("class",a),l=l.map(function(){var e=this,t=$.Deferred(),n=$.extend({},s,{queue:!1,complete:function(){t.resolve(e)}});return this.el.animate(this.diff,n),t.promise()}),$.when.apply($,l.get()).done(function(){i(),$.each(arguments,function(){var e=this.el;$.each(this.diff,function(t){e.css(t,"")})}),s.complete.call(o[0])})})},$.fn.extend({addClass:function(e){return function(t,n,r,i){return n?$.effects.animateClass.call(this,{add:t},n,r,i):e.apply(this,arguments)}}($.fn.addClass),removeClass:function(e){return function(t,n,r,i){return arguments.length>1?$.effects.animateClass.call(this,{remove:t},n,r,i):e.apply(this,arguments)}}($.fn.removeClass),toggleClass:function(e){return function(t,n,r,i,o){return"boolean"==typeof n||void 0===n?r?$.effects.animateClass.call(this,n?{add:t}:{remove:t},r,i,o):e.apply(this,arguments):$.effects.animateClass.call(this,{toggle:t},n,r,i)}}($.fn.toggleClass),switchClass:function(e,t,n,r,i){return $.effects.animateClass.call(this,{add:t,remove:e},n,r,i)}})}(),function(){function t(e,t,n,r){return $.isPlainObject(e)&&(t=e,e=e.effect),e={effect:e},null==t&&(t={}),$.isFunction(t)&&(r=t,n=null,t={}),("number"==typeof t||$.fx.speeds[t])&&(r=n,n=t,t={}),$.isFunction(n)&&(r=n,n=null),t&&$.extend(e,t),n=n||t.duration,e.duration=$.fx.off?0:"number"==typeof n?n:n in $.fx.speeds?$.fx.speeds[n]:$.fx.speeds._default,e.complete=r||t.complete,e}function n(e){return!(e&&"number"!=typeof e&&!$.fx.speeds[e])||("string"==typeof e&&!$.effects.effect[e]||(!!$.isFunction(e)||"object"==typeof e&&!e.effect))}function r(e,t){var n=t.outerWidth(),r=t.outerHeight(),i=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,o=i.exec(e)||["",0,n,r,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?n:parseFloat(o[2]),bottom:"auto"===o[3]?r:parseFloat(o[3]),left:parseFloat(o[4])||0}}$.expr&&$.expr.filters&&$.expr.filters.animated&&($.expr.filters.animated=function(t){return function(n){return!!$(n).data(e)||t(n)}}($.expr.filters.animated)),!1!==$.uiBackCompat&&$.extend($.effects,{save:function(e,t){for(var n=0,r=t.length;n
    ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),r={width:e.width(),height:e.height()},i=document.activeElement;try{i.id}catch(e){i=document.body}return e.wrap(n),(e[0]===i||$.contains(e[0],i))&&$(i).trigger("focus"),n=e.parent(),"static"===e.css("position")?(n.css({position:"relative"}),e.css({position:"relative"})):($.extend(t,{position:e.css("position"),zIndex:e.css("z-index")}),$.each(["top","left","bottom","right"],function(n,r){t[r]=e.css(r),isNaN(parseInt(t[r],10))&&(t[r]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(r),n.css(t).show()},removeWrapper:function(e){var t=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===t||$.contains(e[0],t))&&$(t).trigger("focus")),e}}),$.extend($.effects,{version:"1.12.1",define:function(e,t,n){return n||(n=t,t="effect"),$.effects.effect[e]=n,$.effects.effect[e].mode=t,n},scaledDimensions:function(e,t,n){if(0===t)return{height:0,width:0,outerHeight:0,outerWidth:0};var r="horizontal"!==n?(t||100)/100:1,i="vertical"!==n?(t||100)/100:1;return{height:e.height()*i,width:e.width()*r,outerHeight:e.outerHeight()*i,outerWidth:e.outerWidth()*r}},clipToBox:function(e){return{width:e.clip.right-e.clip.left,height:e.clip.bottom-e.clip.top,left:e.clip.left,top:e.clip.top}},unshift:function(e,t,n){var r=e.queue();t>1&&r.splice.apply(r,[1,0].concat(r.splice(t,n))),e.dequeue()},saveStyle:function(e){e.data("ui-effects-style",e[0].style.cssText)},restoreStyle:function(e){e[0].style.cssText=e.data("ui-effects-style")||"",e.removeData("ui-effects-style")},mode:function(e,t){var n=e.is(":hidden");return"toggle"===t&&(t=n?"show":"hide"),(n?"hide"===t:"show"===t)&&(t="none"),t},getBaseline:function(e,t){var n,r;switch(e[0]){case"top":n=0;break;case"middle":n=.5;break;case"bottom":n=1;break;default:n=e[0]/t.height}switch(e[1]){case"left":r=0;break;case"center":r=.5;break;case"right":r=1;break;default:r=e[1]/t.width}return{x:r,y:n}},createPlaceholder:function(e){var t,n=e.css("position"),r=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(n)&&(n="absolute",t=$("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),float:e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data("ui-effects-placeholder",t)),e.css({position:n,left:r.left,top:r.top}),t},removePlaceholder:function(e){var t="ui-effects-placeholder",n=e.data(t);n&&(n.remove(),e.removeData(t))},cleanUp:function(e){$.effects.restoreStyle(e),$.effects.removePlaceholder(e)},setTransition:function(e,t,n,r){return r=r||{},$.each(t,function(t,i){var o=e.cssUnit(i);o[0]>0&&(r[i]=o[0]*n+o[1])}),r}}),$.fn.extend({effect:function(){function n(t){function n(){s.removeData(e),$.effects.cleanUp(s),"hide"===r.mode&&s.hide(),a()}function a(){$.isFunction(l)&&l.call(s[0]),$.isFunction(t)&&t()}var s=$(this);r.mode=c.shift(),!1===$.uiBackCompat||o?"none"===r.mode?(s[u](),a()):i.call(s[0],r,n):(s.is(":hidden")?"hide"===u:"show"===u)?(s[u](),a()):i.call(s[0],r,a)}var r=t.apply(this,arguments),i=$.effects.effect[r.effect],o=i.mode,a=r.queue,s=a||"fx",l=r.complete,u=r.mode,c=[],d=function(t){var n=$(this),r=$.effects.mode(n,u)||o;n.data(e,!0),c.push(r),o&&("show"===r||r===o&&"hide"===r)&&n.show(),o&&"none"===r||$.effects.saveStyle(n),$.isFunction(t)&&t()};return $.fx.off||!i?u?this[u](r.duration,l):this.each(function(){l&&l.call(this)}):!1===a?this.each(d).each(n):this.queue(s,d).queue(s,n)},show:function(e){return function(r){if(n(r))return e.apply(this,arguments);var i=t.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}($.fn.show),hide:function(e){return function(r){if(n(r))return e.apply(this,arguments);var i=t.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}($.fn.hide),toggle:function(e){return function(r){if(n(r)||"boolean"==typeof r)return e.apply(this,arguments);var i=t.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}($.fn.toggle),cssUnit:function(e){var t=this.css(e),n=[];return $.each(["em","px","%","pt"],function(e,r){t.indexOf(r)>0&&(n=[parseFloat(t),r])}),n},cssClip:function(e){return e?this.css("clip","rect("+e.top+"px "+e.right+"px "+e.bottom+"px "+e.left+"px)"):r(this.css("clip"),this)},transfer:function(e,t){var n=$(this),r=$(e.to),i="fixed"===r.css("position"),o=$("body"),a=i?o.scrollTop():0,s=i?o.scrollLeft():0,l=r.offset(),u={top:l.top-a,left:l.left-s,height:r.innerHeight(),width:r.innerWidth()},c=n.offset(),d=$("
    ").appendTo("body").addClass(e.className).css({top:c.top-a,left:c.left-s,height:n.innerHeight(),width:n.innerWidth(),position:i?"fixed":"absolute"}).animate(u,e.duration,e.easing,function(){d.remove(),$.isFunction(t)&&t()})}}),$.fx.step.clip=function(e){e.clipInit||(e.start=$(e.elem).cssClip(),"string"==typeof e.end&&(e.end=r(e.end,e.elem)),e.clipInit=!0),$(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),function(){var e={};$.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,n){e[n]=function(e){return Math.pow(e,t+2)}}),$.extend(e,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,n=4;e<((t=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*t-2)/22-e,2)}}),$.each(e,function(e,t){$.easing["easeIn"+e]=t,$.easing["easeOut"+e]=function(e){return 1-t(1-e)},$.easing["easeInOut"+e]=function(e){return e<.5?t(2*e)/2:1-t(-2*e+2)/2}})}(),$.effects})},function(e,exports){!function(exports){function e(e){return e}function t(e,t){for(var n=0,r=t.length,i=new Array(r);n>>1;e(t[o])>>1;n>>1);--o>0;)r(e,o,i,t);return e}function n(e,t,n){for(var i,o=n-t;--o>0;)i=e[t],e[t]=e[t+o],e[t+o]=i,r(e,1,o,t);return e}function r(t,n,r,i){for(var o,a=t[--i+n],s=e(a);(o=n<<1)<=r&&(oe(t[i+o+1])&&o++,!(s<=e(t[i+o])));)t[i+n]=t[i+o],n=o;t[i+n]=a}return t.sort=n,t}function i(e){function t(t,r,i,o){var a,s,l,u=new Array(o=Math.min(i-r,o));for(s=0;sa&&(u[0]=l,a=e(n(u,0,o)[0]))}while(++rn&&e(t[o-1])>s;--o)t[o]=t[o-1];t[o]=a}return t}return t}function a(e){function t(e,t,i){return(i-t>1,c=u-a,d=u+a,h=n[s],f=e(h),p=n[c],g=e(p),m=n[u],v=e(m),y=n[d],b=e(y),_=n[l],w=e(_);f>g&&(o=h,h=p,p=o,o=f,f=g,g=o),b>w&&(o=y,y=_,_=o,o=b,b=w,w=o),f>v&&(o=h,h=m,m=o,o=f,f=v,v=o),g>v&&(o=p,p=m,m=o,o=g,g=v,v=o),f>b&&(o=h,h=y,y=o,o=f,f=b,b=o),v>b&&(o=m,m=y,y=o,o=v,v=b,b=o),g>w&&(o=p,p=_,_=o,o=g,g=w,w=o),g>v&&(o=p,p=m,m=o,o=g,g=v,v=o),b>w&&(o=y,y=_,_=o,o=b,b=w,w=o);var C=p,A=g,E=y,S=b;n[s]=h,n[c]=n[r],n[u]=m,n[d]=n[i-1],n[l]=_;var x=r+1,F=i-2,k=A<=S&&A>=S;if(k)for(var D=x;D<=F;++D){var T=n[D],M=e(T);if(MA)for(;;){var R=e(n[F]);{if(!(R>A)){if(RS)for(;;){var R=e(n[F]);{if(!(R>S)){Rl){for(var O,R;(O=e(n[x]))<=A&&O>=A;)++x;for(;(R=e(n[F]))<=S&&R>=S;)--F;for(var D=x;D<=F;D++){var T=n[D],M=e(T);if(M<=A&&M>=A)D!==x&&(n[D]=n[x],n[x]=T),x++;else if(M<=S&&M>=S)for(;;){var R=e(n[F]);{if(!(R<=S&&R>=S)){R32)throw new Error("invalid array width!");return e}function c(e,t){return function(n){var r=n.length;return[e.left(n,t,0,r),e.right(n,t,0,r)]}}function d(e,t){var n=t[0],r=t[1];return function(t){var i=t.length;return[e.left(t,n,0,i),e.left(t,r,0,i)]}}function h(e){return[0,e.length]}function f(){return null}function p(){return 0}function g(e){return e+1}function m(e){return e-1}function v(e){return function(t,n){return t+ +e(n)}}function y(e){return function(t,n){return t-e(n)}}function b(){function n(e){var t=x,n=e.length;return n&&(E=E.concat(e),M=k(M,x+=n),O.forEach(function(r){r(e,t,n)})),b}function o(){for(var e=_(x,x),t=[],n=0,r=0;nr;)M[--x]=0}function s(n){function o(e,r,i){q=e.map(n),K=J(w(i),0,i),q=t(q,K);var o,a=ee(q),s=a[0],l=a[1];if(Y)for(o=0;ore)for(r=re,i=Math.min(t,ie);rie)for(r=Math.max(t,ie),i=n;r=re&&e>0;)M[t=W[r]]||(n.push(E[t]),--e);return n}function z(e){for(var t,n=[],r=re;r0;)M[t=W[r]]||(n.push(E[t]),--e),r++;return n}function H(t){function n(e,n,r,i){function o(){++q===V&&(y=D(y,U<<=1),B=D(B,U),V=C(U))}var c,d,h,p,g,m,v=P,y=_(q,V),b=j,w=H,A=q,S=0,F=0;for(X&&(b=w=f),P=new Array(q),q=0,B=A>1?k(B,x):_(x,V),A&&(h=(d=v[0]).key);F=p);)++F;for(;Fm||(B[c=n[F]+r]=q,M[c]&Z||(g.value=b(g.value,E[c])),++F>=i));)p=t(e[F]);o()}for(;SS)for(S=0;S1?(K=a,Y=l):(!q&&J&&(q=1,P=[{key:null,value:w()}]),1===q?(K=s,Y=u):(K=f,Y=f),B=null),R[c]=K}function o(){if(q>1){for(var e=q,t=P,n=_(e,e),r=0,i=0;r1)for(var r=0;r1?(Y=l,K=a):1===q?(Y=u,K=s):Y=K=f}else if(1===q){if(J)return;for(var r=0;r=0&&R.splice(e,1),e=te.indexOf(n),e>=0&&te.splice(e,1),e=L.indexOf(o),e>=0&&L.splice(e,1),O}var O={top:d,all:c,reduce:h,reduceCount:b,reduceSum:w,order:A,orderNatural:S,size:F,dispose:T,remove:T};ne.push(O);var P,B,I,N,j,z,H,U=8,V=C(U),q=0,K=f,Y=f,X=!0,J=t===f;return arguments.length<1&&(t=e),R.push(K),te.push(n),L.push(o),n(G,W,0,x),b().orderNatural()}function U(){var e=H(f),t=e.all;return delete e.all,delete e.top,delete e.order,delete e.orderNatural,delete e.size,e.value=function(){return t()[0].value},e}function V(){ne.forEach(function(e){e.dispose()});var e=O.indexOf(o);return e>=0&&O.splice(e,1),e=O.indexOf(s),e>=0&&O.splice(e,1),e=L.indexOf(l),e>=0&&L.splice(e,1),F&=Z,B()}var G,W,q,K,Y,X={filter:b,filterExact:S,filterRange:P,filterFunction:I,filterAll:B,top:j,bottom:z,group:H,groupAll:U,dispose:V,remove:V},Q=~F&-~F,Z=~Q,J=a(function(e){return q[e]}),ee=h,te=[],ne=[],re=0,ie=0;return O.unshift(o),O.push(s),L.push(l),F|=Q,(T>=32?!Q:F&-(1<=0&&R.splice(n),n=O.indexOf(e),n>=0&&O.splice(n),h}var l,u,c,d,h={reduce:r,reduceCount:i,reduceSum:o,value:a,dispose:s,remove:s},f=!0;return R.push(t),O.push(e),e(E,0,x),i()}function u(){return x}var b={add:n,remove:o,dimension:s,groupAll:l,size:u},E=[],x=0,F=0,T=8,M=S(0),R=[],O=[],L=[];return arguments.length?n(arguments[0]):b}function _(e,t){return(t<257?S:t<65537?x:F)(e)}function w(e){for(var t=_(e,e),n=-1;++n=t)return e;var n=new e.constructor(t);return n.set(e),n},D=function(e,t){var n;switch(t){case 16:n=x(e.length);break;case 32:n=F(e.length);break;default:throw new Error("invalid array width!")}return n.set(e),n}),exports.crossfilter=b}(void 0!==exports&&exports||this)},function(e,exports,t){e.exports=t(327).crossfilter},function(e,exports){!function(exports){function e(e){return e}function t(e,t){for(var n=0,r=t.length,i=new Array(r);n>>1;e(t[o])>>1;n>>1);--o>0;)r(e,o,i,t);return e}function n(e,t,n){for(var i,o=n-t;--o>0;)i=e[t],e[t]=e[t+o],e[t+o]=i,r(e,1,o,t);return e}function r(t,n,r,i){for(var o,a=t[--i+n],s=e(a);(o=n<<1)<=r&&(oe(t[i+o+1])&&o++,!(s<=e(t[i+o])));)t[i+n]=t[i+o],n=o;t[i+n]=a}return t.sort=n,t}function i(e){function t(t,r,i,o){var a,s,l,u=new Array(o=Math.min(i-r,o));for(s=0;sa&&(u[0]=l,a=e(n(u,0,o)[0]))}while(++rn&&e(t[o-1])>s;--o)t[o]=t[o-1];t[o]=a}return t}return t}function a(e){function t(e,t,i){return(i-t>1,c=u-a,d=u+a,h=n[s],f=e(h),p=n[c],g=e(p),m=n[u],v=e(m),y=n[d],b=e(y),_=n[l],w=e(_);f>g&&(o=h,h=p,p=o,o=f,f=g,g=o),b>w&&(o=y,y=_,_=o,o=b,b=w,w=o),f>v&&(o=h,h=m,m=o,o=f,f=v,v=o),g>v&&(o=p,p=m,m=o,o=g,g=v,v=o),f>b&&(o=h,h=y,y=o,o=f,f=b,b=o),v>b&&(o=m,m=y,y=o,o=v,v=b,b=o),g>w&&(o=p,p=_,_=o,o=g,g=w,w=o),g>v&&(o=p,p=m,m=o,o=g,g=v,v=o),b>w&&(o=y,y=_,_=o,o=b,b=w,w=o);var C=p,A=g,E=y,S=b;n[s]=h,n[c]=n[r],n[u]=m,n[d]=n[i-1],n[l]=_;var x=r+1,F=i-2,k=A<=S&&A>=S;if(k)for(var D=x;D<=F;++D){var T=n[D],M=e(T);if(MA)for(;;){var R=e(n[F]);{if(!(R>A)){if(RS)for(;;){var R=e(n[F]);{if(!(R>S)){Rl){for(var O,R;(O=e(n[x]))<=A&&O>=A;)++x;for(;(R=e(n[F]))<=S&&R>=S;)--F;for(var D=x;D<=F;D++){var T=n[D],M=e(T);if(M<=A&&M>=A)D!==x&&(n[D]=n[x],n[x]=T),x++;else if(M<=S&&M>=S)for(;;){var R=e(n[F]);{if(!(R<=S&&R>=S)){R32)throw new Error("invalid array width!");return e}function c(e,t){return function(n){var r=n.length;return[e.left(n,t,0,r),e.right(n,t,0,r)]}}function d(e,t){var n=t[0],r=t[1];return function(t){var i=t.length;return[e.left(t,n,0,i),e.left(t,r,0,i)]}}function h(e){return[0,e.length]}function f(){return null}function p(){return 0}function g(e){return e+1}function m(e){return e-1}function v(e){return function(t,n){return t+ +e(n)}}function y(e){return function(t,n){return t-e(n)}}function b(){function n(e){var t=x,n=e.length;return n&&(E=E.concat(e),M=k(M,x+=n),O.forEach(function(r){r(e,t,n)})),b}function o(){for(var e=_(x,x),t=[],n=0,r=0;nr;)M[--x]=0}function s(n){function o(e,r,i){q=e.map(n),K=J(w(i),0,i),q=t(q,K);var o,a=ee(q),s=a[0],l=a[1];if(Y)for(o=0;ore)for(r=re,i=Math.min(t,ie);rie)for(r=Math.max(t,ie),i=n;r=re&&e>0;)M[t=W[r]]||(n.push(E[t]),--e);return n}function z(e){for(var t,n=[],r=re;r0;)M[t=W[r]]||(n.push(E[t]),--e),r++;return n}function H(t){function n(e,n,r,i){function o(){++q===V&&(y=D(y,U<<=1),B=D(B,U),V=C(U))}var c,d,h,p,g,m,v=P,y=_(q,V),b=j,w=H,A=q,S=0,F=0;for(X&&(b=w=f),P=new Array(q),q=0,B=A>1?k(B,x):_(x,V),A&&(h=(d=v[0]).key);F=p);)++F;for(;Fm||(B[c=n[F]+r]=q,M[c]&Z||(g.value=b(g.value,E[c])),++F>=i));)p=t(e[F]);o()}for(;SS)for(S=0;S1?(K=a,Y=l):(!q&&J&&(q=1,P=[{key:null,value:w()}]),1===q?(K=s,Y=u):(K=f,Y=f),B=null),R[c]=K}function o(){if(q>1){for(var e=q,t=P,n=_(e,e),r=0,i=0;r1)for(var r=0;r1?(Y=l,K=a):1===q?(Y=u,K=s):Y=K=f}else if(1===q){if(J)return;for(var r=0;r=0&&R.splice(e,1),e=te.indexOf(n),e>=0&&te.splice(e,1),e=L.indexOf(o),e>=0&&L.splice(e,1),O}var O={top:d,all:c,reduce:h,reduceCount:b,reduceSum:w,order:A,orderNatural:S,size:F,dispose:T,remove:T};ne.push(O);var P,B,I,N,j,z,H,U=8,V=C(U),q=0,K=f,Y=f,X=!0,J=t===f;return arguments.length<1&&(t=e),R.push(K),te.push(n),L.push(o),n(G,W,0,x),b().orderNatural()}function U(){var e=H(f),t=e.all;return delete e.all,delete e.top,delete e.order,delete e.orderNatural,delete e.size,e.value=function(){return t()[0].value},e}function V(){ne.forEach(function(e){e.dispose()});var e=O.indexOf(o);return e>=0&&O.splice(e,1),e=O.indexOf(s),e>=0&&O.splice(e,1),e=L.indexOf(l),e>=0&&L.splice(e,1),F&=Z,B()}var G,W,q,K,Y,X={filter:b,filterExact:S,filterRange:P,filterFunction:I,filterAll:B,top:j,bottom:z,group:H,groupAll:U,dispose:V,remove:V},Q=~F&-~F,Z=~Q,J=a(function(e){return q[e]}),ee=h,te=[],ne=[],re=0,ie=0;return O.unshift(o),O.push(s),L.push(l),F|=Q,(T>=32?!Q:F&-(1<=0&&R.splice(n),n=O.indexOf(e),n>=0&&O.splice(n),h}var l,u,c,d,h={reduce:r,reduceCount:i,reduceSum:o,value:a,dispose:s,remove:s},f=!0;return R.push(t),O.push(e),e(E,0,x),i()}function u(){return x}var b={add:n,remove:o,dimension:s,groupAll:l,size:u},E=[],x=0,F=0,T=8,M=S(0),R=[],O=[],L=[];return arguments.length?n(arguments[0]):b}function _(e,t){return(t<257?S:t<65537?x:F)(e)}function w(e){for(var t=_(e,e),n=-1;++n=t)return e;var n=new e.constructor(t);return n.set(e),n},D=function(e,t){var n;switch(t){case 16:n=x(e.length);break;case 32:n=F(e.length);break;default:throw new Error("invalid array width!")}return n.set(e),n}),exports.crossfilter=b}(void 0!==exports&&exports||this)},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(23),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i={startOfResolution:function(e,t){var n=t;return"week"===t&&(n="isoWeek"),(0,r.default)(e).startOf(n)}};exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(10),l=n(s),u=t(5),c=n(u),d=t(7),h=n(d),f=t(25),p=n(f),g=p.default.get("Search"),m=g.SearchStore,v=p.default.get("FieldQuickValues"),y=v.FieldQuickValuesActions,b=i.default.createStore({listenables:[y],get:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.order,i=n.tableSize,o=n.stackedFields;this.trigger({loading:!0});var s=m.getOriginalSearchURLParams(),u=m.searchInStream?m.searchInStream.id:null,d=s.get("rangetype"),f={};switch(d){case"relative":f.range=s.get("relative");break;case"absolute":f.from=s.get("from"),f.to=s.get("to");break;case"keyword":f.keyword=s.get("keyword")}var p=l.default.UniversalSearchApiController.fieldTerms(d,s.get("q")||"*",e,r,i,o,f,u).url,g=(0,c.default)("GET",a.default.qualifyUrl(p));g.then(function(e){t.trigger({data:e,loading:!1})},function(e){h.default.error("Loading quick values failed with status: "+e,"Could not load quick values")}),y.get.promise(g)},getHistogram:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.order,o=r.limit,s=r.stackedFields,u=r.interval;this.trigger({loading:!0});var d=m.getOriginalSearchURLParams(),f=m.searchInStream?m.searchInStream.id:null,p=d.get("rangetype"),g={};switch(p){case"relative":g.range=d.get("relative");break;case"absolute":g.from=d.get("from"),g.to=d.get("to");break;case"keyword":g.keyword=d.get("keyword")}var v=m.appendFieldQueryObjectToQueryString(d.get("q")||"*",t,m.AND_OPERATOR),b=l.default.UniversalSearchApiController.fieldTermsHistogram(p,v,e,i,o,s,g,u,f).url,_=(0,c.default)("GET",a.default.qualifyUrl(b));_.then(function(e){n.trigger({data:e,loading:!1})},function(e){h.default.error("Loading quick values histogram failed with status: "+e,"Could not load quick values histogram")}),y.getHistogram.promise(_)}});exports.default=b,e.exports=exports.default},function(e,exports,t){"use strict";var n=t(10),r=t(5).default,i=t(7),o=t(4),a={loadFields:function(){var e=n.SystemApiController.fields().url,t=r("GET",o.qualifyUrl(e));return t=t.then(function(e){return e.fields}),t.catch(function(e){i.error("Loading field information failed with status: "+e.additional.message,"Could not load field information")}),t}};e.exports=a},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(5).default,r=t(18),i=t(10),o=t(4),a=t(7),s=t(9),l=s.getStore("Search"),u={FUNCTIONS:r.OrderedMap({count:"Total",mean:"Mean",min:"Minimum",max:"Maximum",std_deviation:"Std. deviation",variance:"Variance",sum:"Sum",cardinality:"Cardinality"}),getFieldStatistics:function(e){var t=l.getOriginalSearchURLParams(),r=l.searchInStream?l.searchInStream.id:null,s=t.get("rangetype"),u={};switch(s){case"relative":u.range=t.get("relative");break;case"absolute":u.from=t.get("from"),u.to=t.get("to");break;case"keyword":u.keyword=t.get("keyword")}var c=i.UniversalSearchApiController.fieldStats(s,t.get("q")||"*",e,u,r).url;c=o.qualifyUrl(c);var d=n("GET",c);return d.catch(function(e){a.error("Loading field statistics failed with status: "+e,"Could not load field statistics")}),d}};e.exports=u},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(12),a=n(o),s=i.default.createStore({focus:!0,init:function(){var e=this;(0,a.default)(window).blur(function(){e.trigger({focus:!1}),e.focus=!1}),(0,a.default)(window).focus(function(){e.trigger({focus:!0}),e.focus=!0})},getInitialState:function(){return{focus:this.focus}}});exports.default=s,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(5),a=n(o),s=t(6),l=n(s),u=t(7),c=n(u),d=t(4),h=n(d),f=l.default.getActions("GettingStarted"),p=i.default.createStore({listenables:[f],sourceUrl:"/system/gettingstarted",status:void 0,init:function(){this.getStatus()},getInitialState:function(){return{status:this.status}},get:function(){return this.status},getStatus:function(){var e=this,t=(0,a.default)("GET",h.default.qualifyUrl(this.sourceUrl));t.then(function(t){return e.status=t,e.trigger({status:e.status}),t},function(e){return console.error(e)}),f.getStatus.promise(t)},dismiss:function(){var e=this,t=(0,a.default)("POST",h.default.qualifyUrl(this.sourceUrl+"/dismiss"),"{}");t.then(function(t){return e.getStatus(),t},function(e){c.default.error("Dismissing Getting Started Guide failed with status: "+e,"Could not dismiss guide")}),f.dismiss.promise(t)}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(9),a=n(o),s=t(6),l=n(s),u=a.default.getStore("Metrics"),c=l.default.getActions("Metrics"),d=i.default.createStore({listenables:[],metrics:{input:"org.graylog2.throughput.input.1-sec-rate",output:"org.graylog2.throughput.output.1-sec-rate"},init:function(){c.addGlobal(this.metrics.input),c.addGlobal(this.metrics.output),this.listenTo(u,this.updateMetrics),setInterval(c.list,this.INTERVAL)},INTERVAL:2e3,updateMetrics:function(e){var t=this;if(e.metrics){var n={input:0,output:0};Object.keys(e.metrics).forEach(function(r){var i=e.metrics[r][t.metrics.input],o=e.metrics[r][t.metrics.output];i&&(n.input+=i.metric.value),o&&(n.output+=o.metric.value)}),this.trigger({throughput:n})}}});exports.default=d,e.exports=exports.default},function(e,exports,t){"use strict";var n=t(7),r=t(4),i=t(5).default,o=t(5).fetchPlainText,a={URL:r.qualifyUrl("/system/grok"),loadPatterns:function(e){var t=function(e){n.error("Loading Grok patterns failed with status: "+e.message,"Could not load Grok patterns")};i("GET",this.URL).then(function(t){var n=t.patterns;return n.sort(function(e,t){return e.name.toLowerCase().localeCompare(t.name.toLowerCase())}),e(n),t},t)},savePattern:function(e,t){var r,o=function(t){n.error('Saving Grok pattern "'+e.name+'" failed with status: '+t.message,"Could not save Grok pattern")},a={id:e.id,pattern:e.pattern,name:e.name,content_pack:e.content_pack},s=this.URL;""===e.id?r="POST":(s+="/"+e.id,r="PUT"),i(r,s,a).then(function(r){t();var i=""===e.id?"created":"updated",o='Grok pattern "'+e.name+'" successfully '+i;return n.success(o),r},o)},deletePattern:function(e,t){var r=function(t){n.error('Deleting Grok pattern "'+e.name+'" failed with status: '+t.message,"Could not delete Grok pattern")};i("DELETE",this.URL+"/"+e.id).then(function(r){return t(),n.success('Grok pattern "'+e.name+'" successfully deleted'),r},r)},bulkImport:function(e,t){var r=function(e){n.error("Importing Grok pattern file failed with status: "+e.message,"Could not load Grok patterns")},i=o("POST",this.URL+"?replace="+t,e);return i.catch(r),i}};e.exports=a},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(5),l=n(s),u=t(7),c=n(u),d=t(45),h=n(d),f=t(48),p=n(f),g=t(6),m=n(g),v=m.default.getActions("HistogramData"),y=i.default.createStore({listenables:[v],sourceUrl:"/search/universal/relative/histogram",histogram:void 0,getInitialState:function(){return{histogram:this.histogram}},load:function(e,t,n){var r=(0,h.default)(a.default.qualifyUrl(this.sourceUrl)),i={};void 0!==t&&t instanceof Array?i.query=t.map(function(e){return"source:"+e}).join(" OR "):i.query="*";var o="minute",s=Number(e);s>=31536e3||0===s?o="day":s>=2678400&&(o="hour"),i.range=e,i.interval=o,r.query(i);var u=(0,l.default)("GET",r.toString()).then(function(e){return e.histogram=p.default.format(e.results,e.queried_timerange,o,n,0===s,null),e},function(e){c.default.warning("Loading of histogram data failed with status: "+e,"Could not load histogram data")});v.load.promise(u)}});exports.default=y,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(10),l=n(s),u=t(5),c=n(u),d=t(6),h=n(d),f=h.default.getActions("IndexerCluster"),p=i.default.createStore({listenables:[f],state:{},init:function(){this.update()},update:function(){var e=this;Promise.all([this.health().then(function(t){e.state.health=t}),this.name().then(function(t){e.state.name=t.name})]).then(function(){return e.trigger(e.state)})},getInitialState:function(){return this.state},health:function(){var e=a.default.qualifyUrl(l.default.IndexerClusterApiController.health().url),t=(0,c.default)("GET",e);return f.health.promise(t),t},name:function(){var e=a.default.qualifyUrl(l.default.IndexerClusterApiController.name().url),t=(0,c.default)("GET",e);return f.name.promise(t),t}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(23),a=n(o),s=t(7),l=(n(s),t(4)),u=n(l),c=t(10),d=n(c),h=t(5),f=n(h),p=i.default.createStore({listenables:[],list:function(e,t){var n=u.default.qualifyUrl(d.default.IndexerFailuresApiController.list(e,t).url);return(0,f.default)("GET",n)},count:function(e){var t=e.format?e:(0,a.default)(e),n=t.format("YYYY-MM-DDTHH:mm:ss.SSS"),r=u.default.qualifyUrl(d.default.IndexerFailuresApiController.count(n).url);return(0,f.default)("GET",r)}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(10),l=n(s),u=t(5),c=n(u),d=t(6),h=n(d),f=h.default.getActions("IndexerOverview"),p=i.default.createStore({listenables:[f],list:function(e){var t=this,n=a.default.qualifyUrl(l.default.IndexerOverviewApiResource.list(e).url),r=(0,c.default)("GET",n);return r.then(function(e){t.trigger({indexerOverview:e,indexerOverviewError:void 0})},function(e){if(e.additional&&503===e.additional.status){var n=e.additional.body&&e.additional.body.message?e.additional.body.message:"Elasticsearch is unavailable. Check your configuration and logs for more information.";t.trigger({indexerOverviewError:n})}}),f.list.promise(r),r}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(7),a=n(o),s=t(4),l=n(s),u=t(10),c=n(u),d=t(5),h=n(d),f=t(6),p=n(f),g=p.default.getActions("IndexRanges"),m=i.default.createStore({listenables:[g],indexRanges:void 0,getInitialState:function(){return{indexRanges:this.indexRanges}},init:function(){g.list()},list:function(){var e=this,t=l.default.qualifyUrl(c.default.IndexRangesApiController.list().url),n=(0,h.default)("GET",t).then(function(t){e.indexRanges=t.ranges,e.trigger(e.getInitialState())});g.list.promise(n)},recalculate:function(e){var t=l.default.qualifyUrl(c.default.IndexRangesApiController.rebuild(e).url),n=(0,h.default)("POST",t);n.then(a.default.success("Index ranges will be recalculated shortly")).catch(function(e){a.default.error("Could not create a job to start index ranges recalculation, reason: "+e,"Error starting index ranges recalculation")}),g.recalculate.promise(n)},recalculateIndex:function(e){var t=l.default.qualifyUrl(c.default.IndexRangesApiController.rebuildSingle(e).url),n=(0,h.default)("POST",t);n.then(a.default.success("Index ranges for "+e+" will be recalculated shortly")).catch(function(t){a.default.error("Could not create a job to start index ranges recalculation for "+e+", reason: "+t,"Error starting index ranges recalculation for "+e)}),g.recalculateIndex.promise(n)}});exports.default=m,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(10),a=n(o),s=t(5),l=n(s),u=t(4),c=n(u),d=t(7),h=n(d),f=t(6),p=n(f),g=p.default.getActions("IndexSets"),m=i.default.createStore({listenables:[g],list:function(e){var t=this,n=c.default.qualifyUrl(a.default.IndexSetsApiController.list(e).url),r=(0,l.default)("GET",n);r.then(function(e){return t.trigger({indexSetsCount:e.total,indexSets:e.index_sets,indexSetStats:e.stats})},function(e){h.default.error("Fetching index sets list failed: "+e.message,"Could not retrieve index sets.")}),g.list.promise(r)},listPaginated:function(e,t,n){var r=this,i=c.default.qualifyUrl(a.default.IndexSetsApiController.listPaginated(e,t,n).url),o=(0,l.default)("GET",i);o.then(function(e){return r.trigger({indexSetsCount:e.total,indexSets:e.index_sets,indexSetStats:e.stats})},function(e){h.default.error("Fetching index sets list failed: "+r._errorMessage(e),"Could not retrieve index sets.")}),g.listPaginated.promise(o)},get:function(e){var t=this,n=c.default.qualifyUrl(a.default.IndexSetsApiController.get(e).url),r=(0,l.default)("GET",n);r.then(function(e){return t.trigger({indexSet:e}),e},function(n){h.default.error("Fetching index set '"+e+"' failed with status: "+t._errorMessage(n),"Could not retrieve index set.")}),g.get.promise(r)},update:function(e){var t=this,n=c.default.qualifyUrl(a.default.IndexSetsApiController.get(e.id).url),r=(0,l.default)("PUT",n,e);r.then(function(n){return h.default.success("Successfully updated index set '"+e.title+"'","Success"),t.trigger({indexSet:n}),n},function(n){h.default.error("Updating index set '"+e.title+"' failed with status: "+t._errorMessage(n),"Could not update index set.")}),g.update.promise(r)},create:function(e){var t=this,n=c.default.qualifyUrl(a.default.IndexSetsApiController.create().url),r=(0,l.default)("POST",n,e);r.then(function(n){return h.default.success("Successfully created index set '"+e.title+"'","Success"),t.trigger({indexSet:n}),n},function(n){h.default.error("Creating index set '"+e.title+"' failed with status: "+t._errorMessage(n),"Could not create index set.")}),g.create.promise(r)},delete:function(e,t){var n=this,r=c.default.qualifyUrl(a.default.IndexSetsApiController.delete(e.id,t).url),i=(0,l.default)("DELETE",r);i.then(function(){h.default.success("Successfully deleted index set '"+e.title+"'","Success")},function(t){h.default.error("Deleting index set '"+e.title+"' failed with status: "+n._errorMessage(t),"Could not delete index set.")}),g.delete.promise(i)},setDefault:function(e){var t=this,n=c.default.qualifyUrl(a.default.IndexSetsApiController.setDefault(e.id).url),r=(0,l.default)("PUT",n);r.then(function(){h.default.success("Successfully set index set '"+e.title+"' as default","Success")},function(n){h.default.error("Setting index set '"+e.title+"' as default failed with status: "+t._errorMessage(n),"Could not set default index set.")}),g.setDefault.promise(r)},stats:function(){var e=this,t=c.default.qualifyUrl(a.default.IndexSetsApiController.stats().url),n=(0,l.default)("GET",t);n.then(function(t){return e.trigger({globalIndexSetStats:{indices:t.indices,documents:t.documents,size:t.size}})},function(e){h.default.error("Fetching global index stats failed: "+e.message,"Could not retrieve global index stats.")}),g.stats.promise(n)},_errorMessage:function(e){try{return e.additional.body.message}catch(t){return e.message}}});exports.default=m,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(10),l=n(s),u=t(5),c=n(u),d=t(6),h=n(d),f=h.default.getActions("Indices"),p=i.default.createStore({listenables:[f],indices:void 0,closedIndices:void 0,registrations:{},getInitialState:function(){return{indices:this.indices,closedIndices:this.closedIndices}},list:function(e){var t=this,n=a.default.qualifyUrl(l.default.IndicesApiController.list(e).url),r=(0,c.default)("GET",n).then(function(e){return t.indices=e.all.indices,t.closedIndices=e.closed.indices,t.trigger({indices:t.indices,closedIndices:t.closedIndices}),{indices:t.indices,closedIndices:t.closedIndices}});f.list.promise(r)},listAll:function(){var e=this,t=a.default.qualifyUrl(l.default.IndicesApiController.listAll().url),n=(0,c.default)("GET",t).then(function(t){return e.indices=t.all.indices,e.closedIndices=t.closed.indices,e.trigger({indices:e.indices,closedIndices:e.closedIndices}),{indices:e.indices,closedIndices:e.closedIndices}});f.listAll.promise(n)},multiple:function(){var e=this,t=Object.keys(this.registrations);if(!(t.length<=0)){var n=a.default.qualifyUrl(l.default.IndicesApiController.multiple().url),r={indices:t},i=(0,c.default)("POST",n,r).then(function(t){return e.indices?Object.keys(t).forEach(function(n){e.indices[n]=t[n]}):e.indices=t,e.trigger({indices:e.indices,closedIndices:e.closedIndices}),{indices:e.indices,closedIndices:e.closedIndices}});f.multiple.promise(i)}},close:function(e){var t=a.default.qualifyUrl(l.default.IndicesApiController.close(e).url),n=(0,c.default)("POST",t);f.close.promise(n)},delete:function(e){var t=a.default.qualifyUrl(l.default.IndicesApiController.delete(e).url),n=(0,c.default)("DELETE",t);f.delete.promise(n)},reopen:function(e){var t=a.default.qualifyUrl(l.default.IndicesApiController.reopen(e).url),n=(0,c.default)("POST",t);f.reopen.promise(n)},subscribe:function(e){this.registrations[e]=this.registrations[e]?this.registrations[e]+1:1},unsubscribe:function(e){this.registrations[e]=this.registrations[e]>0?this.registrations[e]-1:0,0===this.registrations[e]&&delete this.registrations[e]}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(7),a=n(o),s=t(4),l=n(s),u=t(5),c=n(u),d=t(6),h=n(d),f=h.default.getActions("IndicesConfiguration"),p=i.default.createStore({listenables:[f],rotationStrategies:void 0,retentionStrategies:void 0,getInitialState:function(){return{activeRotationConfig:void 0,rotationStrategies:void 0,activeRetentionConfig:void 0,retentionStrategies:void 0}},_url:function(e){return l.default.qualifyUrl("/system/indices"+e)},loadRotationStrategies:function(){var e=this,t=(0,c.default)("GET",this._url("/rotation/strategies"));t.then(function(t){e.rotationStrategies=t.strategies,e.trigger({rotationStrategies:t.strategies})},function(e){a.default.error("Fetching rotation strategies failed: "+e,"Could not retrieve rotation strategies")}),f.loadRotationStrategies.promise(t)},loadRetentionStrategies:function(){var e=this,t=(0,c.default)("GET",this._url("/retention/strategies"));t.then(function(t){e.retentionStrategies=t.strategies,e.trigger({retentionStrategies:t.strategies})},function(e){a.default.error("Fetching retention strategies failed: "+e,"Could not retrieve retention strategies")}),f.loadRetentionStrategies.promise(t)}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(5),l=n(s),u=t(7),c=n(u),d=t(9),h=n(d),f=t(6),p=n(f),g=h.default.getStore("InputStaticFields"),m=p.default.getActions("Inputs"),v=i.default.createStore({listenables:[m],sourceUrl:"/system/inputs",inputs:void 0,input:void 0,init:function(){this.trigger({inputs:this.inputs,input:this.input}),this.listenTo(g,this.list)},list:function(){var e=this,t=(0,l.default)("GET",a.default.qualifyUrl(this.sourceUrl));t.then(function(t){return e.inputs=t.inputs,e.trigger({inputs:e.inputs}),e.inputs},function(e){c.default.error("Fetching Inputs failed with status: "+e,"Could not retrieve Inputs")}),m.list.promise(t)},get:function(e){return this.getOptional(e,!0)},getOptional:function(e,t){var n=this,r=(0,l.default)("GET",a.default.qualifyUrl(this.sourceUrl+"/"+e));r.then(function(e){return n.input=e,n.trigger({input:n.input}),n.input},function(r){t?c.default.error("Fetching input "+e+" failed with status: "+r,"Could not retrieve input"):n.trigger({input:{}})}),m.get.promise(r)},create:function(e){var t=(0,l.default)("POST",a.default.qualifyUrl(this.sourceUrl),e);t.then(function(){c.default.success("Input '"+e.title+"' launched successfully"),m.list()},function(t){c.default.error("Launching input '"+e.title+"' failed with status: "+t,"Could not launch input")}),m.create.promise(t)},delete:function(e){var t=e.id,n=e.title,r=(0,l.default)("DELETE",a.default.qualifyUrl(this.sourceUrl+"/"+t));r.then(function(){c.default.success("Input '"+n+"' deleted successfully"),m.list()},function(e){c.default.error("Deleting input '"+n+"' failed with status: "+e,"Could not delete input")}),m.delete.promise(r)},update:function(e,t){var n=(0,l.default)("PUT",a.default.qualifyUrl(this.sourceUrl+"/"+e),t);n.then(function(){c.default.success("Input '"+t.title+"' updated successfully"),m.list()},function(e){c.default.error("Updating input '"+t.title+"' failed with status: "+e,"Could not update input")}),m.update.promise(n)}});v.inputsAsMap=function(e){var t={};return e.forEach(function(e){t[e.id]=e}),t},exports.default=v,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(7),a=n(o),s=t(4),l=n(s),u=t(10),c=n(u),d=t(5),h=n(d),f=i.default.createStore({listenables:[],init:function(){this.list()},getInitialState:function(){return{inputStates:this.inputStates}},list:function(){var e=this,t=l.default.qualifyUrl(c.default.ClusterInputStatesController.list().url);return(0,h.default)("GET",t).then(function(t){var n={};return Object.keys(t).forEach(function(e){t[e]&&t[e].forEach(function(t){n[t.id]||(n[t.id]={}),n[t.id][e]=t})}),e.inputStates=n,e.trigger({inputStates:e.inputStates}),n})},_checkInputStateChangeResponse:function(e,t,n){var r=Object.keys(t).filter(function(t){return!!e.global||t===e.node}),i=r.filter(function(e){return null===t[e]});0===i.length?a.default.success("Request to "+n.toLowerCase()+" input '"+e.title+"' was sent successfully.","Input '"+e.title+"' will be "+("START"===n?"started":"stopped")+" shortly"):i.length===r.length?a.default.error("Request to "+n.toLowerCase()+" input '"+e.title+"' failed. Check your Graylog logs for more information.","Input '"+e.title+"' could not be "+("START"===n?"started":"stopped")):a.default.warning("Request to "+n.toLowerCase()+" input '"+e.title+"' failed in some nodes. Check your Graylog logs for more information.","Input '"+e.title+"' could not be "+("START"===n?"started":"stopped")+" in all nodes")},start:function(e){var t=this,n=l.default.qualifyUrl(c.default.ClusterInputStatesController.start(e.id).url);return(0,h.default)("PUT",n).then(function(n){return t._checkInputStateChangeResponse(e,n,"START"),t.list(),n},function(t){a.default.error("Error starting input '"+e.title+"': "+t,"Input '"+e.title+"' could not be started")})},stop:function(e){var t=this,n=l.default.qualifyUrl(c.default.ClusterInputStatesController.stop(e.id).url);return(0,h.default)("DELETE",n).then(function(n){return t._checkInputStateChangeResponse(e,n,"STOP"),t.list(),n},function(t){a.default.error("Error stopping input '"+e.title+"': "+t,"Input '"+e.title+"' could not be stopped")})}});exports.default=f,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(7),a=n(o),s=t(4),l=n(s),u=t(10),c=(n(u),t(5)),d=n(c),h=i.default.createStore({listenables:[],sourceUrl:function(e){return"/system/inputs/"+e+"/staticfields"},create:function(e,t,n){var r=this,i=l.default.qualifyUrl(this.sourceUrl(e.id)),o=(0,d.default)("POST",i,{key:t,value:n});return o.then(function(n){return r.trigger({}),a.default.success("Static field '"+t+"' added to '"+e.title+"' successfully"),n},function(t){a.default.error("Adding static field to input failed with: "+t,"Could not add static field to input '"+e.title+"'")}),o},destroy:function(e,t){var n=this,r=l.default.qualifyUrl(this.sourceUrl(e.id)+"/"+t),i=(0,d.default)("DELETE",r);return i.then(function(r){return n.trigger({}),a.default.success("Static field '"+t+"' removed from '"+e.title+"' successfully"),r},function(n){a.default.error("Removing static field from input failed with: "+n,"Could not remove static field '"+t+" from input '"+e.title+"'")}),i}});exports.default=h,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(5),l=n(s),u=t(7),c=n(u),d=t(6),h=n(d),f=h.default.getActions("InputTypes"),p=i.default.createStore({listenables:[f],sourceUrl:"/system/inputs/types",inputTypes:void 0,inputDescriptions:void 0,init:function(){this.list()},getInitialState:function(){return{inputTypes:this.inputTypes,inputDescriptions:this.inputDescriptions}},list:function(){var e=this,t=(0,l.default)("GET",a.default.qualifyUrl(this.sourceUrl)),n=(0,l.default)("GET",a.default.qualifyUrl(this.sourceUrl+"/all")),r=Promise.all([t,n]);r.then(function(t){e.inputTypes=t[0].types,e.inputDescriptions=t[1],e.trigger(e.getInitialState())},function(e){c.default.error("Fetching Input Types failed with status: "+e,"Could not retrieve Inputs")}),f.list.promise(r)},get:function(e){var t=(0,l.default)("GET",a.default.qualifyUrl(this.sourceUrl+"/"+e));t.catch(function(t){c.default.error("Fetching input "+e+" failed with status: "+t,"Could not retrieve input")}),f.get.promise(t)}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(7),l=n(s),u=t(5),c=n(u),d=i.default.createStore({sourceUrl:function(e){return"/cluster/"+e+"/journal"},get:function(e){var t=(0,c.default)("GET",a.default.qualifyUrl(this.sourceUrl(e)));return t.catch(function(t){l.default.error("Getting journal information on node "+e+" failed: "+t,"Could not get journal information")}),t}});exports.default=d,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(7),l=n(s),u=t(5),c=n(u),d=t(6),h=n(d),f=h.default.getActions("LdapGroups"),p=i.default.createStore({listenables:[f],sourceUrl:"/system/ldap",groups:void 0,mapping:void 0,getInitialState:function(){return{groups:this.groups,mapping:this.mapping}},loadGroups:function(){var e=this,t=a.default.qualifyUrl(this.sourceUrl+"/groups"),n=(0,c.default)("GET",t);n.then(function(t){e.groups=t,e.trigger({groups:e.groups})},function(e){400!==e.additional.status&&l.default.error("Loading LDAP group list failed with status: "+e,"Could not load LDAP group list")}),f.loadGroups.promise(n)},loadMapping:function(){var e=this,t=a.default.qualifyUrl(this.sourceUrl+"/settings/groups"),n=(0,c.default)("GET",t);n.then(function(t){e.mapping=t,e.trigger({mapping:e.mapping})},function(e){l.default.error("Loading LDAP group mapping failed with status: "+e,"Could not load LDAP group mapping")}),f.loadMapping.promise(n)},saveMapping:function(e){var t=this,n=a.default.qualifyUrl(this.sourceUrl+"/settings/groups"),r=(0,c.default)("PUT",n,e);r.then(function(){t.loadMapping(),l.default.success("LDAP group mapping successfully updated.")},function(e){l.default.error("Updating LDAP group mapping failed with status: "+e,"Could not update LDAP group mapping")}),f.saveMapping.promise(r)}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(7),l=n(s),u=t(5),c=n(u),d=t(6),h=n(d),f=h.default.getActions("Ldap"),p=i.default.createStore({listenables:[f],sourceUrl:"/system/ldap/",ldapSettings:void 0,getInitialState:function(){return{ldapSettings:this.ldapSettings}},loadSettings:function(){var e=this,t=a.default.qualifyUrl(this.sourceUrl+"/settings"),n=(0,c.default)("GET",t);n.then(function(t){e.ldapSettings=t,e.trigger({ldapSettings:t})}),f.loadSettings.promise(n)},update:function(e){var t=this,n=a.default.qualifyUrl(this.sourceUrl+"/settings"),r=(0,c.default)("PUT",n,e);r.then(function(){t.loadSettings(),l.default.success("LDAP settings saved successfully")},function(e){return l.default.error("Saving LDAP settings failed: "+e,"Could not save LDAP settings")}),f.update.promise(r)},_ldapTest:function(e){var t=a.default.qualifyUrl(this.sourceUrl+"/test");return(0,c.default)("POST",t,e)},testServerConnection:function(e){var t={test_connect_only:!0,ldap_uri:e.ldap_uri,system_username:e.system_username,system_password:e.system_password,use_start_tls:e.use_start_tls,trust_all_certificates:e.trust_all_certificates,active_directory:e.active_directory},n=this._ldapTest(t);f.testServerConnection.promise(n)},testLogin:function(e,t,n){var r={test_connect_only:!1,principal:t,password:n,ldap_uri:e.ldap_uri,system_username:e.system_username,system_password:e.system_password,use_start_tls:e.use_start_tls,trust_all_certificates:e.trust_all_certificates,active_directory:e.active_directory,search_base:e.search_base,search_pattern:e.search_pattern,group_search_base:e.group_search_base,group_id_attribute:e.group_id_attribute,group_search_pattern:e.group_search_pattern},i=this._ldapTest(r);f.testLogin.promise(i)}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(10),l=n(s),u=t(5),c=n(u),d=t(6),h=n(d),f=h.default.getActions("Loggers"),p=i.default.createStore({listenables:[f],state:{availableLoglevels:["fatal","error","warn","info","debug","trace"]},init:function(){this.loggers(),this.subsystems()},getInitialState:function(){return this.state},loggers:function(){var e=this,t=a.default.qualifyUrl(l.default.ClusterLoggersResource.loggers().url),n=(0,c.default)("GET",t).then(function(t){return e.state.loggers=t,e.trigger(e.state),t});f.loggers.promise(n)},subsystems:function(){var e=this,t=a.default.qualifyUrl(l.default.ClusterLoggersResource.subsystems().url),n=(0,c.default)("GET",t).then(function(t){return e.state.subsystems=t,e.trigger(e.state),t});f.loggers.promise(n)},setSubsystemLoggerLevel:function(e,t,n){var r=this,i=a.default.qualifyUrl(l.default.ClusterLoggersResource.setSubsystemLoggerLevel(e,t,n).url),o=(0,c.default)("PUT",i);o.then(function(){r.init()}),f.setSubsystemLoggerLevel.promise(o)}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(7),a=n(o),s=t(4),l=n(s),u=t(5),c=n(u),d=t(6),h=n(d),f=h.default.getActions("LookupTables"),p=i.default.createStore({listenables:[f],init:function(){this.pagination={page:1,per_page:10,total:0,count:0,query:null}},getInitialState:function(){return{pagination:this.pagination,errorStates:{tables:{},caches:{},dataAdapters:{}}}},reloadPage:function(){var e=this.searchPaginated(this.pagination.page,this.pagination.per_page,this.pagination.query);return f.reloadPage.promise(e),e},searchPaginated:function(e,t,n){var r=this,i=void 0;i=n?this._url("tables?page="+e+"&per_page="+t+"&query="+encodeURIComponent(n)+"&resolve=true"):this._url("tables?page="+e+"&per_page="+t+"&resolve=true");var o=(0,c.default)("GET",i);return o.then(function(e){r.pagination={count:e.count,total:e.total,page:e.page,per_page:e.per_page,query:e.query},r.trigger({tables:e.lookup_tables,caches:e.caches,dataAdapters:e.data_adapters,pagination:r.pagination})},this._errorHandler("Fetching lookup tables failed","Could not retrieve the lookup tables")),f.searchPaginated.promise(o),o},get:function(e){var t=this,n=this._url("tables/"+e+"?resolve=true"),r=(0,c.default)("GET",n);return r.then(function(e){var n=e.lookup_tables[0];t.trigger({table:n,cache:e.caches[n.cache_id],dataAdapter:e.data_adapters[n.data_adapter_id]})},this._errorHandler("Fetching lookup table "+e+" failed","Could not retrieve lookup table")),f.get.promise(r),r},create:function(e){var t=this._url("tables"),n=(0,c.default)("POST",t,e);return n.catch(this._errorHandler("Creating lookup table failed",'Could not create lookup table "'+e.name+'"')),f.create.promise(n),n},update:function(e){var t=this._url("tables/"+e.id),n=(0,c.default)("PUT",t,e);return n.catch(this._errorHandler("Updating lookup table failed",'Could not update lookup table "'+e.name+'"')),f.update.promise(n),n},delete:function(e){var t=this._url("tables/"+e),n=(0,c.default)("DELETE",t);return n.catch(this._errorHandler("Deleting lookup table failed",'Could not delete lookup table "'+e+'"')),f.delete.promise(n),n},getErrors:function(e,t,n){var r=this,i={};e&&(i.tables=e),t&&(i.caches=t),n&&(i.data_adapters=n);var o=(0,c.default)("POST",this._url("errorstates"),i);return o.then(function(e){r.trigger({errorStates:{tables:e.tables||{},caches:e.caches||{},dataAdapters:e.data_adapters||{}}})},this._errorHandler("Fetching lookup table error state failed.","Could not error states")),f.getErrors.promise(o),o},lookup:function(e,t){var n=this,r=(0,c.default)("GET",this._url("tables/"+e+"/query?key="+t));return r.then(function(e){n.trigger({lookupResult:e})},this._errorHandler("Lookup failed",'Could not lookup value for key "'+t+'" in lookup table "'+e+'"')),f.lookup.promise(r),r},purgeKey:function(e,t){var n=(0,c.default)("POST",this._url("tables/"+e.id+"/purge?key="+t));return n.then(function(){a.default.success('Purging cache key "'+t+'" for lookup table "'+e.name+'"',"Success!")},this._errorHandler('Could not purge cache for key "'+t+'" in lookup table "'+e.name+'"',"Failed!")),f.purgeKey.promise(n),n},purgeAll:function(e){var t=(0,c.default)("POST",this._url("tables/"+e.id+"/purge"));return t.then(function(){a.default.success('Purging cache for lookup table "'+e.name+'"',"Success!")},this._errorHandler('Could not purge cache for lookup table "'+e.name+'"',"Failed!")),f.purgeAll.promise(t),t},validate:function(e){var t=this,n=this._url("tables/validate"),r=(0,c.default)("POST",n,e);return r.then(function(e){t.trigger({validationErrors:e.errors})},this._errorHandler("Lookup table validation failed",'Could not validate lookup table "'+e.name+'"')),f.validate.promise(r),r},_errorHandler:function(e,t,n){return function(r){try{if(r.additional.body[0].message_template)return}catch(e){}var i=void 0;try{i=r.additional.body.message}catch(e){i=r.message}a.default.error(e+": "+i,t),n&&n(r)}},_url:function(e){return l.default.qualifyUrl("/system/lookup/"+e)}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(7),a=n(o),s=t(4),l=n(s),u=t(5),c=n(u),d=t(6),h=n(d),f=h.default.getActions("LookupTableCaches"),p=i.default.createStore({listenables:[f],init:function(){this.pagination={page:1,per_page:10,total:0,count:0,query:null}},getInitialState:function(){return{caches:void 0,pagination:this.pagination,validationErrors:{}}},reloadPage:function(){var e=this.searchPaginated(this.pagination.page,this.pagination.per_page,this.pagination.query);return f.reloadPage.promise(e),e},searchPaginated:function(e,t,n){var r=this,i=void 0;i=n?this._url("caches?page="+e+"&per_page="+t+"&query="+encodeURIComponent(n)):this._url("caches?page="+e+"&per_page="+t);var o=(0,c.default)("GET",i);return o.then(function(e){r.pagination={count:e.count,total:e.total,page:e.page,per_page:e.per_page,query:e.query},r.trigger({pagination:r.pagination,caches:e.caches})},this._errorHandler("Fetching lookup table caches failed","Could not retrieve the lookup caches")),f.searchPaginated.promise(o),o},get:function(e){var t=this,n=this._url("caches/"+e),r=(0,c.default)("GET",n);return r.then(function(e){t.trigger({cache:e})},this._errorHandler("Fetching lookup table cache "+e+" failed","Could not retrieve lookup table cache")),f.get.promise(r),r},create:function(e){var t=this,n=this._url("caches"),r=(0,c.default)("POST",n,e);return r.then(function(e){t.trigger({cache:e})},this._errorHandler("Creating lookup table cache failed",'Could not create lookup table cache "'+e.name+'"')),f.create.promise(r),r},update:function(e){var t=this,n=this._url("caches/"+e.id),r=(0,c.default)("PUT",n,e);return r.then(function(e){t.trigger({cache:e})},this._errorHandler("Updating lookup table cache failed",'Could not update lookup table cache "'+e.name+'"')),f.update.promise(r),r},getTypes:function(){var e=this,t=this._url("types/caches"),n=(0,c.default)("GET",t);return n.then(function(t){e.trigger({types:t})},this._errorHandler("Fetching available types failed","Could not fetch the available lookup table cache types")),f.getTypes.promise(n),n},delete:function(e){var t=this._url("caches/"+e),n=(0,c.default)("DELETE",t);return n.catch(this._errorHandler("Deleting lookup table cache failed",'Could not delete lookup table cache "'+e+'"')),f.delete.promise(n),n},validate:function(e){var t=this,n=this._url("caches/validate"),r=(0,c.default)("POST",n,e);return r.then(function(e){t.trigger({validationErrors:e.errors})},this._errorHandler("Lookup table cache validation failed",'Could not validate lookup table cache "'+e.name+'"')),f.validate.promise(r),r},_errorHandler:function(e,t,n){return function(r){var i=void 0;try{i=r.additional.body.message}catch(e){i=r.message}a.default.error(e+": "+i,t),n&&n(r)}},_url:function(e){return l.default.qualifyUrl("/system/lookup/"+e)}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(7),a=n(o),s=t(4),l=n(s),u=t(5),c=n(u),d=t(6),h=n(d),f=h.default.getActions("LookupTableDataAdapters"),p=i.default.createStore({listenables:[f],init:function(){this.pagination={page:1,per_page:10,total:0,count:0,query:null}},getInitialState:function(){return{dataAdapters:void 0,pagination:this.pagination,validationErrors:{}}},reloadPage:function(){var e=this.searchPaginated(this.pagination.page,this.pagination.per_page,this.pagination.query);return f.reloadPage.promise(e),e},searchPaginated:function(e,t,n){var r=this,i=void 0;i=n?this._url("adapters?page="+e+"&per_page="+t+"&query="+encodeURIComponent(n)):this._url("adapters?page="+e+"&per_page="+t);var o=(0,c.default)("GET",i);return o.then(function(e){r.pagination={count:e.count,total:e.total,page:e.page,per_page:e.per_page,query:e.query},r.trigger({pagination:r.pagination,dataAdapters:e.data_adapters})},this._errorHandler("Fetching lookup table data adapters failed","Could not retrieve the lookup dataAdapters")),f.searchPaginated.promise(o),o},get:function(e){var t=this,n=this._url("adapters/"+e),r=(0,c.default)("GET",n);return r.then(function(e){t.trigger({dataAdapter:e})},this._errorHandler("Fetching lookup table data adapter "+e+" failed","Could not retrieve lookup table data adapter")),f.get.promise(r),r},create:function(e){var t=this,n=this._url("adapters"),r=(0,c.default)("POST",n,e);return r.then(function(e){t.trigger({dataAdapter:e})},this._errorHandler("Creating lookup table data adapter failed",'Could not create lookup table data adapter "'+e.name+'"')),f.create.promise(r),r},update:function(e){var t=this,n=this._url("adapters/"+e.id),r=(0,c.default)("PUT",n,e);return r.then(function(e){t.trigger({dataAdapter:e})},this._errorHandler("Updating lookup table data adapter failed",'Could not update lookup table data adapter "'+e.name+'"')),f.update.promise(r),r},getTypes:function(){var e=this,t=this._url("types/adapters"),n=(0,c.default)("GET",t);return n.then(function(t){e.trigger({types:t})},this._errorHandler("Fetching available types failed","Could not fetch the available lookup table data adapter types")),f.getTypes.promise(n),n},delete:function(e){var t=this._url("adapters/"+e),n=(0,c.default)("DELETE",t);return n.catch(this._errorHandler("Deleting lookup table data adapter failed",'Could not delete lookup table data adapter "'+e+'"')),f.delete.promise(n),n},lookup:function(e,t){var n=this,r=(0,c.default)("GET",this._url("adapters/"+e+"/query?key="+t));return r.then(function(e){n.trigger({lookupResult:e})},this._errorHandler("Lookup failed",'Could not lookup value for key "'+t+'" in lookup table data adapter "'+e+'"')),f.lookup.promise(r),r},validate:function(e){var t=this,n=this._url("adapters/validate"),r=(0,c.default)("POST",n,e);return r.then(function(e){t.trigger({validationErrors:e.errors})},this._errorHandler("Lookup table data adapter validation failed",'Could not validate lookup table data adapter "'+e.name+'"')),f.validate.promise(r),r},_errorHandler:function(e,t,n){return function(r){var i=void 0;try{i=r.additional.body.message}catch(e){i=r.message}a.default.error(e+": "+i,t),n&&n(r)}},_url:function(e){return l.default.qualifyUrl("/system/lookup/"+e)}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(10),l=n(s),u=t(5),c=n(u),d=t(6),h=n(d),f=h.default.getActions("MessageCounts"),p=i.default.createStore({listenables:[f],events:void 0,init:function(){this.total()},total:function(){var e=this,t=a.default.qualifyUrl(l.default.CountsApiController.total().url),n=(0,c.default)("GET",t).then(function(t){return e.events=t.events,e.trigger({events:t.events}),t.events});return f.total.promise(n),n}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(140),a=n(o),s=t(4),l=n(s),u=t(10),c=n(u),d=t(5),h=n(d),f=i.default.createStore({listenables:[],fields:void 0,init:function(){this.list()},getInitialState:function(){return{fields:this.fields}},list:function(){var e=this,t=l.default.qualifyUrl(c.default.MessageFieldsApiController.list().url);return(0,h.default)("GET",t).then(function(t){var n=t.fields.map(function(e){return{hash:(0,a.default)(e),name:e,standard_selected:"message"===e||"source"===e}});return e.fields=n,e.trigger(e.getInitialState()),n})}});exports.default=f,e.exports=exports.default},function(e,exports){!function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],r=0,i=0;r>>6-2*i);return n}};e.exports=n}()},function(e,exports){function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function n(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}/*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */ e.exports=function(e){return null!=e&&(t(e)||n(e)||!!e._isBuffer)}},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(5),a=n(o),s=t(93),l=n(s),u=t(10),c=n(u),d=t(4),h=n(d),f=t(7),p=n(f),g=t(28),m=n(g),v=t(6),y=n(v),b=y.default.getActions("Messages"),_=i.default.createStore({listenables:[b],sourceUrl:"",getInitialState:function(){return{}},loadMessage:function(e,t){var n=c.default.MessagesController.single(e.trim(),t.trim()).url,r=(0,a.default)("GET",h.default.qualifyUrl(n)).then(function(e){return l.default.formatResultMessage(e)},function(e){p.default.error("Loading message information failed with status: "+e,"Could not load message information")});b.loadMessage.promise(r)},fieldTerms:function(e,t){var n=c.default.MessagesController.analyze(e,encodeURIComponent(m.default.stringify(t))).url,r=(0,a.default)("GET",h.default.qualifyUrl(n)).then(function(e){return e.tokens},function(e){p.default.error("Loading field terms failed with status: "+e,"Could not load field terms.")});b.fieldTerms.promise(r)},loadRawMessage:function(e,t,n,r){var i=c.default.MessagesController.parse().url,o={message:e,remote_address:t,codec:n,configuration:r},s=(0,a.default)("POST",h.default.qualifyUrl(i),o).then(function(e){return l.default.formatResultMessage(e)},function(e){if(e.additional&&400===e.additional.status)return void p.default.error("Please ensure the selected codec and its configuration are right. Check your server logs for more information.","Could not load raw message");p.default.error("Loading raw message failed with status: "+e,"Could not load raw message")});b.loadRawMessage.promise(s)}});exports.default=_,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n={FILTERED_FIELDS:["_id","_ttl","_source","_all","_index","_type","_score","gl2_source_node","gl2_source_input","gl2_source_collector","gl2_source_collector_input","gl2_remote_ip","gl2_remote_port","gl2_remote_hostname","streams","gl2_source_radio","gl2_source_radio_input"],filterFields:function(e){var t=this,n={};return Object.keys(e).forEach(function(r){t.FILTERED_FIELDS.indexOf(r)<0&&(n[r]=e[r])}),n}};exports.default=n,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(10),l=n(s),u=t(5),c=n(u),d=t(94),h=n(d),f=t(9),p=n(f),g=t(6),m=n(g),v=p.default.getStore("Session"),y=p.default.getStore("Nodes"),b=m.default.getActions("Session"),_=m.default.getActions("Metrics"),w=i.default.createStore({listenables:[_,b],namespace:"org",registrations:{},globalRegistrations:{},promises:{},init:function(){this.listenTo(y,this.updateNodes)},getInitialState:function(){return{metricsNames:this.metricsNames,metrics:this.metrics}},updateNodes:function(e){this.nodes=e.nodes},_allResults:function(e){var t=[],n=Promise.resolve(null);return e.forEach(function(e){n=n.then(function(){return e}).then(function(e){return t.push(e)},function(e){return t.push(e)})}),n.then(function(){return t})},_metricsToFetch:function(e,t){var n={};return Object.keys(e).filter(function(t){return Object.keys(e[t].length>0)}).forEach(function(t){Object.keys(e[t]).filter(function(n){return e[t][n]>0}).forEach(function(e){n[e]=1})}),Object.keys(t).filter(function(e){return t[e]>0}).forEach(function(e){n[e]=1}),n},_buildMetricsFromResponse:function(e){var t={};return Object.keys(e).forEach(function(n){var r={};e[n]&&(e[n].metrics.forEach(function(e){r[e.full_name]=e}),t[n]=r)}),t},list:function(){var e=this;if(v.isLoggedIn()){var t=this._metricsToFetch(this.registrations,this.globalRegistrations),n=a.default.qualifyUrl(l.default.ClusterMetricsApiController.multipleAllNodes().url);if(!this.promises.list){var r=(0,u.fetchPeriodically)("POST",n,{metrics:Object.keys(t)}).finally(function(){return delete e.promises.list});r.then(function(t){return e.metrics=e._buildMetricsFromResponse(t),e.trigger({metrics:e.metrics,metricsUpdatedAt:h.default.nowInSeconds()}),e.metrics}),this.promises.list=r}return _.list.promise(this.promises.list),this.promises.list}},names:function(){var e=this;if(!this.nodes)return void console.warn("Node list not yet available, not fetching metrics.");var t=this._allResults(Object.keys(this.nodes).map(function(t){var n=a.default.qualifyUrl(l.default.ClusterMetricsApiController.byNamespace(t,e.namespace).url);return(0,c.default)("GET",n).then(function(e){return{nodeId:t,names:e.metrics}})})).then(function(t){var n={};return t.forEach(function(e){e.nodeId&&(n[e.nodeId]=e.names)}),e.trigger({metricsNames:n}),e.metricsNames=n,n});_.names.promise(t)},add:function(e,t){this.registrations[e]||(this.registrations[e]={}),this.registrations[e][t]=this.registrations[e][t]?this.registrations[e][t]+1:1},addGlobal:function(e){this.globalRegistrations[e]?this.globalRegistrations[e]+=1:this.globalRegistrations[e]=1},remove:function(e,t){this.registrations[e]&&(this.registrations[e][t]=this.registrations[e][t]>0?this.registrations[e][t]-1:0,0===this.registrations[e][t]&&delete this.registrations[e][t])},removeGlobal:function(e){this.globalRegistrations[e]&&(this.globalRegistrations[e]=this.globalRegistrations[e]>0?this.globalRegistrations[e]-1:0,0===this.globalRegistrations[e]&&delete this.globalRegistrations[e])}});exports.default=w,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(5),l=t(10),u=n(l),c=t(25),d=n(c),h=d.default.get("Nodes"),f=h.NodesActions,p=d.default.get("Session"),g=p.SessionStore,m=i.default.createStore({listenables:[f],nodes:void 0,clusterId:void 0,nodeCount:0,INTERVAL:5e3,promises:{},init:function(){void 0===this.nodes&&(this._triggerList(),setInterval(this._triggerList,this.INTERVAL))},_triggerList:function(){g.isLoggedIn()&&f.list()},getInitialState:function(){return this.getNodesInfo()},getNodesInfo:function(){return{nodes:this.nodes,clusterId:this.clusterId,nodeCount:this.nodeCount}},list:function(){var e=this,t=this.promises.list||(0,s.fetchPeriodically)("GET",a.default.qualifyUrl(u.default.ClusterApiResource.list().url)).then(function(t){return e.nodes={},t.nodes.forEach(function(t){e.nodes[t.node_id]=t}),e.clusterId=e._clusterId(),e.nodeCount=e._nodeCount(),e._propagateState(),t}).finally(function(){return delete e.promises.list});this.promises.list=t,f.list.promise(t)},getNode:function(e){return this.nodes[e]},_clusterId:function(){var e=this,t=Object.keys(this.nodes).map(function(t){return e.nodes[t]}).find(function(e){return e.cluster_id});return t?t.cluster_id.toUpperCase():void 0},_nodeCount:function(){return Object.keys(this.nodes).length},_propagateState:function(){this.trigger(this.getNodesInfo())}});exports.default=m,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(10),l=n(s),u=t(5),c=n(u),d=t(6),h=n(d),f=h.default.getActions("Notifications"),p=i.default.createStore({listenables:[f],notifications:void 0,promises:{},init:function(){this.list()},getInitialState:function(){return this.notifications?this.notifications:{}},list:function(){var e=this,t=a.default.qualifyUrl(l.default.NotificationsApiController.list().url),n=this.promises.list||(0,u.fetchPeriodically)("GET",t).finally(function(){return delete e.promises.list});this.promises.list=n,f.list.promise(n)},listCompleted:function(e){this.notifications=e,this.trigger(e)},delete:function(e){var t=a.default.qualifyUrl(l.default.NotificationsApiController.delete(e).url),n=(0,c.default)("DELETE",t);f.delete.promise(n)},deleteCompleted:function(){this.list()}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";var n=t(7),r=t(4),i=t(10),o=t(5).default,a={OUTPUTS_URL:r.qualifyUrl(i.OutputsApiController.index().url),load:function(e){o("GET",this.OUTPUTS_URL).then(e,this._failCallback)},loadForStreamId:function(e,t){var n=r.qualifyUrl(i.StreamOutputsApiController.index(e).url);o("GET",n).then(t,this._failCallback)},loadAvailableTypes:function(e){var t=r.qualifyUrl(i.OutputsApiController.availableTypes().url);o("GET",t).then(e,this._failCallback)},loadAvailable:function(e,t){var n=r.qualifyUrl(i.OutputsApiController.availableTypes().url);o("GET",n).then(function(t){return t.types[e]},this._failCallback).then(t)},remove:function(e,t){var a=r.qualifyUrl(i.OutputsApiController.delete(e).url);o("DELETE",a).then(t,function(e){n.error("Terminating output failed with status: "+e,"Could not terminate output")})},save:function(e,t){var a=function(t){n.error('Saving Output "'+e.title+'" failed with status: '+t,"Could not save Output")},s=r.qualifyUrl(i.OutputsApiController.create().url);o("POST",s,e).then(t,a)},update:function(e,t,a){var s=function(t){n.error('Updating Output "'+e.title+'" failed with status: '+t,"Could not update Output")},l=r.qualifyUrl(i.OutputsApiController.update(e.id).url);o("PUT",l,t).then(a,s)},_failCallback:function(e){n.error("Loading outputs failed with status: "+e,"Could not load outputs")}};e.exports=a},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(7),l=n(s),u=t(5),c=n(u),d=i.default.createStore({sourceUrl:function(e){return"/cluster/"+e+"/plugins"},list:function(e){return(0,c.default)("GET",a.default.qualifyUrl(this.sourceUrl(e))).then(function(e){return e.plugins},function(t){return l.default.error('Getting plugins on node "'+e+'" failed: '+t,"Could not get plugins")})}});exports.default=d,e.exports=exports.default},function(e,exports,t){"use strict";var n=t(7),r=t(4),i=t(5).default,o={URL:r.qualifyUrl("/users/"),convertPreferenceMapToArray:function(e){e=e||{};var t=Object.keys(e).map(function(t){return{name:t,value:e[t]}});return t=t.sort(function(e,t){return e.name.localeCompare(t.name)})},convertPreferenceArrayToMap:function(e){var t={};return e.forEach(function(e){t[e.name]=!0===e.value||"true"===e.value}),t},saveUserPreferences:function(e,t){var r=this;if(!this._userName)throw new Error("Need to load user preferences before you can save them");var o=this.convertPreferenceArrayToMap(e),a=this.URL+this._userName+"/preferences";i("PUT",a,{preferences:o}).then(function(){n.success("User preferences successfully saved"),t(e)},function(e){n.error('Saving of preferences for "'+r._userName+'" failed with status: '+e,"Could not save user preferences")})},loadUserPreferences:function(e,t){var r=this;this._userName=e;var o=this.URL+e,a=function(e){var n=r.convertPreferenceMapToArray(e.preferences);t(n)},s=function(t){n.error('Loading of user preferences for "'+e+'" failed with status: '+t+". Try reloading the page","Could not retrieve user preferences from server")};i("GET",o).then(a,s)}};e.exports=o},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(6),a=n(o),s=a.default.getActions("Refresh"),l=i.default.createStore({listenables:[s],interval:5e3,enabled:!1,getInitialState:function(){return{interval:this.interval,enabled:this.enabled}},changeInterval:function(e){this.interval=e,this._update()},disable:function(){this.enabled=!1,this._update()},enable:function(){this.enabled=!0,this._update()},_update:function(){this.trigger(this.getInitialState())}});exports.default=l,e.exports=exports.default},function(e,exports,t){"use strict";var n=t(7),r=t(4),i=t(10),o=t(5).default,a={loadRoles:function(){return o("GET",r.qualifyUrl(i.RolesApiController.listRoles().url)).then(function(e){return e.roles},function(e){404!==e.additional.status&&n.error("Loading role list failed with status: "+e,"Could not load role list")})},createRole:function(e){var t=r.qualifyUrl(i.RolesApiController.createRole().url),a=o("POST",t,e);return a.then(function(e){n.success('Role "'+e.name+'" was created successfully')},function(t){n.error('Creating role "'+e.name+'" failed with status: '+t,"Could not create role")}),a},updateRole:function(e,t){var a=o("PUT",r.qualifyUrl(i.RolesApiController.updateRole(encodeURIComponent(e)).url),t);return a.then(function(e){n.success('Role "'+e.name+'" was updated successfully')},function(e){404!==e.additional.status&&n.error("Updating role failed with status: "+e,"Could not update role")}),a},deleteRole:function(e){var t=r.qualifyUrl(i.RolesApiController.deleteRole(encodeURIComponent(e)).url),a=o("DELETE",t);return a.then(function(){n.success('Role "'+e+'" was deleted successfully')},function(e){404!==e.additional.status&&n.error("Deleting role failed with status: "+e,"Could not delete role")}),a},getMembers:function(e){var t=r.qualifyUrl(i.RolesApiController.loadMembers(encodeURIComponent(e)).url),a=o("GET",t);return a.catch(function(e){404!==e.additional.status&&n.error("Could not load role's members with status: "+e,"Could not load role members")}),a}};e.exports=a},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(68),a=n(o),s=t(5),l=n(s),u=t(10),c=n(u),d=t(16),h=n(d),f=t(6),p=n(f),g=t(9),m=n(g),v=t(4),y=n(v),b=t(7),_=n(b),w=p.default.getActions("SavedSearches"),C=m.default.getStore("Search"),A=i.default.createStore({listenables:[w],sourceUrl:"/search/saved",savedSearches:void 0,init:function(){this.trigger({savedSearches:this.savedSearches})},list:function(){var e=this,t=(0,l.default)("GET",y.default.qualifyUrl(y.default.concatURLPath(this.sourceUrl))).then(function(t){return e.savedSearches=t.searches,e.trigger({savedSearches:e.savedSearches}),t},function(e){_.default.error("Fetching saved searches failed with status: "+e,"Could not get saved searches")});w.list.promise(t)},getSavedSearch:function(e){for(var t=void 0,n=0;n0?e:"*"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"page",{get:function(){return this._page},set:function(e){void 0===this._page?this._page=e:this._reloadSearchWithNewParam("page",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rangeType",{get:function(){return this._rangeType},set:function(e){this._rangeType=e,this.rangeParams=this.originalSearch.get("rangeType")===e?this.originalSearch.get("rangeParams"):n.Map(),void 0!==this.onParamsChanged&&this.onParamsChanged(this.getParams())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"originalRangeType",{get:function(){return this.originalSearch.get("rangeType")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rangeParams",{get:function(){return this._rangeParams},set:function(e){this._rangeParams=e,void 0!==this.onParamsChanged&&this.onParamsChanged(this.getParams())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"originalRangeParams",{get:function(){return this.originalSearch.get("rangeParams")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"resolution",{get:function(){return this._resolution},set:function(e){void 0===this._resolution?this._resolution=e:this._reloadSearchWithNewParam("interval",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fields",{get:function(){return this._fields},set:function(e){this._fields=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"highlightMessage",{get:function(){return this._highlightMessage},set:function(e){this._highlightMessage=e},enumerable:!0,configurable:!0}),e.prototype.sort=function(e,t){this._reloadSearchWithNewParams(n.Map({sortField:e,sortOrder:t}))},e._initializeOriginalSearch=function(e){var t=n.Map();t=t.set("query",e.get("q","")),t=t.set("resolution",e.get("interval")),t=t.set("page",Math.max(e.get("page",1),1)),t=t.set("rangeType",e.get("rangetype","relative")),t=t.set("sortField",e.get("sortField","timestamp")),t=t.set("sortOrder",e.get("sortOrder","desc")),t=t.set("highlightMessage",e.get("highlightMessage","")),void 0!==e.get("saved")&&(t=t.set("saved",e.get("saved")));var r;switch(t.get("rangeType")){case"relative":r=n.Map({relative:Number(e.get("relative",300))});break;case"absolute":r=n.Map({from:e.get("from",null),to:e.get("to",null)});break;case"keyword":r=n.Map({keyword:e.get("keyword","")});break;default:throw"Unsupported range type "+t.get("rangeType")}return t.set("rangeParams",r)},e.prototype.appendToQueryString=function(t,n,r,i){var o=r;"timestamp"===n&&(o=new s(Number(r)).toString(s.Formats.TIMESTAMP));var a=n+":"+e.escape(o),l=i||e.AND_OPERATOR;return this.addQueryTerm(t,a,l)},e.prototype.appendFieldQueryObjectToQueryString=function(t,n,r){var i=this,o=n.map(function(t){return"("+t.reduce(function(t,n){return i.appendToQueryString(t,n.field,n.value,e.AND_OPERATOR)},"")+")"}).join(" "+e.OR_OPERATOR+" ");return t&&""!==t&&"*"!==t?t+" "+(r||e.AND_OPERATOR)+" ("+o+")":o},e.prototype.addSearchTerm=function(e,t,n){var r=this.appendToQueryString(this.query,e,t,n);this.query!==r&&(this.query=r,void 0!==this.onAddQueryTerm&&this.onAddQueryTerm())},e.prototype.addSearchTermWithMapping=function(e,t,n,r){var i=this;if(!e[n])return this.addSearchTerm(t,n,r);e[n].forEach(function(e){i.addSearchTerm(e.field,e.value,r)})},e.prototype.changeTimeRange=function(e,t){this.rangeType=e,this.rangeParams=n.fromJS(t)},e.prototype._submitSearch=function(e){void 0!==this.onSubmitSearch&&this.onSubmitSearch()},e.prototype.savedSearchDeleted=function(e){e===this.savedSearch&&this._submitSearch(null)},e.isPhrase=function(e){return-1!==String(e).indexOf(" ")},e.escape=function(e){var t=String(e);return t=t.replace(/\r\n/g," "),t=t.replace(/\n/g," "),t=t.replace(/
    /g," "),this.isPhrase(t)?(t=String(t).replace(/\"/g,'\\"'),t='"'+t+'"'):t=String(t).replace(/(&&|\|\||[\:\\\/\+\-\!\(\)\{\}\[\]\^\"\~\*\?])/g,"\\$&"),t},e.prototype.queryContainsTerm=function(e,t){return-1!=e.indexOf(t)},e.prototype.addQueryTerm=function(e,t,n){if(this.queryContainsTerm(e,t))return e;var r="";return void 0!==n&&""!==e&&"*"!==e&&(r=e+" "+n+" "),r+=t},e.prototype.getParams=function(){return{query:this.query,rangeType:this.rangeType,rangeParams:this.rangeParams}},e.prototype.getOriginalSearchParams=function(){var e=n.Map();return e=e.set("range_type",this.originalSearch.get("rangeType")),e=e.merge(this.originalSearch.get("rangeParams")),e=e.set("query",this.originalSearch.get("query")),e=e.set("interval",this.originalSearch.get("resolution")),this.searchInStream&&(e=e.set("streamId",this.searchInStream.id)),e},e.prototype.getOriginalSearchParamsWithFields=function(){var e=this.getOriginalSearchParams();return e=e.set("fields",this.fields.join(","))},e.prototype.getOriginalSearchURLParams=function(){var e=n.Map();return e=e.set("rangetype",this.originalSearch.get("rangeType")),e=e.merge(this.originalSearch.get("rangeParams")),e=e.set("q",this.originalSearch.get("query")),e=e.set("interval",this.originalSearch.get("resolution")),e=e.set("page",this.originalSearch.get("page")),e=e.set("fields",this.fields?this.fields.join(","):""),e=e.set("sortField",this.originalSearch.get("sortField")),e=e.set("sortOrder",this.originalSearch.get("sortOrder")),this.originalSearch.has("saved")&&(e=e.set("saved",this.originalSearch.get("saved"))),e},e.prototype.searchBaseLocation=function(e){return this.searchInStream?r.stream_search(this.searchInStream.id):r.SEARCH},e.prototype._reloadSearchWithNewParam=function(e,t){var n=this.getOriginalSearchURLParams();n=n.set("width",this.width),n=n.set(e,t),this.executeSearch(this.searchBaseLocation("index")+"?"+i.stringify(n.toJS()))},e.prototype._reloadSearchWithNewParams=function(e){var t=this.getOriginalSearchURLParams();t=t.set("width",this.width),t=t.merge(e),this.executeSearch(this.searchBaseLocation("index")+"?"+i.stringify(t.toJS()))},e.prototype.executeSearch=function(e){a.pushState(null,e)},e.prototype.searchSurroundingMessages=function(t,n,r,o){var a=this.getOriginalSearchParamsWithFields().toJS(),s=Object.keys(o).filter(function(e){return o[e]}).map(function(t){return t+':"'+e.escape(o[t])+'"'}).join(" AND "),l={rangetype:"absolute",from:n,to:r,q:s,highlightMessage:t,fields:a.fields};return this.searchBaseLocation("index")+"?"+i.stringify(l)},e.NOT_OPERATOR="NOT",e.OR_OPERATOR="OR",e.AND_OPERATOR="AND",e}(),u=new l;e.exports=u},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(10),l=n(s),u=t(5),c=t(6),d=n(c),h=d.default.getActions("ServerAvailability"),f=i.default.createStore({listenables:[h],server:{up:!0},init:function(){this.ping()},getInitialState:function(){return{server:this.server}},ping:function(){return new u.Builder("GET",a.default.qualifyUrl(l.default.ping().url)).setHeader("Accept","application/json").setHeader("X-Graylog-No-Session-Extension","true").build().then(function(){return h.reportSuccess()},function(e){return h.reportError(e)})},reportError:function(e){this.server.up&&(this.server={up:!1,error:e},this.trigger({server:this.server}))},reportSuccess:function(){this.server.up||(this.server={up:!0},this.trigger({server:this.server}))}});exports.default=f,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(135),a=n(o),s=t(4),l=n(s),u=t(10),c=n(u),d=t(5),h=t(6),f=n(h),p=f.default.getActions("Session"),g=i.default.createStore({listenables:[p],sourceUrl:"/system/sessions",sessionId:void 0,username:void 0,validatingSession:!1,init:function(){this.validate()},getInitialState:function(){return this.getSessionInfo()},login:function(e,t,n){var r=new d.Builder("POST",l.default.qualifyUrl(this.sourceUrl)).json({username:e,password:t,host:n}),i=r.build().then(function(t){return{sessionId:t.session_id,username:e}});p.login.promise(i)},logout:function(e){var t=this,n=new d.Builder("DELETE",l.default.qualifyUrl(this.sourceUrl+"/"+e)).authenticated().build().then(function(e){(e.ok||401===e.status)&&t._removeSession()},this._removeSession);p.logout.promise(n)},validate:function(){var e=this,t=a.default.get("sessionId"),n=a.default.get("username");this.validatingSession=!0,this._propagateState(),this._validateSession(t).then(function(r){return r.is_valid?p.login.completed({sessionId:t||r.session_id,username:n||r.username}):(t&&n&&e._removeSession(),r)}).finally(function(){e.validatingSession=!1,e._propagateState()})},_validateSession:function(e){return new d.Builder("GET",l.default.qualifyUrl(c.default.SessionsApiController.validate().url)).session(e).json().build()},_removeSession:function(){a.default.delete("sessionId"),a.default.delete("username"),this.sessionId=void 0,this.username=void 0,this._propagateState()},_propagateState:function(){this.trigger(this.getSessionInfo())},loginCompleted:function(e){a.default.set("sessionId",e.sessionId),a.default.set("username",e.username),this.sessionId=e.sessionId,this.username=e.username,this._propagateState()},isLoggedIn:function(){return void 0!==this.sessionId&&null!==this.sessionId},getSessionId:function(){return this.sessionId},getSessionInfo:function(){return{sessionId:this.sessionId,username:this.username,validatingSession:this.validatingSession}}});exports.default=g,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(5),l=n(s),u=t(6),c=n(u),d=c.default.getActions("SingleNode"),h=i.default.createStore({listenables:[d],sourceUrl:"/system/cluster/node",node:void 0,init:function(){this._propagateState()},getInitialState:function(){return this._getNodeInfo()},_getNodeInfo:function(){return{node:this.node}},_propagateState:function(){this.trigger(this._getNodeInfo())},get:function(e){var t=this,n=(0,l.default)("GET",a.default.qualifyUrl(e?a.default.concatURLPath(this.sourceUrl,e):this.sourceUrl)).then(function(e){t.node=e,t._propagateState()});d.get.promise(n)}});exports.default=h,e.exports=exports.default},function(e,exports,t){"use strict";var $=t(12),n=t(7),r=t(4),i=t(28),o=t(5).default,a=function(e){var t=0,n=[];return $.each(e,function(e,r){t+=Number(r),n.push({name:i.escapeHTML(e),message_count:r})}),n.forEach(function(e){e.percentage=e.message_count/t*100}),n},s={SOURCES_URL:"/sources",loadSources:function(e,t){var i=r.qualifyUrl(this.SOURCES_URL);void 0!==e&&(i+="?range="+e),o("GET",i).then(function(e){var n=a(e.sources);t(n)}).catch(function(e){n.error("Loading of sources data failed with status: "+e+". Try reloading the page.","Could not load sources data")})}};e.exports=s},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(10),a=n(o),s=t(7),l=n(s),u=t(4),c=n(u),d=t(5),h=n(d),f=i.default.createStore({listenables:[],set:function(e,t,n){var r=this,i=c.default.qualifyUrl(a.default.UsersApiController.update(e).url),o={};return t&&n&&(o.type=t,o.id=n),(0,h.default)("PUT",i,{startpage:o}).then(function(e){return r.trigger(),l.default.success("Your start page was changed successfully"),e},function(e){return l.default.error("Changing your start page failed with error: "+e,"Could not change your start page")})}});exports.default=f,e.exports=exports.default},function(e,exports,t){"use strict";var n=t(10),r=t(7),i=t(4),o=t(5).default,a=t(35),s=function(){function e(){this.callbacks=[]}return e.prototype.types=function(e){return o("GET",i.qualifyUrl("/streams/null/rules/types"))},e.prototype.list=function(e,t){var a=function(e){r.error("Fetching Stream Rules failed with status: "+e,"Could not retrieve Stream Rules")};o("GET",i.qualifyUrl(n.StreamRulesApiController.list(e).url)).then(t,a)},e.prototype.update=function(e,t,a,s){var l=function(e){r.error("Updating Stream Rule failed with status: "+e,"Could not update Stream Rule")},u=i.qualifyUrl(n.StreamRulesApiController.update(e,t).url),c={field:a.field,type:a.type,value:a.value,inverted:a.inverted,description:a.description};o("PUT",u,c).then(s,l).then(this._emitChange.bind(this))},e.prototype.remove=function(e,t,a){var s=function(e){r.error("Deleting Stream Rule failed with status: "+e,"Could not delete Stream Rule")},l=i.qualifyUrl(n.StreamRulesApiController.delete(e,t).url);o("DELETE",l).then(a,s).then(this._emitChange.bind(this))},e.prototype.create=function(e,t,a){var s=function(e){r.error("Creating Stream Rule failed with status: "+e,"Could not create Stream Rule")},l=i.qualifyUrl(n.StreamRulesApiController.create(e).url);o("POST",l,t).then(a,s).then(this._emitChange.bind(this))},e.prototype.onChange=function(e){this.callbacks.push(e)},e.prototype._emitChange=function(){this.callbacks.forEach(function(e){return e()})},e.prototype.unregister=function(e){a.pull(this.callbacks,e)},e}(),l=new s;e.exports=l},function(e,exports,t){"use strict";var n=t(7),r=t(4),i=t(10),o=t(5).default,a=t(35),s=function(){function e(){this.callbacks=[]}return e.prototype.listStreams=function(){return o("GET",r.qualifyUrl("/streams")).then(function(e){return e.streams}).catch(function(e){n.error("Loading streams failed with status: "+e,"Could not load streams")})},e.prototype.load=function(e){this.listStreams().then(function(t){e(t)})},e.prototype.get=function(e,t){var a=function(e){n.error("Loading Stream failed with status: "+e,"Could not retrieve Stream")},s=i.StreamsApiController.get(e).url;o("GET",r.qualifyUrl(s)).then(t,a)},e.prototype.remove=function(e,t){var a=function(e){n.error("Removing Stream failed with status: "+e,"Could not remove Stream")},s=r.qualifyUrl(i.StreamsApiController.delete(e).url);o("DELETE",s).then(t,a).then(this._emitChange.bind(this))},e.prototype.pause=function(e,t){var a=this,s=function(e){n.error("Pausing Stream failed with status: "+e,"Could not pause Stream")},l=r.qualifyUrl(i.StreamsApiController.pause(e).url);return o("POST",l).then(t,s).then(function(e){return a._emitChange(),e})},e.prototype.resume=function(e,t){var a=this,s=function(e){n.error("Resuming Stream failed with status: "+e,"Could not resume Stream")},l=r.qualifyUrl(i.StreamsApiController.resume(e).url);return o("POST",l).then(t,s).then(function(e){return a._emitChange(),e})},e.prototype.save=function(e,t){var a=function(e){n.error("Saving Stream failed with status: "+e,"Could not save Stream")},s=r.qualifyUrl(i.StreamsApiController.create().url);o("POST",s,e).then(t,a).then(this._emitChange.bind(this))},e.prototype.update=function(e,t,a){var s=function(e){n.error("Updating Stream failed with status: "+e,"Could not update Stream")},l=r.qualifyUrl(i.StreamsApiController.update(e).url);o("PUT",l,t).then(a,s).then(this._emitChange.bind(this))},e.prototype.cloneStream=function(e,t,a){var s=function(e){n.error("Cloning Stream failed with status: "+e,"Could not clone Stream")},l=r.qualifyUrl(i.StreamsApiController.cloneStream(e).url);o("POST",l,t).then(a,s).then(this._emitChange.bind(this))},e.prototype.removeOutput=function(e,t,a){var s=r.qualifyUrl(i.StreamOutputsApiController.delete(e,t).url);o("DELETE",s).then(a,function(e){n.error("Removing output from stream failed with status: "+e,"Could not remove output from stream")}).then(this._emitChange.bind(this))},e.prototype.addOutput=function(e,t,a){var s=r.qualifyUrl(i.StreamOutputsApiController.add(e,t).url);o("POST",s,{outputs:[t]}).then(a,function(e){n.error("Adding output to stream failed with status: "+e,"Could not add output to stream")}).then(this._emitChange.bind(this))},e.prototype.testMatch=function(e,t,a){var s=r.qualifyUrl(i.StreamsApiController.testMatch(e).url);o("POST",s,t).then(a,function(e){n.error("Testing stream rules of stream failed with status: "+e.message,"Could not test stream rules of stream")})},e.prototype.onChange=function(e){this.callbacks.push(e)},e.prototype._emitChange=function(){this.callbacks.forEach(function(e){return e()})},e.prototype.unregister=function(e){a.pull(this.callbacks,e)},e}(),l=new s;e.exports=l},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(10),l=n(s),u=t(5),c=n(u),d=t(69),h=n(d),f=i.default.createStore({system:void 0,locales:void 0,init:function(){var e=this;this.info().then(function(t){e.trigger({system:t}),e.system=t}),this.systemLocales().then(function(t){e.trigger({locales:t}),e.locales=t.locales})},getInitialState:function(){return{system:this.system,locales:this.locales}},info:function(){var e=a.default.qualifyUrl(l.default.SystemApiController.info().url);return(0,c.default)("GET",e)},jvm:function(){var e=a.default.qualifyUrl(l.default.SystemApiController.jvm().url);return(0,c.default)("GET",e)},systemLocales:function(){var e=a.default.qualifyUrl(l.default.SystemApiController.locales().url);return(0,c.default)("GET",e)},elasticsearchVersion:function(){var e=a.default.qualifyUrl(l.default.ClusterApiResource.elasticsearchStats().url);return new h.default(function(t,n){(0,c.default)("GET",e).then(function(e){var n=e.cluster_version.split(".");t({major:n[0],minor:n[1],patch:n[2]})}).catch(n)})}});exports.default=f,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(10),l=n(s),u=t(5),c=n(u),d=t(6),h=n(d),f=h.default.getActions("SystemJobs"),p=i.default.createStore({listenables:[f],jobsById:{},getInitialState:function(){return{jobs:this.jobs,jobsById:this.jobsById}},list:function(){var e=this,t=a.default.qualifyUrl(l.default.SystemJobsApiController.list().url),n=(0,u.fetchPeriodically)("GET",t).then(function(t){return e.jobs=t,e.trigger({jobs:t}),t});f.list.promise(n)},getJob:function(e){var t=this,n=a.default.qualifyUrl(l.default.SystemJobsApiController.getJob(e).url),r=(0,c.default)("GET",n).then(function(e){return t.jobsById[e.id]=e,t.trigger({jobsById:t.jobsById}),e},function(){delete t.jobsById[e],t.trigger({jobsById:t.jobsById})});f.getJob.promise(r)},cancelJob:function(e){var t=this,n=a.default.qualifyUrl(l.default.SystemJobsApiController.cancelJob(e).url),r=(0,c.default)("DELETE",n).then(function(e){delete t.jobsById[e.id]});f.cancelJob.promise(r)}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(7),l=n(s),u=t(5),c=n(u),d=i.default.createStore({sourceUrl:function(e){return"/cluster/"+e+"/lbstatus"},override:function(e,t){var n=this;return(0,c.default)("PUT",a.default.qualifyUrl(this.sourceUrl(e)+"/override/"+t)).then(function(){n.trigger({}),l.default.success("Load balancer status successfully changed do '"+t+"' in node '"+e+"'")},function(n){l.default.error("Changing load balancer status in '"+e+"' failed: "+n,"Could not change load balancer status to '"+t+"' in node '"+e+"'")})}});exports.default=d,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(10),l=n(s),u=t(5),c=i.default.createStore({listenables:[],all:function(e){var t=a.default.qualifyUrl(l.default.SystemMessagesApiController.all(e).url);return(0,u.fetchPeriodically)("GET",t)}});exports.default=c,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(7),l=n(s),u=t(5),c=n(u),d=i.default.createStore({sourceUrl:function(e){return"/cluster/"+e+"/processing"},pause:function(e){var t=this;return(0,c.default)("POST",a.default.qualifyUrl(this.sourceUrl(e)+"/pause")).then(function(){t.trigger({}),l.default.success("Message processing paused successfully in '"+e+"'")},function(t){l.default.error("Pausing message processing in '"+e+"' failed: "+t,"Could not pause message processing in node '"+e+"'")})},resume:function(e){var t=this;return(0,c.default)("POST",a.default.qualifyUrl(this.sourceUrl(e)+"/resume")).then(function(){t.trigger({}),l.default.success("Message processing resumed successfully in '"+e+"'")},function(t){l.default.error("Resuming message processing in '"+e+"' failed: "+t,"Could not resume message processing in node '"+e+"'")})}});exports.default=d,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(7),l=n(s),u=t(5),c=n(u),d=i.default.createStore({sourceUrl:function(e){return"/cluster/"+e+"/shutdown"},shutdown:function(e){var t=this;return(0,c.default)("POST",a.default.qualifyUrl(this.sourceUrl(e))).then(function(){t.trigger({}),l.default.success("Node '"+e+"' will shutdown shortly")},function(t){l.default.error("Shutting down node '"+e+"' failed: "+t,"Could not send shutdown signal to node '"+e+"'")})}});exports.default=d,e.exports=exports.default},function(e,exports,t){"use strict";var n=t(10),r=t(4),i=t(7),o=t(5).default,a={testNaturalDate:function(e){var t=n.ToolsApiController.naturalDateTest(e).url,a=o("GET",r.qualifyUrl(t));return a.catch(function(e){422!==e.additional.status&&i.error("Loading keyword preview failed with status: "+e,"Could not load keyword preview")}),a},testGrok:function(e,t,a){var s=n.ToolsApiController.grokTest().url,l=o("POST",r.qualifyUrl(s),{pattern:e,string:a,named_captures_only:t});return l.catch(function(e){i.error("Details: "+e,"We were not able to run the grok extraction. Please check your parameters.")}),l},testJSON:function(e,t,a,s,l,u,c,d){var h=n.ToolsApiController.jsonTest().url,f={flatten:e,list_separator:t,key_separator:a,kv_separator:s,replace_key_whitespace:l,key_whitespace_replacement:u,key_prefix:c,string:d},p=o("POST",r.qualifyUrl(h),f);return p.catch(function(e){i.error("Details: "+e,"We were not able to run the JSON extraction. Please check your parameters.")}),p},testRegex:function(e,t){var a=n.ToolsApiController.regexTest().url,s=o("POST",r.qualifyUrl(a),{regex:e,string:t});return s.catch(function(e){i.error("Details: "+e,"Could not try regular expression. Make sure that it is valid.")}),s},testRegexReplace:function(e,t,a,s){var l=n.ToolsApiController.regexReplaceTest().url,u={regex:e,replacement:t,replace_all:a,string:s},c=o("POST",r.qualifyUrl(l),u);return c.catch(function(e){i.error("Details: "+e,"Could not try regular expression. Make sure that it is valid.")}),c},testSplitAndIndex:function(e,t,a){var s=n.ToolsApiController.splitAndIndexTest().url,l={split_by:e,index:t,string:a},u=o("POST",r.qualifyUrl(s),l);return u.catch(function(e){i.error("Details: "+e,"We were not able to run the split and index extraction. Please check your parameters.")}),u},testSubstring:function(e,t,a){var s=n.ToolsApiController.substringTest().url,l={start:e,end:t,string:a},u=o("POST",r.qualifyUrl(s),l);return u.catch(function(e){i.error("Details: "+e,"We were not able to run the substring extraction. Please check index boundaries.")}),u},testContainsString:function(e,t){var a=n.ToolsApiController.containsStringTest().url,s=o("POST",r.qualifyUrl(a),{search_string:e,string:t});return s.catch(function(e){i.error("Details: "+e,"Could not check if field contains the string")}),s},testLookupTable:function(e,t){var a=n.ToolsApiController.lookupTableTest().url,s=o("POST",r.qualifyUrl(a),{lookup_table_name:e,string:t});return s.catch(function(e){i.error("Details: "+e,"Could not check if lookup table translates the string")}),s}};e.exports=a},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(12),a=n(o),s=t(140),l=n(s),u=t(48),c=n(u),d=t(93),h=n(d),f=t(4),p=n(f),g=t(10),m=n(g),v=t(5),y=n(v),b=i.default.createStore({DEFAULT_LIMIT:150,listenables:[],search:function(e,t,n,r,i,o,s,u,c){var d=b.extractTimeRange(e,n),f=i||this.DEFAULT_LIMIT,g=(o-1)*f,v=p.default.qualifyUrl(m.default.UniversalSearchApiController.search(e,t,d,r,f,g,s,u,c).url);return(0,y.default)("GET",v).then(function(e){var t=a.default.extend({},e);return t.fields=e.fields.map(function(e){return{hash:(0,l.default)(e),name:e,standard_selected:"message"===e||"source"===e}}),t.messages=t.messages.map(function(e){return h.default.formatMessageSummary(e)}),t})},histogram:function(e,t,n,r,i,o){var a=b.extractTimeRange(e,n),s=p.default.qualifyUrl(m.default.UniversalSearchApiController.histogram(e,t,r,a,i).url);return(0,y.default)("GET",s).then(function(t){return t.histogram_boundaries=t.queried_timerange,t.histogram=c.default.format(t.results,t.histogram_boundaries,r,o,"relative"===e&&0===n.relative,null,!0),t})}});b.extractTimeRange=function(e,t){return"relative"===e?{range:t.relative}:t},exports.default=b,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(7),r=t(4),i=t(10),o=t(5).default;exports.UsersStore={editUserFormUrl:function(e){return r.qualifyUrl("/system/users/edit/"+e)},create:function(e){var t=r.qualifyUrl(i.UsersApiController.create().url);return o("POST",t,e)},loadUsers:function(){var e=r.qualifyUrl(i.UsersApiController.list().url);return o("GET",e).then(function(e){return e.users},function(e){404!==e.additional.status&&n.error("Loading user list failed with status: "+e,"Could not load user list")})},load:function(e){var t=r.qualifyUrl(i.UsersApiController.load(encodeURIComponent(e)).url),a=o("GET",t);return a.catch(function(t){n.error("Loading user failed with status: "+t,"Could not load user "+e)}),a},deleteUser:function(e){var t=r.qualifyUrl(i.UsersApiController.delete(encodeURIComponent(e)).url),a=o("DELETE",t);return a.then(function(){n.success('User "'+e+'" was deleted successfully')},function(e){404!==e.additional.status&&n.error("Delete user failed with status: "+e,"Could not delete user")}),a},changePassword:function(e,t){var n=r.qualifyUrl(i.UsersApiController.changePassword(encodeURIComponent(e)).url);return o("PUT",n,t)},update:function(e,t){var n=r.qualifyUrl(i.UsersApiController.update(encodeURIComponent(e)).url);return o("PUT",n,t)}},e.exports=exports.UsersStore},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=t(7),i=t(10),o=t(4),a=t(5).fetchPeriodically,s=t(5).default,l=t(6),u=l.getActions("Widgets"),c=n.createStore({listenables:[u],_serializeWidgetForUpdate:function(e){return{description:e.description,type:e.type,cache_time:e.cache_time,creator_user_id:e.creator_user_id,config:e.config}},addWidget:function(e,t,n,a){var l={description:n,type:t,config:a},u=o.qualifyUrl(i.DashboardsApiController.addWidget(e).url),c=s("POST",u,l);return c.then(function(e){return r.success("Widget created successfully"),e},function(e){404!==e.additional.status&&r.error("Creating widget failed with status: "+e,"Could not create widget")}),c},loadWidget:function(e,t){var n=o.qualifyUrl(i.DashboardsApiController.widget(e,t).url),s=a("GET",n);return s.catch(function(e){404!==e.additional.status&&r.error("Loading widget information failed with status: "+e,"Could not load widget information")}),s},updateWidget:function(e,t){var n=o.qualifyUrl(i.DashboardsApiController.updateWidget(e,t.id).url),a=s("PUT",n,this._serializeWidgetForUpdate(t));return a.then(function(e){return r.success("Widget updated successfully"),e},function(e){r.error('Updating widget "'+t.description+'" failed with status: '+e.message,"Could not update widget")}),a},loadValue:function(e,t,n){var r=o.qualifyUrl(i.DashboardsApiController.widgetValue(e,t,n).url);return a("GET",r)},removeWidget:function(e,t){var n=this,r=o.qualifyUrl(i.DashboardsApiController.removeWidget(e,t).url),a=s("DELETE",r).then(function(e){return n.trigger({delete:t}),e});return u.removeWidget.promise(a),a}});e.exports=c},function(e,exports){+function($){"use strict";function e(e){return this.each(function(){var n=$(this),r=n.data("bs.popover"),i="object"==typeof e&&e;!r&&/destroy|hide/.test(e)||(r||n.data("bs.popover",r=new t(this,i)),"string"==typeof e&&r[e]())})}var t=function(e,t){this.init("popover",e,t)};if(!$.fn.tooltip)throw new Error("Popover requires tooltip.js");t.VERSION="3.3.7",t.DEFAULTS=$.extend({},$.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),t.prototype=$.extend({},$.fn.tooltip.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var n=$.fn.popover;$.fn.popover=e,$.fn.popover.Constructor=t,$.fn.popover.noConflict=function(){return $.fn.popover=n,this}}(jQuery)},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(exports,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0)}},{key:"allowYearChange",value:function(){return this.props.canChangeMonth}},{key:"showMonth",value:function(e,t){var n=this;this.allowMonth(e)&&this.setState({currentMonth:E.startOfMonth(e)},function(){t&&t(),n.props.onMonthChange&&n.props.onMonthChange(n.state.currentMonth)})}},{key:"showNextMonth",value:function(e){if(this.allowNextMonth()){var t=this.props.pagedNavigation?this.props.numberOfMonths:1,n=x.addMonths(this.state.currentMonth,t);this.showMonth(n,e)}}},{key:"showPreviousMonth",value:function(e){if(this.allowPreviousMonth()){var t=this.props.pagedNavigation?this.props.numberOfMonths:1,n=x.addMonths(this.state.currentMonth,-t);this.showMonth(n,e)}}},{key:"showNextYear",value:function(){if(this.allowYearChange()){var e=x.addMonths(this.state.currentMonth,12);this.showMonth(e)}}},{key:"showPreviousYear",value:function(){if(this.allowYearChange()){var e=x.addMonths(this.state.currentMonth,-12);this.showMonth(e)}}},{key:"focusFirstDayOfMonth",value:function(){this.getDayNodes()[0].focus()}},{key:"focusLastDayOfMonth",value:function(){var e=this.getDayNodes();e[e.length-1].focus()}},{key:"focusPreviousDay",value:function(e){var t=this,n=this.getDayNodes(),r=[].concat(o(n)).indexOf(e);0===r?this.showPreviousMonth(function(){return t.focusLastDayOfMonth()}):n[r-1].focus()}},{key:"focusNextDay",value:function(e){var t=this,n=this.getDayNodes(),r=[].concat(o(n)).indexOf(e);r===n.length-1?this.showNextMonth(function(){return t.focusFirstDayOfMonth()}):n[r+1].focus()}},{key:"focusNextWeek",value:function(e){var t=this,n=this.getDayNodes(),r=[].concat(o(n)).indexOf(e);r>n.length-8?this.showNextMonth(function(){var e=n.length-r,i=7-e;t.getDayNodes()[i].focus()}):n[r+7].focus()}},{key:"focusPreviousWeek",value:function(e){var t=this,n=this.getDayNodes(),r=[].concat(o(n)).indexOf(e);r<=6?this.showPreviousMonth(function(){var e=t.getDayNodes();e[e.length-7+r].focus()}):n[r-7].focus()}},{key:"handleKeyDown",value:function(e){switch(e.persist(),e.keyCode){case L.default.LEFT:this.showPreviousMonth();break;case L.default.RIGHT:this.showNextMonth();break;case L.default.UP:this.showPreviousYear();break;case L.default.DOWN:this.showNextYear()}this.props.onKeyDown&&this.props.onKeyDown(e)}},{key:"handleDayKeyDown",value:function(e,t,n){switch(n.persist(),n.keyCode){case L.default.LEFT:E.cancelEvent(n),this.focusPreviousDay(n.target);break;case L.default.RIGHT:E.cancelEvent(n),this.focusNextDay(n.target);break;case L.default.UP:E.cancelEvent(n),this.focusPreviousWeek(n.target);break;case L.default.DOWN:E.cancelEvent(n),this.focusNextWeek(n.target);break;case L.default.ENTER:case L.default.SPACE:E.cancelEvent(n),this.props.onDayClick&&this.handleDayClick(e,t,n)}this.props.onDayKeyDown&&this.props.onDayKeyDown(e,t,n)}},{key:"handleDayClick",value:function(e,t,n){n.persist(),t.outside&&this.handleOutsideDayClick(e),this.props.onDayClick(e,t,n)}},{key:"handleOutsideDayClick",value:function(e){var t=this.state.currentMonth,n=this.props.numberOfMonths,r=E.getMonthsDiff(t,e);r>0&&r>=n?this.showNextMonth():r<0&&this.showPreviousMonth()}},{key:"renderNavbar",value:function(){var e=this.props,t=e.labels,n=e.locale,r=e.localeUtils,o=e.canChangeMonth,a=e.navbarElement,s=i(e,["labels","locale","localeUtils","canChangeMonth","navbarElement"]);if(!o)return null;var l={classNames:this.props.classNames,className:this.props.classNames.navBar,nextMonth:this.getNextNavigableMonth(),previousMonth:this.getPreviousNavigableMonth(),showPreviousButton:this.allowPreviousMonth(),showNextButton:this.allowNextMonth(),onNextClick:this.showNextMonth,onPreviousClick:this.showPreviousMonth,dir:s.dir,labels:t,locale:n,localeUtils:r};return h.default.isValidElement(a)?h.default.cloneElement(a,l):h.default.createElement(a,l)}},{key:"renderDayInMonth",value:function(e,t){var n=E.getModifiersFromProps(this.props),r=T.getModifiersForDay(e,n);x.isSameDay(e,new Date)&&!Object.prototype.hasOwnProperty.call(n,this.props.classNames.today)&&r.push(this.props.classNames.today),e.getMonth()!==t.getMonth()&&r.push(this.props.classNames.outside);var i=e.getMonth()!==t.getMonth(),o=null;this.props.onDayClick&&!i&&(o=-1,1===e.getDate()&&(o=this.props.tabIndex));var a=""+e.getFullYear()+e.getMonth()+e.getDate(),s={};return r.forEach(function(e){s[e]=!0}),h.default.createElement(_.default,{key:(i?"outside-":"")+a,classNames:this.props.classNames,day:e,modifiers:s,modifiersStyles:this.props.modifiersStyles,empty:i&&!this.props.enableOutsideDays&&!this.props.fixedWeeks,tabIndex:o,ariaLabel:this.props.localeUtils.formatDay(e,this.props.locale),ariaDisabled:i||r.indexOf("disabled")>-1,ariaSelected:r.indexOf("selected")>-1,onMouseEnter:this.props.onDayMouseEnter,onMouseLeave:this.props.onDayMouseLeave,onKeyDown:this.handleDayKeyDown,onTouchStart:this.props.onDayTouchStart,onTouchEnd:this.props.onDayTouchEnd,onFocus:this.props.onDayFocus,onClick:this.props.onDayClick?this.handleDayClick:void 0},this.props.renderDay(e,s))}},{key:"renderMonths",value:function(){for(var e=[],t=E.getFirstDayOfWeekFromProps(this.props),n=0;n1&&e.fromMonth){var r=E.getMonthsDiff(e.fromMonth,n);n=x.addMonths(e.fromMonth,Math.floor(r/e.numberOfMonths)*e.numberOfMonths)}return{currentMonth:n}},this.dayPicker=null,this.handleTodayButtonClick=function(t){e.showMonth(new Date),t.target.blur()}};exports.default=I},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e){var t=e.classNames,n=e.date,r=e.months,i=e.locale,a=e.localeUtils,s=e.onClick;return o.default.createElement("div",{className:t.caption,onClick:s,role:"heading"},r?r[n.getMonth()]+" "+n.getFullYear():a.formatMonthTitle(n,i))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var i=t(0),o=n(i),a=t(37),s=n(a);r.propTypes={date:s.default.instanceOf(Date),months:s.default.arrayOf(s.default.string),locale:s.default.string,localeUtils:s.default.localeUtils,onClick:s.default.func,classNames:s.default.shape({caption:s.default.string.isRequired}).isRequired}},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e){var t=e.classNames,n=e.month,r=e.months,i=e.fixedWeeks,a=e.captionElement,s=e.weekdayElement,l=e.locale,h=e.localeUtils,f=e.weekdaysLong,p=e.weekdaysShort,g=e.firstDayOfWeek,m=e.onCaptionClick,v=e.children,y=e.footer,b=e.showWeekNumbers,_=e.onWeekClick,w={date:n,classNames:t,months:r,localeUtils:h,locale:l,onClick:m?function(e){return m(n,e)}:void 0},C=o.default.isValidElement(a)?o.default.cloneElement(a,w):o.default.createElement(a,w),A=(0,c.getWeekArray)(n,g,i);return o.default.createElement("div",{className:t.month,role:"grid"},C,o.default.createElement(u.default,{classNames:t,weekdaysShort:p,weekdaysLong:f,firstDayOfWeek:g,showWeekNumbers:b,locale:l,localeUtils:h,weekdayElement:s}),o.default.createElement("div",{className:t.body,role:"rowgroup"},A.map(function(e){var r=void 0;return b&&(r=(0,d.getWeekNumber)(e[0])),o.default.createElement("div",{key:e[0].getTime(),className:t.week,role:"row"},b&&o.default.createElement("div",{className:t.weekNumber,tabIndex:0,role:"gridcell",onClick:function(t){return _(r,e,t)}},r),e.map(function(e){return v(e,n)}))})),y&&o.default.createElement("div",{className:t.footer},y))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var i=t(0),o=n(i),a=t(37),s=n(a),l=t(397),u=n(l),c=t(96),d=t(59);r.propTypes={classNames:s.default.shape({month:s.default.string.isRequired,body:s.default.string.isRequired,week:s.default.string.isRequired}).isRequired,month:s.default.instanceOf(Date).isRequired,months:s.default.arrayOf(s.default.string),fixedWeeks:s.default.bool,captionElement:s.default.oneOfType([s.default.element,s.default.func,s.default.instanceOf(o.default.Component)]).isRequired,weekdayElement:s.default.oneOfType([s.default.element,s.default.func,s.default.instanceOf(o.default.Component)]),footer:s.default.node,showWeekNumbers:s.default.bool,onWeekClick:s.default.func,locale:s.default.string.isRequired,localeUtils:s.default.localeUtils.isRequired,weekdaysLong:s.default.arrayOf(s.default.string),weekdaysShort:s.default.arrayOf(s.default.string),firstDayOfWeek:s.default.number.isRequired,onCaptionClick:s.default.func,children:s.default.func.isRequired}},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e){for(var t=e.classNames,n=e.firstDayOfWeek,r=e.showWeekNumbers,i=e.weekdaysLong,a=e.weekdaysShort,s=e.locale,l=e.localeUtils,u=e.weekdayElement,c=[],d=0;d<7;d+=1){var h=(d+n)%7,f={key:d,className:t.weekday,weekday:h,weekdaysLong:i,weekdaysShort:a,localeUtils:l,locale:s},p=o.default.isValidElement(u)?o.default.cloneElement(u,f):o.default.createElement(u,f);c.push(p)}return o.default.createElement("div",{className:t.weekdays,role:"rowgroup"},o.default.createElement("div",{className:t.weekdaysRow,role:"row"},r&&o.default.createElement("div",{className:t.weekday}),c))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var i=t(0),o=n(i),a=t(37),s=n(a);r.propTypes={classNames:s.default.shape({weekday:s.default.string.isRequired,weekdays:s.default.string.isRequired,weekdaysRow:s.default.string.isRequired}).isRequired,firstDayOfWeek:s.default.number.isRequired,weekdaysLong:s.default.arrayOf(s.default.string),weekdaysShort:s.default.arrayOf(s.default.string),showWeekNumbers:s.default.bool,locale:s.default.string.isRequired,localeUtils:s.default.localeUtils.isRequired,weekdayElement:s.default.oneOfType([s.default.element,s.default.func,s.default.instanceOf(o.default.Component)])}},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t,n){if(e)return function(r){r.persist(),e(t,n,r)}}function i(e){var t=e.classNames,n=e.modifiersStyles,i=e.day,o=e.tabIndex,s=e.empty,u=e.modifiers,c=e.onMouseEnter,d=e.onMouseLeave,h=e.onClick,f=e.onKeyDown,p=e.onTouchStart,g=e.onTouchEnd,m=e.onFocus,v=e.ariaLabel,y=e.ariaDisabled,b=e.ariaSelected,_=e.children,w=t.day;t!==l.default?w+=" "+Object.keys(u).join(" "):w+=Object.keys(u).map(function(e){return" "+w+"--"+e}).join("");var C=void 0;return n&&Object.keys(u).filter(function(e){return!!n[e]}).forEach(function(e){C=Object.assign({},C,n[e])}),s?a.default.createElement("div",{role:"gridcell","aria-disabled":!0,className:w,style:C}):a.default.createElement("div",{className:w,tabIndex:o||0,style:C,role:"gridcell","aria-label":v,"aria-disabled":y.toString(),"aria-selected":b.toString(),onClick:r(h,i,u),onKeyDown:r(f,i,u),onMouseEnter:r(c,i,u),onMouseLeave:r(d,i,u),onTouchEnd:r(g,i,u),onTouchStart:r(p,i,u),onFocus:r(m,i,u)},_)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=i;var o=t(0),a=n(o),s=t(95),l=n(s),u=t(37),c=n(u);i.propTypes={classNames:c.default.shape({day:c.default.string.isRequired}).isRequired,day:c.default.instanceOf(Date).isRequired,children:c.default.node.isRequired,ariaDisabled:c.default.bool,ariaLabel:c.default.string,ariaSelected:c.default.bool,empty:c.default.bool,modifiers:c.default.object,modifiersStyles:c.default.object,onClick:c.default.func,onKeyDown:c.default.func,onMouseEnter:c.default.func,onMouseLeave:c.default.func,onTouchEnd:c.default.func,onTouchStart:c.default.func,onFocus:c.default.func,tabIndex:c.default.number},i.defaultProps={modifiers:{},empty:!1}},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={LEFT:37,UP:38,RIGHT:39,DOWN:40,ENTER:13,SPACE:32,ESC:27}},function(e,exports,t){var n=t(401);"string"==typeof n&&(n=[[e.i,n,""]]);var r={};r.transform=void 0;t(15)(n,r);n.locals&&(e.exports=n.locals)},function(e,exports,t){exports=e.exports=t(14)(void 0),exports.push([e.i,'.DayPicker{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;position:relative;padding:1rem 0;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.DayPicker,.DayPicker-Month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.DayPicker-Month{display:table;border-collapse:collapse;border-spacing:0;margin:0 1rem}.DayPicker-NavBar{position:absolute;left:0;right:0;padding:0 .5rem;top:1rem}.DayPicker-NavButton{position:absolute;width:1.5rem;height:1.5rem;background-repeat:no-repeat;background-position:50%;background-size:contain;cursor:pointer}.DayPicker-NavButton--prev{left:1rem;background-image:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjI2cHgiIGhlaWdodD0iNTBweCIgdmlld0JveD0iMCAwIDI2IDUwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbG5zOnNrZXRjaD0iaHR0cDovL3d3dy5ib2hlbWlhbmNvZGluZy5jb20vc2tldGNoL25zIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggMy4zLjIgKDEyMDQzKSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5wcmV2PC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9IlBhZ2UtMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc2tldGNoOnR5cGU9Ik1TUGFnZSI+CiAgICAgICAgPGcgaWQ9InByZXYiIHNrZXRjaDp0eXBlPSJNU0xheWVyR3JvdXAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEzLjM5MzE5MywgMjUuMDAwMDAwKSBzY2FsZSgtMSwgMSkgdHJhbnNsYXRlKC0xMy4zOTMxOTMsIC0yNS4wMDAwMDApIHRyYW5zbGF0ZSgwLjg5MzE5MywgMC4wMDAwMDApIiBmaWxsPSIjNTY1QTVDIj4KICAgICAgICAgICAgPHBhdGggZD0iTTAsNDkuMTIzNzMzMSBMMCw0NS4zNjc0MzQ1IEwyMC4xMzE4NDU5LDI0LjcyMzA2MTIgTDAsNC4yMzEzODMxNCBMMCwwLjQ3NTA4NDQ1OSBMMjUsMjQuNzIzMDYxMiBMMCw0OS4xMjM3MzMxIEwwLDQ5LjEyMzczMzEgWiIgaWQ9InJpZ2h0IiBza2V0Y2g6dHlwZT0iTVNTaGFwZUdyb3VwIj48L3BhdGg+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4K")}.DayPicker-NavButton--next{right:1rem;background-image:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjI2cHgiIGhlaWdodD0iNTBweCIgdmlld0JveD0iMCAwIDI2IDUwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbG5zOnNrZXRjaD0iaHR0cDovL3d3dy5ib2hlbWlhbmNvZGluZy5jb20vc2tldGNoL25zIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggMy4zLjIgKDEyMDQzKSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5uZXh0PC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9IlBhZ2UtMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc2tldGNoOnR5cGU9Ik1TUGFnZSI+CiAgICAgICAgPGcgaWQ9Im5leHQiIHNrZXRjaDp0eXBlPSJNU0xheWVyR3JvdXAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAuOTUxNDUxLCAwLjAwMDAwMCkiIGZpbGw9IiM1NjVBNUMiPgogICAgICAgICAgICA8cGF0aCBkPSJNMCw0OS4xMjM3MzMxIEwwLDQ1LjM2NzQzNDUgTDIwLjEzMTg0NTksMjQuNzIzMDYxMiBMMCw0LjIzMTM4MzE0IEwwLDAuNDc1MDg0NDU5IEwyNSwyNC43MjMwNjEyIEwwLDQ5LjEyMzczMzEgTDAsNDkuMTIzNzMzMSBaIiBpZD0icmlnaHQiIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPgo=")}.DayPicker-Caption{display:table-caption;height:1.5rem;text-align:center}.DayPicker-Weekdays{display:table-header-group}.DayPicker-WeekdaysRow{display:table-row}.DayPicker-Weekday{display:table-cell;padding:.5rem;font-size:.875em;text-align:center;color:#8b9898}.DayPicker-Body{display:table-row-group}.DayPicker-Week{display:table-row}.DayPicker-Day{border:1px solid #eaecec;text-align:center}.DayPicker-Day,.DayPicker-WeekNumber{display:table-cell;padding:.5rem;cursor:pointer;vertical-align:middle}.DayPicker-WeekNumber{text-align:right;min-width:1rem;font-size:.75em;color:#8b9898}.DayPicker--interactionDisabled .DayPicker-Day{cursor:default}.DayPicker-Footer{display:table-caption;caption-side:bottom;padding-top:.5rem}.DayPicker-TodayButton{border:none;background-image:none;background-color:transparent;-webkit-box-shadow:none;box-shadow:none;cursor:pointer;color:#4a90e2;font-size:.875em}.DayPicker-Day--today{color:#d0021b;font-weight:500}.DayPicker-Day--disabled{background-color:#eff1f1}.DayPicker-Day--disabled,.DayPicker-Day--outside{color:#dce0e0;cursor:default}.DayPicker-Day--sunday{background-color:#f7f8f8}.DayPicker-Day--sunday:not(.DayPicker-Day--today){color:#dce0e0}.DayPicker-Day--selected:not(.DayPicker-Day--disabled):not(.DayPicker-Day--outside){color:#fff;background-color:#4a90e2}.DayPickerInput{display:inline-block}.DayPickerInput-OverlayWrapper{position:relative}.DayPickerInput-Overlay{left:0;position:absolute;background:#fff;-webkit-box-shadow:0 2px 5px rgba(0,0,0,.15);box-shadow:0 2px 5px rgba(0,0,0,.15)}',""])},function(e,exports){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(i))return e;var o;return o=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")"})}},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=a.default.createClass({displayName:"DocumentTitle",propTypes:{title:i.default.string.isRequired,children:i.default.oneOfType([i.default.arrayOf(i.default.element),i.default.element]).isRequired},componentDidMount:function(){document.title=document.title+" - "+this.props.title},componentWillUnmount:function(){document.title=this.defaultTitle},defaultTitle:"Graylog",render:function(){return this.props.children}});exports.default=s,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=a.default.createClass({displayName:"EntityList",propTypes:{bsNoItemsStyle:i.default.oneOf(["info","success","warning"]),noItemsText:i.default.oneOfType([i.default.string,i.default.element]),items:i.default.array.isRequired},getDefaultProps:function(){return{bsNoItemsStyle:"info",noItemsText:"No items available"}},render:function(){return 0===this.props.items.length?a.default.createElement(s.Alert,{bsStyle:this.props.bsNoItemsStyle},a.default.createElement("i",{className:"fa fa-info-circle"})," ",this.props.noItemsText):a.default.createElement("ul",{className:"entity-list"},this.props.items)}});exports.default=l,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=a.default.createClass({displayName:"EntityListItem",propTypes:{title:i.default.oneOfType([i.default.string,i.default.node]),titleSuffix:i.default.any,description:i.default.any,actions:i.default.oneOfType([i.default.array,i.default.node]),createdFromContentPack:i.default.bool,contentRow:i.default.node},getDefaultProps:function(){return{createdFromContentPack:!1}},render:function(){var e=void 0;this.props.titleSuffix&&(e=a.default.createElement("small",null,this.props.titleSuffix));var t=a.default.createElement("div",{className:"item-actions text-right"},this.props.actions);return a.default.createElement("li",{className:"entity-list-item"},a.default.createElement(s.Row,{className:"row-sm"},a.default.createElement(s.Col,{md:12},a.default.createElement("div",{className:"pull-right hidden-xs"},t),a.default.createElement("h2",null,this.props.title," ",e),(this.props.createdFromContentPack||this.props.description)&&a.default.createElement("div",{className:"item-description"},this.props.createdFromContentPack&&a.default.createElement("span",null,a.default.createElement("i",{className:"fa fa-cube",title:"Created from content pack"})," "),a.default.createElement("span",null,this.props.description))),a.default.createElement(s.Col,{sm:12,lgHidden:!0,mdHidden:!0,smHidden:!0},t)),a.default.createElement(s.Row,{className:"row-sm"},this.props.contentRow))}});exports.default=l,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(0),i=n(r),o=t(1),a=n(o),s=t(35),l=n(s),u=i.default.createClass({displayName:"ExternalLink",propTypes:{href:a.default.string,children:a.default.node.isRequired,target:a.default.string,iconClass:a.default.string,className:a.default.string},getDefaultProps:function(){return{href:"",target:"_blank",iconClass:"fa-external-link",className:""}},render:function(){var e=i.default.createElement("span",null,this.props.children," ",i.default.createElement("i",{className:"fa "+this.props.iconClass}));return""===l.default.trim(this.props.href)?e:i.default.createElement("a",{href:this.props.href,target:this.props.target,className:this.props.className},e)}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(exports,"__esModule",{value:!0});var i=t(0),o=n(i),a=t(1),s=n(a),l=t(3),u=t(11),c=o.default.createClass({displayName:"ExternalLinkButton",propTypes:{href:s.default.string.isRequired,children:s.default.node.isRequired,bsStyle:s.default.string,bsSize:s.default.string,target:s.default.string,iconClass:s.default.string,className:s.default.string,disabled:s.default.bool},getDefaultProps:function(){return{bsStyle:"default",bsSize:"",target:"_blank",iconClass:"fa-external-link",className:"",disabled:!1}},render:function(){var e=this.props,t=e.iconClass,n=e.children,i=r(e,["iconClass","children"]);return o.default.createElement(l.Button,i,o.default.createElement(u.ExternalLink,{iconClass:t},n))}});exports.default=c,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(2),l=n(s),u=t(9),c=n(u),d=t(36),h=n(d),f=c.default.getStore("CurrentUser"),p=a.default.createClass({displayName:"IfPermitted",propTypes:{children:i.default.node.isRequired,permissions:i.default.oneOfType([i.default.string,i.default.arrayOf(i.default.string)]).isRequired,anyPermissions:i.default.bool},mixins:[l.default.connect(f),h.default],getDefaultProps:function(){return{anyPermissions:!1}},_checkPermissions:function(){return this.props.anyPermissions?this.isAnyPermitted(this.state.currentUser.permissions,this.props.permissions):this.isPermitted(this.state.currentUser.permissions,this.props.permissions)},render:function(){return this.state.currentUser&&this._checkPermissions()?a.default.Children.count(this.props.children)>1?a.default.createElement("span",null,this.props.children):this.props.children:null}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(13),l=t(410),u=n(l),c=a.default.createClass({displayName:"ISODurationInput",propTypes:{duration:i.default.string.isRequired,update:i.default.func.isRequired,label:i.default.string,help:i.default.string,validator:i.default.func,errorText:i.default.string,autoFocus:i.default.bool,required:i.default.bool},getDefaultProps:function(){return{label:"Duration",help:"as ISO8601 Duration",validator:function(){return!0},errorText:"invalid",autoFocus:!1,required:!1}},getInitialState:function(){return{duration:this.props.duration}},_onUpdate:function(){var e=this.refs.isoDuration.getValue().toUpperCase();e.startsWith("P")||(e="P"+e),this.setState({duration:e}),u.default.isValidDuration(e,this.props.validator)&&this.props.update(e)},render:function(){return a.default.createElement(s.Input,{type:"text",ref:"isoDuration",label:this.props.label,onChange:this._onUpdate,value:this.state.duration,help:this.props.help,addonAfter:u.default.humanizeDuration(this.state.duration,this.props.validator,this.props.errorText),bsStyle:u.default.durationStyle(this.state.duration,this.props.validator),autofocus:this.props.autoFocus,required:this.props.required})}});exports.default=c,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(23),r=function(e){return e&&e.__esModule?e:{default:e}}(n);t(411);var i={isValidDuration:function(e,t){return t(r.default.duration(e).asMilliseconds(),e)},durationStyle:function(e,t,n){var r=n;return r||(r="error"),this.isValidDuration(e,t)?null:r},formatDuration:function(e,t,n){var i=n;return i||(i="error"),this.isValidDuration(e,t)?r.default.duration(e).format():i},humanizeDuration:function(e,t,n){var i=n;return i||(i="error"),this.isValidDuration(e,t)?r.default.duration(e).humanize():i}};exports.default=i,e.exports=exports.default},function(e,exports,t){/*! Moment Duration Format v1.3.0 * https://github.com/jsmreese/moment-duration-format * Date: 2014-07-15 * * Duration format plugin function for the Moment.js library * http://momentjs.com/ * * Copyright 2014 John Madhavan-Reese * Released under the MIT license */ !function(e,n){function r(e){var t="";if(!(e=parseInt(e,10))||e<1)return t;for(;e;)t+="0",e-=1;return t}function i(e,t,n){return null==e&&(e=""),e=""+e,(n?e:"")+r(t-e.length)+(n?"":e)}function o(e){return"[object Array]"===Object.prototype.toString.call(e)}function a(e){return"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){for(var n=e.length;n-=1;)if(t(e[n]))return e[n]}function l(e,t){var n,r=0,i=e.length;for("function"!=typeof t&&(n=t,t=function(e){return e===n});r0?Math.floor(r):Math.ceil(r),o=r-i,a=n+1===b.length,s=!n,u(t,function(t){t.type===e&&(v(t,{value:r,wholeValue:i,decimalValue:o,isLeast:a,isMost:s}),s&&null==C.forceLength&&t.length>1&&(C.forceLength=!0))}),A.subtract(i,e)}),C.trim&&(t=("left"===C.trim?g:m)(t,function(e){return!(e.isLeast||null!=e.type&&e.wholeValue)})),_=!1,"right"===C.trim&&t.reverse(),t=c(t,function(e){var t,n;if(!e.type)return e.token;if(t=e.isLeast&&C.precision<0?(Math.floor(e.wholeValue*Math.pow(10,C.precision))*Math.pow(10,-C.precision)).toString():e.wholeValue.toString(),t=t.replace(/^\-/,""),e.length>1&&(_||e.isMost||C.forceLength)&&(t=i(t,e.length)),e.isLeast&&C.precision>0)switch(n=e.decimalValue.toString().replace(/^\-/,"").split(/\.|e\-/),n.length){case 1:t+="."+i(n[0],C.precision,!0).slice(0,C.precision);break;case 2:t+="."+i(n[1],C.precision,!0).slice(0,C.precision);break;case 3:t+="."+i(r(+n[2]-1)+(n[0]||"0")+n[1],C.precision,!0).slice(0,C.precision);break;default:throw"Moment Duration Format: unable to parse token decimal value."}return e.isMost&&e.value<0&&(t="-"+t),_=!0,t}),"right"===C.trim&&t.reverse(),t.join("")):d(t,"token").join("")},y.duration.fn.format.defaults={escape:/\[(.+?)\]/,years:/[Yy]+/,months:/M+/,weeks:/[Ww]+/,days:/[Dd]+/,hours:/[Hh]+/,minutes:/m+/,seconds:/s+/,milliseconds:/S+/,general:/.+?/,types:"escape years months weeks days hours minutes seconds milliseconds general",trim:"left",precision:0,forceLength:null,template:function(){var e=this.types,t=this.duration;switch(s(e,function(e){return t._data[e]})){case"seconds":return"h:mm:ss";case"minutes":return"d[d] h:mm";case"hours":return"d[d] h[h]";case"days":return"M[m] d[d]";case"weeks":return"y[y] w[w]";case"months":return"y[y] M[m]";case"years":return"y[y]";default:return"y[y] M[m] d[d] h:mm:ss"}}}}(this)},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(2),l=n(s),u=t(146),c=t(9),d=n(c),h=t(16),f=n(h),p=t(11),g=d.default.getStore("Nodes"),m=a.default.createClass({displayName:"LinkToNode",propTypes:{nodeId:i.default.string.isRequired},mixins:[l.default.connect(g)],render:function(){if(!this.state.nodes)return a.default.createElement(p.Spinner,null);var e=this.state.nodes[this.props.nodeId];if(e){var t=e.is_master?"fa fa-star master-node":"fa fa-code-fork",n=e.is_master?"This is the master node in the cluster":"";return a.default.createElement(u.Link,{to:f.default.SYSTEM.NODES.SHOW(this.props.nodeId)},a.default.createElement("i",{className:t,title:n})," ",e.short_node_id," / ",e.hostname)}return a.default.createElement("i",null,"Unknown Node")}});exports.default=m,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(11),u=t(414),c=n(u),d=a.default.createClass({displayName:"LoadingIndicator",propTypes:{text:i.default.string},getDefaultProps:function(){return{text:"Loading..."}},render:function(){return a.default.createElement(s.Alert,{bsStyle:"info",className:c.default.loadingIndicator},a.default.createElement(l.Spinner,{text:this.props.text}))}});exports.default=d,e.exports=exports.default},function(e,exports,t){var n=t(415);"string"==typeof n&&(n=[[e.i,n,""]]);var r={};r.transform=void 0;t(15)(n,r);n.locals&&(e.exports=n.locals)},function(e,exports,t){exports=e.exports=t(14)(void 0),exports.push([e.i,"._1ORE6kbcLECH5aB8a-GArI.alert.alert-info{box-shadow:0 2px 10px rgba(0,0,0,.2);position:fixed;top:60px;left:50%;height:32px;width:200px;margin-left:-100px;padding:5px 10px;text-align:center;z-index:2000}",""]),exports.locals={loadingIndicator:"_1ORE6kbcLECH5aB8a-GArI"}},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;tr?1:0}))},_renderOption:function(e){return s.default.createElement("span",{key:e.value,title:"{option.value} [{option.value}]"},e.label," [",e.value,"]")},render:function(){if(!this.state.locales)return s.default.createElement(Spinner,null);var e=this._formatLocales(this.state.locales);return s.default.createElement(d.default,r({ref:"locale"},this.props,{placeholder:"Pick a locale",options:e,optionRenderer:this._renderOption}))}});exports.default=g,e.exports=exports.default},function(e,t,n){"use strict";function r(e){var t=e.onMouseDown;return y.a.createElement("span",{className:"Select-arrow",onMouseDown:t})}function i(e){for(var t=0;t-1)return!1;if(r.filterOption)return r.filterOption.call(a,e,t);if(!t)return!0;var o=String(e[r.valueKey]),s=String(e[r.labelKey]);return r.ignoreAccents&&("label"!==r.matchProp&&(o=i(o)),"value"!==r.matchProp&&(s=i(s))),r.ignoreCase&&("label"!==r.matchProp&&(o=o.toLowerCase()),"value"!==r.matchProp&&(s=s.toLowerCase())),"start"===r.matchPos?"label"!==r.matchProp&&o.substr(0,t.length)===t||"value"!==r.matchProp&&s.substr(0,t.length)===t:"label"!==r.matchProp&&o.indexOf(t)>=0||"value"!==r.matchProp&&s.indexOf(t)>=0})}function s(e){var t=e.focusedOption,n=e.focusOption,r=e.inputValue,i=e.instancePrefix,o=(e.labelKey,e.onFocus),a=e.onOptionRef,s=e.onSelect,l=e.optionClassName,u=e.optionComponent,c=e.optionRenderer,d=e.options,h=e.removeValue,f=e.selectValue,p=e.valueArray,g=e.valueKey,m=u;return d.map(function(e,u){var d=p&&p.some(function(t){return t[g]==e[g]}),v=e===t,b=S()(l,{"Select-option":!0,"is-selected":d,"is-focused":v,"is-disabled":e.disabled});return y.a.createElement(m,{className:b,focusOption:n,inputValue:r,instancePrefix:i,isDisabled:e.disabled,isFocused:v,isSelected:d,key:"option-"+u+"-"+e[g],onFocus:o,onSelect:s,option:e,optionIndex:u,ref:function(e){a(e,v)},removeValue:h,selectValue:f},c(e,u,r))})}function l(){return y.a.createElement("span",{className:"Select-clear",dangerouslySetInnerHTML:{__html:"×"}})}function u(e){return y.a.createElement(H,e)}function c(e){return y.a.createElement(H,e)}function d(e){var t=e.option,n=e.options,r=e.labelKey,i=e.valueKey;return 0===n.filter(function(e){return e[r]===t[r]||e[i]===t[i]}).length}function h(e){return!!e.label}function f(e){var t=e.label,n=e.labelKey,r=e.valueKey,i={};return i[r]=t,i[n]=t,i.className="Select-create-option-placeholder",i}function p(e){return'Create option "'+e+'"'}function g(e){switch(e.keyCode){case 9:case 13:case 188:return!0;default:return!1}}function m(e){return y.a.createElement(H,e)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"Async",function(){return W}),n.d(t,"AsyncCreatable",function(){return K}),n.d(t,"Creatable",function(){return q}),n.d(t,"Value",function(){return B}),n.d(t,"Option",function(){return P}),n.d(t,"defaultMenuRenderer",function(){return s}),n.d(t,"defaultArrowRenderer",function(){return r}),n.d(t,"defaultClearRenderer",function(){return l}),n.d(t,"defaultFilterOptions",function(){return a});var v=n(0),y=n.n(v),b=n(1),_=n.n(b),w=n(17),C=(n.n(w),n(418)),A=n.n(C),E=n(75),S=n.n(E);r.propTypes={onMouseDown:_.a.func};var x=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}],F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k=(function(){function e(e){this.value=e}function t(t){function n(e,t){return new Promise(function(n,i){var s={key:e,arg:t,resolve:n,reject:i,next:null};a?a=a.next=s:(o=a=s,r(e,t))})}function r(n,o){try{var a=t[n](o),s=a.value;s instanceof e?Promise.resolve(s.value).then(function(e){r("next",e)},function(e){r("throw",e)}):i(a.done?"return":"normal",a.value)}catch(e){i("throw",e)}}function i(e,t){switch(e){case"return":o.resolve({value:t,done:!0});break;case"throw":o.reject(t);break;default:o.resolve({value:t,done:!1})}o=o.next,o?r(o.key,o.arg):a=null}var o,a;this._invoke=n,"function"!=typeof t.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(t.prototype[Symbol.asyncIterator]=function(){return this}),t.prototype.next=function(e){return this._invoke("next",e)},t.prototype.throw=function(e){return this._invoke("throw",e)},t.prototype.return=function(e){return this._invoke("return",e)}}(),function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}),D=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},L=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},P=function(e){function t(e){k(this,t);var n=L(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleMouseDown=n.handleMouseDown.bind(n),n.handleMouseEnter=n.handleMouseEnter.bind(n),n.handleMouseMove=n.handleMouseMove.bind(n),n.handleTouchStart=n.handleTouchStart.bind(n),n.handleTouchEnd=n.handleTouchEnd.bind(n),n.handleTouchMove=n.handleTouchMove.bind(n),n.onFocus=n.onFocus.bind(n),n}return R(t,e),D(t,[{key:"blockEvent",value:function(e){e.preventDefault(),e.stopPropagation(),"A"===e.target.tagName&&"href"in e.target&&(e.target.target?window.open(e.target.href,e.target.target):window.location.href=e.target.href)}},{key:"handleMouseDown",value:function(e){e.preventDefault(),e.stopPropagation(),this.props.onSelect(this.props.option,e)}},{key:"handleMouseEnter",value:function(e){this.onFocus(e)}},{key:"handleMouseMove",value:function(e){this.onFocus(e)}},{key:"handleTouchEnd",value:function(e){this.dragging||this.handleMouseDown(e)}},{key:"handleTouchMove",value:function(e){this.dragging=!0}},{key:"handleTouchStart",value:function(e){this.dragging=!1}},{key:"onFocus",value:function(e){this.props.isFocused||this.props.onFocus(this.props.option,e)}},{key:"render",value:function(){var e=this.props,t=e.option,n=e.instancePrefix,r=e.optionIndex,i=S()(this.props.className,t.className);return t.disabled?y.a.createElement("div",{className:i,onMouseDown:this.blockEvent,onClick:this.blockEvent},this.props.children):y.a.createElement("div",{className:i,style:t.style,role:"option","aria-label":t.label,onMouseDown:this.handleMouseDown,onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd,id:n+"-option-"+r,title:t.title},this.props.children)}}]),t}(y.a.Component);P.propTypes={children:_.a.node,className:_.a.string,instancePrefix:_.a.string.isRequired,isDisabled:_.a.bool,isFocused:_.a.bool,isSelected:_.a.bool,onFocus:_.a.func,onSelect:_.a.func,onUnfocus:_.a.func,option:_.a.object.isRequired,optionIndex:_.a.number};var B=function(e){function t(e){k(this,t);var n=L(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleMouseDown=n.handleMouseDown.bind(n),n.onRemove=n.onRemove.bind(n),n.handleTouchEndRemove=n.handleTouchEndRemove.bind(n),n.handleTouchMove=n.handleTouchMove.bind(n),n.handleTouchStart=n.handleTouchStart.bind(n),n}return R(t,e),D(t,[{key:"handleMouseDown",value:function(e){if("mousedown"!==e.type||0===e.button)return this.props.onClick?(e.stopPropagation(),void this.props.onClick(this.props.value,e)):void(this.props.value.href&&e.stopPropagation())}},{key:"onRemove",value:function(e){e.preventDefault(),e.stopPropagation(),this.props.onRemove(this.props.value)}},{key:"handleTouchEndRemove",value:function(e){this.dragging||this.onRemove(e)}},{key:"handleTouchMove",value:function(e){this.dragging=!0}},{key:"handleTouchStart",value:function(e){this.dragging=!1}},{key:"renderRemoveIcon",value:function(){if(!this.props.disabled&&this.props.onRemove)return y.a.createElement("span",{className:"Select-value-icon","aria-hidden":"true",onMouseDown:this.onRemove,onTouchEnd:this.handleTouchEndRemove,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove},"×")}},{key:"renderLabel",value:function(){return this.props.onClick||this.props.value.href?y.a.createElement("a",{className:"Select-value-label",href:this.props.value.href,target:this.props.value.target,onMouseDown:this.handleMouseDown,onTouchEnd:this.handleMouseDown},this.props.children):y.a.createElement("span",{className:"Select-value-label",role:"option","aria-selected":"true",id:this.props.id},this.props.children)}},{key:"render",value:function(){return y.a.createElement("div",{className:S()("Select-value",this.props.value.className),style:this.props.value.style,title:this.props.value.title},this.renderRemoveIcon(),this.renderLabel())}}]),t}(y.a.Component);B.propTypes={children:_.a.node,disabled:_.a.bool,id:_.a.string,onClick:_.a.func,onRemove:_.a.func,value:_.a.object.isRequired};/*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/react-select */ var I=function(e){return"string"==typeof e?e:null!==e&&JSON.stringify(e)||""},N=_.a.oneOfType([_.a.string,_.a.node]),j=_.a.oneOfType([_.a.string,_.a.number]),z=1,H=function(e){function t(e){k(this,t);var n=L(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["clearValue","focusOption","handleInputBlur","handleInputChange","handleInputFocus","handleInputValueChange","handleKeyDown","handleMenuScroll","handleMouseDown","handleMouseDownOnArrow","handleMouseDownOnMenu","handleRequired","handleTouchOutside","handleTouchMove","handleTouchStart","handleTouchEnd","handleTouchEndClearValue","handleValueClick","getOptionLabel","onOptionRef","removeValue","selectValue"].forEach(function(e){return n[e]=n[e].bind(n)}),n.state={inputValue:"",isFocused:!1,isOpen:!1,isPseudoFocused:!1,required:!1},n}return R(t,e),D(t,[{key:"componentWillMount",value:function(){this._instancePrefix="react-select-"+(this.props.instanceId||++z)+"-";var e=this.getValueArray(this.props.value);this.props.required&&this.setState({required:this.handleRequired(e[0],this.props.multi)})}},{key:"componentDidMount",value:function(){void 0!==this.props.autofocus&&"undefined"!=typeof console&&console.warn("Warning: The autofocus prop has changed to autoFocus, support will be removed after [email protected]"),(this.props.autoFocus||this.props.autofocus)&&this.focus()}},{key:"componentWillReceiveProps",value:function(e){var t=this.getValueArray(e.value,e);e.required?this.setState({required:this.handleRequired(t[0],e.multi)}):this.props.required&&this.setState({required:!1})}},{key:"componentDidUpdate",value:function(e,t){if(this.menu&&this.focused&&this.state.isOpen&&!this.hasScrolledToOption){var n=Object(w.findDOMNode)(this.focused),r=Object(w.findDOMNode)(this.menu),i=r.scrollTop,o=i+r.offsetHeight,a=n.offsetTop,s=a+n.offsetHeight;(i>a||od.bottom?u.scrollTop=l.offsetTop+l.clientHeight-u.offsetHeight:c.topt.offsetHeight&&t.scrollHeight-t.offsetHeight-t.scrollTop<=0&&this.props.onMenuScrollToBottom()}}},{key:"handleRequired",value:function(e,t){return!e||(t?0===e.length:0===Object.keys(e).length)}},{key:"getOptionLabel",value:function(e){return e[this.props.labelKey]}},{key:"getValueArray",value:function(e,t){var n=this,r="object"===(void 0===t?"undefined":F(t))?t:this.props;if(r.multi){if("string"==typeof e&&(e=e.split(r.delimiter)),!Array.isArray(e)){if(null===e||void 0===e)return[];e=[e]}return e.map(function(e){return n.expandValue(e,r)}).filter(function(e){return e})}var i=this.expandValue(e,r);return i?[i]:[]}},{key:"expandValue",value:function(e,t){var n=void 0===e?"undefined":F(e);if("string"!==n&&"number"!==n&&"boolean"!==n)return e;var r=t.options,i=t.valueKey;if(r)for(var o=0;or&&this.focusOption(n[r+1])}},{key:"popValue",value:function(){var e=this.getValueArray(this.props.value);e.length&&!1!==e[e.length-1].clearableValue&&this.setValue(this.props.multi?e.slice(0,e.length-1):null)}},{key:"removeValue",value:function(e){var t=this,n=this.getValueArray(this.props.value);this.setValue(n.filter(function(n){return n[t.props.valueKey]!==e[t.props.valueKey]})),this.focus()}},{key:"clearValue",value:function(e){e&&"mousedown"===e.type&&0!==e.button||(e.preventDefault(),this.setValue(this.getResetValue()),this.setState({isOpen:!1,inputValue:this.handleInputValueChange("")},this.focus))}},{key:"getResetValue",value:function(){return void 0!==this.props.resetValue?this.props.resetValue:this.props.multi?[]:null}},{key:"focusOption",value:function(e){this.setState({focusedOption:e})}},{key:"focusNextOption",value:function(){this.focusAdjacentOption("next")}},{key:"focusPreviousOption",value:function(){this.focusAdjacentOption("previous")}},{key:"focusPageUpOption",value:function(){this.focusAdjacentOption("page_up")}},{key:"focusPageDownOption",value:function(){this.focusAdjacentOption("page_down")}},{key:"focusStartOption",value:function(){this.focusAdjacentOption("start")}},{key:"focusEndOption",value:function(){this.focusAdjacentOption("end")}},{key:"focusAdjacentOption",value:function(e){var t=this._visibleOptions.map(function(e,t){return{option:e,index:t}}).filter(function(e){return!e.option.disabled});if(this._scrollToFocusedOptionOnUpdate=!0,!this.state.isOpen)return void this.setState({isOpen:!0,inputValue:"",focusedOption:this._focusedOption||(t.length?t["next"===e?0:t.length-1].option:null)});if(t.length){for(var n=-1,r=0;r0?n-=1:n=t.length-1;else if("start"===e)n=0;else if("end"===e)n=t.length-1;else if("page_up"===e){var i=n-this.props.pageSize;n=i<0?0:i}else if("page_down"===e){var i=n+this.props.pageSize;n=i>t.length-1?t.length-1:i}-1===n&&(n=0),this.setState({focusedIndex:t[n].index,focusedOption:t[n].option})}}},{key:"getFocusedOption",value:function(){return this._focusedOption}},{key:"selectFocusedOption",value:function(){if(this._focusedOption)return this.selectValue(this._focusedOption)}},{key:"renderLoading",value:function(){if(this.props.isLoading)return y.a.createElement("span",{className:"Select-loading-zone","aria-hidden":"true"},y.a.createElement("span",{className:"Select-loading"}))}},{key:"renderValue",value:function(e,t){var n=this,r=this.props.valueRenderer||this.getOptionLabel,i=this.props.valueComponent;if(!e.length)return this.state.inputValue?null:y.a.createElement("div",{className:"Select-placeholder"},this.props.placeholder);var o=this.props.onValueClick?this.handleValueClick:null;return this.props.multi?e.map(function(e,t){return y.a.createElement(i,{id:n._instancePrefix+"-value-"+t,instancePrefix:n._instancePrefix,disabled:n.props.disabled||!1===e.clearableValue,key:"value-"+t+"-"+e[n.props.valueKey],onClick:o,onRemove:n.removeValue,value:e},r(e,t),y.a.createElement("span",{className:"Select-aria-only"}," "))}):this.state.inputValue?void 0:(t&&(o=null),y.a.createElement(i,{id:this._instancePrefix+"-value-item",disabled:this.props.disabled,instancePrefix:this._instancePrefix,onClick:o,value:e[0]},r(e[0])))}},{key:"renderInput",value:function(e,t){var n,r=this,i=S()("Select-input",this.props.inputProps.className),o=!!this.state.isOpen,a=S()((n={},T(n,this._instancePrefix+"-list",o),T(n,this._instancePrefix+"-backspace-remove-message",this.props.multi&&!this.props.disabled&&this.state.isFocused&&!this.state.inputValue),n)),s=M({},this.props.inputProps,{role:"combobox","aria-expanded":""+o,"aria-owns":a,"aria-haspopup":""+o,"aria-activedescendant":o?this._instancePrefix+"-option-"+t:this._instancePrefix+"-value","aria-describedby":this.props["aria-describedby"],"aria-labelledby":this.props["aria-labelledby"],"aria-label":this.props["aria-label"],className:i,tabIndex:this.props.tabIndex,onBlur:this.handleInputBlur,onChange:this.handleInputChange,onFocus:this.handleInputFocus,ref:function(e){return r.input=e},required:this.state.required,value:this.state.inputValue});if(this.props.inputRenderer)return this.props.inputRenderer(s);if(this.props.disabled||!this.props.searchable){var l=this.props.inputProps,u=(l.inputClassName,O(l,["inputClassName"])),c=S()(T({},this._instancePrefix+"-list",o));return y.a.createElement("div",M({},u,{role:"combobox","aria-expanded":o,"aria-owns":c,"aria-activedescendant":o?this._instancePrefix+"-option-"+t:this._instancePrefix+"-value","aria-labelledby":this.props["aria-labelledby"],"aria-label":this.props["aria-label"],className:i,tabIndex:this.props.tabIndex||0,onBlur:this.handleInputBlur,onFocus:this.handleInputFocus,ref:function(e){return r.input=e},"aria-disabled":""+!!this.props.disabled,style:{border:0,width:1,display:"inline-block"}}))}return this.props.autosize?y.a.createElement(A.a,M({id:this.props.id},s,{minWidth:"5"})):y.a.createElement("div",{className:i,key:"input-wrap"},y.a.createElement("input",M({id:this.props.id},s)))}},{key:"renderClear",value:function(){var e=this.getValueArray(this.props.value);if(this.props.clearable&&e.length&&!this.props.disabled&&!this.props.isLoading){var t=this.props.clearRenderer();return y.a.createElement("span",{className:"Select-clear-zone",title:this.props.multi?this.props.clearAllText:this.props.clearValueText,"aria-label":this.props.multi?this.props.clearAllText:this.props.clearValueText,onMouseDown:this.clearValue,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEndClearValue},t)}}},{key:"renderArrow",value:function(){if(this.props.arrowRenderer){var e=this.handleMouseDownOnArrow,t=this.state.isOpen,n=this.props.arrowRenderer({onMouseDown:e,isOpen:t});return n?y.a.createElement("span",{className:"Select-arrow-zone",onMouseDown:e},n):null}}},{key:"filterOptions",value:function(e){var t=this.state.inputValue,n=this.props.options||[];if(this.props.filterOptions){return("function"==typeof this.props.filterOptions?this.props.filterOptions:a)(n,t,e,{filterOption:this.props.filterOption,ignoreAccents:this.props.ignoreAccents,ignoreCase:this.props.ignoreCase,labelKey:this.props.labelKey,matchPos:this.props.matchPos,matchProp:this.props.matchProp,valueKey:this.props.valueKey,trimFilter:this.props.trimFilter})}return n}},{key:"onOptionRef",value:function(e,t){t&&(this.focused=e)}},{key:"renderMenu",value:function(e,t,n){return e&&e.length?this.props.menuRenderer({focusedOption:n,focusOption:this.focusOption,inputValue:this.state.inputValue,instancePrefix:this._instancePrefix,labelKey:this.props.labelKey,onFocus:this.focusOption,onSelect:this.selectValue,optionClassName:this.props.optionClassName,optionComponent:this.props.optionComponent,optionRenderer:this.props.optionRenderer||this.getOptionLabel,options:e,selectValue:this.selectValue,removeValue:this.removeValue,valueArray:t,valueKey:this.props.valueKey,onOptionRef:this.onOptionRef}):this.props.noResultsText?y.a.createElement("div",{className:"Select-noresults"},this.props.noResultsText):null}},{key:"renderHiddenField",value:function(e){var t=this;if(this.props.name){if(this.props.joinValues){var n=e.map(function(e){return I(e[t.props.valueKey])}).join(this.props.delimiter);return y.a.createElement("input",{type:"hidden",ref:function(e){return t.value=e},name:this.props.name,value:n,disabled:this.props.disabled})}return e.map(function(e,n){return y.a.createElement("input",{key:"hidden."+n,type:"hidden",ref:"value"+n,name:t.props.name,value:I(e[t.props.valueKey]),disabled:t.props.disabled})})}}},{key:"getFocusableOptionIndex",value:function(e){var t=this._visibleOptions;if(!t.length)return null;var n=this.props.valueKey,r=this.state.focusedOption||e;if(r&&!r.disabled){var i=-1;if(t.some(function(e,t){var o=e[n]===r[n];return o&&(i=t),o}),-1!==i)return i}for(var o=0;o=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(exports,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t0&&!--r&&(n(),n=null)}},function(e,exports,t){exports=e.exports=t(14)(void 0),exports.push([e.i,".Select{position:relative}.Select input::-webkit-contacts-auto-fill-button,.Select input::-webkit-credentials-auto-fill-button{display:none!important}.Select input::-ms-clear,.Select input::-ms-reveal{display:none!important}.Select,.Select div,.Select input,.Select span{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.Select.is-disabled .Select-arrow-zone{cursor:default;pointer-events:none;opacity:.35}.Select.is-disabled>.Select-control{background-color:#f9f9f9}.Select.is-disabled>.Select-control:hover{box-shadow:none}.Select.is-open>.Select-control{border-bottom-right-radius:0;border-bottom-left-radius:0;background:#fff;border-color:#b3b3b3 #ccc #d9d9d9}.Select.is-open>.Select-control .Select-arrow{top:-2px;border-color:transparent transparent #999;border-width:0 5px 5px}.Select.is-searchable.is-focused:not(.is-open)>.Select-control,.Select.is-searchable.is-open>.Select-control{cursor:text}.Select.is-focused>.Select-control{background:#fff}.Select.is-focused:not(.is-open)>.Select-control{border-color:#007eff;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 0 3px rgba(0,126,255,.1);background:#fff}.Select.has-value.is-clearable.Select--single>.Select-control .Select-value{padding-right:42px}.Select.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value .Select-value-label,.Select.has-value.Select--single>.Select-control .Select-value .Select-value-label{color:#333}.Select.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value a.Select-value-label,.Select.has-value.Select--single>.Select-control .Select-value a.Select-value-label{cursor:pointer;text-decoration:none}.Select.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value a.Select-value-label:focus,.Select.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value a.Select-value-label:hover,.Select.has-value.Select--single>.Select-control .Select-value a.Select-value-label:focus,.Select.has-value.Select--single>.Select-control .Select-value a.Select-value-label:hover{color:#007eff;outline:none;text-decoration:underline}.Select.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value a.Select-value-label:focus,.Select.has-value.Select--single>.Select-control .Select-value a.Select-value-label:focus{background:#fff}.Select.has-value.is-pseudo-focused .Select-input{opacity:0}.Select.is-open .Select-arrow,.Select .Select-arrow-zone:hover>.Select-arrow{border-top-color:#666}.Select.Select--rtl{direction:rtl;text-align:right}.Select-control{background-color:#fff;border-color:#d9d9d9 #ccc #b3b3b3;border-radius:4px;border:1px solid #ccc;color:#333;cursor:default;display:table;border-spacing:0;border-collapse:separate;height:36px;outline:none;overflow:hidden;position:relative;width:100%}.Select-control:hover{box-shadow:0 1px 0 rgba(0,0,0,.06)}.Select-control .Select-input:focus{outline:none;background:#fff}.Select--single>.Select-control .Select-value,.Select-placeholder{bottom:0;color:#aaa;left:0;line-height:34px;padding-left:10px;padding-right:10px;position:absolute;right:0;top:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.Select-input{height:34px;padding-left:10px;padding-right:10px;vertical-align:middle}.Select-input>input{width:100%;background:none transparent;border:0 none;box-shadow:none;cursor:default;display:inline-block;font-family:inherit;font-size:inherit;margin:0;outline:none;line-height:17px;padding:8px 0 12px;-webkit-appearance:none}.is-focused .Select-input>input{cursor:text}.has-value.is-pseudo-focused .Select-input{opacity:0}.Select-control:not(.is-searchable)>.Select-input{outline:none}.Select-loading-zone{cursor:pointer;display:table-cell;text-align:center}.Select-loading,.Select-loading-zone{position:relative;vertical-align:middle;width:16px}.Select-loading{-webkit-animation:Select-animation-spin .4s infinite linear;-o-animation:Select-animation-spin .4s infinite linear;animation:Select-animation-spin .4s infinite linear;height:16px;box-sizing:border-box;border-radius:50%;border:2px solid #ccc;border-right-color:#333;display:inline-block}.Select-clear-zone{-webkit-animation:Select-animation-fadeIn .2s;-o-animation:Select-animation-fadeIn .2s;animation:Select-animation-fadeIn .2s;color:#999;cursor:pointer;display:table-cell;position:relative;text-align:center;vertical-align:middle;width:17px}.Select-clear-zone:hover{color:#d0021b}.Select-clear{display:inline-block;font-size:18px;line-height:1}.Select--multi .Select-clear-zone{width:17px}.Select-arrow-zone{cursor:pointer;display:table-cell;position:relative;text-align:center;vertical-align:middle;width:25px;padding-right:5px}.Select--rtl .Select-arrow-zone{padding-right:0;padding-left:5px}.Select-arrow{border-color:#999 transparent transparent;border-style:solid;border-width:5px 5px 2.5px;display:inline-block;height:0;width:0;position:relative}.Select-control>:last-child{padding-right:5px}.Select--multi .Select-multi-value-wrapper{display:inline-block}.Select .Select-aria-only{position:absolute;display:inline-block;height:1px;width:1px;margin:-1px;clip:rect(0,0,0,0);overflow:hidden;float:left}@-webkit-keyframes Select-animation-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes Select-animation-fadeIn{0%{opacity:0}to{opacity:1}}.Select-menu-outer{border-bottom-right-radius:4px;border-bottom-left-radius:4px;background-color:#fff;border:1px solid #ccc;border-top-color:#e6e6e6;box-shadow:0 1px 0 rgba(0,0,0,.06);box-sizing:border-box;margin-top:-1px;max-height:200px;position:absolute;top:100%;width:100%;z-index:1;-webkit-overflow-scrolling:touch}.Select-menu{max-height:198px;overflow-y:auto}.Select-option{box-sizing:border-box;background-color:#fff;color:#666;cursor:pointer;display:block;padding:8px 10px}.Select-option:last-child{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.Select-option.is-selected{background-color:#f5faff;background-color:rgba(0,126,255,.04);color:#333}.Select-option.is-focused{background-color:#ebf5ff;background-color:rgba(0,126,255,.08);color:#333}.Select-option.is-disabled{color:#ccc;cursor:default}.Select-noresults{box-sizing:border-box;color:#999;cursor:default;display:block;padding:8px 10px}.Select--multi .Select-input{vertical-align:middle;margin-left:10px;padding:0}.Select--multi.Select--rtl .Select-input{margin-left:0;margin-right:10px}.Select--multi.has-value .Select-input{margin-left:5px}.Select--multi .Select-value{background-color:#ebf5ff;background-color:rgba(0,126,255,.08);border-radius:2px;border:1px solid #c2e0ff;border:1px solid rgba(0,126,255,.24);color:#007eff;display:inline-block;font-size:.9em;line-height:1.4;margin-left:5px;margin-top:5px;vertical-align:top}.Select--multi .Select-value-icon,.Select--multi .Select-value-label{display:inline-block;vertical-align:middle}.Select--multi .Select-value-label{border-bottom-right-radius:2px;border-top-right-radius:2px;cursor:default;padding:2px 5px}.Select--multi a.Select-value-label{color:#007eff;cursor:pointer;text-decoration:none}.Select--multi a.Select-value-label:hover{text-decoration:underline}.Select--multi .Select-value-icon{cursor:pointer;border-bottom-left-radius:2px;border-top-left-radius:2px;border-right:1px solid #c2e0ff;border-right:1px solid rgba(0,126,255,.24);padding:1px 5px 3px}.Select--multi .Select-value-icon:focus,.Select--multi .Select-value-icon:hover{background-color:#d8eafd;background-color:rgba(0,113,230,.08);color:#0071e6}.Select--multi .Select-value-icon:active{background-color:#c2e0ff;background-color:rgba(0,126,255,.24)}.Select--multi.Select--rtl .Select-value{margin-left:0;margin-right:5px}.Select--multi.Select--rtl .Select-value-icon{border-right:none;border-left:1px solid #c2e0ff;border-left:1px solid rgba(0,126,255,.24)}.Select--multi.is-disabled .Select-value{background-color:#fcfcfc;border:1px solid #e3e3e3;color:#333}.Select--multi.is-disabled .Select-value-icon{cursor:not-allowed;border-right:1px solid #e3e3e3}.Select--multi.is-disabled .Select-value-icon:active,.Select--multi.is-disabled .Select-value-icon:focus,.Select--multi.is-disabled .Select-value-icon:hover{background-color:#fcfcfc}@keyframes Select-animation-spin{to{transform:rotate(1turn)}}@-webkit-keyframes Select-animation-spin{to{-webkit-transform:rotate(1turn)}}",""])},function(e,exports,t){var n,r=0,i=t(422);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(exports.locals=i.locals),exports.use=exports.ref=function(){return r++||(n=t(15)(i,{})),exports},exports.unuse=exports.unref=function(){r>0&&!--r&&(n(),n=null)}},function(e,exports,t){exports=e.exports=t(14)(void 0),exports.push([e.i,".select-sm .Select-control,.select-sm .Select-input,.select-sm .Select-input>input{height:28px}.select-sm .Select-placeholder,.select-sm .Select-value{line-height:28px!important}.select-sm .Select-input>input{padding:0}",""])},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(13),u=t(33),c=n(u),d=t(424),h=(n(d),a.default.createClass({displayName:"KeyValueTable",propTypes:{pairs:i.default.object.isRequired,headers:i.default.array,editable:i.default.bool,onChange:i.default.func,className:i.default.string,containerClassName:i.default.string,actionsSize:i.default.oneOf(["large","medium","small","xsmall"])},getInitialState:function(){return{newKey:"",newValue:""}},getDefaultProps:function(){return{headers:["Name","Value","Actions"],editable:!1,actionsSize:"xsmall",className:"",containerClassName:""}},_onPairsChange:function(e){this.props.onChange&&this.props.onChange(e)},_bindValue:function(e){var t={};t[e.target.name]=e.target.value,this.setState(t)},_addRow:function(){var e=c.default.clone(this.props.pairs);e[this.state.newKey]=this.state.newValue,this._onPairsChange(e),this.setState({newKey:"",newValue:""})},_deleteRow:function(e){var t=this;return function(){if(window.confirm("Are you sure you want to delete property '"+e+"'?")){var n=c.default.clone(t.props.pairs);delete n[e],t._onPairsChange(n)}}},_formattedHeaders:function(e){var t=this;return a.default.createElement("tr",null,e.map(function(n,r){var i={};if(r===e.length-1){if(!t.props.editable)return null;i.width=75}return a.default.createElement("th",{key:n,style:i},n)}))},_formattedRows:function(e){var t=this;return Object.keys(e).sort().map(function(n){var r=void 0;if(t.props.editable){var i=[];i.push(a.default.createElement(s.Button,{key:"delete-"+n,bsStyle:"danger",bsSize:t.props.actionsSize,onClick:t._deleteRow(n)},"Delete")),r=a.default.createElement("td",null,i)}return a.default.createElement("tr",{key:n},a.default.createElement("td",null,n),a.default.createElement("td",null,e[n]),r)})},_newRow:function(){if(!this.props.editable)return null;var e=!this.state.newKey||!this.state.newValue;return a.default.createElement("tr",null,a.default.createElement("td",null,a.default.createElement(l.Input,{type:"text",name:"newKey",id:"newKey",bsSize:"small",placeholder:this.props.headers[0],value:this.state.newKey,onChange:this._bindValue})),a.default.createElement("td",null,a.default.createElement(l.Input,{type:"text",name:"newValue",id:"newValue",bsSize:"small",placeholder:this.props.headers[1],value:this.state.newValue,onChange:this._bindValue})),a.default.createElement("td",null,a.default.createElement(s.Button,{bsStyle:"success",bsSize:"small",onClick:this._addRow,disabled:e},"Add")))},render:function(){return a.default.createElement("div",{className:"key-value-table-component"},a.default.createElement("div",{className:"table-responsive "+this.props.containerClassName},a.default.createElement("table",{className:"table table-striped "+this.props.className},a.default.createElement("thead",null,this._formattedHeaders(this.props.headers)),a.default.createElement("tbody",null,this._formattedRows(this.props.pairs),this._newRow()))))}}));exports.default=h,e.exports=exports.default},function(e,exports,t){var n=t(425);"string"==typeof n&&(n=[[e.i,n,""]]);var r={};r.transform=void 0;t(15)(n,r);n.locals&&(e.exports=n.locals)},function(e,exports,t){exports=e.exports=t(14)(void 0),exports.push([e.i,".form-horizontal .form-group .key-value-table-component .form-group{margin-left:0;margin-right:0}",""])},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t0&&!--r&&(n(),n=null)}},function(e,exports,t){exports=e.exports=t(14)(void 0),exports.push([e.i,"body{background:url("+t(432)+") no-repeat 50% fixed;-moz-background-size:cover;-webkit-background-size:cover;-o-background-size:cover;background-size:cover}.jumbotron-container{height:82vh}.jumbotron{background-color:hsla(0,0%,100%,.8);text-align:center}.jumbotron h1{font-size:52px;margin-bottom:15px}",""])},function(e,exports,t){e.exports=t.p+"31a71554a7917f4d60fb34b775a158da.jpg"},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(13),u=a.default.createClass({displayName:"PaginatedList",propTypes:{children:i.default.node.isRequired,onChange:i.default.func.isRequired,pageSize:i.default.number,pageSizes:i.default.arrayOf(i.default.number),totalItems:i.default.number.isRequired,showPageSizeSelect:i.default.bool},getDefaultProps:function(){var e=[10,50,100];return{pageSizes:e,pageSize:e[0],showPageSizeSelect:!0}},getInitialState:function(){return{currentPage:1,pageSize:this.props.pageSize}},_onChangePageSize:function(e){e.preventDefault();var t=Number(e.target.value);this.setState({pageSize:t}),this.props.onChange(this.state.currentPage,t)},_onChangePage:function(e,t){t.preventDefault();var n=Number(e);this.setState({currentPage:n}),this.props.onChange(n,this.state.pageSize)},_pageSizeSelect:function(){return this.props.showPageSizeSelect?a.default.createElement("div",{className:"form-inline page-size",style:{float:"right"}},a.default.createElement(l.Input,{type:"select",bsSize:"small",label:"Show:",value:this.state.pageSize,onChange:this._onChangePageSize},this.props.pageSizes.map(function(e){return a.default.createElement("option",{key:"option-"+e,value:e},e)}))):null},render:function(){var e=Math.ceil(this.props.totalItems/this.state.pageSize);return 0===e?a.default.createElement("span",null,this.props.children):a.default.createElement("span",null,this._pageSizeSelect(),this.props.children,a.default.createElement("div",{className:"text-center"},a.default.createElement(s.Pagination,{bsSize:"small",items:e,maxButtons:10,activePage:this.state.currentPage,onSelect:this._onChangePage,prev:!0,next:!0,first:!0,last:!0})))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(28),l=n(s),u=a.default.createClass({displayName:"Pluralize",propTypes:{singular:i.default.string.isRequired,plural:i.default.string.isRequired,value:i.default.oneOfType([i.default.number,i.default.string]).isRequired},render:function(){return a.default.createElement("span",null,l.default.pluralize(this.props.value,this.props.singular,this.props.plural))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(436);t(443),t(445);var l=t(447),u=n(l),c=(0,s.WidthProvider)(s.Responsive),d={xxl:6,xl:5,lg:4,md:3,sm:2,xs:1},h={xxl:350*d.xxl,xl:350*d.xl,lg:350*d.lg,md:350*d.md,sm:350*d.sm,xs:350*d.xs},f=a.default.createClass({displayName:"ReactGridContainer",propTypes:{positions:i.default.object.isRequired,children:i.default.node.isRequired,onPositionsChange:i.default.func.isRequired,locked:i.default.bool,isResizable:a.default.PropTypes.bool,rowHeight:a.default.PropTypes.number},getDefaultProps:function(){return{locked:!1,isResizable:!0,rowHeight:200}},_onLayoutChange:function(e){var t=[];e.forEach(function(e){t.push({id:e.i,col:e.x+1,row:e.y+1,height:e.h,width:e.w})}),this.props.onPositionsChange(t)},render:function(){var e=this.props,t=e.children,n=e.locked,r=e.isResizable,i=e.positions,o=e.rowHeight,s=Object.keys(i).map(function(e){var t=i[e],n=t.col,r=t.row,o=t.height,a=t.width;return{i:e,x:n?Math.max(n-1,0):0,y:void 0===r||r<=0?1/0:r-1,h:o||1,w:a||1}});return a.default.createElement(c,{className:u.default.reactGridLayout+" "+(n||!r?"locked":"unlocked"),layouts:{xxl:s,xl:s,lg:s,md:s,sm:s,xs:s},breakpoints:h,cols:d,rowHeight:o,margin:[10,10],onDragStop:this._onLayoutChange,onResizeStop:this._onLayoutChange,draggableHandle:n?".no-handle":""},t)}});exports.default=f,e.exports=exports.default},function(e,exports,t){e.exports=t(149).default,e.exports.utils=t(60),e.exports.Responsive=t(441).default,e.exports.Responsive.utils=t(152),e.exports.WidthProvider=t(442).default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}exports.__esModule=!0;var a=Object.assign||function(e){for(var t=1;te.w||n>e.maxW?new Error("minWidth larger than item width/maxWidth"):void 0},maxW:function(e,t){var n=e[t];return"number"!=typeof n?new Error("maxWidth not Number"):ne.h||n>e.maxH?new Error("minHeight larger than item height/maxHeight"):void 0},maxH:function(e,t){var n=e[t];return"number"!=typeof n?new Error("maxHeight not Number"):n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}exports.__esModule=!0;var s=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}exports.__esModule=!0;var s=Object.assign||function(e){for(var t=1;t.react-resizable-handle{position:absolute;width:20px;height:20px;bottom:0;right:0;background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg08IS0tIEdlbmVyYXRvcjogQWRvYmUgRmlyZXdvcmtzIENTNiwgRXhwb3J0IFNWRyBFeHRlbnNpb24gYnkgQWFyb24gQmVhbGwgKGh0dHA6Ly9maXJld29ya3MuYWJlYWxsLmNvbSkgLiBWZXJzaW9uOiAwLjYuMSAgLS0+DTwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DTxzdmcgaWQ9IlVudGl0bGVkLVBhZ2UlMjAxIiB2aWV3Qm94PSIwIDAgNiA2IiBzdHlsZT0iYmFja2dyb3VuZC1jb2xvcjojZmZmZmZmMDAiIHZlcnNpb249IjEuMSINCXhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbDpzcGFjZT0icHJlc2VydmUiDQl4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjZweCIgaGVpZ2h0PSI2cHgiDT4NCTxnIG9wYWNpdHk9IjAuMzAyIj4NCQk8cGF0aCBkPSJNIDYgNiBMIDAgNiBMIDAgNC4yIEwgNCA0LjIgTCA0LjIgNC4yIEwgNC4yIDAgTCA2IDAgTCA2IDYgTCA2IDYgWiIgZmlsbD0iIzAwMDAwMCIvPg0JPC9nPg08L3N2Zz4=");background-position:100% 100%;padding:0 3px 3px 0;background-repeat:no-repeat;background-origin:content-box;box-sizing:border-box;cursor:se-resize}',""])},function(e,exports,t){var n=t(446);"string"==typeof n&&(n=[[e.i,n,""]]);var r={};r.transform=void 0;t(15)(n,r);n.locals&&(e.exports=n.locals)},function(e,exports,t){exports=e.exports=t(14)(void 0),exports.push([e.i,'.react-resizable{position:relative}.react-resizable-handle{position:absolute;width:20px;height:20px;bottom:0;right:0;background:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+");background-position:100% 100%;padding:0 3px 3px 0;background-repeat:no-repeat;background-origin:content-box;box-sizing:border-box;cursor:se-resize}',""])},function(e,exports,t){var n=t(448);"string"==typeof n&&(n=[[e.i,n,""]]);var r={};r.transform=void 0;t(15)(n,r);n.locals&&(e.exports=n.locals)},function(e,exports,t){exports=e.exports=t(14)(void 0),exports.push([e.i,"._345dcY1IaqNI2CcWZdsmJa{margin:-10px -10px 0}._345dcY1IaqNI2CcWZdsmJa.unlocked .react-draggable{cursor:move}._345dcY1IaqNI2CcWZdsmJa.locked .react-resizable-handle{display:none}._345dcY1IaqNI2CcWZdsmJa .react-grid-placeholder{background:#16ace3}",""]),exports.locals={reactGridLayout:"_345dcY1IaqNI2CcWZdsmJa"}},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(11),u=a.default.createClass({displayName:"SearchForm",propTypes:{onSearch:i.default.func.isRequired,onReset:i.default.func,label:i.default.string,placeholder:i.default.string,wrapperClass:i.default.string,queryWidth:i.default.any,topMargin:i.default.number,buttonLeftMargin:i.default.number,searchBsStyle:i.default.string,searchButtonLabel:i.default.string,resetButtonLabel:i.default.string,loadingLabel:i.default.string,useLoadingState:i.default.bool,children:i.default.oneOfType([i.default.arrayOf(i.default.element),i.default.element])},getDefaultProps:function(){return{placeholder:"Enter search query...",wrapperClass:"search",queryWidth:"auto",topMargin:15,buttonLeftMargin:5,searchBsStyle:"default",searchButtonLabel:"Search",resetButtonLabel:"Reset",loadingLabel:"Loading..."}},getInitialState:function(){return{isLoading:!1}},componentWillReceiveProps:function(){this._resetLoadingState()},_setLoadingState:function(){this.props.useLoadingState&&this.setState({isLoading:!0})},_resetLoadingState:function(){this.props.useLoadingState&&this.setState({isLoading:!1})},_onSearch:function(e){e.preventDefault(),this._setLoadingState(),this.props.onSearch(this.refs.query.value,this._resetLoadingState)},_onReset:function(){this._resetLoadingState(),this.refs.query.value="",this.props.onReset()},render:function(){return a.default.createElement("div",{className:this.props.wrapperClass,style:{marginTop:this.props.topMargin}},a.default.createElement("form",{className:"form-inline",onSubmit:this._onSearch},a.default.createElement("div",{className:"form-group"},this.props.label&&a.default.createElement("label",{className:"control-label"},this.props.label),a.default.createElement("input",{ref:"query",placeholder:this.props.placeholder,type:"text",style:{width:this.props.queryWidth},label:"Search",className:"query form-control",autoComplete:"off",spellCheck:"false"})),a.default.createElement("div",{className:"form-group",style:{marginLeft:this.props.buttonLeftMargin}},a.default.createElement(s.Button,{bsStyle:this.props.searchBsStyle,type:"submit",disabled:this.state.isLoading,className:"submit-button"},this.state.isLoading?a.default.createElement(l.Spinner,{text:this.props.loadingLabel}):this.props.searchButtonLabel)),this.props.onReset&&a.default.createElement("div",{className:"form-group",style:{marginLeft:this.props.buttonLeftMargin}},a.default.createElement(s.Button,{type:"reset",className:"reset-button",onClick:this._onReset},this.props.resetButtonLabel)),this.props.children))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(11),u=a.default.createClass({displayName:"SelectableList",propTypes:{options:i.default.any,selectedOptionsType:i.default.oneOf(["string","object"]),selectedOptions:i.default.arrayOf([i.default.string,i.default.object]),displayKey:i.default.string,idKey:i.default.string,onChange:i.default.func,autoFocus:i.default.bool},getDefaultProps:function(){return{selectedOptionsType:"string",displayKey:"label",idKey:"value"}},componentWillReceiveProps:function(e){this.props.selectedOptions!==e.selectedOptions&&this.refs.select.clearValue()},_getOptionId:function(e){return"string"==typeof e?e:e[this.props.idKey]},_getOptionDisplayValue:function(e){return"string"==typeof e?e:e[this.props.displayKey]},_onAddOption:function(e){var t=this;if(""!==e){var n=this.props.selectedOptions.slice();"string"===this.props.selectedOptionsType?n.push(e):n.push(this.props.options.filter(function(n){return t._getOptionId(n)===e})[0]),"function"==typeof this.props.onChange&&this.props.onChange(n)}},_onRemoveOption:function(e){var t=this;return function(){var n=t.props.selectedOptions.filter(function(t,n){return n!==e});"function"==typeof t.props.onChange&&t.props.onChange(n)}},render:function(){var e=this,t=this.props.selectedOptions.map(function(t,n){return a.default.createElement(s.ListGroupItem,{key:e._getOptionId(t)+"-"+n},a.default.createElement("div",{className:"pull-right"},a.default.createElement(s.Button,{bsStyle:"primary",bsSize:"xsmall",onClick:e._onRemoveOption(n)},"Remove")),e._getOptionDisplayValue(t))});return a.default.createElement("div",null,a.default.createElement(l.Select,{ref:"select",autoFocus:this.props.autoFocus,options:this.props.options,onChange:this._onAddOption,clearable:!1}),t.length>0&&a.default.createElement(s.ListGroup,{style:{marginTop:10}},t))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(153),u=t(537),c=n(u),d=t(180),h=n(d),f=a.default.createClass({displayName:"SortableList",propTypes:{disableDragging:i.default.bool,items:i.default.arrayOf(i.default.object).isRequired,onMoveItem:i.default.func},getDefaultProps:function(){return{disableDragging:!1}},getInitialState:function(){return{items:this.props.items}},componentWillReceiveProps:function(e){this.setState({items:e.items})},_moveItem:function(e,t){var n=this.state.items,r=n[e];n[e]=n[t],n[t]=r,this.setState({items:n}),"function"==typeof this.props.onMoveItem&&this.props.onMoveItem(n)},render:function(){var e=this,t=this.state.items.map(function(t,n){return a.default.createElement(h.default,{key:"sortable-list-item-"+t.id,disableDragging:e.props.disableDragging,index:n,id:t.id,content:t.title,moveItem:e._moveItem})});return a.default.createElement(s.ListGroup,{className:this.props.disableDragging?"sortable-list":"sortable-list sortable-list-cursor"},t)}});exports.default=(0,l.DragDropContext)(c.default)(f),e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(453);Object.defineProperty(exports,"DragDropManager",{enumerable:!0,get:function(){return n(r).default}});var i=t(517);Object.defineProperty(exports,"DragSource",{enumerable:!0,get:function(){return n(i).default}});var o=t(518);Object.defineProperty(exports,"DropTarget",{enumerable:!0,get:function(){return n(o).default}});var a=t(519);Object.defineProperty(exports,"createTestBackend",{enumerable:!0,get:function(){return n(a).default}})},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};r(this,e);var i=(0,a.default)(l.default);this.context=n,this.store=i,this.monitor=new h.default(i),this.registry=this.monitor.registry,this.backend=t(this),i.subscribe(this.handleRefCountChange.bind(this))}return i(e,[{key:"handleRefCountChange",value:function(){var e=this.store.getState().refCount>0;e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1)}},{key:"getContext",value:function(){return this.context}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.registry}},{key:"getActions",value:function(){function e(e){return function(){for(var r=arguments.length,i=Array(r),o=0;o0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];return{dirtyHandlerIds:(0,d.default)(e.dirtyHandlerIds,t,e.dragOperation),dragOffset:(0,o.default)(e.dragOffset,t),refCount:(0,u.default)(e.refCount,t),dragOperation:(0,s.default)(e.dragOperation,t),stateId:(0,f.default)(e.stateId)}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var i=t(156),o=n(i),a=t(463),s=n(a),l=t(499),u=n(l),c=t(166),d=n(c),h=t(511),f=n(h)},function(e,exports,t){"use strict";function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,t=arguments[1];switch(t.type){case a.BEGIN_DRAG:return r({},e,{itemType:t.itemType,item:t.item,sourceId:t.sourceId,isSourcePublic:t.isSourcePublic,dropResult:null,didDrop:!1});case a.PUBLISH_DRAG_SOURCE:return r({},e,{isSourcePublic:!0});case a.HOVER:return r({},e,{targetIds:t.targetIds});case s.REMOVE_TARGET:return-1===e.targetIds.indexOf(t.targetId)?e:r({},e,{targetIds:(0,o.default)(e.targetIds,t.targetId)});case a.DROP:return r({},e,{dropResult:t.dropResult,didDrop:!0,targetIds:[]});case a.END_DRAG:return r({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t-1}var r=t(80);e.exports=n},function(e,exports,t){function n(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}var r=t(80);e.exports=n},function(e,exports,t){var n=t(79),r=t(61),i=n(r,"Map");e.exports=i},function(e,exports,t){function n(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}var r=t(82);e.exports=n},function(e,exports){function t(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}e.exports=t},function(e,exports,t){function n(e){return r(this,e).get(e)}var r=t(82);e.exports=n},function(e,exports,t){function n(e){return r(this,e).has(e)}var r=t(82);e.exports=n},function(e,exports,t){function n(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}var r=t(82);e.exports=n},function(e,exports){function t(e){return this.__data__.set(e,n),this}var n="__lodash_hash_undefined__";e.exports=t},function(e,exports){function t(e){return this.__data__.has(e)}e.exports=t},function(e,exports,t){function n(e,t,n){return t===t?o(e,t,n):r(e,i,n)}var r=t(491),i=t(492),o=t(493);e.exports=n},function(e,exports){function t(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o0){if(++t>=n)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var n=800,r=16,i=Date.now;e.exports=t},function(e,exports,t){"use strict";function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch(arguments[1].type){case r.ADD_SOURCE:case r.ADD_TARGET:return e+1;case r.REMOVE_SOURCE:case r.REMOVE_TARGET:return e-1;default:return e}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=n;var r=t(84)},function(e,exports,t){var n=t(501),r=t(49),i=t(502),o=t(83),a=r(function(e){return i(n(e,o))});e.exports=a},function(e,exports){function t(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n=120&&v.length>=120)?new r(f&&v):void 0}v=e[0];var y=-1,b=p[0];e:for(;++y0&&void 0!==arguments[0]?arguments[0]:0)+1}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=n},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=n.handlerIds;(0,a.default)("function"==typeof e,"listener must be a function."),(0,a.default)(void 0===r||(0,l.default)(r),"handlerIds, when specified, must be an array of strings.");var i=this.store.getState().stateId,o=function(){var n=t.store.getState(),o=n.stateId;try{o===i||o===i+1&&!(0,p.areDirty)(n.dirtyHandlerIds,r)||e()}finally{i=o}};return this.store.subscribe(o)}},{key:"subscribeToOffsetChange",value:function(e){var t=this;(0,a.default)("function"==typeof e,"listener must be a function.");var n=this.store.getState().dragOffset,r=function(){var r=t.store.getState().dragOffset;r!==n&&(n=r,e())};return this.store.subscribe(r)}},{key:"canDragSource",value:function(e){var t=this.registry.getSource(e);return(0,a.default)(t,"Expected to find a valid source."),!this.isDragging()&&t.canDrag(this,e)}},{key:"canDropOnTarget",value:function(e){var t=this.registry.getTarget(e);if((0,a.default)(t,"Expected to find a valid target."),!this.isDragging()||this.didDrop())return!1;var n=this.registry.getTargetType(e),r=this.getItemType();return(0,c.default)(n,r)&&t.canDrop(this,e)}},{key:"isDragging",value:function(){return Boolean(this.getItemType())}},{key:"isDraggingSource",value:function(e){var t=this.registry.getSource(e,!0);return(0,a.default)(t,"Expected to find a valid source."),!(!this.isDragging()||!this.isSourcePublic())&&(this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e))}},{key:"isOverTarget",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1},n=t.shallow;if(!this.isDragging())return!1;var r=this.registry.getTargetType(e),i=this.getItemType();if(!(0,c.default)(r,i))return!1;var o=this.getTargetIds();if(!o.length)return!1;var a=o.indexOf(e);return n?a===o.length-1:a>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return(0,f.getSourceClientOffset)(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return(0,f.getDifferenceFromInitialOffset)(this.store.getState().dragOffset)}}]),e}();exports.default=g},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){(0,h.default)("function"==typeof e.canDrag,"Expected canDrag to be a function."),(0,h.default)("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),(0,h.default)("function"==typeof e.endDrag,"Expected endDrag to be a function.")}function o(e){(0,h.default)("function"==typeof e.canDrop,"Expected canDrop to be a function."),(0,h.default)("function"==typeof e.hover,"Expected hover to be a function."),(0,h.default)("function"==typeof e.drop,"Expected beginDrag to be a function.")}function a(e,t){if(t&&(0,p.default)(e))return void e.forEach(function(e){return a(e,!1)});(0,h.default)("string"==typeof e||"symbol"===(void 0===e?"undefined":c(e)),t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}function s(e){var t=(0,b.default)().toString();switch(e){case _.SOURCE:return"S"+t;case _.TARGET:return"T"+t;default:(0,h.default)(!1,"Unknown role: "+e)}}function l(e){switch(e[0]){case"S":return _.SOURCE;case"T":return _.TARGET;default:(0,h.default)(!1,"Cannot parse handler ID: "+e)}}Object.defineProperty(exports,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;nu){for(var t=0,n=a.length-l;t1&&void 0!==arguments[1]?arguments[1]:{};return S.default.apply(void 0,["DragLayer","collect[, options]"].concat(Array.prototype.slice.call(arguments))),(0,b.default)("function"==typeof e,'Expected "collect" provided as the first argument to DragLayer to be a function that collects props to inject into the component. ',"Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-layer.html",e),(0,b.default)((0,v.default)(t),'Expected "options" provided as the second argument to DragLayer to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-layer.html',t),function(n){var a,h,p=t.arePropsEqual,m=void 0===p?A.default:p,v=n.displayName||n.name||"Component",y=(h=a=function(t){function a(e,t){r(this,a);var n=i(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,e));return n.handleChange=n.handleChange.bind(n),n.manager=t.dragDropManager,(0,b.default)("object"===l(n.manager),"Could not find the drag and drop manager in the context of %s. Make sure to wrap the top-level component of your app with DragDropContext. Read more: http://react-dnd.github.io/react-dnd/docs-troubleshooting.html#could-not-find-the-drag-and-drop-manager-in-the-context",v,v),n.state=n.getCurrentState(),n}return o(a,t),u(a,[{key:"getDecoratedComponentInstance",value:function(){return(0,b.default)(this.child,"In order to access an instance of the decorated component it can not be a stateless component."),this.child}},{key:"shouldComponentUpdate",value:function(e,t){return!m(e,this.props)||!(0,w.default)(t,this.state)}}]),u(a,[{key:"componentDidMount",value:function(){this.isCurrentlyMounted=!0;var e=this.manager.getMonitor();this.unsubscribeFromOffsetChange=e.subscribeToOffsetChange(this.handleChange),this.unsubscribeFromStateChange=e.subscribeToStateChange(this.handleChange),this.handleChange()}},{key:"componentWillUnmount",value:function(){this.isCurrentlyMounted=!1,this.unsubscribeFromOffsetChange(),this.unsubscribeFromStateChange()}},{key:"handleChange",value:function(){if(this.isCurrentlyMounted){var e=this.getCurrentState();(0,w.default)(e,this.state)||this.setState(e)}}},{key:"getCurrentState",value:function(){var t=this.manager.getMonitor();return e(t)}},{key:"render",value:function(){var e=this;return d.default.createElement(n,s({},this.props,this.state,{ref:function(t){e.child=t}}))}}]),a}(c.Component),a.DecoratedComponent=n,a.displayName="DragLayer("+v+")",a.contextTypes={dragDropManager:f.default.object.isRequired},h);return(0,g.default)(y,n)}}Object.defineProperty(exports,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:{};u.default.apply(void 0,["DragSource","type, spec, collect[, options]"].concat(Array.prototype.slice.call(arguments)));var i=e;"function"!=typeof e&&((0,o.default)((0,w.default)(e),'Expected "type" provided as the first argument to DragSource to be a string, or a function that returns a string given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',e),i=function(){return e}),(0,o.default)((0,s.default)(t),'Expected "spec" provided as the second argument to DragSource to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',t);var a=(0,g.default)(t);return(0,o.default)("function"==typeof n,'Expected "collect" provided as the third argument to DragSource to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',n),(0,o.default)((0,s.default)(r),'Expected "options" provided as the fourth argument to DragSource to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',n),function(e){return(0,d.default)({connectBackend:function(e,t){return e.connectDragSource(t)},containerDisplayName:"DragSource",createHandler:a,registerHandler:f.default,createMonitor:v.default,createConnector:b.default,DecoratedComponent:e,getType:i,collect:n,options:r})}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var i=t(22),o=n(i),a=t(41),s=n(a),l=t(85),u=n(l),c=t(173),d=n(c),h=t(527),f=n(h),p=t(528),g=n(p),m=t(529),v=n(m),y=t(530),b=n(y),_=t(176),w=n(_)},function(e,exports,t){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};exports.__esModule=!0;var r=t(109),i=n(r);exports.isDisposable=i.default;var o=t(524),a=n(o);exports.Disposable=a.default;var s=t(525),l=n(s);exports.CompositeDisposable=l.default;var u=t(526),c=n(u);exports.SerialDisposable=c.default},function(e,exports,t){"use strict";var n=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},r=function(){function e(e,t){for(var n=0;n-1,'Expected the drag source specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',u.join(", "),t),(0,s.default)("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html",t,t,e[t])}),c.forEach(function(t){(0,s.default)("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html",t,t,e[t])});var t=function(){function t(e){r(this,t),this.monitor=e,this.props=null,this.component=null}return o(t,[{key:"receiveProps",value:function(e){this.props=e}},{key:"receiveComponent",value:function(e){this.component=e}},{key:"canDrag",value:function(){return!e.canDrag||e.canDrag(this.props,this.monitor)}},{key:"isDragging",value:function(t,n){return e.isDragging?e.isDragging(this.props,this.monitor):n===t.getSourceId()}},{key:"beginDrag",value:function(){var t=e.beginDrag(this.props,this.monitor,this.component);return t}},{key:"endDrag",value:function(){e.endDrag&&e.endDrag(this.props,this.monitor,this.component)}}]),t}();return function(e){return new t(e)}}Object.defineProperty(exports,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n or
    . Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute"),n?(0,o.cloneElement)(e,{ref:function(e){t(e),n&&n(e)}}):(0,o.cloneElement)(e,{ref:t})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=n;var r=t(22),i=function(e){return e&&e.__esModule?e:{default:e}}(r),o=t(0)},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};u.default.apply(void 0,["DropTarget","type, spec, collect[, options]"].concat(Array.prototype.slice.call(arguments)));var i=e;"function"!=typeof e&&((0,o.default)((0,w.default)(e,!0),'Expected "type" provided as the first argument to DropTarget to be a string, an array of strings, or a function that returns either given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',e),i=function(){return e}),(0,o.default)((0,s.default)(t),'Expected "spec" provided as the second argument to DropTarget to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',t);var a=(0,g.default)(t);return(0,o.default)("function"==typeof n,'Expected "collect" provided as the third argument to DropTarget to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',n),(0,o.default)((0,s.default)(r),'Expected "options" provided as the fourth argument to DropTarget to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',n),function(e){return(0,d.default)({connectBackend:function(e,t){return e.connectDropTarget(t)},containerDisplayName:"DropTarget",createHandler:a,registerHandler:f.default,createMonitor:v.default,createConnector:b.default,DecoratedComponent:e,getType:i,collect:n,options:r})}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var i=t(22),o=n(i),a=t(41),s=n(a),l=t(85),u=n(l),c=t(173),d=n(c),h=t(533),f=n(h),p=t(534),g=n(p),m=t(535),v=n(m),y=t(536),b=n(y),_=t(176),w=n(_)},function(e,exports,t){"use strict";function n(e,t,n){function r(){i.removeTarget(o)}var i=n.getRegistry(),o=i.addTarget(e,t);return{handlerId:o,unregister:r}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=n},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){Object.keys(e).forEach(function(t){(0,s.default)(u.indexOf(t)>-1,'Expected the drop target specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',u.join(", "),t),(0,s.default)("function"==typeof e[t],"Expected %s in the drop target specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html",t,t,e[t])});var t=function(){function t(e){r(this,t),this.monitor=e,this.props=null,this.component=null}return o(t,[{key:"receiveProps",value:function(e){this.props=e}},{key:"receiveMonitor",value:function(e){this.monitor=e}},{key:"receiveComponent",value:function(e){this.component=e}},{key:"canDrop",value:function(){return!e.canDrop||e.canDrop(this.props,this.monitor)}},{key:"hover",value:function(){e.hover&&e.hover(this.props,this.monitor,this.component)}},{key:"drop",value:function(){if(e.drop){var t=e.drop(this.props,this.monitor,this.component);return t}}}]),t}();return function(e){return new t(e)}}Object.defineProperty(exports,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++r0}},{key:"leave",value:function(e){var t=this.entered.length;return this.entered=(0,l.default)(this.entered.filter(function(e){return document.documentElement.contains(e)}),e),t>0&&0===this.entered.length}},{key:"reset",value:function(){this.entered=[]}}]),e}();exports.default=u},function(e,exports,t){var n=t(167),r=t(49),i=t(169),o=t(83),a=r(function(e){return i(n(e,1,o,!0))});e.exports=a},function(e,exports,t){function n(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(i);var o=function(){var n=arguments,r=t?t.apply(this,n):n[0],i=o.cache;if(i.has(r))return i.get(r);var a=e.apply(this,n);return o.cache=i.set(r,a)||i,a};return o.cache=new(n.Cache||r),o}var r=t(160),i="Expected a function";n.Cache=r,e.exports=n},function(e,exports,t){"use strict";function n(e){var t=e.nodeType===c?e:e.parentElement;if(!t)return null;var n=t.getBoundingClientRect(),r=n.top;return{x:n.left,y:r}}function r(e){return{x:e.clientX,y:e.clientY}}function i(e){return"IMG"===e.nodeName&&((0,s.isFirefox)()||!document.documentElement.contains(e))}function o(e,t,n,r){var i=e?t.width:n,o=e?t.height:r;return(0,s.isSafari)()&&e&&(o/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:o}}function a(e,t,r,a,l){var c=i(t),d=c?e:t,h=n(d),f={x:r.x-h.x,y:r.y-h.y},p=e.offsetWidth,g=e.offsetHeight,m=a.anchorX,v=a.anchorY,y=o(c,t,p,g),b=y.dragPreviewWidth,_=y.dragPreviewHeight,w=l.offsetX,C=l.offsetY,A=0===w||w,E=0===C||C;return{x:A?w:function(){return new u.default([0,.5,1],[f.x,f.x/p*b,f.x+b-p]).interpolate(m)}(),y:E?C:function(){var e=new u.default([0,.5,1],[f.y,f.y/g*_,f.y+_-g]),t=e.interpolate(v);return(0,s.isSafari)()&&c&&(t+=(window.devicePixelRatio-1)*_),t}()}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getNodeClientOffset=n,exports.getEventClientOffset=r,exports.getDragPreviewOffset=a;var s=t(179),l=t(562),u=function(e){return e&&e.__esModule?e:{default:e}}(l),c=1},function(e,exports,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;ne))return n[u];l=u-1}}a=Math.max(0,l);var d=e-t[a],h=d*d;return n[a]+r[a]*d+i[a]*h+o[a]*d*h}}]),e}();exports.default=i},function(e,exports,t){"use strict";function n(e,t){for(var n in t){var r=t[n];r.configurable=r.enumerable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n,r)}return e}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t,n){var r=t.reduce(function(t,n){return t||e.getData(n)},null);return null!=r?r:n}function a(e){var t=h[e],i=t.exposeProperty,o=t.matchesTypes,a=t.getData;return function(){function e(){var t,o;r(this,e),this.item=(t={},o={},o[i]=o[i]||{},o[i].get=function(){return console.warn("Browser doesn't allow reading \""+i+'" until the drop event.'),null},n(t,o),t)}return u(e,[{key:"mutateItemByReadingDataTransfer",value:function(e){delete this.item[i],this.item[i]=a(e,o)}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(e,t){return t===e.getSourceId()}},{key:"endDrag",value:function(){}}]),e}()}function s(e){var t=Array.prototype.slice.call(e.types||[]);return Object.keys(h).filter(function(e){return h[e].matchesTypes.some(function(e){return t.indexOf(e)>-1})})[0]||null}Object.defineProperty(exports,"__esModule",{value:!0});var l,u=function(){function e(e,t){for(var n=0;n1&&(e=this.props.headerActionsFactory(this.state.selected));var t=a.default.createElement("div",null,e,a.default.createElement(c.Input,{type:"checkbox",label:"Select all",checked:this.state.allSelected,onChange:this._toggleSelectAll,groupClassName:"form-group-inline"}));return a.default.createElement(u.ListGroupItem,{className:"list-group-header",header:t})},_toggleSelectAll:function(e){var t=this,n=e.target.checked?l.default.Set(this.state.filteredItems.map(function(e){return e[t.props.idKey]})):l.default.Set();this.setState({selected:n,allSelected:!this.state.allSelected})},_formatItem:function(e){var t=a.default.createElement("div",null,a.default.createElement("div",{className:"pull-right",style:{marginTop:10,marginBottom:10}},this.props.itemActionsFactory(e)),a.default.createElement(c.Input,{type:"checkbox",label:e[this.props.titleKey],checked:this.state.selected.includes(e[this.props.idKey]),onChange:this._onItemSelect(e[this.props.idKey]),groupClassName:"form-group-inline"}));return a.default.createElement(u.ListGroupItem,{key:"item-"+e[this.props.idKey],header:t},a.default.createElement("span",{style:{marginLeft:20}},e[this.props.descriptionKey]))},_onItemSelect:function(e){var t=this;return function(n){var r=n.target.checked?t.state.selected.add(e):t.state.selected.delete(e);t.setState({selected:r})}},render:function(){var e=this;if(0===this.props.items.count())return a.default.createElement(u.Row,null,a.default.createElement(u.Col,{md:12},a.default.createElement("div",null,"No items to display.")));var t=this.state.filteredItems.map(function(t){return e._formatItem(t)}).toJS(),n=void 0;return 0!==this.props.filterKeys.length&&(n=a.default.createElement(u.Row,null,a.default.createElement(u.Col,{md:5},a.default.createElement(d.TypeAheadDataFilter,{label:this.props.filterLabel,data:this.props.items,displayKey:"value",filterSuggestions:[],searchInKeys:this.props.filterKeys,onDataFiltered:this._filterItems})))),0===this.state.filteredItems.count()?a.default.createElement("div",null,n,a.default.createElement("div",null,"No items match your filter criteria")):a.default.createElement("div",null,n,a.default.createElement(u.ListGroup,null,this._headerItem(),t))}});exports.default=h,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(20),l=n(s),u=a.default.createClass({displayName:"Timestamp",propTypes:{dateTime:i.default.oneOfType([i.default.string,i.default.object]).isRequired,format:i.default.string,relative:i.default.bool,tz:i.default.string},getDefaultProps:function(){return{format:l.default.Formats.TIMESTAMP}},_formatDateTime:function(){var e=new l.default(this.props.dateTime);if(this.props.relative)return e.toRelativeString();switch(this.props.tz){case null:case void 0:return e.toString(this.props.format);case"browser":return e.toBrowserLocalTime().toString(this.props.format);default:return e.toTimeZone(this.props.tz).toString(this.props.format)}},render:function(){return a.default.createElement("time",{key:"time-"+this.props.dateTime,dateTime:this.props.dateTime,title:this.props.dateTime},this._formatDateTime())}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t1?r[0]:e._UNCLASSIFIED_AREA,o=r.length>1?r[1]:r[0];t[i]||(t[i]=[]),t[i].push(o)}),[].concat.apply([],Object.keys(t).sort().map(function(n){return[{label:n,disabled:!0,value:n}].concat(d.default.unique(t[n]).sort().map(function(t){return{value:n===e._UNCLASSIFIED_AREA?t:n+"/"+t,label:t.replace("_"," ")}}))}))},_renderOption:function(e){return e.disabled?s.default.createElement("span",{key:e.value,title:e.value},e.label):s.default.createElement("span",{key:e.value,title:e.value},"  ",e.label)},render:function(){var e=this._formatTimezones();return s.default.createElement(f.default,r({ref:"timezone"},this.props,{placeholder:"Pick a time zone",options:e,optionRenderer:this._renderOption}))}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=t(1),o=n(i),a=t(0),s=n(a),l=t(3),u=t(18),c=n(u),d=t(11),h=s.default.createClass({displayName:"TypeAheadDataFilter",propTypes:{data:o.default.array,displayKey:o.default.string,filterBy:o.default.string,filterData:o.default.func,filterSuggestionAccessor:o.default.string,filterSuggestions:o.default.array,label:o.default.string,onDataFiltered:o.default.func,searchInKeys:o.default.array},getInitialState:function(){return{filterText:"",filters:c.default.OrderedSet(),filterByKey:this.props.filterBy+"s"}},_onSearchTextChanged:function(e){e.preventDefault(),this.setState({filterText:this.refs.typeAheadInput.getValue()},this.filterData)},_onFilterAdded:function(e,t){this.setState({filters:this.state.filters.add(t[this.props.displayKey]),filterText:""},this.filterData),this.refs.typeAheadInput.clear()},_onFilterRemoved:function(e){e.preventDefault(),this.setState({filters:this.state.filters.delete(e.target.getAttribute("data-target"))},this.filterData)},_matchFilters:function(e){var t=this;return this.state.filters.every(function(n){var r=e[t.state.filterByKey];return r=t.props.filterSuggestionAccessor?r.map(function(e){return e[t.props.filterSuggestionAccessor].toLocaleLowerCase()}):r.map(function(e){return e.toLocaleLowerCase()}),-1!==r.indexOf(n.toLocaleLowerCase())},this)},_matchStringSearch:function(e){var t=this;return this.props.searchInKeys.some(function(n){var i=e[n],o=t.state.filterText;if(null===i)return!1;var a=function(e,t){return void 0!==e&&-1!==e.toLocaleLowerCase().indexOf(t.toLocaleLowerCase())};return"object"===(void 0===i?"undefined":r(i))?i.some(function(e){return a(e,o)}):a(i,o)},this)},_resetFilters:function(){this.refs.typeAheadInput.clear(),this.setState({filterText:"",filters:c.default.OrderedSet()},this.filterData)},filterData:function(){var e=this;if("function"==typeof this.props.filterData)return this.props.filterData(this.props.data);var t=this.props.data.filter(function(t){return e._matchFilters(t)&&e._matchStringSearch(t)},this);this.props.onDataFiltered(t)},render:function(){var e=this,t=this.state.filters.map(function(t){return s.default.createElement("li",{key:"li-"+t},s.default.createElement("span",{className:"pill label label-default"},e.props.filterBy,": ",t,s.default.createElement("a",{className:"tag-remove","data-target":t,onClick:e._onFilterRemoved})))}),n=void 0;return n=this.props.filterSuggestionAccessor?this.props.filterSuggestions.map(function(t){return t[e.props.filterSuggestionAccessor].toLocaleLowerCase()}):this.props.filterSuggestions.map(function(e){return e.toLocaleLowerCase()}),n.filter(function(t){return!e.state.filters.includes(t)}),s.default.createElement("div",{className:"filter"},s.default.createElement("form",{className:"form-inline",onSubmit:this._onSearchTextChanged,style:{display:"inline"}},s.default.createElement(d.TypeAheadInput,{ref:"typeAheadInput",onSuggestionSelected:this._onFilterAdded,suggestionText:"Filter by "+this.props.filterBy+": ",suggestions:n,label:this.props.label,displayKey:this.props.displayKey}),s.default.createElement(l.Button,{type:"submit",style:{marginLeft:5}},"Filter"),s.default.createElement(l.Button,{type:"button",style:{marginLeft:5},onClick:this._resetFilters,disabled:0===this.state.filters.count()&&""===this.state.filterText},"Reset")),s.default.createElement("ul",{className:"pill-list"},t))}});exports.default=h,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t"+e.suggestionText+" "+t[e.displayKey]+"
    ":"
    "+t.value+"
    "}}}),"function"==typeof e.onTypeaheadLoaded&&(e.onTypeaheadLoaded(),t.typeahead("close")),(0,f.default)(this.fieldFormGroup).on("typeahead:select typeahead:autocomplete",function(t,n){e.onSuggestionSelected&&e.onSuggestionSelected(t,n)})},render:function(){return a.default.createElement(u.Input,{type:"text",ref:"fieldInput",wrapperClassName:"typeahead-wrapper",label:this.props.label,onKeyPress:this.props.onKeyPress})}}));exports.default=g,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(13),u=[{value:"STRING",label:"string"},{value:"NUMBER",label:"number"},{value:"OBJECT",label:"object"},{value:"ARRAY",label:"array"},{value:"BOOLEAN",label:"boolean"},{value:"NULL",label:"null"}],c=a.default.createClass({displayName:"JSONValueInput",propTypes:{update:i.default.func.isRequired,label:i.default.string,help:i.default.oneOfType([i.default.string,i.default.object]),required:i.default.bool,validationState:i.default.string,value:i.default.string,valueType:i.default.oneOf(u.map(function(e){return e.value})),allowedTypes:function(e,t,n){var r=u.map(function(e){return e.value}),i=[];return e[t]instanceof Array?(e[t].forEach(function(e){r.indexOf(e)<0&&i.push(e)}),i.length>0?new Error("Invalid prop "+t+" supplied to "+n+". Expected array of "+r+" but got invalid "+i):null):new Error("Invalid prop "+t+" supplied to "+n+". Expected an array but got "+e[t])},labelClassName:i.default.string,wrapperClassName:i.default.string},getDefaultProps:function(){return{value:"",valueType:"STRING",allowedTypes:u.map(function(e){return e.value}),label:"",help:"",required:!1,validationState:null,labelClassName:void 0,wrapperClassName:void 0}},getInitialState:function(){return this._computeInitialState(this.props)},componentWillReceiveProps:function(e){this.setState(this._computeInitialState(e))},_computeInitialState:function(e){return{value:e.value,valueType:e.valueType}},_propagateState:function(){this.props.update(this.state.value,this.state.valueType)},_onUpdate:function(e){var t=e.target.value;this.setState({value:t},this._propagateState)},_onValueTypeSelect:function(e){this.setState({valueType:e},this._propagateState)},render:function(){var e=this,t=u.filter(function(t){return e.props.allowedTypes.indexOf(t.value)>-1}).map(function(t){return a.default.createElement(s.MenuItem,{key:t.value,onSelect:function(){return e._onValueTypeSelect(t.value)}},t.label)});return a.default.createElement(s.FormGroup,{validationState:this.props.validationState},this.props.label&&a.default.createElement(s.ControlLabel,{className:this.props.labelClassName},this.props.label),a.default.createElement(l.InputWrapper,{className:this.props.wrapperClassName},a.default.createElement(s.InputGroup,null,a.default.createElement(s.FormControl,{type:"text",onChange:this._onUpdate,value:this.state.value,required:this.props.required}),a.default.createElement(s.DropdownButton,{componentClass:s.InputGroup.Button,id:"input-dropdown-addon",bsStyle:"error"===this.props.validationState?"danger":null,title:u.filter(function(t){return t.value===e.props.valueType})[0].label},t)),this.props.help&&a.default.createElement(s.HelpBlock,null,this.props.help)))}});exports.default=c,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(13),u=a.default.createClass({displayName:"TimeUnitInput",propTypes:{update:i.default.func.isRequired,label:i.default.string,help:i.default.string,required:i.default.bool,enabled:i.default.bool,value:i.default.number,unit:i.default.oneOf(["NANOSECONDS","MICROSECONDS","MILLISECONDS","SECONDS","MINUTES","HOURS","DAYS"]),labelClassName:i.default.string,wrapperClassName:i.default.string},getDefaultProps:function(){return{value:1,unit:"SECONDS",label:"",help:"",required:!1,enabled:!1,labelClassName:void 0,wrapperClassName:void 0}},getInitialState:function(){return{checked:this.props.required||this.props.enabled,value:this.props.value,unit:this.props.unit}},OPTIONS:[{value:"NANOSECONDS",label:"nanoseconds"},{value:"MICROSECONDS",label:"microseconds"},{value:"MILLISECONDS",label:"milliseconds"},{value:"SECONDS",label:"seconds"},{value:"MINUTES",label:"minutes"},{value:"HOURS",label:"hours"},{value:"DAYS",label:"days"}],_propagateState:function(){this.props.update(this.state.value,this.state.unit,this.state.checked)},_onToggleEnable:function(e){this.setState({checked:e.target.checked},this._propagateState)},_onUpdate:function(e){var t=e.target.value;this.setState({value:t},this._propagateState)},_onUnitSelect:function(e){this.setState({unit:e},this._propagateState)},render:function(){var e=this,t=this.OPTIONS.map(function(t){return a.default.createElement(s.MenuItem,{key:t.value,onSelect:function(){return e._onUnitSelect(t.value)}},t.label)}),n=a.default.createElement(s.InputGroup.Addon,null,a.default.createElement("input",{type:"checkbox",checked:this.state.checked,onChange:this._onToggleEnable}));return a.default.createElement(s.FormGroup,null,this.props.label&&a.default.createElement(s.ControlLabel,{className:this.props.labelClassName},this.props.label),a.default.createElement(l.InputWrapper,{className:this.props.wrapperClassName},a.default.createElement(s.InputGroup,null,!this.props.required&&n,a.default.createElement(s.FormControl,{type:"text",disabled:!this.state.checked,onChange:this._onUpdate,value:this.state.value}),a.default.createElement(s.DropdownButton,{componentClass:s.InputGroup.Button,id:"input-dropdown-addon",title:this.OPTIONS.filter(function(t){return t.value===e.state.unit})[0].label},t)),this.props.help&&a.default.createElement(s.HelpBlock,null,this.props.help)))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=a.default.createClass({displayName:"TimeUnit",propTypes:{value:i.default.number.isRequired,unit:i.default.oneOf(["NANOSECONDS","MICROSECONDS","MILLISECONDS","SECONDS","MINUTES","HOURS","DAYS"]).isRequired,zeroIsNever:i.default.bool},getDefaultProps:function(){return{zeroIsNever:!0}},UNITS:{NANOSECONDS:"nanoseconds",MICROSECONDS:"microseconds",MILLISECONDS:"milliseconds",SECONDS:"seconds",MINUTES:"minutes",HOURS:"hours",DAYS:"days"},render:function(){return 0===this.props.value&&this.props.zeroIsNever?a.default.createElement("span",null,"Never"):a.default.createElement("span",null,this.props.value," ",this.UNITS[this.props.unit])}});exports.default=s,e.exports=exports.default},function(e,exports,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n/node_modules/babel-jest","^.+\\.tsx?$":"/node_modules/ts-jest/preprocessor.js"}},dependencies:{bluebird:"^3.4.0",bootstrap:"^3.3.7",c3:"^0.4.11-rc4",classnames:"^2.2.0",clipboard:"^1.5.5",crossfilter:"1.3.x",d3:"3.5.17",dc:"2.0.5","deep-equal":"^1.0.1","font-awesome":"^4.7.0","graylog-web-plugin":"file:packages/graylog-web-plugin",history:"^1.17.0",immutable:"^3.7.5","javascript-natural-sort":"^0.7.1","jquery-ui":"1.12.x",lodash:"^4.17.4",markdown:"^0.5.0",md5:"^2.0.0","moment-duration-format":"1.3.0",numeral:"^1.5.3","opensans-npm-webfont":"^1.0.0",qs:"^6.3.0","react-day-picker":"^5.0.0","react-dnd":"^2.0.2","react-dnd-html5-backend":"^2.0.0","react-grid-layout":"^0.14.3","react-overlays":"^0.6.5","react-select":"^v1.0.0-rc.10",rickshaw:"^1.5.1","sockjs-client":"1.1.x",string:"^3.3.1",superagent:"^3.4.3","superagent-bluebird-promise":"^4.1.0",toastr:"^2.1.2","typeahead.js":"^0.11.1","ua-parser-js":"^0.7.12",urijs:"^1.17.0"},devDependencies:{"@types/bluebird":"^3.5.8","@types/jquery":"^3.2.9","@types/node":"^8.0.17","@types/sockjs-client":"^1.0.31","@types/toastr":"^2.1.34","@types/typeahead":"^0.11.29","assets-webpack-plugin":"^3.5.1","babel-core":"^6.22.1","babel-jest":"^21.0.2","babel-loader":"^7.0.0","babel-plugin-add-module-exports":"^0.2.1","babel-polyfill":"^6.22.0","babel-preset-es2015":"^6.22.0","babel-preset-react":"^6.22.0","babel-preset-stage-0":"^6.22.0","clean-webpack-plugin":"^0.1.3","css-loader":"^0.28.4",enzyme:"^2.9.0",eslint:"^4.3.0","eslint-loader":"^1.6.3","estraverse-fb":"^1.3.1","extract-text-webpack-plugin":"^3.0.0","file-loader":"^0.11.0",glob:"^7.0.0","identity-obj-proxy":"^3.0.0",jest:"^21.1.0","jest-enzyme":"^3.8.3","jest-localstorage-mock":"^2.0.0","json-loader":"^0.5.3",less:"^2.5.3","less-loader":"^4.0.5","phantomjs-prebuilt":">=1.9","react-hot-loader":"^3.0.0-beta.6","react-proxy-loader":"^0.3.4","react-test-renderer":"^15.6.1","script-loader":"^0.7.0","style-loader":"^0.18.2","ts-jest":"^21.0.1","ts-loader":"^2.3.1",typescript:"^2.4.2","url-loader":"^0.5.6",webpack:"^3.4.1","webpack-dev-server":"^2.6.1","webpack-merge":"^4.1.0"}}},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(0),i=n(r),o=t(2),a=n(o),s=t(3),l=t(19),u=t(64),c=n(u),d=t(11),h=t(38),f=t(183),p=n(f),g=t(86),m=n(g),v=t(113),y=n(v),b=t(114),_=n(b),w=t(184),C=n(w),A=t(9),E=n(A),S=t(16),x=n(S),F=E.default.getStore("Streams"),k=i.default.createClass({displayName:"ProcessingTimelineComponent",mixins:[a.default.connect(y.default),a.default.connect(C.default)],componentDidMount:function(){var e=this;this.style.use(),m.default.list(),_.default.list(),F.listStreams().then(function(t){e.setState({streams:t})})},componentWillUnmount:function(){this.style.unuse()},style:t(597),_calculateUsedStages:function(e){return e.map(function(e){return e.stages}).reduce(function(e,t){return e.concat(t.map(function(e){return e.stage}).filter(function(t){return-1===e.indexOf(t)}))},[]).sort(c.default)},_headerCellFormatter:function(e){var t=void 0;return"Actions"===e&&(t="actions"),i.default.createElement("th",{className:t},e)},_formatConnectedStreams:function(e){return e.map(function(e){return e.title}).join(", ")},_formatStages:function(e,t){var n=[],r=t.map(function(e){return e.stage});return this.usedStages.forEach(function(t){-1===r.indexOf(t)?n.push(i.default.createElement("div",{key:e.id+"-stage"+t,className:"pipeline-stage idle-stage"},"Idle")):n.push(i.default.createElement("div",{key:e.id+"-stage"+t,className:"pipeline-stage used-stage"},"Stage ",t))},this),n},_pipelineFormatter:function(e){return i.default.createElement("tr",{key:e.id},i.default.createElement("td",{className:"pipeline-name"},i.default.createElement(l.LinkContainer,{to:x.default.pluginRoute("SYSTEM_PIPELINES_PIPELINEID")(e.id)},i.default.createElement("a",null,e.title)),i.default.createElement("br",null),e.description,i.default.createElement("br",null),i.default.createElement(h.MetricContainer,{name:"org.graylog.plugins.pipelineprocessor.ast.Pipeline."+e.id+".executed"},i.default.createElement(h.CounterRate,{prefix:"Throughput:",suffix:"msg/s"}))),i.default.createElement("td",{className:"stream-list"},i.default.createElement(p.default,{pipeline:e,connections:this.state.connections,streams:this.state.streams,streamsFormatter:this._formatConnectedStreams,noConnectionsMessage:i.default.createElement("em",null,"Not connected")})),i.default.createElement("td",null,this._formatStages(e,e.stages)),i.default.createElement("td",null,i.default.createElement(s.Button,{bsStyle:"primary",bsSize:"xsmall",onClick:this._deletePipeline(e)},"Delete")," ",i.default.createElement(l.LinkContainer,{to:x.default.pluginRoute("SYSTEM_PIPELINES_PIPELINEID")(e.id)},i.default.createElement(s.Button,{bsStyle:"info",bsSize:"xsmall"},"Edit"))))},_deletePipeline:function(e){return function(){confirm('Do you really want to delete pipeline "'+e.title+'"? This action cannot be undone.')&&m.default.delete(e.id)}},_isLoading:function(){return!this.state.pipelines||!this.state.streams||!this.state.connections},render:function(){if(this._isLoading())return i.default.createElement(d.Spinner,null);var e=i.default.createElement("div",{className:"pull-right"},i.default.createElement(l.LinkContainer,{to:x.default.pluginRoute("SYSTEM_PIPELINES_PIPELINEID")("new")},i.default.createElement(s.Button,{bsStyle:"success"},"Add new pipeline")));if(0===this.state.pipelines.length)return i.default.createElement("div",null,e,i.default.createElement(s.Alert,null,"There are no pipelines configured in your system. Create one to start processing your messages."));this.usedStages=this._calculateUsedStages(this.state.pipelines);var t=["Pipeline","Connected to Streams","Processing Timeline","Actions"];return i.default.createElement("div",null,e,i.default.createElement(d.DataTable,{id:"processing-timeline",className:"table-hover",headers:t,headerCellFormatter:this._headerCellFormatter,sortByKey:"title",rows:this.state.pipelines,dataRowFormatter:this._pipelineFormatter,filterLabel:"Filter pipelines",filterKeys:["title"]}))}});exports.default=k,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(24),l=n(s),u=a.default.createClass({displayName:"CounterDetails",propTypes:{metric:i.default.object.isRequired},render:function(){var e=this.props.metric.metric;return a.default.createElement("dl",{className:"metric-def metric-counter"},a.default.createElement("dt",null,"Value:"),a.default.createElement("dd",null,a.default.createElement("span",{className:"number-format"},(0,l.default)(e.count).format("0,0"))))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(24),l=n(s),u=t(94),c=n(u),d=a.default.createClass({displayName:"CounterRate",propTypes:{metric:i.default.object,showTotal:i.default.bool,prefix:i.default.string,suffix:i.default.string,hideOnZero:i.default.bool,hideOnMissing:i.default.bool},getDefaultProps:function(){return{showTotal:!1,prefix:null,suffix:"per second",hideOnZero:!1,hideOnMissing:!1}},getInitialState:function(){return{prevMetric:null,prevTs:null,nowTs:c.default.nowInSeconds()}},componentWillReceiveProps:function(){this.setState({prevMetric:this.props.metric,prevTs:this.state.nowTs,nowTs:c.default.nowInSeconds()})},_checkPrevMetric:function(){return this.state.prevMetric&&void 0!==this.state.prevMetric.count&&this.state.prevTs},_placeholder:function(){return this.props.hideOnZero?null:a.default.createElement("span",null,this._prefix(),"Calculating...")},_prefix:function(){return this.props.prefix?this.props.prefix+" ":null},_suffix:function(){return this.props.suffix?" "+this.props.suffix:null},render:function(){if(!this.props.metric||void 0===this.props.metric.count){if(this.props.hideOnMissing)return null;if(!this._checkPrevMetric())return this._placeholder()}var e=this.props.metric.count,t=null;if(!this._checkPrevMetric())return this._placeholder();var n=(e-this.state.prevMetric.count)/(this.state.nowTs-this.state.prevTs);return t=a.default.createElement("span",{key:"rate",className:"number-format"},this._prefix(),(0,l.default)(n).format("0,0"),this._suffix()),this.props.hideOnMissing&&!t?null:a.default.createElement("span",null,t,this.props.showTotal&&a.default.createElement("span",{key:"absolute",className:"number-format"}," (",(0,l.default)(e).format("0")," total)"))}});exports.default=d,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(24),l=n(s),u=a.default.createClass({displayName:"GaugeDetails",propTypes:{metric:i.default.object.isRequired},render:function(){var e=this.props.metric.metric;return a.default.createElement("dl",{className:"metric-def metric-gauge"},a.default.createElement("dt",null,"Value:"),a.default.createElement("dd",null,a.default.createElement("span",{className:"number-format"},(0,l.default)(e.value).format("0,0"))))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(24),l=n(s),u=a.default.createClass({displayName:"HistogramDetails",propTypes:{metric:i.default.object.isRequired},render:function(){var e=this.props.metric.metric;return a.default.createElement("dl",{className:"metric-def metric-histogram"},a.default.createElement("dt",null,"95th percentile:"),a.default.createElement("dd",null,a.default.createElement("span",{className:"number-format"},(0,l.default)(e.time["95th_percentile"]).format("0,0.[00]"))),a.default.createElement("dt",null,"98th percentile:"),a.default.createElement("dd",null,a.default.createElement("span",{className:"number-format"},(0,l.default)(e.time["98th_percentile"]).format("0,0.[00]"))),a.default.createElement("dt",null,"99th percentile:"),a.default.createElement("dd",null,a.default.createElement("span",{className:"number-format"},(0,l.default)(e.time["99th_percentile"]).format("0,0.[00]"))),a.default.createElement("dt",null,"Standard deviation:"),a.default.createElement("dd",null,a.default.createElement("span",{className:"number-format"},(0,l.default)(e.time.std_dev).format("0,0.[00]"))),a.default.createElement("dt",null,"Mean:"),a.default.createElement("dd",null,a.default.createElement("span",{className:"number-format"},(0,l.default)(e.time.mean).format("0,0.[00]"))),a.default.createElement("dt",null,"Minimum:"),a.default.createElement("dd",null,a.default.createElement("span",{className:"number-format"},(0,l.default)(e.time.min).format("0,0.[00]"))),a.default.createElement("dt",null,"Maximum:"),a.default.createElement("dd",null,a.default.createElement("span",{className:"number-format"},(0,l.default)(e.time.max).format("0,0.[00]"))),a.default.createElement("dt",null,"Count:"),a.default.createElement("dd",null,a.default.createElement("span",{className:"number-format"},(0,l.default)(e.count).format("0,0"))))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(24),l=n(s),u=a.default.createClass({displayName:"MeterDetails",propTypes:{metric:i.default.object.isRequired},render:function(){var e=this.props.metric.metric;return a.default.createElement("dl",{className:"metric-def metric-meter"},a.default.createElement("dt",null,"Total:"),a.default.createElement("dd",null,a.default.createElement("span",{className:"number-format"},(0,l.default)(e.rate.total).format("0,0"))," events"),a.default.createElement("dt",null,"Mean:"),a.default.createElement("dd",null,a.default.createElement("span",{className:"number-format"},(0,l.default)(e.rate.mean).format("0,0.[00]"))," ",e.rate_unit),a.default.createElement("dt",null,"1 minute avg:"),a.default.createElement("dd",null,a.default.createElement("span",{className:"number-format"},(0,l.default)(e.rate.one_minute).format("0,0.[00]"))," ",e.rate_unit),a.default.createElement("dt",null,"5 minute avg:"),a.default.createElement("dd",null,a.default.createElement("span",{className:"number-format"},(0,l.default)(e.rate.five_minute).format("0,0.[00]"))," ",e.rate_unit),a.default.createElement("dt",null,"15 minute avg:"),a.default.createElement("dd",null,a.default.createElement("span",{className:"number-format"},(0,l.default)(e.rate.fifteen_minute).format("0,0.[00]"))," ",e.rate_unit))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(38),l=a.default.createClass({displayName:"Metric",propTypes:{metric:i.default.object.isRequired,namespace:i.default.string,nodeId:i.default.string.isRequired},getInitialState:function(){return{expanded:!1}},iconMapping:{timer:"clock-o",histogram:"signal",meter:"play-circle",gauge:"dashboard",counter:"circle",unknown:"question-circle"},_formatIcon:function(e){var t=this.iconMapping[e];return t||this.iconMapping.unknown},_formatName:function(e){var t=this.props.namespace,n=e.split(t),r=n.slice(1).join(t);return a.default.createElement("span",null,a.default.createElement("span",{className:"prefix"},t),r)},_showDetails:function(e){e.preventDefault(),this.setState({expanded:!this.state.expanded})},render:function(){var e=this.props.metric,t=this.state.expanded?a.default.createElement(s.MetricDetails,{nodeId:this.props.nodeId,metric:this.props.metric}):null;return a.default.createElement("span",null,a.default.createElement("div",{className:"name"},a.default.createElement("i",{className:"fa fa-"+this._formatIcon(e.type)})," ",a.default.createElement("a",{className:"open",href:"#",onClick:this._showDetails},this._formatName(e.full_name))),t)}});exports.default=l,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(2),l=n(s),u=t(94),c=(n(u),t(9)),d=n(c),h=t(6),f=n(h),p=t(586),g=n(p),m=d.default.getStore("Metrics"),v=f.default.getActions("Metrics"),y=a.default.createClass({displayName:"MetricContainer",propTypes:{name:i.default.string.isRequired,zeroOnMissing:i.default.bool,children:i.default.node.isRequired},mixins:[l.default.connect(m)],getDefaultProps:function(){return{zeroOnMissing:!0}},componentWillMount:function(){v.addGlobal(this.props.name)},shouldComponentUpdate:function(e,t){return!this.state.metricsUpdatedAt||!t.metricsUpdatedAt||t.metricsUpdatedAt>this.state.metricsUpdatedAt},componentWillUnmount:function(){v.removeGlobal(this.props.name)},render:function(){var e=this;if(!this.state.metrics)return a.default.createElement("span",null,"Loading...");var t=this.props.name,n=Object.keys(this.state.metrics).map(function(n){return g.default.getValuesForNode(e.state.metrics[n],{throughput:t})}).reduce(function(e,t){return{throughput:(e.throughput||0)+(t.throughput||0)}});return!this.props.zeroOnMissing||n&&n.throughput||(n={throughput:0}),a.default.createElement("div",null,a.default.Children.map(this.props.children,function(e){return a.default.cloneElement(e,{metric:{full_name:t,count:n.throughput}})}))}});exports.default=y,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n={getValuesForNode:function(e,t){if(null===e||void 0===e||0===Object.keys(e).length)return{};var n={};return Object.keys(t).forEach(function(r){var i=t[r],o=e[i];o&&("gauge"===o.type?n[r]=o.metric.value:"counter"===o.type?n[r]=o.metric.count:"meter"===o.type?n[r]=o.metric.rate.total:"timer"===o.type?n[r]=o.metric.rate.total:n[r]=null)}),n}};exports.default=n,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(2),l=n(s),u=t(182),c=n(u),d=t(9),h=n(d),f=t(6),p=n(f),g=t(38),m=h.default.getStore("Metrics"),v=p.default.getActions("Metrics"),y=a.default.createClass({displayName:"MetricDetails",propTypes:{metric:i.default.object.isRequired},mixins:[l.default.connect(m)],componentDidMount:function(){v.add(this.props.nodeId,this.props.metric.full_name)},componentWillUnmount:function(){v.remove(this.props.nodeId,this.props.metric.full_name)},_formatDetailsForType:function(e,t){switch(e){case"Counter":return a.default.createElement(g.CounterDetails,{metric:t});case"Gauge":return a.default.createElement(g.GaugeDetails,{metric:t});case"Histogram":return a.default.createElement(g.HistogramDetails,{metric:t});case"Meter":return a.default.createElement(g.MeterDetails,{metric:t});case"Timer":return a.default.createElement(g.TimerDetails,{metric:t});default:return a.default.createElement("i",null,"Invalid metric type: ",e)}},render:function(){var e=this.props.metric.full_name,t=this.props.nodeId,n=this.state.metrics&&this.state.metrics[t]&&this.state.metrics[t][e]?this.state.metrics[t][e]:this.props.metric,r=(0,c.default)(n.type).capitalize().toString(),i=this._formatDetailsForType(r,n);return a.default.createElement("div",{className:"metric"},a.default.createElement("h3",null,r),i)}});exports.default=y,e.exports=exports.default},function(e,exports){function t(e,t){for(var n=0,r=e.indexOf(t);r>=0;)n+=1,r=e.indexOf(t,r+1);return n}e.exports=t},function(e,exports){function t(e,t,n,r){if(void 0===n)var n=-1;var i=e.split(t),o=i.slice(0,n),a=i.slice(n);return i=0===a.length?o:o.concat(a.join(t)),void 0===r?i:r<0?i.slice(r):i.slice(0,r)}e.exports=t},function(e,exports){function t(e,t,n,r){if(void 0===n)var n=-1;if(void 0===r)var r=0;for(var i=[e],o=e.length-1;o>=0;o--)0===i[0].slice(o).indexOf(t)&&(i.length<=n||-1===n)&&(i.splice(1,0,i[0].slice(o+t.length)),i[0]=i[0].slice(0,o));return r>=0?i.slice(-r):i.slice(0,-r)}e.exports=t},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(2),l=(n(s),t(592)),u=n(l),c=t(3),d=t(182),h=n(d),f=(t(11),t(38)),p=a.default.createClass({displayName:"MetricsComponent",propTypes:{names:i.default.arrayOf(i.default.object).isRequired,namespace:i.default.string.isRequired,nodeId:i.default.string.isRequired},mixins:[u.default],getInitialState:function(){return{filter:this.props.filter}},getDefaultProps:function(){return{filter:""}},render:function(){var e=void 0;try{var t=new RegExp(this.state.filter,"i");e=this.props.names.filter(function(e){return(0,h.default)(e.full_name).match(t)})}catch(t){e=[]}return a.default.createElement(c.Row,{className:"content"},a.default.createElement(c.Col,{md:12},a.default.createElement(f.MetricsFilterInput,{valueLink:this.linkState("filter")}),a.default.createElement(f.MetricsList,{names:e,namespace:this.props.namespace,nodeId:this.props.nodeId})))}});exports.default=p,e.exports=exports.default},function(e,exports,t){e.exports=t(8)(336)},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t0?t:a.default.createElement("li",null,"No metrics match the given filter. Please ensure you use a valid regular expression"))}});exports.default=l,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(2),l=n(s),u=t(25),c=n(u),d=c.default.get("Metrics"),h=d.MetricsActions,f=d.MetricsStore,p=a.default.createClass({displayName:"MetricsMapper",propTypes:{map:i.default.object.isRequired,computeValue:i.default.func.isRequired},mixins:[l.default.connect(f)],getDefaultProps:function(){return{}},getInitialState:function(){return{}},componentWillMount:function(){var e=this;Object.keys(this.props.map).forEach(function(t){return h.addGlobal(e.props.map[t])})},shouldComponentUpdate:function(e,t){return!this.state.metricsUpdatedAt||!t.metricsUpdatedAt||t.metricsUpdatedAt>this.state.metricsUpdatedAt},componentWillUnmount:function(){var e=this;Object.keys(this.props.map).forEach(function(t){return h.removeGlobal(e.props.map[t])})},render:function(){var e=this;if(!this.state.metrics)return null;var t={};Object.keys(this.state.metrics).forEach(function(n){Object.keys(e.props.map).forEach(function(r){var i=e.props.map[r];e.state.metrics[n][i]&&(t[n]||(t[n]={}),t[n][r]=e.state.metrics[n][i])})});var n=this.props.computeValue(t);return a.default.createElement("span",null,n)}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(24),l=n(s),u=a.default.createClass({displayName:"TimerDetails",propTypes:{metric:i.default.object.isRequired},render:function(){var e=this.props.metric.metric.time;return a.default.createElement("dl",{className:"metric-def metric-timer"},a.default.createElement("dt",null,"95th percentile:"),a.default.createElement("dd",null,a.default.createElement("span",null,(0,l.default)(e["95th_percentile"]).format("0,0.[00]")),"μs"),a.default.createElement("dt",null,"98th percentile:"),a.default.createElement("dd",null,a.default.createElement("span",null,(0,l.default)(e["98th_percentile"]).format("0,0.[00]")),"μs"),a.default.createElement("dt",null,"99th percentile:"),a.default.createElement("dd",null,a.default.createElement("span",null,(0,l.default)(e["99th_percentile"]).format("0,0.[00]")),"μs"),a.default.createElement("dt",null,"Standard deviation:"),a.default.createElement("dd",null,a.default.createElement("span",null,(0,l.default)(e.std_dev).format("0,0.[00]")),"μs"),a.default.createElement("dt",null,"Mean:"),a.default.createElement("dd",null,a.default.createElement("span",null,(0,l.default)(e.mean).format("0,0.[00]")),"μs"),a.default.createElement("dt",null,"Minimum:"),a.default.createElement("dd",null,a.default.createElement("span",null,(0,l.default)(e.min).format("0,0.[00]")),"μs"),a.default.createElement("dt",null,"Maximum:"),a.default.createElement("dd",null,a.default.createElement("span",null,(0,l.default)(e.max).format("0,0.[00]")),"μs"))}});exports.default=u,e.exports=exports.default},function(e,exports,t){var n,r=0,i=t(598);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(exports.locals=i.locals),exports.use=exports.ref=function(){return r++||(n=t(15)(i,{})),exports},exports.unuse=exports.unref=function(){r>0&&!--r&&(n(),n=null)}},function(e,exports,t){exports=e.exports=t(14)(void 0),exports.push([e.i,".pipeline-stage{border:1px solid #666;border-radius:4px;display:inline-block;margin-right:15px;padding:20px;text-align:center;width:120px}.pipeline-stage.idle-stage{background-color:#e3e5e5;border-color:#d0d4d4}.pipeline-stage.used-stage{background-color:#fff}.pipeline-name{max-width:300px;overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap;width:300px}.stream-list{max-width:150px;width:150px;word-wrap:break-word}",""])},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e){var t=this;return e.pipelines?e.pipelines.filter(function(e){return e.id===t.props.params.pipelineId})[0]:void 0}function i(e){var t=this;if(e.connections)return e.connections.filter(function(e){return e.pipeline_ids&&e.pipeline_ids.includes(t.props.params.pipelineId)})}Object.defineProperty(exports,"__esModule",{value:!0});var o=t(1),a=n(o),s=t(0),l=n(s),u=t(2),c=n(u),d=t(3),h=t(19),f=t(11),p=t(600),g=n(p),m=t(606),v=n(m),y=t(607),b=n(y),_=t(33),w=n(_),C=t(86),A=n(C),E=t(113),S=n(E),x=t(50),F=n(x),k=t(114),D=n(k),T=t(184),M=n(T),R=t(9),O=n(R),L=t(16),P=n(L),B=O.default.getStore("Streams"),I=l.default.createClass({displayName:"PipelineDetailsPage",propTypes:{params:a.default.object.isRequired,history:a.default.object.isRequired},mixins:[c.default.connectFilter(S.default,"pipeline",r),c.default.connectFilter(M.default,"connections",i)],componentDidMount:function(){var e=this;this._isNewPipeline(this.props.params.pipelineId)||A.default.get(this.props.params.pipelineId),F.default.list(),D.default.list(),B.listStreams().then(function(t){e.setState({streams:t})})},componentWillReceiveProps:function(e){this._isNewPipeline(e.params.pipelineId)||A.default.get(e.params.pipelineId)},_onConnectionsChange:function(e,t){D.default.connectToPipeline(e),t()},_onStagesChange:function(e,t){var n=w.default.clone(this.state.pipeline);n.stages=e;var r=b.default.generatePipeline(n);n.source=r,A.default.update(n),"function"==typeof t&&t()},_savePipeline:function(e,t){var n=w.default.clone(e);n.source=b.default.generatePipeline(e);var r=void 0;r=n.id?A.default.update(n):A.default.save(n),r.then(function(e){return t(e)})},_isNewPipeline:function(e){return"new"===e},_isLoading:function(){return!this._isNewPipeline(this.props.params.pipelineId)&&!this.state.pipeline||!this.state.connections||!this.state.streams},render:function(){if(this._isLoading())return l.default.createElement(f.Spinner,null);var e=void 0;e=this._isNewPipeline(this.props.params.pipelineId)?"New pipeline":l.default.createElement("span",null,"Pipeline ",l.default.createElement("em",null,this.state.pipeline.title));var t=void 0;t=this._isNewPipeline(this.props.params.pipelineId)?l.default.createElement(v.default,{onChange:this._savePipeline,history:this.props.history}):l.default.createElement(g.default,{pipeline:this.state.pipeline,connections:this.state.connections,streams:this.state.streams,rules:this.state.rules,onConnectionsChange:this._onConnectionsChange,onStagesChange:this._onStagesChange,onPipelineChange:this._savePipeline});var n=this._isNewPipeline(this.props.params.pipelineId)?"New pipeline":"Pipeline "+this.state.pipeline.title;return l.default.createElement(f.DocumentTitle,{title:n},l.default.createElement("div",null,l.default.createElement(f.PageHeader,{title:e},l.default.createElement("span",null,"Pipelines let you transform and process messages coming from streams. Pipelines consist of stages where rules are evaluated and applied. Messages can go through one or more stages."),l.default.createElement("span",null,"After each stage is completed, you can decide if messages matching all or one of the rules continue to the next stage."),l.default.createElement("span",null,l.default.createElement(h.LinkContainer,{to:P.default.pluginRoute("SYSTEM_PIPELINES")},l.default.createElement(d.Button,{bsStyle:"info",className:"active"},"Manage pipelines"))," ",l.default.createElement(h.LinkContainer,{to:P.default.pluginRoute("SYSTEM_PIPELINES_RULES")},l.default.createElement(d.Button,{bsStyle:"info"},"Manage rules"))," ",l.default.createElement(h.LinkContainer,{to:P.default.pluginRoute("SYSTEM_PIPELINES_SIMULATE")},l.default.createElement(d.Button,{bsStyle:"info"},"Simulator")))),l.default.createElement(d.Row,{className:"content"},l.default.createElement(d.Col,{md:12},t))))}});exports.default=I,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=(t(19),t(11)),u=t(601),c=n(u),d=t(185),h=n(d),f=t(186),p=n(f),g=t(603),m=n(g),v=t(183),y=n(v),b=t(16),_=(n(b),a.default.createClass({displayName:"Pipeline",propTypes:{pipeline:i.default.object.isRequired,connections:i.default.array.isRequired,streams:i.default.array.isRequired,onConnectionsChange:i.default.func.isRequired,onStagesChange:i.default.func.isRequired,onPipelineChange:i.default.func.isRequired},componentDidMount:function(){this.style.use()},componentWillUnmount:function(){this.style.unuse()},style:t(604),_connections_warning:function(){if(0==this.props.connections.length)return a.default.createElement(s.Alert,{bsStyle:"danger",className:"pipeline-no-connections-warning"},"This pipeline is currently not connected to any streams. You have to connect a pipeline to at least one stream to make it process incoming messages. Note that this is not required if you intend to use this pipeline only for search result transformation using decorators.")},_saveStage:function(e,t){var n=this.props.pipeline.stages.slice();n.push(e),this.props.onStagesChange(n,t)},_updateStage:function(e){var t=this;return function(n,r){var i=t.props.pipeline.stages.filter(function(t){return t.stage!==e.stage});i.push(n),t.props.onStagesChange(i,r)}},_deleteStage:function(e){var t=this;return function(){if(confirm("You are about to delete stage "+e.stage+", are you sure you want to proceed?")){var n=t.props.pipeline.stages.filter(function(t){return t.stage!==e.stage});t.props.onStagesChange(n)}}},_formatConnectedStreams:function(e){var t=e.map(function(e){return'"'+e.title+'"'}),n=e.length>1?[t.slice(0,-1).join(", "),t.slice(-1)].join(" and "):t[0];return a.default.createElement("span",null,"This pipeline is processing messages from the"," ",a.default.createElement(l.Pluralize,{singular:"stream",plural:"streams",value:e.length})," ",n,".")},_formatStage:function(e,t){return a.default.createElement(c.default,{key:"stage-"+e.stage,pipeline:this.props.pipeline,stage:e,isLastStage:e.stage===t,onUpdate:this._updateStage(e),onDelete:this._deleteStage(e)})},render:function(){var e=this,t=this.props.pipeline,n=t.stages.reduce(function(e,t){return Math.max(e,t.stage)},-1/0),r=t.stages.sort(function(e,t){return e.stage-t.stage}).map(function(t){return e._formatStage(t,n)});return a.default.createElement("div",null,this._connections_warning(),a.default.createElement(p.default,{pipeline:t,onChange:this.props.onPipelineChange}),a.default.createElement(s.Row,{className:"row-sm row-margin-top"},a.default.createElement(s.Col,{md:12},a.default.createElement("div",{className:"pull-right"},a.default.createElement(m.default,{pipeline:t,connections:this.props.connections,streams:this.props.streams,save:this.props.onConnectionsChange})),a.default.createElement("h2",null,"Pipeline connections"),a.default.createElement("p",{className:"description-margin-top"},a.default.createElement(y.default,{pipeline:t,connections:this.props.connections,streams:this.props.streams,streamsFormatter:this._formatConnectedStreams,noConnectionsMessage:"Select streams that will be processed by this pipeline."})),a.default.createElement("hr",null))),a.default.createElement(s.Row,{className:"row-sm row-margin-top"},a.default.createElement(s.Col,{md:12},a.default.createElement("div",{className:"pull-right"},a.default.createElement(h.default,{create:!0,save:this._saveStage})),a.default.createElement("h2",null,"Pipeline Stages"),a.default.createElement("p",{className:"description-margin-top"},"Stages are groups of conditions and actions which need to run in order, and provide the necessary"," ","control flow to decide whether or not to run the rest of a pipeline."))),a.default.createElement(l.EntityList,{bsNoItemsStyle:"info",noItemsText:"There are no rules on this stage.",items:r}))}}));exports.default=_,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(2),l=n(s),u=t(3),c=t(19),d=t(11),h=t(50),f=n(h),p=t(185),g=n(p),m=t(38),v=t(16),y=n(v),b=a.default.createClass({displayName:"Stage",propTypes:{stage:i.default.object.isRequired,pipeline:i.default.object.isRequired,isLastStage:i.default.bool,onUpdate:i.default.func.isRequired,onDelete:i.default.func.isRequired},mixins:[l.default.connect(f.default)],_ruleHeaderFormatter:function(e){return a.default.createElement("th",null,e)},_ruleRowFormatter:function(e,t,n){var r=t,i=void 0;return r?i=a.default.createElement(c.LinkContainer,{to:y.default.pluginRoute("SYSTEM_PIPELINES_RULES_RULEID")(r.id)},a.default.createElement("a",null,r.title)):(r={id:"invalid-"+n,description:"Rule "+e.rules[n]+" has been renamed or removed. This rule will be skipped."},i=a.default.createElement("span",null,a.default.createElement("i",{className:"fa fa-warning text-danger"})," ",e.rules[n])),a.default.createElement("tr",{key:r.id},a.default.createElement("td",{style:{width:400}},i),a.default.createElement("td",null,r.description),a.default.createElement("td",null,a.default.createElement(m.MetricContainer,{name:"org.graylog.plugins.pipelineprocessor.ast.Rule."+r.id+"."+this.props.pipeline.id+"."+e.stage+".executed"},a.default.createElement(m.CounterRate,{zeroOnMissing:!0,suffix:"msg/s"}))),a.default.createElement("td",null,a.default.createElement(m.MetricContainer,{name:"org.graylog.plugins.pipelineprocessor.ast.Rule."+r.id+"."+this.props.pipeline.id+"."+e.stage+".failed"},a.default.createElement(m.CounterRate,{showTotal:!0,zeroOnMissing:!0,suffix:"errors/s"}))))},_formatRules:function(e,t){var n=this,r=["Title","Description","Throughput","Errors"];return a.default.createElement(d.DataTable,{id:"processing-timeline",className:"table-hover",headers:r,headerCellFormatter:this._ruleHeaderFormatter,rows:t,dataRowFormatter:function(t,r){return n._ruleRowFormatter(e,t,r)},noDataText:"This stage has no rules yet. Click on edit to add some.",filterLabel:"",filterKeys:[]})},render:function(){var e=this,t=this.props.stage,n="Contains "+(1===t.rules.length?"1 rule":t.rules.length+" rules"),r=a.default.createElement(m.MetricContainer,{name:"org.graylog.plugins.pipelineprocessor.ast.Pipeline."+this.props.pipeline.id+".stage."+t.stage+".executed"},a.default.createElement(m.CounterRate,{showTotal:!1,prefix:"Throughput: ",suffix:"msg/s"})),i=[a.default.createElement(u.Button,{key:"delete-stage",bsStyle:"primary",onClick:this.props.onDelete},"Delete"),a.default.createElement(g.default,{key:"edit-stage",stage:t,save:this.props.onUpdate})],o=void 0;o=this.props.isLastStage?"There are no further stages in this pipeline. Once rules in this stage are applied, the pipeline will have finished processing.":a.default.createElement("span",null,"Messages satisfying ",a.default.createElement("strong",null,t.match_all?"all rules":"at least one rule")," ","in this stage, will continue to the next stage.");var s=a.default.createElement("span",null,o,a.default.createElement("br",null),r),l=void 0;return l=this.state.rules?this._formatRules(t,this.props.stage.rules.map(function(t){return e.state.rules.filter(function(e){return e.title===t})[0]})):a.default.createElement(d.Spinner,null),a.default.createElement(d.EntityListItem,{title:"Stage "+t.stage,titleSuffix:n,actions:i,description:s,contentRow:a.default.createElement(u.Col,{md:12},l)})}});exports.default=b,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(13),u=t(33),c=n(u),d=t(39),h=n(d),f=a.default.createClass({displayName:"PipelineForm",propTypes:{pipeline:i.default.object,create:i.default.bool,modal:i.default.bool,save:i.default.func.isRequired,validatePipeline:i.default.func.isRequired,onCancel:i.default.func},getDefaultProps:function(){return{modal:!0,pipeline:{id:void 0,title:"",description:"",stages:[{stage:0,rules:[]}]}}},getInitialState:function(){var e=c.default.clone(this.props.pipeline);return{pipeline:{id:e.id,title:e.title,description:e.description,stages:e.stages}}},openModal:function(){this.refs.modal.open()},_onChange:function(e){var t=c.default.clone(this.state.pipeline);t[e.target.name]=h.default.getValueFromInput(e.target),this.setState({pipeline:t})},_closeModal:function(){this.refs.modal.close()},_saved:function(){this.props.modal&&this._closeModal(),this.props.create&&this.setState(this.getInitialState())},_save:function(e){e&&e.preventDefault(),this.props.save(this.state.pipeline,this._saved)},render:function(){var e=void 0;e=this.props.create?"Add new pipeline":"Edit pipeline details";var t=a.default.createElement("fieldset",null,a.default.createElement(l.Input,{type:"text",id:"title",name:"title",label:"Title",autoFocus:!0,required:!0,onChange:this._onChange,help:"Pipeline name.",value:this.state.pipeline.title}),a.default.createElement(l.Input,{type:"text",id:"description",name:"description",label:"Description",onChange:this._onChange,help:"Pipeline description.",value:this.state.pipeline.description}));return this.props.modal?a.default.createElement("span",null,a.default.createElement(s.Button,{onClick:this.openModal,bsStyle:"success"},e),a.default.createElement(l.BootstrapModalForm,{ref:"modal",title:(this.props.create?"Add new":"Edit")+" pipeline "+this.state.pipeline.title,onSubmitForm:this._save,submitButtonText:"Save"},t)):a.default.createElement("form",{onSubmit:this._save},t,a.default.createElement(s.Row,null,a.default.createElement(s.Col,{md:12},a.default.createElement(s.Button,{type:"submit",bsStyle:"primary",style:{marginRight:10}},"Save"),a.default.createElement(s.Button,{type:"button",onClick:this.props.onCancel},"Cancel"))))}});exports.default=f,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(19),u=t(64),c=n(u),d=t(11),h=t(46),f=n(h),p=t(16),g=n(p),m=a.default.createClass({displayName:"PipelineConnectionsForm",propTypes:{pipeline:i.default.object.isRequired,connections:i.default.array.isRequired,streams:i.default.array.isRequired,save:i.default.func.isRequired},getInitialState:function(){return{connectedStreams:this._getFormattedStreams(this._getConnectedStreams(this.props.pipeline,this.props.connections,this.props.streams))}},openModal:function(){this.refs.modal.open()},_onStreamsChange:function(e){this.setState({connectedStreams:e.sort(function(e,t){return(0,c.default)(e.label,t.label)})})},_closeModal:function(){this.refs.modal.close()},_resetForm:function(){this.setState(this.getInitialState())},_saved:function(){this._closeModal()},_save:function(){var e=this.state.connectedStreams.map(function(e){return e.value}),t={pipeline:this.props.pipeline.id,streams:e};this.props.save(t,this._saved)},_getConnectedStreams:function(e,t,n){var r=this;return t.filter(function(t){return t.pipeline_ids&&t.pipeline_ids.includes(e.id)}).filter(function(e){return n.some(function(t){return t.id===e.stream_id})}).map(function(e){return r.props.streams.find(function(t){return t.id===e.stream_id})})},_getFormattedStreams:function(e){return e.map(function(e){return{value:e.id,label:e.title}}).sort(function(e,t){return(0,c.default)(e.label,t.label)})},_getFilteredStreams:function(e){var t=this;return e.filter(function(e){return!t.state.connectedStreams.some(function(t){return t.value.toLowerCase()===e.id.toLowerCase()})})},render:function(){var e=a.default.createElement("span",null,"Select the streams you want to connect to this pipeline, or create one in the"," ",a.default.createElement(l.LinkContainer,{to:g.default.STREAMS},a.default.createElement("a",null,"Streams page")),".");return a.default.createElement("span",null,a.default.createElement(s.Button,{onClick:this.openModal,bsStyle:"info"},a.default.createElement("span",null,"Edit connections")),a.default.createElement(f.default,{ref:"modal",title:a.default.createElement("span",null,"Edit connections for ",a.default.createElement("em",null,this.props.pipeline.title)),onSubmitForm:this._save,onCancel:this._resetForm,submitButtonText:"Save"},a.default.createElement("fieldset",null,a.default.createElement(s.FormGroup,{id:"streamsConnections"},a.default.createElement(s.ControlLabel,null,"Streams"),a.default.createElement(d.SelectableList,{options:this._getFormattedStreams(this._getFilteredStreams(this.props.streams)),onChange:this._onStreamsChange,selectedOptionsType:"object",selectedOptions:this.state.connectedStreams}),a.default.createElement(s.HelpBlock,null,e)))))}});exports.default=m,e.exports=exports.default},function(e,exports,t){var n,r=0,i=t(605);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(exports.locals=i.locals),exports.use=exports.ref=function(){return r++||(n=t(15)(i,{})),exports},exports.unuse=exports.unref=function(){r>0&&!--r&&(n(),n=null)}},function(e,exports,t){exports=e.exports=t(14)(void 0),exports.push([e.i,'.pipeline-dl{margin-bottom:0}dl.pipeline-dl>dt{text-align:left;width:140px}dl.pipeline-dl>dt:after{content:":"}dl.pipeline-dl>dd{margin-left:100px}.row-margin-top{margin-top:10px}.description-margin-top{margin-top:5px}.pipeline-no-connections-warning{margin-bottom:13px}',""])},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(186),u=n(l),c=t(16),d=n(c),h=a.default.createClass({displayName:"NewPipeline",propTypes:{onChange:i.default.func.isRequired,history:i.default.object.isRequired},_onChange:function(e){this.props.onChange(e,this._goToPipeline)},_goToPipeline:function(e){this.props.history.pushState(null,d.default.pluginRoute("SYSTEM_PIPELINES_PIPELINEID")(e.id))},_goBack:function(){this.props.history.goBack()},render:function(){return a.default.createElement(s.Row,null,a.default.createElement(s.Col,{md:6},a.default.createElement("p",null,"Give a name and description to the new pipeline. You can add stages to it when you save the changes."),a.default.createElement(u.default,{create:!0,onChange:this._onChange,onCancel:this._goBack})))}});exports.default=h,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n={generatePipeline:function(e){var t='pipeline "'+e.title+'"\n';return e.stages.forEach(function(e){t+="stage "+e.stage+" match "+(e.match_all?"all":"either")+"\n",e.rules.forEach(function(e){t+='rule "'+e+'"\n'})}),t+="end"}};exports.default=n,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(0),i=n(r),o=t(3),a=t(19),s=t(11),l=t(30),u=n(l),c=t(609),d=n(c),h=t(9),f=n(h),p=t(27),g=n(p),m=t(16),v=n(m),y=f.default.getStore("Streams"),b=i.default.createClass({displayName:"SimulatorPage",getInitialState:function(){return{streams:void 0}},componentDidMount:function(){var e=this;y.listStreams().then(function(t){e.setState({streams:t})})},_isLoading:function(){return!this.state.streams},render:function(){var e=void 0;return e=this._isLoading()?i.default.createElement(s.Spinner,null):i.default.createElement(d.default,{streams:this.state.streams}),i.default.createElement(s.DocumentTitle,{title:"Simulate processing"},i.default.createElement("div",null,i.default.createElement(s.PageHeader,{title:"Simulate processing"},i.default.createElement("span",null,"Processing messages can be complex. Use this page to simulate the result of processing an incoming message using your current set of pipelines and rules."),i.default.createElement("span",null,"Read more about Graylog pipelines in the ",i.default.createElement(u.default,{page:g.default.PAGES.PIPELINES,text:"documentation"}),"."),i.default.createElement("span",null,i.default.createElement(a.LinkContainer,{to:v.default.pluginRoute("SYSTEM_PIPELINES")},i.default.createElement(o.Button,{bsStyle:"info"},"Manage pipelines"))," ",i.default.createElement(a.LinkContainer,{to:v.default.pluginRoute("SYSTEM_PIPELINES_RULES")},i.default.createElement(o.Button,{bsStyle:"info"},"Manage rules"))," ",i.default.createElement(a.LinkContainer,{to:v.default.pluginRoute("SYSTEM_PIPELINES_SIMULATE")},i.default.createElement(o.Button,{bsStyle:"info",className:"active"},"Simulator")))),i.default.createElement(o.Row,{className:"content"},i.default.createElement(o.Col,{md:12},e))))}});exports.default=b,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(64),u=n(l),c=t(19),d=t(11),h=t(610),f=n(h),p=t(619),g=n(p),m=t(16),v=n(m),y=t(204),b=n(y),_=t(731),w=(n(_),a.default.createClass({displayName:"ProcessorSimulator",propTypes:{streams:i.default.array.isRequired},getInitialState:function(){return this.defaultStream=this.props.streams.find(function(e){return"000000000000000000000001"===e.id})||this.props.streams[0],{message:void 0,stream:this.defaultStream,simulation:void 0,loading:!1,error:void 0}},_onMessageLoad:function(e,t){var n=this;this.setState({message:e,simulation:void 0,loading:!0,error:void 0}),b.default.simulate.triggerPromise(this.state.stream,e.fields,t.inputId).then(function(e){n.setState({simulation:e,loading:!1})},function(e){n.setState({loading:!1,error:e})})},_getFormattedStreams:function(e){return e?e.map(function(e){return{value:e.id,label:e.title}}).sort(function(e,t){return(0,u.default)(e.label,t.label)}):[]},_onStreamSelect:function(e){var t=this.props.streams.find(function(t){return t.id.toLowerCase()===e.toLowerCase()});this.setState({stream:t})},render:function(){if(0===this.props.streams.length)return a.default.createElement("div",null,a.default.createElement(s.Row,{className:"row-sm"},a.default.createElement(s.Col,{md:8,mdOffset:2},a.default.createElement(s.Panel,{bsStyle:"danger",header:"No streams found"},"Pipelines operate on streams, but your system currently has no streams. Please"," ",a.default.createElement(c.LinkContainer,{to:v.default.STREAMS},a.default.createElement("a",null,"create a stream"))," ","and come back here later to test pipelines processing messages in your new stream."))));var e=a.default.createElement("span",null,"Select a stream to use during simulation, the ",a.default.createElement("em",null,this.defaultStream.title)," stream is used by default.");return a.default.createElement("div",null,a.default.createElement(s.Row,null,a.default.createElement(s.Col,{md:12},a.default.createElement("h1",null,"Load a message"),a.default.createElement("p",null,"Build an example message that will be used in the simulation."," ",a.default.createElement("strong",null,"No real messages stored in Graylog will be changed. All actions are purely simulated on the temporary input you provide below.")),a.default.createElement(s.Row,{className:"row-sm"},a.default.createElement(s.Col,{md:7},a.default.createElement(s.FormGroup,{id:"streamSelectorSimulation"},a.default.createElement(s.ControlLabel,null,"Stream"),a.default.createElement(d.Select,{options:this._getFormattedStreams(this.props.streams),onChange:this._onStreamSelect,value:this.state.stream.id,required:!0,clearable:!1}),a.default.createElement(s.HelpBlock,null,e)))),a.default.createElement(f.default,{onMessageLoaded:this._onMessageLoad,inputIdSelector:!0}))),a.default.createElement(g.default,{stream:this.state.stream,originalMessage:this.state.message,simulationResults:this.state.simulation,isLoading:this.state.loading,error:this.state.error}))}}));exports.default=w,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(2),l=n(s),u=t(3),c=t(13),d=t(11),h=t(51),f=t(6),p=n(f),g=t(9),m=n(g),v=p.default.getActions("Messages"),y=p.default.getActions("CodecTypes"),b=p.default.getActions("Inputs"),_=(m.default.getStore("Messages"),m.default.getStore("CodecTypes")),w=m.default.getStore("Inputs"),C=a.default.createClass({displayName:"RawMessageLoader",propTypes:{onMessageLoaded:i.default.func.isRequired,inputIdSelector:i.default.bool},mixins:[l.default.connect(_),l.default.connect(w)],getDefaultProps:function(){return{inputIdSelector:!1}},getInitialState:function(){return{loading:!1,message:"",remoteAddress:"",codec:"",codecConfiguration:{},inputId:void 0}},componentDidMount:function(){y.list(),this.props.inputIdSelector&&b.list()},DEFAULT_REMOTE_ADDRESS:"127.0.0.1",_loadMessage:function(e){var t=this;e.preventDefault();var n=this.state,r=n.message,i=n.remoteAddress,o=n.codec,a=n.codecConfiguration,s=n.inputId;this.setState({loading:!0});var l=v.loadRawMessage.triggerPromise(r,i||this.DEFAULT_REMOTE_ADDRESS,o,a);l.then(function(e){t.props.onMessageLoaded(e,{message:r,remoteAddress:i,codec:o,codecConfiguration:a,inputId:s})}),l.finally(function(){return t.setState({loading:!1})})},_bindValue:function(e){var t={};t[e.target.name]=e.target.value,this.setState(t)},_formatSelectOptions:function(){var e=this;if(!this.state.codecTypes)return[{value:"none",label:"Loading codec types...",disabled:!0}];var t=Object.keys(this.state.codecTypes);return 0===t.length?[{value:"none",label:"No codecs available"}]:t.filter(function(e){return"random-http-msg"!==e}).map(function(t){var n=e.state.codecTypes[t].name;return{value:t,label:""===n?t:n}}).sort(function(e,t){return e.label.toLowerCase().localeCompare(t.label.toLowerCase())})},_formatInputSelectOptions:function(){var e=this;if(!this.state.inputs)return[{value:"none",label:"Loading inputs...",disabled:!0}];var t=Object.keys(this.state.inputs);return 0===t.length?[{value:"none",label:"No inputs available"}]:t.map(function(t){var n=e.state.inputs[t].id;return{value:n,label:n+" / "+e.state.inputs[t].title+" / "+e.state.inputs[t].name}}).sort(function(e,t){return e.label.toLowerCase().localeCompare(t.label.toLowerCase())})},_onCodecSelect:function(e){this._bindValue({target:{name:"codec",value:e}}),this.setState({codecConfiguration:{}})},_onInputSelect:function(e){this.setState({inputId:e})},_onCodecConfigurationChange:function(e,t){var n=Object.assign(this.state.codecConfiguration);n[e]=t,this._bindValue({target:{name:"codecConfiguration",value:n}})},_formatConfigField:function(e,t){var n=this.state.codecConfiguration[e],r="RawMessageLoader",i=r+"-"+e;switch(t.type){case"text":return a.default.createElement(h.TextField,{key:i,typeName:r,title:e,field:t,value:n,onChange:this._onCodecConfigurationChange});case"number":return a.default.createElement(h.NumberField,{key:i,typeName:r,title:e,field:t,value:n,onChange:this._onCodecConfigurationChange});case"boolean":return a.default.createElement(h.BooleanField,{key:i,typeName:r,title:e,field:t,value:n,onChange:this._onCodecConfigurationChange});case"dropdown":return a.default.createElement(h.DropdownField,{key:i,typeName:r,title:e,field:t,value:n,onChange:this._onCodecConfigurationChange});default:return null}},_isSubmitDisabled:function(){return!this.state.message||!this.state.codec||this.state.loading},render:function(){var e=this,t=void 0;if(this.state.codecTypes&&this.state.codec){var n=this.state.codecTypes[this.state.codec].requested_configuration;t=Object.keys(n).sort(function(e,t){return n[e].is_optional-n[t].is_optional}).map(function(t){return e._formatConfigField(t,n[t])})}var r=void 0;return this.props.inputIdSelector&&(r=a.default.createElement(c.Input,{id:"input",name:"input",label:a.default.createElement("span",null,"Message input ",a.default.createElement("small",null,"(optional)")),help:"Select the message input ID that should be assigned to the parsed message."},a.default.createElement(d.Select,{id:"input",placeholder:"Select input",options:this._formatInputSelectOptions(),matchProp:"label",onChange:this._onInputSelect,value:this.state.inputId}))),a.default.createElement(u.Row,null,a.default.createElement(u.Col,{md:7},a.default.createElement("form",{onSubmit:this._loadMessage},a.default.createElement("fieldset",null,a.default.createElement(c.Input,{id:"message",name:"message",type:"textarea",label:"Raw message",value:this.state.message,onChange:this._bindValue,rows:3,required:!0}),a.default.createElement(c.Input,{id:"remoteAddress",name:"remoteAddress",type:"text",label:a.default.createElement("span",null,"Source IP address ",a.default.createElement("small",null,"(optional)")),help:"Remote IP address to use as message source. Graylog will use "+this.DEFAULT_REMOTE_ADDRESS+" by default.",value:this.state.remoteAddress,onChange:this._bindValue})),r,a.default.createElement("fieldset",null,a.default.createElement("legend",null,"Codec configuration"),a.default.createElement(c.Input,{id:"codec",name:"codec",label:"Message codec",help:"Select the codec that should be used to decode the message.",required:!0},a.default.createElement(d.Select,{id:"codec",placeholder:"Select codec",options:this._formatSelectOptions(),matchProp:"label",onChange:this._onCodecSelect,value:this.state.codec})),t),a.default.createElement(u.Button,{type:"submit",bsStyle:"info",disabled:this._isSubmitDisabled()},this.state.loading?"Loading message...":"Load message"))))}});exports.default=C,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(66),l=n(s),u=t(39),c=n(u),d=a.default.createClass({displayName:"BooleanField",propTypes:{autoFocus:i.default.bool,field:i.default.object.isRequired,onChange:i.default.func.isRequired,title:i.default.string.isRequired,typeName:i.default.string.isRequired,value:i.default.any},render:function(){var e=this.props.field,t=this.props.typeName,n=this.props.title;return a.default.createElement("div",{className:"form-group"},a.default.createElement("div",{className:"checkbox"},a.default.createElement("label",null,a.default.createElement("input",{id:t+"-"+n,type:"checkbox",checked:this.props.value,name:"configuration["+n+"]",onChange:this.handleChange}),e.human_name,l.default.optionalMarker(e))),a.default.createElement("p",{className:"help-block"},e.description))},handleChange:function(e){var t=c.default.getValueFromInput(e.target);this.props.onChange(this.props.title,t)}});exports.default=d,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(12),i=n(r),o=t(1),a=n(o),s=t(0),l=n(s),u=t(46),c=n(u),d=t(51),h=l.default.createClass({displayName:"ConfigurationForm",propTypes:{cancelAction:a.default.func,children:a.default.node,helpBlock:a.default.node,includeTitleField:a.default.bool,submitAction:a.default.func.isRequired,title:a.default.node,titleValue:a.default.string,typeName:a.default.string,values:a.default.object},getDefaultProps:function(){return{includeTitleField:!0,titleValue:"",values:{}}},getInitialState:function(){return this._copyStateFromProps(this.props)},componentWillReceiveProps:function(e){var t=this._copyStateFromProps(e),n=this.state?this.state.values:{};t.values=i.default.extend(t.values,n),this.setState(t)},getValue:function(){var e={},t=this.state.values;return this.props.includeTitleField&&(e.title=this.state.titleValue),e.type=this.props.typeName,e.configuration={},i.default.map(this.state.configFields,function(n,r){e.configuration[r]=void 0===t[r]?null:t[r]}),e},_copyStateFromProps:function(e){var t=this.state&&void 0!==this.state.titleValue?this.state.titleValue:e.titleValue,n={};return e.configFields&&Object.keys(e.configFields).forEach(function(t){n[t]=e.configFields[t].default_value}),{configFields:i.default.extend({},e.configFields),values:i.default.extend({},n,e.values),titleValue:t}},_sortByOptionality:function(e,t){return this.state.configFields[e].is_optional-this.state.configFields[t].is_optional},_save:function(){var e=this.getValue();this.props.submitAction(e),this.refs.modal.close()},open:function(){this.refs.modal.open()},_closeModal:function(){this.setState(i.default.extend(this.getInitialState(),{titleValue:this.props.titleValue})),this.props.cancelAction&&this.props.cancelAction()},_handleTitleChange:function(e,t){this.setState({titleValue:t})},_handleChange:function(e,t){var n=this.state.values;n[e]=t,this.setState({values:n})},_renderConfigField:function(e,t,n){var r=this.state.values[t],i=this.props.typeName,o=i+"-"+t;switch(e.type){case"text":return l.default.createElement(d.TextField,{key:o,typeName:i,title:t,field:e,value:r,onChange:this._handleChange,autoFocus:n});case"number":return l.default.createElement(d.NumberField,{key:o,typeName:i,title:t,field:e,value:r,onChange:this._handleChange,autoFocus:n});case"boolean":return l.default.createElement(d.BooleanField,{key:o,typeName:i,title:t,field:e,value:r,onChange:this._handleChange,autoFocus:n});case"dropdown":return l.default.createElement(d.DropdownField,{key:o,typeName:i,title:t,field:e,value:r,onChange:this._handleChange,autoFocus:n,addPlaceholder:!0});case"list":return l.default.createElement(d.ListField,{key:o,typeName:i,title:t,field:e,value:r,onChange:this._handleChange,autoFocus:n,addPlaceholder:!0});default:return null}},render:function(){var e=this,t=this.props.typeName,n=this.props.title,r=this.props.helpBlock,o=!0,a=void 0;this.props.includeTitleField&&(a=l.default.createElement(d.TitleField,{key:t+"-title",typeName:t,value:this.state.titleValue,onChange:this._handleTitleChange,helpBlock:r}),o=!1);var s=i.default.map(this.state.configFields,function(e,t){return t}).sort(this._sortByOptionality),u=s.map(function(t){var n=e._renderConfigField(e.state.configFields[t],t,o);return o&&(o=!1),n});return l.default.createElement(c.default,{ref:"modal",title:n,onCancel:this._closeModal,onSubmitForm:this._save,submitButtonText:"Save"},l.default.createElement("fieldset",null,l.default.createElement("input",{type:"hidden",name:"type",value:t}),this.props.children,a,u))}});exports.default=h,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=a.default.createClass({displayName:"ConfigurationWell",propTypes:{id:i.default.string,configuration:i.default.any,typeDefinition:i.default.object},PASSWORD_PLACEHOLDER:"********",_formatRegularField:function(e,t){var n=void 0;return n=null===e||void 0===e||""===e||Array.isArray(e)&&0===e.length?a.default.createElement("i",null,""):Array.isArray(e)?e.join(", "):String(e),a.default.createElement("li",{key:this.props.id+"-"+t},a.default.createElement("div",{className:"key"},t,":")," ",a.default.createElement("div",{className:"value"},n))},_formatPasswordField:function(e,t){return a.default.createElement("li",{key:this.props.id+"-"+t},a.default.createElement("div",{className:"key"},t,":")," ",a.default.createElement("div",{className:"value"},this.PASSWORD_PLACEHOLDER))},_formatConfiguration:function(e,t,n){var r=this;if(!t)return"";var i=Object.keys(t).sort().map(function(e){var i=t[e],o=n&&n.requested_configuration?n.requested_configuration[e]:void 0;return o&&o.attributes.indexOf("is_password")>-1?r._formatPasswordField(i,e):r._formatRegularField(i,e)});return i.length<1&&i.push(a.default.createElement("li",{key:"placeholder"},"-- no configuration --")),a.default.createElement("ul",null,i)},render:function(){return a.default.createElement("div",{className:"well well-small configuration-well react-configuration-well"},this._formatConfiguration(this.props.id,this.props.configuration,this.props.typeDefinition))}});exports.default=s,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(12),i=n(r),o=t(1),a=n(o),s=t(0),l=n(s),u=t(66),c=n(u),d=l.default.createClass({displayName:"DropdownField",propTypes:{autoFocus:a.default.bool.isRequired,field:a.default.object.isRequired,onChange:a.default.func.isRequired,title:a.default.string.isRequired,typeName:a.default.string.isRequired,value:a.default.any,addPlaceholder:a.default.bool,disabled:a.default.bool},getDefaultProps:function(){return{addPlaceholder:!1}},getInitialState:function(){return{typeName:this.props.typeName,field:this.props.field,title:this.props.title,value:this.props.value}},componentWillReceiveProps:function(e){this.setState(e)},_formatOption:function(e,t,n){return l.default.createElement("option",{key:this.state.typeName+"-"+this.state.title+"-"+t,value:t,id:t,disabled:n},e)},handleChange:function(e){this.props.onChange(this.state.title,e.target.value),this.setState({value:e.target.value})},render:function(){var e=this.state.field,t=i.default.map(e.additional_info.values,this._formatOption);this.props.addPlaceholder&&t.unshift(this._formatOption("Select "+(e.human_name||this.state.title),"",!0));var n=this.state.typeName;return l.default.createElement("div",{className:"form-group"},l.default.createElement("label",{htmlFor:n+"-"+e.title},e.human_name,c.default.optionalMarker(e)),l.default.createElement("select",{id:e.title,value:this.state.value,className:"input-xlarge form-control",onChange:this.handleChange,autoFocus:this.props.autoFocus,disabled:this.props.disabled,required:!e.is_optional},t),l.default.createElement("p",{className:"help-block"},e.description))}});exports.default=d,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(11),l=t(51),u=a.default.createClass({displayName:"ListField",propTypes:{autoFocus:i.default.bool.isRequired,field:i.default.object.isRequired,onChange:i.default.func.isRequired,title:i.default.string.isRequired,typeName:i.default.string.isRequired,value:i.default.oneOfType([i.default.array,i.default.string]),addPlaceholder:i.default.bool,disabled:i.default.bool},getDefaultProps:function(){return{addPlaceholder:!1}},getInitialState:function(){return{typeName:this.props.typeName,field:this.props.field,title:this.props.title,value:this.props.value}},componentWillReceiveProps:function(e){this.setState(e)},_formatOption:function(e,t){return{value:t,label:e}},_handleChange:function(e){var t=""===e?[]:e.split(",");this.props.onChange(this.state.title,t),this.setState({value:t})},render:function(){var e=this,t=this.state.field,n=this.state.typeName,r=this.state.value,i=!t.is_optional,o=t.attributes.includes("allow_create"),u=t.additional_info&&t.additional_info.values?t.additional_info.values:{},c=Object.keys(u).map(function(t){return e._formatOption(t,u[t])});return a.default.createElement("div",{className:"form-group"},a.default.createElement("label",{htmlFor:n+"-"+t.title},t.human_name,l.FieldHelpers.optionalMarker(t)),a.default.createElement(s.MultiSelect,{id:t.title,required:i,autoFocus:this.props.autoFocus,options:c,value:r?Array.isArray(r)?r.join(","):r:void 0,placeholder:(o?"Add":"Select")+" "+t.human_name,onChange:this._handleChange,disabled:this.props.disabled,allowCreate:o}),a.default.createElement("p",{className:"help-block"},t.description))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t0?t[0]:this._getDefaultValidationSpecs()},handleChange:function(e){var t=d.default.getValueFromInput(e.target);this.props.onChange(this.props.title,t)},render:function(){var e=this.props.typeName,t=this.props.field,n=!t.is_optional,i=this.validationSpec(t);return s.default.createElement("div",{className:"form-group"},s.default.createElement("label",{htmlFor:e+"-"+t.title},t.human_name,u.default.optionalMarker(t)),s.default.createElement("input",r({id:t.title,type:"number",required:n,onChange:this.handleChange,value:this.props.value,className:"input-xlarge validatable form-control"},i,{autoFocus:this.props.autoFocus})),s.default.createElement("p",{className:"help-block"},t.description))}});exports.default=h,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(66),l=n(s),u=a.default.createClass({displayName:"TextField",propTypes:{autoFocus:i.default.bool,field:i.default.object.isRequired,onChange:i.default.func.isRequired,title:i.default.string.isRequired,typeName:i.default.string.isRequired,value:i.default.any},getInitialState:function(){return{typeName:this.props.typeName,field:this.props.field,title:this.props.title,value:this.props.value}},componentWillReceiveProps:function(e){this.setState(e)},handleChange:function(e){this.props.onChange(this.state.title,e.target.value),this.setState({value:e.target.value})},render:function(){var e=this.state.field,t=this.state.title,n=this.state.typeName,r=void 0,i=!e.is_optional,o=!l.default.hasAttribute(e.attributes,"textarea")&&l.default.hasAttribute(e.attributes,"is_password")?"password":"text";return r=l.default.hasAttribute(e.attributes,"textarea")?a.default.createElement("textarea",{id:t,className:"form-control",rows:10,name:"configuration["+t+"]",required:i,value:this.state.value,onChange:this.handleChange,autoFocus:this.props.autoFocus}):a.default.createElement("input",{id:t,type:o,className:"form-control",name:"configuration["+t+"]",value:this.state.value,onChange:this.handleChange,required:i,autoFocus:this.props.autoFocus}),a.default.createElement("div",{className:"form-group"},a.default.createElement("label",{htmlFor:n+"-"+t+")"},e.human_name,l.default.optionalMarker(e)),r,a.default.createElement("p",{className:"help-block"},e.description))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(51),l=a.default.createClass({displayName:"TitleField",propTypes:{helpBlock:i.default.node,onChange:i.default.func,typeName:i.default.string.isRequired,value:i.default.any},getDefaultProps:function(){return{helpBlock:a.default.createElement("span",null),onChange:function(){}}},render:function(){var e=this.props.typeName,t={is_optional:!1,attributes:[],human_name:"Title",description:this.props.helpBlock};return a.default.createElement(s.TextField,{key:e+"-title",typeName:e,title:"title",field:t,value:this.props.value,onChange:this.props.onChange,autoFocus:!0})}});exports.default=l,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(11),u=t(115),c=n(u),d=t(722),h=n(d),f=t(725),p=n(f),g=t(726),m=n(g),v=t(32),y=n(v),b=a.default.createClass({displayName:"SimulationResults",propTypes:{stream:i.default.object.isRequired,originalMessage:i.default.object,simulationResults:i.default.object,isLoading:i.default.bool,error:i.default.object},getInitialState:function(){return{viewOption:this.VIEW_OPTIONS.SIMULATION_SUMMARY}},componentDidMount:function(){this.style.use()},componentWillUnmount:function(){this.style.unuse()},VIEW_OPTIONS:{SIMULATION_PREVIEW:1,SIMULATION_SUMMARY:2,SIMULATION_TRACE:3},style:t(729),_changeViewOptions:function(e){var t=this,n=Object.keys(this.VIEW_OPTIONS).find(function(n){return t.VIEW_OPTIONS[n]===e});this.setState({viewOption:this.VIEW_OPTIONS[n]})},_getViewOptionsMenuItems:function(){var e=[];return e.push(this._getViewOptionsMenuItem(this.VIEW_OPTIONS.SIMULATION_SUMMARY,"Changes summary")),e.push(this._getViewOptionsMenuItem(this.VIEW_OPTIONS.SIMULATION_PREVIEW,"Results preview")),e.push(this._getViewOptionsMenuItem(this.VIEW_OPTIONS.SIMULATION_TRACE,"Simulation trace")),e},_getViewOptionsMenuItem:function(e,t){return a.default.createElement(s.MenuItem,{key:e,eventKey:e,active:this.state.viewOption===e},t)},_getViewComponent:function(e){if(this.props.isLoading||!this.props.simulationResults)return a.default.createElement(l.Spinner,null);switch(this.state.viewOption){case this.VIEW_OPTIONS.SIMULATION_PREVIEW:return a.default.createElement(p.default,{simulationResults:this.props.simulationResults,streams:e});case this.VIEW_OPTIONS.SIMULATION_SUMMARY:return a.default.createElement(h.default,{originalMessage:this.props.originalMessage,simulationResults:this.props.simulationResults});case this.VIEW_OPTIONS.SIMULATION_TRACE:return a.default.createElement(m.default,{simulationResults:this.props.simulationResults})}return null},render:function(){if(!this.props.originalMessage&&!this.props.simulationResults)return null;var e={};e[this.props.stream.id]=this.props.stream;var t=this.props.isLoading?a.default.createElement(l.Spinner,null):null;this.props.originalMessage&&(t=a.default.createElement(c.default,{message:this.props.originalMessage,streams:e,disableTestAgainstStream:!0,disableSurroundingSearch:!0,disableFieldActions:!0,disableMessageActions:!0}));var n=void 0;return this.props.error&&(n=a.default.createElement(s.Alert,{bsStyle:"danger"},a.default.createElement("p",null,a.default.createElement("strong",null,"Error simulating message processing")),a.default.createElement("p",null,"Could not simulate processing of message ",a.default.createElement("em",null,this.props.originalMessage.id)," in stream"," ",a.default.createElement("em",null,this.props.stream.title),".",a.default.createElement("br",null),"Please try loading the message again, or use another message for the simulation."))),a.default.createElement(s.Row,null,a.default.createElement(s.Col,{md:12},a.default.createElement("hr",null)),a.default.createElement(s.Col,{md:6},a.default.createElement("h1",null,"Original message"),a.default.createElement("p",null,"This is the original message loaded from Graylog."),a.default.createElement("div",{className:"message-preview-wrapper"},t)),a.default.createElement(s.Col,{md:6},a.default.createElement("div",{className:"pull-right"},a.default.createElement(s.DropdownButton,{id:"simulation-view-options",title:"More results",onSelect:this._changeViewOptions,bsStyle:"default",bsSize:"small",pullRight:!0},this._getViewOptionsMenuItems())),a.default.createElement("h1",null,"Simulation results"),a.default.createElement("p",null,this.props.isLoading?"Simulating message processing, please wait a moment.":"These are the results of processing the loaded message. Processing took "+y.default.formatNumber(this.props.simulationResults.took_microseconds)+" µs."),n,this._getViewComponent(e)))}});exports.default=b,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(0),i=n(r),o=t(146),a=t(16),s=n(a),l=i.default.createClass({displayName:"StreamLink",render:function(){var e=this.props.stream,t=s.default.stream_search(e.id);return i.default.createElement(o.Link,{to:t},e.title)}});exports.default=l,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(2),l=n(s),u=t(12),c=n(u),d=t(87),h=n(d),f=t(3),p=t(51),g=t(11),m=t(9),v=n(m),y=t(6),b=n(y),_=t(52),w=n(_),C=v.default.getStore("Decorators"),A=b.default.getActions("Decorators"),E=a.default.createClass({displayName:"AddDecoratorButton",propTypes:{nextOrder:i.default.number.isRequired,stream:i.default.string,disabled:i.default.bool},mixins:[l.default.connect(C),h.default],getDefaultProps:function(){return{disabled:!1}},getInitialState:function(){return{typeDefinition:{}}},_formatDecoratorType:function(e,t){return{value:t,label:e.name}},_handleCancel:function(){this.refs.select.clearValue(),this.setState(this.getInitialState())},_handleSubmit:function(e){var t={stream:this.props.stream,type:e.type,config:e.configuration,order:this.props.nextOrder};A.create(t),this.setState({typeName:this.PLACEHOLDER})},_openModal:function(){this.refs.configurationForm.open()},_onTypeChange:function(e){this.setState({typeName:e}),this.state.types[e]?this.setState({typeDefinition:this.state.types[e]}):this.setState({typeDefinition:{}})},render:function(){if(!this.state.types)return a.default.createElement(g.Spinner,null);var e=c.default.map(this.state.types,this._formatDecoratorType),t=this.state.typeName!==this.PLACEHOLDER?a.default.createElement(p.ConfigurationForm,{ref:"configurationForm",key:"configuration-form-output",configFields:this.state.typeDefinition.requested_configuration,title:"Create new "+this.state.typeDefinition.name,typeName:this.state.typeName,includeTitleField:!1,submitAction:this._handleSubmit,cancelAction:this._handleCancel}):null;return a.default.createElement("div",{className:w.default.decoratorBox+" "+w.default.addDecoratorButtonContainer},a.default.createElement("div",{className:w.default.addDecoratorSelect},a.default.createElement(g.Select,{ref:"select",placeholder:"Select decorator",onChange:this._onTypeChange,options:e,matchProp:"label",disabled:this.props.disabled,value:this.state.typeName})),a.default.createElement(f.Button,{bsStyle:"success",disabled:!this.state.typeName||this.props.disabled,onClick:this._openModal},"Apply"),this.state.typeName&&t)}});exports.default=E,e.exports=exports.default},function(e,exports,t){exports=e.exports=t(14)(void 0),exports.push([e.i,"._2AuKyotTQuIDYeJ2ZPw2v_{width:100%}._3kt7ioxB5PPyZgwn0NRBdv{display:flex;justify-content:space-between}._14GS3jLNS-viLItuH2kjXN{line-height:1.5}._2smJgmhPIXu-r0-j5U7ejc{margin-top:5px;margin-bottom:5px}._3EJ75g7KFLRnt5c4rq8m-F{margin-right:5px;width:100%}.U_C6I9SrkRjJYcD5cUQoC{font-size:12px;padding-top:0;padding-right:0;float:right}.jgGtNQJkdfpNc61Xn6uyU{font-size:12px}._18EHOuhMsehz6St_Ic9Bw9{color:#aaa;font-weight:400}._2L65aHFx4zA5jvDgce_kI-{display:inline-block}._3IOSvzWwDHfyeBvz5VICqz{margin-left:5px;top:3px;position:relative}._1Q6sZZq1_maFdlhkDJ9YyG{height:20px}.i6bAiFXUVsagbgNNz1VA6{display:inline-block;overflow-y:auto;width:100%}._1Se4C7zuicKYhvG66u5Qjt{margin-top:2em}",""]),exports.locals={fullWidth:"_2AuKyotTQuIDYeJ2ZPw2v_",decoratorBox:"_3kt7ioxB5PPyZgwn0NRBdv",decoratorType:"_14GS3jLNS-viLItuH2kjXN",addDecoratorButtonContainer:"_2smJgmhPIXu-r0-j5U7ejc",addDecoratorSelect:"_3EJ75g7KFLRnt5c4rq8m-F",helpLink:"U_C6I9SrkRjJYcD5cUQoC",helpPopover:"jgGtNQJkdfpNc61Xn6uyU",decoratorMarker:"_18EHOuhMsehz6St_Ic9Bw9",decoratorFieldWrapper:"_2L65aHFx4zA5jvDgce_kI-",decoratorMarkerSidebar:"_3IOSvzWwDHfyeBvz5VICqz",helpLinkContainer:"_1Q6sZZq1_maFdlhkDJ9YyG",decoratorListContainer:"i6bAiFXUVsagbgNNz1VA6",noDecoratorsAlert:"_1Se4C7zuicKYhvG66u5Qjt"}},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(43),l=n(s),u=a.default.createClass({displayName:"AddSearchCountToDashboard",propTypes:{searchInStream:i.default.object,permissions:i.default.array.isRequired,pullRight:i.default.bool},SEARCH_COUNT_WIDGET_TYPE:"SEARCH_RESULT_COUNT",STREAM_SEARCH_COUNT_WIDGET_TYPE:"STREAM_SEARCH_RESULT_COUNT",render:function(){return a.default.createElement(l.default,{title:"Add count to dashboard",pullRight:this.props.pullRight,widgetType:this.props.searchInStream?this.STREAM_SEARCH_COUNT_WIDGET_TYPE:this.SEARCH_COUNT_WIDGET_TYPE,permissions:this.props.permissions})}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(17),l=n(s),u=t(12),c=n(u),d=t(34),h=t(117),f=t(9),p=n(f),g=t(6),m=n(g),v=t(16),y=n(v),b=t(58),_=n(b),w=p.default.getStore("Widgets"),C=m.default.getActions("Widgets"),A=a.default.createClass({displayName:"Widget",propTypes:{widget:i.default.object.isRequired,dashboardId:i.default.string.isRequired,shouldUpdate:i.default.bool.isRequired,locked:i.default.bool.isRequired,streamIds:i.default.object},getInitialState:function(){return this.widgetPlugin=this._getWidgetPlugin(this.props.widget.type),{result:void 0,calculatedAt:void 0,error:!1,errorMessage:void 0,height:void 0,width:void 0}},componentDidMount:function(){this._loadValue(),this.loadValueInterval=setInterval(this._loadValue,Math.min(1e3*this.props.widget.cache_time,this.DEFAULT_WIDGET_VALUE_REFRESH)),this.eventsThrottler=new _.default,(0,c.default)(window).on("resize",this._onResize)},componentWillReceiveProps:function(e){this.widgetPlugin=this._getWidgetPlugin(e.widget.type)},componentDidUpdate:function(){this._calculateWidgetSize()},componentWillUnmount:function(){clearInterval(this.loadValueInterval),(0,c.default)(window).off("resize",this._onResize)},DEFAULT_WIDGET_VALUE_REFRESH:1e4,WIDGET_HEADER_HEIGHT:25,WIDGET_FOOTER_HEIGHT:20,_getWidgetPlugin:function(e){return d.PluginStore.exports("widgets").filter(function(t){return t.type.toUpperCase()===e.toUpperCase()})[0]},_isBoundToStream:function(){return"stream_id"in this.props.widget.config&&null!==this.props.widget.config.stream_id},_getWidgetNode:function(){return l.default.findDOMNode(this.refs.widget)},_loadValue:function(){var e=this;if(!this.state.deleted&&(void 0===this.state.result||this.props.shouldUpdate)){var t=this.refs.widget.clientWidth;w.loadValue(this.props.dashboardId,this.props.widget.id,t).then(function(t){if(t.calculated_at!==e.state.calculatedAt){var n={result:t.result,calculatedAt:t.calculated_at,error:!1,errorMessage:void 0};t.computation_time_range&&(n.computationTimeRange=t.computation_time_range),e.setState(n)}},function(t){var n=t.message,r=void 0===e.state.result?"N/A":e.state.result;e.setState({result:r,error:!0,errorMessage:"Error loading widget value: "+n})})}},_onResize:function(){this.eventsThrottler.throttle(this._calculateWidgetSize,void 0,this.props.widget.id)},_calculateWidgetSize:function(){var e=(0,c.default)(this._getWidgetNode()),t=e.height()-(this.WIDGET_HEADER_HEIGHT+this.WIDGET_FOOTER_HEIGHT),n=e.width();t===this.state.height&&n===this.state.width||this.setState({height:t,width:n})},_getVisualization:function(){return""===this.props.widget.type?null:void 0===this.state.result?a.default.createElement("div",{className:"loading"},a.default.createElement("i",{className:"fa fa-spin fa-3x fa-refresh spinner"})):"N/A"===this.state.result?a.default.createElement("div",{className:"not-available"},this.state.result):this.widgetPlugin?a.default.createElement(this.widgetPlugin.visualizationComponent,{id:this.props.widget.id,config:this.props.widget.config,data:this.state.result,height:this.state.height,width:this.state.width,computationTimeRange:this.state.computationTimeRange}):a.default.createElement(h.WidgetVisualizationNotFound,{widgetClassName:this.props.widget.type})},_getTimeRange:function(){var e=this.props.widget.config,t=e.timerange.type,n={rangetype:t};switch(t){case"relative":n[t]=e.timerange.range;break;case"absolute":n.from=e.timerange.from,n.to=e.timerange.to;break;case"keyword":n[t]=e.timerange.keyword}return n},replayUrl:function(){var e=this.props.widget.config;return this._isBoundToStream()?y.default.stream_search(this.props.widget.config.stream_id,e.query,this._getTimeRange(),e.interval):y.default.search(e.query,this._getTimeRange(),e.interval)},_showConfig:function(){this.refs.configModal.open()},_showEditConfig:function(){this.refs.editModal.open()},updateWidget:function(e){e.id=this.props.widget.id,w.updateWidget(this.props.dashboardId,e)},deleteWidget:function(){window.confirm('Do you really want to delete "'+this.props.widget.description+'"?')&&(this.setState({deleted:!0}),C.removeWidget(this.props.dashboardId,this.props.widget.id))},render:function(){if(this.state.deleted)return a.default.createElement("span",null);var e=a.default.createElement(h.WidgetConfigModal,{ref:"configModal",dashboardId:this.props.dashboardId,widget:this.props.widget,boundToStream:this._isBoundToStream()}),t=a.default.createElement(h.WidgetEditConfigModal,{ref:"editModal",widget:this.props.widget,onUpdate:this.updateWidget}),n=null;return null!=this.props.streamIds&&this.props.widget.config.stream_id&&!this.props.streamIds[this.props.widget.config.stream_id]&&(n="The stream is not available, cannot replay search."),a.default.createElement("div",{ref:"widget",className:"widget","data-widget-id":this.props.widget.id},a.default.createElement(h.WidgetHeader,{ref:"widgetHeader",title:this.props.widget.description}),this._getVisualization(),a.default.createElement(h.WidgetFooter,{ref:"widgetFooter",locked:this.props.locked,onShowConfig:this._showConfig,onEditConfig:this._showEditConfig,onDelete:this.deleteWidget,replayHref:this.replayUrl(),replayToolTip:n,calculatedAt:this.state.calculatedAt,error:this.state.error,errorMessage:this.state.errorMessage}),this.props.locked?e:t)}});exports.default=A,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=t(1),o=n(i),a=t(0),s=n(a),l=t(3),u=t(19),c=t(34),d=t(16),h=n(d),f=t(28),p=n(f),g=t(54),m=n(g),v=s.default.createClass({displayName:"WidgetConfigModal",propTypes:{boundToStream:o.default.bool.isRequired,widget:o.default.object.isRequired,dashboardId:o.default.string.isRequired},open:function(){this.refs.configModal.open()},hide:function(){this.refs.configModal.close()},_getBasicConfiguration:function(){var e=this,t=c.PluginStore.exports("widgets").filter(function(t){return t.type.toUpperCase()===e.props.widget.type.toUpperCase()})[0],n=t?t.displayName:"Not available";return this.props.boundToStream?s.default.createElement("p",null,"Type: ",n,", cached for ",this.props.widget.cache_time," seconds.  Widget is bound to stream ",this.props.widget.config.stream_id,"."):s.default.createElement("p",null,"Type: ",n,", cached for ",this.props.widget.cache_time," seconds.  Widget is ",s.default.createElement("strong",null,"not")," bound to a stream.")},_formatConfigurationKey:function(e){return p.default.capitalizeFirstLetter(e.replace(/_/g," "))},_formatConfigurationValue:function(e,t){return"query"===e&&""===t?"*":"string"==typeof t?String(t):"object"===(void 0===t?"undefined":r(t))||"boolean"==typeof t?JSON.stringify(t,null,1):t},_getConfigAsDescriptionList:function(){var e=this,t=Object.keys(this.props.widget.config);if(0===t.length)return[];var n=[];return t.forEach(function(t){null!==e.props.widget.config[t]&&(n.push(s.default.createElement("dt",{key:t},e._formatConfigurationKey(t),":")),n.push(s.default.createElement("dd",{key:t+"-value"},e._formatConfigurationValue(t,e.props.widget.config[t]))))}),n},render:function(){return s.default.createElement(m.default,{ref:"configModal"},s.default.createElement(l.Modal.Header,{closeButton:!0},s.default.createElement(l.Modal.Title,null,s.default.createElement("span",null,"Widget ",s.default.createElement("em",null,this.props.widget.description)," configuration"))),s.default.createElement(l.Modal.Body,null,s.default.createElement("div",{className:"configuration"},this._getBasicConfiguration(),s.default.createElement("div",null,"More details:",s.default.createElement("dl",{className:"dl-horizontal"},s.default.createElement("dt",null,"Widget ID:"),s.default.createElement("dd",null,this.props.widget.id),s.default.createElement("dt",null,"Dashboard ID:"),s.default.createElement("dd",null,this.props.dashboardId),this._getConfigAsDescriptionList())))),s.default.createElement(l.Modal.Footer,null,s.default.createElement(l.Button,{type:"button",onClick:this.hide},"Close"),s.default.createElement(u.LinkContainer,{to:h.default.filtered_metrics("master","org.graylog2.dashboards.widgets.*."+this.props.widget.id)},s.default.createElement(l.Button,{type:"button",bsStyle:"info"},"Show widget metrics"))))}});exports.default=v,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(13),l=t(34),u=t(46),c=n(u),d=t(39),h=n(d),f=t(33),p=n(f),g=t(28),m=n(g),v=a.default.createClass({displayName:"WidgetCreationModal",propTypes:{fields:i.default.array,onConfigurationSaved:i.default.func.isRequired,onModalHidden:i.default.func,widgetType:i.default.string.isRequired,loading:i.default.bool},getDefaultProps:function(){return{loading:!1}},getInitialState:function(){return this.widgetPlugin=this._getWidgetPlugin(this.props.widgetType),{title:this._getDefaultWidgetTitle(this.widgetPlugin),config:{}}},componentWillReceiveProps:function(e){this.props.widgetType!==e.widgetType&&(this.widgetPlugin=this._getWidgetPlugin(e.widgetType))},_getWidgetPlugin:function(e){return l.PluginStore.exports("widgets").filter(function(t){return t.type.toUpperCase()===e.toUpperCase()})[0]},_getInitialConfiguration:function(){if(this.refs.pluginConfiguration){0===Object.keys(this.state.config).length&&this.setState({config:this.refs.pluginConfiguration.getInitialConfiguration()})}},open:function(){this.refs.createModal.open()},hide:function(){this.refs.createModal.close()},save:function(){this.props.onConfigurationSaved(this.state.title,this.state.config)},saved:function(){this.setState(this.getInitialState()),this.hide()},_setSetting:function(e,t){var n=p.default.clone(this.state);n[e]=t,this.setState(n)},_bindValue:function(e){this._setSetting(e.target.name,h.default.getValueFromInput(e.target))},_setConfigurationSetting:function(e,t){var n=p.default.clone(this.state.config);n[e]=t,this.setState({config:n})},_bindConfigurationValue:function(e){this._setConfigurationSetting(e.target.name,h.default.getValueFromInput(e.target))},_onConfigurationValueChange:function(){switch(arguments.length){case 1:this._bindConfigurationValue(arguments[0]);break;case 2:this._setConfigurationSetting(arguments[0],arguments[1]);break;default:throw new Error("Wrong number of arguments, method only accepts an event or a configuration key-value pair")}},_getDefaultWidgetTitle:function(e){return e.displayName?m.default.capitalizeFirstLetter(e.displayName):""},_getSpecificWidgetInputs:function(){if(this.widgetPlugin.configurationCreateComponent)return a.default.createElement(this.widgetPlugin.configurationCreateComponent,{ref:"pluginConfiguration",config:this.state.config,fields:this.props.fields,onChange:this._onConfigurationValueChange})},render:function(){var e=this.props.loading;return a.default.createElement(c.default,{ref:"createModal",title:"Create Dashboard Widget",onModalOpen:this._getInitialConfiguration,onModalClose:this.props.onModalHidden,onSubmitForm:this.save,submitButtonText:e?"Creating...":"Create",submitButtonDisabled:e},a.default.createElement("fieldset",null,a.default.createElement(s.Input,{type:"text",label:"Title",name:"title",id:"widget-title",required:!0,defaultValue:this.state.title,onChange:this._bindValue,help:"Type a name that describes your widget.",autoFocus:!0}),this._getSpecificWidgetInputs()))}});exports.default=v,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(13),l=t(34),u=t(20),c=n(u),d=t(28),h=n(d),f=t(33),p=n(f),g=t(39),m=n(g),v=t(46),y=n(v),b=a.default.createClass({displayName:"WidgetEditConfigModal",propTypes:{onModalHidden:i.default.func,onUpdate:i.default.func.isRequired,widget:i.default.object.isRequired},getInitialState:function(){return this.widgetPlugin=this._getWidgetPlugin(this.props.widget.type),{description:this.props.widget.description,type:this.props.widget.type,cache_time:this.props.widget.cache_time,config:p.default.clone(this.props.widget.config),errors:{}}},componentWillReceiveProps:function(e){this.widgetPlugin=this._getWidgetPlugin(e.widget.type)},_getWidgetPlugin:function(e){return l.PluginStore.exports("widgets").filter(function(t){return t.type.toUpperCase()===e.toUpperCase()})[0]},open:function(){this.refs.editModal.open()},hide:function(){this.refs.editModal.close()},_getWidgetData:function(){var e=this,t={};return Object.keys(this.state).forEach(function(n){!e.state.hasOwnProperty(n)||"errors"===n&&"widgetPlugin"===n||(t[n]=e.state[n])}),t},save:function(){var e=this;Object.keys(this.state.errors).some(function(t){return!0===e.state.errors[t]})||this.props.onUpdate(this._getWidgetData()),this.hide()},_setSetting:function(e,t){var n=p.default.clone(this.state);n[e]=t,this.setState(n)},_bindValue:function(e){this._setSetting(e.target.name,m.default.getValueFromInput(e.target))},_setConfigurationSetting:function(e,t){var n=p.default.clone(this.state.config);n[e]=t,this.setState({config:n})},_bindConfigurationValue:function(e){this._setConfigurationSetting(e.target.name,m.default.getValueFromInput(e.target))},_onConfigurationValueChange:function(){switch(arguments.length){case 1:this._bindConfigurationValue(arguments[0]);break;case 2:this._setConfigurationSetting(arguments[0],arguments[1]);break;default:throw new Error("Wrong number of arguments, method only accepts an event or a configuration key-value pair")}},_setTimeRangeSetting:function(e,t){var n=p.default.clone(this.state.config.timerange);switch(e){case"from":case"to":var r=p.default.clone(this.state.errors);try{n[e]=c.default.parseFromString(t).toISOString(),r[e]=!1}catch(t){r[e]=!0}this.setState({errors:r});break;default:n[e]=t}this._setConfigurationSetting("timerange",n)},_bindTimeRangeValue:function(e){this._setTimeRangeSetting(e.target.name,m.default.getValueFromInput(e.target))},_formatDateTime:function(e){try{return c.default.parseFromString(e).toString()}catch(t){return e}},_getTimeRangeFormControls:function(){var e=a.default.createElement(s.Input,{type:"text",label:"Time range type",disabled:!0,value:h.default.capitalizeFirstLetter(this.state.config.timerange.type),help:"Type of time range to use in the widget."}),t=void 0;switch(this.state.config.timerange.type){case"relative":t=a.default.createElement(s.Input,{type:"number",id:"timerange-relative",name:"range",label:"Search relative time",required:!0,min:"0",defaultValue:this.state.config.timerange.range,onChange:this._bindTimeRangeValue,help:"Number of seconds relative to the moment the search executes. 0 searches in all messages."});break;case"absolute":t=a.default.createElement("div",null,a.default.createElement(s.Input,{type:"text",id:"timerange-absolute-from",name:"from",label:"Search from",required:!0,bsStyle:!0===this.state.errors.from?"error":null,defaultValue:this._formatDateTime(this.state.config.timerange.from),onChange:this._bindTimeRangeValue,help:"Earliest time to be included in the search. E.g. 2015-03-27 13:23:41"}),a.default.createElement(s.Input,{type:"text",id:"timerange-absolute-to",name:"to",label:"Search to",required:!0,bsStyle:!0===this.state.errors.to?"error":null,defaultValue:this._formatDateTime(this.state.config.timerange.to),onChange:this._bindTimeRangeValue,help:"Latest time to be included in the search. E.g. 2015-03-27 13:23:41"}));break;case"keyword":t=a.default.createElement(s.Input,{type:"text",id:"timerange-keyword",name:"keyword",label:"Search keyword",required:!0,defaultValue:this.state.config.timerange.keyword,onChange:this._bindTimeRangeValue,help:"Search keyword representing the time to be included in the search. E.g. last day"});break;default:t=void 0}return a.default.createElement("div",null,e,t)},_getSpecificConfigurationControls:function(){return this.widgetPlugin&&this.widgetPlugin.configurationEditComponent?a.default.createElement(this.widgetPlugin.configurationEditComponent,{id:this.props.widget.id,config:this.state.config,onChange:this._onConfigurationValueChange}):null},render:function(){return a.default.createElement(y.default,{ref:"editModal",title:'Edit widget "'+this.state.description+'"',onSubmitForm:this.save,onModalClose:this.props.onModalHidden,submitButtonText:"Update"},a.default.createElement("fieldset",null,a.default.createElement(s.Input,{type:"text",id:"title",name:"description",label:"Title",required:!0,defaultValue:this.state.description,onChange:this._bindValue,help:"Type a name that describes your widget.",autoFocus:!0}),a.default.createElement(s.Input,{type:"number",min:"1",required:!0,id:"cache_time",name:"cache_time",label:"Cache time",defaultValue:this.state.cache_time,onChange:this._bindValue,help:"Number of seconds the widget value will be cached."}),this._getTimeRangeFormControls(),this._getSpecificConfigurationControls()))}});exports.default=b,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(11),u=a.default.createClass({displayName:"WidgetFooter",propTypes:{locked:i.default.bool.isRequired,onDelete:i.default.func.isRequired,onEditConfig:i.default.func.isRequired,onShowConfig:i.default.func.isRequired,replayHref:i.default.string.isRequired,error:i.default.any,errorMessage:i.default.string,calculatedAt:i.default.string,replayToolTip:i.default.string},_showConfig:function(e){e.preventDefault(),this.props.onShowConfig()},_editConfig:function(e){e.preventDefault(),this.props.onEditConfig()},_delete:function(e){e.preventDefault(),this.props.onDelete()},render:function(){var e=void 0;this.props.error&&(e=a.default.createElement("span",{className:"load-error",title:this.props.errorMessage},a.default.createElement("i",{className:"fa fa-exclamation-triangle"})));var t=void 0;t=this.props.calculatedAt?a.default.createElement("span",{title:this.props.calculatedAt},a.default.createElement(l.Timestamp,{dateTime:this.props.calculatedAt,relative:!0})):"Loading...";var n=this.props.replayToolTip?null:"Replay search",r=this.props.replayToolTip?null:this.props.replayHref,i=a.default.createElement(s.Button,{bsStyle:"link",className:"btn-text",title:n,href:r},a.default.createElement("i",{className:"fa fa-play"}));this.props.replayToolTip&&(i=a.default.createElement(s.OverlayTrigger,{placement:"bottom",overlay:a.default.createElement(s.Tooltip,{id:"tooltip"},this.props.replayToolTip)},i));var o=a.default.createElement("div",{className:"actions"},a.default.createElement("div",{className:"widget-replay"},i),a.default.createElement("div",{className:"widget-info"},a.default.createElement(s.Button,{bsStyle:"link",className:"btn-text",title:"Show widget configuration",onClick:this._showConfig},a.default.createElement("i",{className:"fa fa-info-circle"})))),u=a.default.createElement("div",{className:"actions"},a.default.createElement("div",{className:"widget-delete"},a.default.createElement(s.Button,{bsStyle:"link",className:"btn-text",title:"Delete widget",onClick:this._delete},a.default.createElement("i",{className:"fa fa-trash"}))),a.default.createElement("div",{className:"widget-edit"},a.default.createElement(s.Button,{bsStyle:"link",className:"btn-text",title:"Edit widget",onClick:this._editConfig},a.default.createElement("i",{className:"fa fa-pencil"}))));return a.default.createElement("div",null,a.default.createElement("div",{className:"widget-update-info"},e,t),a.default.createElement("div",null,this.props.locked?o:u))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=a.default.createClass({displayName:"WidgetHeader",propTypes:{title:i.default.string.isRequired},render:function(){return a.default.createElement("div",null,a.default.createElement("div",{className:"widget-title"},this.props.title),a.default.createElement("div",{className:"clearfix"}))}});exports.default=s,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=a.default.createClass({displayName:"WidgetVisualizationNotFound",propTypes:{widgetClassName:i.default.string.isRequired},render:function(){return a.default.createElement(s.Alert,{bsStyle:"danger"},a.default.createElement("i",{className:"fa fa-exclamation-circle"})," Widget Visualization (",a.default.createElement("i",null,this.props.widgetClassName),") not found. Seems like the plugin supplying this widget is not loaded.")}});exports.default=l,e.exports=exports.default},function(e,exports,t){"use strict";var n=t(34),r=t(188),i=t(44);n.PluginStore.register(new n.PluginManifest({},{widgets:[{type:"SEARCH_RESULT_COUNT",displayName:"Search result count",defaultHeight:1,defaultWidth:1,visualizationComponent:r.NumericVisualization,configurationCreateComponent:i.CountWidgetCreateConfiguration,configurationEditComponent:i.CountWidgetEditConfiguration},{type:"STREAM_SEARCH_RESULT_COUNT",displayName:"Stream search result count",defaultHeight:1,defaultWidth:1,visualizationComponent:r.NumericVisualization,configurationCreateComponent:i.CountWidgetCreateConfiguration,configurationEditComponent:i.CountWidgetEditConfiguration},{type:"STATS_COUNT",displayName:"Statistical value",defaultHeight:1,defaultWidth:1,visualizationComponent:r.NumericVisualization,configurationCreateComponent:i.StatisticalCountWidgetCreateConfiguration,configurationEditComponent:i.StatisticalCountWidgetEditConfiguration},{type:"SEARCH_RESULT_CHART",displayName:"Search result graph",defaultHeight:1,defaultWidth:2,visualizationComponent:r.HistogramVisualization},{type:"QUICKVALUES",displayName:"Quick values",defaultHeight:3,defaultWidth:1,visualizationComponent:r.QuickValuesVisualization,configurationCreateComponent:i.QuickValuesWidgetCreateConfiguration,configurationEditComponent:i.QuickValuesWidgetEditConfiguration},{type:"QUICKVALUES_HISTOGRAM",displayName:"Quick values histogram",defaultHeight:1,defaultWidth:2,visualizationComponent:r.QuickValuesHistogramVisualization,configurationCreateComponent:i.QuickValuesHistogramWidgetCreateConfiguration,configurationEditComponent:i.QuickValuesHistogramWidgetEditConfiguration},{type:"FIELD_CHART",displayName:"Field graph",defaultHeight:1,defaultWidth:2,visualizationComponent:r.GraphVisualization,configurationEditComponent:i.FieldChartWidgetConfiguration},{type:"STACKED_CHART",displayName:"Stacked graph",defaultHeight:1,defaultWidth:2,visualizationComponent:r.StackedGraphVisualization,configurationEditComponent:i.StackedChartWidgetConfiguration}]}))},function(e,exports,t){"use strict";(function(n){function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var i=t(1),o=r(i),a=t(0),s=r(a),l=t(17),u=r(l),c=t(24),d=r(c),h=t(56),f=r(h),p=t(72),g=r(p),m=t(31),v=r(m),y=t(47),b=r(y),_=t(20),w=r(_),C=t(48),A=r(C),E=t(57),S=r(E),x=t(55),F=r(x),k=t(12),D=r(k);n.jQuery=D.default,t(73);var T=s.default.createClass({displayName:"HistogramVisualization",propTypes:{id:o.default.string.isRequired,data:o.default.object.isRequired,config:o.default.object.isRequired,computationTimeRange:o.default.object,height:o.default.number,width:o.default.number,keyTitleRenderer:o.default.func,valueTitleRenderer:o.default.func},getDefaultProps:function(){return{keyTitleRenderer:function(e){return''+new w.default(e.x).toString(w.default.Formats.COMPLETE)+""},valueTitleRenderer:function(e){return(0,d.default)(e.y).format("0,0")+" messages"}}},getInitialState:function(){return this.triggerRender=!0,this.histogramData=(0,f.default)(),this.dimension=this.histogramData.dimension(function(e){return e.x}),this.group=this.dimension.group().reduceSum(function(e){return e.y}),{dataPoints:[]}},componentDidMount:function(){this.renderHistogram(),this._updateData(this.props.data)},componentWillReceiveProps:function(e){(0,b.default)(this.props,e)||(e.height===this.props.height&&e.width===this.props.width||this._resizeVisualization(e.width,e.height),this._updateData(e.data))},_updateData:function(e){this.setState({dataPoints:e},this.drawData)},_resizeVisualization:function(e,t){this.histogram.width(e).height(t),this.triggerRender=!0},drawData:function(){var e="relative"===this.props.config.timerange.type&&0===this.props.config.timerange.range,t=A.default.format(this.state.dataPoints,this.props.computationTimeRange,this.props.config.interval,this.props.width,e,null);this.histogram.xUnits(function(){return t.length-1}),this.histogramData.remove(),this.histogramData.add(t),this.triggerRender?(this.histogram.render(),this.triggerRender=!1):this.histogram.redraw()},renderHistogram:function(){var e=this,t=u.default.findDOMNode(this),n=this.props.config.xAxis||"Time",r=this.props.config.yAxis||"Messages";this.histogram=g.default.barChart(t),this.histogram.width(this.props.width).height(this.props.height).margins({left:50,right:15,top:10,bottom:30}).dimension(this.dimension).group(this.group).x(v.default.time.scale()).elasticX(!0).elasticY(!0).centerBar(!0).renderHorizontalGridLines(!0).brushOn(!1).xAxisLabel(n).yAxisLabel(r).renderTitle(!1).colors(S.default.glColourPalette()).on("renderlet",function(){var n=function(t){return'
    '+e.props.valueTitleRenderer(t)+"
    "+e.props.keyTitleRenderer(t)+"
    "};v.default.select(t).selectAll(".chart-body rect.bar").attr("rel","tooltip").attr("data-original-title",n)}),(0,D.default)(t).tooltip({selector:'[rel="tooltip"]',container:"body",placement:"auto",delay:{show:300,hide:100},html:!0}),this.histogram.xAxis().ticks(F.default.customTickInterval()).tickFormat(F.default.customDateTimeFormat()),this.histogram.yAxis().ticks(3).tickFormat(function(e){return e%1==0?v.default.format("s")(e):null}),this.histogram.render()},render:function(){return s.default.createElement("div",{id:"visualization-"+this.props.id,className:"histogram"})}});exports.default=T,e.exports=exports.default}).call(exports,t(21))},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=t(1),o=n(i),a=t(0),s=n(a),l=t(47),u=n(l),c=t(32),d=n(c),h=t(634),f=n(h),p={HIGHER:"higher",LOWER:"lower"},g=s.default.createClass({displayName:"NumericVisualization",propTypes:{config:o.default.object.isRequired,data:o.default.oneOfType([o.default.object,o.default.number]).isRequired},getInitialState:function(){return{currentNumber:void 0,previousNumber:void 0}},componentDidMount:function(){var e=this._normalizeStateFromProps(this.props.data);this.setState(e)},componentWillReceiveProps:function(e){if(!(0,u.default)(this.props,e)){var t=this._normalizeStateFromProps(e.data);this.setState(t)}},DEFAULT_VALUE_FONT_SIZE:"70px",NUMBER_OF_INDICATORS:3,PERCENTAGE_PER_INDICATOR:30,_normalizeStateFromProps:function(e){var t={};if("object"===(void 0===e?"undefined":r(e))){var n=d.default.normalizeNumber(e.now),i=d.default.normalizeNumber(e.previous);t={currentNumber:n,previousNumber:i,percentage:this._calculatePercentage(n,i)}}else t={currentNumber:e};return t},_calculatePercentage:function(e,t){var n=void 0;if(0===t||isNaN(t)){var r=0;e>t?r=1:e=this.state.previousNumber&&t!==p.HIGHER||this.state.currentNumber<=this.state.previousNumber&&t!==p.LOWER)&&(t===p.HIGHER&&(e=Math.abs(e-(this.NUMBER_OF_INDICATORS-1))),Math.abs(this.state.percentage)>=this.PERCENTAGE_PER_INDICATOR*e)},_getIndicatorClass:function(e,t){var n=f.default.trendIcon;if(!this._isIndicatorActive(e,t))return n;var r=this.props.config.lower_is_better?f.default.trendGood:f.default.trendBad,i=this.props.config.lower_is_better?f.default.trendBad:f.default.trendGood;return n+" "+(t===p.HIGHER?i:r)},_getHigherIndicatorClass:function(e){return this._getIndicatorClass(e,p.HIGHER)},_getLowerIndicatorClass:function(e){return this._getIndicatorClass(e,p.LOWER)},render:function(){var e=void 0;return this.props.config.trend&&(e=s.default.createElement("div",{className:f.default.trendIndicators},s.default.createElement("div",null,s.default.createElement("div",{className:this._getHigherIndicatorClass(0)},s.default.createElement("span",null,s.default.createElement("i",{className:"fa fa-angle-up"}))),s.default.createElement("div",{className:this._getHigherIndicatorClass(1)},s.default.createElement("span",null,s.default.createElement("i",{className:"fa fa-angle-up"}))),s.default.createElement("div",{className:this._getHigherIndicatorClass(2)},s.default.createElement("span",null,s.default.createElement("i",{className:"fa fa-angle-up"})))),s.default.createElement("div",null,s.default.createElement("div",{className:this._getLowerIndicatorClass(0)},s.default.createElement("span",null,s.default.createElement("i",{className:"fa fa-angle-down"}))),s.default.createElement("div",{className:this._getLowerIndicatorClass(1)},s.default.createElement("span",null,s.default.createElement("i",{className:"fa fa-angle-down"}))),s.default.createElement("div",{className:this._getLowerIndicatorClass(2)},s.default.createElement("span",null,s.default.createElement("i",{className:"fa fa-angle-down"})))))),s.default.createElement("div",{className:f.default.number},s.default.createElement("div",{className:f.default.aside}),s.default.createElement("div",{className:f.default.value,style:{fontSize:this._calculateFontSize()}},this._formatData()),s.default.createElement("div",{className:f.default.aside},e))}});exports.default=g,e.exports=exports.default},function(e,exports,t){var n=t(635);"string"==typeof n&&(n=[[e.i,n,""]]);var r={};r.transform=void 0;t(15)(n,r);n.locals&&(e.exports=n.locals)},function(e,exports,t){exports=e.exports=t(14)(void 0),exports.push([e.i,"._31UpMnmKwGQCPKm4dDFECT{display:flex;justify-content:center;width:100%}._18LRzXoR2GukntCwGJIHJo{flex:1;align-self:flex-start}._1sHCwUVuoPljBkHvSzj8Xd{flex:2;line-height:100px;text-align:center}._2TyxykxGUnKhD-K3NuBzGX{font-size:24px;margin-top:12px;margin-left:10px}._2TyxykxGUnKhD-K3NuBzGX>:first-child{margin-bottom:5px}._1qfUB7bYz8EiOQx6RTb_Vk{color:#e3e5e5;height:25px;margin-bottom:-18px}._1uEzTKIeJ43kO_g3obG_RY{color:#8dc63f}._1rXtoaoHWS_3MgtNamMxgh{color:#be1e2d}",""]),exports.locals={number:"_31UpMnmKwGQCPKm4dDFECT",aside:"_18LRzXoR2GukntCwGJIHJo",value:"_1sHCwUVuoPljBkHvSzj8Xd",trendIndicators:"_2TyxykxGUnKhD-K3NuBzGX",trendIcon:"_1qfUB7bYz8EiOQx6RTb_Vk",trendGood:"_1uEzTKIeJ43kO_g3obG_RY",trendBad:"_1rXtoaoHWS_3MgtNamMxgh"}},function(e,exports,t){"use strict";(function(n){function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var i=t(1),o=r(i),a=t(0),s=r(a),l=t(18),u=r(l),c=t(3),d=t(56),h=r(d),f=t(72),p=r(f),g=t(31),m=r(g),v=t(47),y=r(v),b=t(12),_=r(b),w=t(20),C=r(w),A=t(57),E=r(A),S=t(28),x=r(S),F=t(32),k=r(F),D=t(9),T=r(D);n.jQuery=_.default,t(73);var M=T.default.getStore("Search"),R=s.default.createClass({displayName:"QuickValuesVisualization",DEFAULT_CONFIG:{show_pie_chart:!0,show_data_table:!0,data_table_limit:50,limit:5,sort_order:"desc"},propTypes:{id:o.default.string.isRequired,field:o.default.string.isRequired,fields:o.default.arrayOf(o.default.string).isRequired,config:o.default.shape({show_pie_chart:o.default.bool,show_data_table:o.default.bool,data_table_limit:o.default.number,limit:o.default.number,sort_order:o.default.oneOf(["asc","desc"])}),width:o.default.any,height:o.default.any,horizontal:o.default.bool,displayAnalysisInformation:o.default.bool,displayAddToSearchButton:o.default.bool},getDefaultProps:function(){return{config:this.DEFAULT_CONFIG,fields:[],width:void 0,height:void 0,horizontal:!1,displayAnalysisInformation:!1,displayAddToSearchButton:!1}},getInitialState:function(){return this.filters=[],this.triggerRender=!0,this.shouldUpdateData=!0,this.dcGroupName="quickvalue-"+this.props.id,this.quickValuesData=(0,h.default)(),this.dimensionByTerm=this.quickValuesData.dimension(function(e){return e.term}),this.dimensionByCount=this.quickValuesData.dimension(function(e){return e.count}),this.group=this.dimensionByTerm.group().reduceSum(function(e){return e.count}),{total:void 0,others:void 0,missing:void 0,terms:u.default.List(),termsMapping:{}}},componentDidMount:function(){this._resizeVisualization(this.props.width,this.props.height,this._getConfig("show_data_table")),this._formatProps(this.props),this._renderDataTable(this.props),this._renderPieChart(this.props)},componentWillReceiveProps:function(e){if(!(0,y.default)(this.props,e)){if(!(0,y.default)(this.props.config,e.config))return this._renderDataTable(e),void this._renderPieChart(e);this._resizeVisualization(e.width,e.height,this._getConfig("show_data_table",e.config)),this._formatProps(e)}},_graph:void 0,_table:void 0,DEFAULT_PIE_CHART_SIZE:200,MARGIN_TOP:15,_getConfig:function(e,t){var n=t||{},r=this.props.config||{},i=this.DEFAULT_CONFIG;if(Object.prototype.hasOwnProperty.call(n,e))return n[e];if(Object.prototype.hasOwnProperty.call(r,e))return r[e];if(Object.prototype.hasOwnProperty.call(i,e))return i[e];throw new Error("Couldn't find config key \""+e+'" in any data source')},_formatProps:function(e){if(e.data){var t=e.data,n=t.total-t.missing,r=u.default.List(u.default.Map(t.terms).keys()),i=r.map(function(e){var r=t.terms[e];return u.default.Map({term:x.default.escapeHTML(e),count:r,percentage:r/n})});this.shouldUpdateData=!i.equals(this.state.terms),this.setState({total:t.total,others:t.other,missing:t.missing,terms:i,termsMapping:t.terms_mapping},this.drawData)}},_getAddToSearchButton:function(e){var t=document.createElement("button");return t.className="btn btn-xs btn-default",t.title="Add to search query",t.setAttribute("data-term",x.default.unescapeHTML(e)),t.innerHTML="",t.outerHTML},_getFieldName:function(e){if(0===this.props.fields.length){var t=Object.keys(this.props.data.terms_mapping)[0];return this.props.data.terms_mapping[t].map(function(e){return e.field})[e]}return this.props.fields[e]},_getDataTableColumns:function(){function e(e){return new C.default(Number(e)).toString(C.default.Formats.TIMESTAMP)}var t=this,n=[function(n){var r="",i=n.term;if(t.props.data.terms_mapping&&t.props.data.terms_mapping[n.term]?i=t.props.data.terms_mapping[n.term].map(function(n,r){return"timestamp"===t._getFieldName(r)?e(n.value):n.value}).join(' '):"timestamp"===t.props.field&&(i=e(n.term)),void 0!==t.pieChart&&"Others"!==t.dataTable.group()(n)){r=''}return r+" "+i},function(e){return k.default.formatPercentage(e.percentage)},function(e){return k.default.formatNumber(e.count)}];return this.props.displayAddToSearchButton&&n.push(function(e){return t._getAddToSearchButton(e.term)}),n},_getSortOrder:function(e){switch(e){case"desc":return m.default.descending;case"asc":return m.default.ascending;default:return m.default.descending}},_groupOrderFunc:function(e){return function(t){return"asc"===e?-1*t:t}},_renderDataTable:function(e){var t=this,n=this._table,r=this._getConfig("limit",e.config),i=this._getConfig("data_table_limit",e.config),o=this._getConfig("sort_order",e.config);this.dataTable=p.default.dataTable(n,this.dcGroupName),this.dataTable.dimension(this.dimensionByCount).group(function(e){var n=t.group.order(t._groupOrderFunc(o)).top(r),i=n.some(function(t){return 0===e.term.localeCompare(t.key)}),a=("desc"===o?"Top":"Bottom")+" "+r+" values";return i?a:"Others"}).sortBy(function(e){return e.count}).order(this._getSortOrder(o)).size(i).columns(this._getDataTableColumns()).on("renderlet",function(n){n.selectAll(".dc-table-group").classed("info",!0),n.selectAll("td.dc-table-column button").on("click",function(){var n=(0,_.default)(m.default.event.target).closest("button").data("term");M.addSearchTermWithMapping(t.state.termsMapping,e.id,n)})}),this.dataTable.render()},_renderPieChart:function(e){var t=this,n=this._graph;this.pieChart=p.default.pieChart(n,this.dcGroupName),this.pieChart.dimension(this.dimensionByTerm).group(this.group).othersGrouper(function(e){var n=t.pieChart,r=n.group().all(),i=r.map(n.keyAccessor()),o=e.map(n.keyAccessor()),a=m.default.set(o),s=m.default.sum(e,p.default.pluck("value")),l=t.state.total-t.state.missing-s;return e.concat([{others:i.filter(function(e){return!a.has(e)}),key:"Others",value:l}])}).renderLabel(!1).renderTitle(!1).slicesCap(this._getConfig("limit",e.config)).ordering(function(e){return e.value}).colors(E.default.glColourPalette()),this._resizeVisualization(e.width,e.height,this._getConfig("show_data_table",e.config)),E.default.tooltipRenderlet(this.pieChart,"g.pie-slice",this._formatGraphTooltip),(0,_.default)(n).tooltip({selector:'[rel="tooltip"]',container:"body",placement:"auto",delay:{show:300,hide:100},html:!0}),this.pieChart.render()},_formatGraphTooltip:function(e){return'
    '+e.data.key+": "+k.default.formatNumber(e.value)+"
    "},_setPieChartSize:function(e){this.pieChart.width(e).height(e).radius(e/2-10),this.triggerRender=!0},_resizeVisualization:function(e,t,n){var r=void 0;this._getConfig("show_pie_chart")&&(n?r=this.DEFAULT_PIE_CHART_SIZE:(r=Math.min(e,t),r-=this.MARGIN_TOP),void 0!==this.pieChart&&this.pieChart.width()!==r&&this._setPieChartSize(r))},_clearDataFilters:function(){void 0!==this.pieChart&&(this.filters=this.pieChart.filters(),this.pieChart.filterAll())},_restoreDataFilters:function(){var e=this;void 0!==this.pieChart&&(this.filters.forEach(function(t){return e.pieChart.filter(t)}),this.filters=[])},drawData:function(){this.shouldUpdateData&&(this._clearDataFilters(),this.quickValuesData.remove(),this.quickValuesData.add(this.state.terms.toJS()),this._restoreDataFilters(),this.dataTable.redraw()),this._getConfig("show_pie_chart")&&(this.triggerRender?(this.pieChart.render(),this.triggerRender=!1):this.pieChart.redraw())},_getTotalMessagesWithField:function(){return this.state.total-this.state.missing},_getAnalysisInformation:function(){var e=["Found "+k.default.formatNumber(this._getTotalMessagesWithField())+" messages with field "+this.props.field+""];if(0!==this.state.missing){var t=0===this.state.others?" and":"";t+=" "+k.default.formatNumber(this.state.missing)+" messages without field "+this.props.field+"",e.push(t)}return 0!==this.state.others&&e.push(" and "+k.default.formatNumber(this.state.others)+" other values"),s.default.createElement("span",{dangerouslySetInnerHTML:{__html:e.join(",")+"."}})},render:function(){var e=this,t=void 0,n={};this._getConfig("show_pie_chart")?this.props.horizontal?(t="col-md-4",n.textAlign="center"):t="col-md-12":t="hidden";var r=void 0;r=this._getConfig("show_data_table")||!this._getConfig("show_pie_chart")?this.props.horizontal?"col-md-8":"col-md-12":"hidden";var i=void 0;return i=this.props.displayAnalysisInformation?s.default.createElement(c.Panel,null,s.default.createElement(c.ListGroup,{fill:!0},s.default.createElement(c.ListGroupItem,null,s.default.createElement("div",{ref:function(t){e._graph=t},className:"quickvalues-graph"})),s.default.createElement(c.ListGroupItem,null,this._getAnalysisInformation()))):s.default.createElement("div",{ref:function(t){e._graph=t},className:"quickvalues-graph"}),s.default.createElement("div",{id:"visualization-"+this.props.id,className:"quickvalues-visualization",style:{height:this.props.height}},s.default.createElement("div",{className:"container-fluid"},s.default.createElement("div",{className:"row",style:{marginBottom:0}},s.default.createElement("div",{className:t,style:n},i),s.default.createElement("div",{className:r},s.default.createElement("div",{className:"quickvalues-table"},s.default.createElement("table",{ref:function(t){e._table=t},className:"table table-condensed table-hover"},s.default.createElement("thead",null,s.default.createElement("tr",null,s.default.createElement("th",{style:{width:"60%"}},"Value"),s.default.createElement("th",null,"%"),s.default.createElement("th",null,"Count"),this.props.displayAddToSearchButton&&s.default.createElement("th",{style:{width:30}}," ")))))))))}});exports.default=R,e.exports=exports.default}).call(exports,t(21))},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(0),i=n(r),o=t(1),a=n(o),s=t(56),l=n(s),u=t(72),c=n(u),d=t(31),h=n(d),f=t(35),p=n(f),g=t(18),m=n(g),v=t(47),y=n(v),b=t(67),_=(n(b),t(55)),w=n(_),C=t(57),A=n(C),E=i.default.createClass({displayName:"QuickValuesHistogramVisualization",DEFAULT_CONFIG:{limit:5,sort_order:"desc"},DEFAULT_HEIGHT:220,CHART_MARGINS:m.default.fromJS({left:50,right:15,top:10,bottom:45}),propTypes:{id:a.default.string.isRequired,config:a.default.shape({limit:a.default.number,sort_order:a.default.oneOf(["asc","desc"]),field:a.default.string.isRequired}),data:a.default.object,width:a.default.number,height:a.default.number},_chartRef:void 0,_chart:void 0,_crossfilter:void 0,getDefaultProps:function(){return{config:this.DEFAULT_CONFIG,width:void 0,height:this.DEFAULT_HEIGHT,data:void 0}},getInitialState:function(){return this._crossfilter=(0,l.default)(),{data:this._formatData(this.props.data),sortedTerms:this._formatTerms(this.props.data.terms),timerange:this._getQueriedTimerange(this.props.data),interval:this._getInterval(this.props.data),limit:this.props.config.limit,sortOrder:this.props.config.sort_order,width:this.props.width,height:this.props.height}},componentDidMount:function(){this._renderChart(),this._resizeChart(this._chartRef.clientWidth,this._chartRef.clientHeight)},componentWillReceiveProps:function(e){(0,y.default)(this.props,e)||(e.height===this.props.height&&e.width===this.props.width||this._resizeChart(e.width,e.height),e.data&&this._updateData(e))},_updateData:function(e){var t=e.data,n=e.config,r=e.width,i=e.height;this.setState({data:this._formatData(t),sortedTerms:this._formatTerms(t.terms),timerange:this._getQueriedTimerange(t),interval:this._getInterval(t),limit:n.limit,sortOrder:n.sort_order,width:r||this._chartRef.clientWidth,height:i||this._chartRef.clientHeight||this.DEFAULT_HEIGHT},this._redrawChart)},_getInterval:function(e){return(e.interval||"day").toLowerCase()},_getQueriedTimerange:function(e){return{from:new Date(e.queried_timerange.from),to:new Date(e.queried_timerange.to)}},_formatData:function(e){return p.default.reduce(e.buckets,function(e,t,n){var r=p.default.reduce(t.terms,function(e,t,n){return e.push({term:n,count:t}),e},[]);return e.push({key:new Date(1e3*n),terms:r}),e},[])},_formatTerms:function(e){return p.default.sortBy(e)},_selectGroupData:function(e){return function(t){return(p.default.find(t.terms,function(t){return t.term===e})||{count:0}).count}},_group:function(){var e=this;return{all:function(){return e.state.data}}},_addChartLegend:function(e,t){if(e&&t){var n=c.default.legend().horizontal(!0).x(this.CHART_MARGINS.get("left")+12).y(t-15).itemHeight(12).autoItemWidth(!0).gap(5).legendWidth(e-12).legendText(function(e){return e.name});this._chart.legend(n)}},_addChartStacks:function(){var e=this.state.sortedTerms;this._chart.group(this._group(),e[0],this._selectGroupData(e[0]));for(var t=1;t1e30?e.toPrecision(1):h.default.format(".2s")(e)}),this._chart.render()},_redrawChart:function(){var e=this.state,t=e.data,n=e.timerange,r=e.interval,i=e.limit;this._crossfilter.remove(),this._crossfilter.add(t),this._addChartStacks(i),this._chart.x(h.default.time.scale.utc().domain([n.from,n.to])).round(h.default.time[r].utc.round).xUnits(h.default.time[r].utc.range),this._chart.rescale().redraw()},_resizeChart:function(e,t){this._addChartLegend(e,t),this._chart.width(e).height(t).rescale().redraw()},render:function(){var e=this;return i.default.createElement("div",null,i.default.createElement("div",{ref:function(t){e._chartRef=t},id:"visualization-"+this.props.id,style:{width:"100%"}}))}});exports.default=E,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(17),l=n(s),u=t(18),c=n(u),d=t(24),h=n(d),f=t(639),p=n(f),g=t(31),m=n(g),v=t(47),y=n(v),b=t(57),_=n(b),w=t(20),C=n(w),A=t(48),E=n(A),S=t(55),x=n(S),F=t(640),k=(n(F),a.default.createClass({displayName:"StackedGraphVisualization",propTypes:{id:i.default.string.isRequired,data:i.default.array.isRequired,height:i.default.number,width:i.default.number,config:i.default.object.isRequired,computationTimeRange:i.default.object},getInitialState:function(){return this.series=c.default.List(),this.seriesNames=c.default.Map(),this.barWidthScale=m.default.scale.linear().domain(m.default.range(0,1e4)).range(m.default.range(.6,0,-.01)),this.dataPoints=c.default.Set(),{}},componentDidMount:function(){this.renderGraph(this.props),this.dataPoints=this._formatData(this.props),this.drawData()},componentWillReceiveProps:function(e){(0,y.default)(this.props,e)||(this._updateSeriesNames(e),this.dataPoints=this._formatData(e),e.height===this.props.height&&e.width===this.props.width||(this._resizeVisualization(e.width,e.height),this.renderGraph(e)),this.drawData())},_normalizeData:function(e){return null!==e&&void 0!==e&&Array.isArray(e)?e:[]},_formatData:function(e){var t=e.data,n=this._normalizeData(t),r="relative"===e.config.timerange.type&&0===e.config.timerange.range,i=[];return n.forEach(function(t,n){i.push(E.default.format(t,e.computationTimeRange,e.config.interval,e.width,r,e.config.series[n].statistical_function))},this),this._mergeSeries(i)},_mergeSeries:function(e){var t=this,n=c.default.Map();return e.forEach(function(e,r){e.forEach(function(e){var t=e.x,i=c.default.Map({timestamp:t}).set("series"+(r+1),e.y);n=n.has(t)?n.set(t,n.get(t).merge(i)):n.set(t,i)},t)},this),n.toOrderedSet().sortBy(function(e){return e.get("timestamp")})},_getGraphType:function(){var e=void 0;switch(this.props.config.renderer){case"scatterplot":e="scatter";break;case"line":e="step-after"!==this.props.config.interpolation?"spline":"step";break;case"area":e="step-after"!==this.props.config.interpolation?"area-spline":"area-step";break;default:e=this.props.config.renderer}return e},_applyGraphConfiguration:function(e){switch(e){case"bar":var t=this.dataPoints.size;this.graph.internal.config.bar_width_ratio=Math.max(.015,this.barWidthScale(t));break;case"spline":case"area-spline":this.graph.internal.config.spline_interpolation_type=this.props.config.interpolation;break;case"step":case"area-step":this.graph.internal.config.line_step_type=this.props.config.interpolation;break;default:console.warn("Invalid graph type "+e)}},_formatTooltipTitle:function(e){return new C.default(e).toString(C.default.Formats.COMPLETE)},_formatTooltipValue:function(e){var t=void 0;try{t=(0,h.default)(e).format("0,0.[00]")}catch(n){t=m.default.format(".2r")(e)}return t},_resizeVisualization:function(e,t){this.graph.resize({width:e,height:t})},_updateSeriesNames:function(e){var t=0,n=c.default.Map();e.config.series.forEach(function(e){t++;var r="series"+t,i=e.title?e.title:e.statistical_function+" "+e.field+', "'+e.query+'"';n=n.set(r,i)},this),c.default.is(this.seriesNames,n)||(this.seriesNames=n,this.graph.data.names(this.seriesNames.toJS()))},drawData:function(){var e=this._getGraphType();this._applyGraphConfiguration(e),this.dataPoints.isEmpty()||(this.graph.internal.config.axis_x_tick_values=x.default.customTickInterval()(this.dataPoints.first().get("timestamp")-1e3,this.dataPoints.last().get("timestamp")+1e3)),this.graph.load({json:this.dataPoints.toJS(),keys:{x:"timestamp",value:this.series.toJS()},type:e})},renderGraph:function(e){var t=this,n=l.default.findDOMNode(this),r=_.default.glColourPalette(),i=0,o=c.default.Map();e.config.series.forEach(function(e){i++;var n="series"+i,a=e.title?e.title:e.statistical_function+" "+e.field+', "'+e.query+'"';t.series=t.series.push(n),t.seriesNames=t.seriesNames.set(n,a),o=o.set(n,r(n))}),this.yAxisFormatter=function(e){return Math.abs(e)>1e30||0===e?e.toPrecision(1):m.default.format(".2s")(e)},this.graph=p.default.generate({bindto:n,size:{height:e.height,width:e.width},data:{columns:[],names:this.seriesNames.toJS(),colors:o.toJS()},padding:{right:10},axis:{x:{type:"timeseries",label:{text:"Time",position:"outer-center"},tick:{format:x.default.customDateTimeFormat()}},y:{label:{text:"Values",position:"outer-middle"},tick:{count:3,format:this.yAxisFormatter},padding:{bottom:0}}},grid:{y:{show:!0,ticks:3},focus:{show:!1}},tooltip:{format:{title:this._formatTooltipTitle,value:this._formatTooltipValue}}})},render:function(){var e=this.props.config.doNotShowCircles?"donotshowcircles":"";return a.default.createElement("div",{id:"visualization-"+this.props.id,className:"graph "+this.props.config.renderer+e})}}));exports.default=k,e.exports=exports.default},function(e,exports,t){!function(t,n){e.exports=n()}(0,function(){"use strict";function e(e,t){var n=this;n.component=e,n.params=t||{},n.d3=e.d3,n.scale=n.d3.scale.linear(),n.range,n.orient="bottom",n.innerTickSize=6,n.outerTickSize=this.params.withOuterTick?6:0,n.tickPadding=3,n.tickValues=null,n.tickFormat,n.tickArguments,n.tickOffset=0,n.tickCulling=!0,n.tickCentered,n.tickTextCharSize,n.tickTextRotate=n.params.tickTextRotate,n.tickLength,n.axis=n.generateAxis()}function n(e,t,n){this.owner=e,T.chart.internal[t]=n}function r(e){var t=this.internal=new i(this);t.loadConfig(e),t.beforeInit(e),t.init(),t.afterInit(e),function e(t,n,r){Object.keys(t).forEach(function(i){n[i]=t[i].bind(r),Object.keys(t[i]).length>0&&e(t[i],n[i],r)})}(k,this,this)}function i(e){var n=this;n.d3=window.d3?window.d3:t(31),n.api=e,n.config=n.getDefaultConfig(),n.data={},n.cache={},n.axes={}}var o,a,s={target:"c3-target",chart:"c3-chart",chartLine:"c3-chart-line",chartLines:"c3-chart-lines",chartBar:"c3-chart-bar",chartBars:"c3-chart-bars",chartText:"c3-chart-text",chartTexts:"c3-chart-texts",chartArc:"c3-chart-arc",chartArcs:"c3-chart-arcs",chartArcsTitle:"c3-chart-arcs-title",chartArcsBackground:"c3-chart-arcs-background",chartArcsGaugeUnit:"c3-chart-arcs-gauge-unit",chartArcsGaugeMax:"c3-chart-arcs-gauge-max",chartArcsGaugeMin:"c3-chart-arcs-gauge-min",selectedCircle:"c3-selected-circle",selectedCircles:"c3-selected-circles",eventRect:"c3-event-rect",eventRects:"c3-event-rects",eventRectsSingle:"c3-event-rects-single",eventRectsMultiple:"c3-event-rects-multiple",zoomRect:"c3-zoom-rect",brush:"c3-brush",focused:"c3-focused",defocused:"c3-defocused",region:"c3-region",regions:"c3-regions",title:"c3-title",tooltipContainer:"c3-tooltip-container",tooltip:"c3-tooltip",tooltipName:"c3-tooltip-name",shape:"c3-shape",shapes:"c3-shapes",line:"c3-line",lines:"c3-lines",bar:"c3-bar",bars:"c3-bars",circle:"c3-circle",circles:"c3-circles",arc:"c3-arc",arcs:"c3-arcs",area:"c3-area",areas:"c3-areas",empty:"c3-empty",text:"c3-text",texts:"c3-texts",gaugeValue:"c3-gauge-value",grid:"c3-grid",gridLines:"c3-grid-lines",xgrid:"c3-xgrid",xgrids:"c3-xgrids",xgridLine:"c3-xgrid-line",xgridLines:"c3-xgrid-lines",xgridFocus:"c3-xgrid-focus",ygrid:"c3-ygrid",ygrids:"c3-ygrids",ygridLine:"c3-ygrid-line",ygridLines:"c3-ygrid-lines",axis:"c3-axis",axisX:"c3-axis-x",axisXLabel:"c3-axis-x-label",axisY:"c3-axis-y",axisYLabel:"c3-axis-y-label",axisY2:"c3-axis-y2",axisY2Label:"c3-axis-y2-label",legendBackground:"c3-legend-background",legendItem:"c3-legend-item",legendItemEvent:"c3-legend-item-event",legendItemTile:"c3-legend-item-tile",legendItemHidden:"c3-legend-item-hidden",legendItemFocused:"c3-legend-item-focused",dragarea:"c3-dragarea",EXPANDED:"_expanded_",SELECTED:"_selected_",INCLUDED:"_included_"},l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},c=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},d=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},h=function(e){return e||0===e},f=function(e){return"function"==typeof e},p=function(e){return Array.isArray(e)},g=function(e){return"string"==typeof e},m=function(e){return void 0===e},v=function(e){return void 0!==e},y=function(e){return 10*Math.ceil(e/10)},b=function(e){return Math.ceil(e)+.5},_=function(e){return e[1]-e[0]},w=function(e){return void 0===e||null===e||g(e)&&0===e.length||"object"===(void 0===e?"undefined":l(e))&&0===Object.keys(e).length},C=function(e){return!D.isEmpty(e)},A=function(e,t,n){return v(e[t])?e[t]:n},E=function(e,t){var n=!1;return Object.keys(e).forEach(function(r){e[r]===t&&(n=!0)}),n},S=function(e){return"string"==typeof e?e.replace(//g,">"):e},x=function(e){var t=e.getBoundingClientRect(),n=[e.pathSegList.getItem(0),e.pathSegList.getItem(1)];return{x:n[0].x,y:Math.min(n[0].y,n[1].y),width:t.width,height:t.height}};a=e.prototype,a.axisX=function(e,t,n){e.attr("transform",function(e){return"translate("+Math.ceil(t(e)+n)+", 0)"})},a.axisY=function(e,t){e.attr("transform",function(e){return"translate(0,"+Math.ceil(t(e))+")"})},a.scaleExtent=function(e){var t=e[0],n=e[e.length-1];return t0&&i[0]>0&&i.unshift(i[0]-(i[1]-i[0])),i},a.copyScale=function(){var e,t=this,n=t.scale.copy();return t.params.isCategory&&(e=t.scale.domain(),n.domain([e[0],e[1]-1])),n},a.textFormatted=function(e){var t=this,n=t.tickFormat?t.tickFormat(e):e;return void 0!==n?n:""},a.updateRange=function(){var e=this;return e.range=e.scale.rangeExtent?e.scale.rangeExtent():e.scaleExtent(e.scale.range()),e.range},a.updateTickTextCharSize=function(e){var t=this;if(t.tickTextCharSize)return t.tickTextCharSize;var n={h:11.5,w:5.5};return e.select("text").text(function(e){return t.textFormatted(e)}).each(function(e){var r=this.getBoundingClientRect(),i=t.textFormatted(e),o=r.height,a=i?r.width/i.length:void 0;o&&a&&(n.h=o,n.w=a)}).text(""),t.tickTextCharSize=n,n},a.transitionise=function(e){return this.params.withoutTransition?e:this.d3.transition(e)},a.isVertical=function(){return"left"===this.orient||"right"===this.orient},a.tspanData=function(e,t,n,r){var i=this,o=i.params.tickMultiline?i.splitTickText(e,n,r):[].concat(i.textFormatted(e));return o.map(function(e){return{index:t,splitted:e,length:o.length}})},a.splitTickText=function(e,t,n){function r(e,t){o=void 0;for(var n=1;n0?1:-1):e.tickLength},a.textTransform=function(){var e=this,t=e.tickTextRotate;return t?"rotate("+t+")":""},a.textTextAnchor=function(){var e=this,t=e.tickTextRotate;return t?t>0?"start":"end":"middle"},a.tspanDx=function(){var e=this,t=e.tickTextRotate;return t?8*Math.sin(Math.PI*(t/180)):0},a.tspanDy=function(e,t){var n=this,r=n.tickTextCharSize.h;return 0===t&&(r=n.isVertical()?-((e.length-1)*(n.tickTextCharSize.h/2)-3):".71em"),r},a.generateAxis=function(){function e(i){i.each(function(){var i,o,a,s=e.g=n.select(this),l=this.__chart__||t.scale,u=this.__chart__=t.copyScale(),c=t.tickValues?t.tickValues:t.generateTicks(u),d=s.selectAll(".tick").data(c,u),h=d.enter().insert("g",".domain").attr("class","tick").style("opacity",1e-6),f=d.exit().remove(),p=t.transitionise(d).style("opacity",1);r.isCategory?(t.tickOffset=Math.ceil((u(1)-u(0))/2),o=t.tickCentered?0:t.tickOffset,a=t.tickCentered?t.tickOffset:0):t.tickOffset=o=0,h.append("line"),h.append("text"),t.updateRange(),t.updateTickLength(),t.updateTickTextCharSize(s.select(".tick"));var g=p.select("line"),m=p.select("text"),v=d.select("text").selectAll("tspan").data(function(e,n){return t.tspanData(e,n,c,u)});v.enter().append("tspan"),v.exit().remove(),v.text(function(e){return e.splitted});var y=s.selectAll(".domain").data([0]),b=(y.enter().append("path").attr("class","domain"),t.transitionise(y));switch(t.orient){case"bottom":i=t.axisX,g.attr("x1",o).attr("x2",o).attr("y2",function(e,n){return t.lineY2(e,n)}),m.attr("x",0).attr("y",function(e,n){return t.textY(e,n)}).attr("transform",function(e,n){return t.textTransform(e,n)}).style("text-anchor",function(e,n){return t.textTextAnchor(e,n)}),v.attr("x",0).attr("dy",function(e,n){return t.tspanDy(e,n)}).attr("dx",function(e,n){return t.tspanDx(e,n)}),b.attr("d","M"+t.range[0]+","+t.outerTickSize+"V0H"+t.range[1]+"V"+t.outerTickSize);break;case"top":i=t.axisX,g.attr("x2",0).attr("y2",-t.innerTickSize),m.attr("x",0).attr("y",-t.tickLength).style("text-anchor","middle"),v.attr("x",0).attr("dy","0em"),b.attr("d","M"+t.range[0]+","+-t.outerTickSize+"V0H"+t.range[1]+"V"+-t.outerTickSize);break;case"left":i=t.axisY,g.attr("x2",-t.innerTickSize).attr("y1",a).attr("y2",a),m.attr("x",-t.tickLength).attr("y",t.tickOffset).style("text-anchor","end"),v.attr("x",-t.tickLength).attr("dy",function(e,n){return t.tspanDy(e,n)}),b.attr("d","M"+-t.outerTickSize+","+t.range[0]+"H0V"+t.range[1]+"H"+-t.outerTickSize);break;case"right":i=t.axisY,g.attr("x2",t.innerTickSize).attr("y2",0),m.attr("x",t.tickLength).attr("y",0).style("text-anchor","start"),v.attr("x",t.tickLength).attr("dy",function(e,n){return t.tspanDy(e,n)}),b.attr("d","M"+t.outerTickSize+","+t.range[0]+"H0V"+t.range[1]+"H"+t.outerTickSize)}if(u.rangeBand){var _=u,w=_.rangeBand()/2;l=u=function(e){return _(e)+w}}else l.rangeBand?l=u:f.call(i,u,t.tickOffset);h.call(i,l,t.tickOffset),p.call(i,u,t.tickOffset)})}var t=this,n=t.d3,r=t.params;return e.scale=function(n){return arguments.length?(t.scale=n,e):t.scale},e.orient=function(n){return arguments.length?(t.orient=n in{top:1,right:1,bottom:1,left:1}?n+"":"bottom",e):t.orient},e.tickFormat=function(n){return arguments.length?(t.tickFormat=n,e):t.tickFormat},e.tickCentered=function(n){return arguments.length?(t.tickCentered=n,e):t.tickCentered},e.tickOffset=function(){return t.tickOffset},e.tickInterval=function(){var n,i;return r.isCategory?n=2*t.tickOffset:(i=e.g.select("path.domain").node().getTotalLength()-2*t.outerTickSize,n=i/e.g.selectAll("line").size()),n===1/0?0:n},e.ticks=function(){return arguments.length?(t.tickArguments=arguments,e):t.tickArguments},e.tickCulling=function(n){return arguments.length?(t.tickCulling=n,e):t.tickCulling},e.tickValues=function(n){if("function"==typeof n)t.tickValues=function(){return n(t.scale.domain())};else{if(!arguments.length)return t.tickValues;t.tickValues=n}return e},e};var F=function(t){function n(t){u(this,n);var r={fn:o,internal:{fn:a}},i=d(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,"axis",r));return i.d3=t.d3,i.internal=e,i}return c(n,t),n}(n);o=F.prototype,o.init=function(){var e=this.owner,t=e.config,n=e.main;e.axes.x=n.append("g").attr("class",s.axis+" "+s.axisX).attr("clip-path",e.clipPathForXAxis).attr("transform",e.getTranslate("x")).style("visibility",t.axis_x_show?"visible":"hidden"),e.axes.x.append("text").attr("class",s.axisXLabel).attr("transform",t.axis_rotated?"rotate(-90)":"").style("text-anchor",this.textAnchorForXAxisLabel.bind(this)),e.axes.y=n.append("g").attr("class",s.axis+" "+s.axisY).attr("clip-path",t.axis_y_inner?"":e.clipPathForYAxis).attr("transform",e.getTranslate("y")).style("visibility",t.axis_y_show?"visible":"hidden"),e.axes.y.append("text").attr("class",s.axisYLabel).attr("transform",t.axis_rotated?"":"rotate(-90)").style("text-anchor",this.textAnchorForYAxisLabel.bind(this)),e.axes.y2=n.append("g").attr("class",s.axis+" "+s.axisY2).attr("transform",e.getTranslate("y2")).style("visibility",t.axis_y2_show?"visible":"hidden"),e.axes.y2.append("text").attr("class",s.axisY2Label).attr("transform",t.axis_rotated?"":"rotate(-90)").style("text-anchor",this.textAnchorForY2AxisLabel.bind(this))},o.getXAxis=function(e,t,n,r,i,o,a){var s=this.owner,l=s.config,u={isCategory:s.isCategorized(),withOuterTick:i,tickMultiline:l.axis_x_tick_multiline,tickWidth:l.axis_x_tick_width,tickTextRotate:a?0:l.axis_x_tick_rotate,withoutTransition:o},c=new this.internal(this,u).axis.scale(e).orient(t);return s.isTimeSeries()&&r&&"function"!=typeof r&&(r=r.map(function(e){return s.parseDate(e)})),c.tickFormat(n).tickValues(r),s.isCategorized()&&(c.tickCentered(l.axis_x_tick_centered),w(l.axis_x_tick_culling)&&(l.axis_x_tick_culling=!1)),c},o.updateXAxisTickValues=function(e,t){var n,r=this.owner,i=r.config;return(i.axis_x_tick_fit||i.axis_x_tick_count)&&(n=this.generateTickValues(r.mapTargetsToUniqueXs(e),i.axis_x_tick_count,r.isTimeSeries())),t?t.tickValues(n):(r.xAxis.tickValues(n),r.subXAxis.tickValues(n)),n},o.getYAxis=function(e,t,n,r,i,o,a){var s=this.owner,l=s.config,u={withOuterTick:i,withoutTransition:o,tickTextRotate:a?0:l.axis_y_tick_rotate},c=new this.internal(this,u).axis.scale(e).orient(t).tickFormat(n);return s.isTimeSeriesY()?c.ticks(s.d3.time[l.axis_y_tick_time_value],l.axis_y_tick_time_interval):c.tickValues(r),c},o.getId=function(e){var t=this.owner.config;return e in t.data_axes?t.data_axes[e]:"y"},o.getXAxisTickFormat=function(){var e=this.owner,t=e.config,n=e.isTimeSeries()?e.defaultAxisTimeFormat:e.isCategorized()?e.categoryName:function(e){return e<0?e.toFixed(0):e};return t.axis_x_tick_format&&(f(t.axis_x_tick_format)?n=t.axis_x_tick_format:e.isTimeSeries()&&(n=function(n){return n?e.axisTimeFormat(t.axis_x_tick_format)(n):""})),f(n)?function(t){return n.call(e,t)}:n},o.getTickValues=function(e,t){return e||(t?t.tickValues():void 0)},o.getXAxisTickValues=function(){return this.getTickValues(this.owner.config.axis_x_tick_values,this.owner.xAxis)},o.getYAxisTickValues=function(){return this.getTickValues(this.owner.config.axis_y_tick_values,this.owner.yAxis)},o.getY2AxisTickValues=function(){return this.getTickValues(this.owner.config.axis_y2_tick_values,this.owner.y2Axis)},o.getLabelOptionByAxisId=function(e){var t,n=this.owner,r=n.config;return"y"===e?t=r.axis_y_label:"y2"===e?t=r.axis_y2_label:"x"===e&&(t=r.axis_x_label),t},o.getLabelText=function(e){var t=this.getLabelOptionByAxisId(e);return g(t)?t:t?t.text:null},o.setLabelText=function(e,t){var n=this.owner,r=n.config,i=this.getLabelOptionByAxisId(e);g(i)?"y"===e?r.axis_y_label=t:"y2"===e?r.axis_y2_label=t:"x"===e&&(r.axis_x_label=t):i&&(i.text=t)},o.getLabelPosition=function(e,t){var n=this.getLabelOptionByAxisId(e),r=n&&"object"===(void 0===n?"undefined":l(n))&&n.position?n.position:t;return{isInner:r.indexOf("inner")>=0,isOuter:r.indexOf("outer")>=0,isLeft:r.indexOf("left")>=0,isCenter:r.indexOf("center")>=0,isRight:r.indexOf("right")>=0,isTop:r.indexOf("top")>=0,isMiddle:r.indexOf("middle")>=0,isBottom:r.indexOf("bottom")>=0}},o.getXAxisLabelPosition=function(){return this.getLabelPosition("x",this.owner.config.axis_rotated?"inner-top":"inner-right")},o.getYAxisLabelPosition=function(){return this.getLabelPosition("y",this.owner.config.axis_rotated?"inner-right":"inner-top")},o.getY2AxisLabelPosition=function(){return this.getLabelPosition("y2",this.owner.config.axis_rotated?"inner-right":"inner-top")},o.getLabelPositionById=function(e){return"y2"===e?this.getY2AxisLabelPosition():"y"===e?this.getYAxisLabelPosition():this.getXAxisLabelPosition()},o.textForXAxisLabel=function(){return this.getLabelText("x")},o.textForYAxisLabel=function(){return this.getLabelText("y")},o.textForY2AxisLabel=function(){return this.getLabelText("y2")},o.xForAxisLabel=function(e,t){var n=this.owner;return e?t.isLeft?0:t.isCenter?n.width/2:n.width:t.isBottom?-n.height:t.isMiddle?-n.height/2:0},o.dxForAxisLabel=function(e,t){return e?t.isLeft?"0.5em":t.isRight?"-0.5em":"0":t.isTop?"-0.5em":t.isBottom?"0.5em":"0"},o.textAnchorForAxisLabel=function(e,t){return e?t.isLeft?"start":t.isCenter?"middle":"end":t.isBottom?"start":t.isMiddle?"middle":"end"},o.xForXAxisLabel=function(){return this.xForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())},o.xForYAxisLabel=function(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())},o.xForY2AxisLabel=function(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())},o.dxForXAxisLabel=function(){return this.dxForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())},o.dxForYAxisLabel=function(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())},o.dxForY2AxisLabel=function(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())},o.dyForXAxisLabel=function(){var e=this.owner,t=e.config,n=this.getXAxisLabelPosition();return t.axis_rotated?n.isInner?"1.2em":-25-this.getMaxTickWidth("x"):n.isInner?"-0.5em":t.axis_x_height?t.axis_x_height-10:"3em"},o.dyForYAxisLabel=function(){var e=this.owner,t=this.getYAxisLabelPosition();return e.config.axis_rotated?t.isInner?"-0.5em":"3em":t.isInner?"1.2em":-10-(e.config.axis_y_inner?0:this.getMaxTickWidth("y")+10)},o.dyForY2AxisLabel=function(){var e=this.owner,t=this.getY2AxisLabelPosition();return e.config.axis_rotated?t.isInner?"1.2em":"-2.2em":t.isInner?"-0.5em":15+(e.config.axis_y2_inner?0:this.getMaxTickWidth("y2")+15)},o.textAnchorForXAxisLabel=function(){var e=this.owner;return this.textAnchorForAxisLabel(!e.config.axis_rotated,this.getXAxisLabelPosition())},o.textAnchorForYAxisLabel=function(){var e=this.owner;return this.textAnchorForAxisLabel(e.config.axis_rotated,this.getYAxisLabelPosition())},o.textAnchorForY2AxisLabel=function(){var e=this.owner;return this.textAnchorForAxisLabel(e.config.axis_rotated,this.getY2AxisLabelPosition())},o.getMaxTickWidth=function(e,t){var n,r,i,o,a,s=this.owner,l=s.config,u=0;return t&&s.currentMaxTickWidths[e]?s.currentMaxTickWidths[e]:(s.svg&&(n=s.filterTargetsToShow(s.data.targets),"y"===e?(r=s.y.copy().domain(s.getYDomain(n,"y")),i=this.getYAxis(r,s.yOrient,l.axis_y_tick_format,s.yAxisTickValues,!1,!0,!0)):"y2"===e?(r=s.y2.copy().domain(s.getYDomain(n,"y2")),i=this.getYAxis(r,s.y2Orient,l.axis_y2_tick_format,s.y2AxisTickValues,!1,!0,!0)):(r=s.x.copy().domain(s.getXDomain(n)),i=this.getXAxis(r,s.xOrient,s.xAxisTickFormat,s.xAxisTickValues,!1,!0,!0),this.updateXAxisTickValues(n,i)),o=s.d3.select("body").append("div").classed("c3",!0),a=o.append("svg").style("visibility","hidden").style("position","fixed").style("top",0).style("left",0),a.append("g").call(i).each(function(){s.d3.select(this).selectAll("text").each(function(){var e=this.getBoundingClientRect();u2){for(a=r-2,i=e[0],o=e[e.length-1],s=(o-i)/(a+1),c=[i],l=0;l=0&&P.select(this).style("display",t%D?"none":"block")})}else O.svg.selectAll("."+s.axisX+" .tick text").style("display","block");m=O.generateDrawArea?O.generateDrawArea(I,!1):void 0,v=O.generateDrawBar?O.generateDrawBar(N):void 0,y=O.generateDrawLine?O.generateDrawLine(j,!1):void 0,b=O.generateXYForText(I,N,j,!0),_=O.generateXYForText(I,N,j,!1),n&&(O.subY.domain(O.getYDomain(H,"y")),O.subY2.domain(O.getYDomain(H,"y2"))),O.updateXgridFocus(),L.select("text."+s.text+"."+s.empty).attr("x",O.width/2).attr("y",O.height/2).text(B.data_empty_label_text).transition().style("opacity",H.length?0:1),O.updateGrid(w),O.updateRegion(w),O.updateBar(C),O.updateLine(C),O.updateArea(C),O.updateCircle(),O.hasDataLabel()&&O.updateText(C),O.redrawTitle&&O.redrawTitle(),O.redrawArc&&O.redrawArc(w,C,l),O.redrawSubchart&&O.redrawSubchart(r,t,w,C,I,N,j),L.selectAll("."+s.selectedCircles).filter(O.isBarType.bind(O)).selectAll("circle").remove(),B.interaction_enabled&&!e.flow&&f&&(O.redrawEventRect(),O.updateZoom&&O.updateZoom()),O.updateCircleY(),M=(O.config.axis_rotated?O.circleY:O.circleX).bind(O),R=(O.config.axis_rotated?O.circleX:O.circleY).bind(O),e.flow&&(x=O.generateFlow({targets:H,flow:e.flow,duration:e.flow.duration,drawBar:v,drawLine:y,drawArea:m,cx:M,cy:R,xv:U,xForText:b,yForText:_})),(w||x)&&O.isTabVisible()?P.transition().duration(w).each(function(){var t=[];[O.redrawBar(v,!0),O.redrawLine(y,!0),O.redrawArea(m,!0),O.redrawCircle(M,R,!0),O.redrawText(b,_,e.flow,!0),O.redrawRegion(!0),O.redrawGrid(!0)].forEach(function(e){e.forEach(function(e){t.push(e)})}),S=O.generateWait(),t.forEach(function(e){S.add(e)})}).call(S,function(){x&&x(),B.onrendered&&B.onrendered.call(O)}):(O.redrawBar(v),O.redrawLine(y),O.redrawArea(m),O.redrawCircle(M,R),O.redrawText(b,_,e.flow),O.redrawRegion(),O.redrawGrid(),B.onrendered&&B.onrendered.call(O)),O.mapToIds(O.data.targets).forEach(function(e){O.withoutFadeIn[e]=!0})},D.updateAndRedraw=function(e){var t,n=this,r=n.config;e=e||{},e.withTransition=A(e,"withTransition",!0),e.withTransform=A(e,"withTransform",!1),e.withLegend=A(e,"withLegend",!1),e.withUpdateXDomain=!0,e.withUpdateOrgXDomain=!0,e.withTransitionForExit=!1,e.withTransitionForTransform=A(e,"withTransitionForTransform",e.withTransition),n.updateSizes(),e.withLegend&&r.legend_show||(t=n.axis.generateTransitions(e.withTransitionForAxis?r.transition_duration:0),n.updateScales(),n.updateSvgSize(),n.transformAll(e.withTransitionForTransform,t)),n.redraw(e,t)},D.redrawWithoutRescale=function(){this.redraw({withY:!1,withSubchart:!1,withEventRect:!1,withTransitionForAxis:!1})},D.isTimeSeries=function(){return"timeseries"===this.config.axis_x_type},D.isCategorized=function(){return this.config.axis_x_type.indexOf("categor")>=0},D.isCustomX=function(){var e=this,t=e.config;return!e.isTimeSeries()&&(t.data_x||C(t.data_xs))},D.isTimeSeriesY=function(){return"timeseries"===this.config.axis_y_type},D.getTranslate=function(e){var t,n,r=this,i=r.config;return"main"===e?(t=b(r.margin.left),n=b(r.margin.top)):"context"===e?(t=b(r.margin2.left),n=b(r.margin2.top)):"legend"===e?(t=r.margin3.left,n=r.margin3.top):"x"===e?(t=0,n=i.axis_rotated?0:r.height):"y"===e?(t=0,n=i.axis_rotated?r.height:0):"y2"===e?(t=i.axis_rotated?0:r.width,n=i.axis_rotated?1:0):"subx"===e?(t=0,n=i.axis_rotated?0:r.height2):"arc"===e&&(t=r.arcWidth/2,n=r.arcHeight/2),"translate("+t+","+n+")"},D.initialOpacity=function(e){return null!==e.value&&this.withoutFadeIn[e.id]?1:0},D.initialOpacityForCircle=function(e){return null!==e.value&&this.withoutFadeIn[e.id]?this.opacityForCircle(e):0},D.opacityForCircle=function(e){var t=f(this.config.point_show)?this.config.point_show(e):this.config.point_show,n=t?1:0;return h(e.value)?this.isScatterType(e)?.5:n:0},D.opacityForText=function(){return this.hasDataLabel()?1:0},D.xx=function(e){return e?this.x(e.x):null},D.xv=function(e){var t=this,n=e.value;return t.isTimeSeries()?n=t.parseDate(e.value):t.isCategorized()&&"string"==typeof e.value&&(n=t.config.axis_x_categories.indexOf(e.value)),Math.ceil(t.x(n))},D.yv=function(e){var t=this,n=e.axis&&"y2"===e.axis?t.y2:t.y;return Math.ceil(n(e.value))},D.subxx=function(e){return e?this.subX(e.x):null},D.transformMain=function(e,t){var n,r,i,o=this;t&&t.axisX?n=t.axisX:(n=o.main.select("."+s.axisX),e&&(n=n.transition())),t&&t.axisY?r=t.axisY:(r=o.main.select("."+s.axisY),e&&(r=r.transition())),t&&t.axisY2?i=t.axisY2:(i=o.main.select("."+s.axisY2),e&&(i=i.transition())),(e?o.main.transition():o.main).attr("transform",o.getTranslate("main")),n.attr("transform",o.getTranslate("x")),r.attr("transform",o.getTranslate("y")),i.attr("transform",o.getTranslate("y2")),o.main.select("."+s.chartArcs).attr("transform",o.getTranslate("arc"))},D.transformAll=function(e,t){var n=this;n.transformMain(e,t),n.config.subchart_show&&n.transformContext(e,t),n.legend&&n.transformLegend(e)},D.updateSvgSize=function(){var e=this,t=e.svg.select(".c3-brush .background");e.svg.attr("width",e.currentWidth).attr("height",e.currentHeight),e.svg.selectAll(["#"+e.clipId,"#"+e.clipIdForGrid]).select("rect").attr("width",e.width).attr("height",e.height),e.svg.select("#"+e.clipIdForXAxis).select("rect").attr("x",e.getXAxisClipX.bind(e)).attr("y",e.getXAxisClipY.bind(e)).attr("width",e.getXAxisClipWidth.bind(e)).attr("height",e.getXAxisClipHeight.bind(e)),e.svg.select("#"+e.clipIdForYAxis).select("rect").attr("x",e.getYAxisClipX.bind(e)).attr("y",e.getYAxisClipY.bind(e)).attr("width",e.getYAxisClipWidth.bind(e)).attr("height",e.getYAxisClipHeight.bind(e)),e.svg.select("#"+e.clipIdForSubchart).select("rect").attr("width",e.width).attr("height",t.size()?t.attr("height"):0),e.svg.select("."+s.zoomRect).attr("width",e.width).attr("height",e.height),e.selectChart.style("max-height",e.currentHeight+"px")},D.updateDimension=function(e){var t=this;e||(t.config.axis_rotated?(t.axes.x.call(t.xAxis),t.axes.subx.call(t.subXAxis)):(t.axes.y.call(t.yAxis),t.axes.y2.call(t.y2Axis))),t.updateSizes(),t.updateScales(),t.updateSvgSize(),t.transformAll(!1)},D.observeInserted=function(e){var t,n=this;if("undefined"==typeof MutationObserver)return void window.console.error("MutationObserver not defined.");t=new MutationObserver(function(r){r.forEach(function(r){"childList"===r.type&&r.previousSibling&&(t.disconnect(),n.intervalForObserveInserted=window.setInterval(function(){e.node().parentNode&&(window.clearInterval(n.intervalForObserveInserted),n.updateDimension(),n.brush&&n.brush.update(),n.config.oninit.call(n),n.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransition:!1,withTransitionForTransform:!1,withLegend:!0}),e.transition().style("opacity",1))},10))})}),t.observe(e.node(),{attributes:!0,childList:!0,characterData:!0})},D.bindResize=function(){var e=this,t=e.config;if(e.resizeFunction=e.generateResize(),e.resizeFunction.add(function(){t.onresize.call(e)}),t.resize_auto&&e.resizeFunction.add(function(){void 0!==e.resizeTimeout&&window.clearTimeout(e.resizeTimeout),e.resizeTimeout=window.setTimeout(function(){delete e.resizeTimeout,e.api.flush()},100)}),e.resizeFunction.add(function(){t.onresized.call(e)}),window.attachEvent)window.attachEvent("onresize",e.resizeFunction);else if(window.addEventListener)window.addEventListener("resize",e.resizeFunction,!1);else{var n=window.onresize;n?n.add&&n.remove||(n=e.generateResize(),n.add(window.onresize)):n=e.generateResize(),n.add(e.resizeFunction),window.onresize=n}},D.generateResize=function(){function e(){t.forEach(function(e){e()})}var t=[];return e.add=function(e){t.push(e)},e.remove=function(e){for(var n=0;nt.getTotalLength())break;n--}while(n>0);return n})),"SVGPathSegList"in window||(window.SVGPathSegList=function(e){this._pathElement=e,this._list=this._parsePath(this._pathElement.getAttribute("d")),this._mutationObserverConfig={attributes:!0,attributeFilter:["d"]},this._pathElementMutationObserver=new MutationObserver(this._updateListFromPathMutations.bind(this)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.classname="SVGPathSegList",Object.defineProperty(window.SVGPathSegList.prototype,"numberOfItems",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"pathSegList",{get:function(){return this._pathSegList||(this._pathSegList=new window.SVGPathSegList(this)),this._pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"normalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedNormalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),window.SVGPathSegList.prototype._checkPathSynchronizedToList=function(){this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords())},window.SVGPathSegList.prototype._updateListFromPathMutations=function(e){if(this._pathElement){var t=!1;e.forEach(function(e){"d"==e.attributeName&&(t=!0)}),t&&(this._list=this._parsePath(this._pathElement.getAttribute("d")))}},window.SVGPathSegList.prototype._writeListToPath=function(){this._pathElementMutationObserver.disconnect(),this._pathElement.setAttribute("d",window.SVGPathSegList._pathSegArrayAsString(this._list)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.segmentChanged=function(e){this._writeListToPath()},window.SVGPathSegList.prototype.clear=function(){this._checkPathSynchronizedToList(),this._list.forEach(function(e){e._owningPathSegList=null}),this._list=[],this._writeListToPath()},window.SVGPathSegList.prototype.initialize=function(e){return this._checkPathSynchronizedToList(),this._list=[e],e._owningPathSegList=this,this._writeListToPath(),e},window.SVGPathSegList.prototype._checkValidIndex=function(e){if(isNaN(e)||e<0||e>=this.numberOfItems)throw"INDEX_SIZE_ERR"},window.SVGPathSegList.prototype.getItem=function(e){return this._checkPathSynchronizedToList(),this._checkValidIndex(e),this._list[e]},window.SVGPathSegList.prototype.insertItemBefore=function(e,t){return this._checkPathSynchronizedToList(),t>this.numberOfItems&&(t=this.numberOfItems),e._owningPathSegList&&(e=e.clone()),this._list.splice(t,0,e),e._owningPathSegList=this,this._writeListToPath(),e},window.SVGPathSegList.prototype.replaceItem=function(e,t){return this._checkPathSynchronizedToList(),e._owningPathSegList&&(e=e.clone()),this._checkValidIndex(t),this._list[t]=e,e._owningPathSegList=this,this._writeListToPath(),e},window.SVGPathSegList.prototype.removeItem=function(e){this._checkPathSynchronizedToList(),this._checkValidIndex(e);var t=this._list[e];return this._list.splice(e,1),this._writeListToPath(),t},window.SVGPathSegList.prototype.appendItem=function(e){return this._checkPathSynchronizedToList(),e._owningPathSegList&&(e=e.clone()),this._list.push(e),e._owningPathSegList=this,this._writeListToPath(),e},window.SVGPathSegList._pathSegArrayAsString=function(e){var t="",n=!0;return e.forEach(function(e){n?(n=!1,t+=e._asPathString()):t+=" "+e._asPathString()}),t},window.SVGPathSegList.prototype._parsePath=function(e){if(!e||0==e.length)return[];var t=this,n=function(){this.pathSegList=[]};n.prototype.appendSegment=function(e){this.pathSegList.push(e)};var r=function(e){this._string=e,this._currentIndex=0,this._endIndex=this._string.length,this._previousCommand=window.SVGPathSeg.PATHSEG_UNKNOWN,this._skipOptionalSpaces()};r.prototype._isCurrentSpace=function(){var e=this._string[this._currentIndex];return e<=" "&&(" "==e||"\n"==e||"\t"==e||"\r"==e||"\f"==e)},r.prototype._skipOptionalSpaces=function(){for(;this._currentIndex="0"&&e<="9")&&t!=window.SVGPathSeg.PATHSEG_CLOSEPATH?t==window.SVGPathSeg.PATHSEG_MOVETO_ABS?window.SVGPathSeg.PATHSEG_LINETO_ABS:t==window.SVGPathSeg.PATHSEG_MOVETO_REL?window.SVGPathSeg.PATHSEG_LINETO_REL:t:window.SVGPathSeg.PATHSEG_UNKNOWN},r.prototype.initialCommandIsMoveTo=function(){if(!this.hasMoreData())return!0;var e=this.peekSegmentType();return e==window.SVGPathSeg.PATHSEG_MOVETO_ABS||e==window.SVGPathSeg.PATHSEG_MOVETO_REL},r.prototype._parseNumber=function(){var e=0,t=0,n=1,r=0,i=1,o=1,a=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex"9")&&"."!=this._string.charAt(this._currentIndex))){for(var s=this._currentIndex;this._currentIndex="0"&&this._string.charAt(this._currentIndex)<="9";)this._currentIndex++;if(this._currentIndex!=s)for(var l=this._currentIndex-1,u=1;l>=s;)t+=u*(this._string.charAt(l--)-"0"),u*=10;if(this._currentIndex=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex="0"&&this._string.charAt(this._currentIndex)<="9";)n*=10,r+=(this._string.charAt(this._currentIndex)-"0")/n,this._currentIndex+=1}if(this._currentIndex!=a&&this._currentIndex+1=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex="0"&&this._string.charAt(this._currentIndex)<="9";)e*=10,e+=this._string.charAt(this._currentIndex)-"0",this._currentIndex++}var c=t+r;if(c*=i,e&&(c*=Math.pow(10,o*e)),a!=this._currentIndex)return this._skipOptionalSpacesOrDelimiter(),c}},r.prototype._parseArcFlag=function(){if(!(this._currentIndex>=this._endIndex)){var e=!1,t=this._string.charAt(this._currentIndex++);if("0"==t)e=!1;else{if("1"!=t)return;e=!0}return this._skipOptionalSpacesOrDelimiter(),e}},r.prototype.parseSegment=function(){var e=this._string[this._currentIndex],n=this._pathSegTypeFromChar(e);if(n==window.SVGPathSeg.PATHSEG_UNKNOWN){if(this._previousCommand==window.SVGPathSeg.PATHSEG_UNKNOWN)return null;if((n=this._nextCommandHelper(e,this._previousCommand))==window.SVGPathSeg.PATHSEG_UNKNOWN)return null}else this._currentIndex++;switch(this._previousCommand=n,n){case window.SVGPathSeg.PATHSEG_MOVETO_REL:return new window.SVGPathSegMovetoRel(t,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_MOVETO_ABS:return new window.SVGPathSegMovetoAbs(t,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_REL:return new window.SVGPathSegLinetoRel(t,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_ABS:return new window.SVGPathSegLinetoAbs(t,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:return new window.SVGPathSegLinetoHorizontalRel(t,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:return new window.SVGPathSegLinetoHorizontalAbs(t,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:return new window.SVGPathSegLinetoVerticalRel(t,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:return new window.SVGPathSegLinetoVerticalAbs(t,this._parseNumber());case window.SVGPathSeg.PATHSEG_CLOSEPATH:return this._skipOptionalSpaces(),new window.SVGPathSegClosePath(t);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:var r={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegCurvetoCubicRel(t,r.x,r.y,r.x1,r.y1,r.x2,r.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:var r={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegCurvetoCubicAbs(t,r.x,r.y,r.x1,r.y1,r.x2,r.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:var r={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegCurvetoCubicSmoothRel(t,r.x,r.y,r.x2,r.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:var r={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegCurvetoCubicSmoothAbs(t,r.x,r.y,r.x2,r.y2);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:var r={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegCurvetoQuadraticRel(t,r.x,r.y,r.x1,r.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:var r={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegCurvetoQuadraticAbs(t,r.x,r.y,r.x1,r.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:return new window.SVGPathSegCurvetoQuadraticSmoothRel(t,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:return new window.SVGPathSegCurvetoQuadraticSmoothAbs(t,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_ARC_REL:var r={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegArcRel(t,r.x,r.y,r.x1,r.y1,r.arcAngle,r.arcLarge,r.arcSweep);case window.SVGPathSeg.PATHSEG_ARC_ABS:var r={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegArcAbs(t,r.x,r.y,r.x1,r.y1,r.arcAngle,r.arcLarge,r.arcSweep);default:throw"Unknown path seg type."}};var i=new n,o=new r(e);if(!o.initialCommandIsMoveTo())return[];for(;o.hasMoreData();){var a=o.parseSegment();if(!a)return[];i.appendSegment(a)}return i.pathSegList})}(),k.axis=function(){},k.axis.labels=function(e){var t=this.internal;arguments.length&&(Object.keys(e).forEach(function(n){t.axis.setLabelText(n,e[n])}),t.axis.updateLabels())},k.axis.max=function(e){var t=this.internal,n=t.config;if(!arguments.length)return{x:n.axis_x_max,y:n.axis_y_max,y2:n.axis_y2_max};"object"===(void 0===e?"undefined":l(e))?(h(e.x)&&(n.axis_x_max=e.x),h(e.y)&&(n.axis_y_max=e.y),h(e.y2)&&(n.axis_y2_max=e.y2)):n.axis_y_max=n.axis_y2_max=e,t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})},k.axis.min=function(e){var t=this.internal,n=t.config;if(!arguments.length)return{x:n.axis_x_min,y:n.axis_y_min,y2:n.axis_y2_min};"object"===(void 0===e?"undefined":l(e))?(h(e.x)&&(n.axis_x_min=e.x),h(e.y)&&(n.axis_y_min=e.y),h(e.y2)&&(n.axis_y2_min=e.y2)):n.axis_y_min=n.axis_y2_min=e,t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})},k.axis.range=function(e){if(!arguments.length)return{max:this.axis.max(),min:this.axis.min()};v(e.max)&&this.axis.max(e.max),v(e.min)&&this.axis.min(e.min)},k.category=function(e,t){var n=this.internal,r=n.config;return arguments.length>1&&(r.axis_x_categories[e]=t,n.redraw()),r.axis_x_categories[e]},k.categories=function(e){var t=this.internal,n=t.config;return arguments.length?(n.axis_x_categories=e,t.redraw(),n.axis_x_categories):n.axis_x_categories},k.resize=function(e){var t=this.internal,n=t.config;n.size_width=e?e.width:null,n.size_height=e?e.height:null,this.flush()},k.flush=function(){this.internal.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1})},k.destroy=function(){var e=this.internal;if(window.clearInterval(e.intervalForObserveInserted),void 0!==e.resizeTimeout&&window.clearTimeout(e.resizeTimeout),window.detachEvent)window.detachEvent("onresize",e.resizeFunction);else if(window.removeEventListener)window.removeEventListener("resize",e.resizeFunction);else{var t=window.onresize;t&&t.add&&t.remove&&t.remove(e.resizeFunction)}return e.selectChart.classed("c3",!1).html(""),Object.keys(e).forEach(function(t){e[t]=null}),null},k.color=function(e){return this.internal.color(e)},k.data=function(e){var t=this.internal.data.targets;return void 0===e?t:t.filter(function(t){return[].concat(e).indexOf(t.id)>=0})},k.data.shown=function(e){return this.internal.filterTargetsToShow(this.data(e))},k.data.values=function(e){var t,n=null;return e&&(t=this.data(e),n=t[0]?t[0].values.map(function(e){return e.value}):null),n},k.data.names=function(e){return this.internal.clearLegendItemTextBoxCache(),this.internal.updateDataAttributes("names",e)},k.data.colors=function(e){return this.internal.updateDataAttributes("colors",e)},k.data.axes=function(e){return this.internal.updateDataAttributes("axes",e)},k.flow=function(e){var t,n,r,i,o,a,s,l=this.internal,u=[],c=l.getMaxDataCount(),d=0,f=0;if(e.json)n=l.convertJsonToData(e.json,e.keys);else if(e.rows)n=l.convertRowsToData(e.rows);else{if(!e.columns)return;n=l.convertColumnsToData(e.columns)}t=l.convertDataToTargets(n,!0),l.data.targets.forEach(function(e){var n,r,i=!1;for(n=0;n1?i.values[i.values.length-1].x-o.x:o.x-l.getXDomain(l.data.targets)[0]:1,r=[o.x-a,o.x],l.updateXDomain(null,!0,!0,!1,r)),l.updateTargets(l.data.targets),l.redraw({flow:{index:o.index,length:d,duration:h(e.duration)?e.duration:l.config.transition_duration,done:e.done,orgDataCount:c},withLegend:!0,withTransition:c>1,withTrimXDomain:!1,withUpdateXAxis:!0})},D.generateFlow=function(e){var t=this,n=t.config,r=t.d3;return function(){var i,o,a,l=e.targets,u=e.flow,c=e.drawBar,d=e.drawLine,h=e.drawArea,f=e.cx,p=e.cy,g=e.xv,m=e.xForText,v=e.yForText,y=e.duration,b=1,w=u.index,C=u.length,A=t.getValueOnIndex(t.data.targets[0].values,w),E=t.getValueOnIndex(t.data.targets[0].values,w+C),S=t.x.domain(),x=u.duration||y,F=u.done||function(){},k=t.generateWait(),D=t.xgrid||r.selectAll([]),T=t.xgridLines||r.selectAll([]),M=t.mainRegion||r.selectAll([]),R=t.mainText||r.selectAll([]),O=t.mainBar||r.selectAll([]),L=t.mainLine||r.selectAll([]),P=t.mainArea||r.selectAll([]),B=t.mainCircle||r.selectAll([]);t.flowing=!0,t.data.targets.forEach(function(e){e.values.splice(0,C)}),a=t.updateXDomain(l,!0,!0),t.updateXGrid&&t.updateXGrid(!0),u.orgDataCount?i=1===u.orgDataCount||(A&&A.x)===(E&&E.x)?t.x(S[0])-t.x(a[0]):t.isTimeSeries()?t.x(S[0])-t.x(a[0]):t.x(A.x)-t.x(E.x):1!==t.data.targets[0].values.length?i=t.x(S[0])-t.x(a[0]):t.isTimeSeries()?(A=t.getValueOnIndex(t.data.targets[0].values,0),E=t.getValueOnIndex(t.data.targets[0].values,t.data.targets[0].values.length-1),i=t.x(A.x)-t.x(E.x)):i=_(a)/2,b=_(S)/_(a),o="translate("+i+",0) scale("+b+",1)",t.hideXGridFocus(),r.transition().ease("linear").duration(x).each(function(){k.add(t.axes.x.transition().call(t.xAxis)),k.add(O.transition().attr("transform",o)),k.add(L.transition().attr("transform",o)),k.add(P.transition().attr("transform",o)),k.add(B.transition().attr("transform",o)),k.add(R.transition().attr("transform",o)),k.add(M.filter(t.isRegionOnX).transition().attr("transform",o)),k.add(D.transition().attr("transform",o)),k.add(T.transition().attr("transform",o))}).call(k,function(){var e,r=[],i=[],o=[];if(C){for(e=0;e=0&&(t=!0)}),!t)}),o.regions},k.selected=function(e){var t=this.internal,n=t.d3;return n.merge(t.main.selectAll("."+s.shapes+t.getTargetSelectorSuffix(e)).selectAll("."+s.shape).filter(function(){return n.select(this).classed(s.SELECTED)}).map(function(e){return e.map(function(e){var t=e.__data__;return t.data?t.data:t})}))},k.select=function(e,t,n){var r=this.internal,i=r.d3,o=r.config;o.data_selection_enabled&&r.main.selectAll("."+s.shapes).selectAll("."+s.shape).each(function(a,l){var u=i.select(this),c=a.data?a.data.id:a.id,d=r.getToggle(this,a).bind(r),h=o.data_selection_grouped||!e||e.indexOf(c)>=0,f=!t||t.indexOf(l)>=0,p=u.classed(s.SELECTED);u.classed(s.line)||u.classed(s.area)||(h&&f?o.data_selection_isselectable(a)&&!p&&d(!0,u.classed(s.SELECTED,!0),a,l):v(n)&&n&&p&&d(!1,u.classed(s.SELECTED,!1),a,l))})},k.unselect=function(e,t){var n=this.internal,r=n.d3,i=n.config;i.data_selection_enabled&&n.main.selectAll("."+s.shapes).selectAll("."+s.shape).each(function(o,a){var l=r.select(this),u=o.data?o.data.id:o.id,c=n.getToggle(this,o).bind(n),d=i.data_selection_grouped||!e||e.indexOf(u)>=0,h=!t||t.indexOf(a)>=0,f=l.classed(s.SELECTED);l.classed(s.line)||l.classed(s.area)||d&&h&&i.data_selection_isselectable(o)&&f&&c(!1,l.classed(s.SELECTED,!1),o,a)})},k.show=function(e,t){var n,r=this.internal;e=r.mapToTargetIds(e),t=t||{},r.removeHiddenTargetIds(e),n=r.svg.selectAll(r.selectorTargets(e)),n.transition().style("opacity",1,"important").call(r.endall,function(){n.style("opacity",null).style("opacity",1)}),t.withLegend&&r.showLegend(e),r.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},k.hide=function(e,t){var n,r=this.internal;e=r.mapToTargetIds(e),t=t||{},r.addHiddenTargetIds(e),n=r.svg.selectAll(r.selectorTargets(e)),n.transition().style("opacity",0,"important").call(r.endall,function(){n.style("opacity",null).style("opacity",0)}),t.withLegend&&r.hideLegend(e),r.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},k.toggle=function(e,t){var n=this,r=this.internal;r.mapToTargetIds(e).forEach(function(e){r.isTargetToShow(e)?n.hide(e,t):n.show(e,t)})},k.tooltip=function(){},k.tooltip.show=function(e){var t,n,r=this.internal;e.mouse&&(n=e.mouse),e.data?r.isMultipleX()?(n=[r.x(e.data.x),r.getYScale(e.data.id)(e.data.value)],t=null):t=h(e.data.index)?e.data.index:r.getIndexByX(e.data.x):void 0!==e.x?t=r.getIndexByX(e.x):void 0!==e.index&&(t=e.index),r.dispatchEvent("mouseover",t,n),r.dispatchEvent("mousemove",t,n),r.config.tooltip_onshow.call(r,e.data)},k.tooltip.hide=function(){this.internal.dispatchEvent("mouseout",0),this.internal.config.tooltip_onhide.call(this)},k.transform=function(e,t){var n=this.internal,r=["pie","donut"].indexOf(e)>=0?{withTransform:!0}:null;n.transformTo(t,e,r)},D.transformTo=function(e,t,n){var r=this,i=!r.hasArcType(),o=n||{withTransitionForAxis:i};o.withTransitionForTransform=!1,r.transiting=!1,r.setTargetType(e,t),r.updateTargets(r.data.targets),r.updateAndRedraw(o)},k.x=function(e){var t=this.internal;return arguments.length&&(t.updateTargetX(t.data.targets,e),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),t.data.xs},k.xs=function(e){var t=this.internal;return arguments.length&&(t.updateTargetXs(t.data.targets,e),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),t.data.xs},k.zoom=function(e){var t=this.internal;return e&&(t.isTimeSeries()&&(e=e.map(function(e){return t.parseDate(e)})),t.brush.extent(e),t.redraw({withUpdateXDomain:!0,withY:t.config.zoom_rescale}),t.config.zoom_onzoom.call(this,t.x.orgDomain())),t.brush.extent()},k.zoom.enable=function(e){var t=this.internal;t.config.zoom_enabled=e,t.updateAndRedraw()},k.unzoom=function(){var e=this.internal;e.brush.clear().update(),e.redraw({withUpdateXDomain:!0})},k.zoom.max=function(e){var t=this.internal,n=t.config,r=t.d3;if(0!==e&&!e)return n.zoom_x_max;n.zoom_x_max=r.max([t.orgXDomain[1],e])},k.zoom.min=function(e){var t=this.internal,n=t.config,r=t.d3;if(0!==e&&!e)return n.zoom_x_min;n.zoom_x_min=r.min([t.orgXDomain[0],e])},k.zoom.range=function(e){if(!arguments.length)return{max:this.domain.max(),min:this.domain.min()};v(e.max)&&this.domain.max(e.max),v(e.min)&&this.domain.min(e.min)},D.initPie=function(){var e=this,t=e.d3;e.pie=t.layout.pie().value(function(e){return e.values.reduce(function(e,t){return e+t.value},0)}),e.pie.sort(e.getOrderFunction()||null)},D.updateRadius=function(){var e=this,t=e.config,n=t.gauge_width||t.donut_width;e.radiusExpanded=Math.min(e.arcWidth,e.arcHeight)/2,e.radius=.95*e.radiusExpanded,e.innerRadiusRatio=n?(e.radius-n)/e.radius:.6,e.innerRadius=e.hasType("donut")||e.hasType("gauge")?e.radius*e.innerRadiusRatio:0},D.updateArc=function(){var e=this;e.svgArc=e.getSvgArc(),e.svgArcExpanded=e.getSvgArcExpanded(),e.svgArcExpandedSub=e.getSvgArcExpanded(.98)},D.updateAngle=function(e){var t,n,r,i,o=this,a=o.config,s=!1,l=0;return a?(o.pie(o.filterTargetsToShow(o.data.targets)).forEach(function(t){s||t.data.id!==e.data.id||(s=!0,e=t,e.index=l),l++}),isNaN(e.startAngle)&&(e.startAngle=0),isNaN(e.endAngle)&&(e.endAngle=e.startAngle),o.isGaugeType(e.data)&&(t=a.gauge_min,n=a.gauge_max,r=Math.PI*(a.gauge_fullCircle?2:1)/(n-t),i=e.value.375?1.175-36/a.radius:.8)*a.radius/i:0,u="translate("+n*o+","+r*o+")"),u},D.getArcRatio=function(e){var t=this,n=t.config,r=Math.PI*(t.hasType("gauge")&&!n.gauge_fullCircle?1:2);return e?(e.endAngle-e.startAngle)/r:null},D.convertToArcData=function(e){return this.addName({id:e.data.id,value:e.value,ratio:this.getArcRatio(e),index:e.index})},D.textForArcLabel=function(e){var t,n,r,i,o,a=this;return a.shouldShowArcLabel()?(t=a.updateAngle(e),n=t?t.value:null,r=a.getArcRatio(t),i=e.data.id,a.hasType("gauge")||a.meetsArcLabelThreshold(r)?(o=a.getArcLabelFormat(),o?o(n,r,i):a.defaultArcValueFormat(n,r)):""):""},D.textForGaugeMinMax=function(e,t){var n=this,r=n.getGaugeLabelExtents();return r?r(e,t):e},D.expandArc=function(e){var t,n=this;if(n.transiting)return void(t=window.setInterval(function(){n.transiting||(window.clearInterval(t),n.legend.selectAll(".c3-legend-item-focused").size()>0&&n.expandArc(e))},10));e=n.mapToTargetIds(e),n.svg.selectAll(n.selectorTargets(e,"."+s.chartArc)).each(function(e){n.shouldExpand(e.data.id)&&n.d3.select(this).selectAll("path").transition().duration(n.expandDuration(e.data.id)).attr("d",n.svgArcExpanded).transition().duration(2*n.expandDuration(e.data.id)).attr("d",n.svgArcExpandedSub).each(function(e){n.isDonutType(e.data)})})},D.unexpandArc=function(e){var t=this;t.transiting||(e=t.mapToTargetIds(e),t.svg.selectAll(t.selectorTargets(e,"."+s.chartArc)).selectAll("path").transition().duration(function(e){return t.expandDuration(e.data.id)}).attr("d",t.svgArc),t.svg.selectAll("."+s.arc))},D.expandDuration=function(e){var t=this,n=t.config;return t.isDonutType(e)?n.donut_expand_duration:t.isGaugeType(e)?n.gauge_expand_duration:t.isPieType(e)?n.pie_expand_duration:50},D.shouldExpand=function(e){var t=this,n=t.config;return t.isDonutType(e)&&n.donut_expand||t.isGaugeType(e)&&n.gauge_expand||t.isPieType(e)&&n.pie_expand},D.shouldShowArcLabel=function(){var e=this,t=e.config,n=!0;return e.hasType("donut")?n=t.donut_label_show:e.hasType("pie")&&(n=t.pie_label_show),n},D.meetsArcLabelThreshold=function(e){var t=this,n=t.config;return e>=(t.hasType("donut")?n.donut_label_threshold:n.pie_label_threshold)},D.getArcLabelFormat=function(){var e=this,t=e.config,n=t.pie_label_format;return e.hasType("gauge")?n=t.gauge_label_format:e.hasType("donut")&&(n=t.donut_label_format),n},D.getGaugeLabelExtents=function(){return this.config.gauge_label_extents},D.getArcTitle=function(){var e=this;return e.hasType("donut")?e.config.donut_title:""},D.updateTargetsForArc=function(e){var t,n,r=this,i=r.main,o=r.classChartArc.bind(r),a=r.classArcs.bind(r),l=r.classFocus.bind(r);t=i.select("."+s.chartArcs).selectAll("."+s.chartArc).data(r.pie(e)).attr("class",function(e){return o(e)+l(e.data)}),n=t.enter().append("g").attr("class",o),n.append("g").attr("class",a),n.append("text").attr("dy",r.hasType("gauge")?"-.1em":".35em").style("opacity",0).style("text-anchor","middle").style("pointer-events","none")},D.initArc=function(){var e=this;e.arcs=e.main.select("."+s.chart).append("g").attr("class",s.chartArcs).attr("transform",e.getTranslate("arc")),e.arcs.append("text").attr("class",s.chartArcsTitle).style("text-anchor","middle").text(e.getArcTitle())},D.redrawArc=function(e,t,n){var r,i=this,o=i.d3,a=i.config,l=i.main;r=l.selectAll("."+s.arcs).selectAll("."+s.arc).data(i.arcData.bind(i)),r.enter().append("path").attr("class",i.classArc.bind(i)).style("fill",function(e){return i.color(e.data)}).style("cursor",function(e){return a.interaction_enabled&&a.data_selection_isselectable(e)?"pointer":null}).each(function(e){i.isGaugeType(e.data)&&(e.startAngle=e.endAngle=a.gauge_startingAngle),this._current=e}),r.attr("transform",function(e){return!i.isGaugeType(e.data)&&n?"scale(0)":""}).on("mouseover",a.interaction_enabled?function(e){var t,n;i.transiting||(t=i.updateAngle(e))&&(n=i.convertToArcData(t),i.expandArc(t.data.id),i.api.focus(t.data.id),i.toggleFocusLegend(t.data.id,!0),i.config.data_onmouseover(n,this))}:null).on("mousemove",a.interaction_enabled?function(e){var t,n,r=i.updateAngle(e);r&&(t=i.convertToArcData(r),n=[t],i.showTooltip(n,this))}:null).on("mouseout",a.interaction_enabled?function(e){var t,n;i.transiting||(t=i.updateAngle(e))&&(n=i.convertToArcData(t),i.unexpandArc(t.data.id),i.api.revert(),i.revertLegend(),i.hideTooltip(),i.config.data_onmouseout(n,this))}:null).on("click",a.interaction_enabled?function(e,t){var n,r=i.updateAngle(e);r&&(n=i.convertToArcData(r),i.toggleShape&&i.toggleShape(this,n,t),i.config.data_onclick.call(i.api,n,this))}:null).each(function(){i.transiting=!0}).transition().duration(e).attrTween("d",function(e){var t,n=i.updateAngle(e);return n?(isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle),t=o.interpolate(this._current,n),this._current=t(0),function(n){var r=t(n);return r.data=e.data,i.getArc(r,!0)}):function(){return"M 0 0"}}).attr("transform",n?"scale(1)":"").style("fill",function(e){return i.levelColor?i.levelColor(e.data.values[0].value):i.color(e.data.id)}).call(i.endall,function(){i.transiting=!1}),r.exit().transition().duration(t).style("opacity",0).remove(),l.selectAll("."+s.chartArc).select("text").style("opacity",0).attr("class",function(e){return i.isGaugeType(e.data)?s.gaugeValue:""}).text(i.textForArcLabel.bind(i)).attr("transform",i.transformForArcLabel.bind(i)).style("font-size",function(e){return i.isGaugeType(e.data)?Math.round(i.radius/5)+"px":""}).transition().duration(e).style("opacity",function(e){return i.isTargetToShow(e.data.id)&&i.isArcType(e.data)?1:0}),l.select("."+s.chartArcsTitle).style("opacity",i.hasType("donut")||i.hasType("gauge")?1:0),i.hasType("gauge")&&(i.arcs.select("."+s.chartArcsBackground).attr("d",function(){var e={data:[{value:a.gauge_max}],startAngle:a.gauge_startingAngle,endAngle:-1*a.gauge_startingAngle};return i.getArc(e,!0,!0)}),i.arcs.select("."+s.chartArcsGaugeUnit).attr("dy",".75em").text(a.gauge_label_show?a.gauge_units:""),i.arcs.select("."+s.chartArcsGaugeMin).attr("dx",-1*(i.innerRadius+(i.radius-i.innerRadius)/(a.gauge_fullCircle?1:2))+"px").attr("dy","1.2em").text(a.gauge_label_show?i.textForGaugeMinMax(a.gauge_min,!1):""),i.arcs.select("."+s.chartArcsGaugeMax).attr("dx",i.innerRadius+(i.radius-i.innerRadius)/(a.gauge_fullCircle?1:2)+"px").attr("dy","1.2em").text(a.gauge_label_show?i.textForGaugeMinMax(a.gauge_max,!0):""))},D.initGauge=function(){var e=this.arcs;this.hasType("gauge")&&(e.append("path").attr("class",s.chartArcsBackground),e.append("text").attr("class",s.chartArcsGaugeUnit).style("text-anchor","middle").style("pointer-events","none"),e.append("text").attr("class",s.chartArcsGaugeMin).style("text-anchor","middle").style("pointer-events","none"),e.append("text").attr("class",s.chartArcsGaugeMax).style("text-anchor","middle").style("pointer-events","none"))},D.getGaugeLabelHeight=function(){return this.config.gauge_label_show?20:0},D.hasCaches=function(e){for(var t=0;t=0?s.focused:"")},D.classDefocused=function(e){return" "+(this.defocusedTargetIds.indexOf(e.id)>=0?s.defocused:"")},D.classChartText=function(e){return s.chartText+this.classTarget(e.id)},D.classChartLine=function(e){return s.chartLine+this.classTarget(e.id)},D.classChartBar=function(e){return s.chartBar+this.classTarget(e.id)},D.classChartArc=function(e){return s.chartArc+this.classTarget(e.data.id)},D.getTargetSelectorSuffix=function(e){return e||0===e?("-"+e).replace(/[\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g,"-"):""},D.selectorTarget=function(e,t){return(t||"")+"."+s.target+this.getTargetSelectorSuffix(e)},D.selectorTargets=function(e,t){var n=this;return e=e||[],e.length?e.map(function(e){return n.selectorTarget(e,t)}):null},D.selectorLegend=function(e){return"."+s.legendItem+this.getTargetSelectorSuffix(e)},D.selectorLegends=function(e){var t=this;return e&&e.length?e.map(function(e){return t.selectorLegend(e)}):null},D.getClipPath=function(e){return"url("+(window.navigator.appVersion.toLowerCase().indexOf("msie 9.")>=0?"":document.URL.split("#")[0])+"#"+e+")"},D.appendClip=function(e,t){return e.append("clipPath").attr("id",t).append("rect")},D.getAxisClipX=function(e){var t=Math.max(30,this.margin.left);return e?-(1+t):-(t-1)},D.getAxisClipY=function(e){return e?-20:-this.margin.top},D.getXAxisClipX=function(){var e=this;return e.getAxisClipX(!e.config.axis_rotated)},D.getXAxisClipY=function(){var e=this;return e.getAxisClipY(!e.config.axis_rotated)},D.getYAxisClipX=function(){var e=this;return e.config.axis_y_inner?-1:e.getAxisClipX(e.config.axis_rotated)},D.getYAxisClipY=function(){var e=this;return e.getAxisClipY(e.config.axis_rotated)},D.getAxisClipWidth=function(e){var t=this,n=Math.max(30,t.margin.left),r=Math.max(30,t.margin.right);return e?t.width+2+n+r:t.margin.left+20},D.getAxisClipHeight=function(e){return(e?this.margin.bottom:this.margin.top+this.height)+20},D.getXAxisClipWidth=function(){var e=this;return e.getAxisClipWidth(!e.config.axis_rotated)},D.getXAxisClipHeight=function(){var e=this;return e.getAxisClipHeight(!e.config.axis_rotated)},D.getYAxisClipWidth=function(){var e=this;return e.getAxisClipWidth(e.config.axis_rotated)+(e.config.axis_y_inner?20:0)},D.getYAxisClipHeight=function(){var e=this;return e.getAxisClipHeight(e.config.axis_rotated)},D.generateColor=function(){var e=this,t=e.config,n=e.d3,r=t.data_colors,i=C(t.color_pattern)?t.color_pattern:n.scale.category10().range(),o=t.data_color,a=[];return function(e){var t,n=e.id||e.data&&e.data.id||e;return r[n]instanceof Function?t=r[n](e):r[n]?t=r[n]:(a.indexOf(n)<0&&a.push(n),t=i[a.indexOf(n)%i.length],r[n]=t),o instanceof Function?o(t,e):t}},D.generateLevelColor=function(){var e=this,t=e.config,n=t.color_pattern,r=t.color_threshold,i="value"===r.unit,o=r.values&&r.values.length?r.values:[],a=r.max||100;return C(t.color_threshold)?function(e){var t,r=n[n.length-1];for(t=0;t=0?r.data.xs[n]=(t&&r.data.xs[n]?r.data.xs[n]:[]).concat(e.map(function(e){return e[o]}).filter(h).map(function(e,t){return r.generateTargetX(e,n,t)})):i.data_x?r.data.xs[n]=r.getOtherTargetXs():C(i.data_xs)&&(r.data.xs[n]=r.getXValuesOfXKey(o,r.data.targets)):r.data.xs[n]=e.map(function(e,t){return t})}),o.forEach(function(e){if(!r.data.xs[e])throw new Error('x is not defined for id = "'+e+'".')}),n=o.map(function(t,n){var o=i.data_idConverter(t);return{id:o,id_org:t,values:e.map(function(e,a){var s,l=r.getXKey(t),u=e[l],c=null===e[t]||isNaN(e[t])?null:+e[t];return r.isCustomX()&&r.isCategorized()&&!m(u)?(0===n&&0===a&&(i.axis_x_categories=[]),-1===(s=i.axis_x_categories.indexOf(u))&&(s=i.axis_x_categories.length,i.axis_x_categories.push(u))):s=r.generateTargetX(u,t,a),(m(e[t])||r.data.xs[t].length<=a)&&(s=void 0),{x:s,value:c,id:o}}).filter(function(e){return v(e.x)})}}),n.forEach(function(e){var t;i.data_xSort&&(e.values=e.values.sort(function(e,t){return(e.x||0===e.x?e.x:1/0)-(t.x||0===t.x?t.x:1/0)})),t=0,e.values.forEach(function(e){e.index=t++}),r.data.xs[e.id].sort(function(e,t){return e-t})}),r.hasNegativeValue=r.hasNegativeValueInTargets(n),r.hasPositiveValue=r.hasPositiveValueInTargets(n),i.data_type&&r.setTargetType(r.mapToIds(n).filter(function(e){return!(e in i.data_types)}),i.data_type),n.forEach(function(e){r.addCache(e.id_org,e)}),n},D.isX=function(e){var t=this,n=t.config;return n.data_x&&e===n.data_x||C(n.data_xs)&&E(n.data_xs,e)},D.isNotX=function(e){return!this.isX(e)},D.getXKey=function(e){var t=this,n=t.config;return n.data_x?n.data_x:C(n.data_xs)?n.data_xs[e]:null},D.getXValuesOfXKey=function(e,t){var n,r=this;return(t&&C(t)?r.mapToIds(t):[]).forEach(function(t){r.getXKey(t)===e&&(n=r.data.xs[t])}),n},D.getIndexByX=function(e){var t=this,n=t.filterByX(t.data.targets,e);return n.length?n[0].index:null},D.getXValue=function(e,t){var n=this;return e in n.data.xs&&n.data.xs[e]&&h(n.data.xs[e][t])?n.data.xs[e][t]:t},D.getOtherTargetXs=function(){var e=this,t=Object.keys(e.data.xs);return t.length?e.data.xs[t[0]]:null},D.getOtherTargetX=function(e){var t=this.getOtherTargetXs();return t&&e1},D.isMultipleX=function(){return C(this.config.data_xs)||!this.config.data_xSort||this.hasType("scatter")},D.addName=function(e){var t,n=this;return e&&(t=n.config.data_names[e.id],e.name=void 0!==t?t:e.id),e},D.getValueOnIndex=function(e,t){var n=e.filter(function(e){return e.index===t});return n.length?n[0]:null},D.updateTargetX=function(e,t){var n=this;e.forEach(function(e){e.values.forEach(function(r,i){r.x=n.generateTargetX(t[i],e.id,i)}),n.data.xs[e.id]=t})},D.updateTargetXs=function(e,t){var n=this;e.forEach(function(e){t[e.id]&&n.updateTargetX([e],t[e.id])})},D.generateTargetX=function(e,t,n){var r=this;return r.isTimeSeries()?e?r.parseDate(e):r.parseDate(r.getXValue(t,n)):r.isCustomX()&&!r.isCategorized()?h(e)?+e:r.getXValue(t,n):n},D.cloneTarget=function(e){return{id:e.id,id_org:e.id_org,values:e.values.map(function(e){return{x:e.x,value:e.value,id:e.id}})}},D.updateXs=function(){var e=this;e.data.targets.length&&(e.xs=[],e.data.targets[0].values.forEach(function(t){e.xs[t.index]=t.x}))},D.getPrevX=function(e){var t=this.xs[e-1];return void 0!==t?t:null},D.getNextX=function(e){var t=this.xs[e+1];return void 0!==t?t:null},D.getMaxDataCount=function(){var e=this;return e.d3.max(e.data.targets,function(e){return e.values.length})},D.getMaxDataCountTarget=function(e){var t,n=e.length,r=0;return n>1?e.forEach(function(e){e.values.length>r&&(t=e,r=e.values.length)}):t=n?e[0]:null,t},D.getEdgeX=function(e){var t=this;return e.length?[t.d3.min(e,function(e){return e.values[0].x}),t.d3.max(e,function(e){return e.values[e.values.length-1].x})]:[0,0]},D.mapToIds=function(e){return e.map(function(e){return e.id})},D.mapToTargetIds=function(e){var t=this;return e?[].concat(e):t.mapToIds(t.data.targets)},D.hasTarget=function(e,t){var n,r=this.mapToIds(e);for(n=0;nt?1:e>=t?0:NaN})},D.addHiddenTargetIds=function(e){e=e instanceof Array?e:new Array(e);for(var t=0;t0})},D.isOrderDesc=function(){var e=this.config;return"string"==typeof e.data_order&&"desc"===e.data_order.toLowerCase()},D.isOrderAsc=function(){var e=this.config;return"string"==typeof e.data_order&&"asc"===e.data_order.toLowerCase()},D.getOrderFunction=function(){var e=this,t=e.config,n=e.isOrderAsc(),r=e.isOrderDesc();if(n||r)return function(e,t){var n=function(e,t){return e+Math.abs(t.value)},i=e.values.reduce(n,0),o=t.values.reduce(n,0);return r?o-i:i-o};if(f(t.data_order))return t.data_order;if(p(t.data_order)){var i=t.data_order;return function(e,t){return i.indexOf(e.id)-i.indexOf(t.id)}}},D.orderTargets=function(e){var t=this.getOrderFunction();return t&&(e.sort(t),(this.isOrderAsc()||this.isOrderDesc())&&e.reverse()),e},D.filterByX=function(e,t){return this.d3.merge(e.map(function(e){return e.values})).filter(function(e){return e.x-t==0})},D.filterRemoveNull=function(e){return e.filter(function(e){return h(e.value)})},D.filterByXDomain=function(e,t){return e.map(function(e){return{id:e.id,id_org:e.id_org,values:e.values.filter(function(e){return t[0]<=e.x&&e.x<=t[1]})}})},D.hasDataLabel=function(){var e=this.config;return!("boolean"!=typeof e.data_labels||!e.data_labels)||!("object"!==l(e.data_labels)||!C(e.data_labels))},D.getDataLabelLength=function(e,t,n){var r=this,i=[0,0];return r.selectChart.select("svg").selectAll(".dummy").data([e,t]).enter().append("text").text(function(e){return r.dataLabelFormat(e.id)(e)}).each(function(e,t){i[t]=1.3*this.getBoundingClientRect()[n]}).remove(),i},D.isNoneArc=function(e){return this.hasTarget(this.data.targets,e.id)},D.isArc=function(e){return"data"in e&&this.hasTarget(this.data.targets,e.data.id)},D.findSameXOfValues=function(e,t){var n,r=e[t].x,i=[];for(n=t-1;n>=0&&r===e[n].x;n--)i.push(e[n]);for(n=t;n0)for(a=s.hasNegativeValueInTargets(e),t=0;t=0}),0!==i.length)for(r=i[0],a&&c[r]&&c[r].forEach(function(e,t){c[r][t]=e<0?e:0}),n=1;n0||(c[r][t]+=+e)});return s.d3.min(Object.keys(c).map(function(e){return s.d3.min(c[e])}))},D.getYDomainMax=function(e){var t,n,r,i,o,a,s=this,l=s.config,u=s.mapToIds(e),c=s.getValuesAsIdKeyed(e);if(l.data_groups.length>0)for(a=s.hasPositiveValueInTargets(e),t=0;t=0}),0!==i.length)for(r=i[0],a&&c[r]&&c[r].forEach(function(e,t){c[r][t]=e>0?e:0}),n=1;n=0&&A>=0,f=w<=0&&A<=0,(h(y)&&d||h(b)&&f)&&(S=!1),S&&(d&&(w=0),f&&(A=0)),i=Math.abs(A-w),o=a=.1*i,void 0!==E&&(s=Math.max(Math.abs(w),Math.abs(A)),A=E+s,w=E-s),F?(l=p.getDataLabelLength(w,A,"width"),u=_(p.y.range()),c=[l[0]/u,l[1]/u],o+=i*(c[1]/(1-c[0]-c[1])),a+=i*(c[0]/(1-c[0]-c[1]))):k&&(l=p.getDataLabelLength(w,A,"height"),o+=p.axis.convertPixelsToAxisPadding(l[1],i),a+=p.axis.convertPixelsToAxisPadding(l[0],i)),"y"===t&&C(g.axis_y_padding)&&(o=p.axis.getPadding(g.axis_y_padding,"top",o,i),a=p.axis.getPadding(g.axis_y_padding,"bottom",a,i)),"y2"===t&&C(g.axis_y2_padding)&&(o=p.axis.getPadding(g.axis_y2_padding,"top",o,i),a=p.axis.getPadding(g.axis_y2_padding,"bottom",a,i)),S&&(d&&(a=w),f&&(o=-A)),r=[w-a,A+o],x?r.reverse():r)},D.getXDomainMin=function(e){var t=this,n=t.config;return v(n.axis_x_min)?t.isTimeSeries()?this.parseDate(n.axis_x_min):n.axis_x_min:t.d3.min(e,function(e){return t.d3.min(e.values,function(e){return e.x})})},D.getXDomainMax=function(e){var t=this,n=t.config;return v(n.axis_x_max)?t.isTimeSeries()?this.parseDate(n.axis_x_max):n.axis_x_max:t.d3.max(e,function(e){return t.d3.max(e.values,function(e){return e.x})})},D.getXDomainPadding=function(e){var t,n,r,i,o=this,a=o.config,s=e[1]-e[0];return o.isCategorized()?n=0:o.hasType("bar")?(t=o.getMaxDataCount(),n=t>1?s/(t-1)/2:.5):n=.01*s,"object"===l(a.axis_x_padding)&&C(a.axis_x_padding)?(r=h(a.axis_x_padding.left)?a.axis_x_padding.left:n,i=h(a.axis_x_padding.right)?a.axis_x_padding.right:n):r=i="number"==typeof a.axis_x_padding?a.axis_x_padding:n,{left:r,right:i}},D.getXDomain=function(e){var t=this,n=[t.getXDomainMin(e),t.getXDomainMax(e)],r=n[0],i=n[1],o=t.getXDomainPadding(n),a=0,s=0;return r-i!=0||t.isCategorized()||(t.isTimeSeries()?(r=new Date(.5*r.getTime()),i=new Date(1.5*i.getTime())):(r=0===r?1:.5*r,i=0===i?-1:1.5*i)),(r||0===r)&&(a=t.isTimeSeries()?new Date(r.getTime()-o.left):r-o.left),(i||0===i)&&(s=t.isTimeSeries()?new Date(i.getTime()+o.right):i+o.right),[a,s]},D.updateXDomain=function(e,t,n,r,i){var o=this,a=o.config;return n&&(o.x.domain(i||o.d3.extent(o.getXDomain(e))),o.orgXDomain=o.x.domain(),a.zoom_enabled&&o.zoom.scale(o.x).updateScaleExtent(),o.subX.domain(o.x.domain()),o.brush&&o.brush.scale(o.subX)),t&&(o.x.domain(i||(!o.brush||o.brush.empty()?o.orgXDomain:o.brush.extent())),a.zoom_enabled&&o.zoom.scale(o.x).updateScaleExtent()),r&&o.x.domain(o.trimXDomain(o.x.orgDomain())),o.x.domain()},D.trimXDomain=function(e){var t=this.getZoomDomain(),n=t[0],r=t[1];return e[0]<=n&&(e[1]=+e[1]+(n-e[0]),e[0]=n),r<=e[1]&&(e[0]=+e[0]-(e[1]-r),e[1]=r),e},D.drag=function(e){var t,n,r,i,o,a,l,u,c=this,d=c.config,h=c.main,f=c.d3;c.hasArcType()||d.data_selection_enabled&&(d.zoom_enabled&&!c.zoom.altDomain||d.data_selection_multiple&&(t=c.dragStart[0],n=c.dragStart[1],r=e[0],i=e[1],o=Math.min(t,r),a=Math.max(t,r),l=d.data_selection_grouped?c.margin.top:Math.min(n,i),u=d.data_selection_grouped?c.height:Math.max(n,i),h.select("."+s.dragarea).attr("x",o).attr("y",l).attr("width",a-o).attr("height",u-l),h.selectAll("."+s.shapes).selectAll("."+s.shape).filter(function(e){return d.data_selection_isselectable(e)}).each(function(e,t){var n,r,i,d,h,p,g=f.select(this),m=g.classed(s.SELECTED),v=g.classed(s.INCLUDED),y=!1;if(g.classed(s.circle))n=1*g.attr("cx"),r=1*g.attr("cy"),h=c.togglePoint,y=ou&&(l=l.filter(function(e){return(""+e).indexOf(".")<0}));return l},D.getGridFilterToRemove=function(e){return e?function(t){var n=!1;return[].concat(e).forEach(function(e){("value"in e&&t.value===e.value||"class"in e&&t.class===e.class)&&(n=!0)}),n}:function(){return!0}},D.removeGridLines=function(e,t){var n=this,r=n.config,i=n.getGridFilterToRemove(e),o=function(e){return!i(e)},a=t?s.xgridLines:s.ygridLines,l=t?s.xgridLine:s.ygridLine;n.main.select("."+a).selectAll("."+l).filter(i).transition().duration(r.transition_duration).style("opacity",0).remove(),t?r.grid_x_lines=r.grid_x_lines.filter(o):r.grid_y_lines=r.grid_y_lines.filter(o)},D.initEventRect=function(){this.main.select("."+s.chart).append("g").attr("class",s.eventRects).style("fill-opacity",0)},D.redrawEventRect=function(){var e,t,n=this,r=n.config,i=n.isMultipleX(),o=n.main.select("."+s.eventRects).style("cursor",r.zoom_enabled?r.axis_rotated?"ns-resize":"ew-resize":null).classed(s.eventRectsMultiple,i).classed(s.eventRectsSingle,!i);o.selectAll("."+s.eventRect).remove(),n.eventRect=o.selectAll("."+s.eventRect),i?(e=n.eventRect.data([0]),n.generateEventRectsForMultipleXs(e.enter()),n.updateEventRect(e)):(t=n.getMaxDataCountTarget(n.data.targets),o.datum(t?t.values:[]),n.eventRect=o.selectAll("."+s.eventRect),e=n.eventRect.data(function(e){return e}),n.generateEventRectsForSingleX(e.enter()),n.updateEventRect(e),e.exit().remove())},D.updateEventRect=function(e){var t,n,r,i,o,a,s=this,l=s.config;e=e||s.eventRect.data(function(e){return e}),s.isMultipleX()?(t=0,n=0,r=s.width,i=s.height):(!s.isCustomX()&&!s.isTimeSeries()||s.isCategorized()?(o=s.getEventRectWidth(),a=function(e){return s.x(e.x)-o/2}):(s.updateXs(),o=function(e){var t=s.getPrevX(e.index),n=s.getNextX(e.index);return null===t&&null===n?l.axis_rotated?s.height:s.width:(null===t&&(t=s.x.domain()[0]),null===n&&(n=s.x.domain()[1]),Math.max(0,(s.x(n)-s.x(t))/2))},a=function(e){var t=s.getPrevX(e.index),n=s.getNextX(e.index),r=s.data.xs[e.id][e.index];return null===t&&null===n?0:(null===t&&(t=s.x.domain()[0]),(s.x(r)+s.x(t))/2)}),t=l.axis_rotated?0:a,n=l.axis_rotated?a:0,r=l.axis_rotated?s.width:o,i=l.axis_rotated?o:s.height),e.attr("class",s.classEvent.bind(s)).attr("x",t).attr("y",n).attr("width",r).attr("height",i)},D.generateEventRectsForSingleX=function(e){var t=this,n=t.d3,r=t.config;e.append("rect").attr("class",t.classEvent.bind(t)).style("cursor",r.data_selection_enabled&&r.data_selection_grouped?"pointer":null).on("mouseover",function(e){var n=e.index;t.dragging||t.flowing||t.hasArcType()||(r.point_focus_expand_enabled&&t.expandCircles(n,null,!0),t.expandBars(n,null,!0),t.main.selectAll("."+s.shape+"-"+n).each(function(e){r.data_onmouseover.call(t.api,e)}))}).on("mouseout",function(e){var n=e.index;t.config&&(t.hasArcType()||(t.hideXGridFocus(),t.hideTooltip(),t.unexpandCircles(),t.unexpandBars(),t.main.selectAll("."+s.shape+"-"+n).each(function(e){r.data_onmouseout.call(t.api,e)})))}).on("mousemove",function(e){var i,o=e.index,a=t.svg.select("."+s.eventRect+"-"+o);t.dragging||t.flowing||t.hasArcType()||(t.isStepType(e)&&"step-after"===t.config.line_step_type&&n.mouse(this)[0]=0}).classed(s.legendItemFocused,t).transition().duration(100).style("opacity",function(){return(t?n.opacityForLegend:n.opacityForUnfocusedLegend).call(n,n.d3.select(this))})},D.revertLegend=function(){var e=this,t=e.d3;e.legend.selectAll("."+s.legendItem).classed(s.legendItemFocused,!1).transition().duration(100).style("opacity",function(){return e.opacityForLegend(t.select(this))})},D.showLegend=function(e){var t=this,n=t.config;n.legend_show||(n.legend_show=!0,t.legend.style("visibility","visible"),t.legendHasRendered||t.updateLegendWithDefaults()),t.removeHiddenLegendIds(e),t.legend.selectAll(t.selectorLegends(e)).style("visibility","visible").transition().style("opacity",function(){return t.opacityForLegend(t.d3.select(this))})},D.hideLegend=function(e){var t=this,n=t.config;n.legend_show&&w(e)&&(n.legend_show=!1,t.legend.style("visibility","hidden")),t.addHiddenLegendIds(e),t.legend.selectAll(t.selectorLegends(e)).style("opacity",0).style("visibility","hidden")},D.clearLegendItemTextBoxCache=function(){this.legendItemTextBox={}},D.updateLegend=function(e,t,n){function r(e,t){return E.legendItemTextBox[t]||(E.legendItemTextBox[t]=E.getTextRect(e.textContent,s.legendItem,e)),E.legendItemTextBox[t]}function i(t,n,i){function o(e,t){t||(a=(p-R-f)/2)=k)&&(k=d),(!D||h>=D)&&(D=h),s=E.isLegendRight||E.isLegendInset?D:k,S.legend_equally?(Object.keys(L).forEach(function(e){L[e]=k}),Object.keys(P).forEach(function(e){P[e]=D}),a=(p-s*e.length)/2,a0&&0===C.size()&&(C=E.legend.insert("g","."+s.legendItem).attr("class",s.legendBackground).append("rect")),b=E.legend.selectAll("text").data(e).text(function(e){return v(S.data_names[e])?S.data_names[e]:e}).each(function(e,t){i(this,e,t)}),(m?b.transition():b).attr("x",a).attr("y",c),_=E.legend.selectAll("rect."+s.legendItemEvent).data(e),(m?_.transition():_).attr("width",function(e){return L[e]}).attr("height",function(e){return P[e]}).attr("x",l).attr("y",d),w=E.legend.selectAll("line."+s.legendItemTile).data(e),(m?w.transition():w).style("stroke",E.color).attr("x1",h).attr("y1",p).attr("x2",f).attr("y2",p),C&&(m?C.transition():C).attr("height",E.getLegendHeight()-12).attr("width",k*(N+1)+10),E.legend.selectAll("."+s.legendItem).classed(s.legendItemHidden,function(e){return!E.isTargetToShow(e)}),E.updateLegendItemWidth(k),E.updateLegendItemHeight(D),E.updateLegendStep(N),E.updateSizes(),E.updateScales(),E.updateSvgSize(),E.transformAll(y,n),E.legendHasRendered=!0},D.initRegion=function(){var e=this;e.region=e.main.append("g").attr("clip-path",e.clipPath).attr("class",s.regions)},D.updateRegion=function(e){var t=this,n=t.config;t.region.style("visibility",t.hasArcType()?"hidden":"visible"),t.mainRegion=t.main.select("."+s.regions).selectAll("."+s.region).data(n.regions),t.mainRegion.enter().append("g").append("rect").style("fill-opacity",0),t.mainRegion.attr("class",t.classRegion.bind(t)),t.mainRegion.exit().transition().duration(e).style("opacity",0).remove()},D.redrawRegion=function(e){var t=this,n=t.mainRegion.selectAll("rect").each(function(){var e=t.d3.select(this.parentNode).datum();t.d3.select(this).datum(e)}),r=t.regionX.bind(t),i=t.regionY.bind(t),o=t.regionWidth.bind(t),a=t.regionHeight.bind(t);return[(e?n.transition():n).attr("x",r).attr("y",i).attr("width",o).attr("height",a).style("fill-opacity",function(e){return h(e.opacity)?e.opacity:.1})]},D.regionX=function(e){var t=this,n=t.config,r="y"===e.axis?t.y:t.y2;return"y"===e.axis||"y2"===e.axis?n.axis_rotated&&"start"in e?r(e.start):0:n.axis_rotated?0:"start"in e?t.x(t.isTimeSeries()?t.parseDate(e.start):e.start):0},D.regionY=function(e){var t=this,n=t.config,r="y"===e.axis?t.y:t.y2;return"y"===e.axis||"y2"===e.axis?n.axis_rotated?0:"end"in e?r(e.end):0:n.axis_rotated&&"start"in e?t.x(t.isTimeSeries()?t.parseDate(e.start):e.start):0},D.regionWidth=function(e){var t,n=this,r=n.config,i=n.regionX(e),o="y"===e.axis?n.y:n.y2;return t="y"===e.axis||"y2"===e.axis?r.axis_rotated&&"end"in e?o(e.end):n.width:r.axis_rotated?n.width:"end"in e?n.x(n.isTimeSeries()?n.parseDate(e.end):e.end):n.width,tr.bar_width_max?r.bar_width_max:i},D.getBars=function(e,t){var n=this;return(t?n.main.selectAll("."+s.bars+n.getTargetSelectorSuffix(t)):n.main).selectAll("."+s.bar+(h(e)?"-"+e:""))},D.expandBars=function(e,t,n){var r=this;n&&r.unexpandBars(),r.getBars(e,t).classed(s.EXPANDED,!0)},D.unexpandBars=function(e){this.getBars(e).classed(s.EXPANDED,!1)},D.generateDrawBar=function(e,t){var n=this,r=n.config,i=n.generateGetBarPoints(e,t);return function(e,t){var n=i(e,t),o=r.axis_rotated?1:0,a=r.axis_rotated?0:1;return"M "+n[0][o]+","+n[0][a]+" L"+n[1][o]+","+n[1][a]+" L"+n[2][o]+","+n[2][a]+" L"+n[3][o]+","+n[3][a]+" z"}},D.generateGetBarPoints=function(e,t){var n=this,r=t?n.subXAxis:n.xAxis,i=e.__max__+1,o=n.getBarW(r,i),a=n.getShapeX(o,i,e,!!t),s=n.getShapeY(!!t),l=n.getShapeOffset(n.isBarType,e,!!t),u=o*(n.config.bar_space/2),c=t?n.getSubYScale:n.getYScale;return function(e,t){var r=c.call(n,e.id)(0),i=l(e,t)||r,d=a(e),h=s(e);return n.config.axis_rotated&&(0=0&&(u+=s(i[a].value)-l))}),u}},D.isWithinShape=function(e,t){var n,r=this,i=r.d3.select(e);return r.isTargetToShow(t.id)?"circle"===e.nodeName?n=r.isStepType(t)?r.isWithinStep(e,r.getYScale(t.id)(t.value)):r.isWithinCircle(e,1.5*r.pointSelectR(t)):"path"===e.nodeName&&(n=!i.classed(s.bar)||r.isWithinBar(e)):n=!1,n},D.getInterpolate=function(e){var t=this,n=t.isInterpolationType(t.config.spline_interpolation_type)?t.config.spline_interpolation_type:"cardinal";return t.isSplineType(e)?n:t.isStepType(e)?t.config.line_step_type:"linear"},D.initLine=function(){this.main.select("."+s.chart).append("g").attr("class",s.chartLines)},D.updateTargetsForLine=function(e){var t,n,r=this,i=r.config,o=r.classChartLine.bind(r),a=r.classLines.bind(r),l=r.classAreas.bind(r),u=r.classCircles.bind(r),c=r.classFocus.bind(r);t=r.main.select("."+s.chartLines).selectAll("."+s.chartLine).data(e).attr("class",function(e){return o(e)+c(e)}),n=t.enter().append("g").attr("class",o).style("opacity",0).style("pointer-events","none"),n.append("g").attr("class",a),n.append("g").attr("class",l),n.append("g").attr("class",function(e){return r.generateClass(s.selectedCircles,e.id)}),n.append("g").attr("class",u).style("cursor",function(e){return i.data_selection_isselectable(e)?"pointer":null}),e.forEach(function(e){r.main.selectAll("."+s.selectedCircles+r.getTargetSelectorSuffix(e.id)).selectAll("."+s.selectedCircle).each(function(t){t.value=e.values[t.index].value})})},D.updateLine=function(e){var t=this;t.mainLine=t.main.selectAll("."+s.lines).selectAll("."+s.line).data(t.lineData.bind(t)),t.mainLine.enter().append("path").attr("class",t.classLine.bind(t)).style("stroke",t.color),t.mainLine.style("opacity",t.initialOpacity.bind(t)).style("shape-rendering",function(e){return t.isStepType(e)?"crispEdges":""}).attr("transform",null),t.mainLine.exit().transition().duration(e).style("opacity",0).remove()},D.redrawLine=function(e,t){return[(t?this.mainLine.transition(Math.random().toString()):this.mainLine).attr("d",e).style("stroke",this.color).style("opacity",1)]},D.generateDrawLine=function(e,t){var n=this,r=n.config,i=n.d3.svg.line(),o=n.generateGetLinePoints(e,t),a=t?n.getSubYScale:n.getYScale,s=function(e){return(t?n.subxx:n.xx).call(n,e)},l=function(e,t){return r.data_groups.length>0?o(e,t)[0][1]:a.call(n,e.id)(e.value)};return i=r.axis_rotated?i.x(l).y(s):i.x(s).y(l),r.line_connectNull||(i=i.defined(function(e){return null!=e.value})),function(e){var o,s=r.line_connectNull?n.filterRemoveNull(e.values):e.values,l=t?n.x:n.subX,u=a.call(n,e.id),c=0,d=0;return n.isLineType(e)?r.data_regions[e.id]?o=n.lineWithRegions(s,l,u,r.data_regions[e.id]):(n.isStepType(e)&&(s=n.convertValuesToStep(s)),o=i.interpolate(n.getInterpolate(e))(s)):(s[0]&&(c=l(s[0].x),d=u(s[0].value)),o=r.axis_rotated?"M "+d+" "+c:"M "+c+" "+d),o||"M 0 0"}},D.generateGetLinePoints=function(e,t){var n=this,r=n.config,i=e.__max__+1,o=n.getShapeX(0,i,e,!!t),a=n.getShapeY(!!t),s=n.getShapeOffset(n.isLineType,e,!!t),l=t?n.getSubYScale:n.getYScale;return function(e,t){var i=l.call(n,e.id)(0),u=s(e,t)||i,c=o(e),d=a(e);return r.axis_rotated&&(00?o(e,t)[0][1]:a.call(n,e.id)(n.getAreaBaseValue(e.id))},u=function(e,t){return r.data_groups.length>0?o(e,t)[1][1]:a.call(n,e.id)(e.value)};return i=r.axis_rotated?i.x0(l).x1(u).y(s):i.x(s).y0(r.area_above?0:l).y1(u),r.line_connectNull||(i=i.defined(function(e){return null!==e.value})),function(e){var t,o=r.line_connectNull?n.filterRemoveNull(e.values):e.values,a=0,s=0;return n.isAreaType(e)?(n.isStepType(e)&&(o=n.convertValuesToStep(o)),t=i.interpolate(n.getInterpolate(e))(o)):(o[0]&&(a=n.x(o[0].x),s=n.getYScale(e.id)(o[0].value)),t=r.axis_rotated?"M "+s+" "+a:"M "+a+" "+s),t||"M 0 0"}},D.getAreaBaseValue=function(){return 0},D.generateGetAreaPoints=function(e,t){var n=this,r=n.config,i=e.__max__+1,o=n.getShapeX(0,i,e,!!t),a=n.getShapeY(!!t),s=n.getShapeOffset(n.isAreaType,e,!!t),l=t?n.getSubYScale:n.getYScale;return function(e,t){var i=l.call(n,e.id)(0),u=s(e,t)||i,c=o(e),d=a(e);return r.axis_rotated&&(00?(e=n.getShapeIndices(n.isLineType),t=n.generateGetLinePoints(e),n.circleY=function(e,n){return t(e,n)[0][1]}):n.circleY=function(e){return n.getYScale(e.id)(e.value)}},D.getCircles=function(e,t){var n=this;return(t?n.main.selectAll("."+s.circles+n.getTargetSelectorSuffix(t)):n.main).selectAll("."+s.circle+(h(e)?"-"+e:""))},D.expandCircles=function(e,t,n){var r=this,i=r.pointExpandedR.bind(r);n&&r.unexpandCircles(),r.getCircles(e,t).classed(s.EXPANDED,!0).attr("r",i)},D.unexpandCircles=function(e){var t=this,n=t.pointR.bind(t);t.getCircles(e).filter(function(){return t.d3.select(this).classed(s.EXPANDED)}).classed(s.EXPANDED,!1).attr("r",n)},D.pointR=function(e){var t=this,n=t.config;return t.isStepType(e)?0:f(n.point_r)?n.point_r(e):n.point_r},D.pointExpandedR=function(e){var t=this,n=t.config;return n.point_focus_expand_enabled?f(n.point_focus_expand_r)?n.point_focus_expand_r(e):n.point_focus_expand_r?n.point_focus_expand_r:1.75*t.pointR(e):t.pointR(e)},D.pointSelectR=function(e){var t=this,n=t.config;return f(n.point_select_r)?n.point_select_r(e):n.point_select_r?n.point_select_r:4*t.pointR(e)},D.isWithinCircle=function(e,t){var n=this.d3,r=n.mouse(e),i=n.select(e),o=+i.attr("cx"),a=+i.attr("cy");return Math.sqrt(Math.pow(o-r[0],2)+Math.pow(a-r[1],2))0?n:320/(e.hasType("gauge")&&!t.gauge_fullCircle?2:1)},D.getCurrentPaddingTop=function(){var e=this,t=e.config,n=h(t.padding_top)?t.padding_top:0;return e.title&&e.title.node()&&(n+=e.getTitlePadding()),n},D.getCurrentPaddingBottom=function(){var e=this.config;return h(e.padding_bottom)?e.padding_bottom:0},D.getCurrentPaddingLeft=function(e){var t=this,n=t.config;return h(n.padding_left)?n.padding_left:n.axis_rotated?n.axis_x_show?Math.max(y(t.getAxisWidthByAxisId("x",e)),40):1:!n.axis_y_show||n.axis_y_inner?t.axis.getYAxisLabelPosition().isOuter?30:1:y(t.getAxisWidthByAxisId("y",e))},D.getCurrentPaddingRight=function(){var e=this,t=e.config,n=e.isLegendRight?e.getLegendWidth()+20:0;return h(t.padding_right)?t.padding_right+1:t.axis_rotated?10+n:!t.axis_y2_show||t.axis_y2_inner?2+n+(e.axis.getY2AxisLabelPosition().isOuter?20:0):y(e.getAxisWidthByAxisId("y2"))+n},D.getParentRectValue=function(e){for(var t,n=this.selectChart.node();n&&"BODY"!==n.tagName;){try{t=n.getBoundingClientRect()[e]}catch(r){"width"===e&&(t=n.offsetWidth)}if(t)break;n=n.parentNode}return t},D.getParentWidth=function(){return this.getParentRectValue("width")},D.getParentHeight=function(){var e=this.selectChart.style("height");return e.indexOf("px")>0?+e.replace("px",""):0},D.getSvgLeft=function(e){var t=this,n=t.config,r=n.axis_rotated||!n.axis_rotated&&!n.axis_y_inner,i=n.axis_rotated?s.axisX:s.axisY,o=t.main.select("."+i).node(),a=o&&r?o.getBoundingClientRect():{right:0},l=t.selectChart.node().getBoundingClientRect(),u=t.hasArcType(),c=a.right-l.left-(u?0:t.getCurrentPaddingLeft(e));return c>0?c:0},D.getAxisWidthByAxisId=function(e,t){var n=this,r=n.axis.getLabelPositionById(e);return n.axis.getMaxTickWidth(e,t)+(r.isInner?20:40)},D.getHorizontalAxisHeight=function(e){var t=this,n=t.config,r=30;return"x"!==e||n.axis_x_show?"x"===e&&n.axis_x_height?n.axis_x_height:"y"!==e||n.axis_y_show?"y2"!==e||n.axis_y2_show?("x"===e&&!n.axis_rotated&&n.axis_x_tick_rotate&&(r=30+t.axis.getMaxTickWidth(e)*Math.cos(Math.PI*(90-n.axis_x_tick_rotate)/180)),"y"===e&&n.axis_rotated&&n.axis_y_tick_rotate&&(r=30+t.axis.getMaxTickWidth(e)*Math.cos(Math.PI*(90-n.axis_y_tick_rotate)/180)),r+(t.axis.getLabelPositionById(e).isInner?0:10)+("y2"===e?-10:0)):t.rotated_padding_top:!n.legend_show||t.isLegendRight||t.isLegendInset?1:10:8},D.getEventRectWidth=function(){return Math.max(0,this.xAxis.tickInterval())},D.initBrush=function(){var e=this,t=e.d3;e.brush=t.svg.brush().on("brush",function(){e.redrawForBrush()}),e.brush.update=function(){return e.context&&e.context.select("."+s.brush).call(this),this},e.brush.scale=function(t){return e.config.axis_rotated?this.y(t):this.x(t)}},D.initSubchart=function(){var e=this,t=e.config,n=e.context=e.svg.append("g").attr("transform",e.getTranslate("context")),r=t.subchart_show?"visible":"hidden";n.style("visibility",r),n.append("g").attr("clip-path",e.clipPathForSubchart).attr("class",s.chart),n.select("."+s.chart).append("g").attr("class",s.chartBars),n.select("."+s.chart).append("g").attr("class",s.chartLines),n.append("g").attr("clip-path",e.clipPath).attr("class",s.brush).call(e.brush),e.axes.subx=n.append("g").attr("class",s.axisX).attr("transform",e.getTranslate("subx")).attr("clip-path",t.axis_rotated?"":e.clipPathForXAxis).style("visibility",t.subchart_axis_x_show?r:"hidden")},D.updateTargetsForSubchart=function(e){var t,n,r,i,o=this,a=o.context,l=o.config,u=o.classChartBar.bind(o),c=o.classBars.bind(o),d=o.classChartLine.bind(o),h=o.classLines.bind(o),f=o.classAreas.bind(o);l.subchart_show&&(i=a.select("."+s.chartBars).selectAll("."+s.chartBar).data(e).attr("class",u),r=i.enter().append("g").style("opacity",0).attr("class",u),r.append("g").attr("class",c),n=a.select("."+s.chartLines).selectAll("."+s.chartLine).data(e).attr("class",d),t=n.enter().append("g").style("opacity",0).attr("class",d),t.append("g").attr("class",h),t.append("g").attr("class",f),a.selectAll("."+s.brush+" rect").attr(l.axis_rotated?"width":"height",l.axis_rotated?o.width2:o.height2))},D.updateBarForSubchart=function(e){var t=this;t.contextBar=t.context.selectAll("."+s.bars).selectAll("."+s.bar).data(t.barData.bind(t)),t.contextBar.enter().append("path").attr("class",t.classBar.bind(t)).style("stroke","none").style("fill",t.color),t.contextBar.style("opacity",t.initialOpacity.bind(t)),t.contextBar.exit().transition().duration(e).style("opacity",0).remove()},D.redrawBarForSubchart=function(e,t,n){(t?this.contextBar.transition(Math.random().toString()).duration(n):this.contextBar).attr("d",e).style("opacity",1)},D.updateLineForSubchart=function(e){var t=this;t.contextLine=t.context.selectAll("."+s.lines).selectAll("."+s.line).data(t.lineData.bind(t)),t.contextLine.enter().append("path").attr("class",t.classLine.bind(t)).style("stroke",t.color),t.contextLine.style("opacity",t.initialOpacity.bind(t)),t.contextLine.exit().transition().duration(e).style("opacity",0).remove()},D.redrawLineForSubchart=function(e,t,n){(t?this.contextLine.transition(Math.random().toString()).duration(n):this.contextLine).attr("d",e).style("opacity",1)},D.updateAreaForSubchart=function(e){var t=this,n=t.d3;t.contextArea=t.context.selectAll("."+s.areas).selectAll("."+s.area).data(t.lineData.bind(t)),t.contextArea.enter().append("path").attr("class",t.classArea.bind(t)).style("fill",t.color).style("opacity",function(){return t.orgAreaOpacity=+n.select(this).style("opacity"),0}),t.contextArea.style("opacity",0),t.contextArea.exit().transition().duration(e).style("opacity",0).remove()},D.redrawAreaForSubchart=function(e,t,n){(t?this.contextArea.transition(Math.random().toString()).duration(n):this.contextArea).attr("d",e).style("fill",this.color).style("opacity",this.orgAreaOpacity)},D.redrawSubchart=function(e,t,n,r,i,o,a){var s,l,u,c=this,d=c.d3,h=c.config;c.context.style("visibility",h.subchart_show?"visible":"hidden"),h.subchart_show&&(d.event&&"zoom"===d.event.type&&c.brush.extent(c.x.orgDomain()).update(),e&&(c.brush.empty()||c.brush.extent(c.x.orgDomain()).update(),s=c.generateDrawArea(i,!0),l=c.generateDrawBar(o,!0),u=c.generateDrawLine(a,!0),c.updateBarForSubchart(n),c.updateLineForSubchart(n),c.updateAreaForSubchart(n),c.redrawBarForSubchart(l,n,n),c.redrawLineForSubchart(u,n,n),c.redrawAreaForSubchart(s,n,n)))},D.redrawForBrush=function(){var e=this,t=e.x;e.redraw({withTransition:!1,withY:e.config.zoom_rescale,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),e.config.subchart_onbrush.call(e.api,t.orgDomain())},D.transformContext=function(e,t){var n,r=this;t&&t.axisSubX?n=t.axisSubX:(n=r.context.select("."+s.axisX),e&&(n=n.transition())),r.context.attr("transform",r.getTranslate("context")),n.attr("transform",r.getTranslate("subx"))},D.getDefaultExtent=function(){var e=this,t=e.config,n=f(t.axis_x_extent)?t.axis_x_extent(e.getXDomain(e.data.targets)):t.axis_x_extent;return e.isTimeSeries()&&(n=[e.parseDate(n[0]),e.parseDate(n[1])]),n},D.initText=function(){var e=this;e.main.select("."+s.chart).append("g").attr("class",s.chartTexts),e.mainText=e.d3.selectAll([])},D.updateTargetsForText=function(e){var t,n,r=this,i=r.classChartText.bind(r),o=r.classTexts.bind(r),a=r.classFocus.bind(r);t=r.main.select("."+s.chartTexts).selectAll("."+s.chartText).data(e).attr("class",function(e){return i(e)+a(e)}),n=t.enter().append("g").attr("class",i).style("opacity",0).style("pointer-events","none"),n.append("g").attr("class",o)},D.updateText=function(e){var t=this,n=t.config,r=t.barOrLineData.bind(t),i=t.classText.bind(t);t.mainText=t.main.selectAll("."+s.texts).selectAll("."+s.text).data(r),t.mainText.enter().append("text").attr("class",i).attr("text-anchor",function(e){return n.axis_rotated?e.value<0?"end":"start":"middle"}).style("stroke","none").style("fill",function(e){return t.color(e)}).style("fill-opacity",0),t.mainText.text(function(e,n,r){return t.dataLabelFormat(e.id)(e.value,e.id,n,r)}),t.mainText.exit().transition().duration(e).style("fill-opacity",0).remove()},D.redrawText=function(e,t,n,r){return[(r?this.mainText.transition():this.mainText).attr("x",e).attr("y",t).style("fill",this.color).style("fill-opacity",n?0:this.opacityForText.bind(this))]},D.getTextRect=function(e,t,n){var r,i=this.d3.select("body").append("div").classed("c3",!0),o=i.append("svg").style("visibility","hidden").style("position","fixed").style("top",0).style("left",0),a=this.d3.select(n).style("font");return o.selectAll(".dummy").data([e]).enter().append("text").classed(t||"",!0).style("font",a).text(e).each(function(){r=this.getBoundingClientRect()}),i.remove(),r},D.generateXYForText=function(e,t,n,r){var i=this,o=i.generateGetAreaPoints(e,!1),a=i.generateGetBarPoints(t,!1),s=i.generateGetLinePoints(n,!1),l=r?i.getXForText:i.getYForText;return function(e,t){var n=i.isAreaType(e)?o:i.isBarType(e)?a:s;return l.call(i,n(e,t),e,this)}},D.getXForText=function(e,t,n){var r,i,o=this,a=n.getBoundingClientRect();return o.config.axis_rotated?(i=o.isBarType(t)?4:6,r=e[2][1]+i*(t.value<0?-1:1)):r=o.hasType("bar")?(e[2][0]+e[0][0])/2:e[0][0],null===t.value&&(r>o.width?r=o.width-a.width:r<0&&(r=4)),r},D.getYForText=function(e,t,n){var r,i=this,o=n.getBoundingClientRect();return i.config.axis_rotated?r=(e[0][0]+e[2][0]+.6*o.height)/2:(r=e[2][1],t.value<0||0===t.value&&!i.hasPositiveValue?(r+=o.height,i.isBarType(t)&&i.isSafari()?r-=3:!i.isBarType(t)&&i.isChrome()&&(r+=3)):r+=i.isBarType(t)?-3:-6),null!==t.value||i.config.axis_rotated||(rthis.height&&(r=this.height-4)),r},D.initTitle=function(){var e=this;e.title=e.svg.append("text").text(e.config.title_text).attr("class",e.CLASS.title)},D.redrawTitle=function(){var e=this;e.title.attr("x",e.xForTitle.bind(e)).attr("y",e.yForTitle.bind(e))},D.xForTitle=function(){var e=this,t=e.config,n=t.title_position||"left";return n.indexOf("right")>=0?e.currentWidth-e.getTextRect(e.title.node().textContent,e.CLASS.title,e.title.node()).width-t.title_padding.right:n.indexOf("center")>=0?(e.currentWidth-e.getTextRect(e.title.node().textContent,e.CLASS.title,e.title.node()).width)/2:t.title_padding.left},D.yForTitle=function(){var e=this;return e.config.title_padding.top+e.getTextRect(e.title.node().textContent,e.CLASS.title,e.title.node()).height},D.getTitlePadding=function(){var e=this;return e.yForTitle()+e.config.title_padding.bottom},D.initTooltip=function(){var e,t=this,n=t.config;if(t.tooltip=t.selectChart.style("position","relative").append("div").attr("class",s.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none"),n.tooltip_init_show){if(t.isTimeSeries()&&g(n.tooltip_init_x)){for(n.tooltip_init_x=t.parseDate(n.tooltip_init_x),e=0;e"+(a||0===a?""+a+"":"")),void 0!==(s=S(p(e[o].value,e[o].ratio,e[o].id,e[o].index,e))))){if(null===e[o].name)continue;l=S(f(e[o].name,e[o].ratio,e[o].id,e[o].index)),u=c.levelColor?c.levelColor(e[o].value):r(e[o].id),i+="",i+=""+l+"",i+=""+s+"",i+=""}return i+""},D.tooltipPosition=function(e,t,n,r){var i,o,a,s,l,u=this,c=u.config,d=u.d3,h=u.hasArcType(),f=d.mouse(r);return h?(o=(u.width-(u.isLegendRight?u.getLegendWidth():0))/2+f[0],s=u.height/2+f[1]+20):(i=u.getSvgLeft(!0),c.axis_rotated?(o=i+f[0]+100,a=o+t,l=u.currentWidth-u.getCurrentPaddingRight(),s=u.x(e[0].x)+20):(o=i+u.getCurrentPaddingLeft(!0)+u.x(e[0].x)+20,a=o+t,l=i+u.currentWidth-u.getCurrentPaddingRight(),s=f[1]+15),a>l&&(o-=a-l+20),s+n>u.currentHeight&&(s-=n+30)),s<0&&(s=0),{top:s,left:o}},D.showTooltip=function(e,t){var n,r,i,o=this,a=o.config,s=o.hasArcType(),l=e.filter(function(e){return e&&h(e.value)}),u=a.tooltip_position||D.tooltipPosition;0!==l.length&&a.tooltip_show&&(o.tooltip.html(a.tooltip_contents.call(o,e,o.axis.getXAxisTickFormat(),o.getYFormat(s),o.color)).style("display","block"),n=o.tooltip.property("offsetWidth"),r=o.tooltip.property("offsetHeight"),i=u.call(this,l,n,r,t),o.tooltip.style("top",i.top+"px").style("left",i.left+"px"))},D.hideTooltip=function(){this.tooltip.style("display","none")},D.setTargetType=function(e,t){var n=this,r=n.config;n.mapToTargetIds(e).forEach(function(e){n.withoutFadeIn[e]=t===r.data_types[e],r.data_types[e]=t}),e||(r.data_type=t)},D.hasType=function(e,t){var n=this,r=n.config.data_types,i=!1;return t=t||n.data.targets,t&&t.length?t.forEach(function(t){var n=r[t.id];(n&&n.indexOf(e)>=0||!n&&"line"===e)&&(i=!0)}):Object.keys(r).length?Object.keys(r).forEach(function(t){r[t]===e&&(i=!0)}):i=n.config.data_type===e,i},D.hasArcType=function(e){return this.hasType("pie",e)||this.hasType("donut",e)||this.hasType("gauge",e)},D.isLineType=function(e){var t=this.config,n=g(e)?e:e.id;return!t.data_types[n]||["line","spline","area","area-spline","step","area-step"].indexOf(t.data_types[n])>=0},D.isStepType=function(e){var t=g(e)?e:e.id;return["step","area-step"].indexOf(this.config.data_types[t])>=0},D.isSplineType=function(e){var t=g(e)?e:e.id;return["spline","area-spline"].indexOf(this.config.data_types[t])>=0},D.isAreaType=function(e){var t=g(e)?e:e.id;return["area","area-spline","area-step"].indexOf(this.config.data_types[t])>=0},D.isBarType=function(e){var t=g(e)?e:e.id;return"bar"===this.config.data_types[t]},D.isScatterType=function(e){var t=g(e)?e:e.id;return"scatter"===this.config.data_types[t]},D.isPieType=function(e){var t=g(e)?e:e.id;return"pie"===this.config.data_types[t]},D.isGaugeType=function(e){var t=g(e)?e:e.id;return"gauge"===this.config.data_types[t]},D.isDonutType=function(e){var t=g(e)?e:e.id;return"donut"===this.config.data_types[t]},D.isArcType=function(e){return this.isPieType(e)||this.isDonutType(e)||this.isGaugeType(e)},D.lineData=function(e){return this.isLineType(e)?[e]:[]},D.arcData=function(e){return this.isArcType(e.data)?[e]:[]},D.barData=function(e){return this.isBarType(e)?e.values:[]},D.lineOrScatterData=function(e){return this.isLineType(e)||this.isScatterType(e)?e.values:[]},D.barOrLineData=function(e){return this.isBarType(e)||this.isLineType(e)?e.values:[]},D.isInterpolationType=function(e){return["linear","linear-closed","basis","basis-open","basis-closed","bundle","cardinal","cardinal-open","cardinal-closed","monotone"].indexOf(e)>=0},D.isSafari=function(){var e=window.navigator.userAgent;return e.indexOf("Safari")>=0&&e.indexOf("Chrome")<0},D.isChrome=function(){return window.navigator.userAgent.indexOf("Chrome")>=0},D.initZoom=function(){var e,t=this,n=t.d3,r=t.config;t.zoom=n.behavior.zoom().on("zoomstart",function(){e=n.event.sourceEvent,t.zoom.altDomain=n.event.sourceEvent.altKey?t.x.orgDomain():null,r.zoom_onzoomstart.call(t.api,n.event.sourceEvent)}).on("zoom",function(){t.redrawForZoom.call(t)}).on("zoomend",function(){var i=n.event.sourceEvent;i&&e.clientX===i.clientX&&e.clientY===i.clientY||(t.redrawEventRect(),t.updateZoom(),r.zoom_onzoomend.call(t.api,t.x.orgDomain()))}),t.zoom.scale=function(e){return r.axis_rotated?this.y(e):this.x(e)},t.zoom.orgScaleExtent=function(){var e=r.zoom_extent?r.zoom_extent:[1,10];return[e[0],Math.max(t.getMaxDataCount()/e[1],e[1])]},t.zoom.updateScaleExtent=function(){var e=_(t.x.orgDomain())/_(t.getZoomDomain()),n=this.orgScaleExtent();return this.scaleExtent([n[0]*e,n[1]*e]),this}},D.getZoomDomain=function(){var e=this,t=e.config,n=e.d3;return[n.min([e.orgXDomain[0],t.zoom_x_min]),n.max([e.orgXDomain[1],t.zoom_x_max])]},D.updateZoom=function(){var e=this,t=e.config.zoom_enabled?e.zoom:function(){};e.main.select("."+s.zoomRect).call(t).on("dblclick.zoom",null),e.main.selectAll("."+s.eventRect).call(t).on("dblclick.zoom",null)},D.redrawForZoom=function(){var e=this,t=e.d3,n=e.config,r=e.zoom,i=e.x;if(n.zoom_enabled&&0!==e.filterTargetsToShow(e.data.targets).length){if("mousemove"===t.event.sourceEvent.type&&r.altDomain)return i.domain(r.altDomain),void r.scale(i).updateScaleExtent();e.isCategorized()&&i.orgDomain()[0]===e.orgXDomain[0]&&i.domain([e.orgXDomain[0]-1e-10,i.orgDomain()[1]]),e.redraw({withTransition:!1,withY:n.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),"mousemove"===t.event.sourceEvent.type&&(e.cancelClick=!0),n.zoom_onzoom.call(e.api,i.orgDomain())}},T})},function(e,exports,t){var n=t(641);"string"==typeof n&&(n=[[e.i,n,""]]);var r={};r.transform=void 0;t(15)(n,r);n.locals&&(e.exports=n.locals)},function(e,exports,t){exports=e.exports=t(14)(void 0),exports.push([e.i,".donotshowcircles circle{display:none}",""])},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(13),l=a.default.createClass({displayName:"CountWidgetCreateConfiguration",propTypes:{config:i.default.object.isRequired,onChange:i.default.func.isRequired},getInitialConfiguration:function(){return{trend:!1,lower_is_better:!1}},render:function(){return a.default.createElement("fieldset",null,a.default.createElement(s.Input,{key:"trend",type:"checkbox",id:"count-trend",name:"trend",label:"Display trend",checked:this.props.config.trend,onChange:this.props.onChange,help:"Show trend information for this number."}),a.default.createElement(s.Input,{key:"lowerIsBetter",type:"checkbox",id:"count-lower-is-better",name:"lower_is_better",label:"Lower is better",disabled:!1===this.props.config.trend,checked:this.props.config.lower_is_better,onChange:this.props.onChange,help:"Use green colour when trend goes down."}))}});exports.default=l,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(13),l=t(44),u=a.default.createClass({displayName:"CountWidgetEditConfiguration",propTypes:{config:i.default.object.isRequired,onChange:i.default.func.isRequired,showQueryConfig:i.default.bool},getDefaultProps:function(){return{showQueryConfig:!0}},render:function(){return a.default.createElement("fieldset",null,this.props.showQueryConfig&&a.default.createElement(l.QueryConfiguration,this.props),a.default.createElement(s.Input,{key:"trend",type:"checkbox",id:"count-trend",name:"trend",label:"Display trend",defaultChecked:this.props.config.trend,onChange:this.props.onChange,help:"Show trend information for this number."}),a.default.createElement(s.Input,{key:"lowerIsBetter",type:"checkbox",id:"count-lower-is-better",name:"lower_is_better",label:"Lower is better",disabled:!1===this.props.config.trend,defaultChecked:this.props.config.lower_is_better,onChange:this.props.onChange,help:"Use green colour when trend goes down."}))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(13),l=t(44),u=t(9),c=n(u),d=c.default.getStore("FieldGraphs"),h=a.default.createClass({displayName:"FieldChartWidgetConfiguration",propTypes:{config:i.default.object.isRequired,onChange:i.default.func.isRequired},render:function(){return a.default.createElement("fieldset",null,a.default.createElement(l.QueryConfiguration,this.props),a.default.createElement(s.Input,{key:"fieldChartStatisticalFunction",id:"chart-statistical-function",name:"valuetype",type:"select",label:"Statistical function",defaultValue:this.props.config.valuetype,onChange:this.props.onChange,help:"Statistical function applied to the data."},d.constructor.FUNCTIONS.keySeq().map(function(e){return a.default.createElement("option",{key:e,value:e},d.constructor.FUNCTIONS.get(e))})))}});exports.default=h,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(13),l=a.default.createClass({displayName:"QueryConfiguration",propTypes:{config:i.default.object.isRequired,onChange:i.default.func.isRequired},render:function(){return a.default.createElement(s.Input,{type:"text",key:"query",id:"query",name:"query",label:"Search query",defaultValue:this.props.config.query,onChange:this.props.onChange,help:"Search query that will be executed to get the widget value."})}});exports.default=l,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(13),u=t(11),c=a.default.createClass({displayName:"QuickValuesConfiguration",propTypes:{config:i.default.object.isRequired,onChange:i.default.func.isRequired,isHistogram:i.default.bool},getDefaultProps:function(){return{isHistogram:!1}},_onStackedFieldChange:function(e){this.props.onChange("stacked_fields",e)},render:function(){var e=void 0;return this.props.isHistogram||(e=a.default.createElement(l.Input,{type:"number",id:"data_table_limit",name:"data_table_limit",label:"Total table size",required:!0,onChange:this.props.onChange,value:this.props.config.data_table_limit})),a.default.createElement("div",null,a.default.createElement(l.Input,{type:"number",id:"limit",name:"limit",label:"Number of top/bottom values",required:!0,onChange:this.props.onChange,value:this.props.config.limit}),e,a.default.createElement(s.FormGroup,null,a.default.createElement(s.ControlLabel,null,"Sort options"),a.default.createElement(l.Input,{type:"radio",name:"sort_order",label:"Top values",checked:"desc"===this.props.config.sort_order,value:"desc",onChange:this.props.onChange}),a.default.createElement(l.Input,{type:"radio",name:"sort_order",label:"Bottom values",checked:"asc"===this.props.config.sort_order,value:"asc",onChange:this.props.onChange})),a.default.createElement(s.FormGroup,null,a.default.createElement(s.ControlLabel,null,"Stacked fields"),a.default.createElement(u.MultiSelect,{allowCreate:!0,value:this.props.config.stacked_fields,onChange:this._onStackedFieldChange})))}});exports.default=c,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(13),l=a.default.createClass({displayName:"QuickValuesWidgetCreateConfiguration",propTypes:{config:i.default.object.isRequired,onChange:i.default.func.isRequired},getInitialConfiguration:function(){return{show_pie_chart:!0,show_data_table:!0}},render:function(){return a.default.createElement("fieldset",null,a.default.createElement(s.Input,{key:"showPieChart",type:"checkbox",id:"quickvalues-show-pie-chart",name:"show_pie_chart",label:"Show pie chart",checked:this.props.config.show_pie_chart,onChange:this.props.onChange,help:"Include a pie chart representation of the data."}),a.default.createElement(s.Input,{key:"showDataTable",type:"checkbox",id:"quickvalues-show-data-table",name:"show_data_table",label:"Show data table",checked:this.props.config.show_data_table,onChange:this.props.onChange,help:"Include a table with quantitative information."}))}});exports.default=l,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(13),l=t(44),u=a.default.createClass({displayName:"QuickValuesWidgetEditConfiguration",propTypes:{config:i.default.object.isRequired,onChange:i.default.func.isRequired},render:function(){return a.default.createElement("fieldset",null,a.default.createElement(l.QueryConfiguration,this.props),a.default.createElement(l.QuickValuesConfiguration,this.props),a.default.createElement(s.Input,{key:"showPieChart",type:"checkbox",id:"quickvalues-show-pie-chart",name:"show_pie_chart",label:"Show pie chart",defaultChecked:this.props.config.show_pie_chart,onChange:this.props.onChange,help:"Represent data in a pie chart"}),a.default.createElement(s.Input,{key:"showDataTable",type:"checkbox",id:"quickvalues-show-data-table",name:"show_data_table",label:"Show data table",defaultChecked:this.props.config.show_data_table,onChange:this.props.onChange,help:"Include a table with quantitative information."}))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=a.default.createClass({displayName:"QuickValuesHistogramWidgetCreateConfiguration",propTypes:{config:i.default.object.isRequired,onChange:i.default.func.isRequired},getInitialConfiguration:function(){return{}},render:function(){return null}});exports.default=s,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t0&&t.isEmpty()?a.default.createElement("div",null,"No dashboards matched your filter criteria."):a.default.createElement(E.default,{dashboards:t,onDashboardAdd:this._onDashboardAdd,permissions:this.props.permissions}):a.default.createElement(_.default,null),a.default.createElement("div",null,r,a.default.createElement(c.Row,{className:"content"},a.default.createElement(c.Col,{md:12},i)))}});exports.default=T,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(12),i=n(r),o=t(1),a=n(o),s=t(0),l=n(s),u=t(13),c=t(46),d=n(c),h=t(25),f=n(h),p=f.default.get("Dashboards"),g=p.DashboardsActions,m=l.default.createClass({displayName:"EditDashboardModal",propTypes:{action:a.default.oneOf(["create","edit"]),description:a.default.string,id:a.default.string,onSaved:a.default.func,title:a.default.string},getInitialState:function(){return{id:this.props.id,description:this.props.description,title:this.props.title}},getDefaultProps:function(){return{action:"create"}},render:function(){return l.default.createElement(d.default,{ref:"modal",title:this._isCreateModal()?"New Dashboard":"Edit Dashboard "+this.props.title,onSubmitForm:this._save,submitButtonText:"Save"},l.default.createElement("fieldset",null,l.default.createElement(u.Input,{id:this.props.id+"-title",type:"text",label:"Title:",onChange:this._onTitleChange,value:this.state.title,autoFocus:!0,required:!0}),l.default.createElement(u.Input,{type:"text",label:"Description:",name:"Description",onChange:this._onDescriptionChange,value:this.state.description,required:!0})))},close:function(){this.refs.modal.close()},open:function(){this.refs.modal.open()},_save:function(){var e=this,t=void 0;this._isCreateModal()?(t=g.create(this.state.title,this.state.description),t.then(function(t){e.close(),"function"==typeof e.props.onSaved&&e.props.onSaved(t),e.setState(e.getInitialState())})):(t=g.update(this.state),t.then(function(){e.close();var t='[data-dashboard-id="'+e.state.id+'"]',n=(0,i.default)(t+".dashboard-title");n.length>0&&n.html(e.state.title);var r=(0,i.default)(t+".dashboard-description");r.length>0&&r.html(e.state.description),"function"==typeof e.props.onSaved&&e.props.onSaved(e.state.id)}))},_onDescriptionChange:function(e){this.setState({description:e.target.value})},_onTitleChange:function(e){this.setState({title:e.target.value})},_isCreateModal:function(){return"create"===this.props.action}});exports.default=m,e.exports=exports.default},function(e,exports,t){var n=t(657);"string"==typeof n&&(n=[[e.i,n,""]]);var r={};r.transform=void 0;t(15)(n,r);n.locals&&(e.exports=n.locals)},function(e,exports,t){exports=e.exports=t(14)(void 0),exports.push([e.i,"._3BM_lovzelMqd7zmjZD_va .btn,._3BM_lovzelMqd7zmjZD_va .btn-group,._3BM_lovzelMqd7zmjZD_va .input-group{float:none}._3BM_lovzelMqd7zmjZD_va>.btn-group:not(:first-child),._3BM_lovzelMqd7zmjZD_va>.btn:not(:first-child),._3BM_lovzelMqd7zmjZD_va>.input-group:not(:first-child){margin-left:10px}",""]),exports.locals={toolbar:"_3BM_lovzelMqd7zmjZD_va"}},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(659),l=a.default.createClass({displayName:"ChangedMessageField",propTypes:{fieldName:i.default.string.isRequired,originalValue:i.default.string,newValue:i.default.string},getDefaultProps:function(){return{originalField:void 0,newField:void 0}},render:function(){return a.default.createElement("span",null,a.default.createElement("dt",null,this.props.fieldName),a.default.createElement("dd",{className:s["field-value"]},a.default.createElement("span",{className:s["removed-fields"]},this.props.originalValue),a.default.createElement("span",{className:s["added-fields"]},this.props.newValue)))}});exports.default=l,e.exports=exports.default},function(e,exports,t){var n=t(660);"string"==typeof n&&(n=[[e.i,n,""]]);var r={};r.transform=void 0;t(15)(n,r);n.locals&&(e.exports=n.locals)},function(e,exports,t){exports=e.exports=t(14)(void 0),exports.push([e.i,"._3t4gaHCWJSXYTQSGIS197M{background-color:#dff0d8;color:#3c763d;display:table}._3vB7sxibhaB18pTo-gEdZE{background-color:#f2dede;color:#a94442;display:table;text-decoration:line-through}._9G4lPcfMEdPWBcKAR_5xG{background-color:#d9edf7;color:#31708f;display:table;text-decoration:line-through}._29Jy5rI9MlHWaAv7leZSmd{font-family:monospace}",""]),exports.locals={"added-fields":"_3t4gaHCWJSXYTQSGIS197M","removed-fields":"_3vB7sxibhaB18pTo-gEdZE","mutated-fields":"_9G4lPcfMEdPWBcKAR_5xG","field-value":"_29Jy5rI9MlHWaAv7leZSmd"}},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(52),l=n(s),u=a.default.createClass({displayName:"DecoratedMessageFieldMarker",propTypes:{className:i.default.string},render:function(){var e=[l.default.decoratorMarker];return this.props.className&&e.push(this.props.className),a.default.createElement("small",{className:e.join(" ")},"(decorated)")}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(13),l=t(29),u=t(52),c=n(u),d=a.default.createClass({displayName:"DecoratedSidebarMessageField",propTypes:{field:i.default.object,onToggled:i.default.func,selected:i.default.bool},render:function(){var e=this,t=a.default.createElement("span",null,this.props.field.name);return a.default.createElement("li",null,a.default.createElement("div",{className:"pull-left"}),a.default.createElement("div",{className:"field-selector"},a.default.createElement(s.Input,{type:"checkbox",label:t,groupClassName:c.default.decoratorFieldWrapper,checked:this.props.selected,onChange:function(){return e.props.onToggled(e.props.field.name)}}),a.default.createElement(l.DecoratedMessageFieldMarker,{className:c.default.decoratorMarkerSidebar})))}});exports.default=d,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(2),l=n(s),u=t(3),c=t(11),d=t(51),h=t(9),f=n(h),p=t(6),g=n(p),m=t(36),v=n(m),y=t(52),b=n(y),_=f.default.getStore("Decorators"),w=f.default.getStore("CurrentUser"),C=g.default.getActions("Decorators"),A=a.default.createClass({displayName:"Decorator",propTypes:{decorator:i.default.object.isRequired,typeDefinition:i.default.object.isRequired},mixins:[l.default.connect(_),l.default.connect(w),v.default],componentDidMount:function(){C.available()},_handleDeleteClick:function(){window.confirm("Do you really want to delete this decorator?")&&C.remove(this.props.decorator.id)},_handleEditClick:function(){this.refs.editForm.open()},_handleSubmit:function(e){C.update(this.props.decorator.id,{type:e.type,config:e.configuration,order:this.props.decorator.order,stream:this.props.decorator.stream})},_decoratorTypeNotPresent:function(){return{name:"Unknown decorator type"}},_resolveConfigurationIds:function(e){var t=this.props.typeDefinition.requested_configuration,n={};return Object.keys(e).forEach(function(r){var i=t[r]?t[r].additional_info.values:void 0,o=e[r];i&&i[o]&&(n[r]=i[o])}),Object.assign({},e,n)},_formatActionsMenu:function(){var e=this.state.currentUser.permissions,t=this.props.decorator,n=this.isPermitted(e,"decorators:edit:"+t.stream);return a.default.createElement(u.DropdownButton,{id:"decorator-"+t.id+"-actions",bsStyle:"default",bsSize:"xsmall",title:"Actions",pullRight:!0},a.default.createElement(u.MenuItem,{onSelect:this._handleEditClick,disabled:!n},"Edit"),a.default.createElement(u.MenuItem,{divider:!0}),a.default.createElement(u.MenuItem,{onSelect:this._handleDeleteClick,disabled:!n},"Delete"))},render:function(){if(!this.state.types||!this.state.currentUser)return a.default.createElement(c.Spinner,null);var e=this.props.decorator,t=this._resolveConfigurationIds(e.config),n=this.state.types[e.type]||this._decoratorTypeNotPresent(),r=this._formatActionsMenu();return a.default.createElement("span",{className:b.default.fullWidth},a.default.createElement("div",{className:b.default.decoratorBox},a.default.createElement("h6",{className:b.default.decoratorType},n.name),r),a.default.createElement(d.ConfigurationWell,{key:"configuration-well-decorator-"+e.id,id:e.id,configuration:t,typeDefinition:this.props.typeDefinition}),a.default.createElement(d.ConfigurationForm,{ref:"editForm",key:"configuration-form-decorator",configFields:this.props.typeDefinition.requested_configuration,title:"Edit "+this.props.typeDefinition.name,typeName:e.type,includeTitleField:!1,submitAction:this._handleSubmit,cancelAction:this._handleCancel,values:e.config}))}});exports.default=A,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(11),u=t(52),c=n(u),d=a.default.createClass({displayName:"DecoratorList",propTypes:{decorators:i.default.arrayOf(i.default.object).isRequired,disableDragging:i.default.bool,onReorder:i.default.func},_onReorderWrapper:function(){if(this.props.onReorder){var e;(e=this.props).onReorder.apply(e,arguments)}},render:function(){return this.props.decorators&&0!==this.props.decorators.length?a.default.createElement(l.SortableList,{items:this.props.decorators,onMoveItem:this._onReorderWrapper,disableDragging:this.props.disableDragging}):a.default.createElement(s.Alert,{bsStyle:"info",className:c.default.noDecoratorsAlert},a.default.createElement("i",{className:"fa fa-info-circle"})," No decorators configured.")}});exports.default=d,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(17),l=n(s),u=t(2),c=n(u),d=t(3),h=t(11),f=t(29),p=t(30),g=n(p),m=t(27),v=n(m),y=t(36),b=n(y),_=t(9),w=n(_),C=t(6),A=n(C),E=t(52),S=n(E),x=w.default.getStore("Decorators"),F=w.default.getStore("CurrentUser"),k=A.default.getActions("Decorators"),D=a.default.createClass({displayName:"DecoratorSidebar",propTypes:{stream:i.default.string,maximumHeight:i.default.number},mixins:[c.default.connect(x),c.default.connect(F),b.default],getInitialState:function(){return{maxDecoratorsHeight:1e3}},componentDidMount:function(){this._updateHeight(),window.addEventListener("scroll",this._updateHeight)},componentDidUpdate:function(e){this.props.maximumHeight!==e.maximumHeight&&this._updateHeight()},componentWillUnmount:function(){window.removeEventListener("scroll",this._updateHeight)},MINIMUM_DECORATORS_HEIGHT:50,_updateHeight:function(){var e=l.default.findDOMNode(this.refs.decoratorsContainer),t=this.props.maximumHeight-e.getBoundingClientRect().top;this.setState({maxDecoratorsHeight:Math.max(t,this.MINIMUM_DECORATORS_HEIGHT)})},_formatDecorator:function(e){var t=this.state.types[e.type]||{requested_configuration:{},name:"Unknown type: "+e.type};return{id:e.id,title:a.default.createElement(f.Decorator,{key:"decorator-"+e.id,decorator:e,typeDefinition:t})}},_updateOrder:function(e){var t=this;e.forEach(function(e,n){var r=t.state.decorators.find(function(t){return t.id===e.id});r.order=n,k.update(r.id,r)})},render:function(){var e=this;if(!this.state.decorators)return a.default.createElement(h.Spinner,null);var t=this.state.decorators.filter(function(t){return e.props.stream?t.stream===e.props.stream:!t.stream}).sort(function(e,t){return e.order-t.order}),n=t.length>0?t[t.length-1].order+1:0,r=t.map(this._formatDecorator),i=a.default.createElement(d.Popover,{id:"decorators-help",className:S.default.helpPopover},a.default.createElement("p",{className:"description"},"Decorators can modify messages shown in the search results on the fly. These changes are not stored, but only shown in the search results. Decorator config is stored ",a.default.createElement("strong",null,"per stream"),"."),a.default.createElement("p",{className:"description"},"Use drag and drop to modify the order in which decorators are processed."),a.default.createElement("p",null,"Read more about message decorators in the ",a.default.createElement(g.default,{page:v.default.PAGES.DECORATORS,text:"documentation"}),".")),o=this.isPermitted(this.state.currentUser.permissions,"decorators:edit:"+this.props.stream);return a.default.createElement("div",null,a.default.createElement(f.AddDecoratorButton,{stream:this.props.stream,nextOrder:n,disabled:!o}),a.default.createElement("div",{className:S.default.helpLinkContainer},a.default.createElement(d.OverlayTrigger,{trigger:"click",rootClose:!0,placement:"right",overlay:i},a.default.createElement(d.Button,{bsStyle:"link",className:S.default.helpLink},"What are message decorators?"))),a.default.createElement("div",{ref:"decoratorsContainer",className:S.default.decoratorListContainer,style:{maxHeight:this.state.maxDecoratorsHeight}},a.default.createElement(f.DecoratorList,{decorators:r,onReorder:this._updateOrder,disableDragging:!o})))}});exports.default=D,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(17),l=n(s),u=t(13),c=t(29),d=a.default.createClass({displayName:"FieldAnalyzersSidebar",propTypes:{fields:i.default.array,fieldAnalyzers:i.default.array,onFieldAnalyzer:i.default.func,onFieldToggled:i.default.func,maximumHeight:i.default.number,predefinedFieldSelection:i.default.func,result:i.default.object,searchConfig:i.default.object.isRequired,selectedFields:i.default.object,shouldHighlight:i.default.bool,showAllFields:i.default.bool,showHighlightToggle:i.default.bool,togglePageFields:i.default.func,toggleShouldHighlight:i.default.func},getInitialState:function(){return{fieldFilter:"",maxFieldsHeight:1e3}},componentDidMount:function(){this._updateHeight(),window.addEventListener("scroll",this._updateHeight)},componentDidUpdate:function(e){this.props.showAllFields===e.showAllFields&&this.props.maximumHeight===e.maximumHeight||this._updateHeight()},componentWillUnmount:function(){window.removeEventListener("scroll",this._updateHeight)},MINIMUM_FIELDS_HEIGHT:50,_updateHeight:function(){var e=l.default.findDOMNode(this.refs.fields),t=l.default.findDOMNode(this.refs.footer),n=window.getComputedStyle(t),r=parseFloat(n.getPropertyValue("margin-top")),i=0;if(this.refs.highlightToggle){var o=l.default.findDOMNode(this.refs.highlightToggle),a=window.getComputedStyle(o);i=parseFloat(a.getPropertyValue("margin-top"))+parseFloat(a.getPropertyValue("margin-bottom"))}var s=this.props.maximumHeight-e.getBoundingClientRect().top-r-t.offsetHeight-i;this.setState({maxFieldsHeight:Math.max(s,this.MINIMUM_FIELDS_HEIGHT)})},_filterFields:function(e){this.setState({fieldFilter:e.target.value})},_showAllFields:function(e){e.preventDefault(),this.props.showAllFields||this.props.togglePageFields()},_showPageFields:function(e){e.preventDefault(),this.props.showAllFields&&this.props.togglePageFields()},_updateFieldSelection:function(e){this.props.predefinedFieldSelection(e)},_updateFieldSelectionToDefault:function(){this._updateFieldSelection("default")},_updateFieldSelectionToAll:function(){this._updateFieldSelection("all")},_updateFieldSelectionToNone:function(){this._updateFieldSelection("none")},render:function(){var e=this,t=this.props.result.decoration_stats,n=t?[].concat(t.added_fields||[],t.changed_fields||[]):[],r=this.props.fields.filter(function(t){return-1!==t.name.indexOf(e.state.fieldFilter)}).sort(function(e,t){return e.name.localeCompare(t.name)}).map(function(t){return n.includes(t.name)?a.default.createElement(c.DecoratedSidebarMessageField,{key:t.name,field:t,onToggled:e.props.onFieldToggled,selected:e.props.selectedFields.contains(t.name)}):a.default.createElement(c.SidebarMessageField,{key:t.name,field:t,fieldAnalyzers:e.props.fieldAnalyzers,onToggled:e.props.onFieldToggled,onFieldAnalyzer:e.props.onFieldAnalyzer,searchConfig:e.props.searchConfig,selected:e.props.selectedFields.contains(t.name)})}),i=void 0;return this.props.showHighlightToggle&&(i=a.default.createElement(u.Input,{ref:"highlightToggle",type:"checkbox",bsSize:"small",checked:this.props.shouldHighlight,onChange:this.props.toggleShouldHighlight,label:"Highlight results",wrapperClassName:"result-highlight-control"})),a.default.createElement("div",null,a.default.createElement("div",{ref:"fieldsFilter",className:"input-group input-group-sm",style:{marginTop:5,marginBottom:5}},a.default.createElement("span",{className:"input-group-btn"},a.default.createElement("button",{type:"button",className:"btn btn-default",onClick:this._updateFieldSelectionToDefault},"Default"),a.default.createElement("button",{type:"button",className:"btn btn-default",onClick:this._updateFieldSelectionToAll},"All"),a.default.createElement("button",{type:"button",className:"btn btn-default",onClick:this._updateFieldSelectionToNone},"None")),a.default.createElement("input",{type:"text",className:"form-control",placeholder:"Filter fields",onChange:this._filterFields,value:this.state.fieldFilter})),a.default.createElement("div",{ref:"fields",style:{maxHeight:this.state.maxFieldsHeight,overflowY:"scroll"}},a.default.createElement("ul",{className:"search-result-fields"},r)),a.default.createElement("div",{ref:"footer",style:{marginTop:13,marginBottom:0}},"List"," ",a.default.createElement("span",{className:"message-result-fields-range"}," fields of ",a.default.createElement("a",{href:"#",style:{fontWeight:this.props.showAllFields?"normal":"bold"},onClick:this._showPageFields},"current page")," or"," ",a.default.createElement("a",{href:"#",style:{fontWeight:this.props.showAllFields?"bold":"normal"},onClick:this._showAllFields},"all fields"),"."),a.default.createElement("br",null),i))}});exports.default=d,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(17),l=n(s),u=t(43),c=n(u),d=t(9),h=n(d),f=t(58),p=n(f),g=t(668),m=n(g),v=h.default.getStore("Search"),y=a.default.createClass({displayName:"LegacyHistogram",propTypes:{formattedHistogram:i.default.array.isRequired,histogram:i.default.object.isRequired,stream:i.default.object,permissions:i.default.arrayOf(i.default.string).isRequired},getInitialState:function(){return{}},componentDidMount:function(){this._renderHistogram(this.props.formattedHistogram),window.addEventListener("resize",this._onResize)},componentDidUpdate:function(e){JSON.stringify(this.props.formattedHistogram)!==JSON.stringify(e.formattedHistogram)&&this._updateHistogram(this.props.formattedHistogram,e.formattedHistogram)},componentWillUnmount:function(){window.removeEventListener("resize",this._onResize)},WIDGET_TYPE:"SEARCH_RESULT_CHART",RESOLUTIONS:["year","quarter","month","week","day","hour","minute"],eventThrottler:new p.default,_onResize:function(){this.eventThrottler.throttle(function(){return m.default.redrawResultGraph()})},_renderHistogram:function(e){m.default.resetContainerElements(l.default.findDOMNode(this)),m.default.setData(e,this.props.stream),m.default.drawResultGraph()},_updateHistogram:function(e){m.default.updateData(e)},_resolutionChanged:function(e){return function(t){t.preventDefault(),v.resolution=e}},_getFirstHistogramValue:function(){return"relative"===v.rangeType&&0===v.rangeParams.get("relative")?null:this.props.histogram.histogram_boundaries.from},render:function(){var e=this;void 0===v.resolution&&(v.resolution=this.props.histogram.interval);var t=this.RESOLUTIONS.map(function(t){var n="date-histogram-res-selector";e.props.histogram.interval===t&&(n+=" selected-resolution");var r=t===e.RESOLUTIONS[e.RESOLUTIONS.length-1]?"":",";return a.default.createElement("li",{key:t},a.default.createElement("a",{href:"#",className:n,"data-resolution":t,onClick:e._resolutionChanged(t)},t),r)}),n=a.default.createElement("ul",{className:"graph-resolution-selector list-inline"},a.default.createElement("li",null,a.default.createElement("i",{className:"fa fa-clock-o"})),t);return a.default.createElement("div",{className:"content-col"},a.default.createElement("div",{className:"pull-right"},a.default.createElement(c.default,{title:"Add to dashboard",widgetType:this.WIDGET_TYPE,configuration:{interval:this.props.histogram.interval},pullRight:!0,permissions:this.props.permissions,isStreamSearch:null!==this.props.stream})),a.default.createElement("h1",null,"Histogram"),n,a.default.createElement("div",{id:"result-graph-container"},a.default.createElement("div",{id:"y_axis"}),a.default.createElement("div",{id:"result-graph","data-from":this._getFirstHistogramValue(),"data-to":this.props.histogram.histogram_boundaries.to}),a.default.createElement("div",{id:"result-graph-timeline"})))}});exports.default=y,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(12),i=n(r),o=t(71),a=n(o),s=t(20),l=n(s),u=t(669),c=n(u),d=t(138),h=(n(d),t(139)),f=(n(h),t(24)),p=n(f),g={_histogram:[],_histogramContainer:(0,i.default)("#result-graph"),_yAxis:(0,i.default)("#y_axis"),_graphTimeline:(0,i.default)("#result-graph-timeline"),_annotator:void 0,_resultHistogramGraph:void 0,_getHistogramContainerWidth:function(){return this._histogramContainer.width()},resetContainerElements:function(e){this._resultHistogramGraph=void 0,this._histogramContainer=(0,i.default)("#result-graph",e),this._yAxis=(0,i.default)("#y_axis",e),this._graphTimeline=(0,i.default)("#result-graph-timeline",e)},setData:function(e,t){this._histogram=e,this._stream=t},drawResultGraph:function(){if(0!==this._histogramContainer.length&&void 0===this._resultHistogramGraph){this._histogramContainer.html(""),this._yAxis.html(""),this._graphTimeline.html("");var e=(0,i.default)(".date-histogram-res-selector.selected-resolution").data("resolution"),t=new a.default.Graph({element:this._histogramContainer[0],width:this._getHistogramContainerWidth(),height:120,renderer:"bar",resolution:e,series:[{name:"Messages",data:this._histogram,color:"#26ADE4"}]});new a.default.Graph.Axis.Y({graph:t,tickFormat:a.default.Fixtures.Number.formatKMBT,orientation:"left",element:this._yAxis[0],pixelsPerTick:30}),void 0!=t.series&&void 0!=t.series[0]&&t.series[0].data.length>1&&new a.default.Graph.Axis.Time({graph:t,ticksTreatment:"glow",timeFixture:new a.default.Fixtures.Graylog2Time}),new a.default.Graph.HoverDetail({graph:t,formatter:function(e,t,n){var r=new l.default(1e3*t).toString(l.default.Formats.COMPLETE),i=''+r+"";return(0,p.default)(parseInt(n)).format("0,0")+" messages
    "+i},xFormatter:function(e){return new Date(1e3*e).toDateString()}}),new a.default.Graph.Graylog2Selector({graph:t}),this._annotator=new a.default.Graph.Annotate({graph:t,element:this._graphTimeline[0]}),c.default.fillAlertAnnotator(this._histogram,this._stream,this._annotator),t.render(),this._resultHistogramGraph=t}},updateData:function(e){this._histogram.length>0&&void 0!==this._resultHistogramGraph&&(this._histogram=e,this._resultHistogramGraph.series[0].data=e,this._resetAlertAnnotator(),this._resultHistogramGraph.update())},_resetAlertAnnotator:function(){var e=(0,i.default)(".content",this._graphTimeline);c.default.fillAlertAnnotator(this._histogram,this._stream,this._annotator,function(){e.remove()})},redrawResultGraph:function(){this._histogram.length>0&&void 0!==this._resultHistogramGraph&&(this._resultHistogramGraph.configure({width:this._getHistogramContainerWidth()}),this._resultHistogramGraph.render())}};exports.default=g,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(6),i=n(r),o=t(9),a=n(o),s=t(20),l=n(s),u=i.default.getActions("Alerts"),c=(a.default.getStore("Alerts"),a.default.getStore("Streams")),d={streams:[],initialize:function(){var e=this;c.listStreams().then(function(t){e.streams=t})},fillAlertAnnotator:function(e,t,n,r){var i=this;if(e&&e[0]&&e[0].x){var o=e[0].x,a=void 0;a=t?u.list.triggerPromise(t,o):u.listAllStreams.triggerPromise(o),a.then(function(e){i._addAnnotations(e.alerts,n),"function"==typeof r&&r()})}},_addAnnotations:function(e,t){var n=this;e.length>0&&!this.streams&&console.warn("Could not resolve stream names on alert annotations: stream list was not loaded."),e.forEach(function(e){var r=l.default.fromUTCDateTime(e.triggered_at).toMoment().unix();t.add(r,n._getAlertAnnotation(e)),t.update()})},_getAlertAnnotation:function(e){var t=void 0;return this.streams&&(t=this.streams.filter(function(t){return t.id===e.stream_id})[0]),t=t||{title:"Undefined"}," Stream \""+t.title+'" triggered an alert: '+e.description}};d.initialize(),exports.default=d,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(118),u=t(27),c=n(u),d=a.default.createClass({displayName:"MalformedSearchQuery",propTypes:{error:i.default.object.isRequired},_isGenericError:function(e){return null===e.column||null===e.line},_getFormattedErrorDetails:function(e){return e.map(function(e){return a.default.createElement("li",null,a.default.createElement("code",null,e))})},_getFormattedErrorDescription:function(e){return a.default.createElement(s.Panel,{bsStyle:"danger"},a.default.createElement("dl",{style:{marginBottom:0}},a.default.createElement("dt",null,"Error Message:"),a.default.createElement("dd",null,e.message),a.default.createElement("dt",null,"Details:"),a.default.createElement("dd",null,this._getFormattedErrorDetails(e.details))))},render:function(){var e=this.props.error.body,t=void 0;return t=this._isGenericError(e)?a.default.createElement("div",null,a.default.createElement("p",null,"The given query was malformed, and executing it caused the following error:"),this._getFormattedErrorDescription(e)):a.default.createElement("div",null,this._getFormattedErrorDescription(e)),a.default.createElement("div",null,a.default.createElement(s.Row,{className:"content content-head"},a.default.createElement(s.Col,{md:12},a.default.createElement("h1",null,"Malformed search query"),a.default.createElement("p",{className:"description"},"The search query could not be executed, please correct it and try again."," ",a.default.createElement("strong",null,"Take a look at the"," ",a.default.createElement(l.DocumentationLink,{page:c.default.PAGES.SEARCH_QUERY_LANGUAGE,text:"documentation"})," ","if you need help with the search syntax.")))),a.default.createElement(s.Row,{className:"content"},a.default.createElement(s.Col,{md:12},t)),a.default.createElement(l.ContactUs,null))}});exports.default=d,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(0),i=n(r),o=t(3),a=t(30),s=n(a),l=t(27),u=n(l),c=i.default.createClass({displayName:"ContactUs",render:function(){return i.default.createElement(o.Row,{className:"content"},i.default.createElement(o.Col,{md:12},i.default.createElement("div",{className:"support-sources"},i.default.createElement("h2",null,"Need help?"),i.default.createElement("p",null,"Do not hesitate to consult the Graylog community if your questions are not answered in the"," ",i.default.createElement(s.default,{page:u.default.PAGES.WELCOME,text:"documentation"}),"."),i.default.createElement("ul",null,i.default.createElement("li",null,i.default.createElement("i",{className:"fa fa-group"})," ",i.default.createElement("a",{href:"https://www.graylog.org/community-support/",target:"_blank"},"Community support")),i.default.createElement("li",null,i.default.createElement("i",{className:"fa fa-github-alt"})," ",i.default.createElement("a",{href:"https://github.com/Graylog2/graylog2-server/issues",target:"_blank"},"Issue tracker")),i.default.createElement("li",null,i.default.createElement("i",{className:"fa fa-heart"})," ",i.default.createElement("a",{href:"https://www.graylog.org/professional-support",target:"_blank"},"Professional support"))))))}});exports.default=c,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=a.default.createClass({displayName:"SmallSupportLink",propTypes:{children:i.default.node.isRequired},render:function(){return a.default.createElement("p",{className:"description-tooltips description-tooltips-small"},a.default.createElement("span",{className:"fa-stack"},a.default.createElement("i",{className:"fa fa-circle fa-stack-2x"}),a.default.createElement("i",{className:"fa fa-lightbulb-o fa-stack-1x fa-inverse"})),a.default.createElement("strong",null,this.props.children))}});exports.default=s,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(18),u=n(l),c=t(9),d=n(c),h=t(6),f=n(h),p=t(193),g=n(p),m=t(29),v=d.default.getStore("Search"),y=(d.default.getStore("Messages"),f.default.getActions("Messages")),b=a.default.createClass({displayName:"MessageFieldDescription",propTypes:{message:i.default.object.isRequired,fieldName:i.default.string.isRequired,fieldValue:i.default.any.isRequired,possiblyHighlight:i.default.func.isRequired,disableFieldActions:i.default.bool,customFieldActions:i.default.node,isDecorated:i.default.bool},getInitialState:function(){return{messageTerms:u.default.List()}},loadTerms:function(e){var t=this;return function(){y.fieldTerms.triggerPromise(t.props.message.index,t.props.message.fields[e]).then(function(e){return t._onTermsLoaded(e)})}},_onTermsLoaded:function(e){this.setState({messageTerms:u.default.fromJS(e)})},_shouldShowTerms:function(){return 0!==this.state.messageTerms.size},addFieldToSearchBar:function(e){e.preventDefault(),v.addSearchTerm(this.props.fieldName,this.props.fieldValue)},_getFormattedTerms:function(){var e=[];return this.state.messageTerms.forEach(function(t,n){e.push(a.default.createElement("span",{key:n,className:"message-terms"},t))}),e},_getFormattedFieldActions:function(){if(this.props.disableFieldActions)return null;return this.props.customFieldActions?a.default.cloneElement(this.props.customFieldActions,{fieldName:this.props.fieldName,message:this.props.message}):a.default.createElement(g.default,{fieldName:this.props.fieldName,message:this.props.message,onAddFieldToSearchBar:this.addFieldToSearchBar,onLoadTerms:this.loadTerms})},render:function(){var e=this,t="message"===this.props.fieldName||"full_message"===this.props.fieldName?"message-field":"";return a.default.createElement("dd",{className:t,key:this.props.fieldName+"dd"},this._getFormattedFieldActions(),a.default.createElement("div",{className:"field-value"},this.props.possiblyHighlight(this.props.fieldName)),this._shouldShowTerms()&&a.default.createElement(s.Alert,{bsStyle:"info",onDismiss:function(){return e.setState({messageTerms:u.default.Map()})}},"Field terms:  ",this._getFormattedTerms()),this.props.isDecorated&&a.default.createElement(m.DecoratedMessageFieldMarker,null))}});exports.default=b,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(90),u=n(l),c=a.default.createClass({displayName:"MessageFieldExtractorActions",propTypes:{fieldName:i.default.string.isRequired,message:i.default.object.isRequired},componentWillMount:function(){this._refreshExtractorRoutes(this.props)},componentWillReceiveProps:function(e){this._refreshExtractorRoutes(e)},_refreshExtractorRoutes:function(e){this.newExtractorRoutes=u.default.getNewExtractorRoutes(e.message.source_node_id,e.message.source_input_id,e.fieldName,e.message.index,e.message.id)},_formatExtractorMenuItem:function(e){return a.default.createElement(s.MenuItem,{key:"menu-item-"+e,href:this.newExtractorRoutes[e]},u.default.getReadableExtractorTypeName(e))},render:function(){var e=this;return"string"==typeof this.props.message.fields[this.props.fieldName]?a.default.createElement("div",{className:"message-field-actions pull-right"},a.default.createElement(s.DropdownButton,{pullRight:!0,bsSize:"xsmall",title:"Select extractor type",key:1,id:"select-extractor-type-dropdown-field-"+this.props.fieldName},u.default.EXTRACTOR_TYPES.map(function(t){return e._formatExtractorMenuItem(t)}))):a.default.createElement("div",{className:"message-field-actions pull-right"},a.default.createElement(s.DropdownButton,{pullRight:!0,bsSize:"xsmall",title:"Select extractor type",key:1,id:"select-extractor-type-dropdown-field-"+this.props.fieldName},a.default.createElement(s.MenuItem,{key:"select-extractor-type-disabled",disabled:!0},"Extractors can only be used with string fields.")))}});exports.default=c,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(29),l=a.default.createClass({displayName:"MessageField",propTypes:{customFieldActions:i.default.node,disableFieldActions:i.default.bool,fieldName:i.default.string.isRequired,message:i.default.object.isRequired,possiblyHighlight:i.default.func.isRequired,value:i.default.any.isRequired},SPECIAL_FIELDS:["full_message","level"],_isAdded:function(e){var t=this.props.message.decoration_stats;return t&&t.added_fields&&void 0!==t.added_fields[e]},_isChanged:function(e){var t=this.props.message.decoration_stats;return t&&t.changed_fields&&void 0!==t.changed_fields[e]},_isDecorated:function(e){return this._isAdded(e)||this._isChanged(e)},render:function(){var e=this.props.value,t=this.props.fieldName;return-1!==this.SPECIAL_FIELDS.indexOf(t)&&(e=this.props.message.fields[t]),a.default.createElement("span",null,a.default.createElement("dt",{key:t+"Title"},t),a.default.createElement(s.MessageFieldDescription,{key:t+"Description",message:this.props.message,fieldName:t,fieldValue:e,possiblyHighlight:this.props.possiblyHighlight,disableFieldActions:this._isAdded(t)||this.props.disableFieldActions,customFieldActions:this.props.customFieldActions,isDecorated:this._isDecorated(t)}))}});exports.default=l,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(0),i=n(r),o=t(18),a=n(o),s=t(116),l=n(s),u=t(11),c=t(28),d=n(c),h=i.default.createClass({displayName:"MessageTableEntry",propTypes:{allStreams:i.default.PropTypes.instanceOf(a.default.List).isRequired,allStreamsLoaded:i.default.PropTypes.bool.isRequired,disableSurroundingSearch:i.default.PropTypes.bool,expandAllRenderAsync:i.default.PropTypes.bool.isRequired,expanded:i.default.PropTypes.bool.isRequired,highlight:i.default.PropTypes.bool,highlightMessage:i.default.PropTypes.string,inputs:i.default.PropTypes.instanceOf(a.default.Map).isRequired,message:i.default.PropTypes.shape({fields:i.default.PropTypes.object.isRequired,highlight_ranges:i.default.PropTypes.object,id:i.default.PropTypes.string.isRequired,index:i.default.PropTypes.string.isRequired}).isRequired,nodes:i.default.PropTypes.instanceOf(a.default.Map).isRequired,searchConfig:i.default.PropTypes.object,selectedFields:i.default.PropTypes.instanceOf(a.default.OrderedSet),showMessageRow:i.default.PropTypes.bool,streams:i.default.PropTypes.instanceOf(a.default.Map).isRequired,toggleDetail:i.default.PropTypes.func.isRequired},getDefaultProps:function(){return{disableSurroundingSearch:!1,highlight:!1,highlightMessage:void 0,searchConfig:void 0,selectedFields:a.default.OrderedSet(),showMessageRow:!1}},shouldComponentUpdate:function(e){return this.props.highlight!==e.highlight||(!a.default.is(this.props.selectedFields,e.selectedFields)||(this.props.expanded!==e.expanded||(this.props.expandAllRenderAsync!==e.expandAllRenderAsync||(this.props.allStreamsLoaded!==e.allStreamsLoaded||this.props.showMessageRow!==e.showMessageRow))))},possiblyHighlight:function(e,t){var n=this.props.message.fields[e];if(void 0===n)return"";var r=d.default.stringify(n),o=t?r.slice(0,2048):r;if(this.props.highlight&&this.props.message.highlight_ranges){if(this.props.message.highlight_ranges.hasOwnProperty(e)){var s=[],l=a.default.fromJS(this.props.message.highlight_ranges[e]).sortBy(function(e){return e.get("start")}),u=0,c=0;return l.forEach(function(e,t){if(u!==e.get("start")&&s.push(i.default.createElement("span",{key:c++},o.substring(u,e.get("start")))),s.push(i.default.createElement("span",{key:c++,className:"result-highlight-colored"},o.substring(e.get("start"),e.get("start")+e.get("length")))),t+1this._numberOfPages())return this.props.currentPage;var e=10*Math.ceil((this.props.currentPage+1)/10);return Math.min(this._numberOfPages(),e)},_onPageChanged:function(e){var t=void 0;t="Previous"===e?this.props.currentPage-1:"Next"===e?this.props.currentPage+1:Number(e),this.props.onPageChange(t)},render:function(){var e=[];e.push(s.default.createElement(c.Page,{key:"previous",href:"#",page:"Previous",isDisabled:1===this.props.currentPage,onPageChanged:this._onPageChanged}));for(var t=this._minPage();t<=this._maxPage();t++)e.push(s.default.createElement(c.Page,{key:"page"+t,href:"#",page:t,isActive:t===this.props.currentPage,onPageChanged:this._onPageChanged}));e.push(s.default.createElement(c.Page,{key:"next",href:"#",page:"Next",isDisabled:this.props.currentPage>=this._maxPage(),onPageChanged:this._onPageChanged}));var n=s.default.createElement("ul",{className:"pagination"},e),r=void 0;return r="bottom"===this.props.position?s.default.createElement("div",{ref:"paginatorAffix"},this.props.children,s.default.createElement("nav",{className:"text-center",style:{width:this.state.paginationWidth+20}},n)):s.default.createElement("nav",{className:"text-center"},n),s.default.createElement("div",{ref:"paginatorContainer",id:"message-table-paginator-"+this.props.position},r)}});exports.default=y,e.exports=exports.default}).call(exports,t(21))},function(e,exports){+function($){"use strict";function e(e){return this.each(function(){var n=$(this),r=n.data("bs.affix"),i="object"==typeof e&&e;r||n.data("bs.affix",r=new t(this,i)),"string"==typeof e&&r[e]()})}var t=function(e,n){this.options=$.extend({},t.DEFAULTS,n),this.$target=$(this.options.target).on("scroll.bs.affix.data-api",$.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",$.proxy(this.checkPositionWithEventLoop,this)),this.$element=$(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};t.VERSION="3.3.7",t.RESET="affix affix-top affix-bottom",t.DEFAULTS={offset:0,target:window},t.prototype.getState=function(e,t,n,r){var i=this.$target.scrollTop(),o=this.$element.offset(),a=this.$target.height();if(null!=n&&"top"==this.affixed)return i=e-r&&"bottom"},t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var e=this.$target.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-e},t.prototype.checkPositionWithEventLoop=function(){setTimeout($.proxy(this.checkPosition,this),1)},t.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),n=this.options.offset,r=n.top,i=n.bottom,o=Math.max($(document).height(),$(document.body).height());"object"!=typeof n&&(i=r=n),"function"==typeof r&&(r=n.top(this.$element)),"function"==typeof i&&(i=n.bottom(this.$element));var a=this.getState(o,e,r,i);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var s="affix"+(a?"-"+a:""),l=$.Event(s+".bs.affix");if(this.$element.trigger(l),l.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(s).trigger(s.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:o-e-i})}};var n=$.fn.affix;$.fn.affix=e,$.fn.affix.Constructor=t,$.fn.affix.noConflict=function(){return $.fn.affix=n,this},$(window).on("load",function(){$('[data-spy="affix"]').each(function(){var t=$(this),n=t.data();n.offset=n.offset||{},null!=n.offsetBottom&&(n.offset.bottom=n.offsetBottom),null!=n.offsetTop&&(n.offset.top=n.offsetTop),e.call(t,n)})})}(jQuery)},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(29),u=t(43),c=n(u),d=t(118),h=t(27),f=n(h),p=t(9),g=n(p),m=g.default.getStore("Search"),v=a.default.createClass({displayName:"NoSearchResults",propTypes:{builtQuery:i.default.string,histogram:i.default.object.isRequired,permissions:i.default.array.isRequired,searchInStream:i.default.object},componentDidMount:function(){this.style.use()},componentWillUnmount:function(){this.style.unuse()},style:t(680),_showQueryModal:function(e){e.preventDefault(),this.refs.showQueryModal.open()},render:function(){var e=null;return this.props.searchInStream&&(e=a.default.createElement("span",null,"in stream ",a.default.createElement("em",null,this.props.searchInStream.title))),a.default.createElement("div",null,a.default.createElement(s.Row,{className:"content content-head"},a.default.createElement(s.Col,{md:12},a.default.createElement("h1",null,"Nothing found ",e),a.default.createElement("p",{className:"description"},"Your search returned no results, try changing the used time range or the search query."," ","Do you want more details? ",a.default.createElement("a",{href:"#",onClick:this._showQueryModal},"Show the Elasticsearch query"),".",a.default.createElement(l.ShowQueryModal,{key:"debugQuery",ref:"showQueryModal",builtQuery:this.props.builtQuery}),a.default.createElement("br",null),a.default.createElement("strong",null,"Take a look at the"," ",a.default.createElement(d.DocumentationLink,{page:f.default.PAGES.SEARCH_QUERY_LANGUAGE,text:"documentation"})," ","if you need help with the search syntax or the time range selector.")))),a.default.createElement(s.Row,{className:"content search-actions"},a.default.createElement(s.Col,{md:12},a.default.createElement(s.Row,{className:"row-sm"},a.default.createElement(s.Col,{md:4},a.default.createElement("h2",null,"Search Actions")),a.default.createElement(s.Col,{md:8},a.default.createElement("div",{className:"actions"},a.default.createElement(l.AddSearchCountToDashboard,{searchInStream:this.props.searchInStream,permissions:this.props.permissions,pullRight:!0}),a.default.createElement(c.default,{title:"Add histogram to dashboard",widgetType:"SEARCH_RESULT_CHART",configuration:{interval:this.props.histogram.interval},pullRight:!0,permissions:this.props.permissions}),a.default.createElement(l.SavedSearchControls,{currentSavedSearch:m.savedSearch,pullRight:!0})))),a.default.createElement("p",null,"In case you expect this search to return results in the future, you can add search widgets to dashboards, and manage your saved searches from here."))),a.default.createElement(d.ContactUs,null))}});exports.default=v,e.exports=exports.default},function(e,exports,t){var n,r=0,i=t(681);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(exports.locals=i.locals),exports.use=exports.ref=function(){return r++||(n=t(15)(i,{})),exports},exports.unuse=exports.unref=function(){r>0&&!--r&&(n(),n=null)}},function(e,exports,t){exports=e.exports=t(14)(void 0),exports.push([e.i,".search-actions h2{line-height:30px}.search-actions .actions{text-align:right}.search-actions .actions>div{margin-left:5px}.search-actions p{margin-top:5px}",""])},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(0),i=n(r),o=t(2),a=n(o),s=t(23),l=n(s),u=t(3),c=t(11),d=t(9),h=n(d),f=t(6),p=n(f),g=h.default.getStore("Refresh"),m=p.default.getActions("Refresh"),v=i.default.createClass({displayName:"RefreshControls",mixins:[a.default.connect(g,"refresh")],INTERVAL_OPTIONS:{"1 Second":1,"2 Seconds":2,"5 Seconds":5,"10 Seconds":10,"30 Seconds":30,"1 Minute":60,"5 Minutes":300},_changeInterval:function(e){m.changeInterval(e),m.enable()},render:function(){var e=this,t=Object.keys(this.INTERVAL_OPTIONS).map(function(t){var n=1e3*e.INTERVAL_OPTIONS[t];return i.default.createElement(u.MenuItem,{key:"RefreshControls-"+t,onClick:function(){return e._changeInterval(n)}},t)}),n=l.default.duration(this.state.refresh.interval),r=n.asSeconds()<60?i.default.createElement("span",null,n.asSeconds()," ",i.default.createElement(c.Pluralize,{singular:"second",plural:"seconds",value:n.asSeconds()})):i.default.createElement("span",null,n.asMinutes()," ",i.default.createElement(c.Pluralize,{singular:"minute",plural:"minutes",value:n.asMinutes()})),o=i.default.createElement("span",null,"Update every ",r);return i.default.createElement(u.ButtonGroup,null,i.default.createElement(u.Button,{bsSize:"small",onClick:function(){return e.state.refresh.enabled?m.disable():m.enable()}},this.state.refresh.enabled?i.default.createElement("i",{className:"fa fa-pause"}):i.default.createElement("i",{className:"fa fa-play"})),i.default.createElement(u.DropdownButton,{bsSize:"small",title:this.state.refresh.enabled?o:"Not updating",id:"refresh-options-dropdown"},t))}});exports.default=v,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(18),u=n(l),c=t(9),d=n(c),h=t(6),f=n(h),p=t(29),g=d.default.getStore("Streams"),m=d.default.getStore("Search"),v=f.default.getActions("Refresh"),y=a.default.createClass({displayName:"ResultTable",propTypes:{disableSurroundingSearch:a.default.PropTypes.bool,highlight:i.default.bool.isRequired,inputs:i.default.object.isRequired,messages:i.default.array.isRequired,nodes:i.default.object.isRequired,onPageChange:a.default.PropTypes.func,page:i.default.number.isRequired,pageSize:a.default.PropTypes.number,resultCount:i.default.number.isRequired,selectedFields:i.default.object.isRequired,sortField:i.default.string.isRequired,sortOrder:i.default.string.isRequired,streams:i.default.object.isRequired,searchConfig:i.default.object.isRequired},getDefaultProps:function(){return{disableSurroundingSearch:!1,onPageChange:function(e){m.page=e}}},getInitialState:function(){return{expandedMessages:u.default.Set(),allStreamsLoaded:!1,allStreams:u.default.List(),expandAllRenderAsync:!1}},componentDidMount:function(){var e=this;if(!this.state.allStreamsLoaded){g.listStreams().done(function(t){return e._onStreamsLoaded(t)})}},componentDidUpdate:function(){var e=this;this.state.expandAllRenderAsync&&setTimeout(function(){return e.setState({expandAllRenderAsync:!1})},this.EXPAND_ALL_RENDER_ASYNC_DELAY)},EXPAND_ALL_RENDER_ASYNC_DELAY:10,_onStreamsLoaded:function(e){this.setState({allStreamsLoaded:!0,allStreams:u.default.List(e).sortBy(function(e){return e.title})})},_toggleMessageDetail:function(e){var t=void 0;this.state.expandedMessages.contains(e)?t=this.state.expandedMessages.delete(e):(t=this.state.expandedMessages.add(e),v.disable()),this.setState({expandedMessages:t})},_fieldColumns:function(){return this.props.selectedFields.delete("message")},_columnStyle:function(e){return"source"===e.toLowerCase()&&this._fieldColumns().size>1?{width:180}:{}},expandAll:function(){var e=(this.props.messages.length-this.state.expandedMessages.size)/100,t=e>.3,n=u.default.Set(this.props.messages.map(function(e){return e.index+"-"+e.id}));this.setState({expandedMessages:n,expandAllRenderAsync:t})},collapseAll:function(){this.setState({expandedMessages:u.default.Set()})},_handleSort:function(e,t,n){e.preventDefault(),m.sort(t,n)},_sortIcons:function(e){var t=this,n=null,r="fa fa-sort-amount-asc sort-order-item",i="fa fa-sort-amount-asc fa-flip-vertical sort-order-desc sort-order-item";return n=0===this.props.sortField.toLowerCase().localeCompare(e.toLowerCase())?0===this.props.sortOrder.toLowerCase().localeCompare("desc")?a.default.createElement("span",null,a.default.createElement("i",{className:i+" sort-order-active"}),a.default.createElement("a",{href:"#",onClick:function(n){return t._handleSort(n,e,"asc")}},a.default.createElement("i",{className:r}))):a.default.createElement("span",null,a.default.createElement("i",{className:r+" sort-order-active"}),a.default.createElement("a",{href:"#",onClick:function(n){return t._handleSort(n,e,"desc")}},a.default.createElement("i",{className:i}))):a.default.createElement("span",{className:"sort-order"},a.default.createElement("a",{href:"#",onClick:function(n){return t._handleSort(n,e,"asc")}},a.default.createElement("i",{className:r})),a.default.createElement("a",{href:"#",onClick:function(n){return t._handleSort(n,e,"desc")}},a.default.createElement("i",{className:i}))),a.default.createElement("span",null,n)},render:function(){var e=this,t=this._fieldColumns();return a.default.createElement("div",{className:"content-col"},a.default.createElement("h1",{className:"pull-left"},"Messages"),a.default.createElement(s.ButtonGroup,{bsSize:"small",className:"pull-right"},a.default.createElement(s.Button,{title:"Expand all messages",onClick:this.expandAll},a.default.createElement("i",{className:"fa fa-expand"})),a.default.createElement(s.Button,{title:"Collapse all messages",onClick:this.collapseAll,disabled:0===this.state.expandedMessages.size},a.default.createElement("i",{className:"fa fa-compress"}))),a.default.createElement(p.MessageTablePaginator,{currentPage:Number(this.props.page),onPageChange:this.props.onPageChange,pageSize:this.props.pageSize,position:"top",resultCount:this.props.resultCount}),a.default.createElement("div",{className:"search-results-table"},a.default.createElement("div",{className:"table-responsive"},a.default.createElement("div",{className:"messages-container"},a.default.createElement("table",{className:"table table-condensed messages"},a.default.createElement("thead",null,a.default.createElement("tr",null,a.default.createElement("th",{style:{width:180}},"Timestamp ",this._sortIcons("timestamp")),t.toSeq().map(function(t){return a.default.createElement("th",{key:t,style:e._columnStyle(t)},t," ",e._sortIcons(t))}))),this.props.messages.map(function(n){return a.default.createElement(p.MessageTableEntry,{key:n.index+"-"+n.id,disableSurroundingSearch:e.props.disableSurroundingSearch,message:n,showMessageRow:e.props.selectedFields.contains("message"),selectedFields:t,expanded:e.state.expandedMessages.contains(n.index+"-"+n.id),toggleDetail:e._toggleMessageDetail,inputs:e.props.inputs,streams:e.props.streams,allStreams:e.state.allStreams,allStreamsLoaded:e.state.allStreamsLoaded,nodes:e.props.nodes,highlight:e.props.highlight,highlightMessage:m.highlightMessage,expandAllRenderAsync:e.state.expandAllRenderAsync,searchConfig:e.props.searchConfig})}))))),a.default.createElement(p.MessageTablePaginator,{currentPage:Number(this.props.page),onPageChange:this.props.onPageChange,pageSize:this.props.pageSize,position:"bottom",resultCount:this.props.resultCount},a.default.createElement(s.ButtonGroup,{bsSize:"small",className:"pull-right",style:{position:"absolute",marginTop:20,right:10}},a.default.createElement(s.Button,{title:"Expand all messages",onClick:this.expandAll},a.default.createElement("i",{className:"fa fa-expand"})),a.default.createElement(s.Button,{title:"Collapse all messages",onClick:this.collapseAll,disabled:0===this.state.expandedMessages.size},a.default.createElement("i",{className:"fa fa-compress"})))))}});exports.default=y,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(2),l=n(s),u=t(3),c=t(13),d=t(9),h=n(d),f=t(6),p=n(f),g=h.default.getStore("SavedSearches"),m=p.default.getActions("SavedSearches"),v=a.default.createClass({displayName:"SavedSearchControls",propTypes:{currentSavedSearch:i.default.string,pullRight:i.default.bool},mixins:[l.default.listenTo(g,"_updateTitle")],getInitialState:function(){return{title:"",error:!1}},componentDidMount:function(){this._updateTitle()},componentDidUpdate:function(e){e.currentSavedSearch!==this.props.currentSavedSearch&&this._updateTitle()},_isSearchSaved:function(){return void 0!==this.props.currentSavedSearch},_updateTitle:function(){if(!this._isSearchSaved())return void(""!==this.state.title&&this.setState({title:"",error:!1}));var e=g.getSavedSearch(this.props.currentSavedSearch);void 0!==e&&this.setState({title:e.title,error:!1})},_openModal:function(){this.refs.saveSearchModal.open()},_hide:function(){this.refs.saveSearchModal.close()},_save:function(){var e=this;if(!this.state.error){var t=void 0;t=this._isSearchSaved()?m.update.triggerPromise(this.props.currentSavedSearch,this.refs.title.getValue()):m.create.triggerPromise(this.refs.title.getValue()),t.then(function(){return e._hide()})}},_deleteSavedSearch:function(e,t){t.preventDefault(),window.confirm("Do you really want to delete this saved search?")&&m.delete(this.props.currentSavedSearch)},_titleChanged:function(){this.setState({error:!g.isValidTitle(this.props.currentSavedSearch,this.refs.title.getValue())})},_getNewSavedSearchButtons:function(){return a.default.createElement(u.Button,{bsStyle:"success",bsSize:"small",onClick:this._openModal},"Save search criteria")},_getEditSavedSearchControls:function(){return a.default.createElement(u.DropdownButton,{bsSize:"small",title:"Saved search",id:"saved-search-actions-dropdown",pullRight:this.props.pullRight},a.default.createElement(u.MenuItem,{onSelect:this._openModal},"Update search criteria"),a.default.createElement(u.MenuItem,{divider:!0}),a.default.createElement(u.MenuItem,{onSelect:this._deleteSavedSearch},"Delete saved search"))},render:function(){return a.default.createElement("div",{style:{display:"inline-block"}},this._isSearchSaved()?this._getEditSavedSearchControls():this._getNewSavedSearchButtons(),a.default.createElement(c.BootstrapModalForm,{ref:"saveSearchModal",title:this._isSearchSaved()?"Update saved search":"Save search criteria",onSubmitForm:this._save,submitButtonText:"Save"},a.default.createElement(c.Input,{type:"text",label:"Title",ref:"title",required:!0,defaultValue:this.state.title,onChange:this._titleChanged,bsStyle:this.state.error?"error":null,help:this.state.error?"Title was already taken.":"Type a name describing the current search.",autoFocus:!0})))}});exports.default=v,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(12),i=n(r),o=t(1),a=n(o),s=t(0),l=n(s),u=t(17),c=n(u),d=t(18),h=n(d),f=t(3),p=t(45),g=n(p),m=t(13),v=t(11),y=t(29),b=t(30),_=n(b),w=t(27),C=n(w),A=t(9),E=n(A),S=t(6),x=n(S),F=t(119),k=n(F),D=t(20),T=n(D),M=t(23),R=n(M),O=E.default.getStore("Search"),L=E.default.getStore("Tools"),P=x.default.getActions("SavedSearches"),B=l.default.createClass({displayName:"SearchBar",propTypes:{userPreferences:a.default.object,savedSearches:a.default.arrayOf(a.default.object).isRequired,config:a.default.object,displayRefreshControls:a.default.bool,onExecuteSearch:a.default.func},getDefaultProps:function(){return{displayRefreshControls:!0}},getInitialState:function(){return this.initialSearchParams=O.getParams(),{rangeType:this.initialSearchParams.rangeType,rangeParams:this.initialSearchParams.rangeParams,query:this.initialSearchParams.query,savedSearch:O.savedSearch,keywordPreview:h.default.Map()}},componentDidMount:function(){var e=this;O.onParamsChanged=function(t){return e.setState(t)},O.onSubmitSearch=function(){e._performSearch()},O.onAddQueryTerm=this._animateQueryChange,this._initializeSearchQueryInput()},componentDidUpdate:function(e,t){this.state.query!==t.query&&this._updateSearchQueryInput(this.state.query)},componentWillUnmount:function(){this._removeSearchQueryInput()},reload:function(){this.setState(this.getInitialState())},_initializeSearchQueryInput:function(){if(this.props.userPreferences.enableSmartSearch){this.queryInput=new y.QueryInput(this.refs.query.getInputDOMNode()),this.queryInput.display();var e=c.default.findDOMNode(this.refs.query);(0,i.default)(e).on("typeahead:change",function(e){O.query=e.target.value})}},_updateSearchQueryInput:function(e){this.props.userPreferences.enableSmartSearch&&this.queryInput.update(e)},_removeSearchQueryInput:function(){if(this.props.userPreferences.enableSmartSearch){var e=c.default.findDOMNode(this.refs.query);(0,i.default)(e).off("typeahead:change")}},_closeSearchQueryAutoCompletion:function(){if(this.props.userPreferences.enableSmartSearch){var e=c.default.findDOMNode(this.refs.query.getInputDOMNode());(0,i.default)(e).typeahead("close")}},_animateQueryChange:function(){k.default.scrollToHint(c.default.findDOMNode(this.refs.universalSearch)),(0,i.default)(c.default.findDOMNode(this.refs.query)).effect("bounce")},_queryChanged:function(){O.query=this.refs.query.getValue()},_rangeTypeChanged:function(e,t){O.rangeType=e,this._resetKeywordPreview()},_rangeParamsChanged:function(e){var t=this;return function(){var n=void 0;switch(e){case"from":case"to":var r=e+"Formatted";n=t.refs[r],t._isValidDateString(n.getValue())?n.getInputDOMNode().setCustomValidity(""):n.getInputDOMNode().setCustomValidity("Invalid date time provided");break;default:n=t.refs[e]}O.rangeParams=t.state.rangeParams.set(e,n.getValue())}},_keywordSearchChanged:function(){var e=this;this._rangeParamsChanged("keyword")();var t=this.refs.keyword.getValue();""===t?this._resetKeywordPreview():L.testNaturalDate(t).then(function(t){return e._onKeywordPreviewLoaded(t)}).catch(function(){return e._resetKeywordPreview()})},_resetKeywordPreview:function(){this.setState({keywordPreview:h.default.Map()})},_onKeywordPreviewLoaded:function(e){var t=T.default.fromUTCDateTime(e.from).toString(),n=T.default.fromUTCDateTime(e.to).toString();this.setState({keywordPreview:h.default.Map({from:t,to:n})})},_formattedDateStringInUserTZ:function(e){var t=this.state.rangeParams.get(e);return null===t||void 0===t||""===t?t:this.initialSearchParams.rangeParams.get(e)===t?T.default.parseFromString(t).toString():t},_setDateTimeToNow:function(e){var t=this;return function(){t.refs[e+"Formatted"].getInputDOMNode().value=(new T.default).toString(T.default.Formats.DATETIME),t._rangeParamsChanged(e)()}},_isValidDateField:function(e){return this._isValidDateString(this._formattedDateStringInUserTZ(e))},_isValidDateString:function(e){try{return void 0!==e&&T.default.parseFromString(e),!0}catch(e){return!1}},_performSearch:function(e){if(e&&e.preventDefault(),this._closeSearchQueryAutoCompletion(),"absolute"===this.state.rangeType){var t=this.refs.fromFormatted.getValue(),n=this.refs.toFormatted.getValue();this.from.value=T.default.parseFromString(t).toISOString(),this.to.value=T.default.parseFromString(n).toISOString()}this.fields.value=O.fields.join(","),this.width.value=O.width,this.highlightMessage.value=O.highlightMessage;var r=this.refs.searchForm,o=(0,i.default)(r).serialize(),a=new g.default(r.action).search(o),s=a.resource();O.executeSearch(s),"function"==typeof this.props.onExecuteSearch&&this.props.onExecuteSearch(s)},_onSavedSearchSelect:function(e){""===e&&this._performSearch();var t=O.searchInStream?O.searchInStream.id:void 0;P.execute.triggerPromise(e,t,(0,i.default)(window).width())},_onDateSelected:function(e){var t=this;return function(n,r,i){var o=t.refs[e+"Formatted"].getInputDOMNode(),a=n.setHours(0);o.value=T.default.ignoreTZ(a).toString(T.default.Formats.DATETIME),t._rangeParamsChanged(e)()}},_getRangeTypeSelector:function(){var e=this,t=void 0;switch(this.state.rangeType){case"relative":var n=this.props.config?this.props.config.relative_timerange_options:null,r=this.props.config?R.default.duration(this.props.config.query_time_range_limit):null,i=void 0;if(n){var o=null;i=Object.keys(n).map(function(e){var t=R.default.duration(e).asSeconds();if(r>0&&(t>r.asSeconds()||0===t))return null;var i=l.default.createElement("option",{key:"relative-option-"+e,value:t},n[e]);return"PT0S"===e?(o=i,null):i}),o&&i.push(o)}else i=l.default.createElement("option",{value:"300"},"Loading...");t=l.default.createElement("div",{className:"timerange-selector relative",style:{width:270,marginLeft:50}},l.default.createElement(m.Input,{id:"relative-timerange-selector",ref:"relative",type:"select",value:this.state.rangeParams.get("relative"),name:"relative",onChange:this._rangeParamsChanged("relative"),className:"input-sm"},i));break;case"absolute":t=l.default.createElement("div",{className:"timerange-selector absolute",style:{width:600}},l.default.createElement("div",{className:"row no-bm",style:{marginLeft:50}},l.default.createElement("div",{className:"col-md-5",style:{padding:0}},l.default.createElement("input",{type:"hidden",name:"from",ref:function(t){e.from=t}}),l.default.createElement(v.DatePicker,{id:"searchFromDatePicker",title:"Search start date",date:this.state.rangeParams.get("from"),onChange:this._onDateSelected("from")},l.default.createElement(m.Input,{type:"text",ref:"fromFormatted",value:this._formattedDateStringInUserTZ("from"),onChange:this._rangeParamsChanged("from"),placeholder:T.default.Formats.DATETIME,buttonAfter:l.default.createElement(f.Button,{bsSize:"small",onClick:this._setDateTimeToNow("from")},l.default.createElement("i",{className:"fa fa-magic"})),bsStyle:this._isValidDateField("from")?null:"error",bsSize:"small",required:!0}))),l.default.createElement("div",{className:"col-md-1"},l.default.createElement("p",{className:"text-center",style:{margin:0,lineHeight:"30px"}},"to")),l.default.createElement("div",{className:"col-md-5",style:{padding:0}},l.default.createElement("input",{type:"hidden",name:"to",ref:function(t){e.to=t}}),l.default.createElement(v.DatePicker,{id:"searchToDatePicker",title:"Search end date",date:this.state.rangeParams.get("to"),onChange:this._onDateSelected("to")},l.default.createElement(m.Input,{type:"text",ref:"toFormatted",value:this._formattedDateStringInUserTZ("to"),onChange:this._rangeParamsChanged("to"),placeholder:T.default.Formats.DATETIME,buttonAfter:l.default.createElement(f.Button,{bsSize:"small",onClick:this._setDateTimeToNow("to")},l.default.createElement("i",{className:"fa fa-magic"})),bsStyle:this._isValidDateField("to")?null:"error",bsSize:"small",required:!0})))));break;case"keyword":t=l.default.createElement("div",{className:"timerange-selector keyword",style:{width:650}},l.default.createElement("div",{className:"row no-bm",style:{marginLeft:50}},l.default.createElement("div",{className:"col-md-5",style:{padding:0}},l.default.createElement(m.Input,{type:"text",ref:"keyword",name:"keyword",value:this.state.rangeParams.get("keyword"),onChange:this._keywordSearchChanged,placeholder:"Last week",className:"input-sm",required:!0})),l.default.createElement("div",{className:"col-md-7",style:{paddingRight:0}},this.state.keywordPreview.size>0&&l.default.createElement(f.Alert,{bsStyle:"info",style:{height:30,paddingTop:5,paddingBottom:5,marginTop:0}},l.default.createElement("strong",{style:{marginRight:8}},"Preview:"),this.state.keywordPreview.get("from")," to ",this.state.keywordPreview.get("to")))));break;default:throw new Error("Unsupported range type "+this.state.rangeType)}return t},_getSavedSearchesSelector:function(){var e=this.props.savedSearches.sort(function(e,t){return e.title.toLowerCase().localeCompare(t.title.toLowerCase())}).map(function(e){return{value:e.id,label:e.title}});return l.default.createElement(v.Select,{placeholder:"Saved searches",options:e,value:this.state.savedSearch,onChange:this._onSavedSearchSelect,size:"small"})},render:function(){var e=this;return l.default.createElement("div",{className:"row no-bm"},l.default.createElement("div",{className:"col-md-12",id:"universalsearch-container"},l.default.createElement("div",{className:"row no-bm"},l.default.createElement("div",{ref:"universalSearch",className:"col-md-12",id:"universalsearch"},l.default.createElement("form",{ref:"searchForm",className:"universalsearch-form",action:O.searchBaseLocation("index"),method:"GET",onSubmit:this._performSearch},l.default.createElement("input",{type:"hidden",name:"rangetype",value:this.state.rangeType}),l.default.createElement("input",{type:"hidden",ref:function(t){e.fields=t},name:"fields",value:""}),l.default.createElement("input",{type:"hidden",ref:function(t){e.width=t},name:"width",value:""}),l.default.createElement("input",{type:"hidden",ref:function(t){e.highlightMessage=t},name:"highlightMessage",value:""}),l.default.createElement("div",{className:"timerange-selector-container"},l.default.createElement("div",{className:"row no-bm"},l.default.createElement("div",{className:"col-md-6"},l.default.createElement(f.ButtonToolbar,{className:"timerange-chooser pull-left"},l.default.createElement(f.DropdownButton,{bsStyle:"info",title:l.default.createElement("i",{className:"fa fa-clock-o"}),onSelect:this._rangeTypeChanged,id:"dropdown-timerange-selector"},l.default.createElement(f.MenuItem,{eventKey:"relative",className:"relative"===this.state.rangeType?"selected":null},"Relative"),l.default.createElement(f.MenuItem,{eventKey:"absolute",className:"absolute"===this.state.rangeType?"selected":null},"Absolute"),l.default.createElement(f.MenuItem,{eventKey:"keyword",className:"keyword"===this.state.rangeType?"selected":null},"Keyword"))),this._getRangeTypeSelector()),l.default.createElement("div",{className:"col-md-6"},l.default.createElement("div",{className:"saved-searches-selector-container pull-right",style:{display:"inline-flex",marginRight:5}},this.props.displayRefreshControls&&l.default.createElement("div",{style:{marginRight:5}},l.default.createElement(y.RefreshControls,null)),l.default.createElement("div",{style:{width:270}},this._getSavedSearchesSelector()))))),l.default.createElement("div",{id:"search-container"},l.default.createElement("div",{className:"pull-right search-help"},l.default.createElement(_.default,{page:C.default.PAGES.SEARCH_QUERY_LANGUAGE,title:"Search query syntax documentation",text:l.default.createElement("i",{className:"fa fa-lightbulb-o"})})),l.default.createElement(f.Button,{type:"submit",bsStyle:"success",className:"pull-left"},l.default.createElement("i",{className:"fa fa-search"})),l.default.createElement("div",{className:"query"},l.default.createElement(m.Input,{type:"text",ref:"query",name:"q",value:this.state.query,onChange:this._queryChanged,placeholder:'Type your search query here and press enter. ("not found" AND http) OR http_response_code:[400 TO 404]'}))))))))}});exports.default=B,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(118),u=a.default.createClass({displayName:"SearchExecutionError",propTypes:{error:i.default.object.isRequired},_getFormattedErrorDetails:function(e){return e.map(function(e){return a.default.createElement("li",null,a.default.createElement("code",null,e))})},render:function(){var e=this.props.error;return a.default.createElement("div",null,a.default.createElement(s.Row,{className:"content content-head"},a.default.createElement(s.Col,{md:12},a.default.createElement("h1",null,"Could not execute search"),a.default.createElement("div",null,a.default.createElement("p",null,"There was an error executing your search. Please check your Graylog server logs for more information."),a.default.createElement(s.Panel,{bsStyle:"danger"},a.default.createElement("dl",{style:{marginBottom:0}},a.default.createElement("dt",null,"Error Message:"),a.default.createElement("dd",null,e.body.message?e.body.message:""),a.default.createElement("dt",null,"Details:"),a.default.createElement("dd",null,e.body.message?this._getFormattedErrorDetails(e.body.details):""),a.default.createElement("dt",null,"Search status code:"),a.default.createElement("dd",null,e.status),a.default.createElement("dt",null,"Search response:"),a.default.createElement("dd",null,e.message)))))),a.default.createElement(l.ContactUs,null))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(18),l=n(s),u=t(3),c=t(11),d=t(29),h=t(9),f=n(h),p=t(34);t(688);var g=f.default.getStore("Search"),m=a.default.createClass({displayName:"SearchResult",propTypes:{query:i.default.string,builtQuery:i.default.string,result:i.default.object.isRequired,histogram:i.default.object.isRequired,formattedHistogram:i.default.array,searchInStream:i.default.object,streams:i.default.instanceOf(l.default.Map),inputs:i.default.instanceOf(l.default.Map),nodes:i.default.instanceOf(l.default.Map),permissions:i.default.array.isRequired,searchConfig:i.default.object.isRequired,loadingSearch:i.default.bool,forceFetch:i.default.bool},getDefaultProps:function(){return{query:"*",builtQuery:"",formattedHistogram:[],searchInStream:null,streams:l.default.Map({}),inputs:l.default.Map({}),nodes:l.default.Map({})}},getInitialState:function(){return{selectedFields:this.sortFields(g.fields),showAllFields:!1,shouldHighlight:!0,savedSearch:g.savedSearch}},componentDidUpdate:function(){this._resetSelectedFields()},onFieldToggled:function(e){var t=this.state.selectedFields,n=void 0;n=t.contains(e)?t.delete(e):t.add(e),this.updateSelectedFields(n)},_resetSelectedFields:function(){this.state.savedSearch!==g.savedSearch&&this.setState({savedSearch:g.savedSearch,selectedFields:this.sortFields(g.fields)})},togglePageFields:function(){this.setState({showAllFields:!this.state.showAllFields})},predefinedFieldSelection:function(e){"none"===e?this.updateSelectedFields(l.default.Set()):"all"===e?this.updateSelectedFields(l.default.Set(this._fields().map(function(e){return e.name}))):"default"===e&&this.updateSelectedFields(l.default.Set(["message","source"]))},updateSelectedFields:function(e){var t=this.sortFields(e);g.fields=t,this.setState({selectedFields:t})},_fields:function(){return this.props.result[this.state.showAllFields?"all_fields":"fields"]},sortFields:function(e){var t=e,n=l.default.OrderedSet();t.contains("source")&&(n=n.add("source")),t=t.delete("source");var r=t.sort(function(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())});return n.concat(r)},addFieldAnalyzer:function(e,t){this.refs[e].addField(t)},_fieldAnalyzers:function(e){return p.PluginStore.exports("fieldAnalyzers").filter(function(t){return void 0===e||e(t)})},_fieldAnalyzerComponents:function(e){var t=this,n=g.getOriginalSearchURLParams().toJS(),r={};return["relative","from","to","keyword"].forEach(function(e){n[e]&&(r[e]=n[e])}),this._fieldAnalyzers(e).map(function(e,i){return a.default.createElement(e.component,{key:i,ref:e.refId,permissions:t.props.permissions,query:n.q,page:n.page,rangeType:n.rangetype,rangeParams:r,stream:t.props.searchInStream,resolution:t.props.histogram.interval,from:t.props.histogram.histogram_boundaries.from,to:t.props.histogram.histogram_boundaries.to,forceFetch:t.props.forceFetch,fields:t.props.result.all_fields})})},_shouldRenderAboveHistogram:function(e){return e.displayPriority>0},_shouldRenderBelowHistogram:function(e){return e.displayPriority<=0},_toggleShouldHighlight:function(){this.setState({shouldHighlight:!this.state.shouldHighlight})},render:function(){var e=this,t=l.default.fromJS(this.props.result.messages).some(function(e){return null!==e.get("highlight_ranges")}),n=void 0;return this.props.loadingSearch&&(n=a.default.createElement(c.LoadingIndicator,{text:"Updating search results..."})),0===this.props.result.total_results?a.default.createElement("div",null,a.default.createElement(d.NoSearchResults,{builtQuery:this.props.builtQuery,histogram:this.props.histogram,permissions:this.props.permissions,searchInStream:this.props.searchInStream}),n):a.default.createElement(u.Row,{id:"main-content-search"},a.default.createElement(u.Col,{ref:"opa",md:3,sm:12,id:"sidebar"},a.default.createElement(d.SearchSidebar,{result:this.props.result,builtQuery:this.props.builtQuery,selectedFields:this.state.selectedFields,fields:this._fields(),fieldAnalyzers:this._fieldAnalyzers(),showAllFields:this.state.showAllFields,togglePageFields:this.togglePageFields,onFieldToggled:this.onFieldToggled,onFieldAnalyzer:this.addFieldAnalyzer,predefinedFieldSelection:this.predefinedFieldSelection,showHighlightToggle:t,shouldHighlight:this.state.shouldHighlight,toggleShouldHighlight:this._toggleShouldHighlight,currentSavedSearch:g.savedSearch,searchInStream:this.props.searchInStream,permissions:this.props.permissions,loadingSearch:this.props.loadingSearch,searchConfig:this.props.searchConfig})),a.default.createElement(u.Col,{md:9,sm:12,id:"main-content-sidebar"},this._fieldAnalyzerComponents(function(t){return e._shouldRenderAboveHistogram(t)}),a.default.createElement(d.LegacyHistogram,{formattedHistogram:this.props.formattedHistogram,histogram:this.props.histogram,permissions:this.props.permissions,stream:this.props.searchInStream}),this._fieldAnalyzerComponents(function(t){return e._shouldRenderBelowHistogram(t)}),a.default.createElement(d.ResultTable,{messages:this.props.result.messages,page:g.page,selectedFields:this.state.selectedFields,sortField:g.sortField,sortOrder:g.sortOrder,resultCount:this.props.result.total_results,inputs:this.props.inputs,streams:this.props.streams,nodes:this.props.nodes,highlight:this.state.shouldHighlight,searchConfig:this.props.searchConfig}),n))}});exports.default=m,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.LegacyFieldGraph=exports.FieldStatistics=exports.FieldQuickValues=exports.FieldGraphs=void 0;var r=t(689);Object.defineProperty(exports,"FieldGraphs",{enumerable:!0,get:function(){return n(r).default}});var i=t(690);Object.defineProperty(exports,"FieldQuickValues",{enumerable:!0,get:function(){return n(i).default}});var o=t(696);Object.defineProperty(exports,"FieldStatistics",{enumerable:!0,get:function(){return n(o).default}});var a=t(194);Object.defineProperty(exports,"LegacyFieldGraph",{enumerable:!0,get:function(){return n(a).default}});var s=t(34),l=n(o),u=n(i),c=n(r),d=new s.PluginManifest({},{fieldAnalyzers:[{refId:"fieldStatisticsComponent",displayName:"Statistics",component:l.default,displayPriority:2},{refId:"fieldQuickValuesComponent",displayName:"Quick values",component:u.default,displayPriority:1},{refId:"fieldGraphsComponent",displayName:"Generate chart",component:c.default,displayPriority:0}]}),h=s.PluginStore.exports("fieldAnalyzers").map(function(e){return e.refId});d.exports.fieldAnalyzers.every(function(e){return h.includes(e.refId)})||s.PluginStore.register(d)},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(17),l=n(s),u=t(18),c=n(u),d=t(87),h=n(d),f=t(194),p=n(f),g=t(9),m=n(g),v=t(119),y=n(v),b=m.default.getStore("FieldGraphs"),_=a.default.createClass({displayName:"FieldGraphs",propTypes:{from:i.default.any.isRequired,to:i.default.any.isRequired,resolution:i.default.any.isRequired,stream:i.default.object,permissions:i.default.arrayOf(i.default.string).isRequired},mixins:[h.default],getInitialState:function(){return this.notifyOnNewGraphs=!1,{fieldGraphs:c.default.fromJS(b.fieldGraphs.toJS()),stackedGraphs:c.default.fromJS(b.stackedGraphs.toJS())}},componentDidMount:function(){var e=this;this.initialFieldGraphs=this.state.fieldGraphs,this.notifyOnNewGraphs=!0,b.onFieldGraphsUpdated=function(t){return e.setState({fieldGraphs:c.default.fromJS(t.toJS())})},b.onFieldGraphsMerged=function(t){return e.setState({stackedGraphs:c.default.fromJS(t.toJS())})},b.onFieldGraphCreated=function(t){if(e.notifyOnNewGraphs&&!e.initialFieldGraphs.has(t)){var n=l.default.findDOMNode(e.refs[t]);y.default.scrollToHint(n)}}},componentWillUnmount:function(){b.resetStore()},addField:function(e){var t=this.props.stream?this.props.stream.id:void 0;b.newFieldGraph(e,{interval:this.props.resolution,streamid:t})},deleteFieldGraph:function(e){b.deleteGraph(e)},render:function(){var e=this,t=this.state.fieldGraphs.sortBy(function(e){return e.createdAt}).map(function(t,n){return a.default.createElement(p.default,{key:n,ref:n,graphId:n,graphOptions:t.toJS(),onDelete:function(){return e.deleteFieldGraph(n)},from:e.props.from,to:e.props.to,permissions:e.props.permissions,stacked:e.state.stackedGraphs.has(n),hidden:e.state.stackedGraphs.some(function(e){return e.has(n)})})});return a.default.createElement("div",{id:"field-graphs"},t.valueSeq())}});exports.default=_,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(17),l=n(s),u=t(3),c=t(2),d=n(c),h=t(56),f=n(h),p=t(188),g=t(43),m=n(g),v=t(111),y=n(v),b=t(119),_=n(b),w=t(691),C=n(w),A=t(694),E=n(A),S=t(25),x=n(S),F=x.default.get("FieldQuickValues"),k=F.FieldQuickValuesStore,D=F.FieldQuickValuesActions,T=x.default.get("Refresh"),M=T.RefreshStore,R=x.default.get("System"),O=R.SystemStore,L=a.default.createClass({displayName:"FieldQuickValues",propTypes:{permissions:i.default.arrayOf(i.default.string).isRequired,query:i.default.string.isRequired,rangeType:i.default.string.isRequired,rangeParams:i.default.object.isRequired,stream:i.default.object,forceFetch:i.default.bool,fields:i.default.arrayOf(i.default.object)},mixins:[d.default.listenTo(M,"_setupTimer","_setupTimer"),d.default.connect(k)],DEFAULT_OPTIONS:{order:"desc",limit:5,tableSize:50,stackedFields:"",interval:void 0},getDefaultProps:function(){return{fields:[]}},getInitialState:function(){return{field:void 0,data:[],showVizOptions:!1,showHistogram:!1,options:this.DEFAULT_OPTIONS,loadingData:!1,disableStackedFields:!1}},componentDidMount:function(){this._loadQuickValuesData()},componentWillReceiveProps:function(e){(this.props.query!==e.query||this.props.rangeType!==e.rangeType||JSON.stringify(this.props.rangeParams)!==JSON.stringify(e.rangeParams)||this.props.stream!==e.stream||e.forceFetch)&&this._loadQuickValuesData()},componentDidUpdate:function(e,t){if(this.state.field!==t.field){var n=l.default.findDOMNode(this);_.default.scrollToHint(n)}},componentWillUnmount:function(){this._stopTimer()},WIDGET_TYPE:"QUICKVALUES",WIDGET_TYPE_HISTOGRAM:"QUICKVALUES_HISTOGRAM",_setupTimer:function(e){this._stopTimer(),e.enabled&&(this.timer=setInterval(this._loadQuickValuesData,e.interval))},_stopTimer:function(){this.timer&&clearInterval(this.timer)},addField:function(e){var t=this;this.setState({field:e,showHistogram:!1,showVizOptions:!1,options:this.DEFAULT_OPTIONS},function(){return t._loadQuickValuesData(!1)})},_buildFieldQueryObjects:function(){var e=this,t=Object.keys(this.state.data.terms).reduce(function(t,n){return t.push({field:n,count:e.state.data.terms[n]}),t},[]),n=(0,f.default)(t).dimension(function(e){return e.count}),r=void 0;return r="desc"===this.state.options.order?n.top(this.state.options.limit):n.bottom(this.state.options.limit),r.reduce(function(t,n){return t.push(e.state.data.terms_mapping[n.field]),t},[])},_loadQuickValuesData:function(){var e=this;void 0!==this.state.field&&(this.setState({loadingData:!0}),this.state.showHistogram?D.getHistogram(this.state.field,this.state.fieldQueryObjects,this.state.options).finally(function(){e.setState({loadingData:!1})}):D.get(this.state.field,this.state.options).finally(function(){e.setState({loadingData:!1})}))},_resetStatus:function(){this.setState(this.getInitialState())},_onVizOptionsChange:function(e){var t=this;this.setState({options:e,showVizOptions:!1},function(){return t._loadQuickValuesData()})},_onVizOptionsCancel:function(){this.setState({showVizOptions:!1})},_showVizOptions:function(){var e=this;O.elasticsearchVersion().then(function(t){t.major<5&&e.setState({disableStackedFields:!0})}),this.setState({showVizOptions:!0})},_showHistogram:function(){this.setState({data:[],fieldQueryObjects:this._buildFieldQueryObjects(),showHistogram:!0},this._loadQuickValuesData)},_showOverview:function(){this.setState({data:[],showHistogram:!1},this._loadQuickValuesData)},_buildDashboardConfig:function(e){var t={field:this.state.field,limit:this.state.options.limit,sort_order:this.state.options.order,stacked_fields:this.state.options.stackedFields};return e?Object.assign(t,{interval:this.state.options.interval}):Object.assign(t,{data_table_limit:this.state.options.tableSize})},render:function(){var e=this,t=void 0,n=void 0;if(this.state.showVizOptions)n=a.default.createElement("div",{className:E.default.optionsFormWrapper},a.default.createElement(C.default,{limit:this.state.options.limit,tableSize:this.state.options.tableSize,order:this.state.options.order,stackedFields:this.state.options.stackedFields,stackedFieldsOptions:this.props.fields,disableStackedFields:this.state.disableStackedFields,field:this.state.field,interval:this.state.options.interval,isHistogram:this.state.showHistogram,onSave:this._onVizOptionsChange,onCancel:this._onVizOptionsCancel}));else if(this.state.loadingData||0===this.state.data.length)n=a.default.createElement("div",{className:E.default.spinnerWrapper},a.default.createElement(y.default,null));else if(this.state.showHistogram){var r={sort_order:this.state.options.order,limit:this.state.options.limit,interval:this.state.options.interval,field:this.state.field};n=a.default.createElement("div",{className:E.default.visualizationWrapper},a.default.createElement(p.QuickValuesHistogramVisualization,{id:this.state.field,config:r,data:this.state.data}))}else{var i={show_pie_chart:!0,show_data_table:!0,data_table_limit:this.state.options.tableSize,sort_order:this.state.options.order,limit:this.state.options.limit};n=a.default.createElement("div",{className:E.default.visualizationWrapper},a.default.createElement(p.QuickValuesVisualization,{id:this.state.field,field:this.state.field,fields:[this.state.field].concat(this.state.options.stackedFields.split(",")),config:i,data:this.state.data,horizontal:!0,displayAddToSearchButton:!0,displayAnalysisInformation:!0}))}if(void 0!==this.state.field){var o=void 0,s=void 0;this.state.showHistogram?(o=a.default.createElement(u.MenuItem,{onSelect:this._showOverview},"Show overview"),s=this.WIDGET_TYPE_HISTOGRAM):(o=a.default.createElement(u.MenuItem,{onSelect:this._showHistogram},"Show as histogram"),s=this.WIDGET_TYPE);var l=a.default.createElement(u.DropdownButton,{bsSize:"small",className:"graph-settings",title:"Customize",id:"customize-field-graph-dropdown",pullRight:!0},a.default.createElement(u.MenuItem,{onSelect:this._showVizOptions},"Configuration"),o),c=void 0;c=this.state.options.stackedFields?this.state.field+", "+this.state.options.stackedFields:this.state.field,t=a.default.createElement("div",{className:"content-col"},a.default.createElement("div",{className:"pull-right"},a.default.createElement(m.default,{title:"Add to dashboard",widgetType:s,configuration:this._buildDashboardConfig(this.state.showHistogram),pullRight:!0,permissions:this.props.permissions,appendMenus:l},a.default.createElement(u.Button,{bsSize:"small",onClick:function(){return e._resetStatus()}},a.default.createElement("i",{className:"fa fa-close"})))),a.default.createElement("h1",null,"Quick Values for ",a.default.createElement("em",null,c)," ",this.state.loadPending&&a.default.createElement("i",{className:"fa fa-spin fa-spinner"})),n)}return a.default.createElement("div",{id:"field-quick-values"},t)}});exports.default=L,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(0),i=n(r),o=t(1),a=n(o),s=t(35),l=n(s),u=t(3),c=t(13),d=t(11),h=t(39),f=n(h),p=t(189),g=n(p),m=t(692),v=n(m),y=i.default.createClass({displayName:"QuickValuesOptionsForm",propTypes:{limit:a.default.number.isRequired,tableSize:a.default.number.isRequired,order:a.default.string.isRequired,field:a.default.string.isRequired,stackedFields:a.default.string,stackedFieldsOptions:a.default.arrayOf(a.default.object).isRequired,disableStackedFields:a.default.bool,interval:a.default.string,isHistogram:a.default.bool.isRequired,onSave:a.default.func.isRequired,onCancel:a.default.func.isRequired},getDefaultProps:function(){return{disableStackedFields:!1}},getInitialState:function(){return{limit:this.props.limit,tableSize:this.props.tableSize,order:this.props.order,stackedFields:this.props.stackedFields,interval:this.props.interval}},_changeConfig:function(e,t){var n=l.default.cloneDeep(this.state);n[e]=t,this.setState(n)},_onChange:function(e){this._changeConfig(e.target.name,f.default.getValueFromInput(e.target))},_onStackedFieldChange:function(e){this._changeConfig("stackedFields",e)},_onIntervalChange:function(e){this._changeConfig("interval",e)},_onCancel:function(){this.props.onCancel()},_onSave:function(e){e.preventDefault(),this.props.onSave(this.state)},render:function(){var e=this,t=this.props.stackedFieldsOptions.filter(function(e){return!e.name.startsWith("gl2_")}).filter(function(t){return t.name!==e.props.field}).map(function(e){return{value:e.name,label:e.name}}),n=null,r=null;if(this.props.isHistogram){var o=g.default.histogramIntervals().map(function(e){return{value:e,label:e}});r=i.default.createElement(u.FormGroup,null,i.default.createElement(u.ControlLabel,null,"Interval"),i.default.createElement(d.Select,{options:o,value:this.state.interval,onChange:this._onIntervalChange}))}else n=i.default.createElement(c.Input,{type:"number",id:"tableSize",name:"tableSize",label:"Total table size",required:!0,onChange:this._onChange,value:this.state.tableSize});var a="Select fields for stacking...";return this.props.disableStackedFields&&(a="Feature requires Elasticsearch version >= 5"),i.default.createElement(u.Row,null,i.default.createElement(u.Col,{md:6},i.default.createElement("form",{className:"form",onSubmit:this._onSave},i.default.createElement("fieldset",{className:v.default.optionsFieldSet},i.default.createElement(c.Input,{type:"number",id:"limit",name:"limit",label:"Number of top/bottom values",autoFocus:!0,required:!0,onChange:this._onChange,value:this.state.limit}),n,i.default.createElement(u.FormGroup,null,i.default.createElement(u.ControlLabel,null,"Sort options"),i.default.createElement(c.Input,{type:"radio",name:"order",label:"Top values",checked:"desc"===this.state.order,value:"desc",onChange:this._onChange}),i.default.createElement(c.Input,{type:"radio",name:"order",label:"Bottom values",checked:"asc"===this.state.order,value:"asc",onChange:this._onChange})),i.default.createElement(u.FormGroup,null,i.default.createElement(u.ControlLabel,null,"Stacked fields"),i.default.createElement(d.MultiSelect,{options:t,value:this.state.stackedFields,disabled:this.props.disableStackedFields,placeholder:a,onChange:this._onStackedFieldChange})),r,i.default.createElement(u.ButtonToolbar,null,i.default.createElement(u.Button,{type:"submit",bsStyle:"success",bsSize:"small"},"Update"),i.default.createElement(u.Button,{bsSize:"small",onClick:this._onCancel},"Cancel"))))))}});exports.default=y,e.exports=exports.default},function(e,exports,t){var n=t(693);"string"==typeof n&&(n=[[e.i,n,""]]);var r={};r.transform=void 0;t(15)(n,r);n.locals&&(e.exports=n.locals)},function(e,exports,t){exports=e.exports=t(14)(void 0),exports.push([e.i,"._2bVmo3jGQbBE0Kce7wO7wh{padding-left:15px}",""]),exports.locals={optionsFieldSet:"_2bVmo3jGQbBE0Kce7wO7wh"}},function(e,exports,t){var n=t(695);"string"==typeof n&&(n=[[e.i,n,""]]);var r={};r.transform=void 0;t(15)(n,r);n.locals&&(e.exports=n.locals)},function(e,exports,t){exports=e.exports=t(14)(void 0),exports.push([e.i,"._1BWvQorww983fIs9ZyG2-Z{margin-top:10px}._3jeuGPHBKSiQlm1dDsmZRu,.yqY8uPLK_UE357mBjbTbm{max-height:400px;margin-top:10px}.yqY8uPLK_UE357mBjbTbm{overflow:auto}",""]),exports.locals={optionsFormWrapper:"_1BWvQorww983fIs9ZyG2-Z",spinnerWrapper:"_3jeuGPHBKSiQlm1dDsmZRu",visualizationWrapper:"yqY8uPLK_UE357mBjbTbm"}},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(2),l=n(s),u=t(18),c=n(u),d=t(3),h=t(43),f=n(h),p=t(9),g=n(p),m=t(32),v=n(m),y=t(7),b=n(y),_=g.default.getStore("FieldStatistics"),w=g.default.getStore("Refresh"),C=a.default.createClass({displayName:"FieldStatistics",propTypes:{permissions:i.default.arrayOf(i.default.string).isRequired,query:i.default.string.isRequired,rangeType:i.default.string.isRequired,rangeParams:i.default.object.isRequired,stream:i.default.object,forceFetch:i.default.bool},mixins:[l.default.listenTo(w,"_setupTimer","_setupTimer")],getInitialState:function(){return{statsLoadPending:c.default.Map(),fieldStatistics:c.default.Map(),sortBy:"field",sortDescending:!1}},componentWillReceiveProps:function(e){(this.props.query!==e.query||this.props.rangeType!==e.rangeType||JSON.stringify(this.props.rangeParams)!==JSON.stringify(e.rangeParams)||this.props.stream!==e.stream||e.forceFetch)&&this._reloadAllStatistics()},WIDGET_TYPE:"STATS_COUNT",_setupTimer:function(e){this._stopTimer(),e.enabled&&(this.timer=setInterval(this._reloadAllStatistics,e.interval))},_stopTimer:function(){this.timer&&clearInterval(this.timer)},addField:function(e){this._reloadFieldStatistics(e)},_reloadAllStatistics:function(){var e=this;this.state.fieldStatistics.keySeq().forEach(function(t){return e._reloadFieldStatistics(t)})},_reloadFieldStatistics:function(e){var t=this;if(this.isMounted){this.setState({statsLoadPending:this.state.statsLoadPending.set(e,!0)});_.getFieldStatistics(e).then(function(n){t.setState({fieldStatistics:t.state.fieldStatistics.set(e,n),statsLoadPending:t.state.statsLoadPending.set(e,!1)})}).catch(function(n){n.additional&&400===n.additional.status?t.setState({fieldStatistics:t.state.fieldStatistics.delete(e),statsLoadPending:t.state.statsLoadPending.delete(e)}):b.default.error("Loading field statistics failed with status: "+n,"Could not load field statistics")})}},_changeSortOrder:function(e){this.state.sortBy===e?this.setState({sortDescending:!this.state.sortDescending}):this.setState({sortBy:e,sortDescending:!1})},_resetStatus:function(){this.setState(this.getInitialState())},_renderStatistics:function(){var e=this,t=[];return this.state.fieldStatistics.keySeq().sort(function(t,n){var r=e.state.sortDescending?n:t,i=e.state.sortDescending?t:n;if("field"===e.state.sortBy)return r.toLowerCase().localeCompare(i.toLowerCase());var o=e.state.fieldStatistics.get(r)[e.state.sortBy],a=e.state.fieldStatistics.get(i)[e.state.sortBy];return v.default.normalizeNumber(o)-v.default.normalizeNumber(a)}).forEach(function(n){var r=e.state.fieldStatistics.get(n),i=null;e.state.statsLoadPending.get(n)&&(i=a.default.createElement("i",{className:"fa fa-spin fa-spinner"})),t.push(a.default.createElement("tr",{key:n},a.default.createElement("td",null,i),a.default.createElement("td",null,n),_.FUNCTIONS.keySeq().map(function(e){var t=v.default.isNumber(r[e])?v.default.formatNumber(r[e]):r[e],n={};return"NaN"!==t&&"-Infinity"!==t&&"Infinity"!==t&&"N/A"!==t||(n.color="lightgray"),a.default.createElement("td",{key:e+"-td"},a.default.createElement("span",{style:n},t))})))}),t},_renderStatisticalFunctionsHeaders:function(){var e=this;return _.FUNCTIONS.keySeq().map(function(t){return a.default.createElement("th",{key:t+"-th",onClick:function(){return e._changeSortOrder(t)}},_.FUNCTIONS.get(t)," ",e._getHeaderCaret(t))})},_getHeaderCaret:function(e){return this.state.sortBy!==e?null:this.state.sortDescending?a.default.createElement("i",{className:"fa fa-caret-down"}):a.default.createElement("i",{className:"fa fa-caret-up"})},render:function(){var e=this,t=void 0;return this.state.fieldStatistics.isEmpty()?this.state.statsLoadPending.isEmpty()||(t=a.default.createElement("div",{className:"content-col"},a.default.createElement("h1",null,"Field Statistics ",a.default.createElement("i",{className:"fa fa-spin fa-spinner"})))):t=a.default.createElement("div",{className:"content-col"},a.default.createElement("div",{className:"pull-right"},a.default.createElement(f.default,{title:"Add to dashboard",widgetType:this.WIDGET_TYPE,fields:this.state.fieldStatistics.keySeq().toJS(),pullRight:!0,permissions:this.props.permissions},a.default.createElement(d.Button,{bsSize:"small",onClick:function(){return e._resetStatus()}},a.default.createElement("i",{className:"fa fa-close"})))),a.default.createElement("h1",null,"Field Statistics"),a.default.createElement("div",{className:"table-responsive"},a.default.createElement("table",{className:"table table-striped table-bordered table-hover table-condensed"},a.default.createElement("thead",null,a.default.createElement("tr",null,a.default.createElement("th",{style:{width:24}}),a.default.createElement("th",{onClick:function(){return e._changeSortOrder("field")}},"Field ",this._getHeaderCaret("field")),this._renderStatisticalFunctionsHeaders())),a.default.createElement("tbody",null,this._renderStatistics())))),a.default.createElement("div",{id:"field-statistics"},t)}});exports.default=C,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(17),l=n(s),u=t(3),c=t(698),d=t(24),h=n(d),f=t(45),p=n(f),g=t(67),m=n(g),v=t(11),y=t(20),b=n(y),_=t(9),w=n(_),C=t(29),A=t(54),E=n(A),S=t(4),x=n(S),F=t(10),k=n(F),D=t(58),T=n(D),M=w.default.getStore("Session"),R=w.default.getStore("Search"),O=a.default.createClass({displayName:"SearchSidebar",propTypes:{builtQuery:i.default.any,currentSavedSearch:i.default.string,fields:i.default.array,fieldAnalyzers:i.default.array,onFieldAnalyzer:i.default.func,onFieldToggled:i.default.func,permissions:i.default.array,predefinedFieldSelection:i.default.func,result:i.default.object,searchInStream:i.default.object,selectedFields:i.default.object,shouldHighlight:i.default.bool,showAllFields:i.default.bool,showHighlightToggle:i.default.bool,togglePageFields:i.default.func,toggleShouldHighlight:i.default.func,loadingSearch:i.default.bool,searchConfig:i.default.object.isRequired},getInitialState:function(){return{availableHeight:1e3,lastResultsUpdate:b.default.now().toISOString()}},componentDidMount:function(){this._updateHeight(),window.addEventListener("resize",this._resizeCallback)},componentWillReceiveProps:function(e){this.props.loadingSearch&&!e.loadingSearch&&this.setState({lastResultsUpdate:b.default.now().toISOString()})},componentWillUnmount:function(){window.removeEventListener("resize",this._resizeCallback)},eventsThrottler:new T.default,SIDEBAR_MARGIN_BOTTOM:10,_resizeCallback:function(){var e=this;this.eventsThrottler.throttle(function(){return e._updateHeight()})},_updateHeight:function(){var e=window.innerHeight,t=l.default.findDOMNode(this.refs.sidebar),n=window.getComputedStyle(l.default.findDOMNode(t)),r=parseFloat(n.getPropertyValue("padding-bottom")),i=e-r-this.SIDEBAR_MARGIN_BOTTOM;this.setState({availableHeight:i})},_getURLForExportAsCSV:function(){var e=R.getOriginalSearchURLParams(),t=this.props.searchInStream?this.props.searchInStream.id:void 0,n=""===e.get("q")?"*":e.get("q"),r=this.props.selectedFields,i=e.get("rangetype"),o={};switch(i){case"relative":o.range=e.get("relative");break;case"absolute":o.from=e.get("from"),o.to=e.get("to");break;case"keyword":o.keyword=e.get("keyword")}var a=new p.default(x.default.qualifyUrl(k.default.UniversalSearchApiController.export(i,n,o,t,0,0,r.toJS()).url));return x.default.areCredentialsInURLSupported()&&a.username(M.getSessionId()).password("session"),a.toString()},_closeModal:function(e){return function(){return e.close()}},_openModal:function(e){return function(){[arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1]].some(function(e){return!(!e||!e.preventDefault)&&(e.preventDefault(),!0)}),e.open()}},_getExportModal:function(){var e=this,t=x.default.areCredentialsInURLSupported()?'Please right click the download link below and choose "Save Link As..." to download the CSV file.':"Please click the download link below. Your browser may ask for your username and password to download the CSV file.";return a.default.createElement(E.default,{ref:function(t){e.exportModal=t}},a.default.createElement(u.Modal.Header,{closeButton:!0},a.default.createElement(u.Modal.Title,null,"Export search results as CSV")),a.default.createElement(u.Modal.Body,null,a.default.createElement("p",null,t),a.default.createElement("p",null,a.default.createElement("a",{href:this._getURLForExportAsCSV(),target:"_blank"},a.default.createElement("i",{className:"fa fa-cloud-download"}),"  Download"))),a.default.createElement(u.Modal.Footer,null,a.default.createElement(u.Button,{onClick:this._closeModal(this.exportModal)},"Close")))},render:function(){var e=this,t=this.props.result.used_indices.sort(function(e,t){return(0,m.default)(e.index_name.toLowerCase(),t.index_name.toLowerCase())}).map(function(e){return a.default.createElement("li",{key:e.index_name}," ",e.index_name)}),n=a.default.createElement(E.default,{ref:function(t){e.indicesModal=t}},a.default.createElement(u.Modal.Header,{closeButton:!0},a.default.createElement(u.Modal.Title,null,"Used indices")),a.default.createElement(u.Modal.Body,null,a.default.createElement("p",null,"Graylog is intelligently selecting the indices it needs to search upon based on the time frame you selected. This list of indices is mainly useful for debugging purposes."),a.default.createElement("h4",null,"Indices used for this search:"),a.default.createElement("ul",{className:"index-list"},t)),a.default.createElement(u.Modal.Footer,null,a.default.createElement(u.Button,{onClick:this._closeModal(this.indicesModal)},"Close"))),r=null,i=[a.default.createElement(u.MenuItem,{key:"export",onSelect:this._openModal(this.exportModal)},"Export as CSV")];return r=this.props.searchInStream?a.default.createElement("span",null,this.props.searchInStream.title):a.default.createElement("span",null,"Search result"),i.push(a.default.createElement(u.MenuItem,{divider:!0,key:"div2"})),i.push(a.default.createElement(u.MenuItem,{key:"showQuery",onSelect:this._openModal(this.showQueryModal)},"Show query")),a.default.createElement(c.AutoAffix,{affixClassName:"affix"},a.default.createElement("div",{className:"content-col",ref:"sidebar",style:{top:void 0,position:void 0}},a.default.createElement("div",null,a.default.createElement("h2",null,r),a.default.createElement("p",{style:{marginTop:3}},"Found ",a.default.createElement("strong",null,(0,h.default)(this.props.result.total_results).format("0,0")," messages")," ","in ",(0,h.default)(this.props.result.time).format("0,0")," ms, searched in ",a.default.createElement("a",{href:"#",onClick:this._openModal(this.indicesModal)},this.props.result.used_indices.length," ",1===this.props.result.used_indices.length?"index":"indices"),".",n,a.default.createElement("br",null),"Results retrieved at ",a.default.createElement(v.Timestamp,{dateTime:this.state.lastResultsUpdate,format:b.default.Formats.DATETIME}),"."),a.default.createElement("div",{className:"actions"},a.default.createElement(C.AddSearchCountToDashboard,{searchInStream:this.props.searchInStream,permissions:this.props.permissions}),a.default.createElement(C.SavedSearchControls,{currentSavedSearch:this.props.currentSavedSearch}),a.default.createElement("div",{style:{display:"inline-block"}},a.default.createElement(u.DropdownButton,{bsSize:"small",title:"More actions",id:"search-more-actions-dropdown"},i),a.default.createElement(C.ShowQueryModal,{key:"debugQuery",ref:function(t){e.showQueryModal=t},builtQuery:this.props.builtQuery}))),this._getExportModal(),a.default.createElement("hr",null)),a.default.createElement(u.Tabs,{id:"searchSidebarTabs",animation:!1},a.default.createElement(u.Tab,{eventKey:1,title:a.default.createElement("h4",null,"Fields")},a.default.createElement(C.FieldAnalyzersSidebar,{fields:this.props.fields,fieldAnalyzers:this.props.fieldAnalyzers,onFieldAnalyzer:this.props.onFieldAnalyzer,onFieldToggled:this.props.onFieldToggled,maximumHeight:this.state.availableHeight,predefinedFieldSelection:this.props.predefinedFieldSelection,result:this.props.result,searchConfig:this.props.searchConfig,selectedFields:this.props.selectedFields,shouldHighlight:this.props.shouldHighlight,showAllFields:this.props.showAllFields,showHighlightToggle:this.props.showHighlightToggle,togglePageFields:this.props.togglePageFields,toggleShouldHighlight:this.props.toggleShouldHighlight})),a.default.createElement(u.Tab,{eventKey:2,title:a.default.createElement("h4",null,"Decorators")},a.default.createElement(C.DecoratorSidebar,{stream:this.props.searchInStream?this.props.searchInStream.id:void 0,maximumHeight:this.state.availableHeight})))))}});exports.default=O,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.RootCloseWrapper=exports.Transition=exports.Position=exports.Portal=exports.Overlay=exports.Modal=exports.AutoAffix=exports.Affix=void 0;var r=t(195),i=n(r),o=t(706),a=n(o),s=t(709),l=n(s),u=t(710),c=n(u),d=t(711),h=n(d),f=t(712),p=n(f),g=t(713),m=n(g),v=t(714),y=n(v);exports.Affix=i.default,exports.AutoAffix=a.default,exports.Modal=l.default,exports.Overlay=c.default,exports.Portal=h.default,exports.Position=p.default,exports.Transition=m.default,exports.RootCloseWrapper=y.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n=(0,s.default)(e);return n?n.innerHeight:t?e.clientHeight:(0,o.default)(e).height}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var i=t(120),o=n(i),a=t(700),s=n(a);e.exports=exports.default},function(e,exports,t){e.exports=t(8)(613)},function(e,exports,t){e.exports=t(8)(706)},function(e,exports,t){e.exports=t(8)(648)},function(e,exports,t){e.exports=t(8)(604)},function(e,exports,t){"use strict";function n(e){var t=(0,i.default)(e);return t&&t.defaultView||t.parentWindow}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=n;var r=t(705),i=function(e){return e&&e.__esModule?e:{default:e}}(r);e.exports=exports.default},function(e,exports,t){e.exports=t(8)(606)},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(exports,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t=0},_fieldAnalyzersList:function(){var e=this,t=void 0;return t=this._analyzerIsDisabled(this.props.field.name)?a.default.createElement("li",{key:"field-analyzers-disabled"},"Analysis features for this field have been disabled by the administrator."):this.props.fieldAnalyzers.sort(function(e,t){return(0,u.default)(e.displayName,t.displayName)}).map(function(t,n){return a.default.createElement("li",{key:"field-analyzer-button-"+n},a.default.createElement("a",{href:"#",onClick:e._onFieldAnalyzer(t.refId,e.props.field.name)},t.displayName))}),a.default.createElement(s.Panel,{className:"field-analyzer"},a.default.createElement("ul",null,t))},_toggleFieldAnalyzers:function(e){e.preventDefault(),this.setState({showActions:!this.state.showActions})},render:function(){var e=this,t="fa fa-fw open-analyze-field ";t+=this.state.showActions?"open-analyze-field-active fa-caret-down":"fa-caret-right";var n=void 0;return this.state.showActions&&(n=this._fieldAnalyzersList()),a.default.createElement("li",null,a.default.createElement("div",{className:"pull-left"},a.default.createElement("a",{href:"#",onClick:this._toggleFieldAnalyzers},a.default.createElement("i",{className:t}))),a.default.createElement("div",{className:"field-selector"},a.default.createElement(c.Input,{type:"checkbox",label:this.props.field.name,checked:this.props.selected,onChange:function(){return e.props.onToggled(e.props.field.name)}}),n))}});exports.default=d,e.exports=exports.default},function(e,exports,t){var n,r=0,i=t(718);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(exports.locals=i.locals),exports.use=exports.ref=function(){return r++||(n=t(15)(i,{})),exports},exports.unuse=exports.unref=function(){r>0&&!--r&&(n(),n=null)}},function(e,exports,t){exports=e.exports=t(14)(void 0),exports.push([e.i,".field-analyzer{margin:5px 5px 5px 12px}.field-analyzer .panel-body{padding:5px}.field-analyzer ul{padding-left:10px}.field-selector{margin-left:25px}",""])},function(e,exports,t){"use strict";var n=t(9),r=n.getStore("Fields"),i=t(202),o=t(720),a=t(721),$=t(12),s=(t(112),function(){function e(e){this.queryInputContainer=e,this.fieldsPromise=r.loadFields(),this.limit=10,this.displayKey="value",this.typeAheadConfig={hint:!0,highlight:!0,minLength:1},this.typeAheadSource={name:"fields",displayKey:this.displayKey,source:this.codeCompletionProvider.bind(this),templates:{suggestion:function(e){return"

    "+e.prefix+""+e.match.substring(0,e.match.indexOf(e.currentSegment))+""+e.currentSegment+""+e.match.substring(e.match.indexOf(e.currentSegment)+e.currentSegment.length)+"

    "}}}}return e.prototype.display=function(){var e=this;this.fieldsPromise.then(function(t){e.fields=t,$(e.queryInputContainer).typeahead(e.typeAheadConfig,e.typeAheadSource)})},e.prototype._value=function(){return $(this.queryInputContainer).typeahead("val")},e.prototype.update=function(e){this._value()!==e&&$(this.queryInputContainer).typeahead("val",e)},e.prototype.codeCompletionProvider=function(e,t){var n="",r=[],a=[],s=new i.QueryParser(e),l=s.parse(),u=new o;u.visit(l);var c=u.result();if(0===c.length)a=a.concat(this.fieldsCompletions()),a=a.concat(this.unaryOperatorsCompletions());else{var d=c[c.length-1],h=c[c.length-2],f=c[c.length-3],p=c[0],g=this.splitQuery(l,d);if(e=g.current,n=g.prefix,d instanceof i.TermAST){a=a.concat(this.fieldsCompletions());if(!(h instanceof i.ModifierAST)){if(c.length>1&&!(h instanceof i.ExpressionAST)){var m=!(h instanceof i.ModifierAST&&h.isNOTModifier());a=a.concat(this.binaryOperatorsCompletions(m))}a=a.concat(this.unaryOperatorsCompletions())}}var v=!(f instanceof i.MissingAST||p instanceof i.ExpressionAST);if(d instanceof i.MissingAST&&v){var y=n.charAt(n.length-1),b=n.trim().charAt(n.trim().length-1);" "!==y&&-1===["+","-","!"].indexOf(b)&&(n+=" "),a=a.concat(this.fieldsCompletions()),a=a.concat(this.unaryOperatorsCompletions())}}this.filterCompletionMatches(n,e,a,r,{prefixOnly:!0}),this.filterCompletionMatches(n,e,a,r),t(r)},e.prototype.splitQuery=function(e,t){var n=new a;n.visit(t);var r=n.result(),i=new a(t);return i.visit(e),{current:r,prefix:i.result()}},e.prototype.fieldsCompletions=function(){var e=[];return this.fields.forEach(function(t){e.push(t+":"),e.push("_exists_:"+t),e.push("NOT _exists_:"+t)}),e},e.prototype.unaryOperatorsCompletions=function(){return["+","-","!","NOT"]},e.prototype.binaryOperatorsCompletions=function(e){var t=[];return t.push("&&","AND"),e&&t.push("!","NOT"),t.push("||","OR"),t},e.prototype.filterCompletionMatches=function(e,t,n,r,i){var o=this;n.forEach(function(n){var a=i&&i.prefixOnly?0===n.indexOf(t):-1!==n.indexOf(t)&&0!==n.indexOf(t);if(r.length0&&!--r&&(n(),n=null)}},function(e,exports,t){exports=e.exports=t(14)(void 0),exports.push([e.i,".simulation-changes{padding-top:15px}.simulation-changes dl{margin-bottom:10px;margin-top:5px}.simulation-changes dd,.simulation-changes dt{padding-left:20px}.original-message-changes{margin-top:10px}.added-fields dl{background-color:#dff0d8;color:#3c763d}.removed-fields dl{background-color:#f2dede;color:#a94442}.mutated-fields dl{background-color:#d9edf7;color:#31708f}.field-value{font-family:monospace}.mutated-fields .removed-field{text-decoration:line-through}",""])},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(115),u=n(l),c=a.default.createClass({displayName:"SimulationPreview",propTypes:{simulationResults:i.default.object.isRequired,streams:i.default.object.isRequired},render:function(){var e=this,t=this.props.simulationResults.messages;if(0===t.length)return a.default.createElement(s.Alert,{bsStyle:"info"},a.default.createElement("p",null,a.default.createElement("strong",null,"Message would be dropped")),a.default.createElement("p",null,"The pipeline processor would drop such a message. That means that the message ",a.default.createElement("strong",null,"would not be stored"),", and would not be available for searches, alerts, outputs, or dashboards."));var n=t.map(function(t){return a.default.createElement(u.default,{key:t.id,message:t,streams:e.props.streams,disableTestAgainstStream:!0,disableSurroundingSearch:!0,disableFieldActions:!0,disableMessageActions:!0})});return a.default.createElement("div",{className:"message-preview-wrapper"},n)}});exports.default=c,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(32),l=n(s),u=a.default.createClass({displayName:"SimulationTrace",propTypes:{simulationResults:i.default.object.isRequired},componentDidMount:function(){this.style.use()},componentWillUnmount:function(){this.style.unuse()},style:t(727),render:function(){var e=this.props.simulationResults.simulation_trace,t=[];return e.forEach(function(e,n){t.push(a.default.createElement("dt",{key:e.time+"-"+n+"-title"},l.default.formatNumber(e.time)," μs")),t.push(a.default.createElement("dd",{key:e+"-"+n+"-description"},a.default.createElement("span",null,e.message)))}),a.default.createElement("dl",{className:"dl-horizontal dl-simulation-trace"},t)}});exports.default=u,e.exports=exports.default},function(e,exports,t){var n,r=0,i=t(728);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(exports.locals=i.locals),exports.use=exports.ref=function(){return r++||(n=t(15)(i,{})),exports},exports.unuse=exports.unref=function(){r>0&&!--r&&(n(),n=null)}},function(e,exports,t){exports=e.exports=t(14)(void 0),exports.push([e.i,".dl-simulation-trace{padding-top:15px}.dl-simulation-trace dt{width:80px}.dl-simulation-trace dd{margin-left:100px;margin-bottom:5px}",""])},function(e,exports,t){var n,r=0,i=t(730);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(exports.locals=i.locals),exports.use=exports.ref=function(){return r++||(n=t(15)(i,{})),exports},exports.unuse=exports.unref=function(){r>0&&!--r&&(n(),n=null)}},function(e,exports,t){exports=e.exports=t(14)(void 0),exports.push([e.i,".message-preview-wrapper{margin-left:15px;margin-right:15px}.message-preview-wrapper dl{margin-top:5px;margin-bottom:0}",""])},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(4),a=n(o),s=t(5),l=n(s),u=t(93),c=n(u),d=t(33),h=n(d),f=t(204),p=n(f),g=i.default.createStore({listenables:[p.default],simulate:function(e,t,n){var r=a.default.qualifyUrl("/plugins/org.graylog.plugins.pipelineprocessor/system/pipelines/simulate"),i={stream_id:e.id,message:t,input_id:n},o=(0,l.default)("POST",r,i);o=o.then(function(e){var t=h.default.clone(e);return t.messages=e.messages.map(function(e){return c.default.formatMessageSummary(e)}),t}),p.default.simulate.promise(o)}});exports.default=g,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(0),i=n(r),o=t(3),a=t(19),s=t(2),l=n(s),u=t(11),c=t(30),d=n(c),h=t(27),f=n(h),p=t(733),g=n(p),m=t(50),v=n(m),y=t(65),b=n(y),_=t(16),w=n(_),C=i.default.createClass({displayName:"RulesPage",mixins:[l.default.connect(v.default)],componentDidMount:function(){b.default.list()},render:function(){return i.default.createElement(u.DocumentTitle,{title:"Pipeline rules"},i.default.createElement("span",null,i.default.createElement(u.PageHeader,{title:"Pipeline Rules"},i.default.createElement("span",null,"Rules are a way of applying changes to messages in Graylog. A rule consists of a condition and a list of actions. Graylog evaluates the condition against a message and executes the actions if the condition is satisfied."),i.default.createElement("span",null,"Read more about Graylog pipeline rules in the ",i.default.createElement(d.default,{page:f.default.PAGES.PIPELINE_RULES,text:"documentation"}),"."),i.default.createElement("span",null,i.default.createElement(a.LinkContainer,{to:w.default.pluginRoute("SYSTEM_PIPELINES")},i.default.createElement(o.Button,{bsStyle:"info"},"Manage pipelines"))," ",i.default.createElement(a.LinkContainer,{to:w.default.pluginRoute("SYSTEM_PIPELINES_RULES")},i.default.createElement(o.Button,{bsStyle:"info",className:"active"},"Manage rules"))," ",i.default.createElement(a.LinkContainer,{to:w.default.pluginRoute("SYSTEM_PIPELINES_SIMULATE")},i.default.createElement(o.Button,{bsStyle:"info"},"Simulator")))),i.default.createElement(o.Row,{className:"content"},i.default.createElement(o.Col,{md:12},i.default.createElement(g.default,{rules:this.state.rules})))))}});exports.default=C,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(11),l=t(734),u=n(l),c=a.default.createClass({displayName:"RulesComponent",propTypes:{rules:i.default.array},render:function(){return this.props.rules?a.default.createElement("div",null,a.default.createElement(u.default,{rules:this.props.rules})):a.default.createElement(s.Spinner,null)}});exports.default=c,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(11),l=t(3),u=t(19),c=t(65),d=n(c),h=t(38),f=t(16),p=n(f),g=a.default.createClass({displayName:"RuleList",propTypes:{rules:i.default.array.isRequired},_delete:function(e){return function(){window.confirm('Do you really want to delete rule "'+e.title+'"?')&&d.default.delete(e)}},_headerCellFormatter:function(e){return a.default.createElement("th",null,e)},_ruleInfoFormatter:function(e){var t=[a.default.createElement(l.Button,{key:"delete",bsStyle:"primary",bsSize:"xsmall",onClick:this._delete(e),title:"Delete rule"},"Delete"),a.default.createElement("span",{key:"space"}," "),a.default.createElement(u.LinkContainer,{key:"edit",to:p.default.pluginRoute("SYSTEM_PIPELINES_RULES_RULEID")(e.id)},a.default.createElement(l.Button,{bsStyle:"info",bsSize:"xsmall"},"Edit"))];return a.default.createElement("tr",{key:e.title},a.default.createElement("td",null,a.default.createElement(u.LinkContainer,{to:p.default.pluginRoute("SYSTEM_PIPELINES_RULES_RULEID")(e.id)},a.default.createElement("a",null,e.title))),a.default.createElement("td",{className:"limited"},e.description),a.default.createElement("td",{className:"limited"},a.default.createElement(s.Timestamp,{dateTime:e.created_at,relative:!0})),a.default.createElement("td",{className:"limited"},a.default.createElement(s.Timestamp,{dateTime:e.modified_at,relative:!0})),a.default.createElement("td",null,a.default.createElement(h.MetricContainer,{name:"org.graylog.plugins.pipelineprocessor.ast.Rule."+e.id+".executed",zeroOnMissing:!0},a.default.createElement(h.CounterRate,{suffix:"msg/s"}))),a.default.createElement("td",null,a.default.createElement(h.MetricContainer,{name:"org.graylog.plugins.pipelineprocessor.ast.Rule."+e.id+".failed"},a.default.createElement(h.CounterRate,{showTotal:!0,suffix:"errors/s",hideOnMissing:!0}))),a.default.createElement("td",{className:"actions"},t))},render:function(){var e=["title","description"],t=["Title","Description","Created","Last modified","Throughput","Errors","Actions"];return a.default.createElement("div",null,a.default.createElement(s.DataTable,{id:"rule-list",className:"table-hover",headers:t,headerCellFormatter:this._headerCellFormatter,sortByKey:"title",rows:this.props.rules,filterBy:"Title",dataRowFormatter:this._ruleInfoFormatter,filterLabel:"Filter Rules",filterKeys:e},a.default.createElement("div",{className:"pull-right"},a.default.createElement(u.LinkContainer,{to:p.default.pluginRoute("SYSTEM_PIPELINES_RULES_RULEID")("new")},a.default.createElement(l.Button,{bsStyle:"success"},"Create Rule")))))}});exports.default=g,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e){var t=this;return e.rules?e.rules.filter(function(e){return e.id===t.props.params.ruleId})[0]:void 0}Object.defineProperty(exports,"__esModule",{value:!0});var i=t(1),o=n(i),a=t(0),s=n(a),l=t(2),u=n(l),c=t(11),d=t(736),h=n(d),f=t(50),p=n(f),g=t(65),m=n(g),v=t(86),y=n(v),b=t(113),_=n(b),w=s.default.createClass({displayName:"RuleDetailsPage",propTypes:{params:o.default.object.isRequired,history:o.default.object.isRequired},mixins:[u.default.connectFilter(p.default,"rule",r),u.default.connect(_.default)],componentDidMount:function(){"new"!==this.props.params.ruleId&&(y.default.list(),m.default.get(this.props.params.ruleId))},_save:function(e,t){var n=void 0;n=e.id?m.default.update.triggerPromise(e):m.default.save.triggerPromise(e),n.then(function(){return t()})},_validateRule:function(e,t){m.default.parse(e,t)},_isLoading:function(){return"new"!==this.props.params.ruleId&&!(this.state.rule&&this.state.pipelines)},render:function(){var e=this;if(this._isLoading())return s.default.createElement(c.Spinner,null);var t="new"===this.props.params.ruleId?[]:this.state.pipelines.filter(function(t){return t.stages.some(function(t){return-1!==t.rules.indexOf(e.state.rule.title)})}),n="new"===this.props.params.ruleId?"New pipeline rule":"Pipeline rule "+this.state.rule.title;return s.default.createElement(c.DocumentTitle,{title:n},s.default.createElement(h.default,{rule:this.state.rule,usedInPipelines:t,create:"new"===this.props.params.ruleId,onSave:this._save,validateRule:this._validateRule,history:this.props.history}))}});exports.default=w,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(19),u=t(11),c=t(30),d=n(c),h=t(27),f=n(h),p=t(737),g=n(p),m=t(746),v=n(m),y=t(16),b=n(y),_=a.default.createClass({displayName:"Rule",propTypes:{rule:i.default.object,usedInPipelines:i.default.array,create:i.default.bool,onSave:i.default.func.isRequired,validateRule:i.default.func.isRequired,history:i.default.object.isRequired},render:function(){var e=void 0;return e=this.props.create?"Create pipeline rule":a.default.createElement("span",null,"Pipeline rule ",a.default.createElement("em",null,this.props.rule.title)),a.default.createElement("div",null,a.default.createElement(u.PageHeader,{title:e},a.default.createElement("span",null,"Rules are a way of applying changes to messages in Graylog. A rule consists of a condition and a list"," ","of actions."," ","Graylog evaluates the condition against a message and executes the actions if the condition is satisfied."),a.default.createElement("span",null,"Read more about Graylog pipeline rules in the ",a.default.createElement(d.default,{page:f.default.PAGES.PIPELINE_RULES,text:"documentation"}),"."),a.default.createElement("span",null,a.default.createElement(l.LinkContainer,{to:b.default.pluginRoute("SYSTEM_PIPELINES")},a.default.createElement(s.Button,{bsStyle:"info"},"Manage pipelines"))," ",a.default.createElement(l.LinkContainer,{to:b.default.pluginRoute("SYSTEM_PIPELINES_RULES")},a.default.createElement(s.Button,{bsStyle:"info",className:"active"},"Manage rules"))," ",a.default.createElement(l.LinkContainer,{to:b.default.pluginRoute("SYSTEM_PIPELINES_SIMULATE")},a.default.createElement(s.Button,{bsStyle:"info"},"Simulator")))),a.default.createElement(s.Row,{className:"content"},a.default.createElement(s.Col,{md:6},a.default.createElement(g.default,{rule:this.props.rule,usedInPipelines:this.props.usedInPipelines,create:this.props.create,onSave:this.props.onSave,validateRule:this.props.validateRule,history:this.props.history})),a.default.createElement(s.Col,{md:6},a.default.createElement(v.default,null))))}});exports.default=_,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(3),l=t(19),u=t(738),c=n(u),d=t(741);n(d);t(742),t(743);var h=t(13),f=t(16),p=n(f),g=t(744),m=n(g),v=a.default.createClass({displayName:"RuleForm",propTypes:{rule:i.default.object,usedInPipelines:i.default.array,create:i.default.bool,onSave:i.default.func.isRequired,validateRule:i.default.func.isRequired,history:i.default.object.isRequired},getDefaultProps:function(){return{rule:{id:"",title:"",description:"",source:""}}},getInitialState:function(){var e=this.props.rule;return{rule:{id:e.id,title:e.title,description:e.description,source:e.source},editor:void 0,parseErrors:[]}},componentWillUnmount:function(){void 0!==this.parseTimer&&(clearTimeout(this.parseTimer),this.parseTimer=void 0)},parseTimer:void 0,_updateEditor:function(){var e=this.state.editor.session,t=this.state.parseErrors.map(function(e){return{row:e.line-1,column:e.position_in_line-1,text:e.reason,type:"error"}});e.setAnnotations(t)},_setParseErrors:function(e){this.setState({parseErrors:e},this._updateEditor)},_onSourceChange:function(e){var t=this;void 0!==this.parseTimer&&clearTimeout(this.parseTimer);var n=this.state.rule;n.source=e,this.setState({rule:n}),this.props.validateRule&&(this.parseTimer=setTimeout(function(){return t.props.validateRule(n,t._setParseErrors)},500))},_onDescriptionChange:function(e){var t=this.state.rule;t.description=e.target.value,this.setState({rule:t})},_onTitleChange:function(e){var t=this.state.rule;t.title=e.target.value,this.setState({rule:t})},_onLoad:function(e){this.setState({editor:e})},_getId:function(e){return void 0!==this.state.name?e+this.state.name:e},_goBack:function(){this.props.history.goBack()},_saved:function(){this.props.history.pushState(null,p.default.pluginRoute("SYSTEM_PIPELINES_RULES"))},_save:function(){0===this.state.parseErrors.length&&this.props.onSave(this.state.rule,this._saved)},_submit:function(e){e.preventDefault(),this._save()},_formatPipelinesUsingRule:function(){if(0===this.props.usedInPipelines.length)return"This rule is not being used in any pipelines.";var e=this.props.usedInPipelines.map(function(e){return a.default.createElement("li",{key:e.id},a.default.createElement(l.LinkContainer,{to:p.default.pluginRoute("SYSTEM_PIPELINES_PIPELINEID")(e.id)},a.default.createElement("a",null,e.title)))});return a.default.createElement("ul",{className:m.default.usedInPipelines},e)},render:function(){var e=void 0;return this.props.create||(e=a.default.createElement(h.Input,{label:"Used in pipelines",help:"Pipelines that use this rule in one or more of their stages."},a.default.createElement("div",{className:"form-control-static"},this._formatPipelinesUsingRule()))),a.default.createElement("form",{ref:"form",onSubmit:this._submit},a.default.createElement("fieldset",null,a.default.createElement(s.FormGroup,{id:"ruleTitleInformation"},a.default.createElement(s.ControlLabel,null,"Title"),a.default.createElement(s.FormControl.Static,null,"You can set the rule title in the rule source. See the quick reference for more information.")),a.default.createElement(h.Input,{type:"textarea",id:this._getId("description"),label:"Description",onChange:this._onDescriptionChange,autoFocus:!0,help:"Rule description (optional).",value:this.state.rule.description}),e,a.default.createElement(h.Input,{label:"Rule source",help:"Rule source, see quick reference for more information."},a.default.createElement("div",{style:{border:"1px solid lightgray",borderRadius:5}},a.default.createElement(c.default,{mode:"text",theme:"chrome",name:"source"+(this.props.create?"-create":"-edit"),fontSize:11,height:"14em",width:"100%",editorProps:{$blockScrolling:"Infinity"},value:this.state.rule.source,onLoad:this._onLoad,onChange:this._onSourceChange})))),a.default.createElement(s.Row,null,a.default.createElement(s.Col,{md:12},a.default.createElement("div",{className:"form-group"},a.default.createElement(s.Button,{type:"submit",bsStyle:"primary",style:{marginRight:10}},"Save"),a.default.createElement(s.Button,{type:"button",onClick:this._goBack},"Cancel")))))}});exports.default=v,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(exports,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t1&&r(l,"")>-1&&(s=RegExp(this.source,i.replace.call(n(this),"g","")),i.replace.call(e.slice(l.index),s,function(){for(var e=1;el.index&&this.lastIndex--}return l},a||(RegExp.prototype.test=function(e){var t=i.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,exports,t){function n(){}function r(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(e){}}function i(e){return e=+e,e!==e?e=0:0!==e&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError("Function.prototype.bind called on incompatible "+t);var r=f.call(arguments,1),i=function(){if(this instanceof i){var n=t.apply(this,r.concat(f.call(arguments)));return Object(n)===n?n:this}return t.apply(e,r.concat(f.call(arguments)))};return t.prototype&&(n.prototype=t.prototype,i.prototype=new n,n.prototype=null),i});var o,a,s,l,u,c=Function.prototype.call,d=Array.prototype,h=Object.prototype,f=d.slice,p=c.bind(h.toString),g=c.bind(h.hasOwnProperty);if((u=g(h,"__defineGetter__"))&&(o=c.bind(h.__defineGetter__),a=c.bind(h.__defineSetter__),s=c.bind(h.__lookupGetter__),l=c.bind(h.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t,n=[];if(n.splice.apply(n,e(20)),n.splice.apply(n,e(26)),t=n.length,n.splice(5,0,"XXX"),n.length,t+1==n.length)return!0}()){var m=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?m.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(f.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):void 0==e?e=0:e<0&&(e=Math.max(n+e,0)),e+ts)for(d=u;d--;)this[l+d]=this[s+d];if(o&&e===c)this.length=c,this.push.apply(this,i);else for(this.length=c+o,d=0;d>>0;if("[object Function]"!=p(e))throw new TypeError;for(;++i>>0,i=Array(r),o=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var a=0;a>>0,o=[],a=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var s=0;s>>0,i=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var o=0;o>>0,i=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var o=0;o>>0;if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");if(!r&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var i,o=0;if(arguments.length>=2)i=arguments[1];else for(;;){if(o in n){i=n[o++];break}if(++o>=r)throw new TypeError("reduce of empty array with no initial value")}for(;o>>0;if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");if(!r&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var i,o=r-1;if(arguments.length>=2)i=arguments[1];else for(;;){if(o in n){i=n[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}do{o in this&&(i=e.call(void 0,i,n[o],o,t))}while(o--);return i}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=y&&"[object String]"==p(this)?this.split(""):T(this),n=t.length>>>0;if(!n)return-1;var r=0;for(arguments.length>1&&(r=i(arguments[1])),r=r>=0?r:Math.max(0,n+r);r>>0;if(!n)return-1;var r=n-1;for(arguments.length>1&&(r=Math.min(r,i(arguments[1]))),r=r>=0?r:n-Math.abs(r);r>=0;r--)if(r in t&&e===t[r])return r;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:h)}),!Object.getOwnPropertyDescriptor){Object.getOwnPropertyDescriptor=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+e);if(g(e,t)){var n,r,i;if(n={enumerable:!0,configurable:!0},u){var o=e.__proto__;e.__proto__=h;var r=s(e,t),i=l(e,t);if(e.__proto__=o,r||i)return r&&(n.get=r),i&&(n.set=i),n}return n.value=e[t],n}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),!Object.create){var b;b=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var n;if(null===e)n=b();else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var r=function(){};r.prototype=e,n=new r,n.__proto__=e}return void 0!==t&&Object.defineProperties(n,t),n}}if(Object.defineProperty){var _=r({}),w="undefined"==typeof document||r(document.createElement("div"));if(!_||!w)var C=Object.defineProperty}if(!Object.defineProperty||C){Object.defineProperty=function(e,t,n){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.defineProperty called on non-object: "+e);if("object"!=typeof n&&"function"!=typeof n||null===n)throw new TypeError("Property description must be an object: "+n);if(C)try{return C.call(Object,e,t,n)}catch(e){}if(g(n,"value"))if(u&&(s(e,t)||l(e,t))){var r=e.__proto__;e.__proto__=h,delete e[t],e[t]=n.value,e.__proto__=r}else e[t]=n.value;else{if(!u)throw new TypeError("getters & setters can not be defined on this javascript engine");g(n,"get")&&o(e,t,n.get),g(n,"set")&&a(e,t,n.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)g(t,n)&&Object.defineProperty(e,n,t[n]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(e){Object.freeze=function(e){return function(t){return"function"==typeof t?t:e(t)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;for(var t="";g(e,t);)t+="?";e[t]=!0;var n=g(e,t);return delete e[t],n}),!Object.keys){var A=!0,E=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],S=E.length;for(var x in{toString:null})A=!1;Object.keys=function(e){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on a non-object");var t=[];for(var n in e)g(e,n)&&t.push(n);if(A)for(var r=0,i=S;r=0?parseFloat((r.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((r.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),exports.isOldIE=exports.isIE&&exports.isIE<9,exports.isGecko=exports.isMozilla=(window.Controllers||window.controllers)&&"Gecko"===window.navigator.product,exports.isOldGecko=exports.isGecko&&parseInt((r.match(/rv\:(\d+)/)||[])[1],10)<4,exports.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),exports.isWebKit=parseFloat(r.split("WebKit/")[1])||void 0,exports.isChrome=parseFloat(r.split(" Chrome/")[1])||void 0,exports.isAIR=r.indexOf("AdobeAIR")>=0,exports.isIPad=r.indexOf("iPad")>=0,exports.isTouchPad=r.indexOf("TouchPad")>=0,exports.isChromeOS=r.indexOf(" CrOS ")>=0}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,exports,t){"use strict";function n(e,t,n){var r=l(t);if(!o.isMac&&a){if(a.OSKey&&(r|=8),a.altGr){if(3==(3&r))return;a.altGr=0}if(18===n||17===n){var u="location"in t?t.location:t.keyLocation;if(17===n&&1===u)1==a[n]&&(s=t.timeStamp);else if(18===n&&3===r&&2===u){var c=t.timeStamp-s;c<50&&(a.altGr=!0)}}}if(n in i.MODIFIER_KEYS&&(n=-1),8&r&&n>=91&&n<=93&&(n=-1),!r&&13===n){var u="location"in t?t.location:t.keyLocation;if(3===u&&(e(t,r,-n),t.defaultPrevented))return}if(o.isChromeOS&&8&r){if(e(t,r,n),t.defaultPrevented)return;r&=-9}return!!(r||n in i.FUNCTION_KEYS||n in i.PRINTABLE_KEYS)&&e(t,r,n)}function r(){a=Object.create(null),a.count=0,a.lastT=0}var i=e("./keys"),o=e("./useragent"),a=null,s=0;exports.addListener=function(e,t,n){if(e.addEventListener)return e.addEventListener(t,n,!1);if(e.attachEvent){var r=function(){n.call(e,window.event)};n._wrapper=r,e.attachEvent("on"+t,r)}},exports.removeListener=function(e,t,n){if(e.removeEventListener)return e.removeEventListener(t,n,!1);e.detachEvent&&e.detachEvent("on"+t,n._wrapper||n)},exports.stopEvent=function(e){return exports.stopPropagation(e),exports.preventDefault(e),!1},exports.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},exports.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},exports.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||o.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},exports.capture=function(e,t,n){function r(e){t&&t(e),n&&n(e),exports.removeListener(document,"mousemove",t,!0),exports.removeListener(document,"mouseup",r,!0),exports.removeListener(document,"dragstart",r,!0)}return exports.addListener(document,"mousemove",t,!0),exports.addListener(document,"mouseup",r,!0),exports.addListener(document,"dragstart",r,!0),r},exports.addTouchMoveListener=function(e,t){if("ontouchmove"in e){var n,r;exports.addListener(e,"touchstart",function(e){var t=e.changedTouches[0];n=t.clientX,r=t.clientY}),exports.addListener(e,"touchmove",function(e){var i=e.changedTouches[0];e.wheelX=-(i.clientX-n)/1,e.wheelY=-(i.clientY-r)/1,n=i.clientX,r=i.clientY,t(e)})}},exports.addMouseWheelListener=function(e,t){"onmousewheel"in e?exports.addListener(e,"mousewheel",function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),t(e)}):"onwheel"in e?exports.addListener(e,"wheel",function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}t(e)}):exports.addListener(e,"DOMMouseScroll",function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),t(e)})},exports.addMultiMouseDownListener=function(e,t,n,r){function i(e){if(0!==exports.getButton(e)?c=0:e.detail>1?++c>4&&(c=1):c=1,o.isIE){var i=Math.abs(e.clientX-s)>5||Math.abs(e.clientY-l)>5;u&&!i||(c=1),u&&clearTimeout(u),u=setTimeout(function(){u=null},t[c-1]||600),1==c&&(s=e.clientX,l=e.clientY)}if(e._clicks=c,n[r]("mousedown",e),c>4)c=0;else if(c>1)return n[r](d[c],e)}function a(e){c=2,u&&clearTimeout(u),u=setTimeout(function(){u=null},t[c-1]||600),n[r]("mousedown",e),n[r](d[c],e)}var s,l,u,c=0,d={2:"dblclick",3:"tripleclick",4:"quadclick"};Array.isArray(e)||(e=[e]),e.forEach(function(e){exports.addListener(e,"mousedown",i),o.isOldIE&&exports.addListener(e,"dblclick",a)})};var l=!o.isMac||!o.isOpera||"KeyboardEvent"in window?function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}:function(e){return 0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0)};if(exports.getModifierString=function(e){return i.KEY_MODS[l(e)]},exports.addCommandKeyListener=function(e,t){var i=exports.addListener;if(o.isOldGecko||o.isOpera&&!("KeyboardEvent"in window)){var s=null;i(e,"keydown",function(e){s=e.keyCode}),i(e,"keypress",function(e){return n(t,e,s)})}else{var l=null;i(e,"keydown",function(e){var i=e.keyCode;a[i]=(a[i]||0)+1,91==i||92==i?a.OSKey=!0:a.OSKey&&e.timeStamp-a.lastT>200&&1==a.count&&r(),1==a[i]&&a.count++,a.lastT=e.timeStamp;var o=n(t,e,i);return l=e.defaultPrevented,o}),i(e,"keypress",function(e){l&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(exports.stopEvent(e),l=null)}),i(e,"keyup",function(e){var t=e.keyCode;a[t]?a.count=Math.max(a.count-1,0):r(),91!=t&&92!=t||(a.OSKey=!1),a[t]=null}),a||(r(),i(window,"focus",r))}},"object"==typeof window&&window.postMessage&&!o.isOldIE){exports.nextTick=function(e,t){t=t||window;exports.addListener(t,"message",function n(r){"zero-timeout-message-1"==r.data&&(exports.stopPropagation(r),exports.removeListener(t,"message",n),e())}),t.postMessage("zero-timeout-message-1","*")}}exports.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),exports.nextFrame?exports.nextFrame=exports.nextFrame.bind(window):exports.nextFrame=function(e){setTimeout(e,17)}}),ace.define("ace/lib/lang",["require","exports","module"],function(e,exports,t){"use strict";exports.last=function(e){return e[e.length-1]},exports.stringReverse=function(e){return e.split("").reverse().join("")},exports.stringRepeat=function(e,t){for(var n="";t>0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var n=/^\s\s*/,r=/\s\s*$/;exports.stringTrimLeft=function(e){return e.replace(n,"")},exports.stringTrimRight=function(e){return e.replace(r,"")},exports.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},exports.copyArray=function(e){for(var t=[],n=0,r=e.length;n1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;n.$blockScrolling++,this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"),n.$blockScrolling--},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(t.$blockScrolling++,this.$clickSelection){var r=this.$clickSelection.comparePoint(n);if(-1==r)e=this.$clickSelection.end;else if(1==r)e=this.$clickSelection.start;else{var o=i(this.$clickSelection,n);n=o.cursor,e=o.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.$blockScrolling--,t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),o=n.selection[e](r.row,r.column);if(n.$blockScrolling++,this.$clickSelection){var a=this.$clickSelection.comparePoint(o.start),s=this.$clickSelection.comparePoint(o.end);if(-1==a&&s<=0)t=this.$clickSelection.end,o.end.row==r.row&&o.end.column==r.column||(r=o.start);else if(1==s&&a>=0)t=this.$clickSelection.start,o.start.row==r.row&&o.start.column==r.column||(r=o.end);else if(-1==a&&1==s)r=o.end,t=o.start;else{var l=i(this.$clickSelection,r);r=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(r),n.$blockScrolling--,n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(e>0||t-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,r=n.session,i=r.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var r=n.getSelectionRange();r.isMultiLine()&&r.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(r.start.row),this.$clickSelection.end=n.selection.getLineRange(r.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=e.domEvent.timeStamp,n=t-(this.$lastScrollTime||0),r=this.editor;return r.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed)||n<200?(this.$lastScrollTime=t,r.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},this.onTouchMove=function(e){var t=e.domEvent.timeStamp,n=t-(this.$lastScrollTime||0),r=this.editor;if(r.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed)||n<200)return this.$lastScrollTime=t,r.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()}}).call(n.prototype),exports.DefaultHandlers=n}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(e,exports,t){"use strict";function n(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}var r=(e("./lib/oop"),e("./lib/dom"));(function(){this.$init=function(){return this.$element=r.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){r.setInnerText(this.getElement(),e)},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){r.addCssClass(this.getElement(),e)},this.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth}}).call(n.prototype),exports.Tooltip=n}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(e,exports,t){"use strict";function n(e){function t(){var t=d.getDocumentPosition().row,r=l.$annotations[t];if(!r)return n();if(t==s.session.getLength()){var i=s.renderer.pixelToScreenCoordinates(0,d.y).row,a=d.$pos;if(i>s.session.documentToScreenRow(a.row,a.column))return n()}if(h!=r)if(h=r.text.join("
    "),u.setHtml(h),u.show(),s.on("mousewheel",n),e.$tooltipFollowsMouse)o(d);else{var c=d.domEvent.target,f=c.getBoundingClientRect(),p=u.getElement().style;p.left=f.right+"px",p.top=f.bottom+"px"}}function n(){c&&(c=clearTimeout(c)),h&&(u.hide(),h=null,s.removeEventListener("mousewheel",n))}function o(e){u.setPosition(e.x,e.y)}var s=e.editor,l=s.renderer.$gutterLayer,u=new r(s.container);e.editor.setDefaultHandler("guttermousedown",function(t){if(s.isFocused()&&0==t.getButton()){if("foldWidgets"!=l.getRegion(t)){var n=t.getDocumentPosition().row,r=s.session.selection;if(t.getShiftKey())r.selectTo(n,0);else{if(2==t.domEvent.detail)return s.selectAll(),t.preventDefault();e.$clickSelection=s.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}}});var c,d,h;e.editor.setDefaultHandler("guttermousemove",function(r){var a=r.domEvent.target||r.domEvent.srcElement;if(i.hasCssClass(a,"ace_fold-widget"))return n();h&&e.$tooltipFollowsMouse&&o(r),d=r,c||(c=setTimeout(function(){c=null,d&&!e.isMousePressed?t():n()},50))}),a.addListener(s.renderer.$gutter,"mouseout",function(e){d=null,h&&!c&&(c=setTimeout(function(){c=null,n()},50))}),s.on("changeSession",n)}function r(e){s.call(this,e)}var i=e("../lib/dom"),o=e("../lib/oop"),a=e("../lib/event"),s=e("../tooltip").Tooltip;o.inherits(r,s),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,i=this.getWidth(),o=this.getHeight();e+=15,t+=15,e+i>n&&(e-=e+i-n),t+o>r&&(t-=20+o),s.prototype.setPosition.call(this,e,t)}}.call(r.prototype),exports.GutterHandler=n}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,exports,t){"use strict";var n=e("../lib/event"),r=e("../lib/useragent"),i=exports.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){n.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){n.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor,t=e.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var n=this.getDocumentPosition();this.$inSelection=t.contains(n.row,n.column)}return this.$inSelection},this.getButton=function(){return n.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=r.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(i.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,exports,t){"use strict";function n(e){function t(e,t){var n=Date.now(),i=!t||e.row!=t.row,o=!t||e.column!=t.column;if(!F||i||o)m.$blockScrolling+=1,m.moveCursorToPosition(e),m.$blockScrolling-=1,F=n,k={x:b,y:_};else{r(k.x,k.y,b,_)>u?F=null:n-F>=l&&(m.renderer.scrollCursorIntoView(),F=null)}}function n(e,t){var n=Date.now(),r=m.renderer.layerConfig.lineHeight,i=m.renderer.layerConfig.characterWidth,o=m.renderer.scroller.getBoundingClientRect(),a={x:{left:b-o.left,right:o.right-b},y:{top:_-o.top,bottom:o.bottom-_}},l=Math.min(a.x.left,a.x.right),u=Math.min(a.y.top,a.y.bottom),c={row:e.row,column:e.column};l/i<=2&&(c.column+=a.x.left=s&&m.renderer.scrollCursorIntoView(c):x=n:x=null}function c(){var e=A;A=m.renderer.screenToTextCoordinates(b,_),t(A,e),n(A,e)}function d(){C=m.selection.toOrientedRange(),y=m.session.addMarker(C,"ace_selection",m.getSelectionStyle()),m.clearSelection(),m.isFocused()&&m.renderer.$cursorLayer.setBlinking(!1),clearInterval(w),c(),w=setInterval(c,20),T=0,o.addListener(document,"mousemove",f)}function h(){clearInterval(w),m.session.removeMarker(y),y=null,m.$blockScrolling+=1,m.selection.fromOrientedRange(C),m.$blockScrolling-=1,m.isFocused()&&!S&&m.renderer.$cursorLayer.setBlinking(!m.getReadOnly()),C=null,A=null,T=0,x=null,F=null,o.removeListener(document,"mousemove",f)}function f(){null==M&&(M=setTimeout(function(){null!=M&&y&&h()},20))}function p(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return"text/plain"==e||"Text"==e})}function g(e){var t=["copy","copymove","all","uninitialized"],n=["move","copymove","linkmove","all","uninitialized"],r=a.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return r&&t.indexOf(i)>=0?o="copy":n.indexOf(i)>=0?o="move":t.indexOf(i)>=0&&(o="copy"),o}var m=e.editor,v=i.createElement("img");v.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",a.isOpera&&(v.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;"),["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(t){e[t]=this[t]},this),m.addEventListener("mousedown",this.onMouseDown.bind(e));var y,b,_,w,C,A,E,S,x,F,k,D=m.container,T=0;this.onDragStart=function(e){if(this.cancelDrag||!D.draggable){var t=this;return setTimeout(function(){t.startSelect(),t.captureMouse(e)},0),e.preventDefault()}C=m.getSelectionRange();var n=e.dataTransfer;n.effectAllowed=m.getReadOnly()?"copy":"copyMove",a.isOpera&&(m.container.appendChild(v),v.scrollTop=0),n.setDragImage&&n.setDragImage(v,0,0),a.isOpera&&m.container.removeChild(v),n.clearData(),n.setData("Text",m.session.getTextRange()),S=!0,this.setState("drag")},this.onDragEnd=function(e){if(D.draggable=!1,S=!1,this.setState(null),!m.getReadOnly()){var t=e.dataTransfer.dropEffect;E||"move"!=t||m.session.remove(m.getSelectionRange()),m.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!m.getReadOnly()&&p(e.dataTransfer))return b=e.clientX,_=e.clientY,y||d(),T++,e.dataTransfer.dropEffect=E=g(e),o.preventDefault(e)},this.onDragOver=function(e){if(!m.getReadOnly()&&p(e.dataTransfer))return b=e.clientX,_=e.clientY,y||(d(),T++),null!==M&&(M=null),e.dataTransfer.dropEffect=E=g(e),o.preventDefault(e)},this.onDragLeave=function(e){if(--T<=0&&y)return h(),E=null,o.preventDefault(e)},this.onDrop=function(e){if(A){var t=e.dataTransfer;if(S)switch(E){case"move":C=C.contains(A.row,A.column)?{start:A,end:A}:m.moveText(C,A);break;case"copy":C=m.moveText(C,A,!0)}else{var n=t.getData("Text");C={start:A,end:m.session.insert(A,n)},m.focus(),E=null}return h(),o.preventDefault(e)}},o.addListener(D,"dragstart",this.onDragStart.bind(e)),o.addListener(D,"dragend",this.onDragEnd.bind(e)),o.addListener(D,"dragenter",this.onDragEnter.bind(e)),o.addListener(D,"dragover",this.onDragOver.bind(e)),o.addListener(D,"dragleave",this.onDragLeave.bind(e)),o.addListener(D,"drop",this.onDrop.bind(e));var M=null}function r(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}var i=e("../lib/dom"),o=e("../lib/event"),a=e("../lib/useragent"),s=200,l=200,u=5;(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=a.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;if(a.isIE&&"dragReady"==this.state){var n=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>3&&t.dragDrop()}if("dragWait"===this.state){var n=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),r=e.getButton();if(1===(e.domEvent.detail||1)&&0===r&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var i=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in i&&(i.unselectable="on"),t.getDragDelay()){if(a.isWebKit){this.cancelDrag=!0;t.container.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(n.prototype),exports.DragdropHandler=n}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,exports,t){"use strict";var n=e("./dom");exports.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText)},n.send(null)},exports.loadScript=function(e,t){var r=n.getDocumentHead(),i=document.createElement("script");i.src=e,r.appendChild(i),i.onload=i.onreadystatechange=function(e,n){!n&&i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(i=i.onload=i.onreadystatechange=null,n||t())}},exports.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,exports,t){"use strict";var n={},r=function(){this.propagationStopped=!0},i=function(){this.defaultPrevented=!0};n._emit=n._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],o=this._defaultHandlers[e];if(n.length||o){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=r),t.preventDefault||(t.preventDefault=i),n=n.slice();for(var a=0;a1&&(i=n[n.length-2]);var a=u[t+"Path"];return null==a?a=u.basePath:"/"==r&&(t=r=""),a&&"/"!=a.slice(-1)&&(a+="/"),a+t+r+i+this.get("suffix")},exports.setModuleUrl=function(e,t){return u.$moduleUrls[e]=t},exports.$loading={},exports.loadModule=function(t,n){var r,i;Array.isArray(t)&&(i=t[0],t=t[1]);try{r=e(t)}catch(e){}if(r&&!exports.$loading[t])return n&&n(r);if(exports.$loading[t]||(exports.$loading[t]=[]),exports.$loading[t].push(n),!(exports.$loading[t].length>1)){var o=function(){e([t],function(e){exports._emit("load.module",{name:t,module:e});var n=exports.$loading[t];exports.$loading[t]=null,n.forEach(function(t){t&&t(e)})})};if(!exports.get("packaged"))return o();a.loadScript(exports.moduleUrl(t,i),o)}},r(!0),exports.init=r}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],function(e,exports,t){"use strict";var n=e("../lib/event"),r=e("../lib/useragent"),i=e("./default_handlers").DefaultHandlers,o=e("./default_gutter_handler").GutterHandler,a=e("./mouse_event").MouseEvent,s=e("./dragdrop_handler").DragdropHandler,l=e("../config"),u=function(e){var t=this;this.editor=e,new i(this),new o(this),new s(this);var a=function(t){(!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement()))&&window.focus(),e.focus()},l=e.renderer.getMouseEventTarget();n.addListener(l,"click",this.onMouseEvent.bind(this,"click")),n.addListener(l,"mousemove",this.onMouseMove.bind(this,"mousemove")),n.addMultiMouseDownListener([l,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent"),n.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel")),n.addTouchMoveListener(e.container,this.onTouchMove.bind(this,"touchmove"));var u=e.renderer.$gutter;n.addListener(u,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),n.addListener(u,"click",this.onMouseEvent.bind(this,"gutterclick")),n.addListener(u,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),n.addListener(u,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),n.addListener(l,"mousedown",a),n.addListener(u,"mousedown",a),r.isIE&&e.renderer.scrollBarV&&(n.addListener(e.renderer.scrollBarV.element,"mousedown",a),n.addListener(e.renderer.scrollBarH.element,"mousedown",a)),e.on("mousemove",function(n){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var r=e.renderer.screenToTextCoordinates(n.x,n.y),i=e.session.selection.getRange(),o=e.renderer;!i.isEmpty()&&i.insideStart(r.row,r.column)?o.setCursorStyle("default"):o.setCursorStyle("")}})};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new a(t,this.editor))},this.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(e,new a(t,this.editor))},this.onMouseWheel=function(e,t){var n=new a(t,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.onTouchMove=function(e,t){var n=new a(t,this.editor);n.speed=1,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var i=this.editor.renderer;i.$keepTextAreaAtCursor&&(i.$keepTextAreaAtCursor=null);var o=this,s=function(e){if(e){if(r.isWebKit&&!e.which&&o.releaseMouse)return o.releaseMouse();o.x=e.clientX,o.y=e.clientY,t&&t(e),o.mouseEvent=new a(e,o.editor),o.$mouseMoved=!0}},l=function(e){clearInterval(c),u(),o[o.state+"End"]&&o[o.state+"End"](e),o.state="",null==i.$keepTextAreaAtCursor&&(i.$keepTextAreaAtCursor=!0,i.$moveTextAreaToCursor()),o.isMousePressed=!1,o.$onCaptureMouseMove=o.releaseMouse=null,e&&o.onMouseEvent("mouseup",e)},u=function(){o[o.state]&&o[o.state](),o.$mouseMoved=!1};if(r.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout(function(){l(e)});o.$onCaptureMouseMove=s,o.releaseMouse=n.capture(this.editor.container,s,l);var c=setInterval(u,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&n.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)}}).call(u.prototype),l.defineOptions(u.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:r.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),exports.MouseHandler=u}),ace.define("ace/mouse/fold_handler",["require","exports","module"],function(e,exports,t){"use strict";function n(e){e.on("click",function(t){var n=t.getDocumentPosition(),r=e.session,i=r.getFoldAt(n.row,n.column,1);i&&(t.getAccelKey()?r.removeFold(i):r.expandFold(i),t.stop())}),e.on("gutterclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,r=e.session;r.foldWidgets&&r.foldWidgets[n]&&e.session.onFoldWidgetClick(n,t),e.isFocused()||e.focus(),t.stop()}}),e.on("gutterdblclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,r=e.session,i=r.getParentFoldRangeData(n,!0),o=i.range||i.firstRange;if(o){n=o.start.row;var a=r.getFoldAt(n,r.getLine(n).length,1);a?r.removeFold(a):(r.addFold("...",o),e.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}t.stop()}})}exports.FoldHandler=n}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,exports,t){"use strict";var n=e("../lib/keys"),r=e("../lib/event"),i=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},this.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);-1!=n&&this.$handlers.splice(n,1),void 0==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==n&&e.attach&&e.attach(this.$editor)}},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map(function(n){return n.getStatusText&&n.getStatusText(t,e)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,n,i){for(var o,a=!1,s=this.$editor.commands,l=this.$handlers.length;l--&&!((o=this.$handlers[l].handleKeyboard(this.$data,e,t,n,i))&&o.command&&(a="null"==o.command||s.exec(o.command,this.$editor,o.args,i),a&&i&&-1!=e&&1!=o.passEvent&&1!=o.command.passEvent&&r.stopEvent(i),a)););return a||-1!=e||(o={command:"insertstring"},a=s.exec("insertstring",this.$editor,t)),a&&this.$editor._signal("keyboardActivity",o),a},this.onCommandKey=function(e,t,r){var i=n.keyCodeToString(r);this.$callKeyboardHandlers(t,i,r,e)},this.onTextInput=function(e){this.$callKeyboardHandlers(-1,e)}}).call(i.prototype),exports.KeyBinding=i}),ace.define("ace/range",["require","exports","module"],function(e,exports,t){"use strict";var n=function(e,t){return e.row-t.row||e.column-t.column},r=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),1==t?(t=this.compare(r.row,r.column),1==t?2:0==t?1:0):-1==t?-2:(t=this.compare(r.row,r.column),-1==t?-1:1==t?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.rowt)var i={row:t+1,column:0};else if(this.start.rowt.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.isEmpty()?o.fromPoints(t,t):this.isBackwards()?o.fromPoints(t,e):o.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var e=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(e,this.doc.getLine(e).length)},this.setRange=this.setSelectionRange=function(e,t){t?(this.setSelectionAnchor(e.end.row,e.end.column),this.selectTo(e.start.row,e.start.column)):(this.setSelectionAnchor(e.start.row,e.start.column),this.selectTo(e.end.row,e.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if(void 0===t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n,r="number"==typeof e?e:this.lead.row,i=this.session.getFoldLine(r);return i?(r=i.start.row,n=i.end.row):n=r,!0===t?new o(r,0,n,this.session.getLine(n).length):new o(r,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(t.column-n,t.column).split(" ").length-1==n?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(t.column=r)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var i=this.session.getFoldAt(e,t,1);return i?void this.moveCursorTo(i.end.row,i.end.column):(this.session.nonTokenRe.exec(r)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=n.substring(t)),t>=n.length?(this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)},this.$shortWordEndIndex=function(e){var t,n=0,r=/\s/,i=this.session.tokenRe;if(i.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&r.test(t);)n++;if(n<1)for(i.lastIndex=0;(t=e[n])&&!i.test(t);)if(i.lastIndex=0,n++,r.test(t)){if(n>2){n--;break}for(;(t=e[n])&&r.test(t);)n++;if(n>2)break}}return i.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i=this.session.getFoldAt(e,t,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(t==n.length){var o=this.doc.getLength();do{e++,r=this.doc.getLine(e)}while(e0&&/^\s*$/.test(i));n=i.length,/\s+$/.test(i)||(i="")}var o=r.stringReverse(i),a=this.$shortWordEndIndex(o);return this.moveCursorTo(t,n-a)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===t&&(this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column);var r=this.session.screenToDocumentPosition(n.row+e,n.column);0!==e&&0===t&&r.row===this.lead.row&&r.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[r.row]&&(r.row>0||e>0)&&r.row++,this.moveCursorTo(r.row,r.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var r=this.session.getFoldAt(e,t,1);r&&(e=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var r=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(r.row,r.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return o.fromPoints(t,n)}catch(e){return o.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t});else{var e=this.getRange();e.isBackwards=this.isBackwards()}return e},this.fromJSON=function(e){if(void 0==e.start){if(this.rangeList){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=o.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(a.prototype),exports.Selection=a}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(e,exports,t){"use strict";var n=e("./config"),r=2e3,i=function(e){this.states=e,this.regExps={},this.matchMappings={};for(var t in this.states){for(var n=this.states[t],r=[],i=0,o=this.matchMappings[t]={defaultToken:"text"},a="g",s=[],l=0;l1?this.$applyToken:u.token),d>1&&(/\\\d/.test(u.regex)?c=u.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+i+1)}):(d=1,c=this.removeCapturingGroups(u.regex)),u.splitRegex||"string"==typeof u.token||s.push(u)),o[i]=l,i+=d,r.push(c),u.onMatch||(u.onMatch=null)}}r.length||(o[0]=0,r.push("$")),s.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,a)},this),this.regExps[t]=new RegExp("("+r.join(")|(")+")|($)",a)}};(function(){this.$setMaxTokenCount=function(e){r=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"==typeof n)return[{type:n,value:e}];for(var r=[],i=0,o=n.length;ic){var v=e.substring(c,m-g.length);h.type==f?h.value+=v:(h.type&&u.push(h),h={type:f,value:v})}for(var y=0;yr){for(d>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});c1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:u,state:n.length?n:i}},this.reportError=n.reportError}).call(i.prototype),exports.Tokenizer=i}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,exports,t){"use strict";var n=e("../lib/lang"),r=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var r=e[n],i=0;i=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)t-=1,n+=e[t].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}}}).call(n.prototype),exports.TokenIterator=n}),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,exports,t){"use strict";var n=e("../tokenizer").Tokenizer,r=e("./text_highlight_rules").TextHighlightRules,i=e("./behaviour").Behaviour,o=e("../unicode"),a=e("../lib/lang"),s=e("../token_iterator").TokenIterator,l=e("../range").Range,u=function(){this.HighlightRules=r,this.$behaviour=new i};(function(){this.tokenRe=new RegExp("^["+o.packages.L+o.packages.Mn+o.packages.Mc+o.packages.Nd+o.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+o.packages.L+o.packages.Mn+o.packages.Mc+o.packages.Nd+o.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules,this.$tokenizer=new n(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,r){function i(e){for(var t=n;t<=r;t++)e(o.getLine(t),t)}var o=t.doc,s=!0,l=!0,u=1/0,c=t.getTabSize(),d=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var h=this.lineCommentStart.map(a.escapeRegExp).join("|"),f=this.lineCommentStart[0];else var h=a.escapeRegExp(this.lineCommentStart),f=this.lineCommentStart;h=new RegExp("^(\\s*)(?:"+h+") ?"),d=t.getUseSoftTabs();var p=function(e,t){var n=e.match(h);if(n){var r=n[1].length,i=n[0].length;y(e,r,i)||" "!=n[0][i-1]||i--,o.removeInLine(t,r,i)}},g=f+" ",m=function(e,t){s&&!/\S/.test(e)||(y(e,u,u)?o.insertInLine({row:t,column:u},g):o.insertInLine({row:t,column:u},f))},v=function(e,t){return h.test(e)},y=function(e,t,n){for(var r=0;t--&&" "==e.charAt(t);)r++;if(r%c!=0)return!1;for(var r=0;" "==e.charAt(n++);)r++;return c>2?r%c!=c-1:r%c==0}}else{if(!this.blockComment)return!1;var f=this.blockComment.start,b=this.blockComment.end,h=new RegExp("^(\\s*)(?:"+a.escapeRegExp(f)+")"),_=new RegExp("(?:"+a.escapeRegExp(b)+")\\s*$"),m=function(e,t){v(e,t)||s&&!/\S/.test(e)||(o.insertInLine({row:t,column:e.length},b),o.insertInLine({row:t,column:u},f))},p=function(e,t){var n;(n=e.match(_))&&o.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(h))&&o.removeInLine(t,n[1].length,n[0].length)},v=function(e,n){if(h.test(e))return!0;for(var r=t.getTokens(n),i=0;ie.length&&(w=e.length)}),u==1/0&&(u=w,s=!1,l=!1),d&&u%c!=0&&(u=Math.floor(u/c)*c),i(l?p:m)},this.toggleBlockComment=function(e,t,n,r){var i=this.blockComment;if(i){!i.start&&i[0]&&(i=i[0]);var o,a,u=new s(t,r.row,r.column),c=u.getCurrentToken(),d=(t.selection,t.selection.toOrientedRange());if(c&&/comment/.test(c.type)){for(var h,f;c&&/comment/.test(c.type);){var p=c.value.indexOf(i.start);if(-1!=p){var g=u.getCurrentTokenRow(),m=u.getCurrentTokenColumn()+p;h=new l(g,m,g,m+i.start.length);break}c=u.stepBackward()}for(var u=new s(t,r.row,r.column),c=u.getCurrentToken();c&&/comment/.test(c.type);){var p=c.value.indexOf(i.end);if(-1!=p){var g=u.getCurrentTokenRow(),m=u.getCurrentTokenColumn()+p;f=new l(g,m,g,m+i.end.length);break}c=u.stepForward()}f&&t.remove(f),h&&(t.remove(h),o=h.start.row,a=-i.start.length)}else a=i.start.length,o=n.start.row,t.insert(n.end,i.end),t.insert(n.start,i.start);d.start.row==o&&(d.start.column+=a),d.end.row==o&&(d.end.column+=a),t.selection.fromOrientedRange(d)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var t in e)e[t]&&(this.$embeds.push(t),this.$modes[t]=new e[t]);for(var n=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],t=0;tthis.row)){var n=t(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var r;if(r=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=r.row||this.column!=r.column){var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(i.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,exports,t){"use strict";var n=e("./lib/oop"),r=e("./apply_delta").applyDelta,i=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,a=e("./anchor").Anchor,s=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){n.implement(this,i),this.setValue=function(e){var t=this.getLength()-1;this.remove(new o(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new a(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{t=this.getLines(e.start.row,e.end.row),t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},this.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var r=this.getLine(e);return void 0==t&&(t=r.length),t=Math.min(Math.max(t,0),r.length),{row:e,column:t}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){e=Math.min(Math.max(e,0),this.getLength());var n=0;e0,r=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){if(e instanceof o||(e=o.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);return t?this.insert(e.start,t):e.start},this.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!o.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4&&this.$splitAndapplyLargeDelta(e,2e4),r(this.$lines,e,t),this._signal("change",e))},this.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,r=n.length,i=e.start.row,o=e.start.column,a=0,s=0;;){a=s,s+=t-1;var l=n.slice(a,s);if(s>r){e.lines=l,e.start.row=i+a,e.start.column=o;break}l.push(""),this.applyDelta({start:this.pos(i+a,o),end:this.pos(i+s,o=0),action:e.action,lines:l},!0)}},this.revertDelta=function(e){this.applyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){for(var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=t||0,o=n.length;i20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,o<=r&&n.fireUpdateEvent(o,r)}}};(function(){n.implement(this,r),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],r=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=r.state+""?(this.states[e]=r.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=r.tokens}}).call(i.prototype),exports.BackgroundTokenizer=i}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,exports,t){"use strict";var n=e("./lib/lang"),r=(e("./lib/oop"),e("./range").Range),i=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,i,o){if(this.regExp)for(var a=o.firstRow,s=o.lastRow,l=a;l<=s;l++){var u=this.cache[l];null==u&&(u=n.getMatchOffsets(i.getLine(l),this.regExp),u.length>this.MAX_RANGES&&(u=u.slice(0,this.MAX_RANGES)),u=u.map(function(e){return new r(l,e.offset,l,e.offset+e.length)}),this.cache[l]=u.length?u:"");for(var c=u.length;c--;)t.drawSingleLineMarker(e,u[c].toScreenRange(i),this.clazz,o)}}}).call(i.prototype),exports.SearchHighlight=i}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,exports,t){"use strict";function n(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new r(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}var r=e("../range").Range;(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var r,i,o,a=0,s=this.folds,l=!0;null==t&&(t=this.end.row,n=this.end.column);for(var u=0;u0)){var l=r(e,a.start);return 0===s?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var r=this.pointIndex(e.end,t,n);return r<0?r=-r-1:r++,this.ranges.splice(n,r-n,e)},this.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){var e=[],t=this.ranges;t=t.sort(function(e,t){return r(e.start,t.start)});for(var n,i=t[0],o=1;o=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.rowr)break;if(c.start.row==r&&c.start.column>=t.column&&(c.start.column==t.column&&this.$insertRight||(c.start.column+=a,c.start.row+=o)),c.end.row==r&&c.end.column>=t.column){if(c.end.column==t.column&&this.$insertRight)continue;c.end.column==t.column&&a>0&&lc.start.column&&c.end.column==s[l+1].start.column&&(c.end.column-=a),c.end.column+=a,c.end.row+=o}}}if(0!=o&&l=e)return i;if(i.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),-1==r&&(r=0),r;r=e)return i}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,r=t-e+1,i=0;i=t){s=e?r-=t-s:r=0);break}a>=e&&(r-=s>=e?a-s:a-e+1)}return r},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var n,r=this.$foldData,a=!1;e instanceof o?n=e:(n=new o(t,e),n.collapseChildren=t.collapseChildren),this.$clipRangeToDocument(n.range);var s=n.start.row,l=n.start.column,u=n.end.row,c=n.end.column;if(!(s0&&(this.removeFolds(f),f.forEach(function(e){n.addSubFold(e)}));for(var p=0;p0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var n,i;if(null==e?(n=new r(0,0,this.getLength(),0),t=!0):n="number"==typeof e?new r(e,0,e,this.getLine(e).length):"row"in e?r.fromPoints(e,e):e,i=this.getFoldsInRangeList(n),t)this.removeFolds(i);else for(var o=i;o.length;)this.expandFolds(o),o=this.getFoldsInRangeList(n);if(i.length)return i},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,r,i){null==r&&(r=e.start.row),null==i&&(i=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var o=this.doc,a="";return e.walk(function(e,t,n,s){if(!(t=e){i=o.end.row;try{var a=this.addFold("...",o);a&&(a.collapseChildren=n)}catch(e){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){if(this.$foldMode!=e){if(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!e||"manual"==this.$foldStyle)return void(this.foldWidgets=null);this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var r,i=e-1;i>=0;){var o=n[i];if(null==o&&(o=n[i]=this.getFoldWidget(i)),"start"==o){var a=this.getFoldWidgetRange(i);if(r||(r=a),a&&a.end.row>=e)break}i--}return{range:-1!==i&&a,firstRange:r}},this.onFoldWidgetClick=function(e,t){t=t.domEvent;var n={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var r=t.target||t.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),r=this.getLine(e),i="end"===n?-1:1,o=this.getFoldAt(e,-1===i?0:r.length,i);if(o)return void(t.children||t.all?this.removeFold(o):this.expandFold(o));var a=this.getFoldWidgetRange(e,!0);if(a&&!a.isMultiLine()&&(o=this.getFoldAt(a.start.row,a.start.column,1))&&a.isEqual(o.range))return void this.removeFold(o);if(t.siblings){var s=this.getParentFoldRangeData(e);if(s.range)var l=s.range.start.row+1,u=s.range.end.row;this.foldAll(l,u,t.all?1e4:0)}else t.children?(u=a?a.end.row:this.getLength(),this.foldAll(e+1,u,t.all?1e4:0)):a&&(t.all&&(a.collapseChildren=1e4),this.addFold("...",a));return a}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var r=this.getParentFoldRangeData(t,!0);if(n=r.range||r.firstRange){t=n.start.row;var i=this.getFoldAt(t,this.getLine(t).length,1);i?this.removeFold(i):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}var r=e("../range").Range,i=e("./fold_line").FoldLine,o=e("./fold").Fold,a=e("../token_iterator").TokenIterator;exports.Folding=n}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,exports,t){"use strict";function n(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),r=!0,o=n.charAt(e.column-1),a=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(a||(o=n.charAt(e.column),e={row:e.row,column:e.column+1},a=o&&o.match(/([\(\[\{])|([\)\]\}])/),r=!1),!a)return null;if(a[1]){var s=this.$findClosingBracket(a[1],e);if(!s)return null;t=i.fromPoints(e,s),r||(t.end.column++,t.start.column--),t.cursor=t.end}else{var s=this.$findOpeningBracket(a[2],e);if(!s)return null;t=i.fromPoints(s,e),r||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],o=1,a=new r(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-a.getCurrentTokenColumn()-2,u=s.value;;){for(;l>=0;){var c=u.charAt(l);if(c==i){if(0==(o-=1))return{row:a.getCurrentTokenRow(),column:l+a.getCurrentTokenColumn()}}else c==e&&(o+=1);l-=1}do{s=a.stepBackward()}while(s&&!n.test(s.type));if(null==s)break;u=s.value,l=u.length-1}return null}},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],o=1,a=new r(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-a.getCurrentTokenColumn();;){for(var u=s.value,c=u.length;l=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}n.implement(this,o),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=e,e.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){for(var n=0,r=e.length-1;n<=r;){var i=n+r>>1,o=e[i];if(t>o)n=i+1;else{if(!(t=t);o++);return(n=r[o])?(n.index=o,n.start=i-n.value.length,n):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.$deltasFold.length&&(t.$deltas.push({group:"fold",deltas:t.$deltasFold}),t.$deltasFold=[]),t.$deltasDoc.length&&(t.$deltas.push({group:"doc",deltas:t.$deltasDoc}),t.$deltasDoc=[]),t.$deltas.length>0&&e.execute({action:"aceupdate",args:[t.$deltas,t],merge:t.mergeUndoDeltas}),t.mergeUndoDeltas=!1,t.$deltas=[]},this.$informUndoManager=r.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?r.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||(r=!!n.charAt(t).match(this.tokenRe)),r)var i=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))var i=/\s/;else var i=this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&n.charAt(o).match(i));o++}for(var a=t;ae&&(e=t.screenWidth)}),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,r=0,i=0,o=this.$foldData[i],a=o?o.start.row:1/0,s=t.length,l=0;la){if((l=o.end.row+1)>=s)break;o=this.$foldData[i++],a=o?o.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>r&&(r=n[l])}this.screenWidth=r}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=null,r=e.length-1;-1!=r;r--){var i=e[r];"doc"==i.group?(this.doc.revertDeltas(i.deltas),n=this.$getUndoSelection(i.deltas,!0,n)):i.deltas.forEach(function(e){this.addFolds(e.folds)},this)}return this.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=null,r=0;re.end.column&&(o.start.column+=s),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=s)),a&&o.start.row>=e.end.row&&(o.start.row+=a,o.end.row+=a)}if(o.end=this.insert(o.start,r),i.length){var u=e.start,c=o.start,a=c.row-u.row,s=c.column-u.column;this.addFolds(i.map(function(e){return e=e.clone(),e.start.row==u.row&&(e.start.column+=s),e.end.row==u.row&&(e.end.column+=s),e.start.row+=a,e.end.row+=a,e}))}return o},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var r=e;r<=t;r++)this.doc.insertInLine({row:r,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new l(0,0,0,0),r=this.getTabSize(),i=t.start.row;i<=t.end.row;++i){var o=this.getLine(i);n.start.row=i,n.end.row=i;for(var a=0;a0){var r=this.getRowFoldEnd(t+n);if(r>this.doc.getLength()-1)return 0;var i=r-t}else{e=this.$clipRowToDocument(e),t=this.$clipRowToDocument(t);var i=t-e+1}var o=new l(e,0,t,Number.MAX_VALUE),a=this.getFoldsInRange(o).map(function(e){return e=e.clone(),e.start.row+=i,e.end.row+=i,e}),s=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,s),a.length&&this.addFolds(a),i},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var r=this.$constrainWrapLimit(e,n.min,n.max);return r!=this.$wrapLimit&&r>1&&(this.$wrapLimit=r,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,r=e.start,i=e.end,o=r.row,a=i.row,s=a-o,l=null;if(this.$updating=!0,0!=s)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(o,s);var u=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var c=this.getFoldLine(i.row),d=0;if(c){c.addRemoveChars(i.row,i.column,r.column-i.column),c.shiftRow(-s);var h=this.getFoldLine(o);h&&h!==c&&(h.merge(c),c=h),d=u.indexOf(c)+1}for(d;d=i.row&&c.shiftRow(-s)}a=o}else{var f=Array(s);f.unshift(o,0);var p=t?this.$wrapData:this.$rowLengthCache;p.splice.apply(p,f);var u=this.$foldData,c=this.getFoldLine(o),d=0;if(c){var g=c.range.compareInside(r.row,r.column);0==g?(c=c.split(r.row,r.column))&&(c.shiftRow(s),c.addRemoveChars(a,0,i.column-r.column)):-1==g&&(c.addRemoveChars(o,0,i.column-r.column),c.shiftRow(s)),d=u.indexOf(c)+1}for(d;d=o&&c.shiftRow(s)}}else{s=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),s=-s);var c=this.getFoldLine(o);c&&c.addRemoveChars(o,r.column,s)}return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(o,a):this.$updateRowLengthCache(o,a),l},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,n){var r,i,o=this.doc.getAllLines(),s=this.getTabSize(),l=this.$wrapData,u=this.$wrapLimit,c=e;for(n=Math.min(n,o.length-1);c<=n;)i=this.getFoldLine(c,i),i?(r=[],i.walk(function(e,n,i,s){var l;if(null!=e){l=this.$getDisplayTokens(e,r.length),l[0]=t;for(var u=1;un-v;){var y=c+n-v;if(e[y-1]>=u&&e[y]>=u)o(y);else if(e[y]!=t&&e[y]!=a){for(var b=Math.max(y-(n-(n>>2)),c-1);y>b&&e[y]b&&e[y]b&&9==e[y];)y--}else for(;y>b&&e[y]b?o(++y):(y=c+n,2==e[y]&&y--,o(y-v))}else{for(y;y!=c-1&&e[y]!=t;y--);if(y>c){o(y);continue}for(y=c+n;y39&&a<48||a>57&&a<64?i.push(9):a>=4352&&e(a)?i.push(1,2):i.push(1)}return i},this.$getStringScreenWidth=function(t,n,r){if(0==n)return[0,0];null==n&&(n=1/0),r=r||0;var i,o;for(o=0;o=4352&&e(i)?r+=2:r+=1,!(r>n));o++);return[r,o]},this.lineWidgets=null,this.getRowLength=function(e){if(this.lineWidgets)var t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;else t=0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]=0)var a=l[u],i=this.$docRowCache[u],d=e>l[c-1];else var d=!c;for(var h=this.getLength()-1,f=this.getNextFoldLine(i),p=f?f.start.row:1/0;a<=e&&(s=this.getRowLength(i),!(a+s>e||i>=h));)a+=s,++i>p&&(i=f.end.row+1,f=this.getNextFoldLine(i,f),p=f?f.start.row:1/0),d&&(this.$docRowCache.push(i),this.$screenRowCache.push(a));if(f&&f.start.row<=i)n=this.getFoldDisplayLine(f),i=f.start.row;else{if(a+s<=e||i>h)return{row:h,column:this.getLine(h).length};n=this.getLine(i),f=null}var g=0;if(this.$useWrapMode){var m=this.$wrapData[i];if(m){var v=Math.floor(e-a);r=m[v],v>0&&m.length&&(g=m.indent,o=m[v-1]||m[m.length-1],n=n.substring(o))}}return o+=this.$getStringScreenWidth(n,t-g)[1],this.$useWrapMode&&o>=r&&(o=r-1),f?f.idxToPosition(o):{row:i,column:o}},this.documentToScreenPosition=function(e,t){if(void 0===t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var r=0,i=null,o=null;(o=this.getFoldAt(e,t,1))&&(e=o.start.row,t=o.start.column);var a,s=0,l=this.$docRowCache,u=this.$getRowCacheIndex(l,e),c=l.length;if(c&&u>=0)var s=l[u],r=this.$screenRowCache[u],d=e>l[c-1];else var d=!c;for(var h=this.getNextFoldLine(s),f=h?h.start.row:1/0;s=f){if((a=h.end.row+1)>e)break;h=this.getNextFoldLine(a,h),f=h?h.start.row:1/0}else a=s+1;r+=this.getRowLength(s),s=a,d&&(this.$docRowCache.push(s),this.$screenRowCache.push(r))}var p="";h&&s>=f?(p=this.getFoldDisplayLine(h,e,t),i=h.start.row):(p=this.getLine(e).substring(0,t),i=e);var g=0;if(this.$useWrapMode){var m=this.$wrapData[i];if(m){for(var v=0;p.length>=m[v];)r++,v++;p=p.substring(m[v-1]||0,p.length),g=v>0?m.indent:0}}return{row:r,column:g+this.$getStringScreenWidth(p)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,r=0,i=0,t=this.$foldData[i++],o=t?t.start.row:1/0;ro&&(r=t.end.row+1,t=this.$foldData[i++],o=t?t.start.row:1/0)}else{e=this.getLength();for(var s=this.$foldData,i=0;in));o++);return[r,o]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()}}).call(h.prototype),e("./edit_session/folding").Folding.call(h.prototype),e("./edit_session/bracket_match").BracketMatch.call(h.prototype),i.defineOptions(h.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$modified=!0,this.$resetRowCache(0),this.$updateWrapData(0,this.getLength()-1)))},initialValue:"auto"},indentedSoftWrap:{initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){isNaN(e)||this.$tabSize===e||(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId}}}),exports.EditSession=h}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,exports,t){"use strict";var n=e("./lib/lang"),r=e("./lib/oop"),i=e("./range").Range,o=function(){this.$options={}};(function(){this.set=function(e){return r.mixin(this.$options,e),this},this.getOptions=function(){return n.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var r=null;return n.forEach(function(e,n,o){if(e.start)r=e;else{var a=e.offset+(o||0);if(r=new i(n,a,n,a+e.length),!e.length&&t.start&&t.start.start&&0!=t.skipCurrent&&r.isEqual(t.start))return r=null,!1}return!0}),r},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var r=t.range,o=r?e.getLines(r.start.row,r.end.row):e.doc.getAllLines(),a=[],s=t.re;if(t.$isMultiLine){var l,u=s.length,c=o.length-u;e:for(var d=s.offset||0;d<=c;d++){for(var h=0;hg||(a.push(l=new i(d,g,d+u-1,m)),u>2&&(d=d+u-2))}}else for(var v=0;vw&&a[h].end.row==r.end.row;)h--;for(a=a.slice(v,h+1),v=0,h=a.length;v=0;s--)if(o(a[s],t,i))return!0};else var s=function(e,t,i){for(var a=n.getMatchOffsets(e,r),s=0;s=a;r--)if(n(e.getLine(r),r))return;if(0!=t.wrap)for(r=s,a=o.row;r>=a;r--)if(n(e.getLine(r),r))return}}:function(n){var r=o.row;if(!n(e.getLine(r).substr(o.column),r,o.column)){for(r+=1;r<=s;r++)if(n(e.getLine(r),r))return;if(0!=t.wrap)for(r=a,s=o.row;r<=s;r++)if(n(e.getLine(r),r))return}}}}}).call(o.prototype),exports.Search=o}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,exports,t){"use strict";function n(e,t){this.platform=t||(o.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function r(e,t){n.call(this,e,t),this.$singleCommand=!1}var i=e("../lib/keys"),o=e("../lib/useragent"),a=i.KEY_MODS;r.prototype=n.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||0}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&("string"==typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var r=this.commandKeyBinding;for(var i in r){var o=r[i];if(o==e)delete r[i];else if(Array.isArray(o)){var a=o.indexOf(e);-1!=a&&(o.splice(a,1),1==o.length&&(r[i]=o[0]))}}},this.bindKey=function(e,t,n){if("object"==typeof e&&e&&(void 0==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach(function(e){var r="";if(-1!=e.indexOf(" ")){var i=e.split(/\s+/);e=i.pop(),i.forEach(function(e){var t=this.parseKeys(e),n=a[t.hashId]+t.key;r+=(r?" ":"")+n,this._addCommandToBinding(r,"chainKeys")},this),r+=" "}var o=this.parseKeys(e),s=a[o.hashId]+o.key;this._addCommandToBinding(r+s,t,n)},this)},this._addCommandToBinding=function(t,n,r){var i,o=this.commandKeyBinding;if(n)if(!o[t]||this.$singleCommand)o[t]=n;else{Array.isArray(o[t])?-1!=(i=o[t].indexOf(n))&&o[t].splice(i,1):o[t]=[o[t]],"number"!=typeof r&&(r=r||n.isDefault?-100:e(n));var a=o[t];for(i=0;ir)break}a.splice(i,0,n)}else delete o[t]},this.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var n=e[t];if(n){if("string"==typeof n)return this.bindKey(n,t);"function"==typeof n&&(n={exec:n}),"object"==typeof n&&(n.name||(n.name=t),this.addCommand(n))}},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),n=t.pop(),r=i[n];if(i.FUNCTION_KEYS[r])n=i.FUNCTION_KEYS[r].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var o=0,a=t.length;a--;){var s=i.KEY_MODS[t[a]];if(null==s)return"undefined"!=typeof console&&console.error("invalid modifier "+t[a]+" in "+e),!1;o|=s}return{key:n,hashId:o}},this.findKeyCommand=function(e,t){var n=a[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,r){if(!(r<0)){var i=a[t]+n,o=this.commandKeyBinding[i];return e.$keyChain&&(e.$keyChain+=" "+i,o=this.commandKeyBinding[e.$keyChain]||o),!o||"chainKeys"!=o&&"chainKeys"!=o[o.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||r>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-i.length-1)),{command:o}):(e.$keyChain=e.$keyChain||i,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(n.prototype),exports.HashHandler=n,exports.MultiHashHandler=r}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,exports,t){"use strict";var n=e("../lib/oop"),r=e("../keyboard/hash_handler").MultiHashHandler,i=e("../lib/event_emitter").EventEmitter,o=function(e,t){r.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};n.inherits(o,r),function(){n.implement(this,i),this.exec=function(e,t,n){if(Array.isArray(e)){for(var r=e.length;r--;)if(this.exec(e[r],t,n))return!0;return!1}if("string"==typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;var i={editor:t,command:e,args:n};return i.returnValue=this._emit("exec",i),this._signal("afterExec",i),!1!==i.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map(function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e})}}.call(o.prototype),exports.CommandManager=o}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,exports,t){"use strict";function n(e,t){return{win:e,mac:t}}var r=e("../lib/lang"),i=e("../config"),o=e("../range").Range;exports.commands=[{name:"showSettingsMenu",bindKey:n("Ctrl-,","Command-,"),exec:function(e){i.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:n("Alt-E","Ctrl-E"),exec:function(e){i.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:n("Alt-Shift-E","Ctrl-Shift-E"),exec:function(e){i.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:n("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",bindKey:n(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:n("Ctrl-L","Command-L"),exec:function(e){var t=parseInt(prompt("Enter line number:"),10);isNaN(t)||e.gotoLine(t)},readOnly:!0},{name:"fold",bindKey:n("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:n("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:n("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:n("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:n(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:n("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:n("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:n("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:n("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:n("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:n("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",bindKey:n("Ctrl-F","Command-F"),exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:n("Ctrl-Shift-Home","Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:n("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:n("Shift-Up","Shift-Up"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",bindKey:n("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",bindKey:n("Ctrl-Shift-End","Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:n("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:n("Shift-Down","Shift-Down"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:n("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:n("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:n("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:n("Alt-Shift-Left","Command-Shift-Left"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:n("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:n("Shift-Left","Shift-Left"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:n("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:n("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:n("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:n("Alt-Shift-Right","Command-Shift-Right"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:n("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:n("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:n("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:n(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:n("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:n(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:n("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:n("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:n("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",bindKey:n("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",bindKey:n("Ctrl-P","Ctrl-P"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",bindKey:n("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",bindKey:n("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",bindKey:n(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",exec:function(e){},readOnly:!0},{name:"cut",exec:function(e){var t=e.getSelectionRange();e._emit("cut",t),e.selection.isEmpty()||(e.session.remove(t),e.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",bindKey:n("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:n("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:n("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:n("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:n("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:n("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:n("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",bindKey:n("Ctrl-H","Command-Option-F"),exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",bindKey:n("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",bindKey:n("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",bindKey:n("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:n("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:n("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:n("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:n("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:n("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:n("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:n("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:n("Alt-Delete","Ctrl-K"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:n("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:n("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:n("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:n("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:n("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:n("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(e,t){e.insert(r.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:n(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:n("Ctrl-T","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:n("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:n("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:n("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:n(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),i=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),a=e.session.doc.getLine(n.row).length,s=e.session.doc.getTextRange(e.selection.getRange()),l=s.replace(/\n\s*/," ").length,u=e.session.doc.getLine(n.row),c=n.row+1;c<=i.row+1;c++){var d=r.stringTrimLeft(r.stringTrimRight(e.session.doc.getLine(c)));0!==d.length&&(d=" "+d),u+=d}i.row+10?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+l)):(a=e.session.doc.getLine(n.row).length>a?a+1:a,e.selection.moveCursorTo(n.row,a))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:n(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,r=e.selection.rangeList.ranges,i=[];r.length<1&&(r=[e.selection.getRange()]);for(var a=0;a0&&this.$blockScrolling--;var n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var r=this.selection.getRange(),i=this.renderer.layerConfig;(r.start.row>=i.lastRow||r.end.row<=i.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,r=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var i=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),r=r&&this.mergeNextCommand&&(!/\s/.test(i)||/\s/.test(t.args)),this.mergeNextCommand=!0}else r=r&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(r=!1),r?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e){this.$keybindingId=e;var n=this;m.loadModule(["keybinding",e],function(r){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(r&&r.handler),t&&t()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this})}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||r.computedStyle(this.container,"fontSize")},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=t.findMatchingBracket(e.getCursorPosition());if(n)var r=new h(n.row,n.column,n.row,n.column+1);else if(t.$mode.getMatching)var r=t.$mode.getMatching(e.session);r&&(t.$bracketHighlight=t.addMarker(r,"ace_bracket","text"))}},50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout(function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=e.getCursorPosition(),r=new v(e.session,n.row,n.column),i=r.getCurrentToken();if(!i||!/\b(?:tag-open|tag-name)/.test(i.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1==i.type.indexOf("tag-open")||(i=r.stepForward())){var o=i.value,a=0,s=r.stepBackward();if("<"==s.value)do{s=i,(i=r.stepForward())&&i.value===o&&-1!==i.type.indexOf("tag-name")&&("<"===s.value?a++:"=0);else{do{i=s,s=r.stepBackward(),i&&i.value===o&&-1!==i.type.indexOf("tag-name")&&("<"===s.value?a++:"1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new h(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),r=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",r)}var i=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(i),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column-1,r=t.end.column+1,i=e.getLine(t.start.row),o=i.length,a=i.substring(Math.max(n,0),Math.min(r,o));if(!(n>=0&&/^[\w\d]/.test(a)||r<=o&&/[\w\d]$/.test(a))&&(a=i.substring(t.start.column,t.end.column),/^[\w\d]+$/.test(a))){return this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:a})}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText();return this._signal("copy",e),e},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e,t){var n={text:e,event:t};this.commands.exec("paste",this,n)},this.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var t=e.text;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)this.insert(t);else{var n=t.split(/\r\n|\r|\n/),r=this.selection.rangeList.ranges;if(n.length>r.length||n.length<2||!n[1])return this.commands.exec("insertstring",this,t);for(var i=r.length;i--;){var o=r[i];o.isEmpty()||this.session.remove(o),this.session.insert(o.start,n[i])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var n=this.session,r=n.getMode(),i=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var o=r.transformAction(n.getState(i.row),"insertion",this,n,e);o&&(e!==o.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),e=o.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()){var a=new h.fromPoints(i,i);a.end.column+=e.length,this.session.remove(a)}}else{var a=this.getSelectionRange();i=this.session.remove(a),this.clearSelection()}if("\n"==e||"\r\n"==e){var s=n.getLine(i.row);if(i.column>s.search(/\S|$/)){var l=s.substr(i.column).search(/\S|$/);n.doc.removeInLine(i.row,i.column,i.column+l)}}this.clearSelection();var u=i.column,c=n.getState(i.row),s=n.getLine(i.row),d=r.checkOutdent(c,s,e);n.insert(i,e);if(o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new h(i.row,u+o.selection[0],i.row,u+o.selection[1])):this.selection.setSelectionRange(new h(i.row+o.selection[0],o.selection[1],i.row+o.selection[2],o.selection[3]))),n.getDocument().isNewLine(e)){var f=r.getNextLineIndent(c,s.slice(0,i.column),n.getTabString());n.insert({row:i.row+1,column:0},f)}d&&r.autoOutdent(c,n,i.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,n){this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,r=n.getState(t.start.row),i=n.getMode().transformAction(r,"deletion",this,n,t);if(0===t.end.column){var o=n.getTextRange(t);if("\n"==o[o.length-1]){var a=n.getLine(t.end.row);/^\s+$/.test(a)&&(t.end.column=a.length)}}i&&(t=i)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,r,i=this.session.getLine(e.row);tt.toLowerCase()?1:0});for(var r=new h(0,0,0,0),i=e.first;i<=e.last;i++){var o=t.getLine(i);r.start.row=i,r.end.row=i,r.end.column=o.length,t.replace(r,n[i-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var r=this.session.getLine(e);n.lastIndex=t){return{value:i[0],start:i.index,end:i.index+i[0].length}}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new h(t,n-1,t,n),i=this.session.getTextRange(r);if(!isNaN(parseFloat(i))&&isFinite(i)){var o=this.getNumberAt(t,n);if(o){var a=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,s=o.start+o.value.length-a,l=parseFloat(o.value);l*=Math.pow(10,s),a!==o.end&&nf+1)break;f=p.last}for(c--,s=this.session.$moveLines(h,f,t?0:e),t&&-1==e&&(d=c+1);d<=c;)a[d].moveBy(s,0),d++;t||(s=0),l+=s}i.fromOrientedRange(i.ranges[0]),i.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,r=this.renderer.layerConfig,i=e*Math.floor(r.height/r.lineHeight);this.$blockScrolling++,!0===t?this.selection.$moveSelection(function(){this.moveCursorBy(i,0)}):!1===t&&(this.selection.moveCursorBy(i,0),this.selection.clearSelection()),this.$blockScrolling--;var o=n.scrollTop;n.scrollBy(0,i*r.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(o)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,r){this.renderer.scrollToLine(e,t,n,r)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),r=new v(this.session,n.row,n.column),i=r.getCurrentToken(),o=i||r.stepForward();if(o){var a,s,l=!1,u={},c=n.column-o.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(o.value.match(/[{}()\[\]]/g)){for(;c=0;--o)this.$tryReplace(n[o],e)&&r++;return this.selection.setSelectionRange(i),this.$blockScrolling-=1,r},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return t=this.$search.replace(n,t),null!==t?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,r){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&n.mixin(t,e);var i=this.selection.getRange();null==t.needle&&(e=this.session.getTextRange(i)||this.$search.$options.needle,e||(i=this.session.getWordRange(i.start.row,i.start.column),e=this.session.getTextRange(i)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:i});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,r),o):(t.backwards?i.start=i.end:i.end=i.start,void this.selection.setRange(i))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.$blockScrolling+=1,this.session.unfold(e),this.selection.setSelectionRange(e),this.$blockScrolling-=1;var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,r=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var i=this.$scrollAnchor;i.style.cssText="position:absolute",this.container.insertBefore(i,this.container.firstChild);var o=this.on("changeSelection",function(){r=!0}),a=this.renderer.on("beforeRender",function(){r&&(t=n.renderer.container.getBoundingClientRect())}),s=this.renderer.on("afterRender",function(){if(r&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,o=e.$cursorLayer.$pixelPos,a=e.layerConfig,s=o.top-a.offset;r=o.top>=0&&s+t.top<0||!(o.topwindow.innerHeight)&&null,null!=r&&(i.style.top=s+"px",i.style.left=o.left+"px",i.style.height=a.lineHeight+"px",i.scrollIntoView(r)),r=t=null}});this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",s),this.renderer.off("beforeRender",a))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,r.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))}}).call(y.prototype),m.defineOptions(y.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.keybindingId},handlesSet:!0},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"}),exports.Editor=y}),ace.define("ace/undomanager",["require","exports","module"],function(e,exports,t){"use strict";var n=function(){this.reset()};(function(){function e(e){return{action:e.action,start:e.start,end:e.end,lines:1==e.lines.length?null:e.lines,text:1==e.lines.length?e.lines[0]:null}}function t(e){return{action:e.action,start:e.start,end:e.end,lines:e.lines||[e.text]}}function n(e,t){for(var n=new Array(e.length),r=0;r0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return 0===this.dirtyCounter},this.$serializeDeltas=function(t){return n(t,e)},this.$deserializeDeltas=function(e){return n(e,t)}}).call(n.prototype),exports.UndoManager=n}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(e,exports,t){"use strict";var n=e("../lib/dom"),r=e("../lib/oop"),i=e("../lib/lang"),o=e("../lib/event_emitter").EventEmitter,a=function(e){this.element=n.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){r.implement(this,o),this.setSession=function(e){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;ta&&(g=o.end.row+1,o=t.getNextFoldLine(g,o),a=o?o.start.row:1/0),g>i){for(;this.$cells.length>p+1;)f=this.$cells.pop(),this.element.removeChild(f.element);break}f=this.$cells[++p],f||(f={element:null,textNode:null,foldWidget:null},f.element=n.createElement("div"),f.textNode=document.createTextNode(""),f.element.appendChild(f.textNode),this.element.appendChild(f.element),this.$cells[p]=f);var m="ace_gutter-cell ";l[g]&&(m+=l[g]),u[g]&&(m+=u[g]),this.$annotations[g]&&(m+=this.$annotations[g].className),f.element.className!=m&&(f.element.className=m);var v=t.getRowLength(g)*e.lineHeight+"px";if(v!=f.element.style.height&&(f.element.style.height=v),s){var y=s[g];null==y&&(y=s[g]=t.getFoldWidget(g))}if(y){f.foldWidget||(f.foldWidget=n.createElement("span"),f.element.appendChild(f.foldWidget));var m="ace_fold-widget ace_"+y;"start"==y&&g==a&&gn.right-t.right?"foldWidgets":void 0}}).call(a.prototype),exports.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,exports,t){"use strict";var n=e("../range").Range,r=e("../lib/dom"),i=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){function e(e,t,n,r){return(e?1:0)|(t?2:0)|(n?4:0)|(r?8:0)}this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.update=function(e){var e=e||this.config;if(e){this.config=e;var t=[];for(var n in this.markers){var r=this.markers[n];if(r.range){var i=r.range.clipRows(e.firstRow,e.lastRow);if(!i.isEmpty())if(i=i.toScreenRange(this.session),r.renderer){var o=this.$getTop(i.start.row,e),a=this.$padding+i.start.column*e.characterWidth;r.renderer(t,i,a,o,e)}else"fullLine"==r.type?this.drawFullLineMarker(t,i,r.clazz,e):"screenLine"==r.type?this.drawScreenLineMarker(t,i,r.clazz,e):i.isMultiLine()?"text"==r.type?this.drawTextMarker(t,i,r.clazz,e):this.drawMultiLineMarker(t,i,r.clazz,e):this.drawSingleLineMarker(t,i,r.clazz+" ace_start ace_br15",e)}else r.update(t,this,this.session,e)}this.element.innerHTML=t.join("")}},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(t,r,i,o,a){for(var s=this.session,l=r.start.row,u=r.end.row,c=l,d=0,h=0,f=s.getScreenLastRowColumn(c),p=new n(c,r.start.column,c,h);c<=u;c++)p.start.row=p.end.row=c,p.start.column=c==l?r.start.column:s.getRowWrapIndent(c),p.end.column=f,d=h,h=f,f=c+1f,c==u),o,c==u?0:1,a)},this.drawMultiLineMarker=function(e,t,n,r,i){var o=this.$padding,a=r.lineHeight,s=this.$getTop(t.start.row,r),l=o+t.start.column*r.characterWidth;i=i||"",e.push("
    "),s=this.$getTop(t.end.row,r);var u=t.end.column*r.characterWidth;if(e.push("
    "),!((a=(t.end.row-t.start.row-1)*r.lineHeight)<=0)){s=this.$getTop(t.start.row+1,r);var c=(t.start.column?1:0)|(t.end.column?0:8);e.push("
    ")}},this.drawSingleLineMarker=function(e,t,n,r,i,o){var a=r.lineHeight,s=(t.end.column+(i||0)-t.start.column)*r.characterWidth,l=this.$getTop(t.start.row,r),u=this.$padding+t.start.column*r.characterWidth;e.push("
    ")},this.drawFullLineMarker=function(e,t,n,r,i){var o=this.$getTop(t.start.row,r),a=r.lineHeight;t.start.row!=t.end.row&&(a+=this.$getTop(t.end.row,r)-o),e.push("
    ")},this.drawScreenLineMarker=function(e,t,n,r,i){var o=this.$getTop(t.start.row,r),a=r.lineHeight;e.push("
    ")}}).call(i.prototype),exports.Marker=i}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,exports,t){"use strict";var n=e("../lib/oop"),r=e("../lib/dom"),i=e("../lib/lang"),o=(e("../lib/useragent"),e("../lib/event_emitter").EventEmitter),a=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){n.implement(this,o),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",this.$padding=0,this.$updateEolChar=function(){var e="\n"==this.session.doc.getNewLineCharacter()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},this.setPadding=function(e){this.$padding=e,this.element.style.padding="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;n"+i.stringRepeat(this.TAB_CHAR,n)+""):t.push(i.stringRepeat(" ",n));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var r="ace_indent-guide",o="",a="";if(this.showInvisibles){r+=" ace_invisible",o=" ace_invisible_space",a=" ace_invisible_tab";var s=i.stringRepeat(this.SPACE_CHAR,this.tabSize),l=i.stringRepeat(this.TAB_CHAR,this.tabSize)}else var s=i.stringRepeat(" ",this.tabSize),l=s;this.$tabStrings[" "]=""+s+"",this.$tabStrings["\t"]=""+l+""}},this.updateLines=function(e,t,n){this.config.lastRow==e.lastRow&&this.config.firstRow==e.firstRow||this.scrollLines(e),this.config=e;for(var r=Math.max(t,e.firstRow),i=Math.min(n,e.lastRow),o=this.element.childNodes,a=0,s=e.firstRow;su&&(s=l.end.row+1,l=this.session.getNextFoldLine(s,l),u=l?l.start.row:1/0),s>i)break;var c=o[a++];if(c){var d=[];this.$renderLine(d,s,!this.$useLineGroups(),s==u&&l),c.style.height=e.lineHeight*this.session.getRowLength(s)+"px",c.innerHTML=d.join("")}s++}},this.scrollLines=function(e){var t=this.config;if(this.config=e,!t||t.lastRow0;r--)n.removeChild(n.firstChild);if(t.lastRow>e.lastRow)for(var r=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);r>0;r--)n.removeChild(n.lastChild);if(e.firstRowt.lastRow){var i=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);n.appendChild(i)}},this.$renderLinesFragment=function(e,t,n){for(var i=this.element.ownerDocument.createDocumentFragment(),o=t,a=this.session.getNextFoldLine(o),s=a?a.start.row:1/0;;){if(o>s&&(o=a.end.row+1,a=this.session.getNextFoldLine(o,a),s=a?a.start.row:1/0),o>n)break;var l=r.createElement("div"),u=[];if(this.$renderLine(u,o,!1,o==s&&a),l.innerHTML=u.join(""),this.$useLineGroups())l.className="ace_line_group",i.appendChild(l),l.style.height=e.lineHeight*this.session.getRowLength(o)+"px";else for(;l.firstChild;)i.appendChild(l.firstChild);o++}return i},this.update=function(e){this.config=e;for(var t=[],n=e.firstRow,r=e.lastRow,i=n,o=this.session.getNextFoldLine(i),a=o?o.start.row:1/0;;){if(i>a&&(i=o.end.row+1,o=this.session.getNextFoldLine(i,o),a=o?o.start.row:1/0),i>r)break;this.$useLineGroups()&&t.push("
    "),this.$renderLine(t,i,!1,i==a&&o),this.$useLineGroups()&&t.push("
    "),i++}this.element.innerHTML=t.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,r){var o=this,a=/\t|&|<|>|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF\uFFF9-\uFFFC])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,s=function(e,n,r,a,s){if(n)return o.showInvisibles?""+i.stringRepeat(o.SPACE_CHAR,e.length)+"":e;if("&"==e)return"&";if("<"==e)return"<";if(">"==e)return">";if("\t"==e){var l=o.session.getScreenTabSize(t+a);return t+=l-1,o.$tabStrings[l]}if(" "==e){var u=o.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",c=o.showInvisibles?o.SPACE_CHAR:"";return t+=1,""+c+""}return r?""+o.SPACE_CHAR+"":(t+=1,""+e+"")},l=r.replace(a,s);if(this.$textToken[n.type])e.push(l);else{var u="ace_"+n.type.replace(/\./g," ace_"),c="";"fold"==n.type&&(c=" style='width:"+n.value.length*this.config.characterWidth+"px;' "),e.push("",l,"")}return t+r.length},this.renderIndentGuide=function(e,t,n){var r=t.search(this.$indentGuideRe);return r<=0||r>=n?t:" "==t[0]?(r-=r%this.tabSize,e.push(i.stringRepeat(this.$tabStrings[" "],r/this.tabSize)),t.substr(r)):"\t"==t[0]?(e.push(i.stringRepeat(this.$tabStrings["\t"],r)),t.substr(r)):t},this.$renderWrappedLine=function(e,t,n,r){for(var o=0,a=0,s=n[0],l=0,u=0;u=s;)l=this.$renderToken(e,l,c,d.substring(0,s-o)),d=d.substring(s-o),o=s,r||e.push("
    ","
    "),e.push(i.stringRepeat(" ",n.indent)),a++,l=0,s=n[a]||Number.MAX_VALUE;0!=d.length&&(o+=d.length,l=this.$renderToken(e,l,c,d))}}},this.$renderSimpleLine=function(e,t){var n=0,r=t[0],i=r.value;this.displayIndentGuides&&(i=this.renderIndentGuide(e,i)),i&&(n=this.$renderToken(e,n,r,i));for(var o=1;o"),i.length){var o=this.session.getRowSplitData(t);o&&o.length?this.$renderWrappedLine(e,i,o,n):this.$renderSimpleLine(e,i)}this.showInvisibles&&(r&&(t=r.end.row),e.push("",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"")),n||e.push("
    ")},this.$getFoldLineTokens=function(e,t){function n(e,t,n){for(var r=0,o=0;o+e[r].value.lengthn-t&&(a=a.substring(0,n-t)),i.push({type:e[r].type,value:a}),o=t+a.length,r+=1}for(;on?i.push({type:e[r].type,value:a.substring(0,n-o)}):i.push(e[r]),o+=a.length,r+=1}}var r=this.session,i=[],o=r.getTokens(e);return t.walk(function(e,t,a,s,l){null!=e?i.push({type:"fold",value:e}):(l&&(o=r.getTokens(t)),o.length&&n(o,s,a))},t.end.row,this.session.getLine(t.end.row).length),i},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(a.prototype),exports.Text=a}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,exports,t){"use strict";var n,r=e("../lib/dom"),i=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),void 0===n&&(n=!("opacity"in this.element.style)),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),r.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=(n?this.$updateVisibility:this.$updateOpacity).bind(this)};(function(){this.$updateVisibility=function(e){for(var t=this.cursors,n=t.length;n--;)t[n].style.visibility=e?"":"hidden"},this.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)t[n].style.opacity=e?"":"0"},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e==this.smoothBlinking||n||(this.smoothBlinking=e,r.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.$updateCursors=this.$updateOpacity.bind(this),this.restartTimer())},this.addCursor=function(){var e=r.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&r.removeCssClass(this.element,"ace_smooth-blinking"),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var t=function(){this.timeoutId=setTimeout(function(){e(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){e(!0),t()},this.blinkInterval),t()}},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+n.column*this.config.characterWidth,top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,r=0;void 0!==t&&0!==t.length||(t=[{cursor:null}]);for(var n=0,i=t.length;ne.height+e.offset||o.top<0)&&n>1)){var a=(this.cursors[r++]||this.addCursor()).style;this.drawCursor?this.drawCursor(a,o,e,t[n],this.session):(a.left=o.left+"px",a.top=o.top+"px",a.width=e.characterWidth+"px",a.height=e.lineHeight+"px")}}for(;this.cursors.length>r;)this.removeCursor();var s=this.session.getOverwrite();this.$setOverwrite(s),this.$pixelPos=o,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,"ace_overwrite-cursors"):r.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(i.prototype),exports.Cursor=i}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,exports,t){"use strict";var n=e("./lib/oop"),r=e("./lib/dom"),i=e("./lib/event"),o=e("./lib/event_emitter").EventEmitter,a=function(e){this.element=r.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=r.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,i.addListener(this.element,"scroll",this.onScroll.bind(this)),i.addListener(this.element,"mousedown",i.preventDefault)};(function(){n.implement(this,o),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e}}).call(a.prototype);var s=function(e,t){a.call(this,e),this.scrollTop=0,t.$scrollbarWidth=this.width=r.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px"};n.inherits(s,a),function(){this.classSuffix="-v",this.onScroll=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return this.isVisible?this.width:0},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=function(e){this.inner.style.height=e+"px"},this.setScrollHeight=function(e){this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTop=e)}}.call(s.prototype);var l=function(e,t){a.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};n.inherits(l,a),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(l.prototype),exports.ScrollBar=s,exports.ScrollBarV=s,exports.ScrollBarH=l,exports.VScrollBar=s,exports.HScrollBar=l}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,exports,t){"use strict";var n=e("./lib/event"),r=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.window=t||window};(function(){this.schedule=function(e){if(this.changes=this.changes|e,!this.pending&&this.changes){this.pending=!0;var t=this;n.nextFrame(function(){t.pending=!1;for(var e;e=t.changes;)t.changes=0,t.onRender(e)},this.window)}}}).call(r.prototype),exports.RenderLoop=r}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,exports,t){var n=e("../lib/oop"),r=e("../lib/dom"),i=e("../lib/lang"),o=e("../lib/useragent"),a=e("../lib/event_emitter").EventEmitter,s=0,l=exports.FontMetrics=function(e){this.el=r.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=r.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=r.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),s||this.$testFractionalRect(),this.$measureNode.innerHTML=i.stringRepeat("X",s),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){n.implement(this,a),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var e=r.createElement("div");this.$setMeasureNodeStyles(e.style),e.style.width="0.2px",document.documentElement.appendChild(e);var t=e.getBoundingClientRect().width;s=t>0&&t<1?50:100,e.parentNode.removeChild(e)},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",o.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(){var e=this.$measureSizes();if(e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=setInterval(function(){e.checkForSizeChanges()},500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(){if(50===s){var e=null;try{e=this.$measureNode.getBoundingClientRect()}catch(t){e={width:0,height:0}}var t={height:e.height,width:e.width/s}}else var t={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/s};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){return this.$main.innerHTML=i.stringRepeat(e,s),this.$main.getBoundingClientRect().width/s},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(l.prototype)}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"],function(e,exports,t){"use strict";var n=e("./lib/oop"),r=e("./lib/dom"),i=e("./config"),o=e("./lib/useragent"),a=e("./layer/gutter").Gutter,s=e("./layer/marker").Marker,l=e("./layer/text").Text,u=e("./layer/cursor").Cursor,c=e("./scrollbar").HScrollBar,d=e("./scrollbar").VScrollBar,h=e("./renderloop").RenderLoop,f=e("./layer/font_metrics").FontMetrics,p=e("./lib/event_emitter").EventEmitter;r.importCssString('.ace_editor {position: relative;overflow: hidden;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;min-width: 100%;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;text-indent: -1em;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: inherit;color: inherit;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-webkit-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_editor.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-webkit-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-webkit-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}',"ace_editor.css");var g=function(e,t){var n=this;this.container=e||r.createElement("div"),this.$keepTextAreaAtCursor=!o.isOldIE,r.addCssClass(this.container,"ace_editor"),this.setTheme(t),this.$gutter=r.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=r.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=r.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new a(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new s(this.content);var p=this.$textLayer=new l(this.content);this.canvas=p.element,this.$markerFront=new s(this.content),this.$cursorLayer=new u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new f(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new h(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),i.resetOptions(this),i._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,n.implement(this,p),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar()},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,r){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var i=this.container;r||(r=i.clientHeight||i.scrollHeight),n||(n=i.clientWidth||i.scrollWidth);var o=this.$updateCachedSize(e,t,n,r);if(!this.$size.scrollerHeight||!n&&!r)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,n,r){r-=this.$extraHeight||0;var i=0,o=this.$size,a={width:o.width,height:o.height,scrollerHeight:o.scrollerHeight,scrollerWidth:o.scrollerWidth};return r&&(e||o.height!=r)&&(o.height=r,i|=this.CHANGE_SIZE,o.scrollerHeight=o.height,this.$horizScroll&&(o.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",i|=this.CHANGE_SCROLL),n&&(e||o.width!=n)&&(i|=this.CHANGE_SIZE,o.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,this.scrollBarH.element.style.left=this.scroller.style.left=t+"px",o.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(i|=this.CHANGE_FULL)),o.$dirty=!n||!r,i&&this._signal("resize",a),i},this.onGutterResize=function(){var e=this.$showGutter?this.$gutter.offsetWidth:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var e=this.$cursorLayer.$pixelPos,t=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var n=this.session.selection.getCursor();n.column=0,e=this.$cursorLayer.getPixelPosition(n,!0),t*=this.session.getRowLength(n.row)}this.$gutterLineHighlight.style.top=e.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=t+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=r.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=r.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var e=this.layerConfig,t=this.$cursorLayer.$pixelPos.top,n=this.$cursorLayer.$pixelPos.left;t-=e.offset;var r=this.textarea.style,i=this.lineHeight;if(t<0||t>e.height-i)return void(r.top=r.left="0");var o=this.characterWidth;if(this.$composition){var a=this.textarea.value.replace(/^\x01+/,"");o*=this.session.$getStringScreenWidth(a)[0]+2,i+=2}n-=this.scrollLeft,n>this.$size.scrollerWidth-o&&(n=this.$size.scrollerWidth-o),n+=this.gutterWidth,r.height=i+"px",r.width=o+"px",r.left=Math.min(n,this.$size.scrollerWidth-o)+"px",r.top=Math.min(t,this.$size.height-i)+"px"}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,r){var i=this.scrollMargin;i.top=0|e,i.bottom=0|t,i.right=0|r,i.left=0|n,i.v=i.top+i.bottom,i.h=i.left+i.right,i.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-i.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!e&&!t)return void(this.$changes|=e);if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender");var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var r=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;r>0&&(this.scrollTop=r,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-n.offset+"px",this.content.style.marginTop=-n.offset+"px",this.content.style.width=n.width+2*this.$padding+"px",this.content.style.height=n.minHeight+"px"}return e&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL?(this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),void this._signal("afterRender")):e&this.CHANGE_SCROLL?(e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),void this._signal("afterRender")):(e&this.CHANGE_TEXT?(this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):(e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(n),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),void this._signal("afterRender"))},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.max((this.$minLines||1)*this.lineHeight,Math.min(t,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight());var r=e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||r!=this.$vScroll){r!=this.$vScroll&&(this.$vScroll=r,this.scrollBarV.setVisible(r));var i=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,i,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,r=this.session.getScreenLength(),i=r*this.lineHeight,o=this.$getLongestLine(),a=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-o-2*this.$padding<0),s=this.$horizScroll!==a;s&&(this.$horizScroll=a,this.scrollBarH.setVisible(a));var l=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var u=this.scrollTop%this.lineHeight,c=t.scrollerHeight+this.lineHeight,d=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;i+=d;var h=this.scrollMargin;this.session.setScrollTop(Math.max(-h.top,Math.min(this.scrollTop,i-t.scrollerHeight+h.bottom))),this.session.setScrollLeft(Math.max(-h.left,Math.min(this.scrollLeft,o+2*this.$padding-t.scrollerWidth+h.right)));var f=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-i+d<0||this.scrollTop>h.top),p=l!==f;p&&(this.$vScroll=f,this.scrollBarV.setVisible(f));var g,m,v=Math.ceil(c/this.lineHeight)-1,y=Math.max(0,Math.round((this.scrollTop-u)/this.lineHeight)),b=y+v,_=this.lineHeight;y=e.screenToDocumentRow(y,0);var w=e.getFoldLine(y);w&&(y=w.start.row),g=e.documentToScreenRow(y,0),m=e.getRowLength(y)*_,b=Math.min(e.screenToDocumentRow(b,0),e.getLength()-1),c=t.scrollerHeight+e.getRowLength(b)*_+m,u=this.scrollTop-g*_;var C=0;return this.layerConfig.width!=o&&(C=this.CHANGE_H_SCROLL),(s||p)&&(C=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),p&&(o=this.$getLongestLine())),this.layerConfig={width:o,padding:this.$padding,firstRow:y,firstRowScreen:g,lastRow:b,lineHeight:_,characterWidth:this.characterWidth,minHeight:c,maxHeight:i,offset:u,gutterOffset:Math.max(0,Math.ceil((u+t.height-t.scrollerHeight)/_)),height:this.$size.scrollerHeight},C},this.$updateLines=function(){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1||to?(t&&l+a>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-si?(i=1-this.scrollMargin.top||(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},this.pixelToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=(e+this.scrollLeft-n.left-this.$padding)/this.characterWidth,i=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),o=Math.round(r);return{row:i,column:o,side:r-o>0?1:-1}},this.screenToTextCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=Math.round((e+this.scrollLeft-n.left-this.$padding)/this.characterWidth),i=(t+this.scrollTop-n.top)/this.lineHeight;return this.session.screenToDocumentPosition(i,Math.max(r,0))},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(e,t),i=this.$padding+Math.round(r.column*this.characterWidth),o=r.row*this.lineHeight;return{pageX:n.left+i-this.scrollLeft,pageY:n.top+o-this.scrollTop}},this.visualizeFocus=function(){r.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){r.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,r.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(e){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(r.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(e,t){function n(n){if(o.$themeId!=e)return t&&t();if(n.cssClass){r.importCssString(n.cssText,n.cssClass,o.container.ownerDocument),o.theme&&r.removeCssClass(o.container,o.theme.cssClass);var i="padding"in n?n.padding:"padding"in(o.theme||{})?4:o.$padding;o.$padding&&i!=o.$padding&&o.setPadding(i),o.$theme=n.cssClass,o.theme=n,r.addCssClass(o.container,n.cssClass),r.setCssClass(o.container,"ace_dark",n.isDark),o.$size&&(o.$size.width=0,o.$updateSizeAsync()),o._dispatchEvent("themeLoaded",{theme:n}),t&&t()}}var o=this;if(this.$themeId=e,o._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)n(e);else{var a=e||this.$options.theme.initialValue;i.loadModule(["theme",a],n)}},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){r.setCssClass(this.container,e,!1!==t)},this.unsetStyle=function(e){r.removeCssClass(this.container,e)},this.setCursorStyle=function(e){this.scroller.style.cursor!=e&&(this.scroller.style.cursor=e)},this.setMouseCursor=function(e){this.scroller.style.cursor=e},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(g.prototype),i.defineOptions(g.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(e){r.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e)},initialValue:!0},showLineNumbers:{set:function(e){this.$gutterLayer.setShowLineNumbers(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(e){if(!this.$gutterLineHighlight)return this.$gutterLineHighlight=r.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",void this.$gutter.appendChild(this.$gutterLineHighlight);this.$gutterLineHighlight.style.display=e?"":"none",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight()},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.updateFull()}},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),exports.VirtualRenderer=g}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,exports,n){"use strict";var r=e("../lib/oop"),i=e("../lib/net"),o=e("../lib/event_emitter").EventEmitter,a=e("../config"),s=function(n,r,i,o){if(this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),a.get("packaged")||!e.toUrl)o=o||a.moduleUrl(r.id,"worker");else{var s=this.$normalizePath;o=o||s(e.toUrl("ace/worker/worker.js",null,"_"));var l={};n.forEach(function(t){l[t]=s(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}try{var u=r.src,c=t(205),d=new c([u],{type:"application/javascript"}),h=(window.URL||window.webkitURL).createObjectURL(d);this.$worker=new Worker(h)}catch(e){if(!(e instanceof window.DOMException))throw e;var d=this.$workerBlob(o),f=window.URL||window.webkitURL,p=f.createObjectURL(d);this.$worker=new Worker(p),f.revokeObjectURL(p)}this.$worker.postMessage({init:!0,tlns:l,module:r.id,classname:i}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){r.implement(this,o),this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return i.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var r=this.callbackId++;this.callbacks[r]=n,t.push(r)}this.send(e,t)},this.emit=function(e,t){try{this.$worker.postMessage({event:e,data:{data:t.data}})}catch(e){console.error(e.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))},this.$workerBlob=function(e){var t="importScripts('"+i.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(e){var n=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,r=new n;return r.append(t),r.getBlob("application/javascript")}}}).call(s.prototype);var l=function(e,t,n){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var r=null,i=!1,s=Object.create(o),l=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){l.messageBuffer.push(e),r&&(i?setTimeout(u):u())},this.setEmitSync=function(e){i=e};var u=function(){var e=l.messageBuffer.shift();e.command?r[e.command].apply(r,e.args):e.event&&s._signal(e.event,e.data)};s.postMessage=function(e){l.onMessage({data:e})},s.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},s.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},a.loadModule(["worker",t],function(e){for(r=new e[n](s);l.messageBuffer.length;)u()})};l.prototype=s.prototype,exports.UIWorkerClient=l,exports.WorkerClient=s}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,exports,t){"use strict";var n=e("./range").Range,r=e("./lib/event_emitter").EventEmitter,i=e("./lib/oop"),o=function(e,t,n,r,i,o){var a=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=i,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=r,this.$onCursorChange=function(){setTimeout(function(){a.onCursorChange()})},this.$pos=n;var s=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=s.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){i.implement(this,r),this.setup=function(){var e=this,t=this.doc,r=this.session;this.selectionBefore=r.selection.toJSON(),r.selection.inMultiSelectMode&&r.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=r.addMarker(new n(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(n){var r=t.createAnchor(n.row,n.column);r.$insertRight=!0,r.detach(),e.others.push(r)}),r.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(r){r.markerId=e.addMarker(new n(r.row,r.column,r.row,r.column+t.length),t.othersClass,null,!1)})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),i&&(this.length+=r),i&&!this.session.$fromUndo)if("insert"===e.action)for(var a=this.others.length-1;a>=0;a--){var s=this.others[a],l={row:s.row,column:s.column+o};this.doc.insertMergedLines(l,e.lines)}else if("remove"===e.action)for(var a=this.others.length-1;a>=0;a--){var s=this.others[a],l={row:s.row,column:s.column+o};this.doc.remove(new n(l.row,l.column,l.row,l.column-r))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,r=function(r,i){t.removeMarker(r.markerId),r.markerId=t.addMarker(new n(r.row,r.column,r.row,r.column+e.length),i,null,!1)};r(this.pos,this.mainClass);for(var i=this.others.length;i--;)r(this.others[i],this.othersClass)}},this.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length?this.$onRemoveRange(e):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var r=this.ranges.indexOf(e[n]);this.ranges.splice(r,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new a,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=s.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var n=this.getRange(),r=this.isBackwards(),i=n.start.row,o=n.end.row;if(i==o){if(r)var a=n.end,l=n.start;else var a=n.start,l=n.end;return this.addRange(s.fromPoints(l,l)),void this.addRange(s.fromPoints(a,a))}var u=[],c=this.getLineRange(i,!0);c.start.column=n.start.column,u.push(c);for(var d=i+1;d1){var e=this.rangeList.ranges,t=e[e.length-1],n=s.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var r=this.session.documentToScreenPosition(this.selectionLead),i=this.session.documentToScreenPosition(this.selectionAnchor);this.rectangularRangeBlock(r,i).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var i=[],o=e.column0;)g--;if(g>0)for(var m=0;i[m].isEmpty();)m++;for(var v=g;v>=m;v--)i[v].isEmpty()&&i.splice(v,1)}return i}}.call(l.prototype);var m=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var r=e[n];if(r.marker){this.session.removeMarker(r.marker);var i=t.indexOf(r);-1!=i&&t.splice(i,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(h.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(h.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?r=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?r=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),r=t.exec(n,e.args||{})):r=t.multiSelectAction(n,e.args||{});else{var r=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return r}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var r,i=n&&n.keepOrder,o=1==n||n&&n.$byLines,a=this.session,s=this.selection,u=s.rangeList,c=(i?s:u).ranges;if(!c.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var d=s._eventRegistry;s._eventRegistry={};var h=new l(a);this.inVirtualSelectionMode=!0;for(var f=c.length;f--;){if(o)for(;f>0&&c[f].start.row==c[f-1].end.row;)f--;h.fromOrientedRange(c[f]),h.index=f,this.selection=a.selection=h;var p=e.exec?e.exec(this,t||{}):e(this,t||{});r||void 0===p||(r=p),h.toOrientedRange(c[f])}h.detach(),this.selection=a.selection=s,this.inVirtualSelectionMode=!1,s._eventRegistry=d,s.mergeOverlappingRanges();var g=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),g&&g.from==g.to&&this.renderer.animateScrolling(g.from),r}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],r=0;ro&&(o=n.column),iu?e.insert(r,d.stringRepeat(" ",i-u)):e.remove(new s(r.row,r.column,r.row,r.column-i+u)),t.start.column=t.end.column=o,t.start.row=t.end.row=r.row,t.cursor=t.end}),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),c=u.start.row,h=u.end.row,f=c==h;if(f){var p,g=this.session.getLength();do{p=this.session.getLine(h)}while(/[=:]/.test(p)&&++h0);c<0&&(c=0),h>=g&&(h=g-1)}var m=this.session.removeFullLines(c,h);m=this.$reAlignText(m,f),this.session.insert({row:c,column:0},m.join("\n")+"\n"),f||(u.start.column=0,u.end.column=m[m.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(e,t){function n(e){return d.stringRepeat(" ",e)}function r(e){return e[2]?n(a)+e[2]+n(s-e[2].length+l)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function i(e){return e[2]?n(a+s-e[2].length)+e[2]+n(l," ")+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function o(e){return e[2]?n(a)+e[2]+n(l)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}var a,s,l,u=!0,c=!0;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==a?(a=t[1].length,s=t[2].length,l=t[3].length,t):(a+s+l!=t[1].length+t[2].length+t[3].length&&(c=!1),a!=t[1].length&&(u=!1),a>t[1].length&&(a=t[1].length),st[3].length&&(l=t[3].length),t):[e]}).map(t?r:u?c?i:r:o)}}).call(m.prototype),exports.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},exports.MultiSelect=i,e("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function(e){i(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",u)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",u))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,exports,t){"use strict";var n=e("../../range").Range,r=exports.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,r){var i=/\S/,o=e.getLine(t),a=o.search(i);if(-1!=a){for(var s=r||o.length,l=e.getLength(),u=t,c=t;++tu){var h=e.getLine(c).length;return new n(u,s,c,h)}}},this.openingBracketBlock=function(e,t,r,i,o){var a={row:r,column:i+1},s=e.$findClosingBracket(t,a,o);if(s){var l=e.foldWidgets[s.row];return null==l&&(l=e.getFoldWidget(s.row)),"start"==l&&s.row>a.row&&(s.row--,s.column=e.getLine(s.row).length),n.fromPoints(a,s)}},this.closingBracketBlock=function(e,t,r,i,o){var a={row:r,column:i},s=e.$findOpeningBracket(t,a);if(s)return s.column++,a.column--,n.fromPoints(s,a)}}).call(r.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,exports,t){"use strict";exports.isDark=!1,exports.cssClass="ace-tm",exports.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',e("../lib/dom").importCssString(exports.cssText,exports.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(e,exports,t){"use strict";function n(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}var r=(e("./lib/oop"),e("./lib/dom"));e("./range").Range;(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets?this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0:0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach(function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)}),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})}},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var r=e.data,i=r.start.row,o=r.end.row,a="add"==e.action,s=i+1;s0&&!r[i];)i--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var a=i;a<=o;a++){var s=r[a];if(s&&s.el)if(s.hidden)s.el.style.top=-100-(s.pixelHeight||0)+"px";else{s._inDocument||(s._inDocument=!0,t.container.appendChild(s.el));var l=t.$cursorLayer.getPixelPosition({row:a,column:0},!0).top;s.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(s.row)),s.el.style.top=l-n.offset+"px";var u=s.coverGutter?0:t.gutterWidth;s.fixedWidth||(u-=t.scrollLeft),s.el.style.left=u+"px",s.fullWidth&&s.screenWidth&&(s.el.style.minWidth=n.width+2*n.padding+"px"),s.fixedWidth?s.el.style.right=t.scrollBar.getWidth()+"px":s.el.style.right=""}}}}}).call(n.prototype),exports.LineWidgets=n}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(e,exports,t){"use strict";function n(e,t,n){for(var r=0,i=e.length-1;r<=i;){var o=r+i>>1,a=n(t,e[o]);if(a>0)r=o+1;else{if(!(a<0))return o;i=o-1}}return-(r+1)}function r(e,t,r){var i=e.getAnnotations().sort(a.comparePoints);if(i.length){var o=n(i,{row:t,column:-1},a.comparePoints);o<0&&(o=-o-1),o>=i.length?o=r>0?0:i.length-1:0===o&&r<0&&(o=i.length-1);var s=i[o];if(s&&r){if(s.row===t){do{s=i[o+=r]}while(s&&s.row===t);if(!s)return i.slice()}var l=[];t=s.row;do{l[r<0?"unshift":"push"](s),s=i[o+=r]}while(s&&s.row==t);return l.length&&l}}}var i=e("../line_widgets").LineWidgets,o=e("../lib/dom"),a=e("../range").Range;exports.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new i(n),n.widgetManager.attach(e));var a=e.getCursorPosition(),s=a.row,l=n.widgetManager.getWidgetsAtRow(s).filter(function(e){return"errorMarker"==e.type})[0];l?l.destroy():s-=t;var u,c=r(n,s,t);if(c){var d=c[0];a.column=(d.pos&&"number"!=typeof d.column?d.pos.sc:d.column)||0,a.row=d.row,u=e.renderer.$gutterLayer.$annotations[a.row]}else{if(l)return;u={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(a.row),e.selection.moveToPosition(a);var h={row:a.row,fixedWidth:!0,coverGutter:!0,el:o.createElement("div"),type:"errorMarker"},f=h.el.appendChild(o.createElement("div")),p=h.el.appendChild(o.createElement("div"));p.className="error_widget_arrow "+u.className;var g=e.renderer.$cursorLayer.getPixelPosition(a).left;p.style.left=g+e.renderer.gutterWidth-5+"px",h.el.className="error_widget_wrapper",f.className="error_widget "+u.className,f.innerHTML=u.text.join("
    "),f.appendChild(o.createElement("div"));var m=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return h.destroy(),{command:"null"}};h.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(m),n.widgetManager.removeLineWidget(h),e.off("changeSelection",h.destroy),e.off("changeSession",h.destroy),e.off("mouseup",h.destroy),e.off("change",h.destroy))},e.keyBinding.addKeyboardHandler(m),e.on("changeSelection",h.destroy),e.on("changeSession",h.destroy),e.on("mouseup",h.destroy),e.on("change",h.destroy),e.session.widgetManager.addLineWidget(h),h.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:h.el.offsetHeight})},o.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")}),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,exports,t){"use strict";e("./lib/fixoldbrowsers");var n=e("./lib/dom"),r=e("./lib/event"),i=e("./editor").Editor,o=e("./edit_session").EditSession,a=e("./undomanager").UndoManager,s=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),exports.config=e("./config"),exports.acequire=e,exports.edit=function(e){if("string"==typeof e){var t=e;if(!(e=document.getElementById(t)))throw new Error("ace.edit can't find div #"+t)}if(e&&e.env&&e.env.editor instanceof i)return e.env.editor;var o="";if(e&&/input|textarea/i.test(e.tagName)){var a=e;o=a.value,e=n.createElement("pre"),a.parentNode.replaceChild(e,a)}else e&&(o=n.getInnerText(e),e.innerHTML="");var l=exports.createEditSession(o),u=new i(new s(e));u.setSession(l);var c={document:l,editor:u,onResize:u.resize.bind(u,null)};return a&&(c.textarea=a),r.addListener(window,"resize",c.onResize),u.on("destroy",function(){r.removeListener(window,"resize",c.onResize),c.editor.container.env=null}),u.container.env=u.env=c,u},exports.createEditSession=function(e,t){var n=new o(e,t);return n.setUndoManager(new a),n},exports.EditSession=o,exports.UndoManager=a,exports.version="1.2.3"}),function(){ace.acequire(["ace/ace"],function(e){e&&e.config.init(!0),window.ace||(window.ace=e);for(var t in e)e.hasOwnProperty(t)&&(window.ace[t]=e[t])})}(),e.exports=window.ace.acequire("ace/ace")},function(e,exports,t){(function(e,t){function n(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n-1}function w(e,t){var n=this.__data__,r=N(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function C(e){var t=-1,n=null==e?0:e.length;for(this.clear();++tu))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var h=-1,f=!0,p=n&_e?new k:void 0;for(s.set(e,t),s.set(t,e);++h-1&&e%1==0&&e-1&&e%1==0&&e<=we}function he(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function fe(e){return null!=e&&"object"==typeof e}function pe(e){return le(e)?I(e):q(e)}function ge(){return[]}function me(){return!1}var ve=200,ye="__lodash_hash_undefined__",be=1,_e=2,we=9007199254740991,Ce="[object Arguments]",Ae="[object Array]",Ee="[object AsyncFunction]",Se="[object Boolean]",xe="[object Date]",Fe="[object Error]",ke="[object Function]",De="[object GeneratorFunction]",Te="[object Map]",Me="[object Number]",Re="[object Null]",Oe="[object Object]",Le="[object Proxy]",Pe="[object RegExp]",Be="[object Set]",Ie="[object String]",$e="[object Symbol]",Ne="[object Undefined]",je="[object ArrayBuffer]",ze="[object DataView]",He=/[\\^$.*+?()[\]{}|]/g,Ue=/^\[object .+?Constructor\]$/,Ve=/^(?:0|[1-9]\d*)$/,Ge={};Ge["[object Float32Array]"]=Ge["[object Float64Array]"]=Ge["[object Int8Array]"]=Ge["[object Int16Array]"]=Ge["[object Int32Array]"]=Ge["[object Uint8Array]"]=Ge["[object Uint8ClampedArray]"]=Ge["[object Uint16Array]"]=Ge["[object Uint32Array]"]=!0,Ge[Ce]=Ge[Ae]=Ge[je]=Ge[Se]=Ge[ze]=Ge[xe]=Ge[Fe]=Ge[ke]=Ge[Te]=Ge[Me]=Ge[Oe]=Ge[Pe]=Ge[Be]=Ge[Ie]=Ge["[object WeakMap]"]=!1;var We="object"==typeof e&&e&&e.Object===Object&&e,qe="object"==typeof self&&self&&self.Object===Object&&self,Ke=We||qe||Function("return this")(),Ye="object"==typeof exports&&exports&&!exports.nodeType&&exports,Xe=Ye&&"object"==typeof t&&t&&!t.nodeType&&t,Qe=Xe&&Xe.exports===Ye,Ze=Qe&&We.process,Je=function(){try{return Ze&&Ze.binding&&Ze.binding("util")}catch(e){}}(),et=Je&&Je.isTypedArray,tt=Array.prototype,nt=Function.prototype,rt=Object.prototype,it=Ke["__core-js_shared__"],ot=nt.toString,at=rt.hasOwnProperty,st=function(){var e=/[^.]+$/.exec(it&&it.keys&&it.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),lt=rt.toString,ut=RegExp("^"+ot.call(at).replace(He,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ct=Qe?Ke.Buffer:void 0,dt=Ke.Symbol,ht=Ke.Uint8Array,ft=rt.propertyIsEnumerable,pt=tt.splice,gt=dt?dt.toStringTag:void 0,mt=Object.getOwnPropertySymbols,vt=ct?ct.isBuffer:void 0,yt=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),bt=J(Ke,"DataView"),_t=J(Ke,"Map"),wt=J(Ke,"Promise"),Ct=J(Ke,"Set"),At=J(Ke,"WeakMap"),Et=J(Object,"create"),St=ae(bt),xt=ae(_t),Ft=ae(wt),kt=ae(Ct),Dt=ae(At),Tt=dt?dt.prototype:void 0,Mt=Tt?Tt.valueOf:void 0;c.prototype.clear=d,c.prototype.delete=h,c.prototype.get=f,c.prototype.has=p,c.prototype.set=g,m.prototype.clear=v,m.prototype.delete=y,m.prototype.get=b,m.prototype.has=_,m.prototype.set=w,C.prototype.clear=A,C.prototype.delete=E,C.prototype.get=S,C.prototype.has=x,C.prototype.set=F,k.prototype.add=k.prototype.push=D,k.prototype.has=T,M.prototype.clear=R,M.prototype.delete=O,M.prototype.get=L,M.prototype.has=P,M.prototype.set=B;var Rt=mt?function(e){return null==e?[]:(e=Object(e),n(mt(e),function(t){return ft.call(e,t)}))}:ge,Ot=z;(bt&&Ot(new bt(new ArrayBuffer(1)))!=ze||_t&&Ot(new _t)!=Te||wt&&"[object Promise]"!=Ot(wt.resolve())||Ct&&Ot(new Ct)!=Be||At&&"[object WeakMap]"!=Ot(new At))&&(Ot=function(e){var t=z(e),n=t==Oe?e.constructor:void 0,r=n?ae(n):"";if(r)switch(r){case St:return ze;case xt:return Te;case Ft:return"[object Promise]";case kt:return Be;case Dt:return"[object WeakMap]"}return t});var Lt=H(function(){return arguments}())?H:function(e){return fe(e)&&at.call(e,"callee")&&!ft.call(e,"callee")},Pt=Array.isArray,Bt=vt||me,It=et?function(e){return function(t){return e(t)}}(et):W;t.exports=ue}).call(exports,t(21),t(40)(e))},function(e,exports,t){!function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function(e,n,r){if("string"!=typeof e)return void(t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace()));2==arguments.length&&(r=n),t.modules[e]||(t.payloads[e]=r,t.modules[e]=null)};t.modules={},t.payloads={};var n=function(e,t,n){if("string"==typeof t){var i=o(e,t);if(void 0!=i)return n&&n(),i}else if("[object Array]"===Object.prototype.toString.call(t)){for(var a=[],s=0,l=t.length;s1&&r(l,"")>-1&&(s=RegExp(this.source,i.replace.call(n(this),"g","")),i.replace.call(e.slice(l.index),s,function(){for(var e=1;el.index&&this.lastIndex--}return l},a||(RegExp.prototype.test=function(e){var t=i.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,exports,t){function n(){}function r(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(e){}}function i(e){return e=+e,e!==e?e=0:0!==e&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError("Function.prototype.bind called on incompatible "+t);var r=f.call(arguments,1),i=function(){if(this instanceof i){var n=t.apply(this,r.concat(f.call(arguments)));return Object(n)===n?n:this}return t.apply(e,r.concat(f.call(arguments)))};return t.prototype&&(n.prototype=t.prototype,i.prototype=new n,n.prototype=null),i});var o,a,s,l,u,c=Function.prototype.call,d=Array.prototype,h=Object.prototype,f=d.slice,p=c.bind(h.toString),g=c.bind(h.hasOwnProperty);if((u=g(h,"__defineGetter__"))&&(o=c.bind(h.__defineGetter__),a=c.bind(h.__defineSetter__),s=c.bind(h.__lookupGetter__),l=c.bind(h.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t,n=[];if(n.splice.apply(n,e(20)),n.splice.apply(n,e(26)),t=n.length,n.splice(5,0,"XXX"),n.length,t+1==n.length)return!0}()){var m=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?m.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(f.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):void 0==e?e=0:e<0&&(e=Math.max(n+e,0)),e+ts)for(d=u;d--;)this[l+d]=this[s+d];if(o&&e===c)this.length=c,this.push.apply(this,i);else for(this.length=c+o,d=0;d>>0;if("[object Function]"!=p(e))throw new TypeError;for(;++i>>0,i=Array(r),o=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var a=0;a>>0,o=[],a=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var s=0;s>>0,i=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var o=0;o>>0,i=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var o=0;o>>0;if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");if(!r&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var i,o=0;if(arguments.length>=2)i=arguments[1];else for(;;){if(o in n){i=n[o++];break}if(++o>=r)throw new TypeError("reduce of empty array with no initial value")}for(;o>>0;if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");if(!r&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var i,o=r-1;if(arguments.length>=2)i=arguments[1];else for(;;){if(o in n){i=n[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}do{o in this&&(i=e.call(void 0,i,n[o],o,t))}while(o--);return i}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=y&&"[object String]"==p(this)?this.split(""):T(this),n=t.length>>>0;if(!n)return-1;var r=0;for(arguments.length>1&&(r=i(arguments[1])),r=r>=0?r:Math.max(0,n+r);r>>0;if(!n)return-1;var r=n-1;for(arguments.length>1&&(r=Math.min(r,i(arguments[1]))),r=r>=0?r:n-Math.abs(r);r>=0;r--)if(r in t&&e===t[r])return r;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:h)}),!Object.getOwnPropertyDescriptor){Object.getOwnPropertyDescriptor=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+e);if(g(e,t)){var n,r,i;if(n={enumerable:!0,configurable:!0},u){var o=e.__proto__;e.__proto__=h;var r=s(e,t),i=l(e,t);if(e.__proto__=o,r||i)return r&&(n.get=r),i&&(n.set=i),n}return n.value=e[t],n}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),!Object.create){var b;b=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var n;if(null===e)n=b();else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var r=function(){};r.prototype=e,n=new r,n.__proto__=e}return void 0!==t&&Object.defineProperties(n,t),n}}if(Object.defineProperty){var _=r({}),w="undefined"==typeof document||r(document.createElement("div"));if(!_||!w)var C=Object.defineProperty}if(!Object.defineProperty||C){Object.defineProperty=function(e,t,n){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.defineProperty called on non-object: "+e);if("object"!=typeof n&&"function"!=typeof n||null===n)throw new TypeError("Property description must be an object: "+n);if(C)try{return C.call(Object,e,t,n)}catch(e){}if(g(n,"value"))if(u&&(s(e,t)||l(e,t))){var r=e.__proto__;e.__proto__=h,delete e[t],e[t]=n.value,e.__proto__=r}else e[t]=n.value;else{if(!u)throw new TypeError("getters & setters can not be defined on this javascript engine");g(n,"get")&&o(e,t,n.get),g(n,"set")&&a(e,t,n.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)g(t,n)&&Object.defineProperty(e,n,t[n]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(e){Object.freeze=function(e){return function(t){return"function"==typeof t?t:e(t)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;for(var t="";g(e,t);)t+="?";e[t]=!0;var n=g(e,t);return delete e[t],n}),!Object.keys){var A=!0,E=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],S=E.length;for(var x in{toString:null})A=!1;Object.keys=function(e){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on a non-object");var t=[];for(var n in e)g(e,n)&&t.push(n);if(A)for(var r=0,i=S;r=0?parseFloat((r.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((r.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),exports.isOldIE=exports.isIE&&exports.isIE<9,exports.isGecko=exports.isMozilla=(window.Controllers||window.controllers)&&"Gecko"===window.navigator.product,exports.isOldGecko=exports.isGecko&&parseInt((r.match(/rv\:(\d+)/)||[])[1],10)<4,exports.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),exports.isWebKit=parseFloat(r.split("WebKit/")[1])||void 0,exports.isChrome=parseFloat(r.split(" Chrome/")[1])||void 0,exports.isAIR=r.indexOf("AdobeAIR")>=0,exports.isIPad=r.indexOf("iPad")>=0,exports.isTouchPad=r.indexOf("TouchPad")>=0,exports.isChromeOS=r.indexOf(" CrOS ")>=0}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,exports,t){"use strict";function n(e,t,n){var r=l(t);if(!o.isMac&&a){if(a.OSKey&&(r|=8),a.altGr){if(3==(3&r))return;a.altGr=0}if(18===n||17===n){var u="location"in t?t.location:t.keyLocation;if(17===n&&1===u)1==a[n]&&(s=t.timeStamp);else if(18===n&&3===r&&2===u){var c=t.timeStamp-s;c<50&&(a.altGr=!0)}}}if(n in i.MODIFIER_KEYS&&(n=-1),8&r&&n>=91&&n<=93&&(n=-1),!r&&13===n){var u="location"in t?t.location:t.keyLocation;if(3===u&&(e(t,r,-n),t.defaultPrevented))return}if(o.isChromeOS&&8&r){if(e(t,r,n),t.defaultPrevented)return;r&=-9}return!!(r||n in i.FUNCTION_KEYS||n in i.PRINTABLE_KEYS)&&e(t,r,n)}function r(){a=Object.create(null),a.count=0,a.lastT=0}var i=e("./keys"),o=e("./useragent"),a=null,s=0;exports.addListener=function(e,t,n){if(e.addEventListener)return e.addEventListener(t,n,!1);if(e.attachEvent){var r=function(){n.call(e,window.event)};n._wrapper=r,e.attachEvent("on"+t,r)}},exports.removeListener=function(e,t,n){if(e.removeEventListener)return e.removeEventListener(t,n,!1);e.detachEvent&&e.detachEvent("on"+t,n._wrapper||n)},exports.stopEvent=function(e){return exports.stopPropagation(e),exports.preventDefault(e),!1},exports.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},exports.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},exports.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||o.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},exports.capture=function(e,t,n){function r(e){t&&t(e),n&&n(e),exports.removeListener(document,"mousemove",t,!0),exports.removeListener(document,"mouseup",r,!0),exports.removeListener(document,"dragstart",r,!0)}return exports.addListener(document,"mousemove",t,!0),exports.addListener(document,"mouseup",r,!0),exports.addListener(document,"dragstart",r,!0),r},exports.addTouchMoveListener=function(e,t){if("ontouchmove"in e){var n,r;exports.addListener(e,"touchstart",function(e){var t=e.changedTouches[0];n=t.clientX,r=t.clientY}),exports.addListener(e,"touchmove",function(e){var i=e.changedTouches[0];e.wheelX=-(i.clientX-n)/1,e.wheelY=-(i.clientY-r)/1,n=i.clientX,r=i.clientY,t(e)})}},exports.addMouseWheelListener=function(e,t){"onmousewheel"in e?exports.addListener(e,"mousewheel",function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),t(e)}):"onwheel"in e?exports.addListener(e,"wheel",function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}t(e)}):exports.addListener(e,"DOMMouseScroll",function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),t(e)})},exports.addMultiMouseDownListener=function(e,t,n,r){var i,a,s,l=0,u={2:"dblclick",3:"tripleclick",4:"quadclick"};exports.addListener(e,"mousedown",function(e){if(0!==exports.getButton(e)?l=0:e.detail>1?++l>4&&(l=1):l=1,o.isIE){var c=Math.abs(e.clientX-i)>5||Math.abs(e.clientY-a)>5;s&&!c||(l=1),s&&clearTimeout(s),s=setTimeout(function(){s=null},t[l-1]||600),1==l&&(i=e.clientX,a=e.clientY)}if(e._clicks=l,n[r]("mousedown",e),l>4)l=0;else if(l>1)return n[r](u[l],e)}),o.isOldIE&&exports.addListener(e,"dblclick",function(e){l=2,s&&clearTimeout(s),s=setTimeout(function(){s=null},t[l-1]||600),n[r]("mousedown",e),n[r](u[l],e)})};var l=!o.isMac||!o.isOpera||"KeyboardEvent"in window?function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}:function(e){return 0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0)};if(exports.getModifierString=function(e){return i.KEY_MODS[l(e)]},exports.addCommandKeyListener=function(e,t){var i=exports.addListener;if(o.isOldGecko||o.isOpera&&!("KeyboardEvent"in window)){var s=null;i(e,"keydown",function(e){s=e.keyCode}),i(e,"keypress",function(e){return n(t,e,s)})}else{var l=null;i(e,"keydown",function(e){var i=e.keyCode;a[i]=(a[i]||0)+1,91==i||92==i?a.OSKey=!0:a.OSKey&&e.timeStamp-a.lastT>200&&1==a.count&&r(),1==a[i]&&a.count++,a.lastT=e.timeStamp;var o=n(t,e,i);return l=e.defaultPrevented,o}),i(e,"keypress",function(e){l&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(exports.stopEvent(e),l=null)}),i(e,"keyup",function(e){var t=e.keyCode;a[t]?a.count=Math.max(a.count-1,0):r(),91!=t&&92!=t||(a.OSKey=!1),a[t]=null}),a||(r(),i(window,"focus",r))}},"object"==typeof window&&window.postMessage&&!o.isOldIE){exports.nextTick=function(e,t){t=t||window;exports.addListener(t,"message",function n(r){"zero-timeout-message-1"==r.data&&(exports.stopPropagation(r),exports.removeListener(t,"message",n),e())}),t.postMessage("zero-timeout-message-1","*")}}exports.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),exports.nextFrame?exports.nextFrame=exports.nextFrame.bind(window):exports.nextFrame=function(e){setTimeout(e,17)}}),ace.define("ace/lib/lang",["require","exports","module"],function(e,exports,t){"use strict";exports.last=function(e){return e[e.length-1]},exports.stringReverse=function(e){return e.split("").reverse().join("")},exports.stringRepeat=function(e,t){for(var n="";t>0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var n=/^\s\s*/,r=/\s\s*$/;exports.stringTrimLeft=function(e){return e.replace(n,"")},exports.stringTrimRight=function(e){return e.replace(r,"")},exports.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},exports.copyArray=function(e){for(var t=[],n=0,r=e.length;n1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;n.$blockScrolling++,this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"),n.$blockScrolling--},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(t.$blockScrolling++,this.$clickSelection){var r=this.$clickSelection.comparePoint(n);if(-1==r)e=this.$clickSelection.end;else if(1==r)e=this.$clickSelection.start;else{var o=i(this.$clickSelection,n);n=o.cursor,e=o.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.$blockScrolling--,t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),o=n.selection[e](r.row,r.column);if(n.$blockScrolling++,this.$clickSelection){var a=this.$clickSelection.comparePoint(o.start),s=this.$clickSelection.comparePoint(o.end);if(-1==a&&s<=0)t=this.$clickSelection.end,o.end.row==r.row&&o.end.column==r.column||(r=o.start);else if(1==s&&a>=0)t=this.$clickSelection.start,o.start.row==r.row&&o.start.column==r.column||(r=o.end);else if(-1==a&&1==s)r=o.end,t=o.start;else{var l=i(this.$clickSelection,r);r=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(r),n.$blockScrolling--,n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(e>0||t-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,r=n.session,i=r.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var r=n.getSelectionRange();r.isMultiLine()&&r.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(r.start.row),this.$clickSelection.end=n.selection.getLineRange(r.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=e.domEvent.timeStamp,n=t-(this.$lastScrollTime||0),r=this.editor;return r.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed)||n<200?(this.$lastScrollTime=t,r.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},this.onTouchMove=function(e){var t=e.domEvent.timeStamp,n=t-(this.$lastScrollTime||0),r=this.editor;if(r.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed)||n<200)return this.$lastScrollTime=t,r.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()}}).call(n.prototype),exports.DefaultHandlers=n}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(e,exports,t){"use strict";function n(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}var r=(e("./lib/oop"),e("./lib/dom"));(function(){this.$init=function(){return this.$element=r.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){r.setInnerText(this.getElement(),e)},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){r.addCssClass(this.getElement(),e)},this.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth}}).call(n.prototype),exports.Tooltip=n}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(e,exports,t){"use strict";function n(e){function t(){var t=d.getDocumentPosition().row,r=l.$annotations[t];if(!r)return n();if(t==s.session.getLength()){var i=s.renderer.pixelToScreenCoordinates(0,d.y).row,a=d.$pos;if(i>s.session.documentToScreenRow(a.row,a.column))return n()}if(h!=r)if(h=r.text.join("
    "),u.setHtml(h),u.show(),s.on("mousewheel",n),e.$tooltipFollowsMouse)o(d);else{var c=d.domEvent.target,f=c.getBoundingClientRect(),p=u.getElement().style;p.left=f.right+"px",p.top=f.bottom+"px"}}function n(){c&&(c=clearTimeout(c)),h&&(u.hide(),h=null,s.removeEventListener("mousewheel",n))}function o(e){u.setPosition(e.x,e.y)}var s=e.editor,l=s.renderer.$gutterLayer,u=new r(s.container);e.editor.setDefaultHandler("guttermousedown",function(t){if(s.isFocused()&&0==t.getButton()){if("foldWidgets"!=l.getRegion(t)){var n=t.getDocumentPosition().row,r=s.session.selection;if(t.getShiftKey())r.selectTo(n,0);else{if(2==t.domEvent.detail)return s.selectAll(),t.preventDefault();e.$clickSelection=s.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}}});var c,d,h;e.editor.setDefaultHandler("guttermousemove",function(r){var a=r.domEvent.target||r.domEvent.srcElement;if(i.hasCssClass(a,"ace_fold-widget"))return n();h&&e.$tooltipFollowsMouse&&o(r),d=r,c||(c=setTimeout(function(){c=null,d&&!e.isMousePressed?t():n()},50))}),a.addListener(s.renderer.$gutter,"mouseout",function(e){d=null,h&&!c&&(c=setTimeout(function(){c=null,n()},50))}),s.on("changeSession",n)}function r(e){s.call(this,e)}var i=e("../lib/dom"),o=e("../lib/oop"),a=e("../lib/event"),s=e("../tooltip").Tooltip;o.inherits(r,s),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,i=this.getWidth(),o=this.getHeight();e+=15,t+=15,e+i>n&&(e-=e+i-n),t+o>r&&(t-=20+o),s.prototype.setPosition.call(this,e,t)}}.call(r.prototype),exports.GutterHandler=n}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,exports,t){"use strict";var n=e("../lib/event"),r=e("../lib/useragent"),i=exports.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){n.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){n.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor,t=e.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var n=this.getDocumentPosition();this.$inSelection=t.contains(n.row,n.column)}return this.$inSelection},this.getButton=function(){return n.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=r.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(i.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,exports,t){"use strict";function n(e){function t(e,t){var n=Date.now(),i=!t||e.row!=t.row,o=!t||e.column!=t.column;if(!F||i||o)m.$blockScrolling+=1,m.moveCursorToPosition(e),m.$blockScrolling-=1,F=n,k={x:b,y:_};else{r(k.x,k.y,b,_)>u?F=null:n-F>=l&&(m.renderer.scrollCursorIntoView(),F=null)}}function n(e,t){var n=Date.now(),r=m.renderer.layerConfig.lineHeight,i=m.renderer.layerConfig.characterWidth,o=m.renderer.scroller.getBoundingClientRect(),a={x:{left:b-o.left,right:o.right-b},y:{top:_-o.top,bottom:o.bottom-_}},l=Math.min(a.x.left,a.x.right),u=Math.min(a.y.top,a.y.bottom),c={row:e.row,column:e.column};l/i<=2&&(c.column+=a.x.left=s&&m.renderer.scrollCursorIntoView(c):x=n:x=null}function c(){var e=A;A=m.renderer.screenToTextCoordinates(b,_),t(A,e),n(A,e)}function d(){C=m.selection.toOrientedRange(),y=m.session.addMarker(C,"ace_selection",m.getSelectionStyle()),m.clearSelection(),m.isFocused()&&m.renderer.$cursorLayer.setBlinking(!1),clearInterval(w),c(),w=setInterval(c,20),T=0,o.addListener(document,"mousemove",f)}function h(){clearInterval(w),m.session.removeMarker(y),y=null,m.$blockScrolling+=1,m.selection.fromOrientedRange(C),m.$blockScrolling-=1,m.isFocused()&&!S&&m.renderer.$cursorLayer.setBlinking(!m.getReadOnly()),C=null,A=null,T=0,x=null,F=null,o.removeListener(document,"mousemove",f)}function f(){null==M&&(M=setTimeout(function(){null!=M&&y&&h()},20))}function p(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return"text/plain"==e||"Text"==e})}function g(e){var t=["copy","copymove","all","uninitialized"],n=["move","copymove","linkmove","all","uninitialized"],r=a.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return r&&t.indexOf(i)>=0?o="copy":n.indexOf(i)>=0?o="move":t.indexOf(i)>=0&&(o="copy"),o}var m=e.editor,v=i.createElement("img");v.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",a.isOpera&&(v.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;"),["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(t){e[t]=this[t]},this),m.addEventListener("mousedown",this.onMouseDown.bind(e));var y,b,_,w,C,A,E,S,x,F,k,D=m.container,T=0;this.onDragStart=function(e){if(this.cancelDrag||!D.draggable){var t=this;return setTimeout(function(){t.startSelect(),t.captureMouse(e)},0),e.preventDefault()}C=m.getSelectionRange();var n=e.dataTransfer;n.effectAllowed=m.getReadOnly()?"copy":"copyMove",a.isOpera&&(m.container.appendChild(v),v.scrollTop=0),n.setDragImage&&n.setDragImage(v,0,0),a.isOpera&&m.container.removeChild(v),n.clearData(),n.setData("Text",m.session.getTextRange()),S=!0,this.setState("drag")},this.onDragEnd=function(e){if(D.draggable=!1,S=!1,this.setState(null),!m.getReadOnly()){var t=e.dataTransfer.dropEffect;E||"move"!=t||m.session.remove(m.getSelectionRange()),m.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!m.getReadOnly()&&p(e.dataTransfer))return b=e.clientX,_=e.clientY,y||d(),T++,e.dataTransfer.dropEffect=E=g(e),o.preventDefault(e)},this.onDragOver=function(e){if(!m.getReadOnly()&&p(e.dataTransfer))return b=e.clientX,_=e.clientY,y||(d(),T++),null!==M&&(M=null),e.dataTransfer.dropEffect=E=g(e),o.preventDefault(e)},this.onDragLeave=function(e){if(--T<=0&&y)return h(),E=null,o.preventDefault(e)},this.onDrop=function(e){if(A){var t=e.dataTransfer;if(S)switch(E){case"move":C=C.contains(A.row,A.column)?{start:A,end:A}:m.moveText(C,A);break;case"copy":C=m.moveText(C,A,!0)}else{var n=t.getData("Text");C={start:A,end:m.session.insert(A,n)},m.focus(),E=null}return h(),o.preventDefault(e)}},o.addListener(D,"dragstart",this.onDragStart.bind(e)),o.addListener(D,"dragend",this.onDragEnd.bind(e)),o.addListener(D,"dragenter",this.onDragEnter.bind(e)),o.addListener(D,"dragover",this.onDragOver.bind(e)),o.addListener(D,"dragleave",this.onDragLeave.bind(e)),o.addListener(D,"drop",this.onDrop.bind(e));var M=null}function r(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}var i=e("../lib/dom"),o=e("../lib/event"),a=e("../lib/useragent"),s=200,l=200,u=5;(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=a.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;if(a.isIE&&"dragReady"==this.state){var n=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>3&&t.dragDrop()}if("dragWait"===this.state){var n=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),r=e.getButton();if(1===(e.domEvent.detail||1)&&0===r&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var i=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in i&&(i.unselectable="on"),t.getDragDelay()){if(a.isWebKit){this.cancelDrag=!0;t.container.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(n.prototype),exports.DragdropHandler=n}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,exports,t){"use strict";var n=e("./dom");exports.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText)},n.send(null)},exports.loadScript=function(e,t){var r=n.getDocumentHead(),i=document.createElement("script");i.src=e,r.appendChild(i),i.onload=i.onreadystatechange=function(e,n){!n&&i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(i=i.onload=i.onreadystatechange=null,n||t())}},exports.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,exports,t){"use strict";var n={},r=function(){this.propagationStopped=!0},i=function(){this.defaultPrevented=!0};n._emit=n._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],o=this._defaultHandlers[e];if(n.length||o){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=r),t.preventDefault||(t.preventDefault=i),n=n.slice();for(var a=0;a1&&(i=n[n.length-2]);var a=u[t+"Path"];return null==a?a=u.basePath:"/"==r&&(t=r=""),a&&"/"!=a.slice(-1)&&(a+="/"),a+t+r+i+this.get("suffix")},exports.setModuleUrl=function(e,t){return u.$moduleUrls[e]=t},exports.$loading={},exports.loadModule=function(t,n){var r,i;Array.isArray(t)&&(i=t[0],t=t[1]);try{r=e(t)}catch(e){}if(r&&!exports.$loading[t])return n&&n(r);if(exports.$loading[t]||(exports.$loading[t]=[]),exports.$loading[t].push(n),!(exports.$loading[t].length>1)){var o=function(){e([t],function(e){exports._emit("load.module",{name:t,module:e});var n=exports.$loading[t];exports.$loading[t]=null,n.forEach(function(t){t&&t(e)})})};if(!exports.get("packaged"))return o();a.loadScript(exports.moduleUrl(t,i),o)}},r(!0),exports.init=r}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],function(e,exports,t){"use strict";var n=e("../lib/event"),r=e("../lib/useragent"),i=e("./default_handlers").DefaultHandlers,o=e("./default_gutter_handler").GutterHandler,a=e("./mouse_event").MouseEvent,s=e("./dragdrop_handler").DragdropHandler,l=e("../config"),u=function(e){var t=this;this.editor=e,new i(this),new o(this),new s(this);var a=function(t){document.hasFocus&&document.hasFocus()||window.focus(),e.focus(),e.isFocused()||window.focus()},l=e.renderer.getMouseEventTarget();n.addListener(l,"click",this.onMouseEvent.bind(this,"click")),n.addListener(l,"mousemove",this.onMouseMove.bind(this,"mousemove")),n.addMultiMouseDownListener(l,[400,300,250],this,"onMouseEvent"),e.renderer.scrollBarV&&(n.addMultiMouseDownListener(e.renderer.scrollBarV.inner,[400,300,250],this,"onMouseEvent"),n.addMultiMouseDownListener(e.renderer.scrollBarH.inner,[400,300,250],this,"onMouseEvent"),r.isIE&&(n.addListener(e.renderer.scrollBarV.element,"mousedown",a),n.addListener(e.renderer.scrollBarH.element,"mousedown",a))),n.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel")),n.addTouchMoveListener(e.container,this.onTouchMove.bind(this,"touchmove"));var u=e.renderer.$gutter;n.addListener(u,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),n.addListener(u,"click",this.onMouseEvent.bind(this,"gutterclick")),n.addListener(u,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),n.addListener(u,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),n.addListener(l,"mousedown",a),n.addListener(u,"mousedown",function(t){return e.focus(),n.preventDefault(t)}),e.on("mousemove",function(n){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var r=e.renderer.screenToTextCoordinates(n.x,n.y),i=e.session.selection.getRange(),o=e.renderer;!i.isEmpty()&&i.insideStart(r.row,r.column)?o.setCursorStyle("default"):o.setCursorStyle("")}})};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new a(t,this.editor))},this.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(e,new a(t,this.editor))},this.onMouseWheel=function(e,t){var n=new a(t,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.onTouchMove=function(e,t){var n=new a(t,this.editor);n.speed=1,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var i=this.editor.renderer;i.$keepTextAreaAtCursor&&(i.$keepTextAreaAtCursor=null);var o=this,s=function(e){if(e){if(r.isWebKit&&!e.which&&o.releaseMouse)return o.releaseMouse();o.x=e.clientX,o.y=e.clientY,t&&t(e),o.mouseEvent=new a(e,o.editor),o.$mouseMoved=!0}},l=function(e){clearInterval(c),u(),o[o.state+"End"]&&o[o.state+"End"](e),o.state="",null==i.$keepTextAreaAtCursor&&(i.$keepTextAreaAtCursor=!0,i.$moveTextAreaToCursor()),o.isMousePressed=!1,o.$onCaptureMouseMove=o.releaseMouse=null,e&&o.onMouseEvent("mouseup",e)},u=function(){o[o.state]&&o[o.state](),o.$mouseMoved=!1};if(r.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout(function(){l(e)});o.$onCaptureMouseMove=s,o.releaseMouse=n.capture(this.editor.container,s,l);var c=setInterval(u,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&n.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)}}).call(u.prototype),l.defineOptions(u.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:r.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),exports.MouseHandler=u}),ace.define("ace/mouse/fold_handler",["require","exports","module"],function(e,exports,t){"use strict";function n(e){e.on("click",function(t){var n=t.getDocumentPosition(),r=e.session,i=r.getFoldAt(n.row,n.column,1);i&&(t.getAccelKey()?r.removeFold(i):r.expandFold(i),t.stop())}),e.on("gutterclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,r=e.session;r.foldWidgets&&r.foldWidgets[n]&&e.session.onFoldWidgetClick(n,t),e.isFocused()||e.focus(),t.stop()}}),e.on("gutterdblclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,r=e.session,i=r.getParentFoldRangeData(n,!0),o=i.range||i.firstRange;if(o){n=o.start.row;var a=r.getFoldAt(n,r.getLine(n).length,1);a?r.removeFold(a):(r.addFold("...",o),e.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}t.stop()}})}exports.FoldHandler=n}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,exports,t){"use strict";var n=e("../lib/keys"),r=e("../lib/event"),i=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},this.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);-1!=n&&this.$handlers.splice(n,1),void 0==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==n&&e.attach&&e.attach(this.$editor)}},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map(function(n){return n.getStatusText&&n.getStatusText(t,e)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,n,i){for(var o,a=!1,s=this.$editor.commands,l=this.$handlers.length;l--&&!((o=this.$handlers[l].handleKeyboard(this.$data,e,t,n,i))&&o.command&&(a="null"==o.command||s.exec(o.command,this.$editor,o.args,i),a&&i&&-1!=e&&1!=o.passEvent&&1!=o.command.passEvent&&r.stopEvent(i),a)););return a||-1!=e||(o={command:"insertstring"},a=s.exec("insertstring",this.$editor,t)),a&&this.$editor._signal("keyboardActivity",o),a},this.onCommandKey=function(e,t,r){var i=n.keyCodeToString(r);this.$callKeyboardHandlers(t,i,r,e)},this.onTextInput=function(e){this.$callKeyboardHandlers(-1,e)}}).call(i.prototype),exports.KeyBinding=i}),ace.define("ace/range",["require","exports","module"],function(e,exports,t){"use strict";var n=function(e,t){return e.row-t.row||e.column-t.column},r=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),1==t?(t=this.compare(r.row,r.column),1==t?2:0==t?1:0):-1==t?-2:(t=this.compare(r.row,r.column),-1==t?-1:1==t?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.rowt)var i={row:t+1,column:0};else if(this.start.rowt.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.isEmpty()?o.fromPoints(t,t):this.isBackwards()?o.fromPoints(t,e):o.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var e=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(e,this.doc.getLine(e).length)},this.setRange=this.setSelectionRange=function(e,t){t?(this.setSelectionAnchor(e.end.row,e.end.column),this.selectTo(e.start.row,e.start.column)):(this.setSelectionAnchor(e.start.row,e.start.column),this.selectTo(e.end.row,e.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if(void 0===t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n,r="number"==typeof e?e:this.lead.row,i=this.session.getFoldLine(r);return i?(r=i.start.row,n=i.end.row):n=r,!0===t?new o(r,0,n,this.session.getLine(n).length):new o(r,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(t.column-n,t.column).split(" ").length-1==n?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(t.column=r)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var i=this.session.getFoldAt(e,t,1);return i?void this.moveCursorTo(i.end.row,i.end.column):(this.session.nonTokenRe.exec(r)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=n.substring(t)),t>=n.length?(this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)},this.$shortWordEndIndex=function(e){var t,n=0,r=/\s/,i=this.session.tokenRe;if(i.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&r.test(t);)n++;if(n<1)for(i.lastIndex=0;(t=e[n])&&!i.test(t);)if(i.lastIndex=0,n++,r.test(t)){if(n>2){n--;break}for(;(t=e[n])&&r.test(t);)n++;if(n>2)break}}return i.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i=this.session.getFoldAt(e,t,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(t==n.length){var o=this.doc.getLength();do{e++,r=this.doc.getLine(e)}while(e0&&/^\s*$/.test(i));n=i.length,/\s+$/.test(i)||(i="")}var o=r.stringReverse(i),a=this.$shortWordEndIndex(o);return this.moveCursorTo(t,n-a)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===t&&(this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column);var r=this.session.screenToDocumentPosition(n.row+e,n.column);0!==e&&0===t&&r.row===this.lead.row&&r.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[r.row]&&(r.row>0||e>0)&&r.row++,this.moveCursorTo(r.row,r.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var r=this.session.getFoldAt(e,t,1);r&&(e=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var r=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(r.row,r.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e.call(null,this);var n=this.getCursor();return o.fromPoints(t,n)}catch(e){return o.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t});else{var e=this.getRange();e.isBackwards=this.isBackwards()}return e},this.fromJSON=function(e){if(void 0==e.start){if(this.rangeList){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=o.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(a.prototype),exports.Selection=a}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(e,exports,t){"use strict";var n=e("./config"),r=2e3,i=function(e){this.states=e,this.regExps={},this.matchMappings={};for(var t in this.states){for(var n=this.states[t],r=[],i=0,o=this.matchMappings[t]={defaultToken:"text"},a="g",s=[],l=0;l1?this.$applyToken:u.token),d>1&&(/\\\d/.test(u.regex)?c=u.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+i+1)}):(d=1,c=this.removeCapturingGroups(u.regex)),u.splitRegex||"string"==typeof u.token||s.push(u)),o[i]=l,i+=d,r.push(c),u.onMatch||(u.onMatch=null)}}r.length||(o[0]=0,r.push("$")),s.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,a)},this),this.regExps[t]=new RegExp("("+r.join(")|(")+")|($)",a)}};(function(){this.$setMaxTokenCount=function(e){r=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"==typeof n)return[{type:n,value:e}];for(var r=[],i=0,o=n.length;ic){var v=e.substring(c,m-g.length);h.type==f?h.value+=v:(h.type&&u.push(h),h={type:f,value:v})}for(var y=0;yr){for(d>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});c1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:u,state:n.length?n:i}},this.reportError=n.reportError}).call(i.prototype),exports.Tokenizer=i}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,exports,t){"use strict";var n=e("../lib/lang"),r=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var r=e[n],i=0;i=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)t-=1,n+=e[t].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}}}).call(n.prototype),exports.TokenIterator=n}),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,exports,t){"use strict";var n=e("../tokenizer").Tokenizer,r=e("./text_highlight_rules").TextHighlightRules,i=e("./behaviour").Behaviour,o=e("../unicode"),a=e("../lib/lang"),s=e("../token_iterator").TokenIterator,l=e("../range").Range,u=function(){this.HighlightRules=r,this.$behaviour=new i};(function(){this.tokenRe=new RegExp("^["+o.packages.L+o.packages.Mn+o.packages.Mc+o.packages.Nd+o.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+o.packages.L+o.packages.Mn+o.packages.Mc+o.packages.Nd+o.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules,this.$tokenizer=new n(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,r){function i(e){for(var t=n;t<=r;t++)e(o.getLine(t),t)}var o=t.doc,s=!0,l=!0,u=1/0,c=t.getTabSize(),d=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var h=this.lineCommentStart.map(a.escapeRegExp).join("|"),f=this.lineCommentStart[0];else var h=a.escapeRegExp(this.lineCommentStart),f=this.lineCommentStart;h=new RegExp("^(\\s*)(?:"+h+") ?"),d=t.getUseSoftTabs();var p=function(e,t){var n=e.match(h);if(n){var r=n[1].length,i=n[0].length;y(e,r,i)||" "!=n[0][i-1]||i--,o.removeInLine(t,r,i)}},g=f+" ",m=function(e,t){s&&!/\S/.test(e)||(y(e,u,u)?o.insertInLine({row:t,column:u},g):o.insertInLine({row:t,column:u},f))},v=function(e,t){return h.test(e)},y=function(e,t,n){for(var r=0;t--&&" "==e.charAt(t);)r++;if(r%c!=0)return!1;for(var r=0;" "==e.charAt(n++);)r++;return c>2?r%c!=c-1:r%c==0}}else{if(!this.blockComment)return!1;var f=this.blockComment.start,b=this.blockComment.end,h=new RegExp("^(\\s*)(?:"+a.escapeRegExp(f)+")"),_=new RegExp("(?:"+a.escapeRegExp(b)+")\\s*$"),m=function(e,t){v(e,t)||s&&!/\S/.test(e)||(o.insertInLine({row:t,column:e.length},b),o.insertInLine({row:t,column:u},f))},p=function(e,t){var n;(n=e.match(_))&&o.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(h))&&o.removeInLine(t,n[1].length,n[0].length)},v=function(e,n){if(h.test(e))return!0;for(var r=t.getTokens(n),i=0;ie.length&&(w=e.length)}),u==1/0&&(u=w,s=!1,l=!1),d&&u%c!=0&&(u=Math.floor(u/c)*c),i(l?p:m)},this.toggleBlockComment=function(e,t,n,r){var i=this.blockComment;if(i){!i.start&&i[0]&&(i=i[0]);var o,a,u=new s(t,r.row,r.column),c=u.getCurrentToken(),d=(t.selection,t.selection.toOrientedRange());if(c&&/comment/.test(c.type)){for(var h,f;c&&/comment/.test(c.type);){var p=c.value.indexOf(i.start);if(-1!=p){var g=u.getCurrentTokenRow(),m=u.getCurrentTokenColumn()+p;h=new l(g,m,g,m+i.start.length);break}c=u.stepBackward()}for(var u=new s(t,r.row,r.column),c=u.getCurrentToken();c&&/comment/.test(c.type);){var p=c.value.indexOf(i.end);if(-1!=p){var g=u.getCurrentTokenRow(),m=u.getCurrentTokenColumn()+p;f=new l(g,m,g,m+i.end.length);break}c=u.stepForward()}f&&t.remove(f),h&&(t.remove(h),o=h.start.row,a=-i.start.length)}else a=i.start.length,o=n.start.row,t.insert(n.end,i.end),t.insert(n.start,i.start);d.start.row==o&&(d.start.column+=a),d.end.row==o&&(d.end.column+=a),t.selection.fromOrientedRange(d)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var t in e)e[t]&&(this.$embeds.push(t),this.$modes[t]=new e[t]);for(var n=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],t=0;tthis.row)){var n=t(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var r;if(r=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=r.row||this.column!=r.column){var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(i.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,exports,t){"use strict";var n=e("./lib/oop"),r=e("./apply_delta").applyDelta,i=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,a=e("./anchor").Anchor,s=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){n.implement(this,i),this.setValue=function(e){var t=this.getLength()-1;this.remove(new o(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new a(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{t=this.getLines(e.start.row,e.end.row),t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},this.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var r=this.getLine(e);return void 0==t&&(t=r.length),t=Math.min(Math.max(t,0),r.length),{row:e,column:t}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){e=Math.min(Math.max(e,0),this.getLength());var n=0;e0,r=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){if(e instanceof o||(e=o.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);return t?this.insert(e.start,t):e.start},this.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!o.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4&&this.$splitAndapplyLargeDelta(e,2e4),r(this.$lines,e,t),this._signal("change",e))},this.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,r=n.length,i=e.start.row,o=e.start.column,a=0,s=0;;){a=s,s+=t-1;var l=n.slice(a,s);if(s>r){e.lines=l,e.start.row=i+a,e.start.column=o;break}l.push(""),this.applyDelta({start:this.pos(i+a,o),end:this.pos(i+s,o=0),action:e.action,lines:l},!0)}},this.revertDelta=function(e){this.applyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){for(var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=t||0,o=n.length;i20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,o<=r&&n.fireUpdateEvent(o,r)}}};(function(){n.implement(this,r),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],r=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=r.state+""?(this.states[e]=r.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=r.tokens}}).call(i.prototype),exports.BackgroundTokenizer=i}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,exports,t){"use strict";var n=e("./lib/lang"),r=(e("./lib/oop"),e("./range").Range),i=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,i,o){if(this.regExp)for(var a=o.firstRow,s=o.lastRow,l=a;l<=s;l++){var u=this.cache[l];null==u&&(u=n.getMatchOffsets(i.getLine(l),this.regExp),u.length>this.MAX_RANGES&&(u=u.slice(0,this.MAX_RANGES)),u=u.map(function(e){return new r(l,e.offset,l,e.offset+e.length)}),this.cache[l]=u.length?u:"");for(var c=u.length;c--;)t.drawSingleLineMarker(e,u[c].toScreenRange(i),this.clazz,o)}}}).call(i.prototype),exports.SearchHighlight=i}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,exports,t){"use strict";function n(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new r(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}var r=e("../range").Range;(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var r,i,o,a=0,s=this.folds,l=!0;null==t&&(t=this.end.row,n=this.end.column);for(var u=0;u0)){var l=r(e,a.start);return 0===s?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var r=this.pointIndex(e.end,t,n);return r<0?r=-r-1:r++,this.ranges.splice(n,r-n,e)},this.addList=function(e){for(var t=[],n=e.length;n--;)t.push.call(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){var e=[],t=this.ranges;t=t.sort(function(e,t){return r(e.start,t.start)});for(var n,i=t[0],o=1;o=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.rowr)break;if(c.start.row==r&&c.start.column>=t.column&&(c.start.column==t.column&&this.$insertRight||(c.start.column+=a,c.start.row+=o)),c.end.row==r&&c.end.column>=t.column){if(c.end.column==t.column&&this.$insertRight)continue;c.end.column==t.column&&a>0&&lc.start.column&&c.end.column==s[l+1].start.column&&(c.end.column-=a),c.end.column+=a,c.end.row+=o}}}if(0!=o&&l=e)return i;if(i.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),-1==r&&(r=0),r;r=e)return i}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,r=t-e+1,i=0;i=t){s=e?r-=t-s:r=0);break}a>=e&&(r-=s>=e?a-s:a-e+1)}return r},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var n,r=this.$foldData,a=!1;e instanceof o?n=e:(n=new o(t,e),n.collapseChildren=t.collapseChildren),this.$clipRangeToDocument(n.range);var s=n.start.row,l=n.start.column,u=n.end.row,c=n.end.column;if(!(s0&&(this.removeFolds(f),f.forEach(function(e){n.addSubFold(e)}));for(var p=0;p0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var n,i;if(null==e?(n=new r(0,0,this.getLength(),0),t=!0):n="number"==typeof e?new r(e,0,e,this.getLine(e).length):"row"in e?r.fromPoints(e,e):e,i=this.getFoldsInRangeList(n),t)this.removeFolds(i);else for(var o=i;o.length;)this.expandFolds(o),o=this.getFoldsInRangeList(n);if(i.length)return i},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,r,i){null==r&&(r=e.start.row),null==i&&(i=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var o=this.doc,a="";return e.walk(function(e,t,n,s){if(!(t=e){i=o.end.row;try{var a=this.addFold("...",o);a&&(a.collapseChildren=n)}catch(e){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){if(this.$foldMode!=e){if(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!e||"manual"==this.$foldStyle)return void(this.foldWidgets=null);this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var r,i=e-1;i>=0;){var o=n[i];if(null==o&&(o=n[i]=this.getFoldWidget(i)),"start"==o){var a=this.getFoldWidgetRange(i);if(r||(r=a),a&&a.end.row>=e)break}i--}return{range:-1!==i&&a,firstRange:r}},this.onFoldWidgetClick=function(e,t){t=t.domEvent;var n={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var r=t.target||t.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),r=this.getLine(e),i="end"===n?-1:1,o=this.getFoldAt(e,-1===i?0:r.length,i);if(o)return void(t.children||t.all?this.removeFold(o):this.expandFold(o));var a=this.getFoldWidgetRange(e,!0);if(a&&!a.isMultiLine()&&(o=this.getFoldAt(a.start.row,a.start.column,1))&&a.isEqual(o.range))return void this.removeFold(o);if(t.siblings){var s=this.getParentFoldRangeData(e);if(s.range)var l=s.range.start.row+1,u=s.range.end.row;this.foldAll(l,u,t.all?1e4:0)}else t.children?(u=a?a.end.row:this.getLength(),this.foldAll(e+1,u,t.all?1e4:0)):a&&(t.all&&(a.collapseChildren=1e4),this.addFold("...",a));return a}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var r=this.getParentFoldRangeData(t,!0);if(n=r.range||r.firstRange){t=n.start.row;var i=this.getFoldAt(t,this.getLine(t).length,1);i?this.removeFold(i):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}var r=e("../range").Range,i=e("./fold_line").FoldLine,o=e("./fold").Fold,a=e("../token_iterator").TokenIterator;exports.Folding=n}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,exports,t){"use strict";function n(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),r=!0,o=n.charAt(e.column-1),a=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(a||(o=n.charAt(e.column),e={row:e.row,column:e.column+1},a=o&&o.match(/([\(\[\{])|([\)\]\}])/),r=!1),!a)return null;if(a[1]){var s=this.$findClosingBracket(a[1],e);if(!s)return null;t=i.fromPoints(e,s),r||(t.end.column++,t.start.column--),t.cursor=t.end}else{var s=this.$findOpeningBracket(a[2],e);if(!s)return null;t=i.fromPoints(s,e),r||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],o=1,a=new r(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-a.getCurrentTokenColumn()-2,u=s.value;;){for(;l>=0;){var c=u.charAt(l);if(c==i){if(0==(o-=1))return{row:a.getCurrentTokenRow(),column:l+a.getCurrentTokenColumn()}}else c==e&&(o+=1);l-=1}do{s=a.stepBackward()}while(s&&!n.test(s.type));if(null==s)break;u=s.value,l=u.length-1}return null}},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],o=1,a=new r(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-a.getCurrentTokenColumn();;){for(var u=s.value,c=u.length;l=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}n.implement(this,o),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=e,e.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){for(var n=0,r=e.length-1;n<=r;){var i=n+r>>1,o=e[i];if(t>o)n=i+1;else{if(!(t=t);o++);return(n=r[o])?(n.index=o,n.start=i-n.value.length,n):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.$deltasFold.length&&(t.$deltas.push({group:"fold",deltas:t.$deltasFold}),t.$deltasFold=[]),t.$deltasDoc.length&&(t.$deltas.push({group:"doc",deltas:t.$deltasDoc}),t.$deltasDoc=[]),t.$deltas.length>0&&e.execute({action:"aceupdate",args:[t.$deltas,t],merge:t.mergeUndoDeltas}),t.mergeUndoDeltas=!1,t.$deltas=[]},this.$informUndoManager=r.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?r.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||(r=!!n.charAt(t).match(this.tokenRe)),r)var i=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))var i=/\s/;else var i=this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&n.charAt(o).match(i));o++}for(var a=t;ae&&(e=t.screenWidth)}),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,r=0,i=0,o=this.$foldData[i],a=o?o.start.row:1/0,s=t.length,l=0;la){if((l=o.end.row+1)>=s)break;o=this.$foldData[i++],a=o?o.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>r&&(r=n[l])}this.screenWidth=r}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=null,r=e.length-1;-1!=r;r--){var i=e[r];"doc"==i.group?(this.doc.revertDeltas(i.deltas),n=this.$getUndoSelection(i.deltas,!0,n)):i.deltas.forEach(function(e){this.addFolds(e.folds)},this)}return this.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=null,r=0;re.end.column&&(o.start.column+=s),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=s)),a&&o.start.row>=e.end.row&&(o.start.row+=a,o.end.row+=a)}if(o.end=this.insert(o.start,r),i.length){var u=e.start,c=o.start,a=c.row-u.row,s=c.column-u.column;this.addFolds(i.map(function(e){return e=e.clone(),e.start.row==u.row&&(e.start.column+=s),e.end.row==u.row&&(e.end.column+=s),e.start.row+=a,e.end.row+=a,e}))}return o},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var r=e;r<=t;r++)this.doc.insertInLine({row:r,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new l(0,0,0,0),r=this.getTabSize(),i=t.start.row;i<=t.end.row;++i){var o=this.getLine(i);n.start.row=i,n.end.row=i;for(var a=0;a0){var r=this.getRowFoldEnd(t+n);if(r>this.doc.getLength()-1)return 0;var i=r-t}else{e=this.$clipRowToDocument(e),t=this.$clipRowToDocument(t);var i=t-e+1}var o=new l(e,0,t,Number.MAX_VALUE),a=this.getFoldsInRange(o).map(function(e){return e=e.clone(),e.start.row+=i,e.end.row+=i,e}),s=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,s),a.length&&this.addFolds(a),i},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var r=this.$constrainWrapLimit(e,n.min,n.max);return r!=this.$wrapLimit&&r>1&&(this.$wrapLimit=r,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,r=e.start,i=e.end,o=r.row,a=i.row,s=a-o,l=null;if(this.$updating=!0,0!=s)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(o,s);var u=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var c=this.getFoldLine(i.row),d=0;if(c){c.addRemoveChars(i.row,i.column,r.column-i.column),c.shiftRow(-s);var h=this.getFoldLine(o);h&&h!==c&&(h.merge(c),c=h),d=u.indexOf(c)+1}for(d;d=i.row&&c.shiftRow(-s)}a=o}else{var f=Array(s);f.unshift(o,0);var p=t?this.$wrapData:this.$rowLengthCache;p.splice.apply(p,f);var u=this.$foldData,c=this.getFoldLine(o),d=0;if(c){var g=c.range.compareInside(r.row,r.column);0==g?(c=c.split(r.row,r.column))&&(c.shiftRow(s),c.addRemoveChars(a,0,i.column-r.column)):-1==g&&(c.addRemoveChars(o,0,i.column-r.column),c.shiftRow(s)),d=u.indexOf(c)+1}for(d;d=o&&c.shiftRow(s)}}else{s=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),s=-s);var c=this.getFoldLine(o);c&&c.addRemoveChars(o,r.column,s)}return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(o,a):this.$updateRowLengthCache(o,a),l},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,n){var r,i,o=this.doc.getAllLines(),s=this.getTabSize(),l=this.$wrapData,u=this.$wrapLimit,c=e;for(n=Math.min(n,o.length-1);c<=n;)i=this.getFoldLine(c,i),i?(r=[],i.walk(function(e,n,i,s){var l;if(null!=e){l=this.$getDisplayTokens(e,r.length),l[0]=t;for(var u=1;un-v;){var y=c+n-v;if(e[y-1]>=u&&e[y]>=u)o(y);else if(e[y]!=t&&e[y]!=a){for(var b=Math.max(y-(n-(n>>2)),c-1);y>b&&e[y]b&&e[y]b&&9==e[y];)y--}else for(;y>b&&e[y]b?o(++y):(y=c+n,2==e[y]&&y--,o(y-v))}else{for(y;y!=c-1&&e[y]!=t;y--);if(y>c){o(y);continue}for(y=c+n;y39&&a<48||a>57&&a<64?i.push(9):a>=4352&&e(a)?i.push(1,2):i.push(1)}return i},this.$getStringScreenWidth=function(t,n,r){if(0==n)return[0,0];null==n&&(n=1/0),r=r||0;var i,o;for(o=0;o=4352&&e(i)?r+=2:r+=1,!(r>n));o++);return[r,o]},this.lineWidgets=null,this.getRowLength=function(e){if(this.lineWidgets)var t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;else t=0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]=0)var a=l[u],i=this.$docRowCache[u],d=e>l[c-1];else var d=!c;for(var h=this.getLength()-1,f=this.getNextFoldLine(i),p=f?f.start.row:1/0;a<=e&&(s=this.getRowLength(i),!(a+s>e||i>=h));)a+=s,++i>p&&(i=f.end.row+1,f=this.getNextFoldLine(i,f),p=f?f.start.row:1/0),d&&(this.$docRowCache.push(i),this.$screenRowCache.push(a));if(f&&f.start.row<=i)n=this.getFoldDisplayLine(f),i=f.start.row;else{if(a+s<=e||i>h)return{row:h,column:this.getLine(h).length};n=this.getLine(i),f=null}var g=0;if(this.$useWrapMode){var m=this.$wrapData[i];if(m){var v=Math.floor(e-a);r=m[v],v>0&&m.length&&(g=m.indent,o=m[v-1]||m[m.length-1],n=n.substring(o))}}return o+=this.$getStringScreenWidth(n,t-g)[1],this.$useWrapMode&&o>=r&&(o=r-1),f?f.idxToPosition(o):{row:i,column:o}},this.documentToScreenPosition=function(e,t){if(void 0===t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var r=0,i=null,o=null;(o=this.getFoldAt(e,t,1))&&(e=o.start.row,t=o.start.column);var a,s=0,l=this.$docRowCache,u=this.$getRowCacheIndex(l,e),c=l.length;if(c&&u>=0)var s=l[u],r=this.$screenRowCache[u],d=e>l[c-1];else var d=!c;for(var h=this.getNextFoldLine(s),f=h?h.start.row:1/0;s=f){if((a=h.end.row+1)>e)break;h=this.getNextFoldLine(a,h),f=h?h.start.row:1/0}else a=s+1;r+=this.getRowLength(s),s=a,d&&(this.$docRowCache.push(s),this.$screenRowCache.push(r))}var p="";h&&s>=f?(p=this.getFoldDisplayLine(h,e,t),i=h.start.row):(p=this.getLine(e).substring(0,t),i=e);var g=0;if(this.$useWrapMode){var m=this.$wrapData[i];if(m){for(var v=0;p.length>=m[v];)r++,v++;p=p.substring(m[v-1]||0,p.length),g=v>0?m.indent:0}}return{row:r,column:g+this.$getStringScreenWidth(p)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,r=0,i=0,t=this.$foldData[i++],o=t?t.start.row:1/0;ro&&(r=t.end.row+1,t=this.$foldData[i++],o=t?t.start.row:1/0)}else{e=this.getLength();for(var s=this.$foldData,i=0;in));o++);return[r,o]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()}}).call(h.prototype),e("./edit_session/folding").Folding.call(h.prototype),e("./edit_session/bracket_match").BracketMatch.call(h.prototype),i.defineOptions(h.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$modified=!0,this.$resetRowCache(0),this.$updateWrapData(0,this.getLength()-1)))},initialValue:"auto"},indentedSoftWrap:{initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){isNaN(e)||this.$tabSize===e||(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId}}}),exports.EditSession=h}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,exports,t){"use strict";var n=e("./lib/lang"),r=e("./lib/oop"),i=e("./range").Range,o=function(){this.$options={}};(function(){this.set=function(e){return r.mixin(this.$options,e),this},this.getOptions=function(){return n.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var r=null;return n.forEach(function(e,n,o){if(e.start)r=e;else{var a=e.offset+(o||0);if(r=new i(n,a,n,a+e.length),!e.length&&t.start&&t.start.start&&0!=t.skipCurrent&&r.isEqual(t.start))return r=null,!1}return!0}),r},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var r=t.range,o=r?e.getLines(r.start.row,r.end.row):e.doc.getAllLines(),a=[],s=t.re;if(t.$isMultiLine){var l,u=s.length,c=o.length-u;e:for(var d=s.offset||0;d<=c;d++){for(var h=0;hg||(a.push(l=new i(d,g,d+u-1,m)),u>2&&(d=d+u-2))}}else for(var v=0;vw&&a[h].end.row==r.end.row;)h--;for(a=a.slice(v,h+1),v=0,h=a.length;v=0;s--)if(o(a[s],t,i))return!0};else var s=function(e,t,i){for(var a=n.getMatchOffsets(e,r),s=0;s=a;r--)if(n(e.getLine(r),r))return;if(0!=t.wrap)for(r=s,a=o.row;r>=a;r--)if(n(e.getLine(r),r))return}}:function(n){var r=o.row;if(!n(e.getLine(r).substr(o.column),r,o.column)){for(r+=1;r<=s;r++)if(n(e.getLine(r),r))return;if(0!=t.wrap)for(r=a,s=o.row;r<=s;r++)if(n(e.getLine(r),r))return}}}}}).call(o.prototype),exports.Search=o}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,exports,t){"use strict";function n(e,t){this.platform=t||(o.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function r(e,t){n.call(this,e,t),this.$singleCommand=!1}var i=e("../lib/keys"),o=e("../lib/useragent"),a=i.KEY_MODS;r.prototype=n.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||0}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&("string"==typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var r=this.commandKeyBinding;for(var i in r){var o=r[i];if(o==e)delete r[i];else if(Array.isArray(o)){var a=o.indexOf(e);-1!=a&&(o.splice(a,1),1==o.length&&(r[i]=o[0]))}}},this.bindKey=function(e,t,n){if("object"==typeof e&&(void 0==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach(function(e){var r="";if(-1!=e.indexOf(" ")){var i=e.split(/\s+/);e=i.pop(),i.forEach(function(e){var t=this.parseKeys(e),n=a[t.hashId]+t.key;r+=(r?" ":"")+n,this._addCommandToBinding(r,"chainKeys")},this),r+=" "}var o=this.parseKeys(e),s=a[o.hashId]+o.key;this._addCommandToBinding(r+s,t,n)},this)},this._addCommandToBinding=function(t,n,r){var i,o=this.commandKeyBinding;if(n)if(!o[t]||this.$singleCommand)o[t]=n;else{Array.isArray(o[t])?-1!=(i=o[t].indexOf(n))&&o[t].splice(i,1):o[t]=[o[t]],"number"!=typeof r&&(r=r||n.isDefault?-100:e(n));var a=o[t];for(i=0;ir)break}a.splice(i,0,n)}else delete o[t]},this.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var n=e[t];if(n){if("string"==typeof n)return this.bindKey(n,t);"function"==typeof n&&(n={exec:n}),"object"==typeof n&&(n.name||(n.name=t),this.addCommand(n))}},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),n=t.pop(),r=i[n];if(i.FUNCTION_KEYS[r])n=i.FUNCTION_KEYS[r].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var o=0,a=t.length;a--;){var s=i.KEY_MODS[t[a]];if(null==s)return"undefined"!=typeof console&&console.error("invalid modifier "+t[a]+" in "+e),!1;o|=s}return{key:n,hashId:o}},this.findKeyCommand=function(e,t){var n=a[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,r){if(!(r<0)){var i=a[t]+n,o=this.commandKeyBinding[i];return e.$keyChain&&(e.$keyChain+=" "+i,o=this.commandKeyBinding[e.$keyChain]||o),!o||"chainKeys"!=o&&"chainKeys"!=o[o.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||r>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-i.length-1)),{command:o}):(e.$keyChain=e.$keyChain||i,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(n.prototype),exports.HashHandler=n,exports.MultiHashHandler=r}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,exports,t){"use strict";var n=e("../lib/oop"),r=e("../keyboard/hash_handler").MultiHashHandler,i=e("../lib/event_emitter").EventEmitter,o=function(e,t){r.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};n.inherits(o,r),function(){n.implement(this,i),this.exec=function(e,t,n){if(Array.isArray(e)){for(var r=e.length;r--;)if(this.exec(e[r],t,n))return!0;return!1}if("string"==typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;var i={editor:t,command:e,args:n};return i.returnValue=this._emit("exec",i),this._signal("afterExec",i),!1!==i.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map(function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e})}}.call(o.prototype),exports.CommandManager=o}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,exports,t){"use strict";function n(e,t){return{win:e,mac:t}}var r=e("../lib/lang"),i=e("../config"),o=e("../range").Range;exports.commands=[{name:"showSettingsMenu",bindKey:n("Ctrl-,","Command-,"),exec:function(e){i.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:n("Alt-E","Ctrl-E"),exec:function(e){i.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:n("Alt-Shift-E","Ctrl-Shift-E"),exec:function(e){i.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:n("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",bindKey:n(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:n("Ctrl-L","Command-L"),exec:function(e){var t=parseInt(prompt("Enter line number:"),10);isNaN(t)||e.gotoLine(t)},readOnly:!0},{name:"fold",bindKey:n("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:n("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:n("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:n("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:n(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:n("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:n("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:n("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:n("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:n("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:n("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",bindKey:n("Ctrl-F","Command-F"),exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:n("Ctrl-Shift-Home","Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:n("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:n("Shift-Up","Shift-Up"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",bindKey:n("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",bindKey:n("Ctrl-Shift-End","Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:n("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:n("Shift-Down","Shift-Down"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:n("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:n("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:n("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:n("Alt-Shift-Left","Command-Shift-Left"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:n("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:n("Shift-Left","Shift-Left"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:n("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:n("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:n("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:n("Alt-Shift-Right","Command-Shift-Right"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:n("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:n("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:n("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:n(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:n("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:n(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:n("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:n("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:n("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",bindKey:n("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",bindKey:n("Ctrl-P","Ctrl-P"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",bindKey:n("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",bindKey:n("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",bindKey:n(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",exec:function(e){},readOnly:!0},{name:"cut",exec:function(e){var t=e.getSelectionRange();e._emit("cut",t),e.selection.isEmpty()||(e.session.remove(t),e.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",bindKey:n("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:n("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:n("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:n("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:n("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:n("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:n("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",bindKey:n("Ctrl-H","Command-Option-F"),exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",bindKey:n("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",bindKey:n("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",bindKey:n("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:n("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:n("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:n("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:n("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:n("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:n("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:n("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:n("Alt-Delete","Ctrl-K"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:n("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:n("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:n("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:n("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:n("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:n("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(e,t){e.insert(r.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:n(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:n("Ctrl-T","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:n("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:n("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:n("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:n(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),i=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),a=e.session.doc.getLine(n.row).length,s=e.session.doc.getTextRange(e.selection.getRange()),l=s.replace(/\n\s*/," ").length,u=e.session.doc.getLine(n.row),c=n.row+1;c<=i.row+1;c++){var d=r.stringTrimLeft(r.stringTrimRight(e.session.doc.getLine(c)));0!==d.length&&(d=" "+d),u+=d}i.row+10?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+l)):(a=e.session.doc.getLine(n.row).length>a?a+1:a,e.selection.moveCursorTo(n.row,a))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:n(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,r=e.selection.rangeList.ranges,i=[];r.length<1&&(r=[e.selection.getRange()]);for(var a=0;a0&&this.$blockScrolling--;var n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var r=this.selection.getRange(),i=this.renderer.layerConfig;(r.start.row>=i.lastRow||r.end.row<=i.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,r=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var i=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),r=r&&this.mergeNextCommand&&(!/\s/.test(i)||/\s/.test(t.args)),this.mergeNextCommand=!0}else r=r&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(r=!1),r?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e){this.$keybindingId=e;var n=this;m.loadModule(["keybinding",e],function(r){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(r&&r.handler),t&&t()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.removeEventListener("change",this.$onDocumentChange),this.session.removeEventListener("changeMode",this.$onChangeMode),this.session.removeEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.session.removeEventListener("changeTabSize",this.$onChangeTabSize),this.session.removeEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.session.removeEventListener("changeWrapMode",this.$onChangeWrapMode),this.session.removeEventListener("onChangeFold",this.$onChangeFold),this.session.removeEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.session.removeEventListener("changeBackMarker",this.$onChangeBackMarker),this.session.removeEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.session.removeEventListener("changeAnnotation",this.$onChangeAnnotation),this.session.removeEventListener("changeOverwrite",this.$onCursorChange),this.session.removeEventListener("changeScrollTop",this.$onScrollTopChange),this.session.removeEventListener("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.removeEventListener("changeCursor",this.$onCursorChange),n.removeEventListener("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.addEventListener("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.addEventListener("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.addEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.addEventListener("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.addEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.addEventListener("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.addEventListener("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.addEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.addEventListener("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.addEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.addEventListener("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.addEventListener("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.addEventListener("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.addEventListener("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.addEventListener("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.addEventListener("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this})}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||r.computedStyle(this.container,"fontSize")},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=t.findMatchingBracket(e.getCursorPosition());if(n)var r=new h(n.row,n.column,n.row,n.column+1);else if(t.$mode.getMatching)var r=t.$mode.getMatching(e.session);r&&(t.$bracketHighlight=t.addMarker(r,"ace_bracket","text"))}},50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout(function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=e.getCursorPosition(),r=new v(e.session,n.row,n.column),i=r.getCurrentToken();if(!i||!/\b(?:tag-open|tag-name)/.test(i.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1==i.type.indexOf("tag-open")||(i=r.stepForward())){var o=i.value,a=0,s=r.stepBackward();if("<"==s.value)do{s=i,(i=r.stepForward())&&i.value===o&&-1!==i.type.indexOf("tag-name")&&("<"===s.value?a++:"=0);else{do{i=s,s=r.stepBackward(),i&&i.value===o&&-1!==i.type.indexOf("tag-name")&&("<"===s.value?a++:"1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new h(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),r=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",r)}var i=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(i),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column-1,r=t.end.column+1,i=e.getLine(t.start.row),o=i.length,a=i.substring(Math.max(n,0),Math.min(r,o));if(!(n>=0&&/^[\w\d]/.test(a)||r<=o&&/[\w\d]$/.test(a))&&(a=i.substring(t.start.column,t.end.column),/^[\w\d]+$/.test(a))){return this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:a})}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText();return this._signal("copy",e),e},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e,t){var n={text:e,event:t};this.commands.exec("paste",this,n)},this.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var t=e.text;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)this.insert(t);else{var n=t.split(/\r\n|\r|\n/),r=this.selection.rangeList.ranges;if(n.length>r.length||n.length<2||!n[1])return this.commands.exec("insertstring",this,t);for(var i=r.length;i--;){var o=r[i];o.isEmpty()||this.session.remove(o),this.session.insert(o.start,n[i])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var n=this.session,r=n.getMode(),i=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var o=r.transformAction(n.getState(i.row),"insertion",this,n,e);o&&(e!==o.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),e=o.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()){var a=new h.fromPoints(i,i);a.end.column+=e.length,this.session.remove(a)}}else{var a=this.getSelectionRange();i=this.session.remove(a),this.clearSelection()}if("\n"==e||"\r\n"==e){var s=n.getLine(i.row);if(i.column>s.search(/\S|$/)){var l=s.substr(i.column).search(/\S|$/);n.doc.removeInLine(i.row,i.column,i.column+l)}}this.clearSelection();var u=i.column,c=n.getState(i.row),s=n.getLine(i.row),d=r.checkOutdent(c,s,e);n.insert(i,e);if(o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new h(i.row,u+o.selection[0],i.row,u+o.selection[1])):this.selection.setSelectionRange(new h(i.row+o.selection[0],o.selection[1],i.row+o.selection[2],o.selection[3]))),n.getDocument().isNewLine(e)){var f=r.getNextLineIndent(c,s.slice(0,i.column),n.getTabString());n.insert({row:i.row+1,column:0},f)}d&&r.autoOutdent(c,n,i.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,n){this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,r=n.getState(t.start.row),i=n.getMode().transformAction(r,"deletion",this,n,t);if(0===t.end.column){var o=n.getTextRange(t);if("\n"==o[o.length-1]){var a=n.getLine(t.end.row);/^\s+$/.test(a)&&(t.end.column=a.length)}}i&&(t=i)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,r,i=this.session.getLine(e.row);tt.toLowerCase()?1:0});for(var r=new h(0,0,0,0),i=e.first;i<=e.last;i++){var o=t.getLine(i);r.start.row=i,r.end.row=i,r.end.column=o.length,t.replace(r,n[i-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var r=this.session.getLine(e);n.lastIndex=t){return{value:i[0],start:i.index,end:i.index+i[0].length}}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new h(t,n-1,t,n),i=this.session.getTextRange(r);if(!isNaN(parseFloat(i))&&isFinite(i)){var o=this.getNumberAt(t,n);if(o){var a=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,s=o.start+o.value.length-a,l=parseFloat(o.value);l*=Math.pow(10,s),a!==o.end&&nf+1)break;f=p.last}for(c--,s=this.session.$moveLines(h,f,t?0:e),t&&-1==e&&(d=c+1);d<=c;)a[d].moveBy(s,0),d++;t||(s=0),l+=s}i.fromOrientedRange(i.ranges[0]),i.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,r=this.renderer.layerConfig,i=e*Math.floor(r.height/r.lineHeight);this.$blockScrolling++,!0===t?this.selection.$moveSelection(function(){this.moveCursorBy(i,0)}):!1===t&&(this.selection.moveCursorBy(i,0),this.selection.clearSelection()),this.$blockScrolling--;var o=n.scrollTop;n.scrollBy(0,i*r.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(o)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,r){this.renderer.scrollToLine(e,t,n,r)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),r=new v(this.session,n.row,n.column),i=r.getCurrentToken(),o=i||r.stepForward();if(o){var a,s,l=!1,u={},c=n.column-o.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(o.value.match(/[{}()\[\]]/g)){for(;c=0;--o)this.$tryReplace(n[o],e)&&r++;return this.selection.setSelectionRange(i),this.$blockScrolling-=1,r},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return t=this.$search.replace(n,t),null!==t?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,r){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&n.mixin(t,e);var i=this.selection.getRange();null==t.needle&&(e=this.session.getTextRange(i)||this.$search.$options.needle,e||(i=this.session.getWordRange(i.start.row,i.start.column),e=this.session.getTextRange(i)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:i});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,r),o):(t.backwards?i.start=i.end:i.end=i.start,void this.selection.setRange(i))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.$blockScrolling+=1,this.session.unfold(e),this.selection.setSelectionRange(e),this.$blockScrolling-=1;var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,r=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var i=this.$scrollAnchor;i.style.cssText="position:absolute",this.container.insertBefore(i,this.container.firstChild);var o=this.on("changeSelection",function(){r=!0}),a=this.renderer.on("beforeRender",function(){r&&(t=n.renderer.container.getBoundingClientRect())}),s=this.renderer.on("afterRender",function(){if(r&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,o=e.$cursorLayer.$pixelPos,a=e.layerConfig,s=o.top-a.offset;r=o.top>=0&&s+t.top<0||!(o.topwindow.innerHeight)&&null,null!=r&&(i.style.top=s+"px",i.style.left=o.left+"px",i.style.height=a.lineHeight+"px",i.scrollIntoView(r)),r=t=null}});this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.removeEventListener("changeSelection",o),this.renderer.removeEventListener("afterRender",s),this.renderer.removeEventListener("beforeRender",a))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,r.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))}}).call(y.prototype),m.defineOptions(y.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"}),exports.Editor=y}),ace.define("ace/undomanager",["require","exports","module"],function(e,exports,t){"use strict";var n=function(){this.reset()};(function(){function e(e){return{action:e.action,start:e.start,end:e.end,lines:1==e.lines.length?null:e.lines,text:1==e.lines.length?e.lines[0]:null}}function t(e){return{action:e.action,start:e.start,end:e.end,lines:e.lines||[e.text]}}function n(e,t){for(var n=new Array(e.length),r=0;r0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return 0===this.dirtyCounter},this.$serializeDeltas=function(t){return n(t,e)},this.$deserializeDeltas=function(e){return n(e,t)}}).call(n.prototype),exports.UndoManager=n}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(e,exports,t){"use strict";var n=e("../lib/dom"),r=e("../lib/oop"),i=e("../lib/lang"),o=e("../lib/event_emitter").EventEmitter,a=function(e){this.element=n.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){r.implement(this,o),this.setSession=function(e){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;ta&&(g=o.end.row+1,o=t.getNextFoldLine(g,o),a=o?o.start.row:1/0),g>i){for(;this.$cells.length>p+1;)f=this.$cells.pop(),this.element.removeChild(f.element);break}f=this.$cells[++p],f||(f={element:null,textNode:null,foldWidget:null},f.element=n.createElement("div"),f.textNode=document.createTextNode(""),f.element.appendChild(f.textNode),this.element.appendChild(f.element),this.$cells[p]=f);var m="ace_gutter-cell ";l[g]&&(m+=l[g]),u[g]&&(m+=u[g]),this.$annotations[g]&&(m+=this.$annotations[g].className),f.element.className!=m&&(f.element.className=m);var v=t.getRowLength(g)*e.lineHeight+"px";if(v!=f.element.style.height&&(f.element.style.height=v),s){var y=s[g];null==y&&(y=s[g]=t.getFoldWidget(g))}if(y){f.foldWidget||(f.foldWidget=n.createElement("span"),f.element.appendChild(f.foldWidget));var m="ace_fold-widget ace_"+y;"start"==y&&g==a&&gn.right-t.right?"foldWidgets":void 0}}).call(a.prototype),exports.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,exports,t){"use strict";var n=e("../range").Range,r=e("../lib/dom"),i=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){function e(e,t,n,r){return(e?1:0)|(t?2:0)|(n?4:0)|(r?8:0)}this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.update=function(e){var e=e||this.config;if(e){this.config=e;var t=[];for(var n in this.markers){var r=this.markers[n];if(r.range){var i=r.range.clipRows(e.firstRow,e.lastRow);if(!i.isEmpty())if(i=i.toScreenRange(this.session),r.renderer){var o=this.$getTop(i.start.row,e),a=this.$padding+i.start.column*e.characterWidth;r.renderer(t,i,a,o,e)}else"fullLine"==r.type?this.drawFullLineMarker(t,i,r.clazz,e):"screenLine"==r.type?this.drawScreenLineMarker(t,i,r.clazz,e):i.isMultiLine()?"text"==r.type?this.drawTextMarker(t,i,r.clazz,e):this.drawMultiLineMarker(t,i,r.clazz,e):this.drawSingleLineMarker(t,i,r.clazz+" ace_start ace_br15",e)}else r.update(t,this,this.session,e)}this.element.innerHTML=t.join("")}},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(t,r,i,o,a){for(var s=this.session,l=r.start.row,u=r.end.row,c=l,d=0,h=0,f=s.getScreenLastRowColumn(c),p=new n(c,r.start.column,c,h);c<=u;c++)p.start.row=p.end.row=c,p.start.column=c==l?r.start.column:s.getRowWrapIndent(c),p.end.column=f,d=h,h=f,f=c+1f,c==u),o,c==u?0:1,a)},this.drawMultiLineMarker=function(e,t,n,r,i){var o=this.$padding,a=r.lineHeight,s=this.$getTop(t.start.row,r),l=o+t.start.column*r.characterWidth;i=i||"",e.push("
    "),s=this.$getTop(t.end.row,r);var u=t.end.column*r.characterWidth;if(e.push("
    "),!((a=(t.end.row-t.start.row-1)*r.lineHeight)<=0)){s=this.$getTop(t.start.row+1,r);var c=(t.start.column?1:0)|(t.end.column?0:8);e.push("
    ")}},this.drawSingleLineMarker=function(e,t,n,r,i,o){var a=r.lineHeight,s=(t.end.column+(i||0)-t.start.column)*r.characterWidth,l=this.$getTop(t.start.row,r),u=this.$padding+t.start.column*r.characterWidth;e.push("
    ")},this.drawFullLineMarker=function(e,t,n,r,i){var o=this.$getTop(t.start.row,r),a=r.lineHeight;t.start.row!=t.end.row&&(a+=this.$getTop(t.end.row,r)-o),e.push("
    ")},this.drawScreenLineMarker=function(e,t,n,r,i){var o=this.$getTop(t.start.row,r),a=r.lineHeight;e.push("
    ")}}).call(i.prototype),exports.Marker=i}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,exports,t){"use strict";var n=e("../lib/oop"),r=e("../lib/dom"),i=e("../lib/lang"),o=(e("../lib/useragent"),e("../lib/event_emitter").EventEmitter),a=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){n.implement(this,o),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",this.$padding=0,this.$updateEolChar=function(){var e="\n"==this.session.doc.getNewLineCharacter()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},this.setPadding=function(e){this.$padding=e,this.element.style.padding="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;n"+i.stringRepeat(this.TAB_CHAR,n)+""):t.push(i.stringRepeat(" ",n));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var r="ace_indent-guide",o="",a="";if(this.showInvisibles){r+=" ace_invisible",o=" ace_invisible_space",a=" ace_invisible_tab";var s=i.stringRepeat(this.SPACE_CHAR,this.tabSize),l=i.stringRepeat(this.TAB_CHAR,this.tabSize)}else var s=i.stringRepeat(" ",this.tabSize),l=s;this.$tabStrings[" "]=""+s+"",this.$tabStrings["\t"]=""+l+""}},this.updateLines=function(e,t,n){this.config.lastRow==e.lastRow&&this.config.firstRow==e.firstRow||this.scrollLines(e),this.config=e;for(var r=Math.max(t,e.firstRow),i=Math.min(n,e.lastRow),o=this.element.childNodes,a=0,s=e.firstRow;su&&(s=l.end.row+1,l=this.session.getNextFoldLine(s,l),u=l?l.start.row:1/0),s>i)break;var c=o[a++];if(c){var d=[];this.$renderLine(d,s,!this.$useLineGroups(),s==u&&l),c.style.height=e.lineHeight*this.session.getRowLength(s)+"px",c.innerHTML=d.join("")}s++}},this.scrollLines=function(e){var t=this.config;if(this.config=e,!t||t.lastRow0;r--)n.removeChild(n.firstChild);if(t.lastRow>e.lastRow)for(var r=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);r>0;r--)n.removeChild(n.lastChild);if(e.firstRowt.lastRow){var i=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);n.appendChild(i)}},this.$renderLinesFragment=function(e,t,n){for(var i=this.element.ownerDocument.createDocumentFragment(),o=t,a=this.session.getNextFoldLine(o),s=a?a.start.row:1/0;;){if(o>s&&(o=a.end.row+1,a=this.session.getNextFoldLine(o,a),s=a?a.start.row:1/0),o>n)break;var l=r.createElement("div"),u=[];if(this.$renderLine(u,o,!1,o==s&&a),l.innerHTML=u.join(""),this.$useLineGroups())l.className="ace_line_group",i.appendChild(l),l.style.height=e.lineHeight*this.session.getRowLength(o)+"px";else for(;l.firstChild;)i.appendChild(l.firstChild);o++}return i},this.update=function(e){this.config=e;for(var t=[],n=e.firstRow,r=e.lastRow,i=n,o=this.session.getNextFoldLine(i),a=o?o.start.row:1/0;;){if(i>a&&(i=o.end.row+1,o=this.session.getNextFoldLine(i,o),a=o?o.start.row:1/0),i>r)break;this.$useLineGroups()&&t.push("
    "),this.$renderLine(t,i,!1,i==a&&o),this.$useLineGroups()&&t.push("
    "),i++}this.element.innerHTML=t.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,r){var o=this,a=/\t|&|<|>|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF\uFFF9-\uFFFC])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,s=function(e,n,r,a,s){if(n)return o.showInvisibles?""+i.stringRepeat(o.SPACE_CHAR,e.length)+"":e;if("&"==e)return"&";if("<"==e)return"<";if(">"==e)return">";if("\t"==e){var l=o.session.getScreenTabSize(t+a);return t+=l-1,o.$tabStrings[l]}if(" "==e){var u=o.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",c=o.showInvisibles?o.SPACE_CHAR:"";return t+=1,""+c+""}return r?""+o.SPACE_CHAR+"":(t+=1,""+e+"")},l=r.replace(a,s);if(this.$textToken[n.type])e.push(l);else{var u="ace_"+n.type.replace(/\./g," ace_"),c="";"fold"==n.type&&(c=" style='width:"+n.value.length*this.config.characterWidth+"px;' "),e.push("",l,"")}return t+r.length},this.renderIndentGuide=function(e,t,n){var r=t.search(this.$indentGuideRe);return r<=0||r>=n?t:" "==t[0]?(r-=r%this.tabSize,e.push(i.stringRepeat(this.$tabStrings[" "],r/this.tabSize)),t.substr(r)):"\t"==t[0]?(e.push(i.stringRepeat(this.$tabStrings["\t"],r)),t.substr(r)):t},this.$renderWrappedLine=function(e,t,n,r){for(var o=0,a=0,s=n[0],l=0,u=0;u=s;)l=this.$renderToken(e,l,c,d.substring(0,s-o)),d=d.substring(s-o),o=s,r||e.push("
    ","
    "),e.push(i.stringRepeat(" ",n.indent)),a++,l=0,s=n[a]||Number.MAX_VALUE;0!=d.length&&(o+=d.length,l=this.$renderToken(e,l,c,d))}}},this.$renderSimpleLine=function(e,t){var n=0,r=t[0],i=r.value;this.displayIndentGuides&&(i=this.renderIndentGuide(e,i)),i&&(n=this.$renderToken(e,n,r,i));for(var o=1;o"),i.length){var o=this.session.getRowSplitData(t);o&&o.length?this.$renderWrappedLine(e,i,o,n):this.$renderSimpleLine(e,i)}this.showInvisibles&&(r&&(t=r.end.row),e.push("",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"")),n||e.push("
    ")},this.$getFoldLineTokens=function(e,t){function n(e,t,n){for(var r=0,o=0;o+e[r].value.lengthn-t&&(a=a.substring(0,n-t)),i.push({type:e[r].type,value:a}),o=t+a.length,r+=1}for(;on?i.push({type:e[r].type,value:a.substring(0,n-o)}):i.push(e[r]),o+=a.length,r+=1}}var r=this.session,i=[],o=r.getTokens(e);return t.walk(function(e,t,a,s,l){null!=e?i.push({type:"fold",value:e}):(l&&(o=r.getTokens(t)),o.length&&n(o,s,a))},t.end.row,this.session.getLine(t.end.row).length),i},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(a.prototype),exports.Text=a}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,exports,t){"use strict";var n,r=e("../lib/dom"),i=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),void 0===n&&(n=!("opacity"in this.element.style)),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),r.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=(n?this.$updateVisibility:this.$updateOpacity).bind(this)};(function(){this.$updateVisibility=function(e){for(var t=this.cursors,n=t.length;n--;)t[n].style.visibility=e?"":"hidden"},this.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)t[n].style.opacity=e?"":"0"},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e==this.smoothBlinking||n||(this.smoothBlinking=e,r.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.$updateCursors=this.$updateOpacity.bind(this),this.restartTimer())},this.addCursor=function(){var e=r.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&r.removeCssClass(this.element,"ace_smooth-blinking"),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var t=function(){this.timeoutId=setTimeout(function(){e(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){e(!0),t()},this.blinkInterval),t()}},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+n.column*this.config.characterWidth,top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,r=0;void 0!==t&&0!==t.length||(t=[{cursor:null}]);for(var n=0,i=t.length;ne.height+e.offset||o.top<0)&&n>1)){var a=(this.cursors[r++]||this.addCursor()).style;this.drawCursor?this.drawCursor(a,o,e,t[n],this.session):(a.left=o.left+"px",a.top=o.top+"px",a.width=e.characterWidth+"px",a.height=e.lineHeight+"px")}}for(;this.cursors.length>r;)this.removeCursor();var s=this.session.getOverwrite();this.$setOverwrite(s),this.$pixelPos=o,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,"ace_overwrite-cursors"):r.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(i.prototype),exports.Cursor=i}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,exports,t){"use strict";var n=e("./lib/oop"),r=e("./lib/dom"),i=e("./lib/event"),o=e("./lib/event_emitter").EventEmitter,a=function(e){this.element=r.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=r.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,i.addListener(this.element,"scroll",this.onScroll.bind(this)),i.addListener(this.element,"mousedown",i.preventDefault)};(function(){n.implement(this,o),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e}}).call(a.prototype);var s=function(e,t){a.call(this,e),this.scrollTop=0,t.$scrollbarWidth=this.width=r.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px"};n.inherits(s,a),function(){this.classSuffix="-v",this.onScroll=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return this.isVisible?this.width:0},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=function(e){this.inner.style.height=e+"px"},this.setScrollHeight=function(e){this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTop=e)}}.call(s.prototype);var l=function(e,t){a.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};n.inherits(l,a),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(l.prototype),exports.ScrollBar=s,exports.ScrollBarV=s,exports.ScrollBarH=l,exports.VScrollBar=s,exports.HScrollBar=l}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,exports,t){"use strict";var n=e("./lib/event"),r=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.window=t||window};(function(){this.schedule=function(e){if(this.changes=this.changes|e,!this.pending&&this.changes){this.pending=!0;var t=this;n.nextFrame(function(){t.pending=!1;for(var e;e=t.changes;)t.changes=0,t.onRender(e)},this.window)}}}).call(r.prototype),exports.RenderLoop=r}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,exports,t){var n=e("../lib/oop"),r=e("../lib/dom"),i=e("../lib/lang"),o=e("../lib/useragent"),a=e("../lib/event_emitter").EventEmitter,s=0,l=exports.FontMetrics=function(e,t){this.el=r.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=r.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=r.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),s||this.$testFractionalRect(),this.$measureNode.innerHTML=i.stringRepeat("X",s),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){n.implement(this,a),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var e=r.createElement("div");this.$setMeasureNodeStyles(e.style),e.style.width="0.2px",document.documentElement.appendChild(e);var t=e.getBoundingClientRect().width;s=t>0&&t<1?50:100,e.parentNode.removeChild(e)},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",o.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(){var e=this.$measureSizes();if(e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=setInterval(function(){e.checkForSizeChanges()},500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(){if(50===s){var e=null;try{e=this.$measureNode.getBoundingClientRect()}catch(t){e={width:0,height:0}}var t={height:e.height,width:e.width/s}}else var t={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/s};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){return this.$main.innerHTML=i.stringRepeat(e,s),this.$main.getBoundingClientRect().width/s},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(l.prototype)}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"],function(e,exports,t){"use strict";var n=e("./lib/oop"),r=e("./lib/dom"),i=e("./config"),o=e("./lib/useragent"),a=e("./layer/gutter").Gutter,s=e("./layer/marker").Marker,l=e("./layer/text").Text,u=e("./layer/cursor").Cursor,c=e("./scrollbar").HScrollBar,d=e("./scrollbar").VScrollBar,h=e("./renderloop").RenderLoop,f=e("./layer/font_metrics").FontMetrics,p=e("./lib/event_emitter").EventEmitter;r.importCssString('.ace_editor {position: relative;overflow: hidden;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;min-width: 100%;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;text-indent: -1em;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: inherit;color: inherit;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-webkit-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_editor.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-webkit-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-webkit-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}',"ace_editor.css");var g=function(e,t){var n=this;this.container=e||r.createElement("div"),this.$keepTextAreaAtCursor=!o.isOldIE,r.addCssClass(this.container,"ace_editor"),this.setTheme(t),this.$gutter=r.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=r.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=r.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new a(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new s(this.content);var p=this.$textLayer=new l(this.content);this.canvas=p.element,this.$markerFront=new s(this.content),this.$cursorLayer=new u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new f(this.container,500),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new h(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),i.resetOptions(this),i._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,n.implement(this,p),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar()},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,r){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var i=this.container;r||(r=i.clientHeight||i.scrollHeight),n||(n=i.clientWidth||i.scrollWidth);var o=this.$updateCachedSize(e,t,n,r);if(!this.$size.scrollerHeight||!n&&!r)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,n,r){r-=this.$extraHeight||0;var i=0,o=this.$size,a={width:o.width,height:o.height,scrollerHeight:o.scrollerHeight,scrollerWidth:o.scrollerWidth};return r&&(e||o.height!=r)&&(o.height=r,i|=this.CHANGE_SIZE,o.scrollerHeight=o.height,this.$horizScroll&&(o.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",i|=this.CHANGE_SCROLL),n&&(e||o.width!=n)&&(i|=this.CHANGE_SIZE,o.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,this.scrollBarH.element.style.left=this.scroller.style.left=t+"px",o.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(i|=this.CHANGE_FULL)),o.$dirty=!n||!r,i&&this._signal("resize",a),i},this.onGutterResize=function(){var e=this.$showGutter?this.$gutter.offsetWidth:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var e=this.$cursorLayer.$pixelPos,t=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var n=this.session.selection.getCursor();n.column=0,e=this.$cursorLayer.getPixelPosition(n,!0),t*=this.session.getRowLength(n.row)}this.$gutterLineHighlight.style.top=e.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=t+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=r.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=r.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var e=this.layerConfig,t=this.$cursorLayer.$pixelPos.top,n=this.$cursorLayer.$pixelPos.left;t-=e.offset;var r=this.textarea.style,i=this.lineHeight;if(t<0||t>e.height-i)return void(r.top=r.left="0");var o=this.characterWidth;if(this.$composition){var a=this.textarea.value.replace(/^\x01+/,"");o*=this.session.$getStringScreenWidth(a)[0]+2,i+=2}n-=this.scrollLeft,n>this.$size.scrollerWidth-o&&(n=this.$size.scrollerWidth-o),n+=this.gutterWidth,r.height=i+"px",r.width=o+"px",r.left=Math.min(n,this.$size.scrollerWidth-o)+"px",r.top=Math.min(t,this.$size.height-i)+"px"}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=Math.floor((this.layerConfig.height+this.layerConfig.offset)/this.layerConfig.lineHeight);return this.layerConfig.firstRow-1+e},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,r){var i=this.scrollMargin;i.top=0|e,i.bottom=0|t,i.right=0|r,i.left=0|n,i.v=i.top+i.bottom,i.h=i.left+i.right,i.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-i.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!e&&!t)return void(this.$changes|=e);if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender");var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var r=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;r>0&&(this.scrollTop=r,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-n.offset+"px",this.content.style.marginTop=-n.offset+"px",this.content.style.width=n.width+2*this.$padding+"px",this.content.style.height=n.minHeight+"px"}return e&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL?(this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),void this._signal("afterRender")):e&this.CHANGE_SCROLL?(e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),void this._signal("afterRender")):(e&this.CHANGE_TEXT?(this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):(e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(n),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),void this._signal("afterRender"))},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.max((this.$minLines||1)*this.lineHeight,Math.min(t,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight());var r=e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||r!=this.$vScroll){r!=this.$vScroll&&(this.$vScroll=r,this.scrollBarV.setVisible(r));var i=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,i,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,r=this.session.getScreenLength(),i=r*this.lineHeight,o=this.$getLongestLine(),a=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-o-2*this.$padding<0),s=this.$horizScroll!==a;s&&(this.$horizScroll=a,this.scrollBarH.setVisible(a));var l=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var u=this.scrollTop%this.lineHeight,c=t.scrollerHeight+this.lineHeight,d=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;i+=d;var h=this.scrollMargin;this.session.setScrollTop(Math.max(-h.top,Math.min(this.scrollTop,i-t.scrollerHeight+h.bottom))),this.session.setScrollLeft(Math.max(-h.left,Math.min(this.scrollLeft,o+2*this.$padding-t.scrollerWidth+h.right)));var f=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-i+d<0||this.scrollTop>h.top),p=l!==f;p&&(this.$vScroll=f,this.scrollBarV.setVisible(f));var g,m,v=Math.ceil(c/this.lineHeight)-1,y=Math.max(0,Math.round((this.scrollTop-u)/this.lineHeight)),b=y+v,_=this.lineHeight;y=e.screenToDocumentRow(y,0);var w=e.getFoldLine(y);w&&(y=w.start.row),g=e.documentToScreenRow(y,0),m=e.getRowLength(y)*_,b=Math.min(e.screenToDocumentRow(b,0),e.getLength()-1),c=t.scrollerHeight+e.getRowLength(b)*_+m,u=this.scrollTop-g*_;var C=0;return this.layerConfig.width!=o&&(C=this.CHANGE_H_SCROLL),(s||p)&&(C=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),p&&(o=this.$getLongestLine())),this.layerConfig={width:o,padding:this.$padding,firstRow:y,firstRowScreen:g,lastRow:b,lineHeight:_,characterWidth:this.characterWidth,minHeight:c,maxHeight:i,offset:u,gutterOffset:Math.max(0,Math.ceil((u+t.height-t.scrollerHeight)/_)),height:this.$size.scrollerHeight},C},this.$updateLines=function(){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1||to?(t&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-si?(i=1-this.scrollMargin.top||(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},this.pixelToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=(e+this.scrollLeft-n.left-this.$padding)/this.characterWidth,i=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),o=Math.round(r);return{row:i,column:o,side:r-o>0?1:-1}},this.screenToTextCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=Math.round((e+this.scrollLeft-n.left-this.$padding)/this.characterWidth),i=(t+this.scrollTop-n.top)/this.lineHeight;return this.session.screenToDocumentPosition(i,Math.max(r,0))},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(e,t),i=this.$padding+Math.round(r.column*this.characterWidth),o=r.row*this.lineHeight;return{pageX:n.left+i-this.scrollLeft,pageY:n.top+o-this.scrollTop}},this.visualizeFocus=function(){r.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){r.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,r.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(e){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(r.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(e,t){function n(n){if(o.$themeId!=e)return t&&t();if(n.cssClass){r.importCssString(n.cssText,n.cssClass,o.container.ownerDocument),o.theme&&r.removeCssClass(o.container,o.theme.cssClass);var i="padding"in n?n.padding:"padding"in(o.theme||{})?4:o.$padding;o.$padding&&i!=o.$padding&&o.setPadding(i),o.$theme=n.cssClass,o.theme=n,r.addCssClass(o.container,n.cssClass),r.setCssClass(o.container,"ace_dark",n.isDark),o.$size&&(o.$size.width=0,o.$updateSizeAsync()),o._dispatchEvent("themeLoaded",{theme:n}),t&&t()}}var o=this;if(this.$themeId=e,o._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)n(e);else{var a=e||this.$options.theme.initialValue;i.loadModule(["theme",a],n)}},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){r.setCssClass(this.container,e,!1!==t)},this.unsetStyle=function(e){r.removeCssClass(this.container,e)},this.setCursorStyle=function(e){this.scroller.style.cursor!=e&&(this.scroller.style.cursor=e)},this.setMouseCursor=function(e){this.scroller.style.cursor=e},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(g.prototype),i.defineOptions(g.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(e){r.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e)},initialValue:!0},showLineNumbers:{set:function(e){this.$gutterLayer.setShowLineNumbers(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(e){if(!this.$gutterLineHighlight)return this.$gutterLineHighlight=r.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",void this.$gutter.appendChild(this.$gutterLineHighlight);this.$gutterLineHighlight.style.display=e?"":"none",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight()},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.updateFull()}},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),exports.VirtualRenderer=g}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,exports,n){"use strict";var r=e("../lib/oop"),i=e("../lib/net"),o=e("../lib/event_emitter").EventEmitter,a=e("../config"),s=function(n,r,i,o){if(this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),a.get("packaged")||!e.toUrl)o=o||a.moduleUrl(r.id,"worker");else{var s=this.$normalizePath;o=o||s(e.toUrl("ace/worker/worker.js",null,"_"));var l={};n.forEach(function(t){l[t]=s(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}try{var u=r.src,c=t(205),d=new c([u],{type:"application/javascript"}),h=(window.URL||window.webkitURL).createObjectURL(d);this.$worker=new Worker(h)}catch(e){if(!(e instanceof window.DOMException))throw e;var d=this.$workerBlob(o),f=window.URL||window.webkitURL,p=f.createObjectURL(d);this.$worker=new Worker(p),f.revokeObjectURL(p)}this.$worker.postMessage({init:!0,tlns:l,module:r.id,classname:i}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){r.implement(this,o),this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return i.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var r=this.callbackId++;this.callbacks[r]=n,t.push(r)}this.send(e,t)},this.emit=function(e,t){try{this.$worker.postMessage({event:e,data:{data:t.data}})}catch(e){console.error(e.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))},this.$workerBlob=function(e){var t="importScripts('"+i.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(e){var n=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,r=new n;return r.append(t),r.getBlob("application/javascript")}}}).call(s.prototype);var l=function(e,t,n){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var r=null,i=!1,s=Object.create(o),l=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){l.messageBuffer.push(e),r&&(i?setTimeout(u):u())},this.setEmitSync=function(e){i=e};var u=function(){var e=l.messageBuffer.shift();e.command?r[e.command].apply(r,e.args):e.event&&s._signal(e.event,e.data)};s.postMessage=function(e){l.onMessage({data:e})},s.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},s.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},a.loadModule(["worker",t],function(e){for(r=new e[n](s);l.messageBuffer.length;)u()})};l.prototype=s.prototype,exports.UIWorkerClient=l,exports.WorkerClient=s}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,exports,t){"use strict";var n=e("./range").Range,r=e("./lib/event_emitter").EventEmitter,i=e("./lib/oop"),o=function(e,t,n,r,i,o){var a=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=i,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=r,this.$onCursorChange=function(){setTimeout(function(){a.onCursorChange()})},this.$pos=n;var s=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=s.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){i.implement(this,r),this.setup=function(){var e=this,t=this.doc,r=this.session;this.selectionBefore=r.selection.toJSON(),r.selection.inMultiSelectMode&&r.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=r.addMarker(new n(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(n){var r=t.createAnchor(n.row,n.column);r.$insertRight=!0,r.detach(),e.others.push(r)}),r.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(r){r.markerId=e.addMarker(new n(r.row,r.column,r.row,r.column+t.length),t.othersClass,null,!1)})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),i&&(this.length+=r),i&&!this.session.$fromUndo)if("insert"===e.action)for(var a=this.others.length-1;a>=0;a--){var s=this.others[a],l={row:s.row,column:s.column+o};this.doc.insertMergedLines(l,e.lines)}else if("remove"===e.action)for(var a=this.others.length-1;a>=0;a--){var s=this.others[a],l={row:s.row,column:s.column+o};this.doc.remove(new n(l.row,l.column,l.row,l.column-r))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,r=function(r,i){t.removeMarker(r.markerId),r.markerId=t.addMarker(new n(r.row,r.column,r.row,r.column+e.length),i,null,!1)};r(this.pos,this.mainClass);for(var i=this.others.length;i--;)r(this.others[i],this.othersClass)}},this.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length?this.$onRemoveRange(e):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var r=this.ranges.indexOf(e[n]);this.ranges.splice(r,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new a,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=s.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var n=this.getRange(),r=this.isBackwards(),i=n.start.row,o=n.end.row;if(i==o){if(r)var a=n.end,l=n.start;else var a=n.start,l=n.end;return this.addRange(s.fromPoints(l,l)),void this.addRange(s.fromPoints(a,a))}var u=[],c=this.getLineRange(i,!0);c.start.column=n.start.column,u.push(c);for(var d=i+1;d1){var e=this.rangeList.ranges,t=e[e.length-1],n=s.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var r=this.session.documentToScreenPosition(this.selectionLead),i=this.session.documentToScreenPosition(this.selectionAnchor);this.rectangularRangeBlock(r,i).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var i=[],o=e.column0;)g--;if(g>0)for(var m=0;i[m].isEmpty();)m++;for(var v=g;v>=m;v--)i[v].isEmpty()&&i.splice(v,1)}return i}}.call(l.prototype);var m=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var r=e[n];if(r.marker){this.session.removeMarker(r.marker);var i=t.indexOf(r);-1!=i&&t.splice(i,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(h.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(h.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?r=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?r=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),r=t.exec(n,e.args||{})):r=t.multiSelectAction(n,e.args||{});else{var r=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return r}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var r,i=n&&n.keepOrder,o=1==n||n&&n.$byLines,a=this.session,s=this.selection,u=s.rangeList,c=(i?s:u).ranges;if(!c.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var d=s._eventRegistry;s._eventRegistry={};var h=new l(a);this.inVirtualSelectionMode=!0;for(var f=c.length;f--;){if(o)for(;f>0&&c[f].start.row==c[f-1].end.row;)f--;h.fromOrientedRange(c[f]),h.index=f,this.selection=a.selection=h;var p=e.exec?e.exec(this,t||{}):e(this,t||{});r||void 0===p||(r=p),h.toOrientedRange(c[f])}h.detach(),this.selection=a.selection=s,this.inVirtualSelectionMode=!1,s._eventRegistry=d,s.mergeOverlappingRanges();var g=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),g&&g.from==g.to&&this.renderer.animateScrolling(g.from),r}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],r=0;ro&&(o=n.column),iu?e.insert(r,d.stringRepeat(" ",i-u)):e.remove(new s(r.row,r.column,r.row,r.column-i+u)),t.start.column=t.end.column=o,t.start.row=t.end.row=r.row,t.cursor=t.end}),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),c=u.start.row,h=u.end.row,f=c==h;if(f){var p,g=this.session.getLength();do{p=this.session.getLine(h)}while(/[=:]/.test(p)&&++h0);c<0&&(c=0),h>=g&&(h=g-1)}var m=this.session.removeFullLines(c,h);m=this.$reAlignText(m,f),this.session.insert({row:c,column:0},m.join("\n")+"\n"),f||(u.start.column=0,u.end.column=m[m.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(e,t){function n(e){return d.stringRepeat(" ",e)}function r(e){return e[2]?n(a)+e[2]+n(s-e[2].length+l)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function i(e){return e[2]?n(a+s-e[2].length)+e[2]+n(l," ")+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function o(e){return e[2]?n(a)+e[2]+n(l)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}var a,s,l,u=!0,c=!0;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==a?(a=t[1].length,s=t[2].length,l=t[3].length,t):(a+s+l!=t[1].length+t[2].length+t[3].length&&(c=!1),a!=t[1].length&&(u=!1),a>t[1].length&&(a=t[1].length),st[3].length&&(l=t[3].length),t):[e]}).map(t?r:u?c?i:r:o)}}).call(m.prototype),exports.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},exports.MultiSelect=i,e("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function(e){i(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",u)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",u))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,exports,t){"use strict";var n=e("../../range").Range,r=exports.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,r){var i=/\S/,o=e.getLine(t),a=o.search(i);if(-1!=a){for(var s=r||o.length,l=e.getLength(),u=t,c=t;++tu){var h=e.getLine(c).length;return new n(u,s,c,h)}}},this.openingBracketBlock=function(e,t,r,i,o){var a={row:r,column:i+1},s=e.$findClosingBracket(t,a,o);if(s){var l=e.foldWidgets[s.row];return null==l&&(l=e.getFoldWidget(s.row)),"start"==l&&s.row>a.row&&(s.row--,s.column=e.getLine(s.row).length),n.fromPoints(a,s)}},this.closingBracketBlock=function(e,t,r,i,o){var a={row:r,column:i},s=e.$findOpeningBracket(t,a);if(s)return s.column++,a.column--,n.fromPoints(s,a)}}).call(r.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,exports,t){"use strict";exports.isDark=!1,exports.cssClass="ace-tm",exports.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',e("../lib/dom").importCssString(exports.cssText,exports.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(e,exports,t){"use strict";function n(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}var r=(e("./lib/oop"),e("./lib/dom"));e("./range").Range;(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets?this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0:0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach(function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)}),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})}},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var r=e.data,i=r.start.row,o=r.end.row,a="add"==e.action,s=i+1;s0&&!r[i];)i--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var a=i;a<=o;a++){var s=r[a];if(s&&s.el)if(s.hidden)s.el.style.top=-100-(s.pixelHeight||0)+"px";else{s._inDocument||(s._inDocument=!0,t.container.appendChild(s.el));var l=t.$cursorLayer.getPixelPosition({row:a,column:0},!0).top;s.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(s.row)),s.el.style.top=l-n.offset+"px";var u=s.coverGutter?0:t.gutterWidth;s.fixedWidth||(u-=t.scrollLeft),s.el.style.left=u+"px",s.fullWidth&&s.screenWidth&&(s.el.style.minWidth=n.width+2*n.padding+"px"),s.fixedWidth?s.el.style.right=t.scrollBar.getWidth()+"px":s.el.style.right=""}}}}}).call(n.prototype),exports.LineWidgets=n}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(e,exports,t){"use strict";function n(e,t,n){for(var r=0,i=e.length-1;r<=i;){var o=r+i>>1,a=n(t,e[o]);if(a>0)r=o+1;else{if(!(a<0))return o;i=o-1}}return-(r+1)}function r(e,t,r){var i=e.getAnnotations().sort(a.comparePoints);if(i.length){var o=n(i,{row:t,column:-1},a.comparePoints);o<0&&(o=-o-1),o>=i.length?o=r>0?0:i.length-1:0===o&&r<0&&(o=i.length-1);var s=i[o];if(s&&r){if(s.row===t){do{s=i[o+=r]}while(s&&s.row===t);if(!s)return i.slice()}var l=[];t=s.row;do{l[r<0?"unshift":"push"](s),s=i[o+=r]}while(s&&s.row==t);return l.length&&l}}}var i=e("../line_widgets").LineWidgets,o=e("../lib/dom"),a=e("../range").Range;exports.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new i(n),n.widgetManager.attach(e));var a=e.getCursorPosition(),s=a.row,l=n.widgetManager.getWidgetsAtRow(s).filter(function(e){return"errorMarker"==e.type})[0];l?l.destroy():s-=t;var u,c=r(n,s,t);if(c){var d=c[0];a.column=(d.pos&&"number"!=typeof d.column?d.pos.sc:d.column)||0,a.row=d.row,u=e.renderer.$gutterLayer.$annotations[a.row]}else{if(l)return;u={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(a.row),e.selection.moveToPosition(a);var h={row:a.row,fixedWidth:!0,coverGutter:!0,el:o.createElement("div"),type:"errorMarker"},f=h.el.appendChild(o.createElement("div")),p=h.el.appendChild(o.createElement("div"));p.className="error_widget_arrow "+u.className;var g=e.renderer.$cursorLayer.getPixelPosition(a).left;p.style.left=g+e.renderer.gutterWidth-5+"px",h.el.className="error_widget_wrapper",f.className="error_widget "+u.className,f.innerHTML=u.text.join("
    "),f.appendChild(o.createElement("div"));var m=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return h.destroy(),{command:"null"}};h.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(m),n.widgetManager.removeLineWidget(h),e.off("changeSelection",h.destroy),e.off("changeSession",h.destroy),e.off("mouseup",h.destroy),e.off("change",h.destroy))},e.keyBinding.addKeyboardHandler(m),e.on("changeSelection",h.destroy),e.on("changeSession",h.destroy),e.on("mouseup",h.destroy),e.on("change",h.destroy),e.session.widgetManager.addLineWidget(h),h.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:h.el.offsetHeight})},o.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")}),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,exports,t){"use strict";e("./lib/fixoldbrowsers");var n=e("./lib/dom"),r=e("./lib/event"),i=e("./editor").Editor,o=e("./edit_session").EditSession,a=e("./undomanager").UndoManager,s=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),exports.config=e("./config"),exports.acequire=e,exports.edit=function(e){if("string"==typeof e){var t=e;if(!(e=document.getElementById(t)))throw new Error("ace.edit can't find div #"+t)}if(e&&e.env&&e.env.editor instanceof i)return e.env.editor;var o="";if(e&&/input|textarea/i.test(e.tagName)){var a=e;o=a.value,e=n.createElement("pre"),a.parentNode.replaceChild(e,a)}else e&&(o=n.getInnerText(e),e.innerHTML="");var l=exports.createEditSession(o),u=new i(new s(e));u.setSession(l);var c={document:l,editor:u,onResize:u.resize.bind(u,null)};return a&&(c.textarea=a),r.addListener(window,"resize",c.onResize),u.on("destroy",function(){r.removeListener(window,"resize",c.onResize),c.editor.container.env=null}),u.container.env=u.env=c,u},exports.createEditSession=function(e,t){var n=new o(e,t);return n.setUndoManager(new a),n},exports.EditSession=o,exports.UndoManager=a,exports.version="1.2.2"}),function(){ace.acequire(["ace/ace"],function(e){e&&e.config.init(!0),window.ace||(window.ace=e);for(var t in e)e.hasOwnProperty(t)&&(window.ace[t]=e[t])})}(),e.exports=window.ace.acequire("ace/ace")},function(e,exports){},function(e,exports){ace.define("ace/theme/chrome",["require","exports","module","ace/lib/dom"],function(e,exports,t){exports.isDark=!1,exports.cssClass="ace-chrome",exports.cssText='.ace-chrome .ace_gutter {background: #ebebeb;color: #333;overflow : hidden;}.ace-chrome .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-chrome {background-color: #FFFFFF;color: black;}.ace-chrome .ace_cursor {color: black;}.ace-chrome .ace_invisible {color: rgb(191, 191, 191);}.ace-chrome .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-chrome .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-chrome .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-chrome .ace_invalid {background-color: rgb(153, 0, 0);color: white;}.ace-chrome .ace_fold {}.ace-chrome .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-chrome .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-chrome .ace_support.ace_type,.ace-chrome .ace_support.ace_class.ace-chrome .ace_support.ace_other {color: rgb(109, 121, 222);}.ace-chrome .ace_variable.ace_parameter {font-style:italic;color:#FD971F;}.ace-chrome .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-chrome .ace_comment {color: #236e24;}.ace-chrome .ace_comment.ace_doc {color: #236e24;}.ace-chrome .ace_comment.ace_doc.ace_tag {color: #236e24;}.ace-chrome .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-chrome .ace_variable {color: rgb(49, 132, 149);}.ace-chrome .ace_xml-pe {color: rgb(104, 104, 91);}.ace-chrome .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-chrome .ace_heading {color: rgb(12, 7, 255);}.ace-chrome .ace_list {color:rgb(185, 6, 144);}.ace-chrome .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-chrome .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-chrome .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-chrome .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-chrome .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-chrome .ace_gutter-active-line {background-color : #dcdcdc;}.ace-chrome .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-chrome .ace_storage,.ace-chrome .ace_keyword,.ace-chrome .ace_meta.ace_tag {color: rgb(147, 15, 128);}.ace-chrome .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-chrome .ace_string {color: #1A1AA6;}.ace-chrome .ace_entity.ace_other.ace_attribute-name {color: #994409;}.ace-chrome .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',e("../lib/dom").importCssString(exports.cssText,exports.cssClass)})},function(e,exports,t){var n=t(745);"string"==typeof n&&(n=[[e.i,n,""]]);var r={};r.transform=void 0;t(15)(n,r);n.locals&&(e.exports=n.locals)},function(e,exports,t){exports=e.exports=t(14)(void 0),exports.push([e.i,'._1m2226KUEieawUGAjqPI3i{margin:0;padding:0}._1m2226KUEieawUGAjqPI3i li:not(:last-child){float:left}._1m2226KUEieawUGAjqPI3i li:not(:last-child):after{content:",";margin-right:5px}._1m2226KUEieawUGAjqPI3i li:last-child:after{content:"."}',""]),exports.locals={usedInPipelines:"_1m2226KUEieawUGAjqPI3i"}},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(0),i=n(r),o=t(3),a=t(2),s=n(a),l=t(50),u=n(l),c=t(65),d=n(c),h=t(33),f=n(h),p=t(30),g=n(p),m=t(11),v=t(27),y=n(v),b=t(747),_=n(b),w=i.default.createClass({displayName:"RuleHelper",mixins:[s.default.connect(u.default)],getInitialState:function(){return{expanded:{},paginatedEntries:void 0,filteredEntries:void 0,currentPage:1,pageSize:10}},componentDidMount:function(){d.default.loadFunctions()},ruleTemplate:'rule "function howto"\nwhen\n has_field("transaction_date")\nthen\n // the following date format assumes there\'s no time zone in the string\n let new_date = parse_date(to_string($message.transaction_date), "yyyy-MM-dd HH:mm:ss");\n set_field("transaction_year", new_date.year);\nend',_niceType:function(e){return e.replace(/^.*\.(.*?)$/,"$1")},_toggleFunctionDetail:function(e){var t=f.default.clone(this.state.expanded);t[e]=!t[e],this.setState({expanded:t})},_functionSignature:function(e){var t=e.params.map(function(e){return e.optional?"["+e.name+"]":e.name});return i.default.createElement("code",null,e.name+"("+t.join(", ")+") : "+this._niceType(e.return_type))},_parameters:function(e){var t=this;return e.params.map(function(e){return i.default.createElement("tr",{key:e.name},i.default.createElement("td",{className:_.default.adjustedTableCellWidth},e.name),i.default.createElement("td",{className:_.default.adjustedTableCellWidth},t._niceType(e.type)),i.default.createElement("td",{className:_.default.adjustedTableCellWidth+" text-centered"},e.optional?null:i.default.createElement("i",{className:"fa fa-check"})),i.default.createElement("td",null,e.description))})},_renderFunctions:function(e){var t=this;return e?e.map(function(e){var n=null;return t.state.expanded[e.name]&&(n=i.default.createElement("tr",null,i.default.createElement("td",{colSpan:"2"},i.default.createElement(o.Table,{condensed:!0,striped:!0,hover:!0},i.default.createElement("thead",null,i.default.createElement("tr",null,i.default.createElement("th",null,"Parameter"),i.default.createElement("th",null,"Type"),i.default.createElement("th",null,"Required"),i.default.createElement("th",null,"Description"))),i.default.createElement("tbody",null,t._parameters(e)))))),i.default.createElement("tbody",{key:e.name},i.default.createElement("tr",{onClick:function(){return t._toggleFunctionDetail(e.name)},className:_.default.clickableRow},i.default.createElement("td",{className:_.default.functionTableCell},t._functionSignature(e)),i.default.createElement("td",null,e.description)),n)}):[]},_onPageChange:function(e,t){this.setState({currentPage:e,pageSize:t})},render:function(){if(!this.state.functionDescriptors)return i.default.createElement(m.Spinner,null);var e=this.state.functionDescriptors.slice((this.state.currentPage-1)*this.state.pageSize,this.state.currentPage*this.state.pageSize);return i.default.createElement(o.Panel,{header:"Rules quick reference"},i.default.createElement(o.Row,{className:"row-sm"},i.default.createElement(o.Col,{md:12},i.default.createElement("p",{className:_.default.marginQuickReferenceText},"Read the ",i.default.createElement(g.default,{page:y.default.PAGES.PIPELINE_RULES,text:"full documentation"})," ","to gain a better understanding of how Graylog pipeline rules work."))),i.default.createElement(o.Row,{className:"row-sm"},i.default.createElement(o.Col,{md:12},i.default.createElement(o.Tabs,{id:"functionsHelper",defaultActiveKey:1,animation:!1},i.default.createElement(o.Tab,{eventKey:1,title:"Functions"},i.default.createElement("p",{className:_.default.marginTab},"This is a list of all available functions in pipeline rules. Click on a row to see more information about the function parameters."),i.default.createElement("div",{className:"table-responsive "+_.default.marginTab},i.default.createElement(m.PaginatedList,{totalItems:this.state.functionDescriptors.length,pageSize:this.state.pageSize,onChange:this._onPageChange,showPageSizeSelect:!1},i.default.createElement(o.Table,{condensed:!0},i.default.createElement("thead",null,i.default.createElement("tr",null,i.default.createElement("th",null,"Function"),i.default.createElement("th",null,"Description"))),this._renderFunctions(e))))),i.default.createElement(o.Tab,{eventKey:2,title:"Example"},i.default.createElement("p",{className:_.default.marginTab},"Do you want to see how a pipeline rule looks like? Take a look at this example:"),i.default.createElement("pre",{className:_.default.marginTab+" "+_.default.exampleFunction},this.ruleTemplate))))))}});exports.default=w,e.exports=exports.default},function(e,exports,t){var n=t(748);"string"==typeof n&&(n=[[e.i,n,""]]);var r={};r.transform=void 0;t(15)(n,r);n.locals&&(e.exports=n.locals)},function(e,exports,t){exports=e.exports=t(14)(void 0),exports.push([e.i,"._1dbTYHqvHJs6l-6dPKUlma{cursor:pointer}._2-9FcHM2R2zsUlADjBNnCc{width:300px}.uUe6r-QYglFc5rja3NchE{margin-top:5px}._1hrLwbSyi_3MevyOJspp46{margin-top:10px}._1ZPHnwsxO0p4Jabz6m30t_{white-space:pre-wrap}._2BadHBte4QCC_f8Va4hIKD{width:1%}",""]),exports.locals={clickableRow:"_1dbTYHqvHJs6l-6dPKUlma",functionTableCell:"_2-9FcHM2R2zsUlADjBNnCc",marginQuickReferenceText:"uUe6r-QYglFc5rja3NchE",marginTab:"_1hrLwbSyi_3MevyOJspp46",exampleFunction:"_1ZPHnwsxO0p4Jabz6m30t_",adjustedTableCellWidth:"_2BadHBte4QCC_f8Va4hIKD"}}]); //# sourceMappingURL=plugin.org.graylog.plugins.pipelineprocessor.PipelineProcessorPlugin.ad62bdccc024e82f7dea.js.map