PageSourceSearch

https://www.smartcms.ai/_next/static/chunks/2573-7c826c83b1fa2f69.js

js smartcms.ai collected 2026-10-05 14:59:35 UTC 25,756 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2573],{9554:(e,t,s)=>{s.d(t,{A:()=>a});var r=s(12115);let a=r.forwardRef(function(e,t){let{title:s,titleId:a,...i}=e;return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},i),s?r.createElement("title",{id:a},s):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))})},10253:(e,t,s)=>{function r(e){let{src:t}=e;return t}s.r(t),s.d(t,{default:()=>r})},15239:(e,t,s)=>{s.d(t,{default:()=>a.a});var r=s(54652),a=s.n(r)},32573:(e,t,s)=>{s.d(t,{A:()=>x});var r=s(95155),a=s(12115),i=s(15239),n=s(99776),o=s(22454),l=s(80549),d=s(57218),c=s(9554),u=s(41444),m=s(92655),h=s(48394);function x(e){var t,s,x,g,b;let{spaceId:f}=e,p=(0,n.jE)(),[y,v]=(0,a.useState)(!1),[w,j]=(0,a.useState)(""),[k,N]=(0,a.useState)(""),[C,E]=(0,a.useState)(null),[S,I]=(0,a.useState)(null),[O,R]=(0,a.useState)(null),[M,F]=(0,a.useState)(!1),[A,P]=(0,a.useState)(!1),[T,L]=(0,a.useState)(null),[K,q]=(0,a.useState)(null),[G,U]=(0,a.useState)(null),[z,D]=(0,a.useState)(null),{data:_=[],isLoading:B,error:Q}=(0,o.I)({queryKey:["memberships",f],queryFn:async()=>{let e=await fetch("/api/cms/spaces/".concat(f,"/memberships"));if(!e.ok)throw Error("Failed to fetch memberships: ".concat(e.statusText));return await e.json()||[]},enabled:!!f}),{data:W=[],isLoading:H,error:J}=(0,o.I)({queryKey:["roles",f],queryFn:async()=>{let e=await fetch("/api/cms/spaces/".concat(f,"/roles"));if(!e.ok)throw Error("Failed to fetch roles: ".concat(e.statusText));return await e.json()||[]},enabled:!!f}),{data:V=[]}=(0,o.I)({queryKey:["space-invitations",f],queryFn:async()=>{let e=await fetch("/api/cms/invitations/space/list?spaceId=".concat(f));return e.ok&&await e.json()||[]},enabled:!!f});(0,a.useEffect)(()=>{W.length>0&&N(e=>e||W[0].id)},[W]);let $=null!=Q?Q:J,X=null!=z?z:$ instanceof Error?$.message:$?"Failed to load data":null,Y=()=>{p.invalidateQueries({queryKey:["memberships",f]}),p.invalidateQueries({queryKey:["roles",f]}),p.invalidateQueries({queryKey:["space-invitations",f]})},Z=(0,l.n)({mutationFn:async e=>{let t=await fetch("/api/cms/spaces/".concat(f,"/memberships"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw Error((await t.json()).message||"Failed to send invitation");return t.json()},onSuccess:e=>{I(e.message||"Invitation sent successfully"),j(""),Y(),setTimeout(()=>{v(!1),I(null)},2e3)},onError:e=>{u.v.error("Error sending invitation:",e),E(e instanceof Error?e.message:"Failed to send invitation")}}),ee=(0,l.n)({mutationFn:async e=>{let t=await fetch("/api/cms/spaces/".concat(f,"/memberships/").concat(e.membershipId,"?spaceId=").concat(f),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({roleId:e.roleId})});if(!t.ok)throw Error((await t.json()).message||"Failed to update role");return t.json()},onSuccess:()=>Y(),onError:e=>{u.v.error("Error changing role:",e),D(e instanceof Error?e.message:"Failed to change role")}}),et=(0,l.n)({mutationFn:async e=>{let{membershipId:t,deleteProfile:s}=e,r=await fetch("/api/cms/spaces/".concat(f,"/memberships/").concat(t,"?deleteProfile=").concat(s),{method:"DELETE"});if(!r.ok)throw Error((await r.json()).message||"Failed to remove member");return r.json()},onSuccess:()=>{F(!1),R(null),Y()},onError:e=>{u.v.error("Error deleting member:",e),D(e instanceof Error?e.message:"Failed to remove member")}}),es=(0,l.n)({mutationFn:async e=>{let t=await fetch("/api/cms/invitations/space/resend",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:e})});if(!t.ok)throw Error((await t.json()).message||"Failed to resend invitation");return t.json()},onSuccess:()=>{U({title:"Invitation Resent",message:"Invitation resent successfully"}),Y()},onError:e=>{u.v.error("Error resending invitation:",e),U({title:"Error",message:e instanceof Error?e.message:"Failed to resend invitation"})}}),er=(0,l.n)({mutationFn:async e=>{let t=await fetch("/api/cms/invitations/space/cancel?id=".concat(e),{method:"DELETE"});if(!t.ok)throw Error((await t.json()).message||"Failed to cancel invitation");return t.json()},onSuccess:()=>{U({title:"Invitation Cancelled",message:"Invitation cancelled successfully"}),Y()},onError:e=>{u.v.error("Error cancelling invitation:",e),U({title:"Error",message:e instanceof Error?e.message:"Failed to cancel invitation"})}}),ea=Z.isPending,ei=et.isPending;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-end mb-6",children:(0,r.jsxs)("button",{type:"button",onClick:()=>v(!0),className:"inline-flex w-full sm:w-auto justify-center sm:justify-start items-center px-4 py-2 border border-transparent roun
1ded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:[(0,r.jsx)(d.A,{className:"-ml-1 mr-2 h-5 w-5","aria-hidden":"true"}),"Invite Member"]})}),X&&(0,r.jsxs)("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4 mb-6",children:[(0,r.jsx)("h3",{className:"text-sm font-medium text-red-800 dark:text-red-200",children:"Error"}),(0,r.jsx)("p",{className:"mt-1 text-sm text-red-700 dark:text-red-300",children:X})]}),y&&(0,r.jsx)("div",{className:"bg-white dark:bg-gray-800 shadow sm:rounded-lg mb-6",children:(0,r.jsxs)("div",{className:"px-4 py-5 sm:p-6",children:[(0,r.jsx)("h3",{className:"text-lg leading-6 font-medium text-gray-900 dark:text-white",children:"Invite a new member"}),(0,r.jsx)("p",{className:"mt-2 max-w-xl text-sm text-gray-500 dark:text-gray-400",children:"Enter the email and select a role. They will receive an email with instructions to accept the invitation."}),C&&(0,r.jsx)("div",{className:"mt-4 text-sm text-red-600 dark:text-red-400",children:C}),S&&(0,r.jsx)("div",{className:"mt-4 text-sm text-green-600 dark:text-green-400",children:S}),(0,r.jsxs)("form",{onSubmit:e=>{if(e.preventDefault(),!w||!k)return void E("Email and role are required");E(null),I(null),Z.mutate({email:w,roleId:k})},className:"mt-5 sm:flex sm:items-center",children:[(0,r.jsxs)("div",{className:"w-full sm:max-w-xs",children:[(0,r.jsx)("label",{htmlFor:"email",className:"sr-only",children:"Email"}),(0,r.jsx)("input",{type:"email",id:"email",value:w,onChange:e=>j(e.target.value),className:"block w-full pl-3 pr-10 py-2 text-base border-gray-300 dark:border-gray-700 dark:bg-gray-900 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md",placeholder:"[email protected]",disabled:ea})]}),(0,r.jsxs)("div",{className:"w-full sm:max-w-xs mt-3 sm:mt-0 sm:ml-3",children:[(0,r.jsx)("label",{htmlFor:"role",className:"sr-only",children:"Role"}),(0,r.jsx)("select",{id:"role",value:k,onChange:e=>N(e.target.value),className:"block w-full pl-3 pr-10 py-2 text-base border-gray-300 dark:border-gray-700 dark:bg-gray-900 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md",disabled:ea,children:W.map(e=>(0,r.jsx)("option",{value:e.id,children:e.name},e.id))})]}),(0,r.jsxs)("div",{className:"mt-3 sm:mt-0 sm:ml-3 sm:flex-shrink-0 flex",children:[(0,r.jsx)("button",{type:"submit",className:"inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 disabled:opacity-50",disabled:ea,children:ea?"Sending…":"Send Invitation"}),(0,r.jsx)("button",{type:"button",onClick:()=>v(!1),className:"ml-2 inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600",children:"Cancel"})]})]})]})}),B||H?(0,r.jsx)("div",{className:"flex items-center justify-center py-16",children:(0,r.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-blue-500"})}):0===_.length&&0===V.length?(0,r.jsx)("div",{className:"bg-white dark:bg-gray-800 overflow-hidden shadow rounded-lg",children:(0,r.jsxs)("div",{className:"py-16 px-4 sm:px-6 lg:px-8 text-center",children:[(0,r.jsx)("h3",{className:"text-lg font-medium text-gray-900 dark:text-white",children:"No members yet"}),(0,r.jsx)("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:"Invite someone to this space to start collaborating."}),(0,r.jsx)("button",{type:"button",onClick:()=>v(!0),className:"mt-6 inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700",children:"Invite Member"})]})}):(0,r.jsxs)(r.Fragment,{children:[_.length>0&&(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsx)("h2",{className:"text-lg font-medium text-gray-900 dark:text-white mb-4",children:"Active Members"}),(0,r.jsx)("div",{className:"bg-white dark:bg-gray-800 shadow overflow-hidden sm:rou
1nded-md",children:(0,r.jsx)("ul",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:_.map(e=>{var t,s,a;return(0,r.jsx)("li",{className:"px-6 py-4",children:(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center min-w-0",children:[(0,r.jsx)("div",{className:"flex-shrink-0 h-10 w-10 rounded-full overflow-hidden bg-gray-200 dark:bg-gray-700",children:(null==(t=e.user)?void 0:t.avatarUrl)?(0,r.jsx)(i.default,{width:40,height:40,className:"h-10 w-10 rounded-full",src:e.user.avatarUrl,alt:e.user.displayName||"User"}):(0,r.jsx)("svg",{className:"h-full w-full text-gray-400",fill:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M24 20.993V24H0v-2.996A14.977 14.977 0 0112.004 15c4.904 0 9.26 2.354 11.996 5.993zM16.002 8.999a4 4 0 11-8 0 4 4 0 018 0z"})})}),(0,r.jsxs)("div",{className:"ml-4 min-w-0",children:[(0,r.jsx)("div",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:(null==(s=e.user)?void 0:s.displayName)||"Unknown User"}),(0,r.jsx)("div",{className:"text-sm text-gray-500 dark:text-gray-400 truncate",children:(null==(a=e.user)?void 0:a.email)||e.userId})]})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-4 w-full sm:w-auto",children:[(0,r.jsx)("label",{htmlFor:"role-".concat(e.id),className:"sr-only",children:"Role"}),(0,r.jsx)("select",{id:"role-".concat(e.id),value:e.roleId,onChange:t=>((e,t)=>{let s=_.find(t=>t.id===e);s&&ee.mutate({membershipId:s.id,roleId:t})})(e.id,t.target.value),className:"block w-full min-w-[8rem] flex-1 sm:flex-none sm:w-44 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm py-2 pl-3 pr-10 text-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm",children:W.map(e=>(0,r.jsx)("option",{value:e.id,children:e.name},e.id))}),(0,r.jsx)("button",{type:"button",onClick:()=>{R(e),F(!0)},className:"text-red-600 hover:text-red-900 dark:text-red-400 dark:hover:text-red-300","aria-label":"Remove member",children:(0,r.jsx)(c.A,{className:"h-5 w-5"})})]})]})},e.id)})})})]}),V.length>0&&(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsx)("h2",{className:"text-lg font-medium text-gray-900 dark:text-white mb-4",children:"Pending Invitations"}),(0,r.jsx)("div",{className:"bg-white dark:bg-gray-800 shadow overflow-hidden sm:rounded-md",children:(0,r.jsx)("ul",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:V.map(e=>(0,r.jsx)("li",{className:"px-6 py-4",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-sm font-medium text-gray-900 dark:text-white",children:"Invitation Pending"}),(0,r.jsx)("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:e.email}),(0,r.jsxs)("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:["Role: ",e.roleName," \xb7 Expires:"," ",new Date(e.expiresAt).toLocaleDateString()]})]}),(0,r.jsxs)("div",{className:"flex space-x-3",children:[(0,r.jsx)("button",{type:"button",onClick:()=>L(e),className:"text-blue-600 hover:text-blue-900 dark:text-blue-400 dark:hover:text-blue-300 text-sm",children:"Resend"}),(0,r.jsx)("button",{type:"button",onClick:()=>q(e),className:"text-red-600 hover:text-red-900 dark:text-red-400 dark:hover:text-red-300 text-sm",children:"Cancel"})]})]})},e.id))})})]})]}),O&&(0,r.jsxs)(h.A,{isOpen:M,onClose:()=>F(!1),title:"Remove Member",size:"lg",footer:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:()=>F(!1),className:"px-3 py-1.5 text-sm text-gray-700 dark:text-gray-200 border border-gray-300 dark:border-gray-600 rounded-md hover:bg-gray-50 dark:hover:bg-gray-700",children:"Cancel"}),(0,r.jsx)("button",{type:"button",onClick:()=>{O&&et.mutate({membershipId:O.id,deleteProfile:A})},disabled:ei,className:"px-3 py-1.5 text-sm text-white bg-red-600 rounded-md hover:bg-red-700 disabled:opacity-50",children:ei?"Removing…":"Remove"})]}),children:[(0,r.jsxs)("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Are you sure you want to remove"," ",(0,r.jsx)("span",{className:"font-semibold",children:(null==(t=O.user)?void 0:t.displayName)||O.userId})," ","from this space? This action cannot be undone."]}),(0,r.jsxs)("div",{className:"mt-3 flex items-center",children:[(0,r.jsx)("input",{type:"checkbox",id:"deleteProfile",className:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded",checked:A,onChange:e=>P(e.target.checked)}),(0,r.jsx)("label",{htmlFor:"deleteProfile",className:"ml-2 block text-sm text-red-600 dark:text-red-400",children:"Also delete user profile (only if this is their last space)"})]})]}),(0,r.jsx)(m.A,{isOpen:!!T,onClose:()=>L(null),onConfirm:()=>{T&&es.mutate(T.id),L(null)},title:"Resend Invitation",message:"Resend invitation to ".concat(null!=(s=null==T?void 0:T.email)?s:"","?"),confirmText:"Resend"}),(0,r.jsx)(m.A,{isOpen:!!K,onClose:()=>q(null),onConfirm:()=>{K&&er.mutate(K.id),q(null)},title:"Cancel Invitation",message:"Cancel invitation to ".concat(null!=(x=null==K?void 0:K.email)?x:"","?"),confirmText:"Cancel Invitation",cancelText:"Keep Invitation",confirmButtonVariant:"danger"}),(0,r.jsx)(m.A,{isOpen:!!G,onClose:()=>U(null),onConfirm:()=>
1U(null),title:null!=(g=null==G?void 0:G.title)?g:"",message:null!=(b=null==G?void 0:G.message)?b:"",confirmText:"OK",hideCancel:!0})]})}},38559:(e,t,s)=>{s.d(t,{$:()=>o,s:()=>n});var r=s(74268),a=s(69781),i=s(93049),n=class extends a.k{#e;#t;#s;constructor(e){super(),this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#e=[],this.state=e.state||o(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#t.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#r({type:"continue"})};this.#s=(0,i.II)({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#r({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});let s="pending"===this.state.status,r=!this.#s.canStart();try{if(s)t();else{this.#r({type:"pending",variables:e,isPaused:r}),await this.#t.config.onMutate?.(e,this);let t=await this.options.onMutate?.(e);t!==this.state.context&&this.#r({type:"pending",context:t,variables:e,isPaused:r})}let a=await this.#s.start();return await this.#t.config.onSuccess?.(a,e,this.state.context,this),await this.options.onSuccess?.(a,e,this.state.context),await this.#t.config.onSettled?.(a,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(a,null,e,this.state.context),this.#r({type:"success",data:a}),a}catch(t){try{throw await this.#t.config.onError?.(t,e,this.state.context,this),await this.options.onError?.(t,e,this.state.context),await this.#t.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,t,e,this.state.context),t}finally{this.#r({type:"error",error:t})}}finally{this.#t.runNext(this)}}#r(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),r.jG.batch(()=>{this.#e.forEach(t=>{t.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function o(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},41444:(e,t,s)=>{s.d(t,{v:()=>r});let r={log:function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s]},info:function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s]},debug:function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s]},warn:function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];console.warn(...t)},error:function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];console.error(...t)}}},43569:(e,t,s)=>{s.d(t,{A:()=>a});var r=s(12115);let a=r.forwardRef(function(e,t){let{title:s,titleId:a,...i}=e;return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},i),s?r.createElement("title",{id:a},s):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 
118 6M6 6l12 12"}))})},48394:(e,t,s)=>{s.d(t,{A:()=>n});var r=s(95155);s(12115);var a=s(43569);let i={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl"};function n(e){let{isOpen:t,onClose:s,title:n,children:o,footer:l,size:d="md",closeOnBackdropClick:c=!0,showCloseButton:u=!0,bodyClassName:m,testId:h}=e;return t?(0,r.jsx)("div",{className:"fixed inset-0 z-[65] flex items-center justify-center bg-black/40 p-4",onClick:e=>{c&&e.target===e.currentTarget&&s()},"data-testid":h,children:(0,r.jsxs)("div",{className:"w-full ".concat(i[d]," max-h-[90vh] flex flex-col bg-white dark:bg-gray-800 rounded-lg shadow-2xl border border-gray-200 dark:border-gray-700"),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-5 py-4 border-b border-gray-200 dark:border-gray-700",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:n}),u&&(0,r.jsx)("button",{type:"button",onClick:s,className:"text-gray-400 hover:text-gray-600","aria-label":"Close",children:(0,r.jsx)(a.A,{className:"w-5 h-5"})})]}),(0,r.jsx)("div",{className:null!=m?m:"px-5 py-4 space-y-4 overflow-y-auto",children:o}),l&&(0,r.jsx)("div",{className:"flex items-center justify-end gap-2 px-5 py-3 border-t border-gray-200 dark:border-gray-700",children:l})]})}):null}},54652:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var s in t)Object.defineProperty(e,s,{enumerable:!0,get:t[s]})}(t,{default:function(){return l},getImageProps:function(){return o}});let r=s(30943),a=s(75040),i=s(81356),n=r._(s(10253));function o(e){let{props:t}=(0,a.getImgProps)(e,{defaultLoader:n.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image/",loader:"custom",dangerouslyAllowSVG:!0,unoptimized:!1}});for(let[e,s]of Object.entries(t))void 0===s&&delete t[e];return{props:t}}let l=i.Image},57218:(e,t,s)=>{s.d(t,{A:()=>a});var r=s(12115);let a=r.forwardRef(function(e,t){let{title:s,titleId:a,...i}=e;return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},i),s?r.createElement("title",{id:a},s):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))})},80549:(e,t,s)=>{s.d(t,{n:()=>c});var r=s(12115),a=s(38559),i=s(74268),n=s(38445),o=s(34049),l=class extends n.Q{#a;#i=void 0;#n;#o;constructor(e,t){super(),this.#a=e,this.setOptions(t),this.bindMethods(),this.#l()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#a.defaultMutationOptions(e),(0,o.f8)(this.options,t)||this.#a.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,o.EN)(t.mutationKey)!==(0,o.EN)(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#l(),this.#d(e)}getCurrentResult(){return this.#i}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#l(),this.#d()}mutate(e,t){return this.#o=t,this.#n?.removeObserver(this),this.#n=this.#a.getMutationCache().build(this.#a,this.options),this.#n.addObserver(this),this.#n.execute(e)}#l(){let e=this.#n?.state??(0,a.$)();this.#i={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#d(e){i.jG.batch(()=>{if(this.#o&&this.hasListeners()){let t=this.#i.variables,s=this.#i.context;e?.type==="success"?(this.#o.onSuccess?.(e.data,t,s),this.#o.onSettled?.(e.data,null,t,s)):e?.type==="error"&&(this.#o.onError?.(e.error,t,s),this.#o.onSettled?.(void 0,e.error,t,s))}this.listeners.forEach(e=>{e(this.#i)})})}},d=s(99776);function c(e,t){let s=(0,d.jE)(t),[a]=r.useState(()=>new l(s,e));r.useEffect(()=>{a.setOptions(e)},[a,e]);let n=r.useSyncExternalStore(r.useCallback(e=>a.subscribe(i.jG.batchCalls(e)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),c=r.useCallback((e,t)=>{a.mutate(e,t).catch(o.lQ)},[a]);if(n.error&&(0,o.GU)(a.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:c,mutateAsync:n.mutate}}},92655:(e,t,s)=>{s.d(t,{A:()=>n});var r=s(95155),a=s(12115),i=s(47650);function n(e){let{isOpen:t,onClose:s,onConfirm:n,title:o,message:l,confirmText:d="Confirm",cancelText:c="Cancel",confirmButtonVariant:u="primary",hideCancel:m=!1,closeLabel:h="Close modal"}=e,x=a.useId();return t&&"undefined"!=typeof document?(0,i.createPortal)((0,r.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-[70] p-4 transition-opacity duration-300 ease-in-out",children:(0,r.jsxs)("div",{role:"dialog","aria-modal":"true","aria-labelledby":x,className:"bg-white dark:bg-gray-800 rounded-lg p-6 max-h-[calc(100dvh-2rem)] overflow-y-auto max-w-md w-full shadow-xl transform transition-all duration-300 ease-in-out scale-100",children:[(0,r.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,r.jsx)("h3",{id:x,className:"text-xl font-semibold text-gray-900 dark:text-white",children:o}),(0,r.jsx)("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300","aria-label":h,children:(0,r.jsx)("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,r.jsx)("div",{className:"text-gray-600 dark:text-gray-300 mb-6",children:l}),(0,r.jsxs)("div",{className:"flex flex-wrap justify-end gap-3",children:[!m&&(0,r.jsx)("button",{type:"button",onClick:s,className:"py-2 px-4 border border-gray-300 dark:border-gray-700 rounded-md shadow-sm text-sm font-medium text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:c}),(0,r.jsx)("button",{type:"button",onClick:n,className:"py-2 px-4 border border-transparent roun
1ded-md shadow-sm text-sm font-medium text-white ".concat((()=>{switch(u){case"danger":return"bg-red-600 hover:bg-red-700 focus:ring-red-500";case"warning":return"bg-yellow-500 hover:bg-yellow-600 focus:ring-yellow-400";default:return"bg-blue-600 hover:bg-blue-700 focus:ring-blue-500"}})()," focus:outline-none focus:ring-2 focus:ring-offset-2"),children:d})]})]})}),document.body):null}}}]);

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.