From a849d5f58374af8f966dc805e595b86217234f45 Mon Sep 17 00:00:00 2001 From: Alan Souza Date: Tue, 7 Jul 2015 15:23:44 -0700 Subject: [PATCH] v0.3.0 --- bower.json | 4 +- grommet.js | 7600 ++++++++++++++++++++++++++++++++---------------- grommet.min.js | 15 +- 3 files changed, 5133 insertions(+), 2486 deletions(-) diff --git a/bower.json b/bower.json index 740e083..cfea923 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "grommet", - "version": "0.2.4", + "version": "0.3.0", "main": "grommet.js", "description": "The most advanced UX framework for enterprise applications.", "authors": [ @@ -25,6 +25,6 @@ }, "dependencies": { "react": "^0.13.1", - "grommet": "HewlettPackard/grommet-bower" + "grommet": "^0.3.0" } } \ No newline at end of file diff --git a/grommet.js b/grommet.js index e2aa7ba..05ba2a8 100644 --- a/grommet.js +++ b/grommet.js @@ -47,129 +47,86 @@ var Grommet = // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var Grommet = { // Components - App: __webpack_require__(3), - Button: __webpack_require__(44), - CheckBox: __webpack_require__(45), - Document: __webpack_require__(46), - Donut: __webpack_require__(47), - Footer: __webpack_require__(49), - Form: __webpack_require__(51), - FormField: __webpack_require__(52), - Header: __webpack_require__(53), - Label: __webpack_require__(54), - Login: __webpack_require__(55), - LoginForm: __webpack_require__(56), - Menu: __webpack_require__(57), - Meter: __webpack_require__(64), - Panel: __webpack_require__(65), - RadioButton: __webpack_require__(66), - Search: __webpack_require__(67), - SearchInput: __webpack_require__(69), - Section: __webpack_require__(70), - Table: __webpack_require__(71), - Tiles: __webpack_require__(74), - Tile: __webpack_require__(1), - Title: __webpack_require__(75), - Object: __webpack_require__(76), - TBD: __webpack_require__(77), + App: __webpack_require__(1), + Article: __webpack_require__(78), + Button: __webpack_require__(87), + CheckBox: __webpack_require__(88), + Document: __webpack_require__(89), + Donut: __webpack_require__(90), + Footer: __webpack_require__(92), + Form: __webpack_require__(93), + FormField: __webpack_require__(94), + Header: __webpack_require__(95), + Headline: __webpack_require__(96), + Label: __webpack_require__(97), + List: __webpack_require__(98), + ListItem: __webpack_require__(100), + Login: __webpack_require__(102), + LoginForm: __webpack_require__(103), + Menu: __webpack_require__(104), + Meter: __webpack_require__(108), + Panel: __webpack_require__(109), + RadioButton: __webpack_require__(110), + Search: __webpack_require__(111), + SearchInput: __webpack_require__(113), + Section: __webpack_require__(114), + Table: __webpack_require__(115), + Tiles: __webpack_require__(116), + Tile: __webpack_require__(117), + Title: __webpack_require__(118), + Object: __webpack_require__(119), + TBD: __webpack_require__(120), Icons: { - Clear: __webpack_require__(78), - DragHandle: __webpack_require__(79), - Edit: __webpack_require__(80), - Filter: __webpack_require__(81), - Help: __webpack_require__(82), - Left: __webpack_require__(83), - More: __webpack_require__(62), - Right: __webpack_require__(84), - Search: __webpack_require__(68), - SearchPlus: __webpack_require__(85), - Spinning: __webpack_require__(72), - Status: __webpack_require__(86) + Calendar: __webpack_require__(121), + Clear: __webpack_require__(122), + DragHandle: __webpack_require__(123), + Edit: __webpack_require__(124), + Filter: __webpack_require__(125), + Grommet: __webpack_require__(126), + Help: __webpack_require__(127), + Left: __webpack_require__(128), + More: __webpack_require__(106), + Right: __webpack_require__(129), + Search: __webpack_require__(112), + SearchPlus: __webpack_require__(130), + Spinning: __webpack_require__(101), + Status: __webpack_require__(131) }, // Mixins Mixins: { - KeyboardAccelerators: __webpack_require__(61), - ReactLayeredComponent: __webpack_require__(60) + KeyboardAccelerators: __webpack_require__(85), + ReactLayeredComponent: __webpack_require__(138) }, // Actions - Actions: __webpack_require__(93), + Actions: __webpack_require__(139), // Stores - SessionStore: __webpack_require__(121), + SessionStore: __webpack_require__(167), // Utils - Rest: __webpack_require__(117) + Rest: __webpack_require__(163), + Validator: __webpack_require__(168) }; module.exports = Grommet; - /***/ }, /* 1 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. - var React = __webpack_require__(2); - - var CLASS_ROOT = "tile"; - - var Tile = React.createClass({displayName: "Tile", - - propTypes: { - onClick: React.PropTypes.func, - selected: React.PropTypes.bool, - status: React.PropTypes.string, - wide: React.PropTypes.bool - }, - - render: function() { - var classes = [CLASS_ROOT]; - if (this.props.status) { - classes.push(CLASS_ROOT = "--status-" + this.props.status.toLowerCase()); - } - if (this.props.wide) { - classes.push(CLASS_ROOT + "--wide"); - } - if (this.props.onClick) { - classes.push(CLASS_ROOT + "--selectable"); - } - if (this.props.selected) { - classes.push(CLASS_ROOT + "--selected"); - } - if (this.props.className) { - classes.push(this.props.className); - } - - return ( - React.createElement("div", {className: classes.join(' '), onClick: this.props.onClick}, - this.props.children - ) - ); - } - - }); - - module.exports = Tile; - - -/***/ }, -/* 2 */ -/***/ function(module, exports) { - - module.exports = React; - -/***/ }, -/* 3 */ -/***/ function(module, exports, __webpack_require__) { - - // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; var React = __webpack_require__(2); - var IntlMixin = __webpack_require__(4); + var IntlMixin = __webpack_require__(3); + var Locale = __webpack_require__(43); - var App = React.createClass({displayName: "App", + var App = React.createClass({ + displayName: 'App', mixins: [IntlMixin], @@ -177,103 +134,117 @@ var Grommet = centered: React.PropTypes.bool }, - getDefaultProps: function () { + getDefaultProps: function getDefaultProps() { return { centered: true }; }, - render: function() { - var classes = ["app"]; + render: function render() { + var classes = ['app']; if (this.props.centered) { - classes.push("app--centered"); + classes.push('app--centered'); } if (this.props.inline) { - classes.push("app--inline"); + classes.push('app--inline'); } + if (this.props.className) { classes.push(this.props.className); } + var lang = Locale.getCurrentLocale(); + if (this.props.lang) { + lang = this.props.lang; + } + //remove this when React 0.14 is released. This is required because context props are not being propagated to children. - var children = React.Children.map(this.props.children, function(child) { + var children = React.Children.map(this.props.children, (function (child) { if (child) { return React.cloneElement(child, this.getChildContext()); } else { return null; } - }.bind(this)); + }).bind(this)); - return ( - React.createElement("div", {className: classes.join(' ')}, - children - ) + if (!document.documentElement.getAttribute('lang')) { + document.documentElement.setAttribute('lang', lang); + } + + return React.createElement( + 'div', + { lang: lang, className: classes.join(' ') }, + children ); } }); module.exports = App; +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + module.exports = React; /***/ }, -/* 4 */ +/* 3 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {// (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var supportedLocales = ['en-US', 'pt-BR']; function localesSupported() { return global.Intl && supportedLocales.every(function (locale) { - return Intl.NumberFormat.supportedLocalesOf(locale)[0] === locale && - Intl.DateTimeFormat.supportedLocalesOf(locale)[0] === locale; + return Intl.NumberFormat.supportedLocalesOf(locale)[0] === locale && Intl.DateTimeFormat.supportedLocalesOf(locale)[0] === locale; }); } - if (! localesSupported()) { - __webpack_require__(5); + if (!localesSupported()) { + __webpack_require__(4); + IntlPolyfill.__addLocaleData(__webpack_require__(5)); IntlPolyfill.__addLocaleData(__webpack_require__(6)); - IntlPolyfill.__addLocaleData(__webpack_require__(7)); Intl.NumberFormat = IntlPolyfill.NumberFormat; Intl.DateTimeFormat = IntlPolyfill.DateTimeFormat; } var React = __webpack_require__(2); - var ReactIntl = __webpack_require__(8); + var ReactIntl = __webpack_require__(7); var IntlMixin = ReactIntl.IntlMixin; var FormattedDate = ReactIntl.FormattedDate; module.exports = { mixins: [IntlMixin], - getChildContext: function () { + getChildContext: function getChildContext() { if (!this.props.locales && !this.context.locales) { this.context.locales = 'en-US'; } if (!this.props.messages && !this.context.messages) { try { - this.context.messages = __webpack_require__(41)("./" + (this.props.locales || this.context.locales || 'en-US')); + this.context.messages = __webpack_require__(40)("./" + (this.props.locales || this.context.locales || 'en-US')); } catch (e) { - this.context.messages = __webpack_require__(42); + this.context.messages = __webpack_require__(41); } } }, - getGrommetFormattedDate: function (date) { - return ( - React.createElement(FormattedDate, { - value: new Date(date), - day: "numeric", - month: "numeric", - year: "numeric", - hour: "numeric", - minute: "numeric", - second: "numeric"}) - ); + getGrommetFormattedDate: function getGrommetFormattedDate(date) { + return React.createElement(FormattedDate, { + value: new Date(date), + day: 'numeric', + month: 'numeric', + year: 'numeric', + hour: 'numeric', + minute: 'numeric', + second: 'numeric' }); }, - getGrommetIntlMessage: function(messageKey) { + getGrommetIntlMessage: function getGrommetIntlMessage(messageKey) { var message = messageKey; if (messageKey) { try { @@ -285,11 +256,10 @@ var Grommet = return message; } }; - /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 5 */ +/* 4 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(global) {/** @@ -3365,7 +3335,7 @@ var Grommet = /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 6 */ +/* 5 */ /***/ function(module, exports) { module.exports = { @@ -4309,7 +4279,7 @@ var Grommet = } /***/ }, -/* 7 */ +/* 6 */ /***/ function(module, exports) { module.exports = { @@ -5406,7 +5376,7 @@ var Grommet = } /***/ }, -/* 8 */ +/* 7 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/* jshint node:true */ @@ -5418,8 +5388,8 @@ var Grommet = // Require the lib and add all locale data to `ReactIntl`. This module will be // ignored when bundling for the browser with Browserify/Webpack. - var ReactIntl = __webpack_require__(9); - __webpack_require__(40); + var ReactIntl = __webpack_require__(8); + __webpack_require__(39); // Export the Mixin as the default export for back-compat with v1.0.0. This will // be changed to simply re-exporting `ReactIntl` as the default export in v2.0. @@ -5450,14 +5420,14 @@ var Grommet = /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 9 */ +/* 8 */ /***/ function(module, exports, __webpack_require__) { /* jshint esnext: true */ "use strict"; exports.__addLocaleData = __addLocaleData; - var intl$messageformat$$ = __webpack_require__(13), intl$relativeformat$$ = __webpack_require__(23), src$en$$ = __webpack_require__(33), src$mixin$$ = __webpack_require__(12), src$components$date$$ = __webpack_require__(34), src$components$time$$ = __webpack_require__(10), src$components$relative$$ = __webpack_require__(35), src$components$number$$ = __webpack_require__(36), src$components$message$$ = __webpack_require__(37), src$components$html$message$$ = __webpack_require__(38); + var intl$messageformat$$ = __webpack_require__(12), intl$relativeformat$$ = __webpack_require__(22), src$en$$ = __webpack_require__(32), src$mixin$$ = __webpack_require__(11), src$components$date$$ = __webpack_require__(33), src$components$time$$ = __webpack_require__(9), src$components$relative$$ = __webpack_require__(34), src$components$number$$ = __webpack_require__(35), src$components$message$$ = __webpack_require__(36), src$components$html$message$$ = __webpack_require__(37); function __addLocaleData(data) { intl$messageformat$$["default"].__addLocaleData(data); intl$relativeformat$$["default"].__addLocaleData(data); @@ -5469,14 +5439,14 @@ var Grommet = //# sourceMappingURL=react-intl.js.map /***/ }, -/* 10 */ +/* 9 */ /***/ function(module, exports, __webpack_require__) { /* jshint esnext:true */ // TODO: Use `import React from "react";` when external modules are supported. "use strict"; - var src$react$$ = __webpack_require__(11), src$mixin$$ = __webpack_require__(12); + var src$react$$ = __webpack_require__(10), src$mixin$$ = __webpack_require__(11); var FormattedTime = src$react$$["default"].createClass({ displayName: 'FormattedTime', @@ -5511,7 +5481,7 @@ var Grommet = //# sourceMappingURL=time.js.map /***/ }, -/* 11 */ +/* 10 */ /***/ function(module, exports) { /* global React */ @@ -5526,14 +5496,14 @@ var Grommet = //# sourceMappingURL=react.js.map /***/ }, -/* 12 */ +/* 11 */ /***/ function(module, exports, __webpack_require__) { /* jshint esnext:true */ // TODO: Use `import React from "react";` when external modules are supported. "use strict"; - var src$react$$ = __webpack_require__(11), intl$messageformat$$ = __webpack_require__(13), intl$relativeformat$$ = __webpack_require__(23), intl$format$cache$$ = __webpack_require__(30); + var src$react$$ = __webpack_require__(10), intl$messageformat$$ = __webpack_require__(12), intl$relativeformat$$ = __webpack_require__(22), intl$format$cache$$ = __webpack_require__(29); // ----------------------------------------------------------------------------- @@ -5692,18 +5662,18 @@ var Grommet = //# sourceMappingURL=mixin.js.map /***/ }, -/* 13 */ +/* 12 */ /***/ function(module, exports, __webpack_require__) { /* jshint node:true */ 'use strict'; - var IntlMessageFormat = __webpack_require__(14)['default']; + var IntlMessageFormat = __webpack_require__(13)['default']; // Add all locale data to `IntlMessageFormat`. This module will be ignored when // bundling for the browser with Browserify/Webpack. - __webpack_require__(22); + __webpack_require__(21); // Re-export `IntlMessageFormat` as the CommonJS default exports with all the // locale data registered, and with English set as the default locale. Define @@ -5713,13 +5683,13 @@ var Grommet = /***/ }, -/* 14 */ +/* 13 */ /***/ function(module, exports, __webpack_require__) { /* jslint esnext: true */ "use strict"; - var src$core$$ = __webpack_require__(15), src$en$$ = __webpack_require__(21); + var src$core$$ = __webpack_require__(14), src$en$$ = __webpack_require__(20); src$core$$["default"].__addLocaleData(src$en$$["default"]); src$core$$["default"].defaultLocale = 'en'; @@ -5729,7 +5699,7 @@ var Grommet = //# sourceMappingURL=main.js.map /***/ }, -/* 15 */ +/* 14 */ /***/ function(module, exports, __webpack_require__) { /* @@ -5741,7 +5711,7 @@ var Grommet = /* jslint esnext: true */ "use strict"; - var src$utils$$ = __webpack_require__(16), src$es5$$ = __webpack_require__(17), src$compiler$$ = __webpack_require__(18), intl$messageformat$parser$$ = __webpack_require__(19); + var src$utils$$ = __webpack_require__(15), src$es5$$ = __webpack_require__(16), src$compiler$$ = __webpack_require__(17), intl$messageformat$parser$$ = __webpack_require__(18); exports["default"] = MessageFormat; // -- MessageFormat -------------------------------------------------------- @@ -5998,7 +5968,7 @@ var Grommet = //# sourceMappingURL=core.js.map /***/ }, -/* 16 */ +/* 15 */ /***/ function(module, exports) { /* @@ -6035,7 +6005,7 @@ var Grommet = //# sourceMappingURL=utils.js.map /***/ }, -/* 17 */ +/* 16 */ /***/ function(module, exports, __webpack_require__) { /* @@ -6047,7 +6017,7 @@ var Grommet = /* jslint esnext: true */ "use strict"; - var src$utils$$ = __webpack_require__(16); + var src$utils$$ = __webpack_require__(15); // Purposely using the same implementation as the Intl.js `Intl` polyfill. // Copyright 2013 Andy Earnshaw, MIT License @@ -6089,7 +6059,7 @@ var Grommet = //# sourceMappingURL=es5.js.map /***/ }, -/* 18 */ +/* 17 */ /***/ function(module, exports) { /* @@ -6303,17 +6273,17 @@ var Grommet = //# sourceMappingURL=compiler.js.map /***/ }, -/* 19 */ +/* 18 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - exports = module.exports = __webpack_require__(20)['default']; + exports = module.exports = __webpack_require__(19)['default']; exports['default'] = exports; /***/ }, -/* 20 */ +/* 19 */ /***/ function(module, exports) { "use strict"; @@ -7659,7 +7629,7 @@ var Grommet = //# sourceMappingURL=parser.js.map /***/ }, -/* 21 */ +/* 20 */ /***/ function(module, exports) { // GENERATED FILE @@ -7669,24 +7639,24 @@ var Grommet = //# sourceMappingURL=en.js.map /***/ }, -/* 22 */ +/* 21 */ /***/ function(module, exports) { /* (ignored) */ /***/ }, -/* 23 */ +/* 22 */ /***/ function(module, exports, __webpack_require__) { /* jshint node:true */ 'use strict'; - var IntlRelativeFormat = __webpack_require__(24)['default']; + var IntlRelativeFormat = __webpack_require__(23)['default']; // Add all locale data to `IntlRelativeFormat`. This module will be ignored when // bundling for the browser with Browserify/Webpack. - __webpack_require__(29); + __webpack_require__(28); // Re-export `IntlRelativeFormat` as the CommonJS default exports with all the // locale data registered, and with English set as the default locale. Define @@ -7696,13 +7666,13 @@ var Grommet = /***/ }, -/* 24 */ +/* 23 */ /***/ function(module, exports, __webpack_require__) { /* jslint esnext: true */ "use strict"; - var src$core$$ = __webpack_require__(25), src$en$$ = __webpack_require__(28); + var src$core$$ = __webpack_require__(24), src$en$$ = __webpack_require__(27); src$core$$["default"].__addLocaleData(src$en$$["default"]); src$core$$["default"].defaultLocale = 'en'; @@ -7712,7 +7682,7 @@ var Grommet = //# sourceMappingURL=main.js.map /***/ }, -/* 25 */ +/* 24 */ /***/ function(module, exports, __webpack_require__) { /* @@ -7724,7 +7694,7 @@ var Grommet = /* jslint esnext: true */ "use strict"; - var intl$messageformat$$ = __webpack_require__(13), src$diff$$ = __webpack_require__(26), src$es5$$ = __webpack_require__(27); + var intl$messageformat$$ = __webpack_require__(12), src$diff$$ = __webpack_require__(25), src$es5$$ = __webpack_require__(26); exports["default"] = RelativeFormat; // ----------------------------------------------------------------------------- @@ -8014,7 +7984,7 @@ var Grommet = //# sourceMappingURL=core.js.map /***/ }, -/* 26 */ +/* 25 */ /***/ function(module, exports) { /* @@ -8065,7 +8035,7 @@ var Grommet = //# sourceMappingURL=diff.js.map /***/ }, -/* 27 */ +/* 26 */ /***/ function(module, exports) { /* @@ -8145,7 +8115,7 @@ var Grommet = //# sourceMappingURL=es5.js.map /***/ }, -/* 28 */ +/* 27 */ /***/ function(module, exports) { // GENERATED FILE @@ -8155,27 +8125,27 @@ var Grommet = //# sourceMappingURL=en.js.map /***/ }, -/* 29 */ +/* 28 */ /***/ function(module, exports) { /* (ignored) */ /***/ }, -/* 30 */ +/* 29 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - exports = module.exports = __webpack_require__(31)['default']; + exports = module.exports = __webpack_require__(30)['default']; exports['default'] = exports; /***/ }, -/* 31 */ +/* 30 */ /***/ function(module, exports, __webpack_require__) { "use strict"; - var src$es5$$ = __webpack_require__(32); + var src$es5$$ = __webpack_require__(31); exports["default"] = createFormatCache; // ----------------------------------------------------------------------------- @@ -8252,7 +8222,7 @@ var Grommet = //# sourceMappingURL=memoizer.js.map /***/ }, -/* 32 */ +/* 31 */ /***/ function(module, exports) { "use strict"; @@ -8299,7 +8269,7 @@ var Grommet = //# sourceMappingURL=es5.js.map /***/ }, -/* 33 */ +/* 32 */ /***/ function(module, exports) { // GENERATED FILE @@ -8309,14 +8279,14 @@ var Grommet = //# sourceMappingURL=en.js.map /***/ }, -/* 34 */ +/* 33 */ /***/ function(module, exports, __webpack_require__) { /* jshint esnext:true */ // TODO: Use `import React from "react";` when external modules are supported. "use strict"; - var src$react$$ = __webpack_require__(11), src$mixin$$ = __webpack_require__(12); + var src$react$$ = __webpack_require__(10), src$mixin$$ = __webpack_require__(11); var FormattedDate = src$react$$["default"].createClass({ displayName: 'FormattedDate', @@ -8351,14 +8321,14 @@ var Grommet = //# sourceMappingURL=date.js.map /***/ }, -/* 35 */ +/* 34 */ /***/ function(module, exports, __webpack_require__) { /* jshint esnext:true */ // TODO: Use `import React from "react";` when external modules are supported. "use strict"; - var src$react$$ = __webpack_require__(11), src$mixin$$ = __webpack_require__(12); + var src$react$$ = __webpack_require__(10), src$mixin$$ = __webpack_require__(11); var FormattedRelative = src$react$$["default"].createClass({ displayName: 'FormattedRelative', @@ -8396,14 +8366,14 @@ var Grommet = //# sourceMappingURL=relative.js.map /***/ }, -/* 36 */ +/* 35 */ /***/ function(module, exports, __webpack_require__) { /* jshint esnext:true */ // TODO: Use `import React from "react";` when external modules are supported. "use strict"; - var src$react$$ = __webpack_require__(11), src$mixin$$ = __webpack_require__(12); + var src$react$$ = __webpack_require__(10), src$mixin$$ = __webpack_require__(11); var FormattedNumber = src$react$$["default"].createClass({ displayName: 'FormattedNumber', @@ -8439,14 +8409,14 @@ var Grommet = //# sourceMappingURL=number.js.map /***/ }, -/* 37 */ +/* 36 */ /***/ function(module, exports, __webpack_require__) { /* jshint esnext:true */ // TODO: Use `import React from "react";` when external modules are supported. "use strict"; - var src$react$$ = __webpack_require__(11), src$mixin$$ = __webpack_require__(12); + var src$react$$ = __webpack_require__(10), src$mixin$$ = __webpack_require__(11); var FormattedMessage = src$react$$["default"].createClass({ displayName: 'FormattedMessage', @@ -8527,14 +8497,14 @@ var Grommet = //# sourceMappingURL=message.js.map /***/ }, -/* 38 */ +/* 37 */ /***/ function(module, exports, __webpack_require__) { /* jshint esnext:true */ // TODO: Use `import React from "react";` when external modules are supported. "use strict"; - var src$react$$ = __webpack_require__(11), src$escape$$ = __webpack_require__(39), src$mixin$$ = __webpack_require__(12); + var src$react$$ = __webpack_require__(10), src$escape$$ = __webpack_require__(38), src$mixin$$ = __webpack_require__(11); var FormattedHTMLMessage = src$react$$["default"].createClass({ displayName: 'FormattedHTMLMessage', @@ -8593,7 +8563,7 @@ var Grommet = //# sourceMappingURL=html-message.js.map /***/ }, -/* 39 */ +/* 38 */ /***/ function(module, exports) { /* jshint esnext:true */ @@ -8628,20 +8598,20 @@ var Grommet = //# sourceMappingURL=escape.js.map /***/ }, -/* 40 */ +/* 39 */ /***/ function(module, exports) { /* (ignored) */ /***/ }, -/* 41 */ +/* 40 */ /***/ function(module, exports, __webpack_require__) { var map = { - "./en-US": 42, - "./en-US.js": 42, - "./pt-BR": 43, - "./pt-BR.js": 43 + "./en-US": 41, + "./en-US.js": 41, + "./pt-BR": 42, + "./pt-BR.js": 42 }; function webpackContext(req) { return __webpack_require__(webpackContextResolve(req)); @@ -8654,15 +8624,17 @@ var Grommet = }; webpackContext.resolve = webpackContextResolve; module.exports = webpackContext; - webpackContext.id = 41; + webpackContext.id = 40; /***/ }, -/* 42 */ +/* 41 */ /***/ function(module, exports) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + module.exports = { IndexFilters: { filters: '{quantity, plural,\n =0 {Filters}\n =1 {one filter}\n other {# filters}\n}' @@ -8700,13 +8672,14 @@ var Grommet = Warning: 'Warning' }; - /***/ }, -/* 43 */ +/* 42 */ /***/ function(module, exports) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + module.exports = { IndexFilters: { filters: '{quantity, plural,\n =0 {Filtros}\n =1 {um filtro}\n other {# filtros}\n}' @@ -8744,152 +8717,2383 @@ var Grommet = Warning: 'Alerta' }; - /***/ }, -/* 44 */ +/* 43 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; - var React = __webpack_require__(2); + var merge = __webpack_require__(44); + var Cookies = __webpack_require__(77); + var fallbackLocale = 'en-US'; - var CLASS_ROOT = "button"; + function normalizeLocale(locale) { + var locales = locale.replace(/_/g, '-').split('-'); + var normalizedLocale = locales[0]; + if (locales.length > 1) { + normalizedLocale += '-' + locales[1].toUpperCase(); + } - var Button = React.createClass({displayName: "Button", + return normalizedLocale; + } - propTypes: { - alternate: React.PropTypes.bool, - label: React.PropTypes.string.isRequired, - large: React.PropTypes.bool, - onClick: React.PropTypes.func, - primary: React.PropTypes.bool, - small: React.PropTypes.bool, - strong: React.PropTypes.bool + module.exports = { + getCurrentLocale: function getCurrentLocale() { + var cookieLanguages = Cookies.get('languages'); + var locale = cookieLanguages ? JSON.parse(cookieLanguages)[0] : undefined; + if (!locale) { + locale = window.navigator.languages ? window.navigator.languages[0] : window.navigator.language || window.navigator.userLanguage; + } + + return normalizeLocale(locale || fallbackLocale); }, - render: function () { - var classes = [CLASS_ROOT]; - if (this.props.primary) { - classes.push(CLASS_ROOT + "--primary"); - } - if (this.props.alternate) { - classes.push(CLASS_ROOT + "--alternate"); - } - if (this.props.large) { - classes.push(CLASS_ROOT + "--large"); - } - if (this.props.small) { - classes.push(CLASS_ROOT + "--small"); - } - if (this.props.strong) { - classes.push(CLASS_ROOT + "--strong"); - } - if (! this.props.onClick) { - classes.push(CLASS_ROOT + "--disabled"); - } - if (this.props.className) { - classes.push(this.props.className); + getLocaleData: function getLocaleData(appLocale) { + var locale = this.getCurrentLocale(); + var grommetMessages; + try { + grommetMessages = __webpack_require__(40)("./" + locale); + } catch (e) { + console.warn(locale + ' not supported, fallback to English has been applied.'); + locale = fallbackLocale; + grommetMessages = __webpack_require__(41); } - return ( - React.createElement("button", {className: classes.join(' '), - onClick: this.props.onClick}, - this.props.label - ) - ); - } - }); - - module.exports = Button; + var messages = merge(grommetMessages, appLocale || {}); + return { + locale: locale, + messages: messages + }; + } + }; /***/ }, -/* 45 */ +/* 44 */ /***/ function(module, exports, __webpack_require__) { - // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + var baseMerge = __webpack_require__(45), + createAssigner = __webpack_require__(72); - var React = __webpack_require__(2); + /** + * Recursively merges own enumerable properties of the source object(s), that + * don't resolve to `undefined` into the destination object. Subsequent sources + * overwrite property assignments of previous sources. If `customizer` is + * provided it is invoked to produce the merged values of the destination and + * source properties. If `customizer` returns `undefined` merging is handled + * by the method instead. The `customizer` is bound to `thisArg` and invoked + * with five arguments: (objectValue, sourceValue, key, object, source). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {Object} Returns `object`. + * @example + * + * var users = { + * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }] + * }; + * + * var ages = { + * 'data': [{ 'age': 36 }, { 'age': 40 }] + * }; + * + * _.merge(users, ages); + * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] } + * + * // using a customizer callback + * var object = { + * 'fruits': ['apple'], + * 'vegetables': ['beet'] + * }; + * + * var other = { + * 'fruits': ['banana'], + * 'vegetables': ['carrot'] + * }; + * + * _.merge(object, other, function(a, b) { + * if (_.isArray(a)) { + * return a.concat(b); + * } + * }); + * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] } + */ + var merge = createAssigner(baseMerge); - var CLASS_ROOT = "check-box"; + module.exports = merge; - var CheckBox = React.createClass({displayName: "CheckBox", - propTypes: { - checked: React.PropTypes.bool, - defaultChecked: React.PropTypes.bool, - id: React.PropTypes.string.isRequired, - label: React.PropTypes.string.isRequired, - name: React.PropTypes.string, - onChange: React.PropTypes.func, - toggle: React.PropTypes.bool - }, +/***/ }, +/* 45 */ +/***/ function(module, exports, __webpack_require__) { - render: function () { - var classes = [CLASS_ROOT]; - if (this.props.toggle) { - classes.push(CLASS_ROOT + "--toggle"); + var arrayEach = __webpack_require__(47), + baseMergeDeep = __webpack_require__(48), + isArray = __webpack_require__(56), + isArrayLike = __webpack_require__(51), + isObject = __webpack_require__(46), + isObjectLike = __webpack_require__(55), + isTypedArray = __webpack_require__(67), + keys = __webpack_require__(70); + + /** + * The base implementation of `_.merge` without support for argument juggling, + * multiple sources, and `this` binding `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} [customizer] The function to customize merged values. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates values with source counterparts. + * @returns {Object} Returns `object`. + */ + function baseMerge(object, source, customizer, stackA, stackB) { + if (!isObject(object)) { + return object; + } + var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)), + props = isSrcArr ? undefined : keys(source); + + arrayEach(props || source, function(srcValue, key) { + if (props) { + key = srcValue; + srcValue = source[key]; } - if (this.props.className) { - classes.push(this.props.className); + if (isObjectLike(srcValue)) { + stackA || (stackA = []); + stackB || (stackB = []); + baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB); } - return ( - React.createElement("label", {className: classes.join(' ')}, - React.createElement("input", {className: CLASS_ROOT + "__input", - id: this.props.id, name: this.props.name, type: "checkbox", - checked: this.props.checked, - defaultChecked: this.props.defaultChecked, - onChange: this.props.onChange}), - React.createElement("span", {className: CLASS_ROOT + "__control"}), - React.createElement("span", {className: CLASS_ROOT + "__label"}, - this.props.label - ) - ) - ); - } + else { + var value = object[key], + result = customizer ? customizer(value, srcValue, key, object, source) : undefined, + isCommon = result === undefined; - }); + if (isCommon) { + result = srcValue; + } + if ((result !== undefined || (isSrcArr && !(key in object))) && + (isCommon || (result === result ? (result !== value) : (value === value)))) { + object[key] = result; + } + } + }); + return object; + } - module.exports = CheckBox; + module.exports = baseMerge; /***/ }, /* 46 */ -/***/ function(module, exports, __webpack_require__) { - - // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. - - var React = __webpack_require__(2); +/***/ function(module, exports) { - var CLASS_ROOT = "document"; + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + module.exports = isObject; + + +/***/ }, +/* 47 */ +/***/ function(module, exports) { + + /** + * A specialized version of `_.forEach` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + module.exports = arrayEach; + + +/***/ }, +/* 48 */ +/***/ function(module, exports, __webpack_require__) { + + var arrayCopy = __webpack_require__(49), + isArguments = __webpack_require__(50), + isArray = __webpack_require__(56), + isArrayLike = __webpack_require__(51), + isPlainObject = __webpack_require__(60), + isTypedArray = __webpack_require__(67), + toPlainObject = __webpack_require__(68); + + /** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize merged values. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates values with source counterparts. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) { + var length = stackA.length, + srcValue = source[key]; + + while (length--) { + if (stackA[length] == srcValue) { + object[key] = stackB[length]; + return; + } + } + var value = object[key], + result = customizer ? customizer(value, srcValue, key, object, source) : undefined, + isCommon = result === undefined; + + if (isCommon) { + result = srcValue; + if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) { + result = isArray(value) + ? value + : (isArrayLike(value) ? arrayCopy(value) : []); + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + result = isArguments(value) + ? toPlainObject(value) + : (isPlainObject(value) ? value : {}); + } + else { + isCommon = false; + } + } + // Add the source value to the stack of traversed objects and associate + // it with its merged value. + stackA.push(srcValue); + stackB.push(result); + + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB); + } else if (result === result ? (result !== value) : (value === value)) { + object[key] = result; + } + } + + module.exports = baseMergeDeep; + + +/***/ }, +/* 49 */ +/***/ function(module, exports) { + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function arrayCopy(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + module.exports = arrayCopy; + + +/***/ }, +/* 50 */ +/***/ function(module, exports, __webpack_require__) { + + var isArrayLike = __webpack_require__(51), + isObjectLike = __webpack_require__(55); + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Native method references. */ + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + + /** + * Checks if `value` is classified as an `arguments` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + return isObjectLike(value) && isArrayLike(value) && + hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); + } + + module.exports = isArguments; + + +/***/ }, +/* 51 */ +/***/ function(module, exports, __webpack_require__) { + + var getLength = __webpack_require__(52), + isLength = __webpack_require__(54); + + /** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ + function isArrayLike(value) { + return value != null && isLength(getLength(value)); + } + + module.exports = isArrayLike; + + +/***/ }, +/* 52 */ +/***/ function(module, exports, __webpack_require__) { + + var baseProperty = __webpack_require__(53); + + /** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ + var getLength = baseProperty('length'); + + module.exports = getLength; + + +/***/ }, +/* 53 */ +/***/ function(module, exports) { + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + module.exports = baseProperty; + + +/***/ }, +/* 54 */ +/***/ function(module, exports) { + + /** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + module.exports = isLength; + + +/***/ }, +/* 55 */ +/***/ function(module, exports) { + + /** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + module.exports = isObjectLike; + + +/***/ }, +/* 56 */ +/***/ function(module, exports, __webpack_require__) { + + var getNative = __webpack_require__(57), + isLength = __webpack_require__(54), + isObjectLike = __webpack_require__(55); + + /** `Object#toString` result references. */ + var arrayTag = '[object Array]'; + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objToString = objectProto.toString; + + /* Native method references for those with the same name as other `lodash` methods. */ + var nativeIsArray = getNative(Array, 'isArray'); + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(function() { return arguments; }()); + * // => false + */ + var isArray = nativeIsArray || function(value) { + return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; + }; + + module.exports = isArray; + + +/***/ }, +/* 57 */ +/***/ function(module, exports, __webpack_require__) { + + var isNative = __webpack_require__(58); + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; + } + + module.exports = getNative; + + +/***/ }, +/* 58 */ +/***/ function(module, exports, __webpack_require__) { + + var isFunction = __webpack_require__(59), + isObjectLike = __webpack_require__(55); + + /** Used to detect host constructors (Safari > 5). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var fnToString = Function.prototype.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(fnToString.call(value)); + } + return isObjectLike(value) && reIsHostCtor.test(value); + } + + module.exports = isNative; + + +/***/ }, +/* 59 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(46); + + /** `Object#toString` result references. */ + var funcTag = '[object Function]'; + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objToString = objectProto.toString; + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 equivalents which return 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; + } + + module.exports = isFunction; + + +/***/ }, +/* 60 */ +/***/ function(module, exports, __webpack_require__) { + + var baseForIn = __webpack_require__(61), + isArguments = __webpack_require__(50), + isObjectLike = __webpack_require__(55); + + /** `Object#toString` result references. */ + var objectTag = '[object Object]'; + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objToString = objectProto.toString; + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * **Note:** This method assumes objects created by the `Object` constructor + * have no inherited enumerable properties. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + var Ctor; + + // Exit early for non `Object` objects. + if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isArguments(value)) || + (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) { + return false; + } + // IE < 9 iterates inherited properties before own properties. If the first + // iterated property is an object's own property then there are no inherited + // enumerable properties. + var result; + // In most environments an object's own properties are iterated before + // its inherited properties. If the last iterated property is an object's + // own property then there are no inherited enumerable properties. + baseForIn(value, function(subValue, key) { + result = key; + }); + return result === undefined || hasOwnProperty.call(value, result); + } + + module.exports = isPlainObject; + + +/***/ }, +/* 61 */ +/***/ function(module, exports, __webpack_require__) { + + var baseFor = __webpack_require__(62), + keysIn = __webpack_require__(65); + + /** + * The base implementation of `_.forIn` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForIn(object, iteratee) { + return baseFor(object, iteratee, keysIn); + } + + module.exports = baseForIn; + + +/***/ }, +/* 62 */ +/***/ function(module, exports, __webpack_require__) { + + var createBaseFor = __webpack_require__(63); + + /** + * The base implementation of `baseForIn` and `baseForOwn` which iterates + * over `object` properties returned by `keysFunc` invoking `iteratee` for + * each property. Iteratee functions may exit iteration early by explicitly + * returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + module.exports = baseFor; + + +/***/ }, +/* 63 */ +/***/ function(module, exports, __webpack_require__) { + + var toObject = __webpack_require__(64); + + /** + * Creates a base function for `_.forIn` or `_.forInRight`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var iterable = toObject(object), + props = keysFunc(object), + length = props.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length)) { + var key = props[index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + module.exports = createBaseFor; + + +/***/ }, +/* 64 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(46); + + /** + * Converts `value` to an object if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Object} Returns the object. + */ + function toObject(value) { + return isObject(value) ? value : Object(value); + } + + module.exports = toObject; + + +/***/ }, +/* 65 */ +/***/ function(module, exports, __webpack_require__) { + + var isArguments = __webpack_require__(50), + isArray = __webpack_require__(56), + isIndex = __webpack_require__(66), + isLength = __webpack_require__(54), + isObject = __webpack_require__(46); + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + if (object == null) { + return []; + } + if (!isObject(object)) { + object = Object(object); + } + var length = object.length; + length = (length && isLength(length) && + (isArray(object) || isArguments(object)) && length) || 0; + + var Ctor = object.constructor, + index = -1, + isProto = typeof Ctor == 'function' && Ctor.prototype === object, + result = Array(length), + skipIndexes = length > 0; + + while (++index < length) { + result[index] = (index + ''); + } + for (var key in object) { + if (!(skipIndexes && isIndex(key, length)) && + !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + module.exports = keysIn; + + +/***/ }, +/* 66 */ +/***/ function(module, exports) { + + /** Used to detect unsigned integer values. */ + var reIsUint = /^\d+$/; + + /** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; + } + + module.exports = isIndex; + + +/***/ }, +/* 67 */ +/***/ function(module, exports, __webpack_require__) { + + var isLength = __webpack_require__(54), + isObjectLike = __webpack_require__(55); + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + + var arrayBufferTag = '[object ArrayBuffer]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = + typedArrayTags[dateTag] = typedArrayTags[errorTag] = + typedArrayTags[funcTag] = typedArrayTags[mapTag] = + typedArrayTags[numberTag] = typedArrayTags[objectTag] = + typedArrayTags[regexpTag] = typedArrayTags[setTag] = + typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objToString = objectProto.toString; + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + function isTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)]; + } + + module.exports = isTypedArray; + + +/***/ }, +/* 68 */ +/***/ function(module, exports, __webpack_require__) { + + var baseCopy = __webpack_require__(69), + keysIn = __webpack_require__(65); + + /** + * Converts `value` to a plain object flattening inherited enumerable + * properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ + function toPlainObject(value) { + return baseCopy(value, keysIn(value)); + } + + module.exports = toPlainObject; + + +/***/ }, +/* 69 */ +/***/ function(module, exports) { + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property names to copy. + * @param {Object} [object={}] The object to copy properties to. + * @returns {Object} Returns `object`. + */ + function baseCopy(source, props, object) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + object[key] = source[key]; + } + return object; + } + + module.exports = baseCopy; + + +/***/ }, +/* 70 */ +/***/ function(module, exports, __webpack_require__) { + + var getNative = __webpack_require__(57), + isArrayLike = __webpack_require__(51), + isObject = __webpack_require__(46), + shimKeys = __webpack_require__(71); + + /* Native method references for those with the same name as other `lodash` methods. */ + var nativeKeys = getNative(Object, 'keys'); + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * for more details. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + var keys = !nativeKeys ? shimKeys : function(object) { + var Ctor = object == null ? undefined : object.constructor; + if ((typeof Ctor == 'function' && Ctor.prototype === object) || + (typeof object != 'function' && isArrayLike(object))) { + return shimKeys(object); + } + return isObject(object) ? nativeKeys(object) : []; + }; + + module.exports = keys; + + +/***/ }, +/* 71 */ +/***/ function(module, exports, __webpack_require__) { + + var isArguments = __webpack_require__(50), + isArray = __webpack_require__(56), + isIndex = __webpack_require__(66), + isLength = __webpack_require__(54), + keysIn = __webpack_require__(65); + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * A fallback implementation of `Object.keys` which creates an array of the + * own enumerable property names of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function shimKeys(object) { + var props = keysIn(object), + propsLength = props.length, + length = propsLength && object.length; + + var allowIndexes = !!length && isLength(length) && + (isArray(object) || isArguments(object)); + + var index = -1, + result = []; + + while (++index < propsLength) { + var key = props[index]; + if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { + result.push(key); + } + } + return result; + } + + module.exports = shimKeys; + + +/***/ }, +/* 72 */ +/***/ function(module, exports, __webpack_require__) { + + var bindCallback = __webpack_require__(73), + isIterateeCall = __webpack_require__(75), + restParam = __webpack_require__(76); + + /** + * Creates a `_.assign`, `_.defaults`, or `_.merge` function. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return restParam(function(object, sources) { + var index = -1, + length = object == null ? 0 : sources.length, + customizer = length > 2 ? sources[length - 2] : undefined, + guard = length > 2 ? sources[2] : undefined, + thisArg = length > 1 ? sources[length - 1] : undefined; + + if (typeof customizer == 'function') { + customizer = bindCallback(customizer, thisArg, 5); + length -= 2; + } else { + customizer = typeof thisArg == 'function' ? thisArg : undefined; + length -= (customizer ? 1 : 0); + } + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, customizer); + } + } + return object; + }); + } + + module.exports = createAssigner; + + +/***/ }, +/* 73 */ +/***/ function(module, exports, __webpack_require__) { + + var identity = __webpack_require__(74); + + /** + * A specialized version of `baseCallback` which only supports `this` binding + * and specifying the number of arguments to provide to `func`. + * + * @private + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {number} [argCount] The number of arguments to provide to `func`. + * @returns {Function} Returns the callback. + */ + function bindCallback(func, thisArg, argCount) { + if (typeof func != 'function') { + return identity; + } + if (thisArg === undefined) { + return func; + } + switch (argCount) { + case 1: return function(value) { + return func.call(thisArg, value); + }; + case 3: return function(value, index, collection) { + return func.call(thisArg, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(thisArg, accumulator, value, index, collection); + }; + case 5: return function(value, other, key, object, source) { + return func.call(thisArg, value, other, key, object, source); + }; + } + return function() { + return func.apply(thisArg, arguments); + }; + } + + module.exports = bindCallback; + + +/***/ }, +/* 74 */ +/***/ function(module, exports) { + + /** + * This method returns the first argument provided to it. + * + * @static + * @memberOf _ + * @category Utility + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'user': 'fred' }; + * + * _.identity(object) === object; + * // => true + */ + function identity(value) { + return value; + } + + module.exports = identity; + + +/***/ }, +/* 75 */ +/***/ function(module, exports, __webpack_require__) { + + var isArrayLike = __webpack_require__(51), + isIndex = __webpack_require__(66), + isObject = __webpack_require__(46); + + /** + * Checks if the provided arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object)) { + var other = object[index]; + return value === value ? (value === other) : (other !== other); + } + return false; + } + + module.exports = isIterateeCall; + + +/***/ }, +/* 76 */ +/***/ function(module, exports) { + + /** Used as the `TypeError` message for "Functions" methods. */ + var FUNC_ERROR_TEXT = 'Expected a function'; + + /* Native method references for those with the same name as other `lodash` methods. */ + var nativeMax = Math.max; + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as an array. + * + * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.restParam(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function restParam(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + rest = Array(length); + + while (++index < length) { + rest[index] = args[start + index]; + } + switch (start) { + case 0: return func.call(this, rest); + case 1: return func.call(this, args[0], rest); + case 2: return func.call(this, args[0], args[1], rest); + } + var otherArgs = Array(start + 1); + index = -1; + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = rest; + return func.apply(this, otherArgs); + }; + } + + module.exports = restParam; + + +/***/ }, +/* 77 */ +/***/ function(module, exports) { + + // (C) Copyright 2015 Hewlett-Packard Development Company, L.P. + + // Slightly modified version of the Mozilla Developer Network version. + // renamed the module and the functions. + + /*\ + |*| + |*| :: cookies.js :: + |*| + |*| A complete cookies reader/writer framework with full unicode support. + |*| + |*| Revision #1 - September 4, 2014 + |*| + |*| https://developer.mozilla.org/en-US/docs/Web/API/document.cookie + |*| https://developer.mozilla.org/User:fusionchess + |*| + |*| This framework is released under the GNU Public License, version 3 or later. + |*| http://www.gnu.org/licenses/gpl-3.0-standalone.html + |*| + |*| Syntaxes: + |*| + |*| * Cookies.set(name, value[, end[, path[, domain[, secure]]]]) + |*| * Cookies.get(name) + |*| * Cookies.remove(name[, path[, domain]]) + |*| * Cookies.has(name) + |*| * Cookies.keys() + |*| + \*/ + + "use strict"; + + var Cookies = { + get: function get(sKey) { + if (!sKey) { + return null; + } + return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*" + encodeURIComponent(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=\\s*([^;]*).*$)|^.*$"), "$1")) || null; + }, + set: function set(sKey, sValue, vEnd, sPath, sDomain, bSecure) { + if (!sKey || /^(?:expires|max\-age|path|domain|secure)$/i.test(sKey)) { + return false; + } + var sExpires = ""; + if (vEnd) { + switch (vEnd.constructor) { + case Number: + sExpires = vEnd === Infinity ? "; expires=Fri, 31 Dec 9999 23:59:59 GMT" : "; max-age=" + vEnd; + break; + case String: + sExpires = "; expires=" + vEnd; + break; + case Date: + sExpires = "; expires=" + vEnd.toUTCString(); + break; + } + } + document.cookie = encodeURIComponent(sKey) + "=" + encodeURIComponent(sValue) + sExpires + (sDomain ? "; domain=" + sDomain : "") + (sPath ? "; path=" + sPath : "") + (bSecure ? "; secure" : ""); + return true; + }, + remove: function remove(sKey, sPath, sDomain) { + if (!this.has(sKey)) { + return false; + } + document.cookie = encodeURIComponent(sKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT" + (sDomain ? "; domain=" + sDomain : "") + (sPath ? "; path=" + sPath : ""); + return true; + }, + has: function has(sKey) { + if (!sKey) { + return false; + } + return new RegExp("(?:^|;\\s*)" + encodeURIComponent(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=").test(document.cookie); + }, + keys: function keys() { + var aKeys = document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g, "").split(/\s*(?:\=[^;]*)?;\s*/); + for (var nLen = aKeys.length, nIdx = 0; nIdx < nLen; nIdx++) { + aKeys[nIdx] = decodeURIComponent(aKeys[nIdx]); + } + return aKeys; + } + }; + + module.exports = Cookies; + +/***/ }, +/* 78 */ +/***/ function(module, exports, __webpack_require__) { + + // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + + 'use strict'; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + var React = __webpack_require__(2); + var merge = __webpack_require__(44); + var pick = __webpack_require__(79); + var keys = __webpack_require__(70); + var Box = __webpack_require__(84); + var KeyboardAccelerators = __webpack_require__(85); + var DOM = __webpack_require__(86); + + var CLASS_ROOT = 'article'; + var SCROLL_STEPS = 25; + + var Article = React.createClass({ + displayName: 'Article', + + propTypes: merge({ + scrollStep: React.PropTypes.bool + }, Box.propTypes), + + mixins: [KeyboardAccelerators], + + getDefaultProps: function getDefaultProps() { + return { + pad: 'none', + direction: 'column' + }; + }, + + _easeInOutQuad: function _easeInOutQuad(t) { + return t < .5 ? 2 * t * t : -1 + (4 - 2 * t) * t; + }, + + _scrollTo: function _scrollTo(delta) { + clearInterval(this._scrollToTimer); + var start = this._scrollParent.scrollTop; + var position = start + delta; + var step = 1; + this._scrollToTimer = setInterval((function () { + var next; + var easing = this._easeInOutQuad(step / SCROLL_STEPS); + if (position > start) { + next = Math.min(position, Math.max(this._scrollParent.scrollTop, Math.round(start + (position - start) * easing))); + } else { + next = Math.max(position, Math.min(this._scrollParent.scrollTop, Math.round(start - (start - position) * easing))); + } + this._scrollParent.scrollTop = next; + step += 1; + if (step > SCROLL_STEPS) { + // we're done + clearInterval(this._scrollToTimer); + } + }).bind(this), 8); + }, + + _markInactive: function _markInactive() { + var articleElement = this.refs.component.getDOMNode(); + var sections = articleElement.querySelectorAll('.section.box--full'); + for (var i = 0; i < sections.length; i += 1) { + var section = sections[i]; + var rect = section.getBoundingClientRect(); + if (rect.top > window.innerHeight - 10) { + section.classList.add('section--inactive'); + } else { + section.classList.remove('section--inactive'); + } + } + }, + + _onScroll: function _onScroll(event) { + clearTimeout(this._scrollTimer); + this._scrollTimer = setTimeout(this._markInactive, 50); + }, + + _onWheel: function _onWheel(event) { + if (Math.abs(event.deltaY) > 100) { + clearInterval(this._scrollTimer); + } else if (event.deltaY > 5) { + this._onDown(); + } else if (event.deltaY < -5) { + this._onUp(); + } + }, + + _onDown: function _onDown(event) { + if (event) { + event.preventDefault(); + } + var articleElement = this.refs.component.getDOMNode(); + var sections = articleElement.querySelectorAll('.section.box--full'); + for (var i = 0; i < sections.length; i += 1) { + var section = sections[i]; + var rect = section.getBoundingClientRect(); + // 10 is for fuzziness + if (rect.bottom > 10 && (event || rect.bottom < window.innerHeight)) { + this._scrollTo(rect.bottom); + break; + } + } + }, + + _onUp: function _onUp(event) { + if (event) { + event.preventDefault(); + } + var articleElement = this.refs.component.getDOMNode(); + var sections = articleElement.querySelectorAll('.section.box--full'); + for (var i = 0; i < sections.length; i += 1) { + var section = sections[i]; + var rect = section.getBoundingClientRect(); + // -10 is for fuzziness + if ((rect.top >= -10 || i === sections.length - 1) && (event || rect.top < window.innerHeight)) { + if (i > 0) { + section = sections[i - 1]; + rect = section.getBoundingClientRect(); + this._scrollTo(rect.top); + } + break; + } + } + }, + + getInitialState: function getInitialState() { + return { scrollTop: 0 }; + }, + + componentDidMount: function componentDidMount() { + if (this.props.scrollStep) { + this._markInactive(); + var articleElement = this.refs.component.getDOMNode(); + this._scrollParent = DOM.findScrollParents(articleElement)[0]; + document.addEventListener('wheel', this._onWheel); + this._scrollParent.addEventListener('scroll', this._onScroll); + this.startListeningToKeyboard({ + up: this._onUp, + down: this._onDown + }); + } + }, + + componentWillUnmount: function componentWillUnmount() { + if (this.props.scrollStep) { + document.removeEventListener('wheel', this._onWheel); + clearInterval(this._scrollToTimer); + this._scrollParent.removeEventListener('scroll', this._onScroll); + clearTimeout(this._scrollTimer); + this.stopListeningToKeyboard({ + up: this._onUp, + down: this._onDown + }); + } + }, + + render: function render() { + var classes = [CLASS_ROOT]; + var other = pick(this.props, keys(Box.propTypes)); + if (this.props.scrollStep) { + classes.push(CLASS_ROOT + '--scroll-step'); + } + + return React.createElement( + Box, + _extends({ ref: 'component', tag: 'article' }, other, { className: classes.join(' ') }), + this.props.children + ); + } + }); + + module.exports = Article; + +/***/ }, +/* 79 */ +/***/ function(module, exports, __webpack_require__) { + + var baseFlatten = __webpack_require__(80), + bindCallback = __webpack_require__(73), + pickByArray = __webpack_require__(82), + pickByCallback = __webpack_require__(83), + restParam = __webpack_require__(76); + + /** + * Creates an object composed of the picked `object` properties. Property + * names may be specified as individual arguments or as arrays of property + * names. If `predicate` is provided it is invoked for each property of `object` + * picking the properties `predicate` returns truthy for. The predicate is + * bound to `thisArg` and invoked with three arguments: (value, key, object). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {Function|...(string|string[])} [predicate] The function invoked per + * iteration or property names to pick, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'user': 'fred', 'age': 40 }; + * + * _.pick(object, 'user'); + * // => { 'user': 'fred' } + * + * _.pick(object, _.isString); + * // => { 'user': 'fred' } + */ + var pick = restParam(function(object, props) { + if (object == null) { + return {}; + } + return typeof props[0] == 'function' + ? pickByCallback(object, bindCallback(props[0], props[1], 3)) + : pickByArray(object, baseFlatten(props)); + }); + + module.exports = pick; + + +/***/ }, +/* 80 */ +/***/ function(module, exports, __webpack_require__) { + + var arrayPush = __webpack_require__(81), + isArguments = __webpack_require__(50), + isArray = __webpack_require__(56), + isArrayLike = __webpack_require__(51), + isObjectLike = __webpack_require__(55); + + /** + * The base implementation of `_.flatten` with added support for restricting + * flattening and specifying the start index. + * + * @private + * @param {Array} array The array to flatten. + * @param {boolean} [isDeep] Specify a deep flatten. + * @param {boolean} [isStrict] Restrict flattening to arrays-like objects. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, isDeep, isStrict, result) { + result || (result = []); + + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index]; + if (isObjectLike(value) && isArrayLike(value) && + (isStrict || isArray(value) || isArguments(value))) { + if (isDeep) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, isDeep, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + module.exports = baseFlatten; + + +/***/ }, +/* 81 */ +/***/ function(module, exports) { + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + module.exports = arrayPush; + + +/***/ }, +/* 82 */ +/***/ function(module, exports, __webpack_require__) { + + var toObject = __webpack_require__(64); + + /** + * A specialized version of `_.pick` which picks `object` properties specified + * by `props`. + * + * @private + * @param {Object} object The source object. + * @param {string[]} props The property names to pick. + * @returns {Object} Returns the new object. + */ + function pickByArray(object, props) { + object = toObject(object); + + var index = -1, + length = props.length, + result = {}; + + while (++index < length) { + var key = props[index]; + if (key in object) { + result[key] = object[key]; + } + } + return result; + } + + module.exports = pickByArray; + + +/***/ }, +/* 83 */ +/***/ function(module, exports, __webpack_require__) { + + var baseForIn = __webpack_require__(61); + + /** + * A specialized version of `_.pick` which picks `object` properties `predicate` + * returns truthy for. + * + * @private + * @param {Object} object The source object. + * @param {Function} predicate The function invoked per iteration. + * @returns {Object} Returns the new object. + */ + function pickByCallback(object, predicate) { + var result = {}; + baseForIn(object, function(value, key, object) { + if (predicate(value, key, object)) { + result[key] = value; + } + }); + return result; + } + + module.exports = pickByCallback; + + +/***/ }, +/* 84 */ +/***/ function(module, exports, __webpack_require__) { + + // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + + 'use strict'; + + var React = __webpack_require__(2); + var keys = __webpack_require__(70); + + var CLASS_ROOT = 'box'; + + var Box = React.createClass({ + displayName: 'Box', + + propTypes: { + align: React.PropTypes.oneOf(['start', 'center', 'between', 'end', 'stretch']), + appCentered: React.PropTypes.bool, + colorIndex: React.PropTypes.string, + containerClassName: React.PropTypes.string, + direction: React.PropTypes.oneOf(['row', 'column']), + full: React.PropTypes.oneOf([true, 'horizontal', 'vertical', false]), + onClick: React.PropTypes.func, + justify: React.PropTypes.oneOf(['start', 'center', 'between', 'end']), + pad: React.PropTypes.oneOfType([React.PropTypes.oneOf(['none', 'small', 'medium', 'large']), React.PropTypes.shape({ + horizontal: React.PropTypes.oneOf(['none', 'small', 'medium', 'large']), + vertical: React.PropTypes.oneOf(['none', 'small', 'medium', 'large']) + })]), + reverse: React.PropTypes.bool, + responsive: React.PropTypes.bool, + tag: React.PropTypes.string, + texture: React.PropTypes.string + }, + + getDefaultProps: function getDefaultProps() { + return { + direction: 'column', + pad: 'none', + tag: 'div', + responsive: true + }; + }, + + _addPropertyClass: function _addPropertyClass(classes, prefix, property) { + var choice = this.props[property]; + if (choice) { + if (typeof choice === 'string') { + classes.push(prefix + '--' + property + '-' + choice); + } else if (typeof choice === 'object') { + keys(choice).forEach(function (key) { + classes.push(prefix + '--' + property + '-' + key + '-' + choice[key]); + }); + } else { + classes.push(prefix + '--' + property); + } + } + }, + + render: function render() { + var classes = [CLASS_ROOT]; + var containerClasses = [CLASS_ROOT + '__container']; + this._addPropertyClass(classes, CLASS_ROOT, 'flush'); + this._addPropertyClass(classes, CLASS_ROOT, 'full'); + this._addPropertyClass(classes, CLASS_ROOT, 'direction'); + this._addPropertyClass(classes, CLASS_ROOT, 'justify'); + this._addPropertyClass(classes, CLASS_ROOT, 'align'); + this._addPropertyClass(classes, CLASS_ROOT, 'reverse'); + this._addPropertyClass(classes, CLASS_ROOT, 'responsive'); + this._addPropertyClass(classes, CLASS_ROOT, 'pad'); + + if (this.props.appCentered) { + this._addPropertyClass(containerClasses, CLASS_ROOT + '__container', 'full'); + if (this.props.colorIndex) { + containerClasses.push('background-color-index-' + this.props.colorIndex); + } + if (this.props.containerClassName) { + containerClasses.push(this.props.containerClassName); + } + } else { + if (this.props.colorIndex) { + classes.push('background-color-index-' + this.props.colorIndex); + } + } + + if (this.props.className) { + classes.push(this.props.className); + } + + var style = {}; + if (this.props.texture) { + style.backgroundImage = this.props.texture; + } + + if (this.props.appCentered) { + return React.createElement( + 'div', + { className: containerClasses.join(' '), style: style, + onClick: this.props.onClick }, + React.createElement( + this.props.tag, + { className: classes.join(' ') }, + this.props.children + ) + ); + } else { + return React.createElement( + this.props.tag, + { className: classes.join(' '), style: style, + onClick: this.props.onClick }, + this.props.children + ); + } + } + + }); + + module.exports = Box; + +/***/ }, +/* 85 */ +/***/ function(module, exports) { + + // (C) Copyright 2014 Hewlett-Packard Development Company, L.P. + + // Allow callers to use key labels instead of key code numbers. + // This makes their code easier to read. + "use strict"; + + var KEYS = { + backspace: 8, + tab: 9, + enter: 13, + esc: 27, + escape: 27, + space: 32, + left: 37, + up: 38, + right: 39, + down: 40, + comma: 188, + shift: 16 + }; + + var downs = []; + + // KeyboardAccelerators is a mixin for handling keyboard events. + // Add listeners using startListeningToKeyboard(). + // Remove listeners using stopListeningToKeyboard(). + // When the component that includes this is unmounted, the keyboard event + // listener is removed automatically. + var KeyboardAccelerators = { + + _keyboardAcceleratorHandlers: {}, + _keyboardAcceleratorListening: false, + + _onKeyboardAcceleratorKeyPress: function _onKeyboardAcceleratorKeyPress(e) { + var key = e.keyCode ? e.keyCode : e.which; + if (this._keyboardAcceleratorHandlers.hasOwnProperty(key) && !downs[KEYS.shift]) { + this._keyboardAcceleratorHandlers[key](e); + } + downs[e.keyCode] = true; + }, + + _onKeyboardAcceleratorKeyUp: function _onKeyboardAcceleratorKeyUp(e) { + if (downs[KEYS.shift] && downs[KEYS.left] && this._keyboardAcceleratorHandlers.shiftLeft) { + this._keyboardAcceleratorHandlers.shiftLeft(e); + } else if (downs[KEYS.shift] && downs[KEYS.right] && this._keyboardAcceleratorHandlers.shiftRight) { + this._keyboardAcceleratorHandlers.shiftRight(e); + } + + downs[e.keyCode] = false; + }, + + // Add handlers for specific keys. + // This function can be called multiple times, existing handlers will + // be replaced, new handlers will be added. + startListeningToKeyboard: function startListeningToKeyboard(handlers) { + var keys = 0; + for (var key in handlers) { + if (handlers.hasOwnProperty(key)) { + var keyCode = key; + if (KEYS.hasOwnProperty(key)) { + keyCode = KEYS[key]; + } + keys += 1; + this._keyboardAcceleratorHandlers[keyCode] = handlers[key]; + } + } + + if (keys > 0 && !this._keyboardAcceleratorListening) { + window.addEventListener("keydown", this._onKeyboardAcceleratorKeyPress); + window.addEventListener("keyup", this._onKeyboardAcceleratorKeyUp); + this._keyboardAcceleratorListening = true; + } + }, + + // Remove handlers for all keys or specific keys. + // If no argument is passed in, all handlers are removed. + // This function can be called multiple times, only the handlers + // specified will be removed. + stopListeningToKeyboard: function stopListeningToKeyboard(handlers) { + if (handlers) { + for (var key in handlers) { + if (handlers.hasOwnProperty(key)) { + var keyCode = key; + if (KEYS.hasOwnProperty(key)) { + keyCode = KEYS[key]; + } + delete this._keyboardAcceleratorHandlers[keyCode]; + } + } + } + + var keyCount = 0; + for (var keyHandler in this._keyboardAcceleratorHandlers) { + if (this._keyboardAcceleratorHandlers.hasOwnProperty(keyHandler)) { + keyCount += 1; + } + } + + if (!handlers || 0 === keyCount) { + window.removeEventListener("keydown", this._onKeyboardAcceleratorKeyPress); + window.removeEventListener("keyup", this._onKeyboardAcceleratorKeyUp); + this._keyboardAcceleratorHandlers = {}; + this._keyboardAcceleratorListening = false; + } + }, + + componentWillUnmount: function componentWillUnmount() { + this.stopListeningToKeyboard(); + } + }; + + module.exports = KeyboardAccelerators; + +/***/ }, +/* 86 */ +/***/ function(module, exports) { + + // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + + "use strict"; + + module.exports = { + findScrollParents: function findScrollParents(element) { + var result = []; + var parent = element.parentNode; + while (parent) { + // account for border the lazy way for now + if (parent.scrollHeight > parent.offsetHeight + 10) { + result.push(parent); + } + parent = parent.parentNode; + } + if (result.length === 0) { + result.push(document); + } + return result; + } + }; + +/***/ }, +/* 87 */ +/***/ function(module, exports, __webpack_require__) { + + // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + + "use strict"; + + var React = __webpack_require__(2); + + var CLASS_ROOT = "button"; + + var Button = React.createClass({ + displayName: "Button", + + propTypes: { + accent: React.PropTypes.bool, + label: React.PropTypes.string.isRequired, + large: React.PropTypes.bool, + onClick: React.PropTypes.func, + primary: React.PropTypes.bool + }, + + render: function render() { + var classes = [CLASS_ROOT]; + if (this.props.primary) { + classes.push(CLASS_ROOT + "--primary"); + } + if (this.props.accent) { + classes.push(CLASS_ROOT + "--accent"); + } + if (!this.props.onClick) { + classes.push(CLASS_ROOT + "--disabled"); + } + if (this.props.large) { + classes.push(CLASS_ROOT + "--large"); + } + if (this.props.className) { + classes.push(this.props.className); + } + + return React.createElement( + "button", + { className: classes.join(" "), + onClick: this.props.onClick }, + this.props.label + ); + } + + }); + + module.exports = Button; + +/***/ }, +/* 88 */ +/***/ function(module, exports, __webpack_require__) { + + // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + + "use strict"; + + var React = __webpack_require__(2); + + var CLASS_ROOT = "check-box"; + + var CheckBox = React.createClass({ + displayName: "CheckBox", + + propTypes: { + checked: React.PropTypes.bool, + defaultChecked: React.PropTypes.bool, + id: React.PropTypes.string.isRequired, + label: React.PropTypes.string.isRequired, + name: React.PropTypes.string, + onChange: React.PropTypes.func, + toggle: React.PropTypes.bool + }, + + render: function render() { + var classes = [CLASS_ROOT]; + if (this.props.toggle) { + classes.push(CLASS_ROOT + "--toggle"); + } + if (this.props.className) { + classes.push(this.props.className); + } + return React.createElement( + "label", + { className: classes.join(" ") }, + React.createElement("input", { className: CLASS_ROOT + "__input", + id: this.props.id, name: this.props.name, type: "checkbox", + checked: this.props.checked, + defaultChecked: this.props.defaultChecked, + onChange: this.props.onChange }), + React.createElement( + "span", + { className: CLASS_ROOT + "__control" }, + React.createElement( + "svg", + { className: CLASS_ROOT + "__control-check", viewBox: "0 0 24 24", + preserveAspectRatio: "xMidYMid meet" }, + React.createElement("path", { fill: "none", d: "M6,11.3 L10.3,16 L18,6.2" }) + ) + ), + React.createElement( + "span", + { className: CLASS_ROOT + "__label" }, + this.props.label + ) + ); + } + + }); + + module.exports = CheckBox; + +/***/ }, +/* 89 */ +/***/ function(module, exports, __webpack_require__) { + + // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + + 'use strict'; + + var React = __webpack_require__(2); + var KeyboardAccelerators = __webpack_require__(85); + var DOM = __webpack_require__(86); + + var CLASS_ROOT = 'document'; + var SCROLL_STEPS = 25; + + var GrommetDocument = React.createClass({ + displayName: 'GrommetDocument', + + propTypes: { + flush: React.PropTypes.bool, + full: React.PropTypes.bool + }, + + mixins: [KeyboardAccelerators], + + getDefaultProps: function getDefaultProps() { + return { + flush: true + }; + }, + + _easeInOutQuad: function _easeInOutQuad(t) { + return t < .5 ? 2 * t * t : -1 + (4 - 2 * t) * t; + }, + + _scrollTo: function _scrollTo(delta) { + clearInterval(this._scrollToTimer); + var start = this._scrollParent.scrollTop; + var position = start + delta; + var step = 1; + this._scrollToTimer = setInterval((function () { + var next; + var easing = this._easeInOutQuad(step / SCROLL_STEPS); + if (position > start) { + next = Math.min(position, Math.max(this._scrollParent.scrollTop, Math.round(start + (position - start) * easing))); + } else { + next = Math.max(position, Math.min(this._scrollParent.scrollTop, Math.round(start - (start - position) * easing))); + } + this._scrollParent.scrollTop = next; + step += 1; + if (step > SCROLL_STEPS) { + // we're done + clearInterval(this._scrollToTimer); + } + }).bind(this), 8); + }, + + _markInactive: function _markInactive() { + var doc = this.refs.document.getDOMNode(); + var sections = doc.querySelectorAll('.section--full'); + for (var i = 0; i < sections.length; i += 1) { + var section = sections[i]; + var rect = section.getBoundingClientRect(); + if (rect.top > window.innerHeight - 10) { + section.classList.add('section--inactive'); + } else { + section.classList.remove('section--inactive'); + } + } + }, + + _onScroll: function _onScroll(event) { + clearTimeout(this._scrollTimer); + this._scrollTimer = setTimeout(this._markInactive, 50); + }, - var GrommetDocument = React.createClass({displayName: "GrommetDocument", + _onWheel: function _onWheel(event) { + if (Math.abs(event.deltaY) > 100) { + clearInterval(this._scrollTimer); + } else if (event.deltaY > 5) { + this._onDown(); + } else if (event.deltaY < -5) { + this._onUp(); + } + }, - propTypes: { - colorIndex: React.PropTypes.string, - flush: React.PropTypes.bool + _onDown: function _onDown(event) { + if (event) { + event.preventDefault(); + } + var doc = this.refs.document.getDOMNode(); + var sections = doc.querySelectorAll('.section--full'); + for (var i = 0; i < sections.length; i += 1) { + var section = sections[i]; + var rect = section.getBoundingClientRect(); + if (rect.bottom > 0 && (event || rect.bottom < window.innerHeight)) { + this._scrollTo(rect.bottom); + break; + } + } }, - getDefaultProps: function () { - return { - flush: true - }; + _onUp: function _onUp(event) { + if (event) { + event.preventDefault(); + } + var doc = this.refs.document.getDOMNode(); + var sections = doc.querySelectorAll('.section--full'); + for (var i = 0; i < sections.length; i += 1) { + var section = sections[i]; + var rect = section.getBoundingClientRect(); + if ((rect.top >= 0 || i === sections.length - 1) && (event || rect.top < window.innerHeight)) { + section = sections[i - 1]; + rect = section.getBoundingClientRect(); + this._scrollTo(rect.top); + break; + } + } + }, + + getInitialState: function getInitialState() { + return { scrollTop: 0 }; + }, + + componentDidMount: function componentDidMount() { + console.warn('Warning: Grommet Document is deprecated. It has been superceded by Grommet Article.'); + if (this.props.full) { + this._markInactive(); + var doc = this.refs.document.getDOMNode(); + this._scrollParent = DOM.findScrollParents(doc)[0]; + document.addEventListener('wheel', this._onWheel); + this._scrollParent.addEventListener('scroll', this._onScroll); + this.startListeningToKeyboard({ + up: this._onUp, + down: this._onDown + }); + } + }, + + componentWillUnmount: function componentWillUnmount() { + if (this.props.full) { + document.removeEventListener('wheel', this._onWheel); + clearInterval(this._scrollToTimer); + this._scrollParent.removeEventListener('scroll', this._onScroll); + clearTimeout(this._scrollTimer); + this.stopListeningToKeyboard({ + up: this._onUp, + down: this._onDown + }); + } }, - render: function() { + render: function render() { var classes = [CLASS_ROOT]; if (this.props.flush) { - classes.push(CLASS_ROOT + "--flush"); + classes.push(CLASS_ROOT + '--flush'); } - if (this.props.colorIndex) { - classes.push("header-color-index-" + this.props.colorIndex); + if (this.props.full) { + classes.push(CLASS_ROOT + '--full'); } - return ( - React.createElement("div", {ref: "document", className: classes.join(' ')}, - React.createElement("div", {className: CLASS_ROOT + "__content"}, - this.props.children - ) + return React.createElement( + 'div', + { ref: 'document', className: classes.join(' ') }, + React.createElement( + 'div', + { className: CLASS_ROOT + '__content' }, + this.props.children ) ); } @@ -8897,72 +11101,61 @@ var Grommet = module.exports = GrommetDocument; - /***/ }, -/* 47 */ +/* 90 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var Legend = __webpack_require__(48); + var Legend = __webpack_require__(91); - var CLASS_ROOT = "donut"; + var CLASS_ROOT = 'donut'; var BASE_SIZE = 192; var PARTIAL_SIZE = 168; - function polarToCartesian (centerX, centerY, radius, angleInDegrees) { + function polarToCartesian(centerX, centerY, radius, angleInDegrees) { var angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0; return { - x: centerX + (radius * Math.cos(angleInRadians)), - y: centerY + (radius * Math.sin(angleInRadians)) + x: centerX + radius * Math.cos(angleInRadians), + y: centerY + radius * Math.sin(angleInRadians) }; } - function arcCommands (x, y, radius, startAngle, endAngle) { + function arcCommands(x, y, radius, startAngle, endAngle) { var start = polarToCartesian(x, y, radius, endAngle); var end = polarToCartesian(x, y, radius, startAngle); - var arcSweep = endAngle - startAngle <= 180 ? "0" : "1"; - var d = [ - "M", start.x, start.y, - "A", radius, radius, 0, arcSweep, 0, end.x, end.y - ].join(" "); + var arcSweep = endAngle - startAngle <= 180 ? '0' : '1'; + var d = ['M', start.x, start.y, 'A', radius, radius, 0, arcSweep, 0, end.x, end.y].join(' '); return d; } - function activeIndicatorCommands (x, y, radius, startAngle, endAngle) { - var midAngle = endAngle - ((endAngle - startAngle) / 2); + function activeIndicatorCommands(x, y, radius, startAngle, endAngle) { + var midAngle = endAngle - (endAngle - startAngle) / 2; var point = polarToCartesian(x, y, radius - 24, midAngle); var start = polarToCartesian(x, y, radius, midAngle - 10); var end = polarToCartesian(x, y, radius, midAngle + 10); //var arcSweep = endAngle - startAngle <= 180 ? "0" : "1"; - var d = ["M", point.x, point.y, - "L", start.x, start.y, - "A", radius, radius, 0, 0, 0, end.x, end.y, - "Z" - ].join(" "); + var d = ['M', point.x, point.y, 'L', start.x, start.y, 'A', radius, radius, 0, 0, 0, end.x, end.y, 'Z'].join(' '); return d; } - var Donut = React.createClass({displayName: "Donut", + var Donut = React.createClass({ + displayName: 'Donut', propTypes: { legend: React.PropTypes.bool, partial: React.PropTypes.bool, - max: React.PropTypes.oneOfType([ - React.PropTypes.shape({ - value: React.PropTypes.number, - label: React.PropTypes.string - }), - React.PropTypes.number - ]), - min: React.PropTypes.oneOfType([ - React.PropTypes.shape({ - value: React.PropTypes.number, - label: React.PropTypes.string - }), - React.PropTypes.number - ]), + max: React.PropTypes.oneOfType([React.PropTypes.shape({ + value: React.PropTypes.number, + label: React.PropTypes.string + }), React.PropTypes.number]), + min: React.PropTypes.oneOfType([React.PropTypes.shape({ + value: React.PropTypes.number, + label: React.PropTypes.string + }), React.PropTypes.number]), series: React.PropTypes.arrayOf(React.PropTypes.shape({ label: React.PropTypes.string, value: React.PropTypes.number.isRequired, @@ -8976,14 +11169,14 @@ var Grommet = value: React.PropTypes.number }, - getDefaultProps: function () { + getDefaultProps: function getDefaultProps() { return { - max: {value: 100}, - min: {value: 0} + max: { value: 100 }, + min: { value: 0 } }; }, - _initialTimeout: function () { + _initialTimeout: function _initialTimeout() { this.setState({ initial: false, activeIndex: this.state.importantIndex @@ -8991,17 +11184,17 @@ var Grommet = clearTimeout(this._timeout); }, - _onActive: function (index) { - this.setState({initial: false, activeIndex: index}); + _onActive: function _onActive(index) { + this.setState({ initial: false, activeIndex: index }); }, - _layout: function () { + _layout: function _layout() { // orientation based on available window orientation var ratio = window.innerWidth / window.innerHeight; if (ratio < 0.8) { - this.setState({orientation: 'portrait'}); + this.setState({ orientation: 'portrait' }); } else if (ratio > 1.2) { - this.setState({orientation: 'landscape'}); + this.setState({ orientation: 'landscape' }); } // content based on avialable real estate var parentElement = this.refs.donut.getDOMNode().parentNode; @@ -9011,30 +11204,26 @@ var Grommet = if (this.props.partial) { donutHeight = PARTIAL_SIZE; } - if (height < donutHeight || width < BASE_SIZE || - (width < (BASE_SIZE * 2) && height < (donutHeight * 2))) { - this.setState({size: 'small'}); + if (height < donutHeight || width < BASE_SIZE || width < BASE_SIZE * 2 && height < donutHeight * 2) { + this.setState({ size: 'small' }); } else { - this.setState({size: null}); + this.setState({ size: null }); } }, - _onResize: function() { + _onResize: function _onResize() { // debounce clearTimeout(this._resizeTimer); this._resizeTimer = setTimeout(this._layout, 50); }, - _generateSeries: function (props) { + _generateSeries: function _generateSeries(props) { var total = props.max.value - props.min.value; var remaining = total - (props.value - props.min.value); - return [ - {value: props.value}, - {value: remaining, colorIndex: 'unset'} - ]; + return [{ value: props.value }, { value: remaining, colorIndex: 'unset' }]; }, - _importantIndex: function (series) { + _importantIndex: function _importantIndex(series) { var result = 0; series.some(function (data, index) { if (data.important) { @@ -9045,7 +11234,7 @@ var Grommet = return result; }, - getInitialState: function() { + getInitialState: function getInitialState() { var series = this.props.series || this._generateSeries(this.props); var importantIndex = this._importantIndex(series); return { @@ -9058,15 +11247,15 @@ var Grommet = }; }, - componentDidMount: function() { + componentDidMount: function componentDidMount() { console.log('Grommet Donut is deprecated. Please use Grommet Meter instead.'); this._initialTimer = setTimeout(this._initialTimeout, 10); - this.setState({initial: true, activeIndex: 0}); + this.setState({ initial: true, activeIndex: 0 }); window.addEventListener('resize', this._onResize); this._onResize(); }, - componentWillReceiveProps: function (newProps) { + componentWillReceiveProps: function componentWillReceiveProps(newProps) { var series = newProps.series || this._generateSeries(newProps); var importantIndex = this._importantIndex(series); this.setState({ @@ -9076,26 +11265,26 @@ var Grommet = }); }, - componentWillUnmount: function() { + componentWillUnmount: function componentWillUnmount() { clearTimeout(this._initialTimer); clearTimeout(this._resizeTimer); window.removeEventListener('resize', this._onResize); }, - _itemColorIndex: function (item, index) { - return item.colorIndex || ('graph-' + (index + 1)); + _itemColorIndex: function _itemColorIndex(item, index) { + return item.colorIndex || 'graph-' + (index + 1); }, - render: function() { - var classes = [CLASS_ROOT, CLASS_ROOT + "--" + this.state.orientation]; + render: function render() { + var classes = [CLASS_ROOT, CLASS_ROOT + '--' + this.state.orientation]; if (this.state.size) { - classes.push(CLASS_ROOT + "--" + this.state.size); + classes.push(CLASS_ROOT + '--' + this.state.size); } if (this.props.partial) { - classes.push(CLASS_ROOT + "--partial"); + classes.push(CLASS_ROOT + '--partial'); } if (this.props.small) { - classes.push(CLASS_ROOT + "--small"); + classes.push(CLASS_ROOT + '--small'); } var viewBoxHeight = BASE_SIZE; @@ -9121,100 +11310,114 @@ var Grommet = var paths = this.state.series.map(function (item, index) { - var endAngle = Math.min(360, Math.max(10, startAngle + (anglePer * item.value))); - if (item.value > 0 && (startAngle + 360) === endAngle) { + var endAngle = Math.min(360, Math.max(10, startAngle + anglePer * item.value)); + if (item.value > 0 && startAngle + 360 === endAngle) { // full use for this item, make sure we render it. endAngle -= 0.1; } var radius = 84; // start from the bottom - var commands = arcCommands(BASE_SIZE / 2, BASE_SIZE / 2, radius, - startAngle + 180, endAngle + 180); + var commands = arcCommands(BASE_SIZE / 2, BASE_SIZE / 2, radius, startAngle + 180, endAngle + 180); var colorIndex = this._itemColorIndex(item, index); - var sliceClasses = [CLASS_ROOT + "__slice"]; - sliceClasses.push("color-index-" + colorIndex); + var sliceClasses = [CLASS_ROOT + '__slice']; + sliceClasses.push('color-index-' + colorIndex); if (this.state.activeIndex === index) { - sliceClasses.push(CLASS_ROOT + "__slice--active"); + sliceClasses.push(CLASS_ROOT + '__slice--active'); value = item.value; units = item.units || this.props.units; label = item.label; } if (index === this.state.activeIndex) { - var indicatorCommands = activeIndicatorCommands(BASE_SIZE / 2, BASE_SIZE / 2, radius, - startAngle + 180, endAngle + 180); - activeIndicator = ( - React.createElement("path", {stroke: "none", - className: CLASS_ROOT + "__slice-indicator color-index-" + colorIndex, - d: indicatorCommands}) - ); + var indicatorCommands = activeIndicatorCommands(BASE_SIZE / 2, BASE_SIZE / 2, radius, startAngle + 180, endAngle + 180); + activeIndicator = React.createElement('path', { stroke: 'none', + className: CLASS_ROOT + '__slice-indicator color-index-' + colorIndex, + d: indicatorCommands }); } startAngle = endAngle; - return ( - React.createElement("path", {key: item.label, fill: "none", className: sliceClasses.join(' '), d: commands, - onMouseOver: this._onActive.bind(this, index), - onMouseOut: this._onActive.bind(this, this.state.importantIndex), - onClick: item.onClick}) - ); + return React.createElement('path', { key: item.label, fill: 'none', className: sliceClasses.join(' '), d: commands, + onMouseOver: this._onActive.bind(this, index), + onMouseOut: this._onActive.bind(this, this.state.importantIndex), + onClick: item.onClick }); }, this); var minLabel; var maxLabel; if (this.props.partial) { if (this.props.min) { - minLabel = ( - React.createElement("div", {className: CLASS_ROOT + "__min-label"}, - this.props.min.value, " ", this.props.units - ) + minLabel = React.createElement( + 'div', + { className: CLASS_ROOT + '__min-label' }, + this.props.min.value, + ' ', + this.props.units ); } if (this.props.max) { - maxLabel = ( - React.createElement("div", {className: CLASS_ROOT + "__max-label"}, - this.props.max.value, " ", this.props.units - ) + maxLabel = React.createElement( + 'div', + { className: CLASS_ROOT + '__max-label' }, + this.props.max.value, + ' ', + this.props.units ); } } var legend = null; if (this.props.legend) { - legend = ( - React.createElement(Legend, {className: CLASS_ROOT + "__legend", - series: this.props.series, - units: this.props.units, - value: this.props.value, - activeIndex: this.state.activeIndex, - onActive: this._onActive}) - ); - } - - return ( - React.createElement("div", {ref: "donut", className: classes.join(' ')}, - React.createElement("div", {className: CLASS_ROOT + "__graphic-container"}, - React.createElement("svg", {className: CLASS_ROOT + "__graphic", - viewBox: "0 0 " + BASE_SIZE + " " + viewBoxHeight, - preserveAspectRatio: "xMidYMid meet"}, - React.createElement("g", null, - activeIndicator, - paths + legend = React.createElement(Legend, { className: CLASS_ROOT + '__legend', + series: this.props.series, + units: this.props.units, + value: this.props.value, + activeIndex: this.state.activeIndex, + onActive: this._onActive }); + } + + return React.createElement( + 'div', + { ref: 'donut', className: classes.join(' ') }, + React.createElement( + 'div', + { className: CLASS_ROOT + '__graphic-container' }, + React.createElement( + 'svg', + { className: CLASS_ROOT + '__graphic', + viewBox: '0 0 ' + BASE_SIZE + ' ' + viewBoxHeight, + preserveAspectRatio: 'xMidYMid meet' }, + React.createElement( + 'g', + null, + activeIndicator, + paths + ) + ), + React.createElement( + 'div', + { className: CLASS_ROOT + '__active' }, + React.createElement( + 'div', + { className: CLASS_ROOT + '__active-value large-number-font' }, + value, + React.createElement( + 'span', + { className: CLASS_ROOT + '__active-units large-number-font' }, + units ) - ), - React.createElement("div", {className: CLASS_ROOT + "__active"}, - React.createElement("div", {className: CLASS_ROOT + "__active-value large-number-font"}, - value, - React.createElement("span", {className: CLASS_ROOT + "__active-units large-number-font"}, units) - ), - React.createElement("div", {className: CLASS_ROOT + "__active-label"}, label) - ), - minLabel, - maxLabel - ), - legend - ) + ), + React.createElement( + 'div', + { className: CLASS_ROOT + '__active-label' }, + label + ) + ), + minLabel, + maxLabel + ), + legend ); } @@ -9222,19 +11425,21 @@ var Grommet = module.exports = Donut; - /***/ }, -/* 48 */ +/* 91 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var IntlMixin = __webpack_require__(4); + var IntlMixin = __webpack_require__(3); - var CLASS_ROOT = "legend"; + var CLASS_ROOT = 'legend'; - var Legend = React.createClass({displayName: "Legend", + var Legend = React.createClass({ + displayName: 'Legend', mixins: [IntlMixin], @@ -9245,9 +11450,8 @@ var Grommet = label: React.PropTypes.string, value: React.PropTypes.number, units: React.PropTypes.string, - colorIndex: React.PropTypes.oneOfType([ - React.PropTypes.number, // 1-6 - React.PropTypes.string // status + colorIndex: React.PropTypes.oneOfType([React.PropTypes.number, // 1-6 + React.PropTypes.string // status ]), onClick: React.PropTypes.func })).isRequired, @@ -9256,29 +11460,29 @@ var Grommet = value: React.PropTypes.number }, - _onActive: function (index) { - this.setState({activeIndex: index}); + _onActive: function _onActive(index) { + this.setState({ activeIndex: index }); if (this.props.onActive) { this.props.onActive(index); } }, - getInitialState: function () { - return {activeIndex: this.props.activeIndex}; + getInitialState: function getInitialState() { + return { activeIndex: this.props.activeIndex }; }, - componentWillReceiveProps: function (newProps) { - this.setState({activeIndex: newProps.activeIndex}); + componentWillReceiveProps: function componentWillReceiveProps(newProps) { + this.setState({ activeIndex: newProps.activeIndex }); }, - _itemColorIndex: function (item, index) { - return item.colorIndex || ('graph-' + (index + 1)); + _itemColorIndex: function _itemColorIndex(item, index) { + return item.colorIndex || 'graph-' + (index + 1); }, - render: function () { + render: function render() { var classes = [CLASS_ROOT]; if (this.props.series.length === 1) { - classes.push(CLASS_ROOT + "--single"); + classes.push(CLASS_ROOT + '--single'); } if (this.props.className) { classes.push(this.props.className); @@ -9286,31 +11490,43 @@ var Grommet = var totalValue = 0; var items = this.props.series.map(function (item, index) { - var legendClasses = [CLASS_ROOT + "__item"]; + var legendClasses = [CLASS_ROOT + '__item']; if (index === this.state.activeIndex) { - legendClasses.push(CLASS_ROOT + "__item--active"); + legendClasses.push(CLASS_ROOT + '__item--active'); } var colorIndex = this._itemColorIndex(item, index); totalValue += item.value; - var valueClasses = [CLASS_ROOT + "__item-value"]; + var valueClasses = [CLASS_ROOT + '__item-value']; if (1 === this.props.series.length) { - valueClasses.push("large-number-font"); + valueClasses.push('large-number-font'); } - return ( - React.createElement("li", {key: item.label, className: legendClasses.join(' '), - onClick: item.onClick, - onMouseOver: this._onActive.bind(this, index), - onMouseOut: this._onActive.bind(this, this.props.activeIndex)}, - React.createElement("svg", {className: CLASS_ROOT + "__item-swatch color-index-" + colorIndex, - viewBox: "0 0 12 12"}, - React.createElement("path", {className: item.className, d: "M 5 0 l 0 12"}) - ), - React.createElement("span", {className: CLASS_ROOT + "__item-label"}, item.label), - React.createElement("span", {className: valueClasses.join(' ')}, - item.value, - React.createElement("span", {className: CLASS_ROOT + "__item-units"}, this.props.units) + return React.createElement( + 'li', + { key: item.label || index, className: legendClasses.join(' '), + onClick: item.onClick, + onMouseOver: this._onActive.bind(this, index), + onMouseOut: this._onActive.bind(this, this.props.activeIndex) }, + React.createElement( + 'svg', + { className: CLASS_ROOT + '__item-swatch color-index-' + colorIndex, + viewBox: '0 0 12 12' }, + React.createElement('path', { className: item.className, d: 'M 5 0 l 0 12' }) + ), + React.createElement( + 'span', + { className: CLASS_ROOT + '__item-label' }, + item.label + ), + React.createElement( + 'span', + { className: valueClasses.join(' ') }, + item.value, + React.createElement( + 'span', + { className: CLASS_ROOT + '__item-units' }, + this.props.units ) ) ); @@ -9318,24 +11534,32 @@ var Grommet = var total = null; if (this.props.total && this.props.series.length > 1) { - total = ( - React.createElement("li", {className: CLASS_ROOT + "__total"}, - React.createElement("span", {className: CLASS_ROOT + "__total-label"}, - this.getGrommetIntlMessage('Total') - ), - React.createElement("span", {className: CLASS_ROOT + "__total-value"}, - totalValue, - React.createElement("span", {className: CLASS_ROOT + "__total-units"}, this.props.units) + total = React.createElement( + 'li', + { className: CLASS_ROOT + '__total' }, + React.createElement( + 'span', + { className: CLASS_ROOT + '__total-label' }, + this.getGrommetIntlMessage('Total') + ), + React.createElement( + 'span', + { className: CLASS_ROOT + '__total-value' }, + totalValue, + React.createElement( + 'span', + { className: CLASS_ROOT + '__total-units' }, + this.props.units ) ) ); } - return ( - React.createElement("ol", {className: classes.join(' ')}, - items.reverse(), - total - ) + return React.createElement( + 'ol', + { className: classes.join(' ') }, + items.reverse(), + total ); } @@ -9343,521 +11567,852 @@ var Grommet = module.exports = Legend; +/***/ }, +/* 92 */ +/***/ function(module, exports, __webpack_require__) { + + // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + + 'use strict'; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + var React = __webpack_require__(2); + var merge = __webpack_require__(44); + var pick = __webpack_require__(79); + var keys = __webpack_require__(70); + var Box = __webpack_require__(84); + + var CLASS_ROOT = 'footer'; + + var Footer = React.createClass({ + displayName: 'Footer', + + propTypes: merge({ + large: React.PropTypes.bool, + separator: React.PropTypes.bool, + small: React.PropTypes.bool + }, Box.propTypes), + + getDefaultProps: function getDefaultProps() { + return { + pad: 'none', + direction: 'row', + responsive: false + }; + }, + + render: function render() { + var classes = [CLASS_ROOT]; + var other = pick(this.props, keys(Box.propTypes)); + if (this.props.large) { + classes.push(CLASS_ROOT + '--large'); + } + if (this.props.separator) { + classes.push(CLASS_ROOT + '--separator'); + } + if (this.props.className) { + classes.push(this.props.className); + } + + return React.createElement( + Box, + _extends({ tag: 'footer' }, other, { className: classes.join(' ') }), + this.props.children + ); + } + + }); + + module.exports = Footer; /***/ }, -/* 49 */ +/* 93 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var Top = __webpack_require__(50); + var keys = __webpack_require__(70); - var CLASS_ROOT = "footer"; + var CLASS_ROOT = 'form'; - var Footer = React.createClass({displayName: "Footer", + var Form = React.createClass({ + displayName: 'Form', propTypes: { - centered: React.PropTypes.bool, - colorIndex: React.PropTypes.string, + compact: React.PropTypes.bool, + fill: React.PropTypes.bool, flush: React.PropTypes.bool, - primary: React.PropTypes.bool, - scrollTop: React.PropTypes.bool + onSubmit: React.PropTypes.func, + pad: React.PropTypes.oneOfType([React.PropTypes.oneOf(['none', 'small', 'medium', 'large']), React.PropTypes.shape({ + horizontal: React.PropTypes.oneOf(['none', 'small', 'medium', 'large']), + vertical: React.PropTypes.oneOf(['none', 'small', 'medium', 'large']) + })]) }, - getDefaultProps: function () { + getDefaultProps: function getDefaultProps() { return { - flush: true + compact: false, + fill: false, + flush: true, + pad: 'none' }; }, - _updateState: function () { - this.setState({scrolled: this._scrollable.scrollTop > 0}); + render: function render() { + var classes = [CLASS_ROOT]; + if (this.props.compact) { + classes.push(CLASS_ROOT + '--compact'); + } + if (this.props.fill) { + classes.push(CLASS_ROOT + '--fill'); + } + if (this.props.pad) { + if (typeof this.props.pad === 'string') { + classes.push(CLASS_ROOT + '--pad-' + this.props.pad); + } else if (typeof this.props.pad === 'object') { + keys(this.props.pad).forEach(function (key) { + classes.push(CLASS_ROOT + '--pad-' + key + '-' + this.props.pad[key]); + }); + } + } + if (this.props.className) { + classes.push(this.props.className); + } + return React.createElement( + 'form', + { className: classes.join(' '), onSubmit: this.props.onSubmit }, + this.props.children + ); + } + + }); + + module.exports = Form; + +/***/ }, +/* 94 */ +/***/ function(module, exports, __webpack_require__) { + + // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + + 'use strict'; + + var React = __webpack_require__(2); + + var CLASS_ROOT = 'form-field'; + + var FormField = React.createClass({ + displayName: 'FormField', + + propTypes: { + error: React.PropTypes.string, + help: React.PropTypes.node, + hidden: React.PropTypes.bool, + htmlFor: React.PropTypes.string, + label: React.PropTypes.string, + required: React.PropTypes.bool + }, + + _onFocus: function _onFocus() { + this.setState({ focus: true }); }, - _onClickTop: function() { - this._scrollable.scrollTop = 0; + _onBlur: function _onBlur() { + this.setState({ focus: false }); }, - _onScroll: function() { - // debounce - clearTimeout(this._scrollTimer); - this._scrollTimer = setTimeout(this._updateState, 10); + _onClick: function _onClick() { + if (this._inputElement) { + this._inputElement.focus(); + } }, - getInitialState: function () { - return {scrolled: false}; + getInitialState: function getInitialState() { + return { focus: false }; }, - componentDidMount: function () { - this._scrollable = this.refs.footer.getDOMNode().parentNode.parentNode; - this._scrollable.addEventListener("scroll", this._onScroll); + componentDidMount: function componentDidMount() { + var contentsElement = this.refs.contents.getDOMNode(); + var inputElements = contentsElement.querySelectorAll('input, textarea, select'); + if (inputElements.length === 1) { + this._inputElement = inputElements[0]; + this._inputElement.addEventListener('focus', this._onFocus); + this._inputElement.addEventListener('blur', this._onBlur); + } + }, + + componentWillUnmount: function componentWillUnmount() { + if (this._inputElement) { + this._inputElement.removeEventListener('focus', this._onFocus); + this._inputElement.removeEventListener('blur', this._onBlur); + delete this._inputElement; + } + }, + + render: function render() { + var classes = [CLASS_ROOT]; + if (this.state.focus) { + classes.push(CLASS_ROOT + '--focus'); + } + if (this.props.required) { + classes.push(CLASS_ROOT + '--required'); + } + if (this.props.hidden) { + classes.push(CLASS_ROOT + '--hidden'); + } + if (this.props.htmlFor) { + classes.push(CLASS_ROOT + '--text'); + } + + var error = null; + if (this.props.error) { + classes.push(CLASS_ROOT + '--error'); + error = React.createElement( + 'span', + { className: CLASS_ROOT + '__error' }, + this.props.error + ); + } + var help = null; + if (this.props.help) { + help = React.createElement( + 'span', + { className: CLASS_ROOT + '__help' }, + this.props.help + ); + } + + return React.createElement( + 'div', + { className: classes.join(' '), onClick: this._onClick }, + error, + React.createElement( + 'label', + { className: CLASS_ROOT + '__label', htmlFor: this.props.htmlFor }, + this.props.label + ), + help, + React.createElement( + 'span', + { ref: 'contents', className: CLASS_ROOT + '__contents' }, + this.props.children + ) + ); + } + + }); + + module.exports = FormField; + +/***/ }, +/* 95 */ +/***/ function(module, exports, __webpack_require__) { + + // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + + 'use strict'; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + var React = __webpack_require__(2); + var merge = __webpack_require__(44); + var pick = __webpack_require__(79); + var keys = __webpack_require__(70); + var Box = __webpack_require__(84); + + var CLASS_ROOT = 'header'; + + var Header = React.createClass({ + displayName: 'Header', + + propTypes: merge({ + fixed: React.PropTypes.bool, + float: React.PropTypes.bool, + large: React.PropTypes.bool, + separator: React.PropTypes.oneOf(['top', 'bottom']), + small: React.PropTypes.bool, + splash: React.PropTypes.bool, + tag: React.PropTypes.string + }, Box.propTypes), + + getDefaultProps: function getDefaultProps() { + return { + pad: 'none', + direction: 'row', + align: 'center', + responsive: false, + tag: 'header' + }; + }, + + _onResize: function _onResize() { + this._alignMirror(); + }, + + _alignMirror: function _alignMirror() { + var contentElement = this.refs.content.getDOMNode(); + var mirrorElement = this.refs.mirror.getDOMNode(); + + // constrain fixed content to the width of the mirror + var mirrorRect = mirrorElement.getBoundingClientRect(); + contentElement.style.width = '' + Math.floor(mirrorRect.width) + 'px'; + + // align the mirror height with the content's height + var contentRect = contentElement.getBoundingClientRect(); + mirrorElement.style.height = '' + Math.floor(contentRect.height) + 'px'; }, - componentWillUnmount: function () { - this._scrollable.removeEventListener("scroll", this._onScroll); + componentDidMount: function componentDidMount() { + if (this.props.fixed) { + this._alignMirror(); + window.addEventListener('resize', this._onResize); + } }, - componentWillReceiveProps: function() { - this.setState({scrolled: false}); + componentDidUpdate: function componentDidUpdate() { + if (this.props.fixed) { + this._alignMirror(); + } }, - componentDidUpdate: function() { - if (!this.state.scrolled) { - this._scrollable.scrollTop = 0; + componentWillUnmount: function componentWillUnmount() { + if (this.props.fixed) { + window.removeEventListener('resize', this._onResize); } }, - render: function() { + render: function render() { var classes = [CLASS_ROOT]; - if (this.props.primary) { - classes.push(CLASS_ROOT + "--primary"); + var containerClasses = [CLASS_ROOT + '__container']; + var other = pick(this.props, keys(Box.propTypes)); + if (this.props.fixed) { + containerClasses.push(CLASS_ROOT + '__container--fixed'); } - if (this.props.centered) { - classes.push(CLASS_ROOT + "--centered"); + if (this.props.float) { + classes.push(CLASS_ROOT + '--float'); + containerClasses.push(CLASS_ROOT + '__container--float'); } - if (this.props.flush) { - classes.push(CLASS_ROOT + "--flush"); + if (this.props.large) { + classes.push(CLASS_ROOT + '--large'); } - if (this.props.colorIndex) { - classes.push("background-color-index-" + this.props.colorIndex); + if (this.props.small) { + classes.push(CLASS_ROOT + '--small'); + } + if (this.props.splash) { + classes.push(CLASS_ROOT + '--splash'); + } + if (this.props.separator) { + classes.push(CLASS_ROOT + '--separator-' + this.props.separator); } if (this.props.className) { classes.push(this.props.className); } - var top = null; - if (this.props.scrollTop && this.state.scrolled) { - top = ( - React.createElement("div", {className: CLASS_ROOT + "__top control-icon", - onClick: this._onClickTop}, - React.createElement(Top, null) + if (this.props.fixed) { + return React.createElement( + 'div', + { className: containerClasses.join(' ') }, + React.createElement('div', { ref: 'mirror', className: CLASS_ROOT + '__mirror' }), + React.createElement( + 'div', + { className: CLASS_ROOT + '__wrapper' }, + React.createElement( + Box, + _extends({ ref: 'content', tag: this.props.header }, other, { className: classes.join(' ') }), + this.props.children + ) ) ); - } - - return ( - React.createElement("div", {ref: "footer", className: classes.join(' ')}, - React.createElement("div", {className: CLASS_ROOT + "__content"}, - this.props.children, - top - ) - ) - ); + } else { + return React.createElement( + Box, + _extends({ tag: this.props.header }, other, { className: classes.join(' '), + containerClassName: containerClasses.join(' ') }), + this.props.children + ); + } } }); - module.exports = Footer; - + module.exports = Header; /***/ }, -/* 50 */ +/* 96 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + "use strict"; + var React = __webpack_require__(2); - var Top = React.createClass({displayName: "Top", + var CLASS_ROOT = "headline"; + + var Headline = React.createClass({ + displayName: "Headline", + + propTypes: { + colorIndex: React.PropTypes.string, + large: React.PropTypes.bool, + small: React.PropTypes.bool + }, - render: function() { - var className = 'control-icon control-icon-top'; + render: function render() { + var classes = [CLASS_ROOT]; + if (this.props.large) { + classes.push(CLASS_ROOT + "--large"); + } + if (this.props.small) { + classes.push(CLASS_ROOT + "--small"); + } if (this.props.className) { - className += ' ' + this.props.className; + classes.push(this.props.className); } - return ( - React.createElement("svg", {className: className, viewBox: "0 0 48 48", version: "1.1"}, - React.createElement("g", {fill: "none"}, - React.createElement("polyline", {strokeWidth: "2", points: "14,20.9 24,13 34,21 "}), - React.createElement("path", {strokeWidth: "2", d: "M24,13.3C24,36,24,36,24,36"}), - React.createElement("line", {strokeWidth: "2", x1: "13", y1: "11", x2: "35", y2: "11"}) - ) - ) + + return React.createElement( + "div", + { className: classes.join(" ") }, + this.props.children ); } }); - module.exports = Top; - + module.exports = Headline; /***/ }, -/* 51 */ +/* 97 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. - var React = __webpack_require__(2); + "use strict"; - var CLASS_ROOT = "form"; + var React = __webpack_require__(2); - var Form = React.createClass({displayName: "Form", + var Label = React.createClass({ + displayName: "Label", propTypes: { - compact: React.PropTypes.bool, - fill: React.PropTypes.bool, - flush: React.PropTypes.bool, - onSubmit: React.PropTypes.func, - className: React.PropTypes.string - }, - - getDefaultProps: function () { - return { - compact: false, - fill: false, - flush: true - }; + icon: React.PropTypes.node, + text: React.PropTypes.string }, - render: function () { - var classes = [CLASS_ROOT]; - if (this.props.compact) { - classes.push(CLASS_ROOT + "--compact"); - } - if (this.props.fill) { - classes.push(CLASS_ROOT + "--fill"); - } - if (this.props.flush) { - classes.push(CLASS_ROOT + "--flush"); + render: function render() { + var icon = null; + var text = null; + if (this.props.icon) { + icon = React.createElement( + "span", + { className: "label__icon control-icon" }, + this.props.icon + ); } - if (this.props.className) { - classes.push(this.props.className); + if (this.props.text) { + text = React.createElement( + "span", + { className: "label__text" }, + this.props.text + ); } - return ( - React.createElement("form", {className: classes.join(' '), onSubmit: this.props.onSubmit}, - this.props.children - ) + return React.createElement( + "div", + { className: "label" }, + icon, + text ); } }); - module.exports = Form; - + module.exports = Label; /***/ }, -/* 52 */ +/* 98 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); + var ListItem = __webpack_require__(100); + var SpinningIcon = __webpack_require__(101); + var InfiniteScroll = __webpack_require__(99); + var IntlMixin = __webpack_require__(3); - var CLASS_ROOT = "form-field"; + var CLASS_ROOT = 'list'; - var FormField = React.createClass({displayName: "FormField", + var List = React.createClass({ + displayName: 'List', propTypes: { - error: React.PropTypes.string, - help: React.PropTypes.node, - hidden: React.PropTypes.bool, - htmlFor: React.PropTypes.string, - label: React.PropTypes.string, - required: React.PropTypes.bool + data: React.PropTypes.arrayOf(React.PropTypes.object).isRequired, + large: React.PropTypes.bool, + onMore: React.PropTypes.func, + onSelect: React.PropTypes.func, + schema: React.PropTypes.arrayOf(React.PropTypes.shape({ + attribute: React.PropTypes.string, + 'default': React.PropTypes.node, + image: React.PropTypes.bool, + label: React.PropTypes.string, + primary: React.PropTypes.bool, + secondary: React.PropTypes.bool, + timestamp: React.PropTypes.bool, + uid: React.PropTypes.bool + })).isRequired, + selected: React.PropTypes.oneOfType([React.PropTypes.string, // uid + React.PropTypes.arrayOf(React.PropTypes.string)]), + small: React.PropTypes.bool }, - _onFocus: function () { - this.setState({focus: true}); + mixins: [InfiniteScroll, IntlMixin], + + getDefaultProps: function getDefaultProps() { + return { small: false }; }, - _onBlur: function () { - this.setState({focus: false}); + _onClickItem: function _onClickItem(item) { + if (this.props.onSelect) { + this.props.onSelect(item); + } }, - _onClick: function () { - if (this._inputElement) { - this._inputElement.focus(); + componentDidMount: function componentDidMount() { + if (this.props.onMore) { + this.startListeningForScroll(this.refs.more.getDOMNode(), this.props.onMore); } }, - getInitialState: function () { - return {focus: false}; + componentDidUpdate: function componentDidUpdate() { + this.stopListeningForScroll(); + if (this.props.onMore) { + this.startListeningForScroll(this.refs.more.getDOMNode(), this.props.onMore); + } }, - componentDidMount: function () { - var contentsElement = this.refs.contents.getDOMNode(); - var inputElements = contentsElement.querySelectorAll('input, textarea, select'); - if (inputElements.length === 1) { - this._inputElement = inputElements[0]; - this._inputElement.addEventListener('focus', this._onFocus); - this._inputElement.addEventListener('blur', this._onBlur); + componentWillUnmount: function componentWillUnmount() { + if (this.props.onMore) { + this.stopListeningForScroll(); } }, - componentWillUnmount: function () { - if (this._inputElement) { - this._inputElement.removeEventListener('focus', this._onFocus); - this._inputElement.removeEventListener('blur', this._onBlur); - delete this._inputElement; + _renderValue: function _renderValue(item, scheme) { + var result; + var value = item[scheme.attribute] || scheme['default']; + if (scheme.image) { + if (typeof value === 'string') { + result = React.createElement('img', { src: value, alt: scheme.label || 'image' }); + } else { + result = value; + } + } else if (scheme.timestamp) { + result = this.getGrommetFormattedDate(value); + } else { + result = value; } + return result; }, - render: function () { + render: function render() { var classes = [CLASS_ROOT]; - if (this.state.focus) { - classes.push(CLASS_ROOT + "--focus"); + if (true) { + classes.push(CLASS_ROOT + '--fill'); } - if (this.props.required) { - classes.push(CLASS_ROOT + "--required"); + if (true) { + classes.push(CLASS_ROOT + '--flush'); } - if (this.props.hidden) { - classes.push(CLASS_ROOT + "--hidden"); + if (this.props.small) { + classes.push(CLASS_ROOT + '--small'); } - if (this.props.htmlFor) { - classes.push(CLASS_ROOT + "--text"); + if (this.props.large) { + classes.push(CLASS_ROOT + '--large'); } - - var error = null; - if (this.props.error) { - classes.push(CLASS_ROOT + "--error"); - error = React.createElement("span", {className: CLASS_ROOT + "__error"}, this.props.error); + if (this.props.className) { + classes.push(this.props.className); } - var help = null; - if (this.props.help) { - help = React.createElement("span", {className: CLASS_ROOT + "__help"}, this.props.help); + + var items = this.props.data.map(function (item) { + var uid; + var image; + var primary; + var secondary; + var selected; + + this.props.schema.forEach(function (scheme) { + if (scheme.image) { + image = this._renderValue(item, scheme); + } else if (scheme.primary) { + primary = this._renderValue(item, scheme); + } else if (scheme.secondary) { + secondary = this._renderValue(item, scheme); + } + if (scheme.uid) { + uid = item[scheme.attribute]; + if (uid === this.props.selected) { + selected = true; + } + } + }, this); + + return React.createElement(ListItem, { key: uid, image: image, label: primary, + annotation: secondary, selected: selected, + onClick: this._onClickItem.bind(this, item) }); + }, this); + + var more = null; + if (this.props.onMore) { + classes.push(CLASS_ROOT + '--moreable'); + more = React.createElement( + 'li', + { ref: 'more', className: CLASS_ROOT + '__more' }, + React.createElement(SpinningIcon, null) + ); } - return ( - React.createElement("div", {className: classes.join(' '), onClick: this._onClick}, - error, - React.createElement("label", {className: CLASS_ROOT + "__label", htmlFor: this.props.htmlFor}, - this.props.label - ), - React.createElement("span", {ref: "contents", className: CLASS_ROOT + "__contents"}, - this.props.children - ), - help - ) + return React.createElement( + 'ul', + { className: classes.join(' ') }, + items, + more ); } }); - module.exports = FormField; - + module.exports = List; /***/ }, -/* 53 */ +/* 99 */ /***/ function(module, exports, __webpack_require__) { - // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. - - var React = __webpack_require__(2); + // (C) Copyright 2014 Hewlett-Packard Development Company, L.P. - var CLASS_ROOT = "header"; + "use strict"; - var Header = React.createClass({displayName: "Header", + var DOM = __webpack_require__(86); - propTypes: { - colorIndex: React.PropTypes.string, - fixed: React.PropTypes.bool, - flush: React.PropTypes.bool, - large: React.PropTypes.bool, - primary: React.PropTypes.bool, - small: React.PropTypes.bool - }, + var SCROLL_MORE_DELAY = 2000; // when the user scrolls + var SCROLL_MORE_INITIAL_DELAY = 200; // when we start out at the bottom already - getDefaultProps: function () { - return { - flush: true, - large: false, - primary: false, - small: false - }; - }, + var InfiniteScroll = { - _onResize: function () { - this._alignMirror(); + _infiniteScroll: { + indicatorElement: null, + scrollParent: null, + onEnd: null }, - _alignMirror: function () { - var contentElement = this.refs.content.getDOMNode(); - var mirrorElement = this.refs.mirror.getDOMNode(); - - // constrain fixed content to the width of the mirror - var mirrorRect = mirrorElement.getBoundingClientRect(); - contentElement.style.width = '' + Math.floor(mirrorRect.width) + 'px'; - - // align the mirror height with the content's height - var contentRect = contentElement.getBoundingClientRect(); - mirrorElement.style.height = '' + Math.floor(contentRect.height) + 'px'; + _onScroll: function _onScroll() { + // delay a bit to ride out quick users + clearTimeout(this._infiniteScroll.scrollTimer); + this._infiniteScroll.scrollTimer = setTimeout((function () { + // are we at the bottom? + var parentRect = this._infiniteScroll.scrollParent.getBoundingClientRect(); + var indicatorRect = this._infiniteScroll.indicatorElement.getBoundingClientRect(); + if (indicatorRect.bottom <= parentRect.bottom) { + this._infiniteScroll.onEnd(); + } + }).bind(this), SCROLL_MORE_DELAY); }, - componentDidMount: function () { - if (this.props.fixed) { - this._alignMirror(); - window.addEventListener('resize', this._onResize); + startListeningForScroll: function startListeningForScroll(indicatorElement, onEnd) { + this._infiniteScroll.onEnd = onEnd; + this._infiniteScroll.indicatorElement = indicatorElement; + this._infiniteScroll.scrollParent = DOM.findScrollParents(indicatorElement)[0]; + this._infiniteScroll.scrollParent.addEventListener("scroll", this._onScroll); + // check in case we're already at the bottom + if (this._infiniteScroll.scrollParent === document) { + this._infiniteScroll.scrollTimer = setTimeout(onEnd, SCROLL_MORE_INITIAL_DELAY); } }, - componentDidUpdate: function () { - if (this.props.fixed) { - this._alignMirror(); + stopListeningForScroll: function stopListeningForScroll() { + if (this._infiniteScroll.scrollParent) { + clearTimeout(this._infiniteScroll.scrollTimer); + this._infiniteScroll.scrollParent.removeEventListener("scroll", this._onScroll); + this._infiniteScroll.scrollParent = null; } }, - componentWillUnmount: function () { - if (this.props.fixed) { - window.removeEventListener('resize', this._onResize); - } + componentWillUnmount: function componentWillUnmount() { + this.stopListeningForScroll(); + } + }; + + module.exports = InfiniteScroll; + +/***/ }, +/* 100 */ +/***/ function(module, exports, __webpack_require__) { + + // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + + "use strict"; + + var React = __webpack_require__(2); + + var CLASS_ROOT = "list-item"; + + var ListItem = React.createClass({ + displayName: "ListItem", + + propTypes: { + annotation: React.PropTypes.node, + image: React.PropTypes.node, + label: React.PropTypes.node, + onClick: React.PropTypes.func, + selected: React.PropTypes.bool }, - render: function() { + render: function render() { var classes = [CLASS_ROOT]; - if (this.props.primary) { - classes.push(CLASS_ROOT + "--primary"); - } - if (this.props.fixed) { - classes.push(CLASS_ROOT + "--fixed"); - } - if (this.props.flush) { - classes.push(CLASS_ROOT + "--flush"); - } - if (this.props.large) { - classes.push(CLASS_ROOT + "--large"); + if (this.props.onClick) { + classes.push(CLASS_ROOT + "--selectable"); } - if (this.props.small) { - classes.push(CLASS_ROOT + "--small"); + if (this.props.selected) { + classes.push(CLASS_ROOT + "--selected"); } if (this.props.className) { classes.push(this.props.className); } - var mirror = null; - if (this.props.fixed) { - mirror = React.createElement("div", {ref: "mirror", className: CLASS_ROOT + "__mirror"}); - } - - var content = ( - React.createElement("div", {ref: "content", className: CLASS_ROOT + "__content"}, - this.props.children - ) - ); - if (this.props.colorIndex || this.props.fixed) { - var wrapperClasses = [CLASS_ROOT + "__wrapper"]; - if (this.props.colorIndex) { - wrapperClasses.push("background-color-index-" + - this.props.colorIndex); - } - - content = ( - React.createElement("div", {className: wrapperClasses.join(' ')}, - content + return React.createElement( + "li", + { className: classes.join(" "), onClick: this.props.onClick }, + React.createElement( + "span", + { className: CLASS_ROOT + "__image" }, + this.props.image + ), + React.createElement( + "span", + { className: CLASS_ROOT + "__text" }, + React.createElement( + "span", + { className: CLASS_ROOT + "__label" }, + this.props.label + ), + React.createElement( + "span", + { className: CLASS_ROOT + "__annotation" }, + this.props.annotation ) - ); - } - - return ( - React.createElement("div", {className: classes.join(' ')}, - mirror, - content ) ); } }); - module.exports = Header; - + module.exports = ListItem; /***/ }, -/* 54 */ +/* 101 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + "use strict"; + var React = __webpack_require__(2); - var Label = React.createClass({displayName: "Label", + var CLASS_ROOT = "icon-spinning"; - propTypes: { - icon: React.PropTypes.node, - text: React.PropTypes.string - }, + var Spinning = React.createClass({ + displayName: "Spinning", - render: function() { - var icon = null; - var text = null; - if (this.props.icon) { - icon = (React.createElement("span", {className: "label__icon control-icon"}, this.props.icon)); + render: function render() { + var classes = [CLASS_ROOT]; + if (this.props.small) { + classes.push(CLASS_ROOT + "--small"); } - if (this.props.text) { - text = (React.createElement("span", {className: "label__text"}, this.props.text)); + if (this.props.className) { + classes.push(this.props.className); } - return ( - React.createElement("div", {className: "label"}, - icon, - text - ) + return React.createElement( + "svg", + { className: classes.join(" "), viewBox: "0 0 48 48", version: "1.1" }, + React.createElement("circle", { stroke: "#ddd", strokeWidth: "4", strokeDasharray: "24px 8px", fill: "none", cx: "24", cy: "24", r: "20" }), + React.createElement("circle", { stroke: "#333", strokeWidth: "4", strokeDasharray: "24px 104px", fill: "none", cx: "24", cy: "24", r: "20" }) ); } }); - module.exports = Label; - + module.exports = Spinning; /***/ }, -/* 55 */ +/* 102 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var Login = React.createClass({displayName: "Login", + var Login = React.createClass({ + displayName: 'Login', propTypes: { background: React.PropTypes.string }, - _onResize: function() { + _onResize: function _onResize() { this.adjustBackground(); }, - adjustBackground: function() { + adjustBackground: function adjustBackground() { // make sure the background always fills the screen, preserve aspect ratio var windowRatio = window.innerWidth / window.innerHeight; var image = this.refs.background.getDOMNode(); var imageRatio = image.scrollWidth / image.scrollHeight; - this.setState({orientation: (windowRatio < imageRatio) ? 'portrait' : 'landscape'}); + this.setState({ orientation: windowRatio < imageRatio ? 'portrait' : 'landscape' }); }, - getInitialState: function() { + getInitialState: function getInitialState() { return { orientation: null }; }, - componentDidMount: function() { - window.addEventListener('resize', this._onResize); - setTimeout(this.adjustBackground, 300); + componentDidMount: function componentDidMount() { + if (this.props.background) { + window.addEventListener('resize', this._onResize); + setTimeout(this.adjustBackground, 300); + } }, - componentWillUnmount: function() { - window.removeEventListener('resize', this._onResize); + componentWillUnmount: function componentWillUnmount() { + if (this.props.background) { + window.removeEventListener('resize', this._onResize); + } }, - render: function() { + render: function render() { var background = null; if (this.props.background) { var classes = ['login__background']; if (this.state.orientation) { classes.push('login__background--' + this.state.orientation); } - background = ( - React.createElement("img", {ref: "background", className: classes.join(' '), - src: this.props.background}) - ); + background = React.createElement('img', { ref: 'background', className: classes.join(' '), + src: this.props.background }); } - return ( - React.createElement("div", {className: "login"}, - background, - React.createElement("div", {className: "login__container"}, - this.props.children - ) + return React.createElement( + 'div', + { className: 'login' }, + background, + React.createElement( + 'div', + { className: 'login__container' }, + this.props.children ) ); } @@ -9866,22 +12421,24 @@ var Grommet = module.exports = Login; - /***/ }, -/* 56 */ +/* 103 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var Form = __webpack_require__(51); - var FormField = __webpack_require__(52); - var CheckBox = __webpack_require__(45); - var Button = __webpack_require__(44); - var IntlMixin = __webpack_require__(4); - var CLASS_ROOT = "login-form"; + var Form = __webpack_require__(93); + var FormField = __webpack_require__(94); + var CheckBox = __webpack_require__(88); + var Button = __webpack_require__(87); + var IntlMixin = __webpack_require__(3); + var CLASS_ROOT = 'login-form'; - var LoginForm = React.createClass({displayName: "LoginForm", + var LoginForm = React.createClass({ + displayName: 'LoginForm', mixins: [IntlMixin], @@ -9894,47 +12451,51 @@ var Grommet = onSubmit: React.PropTypes.func }, - _onSubmit: function (event) { + _onSubmit: function _onSubmit(event) { event.preventDefault(); var username = this.refs.username.getDOMNode().value.trim(); var password = this.refs.password.getDOMNode().value.trim(); if (this.props.onSubmit) { - this.props.onSubmit({username: username, password: password}); + this.props.onSubmit({ username: username, password: password }); } }, - getDefaultProps: function () { - return ({ + getDefaultProps: function getDefaultProps() { + return { errors: [] - }); + }; }, - componentDidMount: function() { + componentDidMount: function componentDidMount() { this.refs.username.getDOMNode().focus(); }, - render: function() { + render: function render() { var classes = [CLASS_ROOT]; - var errors = this.props.errors.map(function (error, index) { - return (React.createElement("div", {key: index, className: CLASS_ROOT + "__error"}, this.getGrommetIntlMessage(error))); - }.bind(this)); + var errors = this.props.errors.map((function (error, index) { + return React.createElement( + 'div', + { key: index, className: CLASS_ROOT + '__error' }, + this.getGrommetIntlMessage(error) + ); + }).bind(this)); var logo = null; if (this.props.logo) { - logo = ( - React.createElement("div", {className: CLASS_ROOT + "__logo"}, - this.props.logo - ) + logo = React.createElement( + 'div', + { className: CLASS_ROOT + '__logo' }, + this.props.logo ); } var title = null; if (this.props.title) { - title = ( - React.createElement("h1", {className: CLASS_ROOT + "__title"}, - this.props.title - ) + title = React.createElement( + 'h1', + { className: CLASS_ROOT + '__title' }, + this.props.title ); } @@ -9942,37 +12503,41 @@ var Grommet = if (this.props.rememberMe || this.props.forgotPassword) { var rememberMe = null; if (this.props.rememberMe) { - rememberMe = ( - React.createElement(CheckBox, {className: CLASS_ROOT + "__remember-me", - id: "remember-me", label: this.getGrommetIntlMessage('Remember me')}) - ); + rememberMe = React.createElement(CheckBox, { className: CLASS_ROOT + '__remember-me', + id: 'remember-me', label: this.getGrommetIntlMessage('Remember me') }); } - footer = ( - React.createElement("div", {className: CLASS_ROOT + "__footer"}, - rememberMe, - this.props.forgotPassword - ) + footer = React.createElement( + 'div', + { className: CLASS_ROOT + '__footer' }, + rememberMe, + this.props.forgotPassword ); } - return ( - React.createElement(Form, {className: classes.join(' '), onSubmit: this._onSubmit}, - logo, - title, - React.createElement("fieldset", null, - React.createElement(FormField, {htmlFor: "username", label: this.getGrommetIntlMessage('Username')}, - React.createElement("input", {id: "username", ref: "username", type: "email"}) - ), - React.createElement(FormField, {htmlFor: "password", label: this.getGrommetIntlMessage('Password')}, - React.createElement("input", {id: "password", ref: "password", type: "password"}) - ) - ), - errors, - React.createElement(Button, {className: CLASS_ROOT + "__submit", primary: true, strong: true, - label: this.getGrommetIntlMessage('Log In'), - onClick: this._onSubmit}), - footer - ) + return React.createElement( + Form, + { className: classes.join(' '), onSubmit: this._onSubmit }, + logo, + title, + React.createElement( + 'fieldset', + null, + React.createElement( + FormField, + { htmlFor: 'username', label: this.getGrommetIntlMessage('Username') }, + React.createElement('input', { id: 'username', ref: 'username', type: 'email' }) + ), + React.createElement( + FormField, + { htmlFor: 'password', label: this.getGrommetIntlMessage('Password') }, + React.createElement('input', { id: 'password', ref: 'password', type: 'password' }) + ) + ), + errors, + React.createElement(Button, { className: CLASS_ROOT + '__submit', primary: true, strong: true, + label: this.getGrommetIntlMessage('Log In'), + onClick: this._onSubmit }), + footer ); } @@ -9980,127 +12545,147 @@ var Grommet = module.exports = LoginForm; - /***/ }, -/* 57 */ +/* 104 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. - var React = __webpack_require__(2); - var ReactLayeredComponent = __webpack_require__(60); - var KeyboardAccelerators = __webpack_require__(61); - var Overlay = __webpack_require__(58); - var MoreIcon = __webpack_require__(62); - var DropCaretIcon = __webpack_require__(63); - - var ROOT_CLASS = "menu"; + 'use strict'; - var MenuLayer = React.createClass({displayName: "MenuLayer", + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - propTypes: { - align: React.PropTypes.oneOf(['top', 'bottom', 'left', 'right']), - direction: React.PropTypes.oneOf(['up', 'down', 'left', 'right', 'center']), + var React = __webpack_require__(2); + var merge = __webpack_require__(44); + var pick = __webpack_require__(79); + var keys = __webpack_require__(70); + var KeyboardAccelerators = __webpack_require__(85); + var Drop = __webpack_require__(105); + var Box = __webpack_require__(84); + var MoreIcon = __webpack_require__(106); + var DropCaretIcon = __webpack_require__(107); + + var CLASS_ROOT = 'menu'; + + // We have a separate module for the drop component so we can transfer the router context. + var MenuDrop = React.createClass({ + displayName: 'MenuDrop', + + propTypes: merge({ + control: React.PropTypes.node, + dropAlign: Drop.alignPropType, id: React.PropTypes.string.isRequired, onClick: React.PropTypes.func.isRequired, router: React.PropTypes.func - }, + }, Box.propTypes), childContextTypes: { router: React.PropTypes.func }, - getChildContext: function () { + getChildContext: function getChildContext() { return { router: this.props.router }; }, - render: function () { - var classes = [ROOT_CLASS + "__layer"]; - if (this.props.direction) { - classes.push(ROOT_CLASS + "__layer--" + this.props.direction); + render: function render() { + var classes = [CLASS_ROOT + '__drop']; + var other = pick(this.props, keys(Box.propTypes)); + + var first = this.props.control; + var second = React.createElement( + Box, + _extends({ tag: 'nav' }, other), + this.props.children + ); + if (this.props.dropAlign.bottom) { + first = second; + second = this.props.control; } - if (this.props.align) { - classes.push(ROOT_CLASS + "__layer--align-" + this.props.align); + if (this.props.dropAlign.right) { + classes.push(CLASS_ROOT + '__drop--align-right'); } - return ( - React.createElement("div", {id: this.props.id, className: classes.join(' '), - onClick: this.props.onClick}, - this.props.children - ) + return React.createElement( + 'div', + { id: this.props.id, className: classes.join(' '), + onClick: this.props.onClick }, + first, + second ); } }); - var Menu = React.createClass({displayName: "Menu", + var Menu = React.createClass({ + displayName: 'Menu', - propTypes: { - align: React.PropTypes.oneOf(['top', 'bottom', 'left', 'right']), + propTypes: merge({ closeOnClick: React.PropTypes.bool, collapse: React.PropTypes.bool, - direction: React.PropTypes.oneOf(['up', 'down', 'left', 'right', 'center']), + dropAlign: Drop.alignPropType, icon: React.PropTypes.node, label: React.PropTypes.string, primary: React.PropTypes.bool, small: React.PropTypes.bool - }, + }, Box.propTypes), contextTypes: { router: React.PropTypes.func }, - getDefaultProps: function () { + getDefaultProps: function getDefaultProps() { return { - align: 'left', + align: 'stretch', closeOnClick: true, - direction: 'down', + direction: 'column', + dropAlign: { top: 'top', left: 'left' }, + pad: 'none', small: false }; }, - mixins: [ReactLayeredComponent, KeyboardAccelerators, Overlay], + mixins: [KeyboardAccelerators], - _onOpen: function (event) { + _onOpen: function _onOpen(event) { event.preventDefault(); - this.setState({active: true}); + this.setState({ active: true }); }, - _onClose: function () { - this.setState({active: false}); + _onClose: function _onClose() { + this.setState({ active: false }); }, - _onFocusControl: function () { - this.setState({controlFocused: true}); + _onFocusControl: function _onFocusControl() { + this.setState({ controlFocused: true }); }, - _onBlurControl: function () { - this.setState({controlFocused: false}); + _onBlurControl: function _onBlurControl() { + this.setState({ controlFocused: false }); }, - _onSink: function (event) { + _onSink: function _onSink(event) { event.stopPropagation(); // need to go native to prevent closing via document event.nativeEvent.stopImmediatePropagation(); }, - getInitialState: function () { + getInitialState: function getInitialState() { return { controlFocused: false, active: false, - inline: (! this.props.label && ! this.props.icon && ! this.props.collapse) + inline: !this.props.label && !this.props.icon && !this.props.collapse }; }, - componentDidMount: function () { + componentDidMount: function componentDidMount() { if (this.refs.control) { var controlElement = this.refs.control.getDOMNode(); this.setState({ - layerId: 'menu-layer-' + controlElement.getAttribute('data-reactid') + dropId: 'menu-drop-' + controlElement.getAttribute('data-reactid') }); } }, - componentDidUpdate: function (prevProps, prevState) { + componentDidUpdate: function componentDidUpdate(prevProps, prevState) { // Set up keyboard listeners appropriate to the current state. var activeKeyboardHandlers = { @@ -10115,117 +12700,136 @@ var Grommet = // the order here is important, need to turn off keys before turning on - if (! this.state.controlFocused && prevState.controlFocused) { + if (!this.state.controlFocused && prevState.controlFocused) { this.stopListeningToKeyboard(focusedKeyboardHandlers); } - if (! this.state.active && prevState.active) { + if (!this.state.active && prevState.active) { document.removeEventListener('click', this._onClose); this.stopListeningToKeyboard(activeKeyboardHandlers); - this.stopOverlay(); + this._drop.remove(); + this._drop = null; } // re-arm the space key in case we used it when active - if (this.state.controlFocused && (! prevState.controlFocused || - (! this.state.active && prevState.active))) { + if (this.state.controlFocused && (!prevState.controlFocused || !this.state.active && prevState.active)) { this.startListeningToKeyboard(focusedKeyboardHandlers); } - if (this.state.active && ! prevState.active) { + if (this.state.active && !prevState.active) { document.addEventListener('click', this._onClose); this.startListeningToKeyboard(activeKeyboardHandlers); + this._drop = Drop.add(this.refs.control.getDOMNode(), this._renderDrop(), this.props.dropAlign); + } - var controlElement = this.refs.control.getDOMNode(); - var layerElement = document.getElementById(this.state.layerId); - var layerControlElement = layerElement.querySelectorAll("." + ROOT_CLASS + "__control")[0]; - var layerControlIconElement = layerElement.querySelectorAll('svg, img')[0]; - - // give layer control element the same line height and font size as the control - var fontSize = window.getComputedStyle(controlElement).fontSize; - layerControlElement.style.fontSize = fontSize; - var height = controlElement.clientHeight; - if (layerControlIconElement && - height <= (layerControlIconElement.clientHeight + 1)) { - // adjust to align with underlying control when control uses all height - if ('down' === this.props.direction) { - layerControlElement.style.marginTop = '-1px'; - } else if ('up' === this.props.direction) { - layerControlElement.style.marginBottom = '1px'; - } - } - layerControlElement.style.height = height + 'px'; - layerControlElement.style.lineHeight = height + 'px'; - - this.startOverlay(controlElement, layerElement, this.props.align); + if (this.state.active) { + this._drop.render(this._renderDrop()); } }, - componentWillUnmount: function () { + componentWillUnmount: function componentWillUnmount() { document.removeEventListener('click', this._onClose); + if (this._drop) { + this._drop.remove(); + } }, - _renderControl: function () { + _renderControl: function _renderControl() { var result = null; var icon = null; - var controlClassName = ROOT_CLASS + "__control"; + var controlClassName = CLASS_ROOT + '__control'; var classes = [controlClassName]; if (this.props.icon) { - classes.push(controlClassName + "--labelled"); + classes.push(controlClassName + '--labelled'); icon = this.props.icon; } else { - classes.push(controlClassName + "--fixed-label"); + classes.push(controlClassName + '--fixed-label'); icon = React.createElement(MoreIcon, null); } if (this.props.label) { - result = ( - React.createElement("div", {className: classes.join(' ')}, - React.createElement("div", {className: controlClassName + "-icon"}, - icon - ), - React.createElement("span", {className: controlClassName + "-label"}, this.props.label), - React.createElement(DropCaretIcon, {className: controlClassName + "-drop-icon"}) - ) + result = React.createElement( + 'div', + { className: classes.join(' ') }, + React.createElement( + 'div', + { className: controlClassName + '-icon' }, + icon + ), + React.createElement( + 'span', + { className: controlClassName + '-label' }, + this.props.label + ), + React.createElement(DropCaretIcon, { className: controlClassName + '-drop-icon' }) ); } else { - result = ( - React.createElement("div", {className: controlClassName}, - icon - ) + result = React.createElement( + 'div', + { className: controlClassName }, + icon ); } return result; }, - _classes: function (prefix) { + _renderDrop: function _renderDrop() { + var other = pick(this.props, keys(Box.propTypes)); + + var controlContents = React.createElement( + 'div', + { onClick: this._onClose }, + this._renderControl() + ); + + var onClick; + if (this.props.closeOnClick) { + onClick = this._onClose; + } else { + onClick = this._onSink; + } + + return React.createElement( + MenuDrop, + _extends({ router: this.context.router, + dropAlign: this.props.dropAlign + }, other, { + onClick: onClick, + id: this.state.dropId, + control: controlContents }), + this.props.children + ); + }, + + _classes: function _classes(prefix) { var classes = [prefix]; if (this.props.direction) { - classes.push(prefix + "--" + this.props.direction); + classes.push(prefix + '--' + this.props.direction); } if (this.props.align) { - classes.push(prefix + "--align-" + this.props.align); + classes.push(prefix + '--align-' + this.props.align); } if (this.props.small) { - classes.push(prefix + "--small"); + classes.push(prefix + '--small'); } if (this.props.primary) { - classes.push(prefix + "--primary"); + classes.push(prefix + '--primary'); } return classes; }, - render: function () { - var classes = this._classes(ROOT_CLASS); + render: function render() { + var classes = this._classes(CLASS_ROOT); if (this.state.inline) { - classes.push(ROOT_CLASS + "--inline"); + classes.push(CLASS_ROOT + '--inline'); } else { - classes.push(ROOT_CLASS + "--controlled"); + classes.push(CLASS_ROOT + '--controlled'); if (this.props.label) { - classes.push(ROOT_CLASS + "--labelled"); + classes.push(CLASS_ROOT + '--labelled'); } } if (this.props.className) { @@ -10233,69 +12837,26 @@ var Grommet = } if (this.state.inline) { + var other = pick(this.props, keys(Box.propTypes)); - return ( - React.createElement("div", {className: classes.join(' '), onClick: this._onClose}, - this.props.children - ) + return React.createElement( + Box, + _extends({ tag: 'nav' }, other, { className: classes.join(' '), onClick: this._onClose }), + this.props.children ); - } else { var controlContents = this._renderControl(); - return ( - React.createElement("div", {ref: "control", className: classes.join(' '), - tabIndex: "0", - onClick: this._onOpen, - onFocus: this._onFocusControl, - onBlur: this._onBlurControl}, - controlContents - ) - ); - - } - }, - - renderLayer: function() { - if (this.state.active) { - - var controlContents = ( - React.createElement("div", {onClick: this._onClose}, - this._renderControl() - ) - ); - - var first = null; - var second = null; - if ('up' === this.props.direction) { - first = this.props.children; - second = controlContents; - } else { - first = controlContents; - second = this.props.children; - } - - var onClick; - if (this.props.closeOnClick) { - onClick = this._onClose; - } else { - onClick = this._onSink; - } - - return ( - React.createElement(MenuLayer, {router: this.context.router, - align: this.props.align, - direction: this.props.direction, - onClick: onClick, - id: this.state.layerId}, - first, - second - ) + return React.createElement( + 'div', + { ref: 'control', className: classes.join(' '), + tabIndex: '0', + onClick: this._onOpen, + onFocus: this._onFocusControl, + onBlur: this._onBlurControl }, + controlContents ); - - } else { - return (React.createElement("span", null)); } } @@ -10303,297 +12864,220 @@ var Grommet = module.exports = Menu; - /***/ }, -/* 58 */ +/* 105 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014 Hewlett-Packard Development Company, L.P. - var DOM = __webpack_require__(59); - - // Overlay is a mixin for ensuring components layerd on top align with their initiating controls underneath. - var Overlay = { - - _overlay: { - controlElement: null, - layerElement: null, - align: null, - scrollParents: [] - }, - - startOverlay: function (controlElement, layerElement, align) { - this._overlay.controlElement = controlElement; - this._overlay.layerElement = layerElement; - this._overlay.align = align; - this._overlay.scrollParents = DOM.findScrollParents(this._overlay.controlElement); - this._overlay.scrollParents.forEach(function (parent) { - parent.addEventListener('scroll', this.positionOverlay); - }, this); - window.addEventListener('resize', this.positionOverlay); - - this.positionOverlay(); - }, - - stopOverlay: function () { - if (this._overlay.controlElement) { - this._overlay.scrollParents.forEach(function (parent) { - parent.removeEventListener('scroll', this.positionOverlay); - }, this); - window.removeEventListener('resize', this.positionOverlay); - this._overlay.controlElement = null; - this._overlay.layerElement = null; - this._overlay.align = null; - this._overlay.scrollParents = []; - } - }, - - positionOverlay: function () { - var controlElement = this._overlay.controlElement; - var layerElement = this._overlay.layerElement; - - var controlRect = controlElement.getBoundingClientRect(); - var windowWidth = window.innerWidth; - - // clear prior styling - layerElement.style.left = ''; - layerElement.style.width = ''; - layerElement.style.top = ''; - - var width = Math.min( - Math.max(controlRect.width, layerElement.offsetWidth), - windowWidth); - // align right edge and make at least as wide as the control - var left = (controlRect.left + layerElement.offsetWidth) - width; - if ('right' === this._overlay.align) { - // align right edge - left = (controlRect.left + controlRect.width) - - layerElement.offsetWidth; - } else { - // align left edge - left = controlRect.left; - } - if ((left + width) > windowWidth) { - left -= ((left + width) - windowWidth); - } else if (left < 0) { - left = 0; - } - - var top = controlRect.top; - if ('up' === this.props.direction) { - // align bottom edge - top = (controlRect.top + controlRect.height) - - layerElement.offsetHeight; - } else if ('below' === this._overlay.align) { - // align top of layer to bottom of control - top = (controlRect.top + controlRect.height); - } - - // ensure height is within viewport - var maxHeight = window.innerHeight - top; - - layerElement.style.left = '' + left + 'px'; - layerElement.style.width = '' + width + 'px'; - layerElement.style.top = '' + top + 'px'; - layerElement.style.maxHeight = '' + maxHeight + 'px'; - }, + 'use strict'; - componentWillUnmount: function () { - this.stopOverlay(); - } - }; + var React = __webpack_require__(2); + var DOM = __webpack_require__(86); - module.exports = Overlay; + /* + * Drop is a utility for rendering components like drop down menus layered above + * their initiating controls. + */ + var VERTICAL_ALIGN_OPTIONS = ['top', 'bottom']; + var HORIZONTAL_ALIGN_OPTIONS = ['right', 'left']; -/***/ }, -/* 59 */ -/***/ function(module, exports) { + var Drop = { - // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + // How callers can validate a property for drop alignment which will be passed to add(). + alignPropType: React.PropTypes.shape({ + top: React.PropTypes.oneOf(VERTICAL_ALIGN_OPTIONS), + bottom: React.PropTypes.oneOf(VERTICAL_ALIGN_OPTIONS), + left: React.PropTypes.oneOf(HORIZONTAL_ALIGN_OPTIONS), + right: React.PropTypes.oneOf(HORIZONTAL_ALIGN_OPTIONS) + }), - module.exports = { - findScrollParents: function (element) { - var result = []; - var parent = element.parentNode; - while (parent) { - // account for border the lazy way for now - if (parent.scrollHeight > (parent.offsetHeight + 10)) { - result.push(parent); + // Add a drop component. + // + // control - DOM element to anchor the overlay on + // content - React node to render + // align - + // { + // top: top|bottom + // bottom: top|bottom + // left: left|right + // right: left|right + // } + + add: function add(control, content, align) { + // validate align + if (align && align.top && VERTICAL_ALIGN_OPTIONS.indexOf(align.top) === -1) { + console.warn('Warning: Invalid align.top value \'' + align.top + '\' supplied to Drop,' + 'expected one of [' + VERTICAL_ALIGN_OPTIONS.join(',') + ']'); + } + if (align && align.bottom && VERTICAL_ALIGN_OPTIONS.indexOf(align.bottom) === -1) { + console.warn('Warning: Invalid align.bottom value \'' + align.bottom + '\' supplied to Drop,' + 'expected one of [' + VERTICAL_ALIGN_OPTIONS.join(',') + ']'); + } + if (align && align.left && HORIZONTAL_ALIGN_OPTIONS.indexOf(align.left) === -1) { + console.warn('Warning: Invalid align.left value \'' + align.left + '\' supplied to Drop,' + 'expected one of [' + HORIZONTAL_ALIGN_OPTIONS.join(',') + ']'); + } + if (align && align.right && HORIZONTAL_ALIGN_OPTIONS.indexOf(align.right) === -1) { + console.warn('Warning: Invalid align.right value \'' + align.right + '\' supplied to Drop,' + 'expected one of [' + HORIZONTAL_ALIGN_OPTIONS.join(',') + ']'); + } + + // initialize data + var drop = { + control: control, + align: { + top: align.top, + bottom: align.bottom, + left: align.left, + right: align.right } - parent = parent.parentNode; - } - if (result.length === 0) { - result.push(document); + }; + if (!drop.align.top && !drop.align.bottom) { + drop.align.top = 'top'; } - return result; - } - }; - - -/***/ }, -/* 60 */ -/***/ function(module, exports, __webpack_require__) { - - // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. - - // http://jsfiddle.net/LBAr8/ - - var React = __webpack_require__(2); - - var ReactLayeredComponent = { - - componentWillUnmount: function() { - this._unrenderLayer(); - document.body.removeChild(this._target); - }, - componentDidUpdate: function() { - this._renderLayer(); - }, - componentDidMount: function() { - // Appending to the body is easier than managing the z-index of everything on the page. - // It's also better for accessibility and makes stacking a snap (since components will stack - // in mount order). - this._target = document.createElement('div'); - document.body.appendChild(this._target); - this._renderLayer(); - }, - _renderLayer: function() { - // By calling this method in componentDidMount() and componentDidUpdate(), you're effectively - // creating a "wormhole" that funnels React's hierarchical updates through to a DOM node on an - // entirely different part of the page. - React.render(this.renderLayer(), this._target); - }, - _unrenderLayer: function() { - React.unmountComponentAtNode(this._target); - } - }; - - module.exports = ReactLayeredComponent; - - -/***/ }, -/* 61 */ -/***/ function(module, exports) { - - // (C) Copyright 2014 Hewlett-Packard Development Company, L.P. - - // Allow callers to use key labels instead of key code numbers. - // This makes their code easier to read. - var KEYS = { - backspace: 8, - tab: 9, - enter: 13, - esc: 27, - escape: 27, - space: 32, - left: 37, - up: 38, - right: 39, - down: 40, - comma: 188 - }; - - // KeyboardAccelerators is a mixin for handling keyboard events. - // Add listeners using startListeningToKeyboard(). - // Remove listeners using stopListeningToKeyboard(). - // When the component that includes this is unmounted, the keyboard event - // listener is removed automatically. - var KeyboardAccelerators = { - - _keyboardAcceleratorHandlers: {}, - _keyboardAcceleratorListening: false, - - _onKeyboardAcceleratorKeyPress: function (e) { - var key = (e.keyCode ? e.keyCode : e.which); - if (this._keyboardAcceleratorHandlers.hasOwnProperty(key)) { - this._keyboardAcceleratorHandlers[key](e); + if (!drop.align.left && !drop.align.right) { + drop.align.left = 'left'; } - }, - // Add handlers for specific keys. - // This function can be called multiple times, existing handlers will - // be replaced, new handlers will be added. - startListeningToKeyboard: function (handlers) { - var keys = 0; - for (var key in handlers) { - if (handlers.hasOwnProperty(key)) { - var keyCode = key; - if (KEYS.hasOwnProperty(key)) { - keyCode = KEYS[key]; - } - keys += 1; - this._keyboardAcceleratorHandlers[keyCode] = handlers[key]; - } + // setup DOM + drop.container = document.createElement('div'); + if (drop.container.classList) { + drop.container.classList.add('drop'); + } else { + // unit test version + drop.container.className += ' drop'; } + document.body.appendChild(drop.container); + React.render(content, drop.container); - if (keys > 0 && ! this._keyboardAcceleratorListening) { - window.addEventListener("keydown", this._onKeyboardAcceleratorKeyPress); - this._keyboardAcceleratorListening = true; - } + drop.scrollParents = DOM.findScrollParents(drop.control); + drop.place = this._place.bind(this, drop); + drop.render = this._render.bind(this, drop); + drop.remove = this._remove.bind(this, drop); + + drop.scrollParents.forEach(function (scrollParent) { + scrollParent.addEventListener('scroll', drop.place); + }); + window.addEventListener('resize', drop.place); + + // position content + this._place(drop); + + return drop; }, - // Remove handlers for all keys or specific keys. - // If no argument is passed in, all handlers are removed. - // This function can be called multiple times, only the handlers - // specified will be removed. - stopListeningToKeyboard: function (handlers) { - if (handlers) { - for (var key in handlers) { - if (handlers.hasOwnProperty(key)) { - var keyCode = key; - if (KEYS.hasOwnProperty(key)) { - keyCode = KEYS[key]; - } - delete this._keyboardAcceleratorHandlers[keyCode]; - } + _render: function _render(drop, content) { + React.render(content, drop.container); + // in case content changed, re-place + setTimeout(this._place.bind(this, drop), 1); + }, + + _remove: function _remove(drop) { + drop.scrollParents.forEach(function (scrollParent) { + scrollParent.removeEventListener('scroll', drop.place); + }); + window.removeEventListener('resize', drop.place); + + React.unmountComponentAtNode(drop.container); + document.body.removeChild(drop.container); + }, + + _place: function _place(drop) { + var control = drop.control; + var container = drop.container; + var align = drop.align; + var controlRect = control.getBoundingClientRect(); + var containerRect = container.getBoundingClientRect(); + var windowWidth = window.innerWidth; + var windowHeight = window.innerHeight; + + // clear prior styling + container.style.left = ''; + container.style.width = ''; + container.style.top = ''; + + var width = Math.min(Math.max(controlRect.width, containerRect.width), windowWidth); + var left; + var top; + + if (align.left) { + if ('left' === align.left) { + left = controlRect.left; + } else if ('right' === align.left) { + left = controlRect.left - width; + } + } else if (align.right) { + if ('left' === align.right) { + left = controlRect.left - width; + } else if ('right' === align.right) { + left = controlRect.left + controlRect.width - width; } } + if (left + width > windowWidth) { + left -= left + width - windowWidth; + } else if (left < 0) { + left = 0; + } - var keyCount = 0; - for (var keyHandler in this._keyboardAcceleratorHandlers) { - if (this._keyboardAcceleratorHandlers.hasOwnProperty(keyHandler)) { - keyCount += 1; + if (align.top) { + if ('top' === align.top) { + top = controlRect.top; + } else if ('bottom' === align.top) { + top = controlRect.top + controlRect.height; + } + } else if (align.bottom) { + if ('top' === align.bottom) { + top = controlRect.top - containerRect.height; + } else if ('bottom' === align.bottom) { + top = controlRect.top + controlRect.height - containerRect.height; } } - - if (! handlers || 0 === keyCount) { - window.removeEventListener("keydown", this._onKeyboardAcceleratorKeyPress); - this._keyboardAcceleratorHandlers = {}; - this._keyboardAcceleratorListening = false; + if (top + containerRect.height > windowHeight) { + // For now, just slide up so we can see it. + // TODO: when we don't want to cover the control, like with SearchInput and Calendar, + // add bottom margin to the control to allow the user to scroll down if needed. + if (align.top === 'bottom') { + top = controlRect.top - containerRect.height; + } else { + top = Math.max(controlRect.bottom - containerRect.height, top - (top + containerRect.height - windowHeight)); + } + } else if (top < 0) { + top = 0; } - }, - componentWillUnmount: function () { - this.stopListeningToKeyboard(); + container.style.left = '' + left + 'px'; + container.style.width = '' + width + 'px'; + container.style.top = '' + top + 'px'; } }; - module.exports = KeyboardAccelerators; - + module.exports = Drop; /***/ }, -/* 62 */ +/* 106 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var More = React.createClass({displayName: "More", + var More = React.createClass({ + displayName: 'More', - render: function() { + render: function render() { var className = 'control-icon control-icon-more'; if (this.props.className) { className += ' ' + this.props.className; } - return ( - React.createElement("svg", {className: className, viewBox: "0 0 48 48", version: "1.1"}, - React.createElement("g", {fill: "none"}, - React.createElement("rect", {x: "23", y: "23", strokeWidth: "2", width: "2", height: "2"}), - React.createElement("rect", {x: "15", y: "23", strokeWidth: "2", width: "2", height: "2"}), - React.createElement("rect", {x: "31", y: "23", strokeWidth: "2", width: "2", height: "2"}) - ) + return React.createElement( + 'svg', + { className: className, viewBox: '0 0 48 48', version: '1.1' }, + React.createElement( + 'g', + { fill: 'none' }, + React.createElement('rect', { x: '23', y: '23', strokeWidth: '2', width: '2', height: '2' }), + React.createElement('rect', { x: '15', y: '23', strokeWidth: '2', width: '2', height: '2' }), + React.createElement('rect', { x: '31', y: '23', strokeWidth: '2', width: '2', height: '2' }) ) ); } @@ -10602,27 +13086,31 @@ var Grommet = module.exports = More; - /***/ }, -/* 63 */ +/* 107 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var DropCaret = React.createClass({displayName: "DropCaret", + var DropCaret = React.createClass({ + displayName: 'DropCaret', - render: function() { + render: function render() { var className = 'control-icon control-icon-drop-caret'; if (this.props.className) { className += ' ' + this.props.className; } - return ( - React.createElement("svg", {className: className, viewBox: "0 0 48 48", version: "1.1"}, - React.createElement("g", {stroke: "none"}, - React.createElement("polygon", {points: "33.4,19.7 24.1,30.3 14.8,19.7"}) - ) + return React.createElement( + 'svg', + { className: className, viewBox: '0 0 48 48', version: '1.1' }, + React.createElement( + 'g', + { stroke: 'none' }, + React.createElement('polygon', { points: '33.4,19.7 24.1,30.3 14.8,19.7' }) ) ); } @@ -10631,17 +13119,18 @@ var Grommet = module.exports = DropCaret; - /***/ }, -/* 64 */ +/* 108 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var Legend = __webpack_require__(48); + var Legend = __webpack_require__(91); - var CLASS_ROOT = "meter"; + var CLASS_ROOT = 'meter'; var BAR_LENGTH = 192; var BAR_THICKNESS = 24; @@ -10652,55 +13141,45 @@ var Grommet = var ARC_HEIGHT = 144; - function polarToCartesian (centerX, centerY, radius, angleInDegrees) { + function polarToCartesian(centerX, centerY, radius, angleInDegrees) { var angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0; return { - x: centerX + (radius * Math.cos(angleInRadians)), - y: centerY + (radius * Math.sin(angleInRadians)) + x: centerX + radius * Math.cos(angleInRadians), + y: centerY + radius * Math.sin(angleInRadians) }; } - function arcCommands (x, y, radius, startAngle, endAngle) { + function arcCommands(x, y, radius, startAngle, endAngle) { var start = polarToCartesian(x, y, radius, endAngle); var end = polarToCartesian(x, y, radius, startAngle); - var arcSweep = endAngle - startAngle <= 180 ? "0" : "1"; - var d = [ - "M", start.x, start.y, - "A", radius, radius, 0, arcSweep, 0, end.x, end.y - ].join(" "); + var arcSweep = endAngle - startAngle <= 180 ? '0' : '1'; + var d = ['M', start.x, start.y, 'A', radius, radius, 0, arcSweep, 0, end.x, end.y].join(' '); return d; } - function activeIndicatorCommands (x, y, radius, startAngle, endAngle) { - var point = polarToCartesian(x, y, radius - 30, endAngle - 1); + function singleIndicatorCommands(x, y, radius, startAngle, endAngle, length) { + var point = polarToCartesian(x, y, radius - length, endAngle - 1); var start = polarToCartesian(x, y, radius, endAngle - 1); - var d = ["M", start.x, start.y, - "L", point.x, point.y - ].join(" "); + var d = ['M', start.x, start.y, 'L', point.x, point.y].join(' '); return d; } - var Meter = React.createClass({displayName: "Meter", + var Meter = React.createClass({ + displayName: 'Meter', propTypes: { important: React.PropTypes.number, large: React.PropTypes.bool, legend: React.PropTypes.bool, legendTotal: React.PropTypes.bool, - max: React.PropTypes.oneOfType([ - React.PropTypes.shape({ - value: React.PropTypes.number.isRequired, - label: React.PropTypes.string - }), - React.PropTypes.number - ]), - min: React.PropTypes.oneOfType([ - React.PropTypes.shape({ - value: React.PropTypes.number.isRequired, - label: React.PropTypes.string - }), - React.PropTypes.number - ]), + max: React.PropTypes.oneOfType([React.PropTypes.shape({ + value: React.PropTypes.number.isRequired, + label: React.PropTypes.string + }), React.PropTypes.number]), + min: React.PropTypes.oneOfType([React.PropTypes.shape({ + value: React.PropTypes.number.isRequired, + label: React.PropTypes.string + }), React.PropTypes.number]), series: React.PropTypes.arrayOf(React.PropTypes.shape({ label: React.PropTypes.string, value: React.PropTypes.number.isRequired, @@ -10721,13 +13200,13 @@ var Grommet = vertical: React.PropTypes.bool }, - getDefaultProps: function () { + getDefaultProps: function getDefaultProps() { return { type: 'bar' }; }, - _initialTimeout: function () { + _initialTimeout: function _initialTimeout() { this.setState({ initial: false, activeIndex: this.state.importantIndex @@ -10735,23 +13214,23 @@ var Grommet = clearTimeout(this._timeout); }, - _onActivate: function (index) { - this.setState({initial: false, activeIndex: index}); + _onActivate: function _onActivate(index) { + this.setState({ initial: false, activeIndex: index }); }, - _onResize: function() { + _onResize: function _onResize() { // debounce clearTimeout(this._resizeTimer); this._resizeTimer = setTimeout(this._layout, 50); }, - _layout: function () { + _layout: function _layout() { // legendPosition based on available window orientation var ratio = window.innerWidth / window.innerHeight; if (ratio < 0.8) { - this.setState({legendPosition: 'bottom'}); + this.setState({ legendPosition: 'bottom' }); } else if (ratio > 1.2) { - this.setState({legendPosition: 'right'}); + this.setState({ legendPosition: 'right' }); } /* // content based on available real estate @@ -10771,21 +13250,40 @@ var Grommet = */ }, - _normalizeSeries: function (props, min, max) { + _normalizeSeries: function _normalizeSeries(props, min, max, thresholds) { var series = []; if (props.series) { series = props.series; } else if (props.value) { - //var remaining = max.value - props.value; - series = [ - {value: props.value, important: true} //, - //{value: remaining, colorIndex: 'unset'} - ]; + series = [{ value: props.value, important: true }]; + } + + // set color index + if (series.length === 1 && props.thresholds) { + var item = series[0]; + if (!item.colorIndex) { + // see which threshold color index to use + var cumulative = 0; + thresholds.some(function (threshold) { + cumulative += threshold.value; + if (item.value < cumulative) { + item.colorIndex = threshold.colorIndex || 'graph-1'; + return true; + } + }); + } + } else { + series.forEach(function (item, index) { + if (!item.colorIndex) { + item.colorIndex = 'graph-' + (index + 1); + } + }); } + return series; }, - _normalizeThresholds: function (props, min, max) { + _normalizeThresholds: function _normalizeThresholds(props, min, max) { var thresholds = []; if (props.thresholds) { // Convert thresholds from absolute values to cummulative, @@ -10801,26 +13299,24 @@ var Grommet = thresholds[i - 1].value = threshold.value - total; total += thresholds[i - 1].value; } - if (i === (props.thresholds.length - 1)) { + if (i === props.thresholds.length - 1) { thresholds[i].value = max.value - total; } } } else if (props.threshold) { var remaining = max.value - props.threshold; - thresholds = [ - {value: props.threshold, colorIndex: 'unset'}, - {value: remaining, colorIndex: 'error'} - ]; + thresholds = [{ value: props.threshold, colorIndex: 'unset' }, { value: remaining, colorIndex: 'error' }]; } else { - thresholds = [ - {value: max.value, colorIndex: 'unset'} - ]; + thresholds = [{ value: max.value, colorIndex: 'unset' }]; } return thresholds; }, - _importantIndex: function (series) { - var result = series.length - 1; + _importantIndex: function _importantIndex(series) { + var result = null; + if (series.length === 1) { + result = 0; + } if (this.props.hasOwnProperty('important')) { result = this.props.important; } @@ -10834,14 +13330,14 @@ var Grommet = }, // Normalize min or max to an object. - _terminal: function (terminal) { + _terminal: function _terminal(terminal) { if (typeof terminal === 'number') { - terminal = {value: terminal}; + terminal = { value: terminal }; } return terminal; }, - _seriesTotal: function (series) { + _seriesTotal: function _seriesTotal(series) { var total = 0; series.some(function (item) { total += item.value; @@ -10849,7 +13345,7 @@ var Grommet = return total; }, - _viewBoxDimensions: function () { + _viewBoxDimensions: function _viewBoxDimensions() { var viewBoxHeight; var viewBoxWidth; if ('arc' === this.props.type) { @@ -10876,7 +13372,7 @@ var Grommet = }, // Generates state based on the provided props. - _stateFromProps: function (props) { + _stateFromProps: function _stateFromProps(props) { var total; if (props.series && props.series.length > 1) { total = this._seriesTotal(props.series); @@ -10890,13 +13386,12 @@ var Grommet = // Max could be provided in props or come from the total of // a multi-value series. var max = this._terminal(props.max || total); - // Normalize simple value prop to a series, if needed. - var series = this._normalizeSeries(props, min, max); // Normalize simple threshold prop to an array, if needed. var thresholds = this._normalizeThresholds(props, min, max); + // Normalize simple value prop to a series, if needed. + var series = this._normalizeSeries(props, min, max, thresholds); // Determine important index. var importantIndex = this._importantIndex(series); - ///total = this._seriesTotal(series); // Determine the viewBox dimensions var viewBoxDimensions = this._viewBoxDimensions(); @@ -10931,64 +13426,61 @@ var Grommet = return state; }, - getInitialState: function() { + getInitialState: function getInitialState() { var state = this._stateFromProps(this.props); state.legendPosition = 'bottom'; state.initial = true; return state; }, - componentDidMount: function() { + componentDidMount: function componentDidMount() { this._initialTimer = setTimeout(this._initialTimeout, 10); window.addEventListener('resize', this._onResize); this._onResize(); }, - componentWillReceiveProps: function (newProps) { + componentWillReceiveProps: function componentWillReceiveProps(newProps) { var state = this._stateFromProps(newProps); this.setState(state); this._onResize(); }, - componentWillUnmount: function() { + componentWillUnmount: function componentWillUnmount() { clearTimeout(this._initialTimer); clearTimeout(this._resizeTimer); window.removeEventListener('resize', this._onResize); }, - _itemColorIndex: function (item, index) { - return item.colorIndex || ('graph-' + (index + 1)); - }, + //_itemColorIndex: function (item, index) { + // return item.colorIndex || ('graph-' + (index + 1)); + //}, - _translateBarWidth: function (value) { + _translateBarWidth: function _translateBarWidth(value) { return Math.round(this.state.scale * value); }, - _barCommands: function (start, distance) { + _barCommands: function _barCommands(start, distance) { var commands; if (this.props.vertical) { - commands = "M" + MID_BAR_THICKNESS + "," + (BAR_LENGTH - start) + - " L" + MID_BAR_THICKNESS + "," + (BAR_LENGTH - (start + distance)); + commands = 'M' + MID_BAR_THICKNESS + ',' + (BAR_LENGTH - start) + ' L' + MID_BAR_THICKNESS + ',' + (BAR_LENGTH - (start + distance)); } else { - commands = "M" + start + "," + MID_BAR_THICKNESS + - " L" + (start + distance) + "," + MID_BAR_THICKNESS; + commands = 'M' + start + ',' + MID_BAR_THICKNESS + ' L' + (start + distance) + ',' + MID_BAR_THICKNESS; } return commands; }, - _renderBar: function (series) { + _renderBar: function _renderBar(series) { var start = 0; var minRemaining = this.state.min.value; var classes; var commands; var paths = series.map(function (item, index) { - var colorIndex = this._itemColorIndex(item, index); - classes = [CLASS_ROOT + "__bar"]; + classes = [CLASS_ROOT + '__bar']; if (index === this.state.activeIndex) { - classes.push(CLASS_ROOT + "__bar--active"); + classes.push(CLASS_ROOT + '__bar--active'); } - classes.push("color-index-" + colorIndex); + classes.push('color-index-' + item.colorIndex); var value = item.value - minRemaining; minRemaining = Math.max(0, minRemaining - item.value); @@ -10996,161 +13488,149 @@ var Grommet = commands = this._barCommands(start, distance); start += distance; - return ( - React.createElement("path", {key: index, className: classes.join(' '), d: commands, - onMouseOver: this._onActivate.bind(this, index), - onMouseOut: this._onActivate.bind(this, this.state.importantIndex), - onClick: item.onClick}) - ); + return React.createElement('path', { key: index, className: classes.join(' '), d: commands, + onMouseOver: this._onActivate.bind(this, index), + onMouseOut: this._onActivate.bind(this, this.state.importantIndex), + onClick: item.onClick }); }, this); if (paths.length === 0) { - classes = [CLASS_ROOT + "__bar"]; - classes.push(CLASS_ROOT + "__bar--loading"); - classes.push("color-index-loading"); + classes = [CLASS_ROOT + '__bar']; + classes.push(CLASS_ROOT + '__bar--loading'); + classes.push('color-index-loading'); commands = this._barCommands(0, BAR_LENGTH); - paths.push( - React.createElement("path", {key: "loading", className: classes.join(' '), d: commands}) - ); + paths.push(React.createElement('path', { key: 'loading', className: classes.join(' '), d: commands })); } return paths; }, - _translateEndAngle: function (startAngle, value) { - return Math.min(360, Math.max(0, - startAngle + (this.state.anglePer * value))); + _translateEndAngle: function _translateEndAngle(startAngle, value) { + return Math.min(360, Math.max(0, startAngle + this.state.anglePer * value)); }, - _arcCommands: function (startAngle, endAngle) { - return arcCommands(CIRCLE_WIDTH / 2, CIRCLE_WIDTH / 2, CIRCLE_RADIUS, - startAngle + this.state.angleOffset, - endAngle + this.state.angleOffset); + _arcCommands: function _arcCommands(startAngle, endAngle) { + return arcCommands(CIRCLE_WIDTH / 2, CIRCLE_WIDTH / 2, CIRCLE_RADIUS, startAngle + this.state.angleOffset, endAngle + this.state.angleOffset); }, - _renderArcOrCircle: function (series) { + _renderArcOrCircle: function _renderArcOrCircle(series) { var startAngle = this.state.startAngle; var classes; var endAngle; var commands; var paths = series.map(function (item, index) { - var classes = [CLASS_ROOT + "__slice"]; + var classes = [CLASS_ROOT + '__slice']; if (index === this.state.activeIndex) { - classes.push(CLASS_ROOT + "__slice--active"); + classes.push(CLASS_ROOT + '__slice--active'); } - var colorIndex = this._itemColorIndex(item, index); - classes.push("color-index-" + colorIndex); + classes.push('color-index-' + item.colorIndex); endAngle = this._translateEndAngle(startAngle, item.value); commands = this._arcCommands(startAngle, endAngle); startAngle = endAngle; - return ( - React.createElement("path", {key: item.label || index, fill: "none", - className: classes.join(' '), d: commands, - onMouseOver: this._onActivate.bind(this, index), - onMouseOut: this._onActivate.bind(this, this.state.importantIndex), - onClick: item.onClick}) - ); + return React.createElement('path', { key: item.label || index, fill: 'none', + className: classes.join(' '), d: commands, + onMouseOver: this._onActivate.bind(this, index), + onMouseOut: this._onActivate.bind(this, this.state.importantIndex), + onClick: item.onClick }); }, this); if (paths.length === 0) { - classes = [CLASS_ROOT + "__slice"]; - classes.push(CLASS_ROOT + "__slice--loading"); - classes.push("color-index-loading"); + classes = [CLASS_ROOT + '__slice']; + classes.push(CLASS_ROOT + '__slice--loading'); + classes.push('color-index-loading'); endAngle = this._translateEndAngle(this.state.startAngle, this.state.max.value); commands = this._arcCommands(this.state.startAngle, endAngle); - paths.push( - React.createElement("path", {key: "loading", className: classes.join(' '), d: commands}) - ); + paths.push(React.createElement('path', { key: 'loading', className: classes.join(' '), d: commands })); } return paths; }, - _renderActiveIndicator: function (series) { - var activeIndicator = null; + _renderSingleIndicator: function _renderSingleIndicator(series) { + var seriesIndicator = null; var startAngle = this.state.startAngle; series.forEach(function (item, index) { - var colorIndex = this._itemColorIndex(item, index); var endAngle = this._translateEndAngle(startAngle, item.value); if (index === this.state.activeIndex) { - var indicatorCommands = - activeIndicatorCommands(CIRCLE_WIDTH / 2, CIRCLE_WIDTH / 2, CIRCLE_RADIUS, - startAngle + this.state.angleOffset, - endAngle + this.state.angleOffset); - activeIndicator = ( - React.createElement("path", {fill: "none", - className: CLASS_ROOT + "__slice-indicator color-index-" + colorIndex, - d: indicatorCommands}) - ); + var length; + if ('arc' === this.props.type) { + length = CIRCLE_RADIUS; + } else { + length = CIRCLE_RADIUS * 0.60; + } + var indicatorCommands = singleIndicatorCommands(CIRCLE_WIDTH / 2, CIRCLE_WIDTH / 2, CIRCLE_RADIUS * 1.1, startAngle + this.state.angleOffset, endAngle + this.state.angleOffset, length); + seriesIndicator = React.createElement('path', { fill: 'none', + className: CLASS_ROOT + '__slice-indicator color-index-' + item.colorIndex, + d: indicatorCommands }); } startAngle = endAngle; }, this); - return activeIndicator; + return seriesIndicator; }, - _renderActive: function () { - var result; - var active = this.state.series[this.state.activeIndex]; - if ('arc' === this.props.type || 'circle' === this.props.type) { - result = ( - React.createElement("div", {className: CLASS_ROOT + "__active"}, - React.createElement("div", {className: CLASS_ROOT + "__active-value large-number-font"}, - active.value, - React.createElement("span", {className: CLASS_ROOT + "__active-units large-number-font"}, - this.props.units - ) - ), - React.createElement("div", {className: CLASS_ROOT + "__active-label"}, - active.label - ) - ) - ); - } else if ('bar' === this.props.type) { - result = ( - React.createElement("span", {className: CLASS_ROOT + "__active"}, - React.createElement("span", {className: CLASS_ROOT + "__active-value large-number-font"}, - active.value - ), - React.createElement("span", {className: CLASS_ROOT + "__active-units large-number-font"}, - this.props.units - ) + _renderActive: function _renderActive() { + var fields; + if (null === this.state.activeIndex) { + fields = { value: this.state.total, label: 'Total' }; + } else { + var active = this.state.series[this.state.activeIndex]; + fields = { value: active.value, label: active.label }; + } + return React.createElement( + 'div', + { className: CLASS_ROOT + '__active' }, + React.createElement( + 'span', + { className: CLASS_ROOT + '__active-value large-number-font' }, + fields.value, + React.createElement( + 'span', + { className: CLASS_ROOT + '__active-units large-number-font' }, + this.props.units ) - ); - } - return result; + ), + React.createElement( + 'span', + { className: CLASS_ROOT + '__active-label' }, + fields.label + ) + ); }, - _renderLegend: function () { - return ( - React.createElement(Legend, {className: CLASS_ROOT + "__legend", - series: this.state.series, - units: this.props.units, - activeIndex: this.state.activeIndex, - onActive: this._onActive}) - ); + _renderLegend: function _renderLegend() { + return React.createElement(Legend, { className: CLASS_ROOT + '__legend', + series: this.state.series, + units: this.props.units, + activeIndex: this.state.activeIndex, + onActive: this._onActive }); }, - render: function() { + render: function render() { var classes = [CLASS_ROOT]; - classes.push(CLASS_ROOT + "--" + this.props.type); - classes.push(CLASS_ROOT + "--legend-" + this.state.legendPosition); + classes.push(CLASS_ROOT + '--' + this.props.type); + classes.push(CLASS_ROOT + '--legend-' + this.state.legendPosition); if (this.props.vertical) { - classes.push(CLASS_ROOT + "--vertical"); + classes.push(CLASS_ROOT + '--vertical'); } if (this.props.small) { - classes.push(CLASS_ROOT + "--small"); + classes.push(CLASS_ROOT + '--small'); } if (this.props.large) { - classes.push(CLASS_ROOT + "--large"); + classes.push(CLASS_ROOT + '--large'); } if (this.state.series.length === 0) { - classes.push(CLASS_ROOT + "--loading"); + classes.push(CLASS_ROOT + '--loading'); + } else if (this.state.series.length === 1) { + classes.push(CLASS_ROOT + '--single'); + } + if (this.state.activeIndex !== null) { + classes.push(CLASS_ROOT + '--active'); } if (this.props.className) { classes.push(this.props.className); @@ -11158,11 +13638,13 @@ var Grommet = var values = null; var thresholds = null; - var activeIndicator = null; + var singleIndicator = null; if ('arc' === this.props.type || 'circle' === this.props.type) { values = this._renderArcOrCircle(this.state.series); thresholds = this._renderArcOrCircle(this.state.thresholds); - activeIndicator = this._renderActiveIndicator(this.state.series); + if (this.state.series.length === 1) { + singleIndicator = this._renderSingleIndicator(this.state.series); + } } else if ('bar' === this.props.type) { values = this._renderBar(this.state.series); thresholds = this._renderBar(this.state.thresholds); @@ -11170,58 +13652,68 @@ var Grommet = var minLabel = null; if (this.state.min.label) { - minLabel = ( - React.createElement("div", {className: CLASS_ROOT + "__label-min"}, - this.state.min.label - ) + minLabel = React.createElement( + 'div', + { className: CLASS_ROOT + '__label-min' }, + this.state.min.label ); } var maxLabel = null; if (this.state.max.label) { - maxLabel = ( - React.createElement("div", {className: CLASS_ROOT + "__label-max"}, - this.state.max.label - ) + maxLabel = React.createElement( + 'div', + { className: CLASS_ROOT + '__label-max' }, + this.state.max.label ); } - var active = null; - if (this.state.activeIndex >= 0) { - active = this._renderActive(); - } + var active = this._renderActive(); var legend = null; if (this.props.legend) { legend = this._renderLegend(); } - return ( - React.createElement("div", {className: classes.join(' ')}, - React.createElement("div", {className: CLASS_ROOT + "__active-graphic"}, - React.createElement("div", {className: CLASS_ROOT + "__labeled-graphic"}, - React.createElement("svg", {className: CLASS_ROOT + "__graphic", - viewBox: "0 0 " + this.state.viewBoxWidth + - " " + this.state.viewBoxHeight, - preserveAspectRatio: "xMidYMid meet"}, - React.createElement("g", {className: CLASS_ROOT + "__thresholds"}, - thresholds - ), - React.createElement("g", {className: CLASS_ROOT + "__values"}, - values - ), - activeIndicator - ), - React.createElement("div", {className: CLASS_ROOT + "__labels-container"}, - React.createElement("div", {className: CLASS_ROOT + "__labels"}, - minLabel, - maxLabel - ) + return React.createElement( + 'div', + { className: classes.join(' ') }, + React.createElement( + 'div', + { className: CLASS_ROOT + '__active-graphic' }, + React.createElement( + 'div', + { className: CLASS_ROOT + '__labeled-graphic' }, + React.createElement( + 'svg', + { className: CLASS_ROOT + '__graphic', + viewBox: '0 0 ' + this.state.viewBoxWidth + ' ' + this.state.viewBoxHeight, + preserveAspectRatio: 'xMidYMid meet' }, + React.createElement( + 'g', + { className: CLASS_ROOT + '__thresholds' }, + thresholds + ), + React.createElement( + 'g', + { className: CLASS_ROOT + '__values' }, + values + ), + singleIndicator + ), + React.createElement( + 'div', + { className: CLASS_ROOT + '__labels-container' }, + React.createElement( + 'div', + { className: CLASS_ROOT + '__labels' }, + minLabel, + maxLabel ) - ), - active - ), - legend - ) + ) + ), + active + ), + legend ); } @@ -11229,58 +13721,66 @@ var Grommet = module.exports = Meter; - /***/ }, -/* 65 */ +/* 109 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var Panel = React.createClass({displayName: "Panel", + var Panel = React.createClass({ + displayName: 'Panel', propTypes: { direction: React.PropTypes.string, index: React.PropTypes.oneOf([1, 2]) }, - render: function() { - var classes = ["panel"]; + render: function render() { + var classes = ['panel']; if (this.props.direction === 'horizontal') { - classes.push("panel--horizontal"); + classes.push('panel--horizontal'); } if (this.props.index) { - classes.push("panel--index-" + this.props.index); + classes.push('panel--index-' + this.props.index); } var title = null; if (this.props.title) { - title = (React.createElement("h2", {className: "panel__title"}, this.props.title)); + title = React.createElement( + 'h2', + { className: 'panel__title' }, + this.props.title + ); } - return ( - React.createElement("div", {className: classes.join(' ')}, - title, - this.props.children - ) + return React.createElement( + 'div', + { className: classes.join(' ') }, + title, + this.props.children ); } }); module.exports = Panel; - /***/ }, -/* 66 */ +/* 110 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var CLASS_ROOT = "radio-button"; + var CLASS_ROOT = 'radio-button'; - var RadioButton = React.createClass({displayName: "RadioButton", + var RadioButton = React.createClass({ + displayName: 'RadioButton', propTypes: { checked: React.PropTypes.bool, @@ -11292,23 +13792,25 @@ var Grommet = value: React.PropTypes.string }, - render: function () { + render: function render() { var classes = [CLASS_ROOT]; if (this.props.className) { classes.push(this.props.className); } - return ( - React.createElement("label", {className: classes.join(' ')}, - React.createElement("input", {className: CLASS_ROOT + "__input", - id: this.props.id, name: this.props.name, type: "radio", - checked: this.props.checked, - defaultChecked: this.props.defaultChecked, - value: this.props.value, - onChange: this.props.onChange}), - React.createElement("span", {className: CLASS_ROOT + "__control"}), - React.createElement("span", {className: CLASS_ROOT + "__label"}, - this.props.label - ) + return React.createElement( + 'label', + { className: classes.join(' ') }, + React.createElement('input', { className: CLASS_ROOT + '__input', + id: this.props.id, name: this.props.name, type: 'radio', + checked: this.props.checked, + defaultChecked: this.props.defaultChecked, + value: this.props.value, + onChange: this.props.onChange }), + React.createElement('span', { className: CLASS_ROOT + '__control' }), + React.createElement( + 'span', + { className: CLASS_ROOT + '__label' }, + this.props.label ) ); } @@ -11317,117 +13819,119 @@ var Grommet = module.exports = RadioButton; - /***/ }, -/* 67 */ +/* 111 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var ReactLayeredComponent = __webpack_require__(60); - var KeyboardAccelerators = __webpack_require__(61); - var Overlay = __webpack_require__(58); - var SearchIcon = __webpack_require__(68); - var IntlMixin = __webpack_require__(4); + var KeyboardAccelerators = __webpack_require__(85); + var Drop = __webpack_require__(105); + var SearchIcon = __webpack_require__(112); + var IntlMixin = __webpack_require__(3); - var CLASS_ROOT = "search"; + var CLASS_ROOT = 'search'; - var Search = React.createClass({displayName: "Search", + var Search = React.createClass({ + displayName: 'Search', propTypes: { - align: React.PropTypes.oneOf(['left', 'right']), defaultValue: React.PropTypes.string, + dropAlign: Drop.alignPropType, inline: React.PropTypes.bool, onChange: React.PropTypes.func, placeHolder: React.PropTypes.string, - suggestions: React.PropTypes.arrayOf(React.PropTypes.string) + suggestions: React.PropTypes.arrayOf(React.PropTypes.string), + value: React.PropTypes.string }, - getDefaultProps: function () { + getDefaultProps: function getDefaultProps() { return { align: 'left', inline: false, - placeHolder: 'Search' + placeHolder: 'Search', + dropAlign: { top: 'top', left: 'left' } }; }, - mixins: [ReactLayeredComponent, KeyboardAccelerators, Overlay, IntlMixin], + mixins: [KeyboardAccelerators, IntlMixin], - _onAddLayer: function (event) { + _onAddDrop: function _onAddDrop(event) { event.preventDefault(); - this.setState({layer: true, activeSuggestionIndex: -1}); + this.setState({ dropActive: true, activeSuggestionIndex: -1 }); }, - _onRemoveLayer: function () { - this.setState({layer: false}); + _onRemoveDrop: function _onRemoveDrop() { + this.setState({ dropActive: false }); }, - _onFocusControl: function () { + _onFocusControl: function _onFocusControl() { this.setState({ controlFocused: true, - layer: true, + dropActive: true, activeSuggestionIndex: -1 }); }, - _onBlurControl: function () { - this.setState({controlFocused: false}); + _onBlurControl: function _onBlurControl() { + this.setState({ controlFocused: false }); }, - _onFocusInput: function () { + _onFocusInput: function _onFocusInput() { this.refs.input.getDOMNode().select(); this.setState({ - layer: (! this.state.inline || this.props.suggestions), + dropActive: !this.state.inline || this.props.suggestions, activeSuggestionIndex: -1 }); }, - _onBlurInput: function () { - //this.setState({layer: false}); - }, + _onBlurInput: function _onBlurInput() {}, - _onChangeInput: function (event) { - this.setState({activeSuggestionIndex: -1}); + _onChangeInput: function _onChangeInput(event) { + this.setState({ activeSuggestionIndex: -1 }); if (this.props.onChange) { this.props.onChange(event.target.value); } }, - _onNextSuggestion: function () { + _onNextSuggestion: function _onNextSuggestion() { var index = this.state.activeSuggestionIndex; index = Math.min(index + 1, this.props.suggestions.length - 1); - this.setState({activeSuggestionIndex: index}); + this.setState({ activeSuggestionIndex: index }); }, - _onPreviousSuggestion: function () { + _onPreviousSuggestion: function _onPreviousSuggestion() { var index = this.state.activeSuggestionIndex; index = Math.max(index - 1, 0); - this.setState({activeSuggestionIndex: index}); + this.setState({ activeSuggestionIndex: index }); }, - _onEnter: function () { + _onEnter: function _onEnter() { if (this.state.activeSuggestionIndex >= 0) { var text = this.props.suggestions[this.state.activeSuggestionIndex]; if (this.props.onChange) { this.props.onChange(text); } } - this._onRemoveLayer(); + this._onRemoveDrop(); }, - _onClickSuggestion: function (item) { + _onClickSuggestion: function _onClickSuggestion(item) { if (this.props.onChange) { this.props.onChange(item); } - this._onRemoveLayer(); + this._onRemoveDrop(); }, - _onSink: function (event) { + _onSink: function _onSink(event) { event.stopPropagation(); event.nativeEvent.stopImmediatePropagation(); }, + /* _layout: function () { if (window.innerWidth < 600) { this.setState({inline: false}); @@ -11435,221 +13939,201 @@ var Grommet = this.setState({inline: this.props.inline}); } }, - - _onResize: function () { + _onResize: function () { // debounce clearTimeout(this._resizeTimer); this._resizeTimer = setTimeout(this._layout, 50); }, + */ - getInitialState: function () { + getInitialState: function getInitialState() { return { align: 'left', controlFocused: false, inline: this.props.inline, - layer: false, + dropActive: false, activeSuggestionIndex: -1 }; }, + /* componentDidMount: function () { window.addEventListener('resize', this._onResize); this._layout(); }, + */ - componentDidUpdate: function (prevProps, prevState) { + componentDidUpdate: function componentDidUpdate(prevProps, prevState) { // Set up keyboard listeners appropriate to the current state. var activeKeyboardHandlers = { - esc: this._onRemoveLayer, - tab: this._onRemoveLayer, + esc: this._onRemoveDrop, + tab: this._onRemoveDrop, up: this._onPreviousSuggestion, down: this._onNextSuggestion, enter: this._onEnter }; var focusedKeyboardHandlers = { - space: this._onAddLayer + space: this._onAddDrop }; // the order here is important, need to turn off keys before turning on - if (! this.state.controlFocused && prevState.controlFocused) { + if (!this.state.controlFocused && prevState.controlFocused) { this.stopListeningToKeyboard(focusedKeyboardHandlers); } - if (! this.state.layer && prevState.layer) { - document.removeEventListener('click', this._onRemoveLayer); + if (!this.state.dropActive && prevState.dropActive) { + document.removeEventListener('click', this._onRemoveDrop); this.stopListeningToKeyboard(activeKeyboardHandlers); - this.stopOverlay(); + if (this._drop) { + this._drop.remove(); + this._drop = null; + } } - if (this.state.controlFocused && ! prevState.controlFocused) { + if (this.state.controlFocused && !prevState.controlFocused) { this.startListeningToKeyboard(focusedKeyboardHandlers); } - if (this.state.layer && ! prevState.layer) { - document.addEventListener('click', this._onRemoveLayer); + if (this.state.dropActive && !prevState.dropActive) { + document.addEventListener('click', this._onRemoveDrop); this.startListeningToKeyboard(activeKeyboardHandlers); - var baseElement = - (this.refs.control ? this.refs.control : this.refs.input).getDOMNode(); - var layerElement = document.getElementById('search-layer'); - var layerControlElement = layerElement.querySelectorAll('.search__control')[0]; - var layerControlIconElement = layerElement.querySelectorAll('svg')[0]; - var inputElement = layerElement.querySelectorAll('.search__input')[0]; - - // give input element the same line height and font size as the control - var fontSize = window.getComputedStyle(baseElement).fontSize; - inputElement.style.fontSize = fontSize; - var height = baseElement.clientHeight; - if (layerControlIconElement && height <= layerControlIconElement.clientHeight) { - // adjust to align with underlying control when control uses all height - layerControlElement.style.marginTop = '-2px'; - } - inputElement.style.height = height + 'px'; - if (layerControlElement) { - layerControlElement.style.height = height + 'px'; - layerControlElement.style.lineHeight = height + 'px'; - } + var baseElement = (this.refs.control ? this.refs.control : this.refs.input).getDOMNode(); + this._drop = Drop.add(baseElement, this._renderDrop(), this.props.dropAlign); - this.startOverlay(baseElement, layerElement, this.props.align); - inputElement.focus(); + document.getElementById('search-drop-input').focus(); } }, - componentWillUnmount: function () { - document.removeEventListener('click', this._onRemoveLayer); - window.removeEventListener('resize', this._onResize); + componentWillUnmount: function componentWillUnmount() { + document.removeEventListener('click', this._onRemoveDrop); + //window.removeEventListener('resize', this._onResize); }, - focus: function () { + focus: function focus() { var ref = this.refs.input || this.refs.control; if (ref) { ref.getDOMNode().focus(); } }, - _createControl: function () { - var controlClassName = CLASS_ROOT + "__control"; - return ( - React.createElement("div", {className: controlClassName}, - React.createElement(SearchIcon, null) - ) + _createControl: function _createControl() { + var controlClassName = CLASS_ROOT + '__control'; + return React.createElement( + 'div', + { className: controlClassName }, + React.createElement(SearchIcon, null) ); }, - _classes: function (prefix) { + _classes: function _classes(prefix) { var classes = [prefix]; if (this.state.inline) { - classes.push(prefix + "--inline"); + classes.push(prefix + '--inline'); } else { - classes.push(prefix + "--controlled"); - } - if (this.props.align) { - classes.push(prefix + "--align-" + this.props.align); + classes.push(prefix + '--controlled'); } return classes; }, - render: function () { + _renderDrop: function _renderDrop() { + var classes = this._classes(CLASS_ROOT + '__drop'); - var classes = this._classes(CLASS_ROOT); - if (this.props.className) { - classes.push(this.props.className); + var suggestions = null; + if (this.props.suggestions) { + suggestions = this.props.suggestions.map(function (item, index) { + var classes = [CLASS_ROOT + '__suggestion']; + if (index === this.state.activeSuggestionIndex) { + classes.push(CLASS_ROOT + '__suggestion--active'); + } + return React.createElement( + 'div', + { key: item, + className: classes.join(' '), + onClick: this._onClickSuggestion.bind(this, item) }, + item + ); + }, this); } - if (this.state.inline) { - - var readOnly = this.props.suggestions ? true : false; + var contents = React.createElement( + 'div', + { className: CLASS_ROOT + '__drop-contents', onClick: this._onSink }, + React.createElement('input', { id: 'search-drop-input', type: 'search', + defaultValue: this.props.defaultValue, + value: this.props.value, + className: CLASS_ROOT + '__input', + onChange: this._onChangeInput }), + React.createElement( + 'div', + { className: CLASS_ROOT + '__suggestions' }, + suggestions + ) + ); - return ( - React.createElement("div", {className: classes.join(' ')}, - React.createElement("input", {ref: "input", type: "search", - placeholder: this.getGrommetIntlMessage(this.props.placeHolder), - value: this.props.defaultValue, - className: CLASS_ROOT + "__input", - readOnly: readOnly, - onFocus: this._onFocusInput, - onBlur: this._onBlurInput, - onChange: this._onChangeInput}) - ) + if (!this.state.inline) { + var control = this._createControl(); + var rightAlign = !this.props.dropAlign.left; + var first = rightAlign ? contents : control; + var second = rightAlign ? control : contents; + + contents = React.createElement( + 'div', + { className: CLASS_ROOT + '__drop-header' }, + first, + second ); + } - } else { + return React.createElement( + 'div', + { id: 'search-drop', className: classes.join(' ') }, + contents + ); + }, - var controlContents = this._createControl(); + render: function render() { - return ( - React.createElement("div", {ref: "control", className: classes.join(' '), - tabIndex: "0", - onClick: this._onAddLayer, - onFocus: this._onFocusControl, - onBlur: this._onBlurControl}, - controlContents - ) - ); + var classes = this._classes(CLASS_ROOT); + if (this.props.className) { + classes.push(this.props.className); } - }, - - renderLayer: function() { - if (this.state.layer) { - var classes = this._classes(CLASS_ROOT + "__layer"); + if (this.state.inline) { - var suggestions = null; - if (this.props.suggestions) { - suggestions = this.props.suggestions.map(function (item, index) { - var classes = [CLASS_ROOT + "__suggestion"]; - if (index === this.state.activeSuggestionIndex) { - classes.push(CLASS_ROOT + "__suggestion--active"); - } - return ( - React.createElement("div", {key: item, - className: classes.join(' '), - onClick: this._onClickSuggestion.bind(this, item)}, - item - ) - ); - }, this); - } + var readOnly = this.props.suggestions ? true : false; - var contents = ( - React.createElement("div", {className: CLASS_ROOT + "__layer-contents", onClick: this._onSink}, - React.createElement("input", {type: "search", - defaultValue: this.props.defaultValue, - className: CLASS_ROOT + "__input", - onChange: this._onChangeInput}), - React.createElement("div", {className: CLASS_ROOT + "__suggestions"}, - suggestions - ) - ) + return React.createElement( + 'div', + { className: classes.join(' ') }, + React.createElement('input', { ref: 'input', type: 'search', + placeholder: this.getGrommetIntlMessage(this.props.placeHolder), + defaultValue: this.props.defaultValue, + value: this.props.value, + className: CLASS_ROOT + '__input', + readOnly: readOnly, + onFocus: this._onFocusInput, + onBlur: this._onBlurInput, + onChange: this._onChangeInput }) ); + } else { - if (! this.state.inline) { - var control = this._createControl(); - var rightAlign = ('right' === this.props.align); - var first = rightAlign ? contents : control; - var second = rightAlign ? control : contents; - - contents = ( - React.createElement("div", {className: CLASS_ROOT + "__layer-header"}, - first, - second - ) - ); - } + var controlContents = this._createControl(); - return ( - React.createElement("div", {id: "search-layer", className: classes.join(' ')}, - contents - ) + return React.createElement( + 'div', + { ref: 'control', className: classes.join(' '), + tabIndex: '0', + onClick: this._onAddDrop, + onFocus: this._onFocusControl, + onBlur: this._onBlurControl }, + controlContents ); - - } else { // no layer - return (React.createElement("span", null)); } } @@ -11657,28 +14141,34 @@ var Grommet = module.exports = Search; + //this.setState({drop: false}); /***/ }, -/* 68 */ +/* 112 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var Search = React.createClass({displayName: "Search", + var Search = React.createClass({ + displayName: 'Search', - render: function() { + render: function render() { var className = 'control-icon control-icon-search'; if (this.props.className) { className += ' ' + this.props.className; } - return ( - React.createElement("svg", {className: className, viewBox: "0 0 48 48", version: "1.1"}, - React.createElement("g", {fill: "none"}, - React.createElement("circle", {strokeWidth: "2", cx: "21.5", cy: "21.5", r: "9"}), - React.createElement("line", {strokeWidth: "2", x1: "35.5", y1: "35.5", x2: "27.8", y2: "27.8"}) - ) + return React.createElement( + 'svg', + { className: className, viewBox: '0 0 48 48', version: '1.1' }, + React.createElement( + 'g', + { fill: 'none' }, + React.createElement('circle', { strokeWidth: '2', cx: '21.5', cy: '21.5', r: '9' }), + React.createElement('line', { strokeWidth: '2', x1: '35.5', y1: '35.5', x2: '27.8', y2: '27.8' }) ) ); } @@ -11687,163 +14177,159 @@ var Grommet = module.exports = Search; - /***/ }, -/* 69 */ +/* 113 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var ReactLayeredComponent = __webpack_require__(60); - var KeyboardAccelerators = __webpack_require__(61); - var Overlay = __webpack_require__(58); - var SearchIcon = __webpack_require__(68); + var KeyboardAccelerators = __webpack_require__(85); + var Drop = __webpack_require__(105); + var SearchIcon = __webpack_require__(112); - var CLASS_ROOT = "search-input"; + var CLASS_ROOT = 'search-input'; - var SearchInput = React.createClass({displayName: "SearchInput", + var SearchInput = React.createClass({ + displayName: 'SearchInput', propTypes: { - defaultValue: React.PropTypes.oneOfType([ - React.PropTypes.shape({ - label: React.PropTypes.string, - value: React.PropTypes.string - }), - React.PropTypes.string - ]), + defaultValue: React.PropTypes.oneOfType([React.PropTypes.shape({ + label: React.PropTypes.string, + value: React.PropTypes.string + }), React.PropTypes.string]), id: React.PropTypes.string, name: React.PropTypes.string, onChange: React.PropTypes.func, - onSearch: React.PropTypes.func, - suggestions: React.PropTypes.arrayOf( - React.PropTypes.oneOfType([ - React.PropTypes.shape({ - label: React.PropTypes.string, - value: React.PropTypes.string - }), - React.PropTypes.string - ]) - ), - value: React.PropTypes.oneOfType([ - React.PropTypes.shape({ - label: React.PropTypes.string, - value: React.PropTypes.string - }), - React.PropTypes.string - ]) - }, - - mixins: [ReactLayeredComponent, KeyboardAccelerators, Overlay], - - _onInputChange: function (event) { - this.props.onChange(event.target.value); - }, - - _onOpen: function (event) { - event.preventDefault(); - this.setState({active: true, activeSuggestionIndex: -1}); + placeHolder: React.PropTypes.string, + suggestions: React.PropTypes.arrayOf(React.PropTypes.oneOfType([React.PropTypes.shape({ + label: React.PropTypes.string, + value: React.PropTypes.string + }), React.PropTypes.string])), + value: React.PropTypes.oneOfType([React.PropTypes.shape({ + label: React.PropTypes.string, + value: React.PropTypes.string + }), React.PropTypes.string]) + }, + + mixins: [KeyboardAccelerators], + + _onInputChange: function _onInputChange(event) { + this.setState({ dropActive: true, activeSuggestionIndex: -1 }); + this.props.onChange(event.target.value, false); }, - _onClose: function () { - this.setState({active: false}); + _onAddDrop: function _onAddDrop(event) { + event.preventDefault(); + this.setState({ dropActive: true, activeSuggestionIndex: -1 }); }, - _onSearchChange: function (event) { - this.setState({activeSuggestionIndex: -1}); - this.props.onSearch(event.target.value); + _onRemoveDrop: function _onRemoveDrop() { + this.setState({ dropActive: false }); }, - _onNextSuggestion: function () { + _onNextSuggestion: function _onNextSuggestion() { var index = this.state.activeSuggestionIndex; index = Math.min(index + 1, this.props.suggestions.length - 1); - this.setState({activeSuggestionIndex: index}); + this.setState({ activeSuggestionIndex: index }); }, - _onPreviousSuggestion: function () { + _onPreviousSuggestion: function _onPreviousSuggestion() { var index = this.state.activeSuggestionIndex; index = Math.max(index - 1, 0); - this.setState({activeSuggestionIndex: index}); + this.setState({ activeSuggestionIndex: index }); }, - _onEnter: function () { - this.setState({active: false}); - this._activation(false); + _onEnter: function _onEnter() { + this.setState({ dropActive: false }); if (this.state.activeSuggestionIndex >= 0) { var suggestion = this.props.suggestions[this.state.activeSuggestionIndex]; - this.setState({value: suggestion}); - this.props.onChange(suggestion); + this.setState({ value: suggestion }); + this.props.onChange(suggestion, true); } }, - _onClickSuggestion: function (suggestion) { - this.setState({value: suggestion}); - this._activation(false); - this.props.onChange(suggestion); + _onClickSuggestion: function _onClickSuggestion(suggestion) { + this.setState({ value: suggestion, dropActive: false }); + this.props.onChange(suggestion, true); }, - _activation: function (active) { - - var listeners = { - esc: this._onClose, - tab: this._onClose, - up: this._onPreviousSuggestion, - down: this._onNextSuggestion, - enter: this._onEnter - }; - - if (active) { - - document.addEventListener('click', this._onClose); - this.startListeningToKeyboard(listeners); - - var element = this.refs.component.getDOMNode(); - var layerElement = document.getElementById(CLASS_ROOT + '-layer'); - this.startOverlay(element, layerElement, 'below'); - - // focus on search - var searchInputElement = layerElement.querySelectorAll('input')[0]; - searchInputElement.focus(); - - } else { - - document.removeEventListener('click', this._onClose); - this.stopListeningToKeyboard(listeners); - this.stopOverlay(); + _onFocus: function _onFocus() { + this.refs.input.getDOMNode().select(); + this.setState({ + focused: true, + dropActive: false, + activeSuggestionIndex: -1 + }); + }, - } + _onBlur: function _onBlur() { + this.setState({ + focused: false, + dropActive: false, + activeSuggestionIndex: -1 + }); }, - getInitialState: function () { + getInitialState: function getInitialState() { return { - active: false, + dropActive: false, defaultValue: this.props.defaultValue, value: this.props.value, activeSuggestionIndex: -1 }; }, - componentDidMount: function () { - if (this.state.active) { - this._activation(this.state.active); + componentDidUpdate: function componentDidUpdate(prevProps, prevState) { + // Set up keyboard listeners appropriate to the current state. + + var activeKeyboardHandlers = { + esc: this._onRemoveDrop, + tab: this._onRemoveDrop, + up: this._onPreviousSuggestion, + down: this._onNextSuggestion, + enter: this._onEnter + }; + var focusedKeyboardHandlers = { + down: this._onAddDrop + }; + + // the order here is important, need to turn off keys before turning on + + if (!this.state.focused && prevState.focused) { + this.stopListeningToKeyboard(focusedKeyboardHandlers); + } + + if (!this.state.dropActive && prevState.dropActive) { + document.removeEventListener('click', this._onRemoveDrop); + this.stopListeningToKeyboard(activeKeyboardHandlers); + if (this._drop) { + this._drop.remove(); + this._drop = null; + } } - }, - componentDidUpdate: function (prevProps, prevState) { - // Set up keyboard listeners appropriate to the current state. - if (! this.state.active && prevState.active) { - this._activation(this.state.active); + if (this.state.focused && !prevState.focused) { + this.startListeningToKeyboard(focusedKeyboardHandlers); } - if (this.state.active && ! prevState.active) { - this._activation(this.state.active); + + if (this.state.dropActive && !prevState.dropActive) { + document.addEventListener('click', this._onRemoveDrop); + this.startListeningToKeyboard(activeKeyboardHandlers); + + this._drop = Drop.add(this.refs.component.getDOMNode(), this._renderDrop(), { top: 'bottom', left: 'left' }); + } else if (this.state.dropActive && prevState.dropActive) { + this._drop.render(this._renderDrop()); } }, - componentWillUnmount: function () { - this._activation(false); + componentWillUnmount: function componentWillUnmount() { + document.removeEventListener('click', this._onRemoveDrop); }, - _valueText: function (value) { + _valueText: function _valueText(value) { var text = ''; if (value) { if ('string' === typeof value) { @@ -11855,136 +14341,97 @@ var Grommet = return text; }, - render: function() { + _renderDrop: function _renderDrop() { + var suggestions = null; + if (this.props.suggestions) { + suggestions = this.props.suggestions.map(function (suggestion, index) { + var classes = [CLASS_ROOT + '__suggestion']; + if (index === this.state.activeSuggestionIndex) { + classes.push(CLASS_ROOT + '__suggestion--active'); + } + return React.createElement( + 'li', + { key: this._valueText(suggestion), + className: classes.join(' '), + onClick: this._onClickSuggestion.bind(this, suggestion) }, + this._valueText(suggestion) + ); + }, this); + } + + return React.createElement( + 'ol', + { className: CLASS_ROOT + '__suggestions', onClick: this._onRemoveDrop }, + suggestions + ); + }, + + render: function render() { var classes = [CLASS_ROOT]; if (this.state.active) { - classes.push(CLASS_ROOT + "--active"); + classes.push(CLASS_ROOT + '--active'); } if (this.props.className) { classes.push(this.props.className); } - return ( - React.createElement("div", {ref: "component", className: classes.join(' ')}, - React.createElement("input", {className: CLASS_ROOT + "__input", - id: this.props.id, name: this.props.name, - value: this._valueText(this.props.value), - defaultValue: this._valueText(this.props.defaultValue), - onChange: this._onInputChange}), - React.createElement("div", {className: CLASS_ROOT + "__control", onClick: this._onOpen}, - React.createElement(SearchIcon, null) - ) + return React.createElement( + 'div', + { ref: 'component', className: classes.join(' ') }, + React.createElement('input', { ref: 'input', className: CLASS_ROOT + '__input', + id: this.props.id, name: this.props.name, + value: this._valueText(this.props.value), + defaultValue: this._valueText(this.props.defaultValue), + placeholder: this.props.placeHolder, + onChange: this._onInputChange, + onFocus: this._onFocus, + onBlur: this._onBlur }), + React.createElement( + 'div', + { className: CLASS_ROOT + '__control', onClick: this._onAddDrop }, + React.createElement(SearchIcon, null) ) ); - }, - - renderLayer: function() { - if (this.state.active) { - - var suggestions = null; - if (this.props.suggestions) { - suggestions = this.props.suggestions.map(function (suggestion, index) { - var classes = [CLASS_ROOT + "__layer-suggestion"]; - if (index === this.state.activeSuggestionIndex) { - classes.push(CLASS_ROOT + "__layer-suggestion--active"); - } - return ( - React.createElement("div", {key: this._valueText(suggestion), - className: classes.join(' '), - onClick: this._onClickSuggestion.bind(this, suggestion)}, - this._valueText(suggestion) - ) - ); - }, this); - } - - return ( - React.createElement("div", {id: CLASS_ROOT + "-layer", className: CLASS_ROOT + "__layer", - onClick: this._onClose}, - React.createElement("input", {type: "search", - defaultValue: "", - placeholder: "Search", - className: CLASS_ROOT + "__layer-input", - onChange: this._onSearchChange}), - React.createElement("div", {className: CLASS_ROOT + "__layer-suggestions"}, - suggestions - ) - ) - ); - } else { - return (React.createElement("span", null)); - } } }); module.exports = SearchInput; - /***/ }, -/* 70 */ +/* 114 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + var React = __webpack_require__(2); + var Box = __webpack_require__(84); - var CLASS_ROOT = "section"; + var CLASS_ROOT = 'section'; - var Section = React.createClass({displayName: "Section", + var Section = React.createClass({ + displayName: 'Section', - propTypes: { - centered: React.PropTypes.bool, - compact: React.PropTypes.bool, - colorIndex: React.PropTypes.string, - direction: React.PropTypes.oneOf(['up', 'down', 'left', 'right']), - flush: React.PropTypes.bool, - texture: React.PropTypes.string - }, + propTypes: Box.propTypes, - getDefaultProps: function () { - return { - colored: false, - direction: 'down', - flush: true, - small: false - }; + getDefaultProps: function getDefaultProps() { + return { pad: { vertical: 'medium' } }; }, - render: function() { + render: function render() { var classes = [CLASS_ROOT]; - var contentClasses = [CLASS_ROOT + "__content"]; - - if (this.props.compact) { - classes.push(CLASS_ROOT + "--compact"); - } - if (this.props.centered) { - classes.push(CLASS_ROOT + "--centered"); - } - if (this.props.flush) { - classes.push(CLASS_ROOT + "--flush"); - } - if (this.props.direction) { - classes.push(CLASS_ROOT + "--" + this.props.direction); - } - if (this.props.colorIndex) { - classes.push("background-color-index-" + this.props.colorIndex); - } if (this.props.className) { classes.push(this.props.className); } - var style = {}; - if (this.props.texture) { - style.backgroundImage = this.props.texture; - } - - return ( - React.createElement("div", {className: classes.join(' '), style: style}, - React.createElement("div", {className: contentClasses.join(' ')}, - this.props.children - ) - ) + return React.createElement( + Box, + _extends({ tag: 'section' }, this.props, { className: classes.join(' ') }), + this.props.children ); } @@ -11992,20 +14439,22 @@ var Grommet = module.exports = Section; - /***/ }, -/* 71 */ +/* 115 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var SpinningIcon = __webpack_require__(72); - var InfiniteScroll = __webpack_require__(73); + var SpinningIcon = __webpack_require__(101); + var InfiniteScroll = __webpack_require__(99); - var CLASS_ROOT = "table"; + var CLASS_ROOT = 'table'; - var Table = React.createClass({displayName: "Table", + var Table = React.createClass({ + displayName: 'Table', propTypes: { selection: React.PropTypes.number, @@ -12016,7 +14465,7 @@ var Grommet = mixins: [InfiniteScroll], - getDefaultProps: function () { + getDefaultProps: function getDefaultProps() { return { selection: null, scrollable: false, @@ -12024,39 +14473,37 @@ var Grommet = }; }, - _clearSelection: function () { - var rows = this.refs.table.getDOMNode() - .querySelectorAll("." + CLASS_ROOT + "__row--selected"); + _clearSelection: function _clearSelection() { + var rows = this.refs.table.getDOMNode().querySelectorAll('.' + CLASS_ROOT + '__row--selected'); for (var i = 0; i < rows.length; i++) { - rows[i].classList.remove(CLASS_ROOT + "__row--selected"); + rows[i].classList.remove(CLASS_ROOT + '__row--selected'); } }, - _markSelection: function () { + _markSelection: function _markSelection() { this._clearSelection(); if (null !== this.state.selection) { var tbody = this.refs.table.getDOMNode().querySelectorAll('tbody')[0]; - tbody.childNodes[this.state.selection].classList. - add(CLASS_ROOT + "__row--selected"); + tbody.childNodes[this.state.selection].classList.add(CLASS_ROOT + '__row--selected'); } }, - _onClick: function (event) { + _onClick: function _onClick(event) { var element = event.target; while (element.nodeName !== 'TR') { element = element.parentNode; } if (element && element.parentNode.nodeName === 'TBODY') { this._clearSelection(); - element.classList.add(CLASS_ROOT + "__row--selected"); + element.classList.add(CLASS_ROOT + '__row--selected'); } }, - _onResize: function () { + _onResize: function _onResize() { this._alignMirror(); }, - _buildMirror: function () { + _buildMirror: function _buildMirror() { var tableElement = this.refs.table.getDOMNode(); var cells = tableElement.querySelectorAll('thead tr th'); var mirrorElement = this.refs.mirror.getDOMNode(); @@ -12066,7 +14513,7 @@ var Grommet = } }, - _alignMirror: function () { + _alignMirror: function _alignMirror() { var tableElement = this.refs.table.getDOMNode(); var cells = tableElement.querySelectorAll('thead tr th'); var mirrorElement = this.refs.mirror.getDOMNode(); @@ -12085,11 +14532,11 @@ var Grommet = mirrorElement.style.height = '' + height + 'px'; }, - getInitialState: function () { - return {selection: this.props.selection}; + getInitialState: function getInitialState() { + return { selection: this.props.selection }; }, - componentDidMount: function () { + componentDidMount: function componentDidMount() { this._markSelection(); if (this.props.scrollable) { this._buildMirror(); @@ -12101,13 +14548,13 @@ var Grommet = window.addEventListener('resize', this._onResize); }, - componentWillReceiveProps: function (newProps) { + componentWillReceiveProps: function componentWillReceiveProps(newProps) { if (newProps.hasOwnProperty('selection')) { - this.setState({selection: newProps.selection}); + this.setState({ selection: newProps.selection }); } }, - componentDidUpdate: function (prevProps, prevState) { + componentDidUpdate: function componentDidUpdate(prevProps, prevState) { if (this.state.selection !== prevState.selection) { this._markSelection(); } @@ -12120,20 +14567,20 @@ var Grommet = } }, - componentWillUnmount: function () { + componentWillUnmount: function componentWillUnmount() { if (this.props.onMore) { this.stopListeningForScroll(); } window.removeEventListener('resize', this._onResize); }, - render: function () { + render: function render() { var classes = [CLASS_ROOT]; if (this.props.selectable) { - classes.push(CLASS_ROOT + "--selectable"); + classes.push(CLASS_ROOT + '--selectable'); } if (this.props.scrollable) { - classes.push(CLASS_ROOT + "--scrollable"); + classes.push(CLASS_ROOT + '--scrollable'); } if (this.props.className) { classes.push(this.props.className); @@ -12141,32 +14588,36 @@ var Grommet = var mirror = null; if (this.props.scrollable) { - mirror = ( - React.createElement("table", {ref: "mirror", className: CLASS_ROOT + "__mirror"}, - React.createElement("thead", null, - React.createElement("tr", null) - ) + mirror = React.createElement( + 'table', + { ref: 'mirror', className: CLASS_ROOT + '__mirror' }, + React.createElement( + 'thead', + null, + React.createElement('tr', null) ) ); } var more = null; if (this.props.onMore) { - more = ( - React.createElement("div", {ref: "more", className: CLASS_ROOT + "__more"}, - React.createElement(SpinningIcon, null) - ) + more = React.createElement( + 'div', + { ref: 'more', className: CLASS_ROOT + '__more' }, + React.createElement(SpinningIcon, null) ); } - return ( - React.createElement("div", {ref: "container", className: classes.join(' ')}, - mirror, - React.createElement("table", {ref: "table", className: CLASS_ROOT + "__table", onClick: this._onClick}, - this.props.children - ), - more - ) + return React.createElement( + 'div', + { ref: 'container', className: classes.join(' ') }, + mirror, + React.createElement( + 'table', + { ref: 'table', className: CLASS_ROOT + '__table', onClick: this._onClick }, + this.props.children + ), + more ); } @@ -12174,112 +14625,22 @@ var Grommet = module.exports = Table; - /***/ }, -/* 72 */ +/* 116 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. - var React = __webpack_require__(2); - - var CLASS_ROOT = "icon-spinning"; - - var Spinning = React.createClass({displayName: "Spinning", - - render: function() { - var classes = [CLASS_ROOT]; - if (this.props.small) { - classes.push(CLASS_ROOT + "--small"); - } - if (this.props.className) { - classes.push(this.props.className); - } - return ( - React.createElement("svg", {className: classes.join(' '), viewBox: "0 0 48 48", version: "1.1"}, - React.createElement("circle", {stroke: "#ddd", strokeWidth: "4", strokeDasharray: "24px 8px", fill: "none", cx: "24", cy: "24", r: "20"}), - React.createElement("circle", {stroke: "#333", strokeWidth: "4", strokeDasharray: "24px 104px", fill: "none", cx: "24", cy: "24", r: "20"}) - ) - ); - } - - }); - - module.exports = Spinning; - - -/***/ }, -/* 73 */ -/***/ function(module, exports, __webpack_require__) { - - // (C) Copyright 2014 Hewlett-Packard Development Company, L.P. - - var DOM = __webpack_require__(59); - - var SCROLL_MORE_DELAY = 2000; // when the user scrolls - var SCROLL_MORE_INITIAL_DELAY = 200; // when we start out at the bottom already - - var InfiniteScroll = { - - _infiniteScroll: { - indicatorElement: null, - scrollParent: null, - onEnd: null - }, - - _onScroll: function () { - // delay a bit to ride out quick users - clearTimeout(this._infiniteScroll.scrollTimer); - this._infiniteScroll.scrollTimer = setTimeout(function () { - // are we at the bottom? - var parentRect = this._infiniteScroll.scrollParent.getBoundingClientRect(); - var indicatorRect = this._infiniteScroll.indicatorElement.getBoundingClientRect(); - if (indicatorRect.bottom <= parentRect.bottom) { - this._infiniteScroll.onEnd(); - } - }.bind(this), SCROLL_MORE_DELAY); - }, - - startListeningForScroll: function (indicatorElement, onEnd) { - this._infiniteScroll.onEnd = onEnd; - this._infiniteScroll.indicatorElement = indicatorElement; - this._infiniteScroll.scrollParent = DOM.findScrollParents(indicatorElement)[0]; - this._infiniteScroll.scrollParent.addEventListener("scroll", this._onScroll); - // check in case we're already at the bottom - if (this._infiniteScroll.scrollParent === document) { - this._infiniteScroll.scrollTimer = setTimeout(onEnd, SCROLL_MORE_INITIAL_DELAY); - } - }, - - stopListeningForScroll: function () { - if (this._infiniteScroll.scrollParent) { - clearTimeout(this._infiniteScroll.scrollTimer); - this._infiniteScroll.scrollParent.removeEventListener("scroll", this._onScroll); - this._infiniteScroll.scrollParent = null; - } - }, - - componentWillUnmount: function () { - this.stopListeningForScroll(); - } - }; - - module.exports = InfiniteScroll; - - -/***/ }, -/* 74 */ -/***/ function(module, exports, __webpack_require__) { - - // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; var React = __webpack_require__(2); - var SpinningIcon = __webpack_require__(72); - var InfiniteScroll = __webpack_require__(73); + var SpinningIcon = __webpack_require__(101); + var InfiniteScroll = __webpack_require__(99); - var CLASS_ROOT = "tiles"; + var CLASS_ROOT = 'tiles'; - var Tiles = React.createClass({displayName: "Tiles", + var Tiles = React.createClass({ + displayName: 'Tiles', propTypes: { fill: React.PropTypes.bool, @@ -12290,40 +14651,40 @@ var Grommet = mixins: [InfiniteScroll], - getDefaultProps: function () { - return {flush: true, fill: false, small: false}; + getDefaultProps: function getDefaultProps() { + return { flush: true, fill: false, small: false }; }, - componentDidMount: function () { + componentDidMount: function componentDidMount() { if (this.props.onMore) { this.startListeningForScroll(this.refs.more.getDOMNode(), this.props.onMore); } }, - componentDidUpdate: function () { + componentDidUpdate: function componentDidUpdate() { this.stopListeningForScroll(); if (this.props.onMore) { this.startListeningForScroll(this.refs.more.getDOMNode(), this.props.onMore); } }, - componentWillUnmount: function () { + componentWillUnmount: function componentWillUnmount() { if (this.props.onMore) { this.stopListeningForScroll(); } }, // children should be an array of Tile - render: function () { + render: function render() { var classes = [CLASS_ROOT]; if (this.props.fill) { - classes.push(CLASS_ROOT + "--fill"); + classes.push(CLASS_ROOT + '--fill'); } if (this.props.flush) { - classes.push(CLASS_ROOT + "--flush"); + classes.push(CLASS_ROOT + '--flush'); } if (this.props.small) { - classes.push(CLASS_ROOT + "--small"); + classes.push(CLASS_ROOT + '--small'); } if (this.props.className) { classes.push(this.props.className); @@ -12331,19 +14692,19 @@ var Grommet = var more = null; if (this.props.onMore) { - classes.push(CLASS_ROOT + "--moreable"); - more = ( - React.createElement("div", {ref: "more", className: CLASS_ROOT + "__more"}, - React.createElement(SpinningIcon, null) - ) + classes.push(CLASS_ROOT + '--moreable'); + more = React.createElement( + 'div', + { ref: 'more', className: CLASS_ROOT + '__more' }, + React.createElement(SpinningIcon, null) ); } - return ( - React.createElement("div", {ref: "tiles", className: classes.join(' ')}, - this.props.children, - more - ) + return React.createElement( + 'div', + { ref: 'tiles', className: classes.join(' ') }, + this.props.children, + more ); } @@ -12351,31 +14712,118 @@ var Grommet = module.exports = Tiles; +/***/ }, +/* 117 */ +/***/ function(module, exports, __webpack_require__) { + + // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + + 'use strict'; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + var React = __webpack_require__(2); + var merge = __webpack_require__(44); + var pick = __webpack_require__(79); + var keys = __webpack_require__(70); + var Box = __webpack_require__(84); + + var CLASS_ROOT = 'tile'; + + var Tile = React.createClass({ + displayName: 'Tile', + + propTypes: merge({ + selected: React.PropTypes.bool, + status: React.PropTypes.string, + wide: React.PropTypes.bool + }, Box.propTypes), + + getDefaultProps: function getDefaultProps() { + return { + pad: 'none', + direction: 'column', + align: 'center' + }; + }, + + render: function render() { + var classes = [CLASS_ROOT]; + var other = pick(this.props, keys(Box.propTypes)); + if (this.props.status) { + classes.push(CLASS_ROOT + '--status-' + this.props.status.toLowerCase()); + } + if (this.props.wide) { + classes.push(CLASS_ROOT + '--wide'); + } + if (this.props.onClick) { + classes.push(CLASS_ROOT + '--selectable'); + } + if (this.props.selected) { + classes.push(CLASS_ROOT + '--selected'); + } + if (this.props.className) { + classes.push(this.props.className); + } + + return React.createElement( + Box, + _extends({ className: classes.join(' ') }, other, { onClick: this.props.onClick }), + this.props.children + ); + } + + }); + + module.exports = Tile; /***/ }, -/* 75 */ +/* 118 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + var React = __webpack_require__(2); + var Box = __webpack_require__(84); + + var CLASS_ROOT = 'title'; - var Title = React.createClass({displayName: "Title", + var Title = React.createClass({ + displayName: 'Title', propTypes: { - onClick: React.PropTypes.func + onClick: React.PropTypes.func, + responsive: React.PropTypes.bool + }, + + getDefaultProps: function getDefaultProps() { + return { + align: 'center', + direction: 'row', + responsive: true + }; }, - render: function() { - var classes = ["title"]; + render: function render() { + var classes = [CLASS_ROOT]; + if (this.props.responsive) { + classes.push(CLASS_ROOT + '--responsive'); + } if (this.props.onClick) { - classes.push("title--interactive"); + classes.push(CLASS_ROOT + '--interactive'); + } + if (this.props.className) { + classes.push(this.props.className); } - return ( - React.createElement("div", {className: classes.join(' '), onClick: this.props.onClick}, - this.props.children - ) + return React.createElement( + Box, + _extends({}, this.props, { className: classes.join(' '), onClick: this.props.onClick }), + this.props.children ); } @@ -12383,19 +14831,21 @@ var Grommet = module.exports = Title; - /***/ }, -/* 76 */ +/* 119 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var IntlMixin = __webpack_require__(4); + var IntlMixin = __webpack_require__(3); - var CLASS_ROOT = "object"; + var CLASS_ROOT = 'object'; - var GrommetObject = React.createClass({displayName: "GrommetObject", + var GrommetObject = React.createClass({ + displayName: 'GrommetObject', mixins: [IntlMixin], @@ -12403,59 +14853,75 @@ var Grommet = data: React.PropTypes.object }, - _renderArray: function (array) { + _renderArray: function _renderArray(array) { return array.map(function (item, index) { var itemContent = item; - if ('object' === typeof(item)) { + if ('object' === typeof item) { itemContent = this._renderObject(item); } - return ( - React.createElement("li", {key: 'i_' + index, className: "list-item"}, itemContent) + return React.createElement( + 'li', + { key: 'i_' + index, className: 'list-item' }, + itemContent ); }, this); }, - _renderObject: function (obj) { + _renderObject: function _renderObject(obj) { var attrs = []; for (var name in obj) { if (obj.hasOwnProperty(name)) { var value = obj[name]; - var classes = [CLASS_ROOT + "__attribute"]; + var classes = [CLASS_ROOT + '__attribute']; if (null === value) { value = 'null'; - classes.push(CLASS_ROOT + "__attribute--unset"); + classes.push(CLASS_ROOT + '__attribute--unset'); } else if (Array.isArray(value)) { var items = this._renderArray(value); - value = ( - React.createElement("ol", null, items) + value = React.createElement( + 'ol', + null, + items ); - classes.push(CLASS_ROOT + "__attribute--array"); + classes.push(CLASS_ROOT + '__attribute--array'); } else if ('object' === typeof value) { value = this._renderObject(value); - classes.push(CLASS_ROOT + "__attribute--container"); + classes.push(CLASS_ROOT + '__attribute--container'); } else { value = value.toString(); } - attrs.push( - React.createElement("li", {key: 'n_' + name, className: classes.join(' ')}, - React.createElement("span", {className: CLASS_ROOT + "__attribute-name"}, this.getGrommetIntlMessage(name)), - React.createElement("span", {className: CLASS_ROOT + "__attribute-value"}, this.getGrommetIntlMessage(value)) + attrs.push(React.createElement( + 'li', + { key: 'n_' + name, className: classes.join(' ') }, + React.createElement( + 'span', + { className: CLASS_ROOT + '__attribute-name' }, + this.getGrommetIntlMessage(name) + ), + React.createElement( + 'span', + { className: CLASS_ROOT + '__attribute-value' }, + this.getGrommetIntlMessage(value) ) - ); + )); } } - return ( - React.createElement("ul", null, attrs) + return React.createElement( + 'ul', + null, + attrs ); }, - render: function() { - return ( - React.createElement("div", {className: CLASS_ROOT}, - React.createElement("div", {className: CLASS_ROOT + "__container"}, - this._renderObject(this.props.data) - ) + render: function render() { + return React.createElement( + 'div', + { className: CLASS_ROOT }, + React.createElement( + 'div', + { className: CLASS_ROOT + '__container' }, + this._renderObject(this.props.data) ) ); } @@ -12464,22 +14930,24 @@ var Grommet = module.exports = GrommetObject; - /***/ }, -/* 77 */ +/* 120 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var TBD = React.createClass({displayName: "TBD", + var TBD = React.createClass({ + displayName: 'TBD', - render: function() { - return ( - React.createElement("div", {className: "tbd"}, - 'TBD' - ) + render: function render() { + return React.createElement( + 'div', + { className: 'tbd' }, + 'TBD' ); } @@ -12487,28 +14955,73 @@ var Grommet = module.exports = TBD; +/***/ }, +/* 121 */ +/***/ function(module, exports, __webpack_require__) { + + // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + + 'use strict'; + + var React = __webpack_require__(2); + + var Calendar = React.createClass({ + displayName: 'Calendar', + + render: function render() { + var className = 'control-icon control-icon-calendar'; + if (this.props.className) { + className += ' ' + this.props.className; + } + return React.createElement( + 'svg', + { className: className, viewBox: '0 0 48 48', version: '1.1' }, + React.createElement( + 'g', + { fill: 'none', strokeWidth: '2' }, + React.createElement('rect', { x: '13', y: '16', width: '22', height: '20' }), + React.createElement('path', { d: 'M17,16 L17,13' }), + React.createElement('path', { d: 'M31,16 L31,13' }), + React.createElement('path', { d: 'M13,23 L35,23' }) + ), + React.createElement( + 'g', + { stroke: 'none' }, + React.createElement('rect', { x: '29', y: '30', width: '3', height: '3' }) + ) + ); + } + + }); + + module.exports = Calendar; /***/ }, -/* 78 */ +/* 122 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var Clear = React.createClass({displayName: "Clear", + var Clear = React.createClass({ + displayName: 'Clear', - render: function() { + render: function render() { var className = 'control-icon control-icon-clear'; if (this.props.className) { className += ' ' + this.props.className; } - return ( - React.createElement("svg", {className: className, viewBox: "0 0 48 48", version: "1.1"}, - React.createElement("g", {fill: "none"}, - React.createElement("line", {strokeWidth: "2", x1: "12", y1: "12", x2: "36", y2: "36"}), - React.createElement("line", {strokeWidth: "2", x1: "12", y1: "36", x2: "36", y2: "12"}) - ) + return React.createElement( + 'svg', + { className: className, viewBox: '0 0 48 48', version: '1.1' }, + React.createElement( + 'g', + { fill: 'none' }, + React.createElement('line', { strokeWidth: '2', x1: '14', y1: '14', x2: '34', y2: '34' }), + React.createElement('line', { strokeWidth: '2', x1: '14', y1: '34', x2: '34', y2: '14' }) ) ); } @@ -12517,34 +15030,38 @@ var Grommet = module.exports = Clear; - /***/ }, -/* 79 */ +/* 123 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var DragHandle = React.createClass({displayName: "DragHandle", + var DragHandle = React.createClass({ + displayName: 'DragHandle', - render: function() { + render: function render() { var className = 'control-icon control-icon-drag-handle'; if (this.props.className) { className += ' ' + this.props.className; } - return ( - React.createElement("svg", {className: className, viewBox: "0 0 48 48", version: "1.1"}, - React.createElement("g", {stroke: "none", strokeWidth: "1", fill: "#cccccc", fillRule: "evenodd"}, - React.createElement("rect", {x: "12", y: "12", width: "3", height: "3"}), - React.createElement("rect", {x: "18", y: "12", width: "3", height: "3"}), - React.createElement("rect", {x: "12", y: "18", width: "3", height: "3"}), - React.createElement("rect", {x: "18", y: "18", width: "3", height: "3"}), - React.createElement("rect", {x: "12", y: "24", width: "3", height: "3"}), - React.createElement("rect", {x: "18", y: "24", width: "3", height: "3"}), - React.createElement("rect", {x: "12", y: "30", width: "3", height: "3"}), - React.createElement("rect", {x: "18", y: "30", width: "3", height: "3"}) - ) + return React.createElement( + 'svg', + { className: className, viewBox: '0 0 48 48', version: '1.1' }, + React.createElement( + 'g', + { stroke: 'none', strokeWidth: '1', fill: '#cccccc', fillRule: 'evenodd' }, + React.createElement('rect', { x: '12', y: '12', width: '3', height: '3' }), + React.createElement('rect', { x: '18', y: '12', width: '3', height: '3' }), + React.createElement('rect', { x: '12', y: '18', width: '3', height: '3' }), + React.createElement('rect', { x: '18', y: '18', width: '3', height: '3' }), + React.createElement('rect', { x: '12', y: '24', width: '3', height: '3' }), + React.createElement('rect', { x: '18', y: '24', width: '3', height: '3' }), + React.createElement('rect', { x: '12', y: '30', width: '3', height: '3' }), + React.createElement('rect', { x: '18', y: '30', width: '3', height: '3' }) ) ); } @@ -12553,35 +15070,39 @@ var Grommet = module.exports = DragHandle; - /***/ }, -/* 80 */ +/* 124 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var Edit = React.createClass({displayName: "Edit", + var Edit = React.createClass({ + displayName: 'Edit', - render: function() { + render: function render() { var className = 'control-icon control-icon-edit'; if (this.props.className) { className += ' ' + this.props.className; } - return ( - React.createElement("svg", {className: className, viewBox: "0 0 48 48", version: "1.1"}, - React.createElement("g", {fill: "none"}, - React.createElement("circle", {strokeWidth: "2", cx: "24", cy: "24", r: "9"}), - React.createElement("line", {strokeWidth: "2", x1: "24", y1: "11", x2: "24", y2: "15"}), - React.createElement("line", {strokeWidth: "2", x1: "33.2", y1: "14.8", x2: "30.3", y2: "17.6"}), - React.createElement("line", {strokeWidth: "2", x1: "37", y1: "24", x2: "33", y2: "24"}), - React.createElement("line", {strokeWidth: "2", x1: "33.2", y1: "33.2", x2: "30.3", y2: "30.4"}), - React.createElement("line", {strokeWidth: "2", x1: "24", y1: "37", x2: "24", y2: "33"}), - React.createElement("line", {strokeWidth: "2", x1: "14.8", y1: "33.2", x2: "17.7", y2: "30.4"}), - React.createElement("line", {strokeWidth: "2", x1: "11", y1: "24", x2: "15.2", y2: "24"}), - React.createElement("line", {strokeWidth: "2", x1: "14.8", y1: "14.8", x2: "17.7", y2: "17.6"}) - ) + return React.createElement( + 'svg', + { className: className, viewBox: '0 0 48 48', version: '1.1' }, + React.createElement( + 'g', + { fill: 'none' }, + React.createElement('circle', { strokeWidth: '2', cx: '24', cy: '24', r: '9' }), + React.createElement('line', { strokeWidth: '2', x1: '24', y1: '11', x2: '24', y2: '15' }), + React.createElement('line', { strokeWidth: '2', x1: '33.2', y1: '14.8', x2: '30.3', y2: '17.6' }), + React.createElement('line', { strokeWidth: '2', x1: '37', y1: '24', x2: '33', y2: '24' }), + React.createElement('line', { strokeWidth: '2', x1: '33.2', y1: '33.2', x2: '30.3', y2: '30.4' }), + React.createElement('line', { strokeWidth: '2', x1: '24', y1: '37', x2: '24', y2: '33' }), + React.createElement('line', { strokeWidth: '2', x1: '14.8', y1: '33.2', x2: '17.7', y2: '30.4' }), + React.createElement('line', { strokeWidth: '2', x1: '11', y1: '24', x2: '15.2', y2: '24' }), + React.createElement('line', { strokeWidth: '2', x1: '14.8', y1: '14.8', x2: '17.7', y2: '17.6' }) ) ); } @@ -12590,22 +15111,24 @@ var Grommet = module.exports = Edit; - /***/ }, -/* 81 */ +/* 125 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var Filter = React.createClass({displayName: "Filter", + var Filter = React.createClass({ + displayName: 'Filter', propTypes: { notifications: React.PropTypes.number }, - render: function() { + render: function render() { var className = 'control-icon control-icon-filter'; if (this.props.className) { className += ' ' + this.props.className; @@ -12613,22 +15136,28 @@ var Grommet = var badge = null; if (this.props.notifications) { - badge = ( - React.createElement("g", {className: "control-icon__badge"}, - React.createElement("circle", {stroke: "none", cx: "37", cy: "11", r: "10"}), - React.createElement("text", {x: "33.5", y: "16", fontSize: 16}, this.props.notifications) + badge = React.createElement( + 'g', + { className: 'control-icon__badge' }, + React.createElement('circle', { stroke: 'none', cx: '37', cy: '11', r: '10' }), + React.createElement( + 'text', + { x: '33.5', y: '16', fontSize: 16 }, + this.props.notifications ) ); } - return ( - React.createElement("svg", {className: className, viewBox: "0 0 48 48", version: "1.1"}, - React.createElement("g", {fill: "none"}, - React.createElement("polygon", {strokeWidth: "2", points: "14,15 24,27 34,15 "}), - React.createElement("line", {strokeWidth: "2", x1: "24", y1: "27", x2: "24", y2: "36"}) - ), - badge - ) + return React.createElement( + 'svg', + { className: className, viewBox: '0 0 48 48', version: '1.1' }, + React.createElement( + 'g', + { fill: 'none' }, + React.createElement('polygon', { strokeWidth: '2', points: '14,15 24,27 34,15 \t' }), + React.createElement('line', { strokeWidth: '2', x1: '24', y1: '27', x2: '24', y2: '34' }) + ), + badge ); } @@ -12636,28 +15165,75 @@ var Grommet = module.exports = Filter; +/***/ }, +/* 126 */ +/***/ function(module, exports, __webpack_require__) { + + // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + + "use strict"; + + var React = __webpack_require__(2); + + var CLASS_ROOT = "logo-icon"; + + var Grommet = React.createClass({ + displayName: "Grommet", + + propTypes: { + small: React.PropTypes.bool, + large: React.PropTypes.bool + }, + + render: function render() { + var classes = [CLASS_ROOT]; + if (this.props.small) { + classes.push(CLASS_ROOT + "--small"); + } + if (this.props.large) { + classes.push(CLASS_ROOT + "--large"); + } + if (this.props.className) { + classes.push(this.props.className); + } + return React.createElement( + "svg", + { className: classes.join(" "), viewBox: "0 0 140 140", version: "1.1" }, + React.createElement("path", { d: "M119.49603,20.5014878 L100.989057,39.0094878 C105.89805,43.9184878 109.859044,49.7734878 111.669042,55.3734878 C122.692025,89.4684878 93.3250687,120.604488 59.5321185,112.820488 C44.9911399,109.470488 30.5211612,94.9984878 27.1751661,80.4564878 C20.432176,51.1514878 42.9571429,25.1854878 71.2931012,25.9974878 L93.3090687,3.98048778 C86.0960794,1.43348778 78.3420908,0.0304877767 70.2641027,0.000487776719 C32.014159,-0.141512223 0.549205302,30.7384878 0.00720609982,68.9844878 C-0.547793083,108.124488 31.0271604,140.024488 70.045103,139.999488 C108.802046,139.975488 140,108.756488 140,70.0004878 C140,50.6694878 132.164012,33.1694878 119.49603,20.5014878 L119.49603,20.5014878 Z", fill: "#8C50FF" }), + React.createElement("path", { d: "M27.1736636,80.457549 C30.5194807,94.999549 44.98869,109.472549 59.5288954,112.821549 C93.3190487,120.605549 122.685444,89.469549 111.663046,55.374549 C109.852145,49.774549 105.891362,43.918549 100.98363,39.010549 L69.9953234,70.000549 L100.083679,70.001549 C100.083679,86.762549 86.3804279,100.322549 69.5663468,100.089549 C53.4302287,99.865549 40.23095,86.746549 39.9119674,70.611549 C39.7429767,62.061549 43.140791,54.304549 48.7174862,48.725549 L48.6404904,48.648549 L71.2872528,25.998549 C42.9548011,25.186549 20.4310321,51.152549 27.1736636,80.457549 L27.1736636,80.457549 Z", fill: "#333333" }) + ); + } + + }); + + module.exports = Grommet; /***/ }, -/* 82 */ +/* 127 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var Help = React.createClass({displayName: "Help", + var Help = React.createClass({ + displayName: 'Help', - render: function() { + render: function render() { var className = 'control-icon control-icon-help'; if (this.props.className) { className += ' ' + this.props.className; } - return ( - React.createElement("svg", {className: className, viewBox: "0 0 48 48", version: "1.1"}, - React.createElement("g", {fill: "none"}, - React.createElement("path", {strokeWidth: "2", d: "M17,18c0-4,3.4-7,7-7c3.5,0,7,2.7,7,7s-3.6,7-7,7v6"}), - React.createElement("line", {strokeWidth: "2", x1: "24", y1: "37", x2: "24", y2: "35"}) - ) + return React.createElement( + 'svg', + { className: className, viewBox: '0 0 48 48', version: '1.1' }, + React.createElement( + 'g', + { fill: 'none' }, + React.createElement('path', { strokeWidth: '2', d: 'M17,18c0-4,3.4-7,7-7c3.5,0,7,2.7,7,7s-3.6,7-7,7v6' }), + React.createElement('line', { strokeWidth: '2', x1: '24', y1: '37', x2: '24', y2: '35' }) ) ); } @@ -12666,28 +15242,32 @@ var Grommet = module.exports = Help; - /***/ }, -/* 83 */ +/* 128 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var Left = React.createClass({displayName: "Left", + var Left = React.createClass({ + displayName: 'Left', - render: function() { + render: function render() { var className = 'control-icon control-icon-left'; if (this.props.className) { className += ' ' + this.props.className; } - return ( - React.createElement("svg", {className: className, viewBox: "0 0 48 48", version: "1.1"}, - React.createElement("g", {fill: "none"}, - React.createElement("polyline", {strokeWidth: "2", points: "20.9,34 13,24 21,14 "}), - React.createElement("path", {strokeWidth: "2", d: "M13.3,24C36,24,36,24,36,24"}) - ) + return React.createElement( + 'svg', + { className: className, viewBox: '0 0 48 48', version: '1.1' }, + React.createElement( + 'g', + { fill: 'none' }, + React.createElement('polyline', { strokeWidth: '2', points: '20.9,34 13,24 21,14 ' }), + React.createElement('path', { strokeWidth: '2', d: 'M13.3,24C36,24,36,24,36,24' }) ) ); } @@ -12696,28 +15276,32 @@ var Grommet = module.exports = Left; - /***/ }, -/* 84 */ +/* 129 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var Right = React.createClass({displayName: "Right", + var Right = React.createClass({ + displayName: 'Right', - render: function() { + render: function render() { var className = 'control-icon control-icon-right'; if (this.props.className) { className += ' ' + this.props.className; } - return ( - React.createElement("svg", {className: className, viewBox: "0 0 48 48", version: "1.1"}, - React.createElement("g", {fill: "none"}, - React.createElement("polyline", {strokeWidth: "2", points: "27.1,14 35,24 27,34"}), - React.createElement("path", {strokeWidth: "2", d: "M34.7,24C12,24,12,24,12,24"}) - ) + return React.createElement( + 'svg', + { className: className, viewBox: '0 0 48 48', version: '1.1' }, + React.createElement( + 'g', + { fill: 'none' }, + React.createElement('polyline', { strokeWidth: '2', points: '27.1,14 35,24 27,34' }), + React.createElement('path', { strokeWidth: '2', d: 'M34.7,24C12,24,12,24,12,24' }) ) ); } @@ -12726,30 +15310,34 @@ var Grommet = module.exports = Right; - /***/ }, -/* 85 */ +/* 130 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var SearchPlus = React.createClass({displayName: "SearchPlus", + var SearchPlus = React.createClass({ + displayName: 'SearchPlus', - render: function() { + render: function render() { var className = 'control-icon control-icon-search-plus'; if (this.props.className) { className += ' ' + this.props.className; } - return ( - React.createElement("svg", {className: className, viewBox: "0 0 48 48", version: "1.1"}, - React.createElement("g", {strokeWidth: "4", fill: "none", fillRule: "evenodd"}, - React.createElement("circle", {strokeWidth: "4", cx: "21", cy: "21", r: "7"}), - React.createElement("path", {d: "M27.2,27 L34.2,36", strokeWidth: "4", strokeLinecap: "round"}), - React.createElement("path", {d: "M34,13 L34,19", strokeWidth: "2", strokeLinecap: "round"}), - React.createElement("path", {d: "M37,16 L31,16", strokeWidth: "2", strokeLinecap: "round"}) - ) + return React.createElement( + 'svg', + { className: className, viewBox: '0 0 48 48', version: '1.1' }, + React.createElement( + 'g', + { strokeWidth: '4', fill: 'none', fillRule: 'evenodd' }, + React.createElement('circle', { strokeWidth: '4', cx: '21', cy: '21', r: '7' }), + React.createElement('path', { d: 'M27.2,27 L34.2,36', strokeWidth: '4', strokeLinecap: 'round' }), + React.createElement('path', { d: 'M34,13 L34,19', strokeWidth: '2', strokeLinecap: 'round' }), + React.createElement('path', { d: 'M37,16 L31,16', strokeWidth: '2', strokeLinecap: 'round' }) ) ); } @@ -12758,24 +15346,26 @@ var Grommet = module.exports = SearchPlus; - /***/ }, -/* 86 */ +/* 131 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var OK = __webpack_require__(87); - var ErrorStatus = __webpack_require__(88); - var Warning = __webpack_require__(89); - var Disabled = __webpack_require__(90); - var Unknown = __webpack_require__(91); - var Label = __webpack_require__(92); + var OK = __webpack_require__(132); + var ErrorStatus = __webpack_require__(133); + var Warning = __webpack_require__(134); + var Disabled = __webpack_require__(135); + var Unknown = __webpack_require__(136); + var Label = __webpack_require__(137); - var CLASS_ROOT = "status-icon"; + var CLASS_ROOT = 'status-icon'; - var Status = React.createClass({displayName: "Status", + var Status = React.createClass({ + displayName: 'Status', propType: { large: React.PropTypes.bool, @@ -12783,44 +15373,48 @@ var Grommet = value: React.PropTypes.oneOf(['error', 'warning', 'ok', 'unknown', 'disabled']) }, - getDefaultProps: function () { - return {value: 'unknown'}; + getDefaultProps: function getDefaultProps() { + return { value: 'unknown' }; }, - render: function() { + render: function render() { var classes = [CLASS_ROOT]; if (this.props.className) { classes.push(this.props.className); } if (this.props.small) { - classes.push(CLASS_ROOT + "--small"); + classes.push(CLASS_ROOT + '--small'); } if (this.props.large) { - classes.push(CLASS_ROOT + "--large"); + classes.push(CLASS_ROOT + '--large'); } var className = classes.join(' '); - var icon = (React.createElement("span", null, '?')); + var icon = React.createElement( + 'span', + null, + '?' + ); switch (this.props.value.toLowerCase()) { - case 'ok': - case 'normal': - icon = (React.createElement(OK, {className: className})); - break; - case 'warning': - icon = (React.createElement(Warning, {className: className})); - break; - case 'error': - case 'critical': - icon = (React.createElement(ErrorStatus, {className: className})); - break; - case 'disabled': - icon = (React.createElement(Disabled, {className: className})); - break; - case 'unknown': - icon = (React.createElement(Unknown, {className: className})); - break; - case 'label': - icon = (React.createElement(Label, {className: className})); - break; + case 'ok': + case 'normal': + icon = React.createElement(OK, { className: className }); + break; + case 'warning': + icon = React.createElement(Warning, { className: className }); + break; + case 'error': + case 'critical': + icon = React.createElement(ErrorStatus, { className: className }); + break; + case 'disabled': + icon = React.createElement(Disabled, { className: className }); + break; + case 'unknown': + icon = React.createElement(Unknown, { className: className }); + break; + case 'label': + icon = React.createElement(Label, { className: className }); + break; } return icon; } @@ -12829,30 +15423,45 @@ var Grommet = module.exports = Status; - /***/ }, -/* 87 */ +/* 132 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); + var IntlMixin = __webpack_require__(3); - var OK = React.createClass({displayName: "OK", + var OK = React.createClass({ + displayName: 'OK', + + mixins: [IntlMixin], - render: function() { + render: function render() { var className = 'status-icon status-icon-ok'; if (this.props.className) { className += ' ' + this.props.className; } - return ( - React.createElement("svg", {className: className, viewBox: "0 0 24 24", version: "1.1"}, - React.createElement("g", {className: "status-icon__base", fill: "#43A547"}, - React.createElement("path", {d: "M0,4.4058651 L0,19.657478 C0,21.7548387 2.41428571,23.9929619 4.68571429,23.9929619 L19.4571429,23.9929619 C21.7285714,23.9929619 24,21.8956012 24,19.657478 L24,4.4058651 C24,2.3085044 21.7285714,0.0703812317 19.4571429,0.0703812317 L4.68571429,0.0703812317 C2.27142857,0.0703812317 0,2.16774194 0,4.4058651 L0,4.4058651 Z"}) - ), - React.createElement("g", {className: "status-icon__detail", fill: "#FFFFFF", transform: "translate(4.214286, 3.519062)"}, - React.createElement("path", {d: "M0.0428571429,6.76363636 L0.0428571429,10.5431085 L6.86428571,15.4416422 L15.6642857,4.80703812 L15.6642857,0.0492668622 L6.15,11.2469208 L0.0428571429,6.76363636 Z"}) - ) + return React.createElement( + 'svg', + { className: className, viewBox: '0 0 24 24', + role: 'img', 'aria-labelledby': 'title', version: '1.1' }, + React.createElement( + 'title', + { id: 'title' }, + this.getGrommetIntlMessage('OK') + ), + React.createElement( + 'g', + { className: 'status-icon__base' }, + React.createElement('circle', { cx: '12', cy: '12', r: '12', stroke: 'none' }) + ), + React.createElement( + 'g', + { className: 'status-icon__detail' }, + React.createElement('path', { d: 'M10,17.4 L5.3,12.7 L6.7,11.3 L10,14.6 L17.3,7.3 L18.7,8.7 L10,17.4 Z', stroke: 'none' }) ) ); } @@ -12861,30 +15470,37 @@ var Grommet = module.exports = OK; - /***/ }, -/* 88 */ +/* 133 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var ErrorStatus = React.createClass({displayName: "ErrorStatus", + var ErrorStatus = React.createClass({ + displayName: 'ErrorStatus', - render: function() { + render: function render() { var className = 'status-icon status-icon-error'; if (this.props.className) { className += ' ' + this.props.className; } - return ( - React.createElement("svg", {className: className, viewBox: "0 0 24 24", version: "1.1"}, - React.createElement("g", {className: "status-icon__base", fill: "#DC462F"}, - React.createElement("circle", {cx: "12", cy: "12", r: "12"}) - ), - React.createElement("g", {className: "status-icon__detail", fill: "#FFFFFF"}, - React.createElement("rect", {x: "4", y: "10", width: "16", height: "4"}) - ) + return React.createElement( + 'svg', + { className: className, viewBox: '0 0 24 24', version: '1.1' }, + React.createElement( + 'g', + { className: 'status-icon__base', stroke: 'none' }, + React.createElement('path', { d: 'M12,0 L24,12 L12,24 L0,12 Z' }) + ), + React.createElement( + 'g', + { className: 'status-icon__detail', fill: 'none' }, + React.createElement('path', { d: 'M8,8 L16,16', strokeWidth: '2' }), + React.createElement('path', { d: 'M8,16 L16,8', strokeWidth: '2' }) ) ); } @@ -12893,30 +15509,37 @@ var Grommet = module.exports = ErrorStatus; - /***/ }, -/* 89 */ +/* 134 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var Warning = React.createClass({displayName: "Warning", + var Warning = React.createClass({ + displayName: 'Warning', - render: function() { + render: function render() { var className = 'status-icon status-icon-warning'; if (this.props.className) { className += ' ' + this.props.className; } - return ( - React.createElement("svg", {className: className, viewBox: "0 0 27 24", version: "1.1"}, - React.createElement("g", {className: "status-icon__base", fill: "#F3B51D"}, - React.createElement("path", {d: "M26.758209,22.8752239 L14.1062687,0.494328358 C13.8268657,-0.071641791 13.2608955,-0.071641791 12.838209,0.494328358 L0.179104478,22.8752239 C-0.100298507,23.441194 0.179104478,24 0.745074627,24 L26.0561194,24 C26.758209,24 27.0376119,23.5773134 26.758209,22.8752239 L26.758209,22.8752239 Z"}) - ), - React.createElement("g", {className: "status-icon__detail", fill: "#FFFFFF", transform: "translate(12.250746, 7.307463)"}, - React.createElement("path", {d: "M2.69373134,9.01970149 L0.0214925373,9.01970149 L0.0214925373,0.0143283582 L2.69373134,0.0143283582 L2.69373134,9.01970149 L2.69373134,9.01970149 Z M2.69373134,10.9898507 L0.0214925373,10.9898507 L0.0214925373,13.6620896 L2.69373134,13.6620896 L2.69373134,10.9898507 L2.69373134,10.9898507 Z"}) - ) + return React.createElement( + 'svg', + { className: className, viewBox: '0 0 27 24', version: '1.1' }, + React.createElement( + 'g', + { className: 'status-icon__base' }, + React.createElement('path', { d: 'M12,0 L0,22 L24,22 L12,0 L12,0 Z', stroke: 'none' }) + ), + React.createElement( + 'g', + { className: 'status-icon__detail', strokeWidth: '2', transform: 'translate(11.000000, 8.000000)' }, + React.createElement('path', { d: 'M1,0 L1,6', fill: 'none' }), + React.createElement('path', { d: 'M1,8 L1,10', fill: 'none' }) ) ); } @@ -12925,30 +15548,37 @@ var Grommet = module.exports = Warning; - /***/ }, -/* 90 */ +/* 135 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var Disabled = React.createClass({displayName: "Disabled", + var Disabled = React.createClass({ + displayName: 'Disabled', - render: function() { + render: function render() { var className = 'status-icon status-icon-disabled'; if (this.props.className) { className += ' ' + this.props.className; } - return ( - React.createElement("svg", {className: className, viewBox: "0 0 24 24", version: "1.1"}, - React.createElement("g", {className: "status-icon__base", fill: "#848484"}, - React.createElement("path", {d: "M12,0 L0,12 L12,24 L24,12 L12,0 L12,0 Z"}) - ), - React.createElement("g", {className: "status-icon__detail", fill: "#FFFFFF"}, - React.createElement("circle", {cx: "12", cy: "12", r: "5.5"}) - ) + return React.createElement( + 'svg', + { className: className, viewBox: '0 0 24 24', version: '1.1' }, + React.createElement( + 'g', + { className: 'status-icon__base' }, + React.createElement('rect', { x: '0', y: '0', width: '24', height: '24', stroke: 'none' }) + ), + React.createElement( + 'g', + { className: 'status-icon__detail', strokeWidth: '2' }, + React.createElement('circle', { cx: '12', cy: '12', r: '7', fill: 'none' }), + React.createElement('path', { d: 'M7.3,7.3 L16.6,16.7', fill: 'none' }) ) ); } @@ -12957,30 +15587,37 @@ var Grommet = module.exports = Disabled; - /***/ }, -/* 91 */ +/* 136 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var Unknown = React.createClass({displayName: "Unknown", + var Unknown = React.createClass({ + displayName: 'Unknown', - render: function() { + render: function render() { var className = 'status-icon status-icon-unknown'; if (this.props.className) { className += ' ' + this.props.className; } - return ( - React.createElement("svg", {className: className, viewBox: "0 0 24 24", version: "1.1"}, - React.createElement("g", {className: "status-icon__base", fill: "#848484"}, - React.createElement("path", {d: "M12,0 L0,12 L12,24 L24,12 L12,0 L12,0 Z"}) - ), - React.createElement("g", {className: "status-icon__detail", fill: "#FFFFFF", transform: "translate(7.524324, 4.994595)"}, - React.createElement("path", {d: "M8.89945946,3.97621622 C8.89945946,4.48216216 8.64648649,4.98810811 8.39351351,5.49405405 C8.0172973,5.87027027 7.51135135,6.62918919 6.49945946,7.38810811 C5.99351351,7.76432432 5.74054054,8.14702703 5.6172973,8.4 L5.6172973,8.77621622 C5.49405405,9.02918919 5.49405405,9.53513514 5.49405405,10.1643243 L3.47027027,10.1643243 L3.47027027,9.53513514 C3.47027027,8.90594595 3.59351351,8.0172973 3.84648649,7.51135135 C3.96972973,7.13513514 4.47567568,6.62918919 5.23459459,5.99351351 C5.99351351,5.36432432 6.36972973,4.98162162 6.49945946,4.85837838 C6.75243243,4.60540541 6.87567568,4.35243243 6.87567568,3.97621622 C6.87567568,3.6 6.6227027,3.2172973 6.24648649,2.84108108 C5.87027027,2.46486486 5.23459459,2.33513514 4.60540541,2.33513514 C3.97621622,2.33513514 3.47027027,2.45837838 2.96432432,2.71135135 C2.58810811,2.96432432 2.20540541,3.34054054 2.08216216,3.84648649 L0.0583783784,3.84648649 C0.0583783784,2.83459459 0.564324324,1.95243243 1.32324324,1.19351351 C2.20540541,0.434594595 3.2172973,0.0583783784 4.48216216,0.0583783784 C5.87027027,0.0583783784 7.00540541,0.434594595 7.76432432,1.19351351 C8.51675676,1.95891892 8.89945946,2.96432432 8.89945946,3.97621622 L8.89945946,3.97621622 Z M4.47567568,10.9232432 C3.71675676,10.9232432 2.95783784,11.6821622 2.95783784,12.4410811 C2.95783784,13.2 3.71675676,13.9589189 4.47567568,13.9589189 C5.23459459,13.9589189 5.99351351,13.2 5.99351351,12.4410811 C5.99351351,11.6821622 5.23459459,10.9232432 4.47567568,10.9232432 L4.47567568,10.9232432 Z"}) - ) + return React.createElement( + 'svg', + { className: className, viewBox: '0 0 24 24', version: '1.1' }, + React.createElement( + 'g', + { className: 'status-icon__base' }, + React.createElement('path', { d: 'M12,2 C17.5,2 22,6.5 22,12 C22,17.5 17.5,22 12,22 C6.5,22 2,17.5 2,12 C2,6.5 6.5,2 12,2 L12,2 Z M12,0 C5.4,0 0,5.4 0,12 C0,18.6 5.4,24 12,24 C18.6,24 24,18.6 24,12 C24,5.4 18.6,0 12,0 L12,0 L12,0 Z', stroke: 'none' }) + ), + React.createElement( + 'g', + { className: 'status-icon__detail' }, + React.createElement('path', { d: 'M9,10.4 C9,8.8 10.4,7.6 12,7.6 C13.6,7.6 14.9,9 15,10.4 C15,11.7 14.1,12.7 12.9,13.1 C12.4,13.2 12,13.7 12,14.2 L12,15.5', fill: 'none', strokeWidth: '2' }), + React.createElement('circle', { stroke: 'none', cx: '12', cy: '17.6', r: '1' }) ) ); } @@ -12989,27 +15626,31 @@ var Grommet = module.exports = Unknown; - /***/ }, -/* 92 */ +/* 137 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + 'use strict'; + var React = __webpack_require__(2); - var Label = React.createClass({displayName: "Label", + var Label = React.createClass({ + displayName: 'Label', - render: function() { + render: function render() { var className = 'status-icon status-icon-label'; if (this.props.className) { className += ' ' + this.props.className; } - return ( - React.createElement("svg", {className: className, viewBox: "0 0 24 24", version: "1.1"}, - React.createElement("g", {className: "status-icon__base", fill: "#CCCCCC"}, - React.createElement("circle", {cx: "12", cy: "12", r: "12"}) - ) + return React.createElement( + 'svg', + { className: className, viewBox: '0 0 24 24', version: '1.1' }, + React.createElement( + 'g', + { className: 'status-icon__base' }, + React.createElement('circle', { cx: '12', cy: '12', r: '12', stroke: 'none' }) ) ); } @@ -13018,76 +15659,116 @@ var Grommet = module.exports = Label; +/***/ }, +/* 138 */ +/***/ function(module, exports, __webpack_require__) { + + // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. + + // http://jsfiddle.net/LBAr8/ + + 'use strict'; + + var React = __webpack_require__(2); + + var ReactLayeredComponent = { + + componentWillUnmount: function componentWillUnmount() { + this._unrenderLayer(); + document.body.removeChild(this._target); + }, + componentDidUpdate: function componentDidUpdate() { + this._renderLayer(); + }, + componentDidMount: function componentDidMount() { + // Appending to the body is easier than managing the z-index of everything on the page. + // It's also better for accessibility and makes stacking a snap (since components will stack + // in mount order). + this._target = document.createElement('div'); + document.body.appendChild(this._target); + this._renderLayer(); + }, + _renderLayer: function _renderLayer() { + // By calling this method in componentDidMount() and componentDidUpdate(), you're effectively + // creating a "wormhole" that funnels React's hierarchical updates through to a DOM node on an + // entirely different part of the page. + React.render(this.renderLayer(), this._target); + }, + _unrenderLayer: function _unrenderLayer() { + React.unmountComponentAtNode(this._target); + } + }; + + module.exports = ReactLayeredComponent; /***/ }, -/* 93 */ +/* 139 */ /***/ function(module, exports, __webpack_require__) { // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. - var Reflux = __webpack_require__(94); - var Rest = __webpack_require__(117); + 'use strict'; + + var Reflux = __webpack_require__(140); + var Rest = __webpack_require__(163); var Actions = Reflux.createActions({ // Session - 'login': {asyncResult: true}, + 'login': { asyncResult: true }, 'logout': {} }); - Actions.login.listen(function(userName, password) { + Actions.login.listen(function (userName, password) { if (!userName || !password) { - return this.failed(400, { message: 'loginInvalidPassword'}); + return this.failed(400, { message: 'loginInvalidPassword' }); } var thisAction = this; - Rest.post('/rest/login-sessions', - {authLoginDomain: 'LOCAL', userName: userName, password: password, loginMsgAck: true}) - .end(function(err, res) { - if (err || !res.ok) { - return thisAction.failed(err, res.body); - } - thisAction.completed(userName, res.body.sessionID); - }); + Rest.post('/rest/login-sessions', { authLoginDomain: 'LOCAL', userName: userName, password: password, loginMsgAck: true }).end(function (err, res) { + if (err || !res.ok) { + return thisAction.failed(err, res.body); + } + thisAction.completed(userName, res.body.sessionID); + }); }); module.exports = Actions; - /***/ }, -/* 94 */ +/* 140 */ /***/ function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(95); + module.exports = __webpack_require__(141); /***/ }, -/* 95 */ +/* 141 */ /***/ function(module, exports, __webpack_require__) { - exports.ActionMethods = __webpack_require__(97); + exports.ActionMethods = __webpack_require__(143); - exports.ListenerMethods = __webpack_require__(98); + exports.ListenerMethods = __webpack_require__(144); - exports.PublisherMethods = __webpack_require__(110); + exports.PublisherMethods = __webpack_require__(156); - exports.StoreMethods = __webpack_require__(111); + exports.StoreMethods = __webpack_require__(157); - exports.createAction = __webpack_require__(112); + exports.createAction = __webpack_require__(158); - exports.createStore = __webpack_require__(106); + exports.createStore = __webpack_require__(152); - exports.connect = __webpack_require__(113); + exports.connect = __webpack_require__(159); - exports.connectFilter = __webpack_require__(114); + exports.connectFilter = __webpack_require__(160); - exports.ListenerMixin = __webpack_require__(115); + exports.ListenerMixin = __webpack_require__(161); - exports.listenTo = __webpack_require__(96); + exports.listenTo = __webpack_require__(142); - exports.listenToMany = __webpack_require__(116); + exports.listenToMany = __webpack_require__(162); - var maker = __webpack_require__(105).staticJoinCreator; + var maker = __webpack_require__(151).staticJoinCreator; exports.joinTrailing = exports.all = maker("last"); // Reflux.all alias for backward compatibility @@ -13097,7 +15778,7 @@ var Grommet = exports.joinConcat = maker("all"); - var _ = __webpack_require__(99); + var _ = __webpack_require__(145); exports.EventEmitter = _.EventEmitter; @@ -13126,7 +15807,7 @@ var Grommet = * Sets the eventmitter that Reflux uses */ exports.setEventEmitter = function(ctx) { - var _ = __webpack_require__(99); + var _ = __webpack_require__(145); exports.EventEmitter = _.EventEmitter = ctx; }; @@ -13135,7 +15816,7 @@ var Grommet = * Sets the Promise library that Reflux uses */ exports.setPromise = function(ctx) { - var _ = __webpack_require__(99); + var _ = __webpack_require__(145); exports.Promise = _.Promise = ctx; }; @@ -13145,7 +15826,7 @@ var Grommet = * @param {Function} factory has the signature `function(resolver) { return [new Promise]; }` */ exports.setPromiseFactory = function(factory) { - var _ = __webpack_require__(99); + var _ = __webpack_require__(145); _.createPromise = factory; }; @@ -13154,14 +15835,14 @@ var Grommet = * Sets the method used for deferring actions and stores */ exports.nextTick = function(nextTick) { - var _ = __webpack_require__(99); + var _ = __webpack_require__(145); _.nextTick = nextTick; }; /** * Provides the set of created actions and stores for introspection */ - exports.__keep = __webpack_require__(107); + exports.__keep = __webpack_require__(153); /** * Warn if Function.prototype.bind not available @@ -13176,10 +15857,10 @@ var Grommet = /***/ }, -/* 96 */ +/* 142 */ /***/ function(module, exports, __webpack_require__) { - var Reflux = __webpack_require__(95); + var Reflux = __webpack_require__(141); /** @@ -13218,7 +15899,7 @@ var Grommet = /***/ }, -/* 97 */ +/* 143 */ /***/ function(module, exports) { /** @@ -13230,11 +15911,11 @@ var Grommet = /***/ }, -/* 98 */ +/* 144 */ /***/ function(module, exports, __webpack_require__) { - var _ = __webpack_require__(99), - maker = __webpack_require__(105).instanceJoinCreator; + var _ = __webpack_require__(145), + maker = __webpack_require__(151).instanceJoinCreator; /** * Extract child listenables from a parent from their @@ -13456,7 +16137,7 @@ var Grommet = /***/ }, -/* 99 */ +/* 145 */ /***/ function(module, exports, __webpack_require__) { /* @@ -13491,7 +16172,7 @@ var Grommet = return typeof value === 'function'; }; - exports.EventEmitter = __webpack_require__(100); + exports.EventEmitter = __webpack_require__(146); exports.nextTick = function(callback) { setTimeout(callback, 0); @@ -13513,7 +16194,7 @@ var Grommet = return o; }; - exports.Promise = __webpack_require__(101); + exports.Promise = __webpack_require__(147); exports.createPromise = function(resolver) { return new exports.Promise(resolver); @@ -13531,7 +16212,7 @@ var Grommet = /***/ }, -/* 100 */ +/* 146 */ /***/ function(module, exports) { 'use strict'; @@ -13766,22 +16447,22 @@ var Grommet = /***/ }, -/* 101 */ +/* 147 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(global, setImmediate) {/*! Native Promise Only v0.7.8-a (c) Kyle Simpson MIT License: http://getify.mit-license.org */ - !function(t,n,e){n[t]=n[t]||e(),"undefined"!=typeof module&&module.exports?module.exports=n[t]:"function"=="function"&&__webpack_require__(104)&&!(__WEBPACK_AMD_DEFINE_RESULT__ = function(){return n[t]}.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))}("Promise","undefined"!=typeof global?global:this,function(){"use strict";function t(t,n){l.add(t,n),h||(h=y(l.drain))}function n(t){var n,e=typeof t;return null==t||"object"!=e&&"function"!=e||(n=t.then),"function"==typeof n?n:!1}function e(){for(var t=0;t0&&t(e,a))}catch(s){i.call(u||new f(a),s)}}}function i(n){var o=this;o.triggered||(o.triggered=!0,o.def&&(o=o.def),o.msg=n,o.state=2,o.chain.length>0&&t(e,o))}function c(t,n,e,o){for(var r=0;r0&&t(e,a))}catch(s){i.call(u||new f(a),s)}}}function i(n){var o=this;o.triggered||(o.triggered=!0,o.def&&(o=o.def),o.msg=n,o.state=2,o.chain.length>0&&t(e,o))}function c(t,n,e,o){for(var r=0;rr;r++)if(2===n[r].length)n[r]=n[r].toUpperCase();else if(4===n[r].length)n[r]=n[r].charAt(0).toUpperCase()+n[r].slice(1);else if(1===n[r].length&&"x"!=n[r])break;e=te.call(n,"-"),(t=e.match(H))&&t.length>1&&(t.sort(),e=e.replace(RegExp("(?:"+H.source+")+","i"),te.call(t,""))),$.call(pe.tags,e)&&(e=pe.tags[e]),n=e.split("-");for(var r=1,i=n.length;i>r;r++)$.call(pe.subtags,n[r])?n[r]=pe.subtags[n[r]]:$.call(pe.extLang,n[r])&&(n[r]=pe.extLang[n[r]][0],1===r&&pe.extLang[n[1]][1]===n[0]&&(n=V.call(n,r++),i-=1));return te.call(n,"-")}function n(){return B}function r(e){var t=String(e),n=K(t);return ce.test(n)===!1?!1:!0}function i(n){if(void 0===n)return new I;for(var r=new I,n="string"==typeof n?[n]:n,i=O(n),s=i.length,a=0;s>a;){var o=String(a),l=o in i;if(l){var c=i[o];if(null==c||"string"!=typeof c&&"object"!=typeof c)throw new TypeError("String or Object type expected");var u=String(c);if(!e(u))throw new RangeError("'"+u+"' is not a structurally valid language tag");u=t(u),-1===Z.call(r,u)&&ee.call(r,u)}a++}return r}function s(e,t){for(var n=t;;){if(Z.call(e,n)>-1)return n;var r=n.lastIndexOf("-");if(0>r)return;r>=2&&"-"==n.charAt(r-2)&&(r-=2),n=n.substring(0,r)}}function a(e,t){for(var r,i=0,a=t.length;a>i&&!r;){var o=t[i],l=String(o).replace(ue,""),r=s(e,l);i++}var c=new A;if(void 0!==r){if(c["[[locale]]"]=r,String(o)!==String(l)){var u=o.match(ue)[0],p=o.indexOf("-u-");c["[[extension]]"]=u,c["[[extensionIndex]]"]=p}}else c["[[locale]]"]=n();return c}function o(e,t){return a(e,t)}function l(e,t,n,r,i){if(0===e.length)throw new ReferenceError("No locale data has been provided for this object yet.");var s=n["[[localeMatcher]]"];if("lookup"===s)var l=a(e,t);else var l=o(e,t);var c=l["[[locale]]"];if($.call(l,"[[extension]]"))var u=l["[[extension]]"],p=l["[[extensionIndex]]"],h=String.prototype.split,m=h.call(u,"-"),d=m.length;var f=new A;f["[[dataLocale]]"]=c;for(var g="-u",y=0,v=r.length;v>y;){var b=r[y],_=i[c],T=_[b],k=T[0],E="",x=Z;if(void 0!==m){var w=x.call(m,b);if(-1!==w)if(d>w+1&&m[w+1].length>2){var N=m[w+1],P=x.call(T,N);if(-1!==P)var k=N,E="-"+b+"-"+k}else{var P=x(T,"true");if(-1!==P)var k="true"}}if($.call(n,"[["+b+"]]")){var S=n["[["+b+"]]"];-1!==x.call(T,S)&&S!==k&&(k=S,E="")}f["[["+b+"]]"]=k,g+=E,y++}if(g.length>2)var C=c.substring(0,p),M=c.substring(p),c=C+g+M;return f["[[locale]]"]=c,f}function c(e,t){for(var n=t.length,r=new I,i=0;n>i;){var a=t[i],o=String(a).replace(ue,""),l=s(e,o);void 0!==l&&ee.call(r,a),i++}var c=V.call(r);return c}function u(e,t){return c(e,t)}function p(e,t,n){if(void 0!==n){var n=new A(O(n)),r=n.localeMatcher;if(void 0!==r&&(r=String(r),"lookup"!==r&&"best fit"!==r))throw new RangeError('matcher should be "lookup" or "best fit"')}if(void 0===r||"best fit"===r)var i=u(e,t);else var i=c(e,t);for(var s in i)$.call(i,s)&&X(i,s,{writable:!1,configurable:!1,value:i[s]});return X(i,"length",{writable:!1}),i}function h(e,t,n,r,i){var s=e[t];if(void 0!==s){if(s="boolean"===n?Boolean(s):"string"===n?String(s):s,void 0!==r&&-1===Z.call(r,s))throw new RangeError("'"+s+"' is not an allowed value for `"+t+"`");return s}return i}function m(e,t,n,r,i){var s=e[t];if(void 0!==s){if(s=Number(s),isNaN(s)||n>s||s>r)throw new RangeError("Value is not a number or outside accepted range");return Math.floor(s)}return i}function d(){var e=arguments[0],t=arguments[1];return this&&this!==W?f(O(this),e,t):new W.NumberFormat(e,t)}function f(e,t,n){var s=R(e),a=D();if(s["[[initializedIntlObject]]"]===!0)throw new TypeError("`this` object has already been initialized as an Intl object");X(e,"__getInternalProperties",{value:function(){return arguments[0]===se?s:void 0}}),s["[[initializedIntlObject]]"]=!0;var o=i(t);n=void 0===n?{}:O(n);var c=new A,u=h(n,"localeMatcher","string",new I("lookup","best fit"),"best fit");c["[[localeMatcher]]"]=u;var p=ie.NumberFormat["[[localeData]]"],d=l(ie.NumberFormat["[[availableLocales]]"],o,c,ie.NumberFormat["[[relevantExtensionKeys]]"],p);s["[[locale]]"]=d["[[locale]]"],s["[[numberingSystem]]"]=d["[[nu]]"],s["[[dataLocale]]"]=d["[[dataLocale]]"];var f=d["[[dataLocale]]"],v=h(n,"style","string",new I("decimal","percent","currency"),"decimal");s["[[style]]"]=v;var b=h(n,"currency","string");if(void 0!==b&&!r(b))throw new RangeError("'"+b+"' is not a valid currency code");if("currency"===v&&void 0===b)throw new TypeError("Currency code is required when style is currency");if("currency"===v){b=b.toUpperCase(),s["[[currency]]"]=b;var _=g(b)}var T=h(n,"currencyDisplay","string",new I("code","symbol","name"),"symbol");"currency"===v&&(s["[[currencyDisplay]]"]=T);var k=m(n,"minimumIntegerDigits",1,21,1);s["[[minimumIntegerDigits]]"]=k;var E="currency"===v?_:0,x=m(n,"minimumFractionDigits",0,20,E);s["[[minimumFractionDigits]]"]=x;var w="currency"===v?Math.max(x,_):"percent"===v?Math.max(x,0):Math.max(x,3),N=m(n,"maximumFractionDigits",x,20,w);s["[[maximumFractionDigits]]"]=N;var P=n.minimumSignificantDigits,S=n.maximumSignificantDigits;(void 0!==P||void 0!==S)&&(P=m(n,"minimumSignificantDigits",1,21,1),S=m(n,"maximumSignificantDigits",P,21,21),s["[[minimumSignificantDigits]]"]=P,s["[[maximumSignificantDigits]]"]=S);var C=h(n,"useGrouping","boolean",void 0,!0);s["[[useGrouping]]"]=C;var M=p[f],j=M.patterns,L=j[v];return s["[[positivePattern]]"]=L.positivePattern,s["[[negativePattern]]"]=L.negativePattern,s["[[boundFormat]]"]=void 0,s["[[initializedNumberFormat]]"]=!0,J&&(e.format=y.call(e)),a.exp.test(a.input),e}function g(e){return void 0!==he[e]?he[e]:2}function y(){var e=null!=this&&"object"==typeof this&&R(this);if(!e||!e["[[initializedNumberFormat]]"])throw new TypeError("`this` value for format() is not an initialized Intl.NumberFormat object.");if(void 0===e["[[boundFormat]]"]){var t=function(e){return v(this,Number(e))},n=re.call(t,this);e["[[boundFormat]]"]=n}return e["[[boundFormat]]"]}function v(e,t){var n,r=D(),i=R(e),s=i["[[dataLocale]]"],a=i["[[numberingSystem]]"],o=ie.NumberFormat["[[localeData]]"][s],l=o.symbols[a]||o.symbols.latn,c=!1;if(isFinite(t)===!1)isNaN(t)?n=l.nan:(n=l.infinity,0>t&&(c=!0));else{if(0>t&&(c=!0,t=-t),"percent"===i["[[style]]"]&&(t*=100),n=$.call(i,"[[minimumSignificantDigits]]")&&$.call(i,"[[maximumSignificantDigits]]")?b(t,i["[[minimumSignificantDigits]]"],i["[[maximumSignificantDigits]]"]):_(t,i["[[minimumIntegerDigits]]"],i["[[minimumFractionDigits]]"],i["[[maximumFractionDigits]]"]),me[a]){var u=me[i["[[numberingSystem]]"]];n=String(n).replace(/\d/g,function(e){return u[e]})}else n=String(n);if(n=n.replace(/\./g,l.decimal),i["[[useGrouping]]"]===!0){var p=n.split(l.decimal),h=p[0],m=o.patterns.primaryGroupSize||3,d=o.patterns.secondaryGroupSize||m;if(h.length>m){var f=new I,g=h.length-m,y=g%d,v=h.slice(0,y);for(v.length&&ee.call(f,v);g>y;)ee.call(f,h.slice(y,y+d)),y+=d;ee.call(f,h.slice(g)),p[0]=te.call(f,l.group)}n=te.call(p,l.decimal)}}var T=i[c===!0?"[[negativePattern]]":"[[positivePattern]]"];if(T=T.replace("{number}",n),"currency"===i["[[style]]"]){var k,E=i["[[currency]]"],x=o.currencies[E];switch(i["[[currencyDisplay]]"]){case"symbol":k=x||E;break;default:case"code":case"name":k=E}T=T.replace("{currency}",k)}return r.exp.test(r.input),T}function b(e,t,n){var r=n;if(0===e)var i=te.call(Array(r+1),"0"),s=0;else var s=j(Math.abs(e)),a=Math.round(Math.exp(Math.abs(s-r+1)*Math.LN10)),i=String(Math.round(0>s-r+1?e*a:e/a));if(s>=r)return i+te.call(Array(s-r+1+1),"0");if(s===r-1)return i;if(s>=0?i=i.slice(0,s+1)+"."+i.slice(s+1):0>s&&(i="0."+te.call(Array(-(s+1)+1),"0")+i),i.indexOf(".")>=0&&n>t){for(var o=n-t;o>0&&"0"===i.charAt(i.length-1);)i=i.slice(0,-1),o--;"."===i.charAt(i.length-1)&&(i=i.slice(0,-1))}return i}function _(e,t,n,r){var i,s=Number.prototype.toFixed.call(e,r),a=s.split(".")[0].length,o=r-n,l=(i=s.indexOf("e"))>-1?s.slice(i+1):0;for(l&&(s=s.slice(0,i).replace(".",""),s+=te.call(Array(l-(s.length-1)+1),"0")+"."+te.call(Array(r+1),"0"),a=s.length);o>0&&"0"===s.slice(-1);)s=s.slice(0,-1),o--;if("."===s.slice(-1)&&(s=s.slice(0,-1)),t>a)var c=te.call(Array(t-a+1),"0");return(c?c:"")+s}function T(){var e=arguments[0],t=arguments[1];return this&&this!==W?k(O(this),e,t):new W.DateTimeFormat(e,t)}function k(e,t,n){var r=R(e),s=D();if(r["[[initializedIntlObject]]"]===!0)throw new TypeError("`this` object has already been initialized as an Intl object");X(e,"__getInternalProperties",{value:function(){return arguments[0]===se?r:void 0}}),r["[[initializedIntlObject]]"]=!0;var a=i(t),n=E(n,"any","date"),o=new A;_=h(n,"localeMatcher","string",new I("lookup","best fit"),"best fit"),o["[[localeMatcher]]"]=_;var c=ie.DateTimeFormat,u=c["[[localeData]]"],p=l(c["[[availableLocales]]"],a,o,c["[[relevantExtensionKeys]]"],u);r["[[locale]]"]=p["[[locale]]"],r["[[calendar]]"]=p["[[ca]]"],r["[[numberingSystem]]"]=p["[[nu]]"],r["[[dataLocale]]"]=p["[[dataLocale]]"];var m=p["[[dataLocale]]"],d=n.timeZone;if(void 0!==d&&(d=K(d),"UTC"!==d))throw new RangeError("timeZone is not supported.");r["[[timeZone]]"]=d,o=new A;for(var f in de)if($.call(de,f)){var g=h(n,f,"string",de[f]);o["[["+f+"]]"]=g}var y,v=u[m],b=v.formats,_=h(n,"formatMatcher","string",new I("basic","best fit"),"best fit");y="basic"===_?x(o,b):N(o,b);for(var f in de)if($.call(de,f)&&$.call(y,f)){var T=y[f];r["[["+f+"]]"]=T}var k,w=h(n,"hour12","boolean");if(r["[[hour]]"])if(w=void 0===w?v.hour12:w,r["[[hour12]]"]=w,w===!0){var S=v.hourNo0;r["[[hourNo0]]"]=S,k=y.pattern12}else k=y.pattern;else k=y.pattern;return r["[[pattern]]"]=k,r["[[boundFormat]]"]=void 0,r["[[initializedDateTimeFormat]]"]=!0,J&&(e.format=P.call(e)),s.exp.test(s.input),e}function E(e,t,n){if(void 0===e)e=null;else{var r=O(e);e=new A;for(var i in r)e[i]=r[i]}var s=Y,e=s(e),a=!0;return("date"===t||"any"===t)&&(void 0!==e.weekday||void 0!==e.year||void 0!==e.month||void 0!==e.day)&&(a=!1),("time"===t||"any"===t)&&(void 0!==e.hour||void 0!==e.minute||void 0!==e.second)&&(a=!1),!a||"date"!==n&&"all"!==n||(e.year=e.month=e.day="numeric"),!a||"time"!==n&&"all"!==n||(e.hour=e.minute=e.second="numeric"),e}function x(e,t){return w(e,t)}function w(e,t,n){for(var r,i=8,s=120,a=20,o=8,l=6,c=6,u=3,p=-(1/0),h=0,m=t.length;m>h;){var d=t[h],f=0;for(var g in de)if($.call(de,g)){var y=e["[["+g+"]]"],v=$.call(d,g)?d[g]:void 0;if(void 0===y&&void 0!==v)f-=a;else if(void 0!==y&&void 0===v)f-=s;else{var b=["2-digit","numeric","narrow","short","long"],_=Z.call(b,y),T=Z.call(b,v),k=Math.max(Math.min(T-_,2),-2);!n||("numeric"!==y&&"2-digit"!==y||"numeric"===v||"2-digit"===v)&&("numeric"===y||"2-digit"===y||"2-digit"!==v&&"numeric"!==v)||(f-=i),2===k?f-=l:1===k?f-=u:-1===k?f-=c:-2===k&&(f-=o)}}f>p&&(p=f,r=d),h++}return r}function N(e,t){return w(e,t,!0)}function P(){var e=null!=this&&"object"==typeof this&&R(this);if(!e||!e["[[initializedDateTimeFormat]]"])throw new TypeError("`this` value for format() is not an initialized Intl.DateTimeFormat object.");if(void 0===e["[[boundFormat]]"]){var t=function(){var e=Number(0===arguments.length?Date.now():arguments[0]);return S(this,e)},n=re.call(t,this);e["[[boundFormat]]"]=n}return e["[[boundFormat]]"]}function S(e,t){if(!isFinite(t))throw new RangeError("Invalid valid date passed to format");var n=e.__getInternalProperties(se),r=D(),i=n["[[locale]]"],s=new W.NumberFormat([i],{useGrouping:!1}),a=new W.NumberFormat([i],{minimumIntegerDigits:2,useGrouping:!1}),o=C(t,n["[[calendar]]"],n["[[timeZone]]"]),l=n["[[pattern]]"],c=n["[[dataLocale]]"],u=ie.DateTimeFormat["[[localeData]]"][c].calendars,p=n["[[calendar]]"];for(var h in de)if($.call(n,"[["+h+"]]")){var m,d,f=n["[["+h+"]]"],g=o["[["+h+"]]"];if("year"===h&&0>=g?g=1-g:"month"===h?g++:"hour"===h&&n["[[hour12]]"]===!0&&(g%=12,m=g!==o["[["+h+"]]"],0===g&&n["[[hourNo0]]"]===!0&&(g=12)),"numeric"===f)d=v(s,g);else if("2-digit"===f)d=v(a,g),d.length>2&&(d=d.slice(-2));else if(f in ae)switch(h){case"month":d=F(u,p,"months",f,o["[["+h+"]]"]);break;case"weekday":try{d=F(u,p,"days",f,o["[["+h+"]]"])}catch(y){throw new Error("Could not find weekday data for locale "+i)}break;case"timeZoneName":d="";break;default:d=o["[["+h+"]]"]}l=l.replace("{"+h+"}",d)}return n["[[hour12]]"]===!0&&(d=F(u,p,"dayPeriods",m?"pm":"am"),l=l.replace("{ampm}",d)),r.exp.test(r.input),l}function C(e,t,n){var r=new Date(e),i="get"+(n||"");return new A({"[[weekday]]":r[i+"Day"](),"[[era]]":+(r[i+"FullYear"]()>=0),"[[year]]":r[i+"FullYear"](),"[[month]]":r[i+"Month"](),"[[day]]":r[i+"Date"](),"[[hour]]":r[i+"Hours"](),"[[minute]]":r[i+"Minutes"](),"[[second]]":r[i+"Seconds"](),"[[inDST]]":!1})}function M(e,t){if(!e.number)throw new Error("Object passed doesn't contain locale data for Intl.NumberFormat");var n,r=[t],i=t.split("-");for(i.length>2&&4==i[1].length&&ee.call(r,i[0]+"-"+i[2]);n=ne.call(r);)ee.call(ie.NumberFormat["[[availableLocales]]"],n),ie.NumberFormat["[[localeData]]"][n]=e.number,e.date&&(e.date.nu=e.number.nu,ee.call(ie.DateTimeFormat["[[availableLocales]]"],n),ie.DateTimeFormat["[[localeData]]"][n]=e.date);void 0===B&&(B=t),oe||(f(W.NumberFormat.prototype),oe=!0),e.date&&!le&&(k(W.DateTimeFormat.prototype),le=!0)}function j(e){if("function"==typeof Math.log10)return Math.floor(Math.log10(e));var t=Math.round(Math.log(e)*Math.LOG10E);return t-(Number("1e"+t)>e)}function L(e){if(!$.call(this,"[[availableLocales]]"))throw new TypeError("supportedLocalesOf() is not a constructor");var t=D(),n=arguments[1],r=this["[[availableLocales]]"],s=i(e);return t.exp.test(t.input),p(r,s,n)}function F(e,t,n,r,i){var s=e[t]&&e[t][n]?e[t][n]:e.gregory[n],a={narrow:["short","long"],"short":["long","narrow"],"long":["short","narrow"]},o=$.call(s,r)?s[r]:$.call(s,a[r][0])?s[a[r][0]]:s[a[r][1]];return null!=i?o[i]:o}function A(e){for(var t in e)(e instanceof A||$.call(e,t))&&X(this,t,{value:e[t],enumerable:!0,writable:!0,configurable:!0})}function I(){X(this,"length",{writable:!0,value:0}),arguments.length&&ee.apply(this,V.call(arguments))}function D(){for(var e=/[.?*+^$[\]\\(){}|-]/g,t=RegExp.lastMatch,n=RegExp.multiline?"m":"",r={input:RegExp.input},i=new I,s=!1,a={},o=1;9>=o;o++)s=(a["$"+o]=RegExp["$"+o])||s;if(t=t.replace(e,"\\$&"),s)for(var o=1;9>=o;o++){var l=a["$"+o];l?(l=l.replace(e,"\\$&"),t=t.replace(l,"("+l+")")):t="()"+t,ee.call(i,t.slice(0,t.indexOf("(")+1)),t=t.slice(t.indexOf("(")+1)}return r.exp=new RegExp(te.call(i,"")+t,n),r}function K(e){for(var t=e.length;t--;){var n=e.charAt(t);n>="a"&&"z">=n&&(e=e.slice(0,t)+n.toUpperCase()+e.slice(t+1))}return e}function O(e){if(null==e)throw new TypeError("Cannot convert null or undefined to object");return Object(e)}function R(e){return $.call(e,"__getInternalProperties")?e.__getInternalProperties(se):Y(null)}var B,z,H,G,U,W={},q=function(){try{return!!Object.defineProperty({},"a",{})}catch(e){return!1}}(),J=!q&&!Object.prototype.__defineGetter__,$=Object.prototype.hasOwnProperty,X=q?Object.defineProperty:function(e,t,n){"get"in n&&e.__defineGetter__?e.__defineGetter__(t,n.get):(!$.call(e,t)||"value"in n)&&(e[t]=n.value)},Z=Array.prototype.indexOf||function(e){var t=this;if(!t.length)return-1;for(var n=arguments[1]||0,r=t.length;r>n;n++)if(t[n]===e)return n;return-1},Y=Object.create||function(e,t){function n(){}var r;n.prototype=e,r=new n;for(var i in t)$.call(t,i)&&X(r,i,t[i]);return r},V=Array.prototype.slice,Q=Array.prototype.concat,ee=Array.prototype.push,te=Array.prototype.join,ne=Array.prototype.shift,re=(Array.prototype.unshift,Function.prototype.bind||function(e){var t=this,n=V.call(arguments,1);return 1===t.length?function(r){return t.apply(e,Q.call(n,V.call(arguments)))}:function(){return t.apply(e,Q.call(n,V.call(arguments)))}}),ie=Y(null),se=Math.random(),ae=Y(null,{narrow:{},"short":{},"long":{}}),oe=!1,le=!1,ce=/^[A-Z]{3}$/,ue=/-u(?:-[0-9a-z]{2,8})+/gi,pe={tags:{"art-lojban":"jbo","i-ami":"ami","i-bnn":"bnn","i-hak":"hak","i-klingon":"tlh","i-lux":"lb","i-navajo":"nv","i-pwn":"pwn","i-tao":"tao","i-tay":"tay","i-tsu":"tsu","no-bok":"nb","no-nyn":"nn","sgn-BE-FR":"sfb","sgn-BE-NL":"vgt","sgn-CH-DE":"sgg","zh-guoyu":"cmn","zh-hakka":"hak","zh-min-nan":"nan","zh-xiang":"hsn","sgn-BR":"bzs","sgn-CO":"csn","sgn-DE":"gsg","sgn-DK":"dsl","sgn-ES":"ssp","sgn-FR":"fsl","sgn-GB":"bfi","sgn-GR":"gss","sgn-IE":"isg","sgn-IT":"ise","sgn-JP":"jsl","sgn-MX":"mfs","sgn-NI":"ncs","sgn-NL":"dse","sgn-NO":"nsl","sgn-PT":"psr","sgn-SE":"swl","sgn-US":"ase","sgn-ZA":"sfs","zh-cmn":"cmn","zh-cmn-Hans":"cmn-Hans","zh-cmn-Hant":"cmn-Hant","zh-gan":"gan","zh-wuu":"wuu","zh-yue":"yue"},subtags:{BU:"MM",DD:"DE",FX:"FR",TP:"TL",YD:"YE",ZR:"CD",heploc:"alalc97","in":"id",iw:"he",ji:"yi",jw:"jv",mo:"ro",ayx:"nun",bjd:"drl",ccq:"rki",cjr:"mom",cka:"cmr",cmk:"xch",drh:"khk",drw:"prs",gav:"dev",hrr:"jal",ibi:"opa",kgh:"kml",lcq:"ppr",mst:"mry",myt:"mry",sca:"hle",tie:"ras",tkk:"twm",tlw:"weo",tnf:"prs",ybd:"rki",yma:"lrr"},extLang:{aao:["aao","ar"],abh:["abh","ar"],abv:["abv","ar"],acm:["acm","ar"],acq:["acq","ar"],acw:["acw","ar"],acx:["acx","ar"],acy:["acy","ar"],adf:["adf","ar"],ads:["ads","sgn"],aeb:["aeb","ar"],aec:["aec","ar"],aed:["aed","sgn"],aen:["aen","sgn"],afb:["afb","ar"],afg:["afg","sgn"],ajp:["ajp","ar"],apc:["apc","ar"],apd:["apd","ar"],arb:["arb","ar"],arq:["arq","ar"],ars:["ars","ar"],ary:["ary","ar"],arz:["arz","ar"],ase:["ase","sgn"],asf:["asf","sgn"],asp:["asp","sgn"],asq:["asq","sgn"],asw:["asw","sgn"],auz:["auz","ar"],avl:["avl","ar"],ayh:["ayh","ar"],ayl:["ayl","ar"],ayn:["ayn","ar"],ayp:["ayp","ar"],bbz:["bbz","ar"],bfi:["bfi","sgn"],bfk:["bfk","sgn"],bjn:["bjn","ms"],bog:["bog","sgn"],bqn:["bqn","sgn"],bqy:["bqy","sgn"],btj:["btj","ms"],bve:["bve","ms"],bvl:["bvl","sgn"],bvu:["bvu","ms"],bzs:["bzs","sgn"],cdo:["cdo","zh"],cds:["cds","sgn"],cjy:["cjy","zh"],cmn:["cmn","zh"],coa:["coa","ms"],cpx:["cpx","zh"],csc:["csc","sgn"],csd:["csd","sgn"],cse:["cse","sgn"],csf:["csf","sgn"],csg:["csg","sgn"],csl:["csl","sgn"],csn:["csn","sgn"],csq:["csq","sgn"],csr:["csr","sgn"],czh:["czh","zh"],czo:["czo","zh"],doq:["doq","sgn"],dse:["dse","sgn"],dsl:["dsl","sgn"],dup:["dup","ms"],ecs:["ecs","sgn"],esl:["esl","sgn"],esn:["esn","sgn"],eso:["eso","sgn"],eth:["eth","sgn"],fcs:["fcs","sgn"],fse:["fse","sgn"],fsl:["fsl","sgn"],fss:["fss","sgn"],gan:["gan","zh"],gds:["gds","sgn"],gom:["gom","kok"],gse:["gse","sgn"],gsg:["gsg","sgn"],gsm:["gsm","sgn"],gss:["gss","sgn"],gus:["gus","sgn"],hab:["hab","sgn"],haf:["haf","sgn"],hak:["hak","zh"],hds:["hds","sgn"],hji:["hji","ms"],hks:["hks","sgn"],hos:["hos","sgn"],hps:["hps","sgn"],hsh:["hsh","sgn"],hsl:["hsl","sgn"],hsn:["hsn","zh"],icl:["icl","sgn"],ils:["ils","sgn"],inl:["inl","sgn"],ins:["ins","sgn"],ise:["ise","sgn"],isg:["isg","sgn"],isr:["isr","sgn"],jak:["jak","ms"],jax:["jax","ms"],jcs:["jcs","sgn"],jhs:["jhs","sgn"],jls:["jls","sgn"],jos:["jos","sgn"],jsl:["jsl","sgn"],jus:["jus","sgn"],kgi:["kgi","sgn"],knn:["knn","kok"],kvb:["kvb","ms"],kvk:["kvk","sgn"],kvr:["kvr","ms"],kxd:["kxd","ms"],lbs:["lbs","sgn"],lce:["lce","ms"],lcf:["lcf","ms"],liw:["liw","ms"],lls:["lls","sgn"],lsg:["lsg","sgn"],lsl:["lsl","sgn"],lso:["lso","sgn"],lsp:["lsp","sgn"],lst:["lst","sgn"],lsy:["lsy","sgn"],ltg:["ltg","lv"],lvs:["lvs","lv"],lzh:["lzh","zh"],max:["max","ms"],mdl:["mdl","sgn"],meo:["meo","ms"],mfa:["mfa","ms"],mfb:["mfb","ms"],mfs:["mfs","sgn"],min:["min","ms"],mnp:["mnp","zh"],mqg:["mqg","ms"],mre:["mre","sgn"],msd:["msd","sgn"],msi:["msi","ms"],msr:["msr","sgn"],mui:["mui","ms"],mzc:["mzc","sgn"],mzg:["mzg","sgn"],mzy:["mzy","sgn"],nan:["nan","zh"],nbs:["nbs","sgn"],ncs:["ncs","sgn"],nsi:["nsi","sgn"],nsl:["nsl","sgn"],nsp:["nsp","sgn"],nsr:["nsr","sgn"],nzs:["nzs","sgn"],okl:["okl","sgn"],orn:["orn","ms"],ors:["ors","ms"],pel:["pel","ms"],pga:["pga","ar"],pks:["pks","sgn"],prl:["prl","sgn"],prz:["prz","sgn"],psc:["psc","sgn"],psd:["psd","sgn"],pse:["pse","ms"],psg:["psg","sgn"],psl:["psl","sgn"],pso:["pso","sgn"],psp:["psp","sgn"],psr:["psr","sgn"],pys:["pys","sgn"],rms:["rms","sgn"],rsi:["rsi","sgn"],rsl:["rsl","sgn"],sdl:["sdl","sgn"],sfb:["sfb","sgn"],sfs:["sfs","sgn"],sgg:["sgg","sgn"],sgx:["sgx","sgn"],shu:["shu","ar"],slf:["slf","sgn"],sls:["sls","sgn"],sqk:["sqk","sgn"],sqs:["sqs","sgn"],ssh:["ssh","ar"],ssp:["ssp","sgn"],ssr:["ssr","sgn"],svk:["svk","sgn"],swc:["swc","sw"],swh:["swh","sw"],swl:["swl","sgn"],syy:["syy","sgn"],tmw:["tmw","ms"],tse:["tse","sgn"],tsm:["tsm","sgn"],tsq:["tsq","sgn"],tss:["tss","sgn"],tsy:["tsy","sgn"],tza:["tza","sgn"],ugn:["ugn","sgn"],ugy:["ugy","sgn"],ukl:["ukl","sgn"],uks:["uks","sgn"],urk:["urk","ms"],uzn:["uzn","uz"],uzs:["uzs","uz"],vgt:["vgt","sgn"],vkk:["vkk","ms"],vkt:["vkt","ms"],vsi:["vsi","sgn"],vsl:["vsl","sgn"],vsv:["vsv","sgn"],wuu:["wuu","zh"],xki:["xki","sgn"],xml:["xml","sgn"],xmm:["xmm","ms"],xms:["xms","sgn"],yds:["yds","sgn"],ysl:["ysl","sgn"],yue:["yue","zh"],zib:["zib","sgn"],zlm:["zlm","ms"],zmi:["zmi","ms"],zsl:["zsl","sgn"],zsm:["zsm","ms"]}},he={BHD:3,BYR:0,XOF:0,BIF:0,XAF:0,CLF:0,CLP:0,KMF:0,DJF:0,XPF:0,GNF:0,ISK:0,IQD:3,JPY:0,JOD:3,KRW:0,KWD:3,LYD:3,OMR:3,PYG:0,RWF:0,TND:3,UGX:0,UYI:0,VUV:0,VND:0};!function(){var e="[a-z]{3}(?:-[a-z]{3}){0,2}",t="(?:[a-z]{2,3}(?:-"+e+")?|[a-z]{4}|[a-z]{5,8})",n="[a-z]{4}",r="(?:[a-z]{2}|\\d{3})",i="(?:[a-z0-9]{5,8}|\\d[a-z0-9]{3})",s="[0-9a-wy-z]",a=s+"(?:-[a-z0-9]{2,8})+",o="x(?:-[a-z0-9]{1,8})+",l="(?:en-GB-oed|i-(?:ami|bnn|default|enochian|hak|klingon|lux|mingo|navajo|pwn|tao|tay|tsu)|sgn-(?:BE-FR|BE-NL|CH-DE))",c="(?:art-lojban|cel-gaulish|no-bok|no-nyn|zh-(?:guoyu|hakka|min|min-nan|xiang))",u="(?:"+l+"|"+c+")",p=t+"(?:-"+n+")?(?:-"+r+")?(?:-"+i+")*(?:-"+a+")*(?:-"+o+")?";z=RegExp("^(?:"+p+"|"+o+"|"+u+")$","i"),G=RegExp("^(?!x).*?-("+i+")-(?:\\w{4,8}-(?!x-))*\\1\\b","i"),U=RegExp("^(?!x).*?-("+s+")-(?:\\w+-(?!x-))*\\1\\b","i"),H=RegExp("-"+a,"ig")}(),X(W,"NumberFormat",{configurable:!0,writable:!0,value:d}),X(W.NumberFormat,"prototype",{writable:!1}),ie.NumberFormat={"[[availableLocales]]":[],"[[relevantExtensionKeys]]":["nu"],"[[localeData]]":{}},X(W.NumberFormat,"supportedLocalesOf",{configurable:!0,writable:!0,value:re.call(L,ie.NumberFormat)}),X(W.NumberFormat.prototype,"format",{configurable:!0,get:y});var me={arab:["٠","١","٢","٣","٤","٥","٦","٧","٨","٩"],arabext:["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],bali:["᭐","᭑","᭒","᭓","᭔","᭕","᭖","᭗","᭘","᭙"],beng:["০","১","২","৩","৪","৫","৬","৭","৮","৯"],deva:["०","१","२","३","४","५","६","७","८","९"],fullwide:["0","1","2","3","4","5","6","7","8","9"],gujr:["૦","૧","૨","૩","૪","૫","૬","૭","૮","૯"],guru:["੦","੧","੨","੩","੪","੫","੬","੭","੮","੯"],hanidec:["〇","一","二","三","四","五","六","七","八","九"],khmr:["០","១","២","៣","៤","៥","៦","៧","៨","៩"],knda:["೦","೧","೨","೩","೪","೫","೬","೭","೮","೯"],laoo:["໐","໑","໒","໓","໔","໕","໖","໗","໘","໙"],latn:["0","1","2","3","4","5","6","7","8","9"],limb:["᥆","᥇","᥈","᥉","᥊","᥋","᥌","᥍","᥎","᥏"],mlym:["൦","൧","൨","൩","൪","൫","൬","൭","൮","൯"],mong:["᠐","᠑","᠒","᠓","᠔","᠕","᠖","᠗","᠘","᠙"],mymr:["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],orya:["୦","୧","୨","୩","୪","୫","୬","୭","୮","୯"],tamldec:["௦","௧","௨","௩","௪","௫","௬","௭","௮","௯"],telu:["౦","౧","౨","౩","౪","౫","౬","౭","౮","౯"],thai:["๐","๑","๒","๓","๔","๕","๖","๗","๘","๙"],tibt:["༠","༡","༢","༣","༤","༥","༦","༧","༨","༩"]};X(W.NumberFormat.prototype,"resolvedOptions",{configurable:!0,writable:!0,value:function(){var e,t=new A,n=["locale","numberingSystem","style","currency","currencyDisplay","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","useGrouping"],r=null!=this&&"object"==typeof this&&R(this);if(!r||!r["[[initializedNumberFormat]]"])throw new TypeError("`this` value for resolvedOptions() is not an initialized Intl.NumberFormat object.");for(var i=0,s=n.length;s>i;i++)$.call(r,e="[["+n[i]+"]]")&&(t[n[i]]={value:r[e],writable:!0,configurable:!0,enumerable:!0});return Y({},t)}}),X(W,"DateTimeFormat",{configurable:!0,writable:!0,value:T}),X(T,"prototype",{writable:!1});var de={weekday:["narrow","short","long"],era:["narrow","short","long"],year:["2-digit","numeric"],month:["2-digit","numeric","narrow","short","long"],day:["2-digit","numeric"],hour:["2-digit","numeric"],minute:["2-digit","numeric"],second:["2-digit","numeric"],timeZoneName:["short","long"]};ie.DateTimeFormat={"[[availableLocales]]":[],"[[relevantExtensionKeys]]":["ca","nu"],"[[localeData]]":{}},X(W.DateTimeFormat,"supportedLocalesOf",{configurable:!0,writable:!0,value:re.call(L,ie.DateTimeFormat)}),X(W.DateTimeFormat.prototype,"format",{configurable:!0,get:P}),X(W.DateTimeFormat.prototype,"resolvedOptions",{writable:!0,configurable:!0,value:function(){var e,t=new A,n=["locale","calendar","numberingSystem","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName"],r=null!=this&&"object"==typeof this&&R(this);if(!r||!r["[[initializedDateTimeFormat]]"])throw new TypeError("`this` value for resolvedOptions() is not an initialized Intl.DateTimeFormat object.");for(var i=0,s=n.length;s>i;i++)$.call(r,e="[["+n[i]+"]]")&&(t[n[i]]={value:r[e],writable:!0,configurable:!0,enumerable:!0});return Y({},t)}});var fe=W.__localeSensitiveProtos={Number:{},Date:{}};return fe.Number.toLocaleString=function(){if("[object Number]"!==Object.prototype.toString.call(this))throw new TypeError("`this` value must be a number for Number.prototype.toLocaleString()");return v(new d(arguments[0],arguments[1]),this)},fe.Date.toLocaleString=function(){if("[object Date]"!==Object.prototype.toString.call(this))throw new TypeError("`this` value must be a Date instance for Date.prototype.toLocaleString()");var e=+this;if(isNaN(e))return"Invalid Date";var t=arguments[0],n=arguments[1],n=E(n,"any","all"),r=new T(t,n);return S(r,e)},fe.Date.toLocaleDateString=function(){if("[object Date]"!==Object.prototype.toString.call(this))throw new TypeError("`this` value must be a Date instance for Date.prototype.toLocaleDateString()");var e=+this;if(isNaN(e))return"Invalid Date";var t=arguments[0],n=arguments[1],n=E(n,"date","date"),r=new T(t,n);return S(r,e)},fe.Date.toLocaleTimeString=function(){if("[object Date]"!==Object.prototype.toString.call(this))throw new TypeError("`this` value must be a Date instance for Date.prototype.toLocaleTimeString()");var e=+this;if(isNaN(e))return"Invalid Date";var t=arguments[0],n=arguments[1],n=E(n,"time","time"),r=new T(t,n);return S(r,e)},X(W,"__applyLocaleSensitivePrototypes",{writable:!0,configurable:!0,value:function(){X(Number.prototype,"toLocaleString",{writable:!0,configurable:!0,value:fe.Number.toLocaleString});for(var e in fe.Date)$.call(fe.Date,e)&&X(Date.prototype,e,{writable:!0,configurable:!0,value:fe.Date[e]})}}),X(W,"__addLocaleData",{value:function(t){if(!e(t.locale))throw new Error("Object passed doesn't identify itself with a valid language tag");M(t,t.locale)}}),A.prototype=Y(null),I.prototype=Y(null),W})}).call(t,function(){return this}())},function(e,t){e.exports={locale:"en-US",date:{ca:["gregory","buddhist","chinese","coptic","ethioaa","ethiopic","generic","hebrew","indian","islamic","japanese","persian","roc"],hourNo0:!0,hour12:!0,formats:[{weekday:"long",month:"long",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",pattern:"{weekday}, {month} {day}, {year}, {hour}:{minute}:{second}",pattern12:"{weekday}, {month} {day}, {year}, {hour}:{minute}:{second} {ampm}"},{weekday:"long",month:"long",day:"numeric",year:"numeric",pattern:"{weekday}, {month} {day}, {year}"},{month:"long",day:"numeric",year:"numeric",pattern:"{month} {day}, {year}"},{month:"numeric",day:"numeric",year:"numeric",pattern:"{month}/{day}/{year}"},{month:"numeric",year:"numeric",pattern:"{month}/{year}"},{month:"long",year:"numeric",pattern:"{month} {year}"},{month:"long",day:"numeric",pattern:"{month} {day}"},{month:"numeric",day:"numeric",pattern:"{month}/{day}"},{hour:"numeric",minute:"2-digit",second:"2-digit",pattern:"{hour}:{minute}:{second}",pattern12:"{hour}:{minute}:{second} {ampm}"},{hour:"numeric",minute:"2-digit",pattern:"{hour}:{minute}",pattern12:"{hour}:{minute} {ampm}"}],calendars:{buddhist:{eras:{"short":["BE"]}},chinese:{months:{"short":["Mo1","Mo2","Mo3","Mo4","Mo5","Mo6","Mo7","Mo8","Mo9","Mo10","Mo11","Mo12"],"long":["Month1","Month2","Month3","Month4","Month5","Month6","Month7","Month8","Month9","Month10","Month11","Month12"]}},coptic:{months:{"long":["Tout","Baba","Hator","Kiahk","Toba","Amshir","Baramhat","Baramouda","Bashans","Paona","Epep","Mesra","Nasie"]},eras:{"short":["ERA0","ERA1"]}},ethiopic:{months:{"long":["Meskerem","Tekemt","Hedar","Tahsas","Ter","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehasse","Pagumen"]},eras:{"short":["ERA0","ERA1"]}},ethioaa:{eras:{"short":["ERA0"]}},generic:{months:{"long":["M01","M02","M03","M04","M05","M06","M07","M08","M09","M10","M11","M12"]},eras:{"short":["ERA0","ERA1"]}},gregory:{months:{"short":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"long":["January","February","March","April","May","June","July","August","September","October","November","December"]},days:{narrow:["Su","Mo","Tu","We","Th","Fr","Sa"],"short":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"long":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["B","A"],"short":["BC","AD","BCE","CE"],"long":["Before Christ","Anno Domini","Before Common Era","Common Era"]},dayPeriods:{am:"AM",pm:"PM"}},hebrew:{months:{"long":["Tishri","Heshvan","Kislev","Tevet","Shevat","Adar I","Adar","Nisan","Iyar","Sivan","Tamuz","Av","Elul","Adar II"]},eras:{"short":["AM"]}},indian:{months:{"long":["Chaitra","Vaisakha","Jyaistha","Asadha","Sravana","Bhadra","Asvina","Kartika","Agrahayana","Pausa","Magha","Phalguna"]},eras:{"short":["Saka"]}},islamic:{months:{"short":["Muh.","Saf.","Rab. I","Rab. II","Jum. I","Jum. II","Raj.","Sha.","Ram.","Shaw.","Dhuʻl-Q.","Dhuʻl-H."],"long":["Muharram","Safar","Rabiʻ I","Rabiʻ II","Jumada I","Jumada II","Rajab","Shaʻban","Ramadan","Shawwal","Dhuʻl-Qiʻdah","Dhuʻl-Hijjah"]},eras:{"short":["AH"]}},japanese:{eras:{narrow:["Taika (645-650)","Hakuchi (650-671)","Hakuhō (672-686)","Shuchō (686-701)","Taihō (701-704)","Keiun (704-708)","Wadō (708-715)","Reiki (715-717)","Yōrō (717-724)","Jinki (724-729)","Tempyō (729-749)","Tempyō-kampō (749-749)","Tempyō-shōhō (749-757)","Tempyō-hōji (757-765)","Temphō-jingo (765-767)","Jingo-keiun (767-770)","Hōki (770-780)","Ten-ō (781-782)","Enryaku (782-806)","Daidō (806-810)","Kōnin (810-824)","Tenchō (824-834)","Jōwa (834-848)","Kajō (848-851)","Ninju (851-854)","Saiko (854-857)","Tennan (857-859)","Jōgan (859-877)","Genkei (877-885)","Ninna (885-889)","Kampyō (889-898)","Shōtai (898-901)","Engi (901-923)","Enchō (923-931)","Shōhei (931-938)","Tengyō (938-947)","Tenryaku (947-957)","Tentoku (957-961)","Ōwa (961-964)","Kōhō (964-968)","Anna (968-970)","Tenroku (970-973)","Ten-en (973-976)","Jōgen (976-978)","Tengen (978-983)","Eikan (983-985)","Kanna (985-987)","Ei-en (987-989)","Eiso (989-990)","Shōryaku (990-995)","Chōtoku (995-999)","Chōhō (999-1004)","Kankō (1004-1012)","Chōwa (1012-1017)","Kannin (1017-1021)","Jian (1021-1024)","Manju (1024-1028)","Chōgen (1028-1037)","Chōryaku (1037-1040)","Chōkyū (1040-1044)","Kantoku (1044-1046)","Eishō (1046-1053)","Tengi (1053-1058)","Kōhei (1058-1065)","Jiryaku (1065-1069)","Enkyū (1069-1074)","Shōho (1074-1077)","Shōryaku (1077-1081)","Eiho (1081-1084)","Ōtoku (1084-1087)","Kanji (1087-1094)","Kaho (1094-1096)","Eichō (1096-1097)","Shōtoku (1097-1099)","Kōwa (1099-1104)","Chōji (1104-1106)","Kashō (1106-1108)","Tennin (1108-1110)","Ten-ei (1110-1113)","Eikyū (1113-1118)","Gen-ei (1118-1120)","Hoan (1120-1124)","Tenji (1124-1126)","Daiji (1126-1131)","Tenshō (1131-1132)","Chōshō (1132-1135)","Hoen (1135-1141)","Eiji (1141-1142)","Kōji (1142-1144)","Tenyō (1144-1145)","Kyūan (1145-1151)","Ninpei (1151-1154)","Kyūju (1154-1156)","Hogen (1156-1159)","Heiji (1159-1160)","Eiryaku (1160-1161)","Ōho (1161-1163)","Chōkan (1163-1165)","Eiman (1165-1166)","Nin-an (1166-1169)","Kaō (1169-1171)","Shōan (1171-1175)","Angen (1175-1177)","Jishō (1177-1181)","Yōwa (1181-1182)","Juei (1182-1184)","Genryuku (1184-1185)","Bunji (1185-1190)","Kenkyū (1190-1199)","Shōji (1199-1201)","Kennin (1201-1204)","Genkyū (1204-1206)","Ken-ei (1206-1207)","Shōgen (1207-1211)","Kenryaku (1211-1213)","Kenpō (1213-1219)","Shōkyū (1219-1222)","Jōō (1222-1224)","Gennin (1224-1225)","Karoku (1225-1227)","Antei (1227-1229)","Kanki (1229-1232)","Jōei (1232-1233)","Tempuku (1233-1234)","Bunryaku (1234-1235)","Katei (1235-1238)","Ryakunin (1238-1239)","En-ō (1239-1240)","Ninji (1240-1243)","Kangen (1243-1247)","Hōji (1247-1249)","Kenchō (1249-1256)","Kōgen (1256-1257)","Shōka (1257-1259)","Shōgen (1259-1260)","Bun-ō (1260-1261)","Kōchō (1261-1264)","Bun-ei (1264-1275)","Kenji (1275-1278)","Kōan (1278-1288)","Shōō (1288-1293)","Einin (1293-1299)","Shōan (1299-1302)","Kengen (1302-1303)","Kagen (1303-1306)","Tokuji (1306-1308)","Enkei (1308-1311)","Ōchō (1311-1312)","Shōwa (1312-1317)","Bunpō (1317-1319)","Genō (1319-1321)","Genkyō (1321-1324)","Shōchū (1324-1326)","Kareki (1326-1329)","Gentoku (1329-1331)","Genkō (1331-1334)","Kemmu (1334-1336)","Engen (1336-1340)","Kōkoku (1340-1346)","Shōhei (1346-1370)","Kentoku (1370-1372)","Bunchũ (1372-1375)","Tenju (1375-1379)","Kōryaku (1379-1381)","Kōwa (1381-1384)","Genchũ (1384-1392)","Meitoku (1384-1387)","Kakei (1387-1389)","Kōō (1389-1390)","Meitoku (1390-1394)","Ōei (1394-1428)","Shōchō (1428-1429)","Eikyō (1429-1441)","Kakitsu (1441-1444)","Bun-an (1444-1449)","Hōtoku (1449-1452)","Kyōtoku (1452-1455)","Kōshō (1455-1457)","Chōroku (1457-1460)","Kanshō (1460-1466)","Bunshō (1466-1467)","Ōnin (1467-1469)","Bunmei (1469-1487)","Chōkyō (1487-1489)","Entoku (1489-1492)","Meiō (1492-1501)","Bunki (1501-1504)","Eishō (1504-1521)","Taiei (1521-1528)","Kyōroku (1528-1532)","Tenmon (1532-1555)","Kōji (1555-1558)","Eiroku (1558-1570)","Genki (1570-1573)","Tenshō (1573-1592)","Bunroku (1592-1596)","Keichō (1596-1615)","Genwa (1615-1624)","Kan-ei (1624-1644)","Shōho (1644-1648)","Keian (1648-1652)","Shōō (1652-1655)","Meiryaku (1655-1658)","Manji (1658-1661)","Kanbun (1661-1673)","Enpō (1673-1681)","Tenwa (1681-1684)","Jōkyō (1684-1688)","Genroku (1688-1704)","Hōei (1704-1711)","Shōtoku (1711-1716)","Kyōhō (1716-1736)","Genbun (1736-1741)","Kanpō (1741-1744)","Enkyō (1744-1748)","Kan-en (1748-1751)","Hōryaku (1751-1764)","Meiwa (1764-1772)","An-ei (1772-1781)","Tenmei (1781-1789)","Kansei (1789-1801)","Kyōwa (1801-1804)","Bunka (1804-1818)","Bunsei (1818-1830)","Tenpō (1830-1844)","Kōka (1844-1848)","Kaei (1848-1854)","Ansei (1854-1860)","Man-en (1860-1861)","Bunkyū (1861-1864)","Genji (1864-1865)","Keiō (1865-1868)","M","T","S","H"], -"short":["Taika (645-650)","Hakuchi (650-671)","Hakuhō (672-686)","Shuchō (686-701)","Taihō (701-704)","Keiun (704-708)","Wadō (708-715)","Reiki (715-717)","Yōrō (717-724)","Jinki (724-729)","Tempyō (729-749)","Tempyō-kampō (749-749)","Tempyō-shōhō (749-757)","Tempyō-hōji (757-765)","Temphō-jingo (765-767)","Jingo-keiun (767-770)","Hōki (770-780)","Ten-ō (781-782)","Enryaku (782-806)","Daidō (806-810)","Kōnin (810-824)","Tenchō (824-834)","Jōwa (834-848)","Kajō (848-851)","Ninju (851-854)","Saiko (854-857)","Tennan (857-859)","Jōgan (859-877)","Genkei (877-885)","Ninna (885-889)","Kampyō (889-898)","Shōtai (898-901)","Engi (901-923)","Enchō (923-931)","Shōhei (931-938)","Tengyō (938-947)","Tenryaku (947-957)","Tentoku (957-961)","Ōwa (961-964)","Kōhō (964-968)","Anna (968-970)","Tenroku (970-973)","Ten-en (973-976)","Jōgen (976-978)","Tengen (978-983)","Eikan (983-985)","Kanna (985-987)","Ei-en (987-989)","Eiso (989-990)","Shōryaku (990-995)","Chōtoku (995-999)","Chōhō (999-1004)","Kankō (1004-1012)","Chōwa (1012-1017)","Kannin (1017-1021)","Jian (1021-1024)","Manju (1024-1028)","Chōgen (1028-1037)","Chōryaku (1037-1040)","Chōkyū (1040-1044)","Kantoku (1044-1046)","Eishō (1046-1053)","Tengi (1053-1058)","Kōhei (1058-1065)","Jiryaku (1065-1069)","Enkyū (1069-1074)","Shōho (1074-1077)","Shōryaku (1077-1081)","Eiho (1081-1084)","Ōtoku (1084-1087)","Kanji (1087-1094)","Kaho (1094-1096)","Eichō (1096-1097)","Shōtoku (1097-1099)","Kōwa (1099-1104)","Chōji (1104-1106)","Kashō (1106-1108)","Tennin (1108-1110)","Ten-ei (1110-1113)","Eikyū (1113-1118)","Gen-ei (1118-1120)","Hoan (1120-1124)","Tenji (1124-1126)","Daiji (1126-1131)","Tenshō (1131-1132)","Chōshō (1132-1135)","Hoen (1135-1141)","Eiji (1141-1142)","Kōji (1142-1144)","Tenyō (1144-1145)","Kyūan (1145-1151)","Ninpei (1151-1154)","Kyūju (1154-1156)","Hogen (1156-1159)","Heiji (1159-1160)","Eiryaku (1160-1161)","Ōho (1161-1163)","Chōkan (1163-1165)","Eiman (1165-1166)","Nin-an (1166-1169)","Kaō (1169-1171)","Shōan (1171-1175)","Angen (1175-1177)","Jishō (1177-1181)","Yōwa (1181-1182)","Juei (1182-1184)","Genryuku (1184-1185)","Bunji (1185-1190)","Kenkyū (1190-1199)","Shōji (1199-1201)","Kennin (1201-1204)","Genkyū (1204-1206)","Ken-ei (1206-1207)","Shōgen (1207-1211)","Kenryaku (1211-1213)","Kenpō (1213-1219)","Shōkyū (1219-1222)","Jōō (1222-1224)","Gennin (1224-1225)","Karoku (1225-1227)","Antei (1227-1229)","Kanki (1229-1232)","Jōei (1232-1233)","Tempuku (1233-1234)","Bunryaku (1234-1235)","Katei (1235-1238)","Ryakunin (1238-1239)","En-ō (1239-1240)","Ninji (1240-1243)","Kangen (1243-1247)","Hōji (1247-1249)","Kenchō (1249-1256)","Kōgen (1256-1257)","Shōka (1257-1259)","Shōgen (1259-1260)","Bun-ō (1260-1261)","Kōchō (1261-1264)","Bun-ei (1264-1275)","Kenji (1275-1278)","Kōan (1278-1288)","Shōō (1288-1293)","Einin (1293-1299)","Shōan (1299-1302)","Kengen (1302-1303)","Kagen (1303-1306)","Tokuji (1306-1308)","Enkei (1308-1311)","Ōchō (1311-1312)","Shōwa (1312-1317)","Bunpō (1317-1319)","Genō (1319-1321)","Genkyō (1321-1324)","Shōchū (1324-1326)","Kareki (1326-1329)","Gentoku (1329-1331)","Genkō (1331-1334)","Kemmu (1334-1336)","Engen (1336-1340)","Kōkoku (1340-1346)","Shōhei (1346-1370)","Kentoku (1370-1372)","Bunchū (1372-1375)","Tenju (1375-1379)","Kōryaku (1379-1381)","Kōwa (1381-1384)","Genchū (1384-1392)","Meitoku (1384-1387)","Kakei (1387-1389)","Kōō (1389-1390)","Meitoku (1390-1394)","Ōei (1394-1428)","Shōchō (1428-1429)","Eikyō (1429-1441)","Kakitsu (1441-1444)","Bun-an (1444-1449)","Hōtoku (1449-1452)","Kyōtoku (1452-1455)","Kōshō (1455-1457)","Chōroku (1457-1460)","Kanshō (1460-1466)","Bunshō (1466-1467)","Ōnin (1467-1469)","Bunmei (1469-1487)","Chōkyō (1487-1489)","Entoku (1489-1492)","Meiō (1492-1501)","Bunki (1501-1504)","Eishō (1504-1521)","Taiei (1521-1528)","Kyōroku (1528-1532)","Tenmon (1532-1555)","Kōji (1555-1558)","Eiroku (1558-1570)","Genki (1570-1573)","Tenshō (1573-1592)","Bunroku (1592-1596)","Keichō (1596-1615)","Genwa (1615-1624)","Kan-ei (1624-1644)","Shōho (1644-1648)","Keian (1648-1652)","Shōō (1652-1655)","Meiryaku (1655-1658)","Manji (1658-1661)","Kanbun (1661-1673)","Enpō (1673-1681)","Tenwa (1681-1684)","Jōkyō (1684-1688)","Genroku (1688-1704)","Hōei (1704-1711)","Shōtoku (1711-1716)","Kyōhō (1716-1736)","Genbun (1736-1741)","Kanpō (1741-1744)","Enkyō (1744-1748)","Kan-en (1748-1751)","Hōryaku (1751-1764)","Meiwa (1764-1772)","An-ei (1772-1781)","Tenmei (1781-1789)","Kansei (1789-1801)","Kyōwa (1801-1804)","Bunka (1804-1818)","Bunsei (1818-1830)","Tenpō (1830-1844)","Kōka (1844-1848)","Kaei (1848-1854)","Ansei (1854-1860)","Man-en (1860-1861)","Bunkyū (1861-1864)","Genji (1864-1865)","Keiō (1865-1868)","Meiji","Taishō","Shōwa","Heisei"]}},persian:{months:{"long":["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"]},eras:{"short":["AP"]}},roc:{eras:{"short":["Before R.O.C.","Minguo"]}}}},number:{nu:["latn"],patterns:{decimal:{positivePattern:"{number}",negativePattern:"-{number}"},currency:{positivePattern:"{currency}{number}",negativePattern:"-{currency}{number}"},percent:{positivePattern:"{number}%",negativePattern:"-{number}%"}},symbols:{latn:{decimal:".",group:",",nan:"NaN",percent:"%",infinity:"∞"}},currencies:{AUD:"A$",BRL:"R$",CAD:"CA$",CNY:"CN¥",EUR:"€",GBP:"£",HKD:"HK$",ILS:"₪",INR:"₹",JPY:"¥",KRW:"₩",MXN:"MX$",NZD:"NZ$",THB:"฿",TWD:"NT$",USD:"$",VND:"₫",XAF:"FCFA",XCD:"EC$",XOF:"CFA",XPF:"CFPF"}}}},function(e,t){e.exports={locale:"pt-BR",date:{ca:["gregory","buddhist","chinese","coptic","ethioaa","ethiopic","generic","hebrew","indian","islamic","japanese","persian","roc"],hourNo0:!0,hour12:!1,formats:[{weekday:"long",day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",pattern:"{weekday}, {day} de {month} de {year} {hour}:{minute}:{second}",pattern12:"{weekday}, {day} de {month} de {year} {hour}:{minute}:{second} {ampm}"},{weekday:"long",day:"numeric",month:"long",year:"numeric",pattern:"{weekday}, {day} de {month} de {year}"},{day:"numeric",month:"long",year:"numeric",pattern:"{day} de {month} de {year}"},{day:"2-digit",month:"2-digit",year:"numeric",pattern:"{day}/{month}/{year}"},{month:"2-digit",year:"numeric",pattern:"{month}/{year}"},{month:"long",year:"numeric",pattern:"{month} de {year}"},{day:"numeric",month:"long",pattern:"{day} de {month}"},{day:"numeric",month:"numeric",pattern:"{day}/{month}"},{hour:"numeric",minute:"2-digit",second:"2-digit",pattern:"{hour}:{minute}:{second}",pattern12:"{hour}:{minute}:{second} {ampm}"},{hour:"numeric",minute:"2-digit",pattern:"{hour}:{minute}",pattern12:"{hour}:{minute} {ampm}"}],calendars:{buddhist:{eras:{"short":["BE"]}},chinese:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],"short":["1","2","3","4","5","6","7","8","9","10","11","12"],"long":["Mês 1","Mês 2","Mês 3","Mês 4","Mês 5","Mês 6","Mês 7","Mês 8","Mês 9","Mês 10","Mês 11","Mês 12"]}},coptic:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12","13"],"short":["Tout","Baba","Hator","Kiahk","Toba","Amshir","Baramhat","Baramouda","Bashans","Paona","Epep","Mesra","Nasie"],"long":["Tout","Baba","Hator","Kiahk","Toba","Amshir","Baramhat","Baramouda","Bashans","Paona","Epep","Mesra","Nasie"]},eras:{"short":["ERA0","ERA1"]}},ethiopic:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12","13"],"short":["Meskerem","Tekemt","Hedar","Tahsas","Ter","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehasse","Pagumen"],"long":["Meskerem","Tekemt","Hedar","Tahsas","Ter","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehasse","Pagumen"]},eras:{"short":["ERA0","ERA1"]}},ethioaa:{eras:{"short":["ERA0"]}},generic:{months:{"long":["M01","M02","M03","M04","M05","M06","M07","M08","M09","M10","M11","M12"]},eras:{"short":["ERA0","ERA1"]}},gregory:{months:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],"short":["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],"long":["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},days:{narrow:["dom","seg","ter","qua","qui","sex","sáb"],"short":["dom","seg","ter","qua","qui","sex","sáb"],"long":["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},eras:{"short":["a.C.","d.C."],"long":["Antes de Cristo","Ano do Senhor"]},dayPeriods:{am:"AM",pm:"PM"}},hebrew:{months:{"short":["Tishri","Heshvan","Kislev","Tevet","Shevat","Adar I","Adar","Nisan","Iyar","Sivan","Tamuz","Av","Elul","Adar II"],"long":["Tishri","Heshvan","Kislev","Tevet","Shevat","Adar I","Adar","Nisan","Iyar","Sivan","Tamuz","Av","Elul","Adar II"]},eras:{"short":["AM"]}},indian:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],"short":["Chaitra","Vaisakha","Jyaistha","Asadha","Sravana","Bhadra","Asvina","Kartika","Agrahayana","Pausa","Magha","Phalguna"],"long":["Chaitra","Vaisakha","Jyaistha","Asadha","Sravana","Bhadra","Asvina","Kartika","Agrahayana","Pausa","Magha","Phalguna"]},eras:{"short":["Saka"]}},islamic:{months:{"short":["Muh.","Saf.","Rab. I","Rab. II","Jum. I","Jum. II","Raj.","Sha.","Ram.","Shaw.","Dhuʻl-Q.","Dhuʻl-H."],"long":["Muharram","Safar","Rabiʻ I","Rabiʻ II","Jumada I","Jumada II","Rajab","Shaʻban","Ramadan","Shawwal","Dhuʻl-Qiʻdah","Dhuʻl-Hijjah"]},eras:{"short":["AH"]}},japanese:{eras:{narrow:["Taika (645-650)","Hakuchi (650-671)","Hakuhō (672-686)","Shuchō (686-701)","Taihō (701-704)","Keiun (704-708)","Wadō (708-715)","Reiki (715-717)","Yōrō (717-724)","Jinki (724-729)","Tempyō (729-749)","Tempyō-kampō (749-749)","Tempyō-shōhō (749-757)","Tempyō-hōji (757-765)","Temphō-jingo (765-767)","Jingo-keiun (767-770)","Hōki (770-780)","Ten-ō (781-782)","Enryaku (782-806)","Daidō (806-810)","Kōnin (810-824)","Tenchō (824-834)","Jōwa (834-848)","Kajō (848-851)","Ninju (851-854)","Saiko (854-857)","Tennan (857-859)","Jōgan (859-877)","Genkei (877-885)","Ninna (885-889)","Kampyō (889-898)","Shōtai (898-901)","Engi (901-923)","Enchō (923-931)","Shōhei (931-938)","Tengyō (938-947)","Tenryaku (947-957)","Tentoku (957-961)","Ōwa (961-964)","Kōhō (964-968)","Anna (968-970)","Tenroku (970-973)","Ten-en (973-976)","Jōgen (976-978)","Tengen (978-983)","Eikan (983-985)","Kanna (985-987)","Ei-en (987-989)","Eiso (989-990)","Shōryaku (990-995)","Chōtoku (995-999)","Chōhō (999-1004)","Kankō (1004-1012)","Chōwa (1012-1017)","Kannin (1017-1021)","Jian (1021-1024)","Manju (1024-1028)","Chōgen (1028-1037)","Chōryaku (1037-1040)","Chōkyū (1040-1044)","Kantoku (1044-1046)","Eishō (1046-1053)","Tengi (1053-1058)","Kōhei (1058-1065)","Jiryaku (1065-1069)","Enkyū (1069-1074)","Shōho (1074-1077)","Shōryaku (1077-1081)","Eiho (1081-1084)","Ōtoku (1084-1087)","Kanji (1087-1094)","Kaho (1094-1096)","Eichō (1096-1097)","Shōtoku (1097-1099)","Kōwa (1099-1104)","Chōji (1104-1106)","Kashō (1106-1108)","Tennin (1108-1110)","Ten-ei (1110-1113)","Eikyū (1113-1118)","Gen-ei (1118-1120)","Hoan (1120-1124)","Tenji (1124-1126)","Daiji (1126-1131)","Tenshō (1131-1132)","Chōshō (1132-1135)","Hoen (1135-1141)","Eiji (1141-1142)","Kōji (1142-1144)","Tenyō (1144-1145)","Kyūan (1145-1151)","Ninpei (1151-1154)","Kyūju (1154-1156)","Hogen (1156-1159)","Heiji (1159-1160)","Eiryaku (1160-1161)","Ōho (1161-1163)","Chōkan (1163-1165)","Eiman (1165-1166)","Nin-an (1166-1169)","Kaō (1169-1171)","Shōan (1171-1175)","Angen (1175-1177)","Jishō (1177-1181)","Yōwa (1181-1182)","Juei (1182-1184)","Genryuku (1184-1185)","Bunji (1185-1190)","Kenkyū (1190-1199)","Shōji (1199-1201)","Kennin (1201-1204)","Genkyū (1204-1206)","Ken-ei (1206-1207)","Shōgen (1207-1211)","Kenryaku (1211-1213)","Kenpō (1213-1219)","Shōkyū (1219-1222)","Jōō (1222-1224)","Gennin (1224-1225)","Karoku (1225-1227)","Antei (1227-1229)","Kanki (1229-1232)","Jōei (1232-1233)","Tempuku (1233-1234)","Bunryaku (1234-1235)","Katei (1235-1238)","Ryakunin (1238-1239)","En-ō (1239-1240)","Ninji (1240-1243)","Kangen (1243-1247)","Hōji (1247-1249)","Kenchō (1249-1256)","Kōgen (1256-1257)","Shōka (1257-1259)","Shōgen (1259-1260)","Bun-ō (1260-1261)","Kōchō (1261-1264)","Bun-ei (1264-1275)","Kenji (1275-1278)","Kōan (1278-1288)","Shōō (1288-1293)","Einin (1293-1299)","Shōan (1299-1302)","Kengen (1302-1303)","Kagen (1303-1306)","Tokuji (1306-1308)","Enkei (1308-1311)","Ōchō (1311-1312)","Shōwa (1312-1317)","Bunpō (1317-1319)","Genō (1319-1321)","Genkyō (1321-1324)","Shōchū (1324-1326)","Kareki (1326-1329)","Gentoku (1329-1331)","Genkō (1331-1334)","Kemmu (1334-1336)","Engen (1336-1340)","Kōkoku (1340-1346)","Shōhei (1346-1370)","Kentoku (1370-1372)","Bunchũ (1372-1375)","Tenju (1375-1379)","Kōryaku (1379-1381)","Kōwa (1381-1384)","Genchũ (1384-1392)","Meitoku (1384-1387)","Kakei (1387-1389)","Kōō (1389-1390)","Meitoku (1390-1394)","Ōei (1394-1428)","Shōchō (1428-1429)","Eikyō (1429-1441)","Kakitsu (1441-1444)","Bun-an (1444-1449)","Hōtoku (1449-1452)","Kyōtoku (1452-1455)","Kōshō (1455-1457)","Chōroku (1457-1460)","Kanshō (1460-1466)","Bunshō (1466-1467)","Ōnin (1467-1469)","Bunmei (1469-1487)","Chōkyō (1487-1489)","Entoku (1489-1492)","Meiō (1492-1501)","Bunki (1501-1504)","Eishō (1504-1521)","Taiei (1521-1528)","Kyōroku (1528-1532)","Tenmon (1532-1555)","Kōji (1555-1558)","Eiroku (1558-1570)","Genki (1570-1573)","Tenshō (1573-1592)","Bunroku (1592-1596)","Keichō (1596-1615)","Genwa (1615-1624)","Kan-ei (1624-1644)","Shōho (1644-1648)","Keian (1648-1652)","Shōō (1652-1655)","Meiryaku (1655-1658)","Manji (1658-1661)","Kanbun (1661-1673)","Enpō (1673-1681)","Tenwa (1681-1684)","Jōkyō (1684-1688)","Genroku (1688-1704)","Hōei (1704-1711)","Shōtoku (1711-1716)","Kyōhō (1716-1736)","Genbun (1736-1741)","Kanpō (1741-1744)","Enkyō (1744-1748)","Kan-en (1748-1751)","Hōryaku (1751-1764)","Meiwa (1764-1772)","An-ei (1772-1781)","Tenmei (1781-1789)","Kansei (1789-1801)","Kyōwa (1801-1804)","Bunka (1804-1818)","Bunsei (1818-1830)","Tenpō (1830-1844)","Kōka (1844-1848)","Kaei (1848-1854)","Ansei (1854-1860)","Man-en (1860-1861)","Bunkyū (1861-1864)","Genji (1864-1865)","Keiō (1865-1868)","M","T","S","H"],"short":["Taika (645-650)","Hakuchi (650-671)","Hakuhō (672-686)","Shuchō (686-701)","Taihō (701-704)","Keiun (704-708)","Wadō (708-715)","Reiki (715-717)","Yōrō (717-724)","Jinki (724-729)","Tempyō (729-749)","Tempyō-kampō (749-749)","Tempyō-shōhō (749-757)","Tempyō-hōji (757-765)","Temphō-jingo (765-767)","Jingo-keiun (767-770)","Hōki (770-780)","Ten-ō (781-782)","Enryaku (782-806)","Daidō (806-810)","Kōnin (810-824)","Tenchō (824-834)","Jōwa (834-848)","Kajō (848-851)","Ninju (851-854)","Saiko (854-857)","Tennan (857-859)","Jōgan (859-877)","Genkei (877-885)","Ninna (885-889)","Kampyō (889-898)","Shōtai (898-901)","Engi (901-923)","Enchō (923-931)","Shōhei (931-938)","Tengyō (938-947)","Tenryaku (947-957)","Tentoku (957-961)","Ōwa (961-964)","Kōhō (964-968)","Anna (968-970)","Tenroku (970-973)","Ten-en (973-976)","Jōgen (976-978)","Tengen (978-983)","Eikan (983-985)","Kanna (985-987)","Ei-en (987-989)","Eiso (989-990)","Shōryaku (990-995)","Chōtoku (995-999)","Chōhō (999-1004)","Kankō (1004-1012)","Chōwa (1012-1017)","Kannin (1017-1021)","Jian (1021-1024)","Manju (1024-1028)","Chōgen (1028-1037)","Chōryaku (1037-1040)","Chōkyū (1040-1044)","Kantoku (1044-1046)","Eishō (1046-1053)","Tengi (1053-1058)","Kōhei (1058-1065)","Jiryaku (1065-1069)","Enkyū (1069-1074)","Shōho (1074-1077)","Shōryaku (1077-1081)","Eiho (1081-1084)","Ōtoku (1084-1087)","Kanji (1087-1094)","Kaho (1094-1096)","Eichō (1096-1097)","Shōtoku (1097-1099)","Kōwa (1099-1104)","Chōji (1104-1106)","Kashō (1106-1108)","Tennin (1108-1110)","Ten-ei (1110-1113)","Eikyū (1113-1118)","Gen-ei (1118-1120)","Hoan (1120-1124)","Tenji (1124-1126)","Daiji (1126-1131)","Tenshō (1131-1132)","Chōshō (1132-1135)","Hoen (1135-1141)","Eiji (1141-1142)","Kōji (1142-1144)","Tenyō (1144-1145)","Kyūan (1145-1151)","Ninpei (1151-1154)","Kyūju (1154-1156)","Hogen (1156-1159)","Heiji (1159-1160)","Eiryaku (1160-1161)","Ōho (1161-1163)","Chōkan (1163-1165)","Eiman (1165-1166)","Nin-an (1166-1169)","Kaō (1169-1171)","Shōan (1171-1175)","Angen (1175-1177)","Jishō (1177-1181)","Yōwa (1181-1182)","Juei (1182-1184)","Genryuku (1184-1185)","Bunji (1185-1190)","Kenkyū (1190-1199)","Shōji (1199-1201)","Kennin (1201-1204)","Genkyū (1204-1206)","Ken-ei (1206-1207)","Shōgen (1207-1211)","Kenryaku (1211-1213)","Kenpō (1213-1219)","Shōkyū (1219-1222)","Jōō (1222-1224)","Gennin (1224-1225)","Karoku (1225-1227)","Antei (1227-1229)","Kanki (1229-1232)","Jōei (1232-1233)","Tempuku (1233-1234)","Bunryaku (1234-1235)","Katei (1235-1238)","Ryakunin (1238-1239)","En-ō (1239-1240)","Ninji (1240-1243)","Kangen (1243-1247)","Hōji (1247-1249)","Kenchō (1249-1256)","Kōgen (1256-1257)","Shōka (1257-1259)","Shōgen (1259-1260)","Bun-ō (1260-1261)","Kōchō (1261-1264)","Bun-ei (1264-1275)","Kenji (1275-1278)","Kōan (1278-1288)","Shōō (1288-1293)","Einin (1293-1299)","Shōan (1299-1302)","Kengen (1302-1303)","Kagen (1303-1306)","Tokuji (1306-1308)","Enkei (1308-1311)","Ōchō (1311-1312)","Shōwa (1312-1317)","Bunpō (1317-1319)","Genō (1319-1321)","Genkyō (1321-1324)","Shōchū (1324-1326)","Kareki (1326-1329)","Gentoku (1329-1331)","Genkō (1331-1334)","Kemmu (1334-1336)","Engen (1336-1340)","Kōkoku (1340-1346)","Shōhei (1346-1370)","Kentoku (1370-1372)","Bunchū (1372-1375)","Tenju (1375-1379)","Kōryaku (1379-1381)","Kōwa (1381-1384)","Genchū (1384-1392)","Meitoku (1384-1387)","Kakei (1387-1389)","Kōō (1389-1390)","Meitoku (1390-1394)","Ōei (1394-1428)","Shōchō (1428-1429)","Eikyō (1429-1441)","Kakitsu (1441-1444)","Bun-an (1444-1449)","Hōtoku (1449-1452)","Kyōtoku (1452-1455)","Kōshō (1455-1457)","Chōroku (1457-1460)","Kanshō (1460-1466)","Bunshō (1466-1467)","Ōnin (1467-1469)","Bunmei (1469-1487)","Chōkyō (1487-1489)","Entoku (1489-1492)","Meiō (1492-1501)","Bunki (1501-1504)","Eishō (1504-1521)","Taiei (1521-1528)","Kyōroku (1528-1532)","Tenmon (1532-1555)","Kōji (1555-1558)","Eiroku (1558-1570)","Genki (1570-1573)","Tenshō (1573-1592)","Bunroku (1592-1596)","Keichō (1596-1615)","Genwa (1615-1624)","Kan-ei (1624-1644)","Shōho (1644-1648)","Keian (1648-1652)","Shōō (1652-1655)","Meiryaku (1655-1658)","Manji (1658-1661)","Kanbun (1661-1673)","Enpō (1673-1681)","Tenwa (1681-1684)","Jōkyō (1684-1688)","Genroku (1688-1704)","Hōei (1704-1711)","Shōtoku (1711-1716)","Kyōhō (1716-1736)","Genbun (1736-1741)","Kanpō (1741-1744)","Enkyō (1744-1748)","Kan-en (1748-1751)","Hōryaku (1751-1764)","Meiwa (1764-1772)","An-ei (1772-1781)","Tenmei (1781-1789)","Kansei (1789-1801)","Kyōwa (1801-1804)","Bunka (1804-1818)","Bunsei (1818-1830)","Tenpō (1830-1844)","Kōka (1844-1848)","Kaei (1848-1854)","Ansei (1854-1860)","Man-en (1860-1861)","Bunkyū (1861-1864)","Genji (1864-1865)","Keiō (1865-1868)","Meiji","Taishō","Shōwa","Heisei"]}},persian:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],"short":["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],"long":["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"]},eras:{"short":["AP"]}},roc:{eras:{"short":["Antes de R.O.C.","R.O.C."]}}}},number:{nu:["latn"],patterns:{decimal:{positivePattern:"{number}",negativePattern:"-{number}"},currency:{positivePattern:"{currency}{number}",negativePattern:"-{currency}{number}"},percent:{positivePattern:"{number}%",negativePattern:"-{number}%"}},symbols:{latn:{decimal:",",group:".",nan:"NaN",percent:"%",infinity:"∞"}},currencies:{AUD:"AU$",BRL:"R$",CAD:"CA$",CNY:"CN¥",EUR:"€",GBP:"£",HKD:"HK$",ILS:"₪",INR:"₹",JPY:"JP¥",KRW:"₩",MXN:"MX$",NZD:"NZ$",PTE:"Esc.",THB:"฿",TWD:"NT$",USD:"US$",VND:"₫",XAF:"FCFA",XCD:"EC$",XOF:"CFA",XPF:"CFPF"}}}},function(e,t,n){(function(r){"use strict";var i=r.React;r.React=n(2);var s=n(9);if(n(40),t=e.exports=s.IntlMixin,Object.keys(s).forEach(function(e){Object.defineProperty(t,e,{enumerable:!0,value:s[e]})}),i)r.React=i;else try{delete r.React}catch(a){r.React=void 0}}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e){i["default"].__addLocaleData(e),s["default"].__addLocaleData(e)}t.__addLocaleData=r;var i=n(13),s=n(23),a=n(33),o=n(12),l=n(34),c=n(10),u=n(35),p=n(36),h=n(37),m=n(38);r(a["default"]),t.IntlMixin=o["default"],t.FormattedDate=l["default"],t.FormattedTime=c["default"],t.FormattedRelative=u["default"],t.FormattedNumber=p["default"],t.FormattedMessage=h["default"],t.FormattedHTMLMessage=m["default"]},function(e,t,n){"use strict";var r=n(11),i=n(12),s=r["default"].createClass({displayName:"FormattedTime",mixins:[i["default"]],statics:{formatOptions:["localeMatcher","timeZone","hour12","formatMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName"]},propTypes:{format:r["default"].PropTypes.string,value:r["default"].PropTypes.any.isRequired},render:function(){var e=this.props,t=e.value,n=e.format,i=n&&this.getNamedFormat("time",n),a=s.filterFormatOptions(e,i);return r["default"].DOM.span(null,this.formatTime(t,a))}});t["default"]=s},function(e,t){"use strict";t["default"]=React},function(e,t,n){"use strict";function r(e,t){if(!isFinite(e))throw new TypeError(t)}var i=n(11),s=n(13),a=n(23),o=n(30),l={locales:i["default"].PropTypes.oneOfType([i["default"].PropTypes.string,i["default"].PropTypes.array]),formats:i["default"].PropTypes.object,messages:i["default"].PropTypes.object};t["default"]={statics:{filterFormatOptions:function(e,t){return t||(t={}),(this.formatOptions||[]).reduce(function(n,r){return e.hasOwnProperty(r)?n[r]=e[r]:t.hasOwnProperty(r)&&(n[r]=t[r]),n},{})}},propTypes:l,contextTypes:l,childContextTypes:l,getNumberFormat:o["default"](Intl.NumberFormat),getDateTimeFormat:o["default"](Intl.DateTimeFormat),getMessageFormat:o["default"](s["default"]),getRelativeFormat:o["default"](a["default"]),getChildContext:function(){var e=this.context,t=this.props;return{locales:t.locales||e.locales,formats:t.formats||e.formats,messages:t.messages||e.messages}},formatDate:function(e,t){return e=new Date(e),r(e,"A date or timestamp must be provided to formatDate()"),this._format("date",e,t)},formatTime:function(e,t){return e=new Date(e),r(e,"A date or timestamp must be provided to formatTime()"),this._format("time",e,t)},formatRelative:function(e,t,n){return e=new Date(e),r(e,"A date or timestamp must be provided to formatRelative()"),this._format("relative",e,t,n)},formatNumber:function(e,t){return this._format("number",e,t)},formatMessage:function(e,t){var n=this.props.locales||this.context.locales,r=this.props.formats||this.context.formats;return"function"==typeof e?e(t):("string"==typeof e&&(e=this.getMessageFormat(e,n,r)),e.format(t))},getIntlMessage:function(e){var t,n=this.props.messages||this.context.messages,r=e.split(".");try{t=r.reduce(function(e,t){return e[t]},n)}finally{if(void 0===t)throw new ReferenceError("Could not find Intl message: "+e)}return t},getNamedFormat:function(e,t){var n=this.props.formats||this.context.formats,r=null;try{r=n[e][t]}finally{if(!r)throw new ReferenceError("No "+e+" format named: "+t)}return r},_format:function(e,t,n,r){var i=this.props.locales||this.context.locales;switch(n&&"string"==typeof n&&(n=this.getNamedFormat(e,n)),e){case"date":case"time":return this.getDateTimeFormat(i,n).format(t);case"number":return this.getNumberFormat(i,n).format(t);case"relative":return this.getRelativeFormat(i,n).format(t,r);default:throw new Error("Unrecognized format type: "+e)}}}},function(e,t,n){"use strict";var r=n(14)["default"];n(22),t=e.exports=r,t["default"]=t},function(e,t,n){"use strict";var r=n(15),i=n(21);r["default"].__addLocaleData(i["default"]),r["default"].defaultLocale="en",t["default"]=r["default"]},function(e,t,n){"use strict";function r(e,t,n){var i="string"==typeof e?r.__parse(e):e;if(!i||"messageFormatPattern"!==i.type)throw new TypeError("A message must be provided as a String or AST.");n=this._mergeFormats(r.formats,n),s.defineProperty(this,"_locale",{value:this._resolveLocale(t)});var a=this._findPluralRuleFunction(this._locale),o=this._compilePattern(i,t,n,a),l=this;this.format=function(e){return l._format(o,e)}}var i=n(16),s=n(17),a=n(18),o=n(19);t["default"]=r,s.defineProperty(r,"formats",{enumerable:!0,value:{number:{currency:{style:"currency"},percent:{style:"percent"}},date:{"short":{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},"long":{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{"short":{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},"long":{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}}}),s.defineProperty(r,"__localeData__",{value:s.objCreate(null)}),s.defineProperty(r,"__addLocaleData",{value:function(e){if(!e||!e.locale)throw new Error("Locale data provided to IntlMessageFormat is missing a `locale` property");r.__localeData__[e.locale.toLowerCase()]=e}}),s.defineProperty(r,"__parse",{value:o["default"].parse}),s.defineProperty(r,"defaultLocale",{enumerable:!0,writable:!0,value:void 0}),r.prototype.resolvedOptions=function(){return{locale:this._locale}},r.prototype._compilePattern=function(e,t,n,r){var i=new a["default"](t,n,r);return i.compile(e)},r.prototype._findPluralRuleFunction=function(e){for(var t=r.__localeData__,n=t[e.toLowerCase()];n;){if(n.pluralRuleFunction)return n.pluralRuleFunction;n=n.parentLocale&&t[n.parentLocale.toLowerCase()]}throw new Error("Locale data added to IntlMessageFormat is missing a `pluralRuleFunction` for :"+e)},r.prototype._format=function(e,t){var n,r,s,a,o,l="";for(n=0,r=e.length;r>n;n+=1)if(s=e[n],"string"!=typeof s){if(a=s.id,!t||!i.hop.call(t,a))throw new Error("A value must be provided for: "+a);o=t[a],l+=s.options?this._format(s.getOption(o),t):s.format(o)}else l+=s;return l},r.prototype._mergeFormats=function(e,t){var n,r,a={};for(n in e)i.hop.call(e,n)&&(a[n]=r=s.objCreate(e[n]),t&&i.hop.call(t,n)&&i.extend(r,t[n]));return a},r.prototype._resolveLocale=function(e){"string"==typeof e&&(e=[e]),e=(e||[]).concat(r.defaultLocale);var t,n,i,s,a=r.__localeData__;for(t=0,n=e.length;n>t;t+=1)for(i=e[t].toLowerCase().split("-");i.length;){if(s=a[i.join("-")])return s.locale;i.pop()}var o=e.pop();throw new Error("No locale data has been added to IntlMessageFormat for: "+e.join(", ")+", or the default locale: "+o)}},function(e,t){"use strict";function n(e){var t,n,i,s,a=Array.prototype.slice.call(arguments,1);for(t=0,n=a.length;n>t;t+=1)if(i=a[t])for(s in i)r.call(i,s)&&(e[s]=i[s]);return e}t.extend=n;var r=Object.prototype.hasOwnProperty;t.hop=r},function(e,t,n){"use strict";var r=n(16),i=function(){try{return!!Object.defineProperty({},"a",{})}catch(e){return!1}}(),s=(!i&&!Object.prototype.__defineGetter__,i?Object.defineProperty:function(e,t,n){"get"in n&&e.__defineGetter__?e.__defineGetter__(t,n.get):(!r.hop.call(e,t)||"value"in n)&&(e[t]=n.value)}),a=Object.create||function(e,t){function n(){}var i,a;n.prototype=e,i=new n;for(a in t)r.hop.call(t,a)&&s(i,a,t[a]);return i};t.defineProperty=s,t.objCreate=a},function(e,t){"use strict";function n(e,t,n){this.locales=e,this.formats=t,this.pluralFn=n}function r(e){this.id=e}function i(e,t,n,r,i){this.id=e,this.useOrdinal=t,this.offset=n,this.options=r,this.pluralFn=i}function s(e,t,n,r){this.id=e,this.offset=t,this.numberFormat=n,this.string=r}function a(e,t){this.id=e,this.options=t}t["default"]=n,n.prototype.compile=function(e){return this.pluralStack=[],this.currentPlural=null,this.pluralNumberFormat=null,this.compileMessage(e)},n.prototype.compileMessage=function(e){if(!e||"messageFormatPattern"!==e.type)throw new Error('Message AST is not of type: "messageFormatPattern"');var t,n,r,i=e.elements,s=[];for(t=0,n=i.length;n>t;t+=1)switch(r=i[t],r.type){case"messageTextElement":s.push(this.compileMessageText(r));break;case"argumentElement":s.push(this.compileArgument(r));break;default:throw new Error("Message element does not have a valid type")}return s},n.prototype.compileMessageText=function(e){return this.currentPlural&&/(^|[^\\])#/g.test(e.value)?(this.pluralNumberFormat||(this.pluralNumberFormat=new Intl.NumberFormat(this.locales)),new s(this.currentPlural.id,this.currentPlural.format.offset,this.pluralNumberFormat,e.value)):e.value.replace(/\\#/g,"#")},n.prototype.compileArgument=function(e){var t=e.format;if(!t)return new r(e.id);var n,s=this.formats,o=this.locales,l=this.pluralFn;switch(t.type){case"numberFormat":return n=s.number[t.style],{id:e.id,format:new Intl.NumberFormat(o,n).format};case"dateFormat":return n=s.date[t.style],{id:e.id,format:new Intl.DateTimeFormat(o,n).format};case"timeFormat":return n=s.time[t.style],{id:e.id,format:new Intl.DateTimeFormat(o,n).format};case"pluralFormat":return n=this.compileOptions(e),new i(e.id,t.ordinal,t.offset,n,l);case"selectFormat":return n=this.compileOptions(e),new a(e.id,n);default:throw new Error("Message element does not have a valid format type")}},n.prototype.compileOptions=function(e){var t=e.format,n=t.options,r={};this.pluralStack.push(this.currentPlural),this.currentPlural="pluralFormat"===t.type?e:null;var i,s,a;for(i=0,s=n.length;s>i;i+=1)a=n[i],r[a.selector]=this.compileMessage(a.value);return this.currentPlural=this.pluralStack.pop(),r},r.prototype.format=function(e){return e?"string"==typeof e?e:String(e):""},i.prototype.getOption=function(e){var t=this.options,n=t["="+e]||t[this.pluralFn(e-this.offset,this.useOrdinal)];return n||t.other},s.prototype.format=function(e){var t=this.numberFormat.format(e-this.offset);return this.string.replace(/(^|[^\\])#/g,"$1"+t).replace(/\\#/g,"#")},a.prototype.getOption=function(e){var t=this.options;return t[e]||t.other}},function(e,t,n){"use strict";t=e.exports=n(20)["default"],t["default"]=t},function(e,t){"use strict";t["default"]=function(){function e(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}function t(e,t,n,r,i,s){this.message=e,this.expected=t,this.found=n,this.offset=r,this.line=i,this.column=s,this.name="SyntaxError"}function n(e){function n(t){function n(t,n,r){var i,s;for(i=n;r>i;i++)s=e.charAt(i),"\n"===s?(t.seenCR||t.line++,t.column=1,t.seenCR=!1):"\r"===s||"\u2028"===s||"\u2029"===s?(t.line++,t.column=1,t.seenCR=!0):(t.column++,t.seenCR=!1)}return qe!==t&&(qe>t&&(qe=0,Je={line:1,column:1,seenCR:!1}),n(Je,qe,t),qe=t),Je}function r(e){$e>Ue||(Ue>$e&&($e=Ue,Xe=[]),Xe.push(e))}function i(r,i,s){function a(e){var t=1;for(e.sort(function(e,t){return e.descriptiont.description?1:0});t1?a.slice(0,-1).join(", ")+" or "+a[e.length-1]:a[0],i=t?'"'+n(t)+'"':"end of input","Expected "+r+" but "+i+" found."}var l=n(s),c=s1?arguments[1]:{},M={},j={start:s},L=s,F=function(e){return{type:"messageFormatPattern",elements:e}},A=M,I=function(e){var t,n,r,i,s,a="";for(t=0,r=e.length;r>t;t+=1)for(i=e[t],n=0,s=i.length;s>n;n+=1)a+=i[n];return a},D=function(e){return{type:"messageTextElement",value:e}},K=/^[^ \t\n\r,.+={}#]/,O={type:"class",value:"[^ \\t\\n\\r,.+={}#]",description:"[^ \\t\\n\\r,.+={}#]"},R="{",B={type:"literal",value:"{",description:'"{"'},z=null,H=",",G={type:"literal",value:",",description:'","'},U="}",W={type:"literal",value:"}",description:'"}"'},q=function(e,t){return{type:"argumentElement",id:e,format:t&&t[2]}},J="number",$={type:"literal",value:"number",description:'"number"'},X="date",Z={type:"literal",value:"date",description:'"date"'},Y="time",V={type:"literal",value:"time",description:'"time"'},Q=function(e,t){return{type:e+"Format",style:t&&t[2]}},ee="plural",te={type:"literal",value:"plural",description:'"plural"'},ne=function(e){return{type:e.type,ordinal:!1,offset:e.offset||0,options:e.options}},re="selectordinal",ie={type:"literal",value:"selectordinal",description:'"selectordinal"'},se=function(e){return{type:e.type,ordinal:!0,offset:e.offset||0,options:e.options}},ae="select",oe={type:"literal",value:"select",description:'"select"'},le=function(e){return{type:"selectFormat",options:e}},ce="=",ue={type:"literal",value:"=",description:'"="'},pe=function(e,t){return{type:"optionalFormatPattern",selector:e,value:t}},he="offset:",me={type:"literal",value:"offset:",description:'"offset:"'},de=function(e){return e},fe=function(e,t){return{type:"pluralFormat",offset:e,options:t}},ge={type:"other",description:"whitespace"},ye=/^[ \t\n\r]/,ve={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},be={type:"other",description:"optionalWhitespace"},_e=/^[0-9]/,Te={type:"class",value:"[0-9]",description:"[0-9]"},ke=/^[0-9a-f]/i,Ee={type:"class",value:"[0-9a-f]i",description:"[0-9a-f]i"},xe="0",we={type:"literal",value:"0",description:'"0"'},Ne=/^[1-9]/,Pe={type:"class",value:"[1-9]",description:"[1-9]"},Se=function(e){return parseInt(e,10)},Ce=/^[^{}\\\0-\x1F \t\n\r]/,Me={type:"class",value:"[^{}\\\\\\0-\\x1F \\t\\n\\r]",description:"[^{}\\\\\\0-\\x1F \\t\\n\\r]"},je="\\#",Le={type:"literal",value:"\\#",description:'"\\\\#"'},Fe=function(){return"\\#"},Ae="\\{",Ie={type:"literal",value:"\\{",description:'"\\\\{"'},De=function(){return"{"},Ke="\\}",Oe={type:"literal",value:"\\}",description:'"\\\\}"'},Re=function(){return"}"},Be="\\u",ze={type:"literal",value:"\\u",description:'"\\\\u"'},He=function(e){return String.fromCharCode(parseInt(e,16))},Ge=function(e){return e.join("")},Ue=0,We=0,qe=0,Je={line:1,column:1,seenCR:!1},$e=0,Xe=[],Ze=0;if("startRule"in C){if(!(C.startRule in j))throw new Error("Can't start parsing from rule \""+C.startRule+'".');L=j[C.startRule]}if(S=L(),S!==M&&Ue===e.length)return S;throw S!==M&&Ueo?"past":"future"})},r.prototype._isValidUnits=function(e){if(!e||a.arrIndexOf.call(o,e)>=0)return!0;if("string"==typeof e){var t=/s$/.test(e)&&e.substr(0,e.length-1);if(t&&a.arrIndexOf.call(o,t)>=0)throw new Error('"'+e+'" is not a valid IntlRelativeFormat `units` value, did you mean: '+t)}throw new Error('"'+e+'" is not a valid IntlRelativeFormat `units` value, it must be one of: "'+o.join('", "')+'"')},r.prototype._resolveLocale=function(e){"string"==typeof e&&(e=[e]),e=(e||[]).concat(r.defaultLocale);var t,n,i,s,a=r.__localeData__;for(t=0,n=e.length;n>t;t+=1)for(i=e[t].toLowerCase().split("-");i.length;){if(s=a[i.join("-")])return s.locale;i.pop()}var o=e.pop();throw new Error("No locale data has been added to IntlRelativeFormat for: "+e.join(", ")+", or the default locale: "+o)},r.prototype._resolveStyle=function(e){if(!e)return l[0];if(a.arrIndexOf.call(l,e)>=0)return e;throw new Error('"'+e+'" is not a valid IntlRelativeFormat `style` value, it must be one of: "'+l.join('", "')+'"')},r.prototype._selectUnits=function(e){var t,n,i;for(t=0,n=o.length;n>t&&(i=o[t],!(Math.abs(e[i])r;r++)if(n[r]===e)return r;return-1},l=Array.isArray||function(e){return"[object Array]"===r.call(e)},c=Date.now||function(){return(new Date).getTime()};t.defineProperty=s,t.objCreate=a,t.arrIndexOf=o,t.isArray=l,t.dateNow=c},function(e,t){"use strict";t["default"]={locale:"en",pluralRuleFunction:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e,s=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return t?1==s&&11!=a?"one":2==s&&12!=a?"two":3==s&&13!=a?"few":"other":1==e&&r?"one":"other"},fields:{year:{displayName:"Year",relative:{0:"this year",1:"next year","-1":"last year"},relativeTime:{future:{one:"in {0} year",other:"in {0} years"},past:{one:"{0} year ago",other:"{0} years ago"}}},month:{displayName:"Month",relative:{0:"this month",1:"next month","-1":"last month"},relativeTime:{future:{one:"in {0} month",other:"in {0} months"},past:{one:"{0} month ago",other:"{0} months ago"}}},day:{displayName:"Day",relative:{0:"today",1:"tomorrow","-1":"yesterday"},relativeTime:{future:{one:"in {0} day",other:"in {0} days"},past:{one:"{0} day ago",other:"{0} days ago"}}},hour:{displayName:"Hour",relativeTime:{future:{one:"in {0} hour",other:"in {0} hours"},past:{one:"{0} hour ago",other:"{0} hours ago"}}},minute:{displayName:"Minute",relativeTime:{future:{one:"in {0} minute",other:"in {0} minutes"},past:{one:"{0} minute ago",other:"{0} minutes ago"}}},second:{displayName:"Second",relative:{0:"now"},relativeTime:{future:{one:"in {0} second",other:"in {0} seconds"},past:{one:"{0} second ago",other:"{0} seconds ago"}}}}}},function(e,t){},function(e,t,n){"use strict";t=e.exports=n(31)["default"],t["default"]=t},function(e,t,n){"use strict";function r(e){var t=a.objCreate(null);return function(){var n=Array.prototype.slice.call(arguments),r=i(n),s=r&&t[r];return s||(s=a.objCreate(e.prototype),e.apply(s,n),r&&(t[r]=s)),s}}function i(e){if("undefined"!=typeof JSON){var t,n,r,i=[];for(t=0,n=e.length;n>t;t+=1)r=e[t],r&&"object"==typeof r?i.push(s(r)):i.push(r);return JSON.stringify(i)}}function s(e){var t,n,r,i,s=[],a=[];for(t in e)e.hasOwnProperty(t)&&a.push(t);var o=a.sort();for(n=0,r=o.length;r>n;n+=1)t=o[n],i={},i[t]=e[t],s[n]=i;return s}var a=n(32);t["default"]=r},function(e,t){"use strict";var n=Object.prototype.hasOwnProperty,r=function(){try{return!!Object.defineProperty({},"a",{})}catch(e){return!1}}(),i=(!r&&!Object.prototype.__defineGetter__,r?Object.defineProperty:function(e,t,r){"get"in r&&e.__defineGetter__?e.__defineGetter__(t,r.get):(!n.call(e,t)||"value"in r)&&(e[t]=r.value)}),s=Object.create||function(e,t){function r(){}var s,a;r.prototype=e,s=new r;for(a in t)n.call(t,a)&&i(s,a,t[a]);return s};t.defineProperty=i,t.objCreate=s},function(e,t){"use strict";t["default"]={locale:"en",pluralRuleFunction:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e,s=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return t?1==s&&11!=a?"one":2==s&&12!=a?"two":3==s&&13!=a?"few":"other":1==e&&r?"one":"other"},fields:{year:{displayName:"Year",relative:{0:"this year",1:"next year","-1":"last year"},relativeTime:{future:{one:"in {0} year",other:"in {0} years"},past:{one:"{0} year ago",other:"{0} years ago"}}},month:{displayName:"Month",relative:{0:"this month",1:"next month","-1":"last month"},relativeTime:{future:{one:"in {0} month",other:"in {0} months"},past:{one:"{0} month ago",other:"{0} months ago"}}},day:{displayName:"Day",relative:{0:"today",1:"tomorrow","-1":"yesterday"},relativeTime:{future:{one:"in {0} day",other:"in {0} days"},past:{one:"{0} day ago",other:"{0} days ago"}}},hour:{displayName:"Hour",relativeTime:{future:{one:"in {0} hour",other:"in {0} hours"},past:{one:"{0} hour ago",other:"{0} hours ago"}}},minute:{displayName:"Minute",relativeTime:{future:{one:"in {0} minute",other:"in {0} minutes"},past:{one:"{0} minute ago",other:"{0} minutes ago"}}},second:{displayName:"Second",relative:{0:"now"},relativeTime:{future:{one:"in {0} second",other:"in {0} seconds"},past:{one:"{0} second ago",other:"{0} seconds ago"}}}}}},function(e,t,n){"use strict";var r=n(11),i=n(12),s=r["default"].createClass({displayName:"FormattedDate",mixins:[i["default"]],statics:{formatOptions:["localeMatcher","timeZone","hour12","formatMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName"]},propTypes:{format:r["default"].PropTypes.string,value:r["default"].PropTypes.any.isRequired},render:function(){var e=this.props,t=e.value,n=e.format,i=n&&this.getNamedFormat("date",n),a=s.filterFormatOptions(e,i);return r["default"].DOM.span(null,this.formatDate(t,a))}});t["default"]=s},function(e,t,n){"use strict";var r=n(11),i=n(12),s=r["default"].createClass({displayName:"FormattedRelative",mixins:[i["default"]],statics:{formatOptions:["style","units"]},propTypes:{format:r["default"].PropTypes.string,value:r["default"].PropTypes.any.isRequired,now:r["default"].PropTypes.any},render:function(){var e=this.props,t=e.value,n=e.format,i=n&&this.getNamedFormat("relative",n),a=s.filterFormatOptions(e,i),o=this.formatRelative(t,a,{now:e.now});return r["default"].DOM.span(null,o)}});t["default"]=s},function(e,t,n){"use strict";var r=n(11),i=n(12),s=r["default"].createClass({displayName:"FormattedNumber",mixins:[i["default"]],statics:{formatOptions:["localeMatcher","style","currency","currencyDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits"]},propTypes:{format:r["default"].PropTypes.string,value:r["default"].PropTypes.any.isRequired},render:function(){var e=this.props,t=e.value,n=e.format,i=n&&this.getNamedFormat("number",n),a=s.filterFormatOptions(e,i);return r["default"].DOM.span(null,this.formatNumber(t,a))}});t["default"]=s},function(e,t,n){"use strict";var r=n(11),i=n(12),s=r["default"].createClass({displayName:"FormattedMessage",mixins:[i["default"]],propTypes:{tagName:r["default"].PropTypes.string,message:r["default"].PropTypes.string.isRequired},getDefaultProps:function(){return{tagName:"span"}},render:function(){var e=this.props,t=e.tagName,n=e.message,i=Math.floor(1099511627776*Math.random()).toString(16),s=new RegExp("(@__ELEMENT-"+i+"-\\d+__@)","g"),a={},o=function(){var e=0;return function(){return"@__ELEMENT-"+i+"-"+(e+=1)+"__@"}}(),l=Object.keys(e).reduce(function(t,n){var i,s=e[n];return r["default"].isValidElement(s)?(i=o(),t[n]=i,a[i]=s):t[n]=s,t},{}),c=this.formatMessage(n,l),u=c.split(s).filter(function(e){return!!e}).map(function(e){return a[e]||e}),p=[t,null].concat(u);return r["default"].createElement.apply(null,p)}});t["default"]=s},function(e,t,n){"use strict";var r=n(11),i=n(39),s=n(12),a=r["default"].createClass({displayName:"FormattedHTMLMessage",mixins:[s["default"]],propTypes:{tagName:r["default"].PropTypes.string,message:r["default"].PropTypes.string.isRequired},getDefaultProps:function(){return{tagName:"span"}},render:function(){var e=this.props,t=e.tagName,n=e.message,s=Object.keys(e).reduce(function(t,n){var s=e[n];return"string"==typeof s?s=i["default"](s):r["default"].isValidElement(s)&&(s=r["default"].renderToStaticMarkup(s)),t[n]=s,t},{});return r["default"].DOM[t]({dangerouslySetInnerHTML:{__html:this.formatMessage(n,s)}})}});t["default"]=a},function(e,t){"use strict";var n={"&":"&",">":">","<":"<",'"':""","'":"'"},r=/[&><"']/g;t["default"]=function(e){return(""+e).replace(r,function(e){return n[e]})}},function(e,t){},function(e,t,n){function r(e){return n(i(e))}function i(e){return s[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var s={"./en-US":42,"./en-US.js":42,"./pt-BR":43,"./pt-BR.js":43};r.keys=function(){return Object.keys(s)},r.resolve=i,e.exports=r,r.id=41},function(e,t){e.exports={IndexFilters:{filters:"{quantity, plural,\n =0 {Filters}\n =1 {one filter}\n other {# filters}\n}"},Active:"Active",Alerts:"Alerts",All:"All",Category:"Category",Cleared:"Cleared",Completed:"Completed",created:"Created",Critical:"Critical",Disabled:"Disabled",Error:"Error",loginInvalidPassword:"Please provide Username and Password.","Log In":"Log In",Logout:"Logout",model:"Model",modified:"Modified",Name:"Name",OK:"OK",Password:"Password","Remember me":"Remember me",Resource:"Resource",Running:"Running",Search:"Search",State:"State",Status:"Status",Tasks:"Tasks",Time:"Time",Total:"Total",Unknown:"Unknown",Username:"Username",uri:"URI",Warning:"Warning"}},function(e,t){e.exports={IndexFilters:{filters:"{quantity, plural,\n =0 {Filtros}\n =1 {um filtro}\n other {# filtros}\n}"},Active:"Ativos",Alerts:"Alertas",All:"Todos",Category:"Categoria",Cleared:"Livre",Completed:"Completado",created:"Criado",Critical:"Crítico",Disabled:"Desabilitado",Error:"Erro",loginInvalidPassword:"Por favor, informe Usuário e Senha.","Log In":"Logar",Logout:"Deslogar",model:"Modelo",modified:"Modificado",Name:"Nome",OK:"OK",Password:"Senha","Remember me":"Lembrar Usuário",Resource:"Recurso",Running:"Executando",Search:"Buscar",State:"Estado",Status:"Situaçāo",Tasks:"Tarefas",Time:"Data",Total:"Total",Unknown:"Desconhecido",Username:"Usuário",uri:"URI",Warning:"Alerta"}},function(e,t,n){var r=n(2),i="button",s=r.createClass({displayName:"Button",propTypes:{alternate:r.PropTypes.bool,label:r.PropTypes.string.isRequired,large:r.PropTypes.bool,onClick:r.PropTypes.func,primary:r.PropTypes.bool,small:r.PropTypes.bool,strong:r.PropTypes.bool},render:function(){var e=[i];return this.props.primary&&e.push(i+"--primary"),this.props.alternate&&e.push(i+"--alternate"),this.props.large&&e.push(i+"--large"),this.props.small&&e.push(i+"--small"),this.props.strong&&e.push(i+"--strong"),this.props.onClick||e.push(i+"--disabled"),this.props.className&&e.push(this.props.className),r.createElement("button",{className:e.join(" "),onClick:this.props.onClick},this.props.label)}});e.exports=s},function(e,t,n){var r=n(2),i="check-box",s=r.createClass({displayName:"CheckBox",propTypes:{checked:r.PropTypes.bool,defaultChecked:r.PropTypes.bool,id:r.PropTypes.string.isRequired,label:r.PropTypes.string.isRequired,name:r.PropTypes.string,onChange:r.PropTypes.func,toggle:r.PropTypes.bool},render:function(){var e=[i];return this.props.toggle&&e.push(i+"--toggle"),this.props.className&&e.push(this.props.className),r.createElement("label",{className:e.join(" ")},r.createElement("input",{className:i+"__input",id:this.props.id,name:this.props.name,type:"checkbox",checked:this.props.checked,defaultChecked:this.props.defaultChecked,onChange:this.props.onChange}),r.createElement("span",{className:i+"__control"}),r.createElement("span",{className:i+"__label"},this.props.label))}});e.exports=s},function(e,t,n){var r=n(2),i="document",s=r.createClass({displayName:"GrommetDocument",propTypes:{colorIndex:r.PropTypes.string,flush:r.PropTypes.bool},getDefaultProps:function(){return{flush:!0}},render:function(){var e=[i];return this.props.flush&&e.push(i+"--flush"),this.props.colorIndex&&e.push("header-color-index-"+this.props.colorIndex),r.createElement("div",{ref:"document",className:e.join(" ")},r.createElement("div",{className:i+"__content"},this.props.children))}});e.exports=s},function(e,t,n){function r(e,t,n,r){var i=(r-90)*Math.PI/180;return{x:e+n*Math.cos(i),y:t+n*Math.sin(i)}}function i(e,t,n,i,s){var a=r(e,t,n,s),o=r(e,t,n,i),l=180>=s-i?"0":"1",c=["M",a.x,a.y,"A",n,n,0,l,0,o.x,o.y].join(" ");return c}function s(e,t,n,i,s){var a=s-(s-i)/2,o=r(e,t,n-24,a),l=r(e,t,n,a-10),c=r(e,t,n,a+10),u=["M",o.x,o.y,"L",l.x,l.y,"A",n,n,0,0,0,c.x,c.y,"Z"].join(" ");return u}var a=n(2),o=n(48),l="donut",c=192,u=168,p=a.createClass({displayName:"Donut",propTypes:{legend:a.PropTypes.bool,partial:a.PropTypes.bool,max:a.PropTypes.oneOfType([a.PropTypes.shape({value:a.PropTypes.number,label:a.PropTypes.string}),a.PropTypes.number]),min:a.PropTypes.oneOfType([a.PropTypes.shape({value:a.PropTypes.number,label:a.PropTypes.string}),a.PropTypes.number]),series:a.PropTypes.arrayOf(a.PropTypes.shape({label:a.PropTypes.string,value:a.PropTypes.number.isRequired,units:a.PropTypes.string,colorIndex:a.PropTypes.string,important:a.PropTypes.bool,onClick:a.PropTypes.func})),small:a.PropTypes.bool,units:a.PropTypes.string,value:a.PropTypes.number},getDefaultProps:function(){return{max:{value:100},min:{value:0}}},_initialTimeout:function(){this.setState({initial:!1,activeIndex:this.state.importantIndex}),clearTimeout(this._timeout)},_onActive:function(e){this.setState({initial:!1,activeIndex:e})},_layout:function(){var e=window.innerWidth/window.innerHeight;.8>e?this.setState({orientation:"portrait"}):e>1.2&&this.setState({orientation:"landscape"});var t=this.refs.donut.getDOMNode().parentNode,n=t.offsetWidth,r=t.offsetHeight,i=c;this.props.partial&&(i=u),i>r||c>n||2*c>n&&2*i>r?this.setState({size:"small"}):this.setState({size:null})},_onResize:function(){clearTimeout(this._resizeTimer),this._resizeTimer=setTimeout(this._layout,50)},_generateSeries:function(e){var t=e.max.value-e.min.value,n=t-(e.value-e.min.value);return[{value:e.value},{value:n,colorIndex:"unset"}]},_importantIndex:function(e){var t=0;return e.some(function(e,n){return e.important?(t=n,!0):void 0}),t},getInitialState:function(){var e=this.props.series||this._generateSeries(this.props),t=this._importantIndex(e);return{initial:!0,importantIndex:t,activeIndex:t,legend:!1,orientation:"portrait",series:e}},componentDidMount:function(){console.log("Grommet Donut is deprecated. Please use Grommet Meter instead."),this._initialTimer=setTimeout(this._initialTimeout,10),this.setState({initial:!0,activeIndex:0}),window.addEventListener("resize",this._onResize),this._onResize()},componentWillReceiveProps:function(e){var t=e.series||this._generateSeries(e),n=this._importantIndex(t);this.setState({importantIndex:n,activeIndex:n,series:t})},componentWillUnmount:function(){clearTimeout(this._initialTimer),clearTimeout(this._resizeTimer),window.removeEventListener("resize",this._onResize)},_itemColorIndex:function(e,t){return e.colorIndex||"graph-"+(t+1)},render:function(){var e=[l,l+"--"+this.state.orientation];this.state.size&&e.push(l+"--"+this.state.size),this.props.partial&&e.push(l+"--partial"),this.props.small&&e.push(l+"--small");var t=c;this.props.partial&&(t=u);var n=0;this.state.series.some(function(e){n+=e.value});var r=0,p=360/n;this.props.partial&&(r=60,p=240/n);var h,m,d=null,f=null,g=null,y=null,v=this.state.series.map(function(e,t){var n=Math.min(360,Math.max(10,r+p*e.value));e.value>0&&r+360===n&&(n-=.1);var o=84,u=i(c/2,c/2,o,r+180,n+180),h=this._itemColorIndex(e,t),m=[l+"__slice"];if(m.push("color-index-"+h),this.state.activeIndex===t&&(m.push(l+"__slice--active"),d=e.value,f=e.units||this.props.units,g=e.label),t===this.state.activeIndex){var v=s(c/2,c/2,o,r+180,n+180);y=a.createElement("path",{stroke:"none",className:l+"__slice-indicator color-index-"+h,d:v})}return r=n,a.createElement("path",{key:e.label,fill:"none",className:m.join(" "),d:u,onMouseOver:this._onActive.bind(this,t),onMouseOut:this._onActive.bind(this,this.state.importantIndex),onClick:e.onClick})},this);this.props.partial&&(this.props.min&&(h=a.createElement("div",{className:l+"__min-label"},this.props.min.value," ",this.props.units)),this.props.max&&(m=a.createElement("div",{className:l+"__max-label"},this.props.max.value," ",this.props.units)));var b=null;return this.props.legend&&(b=a.createElement(o,{className:l+"__legend",series:this.props.series,units:this.props.units,value:this.props.value,activeIndex:this.state.activeIndex,onActive:this._onActive})),a.createElement("div",{ref:"donut",className:e.join(" ")},a.createElement("div",{className:l+"__graphic-container"},a.createElement("svg",{className:l+"__graphic",viewBox:"0 0 "+c+" "+t,preserveAspectRatio:"xMidYMid meet"},a.createElement("g",null,y,v)),a.createElement("div",{className:l+"__active"},a.createElement("div",{className:l+"__active-value large-number-font"},d,a.createElement("span",{className:l+"__active-units large-number-font"},f)),a.createElement("div",{className:l+"__active-label"},g)),h,m),b)}});e.exports=p},function(e,t,n){var r=n(2),i=n(4),s="legend",a=r.createClass({displayName:"Legend",mixins:[i],propTypes:{activeIndex:r.PropTypes.number,onActive:r.PropTypes.func,series:r.PropTypes.arrayOf(r.PropTypes.shape({label:r.PropTypes.string,value:r.PropTypes.number,units:r.PropTypes.string,colorIndex:r.PropTypes.oneOfType([r.PropTypes.number,r.PropTypes.string]),onClick:r.PropTypes.func})).isRequired,total:r.PropTypes.bool,units:r.PropTypes.string,value:r.PropTypes.number},_onActive:function(e){this.setState({activeIndex:e}),this.props.onActive&&this.props.onActive(e)},getInitialState:function(){return{activeIndex:this.props.activeIndex}},componentWillReceiveProps:function(e){this.setState({activeIndex:e.activeIndex})},_itemColorIndex:function(e,t){return e.colorIndex||"graph-"+(t+1)},render:function(){var e=[s];1===this.props.series.length&&e.push(s+"--single"),this.props.className&&e.push(this.props.className);var t=0,n=this.props.series.map(function(e,n){var i=[s+"__item"];n===this.state.activeIndex&&i.push(s+"__item--active");var a=this._itemColorIndex(e,n);t+=e.value;var o=[s+"__item-value"];return 1===this.props.series.length&&o.push("large-number-font"),r.createElement("li",{key:e.label,className:i.join(" "),onClick:e.onClick,onMouseOver:this._onActive.bind(this,n),onMouseOut:this._onActive.bind(this,this.props.activeIndex)},r.createElement("svg",{className:s+"__item-swatch color-index-"+a,viewBox:"0 0 12 12"},r.createElement("path",{className:e.className,d:"M 5 0 l 0 12"})),r.createElement("span",{className:s+"__item-label"},e.label),r.createElement("span",{className:o.join(" ")},e.value,r.createElement("span",{className:s+"__item-units"},this.props.units)))},this),i=null;return this.props.total&&this.props.series.length>1&&(i=r.createElement("li",{className:s+"__total"},r.createElement("span",{className:s+"__total-label"},this.getGrommetIntlMessage("Total")),r.createElement("span",{className:s+"__total-value"},t,r.createElement("span",{className:s+"__total-units"},this.props.units)))),r.createElement("ol",{className:e.join(" ")},n.reverse(),i)}});e.exports=a},function(e,t,n){var r=n(2),i=n(50),s="footer",a=r.createClass({displayName:"Footer",propTypes:{centered:r.PropTypes.bool,colorIndex:r.PropTypes.string,flush:r.PropTypes.bool,primary:r.PropTypes.bool,scrollTop:r.PropTypes.bool},getDefaultProps:function(){return{flush:!0}},_updateState:function(){this.setState({scrolled:this._scrollable.scrollTop>0})},_onClickTop:function(){this._scrollable.scrollTop=0},_onScroll:function(){clearTimeout(this._scrollTimer),this._scrollTimer=setTimeout(this._updateState,10)},getInitialState:function(){return{scrolled:!1}},componentDidMount:function(){this._scrollable=this.refs.footer.getDOMNode().parentNode.parentNode,this._scrollable.addEventListener("scroll",this._onScroll)},componentWillUnmount:function(){this._scrollable.removeEventListener("scroll",this._onScroll)},componentWillReceiveProps:function(){ -this.setState({scrolled:!1})},componentDidUpdate:function(){this.state.scrolled||(this._scrollable.scrollTop=0)},render:function(){var e=[s];this.props.primary&&e.push(s+"--primary"),this.props.centered&&e.push(s+"--centered"),this.props.flush&&e.push(s+"--flush"),this.props.colorIndex&&e.push("background-color-index-"+this.props.colorIndex),this.props.className&&e.push(this.props.className);var t=null;return this.props.scrollTop&&this.state.scrolled&&(t=r.createElement("div",{className:s+"__top control-icon",onClick:this._onClickTop},r.createElement(i,null))),r.createElement("div",{ref:"footer",className:e.join(" ")},r.createElement("div",{className:s+"__content"},this.props.children,t))}});e.exports=a},function(e,t,n){var r=n(2),i=r.createClass({displayName:"Top",render:function(){var e="control-icon control-icon-top";return this.props.className&&(e+=" "+this.props.className),r.createElement("svg",{className:e,viewBox:"0 0 48 48",version:"1.1"},r.createElement("g",{fill:"none"},r.createElement("polyline",{strokeWidth:"2",points:"14,20.9 24,13 34,21 "}),r.createElement("path",{strokeWidth:"2",d:"M24,13.3C24,36,24,36,24,36"}),r.createElement("line",{strokeWidth:"2",x1:"13",y1:"11",x2:"35",y2:"11"})))}});e.exports=i},function(e,t,n){var r=n(2),i="form",s=r.createClass({displayName:"Form",propTypes:{compact:r.PropTypes.bool,fill:r.PropTypes.bool,flush:r.PropTypes.bool,onSubmit:r.PropTypes.func,className:r.PropTypes.string},getDefaultProps:function(){return{compact:!1,fill:!1,flush:!0}},render:function(){var e=[i];return this.props.compact&&e.push(i+"--compact"),this.props.fill&&e.push(i+"--fill"),this.props.flush&&e.push(i+"--flush"),this.props.className&&e.push(this.props.className),r.createElement("form",{className:e.join(" "),onSubmit:this.props.onSubmit},this.props.children)}});e.exports=s},function(e,t,n){var r=n(2),i="form-field",s=r.createClass({displayName:"FormField",propTypes:{error:r.PropTypes.string,help:r.PropTypes.node,hidden:r.PropTypes.bool,htmlFor:r.PropTypes.string,label:r.PropTypes.string,required:r.PropTypes.bool},_onFocus:function(){this.setState({focus:!0})},_onBlur:function(){this.setState({focus:!1})},_onClick:function(){this._inputElement&&this._inputElement.focus()},getInitialState:function(){return{focus:!1}},componentDidMount:function(){var e=this.refs.contents.getDOMNode(),t=e.querySelectorAll("input, textarea, select");1===t.length&&(this._inputElement=t[0],this._inputElement.addEventListener("focus",this._onFocus),this._inputElement.addEventListener("blur",this._onBlur))},componentWillUnmount:function(){this._inputElement&&(this._inputElement.removeEventListener("focus",this._onFocus),this._inputElement.removeEventListener("blur",this._onBlur),delete this._inputElement)},render:function(){var e=[i];this.state.focus&&e.push(i+"--focus"),this.props.required&&e.push(i+"--required"),this.props.hidden&&e.push(i+"--hidden"),this.props.htmlFor&&e.push(i+"--text");var t=null;this.props.error&&(e.push(i+"--error"),t=r.createElement("span",{className:i+"__error"},this.props.error));var n=null;return this.props.help&&(n=r.createElement("span",{className:i+"__help"},this.props.help)),r.createElement("div",{className:e.join(" "),onClick:this._onClick},t,r.createElement("label",{className:i+"__label",htmlFor:this.props.htmlFor},this.props.label),r.createElement("span",{ref:"contents",className:i+"__contents"},this.props.children),n)}});e.exports=s},function(e,t,n){var r=n(2),i="header",s=r.createClass({displayName:"Header",propTypes:{colorIndex:r.PropTypes.string,fixed:r.PropTypes.bool,flush:r.PropTypes.bool,large:r.PropTypes.bool,primary:r.PropTypes.bool,small:r.PropTypes.bool},getDefaultProps:function(){return{flush:!0,large:!1,primary:!1,small:!1}},_onResize:function(){this._alignMirror()},_alignMirror:function(){var e=this.refs.content.getDOMNode(),t=this.refs.mirror.getDOMNode(),n=t.getBoundingClientRect();e.style.width=""+Math.floor(n.width)+"px";var r=e.getBoundingClientRect();t.style.height=""+Math.floor(r.height)+"px"},componentDidMount:function(){this.props.fixed&&(this._alignMirror(),window.addEventListener("resize",this._onResize))},componentDidUpdate:function(){this.props.fixed&&this._alignMirror()},componentWillUnmount:function(){this.props.fixed&&window.removeEventListener("resize",this._onResize)},render:function(){var e=[i];this.props.primary&&e.push(i+"--primary"),this.props.fixed&&e.push(i+"--fixed"),this.props.flush&&e.push(i+"--flush"),this.props.large&&e.push(i+"--large"),this.props.small&&e.push(i+"--small"),this.props.className&&e.push(this.props.className);var t=null;this.props.fixed&&(t=r.createElement("div",{ref:"mirror",className:i+"__mirror"}));var n=r.createElement("div",{ref:"content",className:i+"__content"},this.props.children);if(this.props.colorIndex||this.props.fixed){var s=[i+"__wrapper"];this.props.colorIndex&&s.push("background-color-index-"+this.props.colorIndex),n=r.createElement("div",{className:s.join(" ")},n)}return r.createElement("div",{className:e.join(" ")},t,n)}});e.exports=s},function(e,t,n){var r=n(2),i=r.createClass({displayName:"Label",propTypes:{icon:r.PropTypes.node,text:r.PropTypes.string},render:function(){var e=null,t=null;return this.props.icon&&(e=r.createElement("span",{className:"label__icon control-icon"},this.props.icon)),this.props.text&&(t=r.createElement("span",{className:"label__text"},this.props.text)),r.createElement("div",{className:"label"},e,t)}});e.exports=i},function(e,t,n){var r=n(2),i=r.createClass({displayName:"Login",propTypes:{background:r.PropTypes.string},_onResize:function(){this.adjustBackground()},adjustBackground:function(){var e=window.innerWidth/window.innerHeight,t=this.refs.background.getDOMNode(),n=t.scrollWidth/t.scrollHeight;this.setState({orientation:n>e?"portrait":"landscape"})},getInitialState:function(){return{orientation:null}},componentDidMount:function(){window.addEventListener("resize",this._onResize),setTimeout(this.adjustBackground,300)},componentWillUnmount:function(){window.removeEventListener("resize",this._onResize)},render:function(){var e=null;if(this.props.background){var t=["login__background"];this.state.orientation&&t.push("login__background--"+this.state.orientation),e=r.createElement("img",{ref:"background",className:t.join(" "),src:this.props.background})}return r.createElement("div",{className:"login"},e,r.createElement("div",{className:"login__container"},this.props.children))}});e.exports=i},function(e,t,n){var r=n(2),i=n(51),s=n(52),a=n(45),o=n(44),l=n(4),c="login-form",u=r.createClass({displayName:"LoginForm",mixins:[l],propTypes:{logo:r.PropTypes.node,title:r.PropTypes.string,rememberMe:r.PropTypes.bool,forgotPassword:r.PropTypes.node,errors:r.PropTypes.arrayOf(r.PropTypes.string),onSubmit:r.PropTypes.func},_onSubmit:function(e){e.preventDefault();var t=this.refs.username.getDOMNode().value.trim(),n=this.refs.password.getDOMNode().value.trim();this.props.onSubmit&&this.props.onSubmit({username:t,password:n})},getDefaultProps:function(){return{errors:[]}},componentDidMount:function(){this.refs.username.getDOMNode().focus()},render:function(){var e=[c],t=this.props.errors.map(function(e,t){return r.createElement("div",{key:t,className:c+"__error"},this.getGrommetIntlMessage(e))}.bind(this)),n=null;this.props.logo&&(n=r.createElement("div",{className:c+"__logo"},this.props.logo));var l=null;this.props.title&&(l=r.createElement("h1",{className:c+"__title"},this.props.title));var u=null;if(this.props.rememberMe||this.props.forgotPassword){var p=null;this.props.rememberMe&&(p=r.createElement(a,{className:c+"__remember-me",id:"remember-me",label:this.getGrommetIntlMessage("Remember me")})),u=r.createElement("div",{className:c+"__footer"},p,this.props.forgotPassword)}return r.createElement(i,{className:e.join(" "),onSubmit:this._onSubmit},n,l,r.createElement("fieldset",null,r.createElement(s,{htmlFor:"username",label:this.getGrommetIntlMessage("Username")},r.createElement("input",{id:"username",ref:"username",type:"email"})),r.createElement(s,{htmlFor:"password",label:this.getGrommetIntlMessage("Password")},r.createElement("input",{id:"password",ref:"password",type:"password"}))),t,r.createElement(o,{className:c+"__submit",primary:!0,strong:!0,label:this.getGrommetIntlMessage("Log In"),onClick:this._onSubmit}),u)}});e.exports=u},function(e,t,n){var r=n(2),i=n(60),s=n(61),a=n(58),o=n(62),l=n(63),c="menu",u=r.createClass({displayName:"MenuLayer",propTypes:{align:r.PropTypes.oneOf(["top","bottom","left","right"]),direction:r.PropTypes.oneOf(["up","down","left","right","center"]),id:r.PropTypes.string.isRequired,onClick:r.PropTypes.func.isRequired,router:r.PropTypes.func},childContextTypes:{router:r.PropTypes.func},getChildContext:function(){return{router:this.props.router}},render:function(){var e=[c+"__layer"];return this.props.direction&&e.push(c+"__layer--"+this.props.direction),this.props.align&&e.push(c+"__layer--align-"+this.props.align),r.createElement("div",{id:this.props.id,className:e.join(" "),onClick:this.props.onClick},this.props.children)}}),p=r.createClass({displayName:"Menu",propTypes:{align:r.PropTypes.oneOf(["top","bottom","left","right"]),closeOnClick:r.PropTypes.bool,collapse:r.PropTypes.bool,direction:r.PropTypes.oneOf(["up","down","left","right","center"]),icon:r.PropTypes.node,label:r.PropTypes.string,primary:r.PropTypes.bool,small:r.PropTypes.bool},contextTypes:{router:r.PropTypes.func},getDefaultProps:function(){return{align:"left",closeOnClick:!0,direction:"down",small:!1}},mixins:[i,s,a],_onOpen:function(e){e.preventDefault(),this.setState({active:!0})},_onClose:function(){this.setState({active:!1})},_onFocusControl:function(){this.setState({controlFocused:!0})},_onBlurControl:function(){this.setState({controlFocused:!1})},_onSink:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},getInitialState:function(){return{controlFocused:!1,active:!1,inline:!this.props.label&&!this.props.icon&&!this.props.collapse}},componentDidMount:function(){if(this.refs.control){var e=this.refs.control.getDOMNode();this.setState({layerId:"menu-layer-"+e.getAttribute("data-reactid")})}},componentDidUpdate:function(e,t){var n={esc:this._onClose,space:this._onClose,tab:this._onClose},r={space:this._onOpen,down:this._onOpen};if(!this.state.controlFocused&&t.controlFocused&&this.stopListeningToKeyboard(r),!this.state.active&&t.active&&(document.removeEventListener("click",this._onClose),this.stopListeningToKeyboard(n),this.stopOverlay()),this.state.controlFocused&&(!t.controlFocused||!this.state.active&&t.active)&&this.startListeningToKeyboard(r),this.state.active&&!t.active){document.addEventListener("click",this._onClose),this.startListeningToKeyboard(n);var i=this.refs.control.getDOMNode(),s=document.getElementById(this.state.layerId),a=s.querySelectorAll("."+c+"__control")[0],o=s.querySelectorAll("svg, img")[0],l=window.getComputedStyle(i).fontSize;a.style.fontSize=l;var u=i.clientHeight;o&&u<=o.clientHeight+1&&("down"===this.props.direction?a.style.marginTop="-1px":"up"===this.props.direction&&(a.style.marginBottom="1px")),a.style.height=u+"px",a.style.lineHeight=u+"px",this.startOverlay(i,s,this.props.align)}},componentWillUnmount:function(){document.removeEventListener("click",this._onClose)},_renderControl:function(){var e=null,t=null,n=c+"__control",i=[n];return this.props.icon?(i.push(n+"--labelled"),t=this.props.icon):(i.push(n+"--fixed-label"),t=r.createElement(o,null)),e=this.props.label?r.createElement("div",{className:i.join(" ")},r.createElement("div",{className:n+"-icon"},t),r.createElement("span",{className:n+"-label"},this.props.label),r.createElement(l,{className:n+"-drop-icon"})):r.createElement("div",{className:n},t)},_classes:function(e){var t=[e];return this.props.direction&&t.push(e+"--"+this.props.direction),this.props.align&&t.push(e+"--align-"+this.props.align),this.props.small&&t.push(e+"--small"),this.props.primary&&t.push(e+"--primary"),t},render:function(){var e=this._classes(c);if(this.state.inline?e.push(c+"--inline"):(e.push(c+"--controlled"),this.props.label&&e.push(c+"--labelled")),this.props.className&&e.push(this.props.className),this.state.inline)return r.createElement("div",{className:e.join(" "),onClick:this._onClose},this.props.children);var t=this._renderControl();return r.createElement("div",{ref:"control",className:e.join(" "),tabIndex:"0",onClick:this._onOpen,onFocus:this._onFocusControl,onBlur:this._onBlurControl},t)},renderLayer:function(){if(this.state.active){var e=r.createElement("div",{onClick:this._onClose},this._renderControl()),t=null,n=null;"up"===this.props.direction?(t=this.props.children,n=e):(t=e,n=this.props.children);var i;return i=this.props.closeOnClick?this._onClose:this._onSink,r.createElement(u,{router:this.context.router,align:this.props.align,direction:this.props.direction,onClick:i,id:this.state.layerId},t,n)}return r.createElement("span",null)}});e.exports=p},function(e,t,n){var r=n(59),i={_overlay:{controlElement:null,layerElement:null,align:null,scrollParents:[]},startOverlay:function(e,t,n){this._overlay.controlElement=e,this._overlay.layerElement=t,this._overlay.align=n,this._overlay.scrollParents=r.findScrollParents(this._overlay.controlElement),this._overlay.scrollParents.forEach(function(e){e.addEventListener("scroll",this.positionOverlay)},this),window.addEventListener("resize",this.positionOverlay),this.positionOverlay()},stopOverlay:function(){this._overlay.controlElement&&(this._overlay.scrollParents.forEach(function(e){e.removeEventListener("scroll",this.positionOverlay)},this),window.removeEventListener("resize",this.positionOverlay),this._overlay.controlElement=null,this._overlay.layerElement=null,this._overlay.align=null,this._overlay.scrollParents=[])},positionOverlay:function(){var e=this._overlay.controlElement,t=this._overlay.layerElement,n=e.getBoundingClientRect(),r=window.innerWidth;t.style.left="",t.style.width="",t.style.top="";var i=Math.min(Math.max(n.width,t.offsetWidth),r),s=n.left+t.offsetWidth-i;s="right"===this._overlay.align?n.left+n.width-t.offsetWidth:n.left,s+i>r?s-=s+i-r:0>s&&(s=0);var a=n.top;"up"===this.props.direction?a=n.top+n.height-t.offsetHeight:"below"===this._overlay.align&&(a=n.top+n.height);var o=window.innerHeight-a;t.style.left=""+s+"px",t.style.width=""+i+"px",t.style.top=""+a+"px",t.style.maxHeight=""+o+"px"},componentWillUnmount:function(){this.stopOverlay()}};e.exports=i},function(e,t){e.exports={findScrollParents:function(e){for(var t=[],n=e.parentNode;n;)n.scrollHeight>n.offsetHeight+10&&t.push(n),n=n.parentNode;return 0===t.length&&t.push(document),t}}},function(e,t,n){var r=n(2),i={componentWillUnmount:function(){this._unrenderLayer(),document.body.removeChild(this._target)},componentDidUpdate:function(){this._renderLayer()},componentDidMount:function(){this._target=document.createElement("div"),document.body.appendChild(this._target),this._renderLayer()},_renderLayer:function(){r.render(this.renderLayer(),this._target)},_unrenderLayer:function(){r.unmountComponentAtNode(this._target)}};e.exports=i},function(e,t){var n={backspace:8,tab:9,enter:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,comma:188},r={_keyboardAcceleratorHandlers:{},_keyboardAcceleratorListening:!1,_onKeyboardAcceleratorKeyPress:function(e){var t=e.keyCode?e.keyCode:e.which;this._keyboardAcceleratorHandlers.hasOwnProperty(t)&&this._keyboardAcceleratorHandlers[t](e)},startListeningToKeyboard:function(e){var t=0;for(var r in e)if(e.hasOwnProperty(r)){var i=r;n.hasOwnProperty(r)&&(i=n[r]),t+=1,this._keyboardAcceleratorHandlers[i]=e[r]}t>0&&!this._keyboardAcceleratorListening&&(window.addEventListener("keydown",this._onKeyboardAcceleratorKeyPress),this._keyboardAcceleratorListening=!0)},stopListeningToKeyboard:function(e){if(e)for(var t in e)if(e.hasOwnProperty(t)){var r=t;n.hasOwnProperty(t)&&(r=n[t]),delete this._keyboardAcceleratorHandlers[r]}var i=0;for(var s in this._keyboardAcceleratorHandlers)this._keyboardAcceleratorHandlers.hasOwnProperty(s)&&(i+=1);e&&0!==i||(window.removeEventListener("keydown",this._onKeyboardAcceleratorKeyPress),this._keyboardAcceleratorHandlers={},this._keyboardAcceleratorListening=!1)},componentWillUnmount:function(){this.stopListeningToKeyboard()}};e.exports=r},function(e,t,n){var r=n(2),i=r.createClass({displayName:"More",render:function(){var e="control-icon control-icon-more";return this.props.className&&(e+=" "+this.props.className),r.createElement("svg",{className:e,viewBox:"0 0 48 48",version:"1.1"},r.createElement("g",{fill:"none"},r.createElement("rect",{x:"23",y:"23",strokeWidth:"2",width:"2",height:"2"}),r.createElement("rect",{x:"15",y:"23",strokeWidth:"2",width:"2",height:"2"}),r.createElement("rect",{x:"31",y:"23",strokeWidth:"2",width:"2",height:"2"})))}});e.exports=i},function(e,t,n){var r=n(2),i=r.createClass({displayName:"DropCaret",render:function(){var e="control-icon control-icon-drop-caret";return this.props.className&&(e+=" "+this.props.className),r.createElement("svg",{className:e,viewBox:"0 0 48 48",version:"1.1"},r.createElement("g",{stroke:"none"},r.createElement("polygon",{points:"33.4,19.7 24.1,30.3 14.8,19.7"})))}});e.exports=i},function(e,t,n){function r(e,t,n,r){var i=(r-90)*Math.PI/180;return{x:e+n*Math.cos(i),y:t+n*Math.sin(i)}}function i(e,t,n,i,s){var a=r(e,t,n,s),o=r(e,t,n,i),l=180>=s-i?"0":"1",c=["M",a.x,a.y,"A",n,n,0,l,0,o.x,o.y].join(" ");return c}function s(e,t,n,i,s){var a=r(e,t,n-30,s-1),o=r(e,t,n,s-1),l=["M",o.x,o.y,"L",a.x,a.y].join(" ");return l}var a=n(2),o=n(48),l="meter",c=192,u=24,p=u/2,h=192,m=84,d=144,f=a.createClass({displayName:"Meter",propTypes:{important:a.PropTypes.number,large:a.PropTypes.bool,legend:a.PropTypes.bool,legendTotal:a.PropTypes.bool,max:a.PropTypes.oneOfType([a.PropTypes.shape({value:a.PropTypes.number.isRequired,label:a.PropTypes.string}),a.PropTypes.number]),min:a.PropTypes.oneOfType([a.PropTypes.shape({value:a.PropTypes.number.isRequired,label:a.PropTypes.string}),a.PropTypes.number]),series:a.PropTypes.arrayOf(a.PropTypes.shape({label:a.PropTypes.string,value:a.PropTypes.number.isRequired,colorIndex:a.PropTypes.string,important:a.PropTypes.bool,onClick:a.PropTypes.func})),small:a.PropTypes.bool,threshold:a.PropTypes.number,thresholds:a.PropTypes.arrayOf(a.PropTypes.shape({label:a.PropTypes.string,value:a.PropTypes.number.isRequired,colorIndex:a.PropTypes.string})),type:a.PropTypes.oneOf(["bar","arc","circle"]),units:a.PropTypes.string,value:a.PropTypes.number,vertical:a.PropTypes.bool},getDefaultProps:function(){return{type:"bar"}},_initialTimeout:function(){this.setState({initial:!1,activeIndex:this.state.importantIndex}),clearTimeout(this._timeout)},_onActivate:function(e){this.setState({initial:!1,activeIndex:e})},_onResize:function(){clearTimeout(this._resizeTimer),this._resizeTimer=setTimeout(this._layout,50)},_layout:function(){var e=window.innerWidth/window.innerHeight;.8>e?this.setState({legendPosition:"bottom"}):e>1.2&&this.setState({legendPosition:"right"})},_normalizeSeries:function(e,t,n){var r=[];return e.series?r=e.series:e.value&&(r=[{value:e.value,important:!0}]),r},_normalizeThresholds:function(e,t,n){var r=[];if(e.thresholds)for(var i=0,s=0;s0&&(r[s-1].value=a.value-i,i+=r[s-1].value),s===e.thresholds.length-1&&(r[s].value=n.value-i)}else if(e.threshold){var o=n.value-e.threshold;r=[{value:e.threshold,colorIndex:"unset"},{value:o,colorIndex:"error"}]}else r=[{value:n.value,colorIndex:"unset"}];return r},_importantIndex:function(e){var t=e.length-1;return this.props.hasOwnProperty("important")&&(t=this.props.important),e.some(function(e,n){return e.important?(t=n,!0):void 0}),t},_terminal:function(e){return"number"==typeof e&&(e={value:e}),e},_seriesTotal:function(e){var t=0;return e.some(function(e){t+=e.value}),t},_viewBoxDimensions:function(){var e,t;return"arc"===this.props.type?this.props.vertical?(t=d,e=h):(t=h,e=d):"circle"===this.props.type?(t=h,e=h):"bar"===this.props.type&&(this.props.vertical?(t=u,e=c):(t=c,e=u)),[t,e]},_stateFromProps:function(e){var t;t=e.series&&e.series.length>1?this._seriesTotal(e.series):e.max&&e.max.value?e.max.value:100;var n=this._terminal(e.min||0),r=this._terminal(e.max||t),i=this._normalizeSeries(e,n,r),s=this._normalizeThresholds(e,n,r),a=this._importantIndex(i),o=this._viewBoxDimensions(),l={importantIndex:a,activeIndex:a,series:i,thresholds:s,min:n,max:r,total:t,viewBoxWidth:o[0],viewBoxHeight:o[1]};return"arc"===this.props.type?(l.startAngle=60,l.anglePer=240/t,this.props.vertical?l.angleOffset=90:l.angleOffset=180):"circle"===this.props.type?(l.startAngle=1,l.anglePer=358/t,l.angleOffset=180):"bar"===this.props.type&&(l.scale=c/(r.value-n.value)),l},getInitialState:function(){var e=this._stateFromProps(this.props);return e.legendPosition="bottom",e.initial=!0,e},componentDidMount:function(){this._initialTimer=setTimeout(this._initialTimeout,10),window.addEventListener("resize",this._onResize),this._onResize()},componentWillReceiveProps:function(e){var t=this._stateFromProps(e);this.setState(t),this._onResize()},componentWillUnmount:function(){clearTimeout(this._initialTimer),clearTimeout(this._resizeTimer),window.removeEventListener("resize",this._onResize)},_itemColorIndex:function(e,t){return e.colorIndex||"graph-"+(t+1)},_translateBarWidth:function(e){return Math.round(this.state.scale*e)},_barCommands:function(e,t){var n;return n=this.props.vertical?"M"+p+","+(c-e)+" L"+p+","+(c-(e+t)):"M"+e+","+p+" L"+(e+t)+","+p},_renderBar:function(e){var t,n,r=0,i=this.state.min.value,s=e.map(function(e,s){var o=this._itemColorIndex(e,s);t=[l+"__bar"],s===this.state.activeIndex&&t.push(l+"__bar--active"),t.push("color-index-"+o);var c=e.value-i;i=Math.max(0,i-e.value);var u=this._translateBarWidth(c);return n=this._barCommands(r,u),r+=u,a.createElement("path",{key:s,className:t.join(" "),d:n,onMouseOver:this._onActivate.bind(this,s),onMouseOut:this._onActivate.bind(this,this.state.importantIndex),onClick:e.onClick})},this);return 0===s.length&&(t=[l+"__bar"],t.push(l+"__bar--loading"),t.push("color-index-loading"),n=this._barCommands(0,c),s.push(a.createElement("path",{key:"loading",className:t.join(" "),d:n}))),s},_translateEndAngle:function(e,t){return Math.min(360,Math.max(0,e+this.state.anglePer*t))},_arcCommands:function(e,t){return i(h/2,h/2,m,e+this.state.angleOffset,t+this.state.angleOffset)},_renderArcOrCircle:function(e){var t,n,r,i=this.state.startAngle,s=e.map(function(e,t){var s=[l+"__slice"];t===this.state.activeIndex&&s.push(l+"__slice--active");var o=this._itemColorIndex(e,t);return s.push("color-index-"+o),n=this._translateEndAngle(i,e.value),r=this._arcCommands(i,n),i=n,a.createElement("path",{key:e.label||t,fill:"none",className:s.join(" "),d:r,onMouseOver:this._onActivate.bind(this,t),onMouseOut:this._onActivate.bind(this,this.state.importantIndex),onClick:e.onClick})},this);return 0===s.length&&(t=[l+"__slice"],t.push(l+"__slice--loading"),t.push("color-index-loading"),n=this._translateEndAngle(this.state.startAngle,this.state.max.value),r=this._arcCommands(this.state.startAngle,n),s.push(a.createElement("path",{key:"loading",className:t.join(" "),d:r}))),s},_renderActiveIndicator:function(e){var t=null,n=this.state.startAngle;return e.forEach(function(e,r){var i=this._itemColorIndex(e,r),o=this._translateEndAngle(n,e.value);if(r===this.state.activeIndex){var c=s(h/2,h/2,m,n+this.state.angleOffset,o+this.state.angleOffset);t=a.createElement("path",{fill:"none",className:l+"__slice-indicator color-index-"+i,d:c})}n=o},this),t},_renderActive:function(){var e,t=this.state.series[this.state.activeIndex];return"arc"===this.props.type||"circle"===this.props.type?e=a.createElement("div",{className:l+"__active"},a.createElement("div",{className:l+"__active-value large-number-font"},t.value,a.createElement("span",{className:l+"__active-units large-number-font"},this.props.units)),a.createElement("div",{className:l+"__active-label"},t.label)):"bar"===this.props.type&&(e=a.createElement("span",{className:l+"__active"},a.createElement("span",{className:l+"__active-value large-number-font"},t.value),a.createElement("span",{className:l+"__active-units large-number-font"},this.props.units))),e},_renderLegend:function(){return a.createElement(o,{className:l+"__legend",series:this.state.series,units:this.props.units,activeIndex:this.state.activeIndex,onActive:this._onActive})},render:function(){var e=[l];e.push(l+"--"+this.props.type),e.push(l+"--legend-"+this.state.legendPosition),this.props.vertical&&e.push(l+"--vertical"),this.props.small&&e.push(l+"--small"),this.props.large&&e.push(l+"--large"),0===this.state.series.length&&e.push(l+"--loading"),this.props.className&&e.push(this.props.className);var t=null,n=null,r=null;"arc"===this.props.type||"circle"===this.props.type?(t=this._renderArcOrCircle(this.state.series),n=this._renderArcOrCircle(this.state.thresholds),r=this._renderActiveIndicator(this.state.series)):"bar"===this.props.type&&(t=this._renderBar(this.state.series),n=this._renderBar(this.state.thresholds));var i=null;this.state.min.label&&(i=a.createElement("div",{className:l+"__label-min"},this.state.min.label));var s=null;this.state.max.label&&(s=a.createElement("div",{className:l+"__label-max"},this.state.max.label));var o=null;this.state.activeIndex>=0&&(o=this._renderActive());var c=null;return this.props.legend&&(c=this._renderLegend()),a.createElement("div",{className:e.join(" ")},a.createElement("div",{className:l+"__active-graphic"},a.createElement("div",{className:l+"__labeled-graphic"},a.createElement("svg",{className:l+"__graphic",viewBox:"0 0 "+this.state.viewBoxWidth+" "+this.state.viewBoxHeight,preserveAspectRatio:"xMidYMid meet"},a.createElement("g",{className:l+"__thresholds"},n),a.createElement("g",{className:l+"__values"},t),r),a.createElement("div",{className:l+"__labels-container"},a.createElement("div",{className:l+"__labels"},i,s))),o),c)}});e.exports=f},function(e,t,n){var r=n(2),i=r.createClass({displayName:"Panel",propTypes:{direction:r.PropTypes.string,index:r.PropTypes.oneOf([1,2])},render:function(){var e=["panel"];"horizontal"===this.props.direction&&e.push("panel--horizontal"),this.props.index&&e.push("panel--index-"+this.props.index);var t=null;return this.props.title&&(t=r.createElement("h2",{className:"panel__title"},this.props.title)),r.createElement("div",{className:e.join(" ")},t,this.props.children)}});e.exports=i},function(e,t,n){var r=n(2),i="radio-button",s=r.createClass({displayName:"RadioButton",propTypes:{checked:r.PropTypes.bool,defaultChecked:r.PropTypes.bool,id:r.PropTypes.string.isRequired,label:r.PropTypes.string.isRequired,name:r.PropTypes.string,onChange:r.PropTypes.func,value:r.PropTypes.string},render:function(){var e=[i];return this.props.className&&e.push(this.props.className),r.createElement("label",{className:e.join(" ")},r.createElement("input",{className:i+"__input",id:this.props.id,name:this.props.name,type:"radio",checked:this.props.checked,defaultChecked:this.props.defaultChecked,value:this.props.value,onChange:this.props.onChange}),r.createElement("span",{className:i+"__control"}),r.createElement("span",{className:i+"__label"},this.props.label))}});e.exports=s},function(e,t,n){var r=n(2),i=n(60),s=n(61),a=n(58),o=n(68),l=n(4),c="search",u=r.createClass({displayName:"Search",propTypes:{align:r.PropTypes.oneOf(["left","right"]),defaultValue:r.PropTypes.string,inline:r.PropTypes.bool,onChange:r.PropTypes.func,placeHolder:r.PropTypes.string,suggestions:r.PropTypes.arrayOf(r.PropTypes.string)},getDefaultProps:function(){return{align:"left",inline:!1,placeHolder:"Search"}},mixins:[i,s,a,l],_onAddLayer:function(e){e.preventDefault(),this.setState({layer:!0,activeSuggestionIndex:-1})},_onRemoveLayer:function(){this.setState({layer:!1})},_onFocusControl:function(){this.setState({controlFocused:!0,layer:!0,activeSuggestionIndex:-1})},_onBlurControl:function(){this.setState({controlFocused:!1})},_onFocusInput:function(){this.refs.input.getDOMNode().select(),this.setState({layer:!this.state.inline||this.props.suggestions,activeSuggestionIndex:-1})},_onBlurInput:function(){},_onChangeInput:function(e){this.setState({activeSuggestionIndex:-1}),this.props.onChange&&this.props.onChange(e.target.value)},_onNextSuggestion:function(){var e=this.state.activeSuggestionIndex;e=Math.min(e+1,this.props.suggestions.length-1),this.setState({activeSuggestionIndex:e})},_onPreviousSuggestion:function(){var e=this.state.activeSuggestionIndex;e=Math.max(e-1,0),this.setState({activeSuggestionIndex:e})},_onEnter:function(){if(this.state.activeSuggestionIndex>=0){var e=this.props.suggestions[this.state.activeSuggestionIndex];this.props.onChange&&this.props.onChange(e)}this._onRemoveLayer()},_onClickSuggestion:function(e){this.props.onChange&&this.props.onChange(e),this._onRemoveLayer()},_onSink:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},_layout:function(){window.innerWidth<600?this.setState({inline:!1}):this.setState({inline:this.props.inline})},_onResize:function(){clearTimeout(this._resizeTimer),this._resizeTimer=setTimeout(this._layout,50)},getInitialState:function(){return{align:"left",controlFocused:!1,inline:this.props.inline,layer:!1,activeSuggestionIndex:-1}},componentDidMount:function(){window.addEventListener("resize",this._onResize),this._layout()},componentDidUpdate:function(e,t){var n={esc:this._onRemoveLayer,tab:this._onRemoveLayer,up:this._onPreviousSuggestion,down:this._onNextSuggestion,enter:this._onEnter},r={space:this._onAddLayer};if(!this.state.controlFocused&&t.controlFocused&&this.stopListeningToKeyboard(r),!this.state.layer&&t.layer&&(document.removeEventListener("click",this._onRemoveLayer),this.stopListeningToKeyboard(n),this.stopOverlay()),this.state.controlFocused&&!t.controlFocused&&this.startListeningToKeyboard(r),this.state.layer&&!t.layer){document.addEventListener("click",this._onRemoveLayer),this.startListeningToKeyboard(n);var i=(this.refs.control?this.refs.control:this.refs.input).getDOMNode(),s=document.getElementById("search-layer"),a=s.querySelectorAll(".search__control")[0],o=s.querySelectorAll("svg")[0],l=s.querySelectorAll(".search__input")[0],c=window.getComputedStyle(i).fontSize;l.style.fontSize=c;var u=i.clientHeight;o&&u<=o.clientHeight&&(a.style.marginTop="-2px"),l.style.height=u+"px",a&&(a.style.height=u+"px",a.style.lineHeight=u+"px"),this.startOverlay(i,s,this.props.align),l.focus()}},componentWillUnmount:function(){document.removeEventListener("click",this._onRemoveLayer),window.removeEventListener("resize",this._onResize)},focus:function(){var e=this.refs.input||this.refs.control;e&&e.getDOMNode().focus()},_createControl:function(){var e=c+"__control";return r.createElement("div",{className:e},r.createElement(o,null))},_classes:function(e){var t=[e];return this.state.inline?t.push(e+"--inline"):t.push(e+"--controlled"),this.props.align&&t.push(e+"--align-"+this.props.align),t},render:function(){var e=this._classes(c);if(this.props.className&&e.push(this.props.className),this.state.inline){var t=this.props.suggestions?!0:!1;return r.createElement("div",{className:e.join(" ")},r.createElement("input",{ref:"input",type:"search",placeholder:this.getGrommetIntlMessage(this.props.placeHolder),value:this.props.defaultValue,className:c+"__input",readOnly:t,onFocus:this._onFocusInput,onBlur:this._onBlurInput,onChange:this._onChangeInput}))}var n=this._createControl();return r.createElement("div",{ref:"control",className:e.join(" "),tabIndex:"0",onClick:this._onAddLayer,onFocus:this._onFocusControl,onBlur:this._onBlurControl},n)},renderLayer:function(){if(this.state.layer){var e=this._classes(c+"__layer"),t=null;this.props.suggestions&&(t=this.props.suggestions.map(function(e,t){var n=[c+"__suggestion"];return t===this.state.activeSuggestionIndex&&n.push(c+"__suggestion--active"),r.createElement("div",{key:e,className:n.join(" "),onClick:this._onClickSuggestion.bind(this,e) -},e)},this));var n=r.createElement("div",{className:c+"__layer-contents",onClick:this._onSink},r.createElement("input",{type:"search",defaultValue:this.props.defaultValue,className:c+"__input",onChange:this._onChangeInput}),r.createElement("div",{className:c+"__suggestions"},t));if(!this.state.inline){var i=this._createControl(),s="right"===this.props.align,a=s?n:i,o=s?i:n;n=r.createElement("div",{className:c+"__layer-header"},a,o)}return r.createElement("div",{id:"search-layer",className:e.join(" ")},n)}return r.createElement("span",null)}});e.exports=u},function(e,t,n){var r=n(2),i=r.createClass({displayName:"Search",render:function(){var e="control-icon control-icon-search";return this.props.className&&(e+=" "+this.props.className),r.createElement("svg",{className:e,viewBox:"0 0 48 48",version:"1.1"},r.createElement("g",{fill:"none"},r.createElement("circle",{strokeWidth:"2",cx:"21.5",cy:"21.5",r:"9"}),r.createElement("line",{strokeWidth:"2",x1:"35.5",y1:"35.5",x2:"27.8",y2:"27.8"})))}});e.exports=i},function(e,t,n){var r=n(2),i=n(60),s=n(61),a=n(58),o=n(68),l="search-input",c=r.createClass({displayName:"SearchInput",propTypes:{defaultValue:r.PropTypes.oneOfType([r.PropTypes.shape({label:r.PropTypes.string,value:r.PropTypes.string}),r.PropTypes.string]),id:r.PropTypes.string,name:r.PropTypes.string,onChange:r.PropTypes.func,onSearch:r.PropTypes.func,suggestions:r.PropTypes.arrayOf(r.PropTypes.oneOfType([r.PropTypes.shape({label:r.PropTypes.string,value:r.PropTypes.string}),r.PropTypes.string])),value:r.PropTypes.oneOfType([r.PropTypes.shape({label:r.PropTypes.string,value:r.PropTypes.string}),r.PropTypes.string])},mixins:[i,s,a],_onInputChange:function(e){this.props.onChange(e.target.value)},_onOpen:function(e){e.preventDefault(),this.setState({active:!0,activeSuggestionIndex:-1})},_onClose:function(){this.setState({active:!1})},_onSearchChange:function(e){this.setState({activeSuggestionIndex:-1}),this.props.onSearch(e.target.value)},_onNextSuggestion:function(){var e=this.state.activeSuggestionIndex;e=Math.min(e+1,this.props.suggestions.length-1),this.setState({activeSuggestionIndex:e})},_onPreviousSuggestion:function(){var e=this.state.activeSuggestionIndex;e=Math.max(e-1,0),this.setState({activeSuggestionIndex:e})},_onEnter:function(){if(this.setState({active:!1}),this._activation(!1),this.state.activeSuggestionIndex>=0){var e=this.props.suggestions[this.state.activeSuggestionIndex];this.setState({value:e}),this.props.onChange(e)}},_onClickSuggestion:function(e){this.setState({value:e}),this._activation(!1),this.props.onChange(e)},_activation:function(e){var t={esc:this._onClose,tab:this._onClose,up:this._onPreviousSuggestion,down:this._onNextSuggestion,enter:this._onEnter};if(e){document.addEventListener("click",this._onClose),this.startListeningToKeyboard(t);var n=this.refs.component.getDOMNode(),r=document.getElementById(l+"-layer");this.startOverlay(n,r,"below");var i=r.querySelectorAll("input")[0];i.focus()}else document.removeEventListener("click",this._onClose),this.stopListeningToKeyboard(t),this.stopOverlay()},getInitialState:function(){return{active:!1,defaultValue:this.props.defaultValue,value:this.props.value,activeSuggestionIndex:-1}},componentDidMount:function(){this.state.active&&this._activation(this.state.active)},componentDidUpdate:function(e,t){!this.state.active&&t.active&&this._activation(this.state.active),this.state.active&&!t.active&&this._activation(this.state.active)},componentWillUnmount:function(){this._activation(!1)},_valueText:function(e){var t="";return e&&(t="string"==typeof e?e:e.label||e.value),t},render:function(){var e=[l];return this.state.active&&e.push(l+"--active"),this.props.className&&e.push(this.props.className),r.createElement("div",{ref:"component",className:e.join(" ")},r.createElement("input",{className:l+"__input",id:this.props.id,name:this.props.name,value:this._valueText(this.props.value),defaultValue:this._valueText(this.props.defaultValue),onChange:this._onInputChange}),r.createElement("div",{className:l+"__control",onClick:this._onOpen},r.createElement(o,null)))},renderLayer:function(){if(this.state.active){var e=null;return this.props.suggestions&&(e=this.props.suggestions.map(function(e,t){var n=[l+"__layer-suggestion"];return t===this.state.activeSuggestionIndex&&n.push(l+"__layer-suggestion--active"),r.createElement("div",{key:this._valueText(e),className:n.join(" "),onClick:this._onClickSuggestion.bind(this,e)},this._valueText(e))},this)),r.createElement("div",{id:l+"-layer",className:l+"__layer",onClick:this._onClose},r.createElement("input",{type:"search",defaultValue:"",placeholder:"Search",className:l+"__layer-input",onChange:this._onSearchChange}),r.createElement("div",{className:l+"__layer-suggestions"},e))}return r.createElement("span",null)}});e.exports=c},function(e,t,n){var r=n(2),i="section",s=r.createClass({displayName:"Section",propTypes:{centered:r.PropTypes.bool,compact:r.PropTypes.bool,colorIndex:r.PropTypes.string,direction:r.PropTypes.oneOf(["up","down","left","right"]),flush:r.PropTypes.bool,texture:r.PropTypes.string},getDefaultProps:function(){return{colored:!1,direction:"down",flush:!0,small:!1}},render:function(){var e=[i],t=[i+"__content"];this.props.compact&&e.push(i+"--compact"),this.props.centered&&e.push(i+"--centered"),this.props.flush&&e.push(i+"--flush"),this.props.direction&&e.push(i+"--"+this.props.direction),this.props.colorIndex&&e.push("background-color-index-"+this.props.colorIndex),this.props.className&&e.push(this.props.className);var n={};return this.props.texture&&(n.backgroundImage=this.props.texture),r.createElement("div",{className:e.join(" "),style:n},r.createElement("div",{className:t.join(" ")},this.props.children))}});e.exports=s},function(e,t,n){var r=n(2),i=n(72),s=n(73),a="table",o=r.createClass({displayName:"Table",propTypes:{selection:r.PropTypes.number,onMore:r.PropTypes.func,scrollable:r.PropTypes.bool,selectable:r.PropTypes.bool},mixins:[s],getDefaultProps:function(){return{selection:null,scrollable:!1,selectable:!1}},_clearSelection:function(){for(var e=this.refs.table.getDOMNode().querySelectorAll("."+a+"__row--selected"),t=0;ti;i++){t=arguments[i];for(n in t)if(Object.getOwnPropertyDescriptor&&Object.defineProperty){var a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,a)}else e[n]=t[n]}return e},t.isFunction=function(e){return"function"==typeof e},t.EventEmitter=n(100),t.nextTick=function(e){setTimeout(e,0)},t.capitalize=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},t.callbackName=function(e){return"on"+t.capitalize(e)},t.object=function(e,t){for(var n={},r=0;rt;t++)r[t]=this._events[e][t].fn;return r},r.prototype.emit=function(e,t,n,r,i,s){if(!this._events||!this._events[e])return!1;var a,o,l=this._events[e],c=arguments.length;if("function"==typeof l.fn){switch(l.once&&this.removeListener(e,l.fn,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,n),!0;case 4:return l.fn.call(l.context,t,n,r),!0;case 5:return l.fn.call(l.context,t,n,r,i),!0;case 6:return l.fn.call(l.context,t,n,r,i,s),!0}for(o=1,a=new Array(c-1);c>o;o++)a[o-1]=arguments[o];l.fn.apply(l.context,a)}else{var u,p=l.length;for(o=0;p>o;o++)switch(l[o].once&&this.removeListener(e,l[o].fn,!0),c){case 1:l[o].fn.call(l[o].context);break;case 2:l[o].fn.call(l[o].context,t);break;case 3:l[o].fn.call(l[o].context,t,n);break;default:if(!a)for(u=1,a=new Array(c-1);c>u;u++)a[u-1]=arguments[u];l[o].fn.apply(l[o].context,a)}}return!0},r.prototype.on=function(e,t,r){var i=new n(t,r||this);return this._events||(this._events={}),this._events[e]?this._events[e].fn?this._events[e]=[this._events[e],i]:this._events[e].push(i):this._events[e]=i,this},r.prototype.once=function(e,t,r){var i=new n(t,r||this,!0);return this._events||(this._events={}),this._events[e]?this._events[e].fn?this._events[e]=[this._events[e],i]:this._events[e].push(i):this._events[e]=i,this},r.prototype.removeListener=function(e,t,n){if(!this._events||!this._events[e])return this;var r=this._events[e],i=[];if(t&&(r.fn&&(r.fn!==t||n&&!r.once)&&i.push(r),!r.fn))for(var s=0,a=r.length;a>s;s++)(r[s].fn!==t||n&&!r[s].once)&&i.push(r[s]);return i.length?this._events[e]=1===i.length?i[0]:i:delete this._events[e],this},r.prototype.removeAllListeners=function(e){return this._events?(e?delete this._events[e]:this._events={},this):this},r.prototype.off=r.prototype.removeListener,r.prototype.addListener=r.prototype.on,r.prototype.setMaxListeners=function(){return this},r.EventEmitter=r,r.EventEmitter2=r,r.EventEmitter3=r,e.exports=r},function(e,t,n){var r;(function(i,s){/*! Native Promise Only +!function(o,s){var a=s();r=a,i="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==i&&(e.exports=i)),e.exports=a,o.Intl||(o.Intl=a,a.__applyLocaleSensitivePrototypes()),o.IntlPolyfill=a}("undefined"!=typeof o?o:this,function(){"use strict";function e(e){return z.test(e)?G.test(e)?!1:U.test(e)?!1:!0:!1}function t(e){var t,n;e=e.toLowerCase(),n=e.split("-");for(var r=1,i=n.length;i>r;r++)if(2===n[r].length)n[r]=n[r].toUpperCase();else if(4===n[r].length)n[r]=n[r].charAt(0).toUpperCase()+n[r].slice(1);else if(1===n[r].length&&"x"!=n[r])break;e=te.call(n,"-"),(t=e.match(H))&&t.length>1&&(t.sort(),e=e.replace(RegExp("(?:"+H.source+")+","i"),te.call(t,""))),$.call(pe.tags,e)&&(e=pe.tags[e]),n=e.split("-");for(var r=1,i=n.length;i>r;r++)$.call(pe.subtags,n[r])?n[r]=pe.subtags[n[r]]:$.call(pe.extLang,n[r])&&(n[r]=pe.extLang[n[r]][0],1===r&&pe.extLang[n[1]][1]===n[0]&&(n=V.call(n,r++),i-=1));return te.call(n,"-")}function n(){return B}function r(e){var t=String(e),n=F(t);return ce.test(n)===!1?!1:!0}function i(n){if(void 0===n)return new I;for(var r=new I,n="string"==typeof n?[n]:n,i=K(n),o=i.length,s=0;o>s;){var a=String(s),l=a in i;if(l){var c=i[a];if(null==c||"string"!=typeof c&&"object"!=typeof c)throw new TypeError("String or Object type expected");var u=String(c);if(!e(u))throw new RangeError("'"+u+"' is not a structurally valid language tag");u=t(u),-1===X.call(r,u)&&ee.call(r,u)}s++}return r}function o(e,t){for(var n=t;;){if(X.call(e,n)>-1)return n;var r=n.lastIndexOf("-");if(0>r)return;r>=2&&"-"==n.charAt(r-2)&&(r-=2),n=n.substring(0,r)}}function s(e,t){for(var r,i=0,s=t.length;s>i&&!r;){var a=t[i],l=String(a).replace(ue,""),r=o(e,l);i++}var c=new L;if(void 0!==r){if(c["[[locale]]"]=r,String(a)!==String(l)){var u=a.match(ue)[0],p=a.indexOf("-u-");c["[[extension]]"]=u,c["[[extensionIndex]]"]=p}}else c["[[locale]]"]=n();return c}function a(e,t){return s(e,t)}function l(e,t,n,r,i){if(0===e.length)throw new ReferenceError("No locale data has been provided for this object yet.");var o=n["[[localeMatcher]]"];if("lookup"===o)var l=s(e,t);else var l=a(e,t);var c=l["[[locale]]"];if($.call(l,"[[extension]]"))var u=l["[[extension]]"],p=l["[[extensionIndex]]"],h=String.prototype.split,m=h.call(u,"-"),d=m.length;var f=new L;f["[[dataLocale]]"]=c;for(var g="-u",v=0,y=r.length;y>v;){var b=r[v],_=i[c],T=_[b],k=T[0],x="",w=X;if(void 0!==m){var E=w.call(m,b);if(-1!==E)if(d>E+1&&m[E+1].length>2){var P=m[E+1],N=w.call(T,P);if(-1!==N)var k=P,x="-"+b+"-"+k}else{var N=w(T,"true");if(-1!==N)var k="true"}}if($.call(n,"[["+b+"]]")){var S=n["[["+b+"]]"];-1!==w.call(T,S)&&S!==k&&(k=S,x="")}f["[["+b+"]]"]=k,g+=x,v++}if(g.length>2)var C=c.substring(0,p),M=c.substring(p),c=C+g+M;return f["[[locale]]"]=c,f}function c(e,t){for(var n=t.length,r=new I,i=0;n>i;){var s=t[i],a=String(s).replace(ue,""),l=o(e,a);void 0!==l&&ee.call(r,s),i++}var c=V.call(r);return c}function u(e,t){return c(e,t)}function p(e,t,n){if(void 0!==n){var n=new L(K(n)),r=n.localeMatcher;if(void 0!==r&&(r=String(r),"lookup"!==r&&"best fit"!==r))throw new RangeError('matcher should be "lookup" or "best fit"')}if(void 0===r||"best fit"===r)var i=u(e,t);else var i=c(e,t);for(var o in i)$.call(i,o)&&Y(i,o,{writable:!1,configurable:!1,value:i[o]});return Y(i,"length",{writable:!1}),i}function h(e,t,n,r,i){var o=e[t];if(void 0!==o){if(o="boolean"===n?Boolean(o):"string"===n?String(o):o,void 0!==r&&-1===X.call(r,o))throw new RangeError("'"+o+"' is not an allowed value for `"+t+"`");return o}return i}function m(e,t,n,r,i){var o=e[t];if(void 0!==o){if(o=Number(o),isNaN(o)||n>o||o>r)throw new RangeError("Value is not a number or outside accepted range");return Math.floor(o)}return i}function d(){var e=arguments[0],t=arguments[1];return this&&this!==W?f(K(this),e,t):new W.NumberFormat(e,t)}function f(e,t,n){var o=R(e),s=O();if(o["[[initializedIntlObject]]"]===!0)throw new TypeError("`this` object has already been initialized as an Intl object");Y(e,"__getInternalProperties",{value:function(){return arguments[0]===oe?o:void 0}}),o["[[initializedIntlObject]]"]=!0;var a=i(t);n=void 0===n?{}:K(n);var c=new L,u=h(n,"localeMatcher","string",new I("lookup","best fit"),"best fit");c["[[localeMatcher]]"]=u;var p=ie.NumberFormat["[[localeData]]"],d=l(ie.NumberFormat["[[availableLocales]]"],a,c,ie.NumberFormat["[[relevantExtensionKeys]]"],p);o["[[locale]]"]=d["[[locale]]"],o["[[numberingSystem]]"]=d["[[nu]]"],o["[[dataLocale]]"]=d["[[dataLocale]]"];var f=d["[[dataLocale]]"],y=h(n,"style","string",new I("decimal","percent","currency"),"decimal");o["[[style]]"]=y;var b=h(n,"currency","string");if(void 0!==b&&!r(b))throw new RangeError("'"+b+"' is not a valid currency code");if("currency"===y&&void 0===b)throw new TypeError("Currency code is required when style is currency");if("currency"===y){b=b.toUpperCase(),o["[[currency]]"]=b;var _=g(b)}var T=h(n,"currencyDisplay","string",new I("code","symbol","name"),"symbol");"currency"===y&&(o["[[currencyDisplay]]"]=T);var k=m(n,"minimumIntegerDigits",1,21,1);o["[[minimumIntegerDigits]]"]=k;var x="currency"===y?_:0,w=m(n,"minimumFractionDigits",0,20,x);o["[[minimumFractionDigits]]"]=w;var E="currency"===y?Math.max(w,_):"percent"===y?Math.max(w,0):Math.max(w,3),P=m(n,"maximumFractionDigits",w,20,E);o["[[maximumFractionDigits]]"]=P;var N=n.minimumSignificantDigits,S=n.maximumSignificantDigits;(void 0!==N||void 0!==S)&&(N=m(n,"minimumSignificantDigits",1,21,1),S=m(n,"maximumSignificantDigits",N,21,21),o["[[minimumSignificantDigits]]"]=N,o["[[maximumSignificantDigits]]"]=S);var C=h(n,"useGrouping","boolean",void 0,!0);o["[[useGrouping]]"]=C;var M=p[f],j=M.patterns,A=j[y];return o["[[positivePattern]]"]=A.positivePattern,o["[[negativePattern]]"]=A.negativePattern,o["[[boundFormat]]"]=void 0,o["[[initializedNumberFormat]]"]=!0,J&&(e.format=v.call(e)),s.exp.test(s.input),e}function g(e){return void 0!==he[e]?he[e]:2}function v(){var e=null!=this&&"object"==typeof this&&R(this);if(!e||!e["[[initializedNumberFormat]]"])throw new TypeError("`this` value for format() is not an initialized Intl.NumberFormat object.");if(void 0===e["[[boundFormat]]"]){var t=function(e){return y(this,Number(e))},n=re.call(t,this);e["[[boundFormat]]"]=n}return e["[[boundFormat]]"]}function y(e,t){var n,r=O(),i=R(e),o=i["[[dataLocale]]"],s=i["[[numberingSystem]]"],a=ie.NumberFormat["[[localeData]]"][o],l=a.symbols[s]||a.symbols.latn,c=!1;if(isFinite(t)===!1)isNaN(t)?n=l.nan:(n=l.infinity,0>t&&(c=!0));else{if(0>t&&(c=!0,t=-t),"percent"===i["[[style]]"]&&(t*=100),n=$.call(i,"[[minimumSignificantDigits]]")&&$.call(i,"[[maximumSignificantDigits]]")?b(t,i["[[minimumSignificantDigits]]"],i["[[maximumSignificantDigits]]"]):_(t,i["[[minimumIntegerDigits]]"],i["[[minimumFractionDigits]]"],i["[[maximumFractionDigits]]"]),me[s]){var u=me[i["[[numberingSystem]]"]];n=String(n).replace(/\d/g,function(e){return u[e]})}else n=String(n);if(n=n.replace(/\./g,l.decimal),i["[[useGrouping]]"]===!0){var p=n.split(l.decimal),h=p[0],m=a.patterns.primaryGroupSize||3,d=a.patterns.secondaryGroupSize||m;if(h.length>m){var f=new I,g=h.length-m,v=g%d,y=h.slice(0,v);for(y.length&&ee.call(f,y);g>v;)ee.call(f,h.slice(v,v+d)),v+=d;ee.call(f,h.slice(g)),p[0]=te.call(f,l.group)}n=te.call(p,l.decimal)}}var T=i[c===!0?"[[negativePattern]]":"[[positivePattern]]"];if(T=T.replace("{number}",n),"currency"===i["[[style]]"]){var k,x=i["[[currency]]"],w=a.currencies[x];switch(i["[[currencyDisplay]]"]){case"symbol":k=w||x;break;default:case"code":case"name":k=x}T=T.replace("{currency}",k)}return r.exp.test(r.input),T}function b(e,t,n){var r=n;if(0===e)var i=te.call(Array(r+1),"0"),o=0;else var o=j(Math.abs(e)),s=Math.round(Math.exp(Math.abs(o-r+1)*Math.LN10)),i=String(Math.round(0>o-r+1?e*s:e/s));if(o>=r)return i+te.call(Array(o-r+1+1),"0");if(o===r-1)return i;if(o>=0?i=i.slice(0,o+1)+"."+i.slice(o+1):0>o&&(i="0."+te.call(Array(-(o+1)+1),"0")+i),i.indexOf(".")>=0&&n>t){for(var a=n-t;a>0&&"0"===i.charAt(i.length-1);)i=i.slice(0,-1),a--;"."===i.charAt(i.length-1)&&(i=i.slice(0,-1))}return i}function _(e,t,n,r){var i,o=Number.prototype.toFixed.call(e,r),s=o.split(".")[0].length,a=r-n,l=(i=o.indexOf("e"))>-1?o.slice(i+1):0;for(l&&(o=o.slice(0,i).replace(".",""),o+=te.call(Array(l-(o.length-1)+1),"0")+"."+te.call(Array(r+1),"0"),s=o.length);a>0&&"0"===o.slice(-1);)o=o.slice(0,-1),a--;if("."===o.slice(-1)&&(o=o.slice(0,-1)),t>s)var c=te.call(Array(t-s+1),"0");return(c?c:"")+o}function T(){var e=arguments[0],t=arguments[1];return this&&this!==W?k(K(this),e,t):new W.DateTimeFormat(e,t)}function k(e,t,n){var r=R(e),o=O();if(r["[[initializedIntlObject]]"]===!0)throw new TypeError("`this` object has already been initialized as an Intl object");Y(e,"__getInternalProperties",{value:function(){return arguments[0]===oe?r:void 0}}),r["[[initializedIntlObject]]"]=!0;var s=i(t),n=x(n,"any","date"),a=new L;_=h(n,"localeMatcher","string",new I("lookup","best fit"),"best fit"),a["[[localeMatcher]]"]=_;var c=ie.DateTimeFormat,u=c["[[localeData]]"],p=l(c["[[availableLocales]]"],s,a,c["[[relevantExtensionKeys]]"],u);r["[[locale]]"]=p["[[locale]]"],r["[[calendar]]"]=p["[[ca]]"],r["[[numberingSystem]]"]=p["[[nu]]"],r["[[dataLocale]]"]=p["[[dataLocale]]"];var m=p["[[dataLocale]]"],d=n.timeZone;if(void 0!==d&&(d=F(d),"UTC"!==d))throw new RangeError("timeZone is not supported.");r["[[timeZone]]"]=d,a=new L;for(var f in de)if($.call(de,f)){var g=h(n,f,"string",de[f]);a["[["+f+"]]"]=g}var v,y=u[m],b=y.formats,_=h(n,"formatMatcher","string",new I("basic","best fit"),"best fit");v="basic"===_?w(a,b):P(a,b);for(var f in de)if($.call(de,f)&&$.call(v,f)){var T=v[f];r["[["+f+"]]"]=T}var k,E=h(n,"hour12","boolean");if(r["[[hour]]"])if(E=void 0===E?y.hour12:E,r["[[hour12]]"]=E,E===!0){var S=y.hourNo0;r["[[hourNo0]]"]=S,k=v.pattern12}else k=v.pattern;else k=v.pattern;return r["[[pattern]]"]=k,r["[[boundFormat]]"]=void 0,r["[[initializedDateTimeFormat]]"]=!0,J&&(e.format=N.call(e)),o.exp.test(o.input),e}function x(e,t,n){if(void 0===e)e=null;else{var r=K(e);e=new L;for(var i in r)e[i]=r[i]}var o=Z,e=o(e),s=!0;return("date"===t||"any"===t)&&(void 0!==e.weekday||void 0!==e.year||void 0!==e.month||void 0!==e.day)&&(s=!1),("time"===t||"any"===t)&&(void 0!==e.hour||void 0!==e.minute||void 0!==e.second)&&(s=!1),!s||"date"!==n&&"all"!==n||(e.year=e.month=e.day="numeric"),!s||"time"!==n&&"all"!==n||(e.hour=e.minute=e.second="numeric"),e}function w(e,t){return E(e,t)}function E(e,t,n){for(var r,i=8,o=120,s=20,a=8,l=6,c=6,u=3,p=-(1/0),h=0,m=t.length;m>h;){var d=t[h],f=0;for(var g in de)if($.call(de,g)){var v=e["[["+g+"]]"],y=$.call(d,g)?d[g]:void 0;if(void 0===v&&void 0!==y)f-=s;else if(void 0!==v&&void 0===y)f-=o;else{var b=["2-digit","numeric","narrow","short","long"],_=X.call(b,v),T=X.call(b,y),k=Math.max(Math.min(T-_,2),-2);!n||("numeric"!==v&&"2-digit"!==v||"numeric"===y||"2-digit"===y)&&("numeric"===v||"2-digit"===v||"2-digit"!==y&&"numeric"!==y)||(f-=i),2===k?f-=l:1===k?f-=u:-1===k?f-=c:-2===k&&(f-=a)}}f>p&&(p=f,r=d),h++}return r}function P(e,t){return E(e,t,!0)}function N(){var e=null!=this&&"object"==typeof this&&R(this);if(!e||!e["[[initializedDateTimeFormat]]"])throw new TypeError("`this` value for format() is not an initialized Intl.DateTimeFormat object.");if(void 0===e["[[boundFormat]]"]){var t=function(){var e=Number(0===arguments.length?Date.now():arguments[0]);return S(this,e)},n=re.call(t,this);e["[[boundFormat]]"]=n}return e["[[boundFormat]]"]}function S(e,t){if(!isFinite(t))throw new RangeError("Invalid valid date passed to format");var n=e.__getInternalProperties(oe),r=O(),i=n["[[locale]]"],o=new W.NumberFormat([i],{useGrouping:!1}),s=new W.NumberFormat([i],{minimumIntegerDigits:2,useGrouping:!1}),a=C(t,n["[[calendar]]"],n["[[timeZone]]"]),l=n["[[pattern]]"],c=n["[[dataLocale]]"],u=ie.DateTimeFormat["[[localeData]]"][c].calendars,p=n["[[calendar]]"];for(var h in de)if($.call(n,"[["+h+"]]")){var m,d,f=n["[["+h+"]]"],g=a["[["+h+"]]"];if("year"===h&&0>=g?g=1-g:"month"===h?g++:"hour"===h&&n["[[hour12]]"]===!0&&(g%=12,m=g!==a["[["+h+"]]"],0===g&&n["[[hourNo0]]"]===!0&&(g=12)),"numeric"===f)d=y(o,g);else if("2-digit"===f)d=y(s,g),d.length>2&&(d=d.slice(-2));else if(f in se)switch(h){case"month":d=D(u,p,"months",f,a["[["+h+"]]"]);break;case"weekday":try{d=D(u,p,"days",f,a["[["+h+"]]"])}catch(v){throw new Error("Could not find weekday data for locale "+i)}break;case"timeZoneName":d="";break;default:d=a["[["+h+"]]"]}l=l.replace("{"+h+"}",d)}return n["[[hour12]]"]===!0&&(d=D(u,p,"dayPeriods",m?"pm":"am"),l=l.replace("{ampm}",d)),r.exp.test(r.input),l}function C(e,t,n){var r=new Date(e),i="get"+(n||"");return new L({"[[weekday]]":r[i+"Day"](),"[[era]]":+(r[i+"FullYear"]()>=0),"[[year]]":r[i+"FullYear"](),"[[month]]":r[i+"Month"](),"[[day]]":r[i+"Date"](),"[[hour]]":r[i+"Hours"](),"[[minute]]":r[i+"Minutes"](),"[[second]]":r[i+"Seconds"](),"[[inDST]]":!1})}function M(e,t){if(!e.number)throw new Error("Object passed doesn't contain locale data for Intl.NumberFormat");var n,r=[t],i=t.split("-");for(i.length>2&&4==i[1].length&&ee.call(r,i[0]+"-"+i[2]);n=ne.call(r);)ee.call(ie.NumberFormat["[[availableLocales]]"],n),ie.NumberFormat["[[localeData]]"][n]=e.number,e.date&&(e.date.nu=e.number.nu,ee.call(ie.DateTimeFormat["[[availableLocales]]"],n),ie.DateTimeFormat["[[localeData]]"][n]=e.date);void 0===B&&(B=t),ae||(f(W.NumberFormat.prototype),ae=!0),e.date&&!le&&(k(W.DateTimeFormat.prototype),le=!0)}function j(e){if("function"==typeof Math.log10)return Math.floor(Math.log10(e));var t=Math.round(Math.log(e)*Math.LOG10E);return t-(Number("1e"+t)>e)}function A(e){if(!$.call(this,"[[availableLocales]]"))throw new TypeError("supportedLocalesOf() is not a constructor");var t=O(),n=arguments[1],r=this["[[availableLocales]]"],o=i(e);return t.exp.test(t.input),p(r,o,n)}function D(e,t,n,r,i){var o=e[t]&&e[t][n]?e[t][n]:e.gregory[n],s={narrow:["short","long"],"short":["long","narrow"],"long":["short","narrow"]},a=$.call(o,r)?o[r]:$.call(o,s[r][0])?o[s[r][0]]:o[s[r][1]];return null!=i?a[i]:a}function L(e){for(var t in e)(e instanceof L||$.call(e,t))&&Y(this,t,{value:e[t],enumerable:!0,writable:!0,configurable:!0})}function I(){Y(this,"length",{writable:!0,value:0}),arguments.length&&ee.apply(this,V.call(arguments))}function O(){for(var e=/[.?*+^$[\]\\(){}|-]/g,t=RegExp.lastMatch,n=RegExp.multiline?"m":"",r={input:RegExp.input},i=new I,o=!1,s={},a=1;9>=a;a++)o=(s["$"+a]=RegExp["$"+a])||o;if(t=t.replace(e,"\\$&"),o)for(var a=1;9>=a;a++){var l=s["$"+a];l?(l=l.replace(e,"\\$&"),t=t.replace(l,"("+l+")")):t="()"+t,ee.call(i,t.slice(0,t.indexOf("(")+1)),t=t.slice(t.indexOf("(")+1)}return r.exp=new RegExp(te.call(i,"")+t,n),r}function F(e){for(var t=e.length;t--;){var n=e.charAt(t);n>="a"&&"z">=n&&(e=e.slice(0,t)+n.toUpperCase()+e.slice(t+1))}return e}function K(e){if(null==e)throw new TypeError("Cannot convert null or undefined to object");return Object(e)}function R(e){return $.call(e,"__getInternalProperties")?e.__getInternalProperties(oe):Z(null)}var B,z,H,G,U,W={},q=function(){try{return!!Object.defineProperty({},"a",{})}catch(e){return!1}}(),J=!q&&!Object.prototype.__defineGetter__,$=Object.prototype.hasOwnProperty,Y=q?Object.defineProperty:function(e,t,n){"get"in n&&e.__defineGetter__?e.__defineGetter__(t,n.get):(!$.call(e,t)||"value"in n)&&(e[t]=n.value)},X=Array.prototype.indexOf||function(e){var t=this;if(!t.length)return-1;for(var n=arguments[1]||0,r=t.length;r>n;n++)if(t[n]===e)return n;return-1},Z=Object.create||function(e,t){function n(){}var r;n.prototype=e,r=new n;for(var i in t)$.call(t,i)&&Y(r,i,t[i]);return r},V=Array.prototype.slice,Q=Array.prototype.concat,ee=Array.prototype.push,te=Array.prototype.join,ne=Array.prototype.shift,re=(Array.prototype.unshift,Function.prototype.bind||function(e){var t=this,n=V.call(arguments,1);return 1===t.length?function(r){return t.apply(e,Q.call(n,V.call(arguments)))}:function(){return t.apply(e,Q.call(n,V.call(arguments)))}}),ie=Z(null),oe=Math.random(),se=Z(null,{narrow:{},"short":{},"long":{}}),ae=!1,le=!1,ce=/^[A-Z]{3}$/,ue=/-u(?:-[0-9a-z]{2,8})+/gi,pe={tags:{"art-lojban":"jbo","i-ami":"ami","i-bnn":"bnn","i-hak":"hak","i-klingon":"tlh","i-lux":"lb","i-navajo":"nv","i-pwn":"pwn","i-tao":"tao","i-tay":"tay","i-tsu":"tsu","no-bok":"nb","no-nyn":"nn","sgn-BE-FR":"sfb","sgn-BE-NL":"vgt","sgn-CH-DE":"sgg","zh-guoyu":"cmn","zh-hakka":"hak","zh-min-nan":"nan","zh-xiang":"hsn","sgn-BR":"bzs","sgn-CO":"csn","sgn-DE":"gsg","sgn-DK":"dsl","sgn-ES":"ssp","sgn-FR":"fsl","sgn-GB":"bfi","sgn-GR":"gss","sgn-IE":"isg","sgn-IT":"ise","sgn-JP":"jsl","sgn-MX":"mfs","sgn-NI":"ncs","sgn-NL":"dse","sgn-NO":"nsl","sgn-PT":"psr","sgn-SE":"swl","sgn-US":"ase","sgn-ZA":"sfs","zh-cmn":"cmn","zh-cmn-Hans":"cmn-Hans","zh-cmn-Hant":"cmn-Hant","zh-gan":"gan","zh-wuu":"wuu","zh-yue":"yue"},subtags:{BU:"MM",DD:"DE",FX:"FR",TP:"TL",YD:"YE",ZR:"CD",heploc:"alalc97","in":"id",iw:"he",ji:"yi",jw:"jv",mo:"ro",ayx:"nun",bjd:"drl",ccq:"rki",cjr:"mom",cka:"cmr",cmk:"xch",drh:"khk",drw:"prs",gav:"dev",hrr:"jal",ibi:"opa",kgh:"kml",lcq:"ppr",mst:"mry",myt:"mry",sca:"hle",tie:"ras",tkk:"twm",tlw:"weo",tnf:"prs",ybd:"rki",yma:"lrr"},extLang:{aao:["aao","ar"],abh:["abh","ar"],abv:["abv","ar"],acm:["acm","ar"],acq:["acq","ar"],acw:["acw","ar"],acx:["acx","ar"],acy:["acy","ar"],adf:["adf","ar"],ads:["ads","sgn"],aeb:["aeb","ar"],aec:["aec","ar"],aed:["aed","sgn"],aen:["aen","sgn"],afb:["afb","ar"],afg:["afg","sgn"],ajp:["ajp","ar"],apc:["apc","ar"],apd:["apd","ar"],arb:["arb","ar"],arq:["arq","ar"],ars:["ars","ar"],ary:["ary","ar"],arz:["arz","ar"],ase:["ase","sgn"],asf:["asf","sgn"],asp:["asp","sgn"],asq:["asq","sgn"],asw:["asw","sgn"],auz:["auz","ar"],avl:["avl","ar"],ayh:["ayh","ar"],ayl:["ayl","ar"],ayn:["ayn","ar"],ayp:["ayp","ar"],bbz:["bbz","ar"],bfi:["bfi","sgn"],bfk:["bfk","sgn"],bjn:["bjn","ms"],bog:["bog","sgn"],bqn:["bqn","sgn"],bqy:["bqy","sgn"],btj:["btj","ms"],bve:["bve","ms"],bvl:["bvl","sgn"],bvu:["bvu","ms"],bzs:["bzs","sgn"],cdo:["cdo","zh"],cds:["cds","sgn"],cjy:["cjy","zh"],cmn:["cmn","zh"],coa:["coa","ms"],cpx:["cpx","zh"],csc:["csc","sgn"],csd:["csd","sgn"],cse:["cse","sgn"],csf:["csf","sgn"],csg:["csg","sgn"],csl:["csl","sgn"],csn:["csn","sgn"],csq:["csq","sgn"],csr:["csr","sgn"],czh:["czh","zh"],czo:["czo","zh"],doq:["doq","sgn"],dse:["dse","sgn"],dsl:["dsl","sgn"],dup:["dup","ms"],ecs:["ecs","sgn"],esl:["esl","sgn"],esn:["esn","sgn"],eso:["eso","sgn"],eth:["eth","sgn"],fcs:["fcs","sgn"],fse:["fse","sgn"],fsl:["fsl","sgn"],fss:["fss","sgn"],gan:["gan","zh"],gds:["gds","sgn"],gom:["gom","kok"],gse:["gse","sgn"],gsg:["gsg","sgn"],gsm:["gsm","sgn"],gss:["gss","sgn"],gus:["gus","sgn"],hab:["hab","sgn"],haf:["haf","sgn"],hak:["hak","zh"],hds:["hds","sgn"],hji:["hji","ms"],hks:["hks","sgn"],hos:["hos","sgn"],hps:["hps","sgn"],hsh:["hsh","sgn"],hsl:["hsl","sgn"],hsn:["hsn","zh"],icl:["icl","sgn"],ils:["ils","sgn"],inl:["inl","sgn"],ins:["ins","sgn"],ise:["ise","sgn"],isg:["isg","sgn"],isr:["isr","sgn"],jak:["jak","ms"],jax:["jax","ms"],jcs:["jcs","sgn"],jhs:["jhs","sgn"],jls:["jls","sgn"],jos:["jos","sgn"],jsl:["jsl","sgn"],jus:["jus","sgn"],kgi:["kgi","sgn"],knn:["knn","kok"],kvb:["kvb","ms"],kvk:["kvk","sgn"],kvr:["kvr","ms"],kxd:["kxd","ms"],lbs:["lbs","sgn"],lce:["lce","ms"],lcf:["lcf","ms"],liw:["liw","ms"],lls:["lls","sgn"],lsg:["lsg","sgn"],lsl:["lsl","sgn"],lso:["lso","sgn"],lsp:["lsp","sgn"],lst:["lst","sgn"],lsy:["lsy","sgn"],ltg:["ltg","lv"],lvs:["lvs","lv"],lzh:["lzh","zh"],max:["max","ms"],mdl:["mdl","sgn"],meo:["meo","ms"],mfa:["mfa","ms"],mfb:["mfb","ms"],mfs:["mfs","sgn"],min:["min","ms"],mnp:["mnp","zh"],mqg:["mqg","ms"],mre:["mre","sgn"],msd:["msd","sgn"],msi:["msi","ms"],msr:["msr","sgn"],mui:["mui","ms"],mzc:["mzc","sgn"],mzg:["mzg","sgn"],mzy:["mzy","sgn"],nan:["nan","zh"],nbs:["nbs","sgn"],ncs:["ncs","sgn"],nsi:["nsi","sgn"],nsl:["nsl","sgn"],nsp:["nsp","sgn"],nsr:["nsr","sgn"],nzs:["nzs","sgn"],okl:["okl","sgn"],orn:["orn","ms"],ors:["ors","ms"],pel:["pel","ms"],pga:["pga","ar"],pks:["pks","sgn"],prl:["prl","sgn"],prz:["prz","sgn"],psc:["psc","sgn"],psd:["psd","sgn"],pse:["pse","ms"],psg:["psg","sgn"],psl:["psl","sgn"],pso:["pso","sgn"],psp:["psp","sgn"],psr:["psr","sgn"],pys:["pys","sgn"],rms:["rms","sgn"],rsi:["rsi","sgn"],rsl:["rsl","sgn"],sdl:["sdl","sgn"],sfb:["sfb","sgn"],sfs:["sfs","sgn"],sgg:["sgg","sgn"],sgx:["sgx","sgn"],shu:["shu","ar"],slf:["slf","sgn"],sls:["sls","sgn"],sqk:["sqk","sgn"],sqs:["sqs","sgn"],ssh:["ssh","ar"],ssp:["ssp","sgn"],ssr:["ssr","sgn"],svk:["svk","sgn"],swc:["swc","sw"],swh:["swh","sw"],swl:["swl","sgn"],syy:["syy","sgn"],tmw:["tmw","ms"],tse:["tse","sgn"],tsm:["tsm","sgn"],tsq:["tsq","sgn"],tss:["tss","sgn"],tsy:["tsy","sgn"],tza:["tza","sgn"],ugn:["ugn","sgn"],ugy:["ugy","sgn"],ukl:["ukl","sgn"],uks:["uks","sgn"],urk:["urk","ms"],uzn:["uzn","uz"],uzs:["uzs","uz"],vgt:["vgt","sgn"],vkk:["vkk","ms"],vkt:["vkt","ms"],vsi:["vsi","sgn"],vsl:["vsl","sgn"],vsv:["vsv","sgn"],wuu:["wuu","zh"],xki:["xki","sgn"],xml:["xml","sgn"],xmm:["xmm","ms"],xms:["xms","sgn"],yds:["yds","sgn"],ysl:["ysl","sgn"],yue:["yue","zh"],zib:["zib","sgn"],zlm:["zlm","ms"],zmi:["zmi","ms"],zsl:["zsl","sgn"],zsm:["zsm","ms"]}},he={BHD:3,BYR:0,XOF:0,BIF:0,XAF:0,CLF:0,CLP:0,KMF:0,DJF:0,XPF:0,GNF:0,ISK:0,IQD:3,JPY:0,JOD:3,KRW:0,KWD:3,LYD:3,OMR:3,PYG:0,RWF:0,TND:3,UGX:0,UYI:0,VUV:0,VND:0};!function(){var e="[a-z]{3}(?:-[a-z]{3}){0,2}",t="(?:[a-z]{2,3}(?:-"+e+")?|[a-z]{4}|[a-z]{5,8})",n="[a-z]{4}",r="(?:[a-z]{2}|\\d{3})",i="(?:[a-z0-9]{5,8}|\\d[a-z0-9]{3})",o="[0-9a-wy-z]",s=o+"(?:-[a-z0-9]{2,8})+",a="x(?:-[a-z0-9]{1,8})+",l="(?:en-GB-oed|i-(?:ami|bnn|default|enochian|hak|klingon|lux|mingo|navajo|pwn|tao|tay|tsu)|sgn-(?:BE-FR|BE-NL|CH-DE))",c="(?:art-lojban|cel-gaulish|no-bok|no-nyn|zh-(?:guoyu|hakka|min|min-nan|xiang))",u="(?:"+l+"|"+c+")",p=t+"(?:-"+n+")?(?:-"+r+")?(?:-"+i+")*(?:-"+s+")*(?:-"+a+")?";z=RegExp("^(?:"+p+"|"+a+"|"+u+")$","i"),G=RegExp("^(?!x).*?-("+i+")-(?:\\w{4,8}-(?!x-))*\\1\\b","i"),U=RegExp("^(?!x).*?-("+o+")-(?:\\w+-(?!x-))*\\1\\b","i"),H=RegExp("-"+s,"ig")}(),Y(W,"NumberFormat",{configurable:!0,writable:!0,value:d}),Y(W.NumberFormat,"prototype",{writable:!1}),ie.NumberFormat={"[[availableLocales]]":[],"[[relevantExtensionKeys]]":["nu"],"[[localeData]]":{}},Y(W.NumberFormat,"supportedLocalesOf",{configurable:!0,writable:!0,value:re.call(A,ie.NumberFormat)}),Y(W.NumberFormat.prototype,"format",{configurable:!0,get:v});var me={arab:["٠","١","٢","٣","٤","٥","٦","٧","٨","٩"],arabext:["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],bali:["᭐","᭑","᭒","᭓","᭔","᭕","᭖","᭗","᭘","᭙"],beng:["০","১","২","৩","৪","৫","৬","৭","৮","৯"],deva:["०","१","२","३","४","५","६","७","८","९"],fullwide:["0","1","2","3","4","5","6","7","8","9"],gujr:["૦","૧","૨","૩","૪","૫","૬","૭","૮","૯"],guru:["੦","੧","੨","੩","੪","੫","੬","੭","੮","੯"],hanidec:["〇","一","二","三","四","五","六","七","八","九"],khmr:["០","១","២","៣","៤","៥","៦","៧","៨","៩"],knda:["೦","೧","೨","೩","೪","೫","೬","೭","೮","೯"],laoo:["໐","໑","໒","໓","໔","໕","໖","໗","໘","໙"],latn:["0","1","2","3","4","5","6","7","8","9"],limb:["᥆","᥇","᥈","᥉","᥊","᥋","᥌","᥍","᥎","᥏"],mlym:["൦","൧","൨","൩","൪","൫","൬","൭","൮","൯"],mong:["᠐","᠑","᠒","᠓","᠔","᠕","᠖","᠗","᠘","᠙"],mymr:["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],orya:["୦","୧","୨","୩","୪","୫","୬","୭","୮","୯"],tamldec:["௦","௧","௨","௩","௪","௫","௬","௭","௮","௯"],telu:["౦","౧","౨","౩","౪","౫","౬","౭","౮","౯"],thai:["๐","๑","๒","๓","๔","๕","๖","๗","๘","๙"],tibt:["༠","༡","༢","༣","༤","༥","༦","༧","༨","༩"]};Y(W.NumberFormat.prototype,"resolvedOptions",{configurable:!0,writable:!0,value:function(){var e,t=new L,n=["locale","numberingSystem","style","currency","currencyDisplay","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","useGrouping"],r=null!=this&&"object"==typeof this&&R(this);if(!r||!r["[[initializedNumberFormat]]"])throw new TypeError("`this` value for resolvedOptions() is not an initialized Intl.NumberFormat object.");for(var i=0,o=n.length;o>i;i++)$.call(r,e="[["+n[i]+"]]")&&(t[n[i]]={value:r[e],writable:!0,configurable:!0,enumerable:!0});return Z({},t)}}),Y(W,"DateTimeFormat",{configurable:!0,writable:!0,value:T}),Y(T,"prototype",{writable:!1});var de={weekday:["narrow","short","long"],era:["narrow","short","long"],year:["2-digit","numeric"],month:["2-digit","numeric","narrow","short","long"],day:["2-digit","numeric"],hour:["2-digit","numeric"],minute:["2-digit","numeric"],second:["2-digit","numeric"],timeZoneName:["short","long"]};ie.DateTimeFormat={"[[availableLocales]]":[],"[[relevantExtensionKeys]]":["ca","nu"],"[[localeData]]":{}},Y(W.DateTimeFormat,"supportedLocalesOf",{configurable:!0,writable:!0,value:re.call(A,ie.DateTimeFormat)}),Y(W.DateTimeFormat.prototype,"format",{configurable:!0,get:N}),Y(W.DateTimeFormat.prototype,"resolvedOptions",{writable:!0,configurable:!0,value:function(){var e,t=new L,n=["locale","calendar","numberingSystem","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName"],r=null!=this&&"object"==typeof this&&R(this);if(!r||!r["[[initializedDateTimeFormat]]"])throw new TypeError("`this` value for resolvedOptions() is not an initialized Intl.DateTimeFormat object.");for(var i=0,o=n.length;o>i;i++)$.call(r,e="[["+n[i]+"]]")&&(t[n[i]]={value:r[e],writable:!0,configurable:!0,enumerable:!0});return Z({},t)}});var fe=W.__localeSensitiveProtos={Number:{},Date:{}};return fe.Number.toLocaleString=function(){if("[object Number]"!==Object.prototype.toString.call(this))throw new TypeError("`this` value must be a number for Number.prototype.toLocaleString()");return y(new d(arguments[0],arguments[1]),this)},fe.Date.toLocaleString=function(){if("[object Date]"!==Object.prototype.toString.call(this))throw new TypeError("`this` value must be a Date instance for Date.prototype.toLocaleString()");var e=+this;if(isNaN(e))return"Invalid Date";var t=arguments[0],n=arguments[1],n=x(n,"any","all"),r=new T(t,n);return S(r,e)},fe.Date.toLocaleDateString=function(){if("[object Date]"!==Object.prototype.toString.call(this))throw new TypeError("`this` value must be a Date instance for Date.prototype.toLocaleDateString()");var e=+this;if(isNaN(e))return"Invalid Date";var t=arguments[0],n=arguments[1],n=x(n,"date","date"),r=new T(t,n);return S(r,e)},fe.Date.toLocaleTimeString=function(){if("[object Date]"!==Object.prototype.toString.call(this))throw new TypeError("`this` value must be a Date instance for Date.prototype.toLocaleTimeString()");var e=+this;if(isNaN(e))return"Invalid Date";var t=arguments[0],n=arguments[1],n=x(n,"time","time"),r=new T(t,n);return S(r,e)},Y(W,"__applyLocaleSensitivePrototypes",{writable:!0,configurable:!0,value:function(){Y(Number.prototype,"toLocaleString",{writable:!0,configurable:!0,value:fe.Number.toLocaleString});for(var e in fe.Date)$.call(fe.Date,e)&&Y(Date.prototype,e,{writable:!0,configurable:!0,value:fe.Date[e]})}}),Y(W,"__addLocaleData",{value:function(t){if(!e(t.locale))throw new Error("Object passed doesn't identify itself with a valid language tag");M(t,t.locale)}}),L.prototype=Z(null),I.prototype=Z(null),W})}).call(t,function(){return this}())},function(e,t){e.exports={locale:"en-US",date:{ca:["gregory","buddhist","chinese","coptic","ethioaa","ethiopic","generic","hebrew","indian","islamic","japanese","persian","roc"],hourNo0:!0,hour12:!0,formats:[{weekday:"long",month:"long",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",pattern:"{weekday}, {month} {day}, {year}, {hour}:{minute}:{second}",pattern12:"{weekday}, {month} {day}, {year}, {hour}:{minute}:{second} {ampm}"},{weekday:"long",month:"long",day:"numeric",year:"numeric",pattern:"{weekday}, {month} {day}, {year}"},{month:"long",day:"numeric",year:"numeric",pattern:"{month} {day}, {year}"},{month:"numeric",day:"numeric",year:"numeric",pattern:"{month}/{day}/{year}"},{month:"numeric",year:"numeric",pattern:"{month}/{year}"},{month:"long",year:"numeric",pattern:"{month} {year}"},{month:"long",day:"numeric",pattern:"{month} {day}"},{month:"numeric",day:"numeric",pattern:"{month}/{day}"},{hour:"numeric",minute:"2-digit",second:"2-digit",pattern:"{hour}:{minute}:{second}",pattern12:"{hour}:{minute}:{second} {ampm}"},{hour:"numeric",minute:"2-digit",pattern:"{hour}:{minute}",pattern12:"{hour}:{minute} {ampm}"}],calendars:{buddhist:{eras:{"short":["BE"]}},chinese:{months:{"short":["Mo1","Mo2","Mo3","Mo4","Mo5","Mo6","Mo7","Mo8","Mo9","Mo10","Mo11","Mo12"],"long":["Month1","Month2","Month3","Month4","Month5","Month6","Month7","Month8","Month9","Month10","Month11","Month12"]}},coptic:{months:{"long":["Tout","Baba","Hator","Kiahk","Toba","Amshir","Baramhat","Baramouda","Bashans","Paona","Epep","Mesra","Nasie"]},eras:{"short":["ERA0","ERA1"]}},ethiopic:{months:{"long":["Meskerem","Tekemt","Hedar","Tahsas","Ter","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehasse","Pagumen"]},eras:{"short":["ERA0","ERA1"]}},ethioaa:{eras:{"short":["ERA0"]}},generic:{months:{"long":["M01","M02","M03","M04","M05","M06","M07","M08","M09","M10","M11","M12"]},eras:{"short":["ERA0","ERA1"]}},gregory:{months:{"short":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"long":["January","February","March","April","May","June","July","August","September","October","November","December"]},days:{narrow:["Su","Mo","Tu","We","Th","Fr","Sa"],"short":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"long":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["B","A"],"short":["BC","AD","BCE","CE"],"long":["Before Christ","Anno Domini","Before Common Era","Common Era"]},dayPeriods:{am:"AM",pm:"PM"}},hebrew:{months:{"long":["Tishri","Heshvan","Kislev","Tevet","Shevat","Adar I","Adar","Nisan","Iyar","Sivan","Tamuz","Av","Elul","Adar II"]},eras:{"short":["AM"]}},indian:{months:{"long":["Chaitra","Vaisakha","Jyaistha","Asadha","Sravana","Bhadra","Asvina","Kartika","Agrahayana","Pausa","Magha","Phalguna"]},eras:{"short":["Saka"]}},islamic:{months:{"short":["Muh.","Saf.","Rab. I","Rab. II","Jum. I","Jum. II","Raj.","Sha.","Ram.","Shaw.","Dhuʻl-Q.","Dhuʻl-H."],"long":["Muharram","Safar","Rabiʻ I","Rabiʻ II","Jumada I","Jumada II","Rajab","Shaʻban","Ramadan","Shawwal","Dhuʻl-Qiʻdah","Dhuʻl-Hijjah"]},eras:{"short":["AH"]}},japanese:{eras:{narrow:["Taika (645-650)","Hakuchi (650-671)","Hakuhō (672-686)","Shuchō (686-701)","Taihō (701-704)","Keiun (704-708)","Wadō (708-715)","Reiki (715-717)","Yōrō (717-724)","Jinki (724-729)","Tempyō (729-749)","Tempyō-kampō (749-749)","Tempyō-shōhō (749-757)","Tempyō-hōji (757-765)","Temphō-jingo (765-767)","Jingo-keiun (767-770)","Hōki (770-780)","Ten-ō (781-782)","Enryaku (782-806)","Daidō (806-810)","Kōnin (810-824)","Tenchō (824-834)","Jōwa (834-848)","Kajō (848-851)","Ninju (851-854)","Saiko (854-857)","Tennan (857-859)","Jōgan (859-877)","Genkei (877-885)","Ninna (885-889)","Kampyō (889-898)","Shōtai (898-901)","Engi (901-923)","Enchō (923-931)","Shōhei (931-938)","Tengyō (938-947)","Tenryaku (947-957)","Tentoku (957-961)","Ōwa (961-964)","Kōhō (964-968)","Anna (968-970)","Tenroku (970-973)","Ten-en (973-976)","Jōgen (976-978)","Tengen (978-983)","Eikan (983-985)","Kanna (985-987)","Ei-en (987-989)","Eiso (989-990)","Shōryaku (990-995)","Chōtoku (995-999)","Chōhō (999-1004)","Kankō (1004-1012)","Chōwa (1012-1017)","Kannin (1017-1021)","Jian (1021-1024)","Manju (1024-1028)","Chōgen (1028-1037)","Chōryaku (1037-1040)","Chōkyū (1040-1044)","Kantoku (1044-1046)","Eishō (1046-1053)","Tengi (1053-1058)","Kōhei (1058-1065)","Jiryaku (1065-1069)","Enkyū (1069-1074)","Shōho (1074-1077)","Shōryaku (1077-1081)","Eiho (1081-1084)","Ōtoku (1084-1087)","Kanji (1087-1094)","Kaho (1094-1096)","Eichō (1096-1097)","Shōtoku (1097-1099)","Kōwa (1099-1104)","Chōji (1104-1106)","Kashō (1106-1108)","Tennin (1108-1110)","Ten-ei (1110-1113)","Eikyū (1113-1118)","Gen-ei (1118-1120)","Hoan (1120-1124)","Tenji (1124-1126)","Daiji (1126-1131)","Tenshō (1131-1132)","Chōshō (1132-1135)","Hoen (1135-1141)","Eiji (1141-1142)","Kōji (1142-1144)","Tenyō (1144-1145)","Kyūan (1145-1151)","Ninpei (1151-1154)","Kyūju (1154-1156)","Hogen (1156-1159)","Heiji (1159-1160)","Eiryaku (1160-1161)","Ōho (1161-1163)","Chōkan (1163-1165)","Eiman (1165-1166)","Nin-an (1166-1169)","Kaō (1169-1171)","Shōan (1171-1175)","Angen (1175-1177)","Jishō (1177-1181)","Yōwa (1181-1182)","Juei (1182-1184)","Genryuku (1184-1185)","Bunji (1185-1190)","Kenkyū (1190-1199)","Shōji (1199-1201)","Kennin (1201-1204)","Genkyū (1204-1206)","Ken-ei (1206-1207)","Shōgen (1207-1211)","Kenryaku (1211-1213)","Kenpō (1213-1219)","Shōkyū (1219-1222)","Jōō (1222-1224)","Gennin (1224-1225)","Karoku (1225-1227)","Antei (1227-1229)","Kanki (1229-1232)","Jōei (1232-1233)","Tempuku (1233-1234)","Bunryaku (1234-1235)","Katei (1235-1238)","Ryakunin (1238-1239)","En-ō (1239-1240)","Ninji (1240-1243)","Kangen (1243-1247)","Hōji (1247-1249)","Kenchō (1249-1256)","Kōgen (1256-1257)","Shōka (1257-1259)","Shōgen (1259-1260)","Bun-ō (1260-1261)","Kōchō (1261-1264)","Bun-ei (1264-1275)","Kenji (1275-1278)","Kōan (1278-1288)","Shōō (1288-1293)","Einin (1293-1299)","Shōan (1299-1302)","Kengen (1302-1303)","Kagen (1303-1306)","Tokuji (1306-1308)","Enkei (1308-1311)","Ōchō (1311-1312)","Shōwa (1312-1317)","Bunpō (1317-1319)","Genō (1319-1321)","Genkyō (1321-1324)","Shōchū (1324-1326)","Kareki (1326-1329)","Gentoku (1329-1331)","Genkō (1331-1334)","Kemmu (1334-1336)","Engen (1336-1340)","Kōkoku (1340-1346)","Shōhei (1346-1370)","Kentoku (1370-1372)","Bunchũ (1372-1375)","Tenju (1375-1379)","Kōryaku (1379-1381)","Kōwa (1381-1384)","Genchũ (1384-1392)","Meitoku (1384-1387)","Kakei (1387-1389)","Kōō (1389-1390)","Meitoku (1390-1394)","Ōei (1394-1428)","Shōchō (1428-1429)","Eikyō (1429-1441)","Kakitsu (1441-1444)","Bun-an (1444-1449)","Hōtoku (1449-1452)","Kyōtoku (1452-1455)","Kōshō (1455-1457)","Chōroku (1457-1460)","Kanshō (1460-1466)","Bunshō (1466-1467)","Ōnin (1467-1469)","Bunmei (1469-1487)","Chōkyō (1487-1489)","Entoku (1489-1492)","Meiō (1492-1501)","Bunki (1501-1504)","Eishō (1504-1521)","Taiei (1521-1528)","Kyōroku (1528-1532)","Tenmon (1532-1555)","Kōji (1555-1558)","Eiroku (1558-1570)","Genki (1570-1573)","Tenshō (1573-1592)","Bunroku (1592-1596)","Keichō (1596-1615)","Genwa (1615-1624)","Kan-ei (1624-1644)","Shōho (1644-1648)","Keian (1648-1652)","Shōō (1652-1655)","Meiryaku (1655-1658)","Manji (1658-1661)","Kanbun (1661-1673)","Enpō (1673-1681)","Tenwa (1681-1684)","Jōkyō (1684-1688)","Genroku (1688-1704)","Hōei (1704-1711)","Shōtoku (1711-1716)","Kyōhō (1716-1736)","Genbun (1736-1741)","Kanpō (1741-1744)","Enkyō (1744-1748)","Kan-en (1748-1751)","Hōryaku (1751-1764)","Meiwa (1764-1772)","An-ei (1772-1781)","Tenmei (1781-1789)","Kansei (1789-1801)","Kyōwa (1801-1804)","Bunka (1804-1818)","Bunsei (1818-1830)","Tenpō (1830-1844)","Kōka (1844-1848)","Kaei (1848-1854)","Ansei (1854-1860)","Man-en (1860-1861)","Bunkyū (1861-1864)","Genji (1864-1865)","Keiō (1865-1868)","M","T","S","H"], +"short":["Taika (645-650)","Hakuchi (650-671)","Hakuhō (672-686)","Shuchō (686-701)","Taihō (701-704)","Keiun (704-708)","Wadō (708-715)","Reiki (715-717)","Yōrō (717-724)","Jinki (724-729)","Tempyō (729-749)","Tempyō-kampō (749-749)","Tempyō-shōhō (749-757)","Tempyō-hōji (757-765)","Temphō-jingo (765-767)","Jingo-keiun (767-770)","Hōki (770-780)","Ten-ō (781-782)","Enryaku (782-806)","Daidō (806-810)","Kōnin (810-824)","Tenchō (824-834)","Jōwa (834-848)","Kajō (848-851)","Ninju (851-854)","Saiko (854-857)","Tennan (857-859)","Jōgan (859-877)","Genkei (877-885)","Ninna (885-889)","Kampyō (889-898)","Shōtai (898-901)","Engi (901-923)","Enchō (923-931)","Shōhei (931-938)","Tengyō (938-947)","Tenryaku (947-957)","Tentoku (957-961)","Ōwa (961-964)","Kōhō (964-968)","Anna (968-970)","Tenroku (970-973)","Ten-en (973-976)","Jōgen (976-978)","Tengen (978-983)","Eikan (983-985)","Kanna (985-987)","Ei-en (987-989)","Eiso (989-990)","Shōryaku (990-995)","Chōtoku (995-999)","Chōhō (999-1004)","Kankō (1004-1012)","Chōwa (1012-1017)","Kannin (1017-1021)","Jian (1021-1024)","Manju (1024-1028)","Chōgen (1028-1037)","Chōryaku (1037-1040)","Chōkyū (1040-1044)","Kantoku (1044-1046)","Eishō (1046-1053)","Tengi (1053-1058)","Kōhei (1058-1065)","Jiryaku (1065-1069)","Enkyū (1069-1074)","Shōho (1074-1077)","Shōryaku (1077-1081)","Eiho (1081-1084)","Ōtoku (1084-1087)","Kanji (1087-1094)","Kaho (1094-1096)","Eichō (1096-1097)","Shōtoku (1097-1099)","Kōwa (1099-1104)","Chōji (1104-1106)","Kashō (1106-1108)","Tennin (1108-1110)","Ten-ei (1110-1113)","Eikyū (1113-1118)","Gen-ei (1118-1120)","Hoan (1120-1124)","Tenji (1124-1126)","Daiji (1126-1131)","Tenshō (1131-1132)","Chōshō (1132-1135)","Hoen (1135-1141)","Eiji (1141-1142)","Kōji (1142-1144)","Tenyō (1144-1145)","Kyūan (1145-1151)","Ninpei (1151-1154)","Kyūju (1154-1156)","Hogen (1156-1159)","Heiji (1159-1160)","Eiryaku (1160-1161)","Ōho (1161-1163)","Chōkan (1163-1165)","Eiman (1165-1166)","Nin-an (1166-1169)","Kaō (1169-1171)","Shōan (1171-1175)","Angen (1175-1177)","Jishō (1177-1181)","Yōwa (1181-1182)","Juei (1182-1184)","Genryuku (1184-1185)","Bunji (1185-1190)","Kenkyū (1190-1199)","Shōji (1199-1201)","Kennin (1201-1204)","Genkyū (1204-1206)","Ken-ei (1206-1207)","Shōgen (1207-1211)","Kenryaku (1211-1213)","Kenpō (1213-1219)","Shōkyū (1219-1222)","Jōō (1222-1224)","Gennin (1224-1225)","Karoku (1225-1227)","Antei (1227-1229)","Kanki (1229-1232)","Jōei (1232-1233)","Tempuku (1233-1234)","Bunryaku (1234-1235)","Katei (1235-1238)","Ryakunin (1238-1239)","En-ō (1239-1240)","Ninji (1240-1243)","Kangen (1243-1247)","Hōji (1247-1249)","Kenchō (1249-1256)","Kōgen (1256-1257)","Shōka (1257-1259)","Shōgen (1259-1260)","Bun-ō (1260-1261)","Kōchō (1261-1264)","Bun-ei (1264-1275)","Kenji (1275-1278)","Kōan (1278-1288)","Shōō (1288-1293)","Einin (1293-1299)","Shōan (1299-1302)","Kengen (1302-1303)","Kagen (1303-1306)","Tokuji (1306-1308)","Enkei (1308-1311)","Ōchō (1311-1312)","Shōwa (1312-1317)","Bunpō (1317-1319)","Genō (1319-1321)","Genkyō (1321-1324)","Shōchū (1324-1326)","Kareki (1326-1329)","Gentoku (1329-1331)","Genkō (1331-1334)","Kemmu (1334-1336)","Engen (1336-1340)","Kōkoku (1340-1346)","Shōhei (1346-1370)","Kentoku (1370-1372)","Bunchū (1372-1375)","Tenju (1375-1379)","Kōryaku (1379-1381)","Kōwa (1381-1384)","Genchū (1384-1392)","Meitoku (1384-1387)","Kakei (1387-1389)","Kōō (1389-1390)","Meitoku (1390-1394)","Ōei (1394-1428)","Shōchō (1428-1429)","Eikyō (1429-1441)","Kakitsu (1441-1444)","Bun-an (1444-1449)","Hōtoku (1449-1452)","Kyōtoku (1452-1455)","Kōshō (1455-1457)","Chōroku (1457-1460)","Kanshō (1460-1466)","Bunshō (1466-1467)","Ōnin (1467-1469)","Bunmei (1469-1487)","Chōkyō (1487-1489)","Entoku (1489-1492)","Meiō (1492-1501)","Bunki (1501-1504)","Eishō (1504-1521)","Taiei (1521-1528)","Kyōroku (1528-1532)","Tenmon (1532-1555)","Kōji (1555-1558)","Eiroku (1558-1570)","Genki (1570-1573)","Tenshō (1573-1592)","Bunroku (1592-1596)","Keichō (1596-1615)","Genwa (1615-1624)","Kan-ei (1624-1644)","Shōho (1644-1648)","Keian (1648-1652)","Shōō (1652-1655)","Meiryaku (1655-1658)","Manji (1658-1661)","Kanbun (1661-1673)","Enpō (1673-1681)","Tenwa (1681-1684)","Jōkyō (1684-1688)","Genroku (1688-1704)","Hōei (1704-1711)","Shōtoku (1711-1716)","Kyōhō (1716-1736)","Genbun (1736-1741)","Kanpō (1741-1744)","Enkyō (1744-1748)","Kan-en (1748-1751)","Hōryaku (1751-1764)","Meiwa (1764-1772)","An-ei (1772-1781)","Tenmei (1781-1789)","Kansei (1789-1801)","Kyōwa (1801-1804)","Bunka (1804-1818)","Bunsei (1818-1830)","Tenpō (1830-1844)","Kōka (1844-1848)","Kaei (1848-1854)","Ansei (1854-1860)","Man-en (1860-1861)","Bunkyū (1861-1864)","Genji (1864-1865)","Keiō (1865-1868)","Meiji","Taishō","Shōwa","Heisei"]}},persian:{months:{"long":["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"]},eras:{"short":["AP"]}},roc:{eras:{"short":["Before R.O.C.","Minguo"]}}}},number:{nu:["latn"],patterns:{decimal:{positivePattern:"{number}",negativePattern:"-{number}"},currency:{positivePattern:"{currency}{number}",negativePattern:"-{currency}{number}"},percent:{positivePattern:"{number}%",negativePattern:"-{number}%"}},symbols:{latn:{decimal:".",group:",",nan:"NaN",percent:"%",infinity:"∞"}},currencies:{AUD:"A$",BRL:"R$",CAD:"CA$",CNY:"CN¥",EUR:"€",GBP:"£",HKD:"HK$",ILS:"₪",INR:"₹",JPY:"¥",KRW:"₩",MXN:"MX$",NZD:"NZ$",THB:"฿",TWD:"NT$",USD:"$",VND:"₫",XAF:"FCFA",XCD:"EC$",XOF:"CFA",XPF:"CFPF"}}}},function(e,t){e.exports={locale:"pt-BR",date:{ca:["gregory","buddhist","chinese","coptic","ethioaa","ethiopic","generic","hebrew","indian","islamic","japanese","persian","roc"],hourNo0:!0,hour12:!1,formats:[{weekday:"long",day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",pattern:"{weekday}, {day} de {month} de {year} {hour}:{minute}:{second}",pattern12:"{weekday}, {day} de {month} de {year} {hour}:{minute}:{second} {ampm}"},{weekday:"long",day:"numeric",month:"long",year:"numeric",pattern:"{weekday}, {day} de {month} de {year}"},{day:"numeric",month:"long",year:"numeric",pattern:"{day} de {month} de {year}"},{day:"2-digit",month:"2-digit",year:"numeric",pattern:"{day}/{month}/{year}"},{month:"2-digit",year:"numeric",pattern:"{month}/{year}"},{month:"long",year:"numeric",pattern:"{month} de {year}"},{day:"numeric",month:"long",pattern:"{day} de {month}"},{day:"numeric",month:"numeric",pattern:"{day}/{month}"},{hour:"numeric",minute:"2-digit",second:"2-digit",pattern:"{hour}:{minute}:{second}",pattern12:"{hour}:{minute}:{second} {ampm}"},{hour:"numeric",minute:"2-digit",pattern:"{hour}:{minute}",pattern12:"{hour}:{minute} {ampm}"}],calendars:{buddhist:{eras:{"short":["BE"]}},chinese:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],"short":["1","2","3","4","5","6","7","8","9","10","11","12"],"long":["Mês 1","Mês 2","Mês 3","Mês 4","Mês 5","Mês 6","Mês 7","Mês 8","Mês 9","Mês 10","Mês 11","Mês 12"]}},coptic:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12","13"],"short":["Tout","Baba","Hator","Kiahk","Toba","Amshir","Baramhat","Baramouda","Bashans","Paona","Epep","Mesra","Nasie"],"long":["Tout","Baba","Hator","Kiahk","Toba","Amshir","Baramhat","Baramouda","Bashans","Paona","Epep","Mesra","Nasie"]},eras:{"short":["ERA0","ERA1"]}},ethiopic:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12","13"],"short":["Meskerem","Tekemt","Hedar","Tahsas","Ter","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehasse","Pagumen"],"long":["Meskerem","Tekemt","Hedar","Tahsas","Ter","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehasse","Pagumen"]},eras:{"short":["ERA0","ERA1"]}},ethioaa:{eras:{"short":["ERA0"]}},generic:{months:{"long":["M01","M02","M03","M04","M05","M06","M07","M08","M09","M10","M11","M12"]},eras:{"short":["ERA0","ERA1"]}},gregory:{months:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],"short":["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],"long":["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},days:{narrow:["dom","seg","ter","qua","qui","sex","sáb"],"short":["dom","seg","ter","qua","qui","sex","sáb"],"long":["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},eras:{"short":["a.C.","d.C."],"long":["Antes de Cristo","Ano do Senhor"]},dayPeriods:{am:"AM",pm:"PM"}},hebrew:{months:{"short":["Tishri","Heshvan","Kislev","Tevet","Shevat","Adar I","Adar","Nisan","Iyar","Sivan","Tamuz","Av","Elul","Adar II"],"long":["Tishri","Heshvan","Kislev","Tevet","Shevat","Adar I","Adar","Nisan","Iyar","Sivan","Tamuz","Av","Elul","Adar II"]},eras:{"short":["AM"]}},indian:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],"short":["Chaitra","Vaisakha","Jyaistha","Asadha","Sravana","Bhadra","Asvina","Kartika","Agrahayana","Pausa","Magha","Phalguna"],"long":["Chaitra","Vaisakha","Jyaistha","Asadha","Sravana","Bhadra","Asvina","Kartika","Agrahayana","Pausa","Magha","Phalguna"]},eras:{"short":["Saka"]}},islamic:{months:{"short":["Muh.","Saf.","Rab. I","Rab. II","Jum. I","Jum. II","Raj.","Sha.","Ram.","Shaw.","Dhuʻl-Q.","Dhuʻl-H."],"long":["Muharram","Safar","Rabiʻ I","Rabiʻ II","Jumada I","Jumada II","Rajab","Shaʻban","Ramadan","Shawwal","Dhuʻl-Qiʻdah","Dhuʻl-Hijjah"]},eras:{"short":["AH"]}},japanese:{eras:{narrow:["Taika (645-650)","Hakuchi (650-671)","Hakuhō (672-686)","Shuchō (686-701)","Taihō (701-704)","Keiun (704-708)","Wadō (708-715)","Reiki (715-717)","Yōrō (717-724)","Jinki (724-729)","Tempyō (729-749)","Tempyō-kampō (749-749)","Tempyō-shōhō (749-757)","Tempyō-hōji (757-765)","Temphō-jingo (765-767)","Jingo-keiun (767-770)","Hōki (770-780)","Ten-ō (781-782)","Enryaku (782-806)","Daidō (806-810)","Kōnin (810-824)","Tenchō (824-834)","Jōwa (834-848)","Kajō (848-851)","Ninju (851-854)","Saiko (854-857)","Tennan (857-859)","Jōgan (859-877)","Genkei (877-885)","Ninna (885-889)","Kampyō (889-898)","Shōtai (898-901)","Engi (901-923)","Enchō (923-931)","Shōhei (931-938)","Tengyō (938-947)","Tenryaku (947-957)","Tentoku (957-961)","Ōwa (961-964)","Kōhō (964-968)","Anna (968-970)","Tenroku (970-973)","Ten-en (973-976)","Jōgen (976-978)","Tengen (978-983)","Eikan (983-985)","Kanna (985-987)","Ei-en (987-989)","Eiso (989-990)","Shōryaku (990-995)","Chōtoku (995-999)","Chōhō (999-1004)","Kankō (1004-1012)","Chōwa (1012-1017)","Kannin (1017-1021)","Jian (1021-1024)","Manju (1024-1028)","Chōgen (1028-1037)","Chōryaku (1037-1040)","Chōkyū (1040-1044)","Kantoku (1044-1046)","Eishō (1046-1053)","Tengi (1053-1058)","Kōhei (1058-1065)","Jiryaku (1065-1069)","Enkyū (1069-1074)","Shōho (1074-1077)","Shōryaku (1077-1081)","Eiho (1081-1084)","Ōtoku (1084-1087)","Kanji (1087-1094)","Kaho (1094-1096)","Eichō (1096-1097)","Shōtoku (1097-1099)","Kōwa (1099-1104)","Chōji (1104-1106)","Kashō (1106-1108)","Tennin (1108-1110)","Ten-ei (1110-1113)","Eikyū (1113-1118)","Gen-ei (1118-1120)","Hoan (1120-1124)","Tenji (1124-1126)","Daiji (1126-1131)","Tenshō (1131-1132)","Chōshō (1132-1135)","Hoen (1135-1141)","Eiji (1141-1142)","Kōji (1142-1144)","Tenyō (1144-1145)","Kyūan (1145-1151)","Ninpei (1151-1154)","Kyūju (1154-1156)","Hogen (1156-1159)","Heiji (1159-1160)","Eiryaku (1160-1161)","Ōho (1161-1163)","Chōkan (1163-1165)","Eiman (1165-1166)","Nin-an (1166-1169)","Kaō (1169-1171)","Shōan (1171-1175)","Angen (1175-1177)","Jishō (1177-1181)","Yōwa (1181-1182)","Juei (1182-1184)","Genryuku (1184-1185)","Bunji (1185-1190)","Kenkyū (1190-1199)","Shōji (1199-1201)","Kennin (1201-1204)","Genkyū (1204-1206)","Ken-ei (1206-1207)","Shōgen (1207-1211)","Kenryaku (1211-1213)","Kenpō (1213-1219)","Shōkyū (1219-1222)","Jōō (1222-1224)","Gennin (1224-1225)","Karoku (1225-1227)","Antei (1227-1229)","Kanki (1229-1232)","Jōei (1232-1233)","Tempuku (1233-1234)","Bunryaku (1234-1235)","Katei (1235-1238)","Ryakunin (1238-1239)","En-ō (1239-1240)","Ninji (1240-1243)","Kangen (1243-1247)","Hōji (1247-1249)","Kenchō (1249-1256)","Kōgen (1256-1257)","Shōka (1257-1259)","Shōgen (1259-1260)","Bun-ō (1260-1261)","Kōchō (1261-1264)","Bun-ei (1264-1275)","Kenji (1275-1278)","Kōan (1278-1288)","Shōō (1288-1293)","Einin (1293-1299)","Shōan (1299-1302)","Kengen (1302-1303)","Kagen (1303-1306)","Tokuji (1306-1308)","Enkei (1308-1311)","Ōchō (1311-1312)","Shōwa (1312-1317)","Bunpō (1317-1319)","Genō (1319-1321)","Genkyō (1321-1324)","Shōchū (1324-1326)","Kareki (1326-1329)","Gentoku (1329-1331)","Genkō (1331-1334)","Kemmu (1334-1336)","Engen (1336-1340)","Kōkoku (1340-1346)","Shōhei (1346-1370)","Kentoku (1370-1372)","Bunchũ (1372-1375)","Tenju (1375-1379)","Kōryaku (1379-1381)","Kōwa (1381-1384)","Genchũ (1384-1392)","Meitoku (1384-1387)","Kakei (1387-1389)","Kōō (1389-1390)","Meitoku (1390-1394)","Ōei (1394-1428)","Shōchō (1428-1429)","Eikyō (1429-1441)","Kakitsu (1441-1444)","Bun-an (1444-1449)","Hōtoku (1449-1452)","Kyōtoku (1452-1455)","Kōshō (1455-1457)","Chōroku (1457-1460)","Kanshō (1460-1466)","Bunshō (1466-1467)","Ōnin (1467-1469)","Bunmei (1469-1487)","Chōkyō (1487-1489)","Entoku (1489-1492)","Meiō (1492-1501)","Bunki (1501-1504)","Eishō (1504-1521)","Taiei (1521-1528)","Kyōroku (1528-1532)","Tenmon (1532-1555)","Kōji (1555-1558)","Eiroku (1558-1570)","Genki (1570-1573)","Tenshō (1573-1592)","Bunroku (1592-1596)","Keichō (1596-1615)","Genwa (1615-1624)","Kan-ei (1624-1644)","Shōho (1644-1648)","Keian (1648-1652)","Shōō (1652-1655)","Meiryaku (1655-1658)","Manji (1658-1661)","Kanbun (1661-1673)","Enpō (1673-1681)","Tenwa (1681-1684)","Jōkyō (1684-1688)","Genroku (1688-1704)","Hōei (1704-1711)","Shōtoku (1711-1716)","Kyōhō (1716-1736)","Genbun (1736-1741)","Kanpō (1741-1744)","Enkyō (1744-1748)","Kan-en (1748-1751)","Hōryaku (1751-1764)","Meiwa (1764-1772)","An-ei (1772-1781)","Tenmei (1781-1789)","Kansei (1789-1801)","Kyōwa (1801-1804)","Bunka (1804-1818)","Bunsei (1818-1830)","Tenpō (1830-1844)","Kōka (1844-1848)","Kaei (1848-1854)","Ansei (1854-1860)","Man-en (1860-1861)","Bunkyū (1861-1864)","Genji (1864-1865)","Keiō (1865-1868)","M","T","S","H"],"short":["Taika (645-650)","Hakuchi (650-671)","Hakuhō (672-686)","Shuchō (686-701)","Taihō (701-704)","Keiun (704-708)","Wadō (708-715)","Reiki (715-717)","Yōrō (717-724)","Jinki (724-729)","Tempyō (729-749)","Tempyō-kampō (749-749)","Tempyō-shōhō (749-757)","Tempyō-hōji (757-765)","Temphō-jingo (765-767)","Jingo-keiun (767-770)","Hōki (770-780)","Ten-ō (781-782)","Enryaku (782-806)","Daidō (806-810)","Kōnin (810-824)","Tenchō (824-834)","Jōwa (834-848)","Kajō (848-851)","Ninju (851-854)","Saiko (854-857)","Tennan (857-859)","Jōgan (859-877)","Genkei (877-885)","Ninna (885-889)","Kampyō (889-898)","Shōtai (898-901)","Engi (901-923)","Enchō (923-931)","Shōhei (931-938)","Tengyō (938-947)","Tenryaku (947-957)","Tentoku (957-961)","Ōwa (961-964)","Kōhō (964-968)","Anna (968-970)","Tenroku (970-973)","Ten-en (973-976)","Jōgen (976-978)","Tengen (978-983)","Eikan (983-985)","Kanna (985-987)","Ei-en (987-989)","Eiso (989-990)","Shōryaku (990-995)","Chōtoku (995-999)","Chōhō (999-1004)","Kankō (1004-1012)","Chōwa (1012-1017)","Kannin (1017-1021)","Jian (1021-1024)","Manju (1024-1028)","Chōgen (1028-1037)","Chōryaku (1037-1040)","Chōkyū (1040-1044)","Kantoku (1044-1046)","Eishō (1046-1053)","Tengi (1053-1058)","Kōhei (1058-1065)","Jiryaku (1065-1069)","Enkyū (1069-1074)","Shōho (1074-1077)","Shōryaku (1077-1081)","Eiho (1081-1084)","Ōtoku (1084-1087)","Kanji (1087-1094)","Kaho (1094-1096)","Eichō (1096-1097)","Shōtoku (1097-1099)","Kōwa (1099-1104)","Chōji (1104-1106)","Kashō (1106-1108)","Tennin (1108-1110)","Ten-ei (1110-1113)","Eikyū (1113-1118)","Gen-ei (1118-1120)","Hoan (1120-1124)","Tenji (1124-1126)","Daiji (1126-1131)","Tenshō (1131-1132)","Chōshō (1132-1135)","Hoen (1135-1141)","Eiji (1141-1142)","Kōji (1142-1144)","Tenyō (1144-1145)","Kyūan (1145-1151)","Ninpei (1151-1154)","Kyūju (1154-1156)","Hogen (1156-1159)","Heiji (1159-1160)","Eiryaku (1160-1161)","Ōho (1161-1163)","Chōkan (1163-1165)","Eiman (1165-1166)","Nin-an (1166-1169)","Kaō (1169-1171)","Shōan (1171-1175)","Angen (1175-1177)","Jishō (1177-1181)","Yōwa (1181-1182)","Juei (1182-1184)","Genryuku (1184-1185)","Bunji (1185-1190)","Kenkyū (1190-1199)","Shōji (1199-1201)","Kennin (1201-1204)","Genkyū (1204-1206)","Ken-ei (1206-1207)","Shōgen (1207-1211)","Kenryaku (1211-1213)","Kenpō (1213-1219)","Shōkyū (1219-1222)","Jōō (1222-1224)","Gennin (1224-1225)","Karoku (1225-1227)","Antei (1227-1229)","Kanki (1229-1232)","Jōei (1232-1233)","Tempuku (1233-1234)","Bunryaku (1234-1235)","Katei (1235-1238)","Ryakunin (1238-1239)","En-ō (1239-1240)","Ninji (1240-1243)","Kangen (1243-1247)","Hōji (1247-1249)","Kenchō (1249-1256)","Kōgen (1256-1257)","Shōka (1257-1259)","Shōgen (1259-1260)","Bun-ō (1260-1261)","Kōchō (1261-1264)","Bun-ei (1264-1275)","Kenji (1275-1278)","Kōan (1278-1288)","Shōō (1288-1293)","Einin (1293-1299)","Shōan (1299-1302)","Kengen (1302-1303)","Kagen (1303-1306)","Tokuji (1306-1308)","Enkei (1308-1311)","Ōchō (1311-1312)","Shōwa (1312-1317)","Bunpō (1317-1319)","Genō (1319-1321)","Genkyō (1321-1324)","Shōchū (1324-1326)","Kareki (1326-1329)","Gentoku (1329-1331)","Genkō (1331-1334)","Kemmu (1334-1336)","Engen (1336-1340)","Kōkoku (1340-1346)","Shōhei (1346-1370)","Kentoku (1370-1372)","Bunchū (1372-1375)","Tenju (1375-1379)","Kōryaku (1379-1381)","Kōwa (1381-1384)","Genchū (1384-1392)","Meitoku (1384-1387)","Kakei (1387-1389)","Kōō (1389-1390)","Meitoku (1390-1394)","Ōei (1394-1428)","Shōchō (1428-1429)","Eikyō (1429-1441)","Kakitsu (1441-1444)","Bun-an (1444-1449)","Hōtoku (1449-1452)","Kyōtoku (1452-1455)","Kōshō (1455-1457)","Chōroku (1457-1460)","Kanshō (1460-1466)","Bunshō (1466-1467)","Ōnin (1467-1469)","Bunmei (1469-1487)","Chōkyō (1487-1489)","Entoku (1489-1492)","Meiō (1492-1501)","Bunki (1501-1504)","Eishō (1504-1521)","Taiei (1521-1528)","Kyōroku (1528-1532)","Tenmon (1532-1555)","Kōji (1555-1558)","Eiroku (1558-1570)","Genki (1570-1573)","Tenshō (1573-1592)","Bunroku (1592-1596)","Keichō (1596-1615)","Genwa (1615-1624)","Kan-ei (1624-1644)","Shōho (1644-1648)","Keian (1648-1652)","Shōō (1652-1655)","Meiryaku (1655-1658)","Manji (1658-1661)","Kanbun (1661-1673)","Enpō (1673-1681)","Tenwa (1681-1684)","Jōkyō (1684-1688)","Genroku (1688-1704)","Hōei (1704-1711)","Shōtoku (1711-1716)","Kyōhō (1716-1736)","Genbun (1736-1741)","Kanpō (1741-1744)","Enkyō (1744-1748)","Kan-en (1748-1751)","Hōryaku (1751-1764)","Meiwa (1764-1772)","An-ei (1772-1781)","Tenmei (1781-1789)","Kansei (1789-1801)","Kyōwa (1801-1804)","Bunka (1804-1818)","Bunsei (1818-1830)","Tenpō (1830-1844)","Kōka (1844-1848)","Kaei (1848-1854)","Ansei (1854-1860)","Man-en (1860-1861)","Bunkyū (1861-1864)","Genji (1864-1865)","Keiō (1865-1868)","Meiji","Taishō","Shōwa","Heisei"]}},persian:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],"short":["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],"long":["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"]},eras:{"short":["AP"]}},roc:{eras:{"short":["Antes de R.O.C.","R.O.C."]}}}},number:{nu:["latn"],patterns:{decimal:{positivePattern:"{number}",negativePattern:"-{number}"},currency:{positivePattern:"{currency}{number}",negativePattern:"-{currency}{number}"},percent:{positivePattern:"{number}%",negativePattern:"-{number}%"}},symbols:{latn:{decimal:",",group:".",nan:"NaN",percent:"%",infinity:"∞"}},currencies:{AUD:"AU$",BRL:"R$",CAD:"CA$",CNY:"CN¥",EUR:"€",GBP:"£",HKD:"HK$",ILS:"₪",INR:"₹",JPY:"JP¥",KRW:"₩",MXN:"MX$",NZD:"NZ$",PTE:"Esc.",THB:"฿",TWD:"NT$",USD:"US$",VND:"₫",XAF:"FCFA",XCD:"EC$",XOF:"CFA",XPF:"CFPF"}}}},function(e,t,n){(function(r){"use strict";var i=r.React;r.React=n(2);var o=n(8);if(n(39),t=e.exports=o.IntlMixin,Object.keys(o).forEach(function(e){Object.defineProperty(t,e,{enumerable:!0,value:o[e]})}),i)r.React=i;else try{delete r.React}catch(s){r.React=void 0}}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e){i["default"].__addLocaleData(e),o["default"].__addLocaleData(e)}t.__addLocaleData=r;var i=n(12),o=n(22),s=n(32),a=n(11),l=n(33),c=n(9),u=n(34),p=n(35),h=n(36),m=n(37);r(s["default"]),t.IntlMixin=a["default"],t.FormattedDate=l["default"],t.FormattedTime=c["default"],t.FormattedRelative=u["default"],t.FormattedNumber=p["default"],t.FormattedMessage=h["default"],t.FormattedHTMLMessage=m["default"]},function(e,t,n){"use strict";var r=n(10),i=n(11),o=r["default"].createClass({displayName:"FormattedTime",mixins:[i["default"]],statics:{formatOptions:["localeMatcher","timeZone","hour12","formatMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName"]},propTypes:{format:r["default"].PropTypes.string,value:r["default"].PropTypes.any.isRequired},render:function(){var e=this.props,t=e.value,n=e.format,i=n&&this.getNamedFormat("time",n),s=o.filterFormatOptions(e,i);return r["default"].DOM.span(null,this.formatTime(t,s))}});t["default"]=o},function(e,t){"use strict";t["default"]=React},function(e,t,n){"use strict";function r(e,t){if(!isFinite(e))throw new TypeError(t)}var i=n(10),o=n(12),s=n(22),a=n(29),l={locales:i["default"].PropTypes.oneOfType([i["default"].PropTypes.string,i["default"].PropTypes.array]),formats:i["default"].PropTypes.object,messages:i["default"].PropTypes.object};t["default"]={statics:{filterFormatOptions:function(e,t){return t||(t={}),(this.formatOptions||[]).reduce(function(n,r){return e.hasOwnProperty(r)?n[r]=e[r]:t.hasOwnProperty(r)&&(n[r]=t[r]),n},{})}},propTypes:l,contextTypes:l,childContextTypes:l,getNumberFormat:a["default"](Intl.NumberFormat),getDateTimeFormat:a["default"](Intl.DateTimeFormat),getMessageFormat:a["default"](o["default"]),getRelativeFormat:a["default"](s["default"]),getChildContext:function(){var e=this.context,t=this.props;return{locales:t.locales||e.locales,formats:t.formats||e.formats,messages:t.messages||e.messages}},formatDate:function(e,t){return e=new Date(e),r(e,"A date or timestamp must be provided to formatDate()"),this._format("date",e,t)},formatTime:function(e,t){return e=new Date(e),r(e,"A date or timestamp must be provided to formatTime()"),this._format("time",e,t)},formatRelative:function(e,t,n){return e=new Date(e),r(e,"A date or timestamp must be provided to formatRelative()"),this._format("relative",e,t,n)},formatNumber:function(e,t){return this._format("number",e,t)},formatMessage:function(e,t){var n=this.props.locales||this.context.locales,r=this.props.formats||this.context.formats;return"function"==typeof e?e(t):("string"==typeof e&&(e=this.getMessageFormat(e,n,r)),e.format(t))},getIntlMessage:function(e){var t,n=this.props.messages||this.context.messages,r=e.split(".");try{t=r.reduce(function(e,t){return e[t]},n)}finally{if(void 0===t)throw new ReferenceError("Could not find Intl message: "+e)}return t},getNamedFormat:function(e,t){var n=this.props.formats||this.context.formats,r=null;try{r=n[e][t]}finally{if(!r)throw new ReferenceError("No "+e+" format named: "+t)}return r},_format:function(e,t,n,r){var i=this.props.locales||this.context.locales;switch(n&&"string"==typeof n&&(n=this.getNamedFormat(e,n)),e){case"date":case"time":return this.getDateTimeFormat(i,n).format(t);case"number":return this.getNumberFormat(i,n).format(t);case"relative":return this.getRelativeFormat(i,n).format(t,r);default:throw new Error("Unrecognized format type: "+e)}}}},function(e,t,n){"use strict";var r=n(13)["default"];n(21),t=e.exports=r,t["default"]=t},function(e,t,n){"use strict";var r=n(14),i=n(20);r["default"].__addLocaleData(i["default"]),r["default"].defaultLocale="en",t["default"]=r["default"]},function(e,t,n){"use strict";function r(e,t,n){var i="string"==typeof e?r.__parse(e):e;if(!i||"messageFormatPattern"!==i.type)throw new TypeError("A message must be provided as a String or AST.");n=this._mergeFormats(r.formats,n),o.defineProperty(this,"_locale",{value:this._resolveLocale(t)});var s=this._findPluralRuleFunction(this._locale),a=this._compilePattern(i,t,n,s),l=this;this.format=function(e){return l._format(a,e)}}var i=n(15),o=n(16),s=n(17),a=n(18);t["default"]=r,o.defineProperty(r,"formats",{enumerable:!0,value:{number:{currency:{style:"currency"},percent:{style:"percent"}},date:{"short":{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},"long":{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{"short":{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},"long":{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}}}),o.defineProperty(r,"__localeData__",{value:o.objCreate(null)}),o.defineProperty(r,"__addLocaleData",{value:function(e){if(!e||!e.locale)throw new Error("Locale data provided to IntlMessageFormat is missing a `locale` property");r.__localeData__[e.locale.toLowerCase()]=e}}),o.defineProperty(r,"__parse",{value:a["default"].parse}),o.defineProperty(r,"defaultLocale",{enumerable:!0,writable:!0,value:void 0}),r.prototype.resolvedOptions=function(){return{locale:this._locale}},r.prototype._compilePattern=function(e,t,n,r){var i=new s["default"](t,n,r);return i.compile(e)},r.prototype._findPluralRuleFunction=function(e){for(var t=r.__localeData__,n=t[e.toLowerCase()];n;){if(n.pluralRuleFunction)return n.pluralRuleFunction;n=n.parentLocale&&t[n.parentLocale.toLowerCase()]}throw new Error("Locale data added to IntlMessageFormat is missing a `pluralRuleFunction` for :"+e)},r.prototype._format=function(e,t){var n,r,o,s,a,l="";for(n=0,r=e.length;r>n;n+=1)if(o=e[n],"string"!=typeof o){if(s=o.id,!t||!i.hop.call(t,s))throw new Error("A value must be provided for: "+s);a=t[s],l+=o.options?this._format(o.getOption(a),t):o.format(a)}else l+=o;return l},r.prototype._mergeFormats=function(e,t){var n,r,s={};for(n in e)i.hop.call(e,n)&&(s[n]=r=o.objCreate(e[n]),t&&i.hop.call(t,n)&&i.extend(r,t[n]));return s},r.prototype._resolveLocale=function(e){"string"==typeof e&&(e=[e]),e=(e||[]).concat(r.defaultLocale);var t,n,i,o,s=r.__localeData__;for(t=0,n=e.length;n>t;t+=1)for(i=e[t].toLowerCase().split("-");i.length;){if(o=s[i.join("-")])return o.locale;i.pop()}var a=e.pop();throw new Error("No locale data has been added to IntlMessageFormat for: "+e.join(", ")+", or the default locale: "+a)}},function(e,t){"use strict";function n(e){var t,n,i,o,s=Array.prototype.slice.call(arguments,1);for(t=0,n=s.length;n>t;t+=1)if(i=s[t])for(o in i)r.call(i,o)&&(e[o]=i[o]);return e}t.extend=n;var r=Object.prototype.hasOwnProperty;t.hop=r},function(e,t,n){"use strict";var r=n(15),i=function(){try{return!!Object.defineProperty({},"a",{})}catch(e){return!1}}(),o=(!i&&!Object.prototype.__defineGetter__,i?Object.defineProperty:function(e,t,n){"get"in n&&e.__defineGetter__?e.__defineGetter__(t,n.get):(!r.hop.call(e,t)||"value"in n)&&(e[t]=n.value)}),s=Object.create||function(e,t){function n(){}var i,s;n.prototype=e,i=new n;for(s in t)r.hop.call(t,s)&&o(i,s,t[s]);return i};t.defineProperty=o,t.objCreate=s},function(e,t){"use strict";function n(e,t,n){this.locales=e,this.formats=t,this.pluralFn=n}function r(e){this.id=e}function i(e,t,n,r,i){this.id=e,this.useOrdinal=t,this.offset=n,this.options=r,this.pluralFn=i}function o(e,t,n,r){this.id=e,this.offset=t,this.numberFormat=n,this.string=r}function s(e,t){this.id=e,this.options=t}t["default"]=n,n.prototype.compile=function(e){return this.pluralStack=[],this.currentPlural=null,this.pluralNumberFormat=null,this.compileMessage(e)},n.prototype.compileMessage=function(e){if(!e||"messageFormatPattern"!==e.type)throw new Error('Message AST is not of type: "messageFormatPattern"');var t,n,r,i=e.elements,o=[];for(t=0,n=i.length;n>t;t+=1)switch(r=i[t],r.type){case"messageTextElement":o.push(this.compileMessageText(r));break;case"argumentElement":o.push(this.compileArgument(r));break;default:throw new Error("Message element does not have a valid type")}return o},n.prototype.compileMessageText=function(e){return this.currentPlural&&/(^|[^\\])#/g.test(e.value)?(this.pluralNumberFormat||(this.pluralNumberFormat=new Intl.NumberFormat(this.locales)),new o(this.currentPlural.id,this.currentPlural.format.offset,this.pluralNumberFormat,e.value)):e.value.replace(/\\#/g,"#")},n.prototype.compileArgument=function(e){var t=e.format;if(!t)return new r(e.id);var n,o=this.formats,a=this.locales,l=this.pluralFn;switch(t.type){case"numberFormat":return n=o.number[t.style],{id:e.id,format:new Intl.NumberFormat(a,n).format};case"dateFormat":return n=o.date[t.style],{id:e.id,format:new Intl.DateTimeFormat(a,n).format};case"timeFormat":return n=o.time[t.style],{id:e.id,format:new Intl.DateTimeFormat(a,n).format};case"pluralFormat":return n=this.compileOptions(e),new i(e.id,t.ordinal,t.offset,n,l);case"selectFormat":return n=this.compileOptions(e),new s(e.id,n);default:throw new Error("Message element does not have a valid format type")}},n.prototype.compileOptions=function(e){var t=e.format,n=t.options,r={};this.pluralStack.push(this.currentPlural),this.currentPlural="pluralFormat"===t.type?e:null;var i,o,s;for(i=0,o=n.length;o>i;i+=1)s=n[i],r[s.selector]=this.compileMessage(s.value);return this.currentPlural=this.pluralStack.pop(),r},r.prototype.format=function(e){return e?"string"==typeof e?e:String(e):""},i.prototype.getOption=function(e){var t=this.options,n=t["="+e]||t[this.pluralFn(e-this.offset,this.useOrdinal)];return n||t.other},o.prototype.format=function(e){var t=this.numberFormat.format(e-this.offset);return this.string.replace(/(^|[^\\])#/g,"$1"+t).replace(/\\#/g,"#")},s.prototype.getOption=function(e){var t=this.options;return t[e]||t.other}},function(e,t,n){"use strict";t=e.exports=n(19)["default"],t["default"]=t},function(e,t){"use strict";t["default"]=function(){function e(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}function t(e,t,n,r,i,o){this.message=e,this.expected=t,this.found=n,this.offset=r,this.line=i,this.column=o,this.name="SyntaxError"}function n(e){function n(t){function n(t,n,r){var i,o;for(i=n;r>i;i++)o=e.charAt(i),"\n"===o?(t.seenCR||t.line++,t.column=1,t.seenCR=!1):"\r"===o||"\u2028"===o||"\u2029"===o?(t.line++,t.column=1,t.seenCR=!0):(t.column++,t.seenCR=!1)}return qe!==t&&(qe>t&&(qe=0,Je={line:1,column:1,seenCR:!1}),n(Je,qe,t),qe=t),Je}function r(e){$e>Ue||(Ue>$e&&($e=Ue,Ye=[]),Ye.push(e))}function i(r,i,o){function s(e){var t=1;for(e.sort(function(e,t){return e.descriptiont.description?1:0});t1?s.slice(0,-1).join(", ")+" or "+s[e.length-1]:s[0],i=t?'"'+n(t)+'"':"end of input","Expected "+r+" but "+i+" found."}var l=n(o),c=o1?arguments[1]:{},M={},j={start:o},A=o,D=function(e){return{type:"messageFormatPattern",elements:e}},L=M,I=function(e){var t,n,r,i,o,s="";for(t=0,r=e.length;r>t;t+=1)for(i=e[t],n=0,o=i.length;o>n;n+=1)s+=i[n];return s},O=function(e){return{type:"messageTextElement",value:e}},F=/^[^ \t\n\r,.+={}#]/,K={type:"class",value:"[^ \\t\\n\\r,.+={}#]",description:"[^ \\t\\n\\r,.+={}#]"},R="{",B={type:"literal",value:"{",description:'"{"'},z=null,H=",",G={type:"literal",value:",",description:'","'},U="}",W={type:"literal",value:"}",description:'"}"'},q=function(e,t){return{type:"argumentElement",id:e,format:t&&t[2]}},J="number",$={type:"literal",value:"number",description:'"number"'},Y="date",X={type:"literal",value:"date",description:'"date"'},Z="time",V={type:"literal",value:"time",description:'"time"'},Q=function(e,t){return{type:e+"Format",style:t&&t[2]}},ee="plural",te={type:"literal",value:"plural",description:'"plural"'},ne=function(e){return{type:e.type,ordinal:!1,offset:e.offset||0,options:e.options}},re="selectordinal",ie={type:"literal",value:"selectordinal",description:'"selectordinal"'},oe=function(e){return{type:e.type,ordinal:!0,offset:e.offset||0,options:e.options}},se="select",ae={type:"literal",value:"select",description:'"select"'},le=function(e){return{type:"selectFormat",options:e}},ce="=",ue={type:"literal",value:"=",description:'"="'},pe=function(e,t){return{type:"optionalFormatPattern",selector:e,value:t}},he="offset:",me={type:"literal",value:"offset:",description:'"offset:"'},de=function(e){return e},fe=function(e,t){return{type:"pluralFormat",offset:e,options:t}},ge={type:"other",description:"whitespace"},ve=/^[ \t\n\r]/,ye={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},be={type:"other",description:"optionalWhitespace"},_e=/^[0-9]/,Te={type:"class",value:"[0-9]",description:"[0-9]"},ke=/^[0-9a-f]/i,xe={type:"class",value:"[0-9a-f]i",description:"[0-9a-f]i"},we="0",Ee={type:"literal",value:"0",description:'"0"'},Pe=/^[1-9]/,Ne={type:"class",value:"[1-9]",description:"[1-9]"},Se=function(e){return parseInt(e,10)},Ce=/^[^{}\\\0-\x1F \t\n\r]/,Me={type:"class",value:"[^{}\\\\\\0-\\x1F \\t\\n\\r]",description:"[^{}\\\\\\0-\\x1F \\t\\n\\r]"},je="\\#",Ae={type:"literal",value:"\\#",description:'"\\\\#"'},De=function(){return"\\#"},Le="\\{",Ie={type:"literal",value:"\\{",description:'"\\\\{"'},Oe=function(){return"{"},Fe="\\}",Ke={type:"literal",value:"\\}",description:'"\\\\}"'},Re=function(){return"}"},Be="\\u",ze={type:"literal",value:"\\u",description:'"\\\\u"'},He=function(e){return String.fromCharCode(parseInt(e,16))},Ge=function(e){return e.join("")},Ue=0,We=0,qe=0,Je={line:1,column:1,seenCR:!1},$e=0,Ye=[],Xe=0;if("startRule"in C){if(!(C.startRule in j))throw new Error("Can't start parsing from rule \""+C.startRule+'".');A=j[C.startRule]}if(S=A(),S!==M&&Ue===e.length)return S;throw S!==M&&Uea?"past":"future"})},r.prototype._isValidUnits=function(e){if(!e||s.arrIndexOf.call(a,e)>=0)return!0;if("string"==typeof e){var t=/s$/.test(e)&&e.substr(0,e.length-1);if(t&&s.arrIndexOf.call(a,t)>=0)throw new Error('"'+e+'" is not a valid IntlRelativeFormat `units` value, did you mean: '+t)}throw new Error('"'+e+'" is not a valid IntlRelativeFormat `units` value, it must be one of: "'+a.join('", "')+'"')},r.prototype._resolveLocale=function(e){"string"==typeof e&&(e=[e]),e=(e||[]).concat(r.defaultLocale);var t,n,i,o,s=r.__localeData__;for(t=0,n=e.length;n>t;t+=1)for(i=e[t].toLowerCase().split("-");i.length;){if(o=s[i.join("-")])return o.locale;i.pop()}var a=e.pop();throw new Error("No locale data has been added to IntlRelativeFormat for: "+e.join(", ")+", or the default locale: "+a)},r.prototype._resolveStyle=function(e){if(!e)return l[0];if(s.arrIndexOf.call(l,e)>=0)return e;throw new Error('"'+e+'" is not a valid IntlRelativeFormat `style` value, it must be one of: "'+l.join('", "')+'"')},r.prototype._selectUnits=function(e){var t,n,i;for(t=0,n=a.length;n>t&&(i=a[t],!(Math.abs(e[i])r;r++)if(n[r]===e)return r;return-1},l=Array.isArray||function(e){return"[object Array]"===r.call(e)},c=Date.now||function(){return(new Date).getTime()};t.defineProperty=o,t.objCreate=s,t.arrIndexOf=a,t.isArray=l,t.dateNow=c},function(e,t){"use strict";t["default"]={locale:"en",pluralRuleFunction:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e,o=i&&n[0].slice(-1),s=i&&n[0].slice(-2);return t?1==o&&11!=s?"one":2==o&&12!=s?"two":3==o&&13!=s?"few":"other":1==e&&r?"one":"other"},fields:{year:{displayName:"Year",relative:{0:"this year",1:"next year","-1":"last year"},relativeTime:{future:{one:"in {0} year",other:"in {0} years"},past:{one:"{0} year ago",other:"{0} years ago"}}},month:{displayName:"Month",relative:{0:"this month",1:"next month","-1":"last month"},relativeTime:{future:{one:"in {0} month",other:"in {0} months"},past:{one:"{0} month ago",other:"{0} months ago"}}},day:{displayName:"Day",relative:{0:"today",1:"tomorrow","-1":"yesterday"},relativeTime:{future:{one:"in {0} day",other:"in {0} days"},past:{one:"{0} day ago",other:"{0} days ago"}}},hour:{displayName:"Hour",relativeTime:{future:{one:"in {0} hour",other:"in {0} hours"},past:{one:"{0} hour ago",other:"{0} hours ago"}}},minute:{displayName:"Minute",relativeTime:{future:{one:"in {0} minute",other:"in {0} minutes"},past:{one:"{0} minute ago",other:"{0} minutes ago"}}},second:{displayName:"Second",relative:{0:"now"},relativeTime:{future:{one:"in {0} second",other:"in {0} seconds"},past:{one:"{0} second ago",other:"{0} seconds ago"}}}}}},function(e,t){},function(e,t,n){"use strict";t=e.exports=n(30)["default"],t["default"]=t},function(e,t,n){"use strict";function r(e){var t=s.objCreate(null);return function(){var n=Array.prototype.slice.call(arguments),r=i(n),o=r&&t[r];return o||(o=s.objCreate(e.prototype),e.apply(o,n),r&&(t[r]=o)),o}}function i(e){if("undefined"!=typeof JSON){var t,n,r,i=[];for(t=0,n=e.length;n>t;t+=1)r=e[t],r&&"object"==typeof r?i.push(o(r)):i.push(r);return JSON.stringify(i)}}function o(e){var t,n,r,i,o=[],s=[];for(t in e)e.hasOwnProperty(t)&&s.push(t);var a=s.sort();for(n=0,r=a.length;r>n;n+=1)t=a[n],i={},i[t]=e[t],o[n]=i;return o}var s=n(31);t["default"]=r},function(e,t){"use strict";var n=Object.prototype.hasOwnProperty,r=function(){try{return!!Object.defineProperty({},"a",{})}catch(e){return!1}}(),i=(!r&&!Object.prototype.__defineGetter__,r?Object.defineProperty:function(e,t,r){"get"in r&&e.__defineGetter__?e.__defineGetter__(t,r.get):(!n.call(e,t)||"value"in r)&&(e[t]=r.value)}),o=Object.create||function(e,t){function r(){}var o,s;r.prototype=e,o=new r;for(s in t)n.call(t,s)&&i(o,s,t[s]);return o};t.defineProperty=i,t.objCreate=o},function(e,t){"use strict";t["default"]={locale:"en",pluralRuleFunction:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e,o=i&&n[0].slice(-1),s=i&&n[0].slice(-2);return t?1==o&&11!=s?"one":2==o&&12!=s?"two":3==o&&13!=s?"few":"other":1==e&&r?"one":"other"},fields:{year:{displayName:"Year",relative:{0:"this year",1:"next year","-1":"last year"},relativeTime:{future:{one:"in {0} year",other:"in {0} years"},past:{one:"{0} year ago",other:"{0} years ago"}}},month:{displayName:"Month",relative:{0:"this month",1:"next month","-1":"last month"},relativeTime:{future:{one:"in {0} month",other:"in {0} months"},past:{one:"{0} month ago",other:"{0} months ago"}}},day:{displayName:"Day",relative:{0:"today",1:"tomorrow","-1":"yesterday"},relativeTime:{future:{one:"in {0} day",other:"in {0} days"},past:{one:"{0} day ago",other:"{0} days ago"}}},hour:{displayName:"Hour",relativeTime:{future:{one:"in {0} hour",other:"in {0} hours"},past:{one:"{0} hour ago",other:"{0} hours ago"}}},minute:{displayName:"Minute",relativeTime:{future:{one:"in {0} minute",other:"in {0} minutes"},past:{one:"{0} minute ago",other:"{0} minutes ago"}}},second:{displayName:"Second",relative:{0:"now"},relativeTime:{future:{one:"in {0} second",other:"in {0} seconds"},past:{one:"{0} second ago",other:"{0} seconds ago"}}}}}},function(e,t,n){"use strict";var r=n(10),i=n(11),o=r["default"].createClass({displayName:"FormattedDate",mixins:[i["default"]],statics:{formatOptions:["localeMatcher","timeZone","hour12","formatMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName"]},propTypes:{format:r["default"].PropTypes.string,value:r["default"].PropTypes.any.isRequired},render:function(){var e=this.props,t=e.value,n=e.format,i=n&&this.getNamedFormat("date",n),s=o.filterFormatOptions(e,i);return r["default"].DOM.span(null,this.formatDate(t,s))}});t["default"]=o},function(e,t,n){"use strict";var r=n(10),i=n(11),o=r["default"].createClass({displayName:"FormattedRelative",mixins:[i["default"]],statics:{formatOptions:["style","units"]},propTypes:{format:r["default"].PropTypes.string,value:r["default"].PropTypes.any.isRequired,now:r["default"].PropTypes.any},render:function(){var e=this.props,t=e.value,n=e.format,i=n&&this.getNamedFormat("relative",n),s=o.filterFormatOptions(e,i),a=this.formatRelative(t,s,{now:e.now});return r["default"].DOM.span(null,a)}});t["default"]=o},function(e,t,n){"use strict";var r=n(10),i=n(11),o=r["default"].createClass({displayName:"FormattedNumber",mixins:[i["default"]],statics:{formatOptions:["localeMatcher","style","currency","currencyDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits"]},propTypes:{format:r["default"].PropTypes.string,value:r["default"].PropTypes.any.isRequired},render:function(){var e=this.props,t=e.value,n=e.format,i=n&&this.getNamedFormat("number",n),s=o.filterFormatOptions(e,i);return r["default"].DOM.span(null,this.formatNumber(t,s))}});t["default"]=o},function(e,t,n){"use strict";var r=n(10),i=n(11),o=r["default"].createClass({displayName:"FormattedMessage",mixins:[i["default"]],propTypes:{tagName:r["default"].PropTypes.string,message:r["default"].PropTypes.string.isRequired},getDefaultProps:function(){return{tagName:"span"}},render:function(){var e=this.props,t=e.tagName,n=e.message,i=Math.floor(1099511627776*Math.random()).toString(16),o=new RegExp("(@__ELEMENT-"+i+"-\\d+__@)","g"),s={},a=function(){var e=0;return function(){return"@__ELEMENT-"+i+"-"+(e+=1)+"__@"}}(),l=Object.keys(e).reduce(function(t,n){var i,o=e[n];return r["default"].isValidElement(o)?(i=a(),t[n]=i,s[i]=o):t[n]=o,t},{}),c=this.formatMessage(n,l),u=c.split(o).filter(function(e){return!!e}).map(function(e){return s[e]||e}),p=[t,null].concat(u);return r["default"].createElement.apply(null,p)}});t["default"]=o},function(e,t,n){"use strict";var r=n(10),i=n(38),o=n(11),s=r["default"].createClass({displayName:"FormattedHTMLMessage",mixins:[o["default"]],propTypes:{tagName:r["default"].PropTypes.string,message:r["default"].PropTypes.string.isRequired},getDefaultProps:function(){return{tagName:"span"}},render:function(){var e=this.props,t=e.tagName,n=e.message,o=Object.keys(e).reduce(function(t,n){var o=e[n];return"string"==typeof o?o=i["default"](o):r["default"].isValidElement(o)&&(o=r["default"].renderToStaticMarkup(o)),t[n]=o,t},{});return r["default"].DOM[t]({dangerouslySetInnerHTML:{__html:this.formatMessage(n,o)}})}});t["default"]=s},function(e,t){"use strict";var n={"&":"&",">":">","<":"<",'"':""","'":"'"},r=/[&><"']/g;t["default"]=function(e){return(""+e).replace(r,function(e){return n[e]})}},function(e,t){},function(e,t,n){function r(e){return n(i(e))}function i(e){return o[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var o={"./en-US":41,"./en-US.js":41,"./pt-BR":42,"./pt-BR.js":42};r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=40},function(e,t){"use strict";e.exports={IndexFilters:{filters:"{quantity, plural,\n =0 {Filters}\n =1 {one filter}\n other {# filters}\n}"},Active:"Active",Alerts:"Alerts",All:"All",Category:"Category",Cleared:"Cleared",Completed:"Completed",created:"Created",Critical:"Critical",Disabled:"Disabled",Error:"Error",loginInvalidPassword:"Please provide Username and Password.","Log In":"Log In",Logout:"Logout",model:"Model",modified:"Modified",Name:"Name",OK:"OK",Password:"Password","Remember me":"Remember me",Resource:"Resource",Running:"Running",Search:"Search",State:"State",Status:"Status",Tasks:"Tasks",Time:"Time",Total:"Total",Unknown:"Unknown",Username:"Username",uri:"URI",Warning:"Warning"}},function(e,t){"use strict";e.exports={IndexFilters:{filters:"{quantity, plural,\n =0 {Filtros}\n =1 {um filtro}\n other {# filtros}\n}"},Active:"Ativos",Alerts:"Alertas",All:"Todos",Category:"Categoria",Cleared:"Livre",Completed:"Completado",created:"Criado",Critical:"Crítico",Disabled:"Desabilitado",Error:"Erro",loginInvalidPassword:"Por favor, informe Usuário e Senha.","Log In":"Logar",Logout:"Deslogar",model:"Modelo",modified:"Modificado",Name:"Nome",OK:"OK",Password:"Senha","Remember me":"Lembrar Usuário",Resource:"Recurso",Running:"Executando",Search:"Buscar",State:"Estado",Status:"Situaçāo",Tasks:"Tarefas",Time:"Data",Total:"Total",Unknown:"Desconhecido",Username:"Usuário",uri:"URI",Warning:"Alerta"}},function(e,t,n){"use strict";function r(e){var t=e.replace(/_/g,"-").split("-"),n=t[0];return t.length>1&&(n+="-"+t[1].toUpperCase()),n}var i=n(44),o=n(77),s="en-US";e.exports={getCurrentLocale:function(){var e=o.get("languages"),t=e?JSON.parse(e)[0]:void 0;return t||(t=window.navigator.languages?window.navigator.languages[0]:window.navigator.language||window.navigator.userLanguage),r(t||s)},getLocaleData:function(e){var t,r=this.getCurrentLocale();try{t=n(40)("./"+r)}catch(o){console.warn(r+" not supported, fallback to English has been applied."),r=s,t=n(41)}var a=i(t,e||{});return{locale:r,messages:a}}}},function(e,t,n){var r=n(45),i=n(72),o=i(r);e.exports=o},function(e,t,n){function r(e,t,n,h,m){if(!l(e))return e;var d=a(t)&&(s(t)||u(t)),f=d?void 0:p(t);return i(f||t,function(i,s){if(f&&(s=i,i=t[s]),c(i))h||(h=[]),m||(m=[]),o(e,t,s,r,n,h,m);else{var a=e[s],l=n?n(a,i,s,e,t):void 0,u=void 0===l;u&&(l=i),void 0===l&&(!d||s in e)||!u&&(l===l?l===a:a!==a)||(e[s]=l)}}),e}var i=n(47),o=n(48),s=n(56),a=n(51),l=n(46),c=n(55),u=n(67),p=n(70);e.exports=r},function(e,t){function n(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=n},function(e,t){function n(e,t){for(var n=-1,r=e.length;++n-1&&e%1==0&&r>=e}var r=9007199254740991;e.exports=n},function(e,t){function n(e){return!!e&&"object"==typeof e}e.exports=n},function(e,t,n){var r=n(57),i=n(54),o=n(55),s="[object Array]",a=Object.prototype,l=a.toString,c=r(Array,"isArray"),u=c||function(e){return o(e)&&i(e.length)&&l.call(e)==s};e.exports=u},function(e,t,n){function r(e,t){var n=null==e?void 0:e[t];return i(n)?n:void 0}var i=n(58);e.exports=r},function(e,t,n){function r(e){return null==e?!1:i(e)?u.test(l.call(e)):o(e)&&s.test(e)}var i=n(59),o=n(55),s=/^\[object .+?Constructor\]$/,a=Object.prototype,l=Function.prototype.toString,c=a.hasOwnProperty,u=RegExp("^"+l.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=r},function(e,t,n){function r(e){return i(e)&&a.call(e)==o}var i=n(46),o="[object Function]",s=Object.prototype,a=s.toString;e.exports=r},function(e,t,n){function r(e){var t;if(!s(e)||u.call(e)!=a||o(e)||!c.call(e,"constructor")&&(t=e.constructor,"function"==typeof t&&!(t instanceof t)))return!1;var n;return i(e,function(e,t){n=t}),void 0===n||c.call(e,n)}var i=n(61),o=n(50),s=n(55),a="[object Object]",l=Object.prototype,c=l.hasOwnProperty,u=l.toString;e.exports=r},function(e,t,n){function r(e,t){return i(e,t,o)}var i=n(62),o=n(65);e.exports=r},function(e,t,n){var r=n(63),i=r();e.exports=i},function(e,t,n){function r(e){return function(t,n,r){for(var o=i(t),s=r(t),a=s.length,l=e?a:-1;e?l--:++l0;++r-1&&e%1==0&&t>e}var r=/^\d+$/,i=9007199254740991;e.exports=n},function(e,t,n){function r(e){return o(e)&&i(e.length)&&!!C[j.call(e)]}var i=n(54),o=n(55),s="[object Arguments]",a="[object Array]",l="[object Boolean]",c="[object Date]",u="[object Error]",p="[object Function]",h="[object Map]",m="[object Number]",d="[object Object]",f="[object RegExp]",g="[object Set]",v="[object String]",y="[object WeakMap]",b="[object ArrayBuffer]",_="[object Float32Array]",T="[object Float64Array]",k="[object Int8Array]",x="[object Int16Array]",w="[object Int32Array]",E="[object Uint8Array]",P="[object Uint8ClampedArray]",N="[object Uint16Array]",S="[object Uint32Array]",C={};C[_]=C[T]=C[k]=C[x]=C[w]=C[E]=C[P]=C[N]=C[S]=!0,C[s]=C[a]=C[b]=C[l]=C[c]=C[u]=C[p]=C[h]=C[m]=C[d]=C[f]=C[g]=C[v]=C[y]=!1;var M=Object.prototype,j=M.toString;e.exports=r},function(e,t,n){function r(e){return i(e,o(e))}var i=n(69),o=n(65);e.exports=r},function(e,t){function n(e,t,n){n||(n={});for(var r=-1,i=t.length;++r2?n[s-2]:void 0,l=s>2?n[2]:void 0,c=s>1?n[s-1]:void 0;for("function"==typeof a?(a=i(a,c,5),s-=2):(a="function"==typeof c?c:void 0,s-=a?1:0),l&&o(n[0],n[1],l)&&(a=3>s?void 0:a,s=1);++rn;n++)e[n]=decodeURIComponent(e[n]);return e}};e.exports=n},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;te?2*e*e:-1+(4-2*e)*e},_scrollTo:function(e){clearInterval(this._scrollToTimer);var t=this._scrollParent.scrollTop,n=t+e,r=1;this._scrollToTimer=setInterval(function(){var e,i=this._easeInOutQuad(r/h);e=n>t?Math.min(n,Math.max(this._scrollParent.scrollTop,Math.round(t+(n-t)*i))):Math.max(n,Math.min(this._scrollParent.scrollTop,Math.round(t-(t-n)*i))),this._scrollParent.scrollTop=e,r+=1,r>h&&clearInterval(this._scrollToTimer)}.bind(this),8)},_markInactive:function(){for(var e=this.refs.component.getDOMNode(),t=e.querySelectorAll(".section.box--full"),n=0;nwindow.innerHeight-10?r.classList.add("section--inactive"):r.classList.remove("section--inactive")}},_onScroll:function(e){clearTimeout(this._scrollTimer),this._scrollTimer=setTimeout(this._markInactive,50)},_onWheel:function(e){ +Math.abs(e.deltaY)>100?clearInterval(this._scrollTimer):e.deltaY>5?this._onDown():e.deltaY<-5&&this._onUp()},_onDown:function(e){e&&e.preventDefault();for(var t=this.refs.component.getDOMNode(),n=t.querySelectorAll(".section.box--full"),r=0;r10&&(e||o.bottom=-10||r===n.length-1)&&(e||o.top0&&(i=n[r-1],o=i.getBoundingClientRect(),this._scrollTo(o.top));break}}},getInitialState:function(){return{scrollTop:0}},componentDidMount:function(){if(this.props.scrollStep){this._markInactive();var e=this.refs.component.getDOMNode();this._scrollParent=u.findScrollParents(e)[0],document.addEventListener("wheel",this._onWheel),this._scrollParent.addEventListener("scroll",this._onScroll),this.startListeningToKeyboard({up:this._onUp,down:this._onDown})}},componentWillUnmount:function(){this.props.scrollStep&&(document.removeEventListener("wheel",this._onWheel),clearInterval(this._scrollToTimer),this._scrollParent.removeEventListener("scroll",this._onScroll),clearTimeout(this._scrollTimer),this.stopListeningToKeyboard({up:this._onUp,down:this._onDown}))},render:function(){var e=[p],t=s(this.props,a(l.propTypes));return this.props.scrollStep&&e.push(p+"--scroll-step"),i.createElement(l,r({ref:"component",tag:"article"},t,{className:e.join(" ")}),this.props.children)}});e.exports=m},function(e,t,n){var r=n(80),i=n(73),o=n(82),s=n(83),a=n(76),l=a(function(e,t){return null==e?{}:"function"==typeof t[0]?s(e,i(t[0],t[1],3)):o(e,r(t))});e.exports=l},function(e,t,n){function r(e,t,n,c){c||(c=[]);for(var u=-1,p=e.length;++u0&&!this._keyboardAcceleratorListening&&(window.addEventListener("keydown",this._onKeyboardAcceleratorKeyPress),window.addEventListener("keyup",this._onKeyboardAcceleratorKeyUp),this._keyboardAcceleratorListening=!0)},stopListeningToKeyboard:function(e){if(e)for(var t in e)if(e.hasOwnProperty(t)){var r=t;n.hasOwnProperty(t)&&(r=n[t]),delete this._keyboardAcceleratorHandlers[r]}var i=0;for(var o in this._keyboardAcceleratorHandlers)this._keyboardAcceleratorHandlers.hasOwnProperty(o)&&(i+=1);e&&0!==i||(window.removeEventListener("keydown",this._onKeyboardAcceleratorKeyPress),window.removeEventListener("keyup",this._onKeyboardAcceleratorKeyUp),this._keyboardAcceleratorHandlers={},this._keyboardAcceleratorListening=!1)},componentWillUnmount:function(){this.stopListeningToKeyboard()}};e.exports=i},function(e,t){"use strict";e.exports={findScrollParents:function(e){for(var t=[],n=e.parentNode;n;)n.scrollHeight>n.offsetHeight+10&&t.push(n),n=n.parentNode;return 0===t.length&&t.push(document),t}}},function(e,t,n){"use strict";var r=n(2),i="button",o=r.createClass({displayName:"Button",propTypes:{accent:r.PropTypes.bool,label:r.PropTypes.string.isRequired,large:r.PropTypes.bool,onClick:r.PropTypes.func,primary:r.PropTypes.bool},render:function(){var e=[i];return this.props.primary&&e.push(i+"--primary"),this.props.accent&&e.push(i+"--accent"),this.props.onClick||e.push(i+"--disabled"),this.props.large&&e.push(i+"--large"),this.props.className&&e.push(this.props.className),r.createElement("button",{className:e.join(" "),onClick:this.props.onClick},this.props.label)}});e.exports=o},function(e,t,n){"use strict";var r=n(2),i="check-box",o=r.createClass({displayName:"CheckBox",propTypes:{checked:r.PropTypes.bool,defaultChecked:r.PropTypes.bool,id:r.PropTypes.string.isRequired,label:r.PropTypes.string.isRequired,name:r.PropTypes.string,onChange:r.PropTypes.func,toggle:r.PropTypes.bool},render:function(){var e=[i];return this.props.toggle&&e.push(i+"--toggle"),this.props.className&&e.push(this.props.className),r.createElement("label",{className:e.join(" ")},r.createElement("input",{className:i+"__input",id:this.props.id,name:this.props.name,type:"checkbox",checked:this.props.checked,defaultChecked:this.props.defaultChecked,onChange:this.props.onChange}),r.createElement("span",{className:i+"__control"},r.createElement("svg",{className:i+"__control-check",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet"},r.createElement("path",{fill:"none",d:"M6,11.3 L10.3,16 L18,6.2"}))),r.createElement("span",{className:i+"__label"},this.props.label))}});e.exports=o},function(e,t,n){"use strict";var r=n(2),i=n(85),o=n(86),s="document",a=25,l=r.createClass({displayName:"GrommetDocument",propTypes:{flush:r.PropTypes.bool,full:r.PropTypes.bool},mixins:[i],getDefaultProps:function(){return{flush:!0}},_easeInOutQuad:function(e){return.5>e?2*e*e:-1+(4-2*e)*e},_scrollTo:function(e){clearInterval(this._scrollToTimer);var t=this._scrollParent.scrollTop,n=t+e,r=1;this._scrollToTimer=setInterval(function(){var e,i=this._easeInOutQuad(r/a);e=n>t?Math.min(n,Math.max(this._scrollParent.scrollTop,Math.round(t+(n-t)*i))):Math.max(n,Math.min(this._scrollParent.scrollTop,Math.round(t-(t-n)*i))),this._scrollParent.scrollTop=e,r+=1,r>a&&clearInterval(this._scrollToTimer)}.bind(this),8)},_markInactive:function(){for(var e=this.refs.document.getDOMNode(),t=e.querySelectorAll(".section--full"),n=0;nwindow.innerHeight-10?r.classList.add("section--inactive"):r.classList.remove("section--inactive")}},_onScroll:function(e){clearTimeout(this._scrollTimer),this._scrollTimer=setTimeout(this._markInactive,50)},_onWheel:function(e){Math.abs(e.deltaY)>100?clearInterval(this._scrollTimer):e.deltaY>5?this._onDown():e.deltaY<-5&&this._onUp()},_onDown:function(e){e&&e.preventDefault();for(var t=this.refs.document.getDOMNode(),n=t.querySelectorAll(".section--full"),r=0;r0&&(e||o.bottom=0||r===n.length-1)&&(e||o.top=o-i?"0":"1",c=["M",s.x,s.y,"A",n,n,0,l,0,a.x,a.y].join(" ");return c}function o(e,t,n,i,o){var s=o-(o-i)/2,a=r(e,t,n-24,s),l=r(e,t,n,s-10),c=r(e,t,n,s+10),u=["M",a.x,a.y,"L",l.x,l.y,"A",n,n,0,0,0,c.x,c.y,"Z"].join(" ");return u}var s=n(2),a=n(91),l="donut",c=192,u=168,p=s.createClass({displayName:"Donut",propTypes:{legend:s.PropTypes.bool,partial:s.PropTypes.bool,max:s.PropTypes.oneOfType([s.PropTypes.shape({value:s.PropTypes.number,label:s.PropTypes.string}),s.PropTypes.number]),min:s.PropTypes.oneOfType([s.PropTypes.shape({value:s.PropTypes.number,label:s.PropTypes.string}),s.PropTypes.number]),series:s.PropTypes.arrayOf(s.PropTypes.shape({label:s.PropTypes.string,value:s.PropTypes.number.isRequired,units:s.PropTypes.string,colorIndex:s.PropTypes.string,important:s.PropTypes.bool,onClick:s.PropTypes.func})),small:s.PropTypes.bool,units:s.PropTypes.string,value:s.PropTypes.number},getDefaultProps:function(){return{max:{value:100},min:{value:0}}},_initialTimeout:function(){this.setState({initial:!1,activeIndex:this.state.importantIndex}),clearTimeout(this._timeout)},_onActive:function(e){this.setState({initial:!1,activeIndex:e})},_layout:function(){var e=window.innerWidth/window.innerHeight;.8>e?this.setState({orientation:"portrait"}):e>1.2&&this.setState({orientation:"landscape"});var t=this.refs.donut.getDOMNode().parentNode,n=t.offsetWidth,r=t.offsetHeight,i=c;this.props.partial&&(i=u),i>r||c>n||2*c>n&&2*i>r?this.setState({size:"small"}):this.setState({size:null})},_onResize:function(){clearTimeout(this._resizeTimer),this._resizeTimer=setTimeout(this._layout,50)},_generateSeries:function(e){var t=e.max.value-e.min.value,n=t-(e.value-e.min.value);return[{value:e.value},{value:n,colorIndex:"unset"}]},_importantIndex:function(e){var t=0;return e.some(function(e,n){return e.important?(t=n,!0):void 0}),t},getInitialState:function(){var e=this.props.series||this._generateSeries(this.props),t=this._importantIndex(e);return{initial:!0,importantIndex:t,activeIndex:t,legend:!1,orientation:"portrait",series:e}},componentDidMount:function(){console.log("Grommet Donut is deprecated. Please use Grommet Meter instead."),this._initialTimer=setTimeout(this._initialTimeout,10),this.setState({initial:!0,activeIndex:0}),window.addEventListener("resize",this._onResize),this._onResize()},componentWillReceiveProps:function(e){var t=e.series||this._generateSeries(e),n=this._importantIndex(t);this.setState({importantIndex:n,activeIndex:n,series:t})},componentWillUnmount:function(){clearTimeout(this._initialTimer),clearTimeout(this._resizeTimer),window.removeEventListener("resize",this._onResize)},_itemColorIndex:function(e,t){return e.colorIndex||"graph-"+(t+1)},render:function(){var e=[l,l+"--"+this.state.orientation];this.state.size&&e.push(l+"--"+this.state.size),this.props.partial&&e.push(l+"--partial"),this.props.small&&e.push(l+"--small");var t=c;this.props.partial&&(t=u);var n=0;this.state.series.some(function(e){n+=e.value});var r=0,p=360/n;this.props.partial&&(r=60,p=240/n);var h,m,d=null,f=null,g=null,v=null,y=this.state.series.map(function(e,t){var n=Math.min(360,Math.max(10,r+p*e.value));e.value>0&&r+360===n&&(n-=.1);var a=84,u=i(c/2,c/2,a,r+180,n+180),h=this._itemColorIndex(e,t),m=[l+"__slice"];if(m.push("color-index-"+h),this.state.activeIndex===t&&(m.push(l+"__slice--active"),d=e.value,f=e.units||this.props.units,g=e.label),t===this.state.activeIndex){var y=o(c/2,c/2,a,r+180,n+180);v=s.createElement("path",{stroke:"none",className:l+"__slice-indicator color-index-"+h,d:y})}return r=n,s.createElement("path",{key:e.label,fill:"none",className:m.join(" "),d:u,onMouseOver:this._onActive.bind(this,t),onMouseOut:this._onActive.bind(this,this.state.importantIndex),onClick:e.onClick})},this);this.props.partial&&(this.props.min&&(h=s.createElement("div",{className:l+"__min-label"},this.props.min.value," ",this.props.units)),this.props.max&&(m=s.createElement("div",{className:l+"__max-label"},this.props.max.value," ",this.props.units)));var b=null;return this.props.legend&&(b=s.createElement(a,{className:l+"__legend",series:this.props.series,units:this.props.units,value:this.props.value,activeIndex:this.state.activeIndex,onActive:this._onActive})),s.createElement("div",{ref:"donut",className:e.join(" ")},s.createElement("div",{className:l+"__graphic-container"},s.createElement("svg",{className:l+"__graphic",viewBox:"0 0 "+c+" "+t,preserveAspectRatio:"xMidYMid meet"},s.createElement("g",null,v,y)),s.createElement("div",{className:l+"__active"},s.createElement("div",{className:l+"__active-value large-number-font"},d,s.createElement("span",{className:l+"__active-units large-number-font"},f)),s.createElement("div",{className:l+"__active-label"},g)),h,m),b)}});e.exports=p},function(e,t,n){"use strict";var r=n(2),i=n(3),o="legend",s=r.createClass({displayName:"Legend",mixins:[i],propTypes:{activeIndex:r.PropTypes.number,onActive:r.PropTypes.func,series:r.PropTypes.arrayOf(r.PropTypes.shape({label:r.PropTypes.string,value:r.PropTypes.number,units:r.PropTypes.string,colorIndex:r.PropTypes.oneOfType([r.PropTypes.number,r.PropTypes.string]),onClick:r.PropTypes.func})).isRequired,total:r.PropTypes.bool,units:r.PropTypes.string,value:r.PropTypes.number},_onActive:function(e){this.setState({activeIndex:e}),this.props.onActive&&this.props.onActive(e)},getInitialState:function(){return{activeIndex:this.props.activeIndex}},componentWillReceiveProps:function(e){this.setState({activeIndex:e.activeIndex})},_itemColorIndex:function(e,t){return e.colorIndex||"graph-"+(t+1)},render:function(){var e=[o];1===this.props.series.length&&e.push(o+"--single"),this.props.className&&e.push(this.props.className);var t=0,n=this.props.series.map(function(e,n){var i=[o+"__item"];n===this.state.activeIndex&&i.push(o+"__item--active");var s=this._itemColorIndex(e,n);t+=e.value;var a=[o+"__item-value"];return 1===this.props.series.length&&a.push("large-number-font"),r.createElement("li",{key:e.label||n,className:i.join(" "),onClick:e.onClick,onMouseOver:this._onActive.bind(this,n),onMouseOut:this._onActive.bind(this,this.props.activeIndex)},r.createElement("svg",{className:o+"__item-swatch color-index-"+s,viewBox:"0 0 12 12"},r.createElement("path",{className:e.className,d:"M 5 0 l 0 12"})),r.createElement("span",{className:o+"__item-label"},e.label),r.createElement("span",{className:a.join(" ")},e.value,r.createElement("span",{className:o+"__item-units"},this.props.units)))},this),i=null;return this.props.total&&this.props.series.length>1&&(i=r.createElement("li",{className:o+"__total"},r.createElement("span",{className:o+"__total-label"},this.getGrommetIntlMessage("Total")),r.createElement("span",{className:o+"__total-value"},t,r.createElement("span",{className:o+"__total-units"},this.props.units)))),r.createElement("ol",{className:e.join(" ")},n.reverse(),i)}});e.exports=s},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;te?"portrait":"landscape"})},getInitialState:function(){return{orientation:null}},componentDidMount:function(){this.props.background&&(window.addEventListener("resize",this._onResize),setTimeout(this.adjustBackground,300))},componentWillUnmount:function(){this.props.background&&window.removeEventListener("resize",this._onResize)},render:function(){var e=null;if(this.props.background){var t=["login__background"];this.state.orientation&&t.push("login__background--"+this.state.orientation),e=r.createElement("img",{ref:"background",className:t.join(" "),src:this.props.background})}return r.createElement("div",{className:"login"},e,r.createElement("div",{className:"login__container"},this.props.children))}});e.exports=i},function(e,t,n){"use strict";var r=n(2),i=n(93),o=n(94),s=n(88),a=n(87),l=n(3),c="login-form",u=r.createClass({displayName:"LoginForm",mixins:[l],propTypes:{logo:r.PropTypes.node,title:r.PropTypes.string,rememberMe:r.PropTypes.bool,forgotPassword:r.PropTypes.node,errors:r.PropTypes.arrayOf(r.PropTypes.string),onSubmit:r.PropTypes.func},_onSubmit:function(e){e.preventDefault();var t=this.refs.username.getDOMNode().value.trim(),n=this.refs.password.getDOMNode().value.trim();this.props.onSubmit&&this.props.onSubmit({username:t,password:n})},getDefaultProps:function(){return{errors:[]}},componentDidMount:function(){this.refs.username.getDOMNode().focus()},render:function(){var e=[c],t=this.props.errors.map(function(e,t){return r.createElement("div",{key:t,className:c+"__error"},this.getGrommetIntlMessage(e))}.bind(this)),n=null;this.props.logo&&(n=r.createElement("div",{className:c+"__logo"},this.props.logo));var l=null;this.props.title&&(l=r.createElement("h1",{className:c+"__title"},this.props.title));var u=null;if(this.props.rememberMe||this.props.forgotPassword){var p=null;this.props.rememberMe&&(p=r.createElement(s,{className:c+"__remember-me",id:"remember-me",label:this.getGrommetIntlMessage("Remember me")})),u=r.createElement("div",{className:c+"__footer"},p,this.props.forgotPassword)}return r.createElement(i,{className:e.join(" "),onSubmit:this._onSubmit},n,l,r.createElement("fieldset",null,r.createElement(o,{htmlFor:"username",label:this.getGrommetIntlMessage("Username")},r.createElement("input",{id:"username",ref:"username",type:"email"})),r.createElement(o,{htmlFor:"password",label:this.getGrommetIntlMessage("Password")},r.createElement("input",{id:"password",ref:"password",type:"password"}))),t,r.createElement(a,{className:c+"__submit",primary:!0,strong:!0,label:this.getGrommetIntlMessage("Log In"),onClick:this._onSubmit}),u)}});e.exports=u},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;ts?l-=l+u-s:0>l&&(l=0),r.top?"top"===r.top?c=i.top:"bottom"===r.top&&(c=i.top+i.height):r.bottom&&("top"===r.bottom?c=i.top-o.height:"bottom"===r.bottom&&(c=i.top+i.height-o.height)),c+o.height>a?c="bottom"===r.top?i.top-o.height:Math.max(i.bottom-o.height,c-(c+o.height-a)):0>c&&(c=0),n.style.left=""+l+"px",n.style.width=""+u+"px",n.style.top=""+c+"px"}};e.exports=a},function(e,t,n){"use strict";var r=n(2),i=r.createClass({displayName:"More",render:function(){var e="control-icon control-icon-more";return this.props.className&&(e+=" "+this.props.className),r.createElement("svg",{className:e,viewBox:"0 0 48 48",version:"1.1"},r.createElement("g",{fill:"none"},r.createElement("rect",{x:"23",y:"23",strokeWidth:"2",width:"2",height:"2"}),r.createElement("rect",{x:"15",y:"23",strokeWidth:"2",width:"2",height:"2"}),r.createElement("rect",{x:"31",y:"23",strokeWidth:"2",width:"2",height:"2"})))}});e.exports=i},function(e,t,n){"use strict";var r=n(2),i=r.createClass({displayName:"DropCaret",render:function(){var e="control-icon control-icon-drop-caret";return this.props.className&&(e+=" "+this.props.className),r.createElement("svg",{className:e,viewBox:"0 0 48 48",version:"1.1"},r.createElement("g",{stroke:"none"},r.createElement("polygon",{points:"33.4,19.7 24.1,30.3 14.8,19.7"})))}});e.exports=i},function(e,t,n){"use strict";function r(e,t,n,r){var i=(r-90)*Math.PI/180;return{x:e+n*Math.cos(i),y:t+n*Math.sin(i)}}function i(e,t,n,i,o){var s=r(e,t,n,o),a=r(e,t,n,i),l=180>=o-i?"0":"1",c=["M",s.x,s.y,"A",n,n,0,l,0,a.x,a.y].join(" ");return c}function o(e,t,n,i,o,s){var a=r(e,t,n-s,o-1),l=r(e,t,n,o-1),c=["M",l.x,l.y,"L",a.x,a.y].join(" ");return c}var s=n(2),a=n(91),l="meter",c=192,u=24,p=u/2,h=192,m=84,d=144,f=s.createClass({displayName:"Meter",propTypes:{important:s.PropTypes.number,large:s.PropTypes.bool,legend:s.PropTypes.bool,legendTotal:s.PropTypes.bool,max:s.PropTypes.oneOfType([s.PropTypes.shape({value:s.PropTypes.number.isRequired,label:s.PropTypes.string}),s.PropTypes.number]),min:s.PropTypes.oneOfType([s.PropTypes.shape({value:s.PropTypes.number.isRequired,label:s.PropTypes.string}),s.PropTypes.number]),series:s.PropTypes.arrayOf(s.PropTypes.shape({label:s.PropTypes.string,value:s.PropTypes.number.isRequired,colorIndex:s.PropTypes.string,important:s.PropTypes.bool,onClick:s.PropTypes.func})),small:s.PropTypes.bool,threshold:s.PropTypes.number,thresholds:s.PropTypes.arrayOf(s.PropTypes.shape({label:s.PropTypes.string,value:s.PropTypes.number.isRequired,colorIndex:s.PropTypes.string})),type:s.PropTypes.oneOf(["bar","arc","circle"]),units:s.PropTypes.string,value:s.PropTypes.number,vertical:s.PropTypes.bool},getDefaultProps:function(){return{type:"bar"}},_initialTimeout:function(){this.setState({initial:!1,activeIndex:this.state.importantIndex}),clearTimeout(this._timeout)},_onActivate:function(e){this.setState({initial:!1,activeIndex:e})},_onResize:function(){clearTimeout(this._resizeTimer),this._resizeTimer=setTimeout(this._layout,50)},_layout:function(){var e=window.innerWidth/window.innerHeight;.8>e?this.setState({legendPosition:"bottom"}):e>1.2&&this.setState({legendPosition:"right"})},_normalizeSeries:function(e,t,n,r){var i=[];if(e.series?i=e.series:e.value&&(i=[{value:e.value,important:!0}]),1===i.length&&e.thresholds){var o=i[0];if(!o.colorIndex){var s=0;r.some(function(e){return s+=e.value,o.value0&&(r[o-1].value=s.value-i,i+=r[o-1].value),o===e.thresholds.length-1&&(r[o].value=n.value-i)}else if(e.threshold){var a=n.value-e.threshold;r=[{value:e.threshold,colorIndex:"unset"},{value:a,colorIndex:"error"}]}else r=[{value:n.value,colorIndex:"unset"}];return r},_importantIndex:function(e){var t=null;return 1===e.length&&(t=0),this.props.hasOwnProperty("important")&&(t=this.props.important),e.some(function(e,n){return e.important?(t=n,!0):void 0}),t},_terminal:function(e){return"number"==typeof e&&(e={value:e}),e},_seriesTotal:function(e){var t=0;return e.some(function(e){t+=e.value}),t},_viewBoxDimensions:function(){var e,t;return"arc"===this.props.type?this.props.vertical?(t=d,e=h):(t=h,e=d):"circle"===this.props.type?(t=h,e=h):"bar"===this.props.type&&(this.props.vertical?(t=u,e=c):(t=c,e=u)),[t,e]},_stateFromProps:function(e){var t;t=e.series&&e.series.length>1?this._seriesTotal(e.series):e.max&&e.max.value?e.max.value:100;var n=this._terminal(e.min||0),r=this._terminal(e.max||t),i=this._normalizeThresholds(e,n,r),o=this._normalizeSeries(e,n,r,i),s=this._importantIndex(o),a=this._viewBoxDimensions(),l={importantIndex:s,activeIndex:s,series:o,thresholds:i,min:n,max:r,total:t,viewBoxWidth:a[0],viewBoxHeight:a[1]};return"arc"===this.props.type?(l.startAngle=60,l.anglePer=240/t,this.props.vertical?l.angleOffset=90:l.angleOffset=180):"circle"===this.props.type?(l.startAngle=1,l.anglePer=358/t,l.angleOffset=180):"bar"===this.props.type&&(l.scale=c/(r.value-n.value)),l},getInitialState:function(){var e=this._stateFromProps(this.props);return e.legendPosition="bottom",e.initial=!0,e},componentDidMount:function(){this._initialTimer=setTimeout(this._initialTimeout,10),window.addEventListener("resize",this._onResize),this._onResize()},componentWillReceiveProps:function(e){var t=this._stateFromProps(e);this.setState(t),this._onResize()},componentWillUnmount:function(){clearTimeout(this._initialTimer),clearTimeout(this._resizeTimer),window.removeEventListener("resize",this._onResize)},_translateBarWidth:function(e){return Math.round(this.state.scale*e)},_barCommands:function(e,t){var n;return n=this.props.vertical?"M"+p+","+(c-e)+" L"+p+","+(c-(e+t)):"M"+e+","+p+" L"+(e+t)+","+p},_renderBar:function(e){var t,n,r=0,i=this.state.min.value,o=e.map(function(e,o){t=[l+"__bar"],o===this.state.activeIndex&&t.push(l+"__bar--active"),t.push("color-index-"+e.colorIndex);var a=e.value-i;i=Math.max(0,i-e.value);var c=this._translateBarWidth(a);return n=this._barCommands(r,c),r+=c,s.createElement("path",{key:o,className:t.join(" "),d:n,onMouseOver:this._onActivate.bind(this,o),onMouseOut:this._onActivate.bind(this,this.state.importantIndex),onClick:e.onClick})},this);return 0===o.length&&(t=[l+"__bar"],t.push(l+"__bar--loading"),t.push("color-index-loading"),n=this._barCommands(0,c),o.push(s.createElement("path",{key:"loading",className:t.join(" "),d:n}))),o},_translateEndAngle:function(e,t){return Math.min(360,Math.max(0,e+this.state.anglePer*t))},_arcCommands:function(e,t){return i(h/2,h/2,m,e+this.state.angleOffset,t+this.state.angleOffset)},_renderArcOrCircle:function(e){var t,n,r,i=this.state.startAngle,o=e.map(function(e,t){var o=[l+"__slice"];return t===this.state.activeIndex&&o.push(l+"__slice--active"),o.push("color-index-"+e.colorIndex),n=this._translateEndAngle(i,e.value),r=this._arcCommands(i,n),i=n,s.createElement("path",{key:e.label||t,fill:"none",className:o.join(" "),d:r,onMouseOver:this._onActivate.bind(this,t),onMouseOut:this._onActivate.bind(this,this.state.importantIndex),onClick:e.onClick})},this);return 0===o.length&&(t=[l+"__slice"],t.push(l+"__slice--loading"),t.push("color-index-loading"),n=this._translateEndAngle(this.state.startAngle,this.state.max.value),r=this._arcCommands(this.state.startAngle,n),o.push(s.createElement("path",{key:"loading",className:t.join(" "),d:r}))),o},_renderSingleIndicator:function(e){var t=null,n=this.state.startAngle;return e.forEach(function(e,r){var i=this._translateEndAngle(n,e.value);if(r===this.state.activeIndex){var a;a="arc"===this.props.type?m:.6*m;var c=o(h/2,h/2,1.1*m,n+this.state.angleOffset,i+this.state.angleOffset,a);t=s.createElement("path",{fill:"none",className:l+"__slice-indicator color-index-"+e.colorIndex,d:c})}n=i},this),t},_renderActive:function(){var e;if(null===this.state.activeIndex)e={value:this.state.total,label:"Total"};else{var t=this.state.series[this.state.activeIndex];e={value:t.value,label:t.label}}return s.createElement("div",{className:l+"__active"},s.createElement("span",{className:l+"__active-value large-number-font"},e.value,s.createElement("span",{className:l+"__active-units large-number-font"},this.props.units)),s.createElement("span",{className:l+"__active-label"},e.label))},_renderLegend:function(){return s.createElement(a,{className:l+"__legend",series:this.state.series,units:this.props.units,activeIndex:this.state.activeIndex,onActive:this._onActive})},render:function(){var e=[l];e.push(l+"--"+this.props.type),e.push(l+"--legend-"+this.state.legendPosition),this.props.vertical&&e.push(l+"--vertical"),this.props.small&&e.push(l+"--small"),this.props.large&&e.push(l+"--large"),0===this.state.series.length?e.push(l+"--loading"):1===this.state.series.length&&e.push(l+"--single"),null!==this.state.activeIndex&&e.push(l+"--active"),this.props.className&&e.push(this.props.className);var t=null,n=null,r=null;"arc"===this.props.type||"circle"===this.props.type?(t=this._renderArcOrCircle(this.state.series),n=this._renderArcOrCircle(this.state.thresholds),1===this.state.series.length&&(r=this._renderSingleIndicator(this.state.series))):"bar"===this.props.type&&(t=this._renderBar(this.state.series),n=this._renderBar(this.state.thresholds));var i=null;this.state.min.label&&(i=s.createElement("div",{className:l+"__label-min"},this.state.min.label));var o=null;this.state.max.label&&(o=s.createElement("div",{className:l+"__label-max"},this.state.max.label));var a=this._renderActive(),c=null;return this.props.legend&&(c=this._renderLegend()),s.createElement("div",{className:e.join(" ")},s.createElement("div",{className:l+"__active-graphic"},s.createElement("div",{className:l+"__labeled-graphic"},s.createElement("svg",{className:l+"__graphic",viewBox:"0 0 "+this.state.viewBoxWidth+" "+this.state.viewBoxHeight,preserveAspectRatio:"xMidYMid meet"},s.createElement("g",{className:l+"__thresholds"},n),s.createElement("g",{className:l+"__values"},t),r),s.createElement("div",{className:l+"__labels-container"},s.createElement("div",{className:l+"__labels"},i,o))),a),c)}});e.exports=f},function(e,t,n){"use strict";var r=n(2),i=r.createClass({displayName:"Panel",propTypes:{direction:r.PropTypes.string,index:r.PropTypes.oneOf([1,2])},render:function(){var e=["panel"];"horizontal"===this.props.direction&&e.push("panel--horizontal"),this.props.index&&e.push("panel--index-"+this.props.index);var t=null;return this.props.title&&(t=r.createElement("h2",{className:"panel__title"},this.props.title)),r.createElement("div",{className:e.join(" ")},t,this.props.children)}});e.exports=i},function(e,t,n){"use strict";var r=n(2),i="radio-button",o=r.createClass({displayName:"RadioButton",propTypes:{checked:r.PropTypes.bool,defaultChecked:r.PropTypes.bool,id:r.PropTypes.string.isRequired,label:r.PropTypes.string.isRequired,name:r.PropTypes.string,onChange:r.PropTypes.func,value:r.PropTypes.string},render:function(){var e=[i];return this.props.className&&e.push(this.props.className),r.createElement("label",{className:e.join(" ")},r.createElement("input",{className:i+"__input",id:this.props.id,name:this.props.name,type:"radio",checked:this.props.checked,defaultChecked:this.props.defaultChecked,value:this.props.value,onChange:this.props.onChange}),r.createElement("span",{className:i+"__control"}),r.createElement("span",{className:i+"__label"},this.props.label))}});e.exports=o},function(e,t,n){"use strict";var r=n(2),i=n(85),o=n(105),s=n(112),a=n(3),l="search",c=r.createClass({displayName:"Search",propTypes:{defaultValue:r.PropTypes.string,dropAlign:o.alignPropType,inline:r.PropTypes.bool,onChange:r.PropTypes.func,placeHolder:r.PropTypes.string,suggestions:r.PropTypes.arrayOf(r.PropTypes.string),value:r.PropTypes.string},getDefaultProps:function(){return{align:"left",inline:!1,placeHolder:"Search",dropAlign:{top:"top",left:"left"}}},mixins:[i,a],_onAddDrop:function(e){e.preventDefault(),this.setState({dropActive:!0,activeSuggestionIndex:-1})},_onRemoveDrop:function(){this.setState({dropActive:!1})},_onFocusControl:function(){this.setState({controlFocused:!0,dropActive:!0,activeSuggestionIndex:-1})},_onBlurControl:function(){this.setState({controlFocused:!1})},_onFocusInput:function(){this.refs.input.getDOMNode().select(),this.setState({dropActive:!this.state.inline||this.props.suggestions,activeSuggestionIndex:-1})},_onBlurInput:function(){},_onChangeInput:function(e){this.setState({activeSuggestionIndex:-1}),this.props.onChange&&this.props.onChange(e.target.value)},_onNextSuggestion:function(){var e=this.state.activeSuggestionIndex;e=Math.min(e+1,this.props.suggestions.length-1),this.setState({activeSuggestionIndex:e})},_onPreviousSuggestion:function(){var e=this.state.activeSuggestionIndex;e=Math.max(e-1,0),this.setState({activeSuggestionIndex:e})},_onEnter:function(){if(this.state.activeSuggestionIndex>=0){var e=this.props.suggestions[this.state.activeSuggestionIndex];this.props.onChange&&this.props.onChange(e)}this._onRemoveDrop()},_onClickSuggestion:function(e){this.props.onChange&&this.props.onChange(e),this._onRemoveDrop()},_onSink:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},getInitialState:function(){return{align:"left",controlFocused:!1,inline:this.props.inline,dropActive:!1,activeSuggestionIndex:-1}},componentDidUpdate:function(e,t){var n={esc:this._onRemoveDrop,tab:this._onRemoveDrop,up:this._onPreviousSuggestion,down:this._onNextSuggestion,enter:this._onEnter},r={space:this._onAddDrop};if(!this.state.controlFocused&&t.controlFocused&&this.stopListeningToKeyboard(r),!this.state.dropActive&&t.dropActive&&(document.removeEventListener("click",this._onRemoveDrop),this.stopListeningToKeyboard(n),this._drop&&(this._drop.remove(),this._drop=null)),this.state.controlFocused&&!t.controlFocused&&this.startListeningToKeyboard(r),this.state.dropActive&&!t.dropActive){document.addEventListener("click",this._onRemoveDrop),this.startListeningToKeyboard(n);var i=(this.refs.control?this.refs.control:this.refs.input).getDOMNode();this._drop=o.add(i,this._renderDrop(),this.props.dropAlign),document.getElementById("search-drop-input").focus()}},componentWillUnmount:function(){document.removeEventListener("click",this._onRemoveDrop)},focus:function(){var e=this.refs.input||this.refs.control;e&&e.getDOMNode().focus()},_createControl:function(){var e=l+"__control";return r.createElement("div",{className:e},r.createElement(s,null))},_classes:function(e){var t=[e];return this.state.inline?t.push(e+"--inline"):t.push(e+"--controlled"),t},_renderDrop:function(){var e=this._classes(l+"__drop"),t=null;this.props.suggestions&&(t=this.props.suggestions.map(function(e,t){var n=[l+"__suggestion"];return t===this.state.activeSuggestionIndex&&n.push(l+"__suggestion--active"),r.createElement("div",{key:e,className:n.join(" "),onClick:this._onClickSuggestion.bind(this,e)},e)},this));var n=r.createElement("div",{className:l+"__drop-contents",onClick:this._onSink},r.createElement("input",{id:"search-drop-input",type:"search",defaultValue:this.props.defaultValue,value:this.props.value,className:l+"__input",onChange:this._onChangeInput}),r.createElement("div",{className:l+"__suggestions"},t));if(!this.state.inline){var i=this._createControl(),o=!this.props.dropAlign.left,s=o?n:i,a=o?i:n;n=r.createElement("div",{className:l+"__drop-header"},s,a)}return r.createElement("div",{id:"search-drop",className:e.join(" ")},n)},render:function(){var e=this._classes(l);if(this.props.className&&e.push(this.props.className),this.state.inline){var t=this.props.suggestions?!0:!1;return r.createElement("div",{className:e.join(" ")},r.createElement("input",{ref:"input",type:"search",placeholder:this.getGrommetIntlMessage(this.props.placeHolder),defaultValue:this.props.defaultValue,value:this.props.value,className:l+"__input",readOnly:t,onFocus:this._onFocusInput,onBlur:this._onBlurInput,onChange:this._onChangeInput}))}var n=this._createControl();return r.createElement("div",{ref:"control",className:e.join(" "),tabIndex:"0",onClick:this._onAddDrop,onFocus:this._onFocusControl,onBlur:this._onBlurControl},n)}});e.exports=c},function(e,t,n){"use strict";var r=n(2),i=r.createClass({displayName:"Search",render:function(){var e="control-icon control-icon-search";return this.props.className&&(e+=" "+this.props.className),r.createElement("svg",{className:e,viewBox:"0 0 48 48",version:"1.1"},r.createElement("g",{fill:"none"},r.createElement("circle",{strokeWidth:"2",cx:"21.5",cy:"21.5",r:"9"}),r.createElement("line",{strokeWidth:"2",x1:"35.5",y1:"35.5",x2:"27.8",y2:"27.8"})))}});e.exports=i},function(e,t,n){"use strict";var r=n(2),i=n(85),o=n(105),s=n(112),a="search-input",l=r.createClass({displayName:"SearchInput",propTypes:{defaultValue:r.PropTypes.oneOfType([r.PropTypes.shape({label:r.PropTypes.string,value:r.PropTypes.string}),r.PropTypes.string]),id:r.PropTypes.string,name:r.PropTypes.string,onChange:r.PropTypes.func,placeHolder:r.PropTypes.string,suggestions:r.PropTypes.arrayOf(r.PropTypes.oneOfType([r.PropTypes.shape({label:r.PropTypes.string,value:r.PropTypes.string}),r.PropTypes.string])),value:r.PropTypes.oneOfType([r.PropTypes.shape({label:r.PropTypes.string,value:r.PropTypes.string}),r.PropTypes.string])},mixins:[i],_onInputChange:function(e){this.setState({dropActive:!0,activeSuggestionIndex:-1}),this.props.onChange(e.target.value,!1)},_onAddDrop:function(e){e.preventDefault(),this.setState({dropActive:!0,activeSuggestionIndex:-1})},_onRemoveDrop:function(){this.setState({dropActive:!1})},_onNextSuggestion:function(){var e=this.state.activeSuggestionIndex;e=Math.min(e+1,this.props.suggestions.length-1),this.setState({activeSuggestionIndex:e})},_onPreviousSuggestion:function(){var e=this.state.activeSuggestionIndex;e=Math.max(e-1,0),this.setState({activeSuggestionIndex:e})},_onEnter:function(){if(this.setState({dropActive:!1}),this.state.activeSuggestionIndex>=0){var e=this.props.suggestions[this.state.activeSuggestionIndex];this.setState({value:e}),this.props.onChange(e,!0)}},_onClickSuggestion:function(e){this.setState({value:e,dropActive:!1}),this.props.onChange(e,!0)},_onFocus:function(){this.refs.input.getDOMNode().select(),this.setState({focused:!0,dropActive:!1,activeSuggestionIndex:-1})},_onBlur:function(){this.setState({focused:!1,dropActive:!1,activeSuggestionIndex:-1})},getInitialState:function(){return{dropActive:!1,defaultValue:this.props.defaultValue,value:this.props.value,activeSuggestionIndex:-1}},componentDidUpdate:function(e,t){var n={esc:this._onRemoveDrop,tab:this._onRemoveDrop,up:this._onPreviousSuggestion,down:this._onNextSuggestion,enter:this._onEnter},r={down:this._onAddDrop};!this.state.focused&&t.focused&&this.stopListeningToKeyboard(r),!this.state.dropActive&&t.dropActive&&(document.removeEventListener("click",this._onRemoveDrop),this.stopListeningToKeyboard(n),this._drop&&(this._drop.remove(),this._drop=null)),this.state.focused&&!t.focused&&this.startListeningToKeyboard(r),this.state.dropActive&&!t.dropActive?(document.addEventListener("click",this._onRemoveDrop),this.startListeningToKeyboard(n),this._drop=o.add(this.refs.component.getDOMNode(),this._renderDrop(),{top:"bottom",left:"left"})):this.state.dropActive&&t.dropActive&&this._drop.render(this._renderDrop())},componentWillUnmount:function(){document.removeEventListener("click",this._onRemoveDrop)},_valueText:function(e){var t="";return e&&(t="string"==typeof e?e:e.label||e.value),t},_renderDrop:function(){var e=null;return this.props.suggestions&&(e=this.props.suggestions.map(function(e,t){var n=[a+"__suggestion"];return t===this.state.activeSuggestionIndex&&n.push(a+"__suggestion--active"),r.createElement("li",{key:this._valueText(e),className:n.join(" "),onClick:this._onClickSuggestion.bind(this,e)},this._valueText(e))},this)),r.createElement("ol",{className:a+"__suggestions",onClick:this._onRemoveDrop},e)},render:function(){var e=[a];return this.state.active&&e.push(a+"--active"),this.props.className&&e.push(this.props.className),r.createElement("div",{ref:"component",className:e.join(" ")},r.createElement("input",{ref:"input",className:a+"__input",id:this.props.id,name:this.props.name,value:this._valueText(this.props.value),defaultValue:this._valueText(this.props.defaultValue),placeholder:this.props.placeHolder,onChange:this._onInputChange,onFocus:this._onFocus,onBlur:this._onBlur}),r.createElement("div",{className:a+"__control",onClick:this._onAddDrop},r.createElement(s,null)))}});e.exports=l},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;ti;i++){t=arguments[i];for(n in t)if(Object.getOwnPropertyDescriptor&&Object.defineProperty){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s)}else e[n]=t[n]}return e},t.isFunction=function(e){return"function"==typeof e},t.EventEmitter=n(146),t.nextTick=function(e){setTimeout(e,0)},t.capitalize=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},t.callbackName=function(e){return"on"+t.capitalize(e)},t.object=function(e,t){for(var n={},r=0;rt;t++)r[t]=this._events[e][t].fn;return r},r.prototype.emit=function(e,t,n,r,i,o){if(!this._events||!this._events[e])return!1;var s,a,l=this._events[e],c=arguments.length;if("function"==typeof l.fn){switch(l.once&&this.removeListener(e,l.fn,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,n),!0;case 4:return l.fn.call(l.context,t,n,r),!0;case 5:return l.fn.call(l.context,t,n,r,i),!0;case 6:return l.fn.call(l.context,t,n,r,i,o),!0}for(a=1,s=new Array(c-1);c>a;a++)s[a-1]=arguments[a];l.fn.apply(l.context,s)}else{var u,p=l.length;for(a=0;p>a;a++)switch(l[a].once&&this.removeListener(e,l[a].fn,!0),c){case 1:l[a].fn.call(l[a].context);break;case 2:l[a].fn.call(l[a].context,t);break;case 3:l[a].fn.call(l[a].context,t,n);break;default:if(!s)for(u=1,s=new Array(c-1);c>u;u++)s[u-1]=arguments[u];l[a].fn.apply(l[a].context,s)}}return!0},r.prototype.on=function(e,t,r){var i=new n(t,r||this);return this._events||(this._events={}),this._events[e]?this._events[e].fn?this._events[e]=[this._events[e],i]:this._events[e].push(i):this._events[e]=i,this},r.prototype.once=function(e,t,r){var i=new n(t,r||this,!0);return this._events||(this._events={}),this._events[e]?this._events[e].fn?this._events[e]=[this._events[e],i]:this._events[e].push(i):this._events[e]=i,this},r.prototype.removeListener=function(e,t,n){if(!this._events||!this._events[e])return this;var r=this._events[e],i=[];if(t&&(r.fn&&(r.fn!==t||n&&!r.once)&&i.push(r),!r.fn))for(var o=0,s=r.length;s>o;o++)(r[o].fn!==t||n&&!r[o].once)&&i.push(r[o]);return i.length?this._events[e]=1===i.length?i[0]:i:delete this._events[e],this},r.prototype.removeAllListeners=function(e){return this._events?(e?delete this._events[e]:this._events={},this):this},r.prototype.off=r.prototype.removeListener,r.prototype.addListener=r.prototype.on,r.prototype.setMaxListeners=function(){return this},r.EventEmitter=r,r.EventEmitter2=r,r.EventEmitter3=r,e.exports=r},function(e,t,n){var r;(function(i,o){/*! Native Promise Only v0.7.8-a (c) Kyle Simpson MIT License: http://getify.mit-license.org */ -!function(i,s,a){s[i]=s[i]||a(),"undefined"!=typeof e&&e.exports?e.exports=s[i]:!0&&n(104)&&(r=function(){return s[i]}.call(t,n,t,e),!(void 0!==r&&(e.exports=r)))}("Promise","undefined"!=typeof i?i:this,function(){"use strict";function e(e,t){m.add(e,t),h||(h=f(m.drain))}function t(e){var t,n=typeof e;return null==e||"object"!=n&&"function"!=n||(t=e.then),"function"==typeof t?t:!1}function n(){for(var e=0;e0&&e(n,c))}catch(u){a.call(o||new l(c),u)}}}function a(t){var r=this;r.triggered||(r.triggered=!0,r.def&&(r=r.def),r.msg=t,r.state=2,r.chain.length>0&&e(n,r))}function o(e,t,n,r){for(var i=0;i=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},t.setImmediate="function"==typeof e?e:function(e){var n=c++,r=arguments.length<2?!1:o.call(arguments,1);return l[n]=!0,s(function(){l[n]&&(r?e.apply(null,r):e.call(null),t.clearImmediate(n))}),n},t.clearImmediate="function"==typeof r?r:function(e){delete l[e]}}).call(t,n(102).setImmediate,n(102).clearImmediate)},function(e,t){function n(){c=!1,a.length?l=a.concat(l):u=-1,l.length&&r()}function r(){if(!c){var e=setTimeout(n);c=!0;for(var t=l.length;t;){for(a=l,l=[];++u1)for(var n=1;nt;t++)l.throwIf(this.validateListening(a[t]));for(t=0;u>t;t++)h.push(a[t].listen(s(t,p),this));return i(p),n={listenable:a},n.stop=r(n,h,this),this.subscriptions=(this.subscriptions||[]).concat(n),n}}},function(e,t,n){var r=n(99),i=n(95),s=n(107),a=n(108),o={preEmit:1,shouldEmit:1},l=n(109);e.exports=function(e){function t(){var t,n=0;if(this.subscriptions=[],this.emitter=new r.EventEmitter,this.eventLabel="change",l(this,e),this.init&&r.isFunction(this.init)&&this.init(),this.listenables)for(t=[].concat(this.listenables);n1&&(n.init=function(){var e=arguments;t.init.forEach(function(t){t.apply(this,e)},this)}),t.preEmit.length>1&&(n.preEmit=function(){return t.preEmit.reduce(function(e,t){var n=t.apply(this,e);return void 0===n?e:[n]}.bind(this),arguments)}),t.shouldEmit.length>1&&(n.shouldEmit=function(){var e=arguments;return!t.shouldEmit.some(function(t){return!t.apply(this,e)},this)}),Object.keys(t).forEach(function(e){1===t[e].length&&(n[e]=t[e][0])}),n}},function(e,t){e.exports=function(e,t){for(var n in t)if(Object.getOwnPropertyDescriptor&&Object.defineProperty){var r=Object.getOwnPropertyDescriptor(t,n);if(!r.value||"function"!=typeof r.value||!t.hasOwnProperty(n))continue;e[n]=t[n].bind(e)}else{var i=t[n];if("function"!=typeof i||!t.hasOwnProperty(n))continue;e[n]=i.bind(e)}return e}},function(e,t,n){var r=n(99);e.exports={preEmit:function(){},shouldEmit:function(){return!0},listen:function(e,t){t=t||this;var n=function(n){i||e.apply(t,n)},r=this,i=!1;return this.emitter.addListener(this.eventLabel,n),function(){i=!0,r.emitter.removeListener(r.eventLabel,n)}},promise:function(e){var t=this,n=this.children.indexOf("completed")>=0&&this.children.indexOf("failed")>=0;if(!n)throw new Error('Publisher must have "completed" and "failed" child publishers');e.then(function(e){return t.completed(e)},function(e){return t.failed(e)})},listenAndPromise:function(e,t){var n=this;t=t||this,this.willCallPromise=(this.willCallPromise||0)+1;var r=this.listen(function(){if(!e)throw new Error("Expected a function returning a promise but got "+e);var r=arguments,i=e.apply(t,r);return n.promise.call(n,i)},t);return function(){n.willCallPromise--,r.call(n)}},trigger:function(){var e=arguments,t=this.preEmit.apply(this,e);e=void 0===t?e:r.isArguments(t)?t:[].concat(t),this.shouldEmit.apply(this,e)&&this.emitter.emit(this.eventLabel,e)},triggerAsync:function(){var e=arguments,t=this;r.nextTick(function(){t.trigger.apply(t,e)})},triggerPromise:function(){var e=this,t=arguments,n=this.children.indexOf("completed")>=0&&this.children.indexOf("failed")>=0,i=r.createPromise(function(i,s){if(e.willCallPromise)return void r.nextTick(function(){var n=e.promise;e.promise=function(t){return t.then(i,s),e.promise=n,e.promise.apply(e,arguments)},e.trigger.apply(e,t)});if(n)var a=e.completed.listen(function(e){a(),o(),i(e)}),o=e.failed.listen(function(e){a(),o(),s(e)});e.triggerAsync.apply(e,t),n||i()});return i}}},function(e,t){e.exports={}},function(e,t,n){var r=n(99),i=n(95),s=n(107),a={preEmit:1,shouldEmit:1},o=function(e){e=e||{},r.isObject(e)||(e={actionName:e});for(var t in i.ActionMethods)if(!a[t]&&i.PublisherMethods[t])throw new Error("Cannot override API method "+t+" in Reflux.ActionMethods. Use another method name or override it on Reflux.PublisherMethods instead.");for(var n in e)if(!a[n]&&i.PublisherMethods[n])throw new Error("Cannot override API method "+n+" in action creation. Use another method name or override it on Reflux.PublisherMethods instead.");e.children=e.children||[],e.asyncResult&&(e.children=e.children.concat(["completed","failed"]));for(var l=0,c={};ls;++s)n=i[s],t=n.split("="),r[decodeURIComponent(t[0])]=decodeURIComponent(t[1]);return r}function l(e){var t,n,r,i,s=e.split(/\r?\n/),a={};s.pop();for(var o=0,l=s.length;l>o;++o)n=s[o],t=n.indexOf(":"),r=n.slice(0,t).toLowerCase(),i=y(n.slice(t+1)),a[r]=i;return a}function c(e){return e.split(/ *; */).shift()}function u(e){return f(e.split(/ *; */),function(e,t){var n=t.split(/ *= */),r=n.shift(),i=n.shift();return r&&i&&(e[r]=i),e},{})}function p(e,t){t=t||{},this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||"undefined"==typeof this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText,this.setStatusProperties(this.xhr.status),this.header=this.headers=l(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this.setHeaderProperties(this.header),this.body="HEAD"!=this.req.method?this.parseBody(this.text?this.text:this.xhr.response):null}function h(e,t){var n=this;d.call(this),this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",function(){var e=null,t=null;try{t=new p(n)}catch(r){return e=new Error("Parser is unable to parse the response"),e.parse=!0,e.original=r,n.callback(e)}if(n.emit("response",t),e)return n.callback(e,t);if(t.status>=200&&t.status<300)return n.callback(e,t);var i=new Error(t.statusText||"Unsuccessful HTTP response");i.original=e,i.response=t,i.status=t.status,n.callback(e||i,t)})}function m(e,t){return"function"==typeof t?new h("GET",e).end(t):1==arguments.length?new h("GET",e):new h(e,t)}var d=n(119),f=n(120),g="undefined"==typeof window?this||self:window;m.getXHR=function(){if(!(!g.XMLHttpRequest||g.location&&"file:"==g.location.protocol&&g.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}return!1};var y="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};m.serializeObject=a,m.parseString=o,m.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},m.serialize={"application/x-www-form-urlencoded":a,"application/json":JSON.stringify},m.parse={"application/x-www-form-urlencoded":o,"application/json":JSON.parse},p.prototype.get=function(e){return this.header[e.toLowerCase()]},p.prototype.setHeaderProperties=function(e){var t=this.header["content-type"]||"";this.type=c(t);var n=u(t);for(var r in n)this[r]=n[r]},p.prototype.parseBody=function(e){var t=m.parse[this.type];return t&&e&&(e.length||e instanceof Object)?t(e):null},p.prototype.setStatusProperties=function(e){1223===e&&(e=204);var t=e/100|0;this.status=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.clientError=4==t,this.serverError=5==t,this.error=4==t||5==t?this.toError():!1,this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.notFound=404==e,this.forbidden=403==e},p.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,r="cannot "+t+" "+n+" ("+this.status+")",i=new Error(r);return i.status=this.status,i.method=t,i.url=n,i},m.Response=p,d(h.prototype),h.prototype.use=function(e){return e(this),this},h.prototype.timeout=function(e){return this._timeout=e,this},h.prototype.clearTimeout=function(){return this._timeout=0,clearTimeout(this._timer),this},h.prototype.abort=function(){return this.aborted?void 0:(this.aborted=!0,this.xhr.abort(),this.clearTimeout(),this.emit("abort"),this)},h.prototype.set=function(e,t){if(s(e)){for(var n in e)this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},h.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},h.prototype.getHeader=function(e){return this._header[e.toLowerCase()]},h.prototype.type=function(e){return this.set("Content-Type",m.types[e]||e),this},h.prototype.accept=function(e){return this.set("Accept",m.types[e]||e),this},h.prototype.auth=function(e,t){var n=btoa(e+":"+t);return this.set("Authorization","Basic "+n),this},h.prototype.query=function(e){return"string"!=typeof e&&(e=a(e)),e&&this._query.push(e),this},h.prototype.field=function(e,t){return this._formData||(this._formData=new g.FormData),this._formData.append(e,t),this},h.prototype.attach=function(e,t,n){return this._formData||(this._formData=new g.FormData),this._formData.append(e,t,n),this},h.prototype.send=function(e){var t=s(e),n=this.getHeader("Content-Type");if(t&&s(this._data))for(var r in e)this._data[r]=e[r];else"string"==typeof e?(n||this.type("form"),n=this.getHeader("Content-Type"),"application/x-www-form-urlencoded"==n?this._data=this._data?this._data+"&"+e:e:this._data=(this._data||"")+e):this._data=e;return!t||i(e)?this:(n||this.type("json"),this)},h.prototype.callback=function(e,t){var n=this._callback;this.clearTimeout(),n(e,t)},h.prototype.crossDomainError=function(){var e=new Error("Origin is not allowed by Access-Control-Allow-Origin");e.crossDomain=!0,this.callback(e)},h.prototype.timeoutError=function(){var e=this._timeout,t=new Error("timeout of "+e+"ms exceeded");t.timeout=e,this.callback(t)},h.prototype.withCredentials=function(){return this._withCredentials=!0,this},h.prototype.end=function(e){var t=this,n=this.xhr=m.getXHR(),s=this._query.join("&"),a=this._timeout,o=this._formData||this._data;this._callback=e||r,n.onreadystatechange=function(){if(4==n.readyState){var e;try{e=n.status}catch(r){e=0}if(0==e){if(t.timedout)return t.timeoutError();if(t.aborted)return;return t.crossDomainError()}t.emit("end")}};var l=function(e){e.total>0&&(e.percent=e.loaded/e.total*100),t.emit("progress",e)};this.hasListeners("progress")&&(n.onprogress=l);try{n.upload&&this.hasListeners("progress")&&(n.upload.onprogress=l)}catch(c){}if(a&&!this._timer&&(this._timer=setTimeout(function(){t.timedout=!0,t.abort()},a)),s&&(s=m.serializeObject(s),this.url+=~this.url.indexOf("?")?"&"+s:"?"+s),n.open(this.method,this.url,!0),this._withCredentials&&(n.withCredentials=!0),"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof o&&!i(o)){var u=m.serialize[this.getHeader("Content-Type")];u&&(o=u(o))}for(var p in this.header)null!=this.header[p]&&n.setRequestHeader(p,this.header[p]);return this.emit("request",this),n.send(o),this},m.Request=h,m.get=function(e,t,n){var r=m("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},m.head=function(e,t,n){var r=m("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},m.del=function(e,t){var n=m("DELETE",e);return t&&n.end(t),n},m.patch=function(e,t,n){var r=m("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},m.post=function(e,t,n){var r=m("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},m.put=function(e,t,n){var r=m("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},e.exports=m},function(e,t){function n(e){return e?r(e):void 0}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(){r.off(e,n),t.apply(this,arguments)}var r=this;return this._callbacks=this._callbacks||{},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;ir;++r)n[r].apply(this,t)}return this},n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[e]||[]},n.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t){e.exports=function(e,t,n){for(var r=0,i=e.length,s=3==arguments.length?n:e[r++];i>r;)s=t.call(null,s,e[r],++r,e);return s}},function(e,t,n){var r=n(94),i=n(93),s=n(122),a="token",o="user",l="loginTime",c="email",u=r.createStore({_data:{id:null,name:null,created:null,email:null,loginError:null},init:function(){this._data.id=s.get(a),this._data.name=s.get(o),this._data.created=s.get(l),this._data.email=s.get(c),this.listenTo(i.login.completed,this._onLoginCompleted),this.listenTo(i.login.failed,this._onLoginFailed),this.listenTo(i.logout,this._onLogout)},_onLoginCompleted:function(e,t){this._data.id=t,this._data.name=e,this._data.created=new Date,this._data.loginError=null,-1!==e.indexOf("@")&&(this._data.email=e),s.set(a,this._data.id),s.set(o,this._data.name),s.set(l,this._data.created),s.set(c,this._data.email),this.trigger(this._data)},_onLoginFailed:function(e,t){this._data.loginError={message:t.message,resolution:t.resolution},this.trigger(this._data)},_onLogout:function(){this._data.id=null,this._data.name=null,this._data.created=null,this._data.email=null,s.remove(a),s.remove(o),s.remove(l),s.remove(c),this.trigger(this._data)},getInitialState:function(){return this._data}});e.exports=u},function(e,t){var n={get:function(e){return e?decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null:null},set:function(e,t,n,r,i,s){if(!e||/^(?:expires|max\-age|path|domain|secure)$/i.test(e))return!1;var a="";if(n)switch(n.constructor){case Number:a=n===1/0?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+n;break;case String:a="; expires="+n;break;case Date:a="; expires="+n.toUTCString()}return document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+a+(i?"; domain="+i:"")+(r?"; path="+r:"")+(s?"; secure":""),!0},remove:function(e,t,n){return this.has(e)?(document.cookie=encodeURIComponent(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(n?"; domain="+n:"")+(t?"; path="+t:""),!0):!1},has:function(e){return e?new RegExp("(?:^|;\\s*)"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(document.cookie):!1},keys:function(){for(var e=document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g,"").split(/\s*(?:\=[^;]*)?;\s*/),t=e.length,n=0;t>n;n++)e[n]=decodeURIComponent(e[n]);return e}};e.exports=n}]); \ No newline at end of file +!function(i,o,s){o[i]=o[i]||s(),"undefined"!=typeof e&&e.exports?e.exports=o[i]:!0&&n(150)&&(r=function(){return o[i]}.call(t,n,t,e),!(void 0!==r&&(e.exports=r)))}("Promise","undefined"!=typeof i?i:this,function(){"use strict";function e(e,t){m.add(e,t),h||(h=f(m.drain))}function t(e){var t,n=typeof e;return null==e||"object"!=n&&"function"!=n||(t=e.then),"function"==typeof t?t:!1}function n(){for(var e=0;e0&&e(n,c))}catch(u){s.call(a||new l(c),u)}}}function s(t){var r=this;r.triggered||(r.triggered=!0,r.def&&(r=r.def),r.msg=t,r.state=2,r.chain.length>0&&e(n,r))}function a(e,t,n,r){for(var i=0;i=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},t.setImmediate="function"==typeof e?e:function(e){var n=c++,r=arguments.length<2?!1:a.call(arguments,1);return l[n]=!0,o(function(){l[n]&&(r?e.apply(null,r):e.call(null),t.clearImmediate(n))}),n},t.clearImmediate="function"==typeof r?r:function(e){delete l[e]}}).call(t,n(148).setImmediate,n(148).clearImmediate)},function(e,t){function n(){c=!1,s.length?l=s.concat(l):u=-1,l.length&&r()}function r(){if(!c){var e=setTimeout(n);c=!0;for(var t=l.length;t;){for(s=l,l=[];++u1)for(var n=1;nt;t++)l.throwIf(this.validateListening(s[t]));for(t=0;u>t;t++)h.push(s[t].listen(o(t,p),this));return i(p),n={listenable:s},n.stop=r(n,h,this),this.subscriptions=(this.subscriptions||[]).concat(n),n}}},function(e,t,n){var r=n(145),i=n(141),o=n(153),s=n(154),a={preEmit:1,shouldEmit:1},l=n(155);e.exports=function(e){function t(){var t,n=0;if(this.subscriptions=[],this.emitter=new r.EventEmitter,this.eventLabel="change",l(this,e),this.init&&r.isFunction(this.init)&&this.init(),this.listenables)for(t=[].concat(this.listenables);n1&&(n.init=function(){var e=arguments;t.init.forEach(function(t){t.apply(this,e)},this)}),t.preEmit.length>1&&(n.preEmit=function(){return t.preEmit.reduce(function(e,t){var n=t.apply(this,e);return void 0===n?e:[n]}.bind(this),arguments)}),t.shouldEmit.length>1&&(n.shouldEmit=function(){var e=arguments;return!t.shouldEmit.some(function(t){return!t.apply(this,e)},this)}),Object.keys(t).forEach(function(e){1===t[e].length&&(n[e]=t[e][0])}),n}},function(e,t){e.exports=function(e,t){for(var n in t)if(Object.getOwnPropertyDescriptor&&Object.defineProperty){var r=Object.getOwnPropertyDescriptor(t,n);if(!r.value||"function"!=typeof r.value||!t.hasOwnProperty(n))continue;e[n]=t[n].bind(e)}else{var i=t[n];if("function"!=typeof i||!t.hasOwnProperty(n))continue;e[n]=i.bind(e)}return e}},function(e,t,n){var r=n(145);e.exports={preEmit:function(){},shouldEmit:function(){return!0},listen:function(e,t){t=t||this;var n=function(n){i||e.apply(t,n)},r=this,i=!1;return this.emitter.addListener(this.eventLabel,n),function(){i=!0,r.emitter.removeListener(r.eventLabel,n)}},promise:function(e){var t=this,n=this.children.indexOf("completed")>=0&&this.children.indexOf("failed")>=0;if(!n)throw new Error('Publisher must have "completed" and "failed" child publishers');e.then(function(e){return t.completed(e)},function(e){return t.failed(e)})},listenAndPromise:function(e,t){var n=this;t=t||this,this.willCallPromise=(this.willCallPromise||0)+1;var r=this.listen(function(){if(!e)throw new Error("Expected a function returning a promise but got "+e);var r=arguments,i=e.apply(t,r);return n.promise.call(n,i)},t);return function(){n.willCallPromise--,r.call(n)}},trigger:function(){var e=arguments,t=this.preEmit.apply(this,e);e=void 0===t?e:r.isArguments(t)?t:[].concat(t),this.shouldEmit.apply(this,e)&&this.emitter.emit(this.eventLabel,e)},triggerAsync:function(){var e=arguments,t=this;r.nextTick(function(){t.trigger.apply(t,e)})},triggerPromise:function(){var e=this,t=arguments,n=this.children.indexOf("completed")>=0&&this.children.indexOf("failed")>=0,i=r.createPromise(function(i,o){if(e.willCallPromise)return void r.nextTick(function(){var n=e.promise;e.promise=function(t){return t.then(i,o),e.promise=n,e.promise.apply(e,arguments)},e.trigger.apply(e,t)});if(n)var s=e.completed.listen(function(e){s(),a(),i(e)}),a=e.failed.listen(function(e){s(),a(),o(e)});e.triggerAsync.apply(e,t),n||i()});return i}}},function(e,t){e.exports={}},function(e,t,n){var r=n(145),i=n(141),o=n(153),s={preEmit:1,shouldEmit:1},a=function(e){e=e||{},r.isObject(e)||(e={actionName:e});for(var t in i.ActionMethods)if(!s[t]&&i.PublisherMethods[t])throw new Error("Cannot override API method "+t+" in Reflux.ActionMethods. Use another method name or override it on Reflux.PublisherMethods instead.");for(var n in e)if(!s[n]&&i.PublisherMethods[n])throw new Error("Cannot override API method "+n+" in action creation. Use another method name or override it on Reflux.PublisherMethods instead.");e.children=e.children||[],e.asyncResult&&(e.children=e.children.concat(["completed","failed"]));for(var l=0,c={};lo;++o)n=i[o],t=n.split("="),r[decodeURIComponent(t[0])]=decodeURIComponent(t[1]);return r}function l(e){var t,n,r,i,o=e.split(/\r?\n/),s={};o.pop();for(var a=0,l=o.length;l>a;++a)n=o[a],t=n.indexOf(":"),r=n.slice(0,t).toLowerCase(),i=v(n.slice(t+1)),s[r]=i;return s}function c(e){return e.split(/ *; */).shift()}function u(e){return f(e.split(/ *; */),function(e,t){var n=t.split(/ *= */),r=n.shift(),i=n.shift();return r&&i&&(e[r]=i),e},{})}function p(e,t){t=t||{},this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||"undefined"==typeof this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText,this.setStatusProperties(this.xhr.status),this.header=this.headers=l(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this.setHeaderProperties(this.header),this.body="HEAD"!=this.req.method?this.parseBody(this.text?this.text:this.xhr.response):null}function h(e,t){var n=this;d.call(this),this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",function(){var e=null,t=null;try{t=new p(n)}catch(r){return e=new Error("Parser is unable to parse the response"),e.parse=!0,e.original=r,n.callback(e)}if(n.emit("response",t),e)return n.callback(e,t);if(t.status>=200&&t.status<300)return n.callback(e,t);var i=new Error(t.statusText||"Unsuccessful HTTP response");i.original=e,i.response=t,i.status=t.status,n.callback(e||i,t)})}function m(e,t){return"function"==typeof t?new h("GET",e).end(t):1==arguments.length?new h("GET",e):new h(e,t)}var d=n(165),f=n(166),g="undefined"==typeof window?this||self:window;m.getXHR=function(){if(!(!g.XMLHttpRequest||g.location&&"file:"==g.location.protocol&&g.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}return!1};var v="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};m.serializeObject=s,m.parseString=a,m.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},m.serialize={"application/x-www-form-urlencoded":s,"application/json":JSON.stringify},m.parse={"application/x-www-form-urlencoded":a,"application/json":JSON.parse},p.prototype.get=function(e){return this.header[e.toLowerCase()]},p.prototype.setHeaderProperties=function(e){var t=this.header["content-type"]||"";this.type=c(t);var n=u(t);for(var r in n)this[r]=n[r]},p.prototype.parseBody=function(e){var t=m.parse[this.type];return t&&e&&(e.length||e instanceof Object)?t(e):null},p.prototype.setStatusProperties=function(e){1223===e&&(e=204);var t=e/100|0;this.status=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.clientError=4==t,this.serverError=5==t,this.error=4==t||5==t?this.toError():!1,this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.notFound=404==e,this.forbidden=403==e},p.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,r="cannot "+t+" "+n+" ("+this.status+")",i=new Error(r);return i.status=this.status,i.method=t,i.url=n,i},m.Response=p,d(h.prototype),h.prototype.use=function(e){return e(this),this},h.prototype.timeout=function(e){return this._timeout=e,this},h.prototype.clearTimeout=function(){return this._timeout=0,clearTimeout(this._timer),this},h.prototype.abort=function(){return this.aborted?void 0:(this.aborted=!0,this.xhr.abort(),this.clearTimeout(),this.emit("abort"),this)},h.prototype.set=function(e,t){if(o(e)){for(var n in e)this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},h.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},h.prototype.getHeader=function(e){return this._header[e.toLowerCase()]},h.prototype.type=function(e){return this.set("Content-Type",m.types[e]||e),this},h.prototype.accept=function(e){return this.set("Accept",m.types[e]||e),this},h.prototype.auth=function(e,t){var n=btoa(e+":"+t);return this.set("Authorization","Basic "+n),this},h.prototype.query=function(e){return"string"!=typeof e&&(e=s(e)),e&&this._query.push(e),this},h.prototype.field=function(e,t){return this._formData||(this._formData=new g.FormData),this._formData.append(e,t),this},h.prototype.attach=function(e,t,n){return this._formData||(this._formData=new g.FormData),this._formData.append(e,t,n),this},h.prototype.send=function(e){var t=o(e),n=this.getHeader("Content-Type");if(t&&o(this._data))for(var r in e)this._data[r]=e[r];else"string"==typeof e?(n||this.type("form"),n=this.getHeader("Content-Type"),"application/x-www-form-urlencoded"==n?this._data=this._data?this._data+"&"+e:e:this._data=(this._data||"")+e):this._data=e;return!t||i(e)?this:(n||this.type("json"),this)},h.prototype.callback=function(e,t){var n=this._callback;this.clearTimeout(),n(e,t)},h.prototype.crossDomainError=function(){var e=new Error("Origin is not allowed by Access-Control-Allow-Origin");e.crossDomain=!0,this.callback(e)},h.prototype.timeoutError=function(){var e=this._timeout,t=new Error("timeout of "+e+"ms exceeded");t.timeout=e,this.callback(t)},h.prototype.withCredentials=function(){return this._withCredentials=!0,this},h.prototype.end=function(e){var t=this,n=this.xhr=m.getXHR(),o=this._query.join("&"),s=this._timeout,a=this._formData||this._data;this._callback=e||r,n.onreadystatechange=function(){if(4==n.readyState){var e;try{e=n.status}catch(r){e=0}if(0==e){if(t.timedout)return t.timeoutError();if(t.aborted)return;return t.crossDomainError()}t.emit("end")}};var l=function(e){e.total>0&&(e.percent=e.loaded/e.total*100),t.emit("progress",e)};this.hasListeners("progress")&&(n.onprogress=l);try{n.upload&&this.hasListeners("progress")&&(n.upload.onprogress=l)}catch(c){}if(s&&!this._timer&&(this._timer=setTimeout(function(){t.timedout=!0,t.abort()},s)),o&&(o=m.serializeObject(o),this.url+=~this.url.indexOf("?")?"&"+o:"?"+o),n.open(this.method,this.url,!0),this._withCredentials&&(n.withCredentials=!0),"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof a&&!i(a)){var u=m.serialize[this.getHeader("Content-Type")];u&&(a=u(a))}for(var p in this.header)null!=this.header[p]&&n.setRequestHeader(p,this.header[p]);return this.emit("request",this),n.send(a),this},m.Request=h,m.get=function(e,t,n){var r=m("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},m.head=function(e,t,n){var r=m("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},m.del=function(e,t){var n=m("DELETE",e);return t&&n.end(t),n},m.patch=function(e,t,n){var r=m("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},m.post=function(e,t,n){var r=m("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},m.put=function(e,t,n){var r=m("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},e.exports=m},function(e,t){function n(e){return e?r(e):void 0}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(){r.off(e,n),t.apply(this,arguments)}var r=this;return this._callbacks=this._callbacks||{},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;ir;++r)n[r].apply(this,t)}return this},n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[e]||[]},n.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t){e.exports=function(e,t,n){for(var r=0,i=e.length,o=3==arguments.length?n:e[r++];i>r;)o=t.call(null,o,e[r],++r,e);return o}},function(e,t,n){"use strict";var r=n(140),i=n(139),o=n(77),s="token",a="user",l="loginTime",c="email",u=r.createStore({_data:{id:null,name:null,created:null,email:null,loginError:null},init:function(){this._data.id=o.get(s),this._data.name=o.get(a),this._data.created=o.get(l),this._data.email=o.get(c),this.listenTo(i.login.completed,this._onLoginCompleted),this.listenTo(i.login.failed,this._onLoginFailed),this.listenTo(i.logout,this._onLogout)},_onLoginCompleted:function(e,t){this._data.id=t,this._data.name=e,this._data.created=new Date,this._data.loginError=null,-1!==e.indexOf("@")&&(this._data.email=e),o.set(s,this._data.id),o.set(a,this._data.name),o.set(l,this._data.created),o.set(c,this._data.email),this.trigger(this._data)},_onLoginFailed:function(e,t){this._data.loginError={message:t.message,resolution:t.resolution},this.trigger(this._data)},_onLogout:function(){this._data.id=null,this._data.name=null,this._data.created=null,this._data.email=null,o.remove(s),o.remove(a),o.remove(l),o.remove(c),this.trigger(this._data)},getInitialState:function(){return this._data}});e.exports=u},function(e,t){"use strict";e.exports={validate:function(e){var t={valid:!0,errors:{},firstError:null};return e.forEach(function(e){e.hasOwnProperty("test")?e.test&&(t.errors[e.field]=e.message,t.valid=!1,t.firstError=t.firstError||e.field):e.hasOwnProperty("tests")&&e.tests.some(function(n){return n.test?(t.errors[e.field]=n.message,t.valid=!1,t.firstError=t.firstError||e.field,!0):void 0})}),t}}}]); \ No newline at end of file