PageSourceSearch

https://www.hozpitality.com/_next/static/chunks/2940.61a4e35f1c05a4d4.js

js hozpitality.com collected 2026-09-24 19:18:55 UTC 9,787 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2940],{91799:function(e,s,t){t.r(s);var a=t(57437),i=t(2265),n=t(61751),l=t(24076),r=t(64862),o=t(45202);s.default=e=>{let{show:s,handleClose:t}=e,[c,d]=(0,i.useState)(!1),[p,u]=(0,i.useState)(!1);return(0,a.jsxs)(n.Z,{show:s,onHide:t,centered:!p,dialogClassName:p?"ai-search-modal-fullscreen":"ai-search-modal",backdrop:"static",keyboard:!1,children:[(0,a.jsxs)(n.Z.Header,{className:"border-light d-flex justify-content-between align-items-center p-2 px-3",children:[(0,a.jsxs)("div",{className:"d-flex align-items-center gap-3 min-w-0",children:[(0,a.jsx)(l.default,{variant:"white",size:"sm",className:"p-1 d-flex align-items-center justify-content-center",onClick:()=>{u(e=>!e)},style:{width:34,height:34,flexShrink:0},children:p?(0,a.jsx)(o.yzr,{size:18}):(0,a.jsx)(o.qxL,{size:18})}),(0,a.jsx)(n.Z.Title,{className:"h5 mb-0 text-truncate",children:"Hozpitality AI Search"})]}),(0,a.jsx)("button",{onClick:t,"aria-label":"Close modal",style:{border:"none",background:"transparent",fontSize:"14px",cursor:"pointer",whiteSpace:"nowrap"},children:"✕ Close"})]}),(0,a.jsx)(n.Z.Body,{className:"membership-hero p-0",children:(0,a.jsx)(r.Z,{sidebarOpen:c,setSidebarOpen:d})})]})}},64862:function(e,s,t){t.d(s,{Z:function(){return y}});var a=t(57437),i=t(2265),n=t(11140),l=t(37996),r=t(82179),o=t(94295),c=t(22744);let d=e=>{let{item:s}=e;return(0,a.jsxs)("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",className:"ai-result-card",children:[(0,a.jsxs)("div",{className:"ai-result-top",children:[(0,a.jsx)("div",{className:"ai-result-title",children:s.title}),s.category&&(0,a.jsx)("div",{className:"ai-result-category text-capitalize",children:s.category})]}),s.location&&(0,a.jsxs)("div",{className:"ai-result-location",children:[(0,a.jsx)(c.$0r,{size:18,className:"text-danger"})," ",s.location]}),s.snippet&&(0,a.jsx)("div",{className:"ai-result-snippet",children:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return String(e).replace(RegExp("<style[^>]*>.*?<\\/style>","gis"),"").replace(RegExp("<script[^>]*>.*?<\\/script>","gis"),"").replace(/<\/(div|p|li|ul|ol|br)>/gi," ").replace(/<li>/gi,"• ").replace(/<[^>]+>/g,"").replace(/&nbsp;/gi," ").replace(/&amp;/gi,"&").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/\s+/g," ").trim()}(s.snippet)}),(0,a.jsxs)("div",{className:"ai-result-link text-primary",children:["Open ",(0,a.jsx)(o.fNt,{size:20})]})]})},p=e=>{var s;let{message:o}=e,[c,d]=(0,i.useState)(!1),p="\n".concat(o.content||"","\n\n").concat(null===(s=o.results)||void 0===s?void 0:s.map(e=>"".concat(e.title,"\n").concat(e.location||"","\n").concat(e.url)).join("\n\n"),"\n"),u=async()=>{await navigator.clipboard.writeText(p),(0,r.C)("info","Copied to clipboard","")},h=async()=>{(0,(await Promise.all([t.e(7337),t.e(3632)]).then(t.t.bind(t,41690,23))).default)().from(p).save("response.pdf")},m=async()=>{let{saveAs:e}=await t.e(12).then(t.t.bind(t,12,23)),{Document:s,Packer:a,Paragraph:i}=await t.e(800).then(t.bind(t,60432)),n=new s({sections:[{children:[new i(p)]}]});e(await a.toBlob(n),"response.docx")};return(0,a.jsxs)("div",{className:"ai-actions",children:[(0,a.jsx)("button",{className:"ai-action-btn",onClick:u,children:(0,a.jsx)(n.EZF,{})}),(0,a.jsx)("button",{className:"ai-action-btn",onClick:()=>{window.dispatchEvent(new CustomEvent("chat-suggested",{detail:"Rewrite this professionally:\n\n".concat(p)}))},children:(0,a.jsx)(l.Qxo,{})}),(0,a.jsx)("button",{className:"ai-action-btn",onClick:()=>d(!c),children:(0,a.jsx)(n.QNI,{})}),c&&(0,a.jsxs)("div",{className:"ai-action-dropdown",children:[(0,a.jsxs)("button",{onClick:h,children:[(0,a.jsx)(n.Edw,{}),"PDF"]}),(0,a.jsxs)("button",{onClick:m,children:[(0,a.jsx)(n.SiT,{}),"DOCX"]})]})]})},u=e=>{var s;let{message:t}=e;return(0,a.jsxs)("div",{className:"ai-assistant-content",children:[t.content&&(0,a.jsxs)("div",{className:"ai-message-text",children:[(0,a.jsx)("div",{className:"ai-message-content",children:String(t.content).replace(RegExp("<style[^>]*>.*?<\\/style>","gis"),"").replace(RegExp("<script[^>]*>.*?<\\/script>","gis"),"").replace(/<\/(div|p|li|ul|ol|br)>/gi,"\n").replace(/<li>/gi,"• ").replace(/<[^>]+>/g,"").replace(/&nbsp;/gi," ").replace(/&amp;/gi,"&").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/\n\s*\n/g,"\n").trim()}),!t.isComplete&&(0,a.jsx)("span",{className:"ai-typing-dot",children:"●"})]}),(null===(s=t.results)||void 0===s?void 0:s.length)>0&&(0,a.jsx)("div",{className:"ai-results-grid",children:t.results.map((e,s)=>(0,a.jsx)(d,{item:e},s))}),(0,a.jsx)(p,{message:t})]})};function h(e){let{message:s}=e,t="user"===s.role;return(0,a.jsx)("div",{className:"ai-message-row ".concat(t?"ai-user-row":"ai-assistant-row"),children:(0,a.jsx)("div",{className:"ai-message-bubble ".concat(t?"ai-user-bubble":"ai-assistant-bubble"),children:t?(0,a.jsx)("div",{className:"ai-user-text",children:s.content}):(0,a.jsx)(u,{message:s})})})}var m=t(13111);
1let x=[{title:"Find Hospitality Jobs",desc:"Search hotel jobs in Dubai, UAE, or globally",query:"Find hotel jobs in Dubai"},{title:"Top Companies Hiring",desc:"Discover companies actively hiring now",query:"Top hospitality companies hiring now"},{title:"Improve My Resume",desc:"Get tips to improve your hospitality CV",query:"How to improve my resume for hotel jobs"},{title:"Latest Industry News",desc:"Stay updated with hospitality trends",query:"Latest hospitality industry news"},{title:"Courses & Certifications",desc:"Find courses to grow your career",query:"Best hospitality courses online"},{title:"Salary Insights",desc:"Check salaries for hotel jobs worldwide",query:"Hotel job salary in UAE"}];function g(e){let{onSend:s,messagelength:t}=e,[n,r]=(0,i.useState)("");return(0,a.jsxs)("div",{className:"saas-composer-wrapper",children:[0===t&&(0,a.jsxs)("div",{className:"saas-intro",children:[(0,a.jsx)("h2",{children:"How can Hozpitality AI help you today?"}),(0,a.jsx)("p",{children:"Ask anything about jobs, companies, or career growth in hospitality."}),(0,a.jsx)("div",{className:"saas-prompt-grid d-none",children:x.map((e,t)=>(0,a.jsxs)("div",{className:"saas-prompt-card",onClick:()=>s(e.query),children:[(0,a.jsx)("div",{className:"prompt-title",children:e.title}),(0,a.jsx)("div",{className:"prompt-desc",children:e.desc})]},t))})]}),(0,a.jsx)(m.Z,{onSubmit:e=>{e.preventDefault(),n.trim()&&(s(n),r(""))},className:"saas-input-wrapper",children:(0,a.jsxs)("div",{className:"saas-input-container",children:[(0,a.jsx)(l.jRj,{size:20,className:"left-icon"}),(0,a.jsx)("input",{type:"text",placeholder:"Ask Hozpitality AI anything...",value:n,onChange:e=>r(e.target.value),className:"saas-input"}),(0,a.jsx)("button",{type:"submit",className:"send-btn",children:(0,a.jsx)(l.qQs,{size:18})})]})})]})}var v=t(24076);function j(e){let{messages:s,onSend:t,loading:n,onNewChat:r}=e,o=(0,i.useRef)(null);return(0,i.useEffect)(()=>{var e;null===(e=o.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})},[s,n]),(0,a.jsxs)("div",{className:"hoz-ai-chat-window",children:[(0,a.jsx)("div",{className:"hoz-ai-chat-messages",children:(0,a.jsxs)("div",{className:"hoz-ai-chat-inner",children:[s.map((e,s)=>(0,a.jsx)(h,{message:e},s)),(0,a.jsx)("div",{ref:o})]})}),(0,a.jsx)("div",{className:"hero-shape shape-1"}),(0,a.jsx)("div",{className:"hero-shape shape-2"}),(0,a.jsx)("div",{className:"hoz-ai-composer-wrapper",children:(0,a.jsxs)("div",{className:"hoz-ai-composer-container",children:[(0,a.jsx)("div",{className:"hoz-ai-input-section",children:(0,a.jsx)(g,{onSend:t,messagelength:s.length})}),(0,a.jsxs)(v.default,{className:"hoz-ai-newchat-btn mb-1",onClick:r,children:[(0,a.jsx)(l.OvN,{size:18}),(0,a.jsx)("span",{className:"hoz-ai-newchat-text",children:"New Chat"})]})]})})]})}var b=t(6906);function y(e){let{setSidebarOpen:s}=e,[t,n]=(0,i.useState)([]),[l,r]=(0,i.useState)(!1),[o,c]=(0,i.useState)(null),d=(0,i.useRef)(null),p=(0,b.n5)()||0,u=e=>{if(!e.trim()||l)return;let s={role:"user",content:e,results:[],followups:[],isComplete:!0},t={role:"assistant",content:"Searching...",results:[],followups:[],isComplete:!1};n(e=>[...e,s,t]),r(!0);let a=new WebSocket("wss://llm.hozpitality.com/app3v3/ws/ai-search");d.current=a,a.onopen=()=>{a.send(JSON.stringify({query:e,user_id:p,conversation_id:o}))},a.onmessage=e=>{let s=JSON.parse(e.data);if(console.log("WS:",s),"conversation"===s.type){c(s.conversation_id);return}if("search"===s.type){n(e=>{var t,a,i;let n=[...e],l=n.length-1;return n[l]={...n[l],content:(null===(t=s.data)||void 0===t?void 0:t.message)||"",results:(null===(a=s.data)||void 0===a?void 0:a.results)||[],followups:(null===(i=s.data)||void 0===i?void 0:i.followups)||[],isComplete:!1},n});return}if("stream"===s.type){n(e=>{let t=[...e],a=t.length-1;return t[a]&&"assistant"===t[a].role&&(t[a]={...t[a],content:(t[a].content||"")+(s.token||""),isComplete:!1}),t});return}if("message"===s.type){n(e=>{var t,a,i;let n=[...e],l=n.length-1;return n[l]={...n[l],content:(null===(t=s.data)||void 0===t?void 0:t.message)||"",results:(null===(a=s.data)||void 0===a?void 0:a.results)||[],followups:(null===(i=s.data)||void 0===i?void 0:i.followups)||[],isComplete:!0},n});return}if("done"===s.type){r(!1),n(e=>{let s=[...e],t=s.length-1;return s[t]&&(s[t]={...s[t],isComplete:!0}),s}),a.close();return}},a.onerror=e=>{console.error("WebSocket error:",e),r(!1)}
1,a.onclose=()=>{console.log("WebSocket closed")}};return(0,i.useEffect)(()=>{let e=e=>{u(e.detail)};return window.addEventListener("chat-suggested",e),()=>{window.removeEventListener("chat-suggested",e)}},[o]),(0,a.jsx)("div",{className:"chat-layout",children:(0,a.jsx)("div",{className:"chat-main",children:(0,a.jsx)(j,{messages:t,onSend:u,loading:l,onNewChat:()=>{n([]),c(null),s(!0)}})})})}}}]);

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.