1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1089],{20238:(e,t,a)=>{a.d(t,{P:()=>o});var n=a(95155),s=a(12115),l=a(47522),r=a(2186),i=a(63896),d=a(30926);let c=(0,d.createServerReference)("60484c9c12dab92475346d7fcd5d9fdc0749ec1dba",d.callServer,void 0,d.findSourceMapURL,"validateCouponAction");function o(e){let{audience:t,initialCode:a,onChange:d}=e,[o,x]=(0,s.useState)(null!=a?a:""),[p,m]=(0,s.useState)(null),[u,h]=(0,s.useState)(""),[b,f]=(0,s.useTransition)(),v=e=>{let a=e.trim().toUpperCase();if(!a)return void h("کد٠تخÙÛ٠را ÙØ§Ø±Ø¯ Ú©Ù.");h(""),f(async()=>{let e=await c(a,t);if(e.ok){let t={code:e.code,percent:e.percent};m(t),d(t)}else m(null),d(null),h(e.reason)})};return((0,s.useEffect)(()=>{a&&v(a)},[]),p)?(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2 rounded-xl border border-emerald-200 bg-emerald-50 px-3 py-2.5 text-[12px]",children:[(0,n.jsxs)("span",{className:"flex items-center gap-1.5 font-medium text-emerald-700",children:[(0,n.jsx)(l.A,{size:15})," کد٠",(0,n.jsx)("span",{dir:"ltr",className:"font-mono",children:p.code})," اعÙ
ا٠شد â ",String(p.percent).replace(/[0-9]/g,e=>"Û°Û±Û²Û³Û´ÛµÛ¶Û·Û¸Û¹"[+e]),"Ùª تخÙÛÙ"]}),(0,n.jsx)("button",{type:"button",onClick:()=>{m(null),x(""),h(""),d(null)},className:"rounded-lg p-1 text-emerald-700/70 hover:bg-emerald-100",children:(0,n.jsx)(r.A,{size:14})})]}):(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsxs)("div",{className:"relative flex-1",children:[(0,n.jsx)(i.A,{size:15,className:"pointer-events-none absolute start-3 top-1/2 -translate-y-1/2 text-ink-3"}),(0,n.jsx)("input",{value:o,onChange:e=>x(e.target.value),dir:"ltr",onKeyDown:e=>"Enter"===e.key&&(e.preventDefault(),v(o)),placeholder:"کد٠تخÙÛÙ (Ø§Ø®ØªÛØ§Ø±Û)",className:"w-full rounded-xl border border-line bg-white py-2.5 ps-9 pe-3 text-left text-[13px] uppercase tracking-wide outline-none focus:border-navy"})]}),(0,n.jsx)("button",{type:"button",onClick:()=>v(o),disabled:b||!o.trim(),className:"shrink-0 rounded-xl border border-navy px-4 type-small font-medium text-navy transition hover:bg-navy/5 disabled:opacity-40",children:b?"â¦":"اعÙ
اÙ"})]}),u&&(0,n.jsx)("p",{className:"mt-1.5 text-[11px] text-red-500",children:u})]})}},28356:(e,t,a)=>{a.d(t,{ID:()=>n,NB:()=>l,ND:()=>r,V1:()=>c,Vw:()=>s,aI:()=>x,p6:()=>d,qy:()=>i,w9:()=>o});let n=20,s=e=>Math.round(12*e*(1-n/100)),l={free:{id:"free",name:"راÛگاÙ",priceToman:0,tagline:"Ø´Ø±ÙØ¹Ù ØØ¶Ùر",cta:"Ø´Ø±ÙØ¹Ù راÛگاÙ",features:["پرÙÙØ§ÛÙ٠شرکت + Ûµ Ù
ØØµÙÙ","Ø¯ÛØ¯ÙâØ´Ø¯Ù Ø¯Ø± Ú©Ø§ÙØ´","Ø³Ø±ÙØ®âÙØ§ (ÙÙÙ)"]},standard:{id:"standard",name:"Standard",priceToman:1e6,tagline:"Ø¯ÛØ¯Ù Ø´Ù",cta:"Ø§ÙØªØ®Ø§Ø¨Ù Standard",features:["ÙØ´Ø§Ù٠کسبâÙکار٠تأÛÛØ¯Ø´Ø¯Ù","Û²Û° Ù
ØØµÙÙ + کاتاÙÙÚ¯","Û±Û° Ø³Ø±ÙØ®Ù Ø®Ø±ÛØ¯Ø§Ø± / Ù
اÙ","Ø¯Ø§Ø´Ø¨ÙØ±Ø¯Ù پاÛÙ"]},professional:{id:"professional",name:"Professional",priceToman:2e6,tagline:"Ø¨ÙØ±ÙØ´",best:!0,cta:"Ø§ÙØªØ®Ø§Ø¨Ù Professional",features:["ÙØ´Ø§ÙÙ ÙØ±ÙشگاÙ٠تأÛÛØ¯Ø´Ø¯Ù","Û²Û°Û° Ù
ØØµÙÙ + رتبÙÙ Ø¨ÙØ³ØªâشدÙ","ÛµÛ° Ø³Ø±ÙØ®Ù Ø®Ø±ÛØ¯Ø§Ø± / Ù
اÙ","Ûµ Ù
ØØµÙÙÙ ÙÛÚÙ / Ù
اÙ","AI کاÙ
Ù + Ø¯Ø§Ø´Ø¨ÙØ±Ø¯Ù کاÙ
Ù","اÙ
ØªÛØ§Ø²Ù ÙØ±ÙØ´"]},enterprise:{id:"enterprise",name:"Enterprise",priceToman:3e6,tagline:"ÙØ±ÙØ´Ù Ù
Ø¯ÛØ±ÛØªâØ´Ø¯Ù",cta:"Ø§ÙØªØ®Ø§Ø¨Ù Enterprise",features:["ÙØ´Ø§ÙÙ Premium Verified","Ù
ØØµÙÙ Ù Ø³Ø±ÙØ®Ù ÙØ§Ù
ØØ¯Ùد","Ûµ Ù
عرÙÛÙ Ù
ستÙÛÙ
Ù Ø®Ø±ÛØ¯Ø§Ø± / Ù
اÙ","ØµÙØÙ٠اÙÙ + Ú©Ù
Ù¾ÛÙÙ ÙØ¯ÙÙ
ÙØ¯","AI + ÙÙØ´Ù بازار","Ù
Ø¯ÛØ±Ù ØØ³Ø§Ø¨ + Ù
Ø´Ø§ÙØ±Ù ÙØ±ÙØ´"]}},r=["free","standard","professional","enterprise"],i=e=>"free"!==e,d=e=>String(e.toLocaleString("en-US").replace(/,/g,"Ù¬")).replace(/[0-9]/g,e=>"Û°Û±Û²Û³Û´ÛµÛ¶Û·Û¸Û¹"[+e]),c=e=>0===e?"راÛگاÙ":"".concat(d(e)," تÙÙ
ا٠در Ù
اÙ"),o=(e,t)=>Math.round(e*(1-Math.max(0,Math.min(90,t||0))/100)),x=[{label:"Ù
ØØµÙÙØ§Øª",values:{free:"Ûµ",standard:"Û²Û°",professional:"Û²Û°Û°",enterprise:"ÙØ§Ù
ØØ¯Ùد"}},{label:"ÙÛØ¯Ø¦Ù / کاتاÙÙÚ¯",values:{free:"Û° / Û±",standard:"Û± / Û±",professional:"Ûµ / Ûµ",enterprise:"Û²Û° / ÙØ§Ù
ØØ¯Ùد"}},{label:"کاربر٠سازÙ
اÙÛ",values:{free:"Û±",standard:"Û±",professional:"Û³",enterprise:"Û±Û°"}},{label:"Ø³Ø±ÙØ®Ù Ø®Ø±ÛØ¯Ø§Ø± / Ù
اÙ",values:{free:"â",standard:"Û±Û°",professional:"ÛµÛ°",enterprise:"ÙØ§Ù
ØØ¯Ùد + Ûµ Ù
عرÙÛ"}},{label:"رتب٠در جستجÙ",values:{free:"پاÛÙ",standard:"Ø§Ø³ØªØ§ÙØ¯Ø§Ø±Ø¯",professional:"Ø¨ÙØ³ØªâشدÙ",enterprise:"برتر + ØµÙØÙ٠اÙÙ"}},{label:"Ù
ØØµÙÙÙ ÙÛÚÙ / Ù
اÙ",values:{free:"Û°",standard:"Û°",professional:"Ûµ",enterprise:"ÙØ§Ù
ØØ¯Ùد"}},{label:"ÙØ´Ø§Ù٠اعتÙ
اد",values:{free:"â",standard:"کسبâÙکار٠تأÛÛØ¯Ø´Ø¯Ù",professional:"ÙØ±ÙشگاÙ٠تأÛÛØ¯Ø´Ø¯Ù",enterprise:"Ù
Ù
تاز"}},{label:"ÙÙ
رات",values:{free:"â",standard:"اعتÙ
اد",professional:"اعتÙ
اد + ÙØ±ÙØ´",enterprise:"اعتÙ
اد + ÙØ±ÙØ´ + Ú©ÛÙÛØª"}},{label:"ÙÙØ´ Ù
صÙÙØ¹Û",values:{free:"â",standard:"پاÛÙ (ÛµÛ°)",professional:"کاÙ
Ù (ÛµÛ°Û°)",enterprise:"ÙØ§Ù
ØØ¯Ùد + ÙÙØ´Ù بازار"}},{label:"Ø¯Ø§Ø´Ø¨ÙØ±Ø¯",values:{free:"â",standard:"پاÛÙ",professional:"کاÙ
Ù + ÙÙØ´Ù/ÙÛÙ",enterprise:"+ عÙ
ÙÚ©Ø±Ø¯Ù ÙØ±ÙØ´"}},{label:"RFQ / Ù¾ÛØ´ÙÙØ§Ø¯",values:{free:"Ù
Ø´Ø§ÙØ¯Ù",standard:"سÙÙâØ¯Ø§Ø±",professional:"ÙØ§Ù
ØØ¯Ùد",enterprise:"ÙØ§Ù
ØØ¯Ùد + ÙØ´Ø¯Ø§Ø±Ù ÙØ±ØµØª"}},{label:"Ù
Ø¯ÛØ±Ù ØØ³Ø§Ø¨ / Ù
Ø´Ø§ÙØ±Ù ÙØ±ÙØ´",values:{free:"â",standard:"â",professional:"â",enterprise:"â"}},{label:"Ù
عرÙÛÙ Ù
ستÙÛÙ
Ù Ø®Ø±ÛØ¯Ø§Ø±",values:{free:"â",standard:"â",professional:"â",enterprise:"â"}}]},61089:(e,t,a)=>{a.d(t,{PricingClient:()=>v});var n=a(95155),s=a(52619),l=a.n(s),r=a(12115),i=a(20063),d=a(46735),c=a(10254),o=a(88963),x=a(68699),p=a(28356),m=a(92103),u=a(20238),h=a(68537),b=a(
172435);let f=e=>String(e).replace(/[0-9]/g,e=>"Û°Û±Û²Û³Û´ÛµÛ¶Û·Û¸Û¹"[+e]);function v(e){let t,{plans:a,discounts:s,exchanges:v,account:g,afterHref:y="/billing"}=e,j=(0,i.useRouter)(),{plan:N,choosePlan:k}=(0,x.j)(),[w,S]=(0,r.useState)(null),[E,C]=(0,r.useState)(!1),[A,D]=(0,r.useState)(!1),[I,P]=(0,r.useState)(!1),[R,T]=(0,r.useState)(null),[_,L]=(0,r.useState)(void 0);(0,r.useEffect)(()=>{let e=new URLSearchParams(window.location.search).get("coupon");e&&L(e.toUpperCase())},[]);let z=Object.fromEntries(a.map(e=>[e.id,e])),[B,M]=(0,r.useState)("monthly"),F=e=>{var t;return(0,p.w9)(z[e].priceToman,null!=(t=s[e])?t:0)},W=e=>"annual"===B?(0,p.Vw)(F(e)):F(e),U=w?(t=W(w),R?Math.round(t*(1-R.percent/100)):t):0;return(0,n.jsxs)("div",{className:"mx-auto max-w-5xl",children:[(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("h1",{className:"type-h1 text-ink",children:"Ù¾ÙÙÛ Ú©Ù ÙØ±ÙØ´Ú¯Ø§ÙØª را Ø¯ÛØ¯ÙâØªØ± Ù
ÛâÚ©ÙØ¯"}),(0,n.jsxs)("p",{className:"mt-2 text-[13px] text-ink-2",children:["پرÙÙØ§Û٠راÛÚ¯Ø§Ù Ø§Ø³ØªØ Ø¨Ø±Ø§Û ",(0,n.jsx)("b",{children:"Ø³Ø±ÙØ®Ù Ø®Ø±ÛØ¯Ø§Ø±Ø رتبÙÙ Ø¨Ø§ÙØ§ØªØ± Ù ÙØ´Ø§Ù٠اعتÙ
اد"})," Ø§Ø±ØªÙØ§ بدÙ."]}),(0,n.jsxs)("div",{className:"mt-4 inline-flex items-center rounded-xl border border-line bg-white p-1 text-[12.5px]",children:[(0,n.jsx)("button",{type:"button",onClick:()=>M("monthly"),"aria-pressed":"monthly"===B,className:"rounded-lg px-4 py-1.5 font-medium transition ".concat("monthly"===B?"bg-navy text-white":"text-ink-2 hover:bg-surface"),children:"Ù
Ø§ÙØ§ÙÙ"}),(0,n.jsxs)("button",{type:"button",onClick:()=>M("annual"),"aria-pressed":"annual"===B,className:"rounded-lg px-4 py-1.5 font-medium transition ".concat("annual"===B?"bg-navy text-white":"text-ink-2 hover:bg-surface"),children:["Ø³Ø§ÙØ§ÙÙ ",(0,n.jsxs)("span",{className:"annual"===B?"text-gold":"text-emerald-600",children:["(",f(p.ID),"Ùª تخÙÛÙ)"]})]})]})]}),(0,n.jsx)("div",{className:"mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:a.map(e=>{var t;let a=e.id,r=N===a,i=e.best,o=null!=(t=s[a])?t:0,x=F(a),m=W(a);return(0,n.jsxs)("div",{className:"relative flex flex-col rounded-2xl border bg-white p-5 ".concat(i?"border-navy shadow-pop":"border-line"),children:[i&&(0,n.jsx)("span",{className:"absolute -top-2.5 start-4 rounded-full bg-navy px-2.5 py-0.5 type-caption font-medium text-white",children:"Ù¾ÛØ´ÙÙØ§Ø¯Ù Ù
ا"}),(0,p.qy)(a)&&o>0&&(0,n.jsxs)("span",{className:"absolute -top-2.5 end-4 rounded-full bg-gold px-2 py-0.5 type-caption font-medium text-gold-ink",children:[f(o),"Ùª تخÙÛÙ"]}),"enterprise"===a&&(0,n.jsx)(d.A,{size:18,className:"text-gold"}),(0,n.jsx)("div",{className:"mt-1 text-[15px] font-medium text-ink",children:e.name}),(0,n.jsx)("div",{className:"text-[11px] text-ink-3",children:e.tagline}),(0,n.jsx)("div",{className:"mt-3",children:0===e.priceToman?(0,n.jsx)("span",{className:"text-[22px] font-medium text-ink",children:"راÛگاÙ"}):"monthly"===B?(0,n.jsxs)(n.Fragment,{children:[o>0&&(0,n.jsxs)("span",{className:"text-[12px] text-ink-3 line-through",children:[(0,p.p6)(e.priceToman)," تÙÙ
اÙ"]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("span",{className:"text-[19px] font-medium text-ink",children:[(0,p.p6)(x)," تÙÙ
اÙ"]}),(0,n.jsx)("span",{className:"text-[11px] text-ink-3",children:" در Ù
اÙ"})]}),(0,n.jsxs)("div",{className:"type-caption text-ink-3",children:["با Ù¾Ø±Ø¯Ø§Ø®ØªÙ Ø³Ø§ÙØ§ÙÙ: ",(0,p.p6)((0,p.Vw)(x))," تÙÙ
ا٠(",f(p.ID),"Ùª تخÙÛÙ)"]})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("span",{className:"text-[12px] text-ink-3 line-through",children:[(0,p.p6)(12*x)," تÙÙ
اÙ"]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("span",{className:"text-[19px] font-medium text-ink",children:[(0,p.p6)(m)," تÙÙ
اÙ"]}),(0,n.jsx)("span",{className:"text-[11px] text-ink-3",children:" در ساÙ"})]}),(0,n.jsxs)("div",{className:"type-caption text-ink-3",children:["Ù
عادÙÙ Ù
Ø§ÙØ§ÙÙ ",(0,p.p6)(Math.round(m/12))," تÙÙ
ا٠\xb7 ",f(p.ID),"Ùª تخÙÛÙ"]})]})}),(0,n.jsx)("ul",{className:"mt-4 flex-1 space-y-2 text-[12px]",children:e.features.map(e=>(0,n.jsxs)("li",{className:"flex gap-1.5 text-ink-2",children:[(0,n.jsx)(c.A,{size:14,className:"mt-0.5 shrink-0 ".concat(i?"text-navy":"text-gold")})," ",e]},e))}),(0,n.jsx)("div",{className:"mt-5",children:r?(0,n.jsx)("div",{className:"rounded-lg bg-emerald-50 py-2.5 text-center type-small font-medium text-emerald-700",children:"â Ù¾ÙÙÙ ÙØ¹ÙÛ"}):"free"===a?(0,n.jsx)("button",{onClick:()=>k("free"),className:"w-full rounded-lg border border-line py-2.5 type-small font-medium text-ink hover:bg-surface",children:e.cta}):b.W.paidPlansEnabled?(0,n.jsx)("button",{onClick:()=>{T(null),S(a),C(!0)},className:"w-full rounded-lg py-2.5 type-small font-medium text-white ".concat(i?"bg-navy hover:bg-navy/90":"bg-navy/85 hover:bg-navy"),children:e.cta}):(0,n.jsx)(l(),{href:"/auth?next=%2Fonboarding",className:"block w-full rounded-lg py-2.5 text-center type-small font-medium text-white ".concat(i?"bg-navy hover:bg-navy/90":"bg-navy/85 hover:bg-navy"),children:e.cta})})]},a)})}),(0,n.jsx)("div",{className:"mt-10 overflow-x-auto rounded-2xl border border-line [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:(0,n.jsxs)("div",{className:"min-w-[560px]",children:[(0,n.jsxs)("div",{className:"grid grid-cols-[1.4fr_repeat(4,1fr)] bg-navy text-[11.5px] font-medium text-white",children:[(0,n.jsx)("div",{className:"px-3 py-2.5",children:"Ù
ÙØ§ÛسÙ٠کاÙ
Ù"}),p.ND.map(e=>(0,n.jsx)("div",{className:"px-2 py-2.5 text-center ".concat(z[e].best?"bg-white/10":""),children:z[e].name},e))]}),p.aI.map((e,t)=>(0,n.jsxs)("div",{className:"grid grid-cols-[1.4fr_repeat(4,1fr)] text-[11.5px] ".concat(t%2?"bg-surface/50":"bg-white"),children:[(0,n.jsx)("div",{className:"px-3 py-2 font-medium text-ink",children:e.label}),p.ND.map(t=>(0,n.jsx)("div",{className:"px-2 py-2 text-center ".concat(z[t].best?"bg-navy/5 font-medium text-navy":"text-ink-2"),children:e.values[t]},t))]},e.label))]})}),w&&(0,n.jsx)(o.aF,{open:E,onClose:()=>{A||C(!1)},title:"پرداخت٠اشتراک",children:(0,n.jsxs)("div",{dir:"rtl",children:[(0,n.jsxs)("div",{className:"mb-3 rounded-xl bg-surface p-4 text-center",children:[(0,n.jsxs)("div",{className:"text-[11px] text-ink-2",children:["اشتراک٠",z[w].name," \xb7 ","annual"===B?"Ø³Ø§ÙØ§ÙÙ":"Ù
Ø§ÙØ§ÙÙ"]}),(0,n.jsxs)("div",{className:"mt-1 flex items-baseline justify-center gap-2",children:[R&&(0,n.jsxs)("span",{className:"text-[13px] text-ink-3 line-through",children:[(0,p.p6)(W(w))," تÙÙ
اÙ"]}),(0,n.jsxs)("span",{className:"text-[19px] font-medium text-ink",children:[(0,p.p6)(U)," تÙÙ
اÙ"]})]}),(0,n.jsxs)("div",{className:"mt-0.5 type-caption text-ink-3",children:["annual"===B?"Ø¨Ø±Ø§Û ÛÚ© ساÙ٠کاÙ
Ù (".concat(f(p.ID),"Ùª تخÙÛÙÙ Ø³Ø§ÙØ§ÙÙ)"):"Ø¨Ø±Ø§Û ÛÚ© Ù
اÙ",R?" \xb7 کد٠".concat(R.code," (").concat(f(R.percent),"Ùªâ)"):""]})]}),(0,n.jsx)("div",{className:"mb-3",children:(0,n.jsx)(u.P,{audience:"seller",initialCode:_,onChange:T})}),(0,n.jsx)(m.q,{amountLabel:"".concat((0,p.p6)(U)," تÙÙ
اÙ"),exchanges:v,account:g,busy:A,confirmLabel:"پرداخت Ù ÙØ¹Ø§ÙâØ³Ø§Ø²ÛÙ ".concat(z[w].name),note:"اشتراک تÙÙ
اÙÛ Ù ".concat("annual"===B?"Ø³Ø§ÙØ§ÙÙ":"Ù
Ø§ÙØ§ÙÙ"," Ø§Ø³ØªØ Ù¾Ø³ از تأÛÛØ¯Ù پرداخت Ø¨ÙØ§ÙاصÙÙ ÙØ¹Ø§Ù Ù
ÛâØ´ÙØ¯."),onConfirm:(e,t)=>
1(function(e,t,a,n){D(!0),P(!1);let s=new FormData;s.set("plan",e),s.set("planFa",z[e].name),s.set("interval",B),s.set("amount",String(t)),s.set("method",a),s.set("ref",n),R&&(s.set("couponCode",R.code),s.set("couponPercent",String(R.percent))),(0,h.z)(s).then(()=>{k(e,{interval:"annual",amount:t}),C(!1),j.push(y)}).catch(()=>P(!0)).finally(()=>D(!1))})(w,U,e,t)}),I&&(0,n.jsx)("p",{role:"alert",className:"mt-3 rounded-lg bg-red-50 px-3 py-2 text-[12px] text-red-700",children:"ثبت٠اشتراک Ø§ÙØ¬Ø§Ù
ÙØ´Ø¯ â Ù¾Ø±Ø¯Ø§Ø®ØªÛ ÙØ¹Ø§Ù ÙØ´Ø¯Ù است. Ø¯ÙØ¨Ø§Ø±Ù ØªÙØ§Ø´ Ú©ÙÛØ¯ ÛØ§ با Ù¾Ø´ØªÛØ¨Ø§ÙÛ ØªÙ
اس Ø¨Ú¯ÛØ±Ûد."})]})})]})}},68537:(e,t,a)=>{a.d(t,{z:()=>s});var n=a(30926);let s=(0,n.createServerReference)("40e611813c6f5d1c504ffdde4fd2dc53c56eb4e68c",n.callServer,void 0,n.findSourceMapURL,"recordSubscriptionAction")},68699:(e,t,a)=>{a.d(t,{PlanProvider:()=>o,j:()=>x});var n=a(95155),s=a(12115),l=a(28356);let r={plan:"free",status:"active",periodEnd:null,autoRenew:!1,interval:"monthly",amountToman:0},i=(0,s.createContext)({...r,verified:!1,daysLeft:null,choosePlan:()=>{},renew:()=>{},cancelRenew:()=>{},simulatePastDue:()=>{},simulateExpire:()=>{},reset:()=>{}}),d="th_sub",c=e=>"monthly"===e?(e=>new Date(e.getFullYear(),e.getMonth()+1,e.getDate()).toISOString())(new Date):(e=>new Date(e.getFullYear()+1,e.getMonth(),e.getDate()).toISOString())(new Date);function o(e){let{children:t}=e,[a,o]=(0,s.useState)(r);(0,s.useEffect)(()=>{try{let e=localStorage.getItem(d);e&&o({...r,...JSON.parse(e)})}catch(e){}},[]);let x=e=>{o(e);try{localStorage.setItem(d,JSON.stringify(e))}catch(e){}},p=a.periodEnd?Math.max(0,Math.ceil((new Date(a.periodEnd).getTime()-Date.now())/864e5)):null,m=(0,l.qy)(a.plan)&&"expired"!==a.status;return(0,n.jsx)(i.Provider,{value:{...a,verified:m,daysLeft:p,choosePlan:(e,t)=>{var a,n;if(!(0,l.qy)(e))return x({...r});let s=null!=(a=null==t?void 0:t.interval)?a:"annual";x({plan:e,status:"active",periodEnd:c(s),autoRenew:!0,interval:s,amountToman:null!=(n=null==t?void 0:t.amount)?n:0})},renew:()=>x({...a,status:"active",periodEnd:c(a.interval),autoRenew:!0}),cancelRenew:()=>x({...a,autoRenew:!1}),simulatePastDue:()=>x({...a,status:"past_due"}),simulateExpire:()=>x({...r,status:"expired"}),reset:()=>x(r)},children:t})}let x=()=>(0,s.useContext)(i)},72435:(e,t,a)=>{a.d(t,{W:()=>l});var n=a(95704);let s=(e,t)=>{let a=null==e?void 0:e.trim().toLowerCase();return void 0===a||""===a?t:"true"===a||"1"===a||"on"===a},l={emailSignupEnabled:s("",!0),googleAuthEnabled:s("",!1),legacyPhoneLoginEnabled:s("",!1),emailVerificationRequired:s("",!0),accountLinkingEnabled:s("",!1),escrowEnabled:s(n.env.NEXT_PUBLIC_ESCROW_ENABLED,!1),cardGatewayEnabled:s(n.env.NEXT_PUBLIC_CARD_GATEWAY_ENABLED,!1),typedStoreReadEnabled:s(n.env.NEXT_PUBLIC_TYPED_STORE,!1),paidPlansEnabled:s("",!1)}},92103:(e,t,a)=>{a.d(t,{q:()=>h});var n=a(95155),s=a(12115),l=a(97885),r=a(36425),i=a(36834),d=a(70474),c=a(67812),o=a(47522),x=a(26195),p=a(16199),m=a(72435);let u=[{key:"exchange",tk:"pmExchange",Icon:l.A},{key:"card",tk:"pmCard",Icon:r.A},{key:"wire",tk:"pmWire",Icon:i.A}].filter(e=>"wire"!==e.key||m.W.escrowEnabled);function h(e){var t,a,l,r;let{amountLabel:i,exchanges:h,account:b,onConfirm:f,confirmLabel:v,busy:g,note:y,locale:j="fa",cardGatewayEnabled:N=!1}=e,k=N||m.W.cardGatewayEnabled,w=e=>(0,p.tt)(e,j),[S,E]=(0,s.useState)(h.length?"exchange":"card"),[C,A]=(0,s.useState)(null!=(l=null==(t=h[0])?void 0:t.id)?l:""),[D,I]=(0,s.useState)(""),[P,R]=(0,s.use
1State)(!1),[T,_]=(0,s.useState)(!1),L=(0,s.useId)(),z=null!=(r=null==(a=h.find(e=>e.id===C))?void 0:a.name)?r:"",B="exchange"===S?"".concat(z," \xb7 ").concat(D.trim()):"wire"===S?"".concat(w("pmWireRef")," \xb7 ").concat(D.trim()):w("pmCardRef"),M="exchange"===S?!!(z&&D.trim()):"wire"===S?!!(m.W.escrowEnabled&&b.iban.trim()&&D.trim()):k,F=async()=>{_(!1);try{await navigator.clipboard.writeText(b.iban),R(!0)}catch(e){R(!1),_(!0)}};return(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsx)("div",{className:"grid grid-flow-col auto-cols-fr gap-1.5",children:u.map(e=>(0,n.jsxs)("button",{type:"button",disabled:g,"aria-pressed":S===e.key,onClick:()=>{E(e.key),I(""),R(!1),_(!1)},className:"flex flex-col items-center gap-1 rounded-xl border p-2.5 text-[11px] font-medium transition ".concat(S===e.key?"border-navy bg-navy/5 text-navy":"border-line text-ink-2 hover:bg-surface"),children:[(0,n.jsx)(e.Icon,{size:18})," ",w(e.tk)]},e.key))}),"exchange"===S&&(0,n.jsx)("div",{className:"space-y-2",children:0===h.length?(0,n.jsx)("p",{className:"text-[11.5px] text-ink-3",children:w("pmNoExchange")}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("p",{className:"text-[11.5px] text-ink-2",children:[w("pmExchangeHint"),(0,n.jsx)("b",{children:w("pmReceiptBold")}),w("pmDot")]}),h.map(e=>(0,n.jsxs)("label",{className:"flex cursor-pointer items-center gap-2.5 rounded-xl border p-3 transition ".concat(C===e.id?"border-navy bg-navy/[0.04]":"border-line hover:bg-surface"),children:[(0,n.jsx)("input",{type:"radio",name:L,disabled:g,checked:C===e.id,onChange:()=>{A(e.id),I("")},className:"h-4 w-4 accent-navy"}),(0,n.jsxs)("span",{className:"flex-1",children:[(0,n.jsxs)("span",{className:"flex items-center gap-1 type-small font-medium text-ink",children:[e.flag," ",e.name]}),(0,n.jsxs)("span",{className:"type-caption text-ink-3",children:[e.city,e.note?" \xb7 ".concat(e.note):""]})]})]},e.id)),(0,n.jsx)("input",{disabled:g,maxLength:200,value:D,onChange:e=>I(e.target.value),"aria-label":w("pmReceiptPh"),placeholder:w("pmReceiptPh"),className:"w-full rounded-xl border border-line bg-white px-3.5 py-2.5 text-[13px] outline-none focus:border-navy"})]})}),"card"===S&&(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{className:"flex items-start gap-1.5 rounded-xl border border-navy/15 bg-navy/[0.03] p-3 text-[11.5px] leading-6 text-ink-2",children:[(0,n.jsx)(d.A,{size:14,className:"mt-0.5 shrink-0 text-navy"}),(0,n.jsx)("span",{children:w("pmCardHosted")})]}),!k&&(0,n.jsxs)("div",{className:"flex items-start gap-1.5 rounded-xl border border-amber-300 bg-amber-50 p-3 text-[11.5px] leading-6 text-amber-900/85",children:[(0,n.jsx)(c.A,{size:14,className:"mt-0.5 shrink-0 text-amber-600"}),(0,n.jsx)("span",{children:w("pmCardUnavailable")})]})]}),"wire"===S&&(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("p",{className:"text-[11.5px] text-ink-2",children:[w("pmWireHint"),(0,n.jsx)("b",{children:w("pmTransferBold")}),w("pmDot")]}),(0,n.jsxs)("div",{className:"rounded-xl border border-line bg-surface/60 p-3 text-[12px]",children:[[[w("pmBank"),b.bank],[w("pmHolder"),b.holder],["SWIFT",b.swift],[w("pmCurrency"),b.currency]].map(e=>{let[t,a]=e;return(0,n.jsxs)("div",{className:"flex justify-between gap-3 py-0.5",children:[(0,n.jsx)("span",{className:"text-ink-3",children:t}),(0,n.jsx)("span",{className:"font-medium text-ink",children:a})]},t)}),(0,n.jsxs)("div",{className:"mt-1 flex items-center justify-between gap-3 border-t border-line pt-1.5",children:[(0,n.jsx)("span",{className:"text-ink-3",children:"IBAN"}),(0,n.jsxs)("button",{type:"button",disabled:g||!b.iban,"aria-label":"IBAN: ".concat(b.iban),onClick:F,className:"flex items-center gap-1 font-medium text-navy",children:[b.iban," ",P?(0,n.jsx)(o.A,{size:13,className:"text-emerald-600"}):(0,n.jsx)(x.A,{size:13})]})]})]}),P&&(0,n.jsx)("p",{role:"status",children:"en"===j?"Copied":"tr"===j?"Kopyalandı":"ar"===j?"تÙ
اÙÙØ³Ø®":"Ú©Ù¾Û Ø´Ø¯"}),T&&(0,n.jsx)("p",{role:"alert",children:"en"===j?"Could not copy. Select the IBAN and copy it manually.":"tr"===j?"Kopyalanamadı. IBANâı se\xe7ip kopyalayın.":"ar"===j?"تعذر اÙÙØ³Ø®. ØØ¯Ø¯ رÙÙ
IBAN ÙØ§ÙØ³Ø®Ù ÙØ¯ÙÙÙØ§.":"Ú©Ù¾Û ÙØ´Ø¯Ø Ø´Ù
ارÙ٠شبا را Ø§ÙØªØ®Ø§Ø¨ Ù Ø¯Ø³ØªÛ Ú©Ù¾Û Ú©ÙÛØ¯."}),(0,n.jsx)("input",{disabled:g,maxLength:200,value:D,onChange:e=>I(e.target.value),"aria-label":w("pmTransferPh"),placeholder:w("pmTransferPh"),className:"w-full rounded-xl border border-line bg-white px-3.5 py-2.5 text-[13px] outline-none focus:border-navy"})]}),(0,n.jsxs)("div",{className:"flex items-start gap-1.5 rounded-xl bg-gold/5 px-3 py-2.5 text-[11px] leading-5 text-gold-700",children:[(0,n.jsx)(c.A,{size:14,className:"mt-0.5 shrink-0"})," ",null!=y?y:w("pmNoteDefault")]}),(0,n.jsxs)("button",{type:"button",disabled:!M||g,onClick:()=>{M&&!g&&f(S,B)},className:"w-full rounded-xl bg-navy py-3 text-sm font-medium text-white transition hover:bg-navy/90 disabled:opacity-40",children:[(0,n.jsx)(d.A,{size:15,className:"mx-1.5 inline"})," ",g?w("pmPaying"):"".concat(v," \xb7 ").concat(i)]})]})}}}]);
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.