1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7226],{11186:(e,a,s)=>{s.d(a,{bq:()=>o,eb:()=>m,gC:()=>x,l6:()=>c,yv:()=>p});var t=s(95155);s(12115);var l=s(55644),n=s(24033),r=s(5917),i=s(12108),d=s(64269);function c(e){let{...a}=e;return(0,t.jsx)(l.bL,{"data-slot":"select",...a})}function p(e){let{...a}=e;return(0,t.jsx)(l.WT,{"data-slot":"select-value",...a})}function o(e){let{className:a,size:s="default",children:r,...i}=e;return(0,t.jsxs)(l.l9,{"data-slot":"select-trigger","data-size":s,className:(0,d.cn)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),...i,children:[r,(0,t.jsx)(l.In,{asChild:!0,children:(0,t.jsx)(n.A,{className:"size-4 opacity-50"})})]})}function x(e){let{className:a,children:s,position:n="popper",...r}=e;return(0,t.jsx)(l.ZL,{children:(0,t.jsxs)(l.UC,{"data-slot":"select-content",className:(0,d.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:n,...r,children:[(0,t.jsx)(h,{}),(0,t.jsx)(l.LM,{className:(0,d.cn)("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:s}),(0,t.jsx)(u,{})]})})}function m(e){let{className:a,children:s,...n}=e;return(0,t.jsxs)(l.q7,{"data-slot":"select-item",className:(0,d.cn)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",a),...n,children:[(0,t.jsx)("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,t.jsx)(l.VF,{children:(0,t.jsx)(r.A,{className:"size-4"})})}),(0,t.jsx)(l.p4,{children:s})]})}function h(e){let{className:a,...s}=e;return(0,t.jsx)(l.PP,{"data-slot":"select-scroll-up-button",className:(0,d.cn)("flex cursor-default items-center justify-center py-1",a),...s,children:(0,t.jsx)(i.A,{className:"size-4"})})}function u(e){let{className:a,...s}=e;return(0,t.jsx)(l.wn,{"data-slot":"select-scroll-down-button",className:(0,d.cn)("flex cursor-default items-center justify-center py-1",a),...s,children:(0,t.jsx)(n.A,{className:"size-4"})})}},11647:(e,a,s)=>{s.d(a,{E:()=>d});var t=s(95155);s(12115);var l=s(32467),n=s(83101),r=s(64269);let i=(0,n.F)("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",success:"border-transparent bg-green-100 text-green-700 dark:bg-green-900/40 dark:text-green-300",warning:"border-transparent bg-amber-100 text-amber-700 dark:bg-amber-900/40 dark:text-amber-300",info:"border-transparent bg-blue-100 text-blue-700 dark:bg-blue-900/40 dark:text-blue-300"}},defaultVariants:{variant:"default"}});function d(e){let{className:a,variant:s,asChild:n=!1,...d}=e,c=n?l.DX:"span";return(0,t.jsx)(c,{"data-slot":"badge",className:(0,r.cn)(i({variant:s}),a),...d})}},17910:(e,a,s)=>{s.d(a,{A:()=>t});let t=(0,s(71847).A)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
1y:"oel41y"}]])},21786:(e,a,s)=>{s.d(a,{A:()=>t});let t=(0,s(71847).A)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]])},31120:(e,a,s)=>{s.d(a,{T:()=>n});var t=s(95155);s(12115);var l=s(64269);function n(e){let{className:a,...s}=e;return(0,t.jsx)("textarea",{"data-slot":"textarea",className:(0,l.cn)("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",a),...s})}},35626:(e,a,s)=>{s.d(a,{A:()=>t});let t=(0,s(71847).A)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},39324:(e,a,s)=>{s.d(a,{A:()=>t});let t=(0,s(71847).A)("timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]])},52987:(e,a,s)=>{s.d(a,{A:()=>t});let t=(0,s(71847).A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},53511:(e,a,s)=>{s.d(a,{A:()=>t});let t=(0,s(71847).A)("pause",[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]])},54485:(e,a,s)=>{s.d(a,{A:()=>t});let t=(0,s(71847).A)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]])},56154:(e,a,s)=>{s.d(a,{A:()=>t});let t=(0,s(71847).A)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])},61362:(e,a,s)=>{s.d(a,{A:()=>t});let t=(0,s(71847).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},71360:(e,a,s)=>{s.d(a,{A:()=>t});let t=(0,s(71847).A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},77226:(e,a,s)=>{s.r(a),s.d(a,{BlastingContent:()=>E});var t=s(95155),l=s(12115),n=s(35626),r=s(71360),i=s(6191),d=s(21786),c=s(65229),p=s(17910),o=s(39324),x=s(91169),m=s(52987),h=s(89559),u=s(18085),g=s(56154),j=s(54485),b=s(86651),f=s(37586),v=s(16485),w=s(61362),N=s(6132),y=s(85921),_=s(53511),k=s(86948),A=s(3998),C=s(65142),z=s(76444),S=s(11647),B=s(11186),R=s(31120),T=s(12985),M=s(65380),D=s(18720);function L(e){return e.startsWith("/")?e:"/".concat(e)}var J=s(64269),Z=s(94478);let W=["wizardSettings","wizardMessages","wizardRecipients","wizardAntiBan","wizardReview"];function E(){let{t:e}=(0,T.o)(),{user:a,token:s}=(0,M.A)(),[E,$]=(0,l.useState)([]),[P,F]=(0,l.useState)(!0),[I,q]=(0,l.useState)(""),[H,V]=(0,l.useState)(!1),[K,O]=(0,l.useState)(0),[U,G]=(0,l.useState)([]),[X,Y]=(0,l.useState)(null),[Q,ee]=(0,l.useState)(!1),[ea,es]=(0,l.useState)(""),[et,el]=(0,l.useState)(""),en=(0,l.useRef)(null),[er,ei]=(0,l.useState)({name:"",description:"",instance_id:"",scheduled_at:new Date().toISOString().slice(0,16),timezone:"Asia/Kuala_Lumpur",min_delay_ms:3e3,max_delay_ms:8e3,daily_limit:500}),[ed,ec]=(0,l.useState)([{message_type:"text",message_text:"",media_url:"",delay_after_hours:0}]),[ep,eo]=(0,l.useState)([]),[ex,em]=(0,l.useState)(""),eh=(0,l.useCallback)(async()=>{if(s)try{let e=await fetch(L("/api/whatsapp/blasting"),{headers:{Authorization:"Bearer ".concat(s)}}),a=await e.json();if(!e.ok)throw Error(a.error||"Kempen blasting gagal dimuat");$(a.campaigns||[]),es("")}catch(e){es(e instanceof Error?e.message:"Kempen blasting gagal dimuat")}finally{F(!1)}},[s]),eu=(0,l.useCallback)(async()=>
1{if(s)try{let e=await fetch(L("/api/whatsapp/instances"),{headers:{Authorization:"Bearer ".concat(s)}}),a=await e.json();if(!e.ok)throw Error(a.error||"Senarai instance gagal dimuat");G(a.instances||[]),el("")}catch(e){el(e instanceof Error?e.message:"Senarai instance gagal dimuat")}},[s]);(0,l.useEffect)(()=>{eh(),eu()},[eh,eu]);let eg=()=>{ei({name:"",description:"",instance_id:"",scheduled_at:new Date().toISOString().slice(0,16),timezone:"Asia/Kuala_Lumpur",min_delay_ms:3e3,max_delay_ms:8e3,daily_limit:500}),ec([{message_type:"text",message_text:"",media_url:"",delay_after_hours:0}]),eo([]),em(""),O(0)},ej=async()=>{if(s){if(!er.name||!er.instance_id||0===ed.length||!ed[0].message_text||0===ep.length)return void D.oR.error(e("common.error"));ee(!0);try{let a=await fetch(L("/api/whatsapp/blasting"),{method:"POST",headers:{Authorization:"Bearer ".concat(s),"Content-Type":"application/json"},body:JSON.stringify({...er,steps:ed,recipients:ep.map(e=>({phone_number:e.phone_number,name:e.name}))})});if(a.ok)D.oR.success(e("common.success")),V(!1),eg(),eh();else{let s=await a.json();D.oR.error(s.error||e("whatsapp.createCampaignFailed"))}}catch(a){D.oR.error(e("common.error"))}finally{ee(!1)}}},eb=async(a,t)=>{if(s)try{(await fetch(L("/api/whatsapp/blasting/".concat(a)),{method:"PATCH",headers:{Authorization:"Bearer ".concat(s),"Content-Type":"application/json"},body:JSON.stringify({action:t})})).ok&&(D.oR.success("start"===t?e("whatsapp.campaignStarted"):"pause"===t?e("whatsapp.campaignPaused"):e("whatsapp.campaignResumed")),eh())}catch(a){D.oR.error(e("common.error"))}},ef=async a=>{if(s&&confirm(e("whatsapp.deleteCampaignConfirm")))try{await fetch(L("/api/whatsapp/blasting/".concat(a)),{method:"DELETE",headers:{Authorization:"Bearer ".concat(s)}}),D.oR.success(e("common.success")),eh()}catch(e){}},ev=e=>{let a=e.split(/[\n,;]+/).map(e=>e.trim()).filter(Boolean),s=[];for(let e of a){var t;let a=e.split(/[\t|]/).map(e=>e.trim()),l=null==(t=a[0])?void 0:t.replace(/\D/g,"");l&&l.length>=10&&s.push({phone_number:l,name:a[1]||""})}return s},ew=E.filter(e=>!I||e.name.toLowerCase().includes(I.toLowerCase())),eN=E.reduce((e,a)=>e+a.sent_count,0),ey=E.reduce((e,a)=>e+a.failed_count,0),e_=E.reduce((e,a)=>e+a.total_recipients,0),ek=e_>0?((e_-ey)/e_*100).toFixed(1):"0",eA=e_>0?(ey/e_*100).toFixed(1):"0",eC={draft:"bg-slate-100 text-slate-700",scheduled:"bg-blue-100 text-blue-700",running:"bg-amber-100 text-amber-700",paused:"bg-orange-100 text-orange-700",completed:"bg-emerald-100 text-emerald-700",failed:"bg-red-100 text-red-700"},ez={draft:e("whatsapp.statusDraft"),scheduled:e("whatsapp.statusScheduled"),running:e("whatsapp.statusRunning"),paused:e("whatsapp.statusPaused"),completed:e("whatsapp.statusCompleted"),failed:e("whatsapp.statusFailed")},eS=ea||et;if(H){var eB;return(0,t.jsxs)("div",{className:"max-w-4xl mx-auto p-4 space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(A.$,{variant:"ghost",size:"icon",onClick:()=>{V(!1),eg()},children:(0,t.jsx)(n.A,{className:"w-4 h-4"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-xl font-bold",children:e("whatsapp.newCampaign")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e("whatsapp.newCampaignDesc")})]})]}),(0,t.jsx)("div",{className:"flex border-b",children:W.map((a,s)=>(0,t.jsx)("button",{onClick:()=>O(s),className:(0,J.cn)("px-4 py-2.5 text-sm font-medium border-b-2 transition-colors",K===s?"border-amber-500 text-amber-700":"border-transparent text-slate-500 hover:text-slate-700"),children:e("whatsapp.".concat(a))},a))}),0===K&&(0,t.jsxs)(k.Zp,{children:[(0,t.jsxs)(k.aR,{children:[(0,t.jsx)(k.ZB,{className:"text-base",children:e("whatsapp.basicInfo")}),(0,t.jsx)(k.BT,{children:e("whatsapp.basicInfoDesc")})]}),(0,t.jsxs)(k.Wu,{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(z.J,{className:"text-xs font-semibold",children:[(0,t.jsx)("span",{className:"text-red-500",children:"*"})," WhatsApp Instance"]}),(0,t.jsxs)(B.l6,{value:er.instance_id,onValueChange:e=>ei(a=>({...a,instance_id:e})),children:[(0,t.jsx)(B.bq,{children:(0,t.jsx)(B.yv,{placeholder:e("whatsapp.selectInstance")})}),(0,t.jsx)(B.gC,{children:U.filter(e=>"ONLINE"===e.status).map(a=>(0,t.jsxs)(B.eb,{value:a.id,children:[a.name," \xb7 ",a.provider," (",a.phone_number||e("whatsapp.noNumber"),")"]},a.id))})]}),(0,t.jsx)("p",{className:"text-[10px] text-muted-foreground",children:e("whatsapp.instanceHint")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(z.J,{className:"text-xs font-semibold",children:[(0,t.jsx)("span",{className:"text-red-500",children:"*"})," ",e("whatsapp.campaignName")]}),(0,t.jsx)(C.p,{placeholder:"cth. Welcome Series, Follow-up Sequence",value:er.name,onChange:e=>ei(a=>({...a,name:e.target.value}))})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(z.J,{className:"text-xs font-semibold",children:e("whatsapp.description")}),(0,t.jsx)(R.T,{placeholder:e("whatsapp.descPlaceholder"),value:er.description,onChange:e=>ei(a=>({...a,description:e.target.value})),rows:3})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(z.J,{className:"text-xs font-semibold",children:[(0,t.jsx)("span",{className:"text-red-500",children:"*"})," ",e("whatsapp.startDateTime")]}),(0,t.jsx)(C.p,{type:"datetime-local",value:er.scheduled_at,onChange:e=>ei(a=>({...a,scheduled_at:e.target.value}))}),(0,t.jsx)("p",{className:"text-[10px] text-muted-foreground",children:e("whatsapp.startDateHint")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(z.J,{className:"text-xs font-semibold",children:e("whatsapp.timezone")}),(0,t.jsxs)(B.l6,{value:er.timezone,onValueChange:e=>ei(a=>({...a,timezone:e})),children:[(0,t.jsx)(B.bq,{children:(0,t.jsx)(B.yv,{})}),(0,t.jsxs)(B.gC,{children:[(0,t.jsx)(B.eb,{value:"Asia/Kuala_Lumpur",children:"Asia/Kuala_Lumpur (UTC+8)"}),(0,t.jsx)(B.eb,{value:"Asia/Jakarta",children:"Asia/Jakarta (UTC+7)"}),(0,t.jsx)(B.eb,{value:"Asia/Singapore",children:"Asia/Singapore (UTC+8)"})]})]})]})]})]})]}),1===K&&(0,t.jsx)("div",{className:"space-y-4",children:(0,t.jsxs)(k.Zp,{children:[(0,t.jsxs)(k.aR,{children:[(0,t.jsx)(k.ZB,{className:"text-base",children:e("whatsapp.messageSteps")}),(0,t.jsx)(k.BT,{children:e("whatsapp.messageStepsDesc")})]}),(0,t.jsxs)(k.Wu,{className:"space-y-4",children:[ed.map((a,s)=>(0,t.jsxs)("div",{className:"border rounded-lg p-4 space-y-3 relative",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)(S.E,{variant:"outline",className:"text-[10px]",children:[e("whatsapp.step")," ",s+1]}),ed.length>1&&(0,t.jsx)(A.$,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>ec(e=>e.filter((e,a)=>a!==s)),children:(0,t.jsx)(r.A,{className:"w-3 h-3 text-red-500"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(z.J,{className:"text-xs",children:e("whatsapp.messageType")}),(0,t.jsxs)(B.l6,{value:a.message_type,onValueChange:e=>ec(a=>a.map((a,t)=>t===s?{...a,message_type:e}:a)),children:[(0,t.jsx)(B.bq,{className:"h-9",children:(0,t.jsx)(B.yv,{})}),(0,t.jsxs)(B.gC,{children:[(0,t.jsx)(B.eb,{value:"text",children:e("whatsapp.text")}),(0,t.jsx)(B.eb,{value:"image",children:e("whatsapp.imageCaption")}),(0,t.jsx)(B.eb,{value:"video",children:e("whatsapp.videoCaption")}),(0,t.jsx)(B.eb,{value:"document",children:e("whatsapp.document")})]})]})]}),"text"!==a.message_type&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(z.J,{className:"text-xs",children:e("whatsapp.mediaUrl")}),(0,t.jsx)(C.p,{placeholder:"https://...",value:a.media_url,onChange:e=>ec(a=>a.map((a,t)=>t===s?{...a,media_url:e.target.value}:a))})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(z.J,{className:"text-xs",children:"text"===a.message_type?e("whatsapp.messageText"):e("whatsapp.caption")}),(0,t.jsx)(R.T,{placeholder:e("whatsapp.messagePlaceholder"),value:a.message_text,onChange:e=>ec(a=>a.map((a,t)=>t===s?{...a,message_text:e.target.value}:a)),rows:4,className:"font-mono text-sm"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(S.E,{variant:"outline",className:"text-[9px] curs
1or-pointer hover:bg-slate-100",onClick:()=>{ec(e=>e.map((e,a)=>a===s?{...e,message_text:e.message_text+"{name}"}:e))},children:"{ name }"}),(0,t.jsx)(S.E,{variant:"outline",className:"text-[9px] cursor-pointer hover:bg-slate-100",onClick:()=>{ec(e=>e.map((e,a)=>a===s?{...e,message_text:e.message_text+"{phone}"}:e))},children:"{ phone }"})]})]}),s>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(z.J,{className:"text-xs",children:e("whatsapp.delayAfterPrev")}),(0,t.jsx)(C.p,{type:"number",min:0,value:a.delay_after_hours,onChange:e=>ec(a=>a.map((a,t)=>t===s?{...a,delay_after_hours:parseInt(e.target.value)||0}:a)),className:"w-32"})]})]},s)),(0,t.jsxs)(A.$,{variant:"outline",className:"w-full gap-2 border-dashed",onClick:()=>ec(e=>[...e,{message_type:"text",message_text:"",media_url:"",delay_after_hours:24}]),children:[(0,t.jsx)(i.A,{className:"w-3 h-3"})," ",e("whatsapp.addStep")]})]})]})}),2===K&&(0,t.jsxs)(k.Zp,{children:[(0,t.jsxs)(k.aR,{children:[(0,t.jsx)(k.ZB,{className:"text-base",children:e("whatsapp.recipientsTitle")}),(0,t.jsx)(k.BT,{children:e("whatsapp.recipientsDesc")})]}),(0,t.jsxs)(k.Wu,{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(A.$,{variant:"outline",className:"gap-2",onClick:()=>{var e;return null==(e=en.current)?void 0:e.click()},children:[(0,t.jsx)(d.A,{className:"w-3 h-3"})," ",e("whatsapp.uploadCsvTxt")]}),(0,t.jsx)("input",{ref:en,type:"file",accept:".csv,.txt",className:"hidden",onChange:a=>{var s;let t=null==(s=a.target.files)?void 0:s[0];if(!t)return;let l=new FileReader;l.onload=a=>{var s;let t=ev(null==(s=a.target)?void 0:s.result);eo(e=>[...e,...t]),D.oR.success("".concat(t.length," ").concat(e("whatsapp.recipientsAdded")))},l.readAsText(t)}}),(0,t.jsx)("p",{className:"text-[10px] text-muted-foreground self-center",children:e("whatsapp.uploadFormatHint")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(z.J,{className:"text-xs",children:e("whatsapp.addManual")}),(0,t.jsx)(R.T,{placeholder:"60123456789\n60198765432|Ahmad\n60111222333|Siti",value:ex,onChange:e=>em(e.target.value),rows:5,className:"font-mono text-sm"}),(0,t.jsxs)(A.$,{variant:"secondary",size:"sm",className:"gap-1",onClick:()=>{let a=ev(ex);a.length>0?(eo(e=>[...e,...a]),em(""),D.oR.success("".concat(a.length," ").concat(e("whatsapp.recipientsAdded")))):D.oR.error(e("common.error"))},children:[(0,t.jsx)(i.A,{className:"w-3 h-3"})," ",e("whatsapp.add")]})]}),ep.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)(z.J,{className:"text-xs",children:[ep.length," ",e("whatsapp.recipientsCount")]}),(0,t.jsxs)(A.$,{variant:"ghost",size:"sm",className:"text-red-500 text-xs h-8",onClick:()=>eo([]),children:[(0,t.jsx)(r.A,{className:"w-3 h-3 mr-1"})," ",e("whatsapp.deleteAll")]})]}),(0,t.jsxs)("div",{className:"border rounded-lg max-h-[300px] overflow-y-auto",children:[(0,t.jsxs)("table",{className:"w-full text-xs",children:[(0,t.jsx)("thead",{className:"bg-slate-50 sticky top-0",children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{className:"text-left px-3 py-2 font-medium",children:"#"}),(0,t.jsx)("th",{className:"text-left px-3 py-2 font-medium",children:e("whatsapp.number")}),(0,t.jsx)("th",{className:"text-left px-3 py-2 font-medium",children:e("whatsapp.name")}),(0,t.jsx)("th",{className:"w-8"})]})}),(0,t.jsx)("tbody",{children:ep.slice(0,100).map((e,a)=>(0,t.jsxs)("tr",{className:"border-t",children:[(0,t.jsx)("td",{className:"px-3 py-1.5 text-slate-400",children:a+1}),(0,t.jsx)("td",{className:"px-3 py-1.5 font-mono",children:e.phone_number}),(0,t.jsx)("td",{className:"px-3 py-1.5",children:e.name||"-"}),(0,t.jsx)("td",{className:"px-1",children:(0,t.jsx)("button",{onClick:()=>eo(e=>e.filter((e,s)=>s!==a)),className:"text-red-400 hover:text-red-600",children:(0,t.jsx)(c.A,{className:"w-3 h-3"})})})]},a))})]}),ep.length>100&&(0,t.jsxs)("p",{className:"text-center text-[10px] text-slate-400 py-2",children:["... ",e("whatsapp.and
1More")," ",ep.length-100]})]})]})]})]}),3===K&&(0,t.jsxs)(k.Zp,{children:[(0,t.jsxs)(k.aR,{children:[(0,t.jsxs)(k.ZB,{className:"text-base flex items-center gap-2",children:[(0,t.jsx)(p.A,{className:"w-4 h-4 text-amber-500"})," ",e("whatsapp.antiBanPolicy")]}),(0,t.jsx)(k.BT,{children:e("whatsapp.antiBanDesc")})]}),(0,t.jsxs)(k.Wu,{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-4 space-y-2",children:[(0,t.jsx)("p",{className:"text-xs font-semibold text-amber-800",children:e("whatsapp.importantWarning")}),(0,t.jsxs)("ul",{className:"text-[11px] text-amber-700 space-y-1 list-disc pl-4",children:[(0,t.jsx)("li",{children:e("whatsapp.warnLimit")}),(0,t.jsx)("li",{children:e("whatsapp.warnDelay")}),(0,t.jsx)("li",{children:e("whatsapp.warnSameMsg")}),(0,t.jsxs)("li",{children:[e("whatsapp.warnVariable")," ",(0,t.jsx)("code",{className:"bg-amber-100 px-1 rounded",children:"{name}"})]})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(z.J,{className:"text-xs font-semibold flex items-center gap-1",children:[(0,t.jsx)(o.A,{className:"w-3 h-3"})," ",e("whatsapp.minDelay")]}),(0,t.jsx)(C.p,{type:"number",min:1e3,value:er.min_delay_ms,onChange:e=>ei(a=>({...a,min_delay_ms:parseInt(e.target.value)||3e3}))}),(0,t.jsx)("p",{className:"text-[10px] text-muted-foreground",children:e("whatsapp.minDelayHint")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(z.J,{className:"text-xs font-semibold flex items-center gap-1",children:[(0,t.jsx)(o.A,{className:"w-3 h-3"})," ",e("whatsapp.maxDelay")]}),(0,t.jsx)(C.p,{type:"number",min:2e3,value:er.max_delay_ms,onChange:e=>ei(a=>({...a,max_delay_ms:parseInt(e.target.value)||8e3}))}),(0,t.jsx)("p",{className:"text-[10px] text-muted-foreground",children:e("whatsapp.maxDelayHint")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(z.J,{className:"text-xs font-semibold flex items-center gap-1",children:[(0,t.jsx)(x.A,{className:"w-3 h-3"})," ",e("whatsapp.dailyLimit")]}),(0,t.jsx)(C.p,{type:"number",min:1,max:1e3,value:er.daily_limit,onChange:e=>ei(a=>({...a,daily_limit:parseInt(e.target.value)||500}))}),(0,t.jsx)("p",{className:"text-[10px] text-muted-foreground",children:e("whatsapp.dailyLimitHint")})]})]}),(0,t.jsxs)("div",{className:"bg-slate-50 rounded-lg p-4 space-y-2",children:[(0,t.jsx)("p",{className:"text-xs font-semibold",children:e("whatsapp.sendSimulation")}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4 text-center",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-lg font-bold text-emerald-600",children:ep.length}),(0,t.jsx)("p",{className:"text-[10px] text-muted-foreground",children:e("whatsapp.recipientsCount")})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-lg font-bold text-blue-600",children:Math.ceil(ep.length/(er.daily_limit||500))}),(0,t.jsx)("p",{className:"text-[10px] text-muted-foreground",children:e("whatsapp.daysRequired")})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"text-lg font-bold text-amber-600",children:["~",((er.min_delay_ms+er.max_delay_ms)/2/1e3*Math.min(ep.length,er.daily_limit)/60).toFixed(0)," min"]}),(0,t.jsx)("p",{className:"text-[10px] text-muted-foreground",children:e("whatsapp.timePerDay")})]})]})]})]})]}),4===K&&(0,t.jsxs)(k.Zp,{children:[(0,t.jsxs)(k.aR,{children:[(0,t.jsx)(k.ZB,{className:"text-base",children:e("whatsapp.reviewSend")}),(0,t.jsx)(k.BT,{children:e("whatsapp.reviewDesc")})]}),(0,t.jsxs)(k.Wu,{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"bg-slate-50 rounded-lg p-3 space-y-1",children:[(0,t.jsx)("p",{className:"text-[10px] text-muted-foreground uppercase font-bold",children:e("whatsapp.campaignName")}),(0,t.jsx)("p",{className:"text-sm font-semibold",children:er.name||"-"})]}),(0,t.jsxs)("div",{className:"bg-slate-50 rounded-lg p-3 space-y-1",children:[(0,t.jsx)("p",{className:"text-[10px] text-muted-foreground uppercase font-bold",children:e("whatsapp.waInstanceLabel")}),(0,t.jsx)("p",{className:"text-sm font-semibold",children:(null==(eB=U.find(e=>e.id===er.instance_id))?void 0:eB.name)||"-"})]}),(0,t.jsxs)("div",{className:"bg-slate-50 rounded-lg p-3 space-y-1",children:[(0,t.jsx)("p",{className:"text-[10px] text-muted-foreground uppercase font-bold",children:e("whatsapp.recipientsCount")}
1),(0,t.jsxs)("p",{className:"text-sm font-semibold",children:[ep.length," ",e("whatsapp.persons")]})]}),(0,t.jsxs)("div",{className:"bg-slate-50 rounded-lg p-3 space-y-1",children:[(0,t.jsx)("p",{className:"text-[10px] text-muted-foreground uppercase font-bold",children:e("whatsapp.messageStepsLabel")}),(0,t.jsxs)("p",{className:"text-sm font-semibold",children:[ed.length," ",e("whatsapp.stepsCount")]})]}),(0,t.jsxs)("div",{className:"bg-slate-50 rounded-lg p-3 space-y-1",children:[(0,t.jsx)("p",{className:"text-[10px] text-muted-foreground uppercase font-bold",children:e("whatsapp.dailyLimitLabel")}),(0,t.jsxs)("p",{className:"text-sm font-semibold",children:[er.daily_limit," ",e("whatsapp.msgsPerDay")]})]}),(0,t.jsxs)("div",{className:"bg-slate-50 rounded-lg p-3 space-y-1",children:[(0,t.jsx)("p",{className:"text-[10px] text-muted-foreground uppercase font-bold",children:e("whatsapp.delay")}),(0,t.jsxs)("p",{className:"text-sm font-semibold",children:[(er.min_delay_ms/1e3).toFixed(1),"s - ",(er.max_delay_ms/1e3).toFixed(1),"s"]})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("p",{className:"text-xs font-semibold",children:e("whatsapp.messagePreview")}),ed.map((a,s)=>(0,t.jsxs)("div",{className:"bg-[#efeae2] rounded-lg p-3",children:[(0,t.jsxs)(S.E,{variant:"outline",className:"text-[9px] mb-2",children:[e("whatsapp.step")," ",s+1," - ",a.message_type]}),(0,t.jsx)("div",{className:"bg-[#d9fdd3] rounded-lg px-3 py-2 max-w-[80%] shadow-sm",children:(0,t.jsx)("p",{className:"text-[13px] whitespace-pre-wrap",children:a.message_text||e("whatsapp.empty")})})]},s))]})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-2",children:[(0,t.jsxs)(A.$,{variant:"outline",onClick:()=>K>0?O(e=>e-1):(V(!1),eg()),className:"gap-1",children:[(0,t.jsx)(n.A,{className:"w-3 h-3"})," ",K>0?e("whatsapp.back"):e("whatsapp.cancel")]}),(0,t.jsx)("div",{className:"flex gap-2",children:K<W.length-1?(0,t.jsxs)(A.$,{onClick:()=>O(e=>e+1),className:"gap-1 bg-amber-600 hover:bg-amber-700",children:[e("whatsapp.next")," ",(0,t.jsx)(m.A,{className:"w-3 h-3"})]}):(0,t.jsxs)(A.$,{onClick:ej,disabled:Q,className:"gap-1 bg-emerald-600 hover:bg-emerald-700",children:[Q?(0,t.jsx)(h.A,{className:"w-3 h-3 animate-spin"}):(0,t.jsx)(u.A,{className:"w-3 h-3"}),e("whatsapp.createSaveCampaign")]})})]})]})}return(0,t.jsxs)("div",{className:"space-y-6 max-w-6xl mx-auto p-4",children:[(0,t.jsxs)("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("h2",{className:"text-2xl font-bold flex items-center gap-2",children:[(0,t.jsx)(g.A,{className:"w-6 h-6 text-amber-500"})," ",e("whatsapp.blastTitle")]}),(0,t.jsx)("p",{className:"text-muted-foreground",children:e("whatsapp.blastSubtitle")})]}),(0,t.jsxs)(A.$,{className:"gap-2 bg-amber-600 hover:bg-amber-700",disabled:!!eS,onClick:()=>{eg(),V(!0)},children:[(0,t.jsx)(i.A,{className:"w-4 h-4"})," ",e("whatsapp.newBlast")]})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-amber-300 bg-amber-50 p-4 text-sm text-amber-900",children:[(0,t.jsx)("p",{className:"font-semibold",children:"Pelancaran blasting dikunci untuk keselamatan akaun"}),(0,t.jsx)("p",{className:"mt-1 text-xs leading-5",children:"Kempen masih boleh disediakan sebagai draf. Auto-blast WhatsApp Web tidak dibenarkan; WABA hanya akan dibuka selepas template approved dan bukti opt-in setiap penerima disokong sepenuhnya."})]}),eS&&(0,t.jsx)(Z.p,{message:eS,onRetry:()=>{eh(),eu()}}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,t.jsx)(k.Zp,{className:"bg-slate-50 border-none shadow-none",children:(0,t.jsxs)(k.aR,{className:"pb-2",children:[(0,t.jsx)(k.BT,{className:"text-[10px] uppercase font-bold text-slate-500",children:e("whatsapp.totalMsgsThisMonth")}),(0,t.jsx)(k.ZB,{className:"text-2xl",children:eN.toLocaleString()})]})}),(0,t.jsx)(k.Zp,{className:"bg-emerald-50 border-none shadow-none",children:(0,t.jsxs)(k.aR,{className:"pb-2",children:[(0,t.jsx)(k.BT,{className:"text-[10px] uppercase font-bold text-emerald-600",children:e("whatsapp.successRate")}),(0,t.jsxs)(k.ZB,{className:"text-2xl text-emerald-700",children:[ek,"%"]})]})}),(0,t.jsx)(k.Zp,{className:"bg-rose-50 border-none shadow-none",children:(0,t.jsxs)(k.aR,{className:"pb-2",children:[(0,t.jsx)(k.BT,{className:"text-[10px] uppercase font-bold text-rose-600",children:e("whatsapp.failRate")}),(0,t.jsxs)(k.ZB,{className:"text-2xl text-rose-700",children:[eA,"%"]})]})})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("h3",{className:"text-sm font-bold flex items-center gap-2",children:[(0,t.jsx)(j.A,{className:"w-4 h-4"})," ",e("whatsapp.campaignRecords")]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(b.A,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-3 h-3 text-slate-400"}),(0,t.jsx)(C.p,{placeholder:e("whatsapp.searchCampaign"),className:"pl-8 h-8 text-xs w-48",value:I,onChange:e=>q(e.target.value)})]})]}),(0,t.jsx)("div",{className:"grid gap-4",children:P?(0,t.jsxs)("div",{className:"text-center py-10 text-slate-400",children:[(0,t.jsx)(h.A,{className:"w-5 h-5 animate-spin mx-auto mb-2"}),e("common.loading")]}):eS?null:0===ew.length?(0,t.jsxs)("div",{className:"text-center py-20 bg-slate-50 rounded-xl border-2 border-dashed",children:[(0,t.jsx)(f.A,{className:"w-12 h-12 mx-auto text-slate-300 mb-2"}),(0,t.jsx)("p",{className:"text-slate-500",children:e("whatsapp.noCampaignsFound")}),(0,t.jsx)("p",{className:"text-xs text-slate-400 mt-1",children:e("whatsapp.noCampaignsHint")})]}):ew.map(a=>{var s;let l=a.total_recipients>0?Math.round((a.sent_count+a.failed_count)/a.total_recipients*100):0;return(0,t.jsx)(k.Zp,{className:"hover:shadow-md transition-shadow",children:(0,t.jsx)(k.Wu,{className:"p-4",children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"w-10 h-10 rounded-full bg-amber-100 flex items-center justify-center text-amber-600 shrink-0",children:(0,t.jsx)(u.A,{className:"w-5 h-5"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,t.jsx)("p",{className:"font-bold text-sm truncate",children:a.name}),(0,t.jsx)(S.E,{className:(0,J.cn)("text-[9px] shrink-0",eC[a.status]||"bg-slate-100"),children:ez[a.status]||a.status})]}),a.description&&(0,t.jsx)("p",{className:"text-[11px] text-muted-foreground truncate",children:a.description}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-[10px] text-muted-foreground mt-1.5",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)(x.A,{className:"w-3 h-3"})," ",a.total_recipients," ",e("whatsapp.recipientsCount")]}),(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)(v.A,{className:"w-3 h-3"})," ",a.scheduled_at?new Date(a.scheduled_at).toLocaleDateString("ms-MY",{day:"numeric",month:"short",year:"numeric"}):"-"]}),(null==(s=a.steps)?void 0:s.length)>0&&(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)(f.A,{className:"w-3 h-3"})," ",a.steps.length," ",e("whatsapp.stepsCount")]})]}),a.total_recipients>0&&(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsx)("div",{className:"flex-1 bg-slate-200 rounded-full h-1.5",children:(0,t.jsx)("div",{className:"bg-emerald-500 rounded-full h-1.5 transition-all",style:{width:"".concat(l,"%")}})}),(0,t.jsxs)("span",{className:"text-[10px] text-muted-foreground shrink-0",children:[l,"%"]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 text-[10px]",children:[a.sent_count>0&&(0,t.jsxs)("span",{className:"text-emerald-600 flex items-center gap-0.5",children:[(0,t.jsx)(w.A,{className:"w-2.5 h-2.5"})," ",e("whatsapp.sentLabel"),": ",a.sent_count]}),a.failed_count>0&&(0,t.jsxs)("span",{className:"text-red-500 flex items-center gap-0.5",children:[(0,t.jsx)(N.A,{className:"w-2.5 h-2.5"})," ",e("whatsapp.failedLabel"),": ",a.failed_count]}),a.delivered_count>0&&(0,t.jsxs)("span",{className:"text-blue-500",children:[e("whatsapp.deliveredLabel"),": ",a.delivered_count]}),a.read_count>0&&(0,t.jsxs)("span",{className:"text-purple-500",children:[e("whatsapp.readLabel"),": ",a.read_count]})]})]})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:["draft"===a.status&&(0,t.jsxs)(A.$,{disabled:!0,title:"Blasting dikunci sehingga gate WABA dan opt-in lengkap",variant:"outline",size:"sm",className:"h-8 text-xs gap-1 text-emerald-600",onClick:()=>eb(a.id,"start"),children:[(0,t.jsx)(y.A,{className:"w-3 h-3"})," ",e("whatsapp.start")]}),"running"===a.status&&(0,t.jsxs)(A.$,{variant:"outline",size:"sm",className:"h-8 text-xs gap-1 text-orange-600",onClick:()=>eb(a.id,"pause"),children:[(0,t.jsx)(_.A,{className:"w-3 h-3"})," ",e("whatsapp.pause")]}),"paused"===a.status&&(0,t.jsxs)(A.$,{disabled:!0,title:"Blasting dikunci sehingga gate WABA dan opt-in lengkap",variant:"outline",size:"sm",className:"h-8 text-xs gap-1 text-emerald-600",onClick:()=>eb(a.id,"resume"),children:[(0,t.jsx)(y.A,{className:"w-3 h-3"})," ",e("whatsapp.resume")]}),(0,t.jsx)(A.$,{variant:"ghost",size:"icon",className:"h-8 w-8 text-red-400 hover:text-red-600",onClick:()=>ef(a.id),children:(0,t.jsx)(r.A,{className:"w-3.5 h-3.5"})})]})]})})},a.id)})})]}),(0,t.jsxs)(k.Zp,{className:"bg-slate-900 text-white border-none overflow-hidden relative",children:[(0,t.jsx)("div",{className:"absolute right-0 top-0 w-32 h-32 bg-amber-500/10 rounded-full -mr-16 -mt-16 blur-2xl"}),(0,t.jsx)(k.Wu,{className:"p-6 relative z-10",children:(0,t.jsxs)("div",{className:"flex flex-col md:flex-row items-center justify-between gap-6",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("h4",{className:"text-lg font-bold flex items-center gap-2",children:[(0,t.jsx)(p.A,{className:"w-5 h-5 text-amber-500"})," ",e("whatsapp.antiBanPolicyBanner")]}),(0,t.jsx)("p",{className:"text-xs text-slate-400 max-w-xl leading-relaxed",children:e("whatsapp.antiBanBannerDe
1sc")})]}),(0,t.jsx)(A.$,{variant:"secondary",className:"bg-white text-slate-900 hover:bg-slate-100",children:e("whatsapp.viewGuide")})]})})]})]})}},85921:(e,a,s)=>{s.d(a,{A:()=>t});let t=(0,s(71847).A)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]])},94478:(e,a,s)=>{s.d(a,{p:()=>i});var t=s(95155),l=s(52056),n=s(89559),r=s(3998);function i(e){let{message:a,onRetry:s}=e;return(0,t.jsxs)("div",{role:"alert",className:"flex flex-col gap-3 rounded-xl border border-amber-200 bg-amber-50 p-4 text-amber-900 sm:flex-row sm:items-center sm:justify-between dark:border-amber-900/50 dark:bg-amber-950/30 dark:text-amber-200",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"flex items-center gap-2 text-sm font-semibold",children:[(0,t.jsx)(l.A,{className:"h-4 w-4"}),"Data WhatsApp belum dapat dimuat"]}),(0,t.jsxs)("p",{className:"mt-1 text-xs",children:[a," Jika ini preview baharu, pastikan migration 017 dan 018 sudah dipasang."]})]}),(0,t.jsxs)(r.$,{type:"button",size:"sm",variant:"outline",onClick:s,children:[(0,t.jsx)(n.A,{className:"mr-1 h-4 w-4"})," Cuba lagi"]})]})}}}]);
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.