PageSourceSearch

https://platform.socbyte.ai/_next/static/chunks/9118-c07ebd3821a7db9e.js

js socbyte.ai collected 2026-10-05 12:40:02 UTC 43,685 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]="7552de03-e5bf-47a1-8307-c9d25f4e4b42",e._sentryDebugIdIdentifier="sentry-dbid-7552de03-e5bf-47a1-8307-c9d25f4e4b42")}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9118],{5024:(e,t,a)=>{a.d(t,{D:()=>r,E:()=>s});let s=(e,t)=>{var a;if(null==e)return;let s=String(e).trim();if(s)return t.length?null!=(a=t.find(e=>e.toLowerCase()===s.toLowerCase()))?a:null:s},r=(e,t)=>{let a=[...e],s=String(null!=t?t:"").trim();return s&&!a.some(e=>e.toLowerCase()===s.toLowerCase())&&a.push(s),a}},20016:(e,t,a)=>{a.d(t,{A:()=>i}),a(83225);var s=a(21338),r=a(66609);let n=s.A.create({baseURL:"https://platform.socbyte.ai/api/assetmanagement"});n.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}),n.interceptors.response.use(e=>e,e=>{var t,a,s;return(null==(t=e.response)?void 0:t.status)===403&&r.oR.error(null==(s=e.response)||null==(a=s.data)?void 0:a.message),Promise.reject(e)});let i=n},27315:(e,t,a)=>{a.d(t,{LB:()=>n,_B:()=>c,e_:()=>l,gT:()=>d,qs:()=>r,te:()=>i,wV:()=>o});var s=a(20016);let r=async function(){var e,t,a;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;try{let t=Object.fromEntries(Object.entries(r).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)})),a={...n},i=a.requestedTenant,l=null==i?["all"]:Array.isArray(i)?i.length>0?i.filter(e=>"string"==typeof e&&""!==e.trim()):["all"]:[i];if(a.requestedTenant=l,a.fieldSearch){let e={...a.fieldSearch};Array.isArray(e.filters)&&(e.filters=e.filters.filter(e=>!!e&&"string"==typeof e.fieldName&&""!==e.fieldName.trim()&&Array.isArray(e.value)&&e.value.length>0&&"string"==typeof e.operator&&""!==e.operator.trim()),e.filters.length||delete e.filters),e.filters||e.logicalOperator?a.fieldSearch=e:a.fieldSearch=void 0}let o={requestedTenant:l,...a.fieldSearch?{fieldSearch:a.fieldSearch}:{},...a.category?{category:a.category}:{}},d=await s.A.post("/asset-management/asset/list",o,{params:t});return null==d||null==(e=d.data)?void 0:e.data}catch(e){return{success:!1,message:(null==e||null==(a=e.response)||null==(t=a.data)?void 0:t.message)||"Failed to fetch assets"}}},n=async(e,t)=>{try{let a=Array.isArray(t)?t.filter(e=>"string"==typeof e&&""!==e.trim()):t?[t]:[],r=await s.A.get("/asset-management/asset/view/".concat(encodeURIComponent(e)),{params:a.length<=1?{requestedTenant:a[0]}:{requestedTenant:a},paramsSerializer:e=>{let t=new URLSearchParams;return Object.keys(e||{}).forEach(a=>{let s=e[a];if(Array.isArray(s))for(let e of s)t.append(a,String(e));else null!=s&&t.append(a,String(s))}),t.toString()}});return null==r?void 0:r.data}catch(e){var a,r;return{success:!1,message:(null==e||null==(r=e.response)||null==(a=r.data)?void 0:a.message)||"Failed to fetch asset"}}},i=async(e,t,a)=>{var r,n,i;try{let n=await s.A.post("/asset-management/user-config/".concat(encodeURIComponent(e)),{...t,...a?{type:a}:{}});return null!=(r=null==n?void 0:n.data)?r:{success:!0}}catch(e){return{success:!1,message:(null==e||null==(i=e.response)||null==(n=i.data)?void 0:n.message)||"Failed to save user configuration"}}},l=async(e,t)=>{var a,r,n;try{let r=await s.A.get("/asset-management/user-config/".concat(encodeURIComponent(e)),{params:t?{type:t}:void 0});return null!=(a=null==r?void 0:r.data)?a:{}}catch(e){return{success:!1,message:(null==e||null==(n=e.response)||null==(r=n.data)?void 0:r.message)||"Failed to fetch user configuration"}}},o=async(e,t)=>{var a,r,n;try{let r=Array.isArray(e)?e.filter(e=>"string"==typeof e&&""!==e.trim()):e?[e]:[],n=await s.A.post("/asset-management/asset/create",{requestedTenant:r,data:t});return null!=(a=null==n?void 0:n.data)?a:{success:!0}}catch(e){return{success:!1,message:(null==e||null==(n=e.response)||null==(r=n.data)?void 0:r.message)||"Failed to create asset(s)"}}},d=async(e,t,a)=>{var r,n,i;try{let n={requestedTenant:Array.isArray(t)?t.filter(e=>"string"==typeof e&&""!==e.trim()):t?[t]:[]};for(let[e,t]of Object.entries(a||{}))void 0!==t&&(n[e]=t);let i=await s.A.patch("/asset-management/asset/update/".concat(encodeURIComponent(e)),n);return null!=(r=null==i?void 0:i.data)?r:{success:!0}}catch(e){return{success:!1,message:(null==e||null==(i=e.response)||null==(n=i.data)?void 0:n.message)||"Failed to update asset"}}},c=async(e,t)=>{var a,r,n;try{let r=Array.isArray(e)?e.filter(e=>"string"==typeof e&&""!==e.trim()):e?[e]:[],n=await s.A.patch("/asset-management/asset/disable",{requestedTenant:r,ids:t});return null!=(a=null==n?void 0:n.data)?a:{success:!0}}catch(e){return{success:!1,message:(null==e||null==(n=e.response)||null==(r=n.data)?void 0:r.message)||"Failed to disable asset(s)"}}}},35592:(e,t,a)=>{a.d(t,{w:()=>i});var s=a(12115),r=a(22980),n=a(44715);function i(){var e;let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0],a=arguments.length>1?arguments[1]:void 0,{user:i}=null!=(e=(0,r.J)())?e:{}
1,[l,o]=(0,s.useState)([]),[d,c]=(0,s.useState)(!1),[u,p]=(0,s.useState)(!1),[m,y]=(0,s.useState)(0),g=(0,s.useCallback)(()=>{y(e=>e+1)},[]);return(0,s.useEffect)(()=>{if(!t||!i)return;let e=!1;return c(!0),(0,n.ZJ)(i,a).catch(()=>[]).then(t=>{e||(o(t),p(0===t.length),c(!1))}),()=>{e=!0}},[t,i,null==i?void 0:i.tenantType,null==i?void 0:i.tenantId,a,m]),{assetTypeOptions:l,isAssetTypeOptionsLoading:d,assetTypeOptionsUnavailable:u,reloadAssetTypeOptions:g}}},44715:(e,t,a)=>{a.d(t,{Jv:()=>u,Ot:()=>m,W_:()=>d,ZJ:()=>c,mW:()=>p});var s=a(20016),r=a(34686);let n="/asset-management/asset-type",i=e=>e?(0,r.vH)(e):["all"],l=(e,t)=>{var a,s;return(null==e||null==(s=e.response)||null==(a=s.data)?void 0:a.message)||(null==e?void 0:e.message)||t},o=e=>{var t;let a=null==e?void 0:e.data,s=null!=(t=null==a?void 0:a.data)?t:a;return{success:(null==a?void 0:a.success)!==!1,message:null==a?void 0:a.message,item:null==s?void 0:s.item}},d=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;try{var a;let r=await s.A.post("".concat(n,"/list"),{requestedTenant:i(t),...void 0===e.page?{}:{page:e.page},...void 0===e.size?{}:{size:e.size},...(null==(a=e.search)?void 0:a.trim())?{search:e.search.trim()}:{},...e.includeInactive?{includeInactive:!0}:{},...e.category?{category:e.category}:{}});return(e=>{var t,a,s;let r=null==e?void 0:e.data,n=null!=(t=null==r?void 0:r.data)?t:r;return{success:(null==r?void 0:r.success)!==!1,message:null==r?void 0:r.message,results:null!=(a=null==n?void 0:n.results)?a:[],total:Number(null!=(s=null==n?void 0:n.total)?s:0)}})(r)}catch(e){return{success:!1,message:l(e,"Failed to fetch asset types"),results:[],total:0}}},c=async(e,t)=>{let a=[];for(let s=0;s<20;s+=1){let r=await d({page:s,size:100,category:t},e);if(!r.success)return 0===s?[]:a;if(a.push(...r.results.filter(e=>!1!==e.isActive).map(e=>e.name).filter(Boolean)),r.results.length<100||(s+1)*100>=r.total)break}return a},u=async(e,t)=>{try{let a=await s.A.post("".concat(n,"/create"),{...e,requestedTenant:i(t)});return o(a)}catch(e){return{success:!1,message:l(e,"Failed to create asset type")}}},p=async(e,t,a)=>{try{let r=await s.A.patch("".concat(n,"/update/").concat(encodeURIComponent(e)),{...t,requestedTenant:i(a)});return o(r)}catch(e){return{success:!1,message:l(e,"Failed to update asset type")}}},m=async(e,t)=>{try{let a=await s.A.patch("".concat(n,"/disable/").concat(encodeURIComponent(e)),{requestedTenant:i(t)});return o(a)}catch(e){return{success:!1,message:l(e,"Failed to delete asset type")}}}},50943:(e,t,a)=>{a.d(t,{W:()=>s});let s={PHISHBYTE_CAMPAIGNS:"phishbyte:campaigns",PHISHBYTE_TEMPLATES:"phishbyte:templates",PHISHBYTE_LANDING_PAGE:"phishbyte:landing-page",PHISHBYTE_DEEPFAKE_PERSONAS:"phishbyte:deepfake-personas",PHISHBYTE_TRAINING:"phishbyte:training",PHISHBYTE_TRAINING_VIDEOS:"phishbyte:training-videos",PHISHBYTE_TRAINING_ARTICLES:"phishbyte:training-articles",PHISHBYTE_TRAINING_QUIZZES:"phishbyte:training-quizzes",SOAR_CASES:"soar:cases",SOAR_ASSETS:"soar:assets",SOAR_ASSETS_NETWORK:"soar:assets:network",SOAR_ASSETS_SOFTWARE:"soar:assets:software",SOAR_ASSETS_IPS:"soar:assets:ips",SOAR_ASSETS_IDENTITIES:"soar:assets:identities",SOAR_PLAYBOOK:"soar:playbook",SOAR_INTEGRATIONS_INTEGRATED:"soar:integrations:integrated",SOAR_INTEGRATIONS_AVAILABLE:"soar:integrations:available",THREAT_INTEL_REPORTS:"threat-intel:reports",THREAT_INTEL_PLATFORM_REPORTS:"threat-intel:platform-reports",THREAT_INTEL_CVES:"threat-intel:cves",THREAT_INTEL_BREACHES:"threat-intel:breaches",THREAT_INTEL_IOCS:"threat-intel:iocs",THREAT_INTEL_HUNTING:"threat-intel:hunting",THREAT_INTEL_CONTROLS:"threat-intel:controls",THREAT_INTEL_THREAT_ACTORS:"threat-intel:threat-actors",THREAT_INTEL_ATTACK:"threat-intel:attack",VULNERABILITY_MANAGEMENT_VULNERABILITIES:"vulnerability-management:vulnerabilities",DETECTION_RULES:"detection-rules:rules",HUNT_MANAGEMENT:"hunt-management:hunts",HUNT_SCENARIOS:"hunt-scenario:scenarios",SIEM_OFFENSES:"siem:offenses",ADMIN_USERS:"administration:users",ADMIN_ROLES:"administration:roles",ADMIN_GROUPS:"administration:groups",ADMIN_TENANTS:"administration:tenants",ADMIN_TENANTS_MSSP:"administration:tenants:mssp",ADMIN_TENANTS_CUSTOMER:"administration:tenants:customer",ADMIN_AGREEMENTS:"administration:agreements",ADMIN_SHIFT_ROSTER:"administration:shift-roster",DASHBOARD_MAIN:"dashboard:main",MAILBYTE_YARA_RULES:"mailbyte:yara-rules",MAILBYTE_EMAIL_THREATS:"mailbyte:email-threats",MAILBYTE_POLICIES:"mailbyte:policies"}},59118:(e,t,a)=>{a.d(t,{Ay:()=>N,W7:()=>b});var s=a(95155),r=a(12115),n=a(37911),i=a(70747),l=a(40980),o=a(57828),d=a(13963),c=a(65957),u=a(15007),p=a(27315),m=a(22980),y=a(51588),g=a(4632),h=a(31376),v=a(45981),f=a(77238),x=a(70703);let S=e=>{var t;let{value:a}=e,r=(null==a||null==(t=a.toLowerCase)?void 0:t.call(a))||"",n="active"===r||"online"===r||"running"===r||"yes"===r||"approved"===r?"bg-green-100 text-green-800 dark:bg-green-900/20 dark:text-green-400":"inactive"===r||"offline"===r||"stopped"===r||"no"===r||"blocked"===r?"bg-red-100 text-red-800 dark:bg-red-900/20 dark:text-red-400":"pending"===r||"warning"===r?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/20 dark:text-yellow-400":"public"===r?"bg-blue-100 text-blue-800 dark:bg-blue-900/20 dark:text-blue-400":"private"===r?"bg-purple-100 text-purple-800 dark:bg-purple-900/20 dark:text-purple-400":"bg-gray-100 text-gray-800 dark:bg-gray-900/20 dark:text-gray-400";return(0,s.jsx)("span",{className:(0,l.cn)("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium",n),"data-sentry-component":"StatusBadge","data-sentry-source-file":"AssetDetailsModal.tsx",children:(0,g.ND)(a)})},b=e=>{let{label:t,value:a,isMono:r,scope:n}=e,{t:i}=(0,v.ok)();return(0,s.jsxs)("div",{"data-sentry-component":"InfoItem","data-sentry-source-file":"AssetDetailsModal.tsx",children:[(0,s.jsx)("p",{className:"text-[11px] tracking-wider text-gray-400",children:i(t,n)}),(0,s.jsx)("p",{className:(0,l.cn)("mt-1 text-sm font-medium text-white",r?"font-mono text-[13px]":""),children:a||"—"})]})},N=function(e){let{open:t,setOpen:a,tab:l,assetId:g,assetTenantId:N,title:T="Asset Details",initialData:A,onEdit:I,onDelete:j,onRefreshList:w}=e,{t:D}=(0,v.ok)(),{user:E}=(0,m.J)(),[_,C]=(0,r.useState)(!1),[R,O]=(0,r.useState)(null),[F,L]=(0,r.useState)(!1),[P,B]=(0,r.useState)(!1),M=e=>{if(!e)return"";let t=new Date(e);
1return isNaN(t.getTime())?e:t.toLocaleString(void 0,{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit"})};if((0,r.useEffect)(()=>{(async()=>{if(t&&g){if(A&&(A.id||A.assetId))return O({assetId:A.id||A.assetId,assetName:A.name||A.assetName,owner:A.owner,tenant:A.tenant,tenantName:A.tenantName,category:A.category,version:A.version,type:A.type,subType:A.subType,logSourceName:A.logsourceName||A.logSourceName,integrationStatus:A.integrationStatus,integrationDate:A.integrationDate,integrationDeadline:A.integrationDeadline,creationDate:A.createdAt||A.creationDate,updatedAt:A.updatedAt,createdBy:A.createdBy,createdByName:A.createdByName,ipAddress:A.ip||A.ipAddress,hostName:A.hostName,subnet:A.subnet,location:A.location,site:A.site,group:A.assetGroup||A.group,application:A.application,vendor:A.vendor,cidr:A.cidr,zone:A.zone,ipType:A.ipType,note:A.note,softwareStatus:A.softwareStatus,identityType:A.identityType,privileged:A.privileged});C(!0);try{let e=N?[String(N)]:(null==E?void 0:E.tenantId)?[String(E.tenantId)]:[],t=await (0,p.LB)(g,e),s=(null==t?void 0:t.data)||{};if(!(null==s?void 0:s.id)){h.toast.error((null==t?void 0:t.message)||"Failed to fetch asset details"),a(!1);return}let r={assetId:s.id,assetName:s.name,owner:s.owner,tenant:s.tenant,tenantName:s.tenantName,category:s.category,version:s.version,type:s.type,subType:s.subType,logSourceName:s.logsourceName,integrationStatus:s.integrationStatus,integrationDate:s.integrationDate,integrationDeadline:s.integrationDeadline,creationDate:s.createdAt,updatedAt:s.updatedAt,createdBy:s.createdBy,createdByName:s.createdByName,ipAddress:s.ip,hostName:s.hostName,subnet:s.subnet,location:s.location,site:s.site,group:s.assetGroup,application:s.application,vendor:s.vendor,cidr:s.cidr,zone:s.zone,ipType:s.ipType,note:s.note,softwareStatus:s.softwareStatus,identityType:s.identityType,privileged:s.privileged};O(r)}finally{C(!1)}}})()},[t,g,N]),!t)return null;let H=R||{},q=x.Et[l],k=e=>q.formFields.includes(e),z="Assets"===l,V="Software"===l||"Identities"===l,G=(0,s.jsxs)(s.Fragment,{children:[k("ip")&&(0,s.jsx)(b,{label:"IP Address",value:H.ipAddress,isMono:!0,scope:"assets"}),k("ipType")&&(0,s.jsx)(b,{label:"IP Type",value:H.ipType?(0,s.jsx)(S,{value:H.ipType}):null,scope:"assets"}),k("hostName")&&(0,s.jsx)(b,{label:"Host Name",value:H.hostName,scope:"assets"}),k("subnet")&&(0,s.jsx)(b,{label:"Subnet",value:H.subnet,isMono:!0,scope:"assets"}),k("location")&&(0,s.jsx)(b,{label:"Location",value:H.location,scope:"assets"}),k("site")&&(0,s.jsx)(b,{label:"Site",value:H.site,scope:"assets"}),k("assetGroup")&&(0,s.jsx)(b,{label:"Group",value:H.group,scope:"assets"}),k("application")&&(0,s.jsx)(b,{label:"Application",value:H.application,scope:"assets"}),k("cidr")&&(0,s.jsx)(b,{label:"CIDR",value:H.cidr,isMono:!0,scope:"assets"}),k("zone")&&(0,s.jsx)(b,{label:"Zone",value:H.zone,scope:"assets"})]});return(0,s.jsxs)(n.a,{heading:T,open:t,onOpenChange:a,showClose:!0,className:"w-full max-w-[440px] md:max-w-3xl","data-sentry-element":"Modal","data-sentry-component":"AssetDetailsModal","data-sentry-source-file":"AssetDetailsModal.tsx",children:[(0,s.jsxs)("div",{children:[(I||j)&&(0,s.jsx)("div",{className:"relative w-full",children:(0,s.jsx)("div",{className:"absolute top-0 right-0 z-10",children:(0,s.jsxs)(y.rI,{children:[(0,s.jsx)(y.ty,{asChild:!0,children:(0,s.jsxs)(i.$,{variant:"ghost",size:"icon",className:"bg-muted hover:bg-muted/80 h-6 w-6 p-1 transition-colors",children:[(0,s.jsx)("span",{className:"sr-only",children:"Open actions"}),(0,s.jsx)(d.A,{className:"h-4 w-4"})]})}),(0,s.jsxs)(y.SQ,{align:"end",className:"min-w-[160px]",children:[(0,s.jsx)(y.lp,{children:"Actions"}),(0,s.jsx)(y.mB,{}),g&&(0,s.jsxs)(y._2,{onClick:()=>B(!0),children:[(0,s.jsx)(c.A,{className:"mr-1 h-4 w-4 text-[var(--editIcon)]"}),"Edit"]}),j&&g&&(0,s.jsxs)(y._2,{onClick:()=>L(!0),children:[(0,s.jsx)(u.A,{className:"mr-1 h-4 w-4 text-[var(--deleteIcon)]"}),"Delete"]})]})]})})}),(0,s.jsx)("div",{className:"mt-2 mb-3",children:(0,s.jsx)("div",{className:"flex flex-col gap-1 md:flex-row md:items-baseline md:justify-between",children:(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-base font-semibold",children:H.assetName||H.name||"—"}),(0,s.jsx)("div",{className:"text-muted-foreground text-xs",children:H.type||H.subType||H.identityType||""})]})})}),(0,s.jsx)("div",{className:"space-y-6",children:(0,s.jsxs)("div",{className:"bg-muted/30 rounded-lg border border-white/10 p-4",children:[(0,s.jsx)("h3",{className:"mb-4 text-sm font-semibold text-white",children:D("Details")}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[(0,s.jsx)(b,{label:"Asset ID",value:H.assetId,scope:"assets","data-sentry-element":"InfoItem","data-sentry-source-file":"AssetDetailsModal.tsx"}),k("owner")&&(0,s.jsx)(b,{label:"Owner",value:H.owner}),(0,s.jsx)(b,{label:"Tenant",value:H.tenantName,"data-sentry-element":"InfoItem","data-sentry-source-file":"AssetDetailsModal.tsx"}),k("version")&&(0,s.jsx)(b,{label:"Version",value:H.version,scope:"assets"}),q.hasTypeDropdown&&(0,s.jsx)(b,{label:"Type",value:H.type}),k("softwareStatus")&&(0,s.jsx)(b,{label:"Software Status",value:H.softwareStatus?(0,s.jsx)(S,{value:H.softwareStatus}
1):null,scope:"assets"}),k("identityType")&&(0,s.jsx)(b,{label:"Type",value:H.identityType,scope:"assets"}),k("privileged")&&(0,s.jsx)(b,{label:"Privileged",value:H.privileged?(0,s.jsx)(S,{value:H.privileged}):null,scope:"assets"}),k("subType")&&(0,s.jsx)(b,{label:"Sub Type",value:H.subType,scope:"assets"}),k("logsourceName")&&(0,s.jsx)(b,{label:"Log Source Name",value:H.logSourceName,scope:"assets"}),k("integrationStatus")&&(0,s.jsx)(b,{label:"Integration Status",value:H.integrationStatus?(0,s.jsx)(S,{value:H.integrationStatus}):null,scope:"assets"}),k("integrationDate")&&(0,s.jsx)(b,{label:"Integration Date",value:M(H.integrationDate),scope:"assets"}),k("integrationDeadline")&&(0,s.jsx)(b,{label:"Integration Deadline",value:M(H.integrationDeadline),scope:"assets"}),(0,s.jsx)(b,{label:"Created At",value:M(H.creationDate),"data-sentry-element":"InfoItem","data-sentry-source-file":"AssetDetailsModal.tsx"}),(0,s.jsx)(b,{label:"Updated At",value:H.updatedAt!==H.creationDate?M(H.updatedAt):null,"data-sentry-element":"InfoItem","data-sentry-source-file":"AssetDetailsModal.tsx"}),(0,s.jsx)(b,{label:"Created By",value:H.createdByName,"data-sentry-element":"InfoItem","data-sentry-source-file":"AssetDetailsModal.tsx"}),k("vendor")&&(0,s.jsx)(b,{label:"Vendor",value:H.vendor,scope:"assets"}),k("note")&&(0,s.jsx)(b,{label:"Note",value:H.note,scope:"assets"}),z&&G]}),!z&&!V&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"mt-6 border-t border-white/5 pt-6",children:(0,s.jsx)("h3",{className:"mb-4 text-sm font-semibold text-white",children:D("".concat(q.label," Details"))})}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:G})]})]})})]}),(0,s.jsx)(o.A,{open:F,onOpenChange:L,title:"Are you sure?",description:'This will permanently delete "'.concat(H.assetName||H.name||"this asset",'". This action cannot be undone.'),confirmText:"Delete",cancelText:"Cancel",variant:"destructive",onConfirm:()=>{g&&(null==j||j(g))},"data-sentry-element":"ConfirmDialog","data-sentry-source-file":"AssetDetailsModal.tsx"}),g&&(0,s.jsx)(f.A,{open:P,setOpen:B,mode:"edit",tab:l,assetId:g,assetTenantId:N||void 0,initialData:{id:H.assetId,name:H.assetName,owner:H.owner,tenant:H.tenant,version:H.version,type:H.type,subType:H.subType,logsourceName:H.logSourceName,integrationStatus:H.integrationStatus,integrationDate:H.integrationDate,integrationDeadline:H.integrationDeadline,createdAt:H.creationDate,createdBy:H.createdBy,ip:H.ipAddress,hostName:H.hostName,subnet:H.subnet,location:H.location,site:H.site,assetGroup:H.group,application:H.application,vendor:H.vendor,cidr:H.cidr,zone:H.zone,note:H.note,ipType:H.ipType,softwareStatus:H.softwareStatus,identityType:H.identityType,privileged:H.privileged},onSuccess:async()=>{try{let e=N?[String(N)]:(null==E?void 0:E.tenantId)?[String(E.tenantId)]:[],t=await (0,p.LB)(g,e),a=(null==t?void 0:t.data)||{};if(!(null==a?void 0:a.id))return;let s={assetId:a.id,assetName:a.name,owner:a.owner,tenant:a.tenant,tenantName:a.tenantName,version:a.version,type:a.type,subType:a.subType,logSourceName:a.logsourceName,integrationStatus:a.integrationStatus,integrationDate:a.integrationDate,integrationDeadline:a.integrationDeadline,creationDate:a.createdAt,updatedAt:a.updatedAt,createdBy:a.createdBy,createdByName:a.createdByName,ipAddress:a.ip,hostName:a.hostName,subnet:a.subnet,location:a.location,site:a.site,group:a.assetGroup,application:a.application,vendor:a.vendor,category:a.category,cidr:a.cidr,zone:a.zone,note:a.note,ipType:a.ipType,softwareStatus:a.softwareStatus,identityType:a.identityType,privileged:a.privileged};O(s),w&&w()}catch(e){}}})]})}},70703:(e,t,a)=>{a.d(t,{Bo:()=>d,Df:()=>o,Et:()=>y,MY:()=>
1n,Ql:()=>i,YW:()=>l,yO:()=>r});var s=a(50943);let r=["Assets","Network","Software","IPs","Identities"],n=["Perimeter","DMZ","Corp","Prod","Mgmt","Guest","Remote","OT"],i=["Public","Private"],l=["Approved","Blocked"],o=["User","Service","Shared"],d=["Yes","No"],c={id:"tenantName",header:"Tenant",accessor:"tenantName",filterable:!0,type:"text",render:(e,t)=>e||t.tenant||"",getExportValue:e=>e.tenantName||e.tenant||""},u={tab:"Assets",category:"Asset",label:"Assets",moduleName:s.W.SOAR_ASSETS,hasTypeDropdown:!0,assetTypeCategory:"Network",formFields:["name","type","subType","hostName","ip","logsourceName","integrationStatus","integrationDate","integrationDeadline","subnet","owner","site","location","application","assetGroup","vendor","version","note"],requiredFields:[],columns:[{id:"assetId",header:"ID",accessor:"assetId",filterable:!0,type:"text"},{id:"referenceId",header:"Reference ID",accessor:"referenceId",filterable:!0,type:"text"},{id:"assetName",header:"Name",accessor:"assetName",filterable:!0,type:"text"},{id:"type",header:"Type",accessor:"type",filterable:!0,type:"text"},{id:"ipAddress",header:"IP Address",accessor:"ipAddress",filterable:!0,type:"text"},{id:"hostName",header:"Host Name",accessor:"hostName",filterable:!0,type:"text"},{id:"site",header:"Site",accessor:"site",filterable:!0,type:"text"},{id:"location",header:"Location",accessor:"location",filterable:!0,type:"text"},{id:"integrationStatus",header:"Integration Status",accessor:"integrationStatus",filterable:!0,type:"status",filterOptions:[{label:"Yes",value:"Yes"},{label:"No",value:"No"},{label:"N/A",value:"N/A"}]},c,{id:"owner",header:"Owner",accessor:"owner",filterable:!0,type:"text"},{id:"version",header:"Version",accessor:"version",filterable:!0,type:"text"},{id:"subType",header:"Sub Type",accessor:"subType",filterable:!0,type:"text"},{id:"logSourceName",header:"Log Source Name",accessor:"logSourceName",filterable:!0,type:"text"},{id:"integrationDate",header:"Integration Date",accessor:"integrationDate",filterable:!0,type:"date"},{id:"integrationDeadline",header:"Integration Deadline",accessor:"integrationDeadline",filterable:!0,type:"date"},{id:"creationDate",header:"Created At",accessor:"creationDate",filterable:!0,type:"date"},{id:"updatedAt",header:"Updated At",accessor:"updatedAt",filterable:!0,type:"date"},{id:"createdByName",header:"Created By",accessor:"createdByName",filterable:!0,type:"text",render:(e,t)=>e||t.createdBy||"",getExportValue:e=>e.createdByName||e.createdBy||""},{id:"subnet",header:"Subnet",accessor:"subnet",filterable:!0,type:"text"},{id:"group",header:"Group",accessor:"group",filterable:!0,type:"text"},{id:"application",header:"Application",accessor:"application",filterable:!0,type:"text"},{id:"vendor",header:"Vendor",accessor:"vendor",filterable:!0,type:"text"},{id:"note",header:"Note",accessor:"note",filterable:!0,type:"text"}],importHeaders:["Name","Type","Sub_type","Asset_group","Host_name","Logsource_name","Location","Integration_status","Integration_date","Integration_deadline","Ip","Subnet","Site","Version","Application","Owner","Vendor","Note"],importRequiredHeaders:["Name","Integration_status"],importTemplateRow:{Name:"Dummy Asset",Type:"Server",Sub_type:"Linux",Asset_group:"Default",Host_name:"host-01",Logsource_name:"syslog",Location:"HQ",Integration_status:"Yes",Integration_date:"2026-02-28T07:14:18.411000Z",Integration_deadline:"2026-02-28T07:14:18.411000Z",Ip:"192.168.1.10",Subnet:"255.255.255.0",Site:"Main",Version:"1.0.0",Application:"AppName",Owner:"IT",Vendor:"VendorName",Note:"Optional short note"}},p={tab:"Network",category:"Network",label:"Network",moduleName:s.W.SOAR_ASSETS_NETWORK,userConfigType:"assetTable:Network",hasTypeDropdown:!1,formFields:["name","cidr","site","zone","note"],requiredFields:[],columns:[{id:"referenceId",header:"Reference ID",accessor:"referenceId",filterable:!0,type:"text"},{id:"assetName",header:"Name",accessor:"assetName",filterable:!0,type:"text"},{id:"cidr",header:"CIDR",accessor:"cidr",filterable:!0,type:"text"},{id:"site",header:"Site",accessor:"site",filterable:!0,type:"text"},{id:"zone",header:"Zone",accessor:"zone",filterable:!0,type:"text",filterOptions:n.map(e=>({label:e,value:e}))},{id:"note",header:"Note",accessor:"note",filterable:!0,type:"text"},c],importHeaders:["Name","Cidr","Site","Zone","Note"],importRequiredHeaders:["Name"],importTemplateRow:{Name:"Dummy Network Asset",Cidr:"192.168.1.0/24",Site:"Main",Zone:"Corp",Note:"Optional short note"}},m={tab:"Software",category:"Software",label:"Software",moduleName:s.W.SOAR_ASSETS_SOFTWARE,userConfigType:"assetTable:Software",hasTypeDropdown:!1,formFields:["name","softwareStatus"],requiredFields:[],columns:[{id:"assetName",header:"Name",accessor:"assetName",filterable:!0,type:"text"},{id:"softwareStatus",header:"Software Status",accessor:"softwareStatus",filterable:!0,type:"status",filterOptions:l.map(e=>({label:e,value:e}))},c],importHeaders:["Name","Software_status"],importRequiredHeaders:["Name"],importTemplateRow:{Name:"Dummy Software Asset",Software_status:"Approved"}},y={Assets:u,Network:p,Software:m,IPs:{tab:"IPs",category:"IPs",label:"IPs",moduleName:s.W.SOAR_ASSETS_IPS,userConfigType:"assetTable:IPs",hasTypeDropdown:!1,formFields:["ip","ipType","note"],requiredFields:["ip"],columns:[{id:"ipAddress",header:"IP Address",accessor:"ipAddress",filterable:!0,type:"text"},{id:"ipType",header:"IP Type",accessor:"ipType",filterable:!0,type:"status",filterOptions:i.map(e=>({label:e,value:e}))},{id:"note",header:"Note",accessor:"note",filterable:!0,type:"text"},c],importHeaders:["Ip","Ip_type","Note"],importRequiredHeaders:["Ip"],importTemplateRow:{Ip:"192.168.1.10",Ip_type:"Private",Note:"Optional short note"}},Identities:{tab:"Identities",category:"Identities",label:"Identities",moduleName:s.W.SOAR_ASSETS_IDENTITIES,userConfigType:"assetTable:Identities",hasTypeDropdown:!1,formFields:["name","identityType","privileged","note"],requiredFields:[],columns:[{id:"assetName",header:"Name",accessor:"assetName",filterable:!0,type:"text"},{id:"identityType",header:"Type",accessor:"identityType",filterable:!0,type:"text",filterOptions:o.map(e=>({label:e,value:e}))},{id:"privileged",header:"Privileged",accessor:"privileged",filterable:!0,type:"status",filterOptions:d.map(e=>({label:e,value:e}))},{id:"note",header:"Note",accessor:"note",filterable:!0,type:"text"},c],importHeaders:["Name","Identity_type","Privileged","Note"],importRequiredHeaders:["Name","Identity_type"],importTemplateRow:{Name:"Dummy Identity Asset",Identity_type:"User",Privileged:"No",Note:"Optional short note"}}}},77238:(e,t,a)=>{a.d(t,{A:()=>b});var s=a(95155),r=a(12877),n=a(5993),i=a(37911),l=a(20363),o=a(25475),d=a(73344),c=a(83548),u=a(12115),p=a(70747),m=a(95881),y=a(22980),g=a(14749),h=a(27315),v=a(31376),f=a(5024),x=a(35592),S=a(70703);function b(e){let{open:t,setOpen:a,mode:b="create",tab:N,assetId:T,assetTenantId:A,initialData:I,onSuccess:j}=e,{user:w}=(0,y.J)(),D=S.Et[N],E=e=>D.formFields.includes(e),{assetTypeOptions:_,isAssetTypeOptionsLoading:C}=(0,x.w)(t&&D.hasTypeDropdown,D.hasTypeDropdown?D.assetTypeCategory:void 0),[R,O]=(0,u.useState)(""),[F,L]=(0,u.useState)(""),[P,B]=(0,u.useState)(""),[M,H]=(0,u.useState)(""),[q,k]=(0,u.useState)(""),[z,V]=(0,u.useState)(""),[G,J]=(0,u.useState)(""),[U,Y]=(0,u.useState)(""),[W,Z]=(0,u.useState)(""),[K,Q]=(0,u.useState)(""),[$,X]=(0,u.useState)(""),[ee,et]=(0,u.useState)(""),[ea,es]=(0,u.useState)(""),[er,en]=(0,u.useState)(""),[ei,el]=(0,u.useState)(""),[eo,ed]=(0,u.useState)(!1),[ec,eu]=(0,u.useState)(void 0),[ep,em]=(0,u.useState)(!1),[ey,eg]=(0,u.useState)(void 0),[eh,ev]=(0,u.useState)(null),[ef,ex]=(0,u.useState)(!1),[eS,eb]=(0,u.useState)(""),[eN,eT]=(0,u.useState)(""),[eA,eI]=(0,u.useState)(""),[ej,ew]=(0,u.useState)(""),[eD,eE]=(0,u.useState)(""),[e_,eC]=(0,u.useState)(""),[eR,eO]=(0,u.useState)(""),[eF,eL]=(0,u.useState)(""),[eP,eB]=(0,u.useState)({}),eM=(0,u.useCallback)(()=>{O((null==w?void 0:w.tenantType)==="customer"?String((null==w?void 0:w.tenantId)||""):""),L(""),B(""),H(""),k(""),V(""),J(""),Y(""),Z(""),Q(""),X(""),et(""),es(""),en(""),el(""),eu(void 0),eg(void 0),ev(null),eb(""),eT(""),eI(""),ew(""),eE(""),eC(""),eO(""),eL("")},[null==w?void 0:w.tenantId,null==w?void 0:w.tenantType]);(0,u.useEffect)(()=>
1{if(!t){eM(),eB({});return}"create"===b&&(eM(),eB({}))},[t,b,eM]),(0,u.useEffect)(()=>{(async()=>{if(t&&"edit"===b){if(I&&I.id){ev(I),O(String(I.tenant||"")),B(I.name||""),H(I.version||""),k(I.type||""),V(I.subType||""),J(I.hostName||""),Y(I.ip||""),Z(I.logsourceName||""),Q(I.subnet||""),X(I.owner||""),et(I.site||""),es(I.location||""),en(I.application||""),el(I.assetGroup||""),eu(I.integrationDate?new Date(I.integrationDate):void 0),eg(I.integrationDeadline?new Date(I.integrationDeadline):void 0);let e=String(I.integrationStatus||"").toLowerCase();"yes"===e||"no"===e||"n/a"===e?L("n/a"===e?"N/A":e.charAt(0).toUpperCase()+e.slice(1)):L(""),eb(I.vendor||""),eT(I.cidr||""),eI(I.zone||""),ew(I.note||""),eE(I.ipType||""),eC(I.softwareStatus||""),eO(I.identityType||""),eL(I.privileged||"");return}if(T)try{let e=A?[String(A)]:(null==w?void 0:w.tenantId)?[String(w.tenantId)]:[],t=await (0,h.LB)(T,e),a=(null==t?void 0:t.data)||{};ev(a),O(String(a.tenant||"")),B(a.name||""),H(a.version||""),k(a.type||""),V(a.subType||""),J(a.hostName||""),Y(a.ip||""),Z(a.logsourceName||""),Q(a.subnet||""),X(a.owner||""),et(a.site||""),es(a.location||""),en(a.application||""),el(a.assetGroup||""),eu(a.integrationDate?new Date(a.integrationDate):void 0),eg(a.integrationDeadline?new Date(a.integrationDeadline):void 0);let s=String(a.integrationStatus||"").toLowerCase();"yes"===s||"no"===s||"n/a"===s?L("n/a"===s?"N/A":s.charAt(0).toUpperCase()+s.slice(1)):L(""),eb(a.vendor||""),eT(a.cidr||""),eI(a.zone||""),ew(a.note||""),eE(a.ipType||""),eC(a.softwareStatus||""),eO(a.identityType||""),eL(a.privileged||"")}catch(e){}}})()},[t,b,T,null==I?void 0:I.id]);let eH=async()=>{var e,t,s;let r={tenant:(null==w?void 0:w.tenantType)!=="customer"&&!R.trim(),name:E("name")&&!P.trim(),integration:E("integrationStatus")&&!F,ip:D.requiredFields.includes("ip")&&!U.trim(),identityType:D.requiredFields.includes("identityType")&&!eR};if(eB(r),Object.values(r).some(Boolean))return void v.toast.error("Please fill in all required fields");let n=(null==w?void 0:w.tenantType)==="customer"?[String((null==w?void 0:w.tenantId)||"")]:R&&""!==R.trim()?[R]:(null==w?void 0:w.tenantId)?[String(w.tenantId)]:[];ex(!0);try{let t=e=>e?new Date(e).toISOString():void 0,s=(E("name")?P:U).trim(),r={name:s,integrationStatus:F||void 0,integrationDate:t(ec),integrationDeadline:t(ey),ip:U,subnet:K,site:ee,version:M,application:er,owner:$,location:ea,assetGroup:ei,hostName:G,logsourceName:W,type:q,subType:z,vendor:eS,cidr:eN,zone:eA||void 0,note:ej,ipType:eD||void 0,softwareStatus:e_||void 0,identityType:eR||void 0,privileged:eF||void 0};if("edit"===b&&T){let t={},s={name:r.name};for(let e of D.formFields)"name"!==e&&(s[e]=r[e]);let i=eh||{};for(let a of Object.keys(s)){let r=s[a];if(void 0===r)continue;let n="integrationStatus"===a?null!=(e=i[a])?e:"":i[a],l="string"==typeof n?n:null==n?"":String(n);("string"==typeof r?r:null==r?"":String(r))!==l&&(t[a]=r)}let l=A?[String(A)]:n,o=await (0,h.gT)(T,l,t);(null==o?void 0:o.success)===!1?v.toast.error((null==o?void 0:o.message)||"Failed to update asset"):(v.toast.success((null==o?void 0:o.message)||"Asset updated successfully"),j&&j(),eM(),a(!1))}else{let e={name:s,category:D.category};for(let t of D.formFields){if("name"===t)continue;let a=r[t];e[t]="string"!=typeof a||a?a:void 0}let t=[e],i=await (0,h.wV)(n,t);(null==i?void 0:i.success)===!1?v.toast.error((null==i?void 0:i.message)||"Failed to create asset"):(v.toast.success((null==i?void 0:i.message)||"Asset created successfully"),j&&j(),eM(),a(!1))}}catch(e){v.toast.error((null==e||null==(s=e.response)||null==(t=s.data)?void 0:t.message)||(null==e?void 0:e.message)||"Action failed")}finally{ex(!1)}},eq=(0,f.D)(_,q),ek="Assets"===D.label?"edit"===b?"Edit Asset":"Create Asset":"edit"===b?"Edit ".concat(D.label):"Create ".concat(D.label),ez="Assets"===D.label?"Asset Name":D.label,eV="Assets"===D.label?"Enter asset name":"Enter ".concat(D.label.toLowerCase()," name"),eG="Assets"===D.label?"Asset Name is required":"".concat(D.label," is required");return(0,s.jsxs)(i.a,{heading:ek,open:t,onOpenChange:a,showClose:!0,className:"mx-auto w-full max-w-[400px] md:max-w-2xl","data-sentry-element":"Modal","data-sentry-component":"CreateAssetModal","data-sentry-source-file":"CreateAssetModal.tsx",children:[(0,s.jsxs)("div",{className:"grid grid-cols-1 space-y-4 gap-x-4 md:grid-cols-2",children:[E("name")&&(0,s.jsx)(d.D,{id:"asset-name",label:ez,required:!0,error:eP.name?eG:void 0,placeholder:eV,value:P,onChange:e=>{B(e.target.value),e.target.value.trim()&&eB(e=>({...e,name:!1}))}}),(0,s.jsx)(g.F,{id:"customer-select",label:"Tenant",value:R,placeholder:"Select a tenant",onValueChange:e=>{O(e),e&&eB(e=>({...e,tenant:!1}))},disabled:"edit"===b,hideForCustomer:!0,fetchParams:{tenantType:"customer"},required:(null==w?void 0:w.tenantType)!=="customer",error:eP.tenant?"Tenant is required":void 0,"data-sentry-element":"TenantSelect","data-sentry-source-file":"CreateAssetModal.tsx"}),E("version")&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(l.J,{htmlFor:"version",children:"Version"}),(0,s.jsx)(r.p,{id:"version",placeholder:"e.g., 1.0.0",value:M,onChange:e=>H(e.target.value)})]}),D.hasTypeDropdown&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(l.J,{htmlFor:"asset-type",children:"Asset Type"}),(0,s.jsxs)(o.l6,{value:q,onValueChange:k,children:[(0,s.jsx)(o.bq,{id:"asset-type",className:"w-full",children:(0,s.jsx)(o.yv,{placeholder:C?"Loading asset types...":"Specify the type of asset"})}),(0,s.jsx)(o.gC,{children:0===eq.length?(0,s.jsx)("div",{className:"text-muted-foreground px-2 py-3 text-xs",children:C?"Loading asset types...":"No asset types configured. A platform administrator can add them in Administration → PlayByte → Asset Type."}):eq.map(e=>(0,s.jsx)(o.eb,{value:e,children:e},e))})]})]}),E("softwareStatus")&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(l.J,{htmlFor:"software-status",children:"Software Status"}),(0,s.jsxs)(o.l6,{value:e_,onValueChange:eC,children:[(0,s.jsx)(o.bq,{id:"software-status",className:"w-full",children:(0,s.jsx)(o.yv,{placeholder:"Select status"})}),(0,s.jsx)(o.gC,{children:S.YW.map(e=>(0,s.jsx)(o.eb,{value:e,children:e},e))})]})]}),E("identityType")&&(0,s.jsx)(c.P,{id:"identity-type-select",label:"Type",required:D.requiredFields.includes("identityType"),error:eP.identityType?"Type is required":void 0,value:eR,onValueChange:e=>{eO(e),e&&eB(e=>({...e,identityType:!1}))},placeholder:"Select type",children:(0,s.jsx)(o.gC,{children:S.Df.map(e=>(0,s.jsx)(o.eb,{value:e,children:e},e))})}),E("privileged")&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(l.J,{htmlFor:"privileged",children:"Privileged"}),(0,s.jsxs)(o.l6,{value:eF,onValueChange:eL,children:[(0,s.jsx)(o.bq,{id:"privileged",className:"w-full",children:(0,s.jsx)(o.yv,{placeholder:"Select an option"})}),(0,s.jsx)(o.gC,{children:S.Bo.map(e=>(0,s.jsx)(o.eb,{value:e,children:e},e))})]})]}),E("subType")&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(l.J,{htmlFor:"sub-asset-type",children:"Subtype"}),(0,s.jsx)(r.p,{id:"sub-asset-type",placeholder:"Specify the subtype of asset",value:z,onChange:e=>V(e.target.value)})]}),E("hostName")&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(l.J,{htmlFor:"host-name",children:"Host Name"}),(0,s.jsx)(r.p,{id:"host-name",placeholder:"Enter the hostname for this asset",value:G,onChange:e=>J(e.target.value)})]}),E("ip")&&(0,s.jsx)(d.D,{id:"ip-address",label:"IP Address",required:D.requiredFields.includes("ip"),error:eP.ip?"IP Address is required":void 0,placeholder:"Enter the IP address(IPv4) of the asset",value:U,onChange:e=>{Y(e.target.value),e.target.value.trim()&&eB(e=>({...e,ip:!1}))}}),E("ipType")&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(l.J,{htmlFor:"ip-type",children:"IP Type"}),(0,s.jsxs)(o.l6,{value:eD,onValueChange:eE,children:[(0,s.jsx)(o.bq,{id:"ip-type",className:"w-full",children:(0,s.jsx)(o.yv,{placeholder:"Select type"})}),(0,s.jsx)(o.gC,{children:S.Ql.map(e=>(0,s.jsx)(o.eb,{value:e,children:e},e))})]})]}),E("logsourceName")&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(l.J,{htmlFor:"log-source-name",children:"Log Source Name"}),(0,s.jsx)(r.p,{id:"log-source-name",placeholder:"Specify the source of logs for the asset",value:W,onChange:e=>Z(e.target.value)})]}),E("integrationStatus")&&(0,s.jsx)(c.P,{id:"integration-select",label:"Integration",required:!0,error:eP.integration?"Integration is required":void 0,value:F,onValueChange:e=>{L(e),e&&eB(e=>({...e,integration:!1}))},placeholder:"Select Integration Status (Yes/No/N/A)",children:(0,s.jsxs)(o.gC,{children:[(0,s.jsx)(o.eb,{value:"Yes",children:"Yes"}),(0,s.jsx)(o.eb,{value:"No",children:"No"}),(0,s.jsx)(o.eb,{value:"N/A",children:"N/A"})]})}),E("integrationDate")&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(l.J,{htmlFor:"date",className:"px-1",children:"Integration Date"}),(0,s.jsx)(m.A,{date:ec,setDate:eu,open:eo,setOpen:ed})]}),E("integrationDeadline")&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(l.J,{htmlFor:"integration-deadline",children:"Integration Deadline"}),(0,s.jsx)(m.A,{date:ey,setDate:eg,open:ep,setOpen:em})]}),E("subnet")&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(l.J,{htmlFor:"sub-net",children:"Subnet"}),(0,s.jsx)(r.p,{id:"sub-net",placeholder:"Enter the subnet for the asset",value:K,onChange:e=>Q(e.target.value)})]}),E("owner")&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(l.J,{htmlFor:"owner",children:"Owner"}),(0,s.jsx)(r.p,{id:"owner",placeholder:"Enter the owner of this asset",value:$,onChange:e=>X(e.target.value)})]}),E("site")&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(l.J,{htmlFor:"site",children:"Site"}),(0,s.jsx)(r.p,{id:"site",placeholder:"Enter the location or site for the asset",value:ee,onChange:e=>et(e.target.value)})]}),E("location")&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(l.J,{htmlFor:"location",children:"Location"}),(0,s.jsx)(r.p,{id:"location",placeholder:"Specify the physical location of the asset",value:ea,onChange:e=>es(e.target.value)})]}),E("application")&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(l.J,{htmlFor:"application",children:"Application"}),(0,s.jsx)(r.p,{id:"application",placeholder:"Enter the application associated with the asset",value:er,onCh
1ange:e=>en(e.target.value)})]}),E("assetGroup")&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(l.J,{htmlFor:"asset-group",children:"Asset Group"}),(0,s.jsx)(r.p,{id:"asset-group",placeholder:"Specify the group this asset belongs to",value:ei,onChange:e=>el(e.target.value)})]}),E("vendor")&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(l.J,{htmlFor:"vendor",children:"Vendor"}),(0,s.jsx)(r.p,{id:"vendor",placeholder:"Enter the vendor of the asset",value:eS,onChange:e=>eb(e.target.value)})]}),E("cidr")&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(l.J,{htmlFor:"cidr",children:"CIDR"}),(0,s.jsx)(r.p,{id:"cidr",placeholder:"e.g., 192.168.1.0/24",value:eN,onChange:e=>eT(e.target.value)})]}),E("zone")&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(l.J,{htmlFor:"zone",children:"Zone"}),(0,s.jsxs)(o.l6,{value:eA,onValueChange:eI,children:[(0,s.jsx)(o.bq,{id:"zone",className:"w-full",children:(0,s.jsx)(o.yv,{placeholder:"Select zone"})}),(0,s.jsx)(o.gC,{children:S.MY.map(e=>(0,s.jsx)(o.eb,{value:e,children:e},e))})]})]}),E("note")&&(0,s.jsxs)("div",{className:"space-y-2 md:col-span-2",children:[(0,s.jsx)(l.J,{htmlFor:"note",children:"Note"}),(0,s.jsx)(n.T,{id:"note",placeholder:"Optional short note",value:ej,onChange:e=>ew(e.target.value)})]})]}),(0,s.jsx)("div",{className:"flex justify-end space-y-2",children:(0,s.jsx)(p.$,{onClick:eH,disabled:ef,"data-sentry-element":"Button","data-sentry-source-file":"CreateAssetModal.tsx",children:ef?"edit"===b?"Saving...":"Creating...":"edit"===b?"Save Changes":"Create Asset"})})]})}},83548:(e,t,a)=>{a.d(t,{P:()=>o});var s=a(95155);a(12115);var r=a(20363),n=a(25475),i=a(40980),l=a(45981);function o(e){let{label:t,required:a=!1,error:o,id:d,placeholder:c,triggerClassName:u,wrapperClassName:p,children:m,...y}=e,{t:g}=(0,l.ok)(),h=!!o,v="string"==typeof o?g(o):h?g("This field is required"):void 0;return(0,s.jsxs)("div",{className:(0,i.cn)("space-y-2",p),"data-sentry-component":"ValidatedSelect","data-sentry-source-file":"validated-select.tsx",children:[(0,s.jsxs)(r.J,{htmlFor:d,"data-sentry-element":"Label","data-sentry-source-file":"validated-select.tsx",children:[t,a&&(0,s.jsx)("span",{className:h?"text-red-400":"text-white",children:" *"})]}),(0,s.jsxs)(n.l6,{...y,"data-sentry-element":"Select","data-sentry-source-file":"validated-select.tsx",children:[(0,s.jsx)(n.bq,{id:d,className:(0,i.cn)("w-full",h?"border-red-500 focus:ring-red-500":"",u),"data-sentry-element":"SelectTrigger","data-sentry-source-file":"validated-select.tsx",children:(0,s.jsx)(n.yv,{placeholder:c,"data-sentry-element":"SelectValue","data-sentry-source-file":"validated-select.tsx"})}),m]}),v&&(0,s.jsx)("p",{className:"text-xs text-red-400",children:v})]})}},95881:(e,t,a)=>{a.d(t,{A:()=>o});var s=a(95155),r=a(40538),n=a(70747),i=a(68509),l=a(66088);function o(e){let{date:t,setDate:a,open:o,setOpen:d,className:c}=e;return(0,s.jsxs)(r.AM,{open:o,onOpenChange:d,modal:!1,"data-sentry-element":"Popover","data-sentry-component":"DateInput","data-sentry-source-file":"dateInput.tsx",children:[(0,s.jsx)(r.Wv,{asChild:!0,"data-sentry-element":"PopoverTrigger","data-sentry-source-file":"dateInput.tsx",children:(0,s.jsxs)(n.$,{type:"button",id:"date",className:"hover:ring-0.25 pointer-events-auto w-full justify-between rounded-lg border border-[var(--primary)] bg-transparent select-none hover:border-[var(--primary)] hover:bg-transparent hover:ring-[var(--primary)] focus:border-[var(--primary)] focus:ring-1 focus:ring-[var(--primary)] focus:outline-none ".concat(c),"data-sentry-element":"Button","data-sentry-source-file":"dateInput.tsx",children:[t?t.toLocaleDateString():"Select date",(0,s.jsx)(l.A,{className:"size-4 text-[var(--primary)] opacity-50","data-sentry-element":"ChevronDownIcon","data-sentry-source-file":"dateInput.tsx"})]})}),(0,s.jsx)(r.hl,{className:"relative w-auto overflow-hidden p-0",align:"start",style:{zIndex:99999},"data-sentry-element":"PopoverContent","data-sentry-source-file":"dateInput.tsx",children:(0,s.jsx)(i.V,{mode:"single",selected:t,captionLayout:"dropdown",onSelect:e=>{a(e),d(!1)},"data-sentry-element":"Calendar","data-sentry-source-file":"dateInput.tsx"})})]})}}}]);

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.