(this["webpackJsonpstreamlit-browser"]=this["webpackJsonpstreamlit-browser"]||[]).push([[24],{1184:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(7),a=n.n(r),i=a()("label",{target:"effi0qh0"})((function(e){var t=e.theme;return{fontSize:t.fontSizes.smDefault,color:t.colors.bodyText,marginBottom:t.fontSizes.halfSmDefault}}),""),o=a()("div",{target:"effi0qh1"})((function(e){var t=e.theme;return{fontSize:t.fontSizes.smDefault,color:t.colors.gray,margin:t.spacing.none,textAlign:"right",position:"absolute",bottom:0,right:t.fontSizes.halfSmDefault}}),"")},1508:function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(6),a=n(1),i=n(147),o=n(0),s=n.n(o),l=n(101),u=n(1725),c=n(7),p=n.n(c),h=n(244),d=n.n(h),f=n(1383);var v=p()("span",{target:"e1sjeeqh0"})({name:"1d0tddh",styles:"overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"}),m=p()(f.e,{shouldForwardProp:d.a,target:"e1sjeeqh1"})((function(e){var t=e.theme;return{display:"flex",alignItems:"center",paddingTop:t.spacing.none,paddingBottom:t.spacing.none}}),"");function g(e){var t=e.data,n=e.index,o=e.style,s=t[n].props,l=s.item,u=(s.overrides,Object(i.a)(s,["item","overrides"]));return Object(a.jsx)(m,Object(r.a)(Object(r.a)({style:o},u),{},{children:Object(a.jsx)(v,{children:l.label})}),l.value)}var b=s.a.forwardRef((function(e,t){var n=s.a.Children.toArray(e.children);if(!n[0]||!n[0].props.item){var i=n[0]?n[0].props:{};return Object(a.jsx)(l.b,{$style:{height:"".concat(90,"px")},ref:t,children:Object(a.jsx)(l.a,Object(r.a)({},i))})}var o=Math.min(300,40*n.length);return Object(a.jsx)(l.b,{ref:t,children:Object(a.jsx)(u.FixedSizeList,{width:"100%",height:o,itemCount:n.length,itemData:n,itemKey:function(e,t){return t[e].props.item.value},itemSize:40,children:g})})}));b.displayName="VirtualDropdown";var y=b},3822:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return b}));var r=n(1),a=n(10),i=n(13),o=n(21),s=n(22),l=n(0),u=n.n(l),c=n(2457),p=n.n(c),h=n(38),d=n(3800),f=n(1382),v=n(1508),m=n(1184),g=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){var e;Object(a.a)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).state={value:e.initialValue},e.setWidgetValue=function(t){var n=e.props.element.id;e.props.widgetMgr.setIntArrayValue(n,e.state.value,t)},e.onChange=function(t){var n=e.generateNewState(t);e.setState(n,(function(){return e.setWidgetValue({fromUi:!0})}))},e}return Object(i.a)(n,[{key:"componentDidMount",value:function(){this.setWidgetValue({fromUi:!1})}},{key:"generateNewState",value:function(e){var t=function(){var t=e.option.value;return parseInt(t,10)};switch(e.type){case"remove":return{value:p()(this.state.value,t())};case"clear":return{value:[]};case"select":return{value:this.state.value.concat([t()])};default:throw new Error("State transition is unkonwn: {data.type}")}}},{key:"render",value:function(){var e=this.props,t=e.element,n=e.theme,a={width:e.width},i=t.options,o=0===i.length||this.props.disabled,s=0===i.length?"No options to select.":"Choose an option",l=i.map((function(e,t){return{label:e,value:t.toString()}}));return Object(r.jsxs)("div",{className:"row-widget stMultiSelect",style:a,children:[Object(r.jsx)(m.b,{children:t.label}),Object(r.jsx)(d.a,{options:l,labelKey:"label",valueKey:"value",placeholder:s,type:f.b.select,multi:!0,onChange:this.onChange,value:this.valueFromState,disabled:o,size:"compact",overrides:{ValueContainer:{style:function(){return{minHeight:"44px"}}},ClearIcon:{style:{color:n.colors.darkGray}},SearchIcon:{style:{color:n.colors.darkGray}},MultiValue:{props:{overrides:{Root:{style:{fontSize:n.fontSizes.sm}}}}},Dropdown:{component:v.a}}})]})}},{key:"initialValue",get:function(){var e=this.props.element.id,t=this.props.widgetMgr.getIntArrayValue(e);return void 0!==t?t:this.props.element.default}},{key:"valueFromState",get:function(){var e=this;return this.state.value.map((function(t){var n=e.props.element.options[t];return{value:t.toString(),label:n}}))}}]),n}(u.a.PureComponent),b=Object(h.withTheme)(g)}}]);
//# sourceMappingURL=24.ce8c814e.chunk.js.map