/*! For license information please see 11.d41ebb5d.chunk.js.LICENSE.txt */
(this["webpackJsonpstreamlit-browser"]=this["webpackJsonpstreamlit-browser"]||[]).push([[11],{3849:function(t,e,r){var n=r(3850),o=r(531),s=r(530),i=o((function(t,e){return s(t)?n(t,e):[]}));t.exports=i},3850:function(t,e,r){var n=r(536),o=r(3851),s=r(3856),i=r(299),a=r(214),l=r(537);t.exports=function(t,e,r,u){var c=-1,p=o,h=!0,d=t.length,f=[],g=e.length;if(!d)return f;r&&(e=i(e,a(r))),u?(p=s,h=!1):e.length>=200&&(p=l,h=!1,e=new n(e));t:for(;++c<d;){var m=t[c],v=null==r?m:r(m);if(m=u||0!==m?m:0,h&&v===v){for(var b=g;b--;)if(e[b]===v)continue t;f.push(m)}else p(e,v,u)||f.push(m)}return f}},3851:function(t,e,r){var n=r(3852);t.exports=function(t,e){return!!(null==t?0:t.length)&&n(t,e,0)>-1}},3852:function(t,e,r){var n=r(3853),o=r(3854),s=r(3855);t.exports=function(t,e,r){return e===e?s(t,e,r):n(t,o,r)}},3853:function(t,e){t.exports=function(t,e,r,n){for(var o=t.length,s=r+(n?1:-1);n?s--:++s<o;)if(e(t[s],s,t))return s;return-1}},3854:function(t,e){t.exports=function(t){return t!==t}},3855:function(t,e){t.exports=function(t,e,r){for(var n=r-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}},3856:function(t,e){t.exports=function(t,e,r){for(var n=-1,o=null==t?0:t.length;++n<o;)if(r(e,t[n]))return!0;return!1}},3894:function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return m}));var n=r(0),o=r.n(n),s=r(3849),i=r.n(s),a=r(25),l=r(2760),u=r(48),c=r(119),p=r(120),h=r(56),d=r(196),f=r(5);class g extends o.a.PureComponent{constructor(...t){super(...t),this.state={value:this.initialValue},this.setWidgetValue=t=>{this.props.widgetMgr.setIntArrayValue(this.props.element,this.state.value,t)},this.onChange=t=>{const e=this.generateNewState(t);this.setState(e,(()=>this.setWidgetValue({fromUi:!0})))}}get initialValue(){const t=this.props.widgetMgr.getIntArrayValue(this.props.element);return void 0!==t?t:this.props.element.default}componentDidMount(){this.setWidgetValue({fromUi:!1})}get valueFromState(){return this.state.value.map((t=>{const e=this.props.element.options[t];return{value:t.toString(),label:e}}))}generateNewState(t){const e=()=>{const e=t.option.value;return parseInt(e,10)};switch(t.type){case"remove":return{value:i()(this.state.value,e())};case"clear":return{value:[]};case"select":return{value:this.state.value.concat([e()])};default:throw new Error("State transition is unkonwn: {data.type}")}}render(){const t=this.props,e=t.element,r=t.theme,n={width:t.width},o=e.options,s=0===o.length||this.props.disabled,i=0===o.length?"No options to select.":"Choose an option",a=o.map(((t,e)=>({label:t,value:e.toString()})));return Object(f.jsxs)("div",{className:"row-widget stMultiSelect",style:n,children:[Object(f.jsx)(c.b,{children:e.label}),e.help&&Object(f.jsx)(c.c,{children:Object(f.jsx)(p.a,{content:e.help,placement:h.a.TOP_RIGHT})}),Object(f.jsx)(l.a,{options:a,labelKey:"label",valueKey:"value",placeholder:i,type:u.b.select,multi:!0,onChange:this.onChange,value:this.valueFromState,disabled:s,size:"compact",overrides:{ValueContainer:{style:()=>({minHeight:"44px"})},ClearIcon:{style:{color:r.colors.darkGray}},SearchIcon:{style:{color:r.colors.darkGray}},Tag:{props:{overrides:{Root:{style:{borderTopLeftRadius:r.radii.md,borderTopRightRadius:r.radii.md,borderBottomRightRadius:r.radii.md,borderBottomLeftRadius:r.radii.md,fontSize:r.fontSizes.sm,paddingLeft:r.spacing.md}},Action:{style:{paddingLeft:r.spacing.sm}}}}},MultiValue:{props:{overrides:{Root:{style:{fontSize:r.fontSizes.sm}}}}},Dropdown:{component:d.a}}})]})}}var m=Object(a.withTheme)(g)}}]);
//# sourceMappingURL=11.d41ebb5d.chunk.js.map