PageSourceSearch

https://zawodtyper.pl/wp-content/themes/zawodtyper/build/assets/LiveChat-szUej75O.js

js zawodtyper.pl collected 2026-10-02 03:14:05 UTC 30,108 bytes, 2 lines download raw bytes

1import{u as C}from"./utils_mixin-D7n4vZIn.js";import{d as a,e as l,f as t,E as c,q as d,n as h,m as u,G as g,H as _,i as v,j as b,s as y,T as z,k as m,I as f,h as M,Q as x,v as k,Y as S,B as L,K as I}from"./main-BxGuzwno.js";import{_ as j}from"./_plugin-vue_export-helper-DlAUqK2U.js";const E=5,D={name:"LiveChat",inject:["WP"],mixins:[C],props:["galaid","chatid","federationname","galaname"],setup(){return{userStore:L()}},data(){return{chatId:Number(this.chatid),galaId:Number(this.galaid),chatEnabled:!1,welcomeScreen:!1,defaultUsername:this.isLoggedIn()?this.WP.user.name:"",username:"",usernameError:"",userIP:"",users:new Map,blockedUsers:[],messages:[],displayedMessages:[],deletedMessages:[],visibleMessageCount:30,showLoadMoreButton:!1,showSpinner:!1,inputContent:"",tosAccepted:!1,tosError:"",lastMessageTime:0,spamError:"",userBlocked:!1,collapse:window.size.mobile,computedHeight:0,moderator:this.WP.user.role==="Admin"||this.WP.user.role==="Moderator"||this.WP.user.role==="Redaktor",federationName:this.federationname,galaName:this.galaname,tosScreen:!1,commentaryData:{startDateTime:null,endDateTime:null,status:null},isGalaHavingChat:!1,animateLikeId:0,blockedUsersShowCount:10,isAutoScrollEnabled:!0,prevScrollTop:0,prevScrollHeight:0}},computed:{blockedUsersToShow(){return this.blockedUsers.slice(0,this.blockedUsersShowCount)}},mounted(){this.getMyIP(),this.getChatData(),this.checkCommentary(),this.userStore.getLikedChatMessageIds(),this.userStore.getModeratorIds();let e=localStorage.getItem("ws_chat_username");e&&(this.username=e.split(":")[1]),this.listenWS(),window.addEventListener("resize",this.handleResize)},watch:{messages:{handler(){this.displayedMessages=this.messages.filter(e=>+e.deleted==0).slice(-this.visibleMessageCount),this.deletedMessages=this.messages.filter(e=>+e.deleted==1),this.showLoadMoreButton=this.visibleMessageCount<this.messages.length},deep:!0},displayedMessages(){const e=this.$refs.chatContainer;e&&(this.prevScrollTop=e.scrollTop,this.prevScrollHeight=e.scrollHeight,this.$nextTick(()=>{if(!e)return;requestAnimationFrame(()=>{if(this.isAutoScrollEnabled)e.scrollTo({top:0,behavior:"smooth"});else{const p=e.scrollHeight-this.prevScrollHeight;e.scrollTop=this.prevScrollTop-p}})}))}},methods:{getChatData(){axios.post(this.WP.ajaxUrl,{endpoint:"api_get_chat",gala_id:this.galaId,chat_id:this.chatId}).then(e=>{this.isGalaHavingChat=!!e.data.success,e.data.success&&(this.chatId=Number(e.data.data.chat.id),this.chatEnabled=!!Number(e.data.data.chat.enabled),this.users=new Map(e.data.data.users.map(s=>[s.id,s])),this.messages=e.data.data.messages,this.emitChatJoin(),socket?.on("connect",()=>{this.emitChatJoin()}),this.username&&this.joinChat(),socket?.auth.blocked==="true"&&(this.userBlocked=!0))}),this.moderator&&axios.post(this.WP.ajaxUrl,{endpoint:"api_get_chat_blocked_users"}).then(e=>{e.data.success&&(this.blockedUsers=e.data.data)})}
1,loadMoreMessages(){this.showSpinner=!0,setTimeout(()=>{this.showSpinner=!1,this.visibleMessageCount+=30,this.displayedMessages=this.messages.filter(e=>+e.deleted==0).slice(-this.visibleMessageCount),this.showLoadMoreButton=this.visibleMessageCount<this.messages.length},800)},checkCommentary(){let e=!1;axios.post(this.WP.ajaxUrl,{endpoint:"api_get_commentary",gala_id:this.galaId,additional:!1}).then(s=>{let n=s.data.data;if(n?.start_date){this.commentaryData.startDateTime=this.DateTime.fromSQL(n.start_date),this.commentaryData.endDateTime=this.DateTime.fromSQL(n.end_date),this.commentaryData.status=n.status;let p=setInterval(()=>{DateTime.now()<this.commentaryData.startDateTime?this.commentaryData.status="NS":DateTime.now()>=this.commentaryData.startDateTime&&DateTime.now()<this.commentaryData.endDateTime?this.commentaryData.status="IP":DateTime.now()>=this.commentaryData.endDateTime&&(this.commentaryData.status="EN"),DateTime.now()<this.commentaryData.endDateTime.plus({hours:24})?(!e&&!this.isGalaHavingChat&&(this.addChat(),e=!0),this.chatEnabled=!0):(this.chatEnabled=!1,clearInterval(p))},1e3)}})},getMyIP(){axios.post(this.WP.ajaxUrl,{endpoint:"api_get_user_ip"}).then(e=>{this.userIP=e.data.data})},addChat(){this.galaId&&axios.post(this.WP.ajaxUrl,{endpoint:"api_add_chat",gala_id:this.galaId,enabled:1}).then(e=>{e.data.success&&(e.data.data&&(this.chatId=Number(e.data.data)),socket?.emit("chat-toggle",{chat_id:this.chatId,chat_enabled:1}),this.isGalaHavingChat=!0)})},listenWS(){socket?.on("chat-new-user",e=>{this.users.set(e.id,e)}),socket?.on("chat-msg",e=>{this.messages.push(e)}),socket?.on("chat-delete-and-ban",e=>{let s=this.messages.findIndex(n=>Number(n.id)===Number(e.msg_id));s>=0&&(this.messages[s].deleted=1),socket.auth.userID===e.chat_user_id&&(this.userBlocked=!0),this.blockedUsers.some(n=>n.ip===e.user_ip)||this.blockedUsers.push({ip:e.user_ip,chat_user_id:e.chat_user_id})}),socket?.on("chat-unban",e=>{this.userIP===e.user_ip&&(this.userBlocked=!1),this.blockedUsers=this.blockedUsers.filter(s=>s.ip!==e.user_ip)}),socket?.on("chat-restore-message",e=>{let s=this.messages.findIndex(n=>Number(n.id)===Number(e.msg_id));s>=0&&(this.messages[s].deleted=0)}),socket?.on("chat-toggle",e=>{this.chatId===e.chat_id&&(this.chatEnabled=!!e.chat_enabled)}),socket?.on("status-commentary",e=>{this.galaId===e.gala_id&&(this.commentaryData.status=e.status,e.isDateChanged===!0&&(this.commentaryData.endDateTime=this.DateTime.fromFormat(e.endDateTime,"yyyy-MM-dd HH:mm:ss")))}),socket?.on("user-blocked",e=>{e===this.userIP&&(this.userBlocked=!0)}),socket?.on("chat-like-added",e=>{e.chatId===this.chatId&&this.addLikeBySomeoneElse(e)}),socket?.on("chat-like-removed",e=>{e.chatId===this.chatId&&this.removeLikeBySomeoneElse(e)}),socket?.on("chat-delete-message",e=>{let s=this.messages.findIndex(n=>Number(n.id)===Number(e.msg_id));s>=0&&(this.messages[s].deleted=1)})},emitChatJoin(){socket?.emit("chat-join",{chat_id:this.chatId})},sendMessage(){if(this.DateTime.now().toUnixInteger()-this.lastMessageTime<E){this.spamError="Odczekaj chwilę, zanim wyślesz kolejną wiadomość";return}this.inputContent.length<=0||this.inputContent.trim().length<=0||(socket?.emit("chat-msg",{chat_id:this.chatId,content:this.inputContent}),this.inputContent="",this.spamError="",this.lastMessageTime=this.DateTime.now().toUnixInteger())},joinChat(){if(this.username.length<=0){if(this.tosAccepted)this.tosError="";else{this.tosError="Aby dołączyć do chatu, musisz zatwierdzić regulamin";return}if(!this.defaultUsername){this.usernameError="Podaj nazwę użytkownika";return}if(!/^[\w ąęćńółśżźĄĘĆŃÓŁŚŻŹ]+$/.test(this.defaultUsername)){this.usernameError="Nazwa użytkownika nie może składać się ze znaków specjalnych";return}for(let[s,n]of this.users)if(n.username===this.defaultUsername&&n.id!==socket.auth.userID&&+n.wp_user_id!=+this.WP.user.id){this.usernameError="Użytkownik o tej nazwie już istnieje";return}this.usernameError="",this.username=this.defaultUsername,localStorage.setItem("ws_chat_username",`${this.chatId}:${this.username}`),this.welcomeScreen=!1}socket?.emit("chat-new-user",{chat_id:this.chatId,username:this.username,wp_user_id:this.WP.user.id})},getUsername(e){const s=this.users.get(e);return s===void 0?"":s.username},getUserIP(e){const s=this.users.get(e);return s===void 0?"":s.user_ip},isUserModerator(e){const s=this.users.get(e);return s===void 0?!1:this.userStore.isUserModerator(s.wp_user_id)},toggleCollapse(e){this.collapse=!this.collapse,window.size.mobile&&(this.collapse?this.unblockScrolling():this.blockScrolling(),countClicks(`chat_${e}`))},deleteMsgAndBanUser(e,s){socket?.emit("chat-delete-and-ban",{chat_id:this.chatId,chat_user_id:s,msg_id:e,user_ip:this.getUserIP(s)})},deleteMsg(e){socket?.emit("chat-delete-message",{chat_id:this.chatId,msg_id:e})},restoreMessage(e){socket?.emit("chat-restore-message",{chat_id:this.chatId,msg_id:e})},handleResize(){window.size.desktop&&this.unblockScrolling()},unbanUserIP(e){socket?.emit("chat-unban",{chat_id:this.chatId,user_ip:e})},toggleLike(e){return this.animateLikeId=e.id,this.isLikedByMe(e.id)?(this.animateLikeId=0,this.removeLike(e)):this.addLike(e)},addLike(e){axios.post(this.WP.ajaxUrl,{endpoint:"api_add_chat_message_like",message_id:e.id}).then(s=>{s.data.success&&s.data.data.message!=="error"&&(this.userStore.addLikedChatMessageId(e.id),e.like_count++,socket?.emit("chat-like-added",{messageId:e.id,chatId:this.chatId}))})},removeLike(e){axios.post(this.WP.ajaxUrl,{endpoint:"api_delete_chat_message_like",message_id:e.id}).then(s=>{s.data.success&&s.data.data.message!=="error"&&(this.userStore.removeLikedChatMessageId(e.id),e.like_count--,socket?.emit("chat-like-removed",{messageId:e.id,chatId:this.chatId}))})},isLikedByMe(e){return this.userStore.isChatMessageLiked(e)},addLikeBySomeoneElse(e){let s=this.messages.find(n=>n.id===e.messageId);s&&s.like_count++},removeLikeBySomeoneElse(e){let s=this.messages.find(n=>n.id===e.messageId);s&&s.like_count--},handleScroll(){this.$refs.chatContainer&&(this.isAutoScrollEnabled=this.$refs.chatContainer.scrollTop>=-10)}}},U={class:"relative h-fit"}
1,T={key:0,class:"bg-zt-light/35 w-[43px] h-[33px] rounded-zt flex items-center justify-center"},B=["src"],N={key:1},P={class:"font-medium text-sm"},A={key:0,class:"h-4 text-[10px] text-[#3EF954]"},H=t("svg",{class:"inline mr-1 mb-px",width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("rect",{width:"10",height:"10",rx:"5",fill:"#3EF95433"}),t("rect",{x:"2",y:"2",width:"6",height:"6",rx:"3",fill:"#3EF954"})],-1),Z=t("span",null,"LIVE",-1),W=[H,Z],F={key:1,class:"h-4 text-[10px] text-[#F93E3E]"},V=t("svg",{class:"inline mr-1 mb-px",width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("rect",{width:"10",height:"10",rx:"5",fill:"#F93E3E33"}),t("rect",{x:"2",y:"2",width:"6",height:"6",rx:"3",fill:"#F93E3E"})],-1),q=t("span",null,"ZAKOŃCZONA",-1),G=[V,q],K={key:2},J=t("svg",{class:"inline-block mr-2",xmlns:"http://www.w3.org/2000/svg",width:"21",height:"15",viewBox:"0 0 21 15",fill:"none"},[t("path",{d:"M7.36094 0.276562L-0.000782657 7.63828L7.36094 15L8.56328 13.7977L3.22656 8.48203L16.6211 8.48203L16.6211 6.79453L3.22656 6.79453L8.56328 1.47891L7.36094 0.276562Z",fill:"white"}),t("path",{d:"M19.1523 8.48242L20.8398 8.48242L20.8398 6.79492L19.1523 6.79492L19.1523 8.48242Z",fill:"white"})],-1),O=t("svg",{class:"fill-white",width:"16",height:"16",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M810.65984 170.65984q18.3296 0 30.49472 12.16512t12.16512 30.49472q0 18.00192-12.32896 30.33088l-268.67712 268.32896 268.67712 268.32896q12.32896 12.32896 12.32896 30.33088 0 18.3296-12.16512 30.49472t-30.49472 12.16512q-18.00192 0-30.33088-12.32896l-268.32896-268.67712-268.32896 268.67712q-12.32896 12.32896-30.33088 12.32896-18.3296 0-30.49472-12.16512t-12.16512-30.49472q0-18.00192 12.32896-30.33088l268.67712-268.32896-268.67712-268.32896q-12.32896-12.32896-12.32896-30.33088 0-18.3296 12.16512-30.49472t30.49472-12.16512q18.00192 0 30.33088 12.32896l268.32896 268.67712 268.32896-268.67712q12.32896-12.32896 30.33088-12.32896z"})],-1),Q=[O],R={class:"flex flex-col gap-y-1 pt-2 pb-3"},Y={class:"text-white text-xs font-medium"},X={key:0,class:"text-xs font-medium"},$=t("span",{class:"text-zt-red"},"Moderator",-1),ee=["onClick"],te=t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 0C3.15 0 0 3.15 0 7C0 10.85 3.15 14 7 14C10.85 14 14 10.85 14 7C14 3.15 10.85 0 7 0ZM1.4 7C1.4 3.92 3.92 1.4 7 1.4C8.26 1.4 9.45 1.82 10.43 2.59L2.59 10.43C1.82 9.45 1.4 8.26 1.4 7ZM7 12.6C5.74 12.6 4.55 12.18 3.57 11.41L11.41 3.57C12.18 4.55 12.6 5.74 12.6 7C12.6 10.08 10.08 12.6 7 12.6Z",fill:"#FF4A5D"},null,-1),se=[te],ie=["onClick"],oe=t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.9 3.1L3.1 10.9C2.9 11.1 2.6 11.1 2.4 10.9C2.2 10.7 2.2 10.4 2.4 10.2L10.2 2.4C10.4 2.2 10.7 2.2 10.9 2.4C11.1 2.6 11.1 2.9 10.9 3.1ZM3.1 3.1C2.9 2.9 2.9 2.6 3.1 2.4C3.3 2.2 3.6 2.2 3.8 2.4L10.6 10.2C10.8 10.4 10.8 10.7 10.6 10.9C10.4 11.1 10.1 11.1 9.9 10.9L3.1 3.1Z",fill:"#FF4A5D"},null,-1),ae=[oe],le={class:"flex gap-x-1.5 items-center"},re={class:"bg-[#2D394E] rounded-t-lg rounded-br-lg flex items-center gap-x-2 w-fit px-2.5 py-1 relative"},ne={class:"text-xs break-words overflow-hidden min-w-0 [word-break:_break-word]"},de={class:"text-center text-[10px] w-[26px] shrink-0 text-zt-more"},he={key:0,class:"text-xs -bottom-0.5 translate-y-1/2 duration-500 absolute bg-[#344762] min-w-[25px] h-[15px] flex flex-nowrap items-center justify-between gap-x-1 py-px pl-0.5 pr-1 transition-colors rounded-xl tabular-nums right-1 xl:right-1"},ce=t("circle",{cx:"8",cy:"8",r:"8",fill:"#419AD4","stroke-width":"0"},null,-1),ue=t("path",{d:"M8.02052 3.29201C7.97899 3.31156 7.953 3.35321 7.95412 3.39843C7.97027 4.05479 7.97835 4.43525 7.97835 4.53979V4.83551L7.92797 4.93901C7.8714 5.05524 7.84218 5.10345 7.42778 5.76467C7.26549 6.02362 7.051 6.37847 6.95113 6.55326C6.8321 6.76157 6.7698 6.99652 6.77024 7.23539L6.77615 10.4265C6.77687 10.8176 7.09988 11.1342 7.49809 11.1342H11.0513L11.1808 11.0718C11.4717 10.9316 11.6853 10.6054 11.6868 10.2988C11.6874 10.1806 11.6836 10.1653 11.6225 10.0417C11.5868 9.96934 11.5594 9.90908 
111.5617 9.90775C11.564 9.90642 11.631 9.87712 11.7107 9.84266C12.053 9.69455 12.2544 9.45916 12.269 9.19021C12.2767 9.04821 12.2428 8.95009 12.1285 8.78295C12.0824 8.71557 12.0447 8.65649 12.0447 8.65164C12.0447 8.6468 12.0558 8.64284 12.0695 8.64284C12.0831 8.64284 12.1498 8.61458 12.2177 8.58004C12.5277 8.4223 12.7052 8.12287 12.6549 7.84249C12.6214 7.65568 12.5212 7.50716 12.2986 7.31427L12.2256 7.25107L12.3095 7.16301C12.4176 7.04942 12.4832 6.95595 12.5262 6.85412C12.5546 6.78718 12.5609 6.74432 12.5612 6.6166C12.5617 6.37306 12.5044 6.20983 12.3687 6.06876C12.2778 5.97426 12.1765 5.91277 12.0332 5.86522L11.9155 5.82615C10.2991 5.81738 9.49093 5.81105 9.49096 5.80717C9.49102 5.80134 9.50466 5.6868 9.52127 5.55262C9.55932 5.24537 9.56347 4.6846 9.52919 4.48065C9.43159 3.89988 9.1171 3.44498 8.70331 3.28599C8.5997 3.24619 8.56565 3.2406 8.40398 3.23694C8.30366 3.23467 8.19168 3.2389 8.15517 3.24635C8.11864 3.25379 8.05805 3.27434 8.02052 3.29201ZM4.65918 6.73157H6.03585C6.1572 6.73157 6.25557 6.82819 6.25557 6.94737V11.2209C6.25557 11.3401 6.1572 11.4367 6.03585 11.4367H4.65918C4.53783 11.4367 4.43945 11.3401 4.43945 11.2209V6.94737C4.43945 6.82819 4.53783 6.73157 4.65918 6.73157Z","stroke-width":"0.5"},null,-1),me=[ce,ue],pe=["onClick"],we=t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.48356 4.05432C7.44316 4.07339 7.41788 4.11403 7.41896 4.15814C7.43468 4.79846 7.44254 5.16962 7.44254 5.27161V5.5601L7.39353 5.66107C7.3385 5.77446 7.31007 5.8215 6.90696 6.46656C6.74909 6.71918 6.54044 7.06537 6.44329 7.23588C6.3275 7.4391 6.26689 7.66831 6.26732 7.90134L6.27307 11.0144C6.27377 11.396 6.58799 11.7049 6.97536 11.7049H10.4318L10.5578 11.644C10.8408 11.5072 11.0485 11.189 11.05 10.8899C11.0506 10.7746 11.0469 10.7597 10.9875 10.639C10.9527 10.5685 10.9261 10.5097 10.9283 10.5084C10.9305 10.5071 10.9957 10.4785 11.0732 10.4449C11.4062 10.3004 11.6021 10.0708 11.6163 9.80839C11.6238 9.66986 11.5909 9.57414 11.4797 9.41108C11.4348 9.34535 11.3981 9.28771 11.3981 9.28298C11.3981 9.27826 11.409 9.2744 11.4223 9.2744C11.4355 9.2744 11.5004 9.24683 11.5664 9.21314C11.868 9.05924 12.0407 8.76713 11.9918 8.4936C11.9592 8.31136 11.8617 8.16647 11.6451 7.97829L11.5742 7.91664L11.6557 7.83073C11.7609 7.71992 11.8247 7.62873 11.8666 7.52939C11.8941 7.46409 11.9003 7.42227 11.9006 7.29767C11.9011 7.06009 11.8453 6.90084 11.7134 6.76322C11.625 6.67103 11.5263 6.61104 11.387 6.56465L11.2724 6.52654C9.7001 6.51798 8.91393 6.51181 8.91396 6.50802C8.91402 6.50234 8.92729 6.39059 8.94345 6.25969C8.98046 5.95995 8.9845 5.41289 8.95115 5.21391C8.8562 4.64734 8.55028 4.20355 8.14776 4.04845C8.04697 4.00962 8.01385 4.00416 7.85658 4.0006C7.75899 3.99838 7.65006 4.00251 7.61454 4.00978C7.57901 4.01703 7.52007 4.03708 7.48356 4.05432ZM4.21374 7.40984H5.55293C5.67097 7.40984 5.76667 7.50409 5.76667 7.62036V11.7895C5.76667 11.9057 5.67097 12 5.55293 12H4.21374C4.09569 12 4 11.9057 4 11.7895V7.62036C4 7.50409 4.09569 7.40984 4.21374 7.40984Z"},null,-1),ge=t("path",{d:"M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM1.11827 8C1.11827 11.8007 4.19933 14.8817 8 14.8817C11.8007 14.8817 14.8817 11.8007 14.8817 8C14.8817 4.19933 11.8007 1.11827 8 1.11827C4.19933 1.11827 1.11827 4.19933 1.11827 8Z"},null,-1),_e=[we,ge],fe={key:0,class:"flex-1 mx-auto pt-2 pb-1"},xe={key:0,class:"spinner mx-auto h-5 w-5",role:"status"},ke=t("span",{class:"invisible"},"Wczytywanie...",-1),Ce=[ke],ve={key:1,class:"bg-zt-normal border-t border-zt-light h-[58px] text-xs flex items-center justify-center gap-x-5 rounded-b-zt"},be={key:2,class:"bg-zt-normal border-t border-t-zt-light text-xs rounded-b-zt p-2 relative"},ye={key:0,class:"text-zt-red w-full text-center"},ze={class:"text-right opacity-50 font-light"},Me={class:"relative h-10"},Se=["placeholder"],Le=t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M14.3336 7.39999L2.4003 1.39999C1.8003 1.13332 1.13363 1.66666 1.4003 2.26666L3.06697 6.73333L10.667 7.99999L3.06697 9.26666L1.4003 13.7333C1.2003 14.3333 1.8003 14.8667 2.4003 14.5333L14.3336 8.53332C14.8003 8.33332 14.8003 7.66666 14.3336 7.39999Z",fill:"white"})],-1),Ie=[Le],je={key:3,class:"bg-zt-normal border-t border-t-zt-light h-[54px] text-xs rounded-b-zt p-2"},Ee={class:"bg-zt-light/35 border border-zt-light rounded-[8px] h-[40p
1x] flex items-center justify-center"},De={key:0,class:"opacity-40"},Ue={key:1,class:"opacity-40"},Te={key:4,class:"flex flex-col items-center px-3 py-3 h-full bg-zt-normal rounded-b-zt overflow-y-scroll"},Be=I('<ul class="text-sm checks-list-item pl-6"><li class="pt-1">Nie bądź wulgarny, stosuj się do zasad ortografii i interpunkcji</li><li class="pt-1">Nie spamuj</li><li class="pt-1">Nie flooduj (flood to wielokrotne wysłanie tej samej wiadomości lub wielu różnych wiadomości w krótkim odstępie czasu)</li><li class="pt-1">Nie pisz ciągle wielkimi literami (caps lockiem)</li><li class="pt-1">Nie nadużywaj (znaków interpunkcyjnych, emotikon, zdjęć, animowanych gifów itp.)</li><li class="pt-1">Nie prowokuj kłótni</li><li class="pt-1">Nie obrażaj nikogo</li><li class="pt-1">Zakaz pisania naprzemiennie wielkich i małych liter (tzw. nowomowa internetowa, poke-pismo)</li><li class="pt-1">Nie trolluj</li><li class="pt-1">Szanuj prywatność innych</li><li class="pt-1">Nie podszywaj się pod innych użytkowników</li></ul>',1),Ne=[Be],Pe={key:5,class:"flex flex-col justify-between items-center px-3 py-3 h-[464px] bg-zt-normal rounded-b-zt"},Ae=t("div",{class:"font-medium text-white text-center"},"Witaj w Chacie na żywo dla strony ZawódTyper.pl.",-1),He=["src"],Ze=t("div",{class:"font-medium text-white w-full"},"Nazwa",-1),We={class:"flex items-center gap-x-3"},Fe={for:"regulamin-chatu-checkbox",class:"zt-hover cursor-pointer text-xs"},Ve=t("div",{class:"live-chat-icon flex space-x-2"},[t("svg",{width:"26",height:"20",viewBox:"0 0 26 20",fill:"white",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M18.7778 7.14286C18.7778 3.19643 14.5753 0 9.38889 0C4.20243 0 0 3.19643 0 7.14286C0 8.67411 0.636458 10.0848 1.71528 11.25C1.11042 12.5982 0.112847 13.6696 0.0993056 13.683C0 13.7857 -0.0270833 13.9375 0.0315972 14.0714C0.0902778 14.2054 0.216667 14.2857 0.361111 14.2857C2.01319 14.2857 3.3809 13.7366 4.36493 13.1696C5.8184 13.8705 7.53819 14.2857 9.38889 14.2857C14.5753 14.2857 18.7778 11.0893 18.7778 7.14286ZM24.2847 16.9643C25.3635 15.8036 26 14.3884 26 12.8571C26 9.87054 23.5851 7.3125 20.1635 6.24554C20.2042 6.54018 20.2222 6.83929 20.2222 7.14286C20.2222 11.8705 15.3608 15.7143 9.38889 15.7143C8.90139 15.7143 8.42743 15.6786 7.95799 15.6295C9.37986 18.1964 12.7201 20 16.6111 20C18.4618 20 20.1816 19.5893 21.6351 18.8839C22.6191 19.4509 23.9868 20 25.6389 20C25.7833 20 25.9142 19.9152 25.9684 19.7857C26.0271 19.6563 26 19.5045 25.9007 19.3973C25.8872 19.3839 24.8896 18.317 24.2847 16.9643Z"})]),t("span",null,"Chat")],-1),qe=t("div",{class:"mt-4 bg-zt-light text-center rounded-t-zt shadow-zt"}," Zablokowani użytkownicy ",-1),Ge={class:"bg-zt-normal px-2.5 py-1 overflow-y-scroll flex flex-col-reverse overscroll-none rounded-b-zt shadow-zt"},Ke={class:"flex gap-x-2.5 text-sm text-zt-more"},Je={class:"text-[10px] w-[28px] shrink-0 text-center flex flex-col justify-center items-center"},Oe=["onClick"],Qe=t("path",{d:"M20.062 11.469c0-0.266-0.094-0.531-0.281-0.719l-1.422-1.406c-0.187-0.187-0.438-0.297-0.703-0.297s-0.516 0.109-0.703 0.297l-6.375 6.359-3.531-3.531c-0.187-0.187-0.438-0.297-0.703-0.297s-0.516 0.109-0.703 0.297l-1.422 1.406c-0.187 0.187-0.281 0.453-0.281 0.719s0.094 0.516 0.281 0.703l5.656 5.656c0.187 0.187 0.453 0.297 0.703 0.297 0.266 0 0.531-0.109 0.719-0.297l8.484-8.484c0.187-0.187 0.281-0.438 0.281-0.703zM24 14c0 6.625-5.375 12-12 12s-12-5.375-12-12 5.375-12 12-12 12 5.375 12 12z"},null,-1),Re=[Qe],Ye={class:"break-words overflow-hidden min-w-0 [word-break:_break-word]"},Xe={class:"text-white font-medium"},$e={class:"text-zt-more"},et=t("div",{class:"mt-4 bg-zt-light text-center rounded-t-zt shadow-zt"}," Usunięte wiadomości ",-1),tt={class:"bg-zt-normal px-2.5 py-1 overflow-y-scroll flex flex-col-reverse overscroll-none rounded-b-zt shadow-zt"},st={class:"text-[10px] w-[28px] shrink-0 text-center flex flex-col justify-center items-center"},it=["onClick"],ot=t("path",{d:"M20.062 11.469c0-0.266-0.094-0.531-0.281-0.719l-1.422-1.406c-0.187-0.187-0.438-0.297-0.703-0.297s-0.516 0.109-0.703 0.297l-6.375 6.359-3.531-3.531c-0.187-0.187-0.438-0.297-0.703-0.297s-0.516 0.109-0.703 0.297l-1.422 1.406c-0.187 0.187-0.281 0.453-0.281 0.719s0.094 0.516 0.281 0.703l5.656 5.656c0.187 0.187 0.453 0.297 0.703 0.297 0.266 0 0.531-0.109 0.719-0.297l8.484-8.484c0.187-0.187 0.281-0.438 0.281-0.703zM24 14c0 6.625-5.375 12-12 12s-12-5.375-12-12 5.375-12 12-12 12 5.375 12 12z"},null,-1),at=[ot],lt={class:"break-words overflow-hidden min-w-0 [word-break:_break-word]"},rt={class:"text-white font-medium"},nt={class:"break-words overflow-hidden min-w-0 [word-break:_break-word]"};function dt(e,s,n,p,i,r){return a(),l("div",{class:c(["z-backdrop rounded-zt fixed left-0 overflow-hidden transition-all duration-700 w-full transition-reverse h-full flex flex-col xl:relative xl:overflow-visible xl:z-10",[e.window.size.mobile?i.collapse?"top-full":r.WP.user.adminBar?"!top-[32px] !h-[calc(100%_-_32px)]":"!top-0":""]])},[t("div",U,[t("div",{class:c(["relative flex bg-zt-light-bg items-center px-2 gap-x-2.5 rounded-t-zt border-b border-b-zt-light/60 shadow-zt h-14",{"translate-y-full opacity-0 pointer-events-none":i.collapse}])},[i.welcomeScreen?d("",!0):(a(),l("div",T,[t("img",{width:"37",height:"37",alt:"",src:`/wp-content/themes/zawodtyper/assets/images/gale_logo/${i.federationName.toLowerCase().replaceAll(" ","")}.webp`},null,8,B)])),i.welcomeScreen?d("",!0):(a(),l("div",N,[t("div",P,h(i.galaName),1),i.commentaryData.status==="IP"?(a(),l("div",A,W)):i.commentaryData.status==="EN"?(a(),l("div",F,G)):d("",!0)])),i.welcomeScreen?(a(),l("div",K,[t("button",{class:"ml-1 zt-hover cursor-pointer self-start text-white",onClick:s[0]||(s[0]=o=>{i.welcomeScreen=!1,i.tosScreen=!1})},[J,u(" Powrót do Chatu ")])])):d("",!0),t("button",{class:"only-mobile-flex ml-auto mr-0.5 w-[26px] h-[26px] bg-zt-light zt-hover justify-center items-center rounded-zt",onClick:s[1]||(s[1]=o=>r.toggleCollapse("zwijajka"))},Q)],2)]),t("div",{class:c(["h-0 overflow-hidden transition-all duration-700 z-10 relative shadow-zt bg-zt-normal flex flex-col",{"!h-full xl:!h-[464px]":!i.collapse}])},[i.welcomeScreen?d("",!0):(a(),l("div",{key:0,id:"chat-container",ref:"chatContainer",class:"bg-zt-normal px-2.5 overflow-y-scroll flex flex-col-reverse overscroll-none h-full",onScroll:s[3]||(s[3]=(...o)=>r.handleScroll&&r.handleScroll(...o))},[t("div",R,[(a(!0),l(g,null,_(i.displayedMessages,o=>(a(),l("div",{key:o.id,class:"flex flex-col"}
1,[t("div",null,[t("span",Y,h(r.getUsername(o.chat_user_id)),1),r.isUserModerator(o.chat_user_id)?(a(),l("span",X,[u(" | "),$])):d("",!0),i.moderator?(a(),l("svg",{key:1,onClick:w=>r.deleteMsgAndBanUser(o.id,o.chat_user_id),class:"inline-block zt-hover cursor-pointer ml-4",width:"12",height:"12",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},se,8,ee)):d("",!0),i.moderator?(a(),l("svg",{key:2,onClick:w=>r.deleteMsg(o.id),class:"inline-block zt-hover cursor-pointer ml-4",width:"18",height:"18",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ae,8,ie)):d("",!0)]),t("div",le,[t("div",re,[t("div",ne,h(o.content),1),t("div",de,h(e.DateTime.fromSQL(o.date).toFormat("HH:mm")),1),v(z,{name:"fade"},{default:b(()=>[o.like_count>0?(a(),l("div",he,[(a(),l("svg",{class:c(["w-3 h-3 basis-3 overflow-hidden rounded-full transition-colors duration-[1s] shrink-0 grow-0 stroke-transparent fill-white",{"animate-[like-animation_1s]":i.animateLikeId===o.id}]),viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},me,2)),t("div",{class:"grow shrink-0 text-center basis-2",style:y({width:9*o.like_count.toString().length+"px"})},h(o.like_count),5)])):d("",!0)]),_:2},1024)]),(a(),l("svg",{class:c(["shrink-0 cursor-pointer zt-hover",r.isLikedByMe(o.id)?"fill-[#419AD4]":"fill-[#93A3BA]"]),onClick:w=>r.toggleLike(o),width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_e,10,pe))])]))),128))]),i.showSpinner||i.showLoadMoreButton?(a(),l("div",fe,[i.showSpinner?(a(),l("div",xe,Ce)):i.showLoadMoreButton?(a(),l("button",{key:1,class:"text-sm zt-hover uppercase text-zt-more underline px-4",onClick:s[2]||(s[2]=(...o)=>r.loadMoreMessages&&r.loadMoreMessages(...o))},"Załaduj więcej wiadomości")):d("",!0)])):d("",!0)],544)),!i.username&&!i.welcomeScreen&&i.chatEnabled?(a(),l("div",ve,[u(" Chcesz dołączyć do chatu? "),t("button",{class:"zt-button h-9 py-0",onClick:s[4]||(s[4]=o=>i.welcomeScreen=!0)}," KLIKNIJ TUTAJ ")])):d("",!0),i.username&&!i.welcomeScreen&&i.chatEnabled?(a(),l("div",be,[i.spamError?(a(),l("div",ye,h(i.spamError),1)):d("",!0),t("div",ze,h(`${i.inputContent.length}/250`),1),t("div",Me,[m(t("textarea",{class:"w-full h-10 bg-zt-light resize-none pt-3 !pr-[18px] pb-2 !text-xs mt-0.5 !rounded-[8px]",type:"text","onUpdate:modelValue":s[5]||(s[5]=o=>i.inputContent=o),onKeydown:s[6]||(s[6]=M(x((...o)=>r.sendMessage&&r.sendMessage(...o),["exact","prevent"]),["enter"])),maxlength:"250",placeholder:`Publikujesz jako ${i.username}`},null,40,Se),[[f,i.inputContent]]),t("button",{class:c(["absolute -bottom-px right-0 h-10 w-[28px]",{"-bottom-1":i.spamError}]),onClick:s[7]||(s[7]=(...o)=>r.sendMessage&&r.sendMessage(...o))},Ie,2)])])):d("",!0),i.chatEnabled?d("",!0):(a(),l("div",je,[t("div",Ee,[i.commentaryData.status==="NS"?(a(),l("span",De," Chat wyłączony, relacja jeszcze się nie rozpoczęła. ")):(a(),l("span",Ue," Chat został wyłączony, relacja zakończyła się. "))])])),i.tosScreen?(a(),l("div",Te,Ne)):d("",!0),i.welcomeScreen&&!i.tosScreen?(a(),l("div",Pe,[Ae,t("img",{width:"186",height:"186",src:"/wp-content/themes/zawodtyper/assets/images/chat-welcome-screen.svg",alt:""},null,8,He),Ze,m(t("input",{class:"text-base font-medium h-11 px-4",type:"text",placeholder:"Podaj swoją nazwę","onUpdate:modelValue":s[8]||(s[8]=o=>i.defaultUsername=o)},null,512),[[f,i.defaultUsername]]),m(t("span",{class:"w-full transition-all text-zt-red text-xs"},h(i.usernameError),513),[[k,i.usernameError]]),t("div",We,[m(t("input",{id:"regulamin-chatu-checkbox",class:"appearance-none w-6 h-6 rounded-zt bg-zt-normal border border-[#A1A1A1] shrink-0 cursor-pointer",type:"checkbox","onUpdate:modelValue":s[9]||(s[9]=o=>i.tosAccepted=o)},null,512),[[S,i.tosAccepted]]),t("label",Fe,[u(" Zapoznałem się z "),t("span",{class:"text-[#66E97E] zt-hover",onClick:s[10]||(s[10]=x(o=>i.tosScreen=!0,["stop"]))},"regulaminem"),u(" i akceptuję jego postanowienia ")])]),m(t("span",{class:"transition-all text-zt-red text-xs"},h(i.tosError),513),[[k,i.tosError]]),t("button",{class:"zt-button w-full",onClick:s[11]||(s[11]=(...o)=>r.joinChat&&r.joinChat(...o))},"DOŁĄCZ")])):d("",!0)],2),e.window.size.mobile?(a(),l("div",{key:0,class:c(["fixed bottom-3 right-3 rounded-full py-2 px-3 border-2 border-zt-light flex items-center justify-center zt-hover transition-opacity opacity-100 duration-700 bg-[#282e37] cursor-pointer !z-[1]",{"!opacity-0":!i.collapse}]),onClick:s[12]||(s[12]=o=>r.toggleCollapse("kolko"))}
1,[Ve,t("div",{class:c(["bg-zt-red w-2.5 h-2.5 rounded-full absolute -top-0 -right-0",{"!bg-zt-green":i.chatEnabled}])},null,2)],2)):d("",!0),e.window.size.desktop&&i.moderator?(a(),l(g,{key:1},[qe,t("div",Ge,[i.blockedUsers.length>i.blockedUsersShowCount?(a(),l("div",{key:0,class:"zt-hover cursor-pointer text-center bg-zt-light rounded-zt w-fit px-4 mx-auto mt-1",onClick:s[13]||(s[13]=o=>i.blockedUsersShowCount+=10)}," Rozwiń ")):d("",!0),(a(!0),l(g,null,_(r.blockedUsersToShow,o=>(a(),l("div",Ke,[t("div",Je,[(a(),l("svg",{onClick:w=>r.unbanUserIP(o.ip),class:"fill-zt-green cursor-pointer",width:"16",height:"16","data-bs-toggle":"tooltip",title:"Odblokuj użytkownika",viewBox:"0 0 24 28"},Re,8,Oe))]),t("div",null,[t("div",Ye,[t("span",Xe,h(r.getUsername(o.chat_user_id)),1),t("span",$e," ("+h(o.ip)+")",1)])])]))),256))]),et,t("div",tt,[(a(!0),l(g,null,_(i.deletedMessages,o=>(a(),l("div",{key:o.id,class:"flex gap-x-2.5 text-sm text-zt-more"},[t("div",st,[u(h(e.DateTime.fromSQL(o.date).toFormat("HH:mm"))+" ",1),(a(),l("svg",{onClick:w=>r.restoreMessage(o.id),class:"fill-zt-green cursor-pointer",width:"16",height:"16","data-bs-toggle":"tooltip",title:"Przywróć wiadomość",viewBox:"0 0 24 28"},at,8,it))]),t("div",null,[t("div",lt,[t("span",rt,h(r.getUsername(o.chat_user_id)),1)]),t("div",nt,h(o.content),1)])]))),128))])],64)):d("",!0)],2)}const mt=j(D,[["render",dt]]);export{mt as default};
2//# sourceMappingURL=LiveChat-szUej75O.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.