PageSourceSearch

https://bmag.com.tr/_nuxt/adresler-Cvb7H-L6.js

js bmag.com.tr collected 2026-10-01 14:49:50 UTC 27,661 bytes, 1 lines download raw bytes

1import{H as Ve,T as Ke}from"./components-pqB9nbVt.js";import{l as Be,k as je,i as Ne}from"./DbQUaUTo.js";import{cj as De,o as Le,w as Fe,V as n,c4 as V,c5 as N,c6 as t,I as l,K as E,bY as p,c7 as a,n as w,c9 as u,c0 as g,cb as K,cs as v,cA as C,cB as X,ca as Se,T as Ue,cl as $e,r as z,B as He,c as x,c3 as o,cC as Ie,g as Z}from"./vendor-prime-CYPK8aUb.js";import{u as Oe}from"./useAddress-BrvJ1sYg.js";import{_ as Ee}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./vendor-http-DzSLJI0S.js";import"./address-service-qJdQOh5p.js";const Ye={class:"block md:hidden mb-5"},Re={key:0,class:"adresler-header rounded-xl mb-4 overflow-hidden"},qe={key:1,class:"text-sm text-neutral-400 mb-8 leading-relaxed max-w-2xl"},Pe={key:2,class:"bg-blue-500/10 border border-blue-500/20 rounded-xl p-4 mb-6"},We={key:3,class:"bg-red-500/10 border border-red-500/20 rounded-xl p-4 mb-6"},Ge={class:"text-red-400"},Je={key:4,class:"flex flex-col justify-center items-center py-16 gap-4"},Qe={class:"flex items-center justify-between gap-3 border-b border-white/10 px-4 py-3 md:px-5 md:py-3.5"},Xe={class:"min-w-0 pr-2"},Ze={class:"text-base font-semibold leading-tight text-white md:text-lg"},et={class:"mt-0.5 text-xs text-white/70 md:text-sm"},tt={class:"space-y-6 p-4 md:space-y-8 md:p-5"},st={key:0,class:"space-y-3"},it={class:"flex items-center gap-2.5"},lt={class:"adresler-step"},rt={class:"sm:pl-9",role:"radiogroup","aria-label":"Adres kullanımı"},ot={class:"flex flex-col gap-1 rounded-xl border border-neutral-700 bg-neutral-900/50 p-1 sm:flex-row"},nt=["aria-checked"],dt=["aria-checked"],at=["aria-checked"],ut={key:1,class:"space-y-3"},ct={class:"flex items-center gap-2.5"},pt={class:"adresler-step"},mt={class:"sm:pl-9",role:"radiogroup","aria-label":"Fatura kimin adına"},xt={class:"flex flex-col gap-1 rounded-xl border border-neutral-700 bg-neutral-900/50 p-1 sm:flex-row"},bt=["aria-checked","onClick"],ht={class:"block text-sm font-semibold"},ft={class:"mt-0.5 block text-[11px] opacity-80"},vt={key:0,class:"space-y-4 sm:ml-9 sm:pl-6 sm:border-l sm:border-white/10"},wt={class:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-4"},gt={class:"min-w-0"},kt={class:"min-w-0"},yt={class:"min-w-0"},_t=["value"],At={class:"min-w-0"},Ct={class:"space-y-4"},zt={class:"flex items-center gap-2.5"},Tt={class:"adresler-step"},Mt={class:"space-y-4 sm:pl-9"},Vt={key:0},Kt=["value"],Bt=["disabled"],jt={value:""},Nt=["value"],Dt={class:"flex flex-wrap gap-3 px-5 md:px-6 py-4 bg-white/[0.02] border-t border-white/10"},Lt=["disabled"],Ft={key:0,class:"flex items-center gap-2"},St={key:1},Ut={key:6,class:"space-y-10"},$t={key:0,class:"adresler-card rounded-2xl p-10 md:p-14 text-center"},Ht={class:"flex flex-wrap items-start gap-x-3 gap-y-2 pb-3 border-b border-white/10"},It={class:"flex h-9 w-9 items-center justify-center rounded-lg bg-white/10 text-white shrink-0"},Ot={key:0,class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Et={key:1,class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Yt={key:2,class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Rt={class:"min-w-0 flex-1"},qt={class:"text-base md:text-lg font-semibold text-white"},Pt={class:"text-xs text-neutral-400 mt-0.5"},Wt=["onClick"],Gt={class:"grid gap-4 sm:grid-cols-2 xl:grid-cols-3 items-stretch"},Jt={class:"flex flex-col gap-1.5 min-w-0"},Qt={class:"flex items-start justify-between gap-2 min-w-0"},Xt={class:"text-sm font-semibold text-white break-words leading-snug min-w-0 flex-1"},Zt={key:0,class:"shrink-0 text-[11px] font-medium text-white whitespace-nowrap flex items-center gap-1"},es=["onClick"],ts={class:"text-sm text-white break-words leading-snug"},ss={class:"flex items-center gap-1.5 text-xs text-white"},is={key:0,class:"text-xs text-white"},ls={class:"mt-3 pt-3 border-t border-white/10 flex flex-wrap items-center gap-2"},rs=["onClick"],os=["onClick"],ns={key:0,class:"fixed inset-0 z-[100] flex items-center justify-center p-4",role:"dialog","aria-modal":"true","aria-labelledby":"delete-modal-title"},ds={class:"adresler-card relative w-full max-w-md rounded-2xl p-6 shadow-2xl"},as={class:"flex gap-3 justify-end"}
1,us=["disabled"],cs=["disabled"],ps={key:0,class:"flex items-center gap-2"},ms={key:1},xs={__name:"adresler",setup(bs){const D=De(),{isLoading:B,error:Y,cities:ee,towns:te,userAddresses:k,clearError:R,loadCities:se,loadTowns:q,clearTowns:ie,createAddress:le,updateAddress:re,deleteAddress:oe,loadUserAddresses:ne,loadUserAddressById:de,setDefaultAddress:ae,getCityName:ue,getTownName:ce}=Oe(),h=z(!1),T=z(!1),f=z(null),s=He({title:"",city_id:null,town_id:null,address:"",postcode:"",type:"billing",same:!0,addressKind:"individual",invoiceTitle:"",taxNumber:"",taxOffice:""}),M=x(()=>s.type==="billing"||s.same===!0),L=x(()=>s.city_id&&s.town_id&&s.address.trim()&&s.postcode.trim()?M.value&&s.addressKind==="corporate"?!!s.invoiceTitle?.trim()&&!!s.taxNumber?.trim():!0:!1),F=x(()=>!!f.value),S=x(()=>{let i=0;const e={usage:null,invoice:null,address:null};return F.value||(e.usage=++i),M.value&&(e.invoice=++i),e.address=++i,e}),U=i=>{i==="both"?(s.same=!0,s.type="billing",s.addressKind="individual"):i==="billing"?(s.same=!1,s.type="billing",s.addressKind="corporate"):(s.same=!1,s.type="shipping")},y=x(()=>s.same?"both":s.type==="shipping"?"shipping":"billing"),pe=x(()=>s.type==="billing"&&!s.same),me=x(()=>{const i={kind:"corporate",title:"Şirket / Kurum adına",subtitle:"Firma adı ve vergi no gerekir"},e={kind:"individual",title:"Bireysel fatura",subtitle:"Bireysel alışverişler için"};return pe.value?[i,e]:[e,i]}),xe=i=>["flex-1 rounded-lg px-3 py-3 text-left transition-colors sm:text-center",s.addressKind===i?"bg-white text-black":"text-white/80 hover:text-white"];Le(async()=>{await Promise.all([se(),ne()]),T.value=!0}),Fe(()=>s.city_id,(i,e)=>{i!==e&&(s.town_id=null,ie(),i&&q(i))});const j=()=>{s.title="",s.city_id=null,s.town_id=null,s.address="",s.postcode="",s.type="billing",s.same=!0,s.addressKind="individual",s.invoiceTitle="",s.taxNumber="",s.taxOffice="",h.value=!1,f.value=null,R()},P=Be(),be=je(),$=z(null),W=i=>{j(),i==="shipping"?(s.same=!1,s.type="shipping"):i==="billing"&&(s.same=!1,s.type="billing",s.addressKind="corporate"),h.value=!0,typeof window<"u"&&window.innerWidth<768&&(i==="shipping"||i==="billing")&&Z(()=>{$.value?.scrollIntoView({behavior:"smooth",block:"start"})})},he=i=>{s.taxNumber=String(i.target?.value??"").replace(/\D/g,"").slice(0,11)},fe=async()=>{if(L.value){R();try{const i={city_id:s.city_id,town_id:s.town_id,address:s.address.trim(),postcode:s.postcode.trim(),type:s.type,same:s.same},e=s.title?.trim();if(e&&(i.title=e),(s.type==="billing"||s.same===!0)&&s.addressKind==="corporate"){i.address_type="corporate",i.company_name=s.invoiceTitle?.trim()||"",i.tax_number=s.taxNumber?.trim()||"";const m=s.taxOffice?.trim();m&&(i.tax_office=m)}else i.address_type="individual";let b;if(f.value){const m={...i};delete m.same,b=await re(f.value.id,m)}else b=await le(i);if(b.success){j();const m=P.query.returnUrl;m&&be.push(m)}}catch(i){console.error("Save address error:",i)}}},ve=async i=>{f.value={id:i.id};const e=await de(i.id);if(!e?.success||!e?.data)return;const d=e.data;f.value=d,s.title=(d.title||"").trim(),s.city_id=d.city_id,s.address=d.address,s.postcode=d.postcode,s.type=d.type==="delivery"?"shipping":d.type==="invoice"?"billing":d.type||"billing",s.same=d.same==="yes"||d.same===!0||!1,s.addressKind=d.address_type==="corporate"?"corporate":"individual",s.invoiceTitle=(d.company_name||"").trim(),s.taxNumber=d.tax_number||"",s.taxOffice=d.tax_office||"",s.town_id=null,d.city_id&&(await q(d.city_id),s.town_id=d.town_id),h.value=!0,typeof window<"u"&&window.innerWidth<768&&Z(()=>{$.value?.scrollIntoView({behavior:"smooth",block:"start"})})},_=z(null),A=z(!1),we=i=>{_.value=i},G=()=>{A.value||(_.value=null)},ge=async()=>{if(!_.value)return;A.value=!0;const i=_.value.id,e=await oe(i);A.value=!1,_.value=null,e?.success&&D.add({severity:"success",summary:"Silindi",detail:"Adres başarıyla silindi.",life:3e3})},ke=async(i,e)=>{const d=await ae(i,e);d?.success?D.add({severity:"success",summary:"Yapıldı",detail:"Varsayılan adres güncellendi.",life:3e3}):D.add({severity:"error",summary:"Hata",detail:d?.error||"Varsayılan adres güncellenemedi.",life:4e3})},ye=i=>i==="shipping"||i==="delivery"?"Teslimat":"Fatura",_e=i=>i?.address_type==="corporate"||!!i?.company_name?.trim(),Ae=i=>{const e=i?.title?.trim();if(e)return e;const d=i?.company_name?.trim();return d||ye(i?.type)},Ce=i=>{const e=i.city?.name||ue(i.city_id)||"",m=[i.town?.name||ce(i.town_id)||"",e].filter(
1Boolean).join(", ");return i.postcode?`${m} · ${i.postcode}`:m},H=i=>[...i].sort((e,d)=>(d.is_default?1:0)-(e.is_default?1:0)),I=x(()=>H(k.value.filter(i=>i.type==="shipping"||i.type==="delivery"))),O=x(()=>H(k.value.filter(i=>i.type==="billing"||i.type==="invoice"))),ze=x(()=>H(k.value)),J=(i,e)=>{if(!i?.is_default||!e?.length)return!1;const d=e.findIndex(b=>b.is_default);return d>=0&&e[d].id===i.id},Te=x(()=>{const i=[];return I.value.length>0&&i.push({key:"shipping",title:"Teslimat Adreslerim",subtitle:"Fiziksel ürün siparişleriniz bu adrese gönderilir.",icon:"shipping",addresses:I.value,addType:"shipping",addLabel:"Yeni teslimat ekle"}),O.value.length>0&&i.push({key:"billing",title:"Fatura Adreslerim",subtitle:"Faturalarınız bu bilgilere göre kesilir. Kurumsal müşterilerimize e-fatura düzenlenir.",icon:"billing",addresses:O.value,addType:"billing",addLabel:"Yeni fatura ekle"}),k.value.length>0&&I.value.length===0&&O.value.length===0&&i.push({key:"all",title:"Kayıtlı Adreslerim",subtitle:"Kayıtlı adreslerinizi buradan yönetebilirsiniz.",icon:"location",addresses:ze.value,addType:void 0,addLabel:"Yeni adres ekle"}),i});return(i,e)=>{const d=Ke,b=Ve,m=Ie,Me=Ne;return o(),n(g,null,[V(b,null,{default:N(()=>[V(d,null,{default:N(()=>[...e[12]||(e[12]=[u("Adreslerim",-1)])]),_:1})]),_:1}),V(m),t("div",Ye,[V(Me,{href:"/hesap",class:"inline-flex items-center gap-2 text-neutral-400 hover:text-white transition-colors text-sm"},{default:N(()=>[...e[13]||(e[13]=[t("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"M15 18L9 12L15 6"})],-1),t("span",null,"Hesabım",-1)])]),_:1})]),l(h)?p("",!0):(o(),n("div",Re,[...e[14]||(e[14]=[E('<div class="px-4 py-3 md:px-5 md:py-3.5 flex flex-wrap items-center gap-3" data-v-3df5ed51><div class="flex items-center gap-2.5" data-v-3df5ed51><div class="flex h-9 w-9 items-center justify-center rounded-lg bg-white/10 text-white shrink-0" data-v-3df5ed51><svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-3df5ed51><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" data-v-3df5ed51></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M15 11a3 3 0 11-6 0 3 3 0 016 0z" data-v-3df5ed51></path></svg></div><div data-v-3df5ed51><h1 class="text-lg md:text-xl font-bold text-white tracking-tight" data-v-3df5ed51>Adreslerim</h1><p class="text-xs text-neutral-400 mt-0.5 hidden sm:block" data-v-3df5ed51>Teslimat ve fatura adreslerinizi yönetin</p></div></div></div>',1)])])),!l(h)&&l(T)&&l(k).length>0?(o(),n("p",qe," Varsayılan olarak işaretlediğiniz adres, ödeme sırasında otomatik seçilir. ")):p("",!0),l(P).query.returnUrl?(o(),n("div",Pe,[...e[15]||(e[15]=[E('<div class="flex items-start gap-3" data-v-3df5ed51><svg class="w-5 h-5 text-blue-400 flex-shrink-0 mt-0.5" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-3df5ed51><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" data-v-3df5ed51></path></svg><div class="text-sm text-blue-300" data-v-3df5ed51><p class="font-semibold mb-1" data-v-3df5ed51>Adres Eklemeniz Gerekiyor</p><p class="text-blue-300/80" data-v-3df5ed51>Ödeme işlemine devam edebilmek için önce bir adres eklemelisiniz. Adres ekledikten s
1onra otomatik olarak ödeme sayfasına yönlendirileceksiniz.</p></div></div>',1)])])):p("",!0),l(Y)?(o(),n("div",We,[t("p",Ge,a(l(Y)),1)])):p("",!0),!l(T)&&!l(h)?(o(),n("div",Je,[...e[16]||(e[16]=[t("div",{class:"adresler-spinner h-10 w-10 rounded-full border-2 border-neutral-700 border-t-white"},null,-1),t("p",{class:"text-sm text-neutral-500"},"Adresler yükleniyor...",-1)])])):p("",!0),l(h)?(o(),n("div",{key:5,ref_key:"addressFormRef",ref:$,class:"adresler-card rounded-2xl mb-8 overflow-hidden"},[t("div",Qe,[t("div",Xe,[t("h2",Ze,a(l(f)?"Adresi Düzenle":"Yeni Adres Ekle"),1),t("p",et,a(l(f)?"Bilgilerinizi güncelleyip kaydedin.":"Aşağıdaki adımları sırayla doldurun."),1)]),t("button",{onClick:j,class:"shrink-0 rounded-lg p-1.5 text-neutral-400 transition-colors hover:bg-white/10 hover:text-white","aria-label":"Kapat"},[...e[17]||(e[17]=[t("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"M18 6L6 18M6 6L18 18"})],-1)])])]),t("div",tt,[l(F)?p("",!0):(o(),n("section",st,[t("div",it,[t("span",lt,a(l(S).usage),1),e[18]||(e[18]=t("h3",{class:"text-sm font-semibold text-white"},"Bu adres nerede kullanılacak?",-1))]),t("div",rt,[t("div",ot,[t("button",{type:"button",role:"radio","aria-checked":l(y)==="both",class:w(["flex-1 rounded-lg px-3 py-3 text-left transition-colors sm:text-center",l(y)==="both"?"bg-white text-black":"text-white/80 hover:text-white"]),onClick:e[0]||(e[0]=r=>U("both"))},[...e[19]||(e[19]=[t("span",{class:"block text-sm font-semibold"},"Her ikisi için",-1),t("span",{class:"mt-0.5 block text-[11px] opacity-80"},"Teslimat + fatura",-1)])],10,nt),t("button",{type:"button",role:"radio","aria-checked":l(y)==="billing",class:w(["flex-1 rounded-lg px-3 py-3 text-left transition-colors sm:text-center",l(y)==="billing"?"bg-white text-black":"text-white/80 hover:text-white"]),onClick:e[1]||(e[1]=r=>U("billing"))},[...e[20]||(e[20]=[t("span",{class:"block text-sm font-semibold"},"Sadece fatura",-1),t("span",{class:"mt-0.5 block text-[11px] opacity-80"},"Fatura adresi",-1)])],10,dt),t("button",{type:"button",role:"radio","aria-checked":l(y)==="shipping",class:w(["flex-1 rounded-lg px-3 py-3 text-left transition-colors sm:text-center",l(y)==="shipping"?"bg-white text-black":"text-white/80 hover:text-white"]),onClick:e[2]||(e[2]=r=>U("shipping"))},[...e[21]||(e[21]=[t("span",{class:"block text-sm font-semibold"},"Sadece teslimat",-1),t("span",{class:"mt-0.5 block text-[11px] opacity-80"},"Kargo adresi",-1)])],10,at)]),e[22]||(e[22]=t("p",{class:"mt-2 text-xs text-white/60"},[u("Çoğu kullanıcı "),t("span",{class:"text-white/85"},"Her ikisi için"),u(" seçeneğini kullanır.")],-1))])])),l(M)?(o(),n("section",ut,[t("div",ct,[t("span",pt,a(l(S).invoice),1),e[23]||(e[23]=t("h3",{class:"text-sm font-semibold text-white"},"Fatura kimin adına kesilsin?",-1))]),e[29]||(e[29]=t("p",{class:"text-xs text-white/70 sm:pl-9"},[u(" Şirket adına alışveriş yapıyorsanız "),t("strong",{class:"font-semibold text-white"},"Şirket adına"),u(" seçin. ")],-1)),t("div",mt,[t("div",xt,[(o(!0),n(g,null,K(l(me),r=>(o(),n("button",{key:r.kind,type:"button",role:"radio","aria-checked":l(s).addressKind===r.kind,class:w(xe(r.kind)),onClick:c=>l(s).addressKind=r.kind},[t("span",ht,a(r.title),1),t("span",ft,a(r.subtitle),1)],10,bt))),128))])]),l(s).addressKind==="corporate"?(o(),n("div",vt,[e[28]||(e[28]=t("p",{class:"text-sm font-semibold text-white"},"Şirket bilgileri",-1)),t("div",wt,[t("div",gt,[e[24]||(e[24]=t("label",{class:"mb-1.5 block text-xs font-medium text-white"},[u("Adres adı "),t("span",{class:"text-white/50"},"(isteğe bağlı)")],-1)),v(t("input",{"onUpdate:modelValue":e[3]||(e[3]=r=>l(s).title=r),type:"text",placeholder:"Örn. Ofis",maxlength:"100",class:"adresler-input h-11 w-full rounded-lg border border-neutral-700 bg-neutral-900/50 px-3 text-sm text-white placeholder:text-white/45 focus:border-neutral-500 focus:outline-none focus:ring-2 focus:ring-white/10"},null,512),[[C,l(s).title]])]),t("div",kt,[e[25]||(e[25]=t("label",{class:"mb-1.5 block text-xs font-medium text-white"},[u("Firma adı "),t("span",{class:"text-white"},"*")],-1)),v(t("input",{"onUpdate:modelValue":e[4]||(e[4]=r=>l(s).invoiceTitle=r),type:"text",placeholder:"Firma adı",maxlength:"200",class:"adresler-input h-11 w-full rounded-lg border border-neutral-700 bg-neutral-900/50 px-3 text-sm text-white placeholder:text-white/45 focus:border-neutral-500 focus:outline-none focus:ring-2 focus:ring-white/10"},null,512),[[C,l(s).invoiceTitle]])]),t("div",yt,[e[26]||(e[26]=t("label",{class:"mb-1.5 block text-xs font-medium text-white"},[u("Vergi numarası "),t("span",{class:"text-white"},"*")],-1)),t("input",{value:l(s).taxNumber,type:"text",inputmode:"numeric",autocomplete:"off",placeholder:"10 haneli",maxlength:"11",class:"adresler-input h-11 w-full rounded-lg border border-neutral-700 bg-neutral-900/50 px-3 text-sm text-white placeholder:text-white/45 focus:border-neutral-500 focus:outline-none focus:ring-2 focus:ring-white/10",onInput:he},null,40,_t)]),t("div",At,[e[27]||(e[27]=t("label",{class:"mb-1.5 block text-xs font-medium text-white"},[u("Vergi dairesi "),t("span",{class:"text-white/50"},"(ops.)")],-1)),v(t("input",{"onUpdate:modelValue":e[5]||(e[5]=r=>l(s).taxOffice=r),type:"text",placeholder:"Örn. Üsküdar",maxlength:"100",class:"adresler-input h-11 w-full rounded-lg border border-neutral-700 bg-neutral-900/50 px-3 text-sm text-white placeholder:text-white/45 focus:border-neutral-500 focus:outline-none focus:ring-2 focus:ring-white/10"},null,512),[[C,l(s).taxOffice]])])])])):p("",!0)])):p("",!0),t("section",Ct,[t("div",zt,[t("span",Tt,a(l(S).address),1),e[30]||(e[30]=t("h3",{class:"text-sm font-semibold text-white"},"Adres bilgileri",-1))]),t("div",Mt,[t("div",{class:w(["grid grid-cols-1 gap-4 sm:grid-cols-2",l(M)&&l(s).addressKind==="corporate"?"md:grid-cols-3":"md:grid-cols-4"])},[l(M)&&l(s).addressKind==="corporate"?p("",!0):(o(),n("div",Vt,[e[31]||(e[31]=t("label",{class:"mb-1.5 block text-xs font-medium text-white"},[u("Adres adı "),t("span",{class:"text-white/50"},"(isteğe bağlı)")],-1)),v(t("input",{"onUpdate:modelValue":e[6]||(e[6]=r=>l(s).title=r),type:"text",placeholder:"Örn. Ev, İş",maxlength:"100",class:"adresler-input h-11 w-full rounded-lg border border-neutral-700 bg-neutral-900/50 px-3 text-sm text-white placeholder:text-white/45 focus:border-neutral-500 focus:outline-none focus:ring-2 focus:ring-white/10"},null,512),[[C,l(s).title]])])),t("div",null,[e[33]||(e[33]=t("label",{class:"mb-1.5 block text-xs font-medium text-white"},[u("İl "),t("span",{class:"text-white"}
1,"*")],-1)),v(t("select",{"onUpdate:modelValue":e[7]||(e[7]=r=>l(s).city_id=r),class:"adresler-input h-11 w-full rounded-lg border border-neutral-700 bg-neutral-900/50 px-3 text-sm text-white focus:border-neutral-500 focus:outline-none focus:ring-2 focus:ring-white/10"},[e[32]||(e[32]=t("option",{value:""},"İl seçin",-1)),(o(!0),n(g,null,K(l(ee),r=>(o(),n("option",{key:r.id,value:r.id},a(r.name),9,Kt))),128))],512),[[X,l(s).city_id]])]),t("div",null,[e[34]||(e[34]=t("label",{class:"mb-1.5 block text-xs font-medium text-white"},[u("İlçe "),t("span",{class:"text-white"},"*")],-1)),v(t("select",{"onUpdate:modelValue":e[8]||(e[8]=r=>l(s).town_id=r),disabled:!l(s).city_id,class:"adresler-input h-11 w-full rounded-lg border border-neutral-700 bg-neutral-900/50 px-3 text-sm text-white focus:border-neutral-500 focus:outline-none focus:ring-2 focus:ring-white/10 disabled:opacity-50"},[t("option",jt,a(l(s).city_id?"İlçe seçin":"Önce il seçin"),1),(o(!0),n(g,null,K(l(te),r=>(o(),n("option",{key:r.id,value:r.id},a(r.name),9,Nt))),128))],8,Bt),[[X,l(s).town_id]])]),t("div",null,[e[35]||(e[35]=t("label",{class:"mb-1.5 block text-xs font-medium text-white"},[u("Posta kodu "),t("span",{class:"text-white"},"*")],-1)),v(t("input",{"onUpdate:modelValue":e[9]||(e[9]=r=>l(s).postcode=r),type:"text",inputmode:"numeric",placeholder:"34000",maxlength:"5",class:"adresler-input h-11 w-full rounded-lg border border-neutral-700 bg-neutral-900/50 px-3 text-sm text-white placeholder:text-white/45 focus:border-neutral-500 focus:outline-none focus:ring-2 focus:ring-white/10"},null,512),[[C,l(s).postcode]])])],2),t("div",null,[e[36]||(e[36]=t("label",{class:"mb-1.5 block text-xs font-medium text-white"},[u("Açık adres "),t("span",{class:"text-white"},"*")],-1)),v(t("textarea",{"onUpdate:modelValue":e[10]||(e[10]=r=>l(s).address=r),rows:"3",placeholder:"Mahalle, sokak, bina no, daire no...",class:"adresler-input adresler-textarea w-full rounded-lg border border-neutral-700 bg-neutral-900/50 px-3 py-2.5 text-sm text-white placeholder:text-white/45 focus:border-neutral-500 focus:outline-none focus:ring-2 focus:ring-white/10"},null,512),[[C,l(s).address]])])])])]),t("div",Dt,[t("button",{onClick:fe,disabled:!l(L)||l(B),class:w(["px-6 py-3 rounded-xl font-semibold text-sm transition-all duration-200",l(L)&&!l(B)?"adresler-btn-primary shadow-lg shadow-black/20 hover:shadow-xl active:scale-[0.98]":"bg-neutral-700 text-neutral-500 cursor-not-allowed"])},[l(B)?(o(),n("span",Ft,[...e[37]||(e[37]=[t("div",{class:"adresler-spinner h-4 w-4 rounded-full border-2 border-neutral-600 border-t-white"},null,-1),u(" Kaydediliyor... ",-1)])])):(o(),n("span",St,a(l(F)?"Değişiklikleri Kaydet":"Adresi Kaydet"),1))],10,Lt),t("button",{onClick:j,class:"px-6 py-3 rounded-xl border border-neutral-600 text-neutral-300 hover:border-neutral-500 hover:text-white hover:bg-white/5 active:scale-[0.98] transition-all font-medium text-sm"}," İptal ")])],512)):p("",!0),l(h)?p("",!0):(o(),n("div",Ut,[l(T)&&l(k).length===0&&!l(B)?(o(),n("div",$t,[e[38]||(e[38]=E('<div class="inline-flex h-16 w-16 items-center justify-center rounded-2xl bg-white/10 text-neutral-500 mb-6" data-v-3df5ed51><svg class="h-8 w-8" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true" data-v-3df5ed51><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M15 10.5a3 3 0 11-6 0 3 3 0 016 0z" data-v-3df5ed51></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1115 0z" data-v-3df5ed51></path></svg></div><h3 class="text-lg font-semibold text-white mb-2" data-v-3df5ed51>Henüz adres eklemediniz</h3><p class="text-neutral-400 text-sm max-w-sm mx-auto mb-8" data-v-3df5ed51>Siparişlerinizin doğru yere ulaşması için teslimat veya fatura adresi ekleyin.</p>',3)),t("button",{onClick:e[11]||(e[11]=r=>W()),class:"adresler-btn-primary px-6 py-3 rounded-xl font-semibold text-sm shadow-lg shadow-black/20 hover:shadow-xl active:scale-[0.98] transition-all"}," + İlk Adresinizi Ekleyin ")])):l(T)?(o(!0),n(g,{key:1},K(l(Te),r=>(o(),n("section",{key:r.key,class:"space-y-4"},[t("div",Ht,[t("span",It,[r.icon==="shipping"?(o(),n("svg",Ot,[...e[39]||(e[39]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4"},null,-1)])])):r.icon==="billing"?(o(),n("svg",Et,[...e[40]||(e[40]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"},null,-1)])])):(o(),n("svg",Yt,[...e[41]||(e[41]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"},null,-1),t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"}
1,null,-1)])]))]),t("div",Rt,[t("h2",qt,a(r.title),1),t("p",Pt,a(r.subtitle),1)]),t("button",{type:"button",onClick:c=>W(r.addType),class:"inline-flex items-center gap-1.5 rounded-xl border border-dashed border-neutral-600 bg-white/5 py-2 px-3 text-xs text-neutral-400 transition-colors hover:border-neutral-500 hover:text-white hover:bg-white/10 shrink-0"},[e[42]||(e[42]=t("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1)),t("span",null,a(r.addLabel),1)],8,Wt)]),t("div",Gt,[(o(!0),n(g,null,K(r.addresses,c=>(o(),n("div",{key:r.key+"-"+c.id,class:w(["adresler-address-card flex flex-col rounded-2xl p-4 md:p-5 transition-all text-left min-w-0 relative overflow-hidden",J(c,r.addresses)?"adresler-address-card--default":""])},[t("div",Jt,[t("div",Qt,[t("h3",Xt,a(Ae(c)),1),J(c,r.addresses)?(o(),n("span",Zt,[...e[43]||(e[43]=[t("svg",{class:"h-3 w-3",fill:"currentColor",viewBox:"0 0 20 20","aria-hidden":"true"},[t("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"})],-1),u(" Varsayılan ",-1)])])):(o(),n("button",{key:1,type:"button",onClick:Q=>ke(c.id,c.type),class:"shrink-0 text-[11px] text-white/60 hover:text-white transition-colors whitespace-nowrap underline-offset-2 hover:underline"}," Varsayılan yap ",8,es))]),t("p",ts,a(c.address),1),t("p",ss,[e[44]||(e[44]=t("svg",{class:"h-3.5 w-3.5 shrink-0 text-white/80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})],-1)),t("span",null,a(Ce(c)),1)]),_e(c)&&c.tax_number?(o(),n("p",is,[u(" VKN: "+a(c.tax_number),1),c.tax_office?(o(),n(g,{key:0},[u(" · "+a(c.tax_office),1)],64)):p("",!0)])):p("",!0)]),t("div",ls,[t("button",{onClick:Q=>ve(c),class:"px-3 py-1.5 text-xs rounded-lg border border-white/20 text-white hover:bg-white/10 transition-colors font-medium"}," Düzenle ",8,rs),t("button",{onClick:Q=>we(c),class:"px-3 py-1.5 text-xs rounded-lg border border-red-400/40 text-red-300 hover:bg-red-500/10 transition-colors font-medium"}," Sil ",8,os)])],2))),128))])]))),128)):p("",!0)])),(o(),Se($e,{to:"body"},[V(Ue,{name:"adresler-modal"},{default:N(()=>[l(_)?(o(),n("div",ns,[t("div",{class:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:G}),t("div",ds,[e[46]||(e[46]=t("h3",{id:"delete-modal-title",class:"text-lg font-semibold text-white mb-2"},"Adresi sil",-1)),e[47]||(e[47]=t("p",{class:"text-neutral-400 text-sm mb-6"},"Bu adresi silmek istediğinize emin misiniz? Bu işlem geri alınamaz. ",-1)),t("div",as,[t("button",{type:"button",onClick:G,disabled:l(A),class:"px-4 py-2.5 rounded-xl border border-neutral-600 text-neutral-300 hover:bg-white/5 hover:text-white transition-colors font-medium text-sm disabled:opacity-50"}," İptal ",8,us),t("button",{type:"button",onClick:ge,disabled:l(A),class:"px-4 py-2.5 rounded-xl bg-red-600 hover:bg-red-500 text-white font-semibold text-sm transition-colors disabled:opacity-50 disabled:cursor-not-allowed"},[l(A)?(o(),n("span",ps,[...e[45]||(e[45]=[t("span",{class:"adresler-spinner h-3.5 w-3.5 rounded-full border-2 border-white/30 border-t-white"},null,-1),u(" Siliniyor... ",-1)])])):(o(),n("span",ms,"Evet, sil"))],8,cs)])])])):p("",!0)]),_:1})]))],64)}}},_s=Ee(xs,[["__scopeId","data-v-3df5ed51"]]);export{_s 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.