PageSourceSearch

https://www.upcar.ai/_next/static/chunks/84484-b0d52174e56b2b41.js

js upcar.ai collected 2026-10-05 15:27:32 UTC 12,982 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[84484],{2337:function(e,t,n){"use strict";n.d(t,{$y:function(){return l},cv:function(){return u},rb:function(){return s}});var o=n(79831);let r=new(n.n(o)())("38b731e98ebc875b6d03",{cluster:"us3",encrypted:!0}),a=new Map,c=e=>(a.set(e,(a.get(e)||0)+1),r.subscribe(e)),i=e=>{let t=(a.get(e)||1)-1;if(t>0){a.set(e,t);return}a.delete(e),r.unsubscribe(e)},s=function(e,t,n){let o,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],l=c(o=a?"support-".concat(n):s?"community-chat-".concat(n):"chat-".concat(n)),u=t=>{e&&e(t)},d=e=>{t&&t(e)};return l.bind("new-message",u),l.bind("typing",d),r.connection.bind("connected",()=>{}),l.bind_global((e,t)=>{}),r.connection.bind("error",e=>{console.error("Pusher connection error:",e)}),()=>{l.unbind("new-message",u),l.unbind("typing",d),r.connection.unbind("connected"),r.connection.unbind("error"),i(o)}},l=(e,t,n,o,a,c)=>{let i="group-".concat(c),s=r.subscribe(i);return s.bind("new-post",t=>{e&&e(t)}),s.bind("new-comment",e=>{t&&t(e)}),s.bind("post-liked",e=>{n&&n(e)}),s.bind("comment-liked",e=>{n&&n(e)}),s.bind("member-joined",e=>{o&&o(e)}),s.bind("member-left",e=>{a&&a(e)}),r.connection.bind("connected",()=>{}),r.connection.bind("error",e=>{console.error("Pusher connection error:",e)}),()=>{s.unbind("new-post"),s.unbind("new-comment"),s.unbind("post-liked"),s.unbind("comment-liked"),s.unbind("member-joined"),s.unbind("member-left"),r.connection.unbind("connected"),r.connection.unbind("error"),r.unsubscribe(i)}},u=(e,t)=>{let n="chat-".concat(e),o=c(n);return o.bind("new-message",t),()=>{o.unbind("new-message",t),i(n)}}},99225:function(e,t,n){"use strict";var o=n(27573),r=n(35662),a=n(31624),c=n(2522);t.Z=function(e){let{imageCount:t,onClearImages:n,isUploading:i=!1,className:s=""}=e;return(0,o.jsxs)("div",{className:(0,r.cn)("flex gap-2 items-center flex-wrap",s),children:[t>0&&(0,o.jsxs)("div",{className:"flex items-center gap-2 bg-gray-100 border rounded-md shadow-md px-3 py-1",children:[(0,o.jsxs)("span",{className:"text-sm text-gray-700",children:[t," ",1===t?"image":"images"," attached"]}),(0,o.jsx)("button",{type:"button",onClick:n,className:"text-gray-500 hover:text-red-500 ml-1",children:(0,o.jsx)(c.G,{icon:a.NBC})})]}),i&&(0,o.jsxs)("div",{className:"flex items-center gap-2 bg-gray-100 border rounded-md shadow-md px-3 py-1",children:[(0,o.jsx)("div",{className:"w-4 h-4 border-2 border-gray-300 border-t-blue-500 rounded-full animate-spin"}),(0,o.jsx)("span",{className:"text-sm text-gray-700",children:"Uploading..."})]})]})}},83969:function(e,t,n){"use strict";var o=n(27573),r=n(7653),a=n(2522),c=n(31624),i=n(65880),s=n(52449),l=n.n(s),u=n(71809),d=n.n(u),m=n(5734);t.Z=e=>{let{photoUrl:t,onClose:n,overlayZIndex:s}=e,[u,h]=(0,r.useState)(1),[f,p]=(0,r.useState)({x:0,y:0}),[g,b]=(0,r.useState)(!1),[M,y]=(0,r.useState)({x:0,y:0}),x=!!t;function w(e){return Math.min(3,Math.max(1,Number(e.toFixed(2))))}let P=u<3,A=u>1,v=(0,r.useMemo)(()=>({transform:"translate3d(".concat(f.x,"px, ").concat(f.y,"px, 0) scale(").concat(u,")"),transformOrigin:"center center",transition:"transform 120ms ease-out"}),[u,f.x,f.y]);(0,m.Ni)(x),(0,r.useEffect)(()=>{if(!x)return;let e=document.documentElement,t=document.body,n=e.style.touchAction,o=t.style.touchAction;return e.style.touchAction="none",t.style.touchAction="none",()=>{e.style.touchAction=n,t.style.touchAction=o}},[x]),(0,r.useEffect)(()=>{x||(h(1),p({x:0,y:0}),b(!1))},[x]),(0,r.useEffect)(()=>{1===u&&(p({x:0,y:0}),b(!1))},[u]);let j=e=>{g&&(e.preventDefault(),e.stopPropagation(),b(!1))};return(0,o.jsxs)(l(),{isOpen:x,onRequestClose:n,contentLabel:"View Photo",className:d().modalContent,bodyOpenClassName:"modal-open-overflow",overlayClassName:d().modalOverlay,style:s?{overlay:{zIndex:s}}:void 0,children:[(0,o.jsx)("button",{onClick:n,className:"absolute top-4 right-4 z-10 w-9 h-9 flex items-center justify-center rounded-full bg-black/50 text-white text-lg cursor-pointer border-none","aria-label":"Close",children:(0,o.jsx)(a.G,{icon:c.NBC})}),!!t&&(0,o.jsxs)("div",{className:"absolute top-4 left-4 z-10 flex items-center gap-2",children:[(0,o.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),A&&h(e=>w(e-.25))},disabled:!A,className:"w-9 h-9 flex items-center justify-center rounded-full bg-black/50 text-white text-sm cursor-pointer border-none disabled:opacity-40 disabled:cursor-not-allowed","aria-label":"Zoom out",children:(0,o.jsx)(a.G,{icon:c.Kl4})}),(0,o.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),1!==u&&(h(1),p({x:0,y:0}))},disabled:1===u,className:"w-9 h-9 flex items-center justify-center rounded-full bg-black/50 text-white text-sm cursor-pointer border-none disabled:opacity-40 disabled:cursor-not-allowed","aria-label":"Reset zoom",children:(0,o.jsx)(a.G,{icon:c.XnX})}),(0,o.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),P&&h(e=>w(e+.25))},disabled:!P,className:"w-9 h-9 flex items-center justify-center rounded-full bg-black/50 text-white text-sm cursor-pointer border-none disabled:opacity-40 disabled:cursor-not-allowed","aria-label":"Zoom in",children:(0,o.jsx)(a.G,{icon:c.r8p})})]}),(0,o.jsx)("div",{className:"".concat(d().photoGrid," select-none touch-none"),onClick:()=>{1!==u||g||n()},onPointerDown:e=>{u<=1||(e.preventDefault(),e.stopPropagation(),b(!0),y({x:e.clientX-f.x,y:e.clientY-f.y}))},onPointerMove:e=>{g&&!(u<=1)&&(e.preventDefault(),e.stopPropagation(),p({x:e.clientX-M.x,y:e.clientY-M.y}))},onPointerUp:j,onPointerCancel:j,onPointerLeave:j,onWheel:e=>{if(!x)return;e.preventDefault(),e.stopPropagation();let t=e.deltaY<0?.1:-.1;h(e=>w(e+t))},style:{cursor:u>1?g?"grabbing":"grab":"default",touchAction:"none"},children:!!t&&(0,o.jsx)("div",{className:d().fullWidthPhoto,onClick:e=>e.stopPropagation(),children:(0,o.jsx)("div",{className:"w-full h-full overflow-hidden flex items-center justify-center",children:(0,o.jsx)(i.default,{src:t,alt:"Chat Image",width:800,height:550,className:d().photoItem,draggable:!1,style:{width:"100%",height:"auto",...v},priority:!0})})},"chat_image")})]})}},91074:function(e,t,n){"use strict";var o=n(27573),r=n(65880);let a=["0ms","150ms","300ms"];t.Z=e=>{let{profilePic:t,typingUsers:n,currentUserId:c}
1=e;return n.size>0&&Array.from(n).some(e=>e!==c)?(0,o.jsxs)("div",{className:"flex my-4 gap-2 items-center animate-fade-in",children:[(0,o.jsx)(r.default,{src:t||"/assets/img/DP.jpeg",className:"rounded-full size-[30px] object-cover",width:30,height:30,alt:"profile",onError:e=>{e.currentTarget.src="/assets/img/DP.jpeg"}}),(0,o.jsx)("div",{className:"bg-gray-100 rounded-md p-3 flex items-center",children:(0,o.jsx)("div",{className:"flex space-x-1",children:a.map(e=>(0,o.jsx)("div",{className:"w-2 h-2 bg-gray-500 rounded-full animate-bounce",style:{animationDelay:e}},e))})})]}):null}},10865:function(e,t,n){"use strict";n.d(t,{DD:function(){return s},HL:function(){return p},Ij:function(){return i},Nt:function(){return b},QR:function(){return r},VH:function(){return d},YZ:function(){return g},Zj:function(){return M},cm:function(){return u},jY:function(){return m},ni:function(){return f},q8:function(){return l},rJ:function(){return h},sG:function(){return w},wY:function(){return a},y$:function(){return x}});var o=n(8168);let r=()=>["12:00 AM","12:30 AM","1:00 AM","1:30 AM","2:00 AM","2:30 AM","3:00 AM","3:30 AM","4:00 AM","4:30 AM","5:00 AM","5:30 AM","6:00 AM","6:30 AM","7:00 AM","7:30 AM","8:00 AM","8:30 AM","9:00 AM","9:30 AM","10:00 AM","10:30 AM","11:00 AM","11:30 AM","12:00 PM","12:30 PM","1:00 PM","1:30 PM","2:00 PM","2:30 PM","3:00 PM","3:30 PM","4:00 PM","4:30 PM","5:00 PM","5:30 PM","6:00 PM","6:30 PM","7:00 PM","7:30 PM","8:00 PM","8:30 PM","9:00 PM","9:30 PM","10:00 PM","10:30 PM","11:00 PM","11:30 PM"],a=["Jan","Feb","March","April","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec"],c=["Mon","Tue","Wed","Thurs","Fri","Sat","Sun"],i=e=>{let t=new Date(e),[n,o]=new Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",hour12:!0}).format(t).split(" "),r=o.toUpperCase();return"".concat(n," ").concat(r)},s=e=>{if(!(null==e?void 0:e.lastMessage))return"";let t=e.lastMessage.timestamp,n="number"==typeof t&&Number.isFinite(t)?t:e.lastMessageAt;return n?i(n):""},l=e=>{let t=new Date(e),n=a[t.getMonth()],o=t.getDate();return"".concat(n," ").concat(o)},u=e=>{let t=new Date(e),n=c[t.getDay()],o=a[t.getMonth()],r=t.getDate();return"".concat(n,", ").concat(o," ").concat(r)},d=e=>{let t=new Date(e),n=t.getFullYear(),o=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0");return"".concat(n,"-").concat(o,"-").concat(r)},m=e=>new Date(e).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric"}),h=e=>{let[t,n]=e.split(" "),[o,r]=t.split(":");o=parseInt(o,10),r=parseInt(r,10),"PM"===n&&o<12?o+=12:"AM"===n&&12===o&&(o=0);let a=String(o).padStart(2,"0"),c=String(r).padStart(2,"0");return"".concat(a,":").concat(c)};function f(e){let t=new Date-new Date(e);if(t<6e4){let e=Math.floor(t/1e3);return e<=1?"".concat(e," second ago"):"".concat(e," seconds ago")}if(t<36e5){let e=Math.floor(t/6e4);return 1===e?"".concat(e," minute ago"):"".concat(e," minutes ago")}if(t<864e5){let e=Math.floor(t/36e5);return 1===e?"".concat(e," hour ago"):"".concat(e," hours ago")}if(t<2592e6){let e=Math.floor(t/864e5);return 1===e?"".concat(e," day ago"):"".concat(e," days ago")}if(t<31104e6){let e=Math.floor(t/2592e6);return 1===e?"".concat(e," month ago"):"".concat(e," months ago")}{let e=Math.floor(t/31104e6);return 1===e?"".concat(e," year ago"):"".concat(e," years ago")}}let p=e=>{if(e.includes("AM")||e.includes("PM")){let[t,n]=e.split(" ")[0].split(":"),o=e.split(" ")[1],r=parseInt(t,10);return"PM"===o&&r<12&&(r+=12),"AM"===o&&12===r&&(r=0),"".concat(String(r).padStart(2,"0"),":").concat(n)}return e},g=e=>{if(!e||!e.includes(":"))return e;let[t,n]=e.split(":"),o=parseInt(t,10),r=parseInt(n,10);if(isNaN(o)||isNaN(r))return e;let a=o%12;return 0===a&&(a=12),"".concat(a,":").concat(r.toString().padStart(2,"0")," ").concat(o>=12?"PM":"AM")},b=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=new Date,n=d(new Date(t.setDate(t.getDate()+1)).getTime()),r=d(new Date(t.setDate(t.getDate()+(e?o.rW:3))).getTime());return{fromDate:n,fromTime:encodeURIComponent("10:00 AM"),untilDate:r,untilTime:encodeURIComponent("10:00 AM")}},M=e=>{if(!e)return"";let t=e.split(",").map(e=>e.trim());return t.length>=3?t.slice(0,3).join(", "):e},y=e=>{if(e>=11&&e<=13)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},x=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=new Date(e),o=a[n.getMonth()],r=n.getDate(),c=n.getHours().toString().padStart(2,"0"),i=n.getMinutes().toString().padStart(2,"0"),s=g("".concat(c,":").concat(i)),l=t?"".concat(r).concat(y(r)):r;return"".concat(o," ").concat(l,", ").concat(s)},w=e=>{if(!e)return null;if(e instanceof Date)return e;if("string"==typeof e){let[t,n,o]=e.split("-").map(Number);return new Date(t,n-1,o)}return null}},31435:function(e,t,n){"use strict";n.d(t,{d:function(){return l}});var o=n(7653),r=n(47982);let a=null,c=()=>(a||(a=window.matchMedia("(max-width: 767px)")),a),i=e=>{let t=c();return t.addEventListener("change",e),()=>t.removeEventListener("change",e)},s=()=>c().matches;function l(){let e=(0,r.ey)();return(0,o.useSyncExternalStore)(i,s,()=>e)}},47982:function(e,t,n){"use strict";n.d(t,{Ge:function(){return c},au:function(){return i},ey:function(){return s}});var o=n(7653);let r=(0,o.createContext)(!1),a=(0,o.createContext)(!1),c=r.Provider,i=a.Provider;function s(){return(0,o.useContext)(a)}},76934:function(e,t,n){"use strict";
1n.d(t,{ND:function(){return a},m3:function(){return c},yH:function(){return r}});let o=(0,n(77075).oM)({name:"chat",initialState:{chatRoom:[],chatRoomViewState:null,chatRoomChatGroup:""},reducers:{getChatRoom(e,t){let{chatboxes:n,viewState:o,chatGroup:r=""}=t.payload;e.chatRoom=n,e.chatRoomViewState=o,e.chatRoomChatGroup=r},updateLastMessage(e,t){let{roomId:n,lastMessage:o,imageUrl:r}=t.payload,a="string"==typeof o&&o.length>0,c=Array.isArray(r)?r.length>0:!!r;(a||c)&&(e.chatRoom=e.chatRoom.map(e=>e.id===n?{...e,lastMessage:{...e.lastMessage,message:a?o:"",...c?{imageUrl:Array.isArray(r)?r:[r]}:{}}}:e))},updateReadStatus(e,t){let{roomId:n,userType:o}=t.payload;e.chatRoom=e.chatRoom.map(e=>e.id===n?{...e,unreadCounts:{...e.unreadCounts,[o]:0}}:e)}}}),{getChatRoom:r,updateLastMessage:a,updateReadStatus:c}=o.actions;t.ZP=o.reducer},71809:function(e){e.exports={modalContent:"Chats_modalContent__ocSeg",modalContentForAttachedImages:"Chats_modalContentForAttachedImages__O_m1Z",photoGrid:"Chats_photoGrid__TH7Oa",fullWidthPhoto:"Chats_fullWidthPhoto__jigVW",photoItem:"Chats_photoItem__mV0Zn","scrollbar-hide":"Chats_scrollbar-hide__GcO_p","scroll-container":"Chats_scroll-container___Oemd",modalOverlay:"Chats_modalOverlay__AyPaY"}}}]);

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.