honkoma/priv/static/packs/features/compose.js

2 lines
34 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[31],{712:function(e,t,n){"use strict";n.r(t);var r,o,a,i=n(0),u=n.n(i),s=n(6),l=n.n(s),c=n(3),f=n.n(c),p=n(7),d=n.n(p),y=n(1),h=n.n(y),m=n(203),v=n(12),b=n(695),g=n(10),_=Object(v.connect)(function(e){return{account:e.getIn(["accounts",g.i])}})(b.a),w=n(11),O=n(810),j=n(4),x=n(120),M=n(700),P=Object(v.connect)(function(e){return{value:e.getIn(["search","value"]),submitted:e.getIn(["search","submitted"])}},function(e){return{onChange:function(t){e(Object(x.e)(t))},onClear:function(){e(Object(x.f)())},onSubmit:function(){e(Object(x.h)())},onShow:function(){e(Object(x.g)())}}})(M.a),k=n(25),E=n(22),T=n.n(E),N=n(17),S=n.n(N),R=n(693),C=n(154),I=n(18),A=n(759),L=n(139),D=function(e){var t=e.hashtag;return u()("div",{className:"trends__item"},void 0,u()("div",{className:"trends__item__name"},void 0,u()(O.a,{to:"/timelines/tag/"+t.get("name")},void 0,"#",u()("span",{},void 0,t.get("name"))),u()(j.b,{id:"trends.count_by_accounts",defaultMessage:"{count} {rawCount, plural, one {person} other {people}} talking",values:{rawCount:t.getIn(["history",0,"accounts"]),count:u()("strong",{},void 0,Object(L.a)(t.getIn(["history",0,"accounts"])))}})),u()("div",{className:"trends__item__current"},void 0,Object(L.a)(t.getIn(["history",0,"uses"]))),u()("div",{className:"trends__item__sparkline"},void 0,u()(A.Sparklines,{width:50,height:28,data:t.get("history")&&t.get("history").reverse().map(function(e){return e.get("uses")}).toArray()},void 0,u()(A.SparklinesCurve,{style:{fill:"none"}}))))},W=(o=r=function(e){function t(){return l()(this,t),f()(this,e.apply(this,arguments))}return d()(t,e),t.prototype.render=function(){var e=this.props.results,t=void 0,n=void 0,r=void 0,o=0;return e.get("accounts")&&e.get("accounts").size>0&&(o+=e.get("accounts").size,t=u()("div",{className:"search-results__section"},void 0,u()("h5",{},void 0,u()("i",{className:"fa fa-fw fa-users"}),u()(j.b,{id:"search_results.accounts",defaultMessage:"People"})),e.get("accounts").map(function(e){return u()(R.a,{id:e},e)}))),e.get("statuses")&&e.get("statuses").size>0&&(o+=e.get("statuses").size,n=u()("div",{className:"search-results__section"},void 0,u()("h5",{},void 0,u()("i",{className:"fa fa-fw fa-quote-right"}),u()(j.b,{id:"search_results.statuses",defaultMessage:"Toots"})),e.get("statuses").map(function(e){return u()(C.a,{id:e},e)}))),e.get("hashtags")&&e.get("hashtags").size>0&&(o+=e.get("hashtags").size,r=u()("div",{className:"search-results__section"},void 0,u()("h5",{},void 0,u()("i",{className:"fa fa-fw fa-hashtag"}),u()(j.b,{id:"search_results.hashtags",defaultMessage:"Hashtags"})),e.get("hashtags").map(function(e){return u()(D,{hashtag:e},e.get("name"))}))),u()("div",{className:"search-results"},void 0,u()("div",{className:"search-results__header"},void 0,u()("i",{className:"fa fa-search fa-fw"}),u()(j.b,{id:"search_results.total",defaultMessage:"{count, number} {count, plural, one {result} other {results}}",values:{count:o}})),t,n,r)},t}(I.a),r.propTypes={results:S.a.map.isRequired},o),z=Object(v.connect)(function(e){return{results:e.getIn(["search","results"])}})(W);n.d(t,"default",function(){return V});var F=Object(j.f)({start:{id:"getting_started.heading",defaultMessage:"Getting started"},home_timeline:{id:"tabs_bar.home",defaultMessage:"Home"},notifications:{id:"tabs_bar.notifications",defaultMessage:"Notifications"},public:{id:"navigation_bar.public_timeline",defaultMessage:"Federated timeline"},community:{id:"navigation_bar.community_timeline",defaultMessage:"Local timeline"},preferences:{id:"navigation_bar.preferences",defaultMessage:"Preferences"},logout:{id:"navigation_bar.logout",defaultMessage:"Logout"},compose:{id:"navigation_bar.compose",defaultMessage:"Compose new toot"}}),V=Object(v.connect)(function(e,t){return{columns:e.getIn(["settings","columns"]),showSearch:t.multiColumn?e.getIn(["search","submitted"])&&!e.getIn(["search","hidden"]):t.isSearchPage}})(a=Object(j.g)(a=function(e){function t(){var n,r,o;l()(this,t);for(var a=arguments.length,i=Array(a),u=0;u<a;u++)i[u]=arguments[u];return n=r=f()(this,e.call.apply(e,[this].concat(i))),r.onFocus=function(){r.props.dispatch(Object(w.K)(!0))},r.onBlur=function(){r.props.dispatch(Object(w.K)(!1))},o=n,f()(r,o)}return d()(t,e),t.prototype.componentDidMount=function(){this.props.isSearchPage||this.props.dispatch(Object(w.S)())},t.prototype.componentWillUnmount=function(){this.props.isSearchPage||this.props.dispatch(Object(w.Y)())},t.prototype.render=function(){var e=this.props,t=e.multiColumn,n=e.showSearch,r=e.isSearchPage,o=e.intl,a="";if(t){var i=this.props.columns;a=u()("nav",{className:"drawer__header"},void 0,u()(O.a,{to:"/getting-started",className:"drawer__tab",title:o.formatMessage(F.start),"aria-label":o.formatMessage(F.start)},void 0,u()("i",{role:"img",className:"fa fa-fw fa-bars"})),!i.some(function(e){return"HOME"===e.get("id")})&&u()(O.a,{to:"/timelines/home",className:"drawer__tab",title:o.formatMessage(F.home_timeline),"aria-label":o.formatMessage(F.home_timeline)},void 0,u()("i",{role:"img",className:"fa fa-fw fa-home"})),!i.some(function(e){return"NOTIFICATIONS"===e.get("id")})&&u()(O.a,{to:"/notifications",className:"drawer__tab",title:o.formatMessage(F.notifications),"aria-label":o.formatMessage(F.notifications)},void 0,u()("i",{role:"img",className:"fa fa-fw fa-bell"})),!i.some(function(e){return"COMMUNITY"===e.get("id")})&&u()(O.a,{to:"/timelines/public/local",className:"drawer__tab",title:o.formatMessage(F.community),"aria-label":o.formatMessage(F.community)},void 0,u()("i",{role:"img",className:"fa fa-fw fa-users"})),!i.some(function(e){return"PUBLIC"===e.get("id")})&&u()(O.a,{to:"/timelines/public",className:"drawer__tab",title:o.formatMessage(F.public),"aria-label":o.formatMessage(F.public)},void 0,u()("i",{role:"img",className:"fa fa-fw fa-globe"})),u()("a",{href:"/user-settings",className:"drawer__tab",title:o.formatMessage(F.preferences),"aria-label":o.formatMessage(F.preferences)},void 0,u()("i",{role:"img",className:"fa fa-fw fa-cog"})),u()("a",{href:"/auth/sign_out",className:"drawer__tab","data-method":"delete",title:o.formatMessage(F.logout),"aria-label":o.formatMessage(F.logout)},void 0,u()("i",{role:"img",className:"fa fa-fw fa-sign-out"})))}return u()("div",{className:"drawer",role:"region","aria-label":o.formatMessage(F.compose)},void 0,a,(t||r)&&u()(P,{}),u()("div",{className:"drawer__pager"},void 0,!r&&u()("div",{className:"drawer__inner",onFocus:this.onFocus},void 0,u()(_,{onClose:this.onBlur}),u()(m.a,{})),u()(k.a,{defaultStyle:{x:r?0:-100},style:{x:T()(n||r?0:-100,{stiffness:210,damping:20})}},void 0,function(e){var t=e.x;return u()("div",{className:"drawer__inner darker",style:{transform:"translateX("+t+"%)",visibility:-100===t?"hidden":"visible"}},void 0,u()(z,{}))})))},t}(h.a.PureComponent))||a)||a},759:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=11)}([function(e,t,n){(function(t){if("production"!==t.env.NODE_ENV){var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=n(14)(function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},!0)}else e.exports=n(16)()}).call(t,n(2))},function(t,n){t.exports=e},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,l=[],c=!1,f=-1;function p(){c&&s&&(c=!1,s.length?l=s.concat(l):f=-1,l.length&&d())}function d(){if(!c){var e=u(p);c=!0;for(var t=l.length;t;){for(s=l,l=[];++f<t;)s&&s[f].run();f=-1,t=l.length}s=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new y(e,t)),1!==l.length||c||u(d)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.reduce(function(e,t){return e+t})/e.length}},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";(function(t){var n=function(e){};"production"!==t.env.NODE_ENV&&(n=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")}),e.exports=function(e,t,r,o,a,i,u,s){if(n(t),!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,o,a,i,u,s],f=0;(l=new Error(t.replace(/%s/g,function(){return c[f++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}}}).call(t,n(2))},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Math.min.apply(Math,e)}},function(e,t,n){"use strict";(function(t){var r=n(4);if("production"!==t.env.NODE_ENV){r=function(e,t){if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==t.indexOf("Failed Composite propType: ")&&!e){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];(function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,a="Warning: "+e.replace(/%s/g,function(){return n[o++]});"undefined"!=typeof console&&console.error(a);try{throw new Error(a)}catch(e){}}).apply(void 0,[t].concat(r))}}}e.exports=r}).call(t,n(2))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Math.max.apply(Math,e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(3),a=(r=o)&&r.__esModule?r:{default:r};t.default=function(e){var t=(0,a.default)(e),n=e.map(function(e){return Math.pow(e-t,2)}),r=(0,a.default)(n);return Math.sqrt(r)}},function(e,t,n){e.exports=n(12)},function(e,t,n){"use strict";e.exports=n(13)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SparklinesText=t.SparklinesNormalBand=t.SparklinesReferenceLine=t.SparklinesSpots=t.SparklinesBars=t.SparklinesCurve=t.SparklinesLine=t.Sparklines=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=h(n(0)),a=n(1),i=h(a),u=h(n(17)),s=h(n(18)),l=h(n(19)),c=h(n(20)),f=h(n(21)),p=h(n(22)),d=h(n(27)),y=h(n(28));function h(e){return e&&e.__esModule?e:{default:e}}var m=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.PureComponent),r(t,[{key:"render",value:function(){var e=this.props,t=e.data,n=e.limit,r=e.width,o=e.height,a=e.svgWidth,u=e.svgHeight,s=e.preserveAspectRatio,l=e.margin,c=e.style,f=e.max,p=e.min;if(0===t.length)return null;var d=(0,y.default)({data:t,limit:n,width:r,height:o,margin:l,max:f,min:p}),h={style:c,viewBox:"0 0 "+r+" "+o,preserveAspectRatio:s};return a>0&&(h.width=a),u>0&&(h.height=u),i.default.createElement("svg",h,i.default.Children.map(this.props.children,function(e){return i.default.cloneElement(e,{data:t,points:d,width:r,height:o,margin:l})}))}}]),t}();m.propTypes={data:o.default.array,limit:o.default.number,width:o.default.number,height:o.default.number,svgWidth:o.default.number,svgHeight:o.default.number,preserveAspectRatio:o.default.string,margin:o.default.number,style:o.default.object,min:o.default.number,max:o.default.number,onMouseMove:o.default.func},m.defaultProps={data:[],width:240,height:60,preserveAspectRatio:"none",margin:2},t.Sparklines=m,t.SparklinesLine=s.default,t.SparklinesCurve=l.default,t.SparklinesBars=c.default,t.SparklinesSpots=f.default,t.SparklinesReferenceLine=p.default,t.SparklinesNormalBand=d.default,t.SparklinesText=u.default},function(e,t,n){"use strict";(function(t){var r=n(4),o=n(5),a=n(8),i=n(6),u=n(15);e.exports=function(e,n){var s="function"==typeof Symbol&&Symbol.iterator,l="@@iterator";var c="<<anonymous>>",f={array:h("array"),bool:h("boolean"),func:h("function"),number:h("number"),object:h("object"),string:h("string"),symbol:h("symbol"),any:y(r.thatReturnsNull),arrayOf:function(e){return y(function(t,n,r,o,a){if("function"!=typeof e)return new d("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=t[n];if(!Array.isArray(u)){var s=v(u);return new d("Invalid "+o+" `"+a+"` of type `"+s+"` supplied to `"+r+"`, expected an array.")}for(var l=0;l<u.length;l++){var c=e(u,l,r,o,a+"["+l+"]",i);if(c instanceof Error)return c}return null})},element:function(){return y(function(t,n,r,o,a){var i=t[n];if(!e(i)){var u=v(i);return new d("Invalid "+o+" `"+a+"` of type `"+u+"` supplied to `"+r+"`, expected a single ReactElement.")}return null})}(),instanceOf:function(e){return y(function(t,n,r,o,a){if(!(t[n]instanceof e)){var i=e.name||c,u=function(e){if(!e.constructor||!e.constructor.name)return c;return e.constructor.name}(t[n]);return new d("Invalid "+o+" `"+a+"` of type `"+u+"` supplied to `"+r+"`, expected instance of `"+i+"`.")}return null})},node:function(){return y(function(e,t,n,r,o){if(!m(e[t]))return new d("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.");return null})}(),objectOf:function(e){return y(function(t,n,r,o,a){if("function"!=typeof e)return new d("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=t[n],s=v(u);if("object"!==s)return new d("Invalid "+o+" `"+a+"` of type `"+s+"` supplied to `"+r+"`, expected an object.");for(var l in u)if(u.hasOwnProperty(l)){var c=e(u,l,r,o,a+"."+l,i);if(c instanceof Error)return c}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==t.env.NODE_ENV&&a(!1,"Invalid argument supplied to oneOf, expected an instance of array."),r.thatReturnsNull;return y(function(t,n,r,o,a){for(var i=t[n],u=0;u<e.length;u++)if(p(i,e[u]))return null;var s=JSON.stringify(e);return new d("Invalid "+o+" `"+a+"` of value `"+i+"` supplied to `"+r+"`, expected one of "+s+".")})},oneOfType:function(e){if(!Array.isArray(e))return"production"!==t.env.NODE_ENV&&a(!1,"Invalid argument supplied to oneOfType, expected an instance of array."),r.thatReturnsNull;for(var n=0;n<e.length;n++){var o=e[n];if("function"!=typeof o)return a(!1,"Invalid argument supplid to oneOfType. Expected an array of check functions, but received %s at index %s.",g(o),n),r.thatReturnsNull}return y(function(t,n,r,o,a){for(var u=0;u<e.length;u++){var s=e[u];if(null==s(t,n,r,o,a,i))return null}return new d("Invalid "+o+" `"+a+"` supplied to `"+r+"`.")})},shape:function(e){return y(function(t,n,r,o,a){var u=t[n],s=v(u);if("object"!==s)return new d("Invalid "+o+" `"+a+"` of type `"+s+"` supplied to `"+r+"`, expected `object`.");for(var l in e){var c=e[l];if(c){var f=c(u,l,r,o,a+"."+l,i);if(f)return f}}return null})}};function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function d(e){this.message=e,this.stack=""}function y(e){if("production"!==t.env.NODE_ENV)var r={},u=0;function s(s,l,f,p,y,h,m){if(p=p||c,h=h||f,m!==i)if(n)o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("production"!==t.env.NODE_ENV&&"undefined"!=typeof console){var v=p+":"+f;!r[v]&&u<3&&(a(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",h,p),r[v]=!0,u++)}return null==l[f]?s?null===l[f]?new d("The "+y+" `"+h+"` is marked as required in `"+p+"`, but its value is `null`."):new d("The "+y+" `"+h+"` is marked as required in `"+p+"`, but its value is `undefined`."):null:e(l,f,p,y,h)}var l=s.bind(null,!1);return l.isRequired=s.bind(null,!0),l}function h(e){return y(function(t,n,r,o,a,i){var u=t[n];return v(u)!==e?new d("Invalid "+o+" `"+a+"` of type `"+b(u)+"` supplied to `"+r+"`, expected `"+e+"`."):null})}function m(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(m);if(null===t||e(t))return!0;var n=function(e){var t=e&&(s&&e[s]||e[l]);if("function"==typeof t)return t}(t);if(!n)return!1;var r,o=n.call(t);if(n!==t.entries){for(;!(r=o.next()).done;)if(!m(r.value))return!1}else for(;!(r=o.next()).done;){var a=r.value;if(a&&!m(a[1]))return!1}return!0;default:return!1}}function v(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||"Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol}(t,e)?"symbol":t}function b(e){if(void 0===e||null===e)return""+e;var t=v(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function g(e){var t=b(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return d.prototype=Error.prototype,f.checkPropTypes=u,f.PropTypes=f,f}}).call(t,n(2))},function(e,t,n){"use strict";(function(t){if("production"!==t.env.NODE_ENV)var r=n(5),o=n(8),a=n(6),i={};e.exports=function(e,n,u,s,l){if("production"!==t.env.NODE_ENV)for(var c in e)if(e.hasOwnProperty(c)){var f;try{r("function"==typeof e[c],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",s||"React class",u,c),f=e[c](n,c,s,u,null,a)}catch(e){f=e}if(o(!f||f instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",s||"React class",u,c,typeof f),f instanceof Error&&!(f.message in i)){i[f.message]=!0;var p=l?l():"";o(!1,"Failed %s type: %s%s",u,f.message,null!=p?p:"")}}}}).call(t,n(2))},function(e,t,n){"use strict";var r=n(4),o=n(5),a=n(6);e.exports=function(){function e(e,t,n,r,i,u){u!==a&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=i(n(0)),a=i(n(1));function i(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default.Component),r(t,[{key:"render",value:function(){var e=this.props,t=e.point,n=e.text,r=e.fontSize,o=e.fontFamily,i=t.x,u=t.y;return a.default.createElement("g",null,a.default.createElement("text",{x:i,y:u,fontFamily:o||"Verdana",fontSize:r||10},n))}}]),t}();u.propTypes={text:o.default.string,point:o.default.object,fontSize:o.default.number,fontFamily:o.default.string},u.defaultProps={text:"",point:{x:0,y:0}},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=i(n(0)),a=i(n(1));function i(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default.Component),r(t,[{key:"render",value:function(){var e=this.props,t=e.data,n=e.points,r=(e.width,e.height),o=e.margin,i=e.color,u=e.style,s=e.onMouseMove,l=n.map(function(e){return[e.x,e.y]}).reduce(function(e,t){return e.concat(t)}),c=[n[n.length-1].x,r-o,o,r-o,o,n[0].y],f=l.concat(c),p={stroke:i||u.stroke||"slategray",strokeWidth:u.strokeWidth||"1",strokeLinejoin:u.strokeLinejoin||"round",strokeLinecap:u.strokeLinecap||"round",fill:"none"},d={stroke:u.stroke||"none",strokeWidth:"0",fillOpacity:u.fillOpacity||".1",fill:u.fill||i||"slategray",pointerEvents:"auto"},y=n.map(function(e,n){return a.default.createElement("circle",{key:n,cx:e.x,cy:e.y,r:2,style:d,onMouseEnter:function(r){return s("enter",t[n],e)},onClick:function(r){return s("click",t[n],e)}})});return a.default.createElement("g",null,y,a.default.createElement("polyline",{points:f.join(" "),style:d}),a.default.createElement("polyline",{points:l.join(" "),style:p}))}}]),t}();u.propTypes={color:o.default.string,style:o.default.object},u.defaultProps={style:{},onMouseMove:function(){}},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=i(n(0)),a=i(n(1));function i(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default.Component),r(t,[{key:"render",value:function(){var e=this.props,t=e.points,n=(e.width,e.height),r=e.margin,o=e.color,i=e.style,u=e.divisor,s=void 0===u?.25:u,l=void 0,c=t.map(function(e){return function(e){var t=void 0;if(l){var n=(e.x-l.x)*s;t=["C",l.x+n,l.y,e.x-n,e.y,e.x,e.y]}else t=[e.x,e.y];return l=e,t}(e)}).reduce(function(e,t){return e.concat(t)}),f=["L"+t[t.length-1].x,n-r,r,n-r,r,t[0].y],p=c.concat(f),d={stroke:o||i.stroke||"slategray",strokeWidth:i.strokeWidth||"1",strokeLinejoin:i.strokeLinejoin||"round",strokeLinecap:i.strokeLinecap||"round",fill:"none"},y={stroke:i.stroke||"none",strokeWidth:"0",fillOpacity:i.fillOpacity||".1",fill:i.fill||o||"slategray"};return a.default.createElement("g",null,a.default.createElement("path",{d:"M"+p.join(" "),style:y}),a.default.createElement("path",{d:"M"+c.join(" "),style:d}))}}]),t}();u.propTypes={color:o.default.string,style:o.default.object},u.defaultProps={style:{}},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=i(n(0)),a=i(n(1));function i(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default.Component),r(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.points,r=t.height,o=t.style,i=t.barWidth,u=t.margin,s=t.onMouseMove,l=1*(o&&o.strokeWidth||0),c=u?2*u:0,f=i||(n&&n.length>=2?Math.max(0,n[1].x-n[0].x-l-c):0);return a.default.createElement("g",{transform:"scale(1,-1)"},n.map(function(t,n){return a.default.createElement("rect",{key:n,x:t.x-(f+l)/2,y:-r,width:f,height:Math.max(0,r-t.y),style:o,onMouseMove:s&&s.bind(e,t)})}))}}]),t}();u.propTypes={points:o.default.arrayOf(o.default.object),height:o.default.number,style:o.default.object,barWidth:o.default.number,margin:o.default.number,onMouseMove:o.default.func},u.defaultProps={style:{fill:"slategray"}},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=i(n(0)),a=i(n(1));function i(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default.Component),r(t,[{key:"lastDirection",value:function(e){return Math.sign=Math.sign||function(e){return e>0?1:-1},e.length<2?0:Math.sign(e[e.length-2].y-e[e.length-1].y)}},{key:"render",value:function(){var e=this.props,t=e.points,n=(e.width,e.height,e.size),r=e.style,o=e.spotColors,i=a.default.createElement("circle",{cx:t[0].x,cy:t[0].y,r:n,style:r}),u=a.default.createElement("circle",{cx:t[t.length-1].x,cy:t[t.length-1].y,r:n,style:r||{fill:o[this.lastDirection(t)]}});return a.default.createElement("g",null,r&&i,u)}}]),t}();u.propTypes={size:o.default.number,style:o.default.object,spotColors:o.default.object},u.defaultProps={size:2,spotColors:{"-1":"red",0:"black",1:"green"}},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=u(n(0)),a=u(n(1)),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(23));function u(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default.Component),r(t,[{key:"render",value:function(){var e=this.props,t=e.points,n=e.margin,r=e.type,o=e.style,u=e.value,s=t.map(function(e){return e.y}),l="custom"==r?u:i[r](s);return a.default.createElement("line",{x1:t[0].x,y1:l+n,x2:t[t.length-1].x,y2:l+n,style:o})}}]),t}();s.propTypes={type:o.default.oneOf(["max","min","mean","avg","median","custom"]),value:o.default.number,style:o.default.object},s.defaultProps={type:"mean",style:{stroke:"red",strokeOpacity:.75,strokeDasharray:"2, 2"}},t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.variance=t.stdev=t.median=t.midRange=t.avg=t.mean=t.max=t.min=void 0;var r=l(n(7)),o=l(n(3)),a=l(n(24)),i=l(n(25)),u=l(n(10)),s=l(n(26));function l(e){return e&&e.__esModule?e:{default:e}}t.min=r.default,t.max=r.default,t.mean=o.default,t.avg=o.default,t.midRange=a.default,t.median=i.default,t.stdev=u.default,t.variance=s.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(7)),o=a(n(9));function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){return(0,o.default)(e)-(0,r.default)(e)/2}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.sort(function(e,t){return e-t})[Math.floor(e.length/2)]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(3),a=(r=o)&&r.__esModule?r:{default:r};t.default=function(e){var t=(0,a.default)(e),n=e.map(function(e){return Math.pow(e-t,2)});return(0,a.default)(n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=s(n(0)),a=s(n(1)),i=s(n(3)),u=s(n(10));function s(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default.Component),r(t,[{key:"render",value:function(){var e=this.props,t=e.points,n=e.margin,r=e.style,o=t.map(function(e){return e.y}),s=(0,i.default)(o),l=(0,u.default)(o);return a.default.createElement("rect",{x:t[0].x,y:s-l+n,width:t[t.length-1].x-t[0].x,height:2*u.default,style:r})}}]),t}();l.propTypes={style:o.default.object},l.defaultProps={style:{fill:"red",fillOpacity:.1}},t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(7)),o=a(n(9));function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t=e.data,n=e.limit,a=e.width,i=void 0===a?1:a,u=e.height,s=void 0===u?1:u,l=e.margin,c=void 0===l?0:l,f=e.max,p=void 0===f?(0,o.default)(t):f,d=e.min,y=void 0===d?(0,r.default)(t):d,h=t.length;n&&n<h&&(t=t.slice(h-n));var m=(s-2*c)/(p-y||2),v=(i-2*c)/((n||h)-(h>1?1:0));return t.map(function(e,t){return{x:t*v+c,y:(p===y?1:p-e)*m+c}})}}])},e.exports=r(n(1))}}]);
//# sourceMappingURL=compose.js.map