PageSourceSearch

https://platform.socbyte.ai/_next/static/chunks/2742.1b0e1f7b6c700d0d.js

js socbyte.ai collected 2026-10-05 12:41:30 UTC 29,214 bytes, 1 lines download raw bytes

1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5e1fd5d8-33c9-4fc2-9240-9e4abedc8942",e._sentryDebugIdIdentifier="sentry-dbid-5e1fd5d8-33c9-4fc2-9240-9e4abedc8942")}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2742],{4632:(e,t,a)=>{a.d(t,{II:()=>i,ND:()=>s,tb:()=>l});var r=a(95155),n=a(12115);let s=e=>{if(null==e)return"—";try{let t=String(e);if(0===t.length)return"—";return t.charAt(0).toUpperCase()+t.slice(1)}catch(e){return"—"}},l=e=>{if(null==e)return"—";let t=String(e).trim();return 0===t.length?"—":t.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").split(/\s+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ")};function i(e){let{html:t,className:a,maxHeight:s=1e4}=e,[l,i]=n.useState(400),o=n.useMemo(()=>"lp_iframe_".concat(Math.random().toString(36).slice(2)),[]),d=n.useMemo(()=>(function(e,t){let a="\n<script>(function(){\n  function send(){\n    try{\n      var b=document.body, d=document.documentElement;\n      var h=Math.max(b.scrollHeight,b.offsetHeight,d.clientHeight,d.scrollHeight,d.offsetHeight);\n      parent.postMessage({type:'lp-iframe-resize',id:'".concat(t,"',height:h},'*');\n    }catch(e){}\n  }\n  if(typeof ResizeObserver!=='undefined'){\n    new ResizeObserver(send).observe(document.documentElement);\n  }\n  if(typeof MutationObserver!=='undefined'){\n    new MutationObserver(send).observe(document.documentElement,{childList:true,subtree:true,attributes:true});\n  }\n  window.addEventListener('load',send);\n  setInterval(send,600);\n})();<\/script>");return e?e.includes("</body>")?e.replace("</body>",a+"</body>"):e.includes("</html>")?e.replace("</html>",a+"</html>"):e+a:"<!doctype html><html><body><p>No HTML.</p>".concat(a,"</body></html>")})(t,o),[t,o]);return n.useEffect(()=>{let e=e=>{let t=(null==e?void 0:e.data)||{};if(t&&"lp-iframe-resize"===t.type&&t.id===o){let e=Number(t.height);Number.isNaN(e)||i(Math.max(100,Math.min(e,s)))}};return window.addEventListener("message",e),()=>window.removeEventListener("message",e)},[o,s]),(0,r.jsx)("iframe",{title:"Landing Page Preview",className:a,srcDoc:d,sandbox:"allow-scripts",scrolling:"no",style:{border:"none",overflow:"hidden",height:l},"data-sentry-component":"AutoResizeIframe","data-sentry-source-file":"Helperfunc.tsx"})}},13130:(e,t,a)=>{a.d(t,{A:()=>l}),a(83225);var r=a(21338),n=a(66609);let s=r.A.create({baseURL:"https://platform.socbyte.ai/api/phishing",paramsSerializer:e=>{let t=new URLSearchParams;return Object.entries(e||{}).forEach(e=>{let[a,r]=e;if(null==r)return;if(Array.isArray(r)){let e=r.filter(e=>null!=e).map(e=>String(e).trim()).filter(Boolean);e.length>0&&t.append(a,e.join(","));return}let n="object"==typeof r?JSON.stringify(r):String(r);n.trim()&&t.append(a,n)}),t.toString()}});console.log("phishingAxiosInstance>>>","https://platform.socbyte.ai/api/phishing"),s.interceptors.request.use(e=>{e.withCredentials=!0;try{{let t=localStorage.getItem("sb:lastActivityAtMs"),a=t?Number(t):NaN;Number.isFinite(a)&&Date.now()-a<15e3&&(e.headers=e.headers||{},e.headers["X-SB-User-Active"]="1")}}catch(e){}return e}),s.interceptors.response.use(e=>e,e=>{var t,a,r;return(null==(t=e.response)?void 0:t.status)===403&&n.oR.error(null==(r=e.response)||null==(a=r.data)?void 0:a.message),Promise.reject(e)});let l=s},13364:(e,t,a)=>{a.d(t,{r:()=>r});function r(e){if(null==e||"string"==typeof e&&""===e.trim())return"";let t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleString(void 0,{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit"})}},13963:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(98422).A)("outline","dots-vertical","DotsVertical",[["path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M11 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M11 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]])},40538:(e,t,a)=>{a.d(t,{AM:()=>l,Wv:()=>i,hl:()=>o});var r=a(95155);a(12115);var n=a(67198),s=a(40980);function l(e){let{...t}=e;return(0,r.jsx)(n.bL,{"data-slot":"popover",...t,"data-sentry-element":"PopoverPrimitive.Root","data-sentry-component":"Popover","data-sentry-source-file":"popover.tsx"})}function i(e){let{...t}=e;return(0,r.jsx)(n.l9,{"data-slot":"popover-trigger",...t,"data-sentry-element":"PopoverPrimitive.Trigger","data-sentry-component":"PopoverTrigger","data-sentry-source-file":"popover.tsx"})}function o(e){let{className:t,align:a="center",sideOffset:l=4,container:i,...o}=e;return(0,r.jsx)(n.ZL,{container:null!=i?i:void 0,"data-sentry-element":"PopoverPrimitive.Portal","data-sentry-component":"PopoverContent","data-sentry-source-file":"popover.tsx",children:(0,r.jsx)(n.UC,{"data-slot":"popover-content",align:a,sideOffset:l,className:(0,s.cn)("bg-popover text-popover-foreground 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]:sli
1de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-[9999] w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",t),...o,"data-sentry-element":"PopoverPrimitive.Content","data-sentry-source-file":"popover.tsx"})})}},44812:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(98422).A)("outline","mail","Mail",[["path",{d:"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10",key:"svg-0"}],["path",{d:"M3 7l9 6l9 -6",key:"svg-1"}]])},50291:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(98422).A)("outline","test-pipe-2","TestPipe2",[["path",{d:"M15 3v15a3 3 0 0 1 -6 0v-15",key:"svg-0"}],["path",{d:"M9 12h6",key:"svg-1"}],["path",{d:"M8 3h8",key:"svg-2"}]])},52662:(e,t,a)=>{a.r(t),a.d(t,{default:()=>k});var r=a(95155),n=a(12115),s=a(61094),l=a(65957),i=a(15007),o=a(50291),d=a(44812),c=a(80069),u=a(70747),m=a(37911),p=a(20363),f=a(73344),g=a(9316),y=a(8213),h=a(73124),v=a(60002),x=a(3134),S=a(33936),w=a(51588),b=a(60285),P=a(57828),j=a(94178),_=a(59118),I=a(13364);let N=e=>{let{data:t,open:a,onOpenChange:n}=e;return t?(0,r.jsx)(m.a,{heading:"SMTP Profile Details",open:a,onOpenChange:n,showClose:!0,"data-sentry-element":"Modal","data-sentry-component":"SendingProfileSmtpView","data-sentry-source-file":"SendingProfileSmtpView.tsx",children:(0,r.jsxs)("div",{className:"bg-card grid grid-cols-2 gap-6 p-2 md:grid-cols-3",children:[(0,r.jsx)(_.W7,{label:"Profile Name",value:t.name||"-","data-sentry-element":"InfoItem","data-sentry-source-file":"SendingProfileSmtpView.tsx"}),(0,r.jsx)(_.W7,{label:"Host",value:t.host||"-","data-sentry-element":"InfoItem","data-sentry-source-file":"SendingProfileSmtpView.tsx"}),(0,r.jsx)(_.W7,{label:"From Email",value:t.email_address||"-","data-sentry-element":"InfoItem","data-sentry-source-file":"SendingProfileSmtpView.tsx"}),(0,r.jsx)(_.W7,{label:"Username",value:t.username||"-","data-sentry-element":"InfoItem","data-sentry-source-file":"SendingProfileSmtpView.tsx"}),(0,r.jsx)(_.W7,{label:"Interface Type",value:t.interface_type||"-","data-sentry-element":"InfoItem","data-sentry-source-file":"SendingProfileSmtpView.tsx"}),(0,r.jsx)(_.W7,{label:"Profile Type",value:"sending"===t.profile_type?"Phishing":"awareness"===t.profile_type?"Awareness":"-","data-sentry-element":"InfoItem","data-sentry-source-file":"SendingProfileSmtpView.tsx"}),(0,r.jsx)(_.W7,{label:"Tenant",value:t.tenant_name||"-","data-sentry-element":"InfoItem","data-sentry-source-file":"SendingProfileSmtpView.tsx"}),(0,r.jsx)(_.W7,{label:"Status",value:t.is_active?"Active":"Inactive","data-sentry-element":"InfoItem","data-sentry-source-file":"SendingProfileSmtpView.tsx"}),(0,r.jsx)(_.W7,{label:"Ignore Certificate Error",value:t.ignore_cert_errors?"Yes":"No","data-sentry-element":"InfoItem","data-sentry-source-file":"SendingProfileSmtpView.tsx"}),(0,r.jsx)(_.W7,{label:"Created At",value:(0,I.r)(t.created_at)||"-","data-sentry-element":"InfoItem","data-sentry-source-file":"SendingProfileSmtpView.tsx"}),(0,r.jsx)(_.W7,{label:"Updated At",value:(0,I.r)(t.updated_at)||"-","data-sentry-element":"InfoItem","data-sentry-source-file":"SendingProfileSmtpView.tsx"})]})}):null};var C=a(31376),T=a(25475),M=a(22980),A=a(14749),V=a(76426),E=a(45981);function k(){let{t:e}=(0,E.Jl)("administration"),[t,a]=(0,n.useState)(!1),[_,I]=(0,n.useState)(!1),[k,z]=(0,n.useState)(!1),[F,D]=(0,n.useState)(""),[q,O]=(0,n.useState)(""),[L,W]=(0,n.useState)(""),[R,U]=(0,n.useState)(""),[H,B]=(0,n.useState)(""),[K,J]=(0,n.use
1State)(""),[$,Y]=(0,n.useState)(""),[Z,Q]=(0,n.useState)("sending"),[G,X]=(0,n.useState)(!1),[ee,et]=(0,n.useState)(null),[ea,er]=(0,n.useState)({}),[en,es]=(0,n.useState)([]),[el,ei]=(0,n.useState)(!1),[eo,ed]=(0,n.useState)(null),[ec,eu]=(0,n.useState)({pageIndex:0,pageSize:10}),[em,ep]=(0,n.useState)(0),[ef,eg]=(0,n.useState)([]),[ey,eh]=(0,n.useState)(!1),[ev,ex]=(0,n.useState)(!0),[eS,ew]=(0,n.useState)(""),[eb,eP]=(0,n.useState)(""),[ej,e_]=(0,n.useState)(!1),[eI,eN]=(0,n.useState)(null),[eC,eT]=(0,n.useState)(!1),[eM,eA]=(0,n.useState)(null),{user:eV}=(0,M.J)(),eE=(null==eV?void 0:eV.tenantType)==="customer",[ek,ez]=(0,n.useState)("SMTP"),eF=(0,n.useMemo)(()=>({tenantType:"customer"}),[]),eD=async()=>{if(t)try{ei(!0),ed(null);let t=await (0,j.SV)({page:ec.pageIndex,size:ec.pageSize,search:eb.trim()?eb.trim():void 0},eV);if(t&&!1!==t.success){var e,a,r,n;let s=null!=(r=null==t||null==(e=t.data)?void 0:e.results)?r:[],l=null!=(n=null==t||null==(a=t.data)?void 0:a.total)?n:s.length;console.log("SMTP Interfaces:",s),es(s),ep(l),ed(null)}else ed((null==t?void 0:t.message)||"Failed to fetch SMTP interfaces"),es([]),ep(0)}catch(e){ed((null==e?void 0:e.message)||"Failed to fetch SMTP interfaces"),es([]),ep(0)}finally{ei(!1)}};(0,n.useEffect)(()=>{(t||ey)&&(eD(),eh(!1))},[t,ec.pageIndex,ec.pageSize,ey,eb]),(0,n.useEffect)(()=>{if(!_){J(""),Y("");return}if(eE){var e,t;J(String(null!=(e=null==eV?void 0:eV.tenantId)?e:"")),Y(String(null!=(t=null==eV?void 0:eV.tenantId)?t:""))}else G||(J(""),Y(""))},[eE,G,_,null==eV?void 0:eV.tenantId]);let eq=async e=>{eA(e),eT(!0);let t=await (0,j.Ps)(e.id);t.success&&t.data?eA(t.data):!1===t.success&&C.toast.error(t.message||"Failed to fetch SMTP profile")},eO=async e=>{console.log("interfaceItem",e);let t=await (0,j.NZ)({email:e.email_address,smtp:{interface_type:e.interface_type,host:e.host.trim(),username:e.username,password:e.password.trim(),from_address:e.email_address.trim(),ignore_cert_errors:e.ignore_cert_errors}});t.success?C.toast.success(t.message):C.toast.error(t.message)},eL=(0,n.useMemo)(()=>[{accessorKey:"name",header:e=>{let{column:t}=e;return(0,r.jsx)(S.w,{column:t,title:"Profile Name"})},cell:e=>{let{cell:t}=e;return(0,r.jsx)("span",{className:"capitalize",children:t.getValue()})}},{accessorKey:"host",header:e=>{let{column:t}=e;return(0,r.jsx)(S.w,{column:t,title:"Host"})},cell:e=>{let{cell:t}=e;return t.getValue()}},{accessorKey:"email_address",header:e=>{let{column:t}=e;return(0,r.jsx)(S.w,{column:t,title:"From Email"})},cell:e=>{let{cell:t}=e;return t.getValue()}},{accessorKey:"tenant_name",header:e=>{let{column:t}=e;return(0,r.jsx)(S.w,{column:t,title:"Tenant"})},cell:e=>{let{cell:t}=e;return t.getValue()}},{accessorKey:"username",header:e=>{let{column:t}=e;return(0,r.jsx)(S.w,{column:t,title:"Username"})},cell:e=>{let{cell:t}=e;return t.getValue()}},{accessorKey:"profile_type",header:e=>{let{column:t}=e;return(0,r.jsx)(S.w,{column:t,title:"Profile Type"})},cell:e=>{let{cell:t}=e,a=t.getValue();return(0,r.jsx)("span",{className:"capitalize",children:"sending"===a?"Phishing":"Awareness"})}},{accessorKey:"is_active",header:e=>{let{column:t}=e;return(0,r.jsx)(S.w,{column:t,title:"Status"})},cell:e=>{let{cell:t}=e,a=t.getValue();return(0,r.jsx)("span",{className:"capitalize ".concat(a?"text-green-500":"text-red-500"),children:a?"Active":"Inactive"})}},{id:"actions",header:()=>(0,r.jsx)("div",{className:"text-center",children:"Actions"}),cell:t=>{let{row:a}=t,n=a.original;return(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsxs)(w.rI,{children:[(0,r.jsx)(w.ty,{asChild:!0,children:(0,r.jsx)(u.$,{className:"h-8 w-8 bg-transparent p-0 hover:bg-transparent",children:(0,r.jsx)(b.A,{className:"h-4 w-4"})})}),(0,r.jsxs)(w.SQ,{align:"end",children:[(0,r.jsxs)(w._2,{onClick:()=>eq(n),children:[(0,r.jsx)(s.A,{className:"h-4 w-4 text-[var(--viewIcon)]"}),e("View")]}),(0,r.jsxs)(w._2,{onClick:()=>{X(!0),Q(n.profile_type),et(n.id),B(n.name||""),W(n.host||""),U(n.email_address||""),D(n.username||"");let e=n.interface_type;ez("EWS"===String(null!=e?e:"").trim().toUpperCase()?"EWS":"SMTP"),z(n.ignore_cert_errors||!1),n.tenant&&(Y(n.tenant),J(n.tenant)),I(!0)},children:[(0,r.jsx)(l.A,{className:"h-4 w-4 text-[var(--editIcon)]"}),e("Edit")]}),(0,r.jsxs)(w._2,{onClick:()=>{eN(n),e_(!0)},children:[(0,r.jsx)(i.A,{className:"h-4 w-4 text-[var(--deleteIcon)]"}),e("Delete")]}),(0,r.jsxs)(w._2,{onClick:()=>{eO(n)},children:[(0,r.jsx)(o.A,{className:"h-4 w-4 text-[var(--editIcon)]"}),"Test Connection"]})]})]})})}}],[e]),eW=(0,v.N4)({data:en,columns:eL,getCoreRowModel:(0,x.HT)(),getPaginationRowModel:(0,x.kW)(),getSortedRowModel:(0,x.h5)(),onPaginationChange:eu,onSortingChange:eg,manualPagination:!0,pageCount:em>0?Math.ceil(em/ec.pageSize):1,meta:{totalRows:em},state:{pagination:ec,sorting:ef}}),eR=eE?null==eV?void 0:eV.tenantId:K||$||"",eU=async()=>{try{let e=await (0,j.GQ)({name:H,host:L,from_address:R,username:F,password:q,interface_type:ek,ignore_cert_errors:k,headers:[],requestedTenant:[eR],profile_type:Z},eR);(null==e?void 0:e.success)?(C.toast.success((null==e?void 0:e.message)||"Sending profile created successfully"),I(!1),eh(!0)):C.toast.error((null==e?void 0:e.message)||"Failed to create sending profile")}catch(a){var e,t;C.toast.error((null==a||null==(t=a.response)||null==(e=t.data)?void 0:e.message)||(null==a?void 0:a.message)||"Failed to create sending profile")}},eH=async()=>
1{if(ee)try{let e={id:ee,name:H,host:L,email_address:R,username:F,ignore_cert_errors:k,interface_type:ek,headers:[],requestedTenant:[eR],profile_type:Z};q&&""!==q.trim()&&(e.password=q);let t=await (0,j.dN)(e,ee);(null==t?void 0:t.success)?(C.toast.success((null==t?void 0:t.message)||"Sending profile updated successfully"),I(!1),eh(!0)):C.toast.error((null==t?void 0:t.message)||"Failed to update sending profile")}catch(a){var e,t;C.toast.error((null==a||null==(t=a.response)||null==(e=t.data)?void 0:e.message)||(null==a?void 0:a.message)||"Failed to update sending profile")}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(u.$,{onClick:()=>a(!0),variant:"icon","data-sentry-element":"Button","data-sentry-source-file":"SendingProfile.tsx",children:[(0,r.jsx)(d.A,{className:"text-primary !h-6 !w-6","data-sentry-element":"IconMail","data-sentry-source-file":"SendingProfile.tsx"}),(0,r.jsx)("span",{className:"text-[11px] font-medium text-gray-100",children:e("Sending Profile")})]}),(0,r.jsxs)(m.a,{heading:"SMTP Configuration",open:t,onOpenChange:a,showClose:!0,"data-sentry-element":"Modal","data-sentry-source-file":"SendingProfile.tsx",children:[(0,r.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,r.jsxs)(u.$,{onClick:()=>I(!0),"data-sentry-element":"Button","data-sentry-source-file":"SendingProfile.tsx",children:[(0,r.jsx)(c.A,{className:"!h-6 !w-6 text-white","data-sentry-element":"IconPlus","data-sentry-source-file":"SendingProfile.tsx"}),(0,r.jsx)("span",{className:"text-sm font-medium text-gray-100",children:"New SMTP"})]}),(0,r.jsx)(V.i,{searchOpen:ev,onToggleOpen:()=>ex(e=>!e),searchInput:eS,onSearchInputChange:ew,onSearch:()=>{eS.trim()&&(eP(eS),eu(e=>({...e,pageIndex:0})))},onClear:()=>{ew(""),eP(""),eu(e=>({...e,pageIndex:0}))},onEmptied:()=>{eP(""),eu(e=>({...e,pageIndex:0}))},placeholder:"Search sending profiles...","data-sentry-element":"TableSearchBox","data-sentry-source-file":"SendingProfile.tsx"})]}),el?(0,r.jsx)(y.O,{columnCount:7,rowCount:5,withPagination:!0}):(0,r.jsx)(h.b,{table:eW})]}),(0,r.jsx)(m.a,{heading:G?"Edit SMTP":"New SMTP",open:_,onOpenChange:()=>{I(!1),X(!1),et(null),J(""),Y(""),B(""),W(""),U(""),D(""),O(""),z(!1),er({}),eN(null),e_(!1),ei(!1),ez("SMTP")},showClose:!0,"data-sentry-element":"Modal","data-sentry-source-file":"SendingProfile.tsx",children:(0,r.jsxs)("div",{className:"space-y-4",children:[(null==eV?void 0:eV.tenantType)!=="customer"&&!G&&(0,r.jsx)(A.F,{id:"sending-profile-tenant-select",label:"Tenant",placeholder:"Select a tenant",fetchParams:eF,value:K,onValueChange:e=>{J(e),Y(e),e&&er(e=>({...e,tenant:!1}))},required:!0,error:ea.tenant?"Tenant is required":void 0}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(p.J,{htmlFor:"profile-type","data-sentry-element":"Label","data-sentry-source-file":"SendingProfile.tsx",children:"Profile Type"}),(0,r.jsxs)(T.l6,{value:Z,onValueChange:e=>Q(e),"data-sentry-element":"Select","data-sentry-source-file":"SendingProfile.tsx",children:[(0,r.jsx)(T.bq,{className:"w-full","data-sentry-element":"SelectTrigger","data-sentry-source-file":"SendingProfile.tsx",children:(0,r.jsx)(T.yv,{placeholder:"Select Profile Type","data-sentry-element":"SelectValue","data-sentry-source-file":"SendingProfile.tsx"})}),(0,r.jsxs)(T.gC,{"data-sentry-element":"SelectContent","data-sentry-source-file":"SendingProfile.tsx",children:[(0,r.jsx)(T.eb,{value:"sending","data-sentry-element":"SelectItem","data-sentry-source-file":"SendingProfile.tsx",children:"Phishing Profile"}),(0,r.jsx)(T.eb,{value:"awareness","data-sentry-element":"SelectItem","data-sentry-source-file":"SendingProfile.tsx",children:"Awareness Profile"})]})]})]}),(0,r.jsx)(f.D,{id:"profile-name",label:"Profile Name",placeholder:"Enter Profile Name",required:!0,value:H,onChange:e=>{B(e.target.value),e.target.value.trim()&&er(e=>({...e,profileName:!1}))},error:ea.profileName?"Profile name is required":void 0,"data-sentry-element":"ValidatedInput","data-sentry-source-file":"SendingProfile.tsx"}),(0,r.jsx)(f.D,{id:"host",label:"Host",placeholder:"Sample.smtp.com:25",required:!0,value:L,onChange:e=>{W(e.target.value),e.target.value.trim()&&er(e=>({...e,host:!1}))},error:ea.host?"Host is required":void 0,"data-sentry-element":"ValidatedInput","data-sentry-source-file":"SendingProfile.tsx"}),(0,r.jsx)(f.D,{id:"from-email",label:"From Email",placeholder:"[email protected]",required:!0,value:R,onChange:e=>{U(e.target.value),e.target.value.trim()&&er(e=>
1({...e,fromEmail:!1}))},error:ea.fromEmail?"From email is required":void 0,"data-sentry-element":"ValidatedInput","data-sentry-source-file":"SendingProfile.tsx"}),(0,r.jsx)("div",{className:"space-y-3",children:(0,r.jsx)("p",{className:"text-lg font-medium text-[var(--primary)]",children:"Interface type:"})}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(p.J,{htmlFor:"smtp","data-sentry-element":"Label","data-sentry-source-file":"SendingProfile.tsx",children:"SMTP"}),(0,r.jsxs)(T.l6,{value:ek,onValueChange:ez,"data-sentry-element":"Select","data-sentry-source-file":"SendingProfile.tsx",children:[(0,r.jsx)(T.bq,{className:"w-full","data-sentry-element":"SelectTrigger","data-sentry-source-file":"SendingProfile.tsx",children:(0,r.jsx)(T.yv,{placeholder:"Select Interface Type","data-sentry-element":"SelectValue","data-sentry-source-file":"SendingProfile.tsx"})}),(0,r.jsxs)(T.gC,{"data-sentry-element":"SelectContent","data-sentry-source-file":"SendingProfile.tsx",children:[(0,r.jsx)(T.eb,{value:"SMTP","data-sentry-element":"SelectItem","data-sentry-source-file":"SendingProfile.tsx",children:"SMTP"}),(0,r.jsx)(T.eb,{value:"EWS","data-sentry-element":"SelectItem","data-sentry-source-file":"SendingProfile.tsx",children:"EWS"})]})]})]}),(0,r.jsx)(f.D,{id:"username",label:"Username",placeholder:"Enter Username",required:!0,value:F,onChange:e=>{D(e.target.value),e.target.value.trim()&&er(e=>({...e,username:!1}))},error:ea.username?"Username is required":void 0,"data-sentry-element":"ValidatedInput","data-sentry-source-file":"SendingProfile.tsx"}),(0,r.jsx)(f.D,{id:"password",label:G?"Password (leave empty to keep current)":"Password",placeholder:G?"Enter new password (optional)":"Enter Password",type:"password",required:!G,value:q,onChange:e=>{O(e.target.value),e.target.value.trim()&&er(e=>({...e,password:!1}))},error:ea.password?"Password is required":void 0,"data-sentry-element":"ValidatedInput","data-sentry-source-file":"SendingProfile.tsx"}),(0,r.jsxs)("div",{className:"flex gap-2 space-y-2",children:[(0,r.jsx)(g.S,{id:"ssl",checked:k,onCheckedChange:()=>z(!k),"data-sentry-element":"Checkbox","data-sentry-source-file":"SendingProfile.tsx"}),(0,r.jsx)(p.J,{htmlFor:"ssl",className:"pb-2","data-sentry-element":"Label","data-sentry-source-file":"SendingProfile.tsx",children:"Ignore Certificate Error"})]}),(0,r.jsx)("div",{className:"flex justify-end space-y-2",children:(0,r.jsx)(u.$,{onClick:()=>{let e={tenant:!G&&!eE&&!K,profileName:!H.trim(),host:!L.trim(),fromEmail:!R.trim(),username:!F.trim(),password:!G&&!q.trim()};if(er(e),Object.values(e).some(Boolean))return void C.toast.error("Please fill in all required fields");G?eH():eU()},"data-sentry-element":"Button","data-sentry-source-file":"SendingProfile.tsx",children:G?"Update":"Create"})})]})}),(0,r.jsx)(N,{data:eM,open:eC,onOpenChange:eT,"data-sentry-element":"SendingProfileSmtpView","data-sentry-source-file":"SendingProfile.tsx"}),(0,r.jsx)(P.T,{open:ej,onOpenChange:e_,title:"Are you sure?",description:"This will permanently delete the SMTP profile '".concat(null==eI?void 0:eI.name,"'. This action cannot be undone."),confirmText:"Delete",cancelText:"Cancel",variant:"destructive",onConfirm:async()=>{if(eI)try{let e=await (0,j.tw)(eI.id);(null==e?void 0:e.success)?(C.toast.success((null==e?void 0:e.message)||"Sending profile deleted successfully"),eN(null),e_(!1),await eD()):C.toast.error((null==e?void 0:e.message)||"Failed to delete sending profile")}catch(e){C.toast.error((null==e?void 0:e.message)||"Failed to delete sending profile")}},"data-sentry-element":"ConfirmDialog","data-sentry-source-file":"SendingProfile.tsx"})]})}},61094:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(98422).A)("outline","eye","Eye",[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]])},68509:(e,t,a)=>{a.d(t,{V:()=>c});var r=a(95155),n=a(12115),s=a(68765),l=a(40980),i=a(55638);let o=()=>(0,r.jsx)(i.YJP,{className:"size-4","data-sentry-element":"ChevronLeftIcon","data-sentry-component":"LeftIcon","data-sentry-source-file":"calendar.tsx"}),d=()=>(0,r.jsx)(i.vKP,{className:"size-4","data-sentry-element":"ChevronRightIcon","data-sentry-component":"RightIcon","data-sentry-source-file":"calendar.tsx"});function c(e){var t;let{className:a,classNames:i,showOutsideDays:c=!0,...u}=e,{onSelect:m,...p}=u,[f,g]=n.useState("range"===u.mode?(null==(t=u.selected)?void 0:t.from)||new Date:u.selected||new Date);n.useEffect(()=>{if("range"===u.mode){let e=u.selected;(null==e?void 0:e.from)&&g(e.from)}else u.selected instanceof Date&&g(u.selected)},[u.selected,u.mode]);let y=()=>{let e=new Date;g(e),m&&m(e)};return(0,r.jsx)(s.hv,{...p,showOutsideDays:c,selected:u.selected,onSelect:e=>{e&&!(e.from||e.to)&&g(e),m&&m(e)},month:f,onMonthChange:g,className:(0,l.cn)("bg-accent relative rounded-lg border border-[var(--primary)] p-3 shadow-sm",a),classNames:{months:"flex flex-col sm:flex-row gap-2",month:"flex flex-col gap-4",caption:"flex justify-center pt-1 relative items-center w-full",table:"w-full border-collapse space-x-1",head_row:"flex",head_cell:"text-gray-400 rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:(0,l.cn)("relative p-0 text-center text-sm focus-within:relative focus-within:z-20","[&:has([aria-selected])]:bg-[var(--primary)]/10 [&:has([aria-selected].day-range-end)]:rounded-r-md","range"===u.mode?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:(0,l.cn)("size-8 p-0 font-normal rounded-md transition-all duration-200 ease-in-out cursor-pointer relative z-10","hover:bg-[var(--primary)]/10 hover:text-[var(--primary)]","focus:bg-[var(--primary)]/10 focus:text-[var(--primary)] focus:outline-none","aria-selected:opacity-100 pointer-events-auto select-none"),day_range_start:"day-range-start aria-selected:bg-[var(--primary)] aria-selected:text-white",day_range_end:"day-range-end aria-selected:bg-[var(--primary)] aria-selected:text-white",day_selected:"bg-[var(--primary)] text-white hover:bg-[var(--primary)] hover:text-white focus:bg-[var(--primary)] focus:text-white",day_outside:"day-outside text-gray-400 aria-selected:text-gray-400",day_disabled:"text-gray-400 opacity-50 cursor-not-allowed pointer-events-none",day_range_middle:"aria-selected:bg-[var(--primary)]/20 aria-selected:text-[var(--primary)]",day_hidden:"invisible",...i},components:{Caption:e=>{let{displayMonth:t}=e;return(0,r.jsxs)("div",{className:"flex w-full items-center justify-between px-2","data-sentry-component":"CustomCaption","data-sentry-source-file":"calendar.tsx",children:[(0,r.jsx)("button",{type:"button",onClick:()=>g(new Date(t.getFullYear(),t.getMonth()-1)),className:(0,l.cn)("pointer-events-auto relative z-10 size-7 curs
1or-pointer rounded-md bg-transparent p-0 text-[var(--primary)] hover:bg-[var(--primary)]/10"),children:(0,r.jsx)(o,{"data-sentry-element":"LeftIcon","data-sentry-source-file":"calendar.tsx"})}),(0,r.jsx)("span",{className:"text-sm font-medium text-[var(--primary)]",children:t.toLocaleString("default",{month:"long",year:"numeric"})}),(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)("button",{type:"button",onClick:()=>g(new Date(t.getFullYear(),t.getMonth()+1)),className:(0,l.cn)("pointer-events-auto relative z-10 size-7 cursor-pointer rounded-md bg-transparent p-0 text-[var(--primary)] hover:bg-[var(--primary)]/10"),children:(0,r.jsx)(d,{"data-sentry-element":"RightIcon","data-sentry-source-file":"calendar.tsx"})}),(0,r.jsx)("button",{type:"button",onClick:y,className:(0,l.cn)("cursor-pointer rounded-md px-2 py-1 text-sm font-medium","text-[var(--primary)] transition-colors","hover:bg-[var(--primary)]/10 hover:text-[var(--primary)]","focus:ring-2 focus:ring-[var(--primary)]/30 focus:outline-none","pointer-events-auto relative z-10"),children:"Today"})]})]})}},"data-sentry-element":"DayPicker","data-sentry-component":"Calendar","data-sentry-source-file":"calendar.tsx"})}},94178:(e,t,a)=>{a.d(t,{GQ:()=>i,NZ:()=>c,Ps:()=>l,SV:()=>s,dN:()=>o,tw:()=>d});var r=a(13130),n=a(34686);let s=async function(){var e,t,a,s,l,i,o,d,c,u,m,p,f,g,y,h,v,x;let S=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},w=arguments.length>1?arguments[1]:void 0;try{let v={...Object.fromEntries(Object.entries(S).filter(e=>{let[,t]=e;return null!=t&&("string"!=typeof t||""!==t.trim())&&(Array.isArray(t)?t.length>0:"object"!=typeof t||Object.keys(t).length>0)}))},x=(0,n.jN)(w);void 0===v.requestedTenant&&Array.isArray(x)&&x.length>0&&(v.requestedTenant=x);let b=await r.A.get("/get_list_smtp",{params:v});return{...b.data,data:{results:null!=(y=null==(t=b.data)||null==(e=t.data)?void 0:e.data)?y:[],total:null!=(h=null==(s=b.data)||null==(a=s.data)?void 0:a.total)?h:0,page:null==(i=b.data)||null==(l=i.data)?void 0:l.page,size:null==(d=b.data)||null==(o=d.data)?void 0:o.size,total_pages:null==(u=b.data)||null==(c=u.data)?void 0:c.total_pages,has_next:null==(p=b.data)||null==(m=p.data)?void 0:m.has_next,has_prev:null==(g=b.data)||null==(f=g.data)?void 0:f.has_prev}}}catch(e){return{success:!1,message:(null==e||null==(x=e.response)||null==(v=x.data)?void 0:v.message)||"Failed to fetch SMTP interfaces"}}},l=async e=>{try{return(await r.A.get("/get_smtp/".concat(e))).data}catch(e){var t,a;return{success:!1,message:(null==e||null==(a=e.response)||null==(t=a.data)?void 0:t.message)||"Failed to fetch SMTP interface"}}},i=async(e,t)=>{try{if(""===t)return(await r.A.post("/create_smtp/",e)).data;return(await r.A.post("/create_smtp?requestedTenant=".concat(t),e)).data}catch(e){var a,n;return{success:!1,message:(null==e||null==(n=e.response)||null==(a=n.data)?void 0:a.message)||"Failed to create SMTP interface"}}},o=async(e,t)=>{try{return(await r.A.patch("/update_smtp/".concat(t),e)).data}catch(e){var a,n;return{success:!1,message:(null==e||null==(n=e.response)||null==(a=n.data)?void 0:a.message)||"Failed to update SMTP interface"}}},d=async e=>{try{return(await r.A.delete("/delete_smtp/".concat(e))).data}catch(e){var t,a;return{success:!1,message:(null==e||null==(a=e.response)||null==(t=a.data)?void 0:t.message)||"Failed to delete SMTP interface"}}},c=async e=>{try{return(await r.A.post("/validate_smtp",e)).data}catch(e){var t,a;return{success:!1,message:(null==e||null==(a=e.response)||null==(t=a.data)?void 0:t.message)||"Failed to validate SMTP connection"}}}}}]);

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.