1import{r as e}from"./rolldown-runtime-BYbx6iT9.js";import{A as t,B as n,C as r,G as i,J as a,L as o,M as s,S as c,_ as l,b as u,g as ee,h as d,ht as te,l as f,m as p,p as m,t as h,u as g,v as _,w as v,y,yt as b,z as x}from"./vue.runtime.esm-bundler-CjNPrmfm.js";import{t as S}from"./ArrowRightIcon-By1q_OoD.js";import{t as C}from"./ChatBubbleLeftRightIcon-u4endC0L.js";import{t as ne}from"./CheckCircleIcon-DQ0qDRWq.js";import{t as re}from"./GiftIcon-BrWhSFR7.js";import{t as ie}from"./InformationCircleIcon-DM5RrUcN.js";import{t as ae}from"./SparklesIcon-Dy9iS4Mj.js";import{t as oe}from"./XMarkIcon-BhkkrFza.js";import{t as w}from"./promo-B0TcJsMh.js";var se={key:0,class:`bg-white w-full sm:max-w-lg rounded-t-2xl sm:rounded-2xl shadow-2xl ring-1 ring-slate-200/60 overflow-hidden my-auto sm:my-4`},ce={class:`flex items-start justify-between gap-4 p-5 sm:p-6 border-b border-slate-100`},T={class:`flex-1 min-w-0`},E={class:`inline-flex items-center gap-1.5 bg-amber-50 text-amber-800 ring-1 ring-amber-200 px-2 py-0.5 rounded-full text-[10px] font-semibold uppercase tracking-wider mb-2`},D={class:`px-5 sm:px-6 py-4 bg-gradient-to-br from-amber-50 via-orange-50 to-amber-50 border-b border-amber-200/40`},O={class:`text-[11px] font-bold text-orange-700 uppercase tracking-wider mb-2.5 flex items-center gap-1.5`},k={class:`grid grid-cols-1 sm:grid-cols-2 gap-2`},A={class:`absolute -top-1.5 right-2 inline-flex px-1.5 py-0.5 bg-orange-500 text-white text-[9px] font-bold uppercase tracking-wide rounded`},j={class:`text-xs font-bold text-slate-900 mb-0.5`},M={class:`text-[11px] text-slate-600 leading-snug`},N={class:`text-[10px] text-slate-500 mt-2 italic leading-snug`},P={class:`p-5 sm:p-6 max-h-[70vh] overflow-y-auto`},F={key:0,class:`text-center py-4`},I={class:`inline-flex h-14 w-14 items-center justify-center rounded-full bg-emerald-50 text-emerald-600 mb-4 ring-4 ring-emerald-100`},L=[`href`],R={key:0,class:`text-xs text-rose-600 bg-rose-50 ring-1 ring-rose-200 rounded-lg p-2.5`},z={class:`grid grid-cols-1 sm:grid-cols-2 gap-3`},B={key:0,class:`text-[11px] text-rose-600 mt-1`},V={key:0,class:`text-[11px] text-rose-600 mt-1`},H={class:`grid grid-cols-1 sm:grid-cols-2 gap-3`},U={key:0,class:`text-[11px] text-rose-600 mt-1`},le=[`value`],W=[`value`],ue={class:`grid grid-cols-2 gap-1.5`},de=[`checked`,`onChange`],fe={class:`text-slate-700`},pe=[`disabled`],me={key:1,class:`w-5 h-5 animate-spin`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`},he={class:`flex items-start gap-2 text-[11px] text-slate-500 leading-relaxed`},G=v({__name:`WaitingListModal`,props:{open:{type:Boolean},options:{},apiBaseUrl:{default:``}},emits:[`close`],setup(e,{emit:v}){let G=e,K=v,q=()=>({name:``,whatsapp_number:``,email:``,brand_name:``,product_category:``,estimated_orders_monthly:``,selling_channels:[],message:``}),J=i(q()),Y=i(!1),X=i({}),Z=i(!1),Q=i(null);o(()=>G.open,e=>{e?(J.value=q(),X.value={},Z.value=!1,Q.value=null,typeof document<`u`&&(document.body.style.overflow=`hidden`)):typeof document<`u`&&(document.body.style.overflow=``)});function ge(e){let t=J.value.selling_channels.indexOf(e);t>=0?J.value.selling_channels.splice(t,1):J.value.selling_channels.push(e)}async function _e(){if(!Y.value){Y.value=!0,X.value={};try{let e=document.querySelector(`meta[name="csrf-token"]`)?.content??``,t=(G.apiBaseUrl||``).replace(/\/$/,``)+`/api/waiting-list`,n=!!G.apiBaseUrl,r=await fetch(t,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`,"X-Requested-With":`XMLHttpRequest`,...n?{}:{"X-CSRF-TOKEN":e}},body:JSON.stringify(J.value),credentials:n?`omit`:`same-origin`}),i=await r.json();if(!r.ok){i.errors?Object.keys(i.errors).forEach(e=>{X.value[e]=i.errors[e][0]??`Error`}):X.value._global=i.message??`Gagal submit, coba lagi.`;return}Z.value=!0,Q.value=i.whatsapp_url}catch(e){X.value._global=e.message??`Network error, coba lagi.`}finally{Y.value=!1}}}function $(){K(`close`)}let ve=ee(()=>Object.entries(G.options.channels));return(i,o)=>(t(),_(d,{to:`body`},[r(h,{"enter-active-class":`transition-opacity duration-200`,"enter-from-class":`opacity-0`,"leave-active-class":`transition-opacity duration-150`,"leave-to-class":`opacity-0`},{default:x(()=>[e.open?(t(),u(`div`,{key:0,onClick:m($,[`self`]),class:`fixed inset-0 z-[100] flex items-end sm:items-center justify-center bg-slate-900/60 backdrop-blur-sm p-0 sm:p-4 overflow-y-auto`},[r(h,{"enter-active-class":`transition-all duration-300 ease-out`,"enter-from-class":`opacity-0 translate-y-8 sm:scale-95`,"leave-active-class":`transition-all duration-200 ease-in`,"leave-to-class":`opacity-0 translate-y-4 sm:scale-95`},{default:x(()=>
1[e.open?(t(),u(`div`,se,[l(`div`,ce,[l(`div`,T,[l(`div`,E,[r(a(ae),{class:`w-3 h-3`}),o[7]||=c(` Coming Soon `,-1)]),o[8]||=l(`h2`,{class:`text-lg sm:text-xl font-bold text-slate-900 tracking-tight`},`Daftar Waiting List`,-1),o[9]||=l(`p`,{class:`text-xs sm:text-sm text-slate-500 mt-0.5`},` Info dasar aja â biar kami bisa kabari kamu duluan saat launch & sediakan offer yang sesuai. `,-1)]),l(`button`,{onClick:$,class:`p-1.5 -mr-1 -mt-1 text-slate-400 hover:text-slate-600 hover:bg-slate-100 rounded-lg transition flex-shrink-0`},[r(a(oe),{class:`w-5 h-5`})])]),l(`div`,D,[l(`p`,O,[r(a(re),{class:`w-3.5 h-3.5`,"aria-hidden":`true`}),o[10]||=c(` Bonus Khusus Pendaftar Waiting List `,-1)]),l(`div`,k,[(t(!0),u(p,null,s(a(w).benefits,(e,n)=>(t(),u(`div`,{key:e.title,class:`bg-white rounded-lg p-2.5 ring-1 ring-amber-200/60 relative`},[l(`span`,A,b(e.badge),1),l(`p`,j,b(e.title),1),l(`p`,M,b(e.description),1)]))),128))]),l(`p`,N,b(a(w).disclaimer),1)]),l(`div`,P,[Z.value?(t(),u(`div`,F,[l(`div`,I,[r(a(ne),{class:`w-8 h-8`})]),o[12]||=l(`h3`,{class:`text-lg font-bold text-slate-900 mb-2`},`Berhasil Daftar!`,-1),o[13]||=l(`p`,{class:`text-sm text-slate-600 mb-5 max-w-sm mx-auto leading-relaxed`},` Data kamu sudah kami catat. Lanjut kirim WhatsApp ke kami biar kami bisa follow-up langsung & jawab pertanyaan kamu. `,-1),Q.value?(t(),u(`a`,{key:0,href:Q.value,target:`_blank`,rel:`noopener`,class:`inline-flex items-center gap-2 bg-gradient-to-br from-emerald-500 to-emerald-600 hover:from-emerald-600 hover:to-emerald-700 text-white font-semibold px-6 py-3 rounded-xl shadow-lg shadow-emerald-500/30 transition-all hover:scale-[1.02]`},[r(a(C),{class:`w-5 h-5`}),o[11]||=c(` Lanjut Chat di WhatsApp `,-1),r(a(S),{class:`w-4 h-4`})],8,L)):y(``,!0),o[14]||=l(`p`,{class:`text-[11px] text-slate-500 mt-4`},` Atau tutup dialog ini â kami akan kontak kamu via WhatsApp dalam 1Ã24 jam. `,-1)])):(t(),u(`form`,{key:1,onSubmit:m(_e,[`prevent`]),class:`space-y-4`},[X.value._global?(t(),u(`div`,R,b(X.value._global),1)):y(``,!0),l(`div`,z,[l(`div`,null,[o[15]||=l(`label`,{class:`block text-xs font-medium text-slate-700 mb-1`},`Nama Lengkap *`,-1),n(l(`input`,{"onUpdate:modelValue":o[0]||=e=>J.value.name=e,type:`text`,required:``,maxlength:`120`,placeholder:`Budi Santoso`,class:`w-full px-3.5 py-2.5 bg-white border border-slate-300 rounded-lg text-sm focus:border-blue-600 focus:ring-4 focus:ring-blue-600/10 outline-none transition`},null,512),[[g,J.value.name]]),X.value.name?(t(),u(`p`,B,b(X.value.name),1)):y(``,!0)]),l(`div`,null,[o[16]||=l(`label`,{class:`block text-xs font-medium text-slate-700 mb-1`},`No. WhatsApp *`,-1),n(l(`input`,{"onUpdate:modelValue":o[1]||=e=>J.value.whatsapp_number=e,type:`tel`,required:``,maxlength:`20`,placeholder:`08123456789`,class:`w-full px-3.5 py-2.5 bg-white border border-slate-300 rounded-lg text-sm font-mono focus:border-blue-600 focus:ring-4 focus:ring-blue-600/10 outline-none transition`},null,512),[[g,J.value.whatsapp_number]]),X.value.whatsapp_number?(t(),u(`p`,V,b(X.value.whatsapp_number),1)):y(``,!0)])]),l(`div`,H,[l(`div`,null,[o[17]||=l(`label`,{class:`block text-xs font-medium text-slate-700 mb-1`},[c(`Email `),l(`span`,{class:`text-slate-400`},`(opsional)`)],-1),n(l(`input`,{"onUpdate:modelValue":o[2]||=e=>J.value.email=e,type:`email`,maxlength:`255`,placeholder:`[email protected]`,class:`w-full px-3.5 py-2.5 bg-white border border-slate-300 rounded-lg text-sm focus:border-blue-600 focus:ring-4 focus:ring-blue-600/10 outline-none transition`},null,512),[[g,J.value.email]]),X.value.email?(t(),u(`p`,U,b(X.value.email),1)):y(``,!0)]),l(`div`,null,[o[18]||=l(`label`,{class:`block text-xs font-medium text-slate-700 mb-1`},[c(`Nama Brand/Toko `),l(`span`,{class:`text-slate-400`},`(opsional)`)],-1),n(l(`input`,{"onUpdate:modelValue":o[3]||=e=>J.value.brand_name=e,type:`text`,maxlength:`120`,placeholder:`Hijab Zara`,class:`w-full px-3.5 py-2.5 bg-white border border-slate-300 rounded-lg text-sm focus:border-blue-600 focus:ring-4 focus:ring-blue-600/10 outline-none transition`},null,512),[[g,J.value.brand_name]])])]),l(`div`,null,[o[20]||=l(`label`,{class:`block text-xs font-medium text-slate-700 mb-1`},`Kategori Produk`,-1),n(l(`select`,{"onUpdate:modelValue":o[4]||=e=>J.value.product_category=e,class:`w-full px-3.5 py-2.5 bg-white border border-slate-300 rounded-lg text-sm focus:border-blue-600 focus:ring-4 focus:ring-blue-600/10 outline-none transition`},[o[19]||=l(`option`,{value:``},`â Pilih kategori â`,-1),(t(!0),u(p,null,s(e.options.categories,(e,n)=>(t(),u(`option`,{key:n,value:n},b(e),9,le))),128))],512),[[f,J.value.product_category]])]),l(`div`,null,[o[22]||=l(`label`,{class:`block text-xs font-medium text-slate-700 mb-1`},`Estimasi Order/Bulan Saat Ini`,-1),n(l(`select`,{"onUpdate:modelValue":o[5]||=e=>J.value.estimated_orders_monthly=e,class:`w-full px-3.5 py-2.5 bg-white border border-slate-300 rounded-lg text-sm focus:border-blue-600 focus:ring-4 focus:ring-blue-600/10 outline-none transition`},[o[21]||=l(`option`,{value:``},`â Pilih range â`,-1),(t(!0),u(p,null,s(e.options.volumes,(e,n)=>(t(),u(`option`,{key:n,value:n},b(e),9,W))),128))],512),[[f,J.value.estimated_orders_monthly]])]),l(`div`,null,[o[23]||=l(`label`,{class:`block text-xs font-medium text-slate-700 mb-1.5`},[c(`Saat ini jualan di mana? `),l(`span`,{class:`text-slate-400`},`(boleh pilih lebih dari 1)`)],-1),l(`div`,ue,[(t(!0),u(p,null,s(ve.value,([e,n])=>(t(),u(`label`,{key:e,class:te([`flex items-center gap-2 px-3 py-2 bg-white border-2 rounded-lg cursor-pointer text-xs transition`,J.value.selling_channels.includes(e)?`border-blue-600 bg-blue-50/40`:`border-slate-200 hover:border-slate-300`])},[l(`input`,{type:`checkbox`,checked:J.value.selling_channels.includes(e),onChange:t=>ge(e),class:`rounded border-slate-300 text-blue-600 focus:ring-blue-500/20`},null,40,de),l(`span`,fe,b(n),1)],2))),128))])]),l(`div`,null,[o[24]||=l(`label`,{class:`block text-xs font-medium text-slate-700 mb-1`},[c(`Pertanyaan/Request Khusus `),l(`span`,{class:`text-slate-400`},`(opsional)`)],-1),n(l(`textarea`,{"onUpdate:modelValue":o[6]||=e=>J.value.message=e,rows:`2`,maxlength:`1000`,placeholder:`Contoh: Ada timeline khusus untuk launching, atau request fitur khusus...`,class:`w-full px-3.5 py-2 bg-white border border-slate-300 rounded-lg text-sm focus:border-blue-600 focus:ring-4 focus:ring-blue-600/10 outline-none transition`},null,512),[[g,J.value.message]])]),l(`button`,{type:`submit`,disabled:Y.value,class:`w-full inline-flex items-center justify-center gap-2 bg-gradient-to-br from-orange-500 to-orange-600 hover:from-orange-600 hover:to-orange-700 disabled:opacity-60 text-white font-semibold py-3 rounded-xl shadow-lg shadow-orange-500/30 transition-all hover:scale-[1.01] active:scale-[0.99]`}
1,[Y.value?(t(),u(`svg`,me,[...o[25]||=[l(`circle`,{class:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,"stroke-width":`4`},null,-1),l(`path`,{class:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`},null,-1)]])):(t(),_(a(C),{key:0,class:`w-5 h-5`})),c(` `+b(Y.value?`Memproses...`:`Daftar & Lanjut ke WhatsApp`),1)],8,pe),l(`div`,he,[r(a(ie),{class:`w-3.5 h-3.5 flex-shrink-0 mt-0.5`}),o[26]||=l(`span`,null,` Data kamu cuma dipakai untuk follow-up info launch & onboarding. Tidak kami share ke pihak ketiga. `,-1)])],32))])])):y(``,!0)]),_:1})])):y(``,!0)]),_:1})]))}}),K=e({default:()=>q}),q=G;export{K as n,q as t};
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.