(this.webpackJsonpstreamlit_component_template=this.webpackJsonpstreamlit_component_template||[]).push([[0],{23:function(t,e,a){t.exports=a(36)},35:function(t,e,a){},36:function(t,e,a){"use strict";a.r(e);var n=a(5),r=a.n(n),o=a(19),s=a.n(o),l=a(7),c=a(6),i=a(0),u=a(1),p=a(2),d=a(3),f=a(15),g=a(21),v=a(22),m=(a(35),function(t){Object(p.a)(a,t);var e=Object(d.a)(a);function a(){var t;Object(u.a)(this,a);for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];return(t=e.call.apply(e,[this].concat(o))).state={tag:"",isFocused:!1},t.render=function(){var e=t.props.args.annotations,a=t.props.args.colors,n=t.props.args.labels,o=t.props.args.text,s=t.props.args.selected_label,l=t.props.args.show_label_selector,i=t.props.args.text_height,u=t.props.theme,p={};if(u){var d="1px solid ".concat(t.state.isFocused?u.primaryColor:"gray");p.border=d,p.outline=d}return r.a.createElement(v.a,{initial:{value:e,tag:s}},(function(e){var s=e.state,u=e.setState;return r.a.createElement("span",null,l&&r.a.createElement("span",{className:"label-selector"},n.map((function(t,e){return r.a.createElement("span",{key:t,className:"label-pill ".concat(s.tag===t?"selected":"deselected"),style:{backgroundColor:a[e]},onClick:function(){return u({tag:t})}},t)}))),r.a.createElement(g.TextAnnotator,{style:{paddingBottom:"8px",lineHeight:1.5,height:i+"px",overflowY:"scroll"},content:o,value:s.value,onChange:function(e){return t.updateState(e,u)},getSpan:function(t){return Object(c.a)(Object(c.a)({},t),{},{tag:s.tag,color:a[n.indexOf(s.tag)]})}}))}))},t.mergeAnnotations=function(t){t=t.filter((function(t){return!isNaN(t.start)&&!isNaN(t.end)}));var e,a=Object(l.a)(t);try{for(a.s();!(e=a.n()).done;){var n,r=e.value,o=!1,s=null,c=Object(l.a)(t);try{for(c.s();!(n=c.n()).done;){var i=n.value;if((r.start!==i.start||r.end!==i.end)&&(i.start<=r.start&&i.end>=r.start||i.start<=r.end&&i.end>=r.end)){o=!0,s=i;break}}}catch(m){c.e(m)}finally{c.f()}if(o){var u,p=[],d=Object(l.a)(t);try{for(d.s();!(u=d.n()).done;){var f,g,v=u.value;v.start!==r.start&&v.end!==r.end&&v.start!==(null===(f=s)||void 0===f?void 0:f.start)&&v.end!==(null===(g=s)||void 0===g?void 0:g.end)&&p.push(v)}}catch(m){d.e(m)}finally{d.f()}return p}}}catch(m){a.e(m)}finally{a.f()}return t},t.updateState=function(e,a){a({value:e=t.mergeAnnotations(e)}),f.a.setComponentValue(e)},t._onFocus=function(){t.setState({isFocused:!0})},t._onBlur=function(){t.setState({isFocused:!1})},t}return Object(i.a)(a)}(f.b)),b=Object(f.c)(m);s.a.render(r.a.createElement(b,null),document.getElementById("root"))}},[[23,1,2]]]);
//# sourceMappingURL=main.5cbf701e.chunk.js.map