/*! For license information please see dll.DataSampler.js.LICENSE.txt */
(window.webpackJsonp_name_dll=window.webpackJsonp_name_dll||[]).push([[37],{2558:function(e,a,t){"use strict";t.r(a);var n=t(967),r=t(2559);n.default.addResources("de","data-sampler",r.DE),n.default.addResources("en","data-sampler",r.EN),n.default.addResources("es","data-sampler",r.ES)},2559:function(e){e.exports=JSON.parse('{"DE":{"draw-sample":"Stichprobe ziehen","sample-size":"Stichprobengröße"},"EN":{"draw-sample":"Draw Sample","sample-size":"Sample size"},"ES":{"draw-sample":"Dibujar la muestra","sample-size":"Tamaño de la muestra"}}')},838:function(e,a,t){"use strict";t.r(a);var n=t(14),r=t.n(n),i=t(12),l=t.n(i),s=t(10),p=t.n(s),o=t(15),c=t.n(o),u=t(16),m=t.n(u),d=t(8),f=t.n(d),h=t(7),S=t.n(h),z=t(0),v=t.n(z),b=t(1),g=t.n(b),w=t(2297),y=t(75),D=t(140),E=t(204),R=t(1072),k=t.n(R),x=t(1040),C=t.n(x),N=t(45),_=t.n(N),j=t(39),J=t.n(j),P=t(104),T=t.n(P),q=t(201),O=t.n(q),F=t(87),V=t.n(F),W=t(67),A=t.n(W);t(2558);function B(e){var a=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 t,n=f()(e);if(a){var r=f()(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return m()(this,t)}}var G=function(e){c()(t,e);var a=B(t);function t(e){var n;r()(this,t),n=a.call(this,e),S()(p()(n),"handleNumberChange",(function(e){n.setState({sampleSize:e})})),S()(p()(n),"drawSample",(function(){for(var e=C()(0,n.state.nobs,1),a=k()(e,{size:n.state.sampleSize,replace:!1}),t={},r=n.state.originalData,i=0;i<n.state.variables.length;i++){var l=n.state.variables[i];t[l]=r[l].filter((function(e,t){return O()(a,t)}))}var s="".concat(a[0],"-").concat(a[1],"-").concat(a[2]),p=A.a;if(T()(n.props.children))p=n.props.children;else if(J()(n.props.children))for(var o=0;o<n.props.children.length;o++){var c=n.props.children[o];if(T()(c)){p=c;break}}n.setState({children:v.a.createElement("div",{key:s,style:{animation:"roll-in-left 1s"}},p(t))})}));var i=V()(e.data),l=e.data[i[0]].length;return n.state={originalData:e.data,sampleSize:e.sampleSize,originalSampleSize:e.sampleSize,children:null,variables:i,nobs:l},n}return l()(t,[{key:"render",value:function(){return v.a.createElement("div",null,v.a.createElement(D.default,{style:{maxWidth:900}},v.a.createElement(E.default,{legend:this.props.t("sample-size"),defaultValue:this.state.sampleSize,min:this.props.minSampleSize,max:this.props.maxSampleSize||this.state.nobs,step:1,onChange:this.handleNumberChange}),v.a.createElement(y.default,{onClick:this.drawSample},this.props.t("draw-sample"))),this.state.children)}}],[{key:"getDerivedStateFromProps",value:function(e,a){var t={};if(e.sampleSize!==a.originalSampleSize&&(t.sampleSize=e.sampleSize),e.data!==a.originalData){var n=V()(e.data),r=e.data[n[0]].length;t.nobs=r,t.variables=n,t.originalData=e.data}return _()(t)?null:t}}]),t}(z.Component);G.propTypes={children:g.a.func.isRequired,data:g.a.object.isRequired,sampleSize:g.a.number,minSampleSize:g.a.number,maxSampleSize:g.a.number},G.defaultProps={sampleSize:50,minSampleSize:1,maxSampleSize:null},a.default=Object(w.withTranslation)("data-sampler")(G)}}]);