text: (this.webpackJsonpclient=this.webpackJsonpclient||[]).push([[0],{100:function(e,t,a){},136:function(e,t){},139:function(e,t,a){},182:function(e,t,a){},183:function(e,t,a){},184:function(e,t,a){},185:function(e,t,a){},186:function(e,t,a){},187:function(e,t,a){},188:function(e,t,a){"use strict";a.r(t);var n,r=a(0),l=a.n(r),c=a(23),s=a.n(c),o=a(15),m=a(4),i=a(11),u=a(25),E=a(26),h=a(30),g=a(29),f=a(27),p=a.n(f),b=a(189),A=a(190),d=a(191),v=a(195),N=a(192),y=a(193),O=a(194),C=function(e){Object(h.a)(a,e);var t=Object(g.a)(a);function a(){var e;Object(u.a)(this,a);for(var n=arguments.length,r=new Array(n),l=0;l<n;l++)r[l]=arguments[l];return(e=t.call.apply(t,[this].concat(r))).state={isOpen:!1},e.toggle=function(){e.setState({isOpen:!e.state.isOpen})},e}return Object(E.a)(a,[{key:"render",value:function(){return l.a.createElement("div",null,l.a.createElement(b.a,{style:S,dark:!0,expand:"sm",className:"mb-2"},l.a.createElement(A.a,{style:j,href:"/"},l.a.createElement("img",{src:p.a,alt:"bee img",style:{width:100,height:100}}),"The Chat Bee"),l.a.createElement(d.a,{onClick:this.toggle}),l.a.createElement(v.a,{isOpen:this.state.isOpen,navbar:!0},l.a.createElement(N.a,{className:"ml-auto",navbar:!0},l.a.createElement(y.a,{style:I},l.a.createElement(o.b,{to:"/About"},l.a.createElement(O.a,null,"About"))),l.a.createElement(y.a,{style:I},l.a.createElement(O.a,{href:"https://github.com/Monil007/thechatbee"},"Git Repository"))))))}}]),a}(r.Component),j={padding:"0.75rem",color:"rgb(255, 215, 103)",fontSize:"2.5rem",fontWeight:"700",fontFamily:"Georgia",float:"right",backgroundColor:"Navy"},S={backgroundColor:"navy"},I={fontSize:"1.5rem"},k=C,x=(a(51),a(100),function(){var e=Object(r.useState)(""),t=Object(i.a)(e,2),a=t[0],n=t[1],c=Object(r.useState)(""),s=Object(i.a)(c,2),m=s[0],u=s[1];return l.a.createElement("div",null,l.a.createElement("div",null,l.a.createElement(k,null)),l.a.createElement("div",{className:"joinOuterContainer"},l.a.createElement("div",{className:"joinInnerContainer"},l.a.createElement("h1",{className:"heading"},"Get Started"),l.a.createElement("div",null,l.a.createElement("input",{placeholder:"Name",className:"joinInput",type:"text",onChange:function(e){return n(e.target.value)}})),l.a.createElement("div",null,l.a.createElement("input",{placeholder:"Hive",className:"joinInput mt-20",type:"text",onChange:function(e){return u(e.target.value)}})),l.a.createElement(o.b,{onClick:function(e){return a&&m?null:e.preventDefault()},to:"/chat?name=".concat(a,"&room=").concat(m)},l.a.createElement("button",{className:"button mt-20",type:"submit"},"Sign In")))))}),w=a(82),M=a(77),B=a.n(M),R=a(78),U=a.n(R),z=a(28),G=a.n(z),T=(a(139),function(e){var t=e.users;return l.a.createElement("div",{className:"textContainer"},t?l.a.createElement("div",{className:"activeContainer"},l.a.createElement("h4",null,"Online:"),l.a.createElement("h4",null,t.map((function(e){var t=e.name;return l.a.createElement("div",{key:t,className:"activeItem"},l.a.createElement("img",{classname:"activeImg",alt:"Online Icon",src:G.a}),"\xa0 ",t)})))):null)}),W=a(79),K=a.n(W),J=(a(182),a(80)),P=a.n(J),Q=function(e){var t=e.message,a=t.user,n=t.text,r=!1,c=e.name.trim().toLowerCase();return a===c&&(r=!0),r?l.a.createElement("div",{className:"messageContainer justifyEnd"},l.a.createElement("p",{className:"sentText pr-10"},c),l.a.createElement("div",{className:"messageBox backgroundNavy"},l.a.createElement("p",{className:"messageText colorWhite"},P.a.emojify(n)))):l.a.createElement("div",{className:"messageContainer justifyStart"},l.a.createElement("div",{className:"messageBox backgroundLight"},l.a.createElement("p",{className:"messageText colorDark"},n)),l.a.createElement("p",{className:"sentText pl-10"},a))},Y=(a(183),function(e){var t=e.messages,a=e.name;return l.a.createElement(K.a,{className:"messages"},t.map((function(e,t){return l.a.createElement("div",{key:t},l.a.createElement(Q,{message:e,name:a}))})))}),D=a(81),F=a.n(D),V=(a(184),function(e){var t=e.room;return l.a.createElement("div",{className:"infoBar"},l.a.createElement("div",{className:"leftInnerContainer"},l.a.createElement("img",{className:"onlineIcon",src:G.a,alt:"online"}),l.a.createElement("h3",null,t)),l.a.createElement("div",{className:"rightInnerContainer"},l.a.createElement("a",{href:"/"},l.a.createElement("img",{src:F.a,alt:"close"}))))}),L=(a(185),function(e){var t=e.message,a=e.setMessage,n=e.sendMessage;return l.a.createElement("form",{className:"form"},l.a.createElement("input",{className:"input",type:"text",placeholder:"Type a message...",value:t,onChange:function(e){return a(e.target.value)},onKeyPress:function(e){return"Enter"===e.key?n(e):null}}),l.a.createElement("button",{className:"sendButton",onClick:function(e){return n(e)}},"Send"))}),q=function(e){Object(h.a)(a,e);var t=Object(g.a)(a);function a(){var e;Object(u.a)(this,a);for(var n=arguments.length,r=new Array(n),l=0;l<n;l++)r[l]=arguments[l];return(e=t.call.apply(t,[this].concat(r))).state={isOpen:!1},e.toggle=function(){e.setState({isOpen:!e.state.isOpen})},e}return Object(E.a)(a,[{key:"render",value:function(){return l.a.createElement("div",null,l.a.createElement(b.a,{style:X,dark:!0,expand:"sm",className:"mb-2"},l.a.createElement(A.a,{style:H,href:"/"},l.a.createElement("img",{src:p.a,alt:"bee img",style:{width:100,height:100}}),"The Chat Bee"),l.a.createElement(d.a,{onClick:this.toggle}),l.a.createElement(v.a,{isOpen:this.state.isOpen,navbar:!0},l.a.createElement(N.a,{className:"ml-auto",navbar:!0},l.a.createElement(y.a,{style:Z},l.a.createElement(O.a,{href:"/"},"Join")),l.a.createElement(y.a,{style:Z},l.a.createElement(O.a,{href:"https://github.com/Monil007/thechatbee"},"Git Repository"))))))}}]),a}(r.Component),H={padding:"0.75rem",color:"rgb(255, 215, 103)",fontSize:"2.5rem",fontWeight:"700",fontFamily:"Georgia",float:"right",backgroundColor:"Navy"},X={backgroundColor:"navy"},Z={fontSize:"1.5rem"},$=q,_=(a(186),function(e){var t=e.location,a=Object(r.useState)(""),c=Object(i.a)(a,2),s=c[0],o=c[1],m=Object(r.useState)(""),u=Object(i.a)(m,2),E=u[0],h=u[1],g=Object(r.useState)(""),f=Object(i.a)(g,2),p=f[0],b=f[1],A=Object(r.useState)(""),d=Object(i.a)(A,2),v=d[0],N=d[1],y=Object(r.useState)([]),O=Object(i.a)(y,2),C=O[0],j=O[1],S="https://chat-bee-app.herokuapp.com/";Object(r.useEffect)((function(){var e=B.a.parse(t.search),a=e.name,r=e.room;n=U()(S),h(r),o(a),n.emit("join",{name:a,room:r},(function(e){e&&alert(e)}))}),[S,t.search]),Object(r.useEffect)((function(){n.on("message",(function(e){j((function(t){return[].concat(Object(w.a)(t),[e])}))})),n.on("roomData",(function(e){var t=e.users;b(t)}))}),[]);return l.a.createElement("div",null,l.a.createElement("div",null,l.a.createElement($,null)),l.a.createElement("div",{className:"outerContainer"},l.a.createElement("div",{className:"container"},l.a.createElement(V,{room:E}),l.a.createElement(Y,{messages:C,name:s}),l.a.createElement(L,{message:v,setMessage:N,sendMessage:function(e){e.preventDefault(),v&&n.emit("sendMessage",v,(function(){return N("")}))}})),l.a.createElement(T,{users:p})))}),ee=(a(187),function(){return l.a.createElement("div",null,l.a.createElement("div",null,l.a.createElement($,null)),l.a.createElement("div",{className:"aboutOuterContainer"},l.a.createElement("div",{className:"aboutInnerContainer"},l.a.createElement("h1",{className:"aboutHeading"},"What's the Buzzz?")," ",l.a.createElement("hr",{className:"hr"}),l.a.createElement("h3",{className:"aboutAuthor"},"Author: Monil Kaneria"),l.a.createElement("br",null),l.a.createElement("p",{className:"aboutPara"},"This is a free online chat app!"),l.a.createElement("p",{className:"aboutPara"},"It lets you chat with your friends without worrying about data piracy."),l.a.createElement("br",null),l.a.createElement("p",{className:"aboutPara"},"To start chatting with your friends follow the steps..."),l.a.createElement("ol",{className:"aboutOl"},l.a.createElement("li",{className:"aboutOl"},"Go to Join."),l.a.createElement("li",{className:"aboutOl"},"Write your name in the Name tab."),l.a.createElement("li",{className:"aboutOl"},"Write a Hive name. Make sure that every ","person in your chat enters the same hive.")),l.a.createElement("ul",{className:"aboutUl"},l.a.createElement("li",{className:"aboutUl"},l.a.createElement("strong",null,"Note:")," This chat doesn't store your data."," ","Hence, all the chat history will be","deleted once you leave the chat.")),l.a.createElement("br",null),l.a.createElement("h4",{className:"aboutPara"},l.a.createElement("strong",null,"Keep Buzzzing!!!")))))}),te=function(){return l.a.createElement(o.a,null,l.a.createElement(m.a,{path:"/",exact:!0,component:x}),l.a.createElement(m.a,{path:"/chat",component:_}),l.a.createElement(m.a,{path:"/About",component:ee}))};s.a.render(l.a.createElement(te,null),document.querySelector("#root"))},27:function(e,t,a){e.exports=a.p+"static/media/beeicon.c97effa6.ico"},28:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAAXNSR0IArs4c6QAAAExJREFUCB1jbPh/le3lx5tNDIwMcQwg8J9hkTi/eh0LWJCBoRwoAAPlQDEGJrhKmDCIBupmQuYjs5lAZiILgNlAMRaQRSAz4UZCLQcAIwYaiAejKoYAAAAASUVORK5CYII="},81:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAHBJREFUGBmNkAEKwCAMA2VfGP2mrx3sOV2us6IymIXQGlNTW9zdhCqcZQm4dmelFUp+CZZa6sYpeUVIFyIixMqjCO51Wy5unQExuYSbSF5JASLqPsqRM21lOoWc89tagr3PSMgOiWlwnUeXWA/E78IfuAX270S3ydAAAAAASUVORK5CYII="},84:function(e,t,a){e.exports=a(188)}},[[84,1,2]]]);
  //# sourceMappingURL=main.527a3c44.chunk.js.map