/*! For license information please see dll.219.js.LICENSE.txt */
(window.webpackJsonp_name_dll=window.webpackJsonp_name_dll||[]).push([[219],{2084:function(e,t,a){"use strict";a.r(t);var n=a(142),l=a.n(n),r=a(997),o=a.n(r);t.default=function(e,t){for(var a=[],n=0;n<e.length;n++){var r=t[e[n]];if(r)for(var i=new Set,c=0;c<r.length;c++){var u=r[c];if(o()(u)||l()(u)||""===u||i.add(u),i.size>2)break;c===r.length-1&&a.push(e[n])}}return a}},3408:function(e,t,a){"use strict";a.r(t);var n=a(202),l=a.n(n),r=a(0),o=a.n(r),i=a(1),c=a.n(i),u=a(77),s=a(88),d=a(69),f=a(968),m=a(206),p=a(204),g=a(365),E=a(203),v=a.n(E),b=a(39),h=a.n(b),w=a(1122),S=a.n(w),O=a(1831),T=a(1312),j=a(200),y=a(966),C=a(2084),q=function(e){var t,a=e.categorical,n=e.data,i=e.showDecision,c=e.t,E=a[0];if(h()(a)&&a.length>0){var b=n[E];t=b?Object(T.default)(b,E):[]}else t=[];var w=Object(r.useState)(t),q=l()(w,2),P=q[0],R=q[1],_=Object(r.useState)(E),A=l()(_,2),k=A[0],D=A[1],V=Object(r.useState)(P[0]),N=l()(V,2),x=N[0],z=N[1],J=Object(r.useState)(null),L=l()(J,2),B=L[0],H=L[1],M=Object(r.useState)(null),W=l()(M,2),X=W[0],F=W[1],G=Object(r.useState)(0),I=l()(G,2),K=I[0],Q=I[1],U=Object(r.useState)("two-sided"),Y=l()(U,2),Z=Y[0],$=Y[1],ee=Object(r.useState)(.05),te=l()(ee,2),ae=te[0],ne=te[1],le=Object(C.default)(a,n);return o.a.createElement(s.default,{style:{fontSize:"14px"}},o.a.createElement(s.default.Header,{as:"h4"},c("Two-Sample Proportion Test"),o.a.createElement(y.default,{title:c("Two-Sample Proportion Test"),content:c("Two-Sample Proportion Test-description")})),o.a.createElement(s.default.Body,null,o.a.createElement(f.default,null,o.a.createElement(d.default,{md:6},o.a.createElement(p.default,{legend:c("variable"),defaultValue:a[0],options:a,onChange:function(e){var t=n[e],a=Object(T.default)(t,e);S()(a),D(e),R(a),z(a[0])}})),o.a.createElement(d.default,{md:6},o.a.createElement(p.default,{legend:c("success"),defaultValue:P[0],options:P,onChange:z}))),o.a.createElement(f.default,null,o.a.createElement(d.default,{md:5},o.a.createElement(p.default,{legend:c("groups"),options:le,clearable:!0,onChange:function(e){H(e),F(null)}})),o.a.createElement(d.default,{md:2},o.a.createElement("p",null,"OR")),o.a.createElement(d.default,{md:5},o.a.createElement(p.default,{legend:c("second-variable"),options:a.filter((function(e){return v()(P,e)})),clearable:!0,onChange:function(e){H(null),F(e)}}))),o.a.createElement(m.default,{legend:c("difference-h0"),defaultValue:K,min:0,max:1,step:"any",onChange:Q}),o.a.createElement(p.default,{legend:c("direction"),defaultValue:Z,options:["less","greater","two-sided"],onChange:$}),o.a.createElement(m.default,{legend:o.a.createElement("span",null,c("significance-level"),o.a.createElement(g.default,{raw:"\\alpha"})),defaultValue:ae,min:0,max:1,step:"any",onChange:ne}),o.a.createElement(u.default,{variant:"primary",block:!0,onClick:function(){if(k===B||k===X)return e.session.addNotification({title:"Action required",message:"Please make sure that the group variable or second variable is not equal to your variable of interest.",level:"warning",position:"tr"});B||X||e.session.addNotification({title:"Action required",message:"Please select either a grouping variable or a second variable to compare ".concat(k," against."),level:"warning",position:"tr"});var t=o.a.createElement(O.default,{data:n,showDecision:i,var1:k,var2:X,group:B,diff:K,direction:Z,alpha:ae,success:x});e.logAction(j.DATA_EXPLORER_TESTS_TWO_SAMPLE_PROPTEST,{var1:k,group:B,var2:X,success:x,diff:K,direction:Z,alpha:ae,showDecision:i}),e.onCreated(t)},disabled:!X&&!B},c("calculate"))))};q.defaultProps={categorical:null,logAction:function(){},showDecision:!0},q.propTypes={categorical:c.a.array,data:c.a.object.isRequired,logAction:c.a.func,onCreated:c.a.func.isRequired,session:c.a.object.isRequired,showDecision:c.a.bool},t.default=q},966:function(e,t,a){"use strict";a.r(t);var n=a(0),l=a.n(n),r=a(1),o=a.n(r),i=a(77),c=a(974),u=a(971),s=a(970),d=a(998),f=function(e){var t=l.a.createElement(c.default,{id:"popover-positioned-right"},l.a.createElement(u.default,null,e.title),l.a.createElement(s.default,null,e.content));return l.a.createElement(d.default,{trigger:["hover","focus"],placement:"left",rootClose:!0,overlay:t},l.a.createElement(i.default,{size:"sm",variant:"outline-secondary",className:"question-button"},l.a.createElement("div",{className:"fa fa-question"})))};f.propTypes={content:o.a.oneOfType([o.a.string,o.a.node]).isRequired,title:o.a.string.isRequired},t.default=f}}]);