/*! For license information please see dll.229.js.LICENSE.txt */
(window.webpackJsonp_name_dll=window.webpackJsonp_name_dll||[]).push([[229],{3442:function(e,t,a){"use strict";a.r(t);var n=a(14),l=a.n(n),r=a(12),c=a.n(r),i=a(10),o=a.n(i),s=a(15),u=a.n(s),d=a(16),f=a.n(d),p=a(8),h=a.n(p),m=a(7),g=a.n(m),v=a(0),E=a.n(v),b=a(1),w=a.n(b),y=a(86),S=a(75),C=a(204),R=a(203),T=a(362),D=a(1828),P=a(1217),_=a(200),A=a(991);function V(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,n=h()(e);if(t){var l=h()(this).constructor;a=Reflect.construct(n,arguments,l)}else a=n.apply(this,arguments);return f()(this,a)}}var k=function(e){u()(a,e);var t=V(a);function a(e){var n;return l()(this,a),n=t.call(this,e),g()(o()(n),"calculatePropTest",(function(){var e=n.state,t=e.variable,a=e.success,l=e.p0,r=e.direction,c=e.alpha,i=n.props,o=i.data,s=i.showDecision,u=E.a.createElement(D.default,{data:o,variable:t,success:a,p0:l,direction:r,alpha:c,showDecision:s});n.props.logAction(_.DATA_EXPLORER_TESTS_PROPTEST,{variable:t,success:a,p0:l,direction:r,alpha:c,showDecision:s}),n.props.onCreated(u)})),n.state={variable:null,success:null,p0:.5,direction:"two-sided",alpha:.05,categories:null},n}return c()(a,[{key:"render",value:function(){var e=this,t=this.props.categorical;return E.a.createElement(y.default,{style:{fontSize:"14px"}},E.a.createElement(y.default.Header,{as:"h4"},"One-Sample Proportion Test",E.a.createElement(A.default,{title:"One-Sample Proportion Test",content:"A test for the proportion of a selected category of a qualitative variable."})),E.a.createElement(y.default.Body,null,E.a.createElement(R.default,{legend:"Variable:",defaultValue:this.state.variable,options:t,onChange:function(t){var a=e.props.data[t],n=Object(P.default)(a,t);e.setState({categories:n,variable:t,success:n[0]})}}),this.state.categories?E.a.createElement(R.default,{legend:"Success:",defaultValue:this.state.success,options:this.state.categories,onChange:function(t){e.setState({success:t})}}):null,E.a.createElement(C.default,{legend:E.a.createElement(T.default,{raw:"p_0"}),defaultValue:this.state.p0,min:.001,max:.999,step:"any",onChange:function(t){e.setState({p0:t})}}),E.a.createElement(R.default,{legend:"Direction:",defaultValue:this.state.direction,options:["less","greater","two-sided"],onChange:function(t){e.setState({direction:t})}}),E.a.createElement(C.default,{legend:E.a.createElement("span",null,"Significance level ",E.a.createElement(T.default,{raw:"\\alpha"})),defaultValue:this.state.alpha,min:0,max:1,step:"any",onChange:function(t){e.setState({alpha:t})}}),E.a.createElement(S.default,{variant:"primary",block:!0,onClick:this.calculatePropTest,disabled:!this.state.variable},"Calculate")))}}]),a}(v.Component);k.propTypes={categorical:w.a.array,data:w.a.object.isRequired,logAction:w.a.func,onCreated:w.a.func.isRequired,showDecision:w.a.bool},k.defaultProps={categorical:null,logAction:function(){},showDecision:!0},t.default=k}}]);