PageSourceSearch

https://reiseagent.ai/assets/SearchResultsView-INBuVlBZ.js

js reiseagent.ai collected 2026-10-05 12:28:33 UTC 6,677 bytes, 2 lines download raw bytes

1import{r as o,j as n,a1 as U}from"./vendor-Bxq6G7UH.js";import{J as B}from"./JsonLd-ClvT2-0A.js";import{u as K,b as F,a as J,t as M}from"./index-CgZvr7S2.js";import{U as $}from"./UnifiedOfferGrid-eT28H-A1.js";import{F as b}from"./FilterDropdown-BTYDSDGj.js";import{C as z}from"./filterConfig-BLIyxsIK.js";import"./maplibre-Ba-B3Bc2.js";import"./useParallaxManager-C2acrYsj.js";import"./useTrackingImpressions-DNxZkJK1.js";function Z(){const{t:a}=K(),{setPageContext:v,isStreaming:g,offers:f,messages:m,logUserEvent:w,lastIntent:l}=F(),{searchActive:q}=J(),[j,D]=o.useState(""),[x]=o.useState([]),[u,C]=o.useState("relevance"),[c,S]=o.useState([]),[h]=o.useState(!1),d=o.useMemo(()=>{const s=[],e=[...m].reverse().find(r=>r.role==="assistant"&&r.relatedOffers!==void 0);e!=null&&e.relatedOffers&&e.relatedOffers.forEach(r=>{s.push({...r,messageId:e.id})}),s.push(...f);const t=new Set;return s.filter(r=>{const p=`${r.type}:${r.id}`;return t.has(p)?!1:(t.add(p),!0)})},[m,f]),i=o.useMemo(()=>d.map(s=>({...M(s),messageId:s.messageId,rank:s.rank})),[d]);o.useEffect(()=>{v({page:a("results.page_title"),query:j||void 0,filters:x.length>0?{chips:x.map(s=>{const e=z.find(t=>t.id===s);return e?`${e.emoji} ${a(e.labelKey)}`:s})}:void 0,visibleCount:d.length||void 0})},[j,x,d.length,v,a]);const N=o.useMemo(()=>{const s=new Set;return i.forEach(e=>{e.city&&s.add(e.city),e.country&&s.add(e.country)}),Array.from(s).sort().map(e=>({label:e,value:e}))},[i]);o.useEffect(()=>{if(c.length===0||i.length===0)return;const s=c.filter(e=>{const t=e.toLowerCase();return i.some(r=>r.city&&r.city.toLowerCase()===t||r.country&&r.country.toLowerCase()===t)});s.length!==c.length&&S(s)},[i,c]);const k=o.useMemo(()=>{let s=[...i];if(c.length>0){const e=c.map(t=>t.toLowerCase());s=s.filter(t=>t.city&&e.includes(t.city.toLowerCase())||t.country&&e.includes(t.country.toLowerCase()))}switch(u){case"price-asc":return s.sort((e,t)=>(e.pricePerPerson??1/0)-(t.pricePerPerson??1/0));case"price-desc":return s.sort((e,t)=>(t.pricePerPerson??-1)-(e.pricePerPerson??-1));case"rating":case"like":return s.sort((e,t)=>(t.averageRating??0)-(e.averageRating??0));case"popularity":return s.sort((e,t)=>(t.viewCount??0)-(e.viewCount??0));case"relevance":default:return s.sort((e,t)=>{const r=e.rerankerScore??e.score??0;return(t.rerankerScore??t.score??0)-r})}},[i,u,c]),P=o.useMemo(()=>{const s=(l==null?void 0:l.extracted)??(l==null?void 0:l.state)??(l==null?void 0:l.State)??l,e={};if(s&&typeof s=="object"&&(e.intent=s),u&&u!=="relevance"&&(e.sort=u),c.length>0&&(e.locations=c),Object.keys(e).length===0)return null;try{const t=JSON.stringify(e);return t&&t!=="{}"?t:null}catch{return null}},[l,u,c]),A=o.useCallback(async(s,e)=>{var L,E,R;let t=s;!t&&typeof e=="string"&&e.includes("_")&&(t=e.split("_")[0]);const r=d.find(y=>String(y.id)===String(e)),p=m.find(y=>{var _;return(_=y.relatedOffers)==null?void 0:_.some(O=>String(O.id)===String(e))});w("offer_clicked",{offerId:String(e),type:t,rank:r==null?void 0:r.rank,messageId:p==null?void 0:p.id,title:((L=r==null?void 0:r.fields)==null?void 0:L.title)||((E=r==null?void 0:r.fields)==null?void 0:E.companyName)||((R=r==null?void 0:r.fields)==null?void 0:R.clubName)}),window.dispatchEvent(new CustomEvent("open-detail",{detail:{type:t,id:e}}))},[d,m,w]);return n.jsxs("div",{className:"flex-1 pb-24 min-w-0 px-4 sm:px-6",children:[n.jsxs(U,{children:[n.jsx("title",{children:"Reisesuche & Angebote | reiseagent.ai"}),n.jsx("meta",{name:"description",content:"Entdecke deine personalisierten Suchergebnisse für deinen Cluburlaub oder Rundreise mit smarter KI-Unterstützung."}),n.jsx("link",{rel:"canonical",href:"https://reiseagent.ai/suche"}),n.jsx("meta",{name:"robots",content:"noindex, follow"}),n.jsx("meta",{property:"og:title",content:"Reisesuche & Angebote | reiseagent.ai"}),n.jsx("meta",{property:"og:description",content:"Entdecke deine personalisierten Suchergebnisse für deinen Cluburlaub oder Rundreise mit smarter KI-Unterstützung."}),n.jsx("meta",{property:"og:type",content:"website"}),n.jsx("meta",{property:"og:url",content:"https://reiseagent.ai/suche"}),n.jsx("meta",{property:"og:image",content:"https://reiseagent.ai/assets/og-image.jpg"}),n.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),n.jsx("meta",{name:"twitter:title",content:"Reisesuche & Angebote | reiseagent.ai"}),n.jsx("meta",{name:"twitter:description",content:"Entdecke deine personalisierten Suchergebnisse für deinen Cluburlaub oder Rundreise mit smarter KI-Unterstützung."}),n.jsx("meta",{name:"twitter:image",content:"https://reiseagent.ai/assets/og-image.jpg"})]}),n.jsx(B,{data:{"@context":"https://schema.org","@type":"CollectionPage",name:"Reisesuche & Angebote",description:"KI-Reisesuche: beschreibe deinen Wunsch, finde Gruppenreisen, Clubhotels & Reiseerlebnisse.",url:"https://reiseagent.ai/suche",inLanguage:"de"}}),n.jsx("div",{className:"px-4 sm:px-6 py-6 lg:py-10",children:n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-x-8 gap-y-6",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-3 min-w-0",children:[n.jsx("h1",{className:"text-[28px] sm:text-[34px] lg:text-[40px] font-bold text-gray-900 tracking-tight break-words",children:a("results.title")}),!h&&!g&&n.jsxs("span",{className:"px-4 py-1.5 rounded-full bg-white border border-gray-100 text-[13px] font-bold text-gray-900 shadow-sm animate-in fade-in duration-700 whitespace-nowrap shrink-0",children:[(i==null?void 0:i.length)||0," ",(i==null?void 0:i.length)===1?a("results.count_singular"):a("results.count_plural")]})]}),n.jsxs("div",{className:"flex flex-wrap items-center gap-3 min-w-0",children:[n.jsx(b,{label:a("sort.match"),value:["relevance","match","match-pct","like","popularity"].includes(u)?u:"relevance",options:[{label:a("sort.relevance"),value:"relevance"},{label:a("sort.match-pct"),value:"match-pct"},{label:a("sort.popularity"),value:"popularity"},{label:a("sort.like"),value:"like"}],onChange:C}),n.jsx(b,{label:a("sort.price"),value:u.startsWith("price")?u:"relevance",options:[{label:a("sort.relevance"),value:"relevance"},{label:a("sort.price_asc"),value:"price-asc"},{label:a("sort.price_desc"),value:"price-desc"}
1],onChange:C}),n.jsx(b,{label:a("filter.location"),isMulti:!0,value:c,options:N,onChange:S})]})]})}),n.jsx("div",{className:"w-full px-4 sm:px-6 min-h-[400px]",children:n.jsx($,{cards:k,isLoading:h||g&&f.length<4,isStreaming:g,emptyState:!h&&!g&&k.length===0,onCardClick:A,showSelectionCircle:!1,showCompareButton:!0,forceVariant:"detailed",tracking:{source:"search",searchFilter:P,enabled:!g&&!h}})})]})}export{Z as default};
2//# sourceMappingURL=SearchResultsView-INBuVlBZ.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.