PageSourceSearch

https://www.usfh.ch/_next/static/chunks/9083-e37fec748f861838.js

js usfh.ch collected 2026-10-08 04:05:45 UTC 40,718 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9083],{10083:(e,s,t)=>{t.d(s,{Wu:()=>d,ZB:()=>o,Zp:()=>n,aR:()=>i});var a=t(20136),r=t(72004),l=t(56230);let n=r.forwardRef((e,s)=>{let{className:t,...r}=e;return(0,a.jsx)("div",{ref:s,className:(0,l.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",t),...r})});n.displayName="Card";let i=r.forwardRef((e,s)=>{let{className:t,...r}=e;return(0,a.jsx)("div",{ref:s,className:(0,l.cn)("flex flex-col space-y-1.5 p-6",t),...r})});i.displayName="CardHeader";let o=r.forwardRef((e,s)=>{let{className:t,...r}=e;return(0,a.jsx)("div",{ref:s,className:(0,l.cn)("text-2xl font-semibold leading-none tracking-tight",t),...r})});o.displayName="CardTitle",r.forwardRef((e,s)=>{let{className:t,...r}=e;return(0,a.jsx)("div",{ref:s,className:(0,l.cn)("text-sm text-muted-foreground",t),...r})}).displayName="CardDescription";let d=r.forwardRef((e,s)=>{let{className:t,...r}=e;return(0,a.jsx)("div",{ref:s,className:(0,l.cn)("p-6 pt-0",t),...r})});d.displayName="CardContent",r.forwardRef((e,s)=>{let{className:t,...r}=e;return(0,a.jsx)("div",{ref:s,className:(0,l.cn)("flex items-center p-6 pt-0",t),...r})}).displayName="CardFooter"},39083:(e,s,t)=>{t.d(s,{F:()=>X});var a=t(20136),r=t(72004),l=t(17868),n=t(11373),i=t(1411),o=t(92835),d=t(16977),c=t(15622),m=t(77654),x=t(13825),h=t(62217),u=t(96391),g=t(21968),p=t(71416),b=t(83931),f=t(17015),w=t(70841),j=t(24224),v=t(67100),N=t(86528),y=t(57818),C=t(65891),P=t(96534),S=t(36301),F=t(12840),k=t(84143),_=t(8816),A=t(1145),T=t(10083),E=t(87871),z=t(69317),R=t(61855),D=t(43577),H=t(71465),L=t(56230);let B=(0,H.F)("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),I=r.forwardRef((e,s)=>{let{className:t,variant:r,...l}=e;return(0,a.jsx)("div",{ref:s,role:"alert",className:(0,L.cn)(B({variant:r}),t),...l})});I.displayName="Alert",r.forwardRef((e,s)=>{let{className:t,...r}=e;return(0,a.jsx)("h5",{ref:s,className:(0,L.cn)("mb-1 font-medium leading-none tracking-tight",t),...r})}).displayName="AlertTitle";let J=r.forwardRef((e,s)=>{let{className:t,...r}=e;return(0,a.jsx)("div",{ref:s,className:(0,L.cn)("text-sm [&_p]:leading-relaxed",t),...r})});function X(e){let{onClose:s,onAccountDeleted:H}=e,[L,B]=(0,r.useState)(null),[X,M]=(0,r.useState)(null),[W,$]=(0,r.useState)([]),[O,Z]=(0,r.useState)(!1),[q,G]=(0,r.useState)(""),[K,U]=(0,r.useState)(1),[V,Q]=(0,r.useState)(1),[Y,ee]=(0,r.useState)(0),[es,et]=(0,r.useState)(""),[ea,er]=(0,r.useState)(""),[el,en]=(0,r.useState)({}),[ei,eo]=(0,r.useState)(!0),[ed,ec]=(0,r.useState)(""),[em,ex]=(0,r.useState)(!1),[eh,eu]=(0,r.useState)({}),[eg,ep]=(0,r.useState)(!1),[eb,ef]=(0,r.useState)(!1),[ew,ej]=(0,r.useState)(""),[ev,eN]=(0,r.useState)(!1),[ey,eC]=(0,r.useState)(""),[eP,eS]=(0,r.useState)(!1),[eF,ek]=(0,r.useState)({currentPassword:"",newPassword:"",confirmPassword:""}),[e_,eA]=(0,r.useState)(!1),[eT,eE]=(0,r.useState)(""),ez="https://web.lweb.ch/templettedhop";(0,r.useEffect)(()=>{eR()},[]),(0,r.useEffect)(()=>{L&&eD()},[L,K,es,ea]);let eR=async()=>{try{eo(!0);let e=localStorage.getItem("user-session-token");if(console.log("UserProfile: Loading with token:",(null==e?void 0:e.substring(0,10))+"..."),!e)throw Error("No session token found");let s=await fetch("".concat(ez,"/get_user.php"),{method:"POST",mode:"cors",credentials:"omit",headers:{"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest","Cache-Control":"no-cache"},body:JSON.stringify({sessionToken:e})});if(console.log("UserProfile: Response status:",s.status),!s.ok){let e=await s.text();if(console.error("UserProfile: HTTP Error:",s.status,e),401===s.status)throw localStorage.removeItem("user-session-token"),Error("Sesi\xf3n expirada. Por favor, inicie sesi\xf3n nuevamente.");throw Error("HTTP ".concat(s.status,": ").concat(e))}let t=await s.json();if(console.log("UserProfile: Response data:",t),t.success)B(t.user),M(t.orderStats),eu(t.user);else throw Error(t.error||"Failed to load user profile")}catch(e){ec(e.message),console.error("Error loading user profile:",e)}finally{eo(!1)}},eD=async()=>{try{if(Z(!0),G(""),!(null==L?void 0:L.email))return void console.log("No user email available for orders");console.log("Loading orders for user:",L.email);let r=new URLSearchParams({page:K.toString(),limit:"10",email:L.email,include_items:"true"});es&&r.append("status",es),ea.trim()&&r.append("search",ea.trim());let l=await fetch("".concat(ez,"/get_ordersuser.php?").concat(r.toString()),{method:"GET",mode:"cors",credentials:"omit",headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest","Cache-Control":"no-cache"}});if(console.log("Orders response status:",l.status),!l.ok){let e=await l.text();throw console.error("Orders HTTP Error:",l.status,e),Error("HTTP ".concat(l.status,": ").concat(e))}let n=await l.json();if(console.log("Orders response data:",n),n.success){var e,s,t,a;$(n.data||[]),Q((null==(e=n.pagination)?void 0:e.total_pages)||1),ee((null==(s=n.pagination)?void 0:s.total_orders)||0),n.stats&&M({total_orders:n.stats.total_orders,total_spent:n.stats.total_revenue,last_order_date:(null==(a=n.data)||null==(t=a[0])?void 0:t.created_at)||""})}else throw Error("Failed to load orders")}catch(e){G(e.message),console.error("Error loading orders:",e)}finally{Z(!1)}},eH=async()=>{try{ep(!0);let e=localStorage.getItem("user-session-token");if(!e)throw Error("No session token found");let s=await fetch("".concat(ez,"/update_user.php"),{method:"PUT",mode:"cors",credentials:"omit",headers:{"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest","Cache-Control":"no-cache"},body:JSON.stringify({sessionToken:e,firstName:eh.first_name,lastName:eh.last_name,phone:eh.phone,address:eh.address,city:eh.city,postalCode:eh.postal_code,canton:eh.canton,notes:eh.notes})}
1),t=await s.json();if(t.success)B(e=>e?{...e,...eh}:null),ex(!1);else throw Error(t.error||"Failed to update user")}catch(e){alert("Error updating profile: ".concat(e.message)),console.error("Error updating user:",e)}finally{ep(!1)}},eL=async()=>{if(!ew.trim())return void eC("Bitte geben Sie Ihr Passwort ein");try{eN(!0),eC("");let e=localStorage.getItem("user-session-token");if(!e)throw Error("No session token found");console.log("\uD83D\uDDD1️ Iniciando eliminaci\xf3n de cuenta...");let t=await fetch("".concat(ez,"/delete_user.php"),{method:"DELETE",mode:"cors",credentials:"omit",headers:{"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest","Cache-Control":"no-cache"},body:JSON.stringify({sessionToken:e,confirmPassword:ew})});if(console.log("\uD83D\uDCE1 Respuesta del servidor:",t.status),!t.ok){let e=await t.text();if(console.error("❌ Error HTTP:",t.status,e),401===t.status)throw Error("Passwort ist falsch oder Sitzung ist abgelaufen");throw Error("HTTP ".concat(t.status,": ").concat(e))}let a=await t.json();if(console.log("✅ Respuesta de eliminaci\xf3n:",a),a.success)localStorage.removeItem("user-session-token"),localStorage.removeItem("cantina-customer-info"),localStorage.removeItem("cantina-cart"),ef(!1),alert("Ihr Konto wurde erfolgreich gel\xf6scht. Sie werden zur Startseite weitergeleitet."),H&&H(),s(),setTimeout(()=>{window.location.href="/"},1e3);else throw Error(a.error||"Failed to delete account")}catch(s){console.error("❌ Error eliminando cuenta:",s);let e="Error desconocido";s instanceof Error?e=s.message:"string"==typeof s&&(e=s),e.includes("Passwort ist falsch")?eC("Das eingegebene Passwort ist falsch"):e.includes("Sitzung ist abgelaufen")?eC("Ihre Sitzung ist abgelaufen. Bitte melden Sie sich erneut an."):e.includes("Load failed")||e.includes("Failed to fetch")?eC("Verbindungsfehler. Bitte versuchen Sie es erneut."):eC("Fehler beim L\xf6schen des Kontos: ".concat(e))}finally{eN(!1)}},eB=async()=>{if(!eF.currentPassword.trim())return void eE("Bitte geben Sie Ihr aktuelles Passwort ein");if(!eF.newPassword.trim())return void eE("Bitte geben Sie ein neues Passwort ein");if(eF.newPassword.length<8)return void eE("Das neue Passwort muss mindestens 8 Zeichen lang sein");if(eF.newPassword!==eF.confirmPassword)return void eE("Die neuen Passw\xf6rter stimmen nicht \xfcberein");if(eF.currentPassword===eF.newPassword)return void eE("Das neue Passwort muss sich vom aktuellen unterscheiden");try{eA(!0),eE("");let e=localStorage.getItem("user-session-token");if(!e)throw Error("No session token found");console.log("\uD83D\uDD11 Iniciando cambio de contrase\xf1a...");let s=await fetch("".concat(ez,"/change_password.php"),{method:"PUT",mode:"cors",credentials:"omit",headers:{"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest","Cache-Control":"no-cache"},body:JSON.stringify({sessionToken:e,currentPassword:eF.currentPassword,newPassword:eF.newPassword,confirmPassword:eF.confirmPassword})});if(console.log("\uD83D\uDCE1 Respuesta del servidor:",s.status),!s.ok){let e=await s.text();if(console.error("❌ Error HTTP:",s.status,e),401===s.status)throw Error("Das aktuelle Passwort ist falsch oder die Sitzung ist abgelaufen");throw Error("HTTP ".concat(s.status,": ").concat(e))}let t=await s.json();if(console.log("✅ Respuesta de cambio de contrase\xf1a:",t),t.success)eS(!1),ek({currentPassword:"",newPassword:"",confirmPassword:""}),alert("Ihr Passwort wurde erfolgreich ge\xe4ndert!");else throw Error(t.error||"Failed to change password")}catch(s){console.error("❌ Error cambiando contrase\xf1a:",s);let e="Error desconocido";s instanceof Error?e=s.message:"string"==typeof s&&(e=s),e.includes("aktuelle Passwort ist falsch")?eE("Das aktuelle Passwort ist falsch"):e.includes("Sitzung ist abgelaufen")?eE("Ihre Sitzung ist abgelaufen. Bitte melden Sie sich erneut an."):e.includes("Load failed")||e.includes("Failed to fetch")?eE("Verbindungsfehler. Bitte versuchen Sie es erneut."):eE("Fehler beim \xc4ndern des Passworts: ".concat(e))}finally{eA(!1)}},eI=e=>e.split("\n").filter(e=>!e.startsWith("Kauf auf Rechnung")&&!e.startsWith("Stock actualizado")&&!e.startsWith("PayPal Payer ID")).join("\n").trim(),eJ=async e=>{let{jsPDF:s}=await Promise.all([t.e(9383),t.e(3356),t.e(1690)]).then(t.bind(t,29196)),a=new s({orientation:"portrait",unit:"mm",format:"a4"}),r=a.internal.pageSize.getWidth();try{var l;let e=new window.Image;e.src="/Secuxrity_n.jpg",await new Promise(s=>{e.onload=()=>s(),e.onerror=()=>s()});let s=document.createElement("canvas");
1s.width=e.naturalWidth||1,s.height=e.naturalHeight||1,null==(l=s.getContext("2d"))||l.drawImage(e,0,0);let t=s.toDataURL("image/jpeg"),r=e.naturalWidth?e.naturalWidth/e.naturalHeight*20:20;a.addImage(t,"JPEG",15,10,r,20)}catch(e){}a.setFont("helvetica","bold"),a.setFontSize(13),a.setTextColor(44,95,46),a.text("US - Fishing & Huntingshop",15,36),a.setFont("helvetica","normal"),a.setFontSize(8),a.setTextColor(80,80,80),a.text("JAGD \xb7 ANGELN \xb7 OUTDOOR",15,41),a.text("Bahnhofstrasse 2, 9475 Sevelen",15,46),a.text("Tel: 078 606 61 05",15,51),a.text("[email protected]",15,56),a.setFont("helvetica","bold"),a.setFontSize(22),a.setTextColor(44,95,46),a.text("RECHNUNG",r-15,36,{align:"right"}),a.setFontSize(10),a.setTextColor(100,100,100),a.text("Bestellnummer: ".concat(e.order_number),r-15,43,{align:"right"}),a.text("Rechnungsnummer: #FA".concat(String(e.order_number).padStart(8,"0")),r-15,49,{align:"right"}),a.text("Datum: ".concat(eX(e.created_at)),r-15,55,{align:"right"}),a.setDrawColor(44,95,46),a.setLineWidth(.5),a.line(15,62,r-15,62),a.setFont("helvetica","bold"),a.setFontSize(11),a.setTextColor(40,40,40),a.text("Lieferadresse:",15,70),a.setFont("helvetica","normal"),a.setFontSize(10),["".concat(e.customer_first_name," ").concat(e.customer_last_name),e.customer_address,"".concat(e.customer_postal_code," ").concat(e.customer_city),e.customer_canton,e.customer_email,e.customer_phone].filter(Boolean).forEach((e,s)=>a.text(e,15,77+5.5*s)),a.setFont("helvetica","bold"),a.setFontSize(11),a.setTextColor(40,40,40),a.text("Rechnungsadresse:",r/2+5,70),a.setFont("helvetica","normal"),a.setFontSize(10),a.setTextColor(100,100,100),a.text("(identisch mit Lieferadresse)",r/2+5,76);let n="completed"===e.payment_status?"Bezahlt":"pending"===e.payment_status?"Ausstehend":"failed"===e.payment_status?"Fehlgeschlagen":e.payment_status,i="completed"===e.payment_status?[44,95,46]:"failed"===e.payment_status?[180,0,0]:[180,130,0];a.setFont("helvetica","bold"),a.setFontSize(10),a.setTextColor(...i),a.text("Zahlungsstatus: ".concat(n),r-15,84,{align:"right"}),a.setTextColor(100,100,100),a.setFont("helvetica","normal"),a.text("Zahlung: ".concat(e.payment_method),r-15,90,{align:"right"}),a.setTextColor(40,40,40);let o=118;a.setFillColor(44,95,46),a.setTextColor(255,255,255),a.setFont("helvetica","bold"),a.setFontSize(9),a.rect(15,o,r-30,8,"F"),a.text("Artikel",17,o+5.5);let d=r-15-8;a.text("Menge",125,o+5.5),a.text("St\xfcckpreis",165,o+5.5,{align:"right"}),a.text("Gesamt",d,o+5.5,{align:"right"}),o+=10,a.setFont("helvetica","normal"),a.setTextColor(40,40,40);let c=e.items||[];
1c.forEach((e,s)=>{let t=Number(e.subtotal)||0,l=.05*Math.round(.081*t/.05);s%2==0&&(a.setFillColor(245,248,245),a.rect(15,o-2,r-30,18,"F")),a.setFontSize(9),a.setFont("helvetica","bold"),a.setTextColor(40,40,40),a.text(e.product_name.substring(0,50),17,o+4),a.text("".concat(e.quantity,"x"),125,o+4),a.text("".concat((Number(e.price)||0).toFixed(2)," CHF"),165,o+4,{align:"right"}),a.text("".concat(t.toFixed(2)," CHF"),d,o+4,{align:"right"}),a.setFont("helvetica","normal"),a.setFontSize(7.5),a.setTextColor(130,130,130),a.text("Art.-Nr: ".concat(e.product_id),17,o+10),Number(e.product_id)>=0&&a.text("Steuersatz: ".concat(l.toFixed(2)," CHF"),d,o+10,{align:"right"}),a.setTextColor(40,40,40),o+=18}),o+=4,a.setDrawColor(200,200,200),a.line(15,o,r-15,o),o+=6;let m=c.reduce((e,s)=>e+(Number(s.subtotal)||0),0),x=c.length>0&&c.every(e=>0>Number(e.product_id)),h=x?0:Number(e.shipping_cost)||0,u=x?0:.05*Math.round(.081*m/.05),g=m+h+u,p=x?m:.5*Math.ceil(g/.5);a.setFontSize(10),a.setFont("helvetica","normal"),a.setTextColor(40,40,40),a.text("Zwischensumme (Artikel):",r-75,o),a.text("".concat(m.toFixed(2)," CHF"),r-15,o,{align:"right"}),o+=6,!x&&(a.text("MwSt. 8.1%:",r-75,o),a.text("".concat(u.toFixed(2)," CHF"),r-15,o,{align:"right"}),o+=6,h>0&&(a.text("Versandkosten:",r-75,o),a.text("".concat(h.toFixed(2)," CHF"),r-15,o,{align:"right"}),o+=6)),o-=4,a.setDrawColor(44,95,46),a.line(r-75,o,r-15,o),o+=5,a.setFont("helvetica","bold"),a.setFontSize(12),a.setTextColor(44,95,46),a.text("TOTAL:",r-55,o),a.text("".concat(p.toFixed(2)," CHF"),r-15,o,{align:"right"}),a.setFont("helvetica","normal"),a.setFontSize(8),a.setTextColor(150,150,150),a.text("Vielen Dank f\xfcr Ihren Einkauf!",r/2,285,{align:"center"}),a.save("Rechnung_".concat(e.order_number,".pdf"))},eX=e=>new Date(e).toLocaleDateString("de-DE",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),eM=e=>{e>=1&&e<=V&&U(e)};return ei?(0,a.jsx)("div",{className:"min-h-screen bg-[#F7F7F8] p-4",children:(0,a.jsx)("div",{className:"max-w-4xl mx-auto",children:(0,a.jsx)("div",{className:"flex items-center justify-center min-h-[60vh]",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-[#2C5F2E] mx-auto mb-4"}),(0,a.jsx)("p",{className:"text-gray-600",children:"Lade Benutzerprofil..."})]})})})}):ed?(0,a.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-red-50 to-rose-100 p-4",children:(0,a.jsx)("div",{className:"max-w-4xl mx-auto",children:(0,a.jsx)("div",{className:"flex items-center justify-center min-h-[60vh]",children:(0,a.jsx)(T.Zp,{className:"max-w-md w-full",children:(0,a.jsxs)(T.Wu,{className:"text-center p-8",children:[(0,a.jsx)(l.A,{className:"w-16 h-16 text-red-500 mx-auto mb-4"}),(0,a.jsx)("h2",{className:"text-xl font-bold text-red-700 mb-2",children:"Fehler"}),(0,a.jsx)("p",{className:"text-red-600 mb-4",children:ed}),(0,a.jsx)(A.$,{onClick:s,className:"bg-red-600 hover:bg-red-700",children:"Zur\xfcck"})]})})})})}):(0,a.jsxs)("div",{className:"min-h-screen bg-gray-50/80",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("div",{className:"sticky top-0 z-30 flex-shrink-0",children:(0,a.jsx)("div",{className:"bg-white/80 backdrop-blur-xl border-b border-gray-100 shadow-sm",children:(0,a.jsx)("div",{className:"px-4 sm:px-6 py-3",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("button",{onClick:s,className:"w-9 h-9 flex items-center justify-center rounded-xl bg-gray-100 text-gray-600 hover:bg-[#2C5F2E] hover:text-white transition-all flex-shrink-0",type:"button",children:(0,a.jsx)(n.A,{className:"w-4 h-4"})}),(0,a.jsx)("div",{className:"w-10 h-10 bg-gradient-to-br from-[#2C5F2E] to-[#3a7a3d] rounded-xl flex items-center justify-center shadow-sm shadow-green-500/20",children:(0,a.jsx)(i.A,{className:"w-5 h-5 text-white"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-base font-black text-gray-900 tracking-tight",children:"Mein Profil"}),(0,a.jsx)("p",{className:"text-xs text-gray-400",children:null==L?void 0:L.email})]})]}),(0,a.jsx)("div",{})]})})})}),(0,a.jsx)("div",{className:"bg-gray-50/80",children:(0,a.jsx)("div",{className:"px-4 sm:px-6 py-6 sm:py-8",children:(0,a.jsxs)("div",{className:"max-w-6xl mx-auto",children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 mb-8",children:[(0,a.jsxs)("div",{className:"relative overflow-hidden rounded-2xl bg-gradient-to-br from-blue-500 to-blue-600 p-4 text-white shadow-lg shadow-blue-500/20",children:[(0,a.jsx)("div",{className:"absolute top-0 right-0 w-16 h-16 bg-white/10 rounded-full -translate-y-4 translate-x-4"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("div",{className:"w-8 h-8 bg-white/20 backdrop-blur-sm rounded-lg flex items-center justify-center mb-2",children:(0,a.jsx)(o.A,{className:"w-4 h-4"})}),(0,a.jsx)("p",{className:"text-3xl font-black",children:Y||0}),(0,a.jsx)("p",{className:"text-xs text-blue-100 mt-0.5",children:"Bestellungen"})]})]}),(0,a.jsxs)("div",{className:"relative overflow-hidden rounded-2xl bg-gradient-to-br from-emerald-500 to-emerald-600 p-4 text-white shadow-lg shadow-emerald-500/20",children:[(0,a.jsx)("div",{className:"absolute top-0 right-0 w-16 h-16 bg-white/10 rounded-full -translate-y-4 translate-x-4"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("div",{className:"w-8 h-8 bg-white/20 backdrop-blur-sm rounded-lg flex items-center justify-center mb-2",children:(0,a.jsx)(d.A,{className:"w-4 h-4"})}),(0,a.jsx)("p",{className:"text-3xl font-black",children:Math.round(Number(null==X?void 0:X.total_spent)||0)}),(0,a.jsx)("p",{className:"text-xs text-emerald-100 mt-0.5",children:"CHF ausgegeben"})]})]}),(0,a.jsxs)("div",{className:"relative overflow-hidden rounded-2xl bg-gradient-to-br from-violet-500 to-violet-600 p-4 text-white shadow-lg shadow-violet-500/20",children:[(0,a.jsx)("div",{className:"absolute top-0 right-0 w-16 h-16 bg-white/10 rounded-full -translate-y-4 translate-x-4"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("div",{className:"w-8 h-8 bg-white/20 backdrop-blur-sm rounded-lg flex items-center justify-center mb-2",children:(0,a.jsx)(c.A,{className:"w-4 h-4"})}),(0,a.jsx)("p",{className:"text-sm font-black mt-1",children:(null==L?void 0:L.created_at)?new Date(L.created_at).toLocaleDateString("de-CH"):"-"}),(0,a.jsx)("p",{className:"text-xs text-violet-100 mt-0.5",children:"Mitglied seit"})]})]}),(0,a.jsxs)("div",{className:"relative overflow-hidden rounded-2xl bg-gradient-to-br from-amber-400 to-orange-500 p-4 text-white shadow-lg shadow-amber-500/20",children:[(0,a.jsx)("div",{className:"absolute top-0 right-0 w-16 h-16 bg-white/10 rounded-full -translate-y-4 translate-x-4"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("div",{className:"w-8 h-8 bg-white/20 backdrop-blur-sm rounded-lg flex items-center justify-center mb-2",children:(0,a.jsx)(m.A,{className:"w-4 h-4"})}),(0,a.jsx)("p",{className:"text-sm font-black mt-1",children:(null==X?void 0:X.last_order_date)?new Date(X.last_order_date).toLocaleDateString("de-CH"):"-"}),(0,a.jsx)("p",{className:"text-xs text-amber-100 mt-0.5",children:"Letzte Bestellung"})]})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[(0,a.jsxs)("div",{className:"lg:col-span-1 space-y-5",children:[(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-gray-100 shadow-sm overflow-hidden",children:[(0,a.jsxs)("div",{className:"px-5 py-4 bg-gradient-to-r from-gray-50/80 to-transparent border-b border-gray-100 flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-8 h-8 bg-blue-100 rounded-lg flex items-center justify-center",children:(0,a.jsx)(i.A,{className:"w-4 h-4 text-blue-600"})}),(0,a.jsx)("h3",{className:"font-bold text-gray-900 text-sm",children:"Pers\xf6nliche Daten"})]}),em?(0,a.jsxs)("div",{className:"flex gap-1.5",children:[(0,a.jsxs)(A.$,{onClick:e=>{e.preventDefault(),e.stopPropagation(),eH()},disabled:eg,size:"sm",type:"button",className:"rounded-lg text-xs h-8 px-3 bg-emerald-50 text-emerald-600 hover:bg-emerald-100 border-0 shadow-none",children:[(0,a.jsx)(h.A,{className:"w-3.5 h-3.5 mr-1"}),eg?"...":"Speichern"]}),(0,a.jsx)(A.$,{onClick:e=>{e.preventDefault(),e.stopPropagation(),eu(L||{}),ex(!1)},size:"sm",type:"button",className:"rounded-lg text-xs h-8 w-8 p-0 bg-gray-100 text-gray-500 hover:bg-gray-200 border-0 shadow-none",children:(0,a.jsx)(l.A,{className:"w-3.5 h-3.5"})})]}):(0,a.jsxs)(A.$,{onClick:e=>{e.preventDefault(),e.stopPropagation(),ex(!0)},size:"sm",type:"button",className:"rounded-lg text-xs h-8 px-3 bg-blue-50 text-blue-600 hover:bg-blue-100 border-0 shadow-none",children:[(0,a.jsx)(x.A,{className:"w-3.5 h-3.5 mr-1"}),"Bearbeiten"]})]}),(0,a.jsxs)("div",{className:"p-5 space-y-3",children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(z.J,{className:"text-xs text-gray-400 font-medium",children:"Vorname"}),em?(0,a.jsx)(E.p,{id:"firstName",value:eh.first_name||"",onChange:e=>eu(s=>({...s,first_name:e.target.value})),className:"bg-gray-50/80 border-gray-200 rounded-xl mt-1 focus:bg-white"}):(0,a.jsx)("p",{className:"text-sm font-medium text-gray-800 mt-1",children:null==L?void 0:L.first_name})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(z.J,{className:"text-xs text-gray-400 font-medium",children:"Nachname"}),em?(0,a.jsx)(E.p,{id:"lastName",value:eh.last_name||"",onChange:e=>eu(s=>({...s,last_name:e.target.value})),className:"bg-gray-50/80 border-gray-200 rounded-xl mt-1 focus:bg-white"}):(0,a.jsx)("p",{className:"text-sm font-medium text-gray-800 mt-1",children:null==L?void 0:L.last_name})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(z.J,{className:"text-xs text-gray-400 font-medium",children:"E-Mail"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,a.jsx)(u.A,{className:"w-3.5 h-3.5 text-gray-400"}),(0,a.jsx)("p",{className:"text-sm text-gray-600",children:null==L?void 0:L.email})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(z.J,{className:"text-xs text-gray-400 font-medium",children:"Telefon"}),em?(0,a.jsx)(E.p,{id:"phone",value:eh.phone||"",onChange:e=>eu(s=>({...s,phone:e.target.value})),className:"bg-gray-50/80 border-gray-200 rounded-xl mt-1 focus:bg-white",placeholder:"+41 XX XXX XX XX"}):(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,a.jsx)(g.A,{className:"w-3.5 h-3.5 text-gray-400"}),(0,a.jsx)("p",{className:"text-sm text-gray-800",children:(null==L?void 0:L.phone)||"-"})]})]})]})]}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-gray-100 shadow-sm overflow-hidden",children:[(0,a.jsx)("div",{className:"px-5 py-4 bg-gradient-to-r from-gray-50/80 to-transparent border-b border-gray-100",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-8 h-8 bg-emerald-100 rounded-lg flex items-center justify-center",children:(0,a.jsx)(p.A,{className:"w-4 h-4 text-emerald-600"})}),(0,a.jsx)("h3",{className:"font-bold text-gray-900 text-sm",children:"Adresse"})]})}),(0,a.jsxs)("div",{className:"p-5 space-y-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(z.J,{className:"text-xs text-gray-400 font-medium",children:"Strasse"}),em?(0,a.jsx)(E.p,{id:"address",value:eh.address||"",onChange:e=>eu(s=>({...s,address:e.target.value})),className:"bg-gray-50/80 border-gray-200 rounded-xl mt-1 focus:bg-white"}):(0,a.jsx)("p",{className:"text-sm font-medium text-gray-800 mt-1",children:(null==L?void 0:L.address)||"-"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(z.J,{className:"text-xs text-gray-400 font-medium",children:"PLZ"}),em?(0,a.jsx)(E.p,{id:"postalCode",value:eh.postal_code||"",onChange:e=>eu(s=>({...s,postal_code:e.target.value})),className:"bg-gray-50/80 border-gray-200 rounded-xl mt-1 focus:bg-white",placeholder:"1234"}):(0,a.jsx)("p",{className:"text-sm font-medium text-gray-800 mt-1",children:(null==L?void 0:L.postal_code)||"-"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(z.J,{className:"text-xs text-gray-400 font-medium",children:"Stadt"}),em?(0,a.jsx)(E.p,{id:"city",value:eh.city||"",onChange:e=>eu(s=>({...s,city:e.target.value})),className:"bg-gray-50/80 border-gray-200 rounded-xl mt-1 focus:bg-white"}):(0,a.jsx)("p",{className:"text-sm font-medium text-gray-800 mt-1",children:(null==L?void 0:L.city)||"-"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(z.J,{className:"text-xs text-gray-400 font-medium",children:"Kanton"}),em?(0,a.jsx)(E.p,{id:"canton",value:eh.canton||"",onChange:e=>eu(s=>({...s,canton:e.target.value})),className:"bg-gray-50/80 border-gray-200 rounded-xl mt-1 focus:bg-white",placeholder:"z.B. Z\xfcrich, Bern..."}):(0,a.jsx)("p",{className:"text-sm font-medium text-gray-800 mt-1",children:(null==L?void 0:L.canton)||"-"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(z.J,{className:"text-xs text-gray-400 font-medium",children:"Anmerkungen"}),em?(0,a.jsx)(R.T,{id:"notes",value:eh.notes||"",onChange:e=>eu(s=>({...s,notes:e.target.value})),className:"bg-gray-50/80 border-gray-200 rounded-xl mt-1 focus:bg-white",rows:2,placeholder:"Lieferhinweise..."}):(0,a.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:(null==L?void 0:L.notes)||"Keine"})]})]})]}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-gray-100 shadow-sm overflow-hidden",children:[(0,a.jsx)("div",{className:"px-5 py-4 bg-gradient-to-r from-emerald-50/60 to-transparent border-b border-gray-100",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-8 h-8 bg-emerald-100 rounded-lg flex items-center justify-center",children:(0,a.jsx)(b.A,{className:"w-4 h-4 text-emerald-600"})}),(0,a.jsx)("h3",{className:"font-bold text-gray-900 text-sm",children:"Sicherheit"})]})}),(0,a.jsx)("div",{className:"p-5",children:(0,a.jsxs)(A.$,{onClick:()=>{eS(!0),ek({currentPassword:"",newPassword:"",confirmPassword:""}),eE("")},className:"w-full bg-gradient-to-r from-[#2C5F2E] to-[#3a7a3d] hover:from-[#1A4520] hover:to-[#2C5F2E] text-white rounded-xl shadow-sm shadow-green-500/20",size:"sm",children:[(0,a.jsx)(b.A,{className:"w-4 h-4 mr-2"}),"Passwort \xe4ndern"]})})]}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-red-100 shadow-sm overflow-hidden",children:[(0,a.jsx)("div",{className:"px-5 py-4 bg-gradient-to-r from-red-50/60 to-transparent border-b border-red-100",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-8 h-8 bg-red-100 rounded-lg flex items-center justify-center",children:(0,a.jsx)(f.A,{className:"w-4 h-4 text-red-500"})}),(0,a.jsx)("h3",{className:"font-bold text-red-600 text-sm",children:"Gefahrenzone"})]})}),(0,a.jsxs)("div",{className:"p-5",children:[(0,a.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Das L\xf6schen ist unwiderruflich."}),(0,a.jsxs)(A.$,{onClick:()=>{ef(!0),ej(""),eC("")},variant:"destructive",className:"w-full bg-red-500 hover:bg-red-600 rounded-xl",size:"sm",children:[(0,a.jsx)(w.A,{className:"w-4 h-4 mr-2"}),"Konto l\xf6schen"]})]})]})]}),(0,a.jsx)("div",{className:"lg:col-span-2",children:(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-gray-100 shadow-sm overflow-hidden",children:[(0,a.jsxs)("div",{className:"px-5 py-4 bg-gradient-to-r from-gray-50/80 to-transparent border-b border-gray-100 flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-8 h-8 bg-indigo-100 rounded-lg flex items-center justify-center",children:(0,a.jsx)(j.A,{className:"w-4 h-4 text-indigo-600"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-bold text-gray-900 text-sm",children:"Meine Bestellungen"}),(0,a.jsxs)("p",{className:"text-[10px] text-gray-400",children:[Y," Gesamt"]})]})]}),(0,a.jsx)(A.$,{onClick:()=>{eD()},variant:"outline",size:"sm",disabled:O,className:"rounded-xl border-gray-200 text-gray-500 hover:bg-gray-50 h-8",children:(0,a.jsx)(v.A,{className:"w-3.5 h-3.5 ".concat(O?"animate-spin":"")})})]}),(0,a.jsxs)("div",{className:"p-5",children:[(0,a.jsx)("div
1",{className:"mb-5",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(N.A,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),(0,a.jsx)(E.p,{placeholder:"Bestellnummer oder Produkt suchen...",value:ea,onChange:e=>{er(e.target.value),U(1)},className:"pl-10 bg-gray-50/80 border-gray-200 rounded-xl h-10 focus:bg-white transition-colors"})]})}),O&&(0,a.jsx)("div",{className:"space-y-3",children:[0,1,2].map(e=>(0,a.jsx)("div",{className:"h-20 bg-gray-100 rounded-xl animate-pulse"},e))}),q&&(0,a.jsxs)("div",{className:"bg-red-50 border border-red-200 rounded-xl p-4 mb-4 flex items-center gap-3",children:[(0,a.jsx)(f.A,{className:"w-5 h-5 text-red-500 shrink-0"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-red-700 font-medium text-sm",children:"Fehler beim Laden"}),(0,a.jsx)("p",{className:"text-red-500 text-xs mt-0.5",children:q})]})]}),!O&&!q&&(0,a.jsx)(a.Fragment,{children:W.length>0?(0,a.jsxs)("div",{className:"space-y-3",children:[W.map(e=>(0,a.jsx)("div",{className:"rounded-xl border border-gray-100 bg-white hover:shadow-md transition-shadow overflow-hidden",children:(0,a.jsxs)("div",{className:"p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-9 h-9 rounded-lg flex items-center justify-center ".concat("completed"===e.status?"bg-emerald-100 text-emerald-600":"processing"===e.status?"bg-blue-100 text-blue-600":"cancelled"===e.status?"bg-red-100 text-red-600":"bg-amber-100 text-amber-600"),children:"completed"===e.status?(0,a.jsx)(y.A,{className:"w-4 h-4"}):"processing"===e.status?(0,a.jsx)(C.A,{className:"w-4 h-4"}):"cancelled"===e.status?(0,a.jsx)(l.A,{className:"w-4 h-4"}):(0,a.jsx)(m.A,{className:"w-4 h-4"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"font-bold text-sm text-gray-900",children:e.order_number}),(0,a.jsx)("p",{className:"text-[10px] text-gray-400",children:eX(e.created_at)})]})]}),(0,a.jsxs)("div",{className:"text-right",children:[(0,a.jsxs)("p",{className:"font-black text-base text-gray-900",children:[(Number(e.total_amount)||0).toFixed(2)," ",(0,a.jsx)("span",{className:"text-xs text-gray-400 font-medium",children:"CHF"})]}),(0,a.jsxs)("p",{className:"text-[10px] text-gray-400",children:[e.items_count," Artikel"]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-wrap mb-3",children:[(0,a.jsx)("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold px-2 py-0.5 rounded-md ".concat("completed"===e.status?"bg-emerald-50 text-emerald-600":"processing"===e.status?"bg-blue-50 text-blue-600":"cancelled"===e.status?"bg-red-50 text-red-600":"bg-amber-50 text-amber-600"),children:(e=>{switch(e){case"completed":return"Abgeschlossen";case"pending":return"Ausstehend";case"processing":return"In Bearbeitung";case"cancelled":return"Storniert";default:return e}})(e.status)}),(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold px-2 py-0.5 rounded-md ".concat("completed"===e.payment_status?"bg-emerald-50 text-emerald-600 ring-1 ring-emerald-200":"failed"===e.payment_status?"bg-red-50 text-red-600 ring-1 ring-red-200":"bg-amber-50 text-amber-600 ring-1 ring-amber-200"),children:[(0,a.jsx)(P.A,{className:"w-2.5 h-2.5"}),"completed"===e.payment_status?"Bezahlt":"failed"===e.payment_status?"Fehlgeschlagen":"Ausstehend"]}),(0,a.jsx)("span",{className:"text-[10px] text-gray-400",children:e.payment_method})]}),eI(e.customer_notes||"")&&(0,a.jsx)("p",{className:"text-xs text-gray-500 bg-gray-50 rounded-lg px-3 py-2 mb-3",children:eI(e.customer_notes||"")}),(0,a.jsxs)("div",{className:"flex items-center gap-2 pt-3 border-t border-gray-50",children:[(0,a.jsxs)(A.$,{onClick:()=>{var s;return s=e.id,void en(e=>({...e,[s]:!e[s]}))},size:"sm",className:"rounded-lg text-xs h-8 px-3 bg-blue-50 text-blue-600 hover:bg-blue-100 border-0 shadow-none",children:[(0,a.jsx)(S.A,{className:"w-3.5 h-3.5 mr-1.5"}),el[e.id]?"Ausblenden":"Artikel"]}),(0,a.jsxs)(A.$,{onClick:()=>eJ(e),size:"sm",className:"rounded-lg text-xs h-8 px-3 bg-emerald-50 text-emerald-600 hover:bg-emerald-100 border-0 shadow-none",children:[(0,a.jsx)(F.A,{className:"w-3.5 h-3.5 mr-1.5"}),"PDF"]})]}),el[e.id]&&e.items&&e.items.length>0&&(0,a.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-50 space-y-2",children:e.items.map((e,s)=>(0,a.jsxs)("div",{className:"flex items-center justify-between bg-gray-50/80 rounded-lg px-3 py-2",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"text-xs font-semibold text-gray-800 truncate",children:e.product_name}),(0,a.jsxs)("p",{className:"text-[10px] text-gray-400",children:[e.quantity,"x ",(Number(e.price)||0).toFixed(2)," CHF"]})]}),(0,a.jsxs)("p",{className:"text-xs font-bold text-gray-900 ml-3",children:[(Number(e.subtotal)||0).toFixed(2)," CHF"]})]},s))})]})},e.id)),V>1&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-4",children:[(0,a.jsxs)("p",{className:"text-xs text-gray-400",children:["Seite ",K,"/",V]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(A.$,{onClick:()=>eM(K-1),disabled:K<=1,variant:"outline",size:"sm",className:"rounded-xl h-8 border-gray-200",children:(0,a.jsx)(k.A,{className:"w-4 h-4"})}),(0,a.jsx)("span",{className:"text-xs font-semibold text-gray-700 bg-gray-100 px-3 py-1 rounded-lg",children:K}),(0,a.jsx)(A.$,{onClick:()=>eM(K+1),disabled:K>=V,variant:"outline",size:"sm",className:"rounded-xl h-8 border-gray-200",children:(0,a.jsx)(_.A,{className:"w-4 h-4"})})]})]})]}):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-12",children:[(0,a.jsx)("div",{className:"w-14 h-14 bg-gray-100 rounded-2xl flex items-center justify-center mb-3",children:(0,a.jsx)(j.A,{className:"w-7 h-7 text-gray-300"})}),(0,a.jsx)("p",{className:"text-gray-500 font-medium text-sm",children:"Keine Bestellungen"}),ea||es?(0,a.jsx)(A.$,{onClick:()=>{er(""),et(""),U(1)},variant:"ghost",size:"sm",className:"mt-2 text-xs text-gray-400 hover:text-gray-600",children:"Filter zur\xfccksetzen"}):(0,a.jsx)("p",{className:"text-gray-400 text-xs mt-1",children:"Noch keine Bestellungen aufgegeben"})]})})]})]})})]})]})})})]}),eb&&(0,a.jsx)(D.lG,{open:eb,onOpenChange:ef,children:(0,a.jsxs)(D.Cf,{className:"sm:max-w-md bg-white mx-4 max-w-[calc(100vw-2rem)]",children:[(0,a.jsxs)(D.c7,{children:[(0,a.jsxs)(D.L3,{className:"flex items-center text-red-600",children:[(0,a.jsx)(f.A,{className:"w-5 h-5 mr-2"}),"Konto l\xf6schen"]}),(0,a.jsx)(D.rr,{children:"Diese Aktion kann nicht r\xfcckg\xe4ngig gemacht werden. Ihr Konto und alle damit verbundenen Daten werden permanent gel\xf6scht."})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)(I,{children:[(0,a.jsx)(f.A,{className:"h-4 w-4"}),(0,a.jsx)(J,{children:(0,a.jsxs)("ul",{className:"list-disc list-inside mt-2 text-sm",children:[(0,a.jsx)("li",{children:"Ihr Benutzerkonto und Profil"}),(0,a.jsx)("li",{children:"Alle Bestellungen und Bestellhistorie"}),(0,a.jsx)("li",{children:"Warenkorb und Favoriten"}),(0,a.jsx)("li",{children:"Alle Sitzungen und Anmeldedaten"})]})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(z.J,{htmlFor:"deletePassword",children:"Passwort zur Best\xe4tigung"}),(0,a.jsx)(E.p,{id:"deletePassword",type:"password",value:ew,onChange:e=>ej(e.target.value),placeholder:"Geben Sie Ihr Passwort ein",className:"bg-white"}),ey&&(0,a.jsx)("p",{className:"text-sm text-red-600 mt-1",children:ey})]})]}),(0,a.jsxs)(D.Es,{className:"flex-col sm:flex-row gap-2",children:[(0,a.jsx)(A.$,{onClick:()=>{ef(!1),ej(""),eC("")},variant:"outline",className:"w-full sm:w-auto",children:"Abbrechen"}),(0,a.jsxs)(A.$,{onClick:eL,disabled:ev||!ew.trim(),variant:"destructive",className:"w-full sm:w-auto bg-red-600 hover:bg-red-700",children:[(0,a.jsx)(w.A,{className:"w-4 h-4 mr-2"}),ev?"L\xf6sche Konto...":"Konto endg\xfcltig l\xf6schen"]})]})]})}),eP&&(0,a.jsx)(D.lG,{open:eP,onOpenChange:eS,children:(0,a.jsxs)(D.Cf,{className:"sm:max-w-md bg-white mx-4 max-w-[calc(100vw-2rem)]",children:[(0,a.jsxs)(D.c7,{children:[(0,a.jsxs)(D.L3,{className:"flex items-center text-[#2C5F2E]",children:[(0,a.jsx)(b.A,{className:"w-5 h-5 mr-2"}),"Passwort \xe4ndern"]}),(0,a.jsx)(D.rr,{children:"Geben Sie Ihr aktuelles Passwort ein und w\xe4hlen Sie ein neues sicheres Passwort."})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(z.J,{htmlFor:"currentPassword",children:"Aktuelles Passwort"}),(0,a.jsx)(E.p,{id:"currentPassword",type:"password",value:eF.currentPassword,onChange:e=>ek(s=>({...s,currentPassword:e.target.value})),placeholder:"Ihr aktuelles Passwort",className:"bg-white"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(z.J,{htmlFor:"newPassword",children:"Neues Passwort"}),(0,a.jsx)(E.p,{id:"newPassword",type:"password",value:eF.newPassword,onChange:e=>ek(s=>({...s,newPassword:e.target.value})),placeholder:"Mindestens 8 Zeichen",className:"bg-white"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(z.J,{htmlFor:"confirmNewPassword",children:"Neues Passwort best\xe4tigen"}),(0,a.jsx)(E.p,{id:"confirmNewPassword",type:"password",value:eF.confirmPassword,onChange:e=>ek(s=>({...s,confirmPassword:e.target.value})),placeholder:"Neues Passwort wiederholen",className:"bg-white"})]}),eT&&(0,a.jsxs)(I,{children:[(0,a.jsx)(f.A,{className:"h-4 w-4"}),(0,a.jsx)(J,{className:"text-red-600",children:eT})]}),(0,a.jsxs)(I,{children:[(0,a.jsx)(b.A,{className:"h-4 w-4"}),(0,a.jsxs)(J,{children:[(0,a.jsx)("strong",{children:"Passwort-Anforderungen:"}),(0,a.jsxs)("ul",{className:"list-disc list-inside mt-2 text-sm",children:[(0,a.jsx)("li",{children:"Mindestens 8 Zeichen lang"}),(0,a.jsx)("li",{children:"Unterschiedlich vom aktuellen Passwort"}),(0,a.jsx)("li",{children:"Verwenden Sie eine Kombination aus Buchstaben, Zahlen und Symbolen"})]})]})]})]}),(0,a.jsxs)(D.Es,{className:"flex-col sm:flex-row gap-2",children:[(0,a.jsx)(A.$,{onClick:()=>{eS(!1),ek({currentPassword:"",newPassword:"",confirmPassword:""}),eE("")},variant:"outline",className:"w-full sm:w-auto",children:"Abbrechen"}),(0,a.jsxs)(A.$,{onClick:eB,disabled:e_||!eF.currentPassword.trim()||!eF.newPassword.trim(),className:"w-full sm:w-auto bg-[#2C5F2E] hover:bg-[#1A4520]",children:[(0,a.jsx)(b.A,{className:"w-4 h-4 mr-2"}),e_?"\xc4ndere Passwort...":"Passwort \xe4ndern"]})]})]})})]})}
1J.displayName="AlertDescription"},61855:(e,s,t)=>{t.d(s,{T:()=>n});var a=t(20136),r=t(72004),l=t(56230);let n=r.forwardRef((e,s)=>{let{className:t,...r}=e;return(0,a.jsx)("textarea",{className:(0,l.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:s,...r})});n.displayName="Textarea"}}]);

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.