PageSourceSearch

https://caravanwert.de/assets/VerkaufenDanke-CPoanz7w.js

js caravanwert.de collected 2026-10-04 03:44:05 UTC 31,819 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BiSLCj2K.js","assets/vendor-react-C9ze4Yto.js","assets/vendor-forms-CkS464I4.js","assets/vendor-supabase-Ce-4Able.js","assets/vendor-ui-CSeBk4Bl.js","assets/vendor-icons-CRekTngl.js","assets/vendor-query-Bk1uLgXZ.js","assets/index-DK2pQblL.css","assets/metaCapiService-B1sSZqU2.js","assets/appReview-DtYu60Jf.js"])))=>i.map(i=>d[i]);
2import{u as le,s as Q,l as S,D as B,T as G,c as O,C as j,B as _,bf as ue,e as Y,a1 as $,aI as y,aV as he,H as ce,_ as K,a9 as pe,b as fe,i as oe,G as ge,P as be}from"./index-BiSLCj2K.js";import{k as me,r as d,j as e}from"./vendor-react-C9ze4Yto.js";import{P as ke}from"./PageHero-Dt0-0EKw.js";import{E as je}from"./EmailCodeConfirmForm-wfz3N0d1.js";import{g as we,d as ye}from"./stationSlotDays-BqCLwiw-.js";import{m as Ne}from"./sessionRecorder-TJgnt3oX.js";import{a5 as M,ab as ve,s as _e,r as xe,L as X,a6 as U,af as Se,R as ne,I as Te,ao as Ce,aq as Ie,at as Ee,aP as De,aF as ie,P as ze,f as qe,O as Pe,H as Re,$ as Fe}from"./vendor-icons-CRekTngl.js";import"./vendor-forms-CkS464I4.js";import"./vendor-supabase-Ce-4Able.js";import"./vendor-ui-CSeBk4Bl.js";import"./vendor-query-Bk1uLgXZ.js";import"./input-eMAKsz4g.js";import"./label-BBUkhkyu.js";import"./emailHelpers-DPXzu9Me.js";import"./berlinDate-U2l-_7k0.js";const Ae=/^\d{5}$/,Le=[0,1200,2600,4500],de=160;function Be(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")try{return crypto.randomUUID()}catch{}const t=new Uint8Array(16);crypto.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128;const h=Array.from(t,g=>g.toString(16).padStart(2,"0")).join("");return`${h.slice(0,8)}-${h.slice(8,12)}-${h.slice(12,16)}-${h.slice(16,20)}-${h.slice(20)}`}const $e=({sessionId:t,stationId:h,stationCity:g,stationDistanceKm:T,onCommitted:f})=>{const{t:n}=le("wizard"),J=me(),[m,W]=d.useState(null),[Z,z]=d.useState(null),[k,A]=d.useState(!0),[c,ee]=d.useState(null),[x,P]=d.useState(null),[N,V]=d.useState(!1),[w,te]=d.useState(null),L=d.useRef(new Map);d.useEffect(()=>{let r=!1;return(async()=>{try{let i=null;for(const o of Le){if(o>0&&await new Promise(I=>setTimeout(I,o)),r)return;const{data:C,error:l}=await Q.rpc("get_station_prefill_by_wizard_session",{p_session_id:t});if(r)return;if(l){S.warn("[StationQuickBook] prefill RPC failed:",l.message);continue}if(i=Array.isArray(C)?C[0]??null:null,i)break}if(r)return;W(i);const s=(i==null?void 0:i.station_id)??h??null;if(!i||!s){A(!1),B("danke_quickbook_fallback",{category:"ankaufstation_funnel",properties:{wizard_session_id:t,reason:i?"no_station_id":"prefill_empty"}});return}const{data:a,error:u}=await Q.rpc("get_station_available_slots",{p_station_id:s,p_days_ahead:14,p_max_slots:de});if(r)return;u?(S.warn("[StationQuickBook] slots RPC failed:",u.message),z([])):z(a??[]),A(!1),B("danke_quickbook_shown",{category:"ankaufstation_funnel",properties:{wizard_session_id:t,slots_available:(a??[]).length}})}catch{r||A(!1)}})(),()=>{r=!0}},[t]);const q=d.useMemo(()=>we(Z??[]),[Z]),E=d.useMemo(()=>q.find(r=>r.key===c)??q[0]??null,[q,c]),D=d.useMemo(()=>new Intl.DateTimeFormat(G(),{timeZone:"Europe/Berlin",hour:"2-digit",minute:"2-digit"}),[]),se=`${O("ankaufstationen")}?from=wizard_danke&ws=${t}`,R=d.useMemo(()=>{if(!x)return null;const r=new Date(x);return new Intl.DateTimeFormat(G(),{timeZone:"Europe/Berlin",weekday:"short",day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"}).format(r)+` ${n("danke.qbClock")}`},[x,n]),p=async r=>{try{const{data:i}=await Q.rpc("get_station_available_slots",{p_station_id:r,p_days_ahead:14,p_max_slots:de});z(i??[])}catch{z([])}},ae=async()=>{var u;if(!m||N)return;if(!x){y.info(n("danke.qbPickSlotFirst"));return}const r=m.station_id??h;if(!r)return;Ne(`danke-quickbook:${t}`),V(!0);let i=L.current.get(x);i||(i=Be(),L.current.set(x,i));const s=`terminbuchung_${i}`,a=he();try{const{data:o,error:C}=await Q.functions.invoke("book-station-appointment",{body:{stationId:r,slotStart:x,bookingIdempotencyKey:i,transactionId:s,customerName:(m.customer_name??"").trim(),customerEmail:(m.customer_email??"").trim().toLowerCase(),customerPhone:((u=m.customer_phone)==null?void 0:u.trim())||void 0,customerPostalCode:m.customer_postal_code??"",customerCity:m.customer_city??void 0,vehicleType:m.vehicle_type==="Wohnwagen"?"Wohnwagen":"Wohnmobil",manufacturer:m.manufacturer??void 0,model:m.model??void 0,year:m.year??void 0,mileage:m.mileage??void 0,bodyType:m.body_type??void 0,condition:m.condition??void 0,priceExpectation:m.price_expectation!=null?Number(m.price_expectation):void 0,description:m.description??void 0,distanceKm:T??void 0,gclid:a.gclid??void 0,gbraid:a.gbraid??void 0,wbraid:a.wbraid??void 0,msclkid:a.msclkid??void 0,fbclid:a.fbclid??void 0,fbp:a.fbp??void 0,fbc:a.fbc??void 0,ga4ClientId:a.ga4ClientId??void 0,utmSource:a.utm_source??void 0,utmMedium:a.utm_medium??void 0,utmCampaign:a.utm_campaign??void 0,utmTerm:a.utm_term??void 0,utmContent:a.utm_c
2ontent??void 0,referrerUrl:typeof document<"u"&&document.referrer||void 0,landingPage:typeof window<"u"?window.location.href:void 0,wizardSessionId:t,locale:ce()}});if(C){let l=n("danke.qbBookError"),I=!1;try{const v=C.context;if(v&&typeof v.json=="function"){const b=await v.json();b!=null&&b.error&&(l=b.error),(b==null?void 0:b.code)==="SLOT_TAKEN"&&(I=!0)}}catch{}if(I){B("danke_quickbook_slot_taken",{category:"ankaufstation_funnel",properties:{wizard_session_id:t}}),y.error(n("danke.qbSlotTaken")),P(null),L.current.delete(x),await p(r);return}throw new Error(l)}if(!(o!=null&&o.success)||!o.station)throw new Error(n("danke.qbBookError"));te({slotStart:o.slotStart??x,stationName:o.station.name,stationAddress:o.station.address,stationPostalCode:o.station.postalCode,stationCity:o.station.city,confirmationToken:o.confirmationToken??null,customerEmail:(m.customer_email??"").trim().toLowerCase()}),f==null||f("booked"),B("danke_quickbook_booked",{category:"ankaufstation_funnel",properties:{wizard_session_id:t,appointment_id:o.appointmentId??null}});try{const{trackTerminbuchung:l}=await K(async()=>{const{trackTerminbuchung:I}=await import("./index-BiSLCj2K.js").then(v=>v.e5);return{trackTerminbuchung:I}},__vite__mapDeps([0,1,2,3,4,5,6,7]));await l(o.station.slug||o.station.id,s)}catch(l){S.warn("[StationQuickBook] trackTerminbuchung failed (non-fatal):",l)}try{const{trackMetaScheduleDeduped:l}=await K(async()=>{const{trackMetaScheduleDeduped:v}=await import("./metaCapiService-B1sSZqU2.js");return{trackMetaScheduleDeduped:v}},__vite__mapDeps([8,0,1,2,3,4,5,6,7]));l({content_name:o.station.name},s);const{trackTikTokScheduleDeduped:I}=await K(async()=>{const{trackTikTokScheduleDeduped:v}=await import("./index-BiSLCj2K.js").then(b=>b.e7);return{trackTikTokScheduleDeduped:v}},__vite__mapDeps([0,1,2,3,4,5,6,7]));I({content_name:o.station.name},s)}catch(l){S.warn("[StationQuickBook] track*ScheduleDeduped failed (non-fatal):",l)}}catch(o){S.error("[StationQuickBook] booking failed:",o),B("danke_quickbook_failed",{category:"ankaufstation_funnel",properties:{wizard_session_id:t,reason:o instanceof Error?o.message.slice(0,120):"unknown"}}),y.error(o instanceof Error?o.message:n("danke.qbBookError"))}finally{V(!1)}};if(w){const r=new Intl.DateTimeFormat(G(),{timeZone:"Europe/Berlin",weekday:"long",day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"}).format(new Date(w.slotStart))+` ${n("danke.qbClock")}`,i=`${w.stationAddress}, ${w.stationPostalCode} ${w.stationCity}`,s=`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(i)}`;return e.jsx(j,{className:"p-4 md:p-8 shadow-elegant border-green-300 dark:border-green-800",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-full bg-green-100 dark:bg-green-900/40 flex items-center justify-center",children:e.jsx(M,{className:"w-5 h-5 text-green-700 dark:text-green-400"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"text-base md:text-lg font-bold text-foreground",children:n("danke.qbSuccessTitle")}),e.jsx("p",{className:"text-sm font-semibold text-foreground mt-1",children:r}),e.jsxs("p",{className:"text-sm text-muted-foreground mt-2",children:[n("danke.qbSuccessStation")," ",e.jsx("strong",{className:"text-foreground",children:w.stationName}),e.jsx("br",{}),i]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:n("danke.qbSuccessMailHint",{email:w.customerEmail})}),e.jsxs("div",{className:"flex flex-wrap gap-2 mt-3",children:[e.jsx(_,{asChild:!0,size:"sm",variant:"outline",className:"min-h-[44px] sm:min-h-0",children:e.jsxs("a",{href:s,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(ve,{className:"w-4 h-4 mr-1"}),n("danke.qbSuccessRoute")]})}),w.confirmationToken&&e.jsxs(_,{size:"sm",variant:"ghost",className:"min-h-[44px] sm:min-h-0",onClick:()=>J(ue("termin",{token:w.confirmationToken})),children:[e.jsx(_e,{className:"w-4 h-4 mr-1"}),n("danke.qbSuccessManage")]})]})]})]})})}const H=!k&&!!m&&q.length>0&&Ae.test(m.customer_postal_code??"");return e.jsxs(j,{className:"p-4 md:p-8 shadow-elegant border-green-300 dark:border-green-800",children:[e.jsxs("div",{className:"flex items-start gap-3 mb-3 md:mb-4",children:[e.jsx("div",{className:"hidden sm:flex flex-shrink-0 w-10 h-10 rounded-full bg-green-100 dark:bg-green-900/40 items-center justify-center",children:e.jsx(xe,{className:"w-5 h-5 text-green-700 dark:text-green-400"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-base md:text-lg font-bold text-foreground",children:n("danke.stationCardTitle")}),e.jsxs("p",{className:"text-sm text-muted-foreground mt-0.5 md:mt-1",children:[n("danke.stationBodyPrefix"),g?e.jsxs(e.Fragment,{children:[" ",e.jsx("strong",{children:n("danke.stationBodyRoom",{city:g})})]}):n("danke.stationBodyNearby"),n("danke.stationBodyVor"),T!=null&&T>=1?n("danke.stationBodyDistance",{km:Math.round(T)}):"",n("danke.stationBodySuffix")]})]})]}),k&&e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground py-3",role:"status",children:[e.jsx(X,{className:"w-4 h-4 animate-spin"}),n("danke.qbLoadingSlots")]}),H&&e.jsx("div",{className:"space-y-3",children:e.jsxs("div",{className:"rounded-lg border border-primary/40 bg-primary/5 p-3 space-y-3",children:[e.jsx("div",{className:"flex gap-1.5 overflow-x-auto no-scrollbar -mx-1 px-1 pb-1",children:q.map(r=>{const i=ye(r.date,{locale:G(),todayLabel:n("danke.qbToday"),tomorrowLabel:n("danke.qbTomorrow")}),s=r.key===((E==null?void 0:E.key)??null);return e.jsxs("button",{type:"button",onClick:()=>{ee(r.key),P(null)},"aria-pressed":s,className:Y("flex-shrink-0 min-w-[64px] min-h-[52px] px-2.5 py-1.5 rounded-lg border text-center transition-colors",s?"border-primary bg-primary text-primary-foreground":"border-border bg-card hover:border-primary/50 text-foreground"),children:[e.jsx("span",{className:"block text-xs font-semibold leading-tight",children:i.top}),e.jsx("span",{className:Y("block text-[11px] leading-tight",s?"text-primary-foreground
2/80":"text-muted-foreground"),children:i.bottom})]},r.key)})}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:((E==null?void 0:E.slots)??[]).map(r=>e.jsx("button",{type:"button",onClick:()=>P(r.slot_start),"aria-pressed":x===r.slot_start,className:Y("min-h-[44px] sm:min-h-9 px-3 rounded-lg border text-sm font-medium transition-colors",x===r.slot_start?"border-primary bg-primary text-primary-foreground":"border-border bg-card hover:border-primary/50 text-foreground"),children:D.format(new Date(r.slot_start))},r.slot_start))}),e.jsx("p",{className:"text-xs text-muted-foreground leading-snug pt-1",children:e.jsx($,{t:n,i18nKey:"danke.qbAgbNotice",components:{agb:e.jsx("a",{href:O("agb"),target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 text-foreground"})}})}),e.jsx(_,{size:"lg",disabled:N,"aria-disabled":!x||N,onClick:()=>void ae(),className:Y("w-full gradient-hero hover:gradient-hero-hover",!x&&"opacity-70"),"aria-busy":N,children:N?e.jsxs(e.Fragment,{children:[e.jsx(X,{className:"w-4 h-4 mr-2 animate-spin"}),n("danke.qbBooking")]}):R?n("danke.qbBookCtaWithSlot",{slot:R}):n("danke.qbBookCta")})]})}),!k&&!H&&e.jsx(e.Fragment,{children:e.jsxs(_,{size:"lg",onClick:()=>J(se),className:"w-full sm:w-auto gradient-hero hover:gradient-hero-hover group",children:[n("danke.bookNow"),e.jsx(U,{className:"w-4 h-4 ml-2 transition-transform group-hover:translate-x-1"})]})}),!k&&!m&&e.jsx("p",{className:"text-xs text-muted-foreground mt-3",children:n("danke.phoneAlternative")})]})},Me=60*1e3,at=()=>{const{t}=le("wizard"),h=me(),{user:g}=pe(),T=fe(),[f,n]=d.useState("idle"),[J,m]=d.useState(0),[W,Z]=d.useState(0),z=d.useRef(!1),[k,A]=d.useState(null);d.useEffect(()=>{if(!k)return;const s=k;if(f!=="uploading"){const u=setTimeout(()=>h(s,{replace:!0}),800);return()=>clearTimeout(u)}const a=setTimeout(()=>h(s,{replace:!0}),45e3);return()=>clearTimeout(a)},[k,f,h]),d.useEffect(()=>{K(async()=>{const{maybeRequestAppReview:s}=await import("./appReview-DtYu60Jf.js");return{maybeRequestAppReview:s}},__vite__mapDeps([9,0,1,2,3,4,5,6,7])).then(({maybeRequestAppReview:s})=>s("listing_submitted")).catch(()=>{})},[]),d.useEffect(()=>{if(!oe())return;const s=window.setTimeout(()=>{K(async()=>{const{requestAppPushPrimer:a}=await import("./index-BiSLCj2K.js").then(u=>u.e6);return{requestAppPushPrimer:a}},__vite__mapDeps([0,1,2,3,4,5,6,7])).then(({requestAppPushPrimer:a})=>a()).catch(()=>{})},2500);return()=>window.clearTimeout(s)},[]);const[c,ee]=d.useState(null),[x,P]=d.useState(!1),[N,V]=d.useState(0),[w,te]=d.useState(0);d.useEffect(()=>{try{const s=ge.getItem("wizard_last_submit");if(!s)return;const a=JSON.parse(s);a!=null&&a.sessionId&&(!g||a.saleChannel==="station")&&ee(a)}catch{}},[g]);const L=async()=>{if(!(!c||x)&&!(Date.now()<N)){P(!0);try{const s="https://zcrwqxsyptjwkuxfacvq.supabase.co",a="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InpjcndxeHN5cHRqd2t1eGZhY3ZxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzQwMzgwMzcsImV4cCI6MjA4OTYxNDAzN30.5-ds7Fw1392_iyRLKpXVtTkOyZ0-bDIcTivdGEOFrhc",u=await fetch(`${s}/functions/v1/resend-wizard-confirmation`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a}`,apikey:a},body:JSON.stringify({sessionId:c.sessionId,anonymousId:c.anonymousId})});if(u.ok)y.success(t("danke.resendSuccess",{email:c.email}),{description:t("danke.resendSuccessDescription")}),te(o=>o+1),V(Date.now()+Me);else{let o="",C="";try{const l=await u.json();o=(l==null?void 0:l.error)||(l==null?void 0:l.hint)||"",C=(l==null?void 0:l.code)||""}catch{}u.status===409&&(C==="already_confirmed"||o.includes("bereits bestätigt"))?y.info(t("danke.resendAlreadyConfirmed")):u.status===429?y.error(t("danke.resendRateLimited")):y.error(o||t("danke.resendFailed"))}}catch(s){S.error("Failed to resend wizard confirmation:",s),y.error(t("danke.resendNetworkError"))}finally{P(!1)}}}
2,[q,E]=d.useState(Date.now());d.useEffect(()=>{if(N<=Date.now())return;const s=setInterval(()=>E(Date.now()),1e3);return()=>clearInterval(s)},[N]);const D=Math.max(0,Math.ceil((N-q)/1e3)),se=x||D>0;d.useEffect(()=>{if(z.current)return;const s=window.__pendingWizardPhotos;if(!s||!s.photos||s.photos.length===0||!s.sessionId)return;z.current=!0;const{photos:a,sessionId:u,anonymousId:o}=s;Z(a.length),n("uploading"),delete window.__pendingWizardPhotos,(async()=>{try{const l=new FormData;l.append("sessionId",u),o&&l.append("anonymousId",o);for(const F of a)l.append("photos",F);const b=await fetch("https://zcrwqxsyptjwkuxfacvq.supabase.co/functions/v1/upload-wizard-photos",{method:"POST",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InpjcndxeHN5cHRqd2t1eGZhY3ZxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzQwMzgwMzcsImV4cCI6MjA4OTYxNDAzN30.5-ds7Fw1392_iyRLKpXVtTkOyZ0-bDIcTivdGEOFrhc"},body:l});if(b.ok){const F=await b.json(),re=typeof F.count=="number"?F.count:a.length;re===0?(S.error(`upload-wizard-photos returned count=0 for session ${u}, ${a.length} photos were sent`),n("error")):(m(re),n("success"),S.info(`Uploaded ${re} wizard photos for session ${u} (Danke-Seite)`))}else{const F=await b.text();S.error("Failed to upload wizard photos (Danke-Seite):",F),n("error")}}catch(l){S.error("Error uploading wizard photos (Danke-Seite):",l),n("error")}})()},[]),d.useEffect(()=>{if(f!=="uploading")return;const s=a=>(a.preventDefault(),"");return window.addEventListener("beforeunload",s),()=>window.removeEventListener("beforeunload",s)},[f]);const R=f==="uploading",p=(c==null?void 0:c.saleChannel)==="station",[ae,H]=d.useState(null),r=p&&!ae,i=!p&&(!g||k!==null);return e.jsxs(be,{title:t("seo.dankeTitle"),description:t("seo.dankeDescription"),keywords:t("seo.dankeKeywords"),canonicalPath:O("verkaufenDanke"),noIndex:!0,hideFooter:r||i,hideHeader:r||i,children:[e.jsx(ke,{size:"sm",children:e.jsx("div",{className:"text-center animate-fade-in max-w-3xl mx-auto",children:r?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"inline-flex items-center gap-1.5 rounded-full bg-green-100 dark:bg-green-900/30 px-3 py-1 mb-2 md:mb-4",children:[e.jsx(M,{className:"w-3.5 h-3.5 text-green-700 dark:text-green-400"}),e.jsx("span",{className:"text-xs font-medium text-green-800 dark:text-green-300",children:t("danke.stationStepKicker")})]}),e.jsx("h1",{className:"text-xl md:text-4xl lg:text-5xl font-bold text-foreground mb-1.5 md:mb-4",children:t("danke.stationStepTitle")}),e.jsx("p",{className:"text-muted-foreground text-sm md:text-lg max-w-2xl mx-auto",children:t("danke.stationStepSubtitle")}),e.jsx("div",{className:"max-w-xs mx-auto mt-3 md:mt-4 h-1.5 rounded-full bg-primary/15","aria-hidden":"true",children:e.jsx("div",{className:"h-full w-[92%] rounded-full bg-primary"})})]}):i?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"inline-flex items-center gap-1.5 rounded-full bg-green-100 dark:bg-green-900/30 px-3 py-1 mb-2 md:mb-4",children:[e.jsx(M,{className:"w-3.5 h-3.5 text-green-700 dark:text-green-400"}),e.jsx("span",{className:"text-xs font-medium text-green-800 dark:text-green-300",children:t(k?"danke.confirmStepDoneKicker":"danke.confirmStepKicker")})]}),e.jsx("h1",{className:"text-xl md:text-4xl font-bold text-foreground mb-1.5 md:mb-3",children:t(k?"danke.confirmStepDoneTitle":"danke.confirmStepTitle")}),e.jsx("div",{className:"max-w-xs mx-auto mt-3 md:mt-4 h-1.5 rounded-full bg-primary/15","aria-hidden":"true",children:e.jsx("div",{className:`h-full rounded-full bg-primary ${k?"w-full":"w-[96%]"}`})})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"inline-flex items-center justify-center w-12 h-12 md:w-20 md:h-20 rounded-full bg-green-100 dark:bg-green-900/30 mb-2 md:mb-6",children:e.jsx(M,{className:"w-6 h-6 md:w-10 md:h-10 text-green-600 dark:text-green-400"})}),e.jsx("h1",{className:"text-xl md:text-4xl lg:text-5xl font-bold text-foreground mb-1.5 md:mb-4",children:t(p?"danke.heroTitleStationBooked":"danke.heroTitle")}),e.jsx("p",{className:p?"text-muted-foreground text-sm md:text-lg max-w-2xl mx-auto":"hidden md:block text-muted-foreground text-sm md:text-lg max-w-2xl mx-auto",children:t(p?"danke.heroSubtitleStationBooked":g?"danke.heroSubtitleUser":"danke.heroSubtitleGuest")})]})})}),e.jsx("div",{className:`py-4 ${i?"md:py-10":"md:py-20"} bg-muted/20`,children:e.jsx("div",{className:"container mx-auto px-4",children:e.jsxs("div",{className:"max-w-3xl mx-auto 
2space-y-4 md:space-y-8",children:[p&&c&&e.jsx($e,{sessionId:c.sessionId,stationId:c.stationId,stationCity:c.stationCity,stationDistanceKm:c.stationDistanceKm,onCommitted:H}),!g&&c&&!p&&e.jsxs(j,{className:"p-4 md:p-8 shadow-elegant border-primary/30",children:[e.jsxs("div",{className:"flex items-start gap-3 mb-3 md:mb-4",children:[e.jsx("div",{className:"hidden sm:flex flex-shrink-0 w-10 h-10 rounded-full bg-primary/10 items-center justify-center",children:e.jsx(Se,{className:"w-5 h-5 text-primary"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-base md:text-lg font-bold text-foreground",children:t("danke.confirmTitle")}),e.jsx("p",{className:"text-sm text-muted-foreground mt-0.5 md:mt-1",children:e.jsx($,{t,i18nKey:"danke.confirmText",values:{email:c.email},components:{strong:e.jsx("strong",{}),mail:e.jsx("strong",{className:"break-all"})}})})]})]}),e.jsx(je,{email:c.email,sessionId:c.sessionId,compact:!0,autoFocusCode:!1,onSuccess:({redirectTo:s})=>{f==="uploading"?y.success(t("danke.confirmedUploadingTitle"),{description:t("danke.confirmedUploadingDescription")}):y.success(t("danke.confirmedRedirect")),A(s||"/dashboard")}}),e.jsxs("div",{className:"mt-4 md:mt-5 pt-4 border-t border-border",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:e.jsx($,{t,i18nKey:"danke.linkAlternative",components:{strong:e.jsx("strong",{})}})}),e.jsx("div",{className:"mt-2.5",children:e.jsx(_,{size:"sm",variant:"outline",onClick:()=>{if(D>0){y.info(t("danke.resendCooldownToast",{seconds:D}),{description:t("danke.resendCooldownToastDescription")});return}L()},disabled:x,"aria-disabled":se,"aria-busy":x,className:D>0?"opacity-70":"",children:x?e.jsxs(e.Fragment,{children:[e.jsx(X,{className:"w-3.5 h-3.5 mr-2 animate-spin"})," ",t("danke.resendSending")]}):D>0?e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"w-3.5 h-3.5 mr-2"})," ",t("danke.resendInCooldown",{seconds:D})]}):w>0?e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"w-3.5 h-3.5 mr-2"})," ",t("danke.resendAgain")]}):e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"w-3.5 h-3.5 mr-2"})," ",t("danke.resendFirst")]})})})]})]}),!g&&!c&&!p&&e.jsx(j,{className:"p-4 md:p-8 bg-amber-50 dark:bg-amber-900/20 border-amber-200 dark:border-amber-800 shadow-elegant",children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"hidden sm:flex flex-shrink-0 w-12 h-12 rounded-full bg-amber-100 dark:bg-amber-900/40 items-center justify-center",children:e.jsx(Te,{className:"w-6 h-6 text-amber-600 dark:text-amber-400"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h2",{className:"text-base md:text-lg font-bold text-amber-800 dark:text-amber-300 mb-2",children:t("danke.fallbackTitle")}),e.jsx("p",{className:"text-sm text-amber-700 dark:text-amber-400",children:e.jsx($,{t,i18nKey:"danke.fallbackText",components:{strong:e.jsx("strong",{})}})}),e.jsx("p",{className:"text-xs text-amber-700 dark:text-amber-300 mt-2",children:t("danke.fallbackSpamHint")})]})]})}),(c==null?void 0:c.sessionId)&&!p&&!i&&(()=>{const s=c.photoCount===0;return e.jsx(j,{className:"p-4 md:p-8 shadow-elegant border-primary/30 bg-primary/5",children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"hidden sm:flex flex-shrink-0 w-12 h-12 rounded-full bg-primary/10 items-center justify-center",children:s?e.jsx(Ce,{className:"w-6 h-6 text-primary"}):e.jsx(Ie,{className:"w-6 h-6 text-primary"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h2",{className:"text-base md:text-lg font-bold text-foreground mb-1",children:t(s?"danke.photoCtaTitle":"danke.equipmentCtaTitle")}),e.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:e.jsx($,{t,i18nKey:s?"danke.photoCtaText":"danke.equipmentCtaText",components:{strong:e.jsx("strong",{})}})}),e.jsxs(_,{onClick:()=>h(`${O("verkaufenAusstattung")}?wizard=${encodeURIComponent(c.sessionId)}`),className:"w-full sm:w-auto gradient-hero hover:gradient-hero-hover",children:[t(s?"danke.photoCtaButton":"danke.equipmentCtaButton"),e.jsx(U,{className:"w-4 h-4 ml-2"})]})]})]})})})(),f==="uploading"&&e.jsx(j,{className:"p-4 md:p-5 bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-full bg-blue-100 dar
2k:bg-blue-900/40 flex items-center justify-center",children:e.jsx(X,{className:"w-5 h-5 text-blue-600 dark:text-blue-400 animate-spin"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-semibold text-blue-800 dark:text-blue-300 mb-1",children:t("danke.uploadingTitle")}),e.jsx("p",{className:"text-xs text-blue-700 dark:text-blue-400",children:t("danke.uploadingText",{count:W})})]})]})}),f==="success"&&e.jsx(j,{className:"p-4 md:p-5 bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-full bg-green-100 dark:bg-green-900/40 flex items-center justify-center",children:e.jsx(M,{className:"w-5 h-5 text-green-600 dark:text-green-400"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-semibold text-green-800 dark:text-green-300 mb-1",children:t("danke.uploadSuccessTitle",{count:J})}),e.jsx("p",{className:"text-xs text-green-700 dark:text-green-400",children:t(p?"danke.uploadSuccessTextStation":"danke.uploadSuccessText")})]})]})}),f==="error"&&e.jsx(j,{className:"p-4 md:p-5 bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-full bg-red-100 dark:bg-red-900/40 flex items-center justify-center",children:e.jsx(Ee,{className:"w-5 h-5 text-red-600 dark:text-red-400"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-semibold text-red-800 dark:text-red-300 mb-1",children:t("danke.uploadErrorTitle")}),e.jsx("p",{className:"text-xs text-red-700 dark:text-red-400",children:t("danke.uploadErrorText")})]})]})}),f==="idle"&&!p&&!i&&e.jsx(j,{className:"p-4 md:p-5 bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-full bg-blue-100 dark:bg-blue-900/40 flex items-center justify-center",children:e.jsx(De,{className:"w-5 h-5 text-blue-600 dark:text-blue-400"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-semibold text-blue-800 dark:text-blue-300 mb-1",children:t("danke.uploadIdleTitle")}),e.jsx("p",{className:"text-xs text-blue-700 dark:text-blue-400",children:t("danke.uploadIdleText")})]})]})}),!r&&e.jsxs(j,{className:"p-6 md:p-8 shadow-elegant",children:[e.jsxs("h2",{className:"text-xl font-bold mb-6 flex items-center gap-3",children:[e.jsx(xe,{className:"w-6 h-6 text-primary"}),t("danke.nextStepsTitle")]}),p?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center text-primary font-bold",children:"1"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-foreground",children:t("danke.stationStep1Title")}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:t("danke.stationStep1Text")})]})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center text-primary font-bold",children:"2"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-foreground",children:t("danke.stationStep2Title")}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:t("danke.stationStep2Text")})]})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center text-primary font-bold",children:"3"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-foreground",children:t("danke.stationStep3Title")}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:t("danke.stationStep3Text")})]})]})]}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center text-primary font-bold",children:"1"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-foreground",children:t("danke.step1Title")}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:t(g?"danke.step1TextUser":"danke.step1TextGuest")})]})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center text-primary font-bold",children:"2"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-foreground",children:t("danke.step2Title")}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:t("danke.step2Text")})]})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center text-primary font-bold",children:"3"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-foreground",children:t("danke.step3Title")}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:t("danke.step3Text")})]})]})]})]}),!p&&!oe()&&e.jsx(j,{className:"p-4 md:p-8 shadow-elegant border-primary/30",children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"hidden sm:flex flex-shrink-0 w-12 h-12 rounded-full bg-primary/10 
2items-center justify-center",children:e.jsx(ie,{className:"w-6 h-6 text-primary"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h2",{className:"text-base md:text-lg font-bold text-foreground mb-1",children:t("danke.appCtaTitle")}),e.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:t("danke.appCtaText")}),e.jsx(_,{asChild:!0,className:"w-full sm:w-auto gradient-hero hover:gradient-hero-hover",children:e.jsxs("a",{href:"/app?src=danke",children:[e.jsx(ie,{className:"w-4 h-4 mr-2"}),t("danke.appCtaButton")]})})]}),e.jsxs("div",{className:"hidden md:flex flex-col items-center gap-2 flex-shrink-0",children:[e.jsx("img",{src:ce()==="nl"?"/app-qr-danke-nl.png":"/app-qr-danke-de.png",alt:t("danke.appQrAlt"),width:112,height:112,loading:"lazy",className:"h-28 w-28 rounded-md border border-border bg-white p-1"}),e.jsx("p",{className:"text-xs text-muted-foreground text-center max-w-[160px]",children:t("danke.appQrHint")})]})]})}),!r&&!i&&e.jsxs(j,{className:"p-6 md:p-8 bg-primary/5 border-primary/20",children:[e.jsx("h2",{className:"text-lg font-bold mb-4",children:t("danke.questionsTitle")}),e.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:t("danke.questionsText")}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[e.jsxs("a",{href:T.phone.tel,className:"flex items-center gap-2 text-sm text-foreground hover:text-primary transition-colors",children:[e.jsx(ze,{className:"w-4 h-4"}),T.phone.display]}),e.jsxs("a",{href:`mailto:${T.email}`,className:"flex items-center gap-2 text-sm text-foreground hover:text-primary transition-colors",children:[e.jsx(qe,{className:"w-4 h-4"}),T.email]})]})]}),!r&&!i&&e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center pt-4",children:[g?e.jsxs(_,{size:"lg",onClick:()=>h("/dashboard"),disabled:R,className:"gradient-hero hover:gradient-hero-hover group disabled:opacity-50",children:[e.jsx(Pe,{className:"w-5 h-5 mr-2"}),t("danke.toAccount"),e.jsx(U,{className:"w-4 h-4 ml-2 transition-transform group-hover:translate-x-1"})]}):e.jsxs(_,{size:"lg",onClick:()=>h("/"),disabled:R,className:"gradient-hero hover:gradient-hero-hover group disabled:opacity-50",children:[e.jsx(Re,{className:"w-5 h-5 mr-2"}),t("danke.toHome"),e.jsx(U,{className:"w-4 h-4 ml-2 transition-transform group-hover:translate-x-1"})]}),e.jsxs(_,{size:"lg",variant:"outline",onClick:()=>h(O("ratgeber")),disabled:R,className:"group disabled:opacity-50",children:[e.jsx(Fe,{className:"w-5 h-5 mr-2"}),t("danke.readRatgeber"),e.jsx(U,{className:"w-4 h-4 ml-2 transition-transform group-hover:translate-x-1"})]})]})]})})})]})};export{at as default};

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.