module.exports=[193695,(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"))},650645,a=>{a.n(a.i(827572))},923576,a=>{a.n(a.i(104858))},517537,a=>{a.n(a.i(903363))},13718,a=>{a.n(a.i(685523))},118198,a=>{a.n(a.i(545518))},262212,a=>{a.n(a.i(866114))},438478,a=>{a.n(a.i(827478))},845662,a=>a.a(async(b,c)=>{try{var d=a.i(766518),e=b([d]);function f(){return d.prisma.sop.findMany({orderBy:{updatedAt:"desc"},include:{category:!0,author:{select:{id:!0,name:!0}},reviewer:{select:{id:!0,name:!0}},approver:{select:{id:!0,name:!0}}}})}function g(a){return d.prisma.sop.findUnique({where:{id:a},include:{category:!0,author:{select:{id:!0,name:!0}},reviewer:{select:{id:!0,name:!0}},approver:{select:{id:!0,name:!0}}}})}function h(){return d.prisma.user.findMany({where:{isActive:!0},select:{id:!0,name:!0,role:!0},orderBy:{name:"asc"}})}[d]=e.then?(await e)():e,a.s(["getSopById",()=>g,"getSops",()=>f,"getUsers",()=>h]),c()}catch(a){c(a)}},!1),809369,a=>a.a(async(b,c)=>{try{var d=a.i(766518),e=b([d]);function f(){return d.prisma.sopCategory.findMany({orderBy:{sortOrder:"asc"},include:{_count:{select:{sops:!0}}}})}[d]=e.then?(await e)():e,a.s(["getSopCategories",()=>f]),c()}catch(a){c(a)}},!1),455460,a=>{"use strict";a.s(["SopForm",()=>b]);let b=(0,a.i(211857).registerClientReference)(function(){throw Error("Attempted to call SopForm() from the server but SopForm 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/app/(sa-tools)/sa-tools/sops/_components/SopForm.tsx <module evaluation>","SopForm")},739917,a=>{"use strict";a.s(["SopForm",()=>b]);let b=(0,a.i(211857).registerClientReference)(function(){throw Error("Attempted to call SopForm() from the server but SopForm 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/app/(sa-tools)/sa-tools/sops/_components/SopForm.tsx","SopForm")},789023,a=>{"use strict";a.i(455460);var b=a.i(739917);a.n(b)},774466,a=>a.a(async(b,c)=>{try{var d=a.i(907997);a.i(570396);var e=a.i(673727),f=a.i(109307),g=a.i(451569),h=a.i(809369),i=a.i(845662),j=a.i(789023),k=b([f,h,i]);async function l(){let a=await (0,f.auth)();a?.user||(0,e.redirect)("/admin/login");let b=a.user.role;(0,g.hasPermission)(b,"sops.create")||(0,e.redirect)("/sa-tools/sops");let[c,k]=await Promise.all([(0,h.getSopCategories)(),(0,i.getUsers)()]);return(0,d.jsx)(j.SopForm,{categories:c,users:k})}[f,h,i]=k.then?(await k)():k,a.s(["default",()=>l]),c()}catch(a){c(a)}},!1)];

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