1 line
57 KiB
JavaScript
1 line
57 KiB
JavaScript
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9217],{87498:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>K});var r=a(95155),t=a(12115),l=a(34964),i=a(89852),n=a(97168),d=a(99474),c=a(95784),o=a(95139),m=a(88482),x=a(88145),u=a(54416),h=a(99890),g=a(42337),p=a(85339),b=a(5196),f=a(17580),j=a(47924),v=a(12318),N=a(49103),y=a(14503),w=a(67133),C=a(51154),k=a(12108);function S(e){var s;let{type:a,missionId:l,onUploadComplete:i,onFileSelect:d,maxSize:c=5242880,acceptedFileTypes:o="logo"===a?"image/*":".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png",isNewMission:m=!1}=e;console.log("FileUpload component initialized with props:",{type:a,missionId:l,hasMissionId:!!l,maxSize:c,acceptedFileTypes:o});let{data:x}=(0,k.useSession)(),[h,p]=(0,t.useState)(!1),[f,j]=(0,t.useState)(!1),[v,N]=(0,t.useState)(0),[w,S]=(0,t.useState)(null),[A,E]=(0,t.useState)(null),z=(0,t.useRef)(null),F=(0,t.useRef)(!0);(0,t.useEffect)(()=>()=>{F.current=!1},[]),(0,t.useEffect)(()=>{var e;console.log("Session state in FileUpload:",{isSessionLoaded:!!x,hasUser:!!(null==x?void 0:x.user),userId:null==x||null==(e=x.user)?void 0:e.id})},[x]),(0,t.useEffect)(()=>{console.log("MissionId in FileUpload component:",l)},[l]);let R=e=>{if(e.size>c)return E("File size exceeds the limit of ".concat(c/1048576,"MB")),!1;if("logo"===a&&!e.type.startsWith("image/"))return E("Only image files are allowed for logo"),!1;if("attachment"===a){var s;let a=null==(s=e.name.split(".").pop())?void 0:s.toLowerCase(),r=["pdf","doc","docx","xls","xlsx","jpg","jpeg","png"];if(a&&!r.includes(a))return E("File type .".concat(a," is not allowed. Allowed types: ").concat(r.join(", "))),!1}return E(null),!0},L=async()=>{var e;if(!w){console.error("Upload failed: No file selected"),(0,y.oR)({title:"Upload failed",description:"No file selected. Please select a file first.",variant:"destructive"});return}if(!(null==x||null==(e=x.user)?void 0:e.id)){console.error("Upload failed: No user session"),(0,y.oR)({title:"Authentication required",description:"You need to be logged in to upload files. Please log in and try again.",variant:"destructive"});return}if(m){d&&d(w),(0,y.oR)({title:"File selected",description:"The file will be uploaded when you save the mission.",variant:"default"});return}if(!l){console.error("Upload failed: Missing mission ID"),(0,y.oR)({title:"Upload failed",description:"Missing mission ID. Please refresh the page and try again.",variant:"destructive"});return}console.log("Starting upload process...",{fileName:w.name,fileSize:w.size,fileType:w.type,missionId:l,userId:x.user.id,uploadType:a}),j(!0),N(0);try{let e=new FormData;e.append("file",w),e.append("missionId",l),e.append("type",a),console.log("FormData prepared, sending to API...");let s=await fetch("/api/missions/upload",{method:"POST",body:e});if(console.log("API response received:",{status:s.status,statusText:s.statusText,ok:s.ok}),!s.ok){let e=await s.json();throw console.error("API returned error:",e),Error(e.error||"Upload failed")}let r=await s.json();console.log("Upload successful, result:",r),F.current&&(N(100),setTimeout(()=>{F.current&&(S(null),j(!1),N(0),i&&i(r)),(0,y.oR)({title:"File uploaded successfully",description:"logo"===a?"Logo has been updated":"".concat(w.name," has been added to attachments"),variant:"default"})},1e3))}catch(e){console.error("Upload error details:",e),F.current&&j(!1),(0,y.oR)({title:"Upload failed",description:e instanceof Error?e.message:"An error occurred during upload",variant:"destructive"})}};return(0,r.jsx)("div",{className:"w-full",children:w?(0,r.jsxs)("div",{className:"border rounded-md p-4 bg-white",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,r.jsx)("div",{className:"flex-shrink-0 h-10 w-10 bg-gray-100 rounded-md flex items-center justify-center",children:"logo"===a?(0,r.jsx)("img",{src:URL.createObjectURL(w),alt:"Preview",className:"h-full w-full object-cover rounded-md"}):(0,r.jsx)("div",{className:"text-xs font-bold bg-blue-100 text-blue-600 h-full w-full rounded-md flex items-center justify-center",children:null==(s=w.name.split(".").pop())?void 0:s.toUpperCase()})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-gray-900 truncate",children:w.name}),(0,r.jsxs)("p",{className:"text-xs text-gray-500",children:[(w.size/1024).toFixed(2)," KB"]})]})]}),(0,r.jsx)("div",{className:"flex items-center space-x-2",children:f?(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(C.A,{className:"animate-spin h-4 w-4 mr-1 text-blue-500"}),(0,r.jsxs)("span",{className:"text-xs text-gray-500",children:[v,"%"]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.$,{variant:"ghost",size:"sm",className:"text-red-500 hover:text-red-700 hover:bg-red-50",onClick:()=>{S(null),E(null)},children:(0,r.jsx)(u.A,{className:"h-4 w-4"})}),!m&&(0,r.jsxs)(n.$,{variant:"default",size:"sm",className:"bg-blue-600 hover:bg-blue-700 text-white",onClick:L,children:[(0,r.jsx)(b.A,{className:"h-4 w-4 mr-1"}),"Upload"]})]})})]}),f&&(0,r.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-1.5 mt-3",children:(0,r.jsx)("div",{className:"bg-blue-600 h-1.5 rounded-full",style:{width:"".concat(v,"%")}})})]}):(0,r.jsx)("div",{className:"border-2 border-dashed rounded-md p-6 text-center transition-colors ".concat(h?"border-blue-500 bg-blue-50":"border-gray-300 bg-gray-50"),onDragOver:e=>{e.preventDefault(),e.stopPropagation(),p(!0)},onDragLeave:e=>{e.preventDefault(),e.stopPropagation(),p(!1)},onDrop:e=>{if(e.preventDefault(),e.stopPropagation(),p(!1),e.dataTransfer.files&&e.dataTransfer.files.length>0){let s=e.dataTransfer.files[0];R(s)&&(S(s),m&&d&&d(s))}},children:(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center",children:[(0,r.jsx)(g.A,{className:"h-10 w-10 text-gray-400 mb-2"}),(0,r.jsx)("p",{className:"text-sm mb-2 font-medium text-gray-700",children:"logo"===a?"Upload logo image":"Upload attachment"}),(0,r.jsx)("p",{className:"text-xs text-gray-500 mb-4",children:"Drag and drop or click to browse"}),(0,r.jsx)(n.$,{variant:"outline",size:"sm",className:"bg-white text-gray-700 border-gray-300 hover:bg-gray-50",onClick:()=>{var e;return null==(e=z.current)?void 0:e.click()},children:"Browse Files"}),(0,r.jsx)("input",{type:"file",ref:z,className:"hidden",onChange:e=>{if(e.target.files&&e.target.files.length>0){let s=e.target.files[0];R(s)&&(S(s),m&&d&&d(s))}},accept:o}),A&&(0,r.jsx)("p",{className:"text-xs text-red-500 mt-2",children:A})]})})})}var A=a(27213),E=a(57434),z=a(64261),F=a(75761),R=a(73032),L=a(45517),D=a(50773),P=a(91788),T=a(62525),U=a(16559);function I(e){let{missionId:s,initialAttachments:a=[],allowUpload:l=!0,allowDelete:i=!0,onAttachmentAdded:d,onAttachmentDeleted:c}=e,{data:o}=(0,k.useSession)(),[m,x]=(0,t.useState)(a),[u,g]=(0,t.useState)(!1),[p,b]=(0,t.useState)(null),[f,j]=(0,t.useState)(!1);(0,t.useEffect)(()=>{0===a.length&&v()},[s]);let v=async()=>{var e;if(s&&(null==o||null==(e=o.user)?void 0:e.id)){g(!0);try{let e=await fetch("/api/missions/".concat(s,"/attachments"));if(!e.ok)throw Error("Failed to fetch attachments");let a=await e.json();x(a)}catch(e){console.error("Error fetching attachments:",e),(0,y.oR)({title:"Error",description:"Failed to load attachments",variant:"destructive"})}finally{g(!1)}}},N=async()=>{if(p)try{if(!(await fetch("/api/missions/".concat(s,"/attachments/").concat(p.id),{method:"DELETE"})).ok)throw Error("Failed to delete attachment");x(e=>e.filter(e=>e.id!==p.id)),c&&c(p.id),(0,y.oR)({title:"Success",description:"Attachment deleted successfully",variant:"default"})}catch(e){console.error("Error deleting attachment:",e),(0,y.oR)({title:"Error",description:"Failed to delete attachment",variant:"destructive"})}finally{b(null)}},w=e=>{if(e.startsWith("image/"))return(0,r.jsx)(A.A,{className:"h-5 w-5 text-blue-500"});if(e.includes("pdf"))return(0,r.jsx)(E.A,{className:"h-5 w-5 text-red-500"});if(e.includes("spreadsheet")||e.includes("excel")||e.includes("csv"))return(0,r.jsx)(z.A,{className:"h-5 w-5 text-green-500"});if(e.includes("zip")||e.includes("compressed"))return(0,r.jsx)(F.A,{className:"h-5 w-5 text-purple-500"});if(e.includes("video"))return(0,r.jsx)(R.A,{className:"h-5 w-5 text-pink-500"});else if(e.includes("audio"))return(0,r.jsx)(L.A,{className:"h-5 w-5 text-orange-500"});else return(0,r.jsx)(h.A,{className:"h-5 w-5 text-gray-500"})},I=e=>e<1024?"".concat(e," B"):e<1048576?"".concat((e/1024).toFixed(1)," KB"):"".concat((e/1048576).toFixed(1)," MB");return(0,r.jsxs)("div",{className:"space-y-4",children:[l&&!f&&(0,r.jsx)("div",{className:"flex justify-end",children:(0,r.jsxs)(n.$,{variant:"outline",size:"sm",onClick:()=>j(!0),className:"bg-white text-gray-700 border-gray-300 hover:bg-gray-50",children:[(0,r.jsx)(D.A,{className:"h-4 w-4 mr-1"}),"Add Attachment"]})}),f&&(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("h4",{className:"text-sm font-medium mb-2 text-gray-700",children:"Upload New Attachment"}),(0,r.jsx)(S,{type:"attachment",missionId:s,onUploadComplete:e=>{(null==e?void 0:e.attachment)&&(x(s=>[...s,e.attachment]),j(!1),d&&d(e.attachment))},isNewMission:!1}),(0,r.jsx)("div",{className:"mt-2 flex justify-end",children:(0,r.jsx)(n.$,{variant:"ghost",size:"sm",onClick:()=>j(!1),className:"text-gray-500",children:"Cancel"})})]}),u?(0,r.jsx)("div",{className:"flex justify-center items-center p-8",children:(0,r.jsx)(C.A,{className:"h-8 w-8 animate-spin text-gray-400"})}):0===m.length?(0,r.jsxs)("div",{className:"text-center p-8 bg-gray-50 border border-gray-200 rounded-md",children:[(0,r.jsx)(h.A,{className:"h-10 w-10 text-gray-300 mx-auto mb-2"}),(0,r.jsx)("p",{className:"text-sm text-gray-500",children:"No attachments yet"}),l&&(0,r.jsxs)(n.$,{variant:"outline",size:"sm",onClick:()=>j(!0),className:"mt-4 bg-white text-gray-700 border-gray-300 hover:bg-gray-50",children:[(0,r.jsx)(D.A,{className:"h-4 w-4 mr-1"}),"Add your first attachment"]})]}):(0,r.jsx)("div",{className:"border rounded-md overflow-hidden",children:(0,r.jsx)("ul",{className:"divide-y",children:m.map(e=>(0,r.jsxs)("li",{className:"flex items-center justify-between p-3 hover:bg-gray-50",children:[(0,r.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,r.jsx)("div",{className:"flex-shrink-0",children:w(e.fileType)}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium text-sm text-gray-900",children:e.filename}),(0,r.jsxs)("p",{className:"text-xs text-gray-500",children:[I(e.fileSize)," • ",new Date(e.createdAt).toLocaleDateString()]})]})]}),(0,r.jsxs)("div",{className:"flex space-x-1",children:[(0,r.jsx)(n.$,{variant:"ghost",size:"sm",asChild:!0,className:"text-gray-500 hover:text-gray-700 hover:bg-gray-100",children:(0,r.jsx)("a",{href:"/api/missions/".concat(s,"/attachments/download/").concat(e.id),download:e.filename,children:(0,r.jsx)(P.A,{className:"h-4 w-4"})})}),i&&(0,r.jsx)(n.$,{variant:"ghost",size:"sm",onClick:()=>b(e),className:"text-red-500 hover:text-red-700 hover:bg-red-50",children:(0,r.jsx)(T.A,{className:"h-4 w-4"})})]})]},e.id))})}),(0,r.jsx)(U.Lt,{open:!!p,onOpenChange:e=>!e&&b(null),children:(0,r.jsxs)(U.EO,{children:[(0,r.jsxs)(U.wd,{children:[(0,r.jsx)(U.r7,{children:"Delete Attachment"}),(0,r.jsxs)(U.$v,{children:['Are you sure you want to delete "',null==p?void 0:p.filename,'"? This action cannot be undone.']})]}),(0,r.jsxs)(U.ck,{children:[(0,r.jsx)(U.Zr,{children:"Cancel"}),(0,r.jsx)(U.Rx,{onClick:N,className:"bg-red-600 hover:bg-red-700 text-white",children:"Delete"})]})]})})]})}var O=a(35695);function $(){let e=(0,O.useRouter)(),[s,a]=(0,t.useState)([]),[C,k]=(0,t.useState)([]),[A,E]=(0,t.useState)(""),[z,F]=(0,t.useState)("users"),[R,L]=(0,t.useState)(null),[D,P]=(0,t.useState)(null),[T,U]=(0,t.useState)(null),[$,M]=(0,t.useState)([]),[B,G]=(0,t.useState)(""),[V,q]=(0,t.useState)("general"),[X,_]=(0,t.useState)(!1),[J,W]=(0,t.useState)(null),[Z,K]=(0,t.useState)([]),[H,Y]=(0,t.useState)({}),[Q,ee]=(0,t.useState)([]),[es,ea]=(0,t.useState)([]),[er,et]=(0,t.useState)(!0),el=null!==R&&null!==D&&null!==T;(0,t.useEffect)(()=>{(async()=>{et(!0);try{await Promise.all([ei(),en()])}catch(e){console.error("Error fetching data:",e)}finally{et(!1)}})()},[]);let ei=async()=>{try{let e=await fetch("/api/users");if(!e.ok)throw Error("Failed to fetch users");let s=await e.json();ee(s)}catch(e){console.error("Error fetching users:",e),(0,y.oR)({title:"Erreur",description:"Erreur lors de la r\xe9cup\xe9ration des utilisateurs",variant:"destructive"})}},en=async()=>{try{let e=await fetch("/api/groups");if(!e.ok)throw Error("Failed to fetch groups");let s=await e.json(),a=await Promise.all((Array.isArray(s)?s:[]).map(async e=>{try{let s=await fetch("/api/groups/".concat(e.id,"/members"));if(s.ok){let a=await s.json();return{...e,membersCount:Array.isArray(a)?a.length:0}}return{...e,membersCount:0}}catch(s){return console.error("Error fetching members for group ".concat(e.id,":"),s),{...e,membersCount:0}}}));ea(a)}catch(e){console.error("Error fetching groups:",e),(0,y.oR)({title:"Erreur",description:"Erreur lors de la r\xe9cup\xe9ration des groupes",variant:"destructive"})}},ed=Q.filter(e=>{var s,a,r,t;return((null==(s=e.username)?void 0:s.toLowerCase())||"").includes(A.toLowerCase())||((null==(a=e.email)?void 0:a.toLowerCase())||"").includes(A.toLowerCase())||((null==(r=e.firstName)?void 0:r.toLowerCase())||"").includes(A.toLowerCase())||((null==(t=e.lastName)?void 0:t.toLowerCase())||"").includes(A.toLowerCase())}),ec=es.filter(e=>{var s;return((null==(s=e.name)?void 0:s.toLowerCase())||"").includes(A.toLowerCase())}),eo=e=>R===e||D===e||T===e||$.includes(e),em=e=>{let s=[];return R===e&&s.push("temps"),D===e&&s.push("parole"),T===e&&s.push("memoire"),$.includes(e)&&s.push("volontaire"),s},ex=e=>{switch(e){case"temps":return"Gardien du Temps";case"parole":return"Gardien de la Parole";case"memoire":return"Gardien de la M\xe9moire";case"volontaire":return"Volontaire";default:return""}},eu=(e,s)=>{$.includes(e)&&M(s=>s.filter(s=>s!==e)),"temps"===s?L(e):"parole"===s?P(e):"memoire"===s&&U(e),(0,y.oR)({title:"R\xf4le assign\xe9",description:"L'utilisateur a \xe9t\xe9 assign\xe9 comme ".concat(ex(s))})},eh=e=>{eg(e),M(s=>[...s,e]),(0,y.oR)({title:"R\xf4le assign\xe9",description:"L'utilisateur a \xe9t\xe9 assign\xe9 comme Volontaire"})},eg=e=>{R===e&&L(null),D===e&&P(null),T===e&&U(null),$.includes(e)&&M(s=>s.filter(s=>s!==e))},ep=async e=>{try{let s=await fetch("/api/groups/".concat(e,"/members"));if(!s.ok)throw Error("Failed to fetch group members");return await s.json()}catch(s){return console.error("Error fetching members for group ".concat(e,":"),s),(0,y.oR)({title:"Erreur",description:"Erreur lors de la r\xe9cup\xe9ration des membres du groupe",variant:"destructive"}),[]}},eb=async(e,s)=>{try{et(!0);let a=await ep(e);Array.isArray(a)&&a.length>0?(ee(a),F("users"),E(""),(0,y.oR)({title:"Membres de ".concat(s),description:"".concat(a.length," membres trouv\xe9s et affich\xe9s ci-dessous")})):(0,y.oR)({title:"Membres de ".concat(s),description:"Aucun membre trouv\xe9 dans ce groupe"})}catch(e){console.error("Error handling group members:",e),(0,y.oR)({title:"Erreur",description:"Erreur lors de l'affichage des membres du groupe",variant:"destructive"})}finally{et(!1)}},ef=()=>{let e=["general","details","attachments","skills","membres"],s=e.indexOf(V);s<e.length-1&&q(e[s+1])},ej=()=>"membres"===V,ev=()=>{let e={name:!!H.name,oddScope:Array.isArray(H.oddScope)&&H.oddScope.length>0,niveau:!!H.niveau,intention:!!H.intention,missionType:!!H.missionType,donneurDOrdre:!!H.donneurDOrdre,projection:!!H.projection,participation:!!H.participation,gardiens:null!==R&&null!==D&&null!==T},s=Object.values(e).every(e=>!0===e);if(!s){let s=Object.entries(e).filter(e=>{let[s,a]=e;return!1===a}).map(e=>{let[s,a]=e;return s});(0,y.oR)({title:"Champs obligatoires manquants",description:"Veuillez remplir tous les champs obligatoires: ".concat(s.join(", ")),variant:"destructive"})}return s},eN=async()=>{if(ev()){_(!0);try{var a;let r={...H,services:s,profils:C,guardians:{"gardien-temps":R,"gardien-parole":D,"gardien-memoire":T},volunteers:$},t=await fetch("/api/missions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!t.ok){let e=await t.json();throw Error(e.error||"Failed to create mission")}let l=null==(a=(await t.json()).mission)?void 0:a.id;if(!l)throw Error("Failed to get new mission ID");if(J){console.log("Uploading logo for new mission:",l);let e=new FormData;e.append("file",J),e.append("missionId",l),e.append("type","logo");let s=await fetch("/api/missions/upload",{method:"POST",body:e});if(s.ok)console.log("Logo uploaded successfully");else{console.error("Failed to upload logo - Status:",s.status,s.statusText);try{let e=await s.json().catch(()=>null);if(e)console.error("Error details:",e);else{console.error("No JSON error details available - Response may be empty");let e=Object.fromEntries(s.headers.entries());console.error("Response headers:",e)}}catch(e){console.error("Error parsing response:",e)}}}if(Z.length>0){console.log("Uploading ".concat(Z.length," attachments for new mission:"),l);let e=Z.map(async e=>{let s=new FormData;s.append("file",e),s.append("missionId",l),s.append("type","attachment");try{let a=await fetch("/api/missions/upload",{method:"POST",body:s});if(a.ok)return console.log("Attachment ".concat(e.name," uploaded successfully")),!0;console.error("Failed to upload attachment ".concat(e.name," - Status:"),a.status,a.statusText);try{let e=await a.json().catch(()=>null);if(e)console.error("Error details:",e);else{console.error("No JSON error details available - Response may be empty");let e=Object.fromEntries(a.headers.entries());console.error("Response headers:",e)}}catch(e){console.error("Error parsing response:",e)}return!1}catch(s){return console.error("Error uploading attachment ".concat(e.name,":"),s),!1}}),s=(await Promise.allSettled(e)).filter(e=>"fulfilled"===e.status&&!0===e.value).length;console.log("Uploaded ".concat(s," of ").concat(Z.length," attachments"))}(0,y.oR)({title:"Mission cr\xe9\xe9e avec succ\xe8s",description:"Tous les gardiens ont \xe9t\xe9 assign\xe9s et la mission a \xe9t\xe9 enregistr\xe9e."}),e.push("/missions")}catch(e){console.error("Error creating mission:",e),(0,y.oR)({title:"Erreur",description:e instanceof Error?e.message:"Une erreur est survenue lors de la cr\xe9ation de la mission",variant:"destructive"})}finally{_(!1)}}},ey=(e,s)=>{Y(a=>({...a,[e]:s}))};return(0,r.jsx)("div",{className:"w-full",children:(0,r.jsx)(m.Zp,{className:"border shadow-sm bg-white",children:(0,r.jsxs)(m.Wu,{className:"pt-6",children:[(0,r.jsxs)(l.tU,{value:V,onValueChange:q,className:"w-full",children:[(0,r.jsxs)(l.j7,{className:"mb-4 bg-gray-100",children:[(0,r.jsx)(l.Xi,{value:"general",className:"data-[state=active]:bg-blue-600 data-[state=active]:text-white",children:"General"}),(0,r.jsx)(l.Xi,{value:"details",className:"data-[state=active]:bg-blue-600 data-[state=active]:text-white",children:"Details"}),(0,r.jsx)(l.Xi,{value:"attachments",className:"data-[state=active]:bg-blue-600 data-[state=active]:text-white",children:"Attachments"}),(0,r.jsx)(l.Xi,{value:"skills",className:"data-[state=active]:bg-blue-600 data-[state=active]:text-white",children:"Skills"}),(0,r.jsx)(l.Xi,{value:"membres",className:"data-[state=active]:bg-blue-600 data-[state=active]:text-white",children:"Membres"})]}),(0,r.jsx)(l.av,{value:"general",className:"space-y-6",children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium mb-1 text-gray-700",children:["Nom de la Mission",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsx)(i.p,{placeholder:"Nom de la mission",className:"bg-white border-gray-300",value:H.name||"",onChange:e=>ey("name",e.target.value)})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium mb-1 text-gray-700",children:"Logo"}),(0,r.jsx)(S,{type:"logo",missionId:B||"",isNewMission:!B,onFileSelect:e=>{W(e),console.log("Logo file selected for later upload:",e.name)},onUploadComplete:e=>{(null==e?void 0:e.filePath)&&Y(s=>({...s,logo:e.filePath}))}})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium mb-1 text-gray-700",children:["ODD scope",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsxs)(c.l6,{onValueChange:e=>ey("oddScope",[e]),children:[(0,r.jsx)(c.bq,{className:"bg-white border-gray-300",children:(0,r.jsx)(c.yv,{placeholder:"Choisir le scope"})}),(0,r.jsxs)(c.gC,{children:[(0,r.jsx)(c.eb,{value:"odd-1",children:"1. Pas de pauvret\xe9"}),(0,r.jsx)(c.eb,{value:"odd-2",children:'2. Faim "z\xe9ro"'}),(0,r.jsx)(c.eb,{value:"odd-3",children:"3. Bonne sant\xe9 et bien-\xeatre"}),(0,r.jsx)(c.eb,{value:"odd-4",children:"4. \xc9ducation de qualit\xe9"}),(0,r.jsx)(c.eb,{value:"odd-5",children:"5. \xc9galit\xe9 entre les sexes"}),(0,r.jsx)(c.eb,{value:"odd-6",children:"6. Eau propre et assainissement"}),(0,r.jsx)(c.eb,{value:"odd-7",children:"7. \xc9nergie propre et d'un co\xfbt abordable"}),(0,r.jsx)(c.eb,{value:"odd-8",children:"8. Travail d\xe9cent et croissance \xe9conomique"}),(0,r.jsx)(c.eb,{value:"odd-9",children:"9. Industrie, innovation et infrastructure"}),(0,r.jsx)(c.eb,{value:"odd-10",children:"10. In\xe9galit\xe9s r\xe9duites"}),(0,r.jsx)(c.eb,{value:"odd-11",children:"11. Villes et communaut\xe9s durables"}),(0,r.jsx)(c.eb,{value:"odd-12",children:"12. Consommation et production responsables"}),(0,r.jsx)(c.eb,{value:"odd-13",children:"13. Mesures relatives \xe0 la lutte contre les changements climatiques"}),(0,r.jsx)(c.eb,{value:"odd-14",children:"14. Vie aquatique"}),(0,r.jsx)(c.eb,{value:"odd-15",children:"15. Vie terrestre"}),(0,r.jsx)(c.eb,{value:"odd-16",children:"16. Paix, justice et institutions efficaces"}),(0,r.jsx)(c.eb,{value:"odd-17",children:"17. Partenariats pour la r\xe9alisation des objectifs"})]})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium mb-1 text-gray-700",children:["Niveau",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsxs)(c.l6,{onValueChange:e=>ey("niveau",e),children:[(0,r.jsx)(c.bq,{className:"bg-white border-gray-300",children:(0,r.jsx)(c.yv,{placeholder:"Choisir un niveau"})}),(0,r.jsxs)(c.gC,{children:[(0,r.jsx)(c.eb,{value:"a",children:"A- Apprentissage"}),(0,r.jsx)(c.eb,{value:"b",children:"B- Basique"}),(0,r.jsx)(c.eb,{value:"c",children:"C- Complexe"}),(0,r.jsx)(c.eb,{value:"s",children:"S- Sp\xe9cial"})]})]})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium mb-1 text-gray-700",children:["Intention",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsxs)("div",{className:"border rounded-md border-gray-300",children:[(0,r.jsxs)("div",{className:"bg-gray-50 p-2 border-b flex items-center space-x-2",children:[(0,r.jsx)("span",{className:"text-gray-700",children:"Paragraphe"}),(0,r.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,r.jsx)(n.$,{variant:"ghost",size:"icon",className:"h-8 w-8 text-gray-700",children:"B"}),(0,r.jsx)(n.$,{variant:"ghost",size:"icon",className:"h-8 w-8 text-gray-700",children:"I"}),(0,r.jsx)(n.$,{variant:"ghost",size:"icon",className:"h-8 w-8 text-gray-700",children:"•"}),(0,r.jsx)(n.$,{variant:"ghost",size:"icon",className:"h-8 w-8 text-gray-700",children:"1."}),(0,r.jsx)(n.$,{variant:"ghost",size:"icon",className:"h-8 w-8 text-gray-700",children:'"'})]})]}),(0,r.jsx)(d.T,{className:"min-h-[200px] border-0 bg-white",value:H.intention||"",onChange:e=>ey("intention",e.target.value)})]})]})]})}),(0,r.jsx)(l.av,{value:"details",className:"space-y-6",children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium mb-1 text-gray-700",children:["Type de mission",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsxs)(c.l6,{onValueChange:e=>ey("missionType",e),children:[(0,r.jsx)(c.bq,{className:"bg-white border-gray-300",children:(0,r.jsx)(c.yv,{placeholder:"Type de location"})}),(0,r.jsxs)(c.gC,{children:[(0,r.jsx)(c.eb,{value:"remote",children:"Remote"}),(0,r.jsx)(c.eb,{value:"onsite",children:"Sur Site"}),(0,r.jsx)(c.eb,{value:"hybrid",children:"Hybride"})]})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium mb-1 text-gray-700",children:["Donneur d'ordre",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsxs)(c.l6,{onValueChange:e=>ey("donneurDOrdre",e),children:[(0,r.jsx)(c.bq,{className:"bg-white border-gray-300",children:(0,r.jsx)(c.yv,{placeholder:"S\xe9lectionner"})}),(0,r.jsxs)(c.gC,{children:[(0,r.jsx)(c.eb,{value:"individual",children:"Individu"}),(0,r.jsx)(c.eb,{value:"group",children:"ONG"}),(0,r.jsx)(c.eb,{value:"organization",children:"Start-ups"})]})]})]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium mb-1 text-gray-700",children:["Projection",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsxs)(c.l6,{onValueChange:e=>ey("projection",e),children:[(0,r.jsx)(c.bq,{className:"bg-white border-gray-300",children:(0,r.jsx)(c.yv,{placeholder:"Select duration"})}),(0,r.jsxs)(c.gC,{children:[(0,r.jsx)(c.eb,{value:"short",children:"Short Term (< 1 month)"}),(0,r.jsx)(c.eb,{value:"medium",children:"Medium Term (1-3 months)"}),(0,r.jsx)(c.eb,{value:"long",children:"Long Term (> 3 months)"})]})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium mb-1 text-gray-700",children:"Services"}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("div",{className:"flex flex-wrap gap-1 mb-2",children:s.map(e=>(0,r.jsxs)(x.E,{className:"bg-blue-100 text-blue-800 hover:bg-blue-200 px-2 py-1",children:[e,(0,r.jsx)("button",{type:"button",onClick:()=>a(s.filter(s=>s!==e)),className:"ml-1 text-blue-600 hover:text-blue-800",children:(0,r.jsx)(u.A,{size:14})})]},e))}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.S,{id:"gite",checked:s.includes("Gite"),onCheckedChange:e=>{e?a([...s,"Gite"]):a(s.filter(e=>"Gite"!==e))},className:"border-gray-300"}),(0,r.jsx)("label",{htmlFor:"gite",className:"text-sm text-gray-700",children:"Gite"})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.S,{id:"artlab",checked:s.includes("ArtLab"),onCheckedChange:e=>{e?a([...s,"ArtLab"]):a(s.filter(e=>"ArtLab"!==e))},className:"border-gray-300"}),(0,r.jsx)("label",{htmlFor:"artlab",className:"text-sm text-gray-700",children:"ArtLab"})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.S,{id:"calcul",checked:s.includes("Calcul"),onCheckedChange:e=>{e?a([...s,"Calcul"]):a(s.filter(e=>"Calcul"!==e))},className:"border-gray-300"}),(0,r.jsx)("label",{htmlFor:"calcul",className:"text-sm text-gray-700",children:"Calcul"})]})]})]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium mb-1 text-gray-700",children:["Participation",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsxs)(c.l6,{onValueChange:e=>ey("participation",e),children:[(0,r.jsx)(c.bq,{className:"bg-white border-gray-300",children:(0,r.jsx)(c.yv,{placeholder:"Select participation"})}),(0,r.jsxs)(c.gC,{children:[(0,r.jsx)(c.eb,{value:"volontaire",children:"Volontaire"}),(0,r.jsx)(c.eb,{value:"cooptation",children:"Cooptation"})]})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium mb-1 text-gray-700",children:"Location"}),(0,r.jsx)(i.p,{placeholder:"Enter location",className:"bg-white border-gray-300"})]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium mb-1 text-gray-700",children:"Language"}),(0,r.jsx)(i.p,{placeholder:"Enter language",className:"bg-white border-gray-300"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium mb-1 text-gray-700",children:"Profils"}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("div",{className:"flex flex-wrap gap-1 mb-2",children:C.map(e=>(0,r.jsxs)(x.E,{className:"bg-blue-100 text-blue-800 hover:bg-blue-200 px-2 py-1",children:[e,(0,r.jsx)("button",{type:"button",onClick:()=>k(C.filter(s=>s!==e)),className:"ml-1 text-blue-600 hover:text-blue-800",children:(0,r.jsx)(u.A,{size:14})})]},e))}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.S,{id:"dataintelligence",checked:C.includes("DataIntelligence"),onCheckedChange:e=>{e?k([...C,"DataIntelligence"]):k(C.filter(e=>"DataIntelligence"!==e))},className:"border-gray-300"}),(0,r.jsx)("label",{htmlFor:"dataintelligence",className:"text-sm text-gray-700",children:"DataIntelligence"})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.S,{id:"expression",checked:C.includes("Expression"),onCheckedChange:e=>{e?k([...C,"Expression"]):k(C.filter(e=>"Expression"!==e))},className:"border-gray-300"}),(0,r.jsx)("label",{htmlFor:"expression",className:"text-sm text-gray-700",children:"Expression"})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.S,{id:"mediation",checked:C.includes("Mediation"),onCheckedChange:e=>{e?k([...C,"Mediation"]):k(C.filter(e=>"Mediation"!==e))},className:"border-gray-300"}),(0,r.jsx)("label",{htmlFor:"mediation",className:"text-sm text-gray-700",children:"Mediation"})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.S,{id:"investigation",checked:C.includes("Investigation"),onCheckedChange:e=>{e?k([...C,"Investigation"]):k(C.filter(e=>"Investigation"!==e))},className:"border-gray-300"}),(0,r.jsx)("label",{htmlFor:"investigation",className:"text-sm text-gray-700",children:"Investigation"})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.S,{id:"coding",checked:C.includes("Coding"),onCheckedChange:e=>{e?k([...C,"Coding"]):k(C.filter(e=>"Coding"!==e))},className:"border-gray-300"}),(0,r.jsx)("label",{htmlFor:"coding",className:"text-sm text-gray-700",children:"Coding"})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.S,{id:"lean",checked:C.includes("Lean"),onCheckedChange:e=>{e?k([...C,"Lean"]):k(C.filter(e=>"Lean"!==e))},className:"border-gray-300"}),(0,r.jsx)("label",{htmlFor:"lean",className:"text-sm text-gray-700",children:"Lean"})]})]})]})]})]})}),(0,r.jsx)(l.av,{value:"attachments",className:"space-y-6",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium mb-1 text-gray-700",children:"Attachements"}),B?(0,r.jsx)(I,{missionId:B||"",allowUpload:!0,allowDelete:!0}):(0,r.jsx)("div",{className:"space-y-4",children:(0,r.jsxs)("div",{className:"border rounded-md p-4 bg-white",children:[(0,r.jsx)("h4",{className:"text-sm font-medium mb-3 text-gray-700",children:"Add Attachments"}),(0,r.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Attachments will be uploaded when you save the mission."}),Z.length>0&&(0,r.jsxs)("div",{className:"mb-4 border rounded-md p-3 bg-gray-50",children:[(0,r.jsxs)("h5",{className:"text-sm font-medium mb-2 text-gray-700",children:["Selected Files (",Z.length,")"]}),(0,r.jsx)("ul",{className:"divide-y divide-gray-200",children:Z.map((e,s)=>(0,r.jsxs)("li",{className:"py-2 flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(h.A,{className:"h-4 w-4 text-gray-500 mr-2"}),(0,r.jsx)("span",{className:"text-sm text-gray-700",children:e.name}),(0,r.jsxs)("span",{className:"text-xs text-gray-500 ml-2",children:["(",(e.size/1024).toFixed(1)," KB)"]})]}),(0,r.jsx)(n.$,{variant:"ghost",size:"sm",onClick:()=>{K(e=>e.filter((e,a)=>a!==s))},className:"text-red-500 hover:text-red-700 hover:bg-red-50 h-7 w-7 p-0",children:(0,r.jsx)(u.A,{className:"h-4 w-4"})})]},s))})]}),(0,r.jsx)("div",{className:"flex items-center justify-center w-full",children:(0,r.jsxs)("label",{className:"flex flex-col items-center justify-center w-full h-32 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 hover:bg-gray-100",children:[(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center pt-5 pb-6",children:[(0,r.jsx)(g.A,{className:"w-8 h-8 mb-3 text-gray-400"}),(0,r.jsxs)("p",{className:"mb-2 text-sm text-gray-500",children:[(0,r.jsx)("span",{className:"font-semibold",children:"Click to upload"})," or drag and drop"]}),(0,r.jsx)("p",{className:"text-xs text-gray-500",children:"PDF, DOC, DOCX, XLS, XLSX, JPG, JPEG, PNG"})]}),(0,r.jsx)("input",{type:"file",className:"hidden",onChange:e=>{if(e.target.files&&e.target.files.length>0){let s=e.target.files[0];K(e=>[...e,s])}}})]})})]})})]})}),(0,r.jsx)(l.av,{value:"skills",className:"space-y-6",children:(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex justify-between mb-4",children:[(0,r.jsx)("h3",{className:"text-lg font-medium text-gray-700",children:"Skills"}),(0,r.jsx)(n.$,{variant:"outline",size:"sm",className:"bg-white text-gray-700 border-gray-300 hover:bg-gray-50",children:"Select / Deselect All"})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.S,{id:"photoshop",className:"border-gray-300"}),(0,r.jsx)("label",{htmlFor:"photoshop",className:"text-sm text-gray-700",children:"Adobe Photoshop"})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.S,{id:"xd",className:"border-gray-300"}),(0,r.jsx)("label",{htmlFor:"xd",className:"text-sm text-gray-700",children:"Adobe XD"})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.S,{id:"android",className:"border-gray-300"}),(0,r.jsx)("label",{htmlFor:"android",className:"text-sm text-gray-700",children:"Android Developer"})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.S,{id:"artist",className:"border-gray-300"}),(0,r.jsx)("label",{htmlFor:"artist",className:"text-sm text-gray-700",children:"Artist"})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.S,{id:"computer",className:"border-gray-300"}),(0,r.jsx)("label",{htmlFor:"computer",className:"text-sm text-gray-700",children:"Computer"})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.S,{id:"developer",className:"border-gray-300"}),(0,r.jsx)("label",{htmlFor:"developer",className:"text-sm text-gray-700",children:"Developer"})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.S,{id:"frontend",className:"border-gray-300"}),(0,r.jsx)("label",{htmlFor:"frontend",className:"text-sm text-gray-700",children:"Front end Developer"})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.S,{id:"ios",className:"border-gray-300"}),(0,r.jsx)("label",{htmlFor:"ios",className:"text-sm text-gray-700",children:"iOS Developer"})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.S,{id:"support",className:"border-gray-300"}),(0,r.jsx)("label",{htmlFor:"support",className:"text-sm text-gray-700",children:"Support Agent"})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.S,{id:"writer",className:"border-gray-300"}),(0,r.jsx)("label",{htmlFor:"writer",className:"text-sm text-gray-700",children:"Writer"})]})]})]})}),(0,r.jsx)(l.av,{value:"membres",className:"space-y-6",children:(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,r.jsx)("h3",{className:"text-lg font-medium text-gray-700",children:"Les Gardiens de l'Intention"}),(0,r.jsxs)("div",{className:"flex items-center",children:[!el&&(0,r.jsxs)("div",{className:"flex items-center text-amber-600 mr-3 text-sm",children:[(0,r.jsx)(p.A,{size:16,className:"mr-1"}),"Les 3 gardiens doivent \xeatre assign\xe9s"]}),el&&(0,r.jsxs)("div",{className:"flex items-center text-green-600 mr-3 text-sm",children:[(0,r.jsx)(b.A,{size:16,className:"mr-1"}),"Tous les gardiens sont assign\xe9s"]})]})]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"border rounded-md p-4 bg-white",children:[(0,r.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,r.jsx)("h4",{className:"font-medium text-gray-800",children:"Gardien du Temps"}),R&&(0,r.jsxs)(n.$,{variant:"outline",size:"sm",onClick:()=>eg(R),className:"text-red-600 hover:bg-red-50 hover:text-red-700 border-red-200 h-8 bg-white",disabled:er,children:[(0,r.jsx)(u.A,{size:16,className:"mr-1"}),"Supprimer"]})]}),er?(0,r.jsx)("div",{className:"flex items-center py-2 px-3 bg-gray-50 border border-gray-200 rounded-md",children:(0,r.jsxs)("div",{className:"animate-pulse w-full flex items-center",children:[(0,r.jsx)("div",{className:"h-10 w-10 bg-gray-300 rounded-full mr-3"}),(0,r.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,r.jsx)("div",{className:"h-3 bg-gray-300 rounded w-1/3"}),(0,r.jsx)("div",{className:"h-3 bg-gray-300 rounded w-1/2"})]})]})}):R?(0,r.jsx)("div",{className:"bg-blue-50 border border-blue-100 rounded-md p-3",children:(()=>{var e,s;let a=Q.find(e=>e.id===R);return a?(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsxs)("div",{className:"h-10 w-10 rounded-full bg-blue-100 flex items-center justify-center text-blue-600 font-medium mr-3",children:[(null==(e=a.firstName)?void 0:e[0])||"",(null==(s=a.lastName)?void 0:s[0])||""]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"font-medium text-gray-900",children:[a.firstName," ",a.lastName]}),(0,r.jsx)("div",{className:"text-sm text-gray-500",children:a.email})]})]}):"Utilisateur non trouv\xe9"})()}):(0,r.jsxs)("div",{className:"flex items-center text-gray-500 bg-gray-50 border border-gray-200 rounded-md py-2 px-3",children:[(0,r.jsx)("div",{className:"h-8 w-8 rounded-full bg-gray-200 flex items-center justify-center mr-3",children:(0,r.jsx)(f.A,{size:14,className:"text-gray-400"})}),(0,r.jsx)("span",{className:"text-sm",children:"Aucun utilisateur s\xe9lectionn\xe9"})]})]}),(0,r.jsxs)("div",{className:"border rounded-md p-4 bg-white",children:[(0,r.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,r.jsx)("h4",{className:"font-medium text-gray-800",children:"Gardien de la Parole"}),D&&(0,r.jsxs)(n.$,{variant:"outline",size:"sm",onClick:()=>eg(D),className:"text-red-600 hover:bg-red-50 hover:text-red-700 border-red-200 h-8 bg-white",disabled:er,children:[(0,r.jsx)(u.A,{size:16,className:"mr-1"}),"Supprimer"]})]}),er?(0,r.jsx)("div",{className:"flex items-center py-2 px-3 bg-gray-50 border border-gray-200 rounded-md",children:(0,r.jsxs)("div",{className:"animate-pulse w-full flex items-center",children:[(0,r.jsx)("div",{className:"h-10 w-10 bg-gray-300 rounded-full mr-3"}),(0,r.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,r.jsx)("div",{className:"h-3 bg-gray-300 rounded w-1/3"}),(0,r.jsx)("div",{className:"h-3 bg-gray-300 rounded w-1/2"})]})]})}):D?(0,r.jsx)("div",{className:"bg-blue-50 border border-blue-100 rounded-md p-3",children:(()=>{var e,s;let a=Q.find(e=>e.id===D);return a?(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsxs)("div",{className:"h-10 w-10 rounded-full bg-blue-100 flex items-center justify-center text-blue-600 font-medium mr-3",children:[(null==(e=a.firstName)?void 0:e[0])||"",(null==(s=a.lastName)?void 0:s[0])||""]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"font-medium text-gray-900",children:[a.firstName," ",a.lastName]}),(0,r.jsx)("div",{className:"text-sm text-gray-500",children:a.email})]})]}):"Utilisateur non trouv\xe9"})()}):(0,r.jsxs)("div",{className:"flex items-center text-gray-500 bg-gray-50 border border-gray-200 rounded-md py-2 px-3",children:[(0,r.jsx)("div",{className:"h-8 w-8 rounded-full bg-gray-200 flex items-center justify-center mr-3",children:(0,r.jsx)(f.A,{size:14,className:"text-gray-400"})}),(0,r.jsx)("span",{className:"text-sm",children:"Aucun utilisateur s\xe9lectionn\xe9"})]})]}),(0,r.jsxs)("div",{className:"border rounded-md p-4 bg-white",children:[(0,r.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,r.jsx)("h4",{className:"font-medium text-gray-800",children:"Gardien de la M\xe9moire"}),T&&(0,r.jsxs)(n.$,{variant:"outline",size:"sm",onClick:()=>eg(T),className:"text-red-600 hover:bg-red-50 hover:text-red-700 border-red-200 h-8 bg-white",disabled:er,children:[(0,r.jsx)(u.A,{size:16,className:"mr-1"}),"Supprimer"]})]}),er?(0,r.jsx)("div",{className:"flex items-center py-2 px-3 bg-gray-50 border border-gray-200 rounded-md",children:(0,r.jsxs)("div",{className:"animate-pulse w-full flex items-center",children:[(0,r.jsx)("div",{className:"h-10 w-10 bg-gray-300 rounded-full mr-3"}),(0,r.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,r.jsx)("div",{className:"h-3 bg-gray-300 rounded w-1/3"}),(0,r.jsx)("div",{className:"h-3 bg-gray-300 rounded w-1/2"})]})]})}):T?(0,r.jsx)("div",{className:"bg-blue-50 border border-blue-100 rounded-md p-3",children:(()=>{var e,s;let a=Q.find(e=>e.id===T);return a?(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsxs)("div",{className:"h-10 w-10 rounded-full bg-blue-100 flex items-center justify-center text-blue-600 font-medium mr-3",children:[(null==(e=a.firstName)?void 0:e[0])||"",(null==(s=a.lastName)?void 0:s[0])||""]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"font-medium text-gray-900",children:[a.firstName," ",a.lastName]}),(0,r.jsx)("div",{className:"text-sm text-gray-500",children:a.email})]})]}):"Utilisateur non trouv\xe9"})()}):(0,r.jsxs)("div",{className:"flex items-center text-gray-500 bg-gray-50 border border-gray-200 rounded-md py-2 px-3",children:[(0,r.jsx)("div",{className:"h-8 w-8 rounded-full bg-gray-200 flex items-center justify-center mr-3",children:(0,r.jsx)(f.A,{size:14,className:"text-gray-400"})}),(0,r.jsx)("span",{className:"text-sm",children:"Aucun utilisateur s\xe9lectionn\xe9"})]})]})]})]}),(0,r.jsx)("div",{className:"bg-white border rounded-md p-4",children:(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsx)("h4",{className:"font-medium text-gray-800",children:"S\xe9lectionner des membres"}),(0,r.jsxs)("div",{className:"flex space-x-2",children:[(0,r.jsxs)(n.$,{variant:"users"===z?"default":"outline",size:"sm",onClick:()=>F("users"),className:"users"===z?"bg-blue-600 text-white hover:bg-blue-700":"text-gray-700 bg-white hover:bg-gray-50 border border-gray-300",disabled:er,children:[(0,r.jsx)(f.A,{size:16,className:"mr-1"}),"Utilisateurs"]}),(0,r.jsxs)(n.$,{variant:"groups"===z?"default":"outline",size:"sm",onClick:()=>F("groups"),className:"groups"===z?"bg-blue-600 text-white hover:bg-blue-700":"text-gray-700 bg-white hover:bg-gray-50 border border-gray-300",disabled:er,children:[(0,r.jsx)(f.A,{size:16,className:"mr-1"}),"Groupes"]})]})]}),(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsxs)("h5",{className:"text-sm font-medium text-gray-700 mb-2",children:["Volontaires (",$.length,")"]}),$.length>0?(0,r.jsx)("div",{className:"flex flex-wrap gap-2 mb-3",children:$.map(e=>{let s=Q.find(s=>s.id===e);return s?(0,r.jsxs)(x.E,{className:"bg-gray-100 text-gray-800 hover:bg-gray-200 px-2 py-1 flex items-center",children:[s.firstName," ",s.lastName,(0,r.jsx)(n.$,{variant:"ghost",size:"sm",onClick:()=>eg(e),className:"ml-1 h-5 w-5 p-0 text-gray-500 hover:text-red-600 hover:bg-transparent",children:(0,r.jsx)(u.A,{size:12})})]},e):null})}):(0,r.jsx)("div",{className:"text-sm text-gray-500 mb-3",children:"Aucun volontaire assign\xe9"})]}),(0,r.jsxs)("div",{className:"relative mb-4",children:[(0,r.jsx)(j.A,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-500"}),(0,r.jsx)(i.p,{type:"text",placeholder:"Rechercher ".concat("users"===z?"un utilisateur":"un groupe","..."),value:A,onChange:e=>E(e.target.value),className:"pl-9 bg-white text-gray-900 border-gray-300",disabled:er})]}),er?(0,r.jsx)("div",{className:"border rounded-md p-6 flex flex-col items-center justify-center text-gray-500",children:(0,r.jsx)("div",{className:"animate-pulse space-y-4 w-full",children:[1,2,3].map(e=>(0,r.jsxs)("div",{className:"flex items-center py-3 px-4",children:[(0,r.jsx)("div",{className:"h-10 w-10 bg-gray-300 rounded-full mr-3"}),(0,r.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,r.jsx)("div",{className:"h-3 bg-gray-300 rounded w-1/3"}),(0,r.jsx)("div",{className:"h-3 bg-gray-300 rounded w-1/2"})]}),(0,r.jsx)("div",{className:"h-7 w-16 bg-gray-300 rounded"})]},e))})}):(0,r.jsx)("div",{className:"border rounded-md max-h-[300px] overflow-y-auto",children:"users"===z?ed.length>0?(0,r.jsx)("div",{className:"divide-y divide-gray-200",children:ed.map(e=>{var s,a;return(0,r.jsxs)("div",{className:"p-3 hover:bg-gray-50 flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsxs)("div",{className:"h-10 w-10 rounded-full bg-gray-100 flex items-center justify-center text-gray-600 font-medium mr-3",children:[(null==(s=e.firstName)?void 0:s[0])||"",(null==(a=e.lastName)?void 0:a[0])||""]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"font-medium text-gray-900",children:[e.firstName," ",e.lastName]}),(0,r.jsx)("div",{className:"text-sm text-gray-500",children:e.email}),eo(e.id)&&(0,r.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:em(e.id).map(e=>(0,r.jsx)(x.E,{className:"px-1.5 py-0.5 text-xs ".concat("volontaire"===e?"bg-gray-100 text-gray-800":"bg-blue-100 text-blue-800"),children:ex(e)},e))})]})]}),(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsxs)(w.rI,{children:[(0,r.jsx)(w.ty,{asChild:!0,children:(0,r.jsxs)(n.$,{variant:"outline",size:"sm",className:"text-blue-600 bg-white hover:bg-blue-50 hover:text-blue-700 border-blue-200 h-8 mr-2",disabled:er,children:[(0,r.jsx)(v.A,{size:16,className:"mr-1"}),"Ajouter r\xf4le"]})}),(0,r.jsxs)(w.SQ,{align:"end",className:"bg-white border border-gray-200",children:[(0,r.jsx)(w._2,{onClick:()=>eu(e.id,"temps"),className:"cursor-pointer",children:"Gardien du Temps"}),(0,r.jsx)(w._2,{onClick:()=>eu(e.id,"parole"),className:"cursor-pointer",children:"Gardien de la Parole"}),(0,r.jsx)(w._2,{onClick:()=>eu(e.id,"memoire"),className:"cursor-pointer",children:"Gardien de la M\xe9moire"})]})]}),(0,r.jsxs)(n.$,{variant:"outline",size:"sm",onClick:()=>eh(e.id),className:"text-gray-700 bg-white hover:bg-gray-50 border-gray-300 h-8",disabled:er,children:[(0,r.jsx)(N.A,{size:16,className:"mr-1"}),"Volontaire"]}),eo(e.id)&&(0,r.jsxs)(n.$,{variant:"outline",size:"sm",onClick:()=>eg(e.id),className:"ml-2 text-red-600 hover:bg-red-50 hover:text-red-700 border-red-200 h-8 bg-white",disabled:er,children:[(0,r.jsx)(u.A,{size:14,className:"mr-1"}),"Supprimer"]})]})]},e.id)})}):(0,r.jsx)("div",{className:"p-4 text-center text-gray-500",children:"Aucun utilisateur trouv\xe9"}):ec.length>0?(0,r.jsx)("div",{className:"divide-y divide-gray-200",children:ec.map(e=>(0,r.jsxs)("div",{className:"p-3 hover:bg-gray-50 flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("div",{className:"h-10 w-10 rounded-full bg-gray-100 flex items-center justify-center text-gray-600 font-medium mr-3",children:(0,r.jsx)(f.A,{size:16})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"font-medium text-gray-900",children:e.name}),(0,r.jsxs)("div",{className:"text-sm text-gray-500",children:[e.membersCount," membres"]})]})]}),(0,r.jsxs)(n.$,{variant:"outline",size:"sm",onClick:()=>eb(e.id,e.name),className:"text-blue-600 bg-white hover:bg-blue-50 hover:text-blue-700 border-blue-200 h-8",disabled:er,children:[(0,r.jsx)(f.A,{size:16,className:"mr-1"}),"Voir membres"]})]},e.id))}):(0,r.jsx)("div",{className:"p-4 text-center text-gray-500",children:"Aucun groupe trouv\xe9"})})]})})]})})]}),(0,r.jsxs)("div",{className:"mt-8 flex justify-between",children:["general"!==V&&(0,r.jsxs)(n.$,{variant:"outline",className:"text-gray-700 bg-white hover:bg-gray-50 border border-gray-300",onClick:()=>{let e=["general","details","attachments","skills","membres"],s=e.indexOf(V);s>0&&q(e[s-1])},disabled:X,children:[(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"mr-2",children:[(0,r.jsx)("polyline",{points:"19 12 5 12"}),(0,r.jsx)("polyline",{points:"12 19 5 12 12 5"})]}),"Retour"]}),"general"===V&&(0,r.jsx)("div",{}),(0,r.jsx)(n.$,{className:"bg-blue-600 hover:bg-blue-700 text-white",onClick:()=>{ej()?eN():ef()},disabled:X,children:X?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"animate-spin mr-2",children:"⟳"}),ej()?"Enregistrement...":"Chargement..."]}):(0,r.jsxs)(r.Fragment,{children:[ej()?"Enregistrer":"Suivant",(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"ml-2",children:[(0,r.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,r.jsx)("polyline",{points:"12 5 19 12 12 19"})]})]})})]})]})})})}var M=a(99708),B=a(13052),G=(a(5623),a(53999));let V=t.forwardRef((e,s)=>{let{...a}=e;return(0,r.jsx)("nav",{ref:s,"aria-label":"breadcrumb",...a})});V.displayName="Breadcrumb";let q=t.forwardRef((e,s)=>{let{className:a,...t}=e;return(0,r.jsx)("ol",{ref:s,className:(0,G.cn)("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",a),...t})});q.displayName="BreadcrumbList";let X=t.forwardRef((e,s)=>{let{className:a,...t}=e;return(0,r.jsx)("li",{ref:s,className:(0,G.cn)("inline-flex items-center gap-1.5",a),...t})});X.displayName="BreadcrumbItem";let _=t.forwardRef((e,s)=>{let{asChild:a,className:t,...l}=e,i=a?M.DX:"a";return(0,r.jsx)(i,{ref:s,className:(0,G.cn)("transition-colors hover:text-foreground",t),...l})});_.displayName="BreadcrumbLink",t.forwardRef((e,s)=>{let{className:a,...t}=e;return(0,r.jsx)("span",{ref:s,role:"link","aria-disabled":"true","aria-current":"page",className:(0,G.cn)("font-normal text-foreground",a),...t})}).displayName="BreadcrumbPage";let J=e=>{let{children:s,className:a,...t}=e;return(0,r.jsx)("li",{role:"presentation","aria-hidden":"true",className:(0,G.cn)("[&>svg]:w-3.5 [&>svg]:h-3.5",a),...t,children:null!=s?s:(0,r.jsx)(B.A,{})})};J.displayName="BreadcrumbSeparator";var W=a(6874),Z=a.n(W);function K(){return(0,r.jsxs)("div",{className:"flex flex-col h-full w-full bg-white",children:[(0,r.jsx)("div",{className:"bg-white border-b border-gray-100 py-2 px-4",children:(0,r.jsx)(V,{children:(0,r.jsxs)(q,{children:[(0,r.jsx)(X,{children:(0,r.jsx)(_,{asChild:!0,children:(0,r.jsx)(Z(),{href:"/missions",children:"Missions"})})}),(0,r.jsx)(J,{}),(0,r.jsx)(X,{children:(0,r.jsx)(_,{children:"Poster une Mission"})})]})})}),(0,r.jsx)("div",{className:"flex-1 overflow-auto p-4 bg-white",children:(0,r.jsx)($,{})})]})}},88033:(e,s,a)=>{Promise.resolve().then(a.bind(a,87498))},88145:(e,s,a)=>{"use strict";a.d(s,{E:()=>n});var r=a(95155);a(12115);var t=a(74466),l=a(53999);let i=(0,t.F)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground",notification:"border-transparent bg-red-500 text-white hover:bg-red-600 absolute -top-1 -right-1 px-1.5 py-0.5 min-w-[1.25rem] h-5 flex items-center justify-center"},shape:{default:"rounded-full",pill:"rounded-full",square:"rounded-md"},size:{default:"text-xs px-2.5 py-0.5",sm:"text-xs px-2 py-0.25 h-3.5 min-w-[1rem]",lg:"text-sm px-3 py-1",notification:"text-xs px-1.5 py-0.5 h-5 min-w-[1.25rem]"}},defaultVariants:{variant:"default",shape:"default",size:"default"}});function n(e){let{className:s,variant:a,shape:t,size:n,...d}=e;return(0,r.jsx)("div",{className:(0,l.cn)(i({variant:a,shape:t,size:n}),s),...d})}},88482:(e,s,a)=>{"use strict";a.d(s,{BT:()=>c,Wu:()=>o,ZB:()=>d,Zp:()=>i,aR:()=>n});var r=a(95155),t=a(12115),l=a(53999);let i=t.forwardRef((e,s)=>{let{className:a,...t}=e;return(0,r.jsx)("div",{ref:s,className:(0,l.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",a),...t})});i.displayName="Card";let n=t.forwardRef((e,s)=>{let{className:a,...t}=e;return(0,r.jsx)("div",{ref:s,className:(0,l.cn)("flex flex-col space-y-1.5 p-6",a),...t})});n.displayName="CardHeader";let d=t.forwardRef((e,s)=>{let{className:a,...t}=e;return(0,r.jsx)("div",{ref:s,className:(0,l.cn)("text-2xl font-semibold leading-none tracking-tight",a),...t})});d.displayName="CardTitle";let c=t.forwardRef((e,s)=>{let{className:a,...t}=e;return(0,r.jsx)("div",{ref:s,className:(0,l.cn)("text-sm text-muted-foreground",a),...t})});c.displayName="CardDescription";let o=t.forwardRef((e,s)=>{let{className:a,...t}=e;return(0,r.jsx)("div",{ref:s,className:(0,l.cn)("p-6 pt-0",a),...t})});o.displayName="CardContent",t.forwardRef((e,s)=>{let{className:a,...t}=e;return(0,r.jsx)("div",{ref:s,className:(0,l.cn)("flex items-center p-6 pt-0",a),...t})}).displayName="CardFooter"},95784:(e,s,a)=>{"use strict";a.d(s,{bq:()=>x,eb:()=>p,gC:()=>g,l6:()=>o,yv:()=>m});var r=a(95155),t=a(12115),l=a(43433),i=a(66474),n=a(47863),d=a(5196),c=a(53999);let o=l.bL;l.YJ;let m=l.WT,x=t.forwardRef((e,s)=>{let{className:a,children:t,...n}=e;return(0,r.jsxs)(l.l9,{ref:s,className:(0,c.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",a),...n,children:[t,(0,r.jsx)(l.In,{asChild:!0,children:(0,r.jsx)(i.A,{className:"h-4 w-4 opacity-50"})})]})});x.displayName=l.l9.displayName;let u=t.forwardRef((e,s)=>{let{className:a,...t}=e;return(0,r.jsx)(l.PP,{ref:s,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",a),...t,children:(0,r.jsx)(n.A,{className:"h-4 w-4"})})});u.displayName=l.PP.displayName;let h=t.forwardRef((e,s)=>{let{className:a,...t}=e;return(0,r.jsx)(l.wn,{ref:s,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",a),...t,children:(0,r.jsx)(i.A,{className:"h-4 w-4"})})});h.displayName=l.wn.displayName;let g=t.forwardRef((e,s)=>{let{className:a,children:t,position:i="popper",...n}=e;return(0,r.jsx)(l.ZL,{children:(0,r.jsxs)(l.UC,{ref:s,className:(0,c.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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","popper"===i&&"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:i,...n,children:[(0,r.jsx)(u,{}),(0,r.jsx)(l.LM,{className:(0,c.cn)("p-1","popper"===i&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,r.jsx)(h,{})]})})});g.displayName=l.UC.displayName,t.forwardRef((e,s)=>{let{className:a,...t}=e;return(0,r.jsx)(l.JU,{ref:s,className:(0,c.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",a),...t})}).displayName=l.JU.displayName;let p=t.forwardRef((e,s)=>{let{className:a,children:t,...i}=e;return(0,r.jsxs)(l.q7,{ref:s,className:(0,c.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...i,children:[(0,r.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,r.jsx)(l.VF,{children:(0,r.jsx)(d.A,{className:"h-4 w-4"})})}),(0,r.jsx)(l.p4,{children:t})]})});p.displayName=l.q7.displayName,t.forwardRef((e,s)=>{let{className:a,...t}=e;return(0,r.jsx)(l.wv,{ref:s,className:(0,c.cn)("-mx-1 my-1 h-px bg-muted",a),...t})}).displayName=l.wv.displayName},99474:(e,s,a)=>{"use strict";a.d(s,{T:()=>i});var r=a(95155),t=a(12115),l=a(53999);let i=t.forwardRef((e,s)=>{let{className:a,...t}=e;return(0,r.jsx)("textarea",{className:(0,l.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",a),ref:s,...t})});i.displayName="Textarea"}},e=>{var s=s=>e(e.s=s);e.O(0,[4277,2108,5685,8067,6874,5652,4159,3610,1895,8441,1684,7358],()=>s(88033)),_N_E=e.O()}]); |