PageSourceSearch

https://dashboard.baseet.cc/_next/static/chunks/58861.ad7984c5f8e737a1.js

js baseet.cc collected 2026-09-24 13:57:58 UTC 27,761 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[32190,58861,82079,97955],{3669:(e,r,t)=>{t.d(r,{$8:()=>m,Ru:()=>d,fg:()=>x,xj:()=>c});var a=t(54568),n=t(19664),s=t.n(n),l=t(34920),o=t(39201),i=t(89355);function d(e){let{value:r,className:t}=e;if(!isFinite(r)||0===r)return null;let n=r>0,s=n?l.A:o.A;return(0,a.jsxs)("span",{className:(0,i.cn)("inline-flex items-center gap-0.5 text-xs font-semibold tabular-nums",n?"text-emerald-600 dark:text-emerald-400":"text-red-600 dark:text-red-400",t),dir:"ltr",children:[(0,a.jsx)(s,{className:"w-3.5 h-3.5","aria-hidden":!0}),Math.abs(r).toFixed(1),"%"]})}function c(e){let{data:r,height:t=56,color:n="var(--primary)",className:s}=e;if(!r||r.length<2||r.every(e=>0===e))return(0,a.jsx)("div",{className:(0,i.cn)("flex items-end",s),style:{height:t},"aria-hidden":!0,children:(0,a.jsx)("div",{className:"w-full border-b border-dashed border-border"})});let l=1.1*Math.max(...r)||1,o=Math.min(...r,0),d=l-o||1,c=r.map((e,t)=>"".concat(t/(r.length-1)*240,",").concat(56-(e-o)/d*52-2)).join(" "),m="0,".concat(56," ").concat(c," ").concat(240,",").concat(56);return(0,a.jsx)("div",{dir:"ltr",className:s,children:(0,a.jsxs)("svg",{viewBox:"0 0 ".concat(240," ").concat(56),preserveAspectRatio:"none",className:"w-full",style:{height:t},"aria-hidden":!0,children:[(0,a.jsx)("polygon",{points:m,fill:n,opacity:"0.08"}),(0,a.jsx)("polyline",{points:c,fill:"none",stroke:n,strokeWidth:"1.75",strokeLinejoin:"round",strokeLinecap:"round"})]})})}function m(e){let{label:r,value:t,delta:n,href:l}=e,o=(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 py-[5px] min-w-0",children:[(0,a.jsx)("span",{className:(0,i.cn)("text-[13px] text-foreground/80 truncate",l&&"group-hover/row:text-primary group-hover/row:underline"),children:r}),(0,a.jsxs)("span",{className:"flex items-center gap-2 shrink-0",children:[(0,a.jsx)("span",{className:"text-[13px] font-medium text-foreground tabular-nums",dir:"ltr",children:t}),void 0!==n&&(0,a.jsx)(d,{value:n})]})]});return l?(0,a.jsx)(s(),{href:l,className:"group/row block",children:o}):o}function x(e){let{label:r,value:t,delta:n,reportHref:l,reportLabel:o,chart:m,children:x,className:u}=e;return(0,a.jsxs)("div",{className:(0,i.cn)("mb-4 break-inside-avoid rounded-xl border border-border bg-card p-4",u),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("h3",{className:"text-[13px] font-semibold text-foreground truncate",children:r}),l&&(0,a.jsx)(s(),{href:l,className:"shrink-0 text-xs font-medium text-primary hover:underline",children:o})]}),void 0!==t&&(0,a.jsxs)("div",{className:"mt-1.5 flex items-baseline gap-2",children:[(0,a.jsx)("p",{className:"text-[22px] font-semibold tracking-tight text-foreground tabular-nums leading-none",dir:"ltr",children:t}),void 0!==n&&(0,a.jsx)(d,{value:n})]}),x?(0,a.jsx)("div",{className:"mt-3",children:x}):null,m?(0,a.jsx)(c,{data:m,className:"mt-3"}):null]})}},8033:(e,r,t)=>{t.d(r,{Z8:()=>i,_I:()=>c,me:()=>d});var a=t(54568);t(7620);var n=t(54497),s=t(12598),l=t(6438),o=t(89355);function i(e){let{open:r,onOpenChange:t,title:l,subtitle:i,icon:d,children:c,footer:m,className:x}=e;return(0,a.jsx)(n.bL,{open:r,onOpenChange:t,children:(0,a.jsxs)(n.ZL,{children:[(0,a.jsx)(n.hJ,{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 motion-reduce:animate-none"}),(0,a.jsxs)(n.UC,{className:(0,o.cn)("fixed z-50 flex max-h-[90dvh] flex-col overflow-hidden border border-border bg-card shadow-xl","inset-x-0 bottom-0 rounded-t-2xl","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom","sm:inset-x-auto sm:bottom-auto sm:left-1/2 sm:top-1/2 sm:w-full sm:max-w-md sm:-translate-x-1/2 sm:-translate-y-1/2 sm:rounded-2xl","sm:data-[state=open]:zoom-in-95 sm:data-[state=closed]:zoom-out-95","motion-reduce:animate-none",x),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-border p-4 sm:p-5",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[d?(0,a.jsx)("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-primary/10",children:(0,a.jsx)(d,{className:"h-5 w-5 text-primary"})}):null,(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)(n.hE,{className:"truncate text-base font-bold text-foreground",children:l}),i?(0,a.jsx)(n.VY,{className:"truncate text-xs text-muted-foreground",children:i}):(0,a.jsx)(n.VY,{className:"sr-only",children:l})]})]}),(0,a.jsx)(n.bm,{"aria-label":"Close",className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground transition-colors hover:bg-muted/80 hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/40",children:(0,a.jsx)(s.A,{className:"h-4 w-4"})})]}),(0,a.jsx)("div",{className:"flex-1 overflow-y-auto p-4 sm:p-5",children:c}),m?(0,a.jsx)("div",{className:"flex gap-3 border-t border-border p-4 sm:p-5",children:m}):null]})]})})}function d(e){let{children:r,className:t}=e;return(0,a.jsx)("div",{role:"radiogroup",className:(0,o.cn)("space-y-2",t),children:r})}function c(e){let{selected:r=!1,onSelect:t,icon:n,title:s,sub:i,className:d}=e;return(0,a.jsxs)("button",{type:"button",role:"radio","aria-checked":r,onClick:t,className:(0,o.cn)("flex w-full items-center gap-3 rounded-xl border p-3.5 text-start transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/30",r?"border-primary/40 bg-primary/5":"border-border bg-card hover:bg-muted/50",d),children:[n?(0,a.jsx)("span",{className:(0,o.cn)("flex h-10 w-10 shrink-0 items-center justify-center rounded-lg transition-colors",r?"bg-primary/15 text-primary":"bg-muted text-muted-foreground"),children:(0,a.jsx)(n,{className:"h-5 w-5"})}):null,(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,a.jsx)("span",{className:(0,o.cn)("block truncate text-sm font-semibold",r?"text-primary":"text-foreground"),children:s}),i?(0,a.jsx)("span",{className:"mt-0.5 block truncate text-xs text-muted-foreground",children:i}):null]}),r?(0,a.jsx)("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-primary text-primary-foreground",children:(0,a.jsx)(l.A,{className:"h-3 w-3"})}):null]})}n.bL,n.l9,n.bm},25284:(e,r,t)=>{t.d(r,{d:()=>o});var a=t(54568),n=t(7620),s=t(52733),l=t(89355);let o=n.forwardRef((e,r)=>{let{className:t,...n}=e;return(0,a.jsx)(s.bL,{className:(0,l.cn)("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",t),...n,ref:r,children:(0,a.jsx)(s.zi,{className:(0,l.cn)("pointer-events-none block h-4 w-4 roun
1ded-full bg-background shadow-lg ring-0 transition-transform","data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0","rtl:data-[state=checked]:-translate-x-4 rtl:data-[state=unchecked]:translate-x-0")})})});o.displayName=s.bL.displayName},32190:(e,r,t)=>{t.d(r,{$8:()=>i.$8,EE:()=>N,IW:()=>g,Mw:()=>y,Z8:()=>d.Z8,_I:()=>d._I,ap:()=>x,fg:()=>i.fg,hI:()=>p,jP:()=>b,me:()=>d.me,pp:()=>v,qK:()=>c,qs:()=>j,r6:()=>u,zY:()=>m});var a=t(54568),n=t(19664),s=t.n(n),l=t(65202),o=t(89355),i=t(3669),d=t(8033);function c(e){let{children:r,className:t,wide:n=!1}=e;return(0,a.jsx)("div",{className:(0,o.cn)("mx-auto w-full px-4 py-6 md:px-6 md:py-8 space-y-6",n?"max-w-7xl":"max-w-6xl",t),children:r})}function m(e){let{title:r,subtitle:t,actions:n,className:s}=e;return(0,a.jsxs)("div",{className:(0,o.cn)("flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",!t&&!n&&"hidden",s),children:[(0,a.jsx)("div",{className:"min-w-0",children:t?(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:t}):null}),n?(0,a.jsx)("div",{className:"flex items-center gap-2 shrink-0",children:n}):null]})}function x(e){let{children:r,className:t,padded:n=!0}=e;return(0,a.jsx)("div",{className:(0,o.cn)("rounded-xl border border-border bg-card",n&&"p-5",t),children:r})}function u(e){let{title:r,hint:t,action:n}=e;return(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 mb-4",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-sm font-bold text-foreground",children:r}),t?(0,a.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:t}):null]}),n?(0,a.jsx)("div",{className:"shrink-0",children:n}):null]})}let h={default:{chip:"bg-primary/10 text-primary",value:"text-foreground",chart:"var(--primary)"},brand:{chip:"bg-primary/10 text-primary",value:"text-primary",chart:"var(--primary)"},gold:{chip:"bg-[var(--accent-brand)]/15 text-[var(--accent-brand)]",value:"text-[var(--accent-brand)]",chart:"var(--accent-brand)"},warning:{chip:"bg-amber-500/15 text-amber-600 dark:text-amber-400",value:"text-amber-600 dark:text-amber-400",chart:"#f59e0b"},coral:{chip:"bg-[#FB5C2C]/15 text-[#FB5C2C]",value:"text-foreground",chart:"#FB5C2C"}};function p(e){let{label:r,value:t,icon:n,hint:s,tone:l="default",delta:d,chart:c,className:m}=e,x=h[l];return(0,a.jsxs)("div",{className:(0,o.cn)("flex flex-col rounded-xl border border-border bg-card p-4",m),children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,a.jsx)("p",{className:"text-xs font-medium text-muted-foreground truncate",children:r}),n?(0,a.jsx)("span",{className:(0,o.cn)("flex h-9 w-9 shrink-0 items-center justify-center rounded-xl",x.chip),children:(0,a.jsx)(n,{className:"h-[18px] w-[18px]"})}):null]}),(0,a.jsx)("p",{className:(0,o.cn)("mt-2 text-2xl font-bold tracking-tight tabular-nums",x.value),children:(0,a.jsx)("bdi",{dir:"ltr",children:t})}),void 0!==d||s?(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2",children:[void 0!==d?(0,a.jsx)(i.Ru,{value:d}):null,s?(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground truncate",children:s}):null]}):null,c&&c.length>1?(0,a.jsx)(i.xj,{data:c,height:36,color:x.chart,className:"mt-3"}):null]})}function b(e){let{children:r,className:t}=e;return(0,a.jsx)("div",{className:(0,o.cn)("grid grid-cols-2 gap-3 lg:grid-cols-4",t),children:r})}function g(e){let{value:r,onChange:t,placeholder:n,className:s,inputProps:i}=e;return(0,a.jsxs)("div",{className:(0,o.cn)("relative",s),children:[(0,a.jsx)(l.A,{className:"absolute start-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground pointer-events-none"}),(0,a.jsx)("input",{type:"text",value:r,onChange:e=>t(e.target.value),placeholder:n,className:"w-full h-10 rounded-xl border border-border bg-card ps-9 pe-3 text-sm text-foreground placeholder:text-muted-foreground outline-none focus:border-primary/50 focus:ring-2 focus:ring-primary/15 transition-colors",...i})]})}let f={success:"bg-emerald-500/10 text-emerald-700 dark:text-emerald-400",warning:"bg-amber-500/10 text-amber-700 dark:text-amber-400",danger:"bg-red-500/10 text-red-700 dark:text-red-400",info:"bg-primary/10 text-primary",neutral:"bg-muted text-muted-foreground",gold:"bg-[var(--accent-brand)]/15 text-[#8a6400] dark:text-[var(--accent-brand)]"};function j(e){let{tone:r="neutral",children:t,className:n}=e;return(0,a.jsxs)("span",{className:(0,o.cn)("inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-[11px] font-semibold whitespace-nowrap",f[r],n),children:[(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-current opacity-70","aria-hidden":!0}),t]})}function v(e){let{icon:r,title:t,sub:n,cta:l,className:i}=e,d=l&&"object"==typeof l&&"href"in l;return(0,a.jsxs)("div",{className:(0,o.cn)("rounded-xl border border-dashed border-border bg-card px-6 py-14 text-center",i),children:[r?(0,a.jsx)("span",{className:"mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-primary/10",children:(0,a.jsx)(r,{className:"w-6 h-6 text-primary"})}):null,(0,a.jsx)("h3",{className:"text-base font-bold text-foreground",children:t}),n?(0,a.jsx)("p",{className:"mx-auto mt-1.5 max-w-sm text-sm text-muted-foreground",children:n}):null,l?(0,a.jsx)("div",{className:"mt-5",children:d?(0,a.jsx)(s(),{href:l.href,className:"inline-flex items-center gap-2 rounded-xl bg-primary px-5 py-2.5 text-sm font-bold text-primary-foreground hover:brightness-110 transition-all",children:l.label}):l}):null]})}function y(e){let{tone:r="info",children:t,action:n,className:s}=e;return(0,a.jsxs)("div",{className:(0,o.cn)("flex items-center justify-between gap-3 rounded-xl border px-4 py-3 text-sm",{info:"border-primary/20 bg-primary/5 text-foreground",warning:"border-amber-500/30 bg-amber-500/5 text-foreground",success:"border-emerald-500/25 bg-emerald-500/5 text-foreground"}[r],s),children:[(0,a.jsx)("div",{className:"min-w-0",children:t}),n?(0,a.jsx)("div",{className:"shrink-0",children:n}):null]})}function N(e){let{items:r,value:t,onChange:n,className:s}=e;return(0,a.jsx)("div",{className:(0,o.cn)("flex items-center gap-1 overflow-x-auto scrollbar-hide rounded-xl border border-border bg-card p-1",s),children:r.map(e=>{let r=e.value===t;return(0,a.jsxs)("button",{onClick:()=>n(e.value),className:(0,o.cn)("inline-flex items-center gap-1.5 whitespace-nowrap rounded-lg px-3 py-1.5 text-[13px] font-semibold transition-colors",r?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:[e.label,void 0!==e.count&&(0,a.jsx)("span",{className:(0,o.cn)("rounded-full px-1.5 text-[10px] font-bold tabular-nums",r?"bg-white/20":"bg-muted"),dir:"ltr",children:e.count})]},e.value)})})}},58861:(e,r,t)=>{t.r(r),t.d(r,{GeneralTab:()=>A});var a=t(54568),n=t(7620),s=t(60844),l=t(99935),o=t(72835),i=t(74624),d=t(9535
15),c=t(56178),m=t(91066),x=t(51166),u=t(3094),h=t(32158),p=t(74717),b=t(85132),g=t(25284),f=t(32190),j=t(11375),v=t(39470),y=t(69885),N=t(55017);function w(e){let{label:r,children:t,hint:s}=e,l=n.useId(),o=n.isValidElement(t)?n.cloneElement(t,{id:l}):t;return(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("label",{htmlFor:l,className:"block text-[11px] font-semibold text-muted-foreground uppercase tracking-wide",children:r}),o,s&&(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground/70",children:s})]})}function k(e){let{value:r,onChange:t,placeholder:n,type:s="text",disabled:l,icon:o,right:i,dir:d,readOnly:c,id:m}=e;return(0,a.jsxs)("div",{className:"relative",children:[o&&(0,a.jsx)(o,{className:"absolute start-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground pointer-events-none"}),(0,a.jsx)("input",{id:m,type:s,value:r,onChange:t?e=>t(e.target.value):void 0,placeholder:n,disabled:l,readOnly:c,dir:d,className:(0,b.cn)("w-full h-11 rounded-xl border bg-card text-sm text-foreground placeholder:text-muted-foreground transition-all outline-none","focus:ring-2 focus:ring-primary/15 focus:border-primary/50 border-border",o?"ps-10":"px-3.5",i?"pe-10":"pe-3.5",(l||c)&&"opacity-50 cursor-not-allowed")}),i&&(0,a.jsx)("div",{className:"absolute end-3 top-1/2 -translate-y-1/2",children:i})]})}function C(e){let{checked:r,onChange:t}=e;return(0,a.jsx)(g.d,{checked:r,onCheckedChange:()=>t()})}function A(e){var r,t,A,S;let{language:E}=e,{settings:F,setSettings:R}=(0,j.t)(),P="ar"===E,[I,M]=(0,n.useState)(""),[T,_]=(0,n.useState)("idle"),[z,L]=(0,n.useState)(""),[B,O]=(0,n.useState)(!1),[V,W]=(0,n.useState)(!1),[G,J]=(0,n.useState)(!1),Y=(0,n.useRef)(null);(0,n.useEffect)(()=>()=>{Y.current&&clearTimeout(Y.current)},[]);let $=async()=>{if(V&&"available"===T&&I){J(!0);try{let e=await (0,v.adminFetch)("/api/dashboard/change-subdomain",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({subdomain:I})}),r=await e.json();if(429===e.status){_("rate-limited"),L(r.error||(P?"وصلت إلى الحد اليومي لتغيير النطاق":"Daily subdomain change limit reached"));return}if(!e.ok||r.error)return void y.o.error(r.error||(P?"فشل تغيير النطاق الفرعي":"Failed to change subdomain"));y.o.success(P?"تم تغيير النطاق الفرعي بنجاح":"Subdomain changed successfully"),R(e=>
1({...e,subdomain:r.subdomain})),O(!1),M(""),_("idle"),W(!1)}catch(e){y.o.error(P?"فشل تغيير النطاق الفرعي":"Failed to change subdomain")}finally{J(!1)}}};return(0,a.jsxs)("div",{className:"max-w-lg space-y-5 mx-auto animate-in fade-in slide-in-from-left-4 duration-200",children:[(0,a.jsxs)(f.ap,{children:[(0,a.jsx)(f.r6,{title:P?"إدارة المخزون":"Inventory Management",hint:P?"تفعيل نظام المستودعات المتقدم":"Enable advanced warehouse system",action:(0,a.jsx)(C,{checked:"multi_warehouse"===F.inventoryMode,onChange:()=>R({...F,inventoryMode:"multi_warehouse"===F.inventoryMode?"global":"multi_warehouse"})})}),(0,a.jsx)("p",{className:"text-[12px] text-muted-foreground leading-relaxed",children:P?"عند تفعيل هذا الخيار، سيحترم المتجر كميات المخزون المتوفرة في المستودعات ولن يسمح بالطلب في حال نفاذ الكمية. في حال التعطيل، سيتم تجاهل حالة المخزون.":"When enabled, the store will respect stock quantities from warehouses and prevent ordering when out of stock. When disabled, stock status will be ignored."})]}),(0,a.jsxs)(f.ap,{children:[(0,a.jsx)(f.r6,{title:P?"نظام الحجوزات والمواعيد":"Booking & Reservations",hint:P?"تفعيل أو تعطيل نظام الحجوزات على مستوى المتجر":"Enable or disable the booking system store-wide",action:(0,a.jsx)(C,{checked:F.bookingsEnabled,onChange:()=>R({...F,bookingsEnabled:!F.bookingsEnabled})})}),(0,a.jsx)("p",{className:"text-[12px] text-muted-foreground leading-relaxed",children:P?"عند التعطيل، لن يظهر تقويم الحجز في صفحات المنتجات حتى لو كان مفعلاً على مستوى المنتج. يمكنك استخدام هذا الخيار لإيقاف جميع الحجوزات مؤقتاً.":"When disabled, the booking calendar will not appear on product pages even if booking is enabled per-product. Use this to temporarily pause all reservations."})]}),(0,a.jsxs)(f.ap,{children:[(0,a.jsx)(f.r6,{title:P?"معلومات المتجر":"Store Information",hint:P?"التفاصيل الأساسية لمتجرك":"Basic details about your store"}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(w,{label:P?"اسم المتجر":"Store Name",children:(0,a.jsx)(k,{value:F.name,onChange:e=>R({...F,name:e}),placeholder:P?"اسم متجرك":"Your store name",icon:d.A})}),(0,a.jsxs)("div",{className:"flex items-center justify-between py-2.5 border-t border-border",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-foreground leading-tight",children:P?"إخفاء اسم المتجر":"Hide Store Name"}),(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:P?"إظهار الشعار فقط في الهيدر":"Show only logo in header"})]}),(0,a.jsx)(C,{checked:!!F.homePageSettings.hideStoreName,onChange:()=>R({...F,homePageSettings:{...F.homePageSettings,hideStoreName:!F.homePageSettings.hideStoreName}})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,a.jsx)(w,{label:P?"الهاتف":"Phone",children:(0,a.jsx)(k,{value:F.phone,onChange:e=>R({...F,phone:e}),placeholder:"+966 5x xxx xxxx",icon:c.A,dir:"ltr"})}),(0,a.jsx)(w,{label:P?"واتساب":"WhatsApp",children:(0,a.jsx)(k,{value:F.whatsapp,onChange:e=>R({...F,whatsapp:e}),placeholder:"+966 5x xxx xxxx",icon:m.A,dir:"ltr"})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,a.jsx)(w,{label:P?"الدولة":"Country",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(x.A,{className:"absolute start-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground pointer-events-none z-10"}),(0,a.jsx)("select",{value:F.country||"EG",onChange:e=>{let r=e.target.value,t=(0,N.JJ)(r);R({...F,country:r,currency:(null==t?void 0:t.currency)||F.currency,vatRate:(0,N.Rs)(r)})},dir:"ltr",className:(0,b.cn)("w-full h-11 ps-10 pe-3 rounded-xl border bg-card text-sm text-foreground","border-border focus:ring-2 focus:ring-primary/15 focu
1s:border-primary/50 outline-none appearance-none"),children:N.gk.map(e=>(0,a.jsxs)("option",{value:e.code,className:"bg-background",children:[e.flag," ",P?e.nameAr:e.name]},e.code))})]})}),(0,a.jsx)(w,{label:P?"العملة":"Currency",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(u.A,{className:"absolute start-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground pointer-events-none z-10"}),(0,a.jsx)("select",{value:F.currency,onChange:e=>R({...F,currency:e.target.value}),dir:"ltr",className:(0,b.cn)("w-full h-11 ps-10 pe-3 rounded-xl border bg-card text-sm text-foreground","border-border focus:ring-2 focus:ring-primary/15 focus:border-primary/50 outline-none appearance-none"),children:Object.values(N.VK).sort((e,r)=>e.code.localeCompare(r.code)).map(e=>(0,a.jsxs)("option",{value:e.code,className:"bg-background",children:[e.code," — ",e.name]},e.code))})]})})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between py-3 border-t border-border",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-foreground leading-tight",children:P?"تفعيل ضريبة القيمة المضافة":"Charge VAT"}),(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:(null!=(r=F.vatRate)?r:0)>0?P?"".concat(((null!=(t=F.vatRate)?t:0)*100).toFixed(0),"% — تظهر كبند منفصل في صفحة الدفع"):"".concat(((null!=(A=F.vatRate)?A:0)*100).toFixed(0),"% — shown as a line item at checkout"):P?"لا تُطبَّق ضريبة على الطلبات":"No tax applied to orders"})]}),(0,a.jsx)(g.d,{"aria-label":P?"تفعيل ضريبة القيمة المضافة":"Charge VAT",checked:(null!=(S=F.vatRate)?S:0)>0,onCheckedChange:e=>{R({...F,vatRate:e?(0,N.Rs)(F.country||"EG"):0})}})]}),(0,a.jsxs)("div",{className:"pt-1 border-t border-border",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wide",children:P?"النطاق الفرعي":"Subdomain"}),(0,a.jsx)("p",{className:"text-sm text-foreground mt-0.5 font-mono",children:F.subdomain?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-muted-foreground",children:F.subdomain}),(0,a.jsx)("span",{className:"text-muted-foreground/50",children:".baseet.cc"})]}):(0,a.jsx)("span",{className:"text-muted-foreground/50 font-sans",children:P?"لا يوجد نطاق":"Not set"})})]}),!B&&(0,a.jsx)("button",{type:"button",onClick:()=>O(!0),className:"text-[11px] font-semibold text-primary transition-colors px-3 py-1.5 rounded-lg bg-primary/10 hover:bg-primary/15 border border-primary/20",children:P?"تغيير":"Change"})]}),B&&(0,a.jsxs)("div",{className:"space-y-3 p-4 rounded-xl bg-card border border-border",children:[(0,a.jsx)(k,{value:I,onChange:e=>{let r=e.toLowerCase().replace(/[^a-z0-9-]/g,"");M(r),_("idle"),L(""),W(!1),r&&r!==F.subdomain&&(Y.current&&clearTimeout(Y.current),Y.current=setTimeout(async()=>{_("checking");try{let e=await (0,v.adminFetch)("/api/dashboard/change-subdomain",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({subdomain:r})}),t=await e.json();t.error?(_("error"),L(t.error)):(_(t.available?"available":"unavailable"),t.available||L(P?"النطاق الفرعي مستخدم بالفعل":"Subdomain is already taken"))}catch(e){_("error"),L(P?"تعذر التحقق من التوفر":"Could not check availability")}},600))},placeholder:P?"اسم-متجرك":"your-store",icon:h.A,dir:"ltr",right:(0,a.jsx)(()=>"checking"===T?(0,a.jsx)(s.A,{className:"w-4 h-4 text-muted-foreground animate-spin motion-reduce:animate-none"}):"available"===T?(0,a.jsx)(l.A,{className:"w-4 h-4 text-emerald-500 dark:text-emerald-400"}):"unavailable"===T||"error"===T?(0,a.jsx)(o.A,{className:"w-4 h-4 text-red-500 dark:text-red-400"}):"rate-limited"===T?(0,a.jsx)(i.A,{className:"w-4 h-4 text-amber-500 dark:text-amber-400"}):null,{})}),I&&"available"===T&&(0,a.jsxs)("p",{className:"text-[11px] text-emerald-500 dark:text-emerald-400 flex items-center gap-1.5",children:[(0,a.jsx)(l.A,{className:"w-3 h-3"}),P?"".concat(I,".baseet.cc متاح"):"".concat(I,".baseet.cc is available")]}),("unavailable"===T||"error"===T)&&z&&(0,a.jsxs)("p",{className:"text-[11px] text-red-500 dark:text-red-400 flex items-center gap-1.5",children:[(0,a.jsx)(o.A,{className:"w-3 h-3"}),z]}),"rate-limited"===T&&(0,a.jsx)(f.Mw,{tone:"warning",className:"items-start text-[11px]",children:(0,a.jsxs)("span",{className:"flex items-start gap-2.5",children:[(0,a.jsx)(i.A,{className:"w-3.5 h-3.5 flex-shrink-0 mt-0.5"}),(0,a.jsx)("span",{children:z})]})}),"available"===T&&(0,a.jsx)(f.Mw,{tone:"warning",className:"items-start text-[11px]",children:(0,a.jsxs)("span",{className:"flex items-start gap-2.5",children:[(0,a.jsx)(p.A,{className:"w-3.5 h-3.5 flex-shrink-0 mt-0.5"}),(0,a.jsx)("span",{children:P?"سيتم تحرير نطاقك القديم فوراً وسيصبح متاحاً لأي شخص. أي روابط أو QR codes تستخدم النطاق القديم ستتوقف عن العمل.":"Your old subdomain will be released immediately and available for anyone to claim. Any links or QR codes using the old subdomain will stop working."})]})}),"available"===T&&(0,a.jsxs)("label",{className:"flex items-start gap-2.5 cursor-pointer select-none",children:[(0,a.jsx)("input",{type:"checkbox",checked:V,onChange:e=>W(e.target.checked),className:"mt-0.5 accent-primary rounded"}),(0,a.jsx)("span",{className:"text-[11px] text-muted-foreground leading-relaxed",children:P?"أفهم أن النطاق القديم سيُحرر فوراً":"I understand my old subdomain will be released immediately"})]}),(0,a.jsxs)("div",{className:(0,b.cn)("flex gap-2 pt-1",P&&"flex-row-reverse"),children:[(0,a.jsxs)("button",{type:"button",onClick:$,disabled:!V||"available"!==T||G,className:(0,b.cn)("flex items-center gap-2 px-4 py-2.5 rounded-xl text-sm font-bold transition-all",V&&"available"===T&&!G?"bg-primary hover:brightness-110 text-primary-foreground":"bg-muted text-muted-foreground cursor-not-allowed"),children:[G&&(0,a.jsx)(s.A,{className:"w-3.5 h-3.5 animate-spin motion-reduce:animate-none"}),P?"تأكيد التغيير":"Confirm Change"]}),(0,a.jsx)("button",{type:"button",onClick:()=>{O(!1),M(""),_("idle"),L(""),W(!1)},className:"px-4 py-2.5 rounded-xl text-sm font-medium text-muted-foreground hover:text-foreground bg-muted hover:bg-muted/80 transition-colors",children:P?"إلغاء":"Cancel"})]})]})]})]})]})]})}},85132:(e,r,t)=>{t.d(r,{cn:()=>s,vv:()=>l});var a=t(72902),n=t(13714);function s(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return(0,n.QP)((0,a.$)(r))}function l(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"EGP",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";return new Intl.NumberFormat("ar"===t?"ar-EG":"en-US",{style:"currency",currency:r,minimumFractionDigits:0,maximumFractionDigits:0}).format(e)}},89355:(e,r,t)=>{t.d(r,{cn:()=>s});var a=t(72902),n=t(13714);function s(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return(0,n.QP)((0,a.$)(r))}}}]);

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.