PageSourceSearch

https://kikoxp.com/js/app.min/messages.4cb8df40bdfb9bef.js

js kikoxp.com collected 2026-09-26 03:27:42 UTC 11,096 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5871],{6629:(e,t,a)=>{a.r(t),a.d(t,{default:()=>P});var n=a(9347);function s(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?r(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=Array(t);a<t;a++)n[a]=e[a];return n}var o={class:"message-section u-card"},i={class:"u-container message-section__body flex"},c={key:0,class:"message-section__threads"},l=["onClick"],d=["src","alt","title"],h={class:"hidden sm:block u-width-100"},m={class:"u-text-black u-m-0"},u=["textContent"],g={key:0},p={class:"discover-no-results u-card u-text-center"};var f={class:"message-section__messages flex-auto"},y={class:"message-section__header p-625"},w={class:"flex items-center justify-between"},v=["textContent"],b={class:"message-section__message-list u-pt-10 u-pb-10",id:"myDiv"},_={class:"message-section__message-body u-flex"},N=["textContent"],T=["src","alt","title"],k={class:"message-section__message-footer"},E=["textContent"],x={class:"u-p-10 u-bg-blue-lightest"},V={class:"text-right p-625"},C=["disabled"];const A={props:["thread"],data:function(){return{messageArray:this.messages,newMessage:"",activeTyper:!1,typingTimer:!1,authorIsCurrentUser:!1}},computed:{messageIsEmpty:function(){return""==this.newMessage},messagesSortedByDate:function(){return this.messageArray&&this.messageArray.sort(function(e,t){return new Date(e.created_at)-new Date(t.created_at)}),this.messageArray}},watch:{thread:function(e,t){window.Echo.leave("thread.".concat(t.id,".messages")),this.initThread()}},methods:{formatDate:function(e){var t=moment.utc(e).local(),a=moment().startOf("day");return t.isSame(a,"d")?t.format("h:mm A"):t.format("MMM D, YYYY, h:mm A")},initThread:function(){var e=this;axios.get("".concat(window.location.origin,"/threads/").concat(this.thread.id,"/messages")).then(function(t){e.messageArray=t.data;document.getElementsByClassName("message-section__message-list")}).catch(function(t){e.$toasted.show("There was an error retrieving your messages.",{theme:"",position:"bottom-right",className:"bg-red text-white rounded-full",type:"error",duration:5e3})}),window.Echo.private("thread.".concat(this.thread.id,".messages")).listen("Messages.MessagePosted",function(t){e.activeTyper=!1,e.messageArray.unshift(t.message)}).listenForWhisper("typing",function(t){e.activeTyper=t,e.typingTimer&&clearTimeout(e.typingTimer),e.typingTimer=setTimeout(function(){e.activeTyper=!1},3e3)}),window.Echo.private("threads.".concat(window.App.user.id)).listen("Messages.MessageReceived",function(e){})},isRecipient:function(e){if(e.author_id!==window.App.user.id)return"recipient-user"},tapParticipants:function(){window.Echo.private("thread.".concat(this.thread.id,".messages")).whisper("typing",{name:"".concat(window.App.user.first_name)})},postNewMessage:function(){var e=this;this.eventHub.$emit("new-message-in-thread",{thread_id:this.thread.id,message:this.newMessage.slice(0,70)});var t=this.newMessage;this.newMessage="",axios.post("".concat(window.location.origin,"/threads/").concat(this.thread.id,"/messages"),{message:t}).then(function(t){e.messageArray.unshift(t.data)}).catch(function(t){console.log(t),e.$toasted.show("There was an error posting your message. Please try again.",{theme:"",position:"bottom-right",className:"bg-red text-white rounded-full",type:"error",duration:5e3})})},deleteThread:function(){var e=this;confirm("Are you sure you want to remove this message thread? It can't be recovered.")&&axios.delete("".concat(window.location.origin,"/threads/").concat(this.thread.id)).then(function(t){e.$toasted.show("Your message thread has been deleted.",{theme:"",position:"bottom-right",className:"bg-green text-white rounded-full",type:"success",duration:5e3}),setTimeout(function(){location.reload()},2e3)}
1).catch(function(t){e.$toasted.show("This thread cannot be deleted right now. Please try again later.",{theme:"",position:"bottom-right",className:"bg-red text-white rounded-full",type:"error",duration:5e3})})}},mounted:function(){this.initThread()}};var B=a(5072),M=a.n(B),S=a(8395),D={insert:"head",singleton:!1};M()(S.A,D);S.A.locals;var I=a(6262);const $={components:{Thread:(0,I.A)(A,[["render",function(e,t,a,s,r,o){return(0,n.openBlock)(),(0,n.createElementBlock)("div",f,[(0,n.createElementVNode)("div",y,[(0,n.createElementVNode)("div",w,[(0,n.createElementVNode)("p",{class:"w-1/3 text-14 font-bold u-text-black mb-0 mr-3125",textContent:(0,n.toDisplayString)(a.thread.other_participant_name)},null,8,v),(0,n.createElementVNode)("a",{class:"text-right w-1/3 text-12 text-grey hover:text-red",href:"#",onClick:t[0]||(t[0]=(0,n.withModifiers)(function(){return o.deleteThread&&o.deleteThread.apply(o,arguments)},["prevent"]))}," Delete ")])]),(0,n.createElementVNode)("section",b,[(0,n.createVNode)(n.TransitionGroup,{name:"message-posted"},{default:(0,n.withCtx)(function(){return[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(o.messagesSortedByDate,function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{class:(0,n.normalizeClass)([o.isRecipient(e),"message-section__message u-p-10"]),key:e.id},[(0,n.createElementVNode)("div",_,[(0,n.createElementVNode)("p",{class:"u-text-black u-p-10",textContent:(0,n.toDisplayString)(e.readable_message)},null,8,N),(0,n.createElementVNode)("img",{class:"message-section__message-avatar",src:e.author.avatar_url,alt:"".concat(e.author.first_name," ").concat(e.author.last_name),title:"".concat(e.author.first_name," ").concat(e.author.last_name)},null,8,T)]),(0,n.createElementVNode)("div",k,[(0,n.createElementVNode)("small",null,(0,n.toDisplayString)(o.formatDate(e.created_at)),1)])],2)}),128))]},void 0,!0),_:1})]),r.activeTyper?((0,n.openBlock)(),(0,n.createElementBlock)("small",{key:0,class:"u-display-inline-block u-pl-10",textContent:(0,n.toDisplayString)("".concat(r.activeTyper.name," is typing..."))},null,8,E)):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",x,[(0,n.withDirectives)((0,n.createElementVNode)("textarea",{"onUpdate:modelValue":t[1]||(t[1]=function(e){return r.newMessage=e}),onKeydown:t[2]||(t[2]=function(){return o.tapParticipants&&o.tapParticipants.apply(o,arguments)}),rows:"5",placeholder:"Write your message here"},null,544),[[n.vModelText,r.newMessage]])]),(0,n.createElementVNode)("div",V,[(0,n.createElementVNode)("button",{class:"btn btn-light-blue btn-small",onClick:t[3]||(t[3]=(0,n.withModifiers)(function(e){return r.newMessage=""},["prevent"]))},"Cancel"),(0,n.createElementVNode)("button",{class:"btn btn-blue btn-small",onClick:t[4]||(t[4]=(0,n.withModifiers)(function(){return o.postNewMessage&&o.postNewMessage.apply(o,arguments)},["prevent"])),disabled:o.messageIsEmpty},"Submit",8,C)])])}]])},props:{threads:{type:Array},thread:{type:Array,required:!1}},data:function(){return{threadArray:this.threads,visibleThread:""}},computed:{threadIsVisible:function(){return""!=this.visibleThread},sortedThreads:function(){return this.threads.sort(function(e,t){return moment(t.last_message_at).isAfter(e.last_message_at)?1:-1})}},methods:{showThread:function(e){this.visibleThread=e,this.markThreadAsRead()},showNewThread:function(e){this.threadArray.unshift(e[0]),this.showThread(e[0])},markThreadAsRead:function(){var e=this;axios.post("".concat(window.location.origin,"/threads/").concat(this.visibleThread.id,"/read-receipts")).then(function(e){console.log("marked as read")}).catch(function(t){e.$toasted.show("Something has gone wrong. Please check your entry and try again.",{theme:"",position:"bottom-right",className:"bg-red text-white rounded-full",type:"error",duration:5e3})})}},created:function(){var e=this;this.thread?this.showThread(this.thread):this.threads[0]&&this.showThread(this.threads[0]),this.eventHub.$on("new-thread",this.showNewThread),this.eventHub.$on("new-message-in-thread",function(t){e.sortedThreads.forEach(function(a,n){a.id===t.thread_id&&
1(e.sortedThreads[n].last_message_preview=t.message,e.sortedThreads[n].last_message_at=moment.now())}),e.markThreadAsRead()})}},P=(0,I.A)($,[["render",function(e,t,a,r,f,y){var w=(0,n.resolveComponent)("thread"),v=(0,n.resolveComponent)("message-create-form"),b=(0,n.resolveComponent)("modal");return(0,n.openBlock)(),(0,n.createElementBlock)("div",null,[t[4]||(t[4]=(0,n.createElementVNode)("div",{class:"u-flex u-justify-space-between u-mb-5"},[(0,n.createElementVNode)("h3",{class:"u-mb-10 u-text-bold"}," Private Conversations ")],-1)),(0,n.createElementVNode)("section",o,[(0,n.createElementVNode)("div",i,[0!=f.threadArray.length?((0,n.openBlock)(),(0,n.createElementBlock)("div",c,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(y.sortedThreads,function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{class:(0,n.normalizeClass)(["thread u-p-10 u-flex u-align-center",{isSelected:f.visibleThread.id===e.id}]),key:e.id,onClick:function(t){return y.showThread(e)}},[(0,n.createElementVNode)("img",{class:"message-section__message-avatar mr-625",src:e.other_participant_avatar,alt:e.name,title:e.name},null,8,d),(0,n.createElementVNode)("div",h,[(0,n.createElementVNode)("p",m,[(0,n.createElementVNode)("b",null,(0,n.toDisplayString)(e.other_participant_name),1)]),(0,n.createElementVNode)("p",{class:"mt-3125 mb-0 text-black text-12 leading-tight",textContent:(0,n.toDisplayString)(e.last_message_preview)},null,8,u)])],10,l)}),128))])):(0,n.createCommentVNode)("",!0),y.threadIsVisible?((0,n.openBlock)(),(0,n.createBlock)(w,{key:1,thread:f.visibleThread},null,8,["thread"])):(0,n.createCommentVNode)("",!0)]),0==f.threadArray.length?((0,n.openBlock)(),(0,n.createElementBlock)("div",g,[(0,n.createElementVNode)("div",p,[t[3]||(t[3]=(0,n.createElementVNode)("h2",{class:"u-text-blue u-mb-5"},"You haven't started any conversations yet.",-1)),(0,n.createVNode)(b,null,{header:(0,n.withCtx)(function(){return s(t[0]||(t[0]=[(0,n.createElementVNode)("h3",null,"Start a New Conversation",-1)]))}),body:(0,n.withCtx)(function(){return[(0,n.createVNode)(v)]}),footer:(0,n.withCtx)(function(){return s(t[1]||(t[1]=[]))}),trigger:(0,n.withCtx)(function(){return s(t[2]||(t[2]=[(0,n.createElementVNode)("button",{class:"btn btn-light-blue btn-small"}," Start Chatting ",-1)]))}),_:1})])])):(0,n.createCommentVNode)("",!0)])])}]])},8395:(e,t,a)=>{a.d(t,{A:()=>r});var n=a(6314),s=a.n(n)()(function(e){return e[1]});s.push([e.id,".message-posted-enter-active{transition:all .2s linear}.message-posted-enter{opacity:0;transform:translateY(10px)}",""]);const r=s}}]);

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.