module.exports=[9307,a=>{"use strict";var b=a.i(717);a.i(70396);var c=a.i(73727),d=a.i(16349),e=a.i(31507);let f=(0,b.cache)(async()=>{if(!(0,e.isSupabaseConfigured)())return null;let a=await (0,d.createServerSupabaseClient)(),{data:{user:b}}=await a.auth.getUser();if(!b)return null;let{data:c}=await a.from("profiles").select("id, role, full_name, phone, login_username, must_change_password, deleted_at, is_active, last_activity_at, created_at, updated_at").eq("id",b.id).single();return c??null});async function g(a){let b=await f();return b||(0,c.redirect)(`/login?next=${"admin"===a?"/admin":"/donor"}`),b.is_active||(0,c.redirect)("/login?error=inactive"),a&&b.role!==a&&(0,c.redirect)("admin"===b.role?"/admin":"/donor"),b}a.s(["getCurrentProfile",0,f,"requireProfile",0,g])},93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},71306,(a,b,c)=>{b.exports=a.r(18622)},79847,a=>{a.n(a.i(3343))},9185,a=>{a.n(a.i(29432))},72842,a=>{a.n(a.i(75164))},54897,a=>{a.n(a.i(30106))},56157,a=>{a.n(a.i(18970))},94331,a=>{a.n(a.i(60644))},15988,a=>{a.n(a.i(56952))},25766,a=>{a.n(a.i(77341))},29725,a=>{a.n(a.i(94290))},90833,a=>{a.n(a.i(46994))},5785,a=>{a.n(a.i(90588))},74793,a=>{a.n(a.i(33169))},85826,a=>{a.n(a.i(37111))},21565,a=>{a.n(a.i(41763))},65911,a=>{a.n(a.i(8950))},25128,a=>{a.n(a.i(91562))},40781,a=>{a.n(a.i(49670))},69411,a=>{a.n(a.i(75700))},63081,a=>{a.n(a.i(276))},62837,a=>{a.n(a.i(40795))},34607,a=>{a.n(a.i(11614))},96338,a=>{a.n(a.i(21751))},50642,a=>{a.n(a.i(12213))},32242,a=>{a.n(a.i(22693))},88530,a=>{a.n(a.i(10531))},8583,a=>{a.n(a.i(1082))},38534,a=>{a.n(a.i(98175))},70408,a=>{a.n(a.i(9095))},22922,a=>{a.n(a.i(96772))},78294,a=>{a.n(a.i(71717))},16625,a=>{a.n(a.i(85034))},88648,a=>{a.n(a.i(68113))},51914,a=>{a.n(a.i(66482))},25466,a=>{a.n(a.i(91505))},1269,a=>{"use strict";var b=a.i(717);let c=(...a)=>a.filter((a,b,c)=>!!a&&""!==a.trim()&&c.indexOf(a)===b).join(" ").trim();var d={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let e=(0,b.forwardRef)(({color:a="currentColor",size:e=24,strokeWidth:f=2,absoluteStrokeWidth:g,className:h="",children:i,iconNode:j,...k},l)=>(0,b.createElement)("svg",{ref:l,...d,width:e,height:e,stroke:a,strokeWidth:g?24*Number(f)/Number(e):f,className:c("lucide",h),...k},[...j.map(([a,c])=>(0,b.createElement)(a,c)),...Array.isArray(i)?i:[i]]));a.s(["default",0,(a,d)=>{let f=(0,b.forwardRef)(({className:f,...g},h)=>(0,b.createElement)(e,{ref:h,iconNode:d,className:c(`lucide-${a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,f),...g}));return f.displayName=`${a}`,f}],1269)},5532,a=>{"use strict";a.s(["LoginForm",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LoginForm() from the server but LoginForm is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/forms/login-form.tsx <module evaluation>","LoginForm")},71573,a=>{"use strict";a.s(["LoginForm",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LoginForm() from the server but LoginForm is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/forms/login-form.tsx","LoginForm")},89584,a=>{"use strict";a.i(5532);var b=a.i(71573);a.n(b)},46658,a=>{"use strict";var b=a.i(7997);a.i(70396);var c=a.i(73727);let d=(0,a.i(1269).default)("LockKeyhole",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]);var e=a.i(89584),f=a.i(9307),g=a.i(31507);async function h(){let a=await (0,f.getCurrentProfile)();a?.is_active&&(0,c.redirect)("admin"===a.role?"/admin":"/donor");let h=(0,g.isSupabaseConfigured)();return(0,b.jsx)("section",{className:"grid min-h-dvh place-items-center px-3 py-6 sm:px-6",children:(0,b.jsxs)("div",{className:"w-full max-w-md rounded-lg border border-[var(--border)] bg-white p-5 sm:p-8",children:[(0,b.jsx)("span",{className:"grid size-11 place-items-center rounded-md bg-[#dceeed] text-[var(--primary)]",children:(0,b.jsx)(d,{size:22,"aria-hidden":!0})}),(0,b.jsx)("h1",{className:"mt-5 text-xl font-black leading-8 sm:text-2xl",children:"تسجيل دخول المسؤول والمتبرع"}),(0,b.jsx)("p",{className:"mt-2 mb-7 text-sm leading-7 text-[var(--ink-soft)]",children:"استخدم بريد المسؤول أو رقم هاتف المتبرع مع كلمة المرور."}),(0,b.jsx)(e.LoginForm,{configured:h})]})})}a.s(["default",0,h,"dynamic",0,"force-dynamic","metadata",0,{title:"تسجيل الدخول",robots:{index:!1,follow:!1}}],46658)},73475,a=>{a.n(a.i(46658))}];

//# sourceMappingURL=%5Broot-of-the-server%5D__1wxpyqd._.js.map