@odigos/ui-kit 0.0.230 → 0.0.231
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/lib/chunks/index-DAOWyONO.js +145 -0
- package/lib/chunks/{index-DJZLguZq.js → index-tFZXUKvO.js} +1 -1
- package/lib/chunks/{ui-components-B4xHrszQ.js → ui-components-CvK0mvVN.js} +378 -378
- package/lib/components/_v2/table/index.d.ts +8 -1
- package/lib/components/v2.js +1 -1
- package/lib/components.js +1 -1
- package/lib/constants/sampling/index.d.ts +7 -0
- package/lib/constants.js +1 -1
- package/lib/containers/_v2/_drawers/add-destination-drawer/form-column/index.d.ts +1 -1
- package/lib/containers/_v2/_drawers/add-destination-drawer/lists-column/index.d.ts +1 -1
- package/lib/containers/_v2/_drawers/add-source-drawer/namespaces-column/index.d.ts +1 -1
- package/lib/containers/_v2/_drawers/add-source-drawer/workloads-column/index.d.ts +1 -1
- package/lib/containers/source-drawer/profiling/flame-graph-canvas.d.ts +12 -0
- package/lib/containers/source-drawer/profiling/flamebearer.d.ts +21 -2
- package/lib/containers/source-drawer/profiling/index.d.ts +1 -9
- package/lib/containers/source-drawer/profiling/symbol-table.d.ts +13 -0
- package/lib/containers/v2.js +46 -42
- package/lib/containers.js +42 -44
- package/lib/contexts/sampling-rules-form-context.d.ts +3 -1
- package/lib/contexts.js +1 -1
- package/lib/functions.js +1 -1
- package/lib/hooks.js +1 -1
- package/lib/snippets/_v2/sampling-rule-form-sections/index.d.ts +1 -0
- package/lib/snippets/_v2/sampling-rule-form-sections/rule-type.d.ts +8 -0
- package/lib/snippets/_v2/sampling-rule-form-sections/sampling-preview.d.ts +3 -1
- package/lib/snippets/v2.js +1 -1
- package/lib/snippets.js +1 -1
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types.js +1 -1
- package/lib/visuals.js +1 -1
- package/package.json +1 -1
- package/lib/chunks/index-CGrd7Nq0.js +0 -149
|
@@ -273,7 +273,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
273
273
|
margin: 4px 0 0 0;
|
|
274
274
|
list-style: none;
|
|
275
275
|
width: 100%;
|
|
276
|
-
`,Mi=(e,t)=>t?e.reduce((e,r)=>{if(r.items){const o=Mi(r.items,t);o.length&&e.push({...r,items:o})}else r.label.toLowerCase().includes(t.toLowerCase())&&e.push(r);return e},[]):e,Bi=({placeholder:r="Type to search...",options:o,selectedOption:n,onOptionSelect:i,defaultText:a,onTextChange:s,style:l,disabled:c,errorMessage:d,...p})=>{const[u,h]=Wt(n?.label||a||""),[m,g]=Wt(Mi(o,u)),[f,x]=Wt(!1);Wt(-1),Ht(()=>g(Mi(o,u)),[o]);const y=n?.icon,b=e=>{e&&(h(e.label),s?.(e.label)),x(!e),i?.(e)};return t(Ai,{style:l,children:[t(Di,{$hasError:!!d,children:[y&&e(y,{}),e(Ti,{type:"text",value:u,placeholder:r,onChange:e=>{e.stopPropagation();const t=e.target.value,r=Mi(o,t),n=1===r.length&&r[0].label===t?r[0]:void 0;h(t),s?.(t),g(r),b(n)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},disabled:c,onBlur:()=>!c&&x(!1),onFocus:()=>!c&&x(!0),...p})]}),f&&m.length?e(Ii,{children:m.map(t=>e(Ui,{option:t,onClick:b},t.type||t.label))}):null,d&&e(Ei,{children:d})]})},Ui=({option:r,renderIcon:o=!0,onClick:n})=>{const i=!!r.items&&r.items.length>0,a=r.icon;return t(Ni,{"data-id":`option-${r.type||r.label}`,$isList:i,onMouseDown:()=>i?null:n(r),children:[a&&o&&e(a,{}),t(Ri,{children:[t(Fi,{children:[e(Pi,{children:r.label}),e(Li,{children:r.description})]}),i&&e(zi,{children:r.items?.map(r=>t(Oi,{children:[e(_i,{}),e(Ui,{option:r,renderIcon:!1,onClick:n})]},r.type||r.label))})]})]})},ji=Bt(e=>({activeNodeType:null,activeNodeId:null,setActiveNodeType:t=>e({activeNodeType:t}),setActiveNodeId:t=>e({activeNodeId:t})})),Wi=[{type:Dr.K8sAttributes,icon:_o(Dr.K8sAttributes),label:"Kubernetes Attributes",description:"Add dynamic k8s resource attributes to your data.",allowedSignals:[mo.Traces,mo.Metrics,mo.Logs],docsEndpoint:"/pipeline/actions/attributes/k8sattributes",docsDescription:"This action adds kubernetes related resource attributes to spans, metrics data points and log records."},{type:Dr.AddClusterInfo,icon:_o(Dr.AddClusterInfo),label:"Add Cluster Info",description:"Add static cluster-scoped attributes to your data.",allowedSignals:[mo.Traces,mo.Metrics,mo.Logs],docsEndpoint:"/pipeline/actions/attributes/addclusterinfo",docsDescription:"This action adds static resource attributes to spans, metrics data points and log records. It is useful to add cluster-wide attributes to all telemetry signals."},{type:Dr.DeleteAttributes,icon:_o(Dr.DeleteAttributes),label:"Delete Attribute",description:"Delete attributes from logs, metrics, and traces.",allowedSignals:[mo.Traces,mo.Metrics,mo.Logs],docsEndpoint:"/pipeline/actions/attributes/deleteattribute",docsDescription:"This action will delete the specified attributes from all telemetry signals that are specified in the signals field, regardless of the source, or any other condition."},{type:Dr.RenameAttributes,icon:_o(Dr.RenameAttributes),label:"Rename Attribute",description:"Rename attributes in logs, metrics, and traces.",allowedSignals:[mo.Traces,mo.Metrics,mo.Logs],docsEndpoint:"/pipeline/actions/attributes/renameattribute",docsDescription:"This action will rename the specified attributes from all telemetry signals that are specified in the signals field, regardless of the source, or any other condition."},{type:Dr.PiiMasking,icon:_o(Dr.PiiMasking),label:"PII Masking",description:"Mask PII data in your traces.",allowedSignals:[mo.Traces],docsEndpoint:"/pipeline/actions/attributes/piimasking",docsDescription:"This action processes a list of PII categories to be masked from the traces."},{type:Dr.URLTemplatization,icon:_o(Dr.URLTemplatization),label:"URL Templatization",description:"Replace dynamic URL path segments with named placeholders to reduce span cardinality.",allowedSignals:[mo.Traces],docsEndpoint:"/pipeline/actions/attributes/urltemplatization",docsDescription:"Normalizes HTTP URL paths by replacing dynamic segments (IDs, UUIDs, dates) with named placeholders (e.g. /user/1234 → /user/{id}). Reduces cardinality of http.route and span names, improving usability in telemetry backends.",minVersion:yi("v1.21.0")}],Hi=[{type:Dr.ErrorSampler,icon:_o(Ar.Samplers),label:"Error Sampler",description:"Sample errors based on percentage.",allowedSignals:[mo.Traces],docsEndpoint:"/pipeline/actions/sampling/errorsampler",docsDescription:"This action is a Global Action that supports error sampling by filtering out non-error traces."},{type:Dr.LatencySampler,icon:_o(Ar.Samplers),label:"Latency Sampler",description:"Add latency to your traces.",allowedSignals:[mo.Traces],docsEndpoint:"/pipeline/actions/sampling/latencysampler",docsDescription:"This action is an Endpoint Action that samples traces based on their duration for a specific service and endpoint (HTTP route) filter."},{type:Dr.ProbabilisticSampler,icon:_o(Ar.Samplers),label:"Probabilistic Sampler",description:"Sample traces based on percentage.",allowedSignals:[mo.Traces],docsEndpoint:"/pipeline/actions/sampling/probabilisticsampler",docsDescription:"This action supports probabilistic sampling based on a configured sampling percentage applied to the TraceID."},{type:Dr.ServiceNameSampler,icon:_o(Ar.Samplers),label:"Service Name Sampler",description:"Sample traces based on the presence of specified services within a trace.",allowedSignals:[mo.Traces],docsEndpoint:"/pipeline/actions/sampling/servicenamesampler",docsDescription:"This action supports service name sampling based on the presence of specified services within a trace."},{type:Dr.SpanAttributeSampler,icon:_o(Ar.Samplers),label:"Span Attributes Sampler",description:"Sample traces based on the presence or value of specific attributes within a trace.",allowedSignals:[mo.Traces],docsEndpoint:"/pipeline/actions/sampling/spanattributesampler",docsDescription:"This action supports service name sampling based on the presence or value of specific attributes within a trace."}],Xi=[{label:"Attributes",icon:_o(Ar.Attributes),items:Wi},{label:"Samplers",icon:_o(Ar.Samplers),items:Hi}];var Gi;!function(e){e.ALL="all",e.UNSAVED="unsaved",e.EXISTS="exists",e.DETECTED="detected",e.SELF_HOSTED="self-hosted",e.MANAGED="managed"}(Gi||(Gi={}));const Vi={[Gi.ALL]:{TITLE:"All",DESCRIPTION:"All destinations"},[Gi.UNSAVED]:{TITLE:"Selected",DESCRIPTION:"These are destinations that you have not yet saved."},[Gi.EXISTS]:{TITLE:"Already configured",DESCRIPTION:"These are destinations that you have already configured in other data-streams and can reuse them."},[Gi.DETECTED]:{TITLE:"Detected by system",DESCRIPTION:"Odigos found these destinations in your cluster and pre-filled their details. Review and enable them to start sending data."},[Gi.SELF_HOSTED]:{TITLE:"Self hosted",DESCRIPTION:"Full control and customization for advanced application monitoring."},[Gi.MANAGED]:{TITLE:"Managed",DESCRIPTION:"Effortless monitoring with scalable performance management."}},Ki=[{type:no.CodeAttributes,icon:Ko(no.CodeAttributes),label:"Code Attributes",description:"Collect code attributes containing payload data to traces.",docsEndpoint:"/pipeline/rules/codeattributes",docsDescription:'The "Code Attributes" rule can be used to add code attributes containing payload data to traces.',supportedLanguages:[Br.Go,Br.Python]},{type:no.CustomInstrumentation,icon:Ko(no.CustomInstrumentation),label:"Custom Instrumentation",description:"Define custom instrumentation for specific class and methods (i.e. for Java) or explicit symbol (i.e. for Golang).",docsEndpoint:"/pipeline/rules/custominstrumentation",docsDescription:'The "Custom Instrumentation" rule can be used to instrument a specific symbol (i.e. for Golang), or a class and method combination (i.e. for Java) for detailed tracing.',supportedLanguages:[Br.Go,Br.Java]},{type:no.HeadersCollection,icon:Ko(no.HeadersCollection),label:"Headers Collection",description:"Collect span attributes containing HTTP Headers data to traces.",docsEndpoint:"/pipeline/rules/headerscollection",docsDescription:'The "Headers Collection" rule can be used to add span attributes containing HTTP Headers data to traces.',supportedLanguages:[Br.Go,Br.Java,Br.JavaScript]},{type:no.PayloadCollection,icon:Ko(no.PayloadCollection),label:"Payload Collection",description:"Collect span attributes containing payload data to traces.",docsEndpoint:"/pipeline/rules/payloadcollection",docsDescription:'The "Payload Collection" rule can be used to add span attributes containing payload data to traces.',supportedLanguages:[Br.Go,Br.JavaScript]}],qi="Cancel",Ji="Save",Yi="Edit rule",Qi="Edit auto rule",Zi="Create rule",ea="Delete rule",ta="Save",ra="Rule name",oa="Rule type",na="Rule Enabled",ia="Rule Disabled",aa="Note",sa="HTTP route",la="Method",ca="Keep Percentage",da="Drop Percentage",pa="Keep traces with duration larger than",ua="Keep traces with errors",ha="Keep at least this percentage of matching traces",ma="Keep at most this percentage of matching traces",ga="Custom percentage",fa="Disabled rule",xa="Sample",ya="Keep all",ba="Drop all",va="Operation type",$a="HTTP route prefix",wa="Templated path",Sa="Templated path prefix",ka="Kafka topic",Ca="Custom duration (ms)",Ea="No preview available",Aa="Server address",Da="Drop at most this percentage of matching traces",Ta="Unnamed rule",Ia="Sampling Preview",Na="Source Scope",Ra="Operation",Oa="Duration",_a="Errors",Fa="Keep Percentage",Pa="Drop Percentage",La="Define which sources this rule applies to. You can target specific services, namespaces, or apply the rule to the entire cluster.",za="Define which operations this rule applies to. You can target specific endpoints or requests, or apply the rule to all operations in the selected services.",Ma="Define a duration threshold for this rule. Traces with a duration longer than the specified value will be considered important and retained.",Ba="Retain traces with errors from the selected services and operations.",Ua="Specify the exact percentage of matching traces to keep",ja="Specify the exact percentage of matching traces to drop",Wa="Type rule name",Ha="Add note here...",Xa="Type here",Ga="Search source name",Va="e.g. collector.my.vendor.com",Ka="Optional notes (not used by the system). Add any context or details for this sampling rule.",qa="Rule will apply to all sources in the cluster",Ja="If multiple source scopes are set, they must all match simultaneously.",Ya="All sources",Qa="-",Za="All",es="All operations",ts="HTTP server endpoint",rs="HTTP client endpoint",os="Kafka consumer",ns="Kafka producer",is="Sampling Rules",as='Control how traces are categorized based on "Importance" and potential value, for fine grain control of what is kept and what is dropped.',ss="Refresh",ls="Create rule",cs="Sampling docs",ds="75vw",ps="Delete rule?",us="Are you sure you want to delete this sampling rule?",hs="Delete",ms="Cancel",gs="Kubernetes Health Probes",fs="Keep All Error Traces",xs="Drop Traces Cluster-Wide",ys="A rule with the same matching conditions already exists.",bs="Create 'Noisy Operation Kubernetes Health Probes' rule",vs="Edit 'Noisy Operation Kubernetes Health Probes' rule",$s="Automatically detect and sample health probe traces across the cluster.",ws="Create 'Highly Relevant Operations' rule",Ss="Edit 'Highly Relevant Operations' rule",ks="Automatically keep all error traces across the entire cluster.",Cs="Create 'Cost Reduction' rule",Es="Edit 'Cost Reduction' rule",As="Automatically drop a percentage of traces across the entire cluster.",Ds={noisy:"Rules that reduce noise from high-volume, low-value operations using Head Sampling.",highlyRelevant:"Add a rule to identify highly relevant operations. Traces with errors, long duration, or from critical endpoints and key workflows will be retained so important transactions are always available for analysis.",costReduction:"Rules that optimize costs by sampling less critical data using Tail Sampling."},Ts={noisy:bs,highlyRelevant:ws,costReduction:Cs},Is={noisy:vs,highlyRelevant:Ss,costReduction:Es},Ns={noisy:"Noisy Operation",highlyRelevant:"Highly Relevant",costReduction:"Cost Reduction"},Rs=[{id:mo.Logs,value:"Logs"},{id:mo.Metrics,value:"Metrics"},{id:mo.Traces,value:"Traces"}],Os={[Br.Go]:"Go",[Br.Java]:"Java",[Br.JavaScript]:"Node.js",[Br.Python]:"Python",[Br.DotNet]:".NET",[Br.CSharp]:"C#",[Br.CPlusPlus]:"C++",[Br.Php]:"PHP",[Br.Ruby]:"Ruby",[Br.Rust]:"Rust",[Br.Swift]:"Swift",[Br.Elixir]:"Elixir",[Br.MySql]:"MySQL",[Br.Nginx]:"Nginx",[Br.Postgres]:"PostgreSQL",[Br.Redis]:"Redis",[Br.Kafka]:"Kafka",[Br.Ignored]:"Ignored",[Br.Unknown]:"Unknown",[Br.Processing]:"Processing",[Br.NoContainers]:"No Containers",[Br.NoRunningPods]:"No Running Pods"},_s=[{id:Br.Go,value:Os[Br.Go],icon:Lo(Br.Go)},{id:Br.Java,value:Os[Br.Java],icon:Lo(Br.Java)},{id:Br.JavaScript,value:Os[Br.JavaScript],icon:Lo(Br.JavaScript)},{id:Br.Python,value:Os[Br.Python],icon:Lo(Br.Python)},{id:Br.Php,value:Os[Br.Php],icon:Lo(Br.Php)},{id:Br.Ruby,value:Os[Br.Ruby],icon:Lo(Br.Ruby)},{id:Br.Rust,value:Os[Br.Rust],icon:Lo(Br.Rust)},{id:Br.DotNet,value:Os[Br.DotNet],icon:Lo(Br.DotNet)},{id:Br.CSharp,value:Os[Br.CSharp],icon:Lo(Br.CSharp)},{id:Br.CPlusPlus,value:Os[Br.CPlusPlus],icon:Lo(Br.CPlusPlus)},{id:Br.Swift,value:Os[Br.Swift],icon:Lo(Br.Swift)},{id:Br.Elixir,value:Os[Br.Elixir],icon:Lo(Br.Elixir)}],Fs={id:ro.OpentelemetryEbpfInstrumentation,value:ro.OpentelemetryEbpfInstrumentation,icon:q},Ps={[Br.Go]:{community:[{id:ro.GolangCommunity,value:ro.GolangCommunity,icon:Lo(Br.Go)},Fs],enterprise:[{id:ro.GolangEnterprise,value:ro.GolangEnterprise,icon:Lo(Br.Go)}]},[Br.JavaScript]:{community:[{id:ro.NodejsCommunity,value:ro.NodejsCommunity,icon:Lo(Br.JavaScript)},Fs],enterprise:[{id:ro.NodejsEnterprise,value:ro.NodejsEnterprise,icon:Lo(Br.JavaScript)}]},[Br.Python]:{community:[{id:ro.PythonCommunity,value:ro.PythonCommunity,icon:Lo(Br.Python)},Fs],enterprise:[{id:ro.PythonEnterprise,value:ro.PythonEnterprise,icon:Lo(Br.Python)}]},[Br.Java]:{community:[{id:ro.JavaCommunity,value:ro.JavaCommunity,icon:Lo(Br.Java)},Fs],enterprise:[{id:ro.JavaEnterprise,value:ro.JavaEnterprise,icon:Lo(Br.Java)},{id:ro.JavaEbpfInstrumentations,value:ro.JavaEbpfInstrumentations,icon:Lo(Br.Java)}]},[Br.DotNet]:{community:[{id:ro.DotNetCommunity,value:ro.DotNetCommunity,icon:Lo(Br.DotNet)},Fs],enterprise:[{id:ro.DotNetEnterprise,value:ro.DotNetEnterprise,icon:Lo(Br.DotNet)}]},[Br.Ruby]:{community:[{id:ro.RubyCommunity,value:ro.RubyCommunity,icon:Lo(Br.Ruby)},Fs],enterprise:[{id:ro.RubyEnterprise,value:ro.RubyEnterprise,icon:Lo(Br.Ruby)}]},[Br.Php]:{community:[{id:ro.PhpCommunity,value:ro.PhpCommunity,icon:Lo(Br.Php)},Fs],enterprise:[]},[Br.CSharp]:{community:[],enterprise:[{id:ro.CPlusPlusEnterprise,value:ro.CPlusPlusEnterprise,icon:Lo(Br.CSharp)}]},[Br.MySql]:{community:[],enterprise:[{id:ro.MySqlEnterprise,value:ro.MySqlEnterprise,icon:Lo(Br.MySql)}]},[Br.CPlusPlus]:{community:[Fs],enterprise:[]},[Br.Rust]:{community:[Fs],enterprise:[]},[Br.Swift]:{community:[Fs],enterprise:[]},[Br.Elixir]:{community:[Fs],enterprise:[]},[Br.Nginx]:{community:[Fs],enterprise:[]},[Br.Postgres]:{community:[Fs],enterprise:[]},[Br.Redis]:{community:[Fs],enterprise:[]},[Br.Kafka]:{community:[Fs],enterprise:[]},[Br.Ignored]:{community:[],enterprise:[]},[Br.Unknown]:{community:[],enterprise:[]},[Br.Processing]:{community:[],enterprise:[]},[Br.NoContainers]:{community:[],enterprise:[]},[Br.NoRunningPods]:{community:[],enterprise:[]}},Ls=6048e5,zs=Bt()(Zt(e=>({darkMode:!0,setDarkMode:t=>e({darkMode:t})}),{name:Co.DARK_MODE,storage:"undefined"!=typeof window?er(()=>localStorage):void 0})),Ms={dataStreamsLoading:!1,dataStreams:[],selectedStreamName:wo},Bs=Bt(e=>({...Ms,setDataStreamsLoading:t=>e({dataStreamsLoading:t}),setDataStreams:t=>e({dataStreams:t}),addDataStreams:t=>e(e=>{const r=[...e.dataStreams,...t].map(e=>[e.name,e]);return{dataStreams:Array.from(new Map(r).values())}}),removeDataStreams:t=>e(e=>({dataStreams:e.dataStreams.filter(e=>!t.find(t=>t.name===e.name))})),setSelectedStreamName:t=>e({selectedStreamName:t}),resetDataStreamStore:()=>e(Ms)})),Us=Bt(e=>({drawerType:null,drawerEntityId:null,setDrawerType:t=>e({drawerType:t}),setDrawerEntityId:t=>e({drawerEntityId:t})})),js=Bt(e=>({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[],setEntitiesLoading:(t,r)=>{const o=t===jr.Namespace?"namespacesLoading":t===jr.Source?"sourcesLoading":t===jr.Destination?"destinationsLoading":t===jr.Action?"actionsLoading":t===jr.InstrumentationRule?"instrumentationRulesLoading":"NONE";"NONE"!==o&&e({[o]:r})},setEntities:(t,r)=>{const o=t===jr.Namespace?"namespaces":t===jr.Source?"sources":t===jr.Destination?"destinations":t===jr.Action?"actions":t===jr.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==o&&e({[o]:r})},addEntities:(t,r)=>{const o=t===jr.Namespace?"namespaces":t===jr.Source?"sources":t===jr.Destination?"destinations":t===jr.Action?"actions":t===jr.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==o&&e(e=>{const t=[...e[o]],n=new Map;return t.forEach((e,t)=>{n.set(Xo(e),t)}),r.forEach(e=>{const r=Xo(e),o=n.get(r);void 0!==o?t[o]={...t[o],...e}:(n.set(r,t.length),t.push(e))}),{[o]:t}})},removeEntities:(t,r)=>{const o=t===jr.Namespace?"namespaces":t===jr.Source?"sources":t===jr.Destination?"destinations":t===jr.Action?"actions":t===jr.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==o&&e(e=>{const t=new Set(r.map(e=>Ho(e))),n=e[o].filter(e=>!t.has(Xo(e)));return{[o]:n}})},resetEntityStore:()=>{e({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[]})}})),Ws=()=>({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],conditions:[],podsAgentInjectionStatus:[],errors:[],onlyErrors:!1}),Hs=Bt(e=>({searchText:"",setSearchText:t=>e({searchText:t}),statuses:[],setStatuses:t=>e({statuses:t}),platformTypes:[],setPlatformTypes:t=>e({platformTypes:t}),namespaces:[],setNamespaces:t=>e({namespaces:t}),kinds:[],setKinds:t=>e({kinds:t}),monitors:[],setMonitors:t=>e({monitors:t}),languages:[],setLanguages:t=>e({languages:t}),conditions:[],setConditions:t=>e({conditions:t}),podsAgentInjectionStatus:[],setPodsAgentInjectionStatus:t=>e({podsAgentInjectionStatus:t}),errors:[],setErrors:t=>e({errors:t}),onlyErrors:!1,setOnlyErrors:t=>e({onlyErrors:t}),setAll:t=>e(t),clearAll:()=>e({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],conditions:[],podsAgentInjectionStatus:[],errors:[],onlyErrors:!1}),getEmptyState:Ws})),Xs=Bt(e=>({currentModal:"",setCurrentModal:t=>e({currentModal:t})})),Gs=Bt((e,t)=>({notifications:[],addNotification:r=>{const o=new Date,n=`${o.getTime().toString()}${r.target?`#${r.target}`:""}`,{notifications:i}=t();i.some(e=>e.type===r.type&&e.title===r.title&&e.message===r.message&&!e.dismissed)||e(e=>({notifications:[{...r,id:n,time:o.toISOString(),dismissed:!1,seen:!1},...e.notifications]}))},markAsDismissed:t=>{e(e=>{const r=e.notifications.findIndex(e=>e.id===t);return-1!==r&&(e.notifications[r].dismissed=!0),{notifications:e.notifications}})},markAsSeen:t=>{e(e=>{const r=e.notifications.findIndex(e=>e.id===t);return-1!==r&&(e.notifications[r].seen=!0),{notifications:e.notifications}})},removeNotification:t=>{e(e=>{const r=e.notifications.findIndex(e=>e.id===t);return-1!==r&&e.notifications.splice(r,1),{notifications:e.notifications}})},removeNotifications:t=>{t&&e(e=>({notifications:e.notifications.filter(e=>e.id.split("#")[1]!==t)}))}}));var Vs;!function(e){e.Instrumenting="instrumenting",e.Uninstrumenting="uninstrumenting",e.BulkInstrumenting="bulk-instrumenting",e.BulkUninstrumenting="bulk-uninstrumenting",e.DownloadingDiagnose="downloading-diagnose"}(Vs||(Vs={}));const Ks=(e,t)=>({...t?.[e]||{total:0,current:0,percentage:0}}),qs=e=>(e.total<e.current&&(e.total=e.current+1),e.percentage=Math.round(e.current/e.total*100),e),Js=Bt((e,t)=>({progress:{},setProgress:(r,o)=>{const n=t(),i=Ks();return"number"==typeof o.total&&(i.total=o.total),"number"==typeof o.current&&(i.current=o.current),Array.isArray(o.list)&&(i.list=o.list),e({progress:{...n.progress,[r]:qs(i)}})},addProgress:(r,o,n)=>{const i=t(),a=Ks(r,i.progress);return a.current+=o,n&&(a.list=a.list?.map(e=>e.label===n.label?{...e,status:n.status}:e)),e({progress:{...i.progress,[r]:qs(a)}})},resetProgress:t=>e({progress:{[t]:void 0}})})),Ys=Bt(e=>({selectedSources:{},setSelectedSources:t=>e({selectedSources:t}),resetSelectedState:()=>e(()=>({selectedSources:{},selectedConnection:null}))})),Qs={configuredSources:{},configuredFutureApps:{},configuredDestinations:[],configuredDestinationsUpdateOnly:[]},Zs=(e,t)=>e.destinationType.type!==t.destinationType.type,el=Bt(e=>({...Qs,setConfiguredSources:t=>e({configuredSources:t}),setConfiguredFutureApps:t=>e({configuredFutureApps:t}),setConfiguredDestinations:t=>e({configuredDestinations:t}),addConfiguredDestination:t=>e(e=>({configuredDestinations:[...e.configuredDestinations,t]})),removeConfiguredDestination:t=>e(e=>({configuredDestinations:e.configuredDestinations.filter(e=>Zs(e,t))})),setConfiguredDestinationsUpdateOnly:t=>e({configuredDestinationsUpdateOnly:t}),addConfiguredDestinationUpdateOnly:t=>e(e=>{const r=[...e.configuredDestinationsUpdateOnly,t].map(e=>[e.id,e]);return{configuredDestinationsUpdateOnly:Array.from(new Map(r).values())}}),removeConfiguredDestinationUpdateOnly:t=>e(e=>({configuredDestinationsUpdateOnly:e.configuredDestinationsUpdateOnly.filter(e=>Zs(e,t))})),clearStore:()=>e(()=>({...Qs}))})),tl={v2:{text:{size:{xxxs:10,xxs:12,xs:14,s:16,m:20,l:24,xl:32,xxl:40,xxxl:48}},colors:{black:{500:"#151618"},white:{500:"#FFFFFF"},purple:{100:"#E1D4FF",200:"#C3AAFF",300:"#A57FFF",400:"#8854FF",500:"#6A2AFF",600:"#5925D0",700:"#4822A2",800:"#371E73",900:"#271A45"},green:{100:"#DCFDFA",200:"#B9FBF6",300:"#96FAF1",400:"#73F8ED",500:"#50F6E8",600:"#44C9BE",700:"#399D94",800:"#2D6F6A",900:"#224340"},grey:{25:"#F6F6F6",50:"#ECECED",100:"#DADADB",150:"#B8B8B8",200:"#B4B5B7",300:"#8F9093",400:"#696B6F",500:"#44464B",600:"#3A3C40",700:"#313236",800:"#282A2E",900:"#1B1B1C"},silver:{25:"#F6F6F7",50:"#EDEDEE",100:"#DADCDE",200:"#B6B8BD",300:"#91959C",400:"#6D717B",500:"#484E5A",600:"#3E424C",700:"#34383F",750:"#2C2F36",800:"#26292F",900:"#1F2125",1e3:"#1B1C1D"},red:{100:"#FFE5E7",200:"#FFCBD0",300:"#FFB0B8",400:"#FF96A1",500:"#FF7C89",600:"#D06772",700:"#A2535B",800:"#733F44",900:"#452B2D",1e3:"#2E2022"},blue:{100:"#EBF0FA",200:"#D6E1F4",300:"#ADC3EA",400:"#84A4DF",500:"#5C86D5",600:"#3368CA",700:"#2D57A6",800:"#274782",900:"#21375E",1e3:"#1C273A"},yellow:{100:"#FFFBF1",200:"#FFF7E2",300:"#FFEFC6",400:"#FFE7A9",500:"#FFDF8D",600:"#FFD770",700:"#D0B05E",800:"#A28A4C",900:"#73633A",1e3:"#453D28"},beige:{600:"#EEC990"},pink:{600:"#F576A2"},orange:{600:"#F29142"}}},colors:{majestic_blue:"#444AD9",majestic_blue_soft:"#6C7AE8",orange_og:"#FE9239",orange_soft:"#FFB160",dark_red:"#802828",darker_red:"#611F1F",darkest_red:"#281515",darkest_red_hover:"#351515",dark_green:"#2D4323"},text:{},font_family:{primary:"Inter, sans-serif",secondary:"Kode Mono, sans-serif",code:"IBM Plex Mono, monospace"}},rl={v2:tl.v2,darkMode:!0,colors:{...tl.colors,primary:"#111111",secondary:"#F9F9F9",border:"#525252",dark_grey:"#151515",translucent_bg:"#1A1A1A",dropdown_bg:"#242424",dropdown_bg_2:"#333333",warning:"#472300",error:"#431919",success:"#172013",info:"#242424",default:"#181944"},text:{white:"#FFFFFF",primary:"#111111",secondary:"#F9F9F9",grey:"#B8B8B8",dark_grey:"#8F8F8F",darker_grey:"#7A7A7A",light_grey:"#CCD0D2",dark_button:"#0A1824",warning:"#E9CF35",warning_secondary:"#FFA349",error:"#EF7676",error_secondary:"#DB5151",success:"#81AF65",success_secondary:"#51DB51",info:"#B8B8B8",info_secondary:"#CCDDDD",default:"#AABEF7",default_secondary:"#8CBEFF"},font_family:tl.font_family},ol={v2:tl.v2,darkMode:!1,colors:{...tl.colors,primary:"#EEEEEE",secondary:"#060606",border:"#ADADAD",dark_grey:"#EAEAEA",translucent_bg:"#E5E5E5",dropdown_bg:"#DBDBDB",dropdown_bg_2:"#CCCCCC",warning:"#F6F092",error:"#FACECE",success:"#C8DEB8",info:"#E0E0E0",default:"#CAD9FB"},text:{white:"#FFFFFF",primary:"#EEEEEE",secondary:"#060606",grey:"#474747",dark_grey:"#707070",darker_grey:"#858585",light_grey:"#332F2D",dark_button:"#F5E7DB",warning:"#A56F12",warning_secondary:"#CA9416",error:"#B63A3A",error_secondary:"#DB5151",success:"#4E763A",success_secondary:"#67964C",info:"#525252",info_secondary:"#7A7A7A",default:"#444AD9",default_secondary:"#6C7AE8"},font_family:tl.font_family},nl=e=>e?rl:ol;var il=Object.freeze({__proto__:null,baseTheme:tl,darkModeTheme:rl,getTheme:nl,lightModeTheme:ol});tr('@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=Kode+Mono:wght@100;200;300;400;500;600;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap");*{-ms-overflow-style:none;scrollbar-width:none}::-webkit-scrollbar{display:none}*{animation-duration:.3s;animation-fill-mode:forwards;transition:all .3s}input{all:unset}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-transition:all 50000s ease-in-out 0s;transition:all 50000s ease-in-out 0s}');const al=({children:t})=>{const{darkMode:r}=zs();return e(s,{theme:nl(r),children:t})},sl={100:"FF","099":"FC","098":"FA","097":"F7","096":"F5","095":"F2","094":"F0","093":"ED","092":"EB","091":"E8","090":"E6","089":"E3","088":"E0","087":"DE","086":"DB","085":"D9","084":"D6","083":"D4","082":"D1","081":"CF","080":"CC","079":"C9","078":"C7","077":"C4","076":"C2","075":"BF","074":"BD","073":"BA","072":"B8","071":"B5","070":"B3","069":"B0","068":"AD","067":"AB","066":"A8","065":"A6","064":"A3","063":"A1","062":"9E","061":"9C","060":"99","059":"96","058":"94","057":"91","056":"8F","055":"8C","054":"8A","053":"87","052":"85","051":"82","050":"80","049":"7D","048":"7A","047":"78","046":"75","045":"73","044":"70","043":"6E","042":"6B","041":"69","040":"66","039":"63","038":"61","037":"5E","036":"5C","035":"59","034":"57","033":"54","032":"52","031":"4F","030":"4D","029":"4A","028":"47","027":"45","026":"42","025":"40","024":"3D","023":"3B","022":"38","021":"36","020":"33","019":"30","018":"2E","017":"2B","016":"29","015":"26","014":"24","013":"21","012":"1F","011":"1C","010":"1A","009":"17","008":"14","007":"12","006":"0F","005":"0D","004":"0A","003":"08","002":"05","001":"03","000":"00"};var ll=Object.freeze({__proto__:null,hex:sl});const cl={in:{left:a`
|
|
276
|
+
`,Mi=(e,t)=>t?e.reduce((e,r)=>{if(r.items){const o=Mi(r.items,t);o.length&&e.push({...r,items:o})}else r.label.toLowerCase().includes(t.toLowerCase())&&e.push(r);return e},[]):e,Bi=({placeholder:r="Type to search...",options:o,selectedOption:n,onOptionSelect:i,defaultText:a,onTextChange:s,style:l,disabled:c,errorMessage:d,...p})=>{const[u,h]=Wt(n?.label||a||""),[m,g]=Wt(Mi(o,u)),[f,x]=Wt(!1);Wt(-1),Ht(()=>g(Mi(o,u)),[o]);const y=n?.icon,b=e=>{e&&(h(e.label),s?.(e.label)),x(!e),i?.(e)};return t(Ai,{style:l,children:[t(Di,{$hasError:!!d,children:[y&&e(y,{}),e(Ti,{type:"text",value:u,placeholder:r,onChange:e=>{e.stopPropagation();const t=e.target.value,r=Mi(o,t),n=1===r.length&&r[0].label===t?r[0]:void 0;h(t),s?.(t),g(r),b(n)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},disabled:c,onBlur:()=>!c&&x(!1),onFocus:()=>!c&&x(!0),...p})]}),f&&m.length?e(Ii,{children:m.map(t=>e(Ui,{option:t,onClick:b},t.type||t.label))}):null,d&&e(Ei,{children:d})]})},Ui=({option:r,renderIcon:o=!0,onClick:n})=>{const i=!!r.items&&r.items.length>0,a=r.icon;return t(Ni,{"data-id":`option-${r.type||r.label}`,$isList:i,onMouseDown:()=>i?null:n(r),children:[a&&o&&e(a,{}),t(Ri,{children:[t(Fi,{children:[e(Pi,{children:r.label}),e(Li,{children:r.description})]}),i&&e(zi,{children:r.items?.map(r=>t(Oi,{children:[e(_i,{}),e(Ui,{option:r,renderIcon:!1,onClick:n})]},r.type||r.label))})]})]})},ji=Bt(e=>({activeNodeType:null,activeNodeId:null,setActiveNodeType:t=>e({activeNodeType:t}),setActiveNodeId:t=>e({activeNodeId:t})})),Wi=[{type:Dr.K8sAttributes,icon:_o(Dr.K8sAttributes),label:"Kubernetes Attributes",description:"Add dynamic k8s resource attributes to your data.",allowedSignals:[mo.Traces,mo.Metrics,mo.Logs],docsEndpoint:"/pipeline/actions/attributes/k8sattributes",docsDescription:"This action adds kubernetes related resource attributes to spans, metrics data points and log records."},{type:Dr.AddClusterInfo,icon:_o(Dr.AddClusterInfo),label:"Add Cluster Info",description:"Add static cluster-scoped attributes to your data.",allowedSignals:[mo.Traces,mo.Metrics,mo.Logs],docsEndpoint:"/pipeline/actions/attributes/addclusterinfo",docsDescription:"This action adds static resource attributes to spans, metrics data points and log records. It is useful to add cluster-wide attributes to all telemetry signals."},{type:Dr.DeleteAttributes,icon:_o(Dr.DeleteAttributes),label:"Delete Attribute",description:"Delete attributes from logs, metrics, and traces.",allowedSignals:[mo.Traces,mo.Metrics,mo.Logs],docsEndpoint:"/pipeline/actions/attributes/deleteattribute",docsDescription:"This action will delete the specified attributes from all telemetry signals that are specified in the signals field, regardless of the source, or any other condition."},{type:Dr.RenameAttributes,icon:_o(Dr.RenameAttributes),label:"Rename Attribute",description:"Rename attributes in logs, metrics, and traces.",allowedSignals:[mo.Traces,mo.Metrics,mo.Logs],docsEndpoint:"/pipeline/actions/attributes/renameattribute",docsDescription:"This action will rename the specified attributes from all telemetry signals that are specified in the signals field, regardless of the source, or any other condition."},{type:Dr.PiiMasking,icon:_o(Dr.PiiMasking),label:"PII Masking",description:"Mask PII data in your traces.",allowedSignals:[mo.Traces],docsEndpoint:"/pipeline/actions/attributes/piimasking",docsDescription:"This action processes a list of PII categories to be masked from the traces."},{type:Dr.URLTemplatization,icon:_o(Dr.URLTemplatization),label:"URL Templatization",description:"Replace dynamic URL path segments with named placeholders to reduce span cardinality.",allowedSignals:[mo.Traces],docsEndpoint:"/pipeline/actions/attributes/urltemplatization",docsDescription:"Normalizes HTTP URL paths by replacing dynamic segments (IDs, UUIDs, dates) with named placeholders (e.g. /user/1234 → /user/{id}). Reduces cardinality of http.route and span names, improving usability in telemetry backends.",minVersion:yi("v1.21.0")}],Hi=[{type:Dr.ErrorSampler,icon:_o(Ar.Samplers),label:"Error Sampler",description:"Sample errors based on percentage.",allowedSignals:[mo.Traces],docsEndpoint:"/pipeline/actions/sampling/errorsampler",docsDescription:"This action is a Global Action that supports error sampling by filtering out non-error traces."},{type:Dr.LatencySampler,icon:_o(Ar.Samplers),label:"Latency Sampler",description:"Add latency to your traces.",allowedSignals:[mo.Traces],docsEndpoint:"/pipeline/actions/sampling/latencysampler",docsDescription:"This action is an Endpoint Action that samples traces based on their duration for a specific service and endpoint (HTTP route) filter."},{type:Dr.ProbabilisticSampler,icon:_o(Ar.Samplers),label:"Probabilistic Sampler",description:"Sample traces based on percentage.",allowedSignals:[mo.Traces],docsEndpoint:"/pipeline/actions/sampling/probabilisticsampler",docsDescription:"This action supports probabilistic sampling based on a configured sampling percentage applied to the TraceID."},{type:Dr.ServiceNameSampler,icon:_o(Ar.Samplers),label:"Service Name Sampler",description:"Sample traces based on the presence of specified services within a trace.",allowedSignals:[mo.Traces],docsEndpoint:"/pipeline/actions/sampling/servicenamesampler",docsDescription:"This action supports service name sampling based on the presence of specified services within a trace."},{type:Dr.SpanAttributeSampler,icon:_o(Ar.Samplers),label:"Span Attributes Sampler",description:"Sample traces based on the presence or value of specific attributes within a trace.",allowedSignals:[mo.Traces],docsEndpoint:"/pipeline/actions/sampling/spanattributesampler",docsDescription:"This action supports service name sampling based on the presence or value of specific attributes within a trace."}],Xi=[{label:"Attributes",icon:_o(Ar.Attributes),items:Wi},{label:"Samplers",icon:_o(Ar.Samplers),items:Hi}];var Gi;!function(e){e.ALL="all",e.UNSAVED="unsaved",e.EXISTS="exists",e.DETECTED="detected",e.SELF_HOSTED="self-hosted",e.MANAGED="managed"}(Gi||(Gi={}));const Vi={[Gi.ALL]:{TITLE:"All",DESCRIPTION:"All destinations"},[Gi.UNSAVED]:{TITLE:"Selected",DESCRIPTION:"These are destinations that you have not yet saved."},[Gi.EXISTS]:{TITLE:"Already configured",DESCRIPTION:"These are destinations that you have already configured in other data-streams and can reuse them."},[Gi.DETECTED]:{TITLE:"Detected by system",DESCRIPTION:"Odigos found these destinations in your cluster and pre-filled their details. Review and enable them to start sending data."},[Gi.SELF_HOSTED]:{TITLE:"Self hosted",DESCRIPTION:"Full control and customization for advanced application monitoring."},[Gi.MANAGED]:{TITLE:"Managed",DESCRIPTION:"Effortless monitoring with scalable performance management."}},Ki=[{type:no.CodeAttributes,icon:Ko(no.CodeAttributes),label:"Code Attributes",description:"Collect code attributes containing payload data to traces.",docsEndpoint:"/pipeline/rules/codeattributes",docsDescription:'The "Code Attributes" rule can be used to add code attributes containing payload data to traces.',supportedLanguages:[Br.Go,Br.Python]},{type:no.CustomInstrumentation,icon:Ko(no.CustomInstrumentation),label:"Custom Instrumentation",description:"Define custom instrumentation for specific class and methods (i.e. for Java) or explicit symbol (i.e. for Golang).",docsEndpoint:"/pipeline/rules/custominstrumentation",docsDescription:'The "Custom Instrumentation" rule can be used to instrument a specific symbol (i.e. for Golang), or a class and method combination (i.e. for Java) for detailed tracing.',supportedLanguages:[Br.Go,Br.Java]},{type:no.HeadersCollection,icon:Ko(no.HeadersCollection),label:"Headers Collection",description:"Collect span attributes containing HTTP Headers data to traces.",docsEndpoint:"/pipeline/rules/headerscollection",docsDescription:'The "Headers Collection" rule can be used to add span attributes containing HTTP Headers data to traces.',supportedLanguages:[Br.Go,Br.Java,Br.JavaScript]},{type:no.PayloadCollection,icon:Ko(no.PayloadCollection),label:"Payload Collection",description:"Collect span attributes containing payload data to traces.",docsEndpoint:"/pipeline/rules/payloadcollection",docsDescription:'The "Payload Collection" rule can be used to add span attributes containing payload data to traces.',supportedLanguages:[Br.Go,Br.JavaScript]}],qi="Cancel",Ji="Save",Yi="Edit rule",Qi="Edit auto rule",Zi="Create rule",ea="Delete rule",ta="Save",ra="Create your first rule",oa="No Rules Exist",na="No Results",ia=e=>`No rules match the search term "${e}"`,aa="Rule name",sa="Rule type",la="Select the type of condition that makes a trace highly relevant.",ca="Rule Enabled",da="Rule Disabled",pa="Enabled",ua="Disabled",ha="Note",ma="HTTP route",ga="Method",fa="Keep Percentage",xa="Drop Percentage",ya="Keep traces with duration larger than",ba="Keep traces with errors",va="Keep at least this percentage of matching traces",$a="Keep at most this percentage of matching traces",wa="Custom percentage",Sa="Disabled rule",ka="Sample",Ca="Keep all",Ea="Drop all",Aa="Operation type",Da="HTTP route prefix",Ta="Templated path",Ia="Templated path prefix",Na="Kafka topic",Ra="Custom duration (ms)",Oa="No preview available",_a="Server address",Fa="Drop at most this percentage of matching traces",Pa="Unnamed rule",La="Sampling Preview",za="Source Scope",Ma="Operation",Ba="Duration",Ua="Errors",ja="Keep Percentage",Wa="Drop Percentage",Ha="Define which sources this rule applies to. You can target specific services, namespaces, or apply the rule to the entire cluster.",Xa="Define which operations this rule applies to. You can target specific endpoints or requests, or apply the rule to all operations in the selected services.",Ga="Define a duration threshold for this rule. Traces with a duration longer than the specified value will be considered important and retained.",Va="Retain traces with errors from the selected services and operations.",Ka="Specify the exact percentage of matching traces to keep",qa="Specify the exact percentage of matching traces to drop",Ja="Type rule name",Ya="Add note here...",Qa="Type here",Za="Search source name",es="e.g. collector.my.vendor.com",ts="Optional notes (not used by the system). Add any context or details for this sampling rule.",rs="Rule will apply to all sources in the cluster",os="If multiple source scopes are set, they must all match simultaneously.",ns="All sources",is="-",as="All",ss="All operations",ls="HTTP server endpoint",cs="HTTP client endpoint",ds="Kafka consumer",ps="Kafka producer",us="Sampling Rules",hs='Control how traces are categorized based on "Importance" and potential value, for fine grain control of what is kept and what is dropped.',ms="Refresh",gs="Create rule",fs="Sampling docs",xs="75vw",ys="Delete rule?",bs="Are you sure you want to delete this sampling rule?",vs="Delete",$s="Cancel",ws="Kubernetes Health Probes",Ss="Keep All Error Traces",ks="Drop Traces Cluster-Wide",Cs="A rule with the same matching conditions already exists.",Es="Create 'Noisy Operation Kubernetes Health Probes' rule",As="Edit 'Noisy Operation Kubernetes Health Probes' rule",Ds="Automatically detect and sample health probe traces across the cluster.",Ts="Create 'Highly Relevant Operations' rule",Is="Edit 'Highly Relevant Operations' rule",Ns="Automatically keep all error traces across the entire cluster.",Rs="Create 'Cost Reduction' rule",Os="Edit 'Cost Reduction' rule",_s="Automatically drop a percentage of traces across the entire cluster.",Fs={noisy:"Rules that reduce noise from high-volume, low-value operations using Head Sampling.",highlyRelevant:"Add a rule to identify highly relevant operations. Traces with errors, long duration, or from critical endpoints and key workflows will be retained so important transactions are always available for analysis.",costReduction:"Rules that optimize costs by sampling less critical data using Tail Sampling."},Ps={noisy:Es,highlyRelevant:Ts,costReduction:Rs},Ls={noisy:As,highlyRelevant:Is,costReduction:Os},zs={noisy:"Noisy Operation",highlyRelevant:"Highly Relevant",costReduction:"Cost Reduction"},Ms=[{id:mo.Logs,value:"Logs"},{id:mo.Metrics,value:"Metrics"},{id:mo.Traces,value:"Traces"}],Bs={[Br.Go]:"Go",[Br.Java]:"Java",[Br.JavaScript]:"Node.js",[Br.Python]:"Python",[Br.DotNet]:".NET",[Br.CSharp]:"C#",[Br.CPlusPlus]:"C++",[Br.Php]:"PHP",[Br.Ruby]:"Ruby",[Br.Rust]:"Rust",[Br.Swift]:"Swift",[Br.Elixir]:"Elixir",[Br.MySql]:"MySQL",[Br.Nginx]:"Nginx",[Br.Postgres]:"PostgreSQL",[Br.Redis]:"Redis",[Br.Kafka]:"Kafka",[Br.Ignored]:"Ignored",[Br.Unknown]:"Unknown",[Br.Processing]:"Processing",[Br.NoContainers]:"No Containers",[Br.NoRunningPods]:"No Running Pods"},Us=[{id:Br.Go,value:Bs[Br.Go],icon:Lo(Br.Go)},{id:Br.Java,value:Bs[Br.Java],icon:Lo(Br.Java)},{id:Br.JavaScript,value:Bs[Br.JavaScript],icon:Lo(Br.JavaScript)},{id:Br.Python,value:Bs[Br.Python],icon:Lo(Br.Python)},{id:Br.Php,value:Bs[Br.Php],icon:Lo(Br.Php)},{id:Br.Ruby,value:Bs[Br.Ruby],icon:Lo(Br.Ruby)},{id:Br.Rust,value:Bs[Br.Rust],icon:Lo(Br.Rust)},{id:Br.DotNet,value:Bs[Br.DotNet],icon:Lo(Br.DotNet)},{id:Br.CSharp,value:Bs[Br.CSharp],icon:Lo(Br.CSharp)},{id:Br.CPlusPlus,value:Bs[Br.CPlusPlus],icon:Lo(Br.CPlusPlus)},{id:Br.Swift,value:Bs[Br.Swift],icon:Lo(Br.Swift)},{id:Br.Elixir,value:Bs[Br.Elixir],icon:Lo(Br.Elixir)}],js={id:ro.OpentelemetryEbpfInstrumentation,value:ro.OpentelemetryEbpfInstrumentation,icon:q},Ws={[Br.Go]:{community:[{id:ro.GolangCommunity,value:ro.GolangCommunity,icon:Lo(Br.Go)},js],enterprise:[{id:ro.GolangEnterprise,value:ro.GolangEnterprise,icon:Lo(Br.Go)}]},[Br.JavaScript]:{community:[{id:ro.NodejsCommunity,value:ro.NodejsCommunity,icon:Lo(Br.JavaScript)},js],enterprise:[{id:ro.NodejsEnterprise,value:ro.NodejsEnterprise,icon:Lo(Br.JavaScript)}]},[Br.Python]:{community:[{id:ro.PythonCommunity,value:ro.PythonCommunity,icon:Lo(Br.Python)},js],enterprise:[{id:ro.PythonEnterprise,value:ro.PythonEnterprise,icon:Lo(Br.Python)}]},[Br.Java]:{community:[{id:ro.JavaCommunity,value:ro.JavaCommunity,icon:Lo(Br.Java)},js],enterprise:[{id:ro.JavaEnterprise,value:ro.JavaEnterprise,icon:Lo(Br.Java)},{id:ro.JavaEbpfInstrumentations,value:ro.JavaEbpfInstrumentations,icon:Lo(Br.Java)}]},[Br.DotNet]:{community:[{id:ro.DotNetCommunity,value:ro.DotNetCommunity,icon:Lo(Br.DotNet)},js],enterprise:[{id:ro.DotNetEnterprise,value:ro.DotNetEnterprise,icon:Lo(Br.DotNet)}]},[Br.Ruby]:{community:[{id:ro.RubyCommunity,value:ro.RubyCommunity,icon:Lo(Br.Ruby)},js],enterprise:[{id:ro.RubyEnterprise,value:ro.RubyEnterprise,icon:Lo(Br.Ruby)}]},[Br.Php]:{community:[{id:ro.PhpCommunity,value:ro.PhpCommunity,icon:Lo(Br.Php)},js],enterprise:[]},[Br.CSharp]:{community:[],enterprise:[{id:ro.CPlusPlusEnterprise,value:ro.CPlusPlusEnterprise,icon:Lo(Br.CSharp)}]},[Br.MySql]:{community:[],enterprise:[{id:ro.MySqlEnterprise,value:ro.MySqlEnterprise,icon:Lo(Br.MySql)}]},[Br.CPlusPlus]:{community:[js],enterprise:[]},[Br.Rust]:{community:[js],enterprise:[]},[Br.Swift]:{community:[js],enterprise:[]},[Br.Elixir]:{community:[js],enterprise:[]},[Br.Nginx]:{community:[js],enterprise:[]},[Br.Postgres]:{community:[js],enterprise:[]},[Br.Redis]:{community:[js],enterprise:[]},[Br.Kafka]:{community:[js],enterprise:[]},[Br.Ignored]:{community:[],enterprise:[]},[Br.Unknown]:{community:[],enterprise:[]},[Br.Processing]:{community:[],enterprise:[]},[Br.NoContainers]:{community:[],enterprise:[]},[Br.NoRunningPods]:{community:[],enterprise:[]}},Hs=6048e5,Xs=Bt()(Zt(e=>({darkMode:!0,setDarkMode:t=>e({darkMode:t})}),{name:Co.DARK_MODE,storage:"undefined"!=typeof window?er(()=>localStorage):void 0})),Gs={dataStreamsLoading:!1,dataStreams:[],selectedStreamName:wo},Vs=Bt(e=>({...Gs,setDataStreamsLoading:t=>e({dataStreamsLoading:t}),setDataStreams:t=>e({dataStreams:t}),addDataStreams:t=>e(e=>{const r=[...e.dataStreams,...t].map(e=>[e.name,e]);return{dataStreams:Array.from(new Map(r).values())}}),removeDataStreams:t=>e(e=>({dataStreams:e.dataStreams.filter(e=>!t.find(t=>t.name===e.name))})),setSelectedStreamName:t=>e({selectedStreamName:t}),resetDataStreamStore:()=>e(Gs)})),Ks=Bt(e=>({drawerType:null,drawerEntityId:null,setDrawerType:t=>e({drawerType:t}),setDrawerEntityId:t=>e({drawerEntityId:t})})),qs=Bt(e=>({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[],setEntitiesLoading:(t,r)=>{const o=t===jr.Namespace?"namespacesLoading":t===jr.Source?"sourcesLoading":t===jr.Destination?"destinationsLoading":t===jr.Action?"actionsLoading":t===jr.InstrumentationRule?"instrumentationRulesLoading":"NONE";"NONE"!==o&&e({[o]:r})},setEntities:(t,r)=>{const o=t===jr.Namespace?"namespaces":t===jr.Source?"sources":t===jr.Destination?"destinations":t===jr.Action?"actions":t===jr.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==o&&e({[o]:r})},addEntities:(t,r)=>{const o=t===jr.Namespace?"namespaces":t===jr.Source?"sources":t===jr.Destination?"destinations":t===jr.Action?"actions":t===jr.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==o&&e(e=>{const t=[...e[o]],n=new Map;return t.forEach((e,t)=>{n.set(Xo(e),t)}),r.forEach(e=>{const r=Xo(e),o=n.get(r);void 0!==o?t[o]={...t[o],...e}:(n.set(r,t.length),t.push(e))}),{[o]:t}})},removeEntities:(t,r)=>{const o=t===jr.Namespace?"namespaces":t===jr.Source?"sources":t===jr.Destination?"destinations":t===jr.Action?"actions":t===jr.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==o&&e(e=>{const t=new Set(r.map(e=>Ho(e))),n=e[o].filter(e=>!t.has(Xo(e)));return{[o]:n}})},resetEntityStore:()=>{e({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[]})}})),Js=()=>({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],conditions:[],podsAgentInjectionStatus:[],errors:[],onlyErrors:!1}),Ys=Bt(e=>({searchText:"",setSearchText:t=>e({searchText:t}),statuses:[],setStatuses:t=>e({statuses:t}),platformTypes:[],setPlatformTypes:t=>e({platformTypes:t}),namespaces:[],setNamespaces:t=>e({namespaces:t}),kinds:[],setKinds:t=>e({kinds:t}),monitors:[],setMonitors:t=>e({monitors:t}),languages:[],setLanguages:t=>e({languages:t}),conditions:[],setConditions:t=>e({conditions:t}),podsAgentInjectionStatus:[],setPodsAgentInjectionStatus:t=>e({podsAgentInjectionStatus:t}),errors:[],setErrors:t=>e({errors:t}),onlyErrors:!1,setOnlyErrors:t=>e({onlyErrors:t}),setAll:t=>e(t),clearAll:()=>e({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],conditions:[],podsAgentInjectionStatus:[],errors:[],onlyErrors:!1}),getEmptyState:Js})),Qs=Bt(e=>({currentModal:"",setCurrentModal:t=>e({currentModal:t})})),Zs=Bt((e,t)=>({notifications:[],addNotification:r=>{const o=new Date,n=`${o.getTime().toString()}${r.target?`#${r.target}`:""}`,{notifications:i}=t();i.some(e=>e.type===r.type&&e.title===r.title&&e.message===r.message&&!e.dismissed)||e(e=>({notifications:[{...r,id:n,time:o.toISOString(),dismissed:!1,seen:!1},...e.notifications]}))},markAsDismissed:t=>{e(e=>{const r=e.notifications.findIndex(e=>e.id===t);return-1!==r&&(e.notifications[r].dismissed=!0),{notifications:e.notifications}})},markAsSeen:t=>{e(e=>{const r=e.notifications.findIndex(e=>e.id===t);return-1!==r&&(e.notifications[r].seen=!0),{notifications:e.notifications}})},removeNotification:t=>{e(e=>{const r=e.notifications.findIndex(e=>e.id===t);return-1!==r&&e.notifications.splice(r,1),{notifications:e.notifications}})},removeNotifications:t=>{t&&e(e=>({notifications:e.notifications.filter(e=>e.id.split("#")[1]!==t)}))}}));var el;!function(e){e.Instrumenting="instrumenting",e.Uninstrumenting="uninstrumenting",e.BulkInstrumenting="bulk-instrumenting",e.BulkUninstrumenting="bulk-uninstrumenting",e.DownloadingDiagnose="downloading-diagnose"}(el||(el={}));const tl=(e,t)=>({...t?.[e]||{total:0,current:0,percentage:0}}),rl=e=>(e.total<e.current&&(e.total=e.current+1),e.percentage=Math.round(e.current/e.total*100),e),ol=Bt((e,t)=>({progress:{},setProgress:(r,o)=>{const n=t(),i=tl();return"number"==typeof o.total&&(i.total=o.total),"number"==typeof o.current&&(i.current=o.current),Array.isArray(o.list)&&(i.list=o.list),e({progress:{...n.progress,[r]:rl(i)}})},addProgress:(r,o,n)=>{const i=t(),a=tl(r,i.progress);return a.current+=o,n&&(a.list=a.list?.map(e=>e.label===n.label?{...e,status:n.status}:e)),e({progress:{...i.progress,[r]:rl(a)}})},resetProgress:t=>e({progress:{[t]:void 0}})})),nl=Bt(e=>({selectedSources:{},setSelectedSources:t=>e({selectedSources:t}),resetSelectedState:()=>e(()=>({selectedSources:{},selectedConnection:null}))})),il={configuredSources:{},configuredFutureApps:{},configuredDestinations:[],configuredDestinationsUpdateOnly:[]},al=(e,t)=>e.destinationType.type!==t.destinationType.type,sl=Bt(e=>({...il,setConfiguredSources:t=>e({configuredSources:t}),setConfiguredFutureApps:t=>e({configuredFutureApps:t}),setConfiguredDestinations:t=>e({configuredDestinations:t}),addConfiguredDestination:t=>e(e=>({configuredDestinations:[...e.configuredDestinations,t]})),removeConfiguredDestination:t=>e(e=>({configuredDestinations:e.configuredDestinations.filter(e=>al(e,t))})),setConfiguredDestinationsUpdateOnly:t=>e({configuredDestinationsUpdateOnly:t}),addConfiguredDestinationUpdateOnly:t=>e(e=>{const r=[...e.configuredDestinationsUpdateOnly,t].map(e=>[e.id,e]);return{configuredDestinationsUpdateOnly:Array.from(new Map(r).values())}}),removeConfiguredDestinationUpdateOnly:t=>e(e=>({configuredDestinationsUpdateOnly:e.configuredDestinationsUpdateOnly.filter(e=>al(e,t))})),clearStore:()=>e(()=>({...il}))})),ll={v2:{text:{size:{xxxs:10,xxs:12,xs:14,s:16,m:20,l:24,xl:32,xxl:40,xxxl:48}},colors:{black:{500:"#151618"},white:{500:"#FFFFFF"},purple:{100:"#E1D4FF",200:"#C3AAFF",300:"#A57FFF",400:"#8854FF",500:"#6A2AFF",600:"#5925D0",700:"#4822A2",800:"#371E73",900:"#271A45"},green:{100:"#DCFDFA",200:"#B9FBF6",300:"#96FAF1",400:"#73F8ED",500:"#50F6E8",600:"#44C9BE",700:"#399D94",800:"#2D6F6A",900:"#224340"},grey:{25:"#F6F6F6",50:"#ECECED",100:"#DADADB",150:"#B8B8B8",200:"#B4B5B7",300:"#8F9093",400:"#696B6F",500:"#44464B",600:"#3A3C40",700:"#313236",800:"#282A2E",900:"#1B1B1C"},silver:{25:"#F6F6F7",50:"#EDEDEE",100:"#DADCDE",200:"#B6B8BD",300:"#91959C",400:"#6D717B",500:"#484E5A",600:"#3E424C",700:"#34383F",750:"#2C2F36",800:"#26292F",900:"#1F2125",1e3:"#1B1C1D"},red:{100:"#FFE5E7",200:"#FFCBD0",300:"#FFB0B8",400:"#FF96A1",500:"#FF7C89",600:"#D06772",700:"#A2535B",800:"#733F44",900:"#452B2D",1e3:"#2E2022"},blue:{100:"#EBF0FA",200:"#D6E1F4",300:"#ADC3EA",400:"#84A4DF",500:"#5C86D5",600:"#3368CA",700:"#2D57A6",800:"#274782",900:"#21375E",1e3:"#1C273A"},yellow:{100:"#FFFBF1",200:"#FFF7E2",300:"#FFEFC6",400:"#FFE7A9",500:"#FFDF8D",600:"#FFD770",700:"#D0B05E",800:"#A28A4C",900:"#73633A",1e3:"#453D28"},beige:{600:"#EEC990"},pink:{600:"#F576A2"},orange:{600:"#F29142"}}},colors:{majestic_blue:"#444AD9",majestic_blue_soft:"#6C7AE8",orange_og:"#FE9239",orange_soft:"#FFB160",dark_red:"#802828",darker_red:"#611F1F",darkest_red:"#281515",darkest_red_hover:"#351515",dark_green:"#2D4323"},text:{},font_family:{primary:"Inter, sans-serif",secondary:"Kode Mono, sans-serif",code:"IBM Plex Mono, monospace"}},cl={v2:ll.v2,darkMode:!0,colors:{...ll.colors,primary:"#111111",secondary:"#F9F9F9",border:"#525252",dark_grey:"#151515",translucent_bg:"#1A1A1A",dropdown_bg:"#242424",dropdown_bg_2:"#333333",warning:"#472300",error:"#431919",success:"#172013",info:"#242424",default:"#181944"},text:{white:"#FFFFFF",primary:"#111111",secondary:"#F9F9F9",grey:"#B8B8B8",dark_grey:"#8F8F8F",darker_grey:"#7A7A7A",light_grey:"#CCD0D2",dark_button:"#0A1824",warning:"#E9CF35",warning_secondary:"#FFA349",error:"#EF7676",error_secondary:"#DB5151",success:"#81AF65",success_secondary:"#51DB51",info:"#B8B8B8",info_secondary:"#CCDDDD",default:"#AABEF7",default_secondary:"#8CBEFF"},font_family:ll.font_family},dl={v2:ll.v2,darkMode:!1,colors:{...ll.colors,primary:"#EEEEEE",secondary:"#060606",border:"#ADADAD",dark_grey:"#EAEAEA",translucent_bg:"#E5E5E5",dropdown_bg:"#DBDBDB",dropdown_bg_2:"#CCCCCC",warning:"#F6F092",error:"#FACECE",success:"#C8DEB8",info:"#E0E0E0",default:"#CAD9FB"},text:{white:"#FFFFFF",primary:"#EEEEEE",secondary:"#060606",grey:"#474747",dark_grey:"#707070",darker_grey:"#858585",light_grey:"#332F2D",dark_button:"#F5E7DB",warning:"#A56F12",warning_secondary:"#CA9416",error:"#B63A3A",error_secondary:"#DB5151",success:"#4E763A",success_secondary:"#67964C",info:"#525252",info_secondary:"#7A7A7A",default:"#444AD9",default_secondary:"#6C7AE8"},font_family:ll.font_family},pl=e=>e?cl:dl;var ul=Object.freeze({__proto__:null,baseTheme:ll,darkModeTheme:cl,getTheme:pl,lightModeTheme:dl});tr('@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=Kode+Mono:wght@100;200;300;400;500;600;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap");*{-ms-overflow-style:none;scrollbar-width:none}::-webkit-scrollbar{display:none}*{animation-duration:.3s;animation-fill-mode:forwards;transition:all .3s}input{all:unset}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-transition:all 50000s ease-in-out 0s;transition:all 50000s ease-in-out 0s}');const hl=({children:t})=>{const{darkMode:r}=Xs();return e(s,{theme:pl(r),children:t})},ml={100:"FF","099":"FC","098":"FA","097":"F7","096":"F5","095":"F2","094":"F0","093":"ED","092":"EB","091":"E8","090":"E6","089":"E3","088":"E0","087":"DE","086":"DB","085":"D9","084":"D6","083":"D4","082":"D1","081":"CF","080":"CC","079":"C9","078":"C7","077":"C4","076":"C2","075":"BF","074":"BD","073":"BA","072":"B8","071":"B5","070":"B3","069":"B0","068":"AD","067":"AB","066":"A8","065":"A6","064":"A3","063":"A1","062":"9E","061":"9C","060":"99","059":"96","058":"94","057":"91","056":"8F","055":"8C","054":"8A","053":"87","052":"85","051":"82","050":"80","049":"7D","048":"7A","047":"78","046":"75","045":"73","044":"70","043":"6E","042":"6B","041":"69","040":"66","039":"63","038":"61","037":"5E","036":"5C","035":"59","034":"57","033":"54","032":"52","031":"4F","030":"4D","029":"4A","028":"47","027":"45","026":"42","025":"40","024":"3D","023":"3B","022":"38","021":"36","020":"33","019":"30","018":"2E","017":"2B","016":"29","015":"26","014":"24","013":"21","012":"1F","011":"1C","010":"1A","009":"17","008":"14","007":"12","006":"0F","005":"0D","004":"0A","003":"08","002":"05","001":"03","000":"00"};var gl=Object.freeze({__proto__:null,hex:ml});const fl={in:{left:a`
|
|
277
277
|
from { transform: translateX(-100%); }
|
|
278
278
|
to { transform: translateX(0); }
|
|
279
279
|
`,right:a`
|
|
@@ -303,7 +303,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
303
303
|
`,center:a`
|
|
304
304
|
from { transform: translate(-50%, -50%); }
|
|
305
305
|
to { transform: translate(-50%, 100%); }
|
|
306
|
-
`}},
|
|
306
|
+
`}},xl={in:a`
|
|
307
307
|
from {
|
|
308
308
|
width: 0%;
|
|
309
309
|
}
|
|
@@ -317,7 +317,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
317
317
|
to {
|
|
318
318
|
width: 0%;
|
|
319
319
|
}
|
|
320
|
-
`},
|
|
320
|
+
`},yl=a`
|
|
321
321
|
0% {
|
|
322
322
|
transform: scale(1);
|
|
323
323
|
opacity: 1;
|
|
@@ -326,14 +326,14 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
326
326
|
transform: scale(2);
|
|
327
327
|
opacity: 0;
|
|
328
328
|
}
|
|
329
|
-
`,
|
|
329
|
+
`,bl=a`
|
|
330
330
|
0% {
|
|
331
331
|
background-position: -500px 0;
|
|
332
332
|
}
|
|
333
333
|
100% {
|
|
334
334
|
background-position: 500px 0;
|
|
335
335
|
}
|
|
336
|
-
`,
|
|
336
|
+
`,vl={in:a`
|
|
337
337
|
from {
|
|
338
338
|
opacity: 0;
|
|
339
339
|
}
|
|
@@ -347,7 +347,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
347
347
|
to {
|
|
348
348
|
opacity: 0;
|
|
349
349
|
}
|
|
350
|
-
`};var
|
|
350
|
+
`};var $l=Object.freeze({__proto__:null,fade:vl,ping:yl,progress:xl,shimmer:bl,slide:fl});const wl=o.span`
|
|
351
351
|
display: flex;
|
|
352
352
|
align-items: center;
|
|
353
353
|
justify-content: center;
|
|
@@ -359,15 +359,15 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
359
359
|
gap: 2px;
|
|
360
360
|
|
|
361
361
|
border-radius: 50px;
|
|
362
|
-
border: 1px solid ${({theme:e,$filled:t,$status:r})=>r?e.text[r]+(t?"":
|
|
362
|
+
border: 1px solid ${({theme:e,$filled:t,$status:r})=>r?e.text[r]+(t?"":ml["050"]):t?"transparent":e.colors.border};
|
|
363
363
|
background-color: ${({theme:e,$filled:t,$status:r})=>t?r?e.colors[r]:e.colors.majestic_blue:"transparent"};
|
|
364
364
|
color: ${({theme:e,$filled:t,$status:r})=>t&&r?e.text.secondary:t?e.text.white:r?e.text[r]:e.text.grey};
|
|
365
365
|
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
366
366
|
font-size: 12px;
|
|
367
367
|
white-space: nowrap;
|
|
368
368
|
|
|
369
|
-
${({theme:e,$filled:t,$status:r,$clickable:o})=>o&&`&:hover {\n cursor: pointer;\n background-color: ${r?e.colors[r]+
|
|
370
|
-
`,
|
|
369
|
+
${({theme:e,$filled:t,$status:r,$clickable:o})=>o&&`&:hover {\n cursor: pointer;\n background-color: ${r?e.colors[r]+ml["020"]:t?e.colors.majestic_blue_soft:e.colors.secondary+ml["020"]};\n }`}
|
|
370
|
+
`,Sl=({label:r,filled:o,status:n,withIcon:a,onClick:s})=>{const l=i(),c=n&&a?jn(n,l):null;return t(wl,{$filled:o,$status:n,$clickable:!!s,onClick:s,children:[!!c&&e(c,{}),r]})},kl=o.div`
|
|
371
371
|
height: fit-content;
|
|
372
372
|
border: 2px solid transparent;
|
|
373
373
|
padding: 2px;
|
|
@@ -377,15 +377,15 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
377
377
|
&:focus-within {
|
|
378
378
|
border-color: ${({theme:e})=>e.colors.secondary};
|
|
379
379
|
}
|
|
380
|
-
`,
|
|
381
|
-
border: 1px solid ${({theme:e})=>e.text.secondary+
|
|
380
|
+
`,Cl={primary:n`
|
|
381
|
+
border: 1px solid ${({theme:e})=>e.text.secondary+ml["024"]};
|
|
382
382
|
background: ${({theme:e})=>e.colors.secondary};
|
|
383
383
|
color: ${({theme:e})=>e.colors.primary};
|
|
384
384
|
&:hover {
|
|
385
|
-
background: ${({theme:e})=>e.colors.secondary+
|
|
385
|
+
background: ${({theme:e})=>e.colors.secondary+ml["080"]};
|
|
386
386
|
}
|
|
387
387
|
&:active {
|
|
388
|
-
background: ${({theme:e})=>e.text.secondary+
|
|
388
|
+
background: ${({theme:e})=>e.text.secondary+ml["060"]};
|
|
389
389
|
}
|
|
390
390
|
`,secondary:n`
|
|
391
391
|
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
@@ -393,17 +393,17 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
393
393
|
color: ${({theme:e})=>e.colors.secondary};
|
|
394
394
|
&:hover {
|
|
395
395
|
border: 1px solid ${({theme:e})=>e.text.darker_grey};
|
|
396
|
-
background: ${({theme:e})=>e.colors.secondary+
|
|
396
|
+
background: ${({theme:e})=>e.colors.secondary+ml["010"]};
|
|
397
397
|
}
|
|
398
398
|
&:active {
|
|
399
399
|
border: 1px solid ${({theme:e})=>e.text.dark_grey};
|
|
400
|
-
background: ${({theme:e})=>e.colors.secondary+
|
|
400
|
+
background: ${({theme:e})=>e.colors.secondary+ml["015"]};
|
|
401
401
|
}
|
|
402
402
|
`,tertiary:n`
|
|
403
403
|
border-color: transparent;
|
|
404
404
|
background: transparent;
|
|
405
405
|
&:hover {
|
|
406
|
-
background: ${({theme:e})=>e.colors.dropdown_bg_2+
|
|
406
|
+
background: ${({theme:e})=>e.colors.dropdown_bg_2+ml["040"]};
|
|
407
407
|
}
|
|
408
408
|
&:active {
|
|
409
409
|
background: ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
@@ -412,21 +412,21 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
412
412
|
border-color: transparent;
|
|
413
413
|
background: ${({theme:e})=>e.text.error};
|
|
414
414
|
&:hover {
|
|
415
|
-
background: ${({theme:e})=>e.text.error+
|
|
415
|
+
background: ${({theme:e})=>e.text.error+ml["090"]};
|
|
416
416
|
}
|
|
417
417
|
&:active {
|
|
418
|
-
background: ${({theme:e})=>e.text.error+
|
|
418
|
+
background: ${({theme:e})=>e.text.error+ml["080"]};
|
|
419
419
|
}
|
|
420
420
|
`,warning:n`
|
|
421
421
|
border-color: transparent;
|
|
422
422
|
background: ${({theme:e})=>e.text.warning};
|
|
423
423
|
&:hover {
|
|
424
|
-
background: ${({theme:e})=>e.text.warning+
|
|
424
|
+
background: ${({theme:e})=>e.text.warning+ml["090"]};
|
|
425
425
|
}
|
|
426
426
|
&:active {
|
|
427
|
-
background: ${({theme:e})=>e.text.warning+
|
|
427
|
+
background: ${({theme:e})=>e.text.warning+ml["080"]};
|
|
428
428
|
}
|
|
429
|
-
`},
|
|
429
|
+
`},El=o.button`
|
|
430
430
|
height: 36px;
|
|
431
431
|
border-radius: 32px;
|
|
432
432
|
cursor: pointer;
|
|
@@ -440,20 +440,20 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
440
440
|
text-decoration: underline;
|
|
441
441
|
font-weight: 600;
|
|
442
442
|
outline: none;
|
|
443
|
-
${({$variant:e})=>e&&
|
|
443
|
+
${({$variant:e})=>e&&Cl[e]}
|
|
444
444
|
${({disabled:e,$variant:t})=>e&&n`
|
|
445
445
|
opacity: 0.5;
|
|
446
446
|
cursor: not-allowed;
|
|
447
447
|
|
|
448
448
|
${"primary"===t?n`
|
|
449
449
|
color: ${({theme:e})=>e.colors.secondary};
|
|
450
|
-
background: ${({theme:e})=>e.text.secondary+
|
|
450
|
+
background: ${({theme:e})=>e.text.secondary+ml["010"]};
|
|
451
451
|
&:hover {
|
|
452
|
-
background: ${({theme:e})=>e.text.secondary+
|
|
452
|
+
background: ${({theme:e})=>e.text.secondary+ml["015"]};
|
|
453
453
|
}
|
|
454
454
|
`:""}
|
|
455
455
|
`}
|
|
456
|
-
`,
|
|
456
|
+
`,Al=({children:t,variant:r="primary",onClick:o,...n})=>{const i=Gt(null);return e(kl,{$variant:r,children:e(El,{ref:i,$variant:r,onClick:e=>{o&&o(e),i.current?.blur()},...n,children:t})})},Dl=e=>{function t(){return void 0===e?{}:$r(e)}const[r,o]=Wt(t()),[n,i]=Wt({}),[a,s]=Wt(t()),l=Vt((e,t)=>{const r={};if(!t||"object"!=typeof t)return e?{...e}:r;for(const[o,n]of Object.entries(e)){const e=o;if(Array.isArray(n)){const o=t[e];Array.isArray(o)&&n.length===o.length&&n.every((e,t)=>"object"==typeof e&&null!==e?0===Object.keys(l(e,o[t])).length:e===o[t])||(r[e]=t[e])}else if("object"==typeof n&&null!==n)if(null==t[e]||"object"!=typeof t[e])r[e]=t[e];else{const o=l(n,t[e]);Object.keys(o).length>0&&(r[e]=o)}else n!==t[e]&&(r[e]=t[e])}for(const o of Object.keys(t))o in e||(r[o]=t[o]);return r},[]),c=(e,t)=>0===Object.keys(l(e,t)).length,d=Xt(()=>!c(a,r),[a,r]);Ht(()=>{const n=t();void 0!==e&&"{}"===JSON.stringify(r)&&"{}"!==JSON.stringify(n)&&(o(n),s(n))},[e,r]);const p=Vt((e,t)=>wr("formData"===e?r:n,t.toString()),[r,n]);return{formData:r,formErrors:n,getFormDiff:l,areFormValuesEqual:c,isFormDirty:d,handleFormChange:(e,t,r)=>{if(e){const r=e.toString().split(".");1===r.length?o(r=>({...r,[e]:t})):o(e=>{const o=$r(e);let n=o;for(let e=0;e<r.length-1;e++){const t=r[e];n[t]&&"object"==typeof n[t]||(n[t]={}),n=n[t]}return n[r[r.length-1]]=t,o})}else r&&o({...r})},handleErrorChange:(e,t,r)=>{if(e){const r=e.toString().split(".");1===r.length?i(r=>({...r,[e]:t})):i(e=>{const o=$r(e);let n=o;for(let e=0;e<r.length-1;e++){const t=r[e];n[t]&&"object"==typeof n[t]||(n[t]={}),n=n[t]}return n[r[r.length-1]]=t,o})}else r&&i({...r})},resetFormData:e=>{const r=e||t();o(r),s(r),i({})},getNestedValue:p}},Tl={type:"",name:"",notes:"",signals:[],disabled:!1,fields:{clusterAttributes:null,overwriteExistingValues:null,renames:null,attributeNamesToDelete:null,piiCategories:null,fallbackSamplingRatio:null,samplingPercentage:null,endpointsFilters:null,servicesNameFilters:null,attributeFilters:null,urlTemplatizationRulesGroups:null}},Il=()=>{const{addNotification:e}=Zs(),{formData:t,formErrors:r,handleFormChange:o,handleErrorChange:n,resetFormData:i}=Dl(Tl),a=e=>e&&Array.isArray(e)?e.map(e=>!e.fromSources?.length&&e.from?{...e,fromSources:[e.from]}:e):e;return{formData:t,formErrors:r,handleFormChange:o,resetFormData:i,validateForm:r=>{const o={};let i=!0;if(Object.entries(t).forEach(([e,t])=>{switch(e){case"type":case"signals":Qn(t)&&(o[e]=Eo.FIELD_IS_REQUIRED)}}),t.type===Dr.URLTemplatization){const e=t.fields?.urlTemplatizationRulesGroups;if(e)for(const t of e)if(t.templatizationRules?.some(e=>!e.template?.trim())){o.fields=Eo.FIELD_IS_REQUIRED;break}}return i=!Object.values(o).length,!i&&r?.withAlert&&e({type:Gr.Warning,title:r.alertTitle,message:Eo.REQUIRED_FIELDS,hideFromHistory:!0}),n(void 0,void 0,o),i},loadFormWithDrawerItem:({type:e,signals:t,name:r,notes:n,disabled:i,fields:s})=>{const l={...$r(Tl),type:e,signals:t,name:r,notes:n,disabled:i};Object.entries(s).forEach(([e,t])=>{if(t)switch(e){case Tr.LabelsAttributes:case Tr.AnnotationsAttributes:l.fields||(l.fields={}),l.fields[e]=a(t);break;case Tr.CollectContainerAttributes:case Tr.CollectReplicaSetAttributes:case Tr.CollectWorkloadId:case Tr.CollectClusterId:case Tr.ClusterAttributes:case Tr.OverwriteExistingValues:case Tr.AttributeNamesToDelete:case Tr.Renames:case Tr.PiiCategories:case Tr.FallbackSamplingRatio:case Tr.SamplingPercentage:case Tr.EndpointsFilters:case Tr.ServicesNameFilters:case Tr.AttributeFilters:case Tr.UrlTemplatizationRulesGroups:l.fields||(l.fields={}),l.fields[e]=t}}),o(void 0,void 0,l)}}},Nl=e=>{Ht(()=>{if(e){const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])},Rl=()=>{const{setCurrentModal:e}=Qs(),{setDrawerType:t,setDrawerEntityId:r}=Ks(),{setActiveNodeType:o,setActiveNodeId:n,activeNodeId:i}=ji();return{onClickNode:(a,s)=>{const{id:l,type:c,data:{id:d,type:p}}=s;switch(i===l?(o(null),n(null)):(o(c),n(l)),p){case jr.Source:case jr.Destination:case jr.Action:case jr.InstrumentationRule:t(p),r(d);break;case Zr.AddSource:e(jr.Source);break;case Zr.AddDestination:e(jr.Destination);break;case Zr.AddAction:e(jr.Action);break;case Zr.AddRule:e(jr.InstrumentationRule)}}}},Ol=()=>{const{setDrawerType:e,setDrawerEntityId:t}=Ks(),{markAsDismissed:r,markAsSeen:o}=Zs();return{onClickNotification:(n,i)=>{const{id:a,crdType:s,target:l}=n,{dismissToast:c}=i||{};if(s&&l)switch(s){case jr.InstrumentationRule:e(jr.InstrumentationRule),t(Vo(l,jr.InstrumentationRule));break;case jr.Source:case"InstrumentationConfig":case"InstrumentationInstance":e(jr.Source),t(Vo(l,jr.Source));break;case jr.Action:e(jr.Action),t(Vo(l,jr.Action));break;case jr.Destination:case"Destination":e(jr.Destination),t(Vo(l,jr.Destination))}o(a),c&&r(a)}}},_l=()=>{const e=Gt(null),[t,r]=Wt(0),[o,n]=Wt(0);return Ht(()=>{const t=()=>{if(e.current){const{width:t,height:o}=e.current.getBoundingClientRect();r(t),n(o)}};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),{containerRef:e,containerWidth:t,containerHeight:o}};var Fl;!function(e){e[e.XS=16]="XS",e[e.S=18]="S",e[e.M=24]="M",e[e.L=32]="L"}(Fl||(Fl={}));const Pl=o.div`
|
|
457
457
|
width: ${({$size:e})=>1.5*e}px;
|
|
458
458
|
height: ${({$size:e})=>1.5*e}px;
|
|
459
459
|
display: flex;
|
|
@@ -464,7 +464,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
464
464
|
&:hover {
|
|
465
465
|
background: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
466
466
|
}
|
|
467
|
-
`,Il=({"data-id":t,icon:r,size:o=Dl.S,onClick:n,disabled:i})=>e(Tl,{"data-id":t,$size:o,$disabled:i,onClick:e=>{n&&!i&&(e.stopPropagation(),n(e))},children:e(r,{size:o})}),Nl=({onDone:t}={})=>{const[r,o]=Wt(!1),[n,i]=Wt(-1),a=Vt(async(e,n)=>{if(!r){if(o(!0),void 0!==n&&i(n),navigator?.clipboard&&navigator.clipboard.writeText)try{await navigator.clipboard.writeText(e)}catch(e){}else{const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select();try{document.execCommand("copy")}catch(e){}document.body.removeChild(t)}t?.(),setTimeout(()=>{o(!1),i(-1)},1e3)}},[r,t]);return{CopyButton:Vt(({value:t,size:o})=>e(Il,{icon:r?ft:xt,size:o,onClick:()=>a(t)}),[r]),isCopied:r,copiedIndex:n,clickCopy:a}},Rl=e=>{const{addNotification:t}=Gs(),{formData:r,handleFormChange:o,formErrors:n,handleErrorChange:i,resetFormData:a}=$l(e);return{formData:r,formErrors:n,handleFormChange:o,resetFormData:a,validateForm:e=>{const o={};let n=!0;return r.name?Zn(r.name)?o.name=void 0:(n=!1,o.name=Eo.ILLEGAL_K8S_LABEL):(n=!1,o.name=Eo.FIELD_IS_REQUIRED),!n&&e?.withAlert&&t({type:Gr.Warning,title:e.alertTitle,message:Eo.REQUIRED_FIELDS,hideFromHistory:!0}),i(void 0,void 0,o),n},loadFormWithDrawerItem:({name:t})=>{const r={...$r(e),name:t};o(void 0,void 0,r)}}},Ol={type:"",name:"",exportedSignals:{logs:!1,metrics:!1,traces:!1},fields:[],disabled:!1},_l=e=>{const{supportedSignals:t,preLoadedFields:r}=e||{},{addNotification:o}=Gs(),{formData:n,formErrors:i,handleFormChange:a,handleErrorChange:s,resetFormData:l}=$l(Ol),[c,d]=Wt([]),[p,u]=Wt([]);Ht(()=>{var e;u(c?(e=c,e.filter(e=>!!e).map(e=>{const{name:t,componentType:r,componentProperties:o,displayName:n,initialValue:i,renderCondition:a}=e;if(r===Hr.Dropdown){const e=qn(o,{}),s=Array.isArray(e.values)?e.values.map(e=>({id:e,value:e})):Object.entries(e.values).map(([e,t])=>({id:e,value:t}));return{name:t,componentType:r,title:n,value:i,placeholder:e.placeholder||"Select an option",options:s,renderCondition:a,...e}}return{name:t,componentType:r,title:n,value:i,renderCondition:a,...qn(o,{})}})).map(e=>{if(r){const t="string"==typeof r?qn(r,{}):r;if(e.name in t)return{...e,value:t[e.name]}}return e}):[])},[c,r]),Ht(()=>{if(p){const e=p.map(e=>({key:e.name,value:e.value}));a("fields",e)}},[p]),Ht(()=>{if(t&&0===li(n.exportedSignals).length){const{logs:e,metrics:r,traces:o}=t;a("exportedSignals",{logs:e.supported,metrics:r.supported,traces:o.supported})}},[t,n.exportedSignals]);return{formData:n,formErrors:i,handleFormChange:a,resetFormData:l,validateForm:e=>{const t={};let r=!0;return p.forEach(({name:e,value:o,required:n})=>{n&&!o&&(r=!1,t[e]=Eo.FIELD_IS_REQUIRED)}),!r&&e?.withAlert&&o({type:Gr.Warning,title:e.alertTitle,message:Eo.REQUIRED_FIELDS,hideFromHistory:!0}),s(void 0,void 0,t),r},loadFormWithDrawerItem:({destinationType:{type:e},name:t,disabled:r,exportedSignals:o,fields:n})=>{const i={...$r(Ol),type:e,name:t,disabled:r,exportedSignals:o,fields:Object.entries(qn(n,{})).map(([e,t])=>({key:e,value:t}))};return a(void 0,void 0,i),i},yamlFields:c,setYamlFields:d,dynamicFields:p,setDynamicFields:u}},Fl={ruleName:"",notes:"",disabled:!1,workloads:null,instrumentationLibraries:null,payloadCollection:{[lo.HttpRequest]:null,[lo.HttpResponse]:null,[lo.DbQuery]:null,[lo.Messaging]:null},codeAttributes:{[io.Column]:null,[io.FilePath]:null,[io.Function]:null,[io.LineNumber]:null,[io.Namespace]:null,[io.StackTrace]:null},headersCollection:null,customInstrumentations:{[so.Java]:null,[so.Golang]:null}},Pl=()=>{const{formData:e,formErrors:t,handleFormChange:r,handleErrorChange:o,resetFormData:n}=$l(Fl);return{formData:e,formErrors:t,handleFormChange:r,resetFormData:n,validateForm:()=>(o(void 0,void 0,{}),!0),loadFormWithDrawerItem:({ruleName:e,notes:t,disabled:o,payloadCollection:n,codeAttributes:i,headersCollection:a,customInstrumentations:s})=>{const l={...$r(Fl),ruleName:e,notes:t,disabled:o};n&&(l.payloadCollection={[lo.HttpRequest]:n[lo.HttpRequest]?{}:null,[lo.HttpResponse]:n[lo.HttpResponse]?{}:null,[lo.DbQuery]:n[lo.DbQuery]?{}:null,[lo.Messaging]:n[lo.Messaging]?{}:null}),i&&(l.codeAttributes={[io.Column]:i[io.Column]||null,[io.FilePath]:i[io.FilePath]||null,[io.Function]:i[io.Function]||null,[io.LineNumber]:i[io.LineNumber]||null,[io.Namespace]:i[io.Namespace]||null,[io.StackTrace]:i[io.StackTrace]||null}),a&&(l.headersCollection=a),s&&(l.customInstrumentations={[so.Java]:s[so.Java]||null,[so.Golang]:s[so.Golang]||null}),r(void 0,void 0,l)}}},Ll=({active:e,key:t,withAltKey:r,withCtrlKey:o,withShiftKey:n,withMetaKey:i},a)=>(Ht(()=>{const s=s=>{e&&t===s.key&&(!r||r&&s.altKey)&&(!o||o&&s.ctrlKey)&&(!n||n&&s.shiftKey)&&(!i||i&&s.metaKey)&&(s.preventDefault(),s.stopPropagation(),a(s))};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}},[t,e,r,o,n,i,a]),null),zl=(e,t)=>{Ht(()=>{const r=r=>{e.current&&!e.current.contains(r.target)&&t()};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r)}},[e,t])},Ml=({sectionNames:e,threshold:t=.4})=>{const[r,o]=Wt(e[0]||""),[n,i]=Wt(null),a=Gt({}),s=Gt(!1),l=Gt(!1),c=Vt((e,t)=>{a.current[e]=t},[]),d=Vt(e=>{i(e)},[]),p=Vt(e=>{l.current=!0,o(e)},[]);return Ht(()=>{if(!l.current)return;l.current=!1;const e=a.current[r];if(!e)return;s.current=!0,e.scrollIntoView({behavior:"smooth",block:"start"});const t=setTimeout(()=>{s.current=!1},600);return()=>clearTimeout(t)},[r]),Ht(()=>{const r=a.current,i=e.map(e=>r[e]).filter(Boolean);if(!i.length)return;const l=new IntersectionObserver(e=>{if(!s.current)for(const t of e)if(t.isIntersecting){const e=t.target.getAttribute("data-section-name");e&&o(e);break}},{threshold:t,root:n});return i.forEach(e=>l.observe(e)),()=>l.disconnect()},[e,t,n]),{selectedSection:r,setSelectedSection:p,setSectionRef:c,setScrollContainerRef:d}},Bl=({defaultClientHeight:e=0,defaultClientwidth:t=0,onClickOutside:r,positionMode:o="local"}={})=>{const n=Gt(null),[i,a]=Wt(!1),[s,l]=Wt({top:0,left:0}),[c,d]=Wt({edge:"top",align:"left"});zl(n,()=>{i&&(a(!1),r?.())});return{popupRef:n,popupOpen:i,setPopupOpen:a,popupPosition:s,arrowPlacement:c,handlePosition:(r,i)=>{if("local"===o)return void l({top:i,left:r});const{innerWidth:a,innerHeight:s}=window,c=n.current?.clientWidth||t,p=n.current?.clientHeight||e,u=r/a,h=u<1/3?"left":u>2/3?"right":"center";d({edge:i<s/2?"top":"bottom",align:h});let m=i,g=r;if(m>=s/2&&(m+=-p),"center"===h){g=r-c/2;const e=8;g=Math.max(e,Math.min(g,a-c-e))}else g>=a/2&&(g=r-c);l({top:m,left:g})}}},Ul=()=>({getItemSS:(e,t)=>{const r=sessionStorage.getItem(e);return r?qn(r,t):t},setItemSS:(e,t)=>{sessionStorage.setItem(e,JSON.stringify(t))},removeItemSS:e=>{sessionStorage.removeItem(e)}}),jl={otelServiceName:"",currentStreamName:""},Wl=()=>{const{formData:e,formErrors:t,handleFormChange:r,handleErrorChange:o,resetFormData:n}=$l(jl);return{formData:e,formErrors:t,handleFormChange:r,resetFormData:n,validateForm:()=>(o(void 0,void 0,{}),!0),loadFormWithDrawerItem:({otelServiceName:e,name:t})=>{const o={...$r(jl),otelServiceName:e||t||""};r(void 0,void 0,o)}}},Hl=qt({platformType:zr.K8s,tier:Lr.Community,version:"v0.0.0"}),Xl=({children:t,platformType:r,tier:o,version:n})=>{const i=Xt(()=>({platformType:r,tier:o,version:n}),[r,o,n]);return e(Hl.Provider,{value:i,children:t})},Gl=(e,t)=>!t||yi(e)>=yi(t),Vl=e=>{const t=Kt(Hl),r=Gl(t.version,e),o=t.platformType===zr.Vm;return{...t,isVersionSupported:r,isVm:o,isEnterprise:t.tier===Lr.Onprem}},Kl=new Set([to.StaticPod]),ql=e=>{const t=e.workloads.filter(({selected:e})=>e).length,r=e.workloads.length;return{selectedCount:t,isAllSourced:t>0&&t===r,isSomeSourced:t>0&&t<r,isFutureApps:e.selected||!1}},Jl=(e,t,r)=>{if(t&&!e.name.toLowerCase().includes(t.toLowerCase()))return!1;if(r.showOnlySelected){const{isAllSourced:t,isSomeSourced:r,isFutureApps:o}=ql(e);return t||r||o}return!0},Yl=(e,t,r)=>!(t&&!e.name.toLowerCase().includes(t.toLowerCase()))&&(!r.showOnlySelected||e.selected),Ql=(e,t,r)=>{const o=!!e.dataStreamNames?.length||!!e.currentStreamName?.length,n=o&&e.dataStreamNames?.includes(t)||e.currentStreamName===t,i=e.selected&&(!o||n)||!1;return{namespace:e.namespace,name:e.name,kind:e.kind,selected:i,numberOfInstances:e.numberOfInstances}},Zl=(e,t,r)=>({...Ql(e,t),currentStreamName:t}),ec=(e,t,r)=>{const o="boolean"==typeof r,n=e.dataStreamNames?.includes(t),i=(o?r:e.selected)||!1;return{namespace:e.name,selected:!(!n&&!o)&&i,currentStreamName:t}},tc=e=>{const{fetchNamespacesWithWorkloads:t}=e,{tier:r}=Vl(),o=e=>r!==Lr.Onprem&&Kl.has(e),{selectedStreamName:n}=Bs(),{namespaces:i,addEntities:a}=js(),[s,l]=Wt(!1),[c,d]=Wt({}),[p,u]=Wt(!1),[h,m]=Wt(""),[g,f]=Wt({}),[x,y]=Wt({}),[b,v]=Wt(""),[$,w]=Wt(jr.Source),[S,k]=Wt(!1),[C,E]=Wt(!1),A=Xt(()=>{const e=(e,t)=>!b||$!==t||$===t&&e.toLowerCase().includes(b),t={};return Object.entries(x).filter(([t])=>e(t,jr.Namespace)).forEach(([r,o])=>{const n=o.filter(t=>{return e(t.name,jr.Source)&&(r=t,!S||r.selected)&&(e=>!C||(e.numberOfInstances||0)>0)(t);var r});(!b||b&&($===jr.Namespace||$===jr.Source&&n.length))&&(t[r]=n)}),t},[x,b,$,S,C]);return Ht(()=>{(async()=>{l(!0);const e=await t();l(!1);const r=e.data;if(!r?.length)return;const o=[...r].sort((e,t)=>e.name.localeCompare(t.name)),i={},s={},c={};for(const e of o){const t=[...e.sources||[]].sort((e,t)=>e.name.localeCompare(t.name));i[e.name]=t.map(e=>Ql(e,n)),s[e.name]=t.map(e=>Zl(e,n)),c[e.name]=ec(e,n)}a(jr.Namespace,r.map(({sources:e,...t})=>t));const{configuredSources:p,configuredFutureApps:u}=el.getState();Object.entries(p).forEach(([e,t])=>{s[e]&&t.forEach(t=>{const r=s[e].findIndex(e=>e.name===t.name&&e.kind===t.kind);-1!==r&&(s[e][r]={...s[e][r],selected:t.selected,currentStreamName:t.currentStreamName})})}),Object.entries(u).forEach(([e,t])=>{c[e]&&(c[e]=t)}),d(i),y(s),f(c)})()},[n]),{loading:s,availableSources:c,filteredNamespacesAndSources:A,getApiSourcesPayload:()=>{const e={};return Object.entries(x).forEach(([t,r])=>{r.forEach(r=>{const o=c[t]?.find(e=>e.name===r.name&&e.kind===r.kind);o?.selected!==r.selected&&(e[t]||(e[t]=[]),e[t].push(r))})}),e},getApiFutureAppsPayload:()=>{const e={};return Object.entries(g).forEach(([t,r])=>{const o=i?.find(e=>e.name===t);(r.selected&&!o?.dataStreamNames?.includes(n)||!r.selected&&o?.dataStreamNames?.includes(n))&&(e[t]=r)}),e},selectedNamespace:h,onSelectNamespace:(e,t)=>{if(i.find(t=>t.name===e)){const r="boolean"==typeof t;m(t=>t!==e||r?e:""),r&&(y(r=>({...r,[e]:(r[e]||[]).map(e=>t&&o(e.kind)?e:{...e,selected:t,currentStreamName:n})})),u(!1))}},selectedAllNamespaces:p,onSelectAllNamespaces:e=>{u(e),y(t=>{const r={};for(const[i,a]of Object.entries(t))r[i]=a.map(t=>e&&o(t.kind)?t:{...t,selected:e,currentStreamName:n});return r})},selectedSources:x,onSelectSource:(e,t)=>{const r=t||h;if(!r)return;if(o(e.kind))return;const i=[...x[r]||[]],a=i.findIndex(({name:t,kind:r})=>t===e.name&&r===e.kind);if(-1!==a){const e={...i[a],selected:!i[a].selected,currentStreamName:n};i[a]=e}else i.push({...e,selected:!0,currentStreamName:n});y(e=>({...e,[r]:i})),u(!1)},selectedFutureApps:g,onSelectFutureApps:(e,t)=>{const r=t||h;if(!r)return;const o=i.find(e=>e.name===t);o&&f(t=>({...t,[r]:ec(o,n,e)}))},searchText:b,setSearchText:v,searchBy:$,setSearchBy:w,showSelectedOnly:S,setShowSelectedOnly:k,showRunningOnly:C,setShowRunningOnly:E}};try{Qt.addDefaultLocale(rr)}catch(e){}const rc=()=>{const e=Gt(new Qt(rr.locale));return{formatTimeAgo:Vt(t=>{try{return"string"==typeof t&&(t=t.replace("t","T").replace("z","Z")),e.current.format(new Date(t))}catch(e){return"-"}},[])}},oc=o.div`
|
|
467
|
+
`,Ll=({"data-id":t,icon:r,size:o=Fl.S,onClick:n,disabled:i})=>e(Pl,{"data-id":t,$size:o,$disabled:i,onClick:e=>{n&&!i&&(e.stopPropagation(),n(e))},children:e(r,{size:o})}),zl=({onDone:t}={})=>{const[r,o]=Wt(!1),[n,i]=Wt(-1),a=Vt(async(e,n)=>{if(!r){if(o(!0),void 0!==n&&i(n),navigator?.clipboard&&navigator.clipboard.writeText)try{await navigator.clipboard.writeText(e)}catch(e){}else{const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select();try{document.execCommand("copy")}catch(e){}document.body.removeChild(t)}t?.(),setTimeout(()=>{o(!1),i(-1)},1e3)}},[r,t]);return{CopyButton:Vt(({value:t,size:o})=>e(Ll,{icon:r?ft:xt,size:o,onClick:()=>a(t)}),[r]),isCopied:r,copiedIndex:n,clickCopy:a}},Ml=e=>{const{addNotification:t}=Zs(),{formData:r,handleFormChange:o,formErrors:n,handleErrorChange:i,resetFormData:a}=Dl(e);return{formData:r,formErrors:n,handleFormChange:o,resetFormData:a,validateForm:e=>{const o={};let n=!0;return r.name?Zn(r.name)?o.name=void 0:(n=!1,o.name=Eo.ILLEGAL_K8S_LABEL):(n=!1,o.name=Eo.FIELD_IS_REQUIRED),!n&&e?.withAlert&&t({type:Gr.Warning,title:e.alertTitle,message:Eo.REQUIRED_FIELDS,hideFromHistory:!0}),i(void 0,void 0,o),n},loadFormWithDrawerItem:({name:t})=>{const r={...$r(e),name:t};o(void 0,void 0,r)}}},Bl={type:"",name:"",exportedSignals:{logs:!1,metrics:!1,traces:!1},fields:[],disabled:!1},Ul=e=>{const{supportedSignals:t,preLoadedFields:r}=e||{},{addNotification:o}=Zs(),{formData:n,formErrors:i,handleFormChange:a,handleErrorChange:s,resetFormData:l}=Dl(Bl),[c,d]=Wt([]),[p,u]=Wt([]);Ht(()=>{var e;u(c?(e=c,e.filter(e=>!!e).map(e=>{const{name:t,componentType:r,componentProperties:o,displayName:n,initialValue:i,renderCondition:a}=e;if(r===Hr.Dropdown){const e=qn(o,{}),s=Array.isArray(e.values)?e.values.map(e=>({id:e,value:e})):Object.entries(e.values).map(([e,t])=>({id:e,value:t}));return{name:t,componentType:r,title:n,value:i,placeholder:e.placeholder||"Select an option",options:s,renderCondition:a,...e}}return{name:t,componentType:r,title:n,value:i,renderCondition:a,...qn(o,{})}})).map(e=>{if(r){const t="string"==typeof r?qn(r,{}):r;if(e.name in t)return{...e,value:t[e.name]}}return e}):[])},[c,r]),Ht(()=>{if(p){const e=p.map(e=>({key:e.name,value:e.value}));a("fields",e)}},[p]),Ht(()=>{if(t&&0===li(n.exportedSignals).length){const{logs:e,metrics:r,traces:o}=t;a("exportedSignals",{logs:e.supported,metrics:r.supported,traces:o.supported})}},[t,n.exportedSignals]);return{formData:n,formErrors:i,handleFormChange:a,resetFormData:l,validateForm:e=>{const t={};let r=!0;return p.forEach(({name:e,value:o,required:n})=>{n&&!o&&(r=!1,t[e]=Eo.FIELD_IS_REQUIRED)}),!r&&e?.withAlert&&o({type:Gr.Warning,title:e.alertTitle,message:Eo.REQUIRED_FIELDS,hideFromHistory:!0}),s(void 0,void 0,t),r},loadFormWithDrawerItem:({destinationType:{type:e},name:t,disabled:r,exportedSignals:o,fields:n})=>{const i={...$r(Bl),type:e,name:t,disabled:r,exportedSignals:o,fields:Object.entries(qn(n,{})).map(([e,t])=>({key:e,value:t}))};return a(void 0,void 0,i),i},yamlFields:c,setYamlFields:d,dynamicFields:p,setDynamicFields:u}},jl={ruleName:"",notes:"",disabled:!1,workloads:null,instrumentationLibraries:null,payloadCollection:{[lo.HttpRequest]:null,[lo.HttpResponse]:null,[lo.DbQuery]:null,[lo.Messaging]:null},codeAttributes:{[io.Column]:null,[io.FilePath]:null,[io.Function]:null,[io.LineNumber]:null,[io.Namespace]:null,[io.StackTrace]:null},headersCollection:null,customInstrumentations:{[so.Java]:null,[so.Golang]:null}},Wl=()=>{const{formData:e,formErrors:t,handleFormChange:r,handleErrorChange:o,resetFormData:n}=Dl(jl);return{formData:e,formErrors:t,handleFormChange:r,resetFormData:n,validateForm:()=>(o(void 0,void 0,{}),!0),loadFormWithDrawerItem:({ruleName:e,notes:t,disabled:o,payloadCollection:n,codeAttributes:i,headersCollection:a,customInstrumentations:s})=>{const l={...$r(jl),ruleName:e,notes:t,disabled:o};n&&(l.payloadCollection={[lo.HttpRequest]:n[lo.HttpRequest]?{}:null,[lo.HttpResponse]:n[lo.HttpResponse]?{}:null,[lo.DbQuery]:n[lo.DbQuery]?{}:null,[lo.Messaging]:n[lo.Messaging]?{}:null}),i&&(l.codeAttributes={[io.Column]:i[io.Column]||null,[io.FilePath]:i[io.FilePath]||null,[io.Function]:i[io.Function]||null,[io.LineNumber]:i[io.LineNumber]||null,[io.Namespace]:i[io.Namespace]||null,[io.StackTrace]:i[io.StackTrace]||null}),a&&(l.headersCollection=a),s&&(l.customInstrumentations={[so.Java]:s[so.Java]||null,[so.Golang]:s[so.Golang]||null}),r(void 0,void 0,l)}}},Hl=({active:e,key:t,withAltKey:r,withCtrlKey:o,withShiftKey:n,withMetaKey:i},a)=>(Ht(()=>{const s=s=>{e&&t===s.key&&(!r||r&&s.altKey)&&(!o||o&&s.ctrlKey)&&(!n||n&&s.shiftKey)&&(!i||i&&s.metaKey)&&(s.preventDefault(),s.stopPropagation(),a(s))};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}},[t,e,r,o,n,i,a]),null),Xl=(e,t)=>{Ht(()=>{const r=r=>{e.current&&!e.current.contains(r.target)&&t()};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r)}},[e,t])},Gl=({sectionNames:e,threshold:t=.4})=>{const[r,o]=Wt(e[0]||""),[n,i]=Wt(null),a=Gt({}),s=Gt(!1),l=Gt(!1),c=Vt((e,t)=>{a.current[e]=t},[]),d=Vt(e=>{i(e)},[]),p=Vt(e=>{l.current=!0,o(e)},[]);return Ht(()=>{if(!l.current)return;l.current=!1;const e=a.current[r];if(!e)return;s.current=!0,e.scrollIntoView({behavior:"smooth",block:"start"});const t=setTimeout(()=>{s.current=!1},600);return()=>clearTimeout(t)},[r]),Ht(()=>{const r=a.current,i=e.map(e=>r[e]).filter(Boolean);if(!i.length)return;const l=new IntersectionObserver(e=>{if(!s.current)for(const t of e)if(t.isIntersecting){const e=t.target.getAttribute("data-section-name");e&&o(e);break}},{threshold:t,root:n});return i.forEach(e=>l.observe(e)),()=>l.disconnect()},[e,t,n]),{selectedSection:r,setSelectedSection:p,setSectionRef:c,setScrollContainerRef:d}},Vl=({defaultClientHeight:e=0,defaultClientwidth:t=0,onClickOutside:r,positionMode:o="local"}={})=>{const n=Gt(null),[i,a]=Wt(!1),[s,l]=Wt({top:0,left:0}),[c,d]=Wt({edge:"top",align:"left"});Xl(n,()=>{i&&(a(!1),r?.())});return{popupRef:n,popupOpen:i,setPopupOpen:a,popupPosition:s,arrowPlacement:c,handlePosition:(r,i)=>{if("local"===o)return void l({top:i,left:r});const{innerWidth:a,innerHeight:s}=window,c=n.current?.clientWidth||t,p=n.current?.clientHeight||e,u=r/a,h=u<1/3?"left":u>2/3?"right":"center";d({edge:i<s/2?"top":"bottom",align:h});let m=i,g=r;if(m>=s/2&&(m+=-p),"center"===h){g=r-c/2;const e=8;g=Math.max(e,Math.min(g,a-c-e))}else g>=a/2&&(g=r-c);l({top:m,left:g})}}},Kl=()=>({getItemSS:(e,t)=>{const r=sessionStorage.getItem(e);return r?qn(r,t):t},setItemSS:(e,t)=>{sessionStorage.setItem(e,JSON.stringify(t))},removeItemSS:e=>{sessionStorage.removeItem(e)}}),ql={otelServiceName:"",currentStreamName:""},Jl=()=>{const{formData:e,formErrors:t,handleFormChange:r,handleErrorChange:o,resetFormData:n}=Dl(ql);return{formData:e,formErrors:t,handleFormChange:r,resetFormData:n,validateForm:()=>(o(void 0,void 0,{}),!0),loadFormWithDrawerItem:({otelServiceName:e,name:t})=>{const o={...$r(ql),otelServiceName:e||t||""};r(void 0,void 0,o)}}},Yl=qt({platformType:zr.K8s,tier:Lr.Community,version:"v0.0.0"}),Ql=({children:t,platformType:r,tier:o,version:n})=>{const i=Xt(()=>({platformType:r,tier:o,version:n}),[r,o,n]);return e(Yl.Provider,{value:i,children:t})},Zl=(e,t)=>!t||yi(e)>=yi(t),ec=e=>{const t=Kt(Yl),r=Zl(t.version,e),o=t.platformType===zr.Vm;return{...t,isVersionSupported:r,isVm:o,isEnterprise:t.tier===Lr.Onprem}},tc=new Set([to.StaticPod]),rc=e=>{const t=e.workloads.filter(({selected:e})=>e).length,r=e.workloads.length;return{selectedCount:t,isAllSourced:t>0&&t===r,isSomeSourced:t>0&&t<r,isFutureApps:e.selected||!1}},oc=(e,t,r)=>{if(t&&!e.name.toLowerCase().includes(t.toLowerCase()))return!1;if(r.showOnlySelected){const{isAllSourced:t,isSomeSourced:r,isFutureApps:o}=rc(e);return t||r||o}return!0},nc=(e,t,r)=>!(t&&!e.name.toLowerCase().includes(t.toLowerCase()))&&(!r.showOnlySelected||e.selected),ic=(e,t,r)=>{const o=!!e.dataStreamNames?.length||!!e.currentStreamName?.length,n=o&&e.dataStreamNames?.includes(t)||e.currentStreamName===t,i=e.selected&&(!o||n)||!1;return{namespace:e.namespace,name:e.name,kind:e.kind,selected:i,numberOfInstances:e.numberOfInstances}},ac=(e,t,r)=>({...ic(e,t),currentStreamName:t}),sc=(e,t,r)=>{const o="boolean"==typeof r,n=e.dataStreamNames?.includes(t),i=(o?r:e.selected)||!1;return{namespace:e.name,selected:!(!n&&!o)&&i,currentStreamName:t}},lc=e=>{const{fetchNamespacesWithWorkloads:t}=e,{tier:r}=ec(),o=e=>r!==Lr.Onprem&&tc.has(e),{selectedStreamName:n}=Vs(),{namespaces:i,addEntities:a}=qs(),[s,l]=Wt(!1),[c,d]=Wt({}),[p,u]=Wt(!1),[h,m]=Wt(""),[g,f]=Wt({}),[x,y]=Wt({}),[b,v]=Wt(""),[$,w]=Wt(jr.Source),[S,k]=Wt(!1),[C,E]=Wt(!1),A=Xt(()=>{const e=(e,t)=>!b||$!==t||$===t&&e.toLowerCase().includes(b),t={};return Object.entries(x).filter(([t])=>e(t,jr.Namespace)).forEach(([r,o])=>{const n=o.filter(t=>{return e(t.name,jr.Source)&&(r=t,!S||r.selected)&&(e=>!C||(e.numberOfInstances||0)>0)(t);var r});(!b||b&&($===jr.Namespace||$===jr.Source&&n.length))&&(t[r]=n)}),t},[x,b,$,S,C]);return Ht(()=>{(async()=>{l(!0);const e=await t();l(!1);const r=e.data;if(!r?.length)return;const o=[...r].sort((e,t)=>e.name.localeCompare(t.name)),i={},s={},c={};for(const e of o){const t=[...e.sources||[]].sort((e,t)=>e.name.localeCompare(t.name));i[e.name]=t.map(e=>ic(e,n)),s[e.name]=t.map(e=>ac(e,n)),c[e.name]=sc(e,n)}a(jr.Namespace,r.map(({sources:e,...t})=>t));const{configuredSources:p,configuredFutureApps:u}=sl.getState();Object.entries(p).forEach(([e,t])=>{s[e]&&t.forEach(t=>{const r=s[e].findIndex(e=>e.name===t.name&&e.kind===t.kind);-1!==r&&(s[e][r]={...s[e][r],selected:t.selected,currentStreamName:t.currentStreamName})})}),Object.entries(u).forEach(([e,t])=>{c[e]&&(c[e]=t)}),d(i),y(s),f(c)})()},[n]),{loading:s,availableSources:c,filteredNamespacesAndSources:A,getApiSourcesPayload:()=>{const e={};return Object.entries(x).forEach(([t,r])=>{r.forEach(r=>{const o=c[t]?.find(e=>e.name===r.name&&e.kind===r.kind);o?.selected!==r.selected&&(e[t]||(e[t]=[]),e[t].push(r))})}),e},getApiFutureAppsPayload:()=>{const e={};return Object.entries(g).forEach(([t,r])=>{const o=i?.find(e=>e.name===t);(r.selected&&!o?.dataStreamNames?.includes(n)||!r.selected&&o?.dataStreamNames?.includes(n))&&(e[t]=r)}),e},selectedNamespace:h,onSelectNamespace:(e,t)=>{if(i.find(t=>t.name===e)){const r="boolean"==typeof t;m(t=>t!==e||r?e:""),r&&(y(r=>({...r,[e]:(r[e]||[]).map(e=>t&&o(e.kind)?e:{...e,selected:t,currentStreamName:n})})),u(!1))}},selectedAllNamespaces:p,onSelectAllNamespaces:e=>{u(e),y(t=>{const r={};for(const[i,a]of Object.entries(t))r[i]=a.map(t=>e&&o(t.kind)?t:{...t,selected:e,currentStreamName:n});return r})},selectedSources:x,onSelectSource:(e,t)=>{const r=t||h;if(!r)return;if(o(e.kind))return;const i=[...x[r]||[]],a=i.findIndex(({name:t,kind:r})=>t===e.name&&r===e.kind);if(-1!==a){const e={...i[a],selected:!i[a].selected,currentStreamName:n};i[a]=e}else i.push({...e,selected:!0,currentStreamName:n});y(e=>({...e,[r]:i})),u(!1)},selectedFutureApps:g,onSelectFutureApps:(e,t)=>{const r=t||h;if(!r)return;const o=i.find(e=>e.name===t);o&&f(t=>({...t,[r]:sc(o,n,e)}))},searchText:b,setSearchText:v,searchBy:$,setSearchBy:w,showSelectedOnly:S,setShowSelectedOnly:k,showRunningOnly:C,setShowRunningOnly:E}};try{Qt.addDefaultLocale(rr)}catch(e){}const cc=()=>{const e=Gt(new Qt(rr.locale));return{formatTimeAgo:Vt(t=>{try{return"string"==typeof t&&(t=t.replace("t","T").replace("z","Z")),e.current.format(new Date(t))}catch(e){return"-"}},[])}},dc=o.div`
|
|
468
468
|
position: fixed;
|
|
469
469
|
top: 50%;
|
|
470
470
|
left: 50%;
|
|
@@ -474,28 +474,28 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
474
474
|
background: ${({theme:e})=>e.colors.translucent_bg};
|
|
475
475
|
border: ${({theme:e})=>`1px solid ${e.colors.border}`};
|
|
476
476
|
border-radius: 40px;
|
|
477
|
-
box-shadow: ${({theme:e})=>{const t=e.colors.primary+
|
|
478
|
-
animation-name: ${
|
|
479
|
-
`,
|
|
477
|
+
box-shadow: ${({theme:e})=>{const t=e.colors.primary+ml["010"];return`0px 1px 1px 0px ${t}, 0px 2px 2px 0px ${t}, 0px 5px 5px 0px ${t}, 0px 10px 10px 0px ${t}, 0px 0px 8px 0px ${t}`}};
|
|
478
|
+
animation-name: ${fl.in.center};
|
|
479
|
+
`,pc=o.div`
|
|
480
480
|
display: flex;
|
|
481
481
|
justify-content: space-between;
|
|
482
482
|
align-items: center;
|
|
483
483
|
height: 80px;
|
|
484
484
|
border-bottom: 1px solid ${({theme:e})=>e.colors.border};
|
|
485
485
|
padding: 0 24px;
|
|
486
|
-
`,
|
|
486
|
+
`,uc=o.div`
|
|
487
487
|
cursor: pointer;
|
|
488
488
|
display: flex;
|
|
489
489
|
align-items: center;
|
|
490
490
|
gap: 8px;
|
|
491
|
-
`,
|
|
491
|
+
`,hc=o.div`
|
|
492
492
|
display: flex;
|
|
493
493
|
align-items: center;
|
|
494
494
|
gap: 8px;
|
|
495
|
-
`,
|
|
495
|
+
`,mc=o(Nn)`
|
|
496
496
|
min-width: 350px;
|
|
497
497
|
min-height: 150px;
|
|
498
|
-
`,
|
|
498
|
+
`,gc=o.div`
|
|
499
499
|
position: absolute;
|
|
500
500
|
left: 50%;
|
|
501
501
|
transform: translateX(-50%);
|
|
@@ -504,24 +504,24 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
504
504
|
justify-content: center;
|
|
505
505
|
width: 100%;
|
|
506
506
|
pointer-events: none;
|
|
507
|
-
`,
|
|
507
|
+
`,fc=o(Si)`
|
|
508
508
|
text-transform: uppercase;
|
|
509
509
|
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
510
510
|
pointer-events: auto;
|
|
511
|
-
`,
|
|
511
|
+
`,xc=o(Si)`
|
|
512
512
|
text-transform: uppercase;
|
|
513
513
|
font-weight: 500;
|
|
514
514
|
font-size: 14px;
|
|
515
515
|
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
516
516
|
text-decoration: underline;
|
|
517
517
|
cursor: pointer;
|
|
518
|
-
`,
|
|
518
|
+
`,yc=({isOpen:o,noOverlay:n,header:i,actionComponent:a,onClose:s,children:l,closeOnEscape:c=!0})=>(Hl({key:"Escape",active:o&&c},()=>s()),Nl(o),o?dr.createPortal(t(r,{children:[e(On,{hidden:!o,onClick:s,style:{opacity:n?0:1}}),t(dc,{"data-id":"modal"+(i?`-${i.title.replaceAll(" ","-")}`:""),children:[i&&t(pc,{children:[t(uc,{onClick:s,children:[e(yt,{}),e(xc,{children:"Cancel"})]}),e(gc,{children:e(fc,{children:i.title})}),e(hc,{children:a})]}),e(mc,{children:l})]})]}),document.body):null),bc=o.div`
|
|
519
519
|
width: ${({$orientation:e,$thickness:t,$length:r})=>"vertical"===e?`${t}px`:r||"100%"};
|
|
520
520
|
height: ${({$orientation:e,$thickness:t,$length:r})=>"horizontal"===e?`${t}px`:r||"100%"};
|
|
521
521
|
margin: ${({$orientation:e,$margin:t})=>t||("horizontal"===e?"8px 0":"0 8px")};
|
|
522
|
-
background-color: ${({$type:e,theme:t})=>(e?t.text[e]:t.colors.border)+
|
|
522
|
+
background-color: ${({$type:e,theme:t})=>(e?t.text[e]:t.colors.border)+ml["050"]};
|
|
523
523
|
opacity: ${({$opacity:e})=>e||1};
|
|
524
|
-
`,
|
|
524
|
+
`,vc=({orientation:t="horizontal",type:r,thickness:o=1,length:n,margin:i,opacity:a})=>e(bc,{$orientation:t,$type:r,$thickness:o,$length:n,$margin:i,$opacity:a}),$c=o.div`
|
|
525
525
|
/* Portal: viewport coords (usePopup positionMode viewport). Non-portal: offset-parent coords, absolute. */
|
|
526
526
|
position: ${({$asPortal:e})=>e?"fixed":"absolute"};
|
|
527
527
|
${({$top:e})=>void 0!==e&&`top: ${e}px;`}
|
|
@@ -537,15 +537,15 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
537
537
|
width: ${({$width:e})=>void 0!==e?e:"unset"};
|
|
538
538
|
|
|
539
539
|
${({$asPortal:e,$withPointerEvents:t})=>e&&!t&&"pointer-events: none;"}
|
|
540
|
-
`,
|
|
540
|
+
`,wc=o.div`
|
|
541
541
|
padding: ${({$padding:e})=>void 0!==e?e:"12px"};
|
|
542
542
|
border-bottom: 1px solid ${({theme:e})=>e.colors.border};
|
|
543
|
-
`,
|
|
543
|
+
`,Sc=o.div`
|
|
544
544
|
padding: ${({$padding:e})=>void 0!==e?e:"12px"};
|
|
545
|
-
`,
|
|
545
|
+
`,kc=o.div`
|
|
546
546
|
padding: ${({$padding:e})=>void 0!==e?e:"12px"};
|
|
547
547
|
border-top: 1px solid ${({theme:e})=>e.colors.border};
|
|
548
|
-
`,
|
|
548
|
+
`,Cc=Ut(({isOpen:r,asPortal:o,...n},i)=>{const a=Xt(()=>{const{children:r,top:a,bottom:s,left:l,right:c,borderRadius:d,padding:p,maxWidth:u,width:h,header:m,footer:g,withPointerEvents:f,...x}=n;return t($c,{ref:i,$top:a,$bottom:s,$left:l,$right:c,$borderRadius:d,$padding:p,$maxWidth:u,$width:h,$asPortal:o,$withPointerEvents:f,...x,children:[m&&e(wc,{$padding:p,children:m}),e(Sc,{$padding:p,children:r}),g&&e(kc,{$padding:p,children:g})]})},[i,n,o]);return r?o?dr.createPortal(a,document.body):a:null});Cc.displayName=Cc.name;const Ec=o.div`
|
|
549
549
|
width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
|
|
550
550
|
position: relative;
|
|
551
551
|
display: flex;
|
|
@@ -559,13 +559,13 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
559
559
|
text-overflow: ellipsis;
|
|
560
560
|
white-space: nowrap;
|
|
561
561
|
`}
|
|
562
|
-
`,
|
|
562
|
+
`,Ac=o.div`
|
|
563
563
|
display: flex;
|
|
564
564
|
flex-direction: column;
|
|
565
565
|
align-items: flex-start;
|
|
566
566
|
gap: 8px;
|
|
567
567
|
width: 100%;
|
|
568
|
-
|
|
568
|
+
`,Dc=o.div`
|
|
569
569
|
display: flex;
|
|
570
570
|
width: 100%;
|
|
571
571
|
flex-shrink: 0;
|
|
@@ -575,7 +575,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
575
575
|
${({$align:e})=>"left"===e&&"\n justify-content: flex-start;\n padding-left: 20px;\n padding-right: 10px;\n "}
|
|
576
576
|
${({$align:e})=>"right"===e&&"\n justify-content: flex-end;\n padding-left: 10px;\n padding-right: 20px;\n "}
|
|
577
577
|
${({$align:e})=>"center"===e&&"\n justify-content: center;\n align-items: center;\n min-height: 8px;\n "}
|
|
578
|
-
`,
|
|
578
|
+
`,Tc=o.div`
|
|
579
579
|
width: 0;
|
|
580
580
|
height: 0;
|
|
581
581
|
border-style: solid;
|
|
@@ -584,18 +584,18 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
584
584
|
flex-shrink: 0;
|
|
585
585
|
|
|
586
586
|
${({$pointsUp:e,theme:t})=>e?`\n border-bottom: 8px solid ${t.v2.colors.black[500]};\n border-top-width: 0;\n `:`\n border-top: 8px solid ${t.v2.colors.black[500]};\n border-bottom-width: 0;\n `}
|
|
587
|
-
`,
|
|
587
|
+
`,Ic=o.div`
|
|
588
588
|
display: flex;
|
|
589
589
|
flex-direction: column;
|
|
590
590
|
align-items: stretch;
|
|
591
591
|
min-width: 0;
|
|
592
|
-
`,
|
|
592
|
+
`,Nc=o.div`
|
|
593
593
|
background-color: ${({theme:e})=>e.v2.colors.black[500]};
|
|
594
594
|
border-radius: 4px;
|
|
595
595
|
padding: 8px;
|
|
596
596
|
box-sizing: border-box;
|
|
597
597
|
min-width: 0;
|
|
598
|
-
`,
|
|
598
|
+
`,Rc=({withIcon:o,titleIcon:n,title:a,text:s,timestamp:l,children:c,fullWidth:d=!1,keepAlive:p=!1,ellipsis:u=!1})=>{const h=i(),{popupRef:m,popupOpen:g,setPopupOpen:f,popupPosition:x,arrowPlacement:y,handlePosition:b}=Vl({positionMode:"viewport",defaultClientHeight:48,defaultClientwidth:Math.min(7.5*(s?.length||0),300)}),v=Xt(()=>!!vi(s||"")?.length,[s]),$=e=>{const{type:t,clientX:r,clientY:o}=e;v?b(x.left||r,x.top||o):b(r,o),f("mouseleave"!==t)};return s||p?t(Ec,{$fullWidth:d,$ellipsis:u,$hasText:!!s,onMouseEnter:$,onMouseMove:$,onMouseLeave:$,children:[c,o&&e(Ye,{fill:h.v2.colors.white[500]}),e(Cc,{ref:m,isOpen:g&&!!s,top:x.top,left:x.left,asPortal:!0,withPointerEvents:v,onMouseEnter:v?$:void 0,style:{backgroundColor:"transparent",border:"none"},maxWidth:"270px",borderRadius:"0",padding:"0",children:t(Ic,{children:["top"===y.edge&&e(Dc,{$align:y.align,children:e(Tc,{$pointsUp:!0})}),e(Nc,{children:t(Ac,{children:[(!!n||!!a)&&t(Tn,{$gap:4,style:{alignItems:"center"},children:[n&&e(n,{size:16},"icon"),a&&e(cn,{size:sn.XS,children:a},"title")]}),!!s&&e(cn,{size:sn.XXXS,children:s}),!!l&&e(cn,{size:sn.XXXS,color:h.v2.colors.silver[200],children:new Date(l).toLocaleString()})]})}),"bottom"===y.edge&&e(Dc,{$align:y.align,children:e(Tc,{$pointsUp:!1})})]})})]}):e(r,{children:c})},Oc=o.button`
|
|
599
599
|
position: relative;
|
|
600
600
|
width: ${({$size:e})=>e}px;
|
|
601
601
|
height: ${({$size:e})=>e}px;
|
|
@@ -607,9 +607,9 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
607
607
|
justify-content: center;
|
|
608
608
|
cursor: pointer;
|
|
609
609
|
&:hover {
|
|
610
|
-
background-color: ${({theme:e,$backgroundColor:t})=>t?t+
|
|
610
|
+
background-color: ${({theme:e,$backgroundColor:t})=>t?t+ml["070"]:e.colors.dropdown_bg_2};
|
|
611
611
|
}
|
|
612
|
-
`,
|
|
612
|
+
`,_c=o.div`
|
|
613
613
|
position: absolute;
|
|
614
614
|
top: ${({$size:e})=>e/5}px;
|
|
615
615
|
right: ${({$size:e})=>e/5}px;
|
|
@@ -624,17 +624,17 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
624
624
|
inset: 0;
|
|
625
625
|
border-radius: 100%;
|
|
626
626
|
background-color: ${({theme:e,$color:t})=>t||e.colors.secondary};
|
|
627
|
-
animation: ${
|
|
627
|
+
animation: ${yl} 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
|
|
628
628
|
}
|
|
629
|
-
`,
|
|
629
|
+
`,Fc=({children:r,onClick:o,tooltip:n,size:i=36,withPing:a,pingColor:s,withBorder:l,backgroundColor:c,...d})=>e(Rc,{text:n,children:t(Oc,{$size:i,$withBorder:l,$backgroundColor:c,onClick:o,...d,children:[a&&e(_c,{$size:i,$color:s}),r]})}),Pc=o.div`
|
|
630
630
|
position: relative;
|
|
631
631
|
&.animated {
|
|
632
632
|
overflow: hidden;
|
|
633
633
|
padding-bottom: 1px;
|
|
634
634
|
border-radius: 32px;
|
|
635
|
-
animation: ${({$isLeaving:e})=>e?
|
|
635
|
+
animation: ${({$isLeaving:e})=>e?fl.out.bottom:fl.in.bottom} ${({$duration:e})=>e/10}ms forwards;
|
|
636
636
|
}
|
|
637
|
-
`,
|
|
637
|
+
`,Lc=o.div`
|
|
638
638
|
position: absolute;
|
|
639
639
|
bottom: -1px;
|
|
640
640
|
left: 0;
|
|
@@ -643,8 +643,8 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
643
643
|
height: 100%;
|
|
644
644
|
border-radius: 32px;
|
|
645
645
|
background-color: ${({$type:e,theme:t})=>t.text[e]};
|
|
646
|
-
animation: ${
|
|
647
|
-
`,
|
|
646
|
+
animation: ${xl.out} ${({$duration:e})=>""+(e-e/10)}ms forwards;
|
|
647
|
+
`,zc=o.div`
|
|
648
648
|
display: flex;
|
|
649
649
|
align-items: center;
|
|
650
650
|
flex: 1;
|
|
@@ -652,20 +652,20 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
652
652
|
padding: 0 12px;
|
|
653
653
|
border-radius: 32px;
|
|
654
654
|
background-color: ${({$type:e,theme:t})=>t.colors[e]};
|
|
655
|
-
`,
|
|
655
|
+
`,Mc=o.div`
|
|
656
656
|
display: flex;
|
|
657
657
|
align-items: center;
|
|
658
658
|
margin: 0 auto 0 0;
|
|
659
659
|
padding: 8px 0;
|
|
660
660
|
max-width: ${({$withAction:e,$overrideMaxWidth:t})=>t||(e?"400px":"500px")};
|
|
661
661
|
min-height: 12px;
|
|
662
|
-
`,
|
|
662
|
+
`,Bc=o(Si)`
|
|
663
663
|
font-size: 14px;
|
|
664
664
|
color: ${({$type:e,theme:t})=>t.text[e]};
|
|
665
|
-
`,
|
|
665
|
+
`,Uc=o(Si)`
|
|
666
666
|
color: ${({$type:e,theme:t})=>t.text[e]};
|
|
667
667
|
font-size: 12px;
|
|
668
|
-
`,
|
|
668
|
+
`,jc=o(Tn)``,Wc=o(Si)`
|
|
669
669
|
text-transform: uppercase;
|
|
670
670
|
text-decoration: underline;
|
|
671
671
|
font-size: 12px;
|
|
@@ -676,34 +676,34 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
676
676
|
transform: scale(1.1);
|
|
677
677
|
transition: transform 0.3s;
|
|
678
678
|
}
|
|
679
|
-
`,
|
|
679
|
+
`,Hc=({type:r,icon:o,title:n,message:a,action:s,onClose:l,duration:c=5e3,overrideMaxWidth:d,style:p})=>{const u=i(),[h,m]=Wt(!1),g=Gt(null),f=Gt(null),x=e=>{l&&(m(!0),l({asSeen:e?.asSeen}))};Ht(()=>(g.current=setTimeout(()=>x({asSeen:!1}),c),()=>{g.current&&clearTimeout(g.current)}),[c]);const y=o||jn(r,u);return t(Pc,{className:l?"animated":"",$duration:c,$isLeaving:h,onMouseEnter:()=>{g.current&&clearTimeout(g.current),f.current&&(f.current.style.animationPlayState="paused")},onMouseLeave:()=>{if(f.current){const e=f.current.offsetWidth/f.current.parentElement.offsetWidth*c;g.current=setTimeout(()=>x({asSeen:!1}),e),f.current.style.animationPlayState="running"}},children:[t(zc,{"data-id":"toast",$type:r,style:p,children:[e(y,{fill:u.text[r]}),t(Mc,{$withAction:!!s,$overrideMaxWidth:d,children:[n&&e(Bc,{$type:r,children:n}),n&&a&&e(vc,{orientation:"vertical",type:r}),a&&e(Uc,{$type:r,children:a})]}),(!!s||!!l)&&t(jc,{children:[s&&e(Wc,{"data-id":"toast-action",onClick:s.onClick,children:s.label}),l&&e(Fc,{"data-id":"toast-close",onClick:()=>x({asSeen:!0}),children:e(yt,{size:12})})]})]}),l&&e(Lc,{ref:f,$duration:c,$type:r})]})},Xc=o.div`
|
|
680
680
|
padding: 24px 32px;
|
|
681
|
-
`,
|
|
681
|
+
`,Gc=o.div`
|
|
682
682
|
padding: ${({$withNote:e})=>e?"12px 0px":"12px 0px 32px 0"};
|
|
683
|
-
`,
|
|
683
|
+
`,Vc=o(Si)`
|
|
684
684
|
font-size: 20px;
|
|
685
685
|
line-height: 28px;
|
|
686
|
-
`,
|
|
686
|
+
`,Kc=o(Si)`
|
|
687
687
|
color: ${({theme:e})=>e.text.grey};
|
|
688
688
|
width: 416px;
|
|
689
689
|
font-style: normal;
|
|
690
690
|
font-weight: 300;
|
|
691
691
|
line-height: 24px;
|
|
692
|
-
`,
|
|
692
|
+
`,qc=o.div`
|
|
693
693
|
display: flex;
|
|
694
694
|
justify-content: space-between;
|
|
695
695
|
gap: 12px;
|
|
696
|
-
`,
|
|
696
|
+
`,Jc=o(Al)`
|
|
697
697
|
width: 250px;
|
|
698
|
-
`,
|
|
698
|
+
`,Yc=o.div`
|
|
699
699
|
margin-bottom: 12px;
|
|
700
|
-
`,
|
|
700
|
+
`,Qc=({isOpen:r,noOverlay:o,title:n="",description:i="",note:a,approveButton:s,denyButton:l,closeOnEscape:c=!0})=>{Hl({key:"Enter",active:r&&c},()=>s.onClick());const d=()=>l.onClick();return e(yc,{isOpen:r,noOverlay:o,onClose:d,children:t(Xc,{children:[e(Vc,{children:n}),e(Gc,{$withNote:!!a,children:e(Kc,{children:i})}),!!a&&e(Yc,{children:e(Hc,{type:a.type,title:a.title,message:a.message})}),t(qc,{children:[e(Jc,{"data-id":"approve",variant:s.variant||"primary",onClick:()=>s.onClick(),children:s.text}),e(Jc,{"data-id":"deny",variant:l.variant||"secondary",onClick:d,children:l.text})]})]})})},Zc=({isOpen:t,noOverlay:r,name:o,onApprove:n,onDeny:i})=>e(Qc,{isOpen:t,noOverlay:r,title:"Cancel"+(o?` ${o}`:""),description:"Are you sure you want to cancel?",approveButton:{text:"Confirm",variant:Gr.Warning,onClick:n},denyButton:{text:"Go Back",onClick:i}}),ed=o.div`
|
|
701
701
|
display: flex;
|
|
702
702
|
align-items: center;
|
|
703
703
|
gap: 8px;
|
|
704
704
|
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
705
705
|
opacity: ${({$disabled:e})=>e?.6:1};
|
|
706
|
-
`,
|
|
706
|
+
`,td=o.div`
|
|
707
707
|
width: 18px;
|
|
708
708
|
height: 18px;
|
|
709
709
|
border-radius: 6px;
|
|
@@ -711,15 +711,15 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
711
711
|
display: flex;
|
|
712
712
|
align-items: center;
|
|
713
713
|
justify-content: center;
|
|
714
|
-
background-color: ${({$isChecked:e,$isPartiallyChecked:t,theme:r})=>e?r.colors.majestic_blue:t?r.colors.majestic_blue_soft:r.colors.secondary+
|
|
714
|
+
background-color: ${({$isChecked:e,$isPartiallyChecked:t,theme:r})=>e?r.colors.majestic_blue:t?r.colors.majestic_blue_soft:r.colors.secondary+ml["020"]};
|
|
715
715
|
pointer-events: ${({$disabled:e})=>e?"none":"auto"};
|
|
716
716
|
transition: border 0.3s;
|
|
717
717
|
&:hover {
|
|
718
718
|
border: 1px solid ${({theme:e})=>e.colors.secondary};
|
|
719
719
|
}
|
|
720
|
-
`,
|
|
720
|
+
`,rd=({title:r,titleColor:o,tooltip:n,value:a=!1,partiallyChecked:s=!1,onChange:l,disabled:c,style:d,errorMessage:p,allowPropagation:u=!1})=>{const h=i(),[m,g]=Wt(a);Ht(()=>g(a),[a]);return t(In,{children:[t(ed,{"data-id":"checkbox"+(r?`-${r}`:""),$disabled:c,onClick:e=>{c||(u||e.stopPropagation(),l?l(!!s||!m):g(e=>!!s||!e))},style:d,children:[e(td,{$isChecked:m,$isPartiallyChecked:s,$disabled:c,children:s?e(bt,{fill:h.text.white}):m?e(ft,{fill:h.text.white}):null}),r&&e(Rc,{text:n,withIcon:!0,children:e(Si,{size:12,color:o||h.text.grey,style:{maxWidth:"90%"},children:r})})]}),!!p&&e(Ei,{children:p})]})},od=o(Tn)`
|
|
721
721
|
gap: 0;
|
|
722
|
-
`,
|
|
722
|
+
`,nd=o.button`
|
|
723
723
|
padding: 4px 8px;
|
|
724
724
|
background-color: ${({theme:e,$selected:t})=>t?e.colors.dropdown_bg_2:"transparent"};
|
|
725
725
|
border-radius: ${({$position:e})=>"left"===e?"32px 0px 0px 32px":"right"===e?"0px 32px 32px 0px":"0"};
|
|
@@ -731,22 +731,22 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
731
731
|
&:hover {
|
|
732
732
|
border: 1px solid ${({theme:e})=>e.colors.secondary};
|
|
733
733
|
}
|
|
734
|
-
`,
|
|
734
|
+
`,id=({isPrettyMode:r,setIsPrettyMode:o})=>t(od,{children:[e(nd,{$position:"left",$selected:r,onClick:()=>o(!0),children:e(vt,{})}),e(nd,{$position:"right",$selected:!r,onClick:()=>o(!1),children:e($t,{})})]}),ad=o.table`
|
|
735
735
|
border-collapse: collapse;
|
|
736
736
|
font-family: ${({theme:e})=>e.font_family.primary};
|
|
737
|
-
`,
|
|
737
|
+
`,sd=o.tbody``,ld=o.tr`
|
|
738
738
|
td:first-child {
|
|
739
739
|
padding-left: 0 !important;
|
|
740
740
|
}
|
|
741
741
|
td:last-child {
|
|
742
742
|
padding-right: 0 !important;
|
|
743
743
|
}
|
|
744
|
-
`,
|
|
744
|
+
`,cd=o.td`
|
|
745
745
|
vertical-align: top;
|
|
746
746
|
padding: 4px 6px;
|
|
747
|
-
`,
|
|
747
|
+
`,dd=o(Si)`
|
|
748
748
|
white-space: nowrap;
|
|
749
|
-
`,
|
|
749
|
+
`,pd=o.span`
|
|
750
750
|
white-space: ${({$noWrap:e})=>e?"nowrap":"pre-wrap"};
|
|
751
751
|
overflow-wrap: break-word;
|
|
752
752
|
word-break: break-word;
|
|
@@ -754,56 +754,56 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
754
754
|
/* Fallback for older browsers */
|
|
755
755
|
-ms-word-break: break-all;
|
|
756
756
|
font-size: 12px;
|
|
757
|
-
`,
|
|
757
|
+
`,ud=({language:t,code:r,theme:o,flatten:n,pretty:a})=>{const{darkMode:s}=i(),l=o?hr[o]:s?hr.palenight:hr.vsLight;let c="";if("json"===t){const e=qn(r,{}),t=mi(e);c=gi(n?Io(t):t)}else c=r;return a&&"json"===t?e(hd,{darkMode:s,str:c}):e(ur,{theme:l||(s?hr.palenight:hr.vsLight),language:t,code:c,children:({getLineProps:t,getTokenProps:r,tokens:o})=>e("pre",{children:o.map((o,n)=>e("div",{...t({line:o}),children:o.map((t,o)=>e(pd,{...r({token:t})},`line-${n}-token-${o}`))},`line-${n}`))})})},hd=({darkMode:r,str:o})=>{const n=i(),a=(r,o)=>{const i=new Array(r).fill(r=>t(ld,{...r,children:[e(cd,{}),e(cd,{})]}));return e(jt,{children:i.map((t,r)=>e(t,{style:0===r?{borderBottom:`1px solid ${n.colors.border}`}:{}},`empty-row-${o}-${r}`))})};return e(ur,{theme:r?hr.palenight:hr.vsLight,language:"json",code:o,children:({getLineProps:r,getTokenProps:o,tokens:i})=>e(ad,{children:e(sd,{children:i.map((i,s)=>{const l=(e=>{const t=["punctuation","plain","operator"];return e.filter(e=>!t.includes(e.types[0])).map(({types:e,content:t})=>{const r=[...e],o=["property","string"].includes(r[0])?t.replace(/"/g,""):t;return"string"===r[0]&&(["true","false"].includes(o.split("@")[0])&&(r[0]="boolean"),o.split("@")[0].match(/^[0-9]+$/)&&(r[0]="number")),{types:r,content:o}})})(i),c=r({line:l});return 1===l.length&&"property"===l[0].types[0]?t(jt,{children:[a(2,s),t(ld,{...c,children:[e(cd,{children:e(dd,{children:l[0].content})}),e(cd,{})]})]},`line-${s}`):2===l.length?e(ld,{...c,children:l.map((r,i)=>{const{text:a,components:l}=((t,r)=>{const[o,...n]=t.split("@");return{text:o,components:n?.map((t,o)=>{if(!t.includes("="))return null;const[n,i]=t.split("=");switch(n){case"tooltip":return e(Rc,{withIcon:!0,text:i},`${n}-${i}-${o}`);case"status":if("none"===i)return e("div",{style:{width:16,height:16}},`${n}-${i}-${o}`);let t=jn(i,r);return t||(t=jn(Gr.Warning,r)),e(t,{},`${n}-${i}-${o}`);default:return null}})?.filter(e=>!!e)||[]}})(r.content,n),c=0===i;return e(cd,{children:t(Tn,{children:[e(Tn,{children:l}),e(pd,{$noWrap:c,...o({token:r}),children:a})]})},`line-${s}-token-${i}`)})},`line-${s}`):(l.length,null)})})})})},md={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function gd(e){if("number"==typeof e)return{value:e,unit:"px"};let t;const r=(e.match(/^[0-9.]*/)||"").toString();t=r.includes(".")?parseFloat(r):parseInt(r,10);const o=(e.match(/[^0-9]*$/)||"").toString();return md[o]?{value:t,unit:o}:{value:t,unit:"px"}}function fd(e){const t=gd(e);return`${t.value}${t.unit}`}const xd=((e,t,r)=>{const o=`react-spinners-${e}-${r}`;if("undefined"==typeof window||!window.document)return o;const n=document.createElement("style");document.head.appendChild(n);const i=n.sheet,a=`\n @keyframes ${o} {\n ${t}\n }\n `;return i&&i.insertRule(a,0),o})("FadeLoader","50% {opacity: 0.3} 100% {opacity: 1}","fade"),yd=({loading:r=!0,color:o,scale:n=1,speedMultiplier:a=1,cssOverride:s={},style:l={},...c})=>{const d=i(),p=o||d.text.secondary;if(!r)return null;const{value:u}=gd(2),h=u+4.2,m=h/2+h/5.5,g=4*h*n,f={position:"relative",width:`${g}px`,height:`${g}px`,scale:n,...l,...s},x=(e,t)=>({position:"absolute",width:fd(1.5),height:fd(4),borderRadius:fd(2),backgroundColor:p,transition:"2s",animationFillMode:"both",animation:`${xd} ${1.2/a}s ${.12*e}s infinite ease-in-out`,transform:`translate(-50%, -50%) rotate(${t}deg)`});return t("span",{style:f,...c,children:[e("span",{style:{...x(1,0),top:`calc(50% + ${h}px)`,left:"50%"}}),e("span",{style:{...x(2,-45),top:`calc(50% + ${m}px)`,left:`calc(50% + ${m}px)`}}),e("span",{style:{...x(3,90),top:"50%",left:`calc(50% + ${h}px)`}}),e("span",{style:{...x(4,45),top:`calc(50% + ${-1*m}px)`,left:`calc(50% + ${m}px)`}}),e("span",{style:{...x(5,0),top:`calc(50% + ${-1*h}px)`,left:"50%"}}),e("span",{style:{...x(6,-45),top:`calc(50% + ${-1*m}px)`,left:`calc(50% + ${-1*m}px)`}}),e("span",{style:{...x(7,90),top:"50%",left:`calc(50% + ${-1*h}px)`}}),e("span",{style:{...x(8,45),top:`calc(50% + ${m}px)`,left:`calc(50% + ${-1*m}px)`}})]})},bd=o.div`
|
|
758
758
|
margin: ${({$align:e})=>"right"===e?"auto 6px auto auto":"left"===e?"auto auto auto 6px":"auto"};
|
|
759
759
|
display: flex;
|
|
760
760
|
align-items: center;
|
|
761
761
|
justify-content: center;
|
|
762
|
-
`,
|
|
762
|
+
`,vd=({extend:t,size:r=14,align:o="center"})=>e(bd,{$align:o,children:e(wt,{size:r,rotate:t?180:0})}),$d=o.div`
|
|
763
763
|
border-radius: 24px;
|
|
764
|
-
background-color: ${({theme:e,$status:t})=>t===Gr.Error?e.text.error+
|
|
764
|
+
background-color: ${({theme:e,$status:t})=>t===Gr.Error?e.text.error+ml["010"]:t===Gr.Warning?e.text.warning+ml["010"]:e.colors.secondary+ml["005"]};
|
|
765
765
|
&:hover {
|
|
766
|
-
background-color: ${({theme:e,$status:t})=>t===Gr.Error?e.text.error+
|
|
766
|
+
background-color: ${({theme:e,$status:t})=>t===Gr.Error?e.text.error+ml["020"]:t===Gr.Warning?e.text.warning+ml["020"]:e.colors.secondary+ml["010"]};
|
|
767
767
|
}
|
|
768
768
|
cursor: pointer;
|
|
769
769
|
transition: background 0.3s;
|
|
770
|
-
`,
|
|
770
|
+
`,wd=o.div`
|
|
771
771
|
display: flex;
|
|
772
772
|
align-items: center;
|
|
773
773
|
gap: 12px;
|
|
774
774
|
padding: 12px 18px;
|
|
775
|
-
`,
|
|
775
|
+
`,Sd=o.div`
|
|
776
776
|
display: flex;
|
|
777
777
|
flex-direction: column;
|
|
778
778
|
gap: 8px;
|
|
779
779
|
padding: 6px 18px 12px 18px;
|
|
780
|
-
`,
|
|
780
|
+
`,kd=o.div`
|
|
781
781
|
display: flex;
|
|
782
782
|
align-items: center;
|
|
783
783
|
gap: 12px;
|
|
784
|
-
`,
|
|
784
|
+
`,Cd=o(Si)`
|
|
785
785
|
white-space: nowrap;
|
|
786
|
-
`,
|
|
786
|
+
`,Ed=o(In)`
|
|
787
787
|
width: 16px;
|
|
788
|
-
`,
|
|
788
|
+
`,Ad=({conditions:r,headerLabelError:o="Something Failed",headerLabelWarning:n="Something isn't right",headerLabelSuccess:a="Everything Successful"})=>{const s=i(),[l,c]=Wt(!1),d=Xt(()=>ai(r),[r]),{errors:p,hasErrors:u,warnings:h,hasWarnings:m,hasDisableds:g,hasLoadings:f}=Xt(()=>Fo(d),[d]);Ht(()=>{c(u||m||g)},[u,m,g]);const x=(!d.length||f)&&!u&&!m&&!g,y=u?Gr.Error:m?Gr.Warning:g?Gr.Info:Gr.Success,b=jn(y,s),v=u?o:m||g?n:x?"Loading...":a,$=u?s.text.error:m?s.text.warning:s.text.info,w=`(${u?p.length:m?h.length:d.length}/${d.length})`,S=u?s.text.error_secondary:m?s.text.warning_secondary:s.text.info_secondary,k=Vt(()=>c(e=>!e),[]);return t($d,{onClick:k,$status:y,children:[t(wd,{children:[e(x?yd:b,{}),e(Si,{color:$,size:14,children:v}),e(Si,{color:S,size:12,family:"secondary",children:w}),e(vd,{extend:l,align:"right"})]}),l&&e(Sd,{children:d.map(({status:r,type:o,reason:n,message:i},a)=>{const l=r===Kr.Loading?()=>e(yd,{scale:.8}):r===Kr.Disabled?jn(Gr.Info,s):jn(r,s),c=r===Kr.Disabled?s.text.info:r===Gr.Error?s.text.error:r===Gr.Warning?s.text.warning:s.text.info,d=r===Kr.Disabled?s.text.info_secondary:r===Gr.Error?s.text.error_secondary:r===Gr.Warning?s.text.warning_secondary:s.text.info_secondary;return t(kd,{children:[e(Ed,{children:e(l,{})}),t(Si,{color:c,size:12,children:[e(Cd,{color:d,size:12,weight:700,children:o}),i||n]})]},`condition-${a}`)})})]})},Dd=o.div`
|
|
789
789
|
display: flex;
|
|
790
790
|
align-items: center;
|
|
791
791
|
gap: ${({$size:e})=>e/3}px;
|
|
792
792
|
padding: ${({$size:e,$withBorder:t,$withBackground:r})=>t||r?`${e/(t?3:2)}px ${e/(t?1.5:1)}px`:"0"};
|
|
793
793
|
width: ${({$width:e})=>e||"fit-content"};
|
|
794
794
|
border-radius: 360px;
|
|
795
|
-
border: ${({$withBorder:e,$status:t,theme:r})=>e?`1px solid ${r.text[t]+
|
|
796
|
-
background: ${({$withBackground:e,$status:t,theme:r})=>e?`linear-gradient(90deg, transparent 0%, ${r.text[t]+
|
|
797
|
-
`,
|
|
795
|
+
border: ${({$withBorder:e,$status:t,theme:r})=>e?`1px solid ${r.text[t]+ml["050"]}`:"none"};
|
|
796
|
+
background: ${({$withBackground:e,$status:t,theme:r})=>e?`linear-gradient(90deg, transparent 0%, ${r.text[t]+ml["030"]} 100%)`:"transparent"};
|
|
797
|
+
`,Td=o.div`
|
|
798
798
|
display: flex;
|
|
799
799
|
align-items: center;
|
|
800
|
-
`,
|
|
800
|
+
`,Id=o.div`
|
|
801
801
|
display: flex;
|
|
802
802
|
align-items: center;
|
|
803
|
-
`,
|
|
803
|
+
`,Nd=({title:r,subtitle:o,status:n=Gr.Default,forceIcon:a,withIcon:s,withBorder:l,withBackground:c,width:d,size:p=12,family:u="secondary",nowrap:h=!1})=>{const m=i(),g=[Kr.Loading,Kr.Disabled].includes(n)?Gr.Info:n,f=a?()=>e(a,{size:p+2,fill:m.text[g]}):n===Kr.Loading?()=>e(yd,{scale:.8}):()=>jn(g,m)?.({size:p+2});return t(Dd,{$status:g,$width:d,$size:p,$withIcon:s,$withBorder:l,$withBackground:c,children:[s&&e(Td,{children:e(f,{})}),(!!r||!!o)&&t(Id,{children:[!!r&&e(Si,{size:p,family:u,color:m.text[g],nowrap:h,children:r}),!!r&&!!o&&e(vc,{orientation:"vertical",length:p-2+"px",type:g}),!!o&&e(Si,{size:p-2,family:u,color:m.text[`${g}_secondary`],nowrap:h,children:o})]})]})},Rd=({label:r,onClick:o,variant:n="tertiary",textProps:a,...s})=>{const l=i();return t(Al,{onClick:o,variant:n,...s,children:[e(St,{fill:"primary"===n?l.text.primary:l.text.info}),e(Si,{size:14,family:"secondary",decoration:"underline",color:"primary"===n?l.text.primary:void 0,...a,children:r||Do.ADD})]})},Od=o(Tn)`
|
|
804
804
|
width: 100%;
|
|
805
805
|
border-radius: 8px;
|
|
806
|
-
background-color: ${({theme:e})=>e.colors.secondary+
|
|
806
|
+
background-color: ${({theme:e})=>e.colors.secondary+ml["010"]};
|
|
807
807
|
pre {
|
|
808
808
|
color: ${({theme:e})=>e.text.default};
|
|
809
809
|
font-size: 12px;
|
|
@@ -811,7 +811,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
811
811
|
width: 100%;
|
|
812
812
|
padding-left: 12px;
|
|
813
813
|
}
|
|
814
|
-
`,
|
|
814
|
+
`,_d=({value:r,callbackCopyDone:o})=>{const{clickCopy:n,isCopied:i}=zl();return t(Od,{children:[e("pre",{children:r}),e(Fc,{onClick:e=>{e.stopPropagation(),n(r),o?.()},tooltip:i?"Copied!":"Copy",children:e(i?ft:xt,{})})]})},Fd=({label:r,onClick:o,variant:n="tertiary",...a})=>{const s=i();return t(Al,{onClick:o,variant:n,...a,children:[e(kt,{fill:"primary"===n?s.text.primary:s.text.info}),e(Si,{size:14,family:"secondary",decoration:"underline",color:"primary"===n?s.text.primary:void 0,children:r||Do.EDIT})]})},Pd=({onClick:t})=>e(Hc,{type:Gr.Default,icon:rt,message:Ao.QUICK_BACK_TO_SUMMARY,action:{label:Ao.GO_TO_SUMMARY,onClick:t}}),Ld=o(Si)`
|
|
815
815
|
max-width: ${({$maxWidth:e})=>e?`${e}px`:"unset"};
|
|
816
816
|
white-space: nowrap;
|
|
817
817
|
overflow-x: auto;
|
|
@@ -821,15 +821,15 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
821
821
|
content: '';
|
|
822
822
|
display: block;
|
|
823
823
|
}
|
|
824
|
-
`,
|
|
824
|
+
`,zd=({maxWidth:r,text:o,textSize:n=16,textColor:i})=>{const[a,s]=Wt(!1),l=Gt(null);return Ht(()=>{if(l.current){const{clientWidth:e}=l.current;s(e<1.05*(r-n)&&e>.95*(r-n))}},[r,n,o]),t(Tn,{$gap:0,children:[o&&e(Rc,{text:a?o:void 0,children:e(Ld,{ref:l,$maxWidth:r-n,size:n,color:i,children:o})}),a&&e(Ld,{$maxWidth:n,size:n,color:i,children:"..."})]})},Md=({src:t="",alt:r="",size:o=16})=>{const[n,i]=Wt(!1);return t&&!n?e("img",{src:t,alt:r,width:o,height:o,onError:()=>i(!0)}):e(g,{size:o})},Bd=o.div`
|
|
825
825
|
display: flex;
|
|
826
826
|
align-items: center;
|
|
827
827
|
justify-content: center;
|
|
828
828
|
width: ${({$size:e})=>e}px;
|
|
829
829
|
height: ${({$size:e})=>e}px;
|
|
830
830
|
border-radius: 8px;
|
|
831
|
-
background: ${({$status:e,theme:t})=>{const r=t.colors[e||"dropdown_bg_2"];return`linear-gradient(180deg, ${r} 0%, ${r+
|
|
832
|
-
`,
|
|
831
|
+
background: ${({$status:e,theme:t})=>{const r=t.colors[e||"dropdown_bg_2"];return`linear-gradient(180deg, ${r} 0%, ${r+ml["030"]} 100%)`}};
|
|
832
|
+
`,Ud=({icon:t,src:r="",alt:o="",status:n,size:i=36})=>e(Bd,{$status:n,$size:i,children:r?e(Md,{src:r,alt:o,size:i-12}):e(t||g,{size:i-12})}),jd=o.div`
|
|
833
833
|
position: relative;
|
|
834
834
|
display: flex;
|
|
835
835
|
flex-wrap: wrap;
|
|
@@ -837,7 +837,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
837
837
|
justify-content: center;
|
|
838
838
|
width: ${({$size:e})=>e}px;
|
|
839
839
|
height: ${({$size:e})=>e}px;
|
|
840
|
-
`,
|
|
840
|
+
`,Wd=o.div`
|
|
841
841
|
position: absolute;
|
|
842
842
|
top: ${({$top:e})=>e}px;
|
|
843
843
|
left: ${({$left:e})=>e}px;
|
|
@@ -848,73 +848,73 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
848
848
|
width: ${({$size:e})=>e}px;
|
|
849
849
|
height: ${({$size:e})=>e}px;
|
|
850
850
|
border-radius: 100%;
|
|
851
|
-
border: 1px solid ${({theme:e,$status:t})=>(t?e.text[t]:e.colors.border)+
|
|
852
|
-
background: ${({$status:e,theme:t})=>{const r=t.colors[e||"dropdown_bg_2"];return`linear-gradient(180deg, ${r} 0%, ${r+
|
|
853
|
-
`,
|
|
851
|
+
border: 1px solid ${({theme:e,$status:t})=>(t?e.text[t]:e.colors.border)+ml["030"]};
|
|
852
|
+
background: ${({$status:e,theme:t})=>{const r=t.colors[e||"dropdown_bg_2"];return`linear-gradient(180deg, ${r} 0%, ${r+ml["030"]} 100%)`}};
|
|
853
|
+
`,Hd=({icons:r=[],iconSrcs:o=[],status:n,size:a=36,id:s})=>{const l=i(),c=1===r.length||1===o.length?a-12:a/2.7;if(o.length>0)return e(Hd,{icons:o.map(t=>()=>e(Md,{src:t,size:c})),status:n,size:a,id:s});if(1===r.length)return e(Ud,{icon:r[0],status:n,size:a});const d=e=>r.length<=2?.5*c:0===e||1===e?0:1.15*c,p=e=>0===e?0:1===e?1.15*c:1.15*c*.5;return e(jd,{$status:n,$size:a,children:r.map((o,i)=>i>2?null:e(Wd,{$status:n,$size:1.5*c,$top:d(i),$left:p(i),$zIndex:i+1,children:2===i&&r.length>3?t(Si,{family:"secondary",color:l.text.dark_grey,size:.8*c,children:["+",r.length-2]}):e(o,{size:c})},`icon-${s}-${i}`))})},Xd=Ms.map(({id:e})=>e),Gd=({monitors:r=Xd,withTooltips:o,withLabels:n,size:a=12,color:s})=>{const l=i(),c=s||l.text.grey;return e(Tn,{$gap:n?a:a/2,children:r.map(r=>{const i=xr(r.toLowerCase()),s=Qo(r);return s?e(Rc,{text:o?i:"",children:t(Tn,{$gap:a/3,children:[e(s,{size:n?a+2:a,fill:c}),n&&e(Si,{size:a,color:c,children:i})]})},r):null})})},Vd=o.div`
|
|
854
854
|
visibility: hidden;
|
|
855
|
-
`,
|
|
855
|
+
`,Kd=o.div`
|
|
856
856
|
display: flex;
|
|
857
857
|
flex-direction: column;
|
|
858
858
|
align-self: stretch;
|
|
859
859
|
padding: 16px;
|
|
860
860
|
width: calc(100% - 32px);
|
|
861
861
|
border-radius: 16px;
|
|
862
|
-
background-color: ${({theme:e,$status:t,$bgColor:r})=>r||(t?e.text[t]+
|
|
862
|
+
background-color: ${({theme:e,$status:t,$bgColor:r})=>r||(t?e.text[t]+ml["010"]:e.colors.secondary+ml["005"])};
|
|
863
863
|
opacity: ${({$faded:e})=>e?.5:1};
|
|
864
864
|
|
|
865
865
|
${({theme:e,$status:t,$bgColorHover:r,$withClick:o})=>o?n`
|
|
866
866
|
&:hover {
|
|
867
867
|
cursor: pointer;
|
|
868
|
-
background-color: ${r||(t?e.text[t]+
|
|
869
|
-
${
|
|
868
|
+
background-color: ${r||(t?e.text[t]+ml["020"]:e.colors.secondary+ml["010"])};
|
|
869
|
+
${Vd} {
|
|
870
870
|
visibility: visible;
|
|
871
871
|
}
|
|
872
872
|
}
|
|
873
|
-
`:`\n &:hover {\n ${
|
|
874
|
-
`,
|
|
873
|
+
`:`\n &:hover {\n ${Vd} {\n visibility: visible;\n }\n }\n `}
|
|
874
|
+
`,qd=o.div`
|
|
875
875
|
display: flex;
|
|
876
876
|
align-items: center;
|
|
877
877
|
gap: 8px;
|
|
878
878
|
margin-left: auto;
|
|
879
|
-
`,
|
|
879
|
+
`,Jd=o(Si)`
|
|
880
880
|
margin-right: 16px;
|
|
881
|
-
`,
|
|
881
|
+
`,Yd=o(Si)`
|
|
882
882
|
font-size: 10px;
|
|
883
883
|
color: ${({theme:e})=>e.text.grey};
|
|
884
|
-
`,
|
|
884
|
+
`,Qd=({title:r,subTitle:o,hoverText:n,onClick:a,renderActions:s,iconProps:{icon:l,icons:c,iconSrc:d,iconSrcs:p}={},visualProps:{status:u,faded:h,bgColor:m,bgColorHover:g,monitors:f,monitorsWithLabels:x,componentsUnderTitles:y}={},checkboxProps:{withCheckbox:b,isCheckboxDisabled:v,isChecked:$,isLoading:w,onCheckboxChange:S}={},extendableProps:{withExtend:k,isExtended:C,renderExtended:E}={},...A})=>{const D=i(),[T,I]=Wt(C||!1),[N,R]=Wt(0),O=Gt(null),_=Gt(null),F=Gt(null);return Ht(()=>{if(O.current){const e=O.current.clientWidth,t=_.current?.clientWidth||0;R(e-((b?125:85)+t))}},[b]),t(Kd,{ref:O,$status:u,$faded:h,$bgColor:m,$bgColorHover:g,$withClick:!!a,onClick:a,...A,children:[t(Tn,{$gap:8,children:[t(Tn,{$gap:16,children:[w?e(yd,{}):b?e(rd,{value:$,onChange:S,disabled:v}):null,c?.length||p?.length?e(Hd,{icons:c,iconSrcs:p,status:u,id:`${r}-${o}`}):l||d?e(Ud,{icon:l,src:d,status:u}):null]}),t(In,{$gap:4,children:[r&&e(zd,{maxWidth:N,text:r,textSize:14}),t(Tn,{$gap:4,children:[o&&e(zd,{maxWidth:N-(F.current?.clientWidth||0),text:o,textSize:10,textColor:D.text.grey}),f&&f.length>0&&t(Tn,{$gap:4,ref:F,children:[o&&e(Yd,{children:"•"}),e(Gd,{monitors:f,withLabels:x,size:10})]})]}),y&&y.length>0?e(Tn,{$gap:4,children:y?.map((t,r)=>e(jt,{children:t},`componentsUnderTitles-${r}`))}):null]}),t(qd,{ref:_,children:[!!n&&e(Vd,{children:e(Jd,{size:14,family:"secondary",children:n})}),s&&s(),k&&t(jt,{children:[e(vc,{orientation:"vertical",length:"16px",margin:"0 2px"}),e(Fc,{onClick:()=>I(e=>!e),children:e(vd,{extend:T})})]})]})]}),T&&E&&t(In,{children:[e(vc,{margin:"16px 0"}),E()]})]})},Zd=o(Tn)`
|
|
885
885
|
width: 100%;
|
|
886
886
|
justify-content: space-between;
|
|
887
|
-
`,
|
|
887
|
+
`,ep=o(Si)`
|
|
888
888
|
font-size: 12px;
|
|
889
889
|
color: ${({theme:e})=>e.text.grey};
|
|
890
|
-
`,
|
|
890
|
+
`,tp=o(Si)`
|
|
891
891
|
font-size: 10px;
|
|
892
892
|
color: ${({theme:e})=>e.text.darker_grey};
|
|
893
|
-
`,
|
|
893
|
+
`,rp=o.div`
|
|
894
894
|
display: flex;
|
|
895
895
|
align-items: center;
|
|
896
896
|
gap: 8px;
|
|
897
897
|
margin-left: auto;
|
|
898
|
-
`,
|
|
898
|
+
`,op=o(Si)`
|
|
899
899
|
font-size: 12px;
|
|
900
900
|
text-align: right;
|
|
901
|
-
`,
|
|
901
|
+
`,np=({title:r,subTitle:o,tooltip:n,value:i})=>t(Zd,{children:[e(In,{$gap:4,children:t(Rc,{text:n||"",children:[r&&e(ep,{children:r},"title"),o&&e(tp,{children:o},"subtitle")]})}),e(rp,{children:i?.status?e(Nd,{status:"transitioning"===i.status?Kr.Loading:i.status,title:i.text||i.status,withBorder:!0,withIcon:!0}):e(op,{children:i?.text||"-"})})]}),ip=o(In)`
|
|
902
902
|
width: 100%;
|
|
903
|
-
`,
|
|
903
|
+
`,ap=({containerName:r,actualDevices:o,started:n,ready:i,instrumentationInstances:a})=>{const s=Xt(()=>{const t=[];return n?.name&&t.push(e(Nd,{status:ti(n.value)?pi(n.value)?Gr.Success:Gr.Error:Gr.Default,title:n.name,withIcon:!0,withBorder:!0,size:8},"started")),i?.name&&t.push(e(Nd,{status:ti(i.value)?pi(i.value)?Gr.Success:Gr.Error:Gr.Default,title:i.name,withIcon:!0,withBorder:!0,size:8},"ready")),t},[n?.name,n?.value,i?.name,i?.value]);return e(Qd,{title:r.value,subTitle:a.length?`${a.length} Instrumented Processes`:void 0,visualProps:{componentsUnderTitles:s},renderActions:()=>e(Nd,{status:Gr.Info,title:"Instrumentation Device",subtitle:o.value&&"[]"!==o.value?o.value:"none",withBorder:!0}),extendableProps:{isExtended:!!a.length,renderExtended:()=>e(ip,{$gap:24,children:a.map((r,o)=>t(ip,{$gap:8,children:[e(np,{title:`Instrumented Process #${o+1}`,subTitle:r.message?.value||"",value:{status:r.healthy.status,text:r.healthy.status===Gr.Success?"healthy":"unhealthy"}}),r.identifyingAttributes?.map(({name:t,value:r})=>e(np,{title:t,subTitle:"",value:{text:r,status:void 0}},`describe-${t}-${r}`))]},`process-${o}`))})}})},sp=({title:r="Data not found",subTitle:o})=>{const n=i().v2.colors.grey[400];return t(Nn,{children:[t(Tn,{$gap:8,children:[e(Ct,{fill:n}),e(cn,{size:sn.XS,color:n,align:"center",children:r})]}),o&&e(cn,{size:sn.XXS,color:n,align:"center",children:o})]})},lp=o(In)`
|
|
904
904
|
max-width: 300px;
|
|
905
905
|
padding: 12px;
|
|
906
906
|
border-radius: 12px;
|
|
907
907
|
background-color: ${({theme:e})=>e.colors.dropdown_bg};
|
|
908
908
|
justify-content: center;
|
|
909
|
-
`,
|
|
909
|
+
`,cp=Jt(({id:t,data:r})=>{const{title:o,subTitle:n}=r;return e(lp,{"data-id":t,children:e(sp,{title:o,subTitle:n})})});cp.displayName=cp.name;const dp=o.div`
|
|
910
910
|
padding: 6px;
|
|
911
911
|
border-radius: 12px;
|
|
912
912
|
background-color: ${({theme:e})=>e.colors.dropdown_bg};
|
|
913
913
|
cursor: pointer;
|
|
914
914
|
${({$isVirtual:e,theme:t})=>e&&`\n border: 1px dashed ${t.colors.border};\n opacity: 0.8;\n `}
|
|
915
|
-
`,
|
|
915
|
+
`,pp=o.div`
|
|
916
916
|
position: relative;
|
|
917
|
-
`,
|
|
917
|
+
`,up=o.div`
|
|
918
918
|
position: absolute;
|
|
919
919
|
top: 100%;
|
|
920
920
|
margin-top: 4px;
|
|
@@ -926,12 +926,12 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
926
926
|
gap: 2px;
|
|
927
927
|
width: 140px;
|
|
928
928
|
text-align: center;
|
|
929
|
-
`,
|
|
929
|
+
`,hp=Jt(({id:o,data:n})=>{const{id:a,status:s,title:l,icons:c,isVirtual:d}=n,p=i(),u=d||s!==Gr.Error?null:jn(s,p);return t(r,{children:[e(or,{type:"source",position:nr.Right,style:{visibility:"hidden"}}),e(or,{type:"target",position:nr.Left,style:{visibility:"hidden"}}),t(pp,{"data-id":o,children:[e(dp,{$isVirtual:d,children:e(Hd,{id:a,icons:c,status:d?void 0:s})}),t(up,{children:[u&&e(u,{}),e(Si,{size:12,style:{textAlign:"center",wordBreak:"break-word",lineHeight:"1.3"},children:l})]})]})]})});hp.displayName=hp.name;const mp={duration:300,padding:.1,includeHiddenNodes:!0},gp=o.div`
|
|
930
930
|
height: 100%;
|
|
931
931
|
.react-flow__attribution {
|
|
932
932
|
visibility: hidden;
|
|
933
933
|
}
|
|
934
|
-
`,
|
|
934
|
+
`,fp=o.div`
|
|
935
935
|
button {
|
|
936
936
|
padding: 8px;
|
|
937
937
|
margin: 8px;
|
|
@@ -948,17 +948,17 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
948
948
|
transform: scale(1.4);
|
|
949
949
|
}
|
|
950
950
|
}
|
|
951
|
-
`,dp={[Yr.MapItem]:ap,[Yr.NoData]:rp},pp=({trigger:e})=>{const{fitView:t}=cr(),r=Gt(!0);return Ht(()=>{r.current?r.current=!1:e>0&&requestAnimationFrame(()=>t(sp))},[e,t]),null},up=({nodes:r,edges:o,onNodesChange:n,onEdgesChange:i,fitViewTrigger:a=0,zoomOnScroll:s=!1,onEdgeClick:l,onNodeMouseEnter:c,onNodeMouseLeave:d,onRefresh:p})=>{const{onClickNode:u}=Cl(),{setActiveNodeType:h,setActiveNodeId:m}=ji();return t(ar,{zoomOnScroll:s,nodes:r,nodeTypes:dp,edges:o,onNodeClick:u,onEdgeClick:l,onNodeMouseEnter:c,onNodeMouseLeave:d,onNodesChange:n,onEdgesChange:i,onBlur:()=>{h(null),m(null)},children:[e(pp,{trigger:a}),e(cp,{children:e(sr,{position:"bottom-right",orientation:"horizontal",showInteractive:!1,showZoom:!0,showFitView:!0,fitViewOptions:sp,children:p&&e(lr,{onClick:p,children:e(Et,{size:20})})})})]})},hp=t=>e(lp,{children:e(ir,{children:e(up,{...t})})}),mp={type:"",disabled:!1,name:"",notes:"",signals:[],fields:{}},gp=qt(null),fp="All row fields are required",xp="At least one row is required",yp=Eo.LATENCY_HTTP_ROUTE,bp=e=>"string"==typeof e?!e.trim():Qn(e),vp=(e,t)=>!!e&&t.every(t=>{const r=e[t];return Array.isArray(r)?r.length>0:!bp(r)}),$p=({children:t})=>{const[r,o]=Wt(null),[n,i]=Wt(void 0),a=$l(mp),s=Vt(e=>{a.resetFormData(),a.handleErrorChange(void 0,void 0,{}),i(void 0),e?.type&&a.handleFormChange("type",e.type),o(e)},[]),l=Vt(e=>{var t;a.resetFormData((({type:e,name:t,notes:r,disabled:o,signals:n,fields:i})=>({type:e,name:t||"",notes:r||"",disabled:!!o,signals:n??[],fields:i??{}}))(e)),a.handleErrorChange(void 0,void 0,{}),i(void 0),o((t=e.type,Wi.find(e=>e.type===t)??Hi.find(e=>e.type===t)??null))},[]),c=Vt(()=>{if(!r)return{errorMessage:"No action type selected",preparedFormData:$r(mp)};const e=(e=>{const t=$r(e),r=t.fields||{},o=r[Tr.UrlTemplatizationRulesGroups];o?.length&&(r[Tr.UrlTemplatizationRulesGroups]=o.map(e=>({...e,templatizationRules:(e.templatizationRules||[]).filter(e=>!!e.template?.trim())})));const n=r[Tr.AttributeNamesToDelete];n?.length&&(r[Tr.AttributeNamesToDelete]=n.filter(e=>!!e?.trim()));const i=r[Tr.Renames];return i&&(r[Tr.Renames]=Object.fromEntries(Object.entries(i).filter(([e,t])=>!!e?.trim()&&!!t?.trim()))),t.fields=r,t})(a.formData),t={};Qn(e.signals)&&(t.signals=Eo.FIELD_IS_REQUIRED),r.type&&Object.assign(t,((e,t,r)=>{const o={},n=t.fields||{},i=r.fields||{};switch(e){case Dr.K8sAttributes:{const e=!(n[Tr.CollectContainerAttributes]||n[Tr.CollectReplicaSetAttributes]||n[Tr.CollectWorkloadId]||n[Tr.CollectClusterId]),t=!n[Tr.LabelsAttributes]?.length,r=!n[Tr.AnnotationsAttributes]?.length;e&&t&&r&&(o[Tr.CollectContainerAttributes]="Enable at least one option or add a label/annotation row");const i=n[Tr.LabelsAttributes];i?.some(e=>!vp(e,["labelKey","attributeKey","fromSources"]))&&(o[Tr.LabelsAttributes]=fp);const a=n[Tr.AnnotationsAttributes];a?.some(e=>!vp(e,["annotationKey","attributeKey","fromSources"]))&&(o[Tr.AnnotationsAttributes]=fp);break}case Dr.AddClusterInfo:{const e=n[Tr.ClusterAttributes];e?.length?e.some(e=>!vp(e,["attributeName","attributeStringValue"]))&&(o[Tr.ClusterAttributes]=fp):o[Tr.ClusterAttributes]=xp;break}case Dr.DeleteAttributes:{const e=i[Tr.AttributeNamesToDelete]||[],t=n[Tr.AttributeNamesToDelete]||[];t.length?e.length>t.length&&(o[Tr.AttributeNamesToDelete]=fp):o[Tr.AttributeNamesToDelete]=e.length?fp:xp;break}case Dr.RenameAttributes:{const e=Object.entries(i[Tr.Renames]||{}),t=Object.entries(n[Tr.Renames]||{}),r=e.some(([e,t])=>!e?.trim()||!t?.trim());t.length?r&&(o[Tr.Renames]=fp):o[Tr.Renames]=e.length?fp:xp;break}case Dr.PiiMasking:{const e=n[Tr.PiiCategories];e?.length||(o[Tr.PiiCategories]="Select at least one attribute to mask");break}case Dr.ErrorSampler:bp(n[Tr.FallbackSamplingRatio])&&(o[Tr.FallbackSamplingRatio]=Eo.FIELD_IS_REQUIRED);break;case Dr.ProbabilisticSampler:bp(n[Tr.SamplingPercentage])&&(o[Tr.SamplingPercentage]=Eo.FIELD_IS_REQUIRED);break;case Dr.LatencySampler:{const e=n[Tr.EndpointsFilters];e?.length?e.some(e=>!vp(e,["serviceName","httpRoute","minimumLatencyThreshold","fallbackSamplingRatio"]))?o[Tr.EndpointsFilters]=fp:e.some(e=>!!e.httpRoute&&!e.httpRoute.startsWith("/"))&&(o[Tr.EndpointsFilters]=yp):o[Tr.EndpointsFilters]=xp;break}case Dr.ServiceNameSampler:{const e=n[Tr.ServicesNameFilters];e?.length?e.some(e=>!vp(e,["serviceName","samplingRatio","fallbackSamplingRatio"]))&&(o[Tr.ServicesNameFilters]=fp):o[Tr.ServicesNameFilters]=xp;break}case Dr.SpanAttributeSampler:{const e=n[Tr.AttributeFilters],t=["stringCondition","numberCondition","booleanCondition","jsonCondition"],r=new Set(["exists","is_valid_json","is_invalid_json","jsonpath_exists"]);e?.length?e.some(e=>{if(!vp(e,["serviceName","attributeKey","fallbackSamplingRatio"]))return!0;const o=e.condition||{},n=t.find(e=>!!o[e]);if(!n)return!0;const i=o[n]||{},a=i.operation;return!a||!(r.has(a)||!bp(i.expectedValue))})&&(o[Tr.AttributeFilters]=fp):o[Tr.AttributeFilters]=xp;break}case Dr.URLTemplatization:{const e=n[Tr.UrlTemplatizationRulesGroups];(!e?.length||e.some(e=>!e.templatizationRules?.length))&&(o[Tr.UrlTemplatizationRulesGroups]="Each rule group needs at least one non-blank template");break}}return o})(r.type,e,a.formData)),a.handleErrorChange(void 0,void 0,t);const o=Object.keys(t).length>0?"Invalid form values":void 0;return i(o),{errorMessage:o,preparedFormData:e}},[a,r]),d=Xt(()=>({selectedOption:r,onSelectOption:s,loadAction:l,genericForm:a,validateFormData:c,errorMessage:n}),[r,s,l,a,c,n]);return e(gp.Provider,{value:d,children:t})},wp=()=>{const e=Kt(gp);if(!e)throw new Error("useActionFormContext must be used within an ActionFormContextProvider");return e},Sp={type:"",name:"",currentStreamName:"",disabled:!1,exportedSignals:{logs:!1,metrics:!1,traces:!1},fields:[]},kp={activeForm:null,onChangeActiveForm:()=>{},loadDestination:()=>{},genericForm:void 0,formErrorMessage:void 0,validateFormData:()=>({isOk:!1,preparedFormData:$r(Sp)}),unsavedDestinations:[],thisUnsavedDestination:void 0,setUnsavedDestinations:()=>{},addUnsavedDestination:()=>{},updateUnsavedDestination:()=>{},deleteUnsavedDestination:()=>{}},Cp=qt(kp),Ep=e=>e.filter(e=>!!e).map(e=>{const{name:t,componentType:r,componentProperties:o,displayName:n,initialValue:i,renderCondition:a}=e,s=r===Hr.Dropdown,l=qn(o,{});return{componentType:r,renderCondition:a,name:t,title:n,value:i,placeholder:l.placeholder||(s?"Select an option":void 0),options:s&&Array.isArray(l.values)?l.values.map(e=>({id:e,value:e})):void 0,...l}}),Ap=({children:t})=>{const{selectedStreamName:r}=Bs(),[o,n]=Wt(null),[i,a]=Wt(),[s,l]=Wt(kp.unsavedDestinations),c=Xt(()=>"number"==typeof o?.unsavedIdx?s[o.unsavedIdx]:void 0,[o,s]),d=Vt((e,t)=>{o&&(l(t=>[...t,{...e,option:o.option}]),n(t?e=>e?{...e,listType:Gi.UNSAVED,unsavedIdx:s.length}:null:null))},[o,s.length]),p=Vt((e,t,r)=>{o&&(l(r=>r.map((r,n)=>n===e?{...r,...t,option:o.option}:r)),n(r?e=>e?{...e,listType:Gi.UNSAVED}:null:null))},[o]),u=Vt(e=>{l(t=>t.filter((t,r)=>r!==e)),n(null)},[]),h=$l({...Sp,currentStreamName:r});Ht(()=>{if(o&&o.listType!==Gi.EXISTS)if(c)h.resetFormData({...c.formData});else{const e=ci(o.option.supportedSignals);h.resetFormData({type:o.option.type,name:o.option.displayName,currentStreamName:r,disabled:!1,exportedSignals:{logs:e.includes(mo.Logs),metrics:e.includes(mo.Metrics),traces:e.includes(mo.Traces)},fields:o.dynamicFields.map(e=>({key:e.name,value:e.value}))})}},[o,c]);const m=Vt(e=>{h.resetFormData(),h.handleErrorChange(void 0,void 0,{}),a(void 0),n(e?{...e,dynamicFields:e.option?.fields?Ep(e.option.fields):[]}:null)},[]),g=Vt((e,t)=>{let o;for(const r of t){const t=r.items.find(t=>t.type===e.destinationType.type);if(t){o=t;break}}const i=qn(e.fields,{}),s={id:e.id,type:e.destinationType.type,displayName:e.name||e.destinationType.displayName,selected:!0,testConnectionSupported:o?.testConnectionSupported??!1,supportedSignals:e.destinationType.supportedSignals,fields:o?o.fields.map(e=>({...e,initialValue:i[e.name]??e.initialValue})):[]},l=Ep(s.fields);n({listType:Gi.EXISTS,option:s,dynamicFields:l}),a(void 0),h.resetFormData({type:e.destinationType.type,name:e.name||e.destinationType.displayName,currentStreamName:r,disabled:!!e.disabled,exportedSignals:{logs:!!e.exportedSignals?.logs,metrics:!!e.exportedSignals?.metrics,traces:!!e.exportedSignals?.traces},fields:l.map(e=>({key:e.name,value:e.value}))})},[r]),f=Vt(()=>{const e=$r(h.formData),t={};o?.dynamicFields.forEach(({name:r,required:o})=>{if(o){const o=e.fields.find(e=>e.key===r)?.value;Qn(o)&&(t[r]=Eo.FIELD_IS_REQUIRED)}});li(e.exportedSignals).length||(t.exportedSignals=Eo.FIELD_IS_REQUIRED);const r=0===Object.keys(t).length?void 0:"Invalid form values";return h.handleErrorChange(void 0,void 0,t),a(r),{errorMessage:r,preparedFormData:e}},[h,o]);return e(Cp.Provider,{value:{activeForm:o,onChangeActiveForm:m,loadDestination:g,genericForm:h,formErrorMessage:i,validateFormData:f,unsavedDestinations:s,thisUnsavedDestination:c,setUnsavedDestinations:l,addUnsavedDestination:d,updateUnsavedDestination:p,deleteUnsavedDestination:u},children:t})},Dp=()=>Kt(Cp),Tp={disabled:!1,ruleName:"",notes:"",workloads:null,instrumentationLibraries:null,payloadCollection:null,codeAttributes:null,headersCollection:null,customInstrumentations:null},Ip=qt(null),Np=({children:t})=>{const[r,o]=Wt(null),[n,i]=Wt(void 0),a=$l(Tp),s=Vt(e=>{a.resetFormData(),a.handleErrorChange(void 0,void 0,{}),i(void 0),o(e)},[]),l=Vt(e=>{var t;a.resetFormData((({ruleName:e,notes:t,disabled:r,workloads:o,instrumentationLibraries:n,payloadCollection:i,codeAttributes:a,headersCollection:s,customInstrumentations:l})=>({ruleName:e||"",notes:t||"",disabled:!!r,workloads:o??null,instrumentationLibraries:n??null,payloadCollection:i??null,codeAttributes:a??null,headersCollection:s??null,customInstrumentations:l??null}))(e)),a.handleErrorChange(void 0,void 0,{}),i(void 0),o((t=e.type,Ki.find(e=>e.type===t)??null))},[]),c=Vt(()=>{if(!r)return{errorMessage:"No rule type selected",preparedFormData:$r(Tp)};const e=(e=>{const t=$r(e);return t.headersCollection?.[ao.HeaderKeys]?.length&&(t.headersCollection[ao.HeaderKeys]=t.headersCollection[ao.HeaderKeys].map(e=>e.trim()).filter(e=>e)),t.customInstrumentations?.[so.Golang]?.length&&(t.customInstrumentations[so.Golang]=t.customInstrumentations[so.Golang].map(e=>new xo(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)).filter(e=>{return t=e,!!(t.packageName?.trim()||t.functionName?.trim()||t.receiverName?.trim()||t.receiverMethodName?.trim());var t})),t.customInstrumentations?.[so.Java]?.length&&(t.customInstrumentations[so.Java]=t.customInstrumentations[so.Java].map(e=>new fo(e.className,e.methodName)).filter(e=>{return t=e,!(!t.className?.trim()&&!t.methodName?.trim());var t})),t})(a.formData),t=((e,t)=>{const r={};switch(e){case no.CodeAttributes:Object.values(t.codeAttributes||{}).some(e=>null!=e)||(r.codeAttributes="Code attributes are required");break;case no.PayloadCollection:Object.values(t.payloadCollection||{}).some(e=>null!=e)||(r.payloadCollection="Payload collection are required");break;case no.HeadersCollection:t.headersCollection?.[ao.HeaderKeys]?.length||(r.headersCollection="Header keys are required");break;case no.CustomInstrumentation:{const e=t.customInstrumentations?.[so.Golang]||[],o=t.customInstrumentations?.[so.Java]||[];if(!e.length&&!o.length){r.customInstrumentations="Custom instrumentation are required";break}const n=e.findIndex(e=>!new xo(e.packageName,e.functionName,e.receiverName,e.receiverMethodName).Verify());if(-1!==n){r.customInstrumentations=`Golang probe #${n+1} is invalid: provide a package name plus either a function name OR both a receiver name and receiver method name`;break}const i=o.findIndex(e=>!new fo(e.className,e.methodName).Verify());if(-1!==i){r.customInstrumentations=`Java probe #${i+1} is invalid: both class name and method name are required`;break}break}}return r})(r.type,e);a.handleErrorChange(void 0,void 0,t);const o=Object.keys(t).length>0?"Invalid form values":void 0;return i(o),{errorMessage:o,preparedFormData:e}},[a,r]),d=Xt(()=>({selectedOption:r,onSelectOption:s,loadRule:l,genericForm:a,validateFormData:c,errorMessage:n}),[r,s,l,a,c,n]);return e(Ip.Provider,{value:d,children:t})},Rp=()=>{const e=Kt(Ip);if(!e)throw new Error("useRuleFormContext must be used within a RuleFormContextProvider");return e};function Op(e){return{name:"",notes:"",disabled:!1,ruleType:"Relevance",sourceScopes:[],operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:"",durationPreset:"500",customDurationMs:"",keepErrors:!1,percentageMode:"costReduction"===e?"sample":"all",percentagePreset:"0",customPercentage:""}}function _p(e){if(!e.sourceScopes.length)return null;const t=[];for(const r of e.sourceScopes)if("source"===r.scopeType&&r.workloadName){const e={workloadName:r.workloadName};r.workloadKind&&(e.workloadKind=r.workloadKind),r.workloadNamespace&&(e.workloadNamespace=r.workloadNamespace),t.push(e)}else"namespace"===r.scopeType&&r.workloadNamespace?t.push({workloadNamespace:r.workloadNamespace}):"language"===r.scopeType&&r.workloadLanguage&&t.push({workloadLanguage:r.workloadLanguage});return t.length?t:null}function Fp(e){return _p(e)}function Pp(e){if("all"===e.percentageMode)return null;if("custom"===e.percentagePreset){const t=parseFloat(e.customPercentage);return isNaN(t)?null:t}return parseFloat(e.percentagePreset)}function Lp(e){if("custom"===e.durationPreset){const t=parseFloat(e.customDurationMs);return isNaN(t)?null:t}return parseInt(e.durationPreset,10)}function zp(e){return{httpServer:{[e.routeType]:e.route||null,method:e.method||null}}}function Mp(e){return"all"===e.operationType?null:"httpServer"===e.operationType?zp(e):"httpClient"===e.operationType?{httpClient:{serverAddress:e.serverAddress||null,["route"===e.routeType?"templatedPath":"templatedPathPrefix"]:e.route||null,method:e.method||null}}:null}function Bp(e){return"all"===e.operationType?null:"httpServer"===e.operationType?zp(e):"kafkaConsumer"===e.operationType?{kafkaConsumer:{kafkaTopic:e.kafkaTopic||null}}:"kafkaProducer"===e.operationType?{kafkaProducer:{kafkaTopic:e.kafkaTopic||null}}:null}function Up(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:_p(e),percentageAtMost:Pp(e),operation:Mp(e)}}function jp(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:_p(e),error:e.keepErrors,durationAtLeastMs:"Duration"===e.ruleType?Lp(e):null,percentageAtLeast:Pp(e),operation:Bp(e)}}function Wp(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:_p(e),percentageAtMost:Pp(e)??0,operation:Bp(e)}}function Hp(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:Fp(e),operation:Mp(e),percentageAtMost:Pp(e),notes:e.notes||null}}function Xp(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:Fp(e),error:"Error"===e.ruleType,durationAtLeastMs:"Duration"===e.ruleType?Lp(e):null,operation:Bp(e),percentageAtLeast:Pp(e),notes:e.notes||null}}function Gp(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:Fp(e),operation:Bp(e),percentageAtMost:Pp(e)??0,notes:e.notes||null}}const Vp=["5000","1000","500","100","50"],Kp=["50","25","10","1","0.5","0.1","0"];function qp(e){if(null==e)return{percentageMode:"all",percentagePreset:"0",customPercentage:""};const t=Kp.find(t=>Number(t)===e);return t?{percentageMode:"sample",percentagePreset:t,customPercentage:""}:{percentageMode:"sample",percentagePreset:"custom",customPercentage:String(e)}}function Jp(e){if(!e)return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""};const t=e;if(t.httpServer){return{operationType:"httpServer",routeType:t.httpServer.routePrefix?"routePrefix":"route",route:t.httpServer.route||t.httpServer.routePrefix||"",serverAddress:"",method:t.httpServer.method||"",kafkaTopic:""}}return t.kafkaConsumer?{operationType:"kafkaConsumer",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:t.kafkaConsumer.kafkaTopic||""}:t.kafkaProducer?{operationType:"kafkaProducer",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:t.kafkaProducer.kafkaTopic||""}:{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""}}function Yp(e){const t=Op(),r=(o=e.rule.sourceScopes,o?.length?o.map(e=>e.workloadLanguage?{scopeType:"language",workloadName:"",workloadKind:"",workloadNamespace:"",workloadLanguage:e.workloadLanguage}:e.workloadName?{scopeType:"source",workloadName:e.workloadName,workloadKind:e.workloadKind??"",workloadNamespace:e.workloadNamespace??"",workloadLanguage:""}:e.workloadNamespace?{scopeType:"namespace",workloadName:"",workloadKind:"",workloadNamespace:e.workloadNamespace,workloadLanguage:""}:{scopeType:"all",workloadName:"",workloadKind:"",workloadNamespace:"",workloadLanguage:""}).filter(e=>"all"!==e.scopeType):[]);var o;const n=function(e){return"highlyRelevant"!==e.category?"Relevance":e.rule.error?"Error":null!=e.rule.durationAtLeastMs?"Duration":"Relevance"}(e);let i,a,s={durationPreset:"500",customDurationMs:""},l=!1;switch(e.category){case"noisy":i=function(e){const t=e.rule.operation;if(!t)return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""};if(t.httpServer)return{operationType:"httpServer",routeType:t.httpServer.routePrefix?"routePrefix":"route",route:t.httpServer.route||t.httpServer.routePrefix||"",serverAddress:"",method:t.httpServer.method||"",kafkaTopic:""};if(t.httpClient)return{operationType:"httpClient",routeType:t.httpClient.templatedPathPrefix?"routePrefix":"route",route:t.httpClient.templatedPath||t.httpClient.templatedPathPrefix||"",serverAddress:t.httpClient.serverAddress||"",method:t.httpClient.method||"",kafkaTopic:""};return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""}}(e),a=qp(e.rule.percentageAtMost);break;case"highlyRelevant":i=Jp(e.rule.operation),a=qp(e.rule.percentageAtLeast),s=function(e){if(null==e)return{durationPreset:"500",customDurationMs:""};const t=Vp.find(t=>Number(t)===e);return t?{durationPreset:t,customDurationMs:""}:{durationPreset:"custom",customDurationMs:String(e)}}(e.rule.durationAtLeastMs),l=e.rule.error;break;case"costReduction":i=Jp(e.rule.operation),a=qp(e.rule.percentageAtMost)}return{...t,name:e.rule.name||"",notes:e.rule.notes||"",disabled:e.rule.disabled,ruleType:n,sourceScopes:r,...i,...s,keepErrors:l,...a}}var Qp;!function(e){e.Default="default",e.Action="action",e.Endpoint="endpoint",e.Scope="scope",e.Duration="duration"}(Qp||(Qp={}));const Zp=[Qp.Action,Qp.Endpoint,Qp.Scope,Qp.Duration],eu=o.span`
|
|
951
|
+
`,xp={[Yr.MapItem]:hp,[Yr.NoData]:cp},yp=({trigger:e})=>{const{fitView:t}=cr(),r=Gt(!0);return Ht(()=>{r.current?r.current=!1:e>0&&requestAnimationFrame(()=>t(mp))},[e,t]),null},bp=({nodes:r,edges:o,onNodesChange:n,onEdgesChange:i,fitViewTrigger:a=0,zoomOnScroll:s=!1,onEdgeClick:l,onNodeMouseEnter:c,onNodeMouseLeave:d,onRefresh:p})=>{const{onClickNode:u}=Rl(),{setActiveNodeType:h,setActiveNodeId:m}=ji();return t(ar,{zoomOnScroll:s,nodes:r,nodeTypes:xp,edges:o,onNodeClick:u,onEdgeClick:l,onNodeMouseEnter:c,onNodeMouseLeave:d,onNodesChange:n,onEdgesChange:i,onBlur:()=>{h(null),m(null)},children:[e(yp,{trigger:a}),e(fp,{children:e(sr,{position:"bottom-right",orientation:"horizontal",showInteractive:!1,showZoom:!0,showFitView:!0,fitViewOptions:mp,children:p&&e(lr,{onClick:p,children:e(Et,{size:20})})})})]})},vp=t=>e(gp,{children:e(ir,{children:e(bp,{...t})})}),$p={type:"",disabled:!1,name:"",notes:"",signals:[],fields:{}},wp=qt(null),Sp="All row fields are required",kp="At least one row is required",Cp=Eo.LATENCY_HTTP_ROUTE,Ep=e=>"string"==typeof e?!e.trim():Qn(e),Ap=(e,t)=>!!e&&t.every(t=>{const r=e[t];return Array.isArray(r)?r.length>0:!Ep(r)}),Dp=({children:t})=>{const[r,o]=Wt(null),[n,i]=Wt(void 0),a=Dl($p),s=Vt(e=>{a.resetFormData(),a.handleErrorChange(void 0,void 0,{}),i(void 0),e?.type&&a.handleFormChange("type",e.type),o(e)},[]),l=Vt(e=>{var t;a.resetFormData((({type:e,name:t,notes:r,disabled:o,signals:n,fields:i})=>({type:e,name:t||"",notes:r||"",disabled:!!o,signals:n??[],fields:i??{}}))(e)),a.handleErrorChange(void 0,void 0,{}),i(void 0),o((t=e.type,Wi.find(e=>e.type===t)??Hi.find(e=>e.type===t)??null))},[]),c=Vt(()=>{if(!r)return{errorMessage:"No action type selected",preparedFormData:$r($p)};const e=(e=>{const t=$r(e),r=t.fields||{},o=r[Tr.UrlTemplatizationRulesGroups];o?.length&&(r[Tr.UrlTemplatizationRulesGroups]=o.map(e=>({...e,templatizationRules:(e.templatizationRules||[]).filter(e=>!!e.template?.trim())})));const n=r[Tr.AttributeNamesToDelete];n?.length&&(r[Tr.AttributeNamesToDelete]=n.filter(e=>!!e?.trim()));const i=r[Tr.Renames];return i&&(r[Tr.Renames]=Object.fromEntries(Object.entries(i).filter(([e,t])=>!!e?.trim()&&!!t?.trim()))),t.fields=r,t})(a.formData),t={};Qn(e.signals)&&(t.signals=Eo.FIELD_IS_REQUIRED),r.type&&Object.assign(t,((e,t,r)=>{const o={},n=t.fields||{},i=r.fields||{};switch(e){case Dr.K8sAttributes:{const e=!(n[Tr.CollectContainerAttributes]||n[Tr.CollectReplicaSetAttributes]||n[Tr.CollectWorkloadId]||n[Tr.CollectClusterId]),t=!n[Tr.LabelsAttributes]?.length,r=!n[Tr.AnnotationsAttributes]?.length;e&&t&&r&&(o[Tr.CollectContainerAttributes]="Enable at least one option or add a label/annotation row");const i=n[Tr.LabelsAttributes];i?.some(e=>!Ap(e,["labelKey","attributeKey","fromSources"]))&&(o[Tr.LabelsAttributes]=Sp);const a=n[Tr.AnnotationsAttributes];a?.some(e=>!Ap(e,["annotationKey","attributeKey","fromSources"]))&&(o[Tr.AnnotationsAttributes]=Sp);break}case Dr.AddClusterInfo:{const e=n[Tr.ClusterAttributes];e?.length?e.some(e=>!Ap(e,["attributeName","attributeStringValue"]))&&(o[Tr.ClusterAttributes]=Sp):o[Tr.ClusterAttributes]=kp;break}case Dr.DeleteAttributes:{const e=i[Tr.AttributeNamesToDelete]||[],t=n[Tr.AttributeNamesToDelete]||[];t.length?e.length>t.length&&(o[Tr.AttributeNamesToDelete]=Sp):o[Tr.AttributeNamesToDelete]=e.length?Sp:kp;break}case Dr.RenameAttributes:{const e=Object.entries(i[Tr.Renames]||{}),t=Object.entries(n[Tr.Renames]||{}),r=e.some(([e,t])=>!e?.trim()||!t?.trim());t.length?r&&(o[Tr.Renames]=Sp):o[Tr.Renames]=e.length?Sp:kp;break}case Dr.PiiMasking:{const e=n[Tr.PiiCategories];e?.length||(o[Tr.PiiCategories]="Select at least one attribute to mask");break}case Dr.ErrorSampler:Ep(n[Tr.FallbackSamplingRatio])&&(o[Tr.FallbackSamplingRatio]=Eo.FIELD_IS_REQUIRED);break;case Dr.ProbabilisticSampler:Ep(n[Tr.SamplingPercentage])&&(o[Tr.SamplingPercentage]=Eo.FIELD_IS_REQUIRED);break;case Dr.LatencySampler:{const e=n[Tr.EndpointsFilters];e?.length?e.some(e=>!Ap(e,["serviceName","httpRoute","minimumLatencyThreshold","fallbackSamplingRatio"]))?o[Tr.EndpointsFilters]=Sp:e.some(e=>!!e.httpRoute&&!e.httpRoute.startsWith("/"))&&(o[Tr.EndpointsFilters]=Cp):o[Tr.EndpointsFilters]=kp;break}case Dr.ServiceNameSampler:{const e=n[Tr.ServicesNameFilters];e?.length?e.some(e=>!Ap(e,["serviceName","samplingRatio","fallbackSamplingRatio"]))&&(o[Tr.ServicesNameFilters]=Sp):o[Tr.ServicesNameFilters]=kp;break}case Dr.SpanAttributeSampler:{const e=n[Tr.AttributeFilters],t=["stringCondition","numberCondition","booleanCondition","jsonCondition"],r=new Set(["exists","is_valid_json","is_invalid_json","jsonpath_exists"]);e?.length?e.some(e=>{if(!Ap(e,["serviceName","attributeKey","fallbackSamplingRatio"]))return!0;const o=e.condition||{},n=t.find(e=>!!o[e]);if(!n)return!0;const i=o[n]||{},a=i.operation;return!a||!(r.has(a)||!Ep(i.expectedValue))})&&(o[Tr.AttributeFilters]=Sp):o[Tr.AttributeFilters]=kp;break}case Dr.URLTemplatization:{const e=n[Tr.UrlTemplatizationRulesGroups];(!e?.length||e.some(e=>!e.templatizationRules?.length))&&(o[Tr.UrlTemplatizationRulesGroups]="Each rule group needs at least one non-blank template");break}}return o})(r.type,e,a.formData)),a.handleErrorChange(void 0,void 0,t);const o=Object.keys(t).length>0?"Invalid form values":void 0;return i(o),{errorMessage:o,preparedFormData:e}},[a,r]),d=Xt(()=>({selectedOption:r,onSelectOption:s,loadAction:l,genericForm:a,validateFormData:c,errorMessage:n}),[r,s,l,a,c,n]);return e(wp.Provider,{value:d,children:t})},Tp=()=>{const e=Kt(wp);if(!e)throw new Error("useActionFormContext must be used within an ActionFormContextProvider");return e},Ip={type:"",name:"",currentStreamName:"",disabled:!1,exportedSignals:{logs:!1,metrics:!1,traces:!1},fields:[]},Np={activeForm:null,onChangeActiveForm:()=>{},loadDestination:()=>{},genericForm:void 0,formErrorMessage:void 0,validateFormData:()=>({isOk:!1,preparedFormData:$r(Ip)}),unsavedDestinations:[],thisUnsavedDestination:void 0,setUnsavedDestinations:()=>{},addUnsavedDestination:()=>{},updateUnsavedDestination:()=>{},deleteUnsavedDestination:()=>{}},Rp=qt(Np),Op=e=>e.filter(e=>!!e).map(e=>{const{name:t,componentType:r,componentProperties:o,displayName:n,initialValue:i,renderCondition:a}=e,s=r===Hr.Dropdown,l=qn(o,{});return{componentType:r,renderCondition:a,name:t,title:n,value:i,placeholder:l.placeholder||(s?"Select an option":void 0),options:s&&Array.isArray(l.values)?l.values.map(e=>({id:e,value:e})):void 0,...l}}),_p=({children:t})=>{const{selectedStreamName:r}=Vs(),[o,n]=Wt(null),[i,a]=Wt(),[s,l]=Wt(Np.unsavedDestinations),c=Xt(()=>"number"==typeof o?.unsavedIdx?s[o.unsavedIdx]:void 0,[o,s]),d=Vt((e,t)=>{o&&(l(t=>[...t,{...e,option:o.option}]),n(t?e=>e?{...e,listType:Gi.UNSAVED,unsavedIdx:s.length}:null:null))},[o,s.length]),p=Vt((e,t,r)=>{o&&(l(r=>r.map((r,n)=>n===e?{...r,...t,option:o.option}:r)),n(r?e=>e?{...e,listType:Gi.UNSAVED}:null:null))},[o]),u=Vt(e=>{l(t=>t.filter((t,r)=>r!==e)),n(null)},[]),h=Dl({...Ip,currentStreamName:r});Ht(()=>{if(o&&o.listType!==Gi.EXISTS)if(c)h.resetFormData({...c.formData});else{const e=ci(o.option.supportedSignals);h.resetFormData({type:o.option.type,name:o.option.displayName,currentStreamName:r,disabled:!1,exportedSignals:{logs:e.includes(mo.Logs),metrics:e.includes(mo.Metrics),traces:e.includes(mo.Traces)},fields:o.dynamicFields.map(e=>({key:e.name,value:e.value}))})}},[o,c]);const m=Vt(e=>{h.resetFormData(),h.handleErrorChange(void 0,void 0,{}),a(void 0),n(e?{...e,dynamicFields:e.option?.fields?Op(e.option.fields):[]}:null)},[]),g=Vt((e,t)=>{let o;for(const r of t){const t=r.items.find(t=>t.type===e.destinationType.type);if(t){o=t;break}}const i=qn(e.fields,{}),s={id:e.id,type:e.destinationType.type,displayName:e.name||e.destinationType.displayName,selected:!0,testConnectionSupported:o?.testConnectionSupported??!1,supportedSignals:e.destinationType.supportedSignals,fields:o?o.fields.map(e=>({...e,initialValue:i[e.name]??e.initialValue})):[]},l=Op(s.fields);n({listType:Gi.EXISTS,option:s,dynamicFields:l}),a(void 0),h.resetFormData({type:e.destinationType.type,name:e.name||e.destinationType.displayName,currentStreamName:r,disabled:!!e.disabled,exportedSignals:{logs:!!e.exportedSignals?.logs,metrics:!!e.exportedSignals?.metrics,traces:!!e.exportedSignals?.traces},fields:l.map(e=>({key:e.name,value:e.value}))})},[r]),f=Vt(()=>{const e=$r(h.formData),t={};o?.dynamicFields.forEach(({name:r,required:o})=>{if(o){const o=e.fields.find(e=>e.key===r)?.value;Qn(o)&&(t[r]=Eo.FIELD_IS_REQUIRED)}});li(e.exportedSignals).length||(t.exportedSignals=Eo.FIELD_IS_REQUIRED);const r=0===Object.keys(t).length?void 0:"Invalid form values";return h.handleErrorChange(void 0,void 0,t),a(r),{errorMessage:r,preparedFormData:e}},[h,o]);return e(Rp.Provider,{value:{activeForm:o,onChangeActiveForm:m,loadDestination:g,genericForm:h,formErrorMessage:i,validateFormData:f,unsavedDestinations:s,thisUnsavedDestination:c,setUnsavedDestinations:l,addUnsavedDestination:d,updateUnsavedDestination:p,deleteUnsavedDestination:u},children:t})},Fp=()=>Kt(Rp),Pp={disabled:!1,ruleName:"",notes:"",workloads:null,instrumentationLibraries:null,payloadCollection:null,codeAttributes:null,headersCollection:null,customInstrumentations:null},Lp=qt(null),zp=({children:t})=>{const[r,o]=Wt(null),[n,i]=Wt(void 0),a=Dl(Pp),s=Vt(e=>{a.resetFormData(),a.handleErrorChange(void 0,void 0,{}),i(void 0),o(e)},[]),l=Vt(e=>{var t;a.resetFormData((({ruleName:e,notes:t,disabled:r,workloads:o,instrumentationLibraries:n,payloadCollection:i,codeAttributes:a,headersCollection:s,customInstrumentations:l})=>({ruleName:e||"",notes:t||"",disabled:!!r,workloads:o??null,instrumentationLibraries:n??null,payloadCollection:i??null,codeAttributes:a??null,headersCollection:s??null,customInstrumentations:l??null}))(e)),a.handleErrorChange(void 0,void 0,{}),i(void 0),o((t=e.type,Ki.find(e=>e.type===t)??null))},[]),c=Vt(()=>{if(!r)return{errorMessage:"No rule type selected",preparedFormData:$r(Pp)};const e=(e=>{const t=$r(e);return t.headersCollection?.[ao.HeaderKeys]?.length&&(t.headersCollection[ao.HeaderKeys]=t.headersCollection[ao.HeaderKeys].map(e=>e.trim()).filter(e=>e)),t.customInstrumentations?.[so.Golang]?.length&&(t.customInstrumentations[so.Golang]=t.customInstrumentations[so.Golang].map(e=>new xo(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)).filter(e=>{return t=e,!!(t.packageName?.trim()||t.functionName?.trim()||t.receiverName?.trim()||t.receiverMethodName?.trim());var t})),t.customInstrumentations?.[so.Java]?.length&&(t.customInstrumentations[so.Java]=t.customInstrumentations[so.Java].map(e=>new fo(e.className,e.methodName)).filter(e=>{return t=e,!(!t.className?.trim()&&!t.methodName?.trim());var t})),t})(a.formData),t=((e,t)=>{const r={};switch(e){case no.CodeAttributes:Object.values(t.codeAttributes||{}).some(e=>null!=e)||(r.codeAttributes="Code attributes are required");break;case no.PayloadCollection:Object.values(t.payloadCollection||{}).some(e=>null!=e)||(r.payloadCollection="Payload collection are required");break;case no.HeadersCollection:t.headersCollection?.[ao.HeaderKeys]?.length||(r.headersCollection="Header keys are required");break;case no.CustomInstrumentation:{const e=t.customInstrumentations?.[so.Golang]||[],o=t.customInstrumentations?.[so.Java]||[];if(!e.length&&!o.length){r.customInstrumentations="Custom instrumentation are required";break}const n=e.findIndex(e=>!new xo(e.packageName,e.functionName,e.receiverName,e.receiverMethodName).Verify());if(-1!==n){r.customInstrumentations=`Golang probe #${n+1} is invalid: provide a package name plus either a function name OR both a receiver name and receiver method name`;break}const i=o.findIndex(e=>!new fo(e.className,e.methodName).Verify());if(-1!==i){r.customInstrumentations=`Java probe #${i+1} is invalid: both class name and method name are required`;break}break}}return r})(r.type,e);a.handleErrorChange(void 0,void 0,t);const o=Object.keys(t).length>0?"Invalid form values":void 0;return i(o),{errorMessage:o,preparedFormData:e}},[a,r]),d=Xt(()=>({selectedOption:r,onSelectOption:s,loadRule:l,genericForm:a,validateFormData:c,errorMessage:n}),[r,s,l,a,c,n]);return e(Lp.Provider,{value:d,children:t})},Mp=()=>{const e=Kt(Lp);if(!e)throw new Error("useRuleFormContext must be used within a RuleFormContextProvider");return e};function Bp(e){return{name:"",notes:"",disabled:!1,ruleType:"Relevance",sourceScopes:[],operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:"",durationPreset:"500",customDurationMs:"",keepErrors:!1,percentageMode:"costReduction"===e?"sample":"all",percentagePreset:"0",customPercentage:""}}function Up(e){if(!e.sourceScopes.length)return null;const t=[];for(const r of e.sourceScopes)if("source"===r.scopeType&&r.workloadName){const e={workloadName:r.workloadName};r.workloadKind&&(e.workloadKind=r.workloadKind),r.workloadNamespace&&(e.workloadNamespace=r.workloadNamespace),t.push(e)}else"namespace"===r.scopeType&&r.workloadNamespace?t.push({workloadNamespace:r.workloadNamespace}):"language"===r.scopeType&&r.workloadLanguage&&t.push({workloadLanguage:r.workloadLanguage});return t.length?t:null}function jp(e){return Up(e)}function Wp(e){if("all"===e.percentageMode)return null;if("custom"===e.percentagePreset){const t=parseFloat(e.customPercentage);return isNaN(t)?null:t}return parseFloat(e.percentagePreset)}function Hp(e){if("custom"===e.durationPreset){const t=parseFloat(e.customDurationMs);return isNaN(t)?null:t}return parseInt(e.durationPreset,10)}function Xp(e){return{httpServer:{[e.routeType]:e.route||null,method:e.method||null}}}function Gp(e){return"all"===e.operationType?null:"httpServer"===e.operationType?Xp(e):"httpClient"===e.operationType?{httpClient:{serverAddress:e.serverAddress||null,["route"===e.routeType?"templatedPath":"templatedPathPrefix"]:e.route||null,method:e.method||null}}:null}function Vp(e){return"all"===e.operationType?null:"httpServer"===e.operationType?Xp(e):"kafkaConsumer"===e.operationType?{kafkaConsumer:{kafkaTopic:e.kafkaTopic||null}}:"kafkaProducer"===e.operationType?{kafkaProducer:{kafkaTopic:e.kafkaTopic||null}}:null}function Kp(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:Up(e),percentageAtMost:Wp(e),operation:Gp(e)}}function qp(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:Up(e),error:e.keepErrors,durationAtLeastMs:"Duration"===e.ruleType?Hp(e):null,percentageAtLeast:Wp(e),operation:Vp(e)}}function Jp(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:Up(e),percentageAtMost:Wp(e)??0,operation:Vp(e)}}function Yp(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:jp(e),operation:Gp(e),percentageAtMost:Wp(e),notes:e.notes||null}}function Qp(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:jp(e),error:"Error"===e.ruleType,durationAtLeastMs:"Duration"===e.ruleType?Hp(e):null,operation:Vp(e),percentageAtLeast:Wp(e),notes:e.notes||null}}function Zp(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:jp(e),operation:Vp(e),percentageAtMost:Wp(e)??0,notes:e.notes||null}}const eu=["5000","1000","500","100","50"],tu=["50","25","10","1","0.5","0.1","0"];function ru(e){if(null==e)return{percentageMode:"all",percentagePreset:"0",customPercentage:""};const t=tu.find(t=>Number(t)===e);return t?{percentageMode:"sample",percentagePreset:t,customPercentage:""}:{percentageMode:"sample",percentagePreset:"custom",customPercentage:String(e)}}function ou(e){if(!e)return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""};const t=e;if(t.httpServer){return{operationType:"httpServer",routeType:t.httpServer.routePrefix?"routePrefix":"route",route:t.httpServer.route||t.httpServer.routePrefix||"",serverAddress:"",method:t.httpServer.method||"",kafkaTopic:""}}return t.kafkaConsumer?{operationType:"kafkaConsumer",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:t.kafkaConsumer.kafkaTopic||""}:t.kafkaProducer?{operationType:"kafkaProducer",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:t.kafkaProducer.kafkaTopic||""}:{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""}}function nu(e){const t=Bp(),r=(o=e.rule.sourceScopes,o?.length?o.map(e=>e.workloadLanguage?{scopeType:"language",workloadName:"",workloadKind:"",workloadNamespace:"",workloadLanguage:e.workloadLanguage}:e.workloadName?{scopeType:"source",workloadName:e.workloadName,workloadKind:e.workloadKind??"",workloadNamespace:e.workloadNamespace??"",workloadLanguage:""}:e.workloadNamespace?{scopeType:"namespace",workloadName:"",workloadKind:"",workloadNamespace:e.workloadNamespace,workloadLanguage:""}:{scopeType:"all",workloadName:"",workloadKind:"",workloadNamespace:"",workloadLanguage:""}).filter(e=>"all"!==e.scopeType):[]);var o;const n=function(e){return"highlyRelevant"!==e.category?"Relevance":e.rule.error?"Error":null!=e.rule.durationAtLeastMs?"Duration":"Relevance"}(e);let i,a,s={durationPreset:"500",customDurationMs:""},l=!1;switch(e.category){case"noisy":i=function(e){const t=e.rule.operation;if(!t)return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""};if(t.httpServer)return{operationType:"httpServer",routeType:t.httpServer.routePrefix?"routePrefix":"route",route:t.httpServer.route||t.httpServer.routePrefix||"",serverAddress:"",method:t.httpServer.method||"",kafkaTopic:""};if(t.httpClient)return{operationType:"httpClient",routeType:t.httpClient.templatedPathPrefix?"routePrefix":"route",route:t.httpClient.templatedPath||t.httpClient.templatedPathPrefix||"",serverAddress:t.httpClient.serverAddress||"",method:t.httpClient.method||"",kafkaTopic:""};return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""}}(e),a=ru(e.rule.percentageAtMost);break;case"highlyRelevant":i=ou(e.rule.operation),a=ru(e.rule.percentageAtLeast),s=function(e){if(null==e)return{durationPreset:"500",customDurationMs:""};const t=eu.find(t=>Number(t)===e);return t?{durationPreset:t,customDurationMs:""}:{durationPreset:"custom",customDurationMs:String(e)}}(e.rule.durationAtLeastMs),l=e.rule.error;break;case"costReduction":i=ou(e.rule.operation),a=ru(e.rule.percentageAtMost)}return{...t,name:e.rule.name||"",notes:e.rule.notes||"",disabled:e.rule.disabled,ruleType:n,sourceScopes:r,...i,...s,keepErrors:l,...a}}var iu;!function(e){e.Default="default",e.Action="action",e.Endpoint="endpoint",e.Scope="scope",e.Duration="duration"}(iu||(iu={}));const au=[iu.Action,iu.Endpoint,iu.Scope,iu.Duration],su=o.span`
|
|
952
952
|
font-family: ${({theme:e,$isMono:t})=>t?e.font_family.secondary:e.font_family.primary};
|
|
953
953
|
font-size: ${({theme:e})=>e.v2.text.size.xxs}px;
|
|
954
954
|
line-height: 20px;
|
|
955
955
|
color: ${({theme:e,$variant:t})=>{const r=e.v2.colors;switch(t){case"action":return r.green[400];case"endpoint":return r.purple[300];case"scope":return r.yellow[400];case"duration":return r.orange[600];default:return r.white[500]}}};
|
|
956
|
-
`,
|
|
956
|
+
`,lu=o.span`
|
|
957
957
|
display: inline;
|
|
958
958
|
cursor: help;
|
|
959
959
|
text-decoration: underline dotted;
|
|
960
960
|
text-underline-offset: 3px;
|
|
961
|
-
`,
|
|
961
|
+
`,cu=o.div`
|
|
962
962
|
display: flex;
|
|
963
963
|
flex-direction: column;
|
|
964
964
|
gap: 4px;
|
|
@@ -966,13 +966,13 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
966
966
|
border-radius: 4px;
|
|
967
967
|
padding: 8px;
|
|
968
968
|
max-width: 300px;
|
|
969
|
-
`,ou=({items:r,children:o})=>{const{popupRef:n,popupOpen:i,setPopupOpen:a,popupPosition:s,handlePosition:l}=Bl({positionMode:"viewport",defaultClientHeight:48,defaultClientwidth:240}),c=e=>{l(e.clientX,e.clientY),a("mouseleave"!==e.type)};return t(tu,{onMouseEnter:c,onMouseMove:c,onMouseLeave:c,children:[o,e(yc,{ref:n,isOpen:i,top:s.top,left:s.left,asPortal:!0,style:{backgroundColor:"transparent",border:"none"},borderRadius:"0",padding:"0",maxWidth:"300px",children:e(ru,{children:r.map((t,r)=>e(cn,{size:sn.XXXS,children:t},r))})})]})},nu=({parts:o})=>e(r,{children:o.map((o,n)=>{const i=e(eu,{$variant:o.variant,$isMono:Zp.includes(o.variant),children:o.text});return t(jt,{children:[0!==n&&e(r,{children:" "}),o.tooltipItems?.length?e(ou,{items:o.tooltipItems,children:i}):i]},`${o.variant}-${n}`)})});var iu;!function(e){e.Noisy="noisy",e.HighlyRelevant="highly-relevant",e.CostReduction="cost-reduction"}(iu||(iu={}));const au=[{value:iu.Noisy,label:"1. Noisy Operations",tooltip:"Rules that reduce noise from high-volume, low-value operations"},{value:iu.HighlyRelevant,label:"2. Highly Relevant Operations",tooltip:"Rules that prioritize important traces for retention"},{value:iu.CostReduction,label:"3. Cost Reduction",tooltip:"Rules that optimize costs by sampling less critical data"}],su={[iu.Noisy]:"This is the most efficient way to sample (with Head Sampling). Prefer to use it where possible.",[iu.HighlyRelevant]:'Any trace from the "Noisy Operations" category is sampled prior to checking highly relevance.',[iu.CostReduction]:"Cost reduction rules use Tail Sampling to drop traces that are unlikely to be useful for debugging or monitoring."},lu={[iu.Noisy]:"Noisy Operations rules list",[iu.HighlyRelevant]:"Highly Relevant Operations rules list",[iu.CostReduction]:"Cost Reduction rules list"},cu={[iu.Noisy]:"noisy",[iu.HighlyRelevant]:"highlyRelevant",[iu.CostReduction]:"costReduction"};function du(e){if(e.workloadName){const t=e.workloadKind?.toLowerCase()||"deployment";return e.workloadNamespace?`${t} '${e.workloadName}' in namespace '${e.workloadNamespace}'`:`${t} '${e.workloadName}'`}return e.workloadNamespace?`namespace '${e.workloadNamespace}'`:e.workloadLanguage?`${e.workloadLanguage} services`:""}function pu(e){if(!e?.length)return[{text:" for ",variant:Qp.Default},{text:"entire cluster",variant:Qp.Scope}];const t=e.map(du).filter(Boolean);if(!t.length)return[{text:" for ",variant:Qp.Default},{text:"entire cluster",variant:Qp.Scope}];const r=[{text:" for ",variant:Qp.Default}],o=t.slice(0,2),n=t.slice(2);return o.forEach((e,t)=>{t>0&&r.push({text:", ",variant:Qp.Default}),r.push({text:e,variant:Qp.Scope})}),n.length>0&&r.push({text:` + ${n.length} more`,variant:Qp.Default,tooltipItems:n}),r}function uu(e,t){if(!e)return[];const r=(o=e).startsWith("/")?o.slice(1):o;var o;const n=[{text:" starting at ",variant:Qp.Default}];return t?n.push({text:`${t} /${r}`,variant:Qp.Endpoint}):n.push({text:`endpoint /${r}`,variant:Qp.Endpoint}),n}function hu(e){const t=[];if(null!=e.percentageAtMost?(t.push({text:`Drop ${100-e.percentageAtMost}%`,variant:Qp.Action}),t.push({text:" of traces",variant:Qp.Default})):t.push({text:"Drop all traces",variant:Qp.Action}),e.operation){const r=e.operation.httpServer?.route||e.operation.httpServer?.routePrefix,o=e.operation.httpServer?.method||e.operation.httpClient?.method;t.push(...uu(r,o));const n=e.operation.httpClient,i=n?.templatedPath||n?.templatedPathPrefix,a=n?.serverAddress;if((i||a)&&!r){const e=i&&a?`${a}/${i}`:i||a;t.push({text:" to ",variant:Qp.Default}),o?t.push({text:`${o} /${e}`,variant:Qp.Endpoint}):t.push({text:`/${e}`,variant:Qp.Endpoint})}}else t.push({text:" on ",variant:Qp.Default}),t.push({text:"any operation",variant:Qp.Endpoint});return t.push(...pu(e.sourceScopes)),t}function mu(e){const t=[];if(null!=e.percentageAtLeast?(t.push({text:`Keep at least ${e.percentageAtLeast}%`,variant:Qp.Action}),t.push({text:" of traces",variant:Qp.Default})):t.push({text:"Keep all traces",variant:Qp.Action}),e.operation){const r=e.operation.httpServer?.route||e.operation.httpServer?.routePrefix,o=e.operation.httpServer?.method;t.push(...uu(r,o))}else t.push({text:" on ",variant:Qp.Default}),t.push({text:"any operation",variant:Qp.Endpoint});return t.push(...pu(e.sourceScopes)),!e.error&&null!=e.durationAtLeastMs&&e.durationAtLeastMs>0&&(t.push({text:" with duration > ",variant:Qp.Default}),t.push({text:`${e.durationAtLeastMs}ms`,variant:Qp.Duration})),t}function gu(e){const t=[];if(t.push({text:`Drop ${e.percentageAtMost}%`,variant:Qp.Action}),t.push({text:" of traces",variant:Qp.Default}),e.operation){const r=e.operation.httpServer?.route||e.operation.httpServer?.routePrefix,o=e.operation.httpServer?.method;t.push(...uu(r,o));const n=e.operation.kafkaConsumer?.kafkaTopic;n&&!r&&(t.push({text:" from ",variant:Qp.Default}),t.push({text:`topic '${n}'`,variant:Qp.Endpoint}))}else t.push({text:" on ",variant:Qp.Default}),t.push({text:"any operation",variant:Qp.Endpoint});return t.push(...pu(e.sourceScopes)),t}function fu(e){return e.error?"Error":null!=e.durationAtLeastMs?"Duration":"Relevance"}function xu(e,t,r){const o=cu[t],n=[];for(const i of e)switch(t){case iu.Noisy:for(const e of i.noisyOperations)r?.has(e.ruleId)||n.push({ruleId:e.ruleId,samplingId:i.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:hu(e),category:o});break;case iu.HighlyRelevant:for(const e of i.highlyRelevantOperations)r?.has(e.ruleId)||n.push({ruleId:e.ruleId,samplingId:i.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:mu(e),category:o,typeBadge:fu(e)});break;case iu.CostReduction:for(const e of i.costReductionRules)r?.has(e.ruleId)||n.push({ruleId:e.ruleId,samplingId:i.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:gu(e),category:o})}return n}function yu(e,t){switch(e){case"noisy":return hu(t);case"highlyRelevant":return mu(t);case"costReduction":return gu(t)}}function bu(e,t,r,o){for(const n of e)if(n.id===t)switch(o){case"noisy":{const e=n.noisyOperations.find(e=>e.ruleId===r);if(e)return{category:"noisy",samplingId:n.id,rule:e};break}case"highlyRelevant":{const e=n.highlyRelevantOperations.find(e=>e.ruleId===r);if(e)return{category:"highlyRelevant",samplingId:n.id,rule:e};break}case"costReduction":{const e=n.costReductionRules.find(e=>e.ruleId===r);if(e)return{category:"costReduction",samplingId:n.id,rule:e};break}}return null}function vu(e,t){const r=bu(e,t.samplingId,t.rule.ruleId,t.category);return r?{...r,summary:yu(r.category,r.rule)}:null}function $u(e,t){const r=bu(e,t.samplingId,t.ruleId,t.category);return r?{...r,summary:t.summary}:null}function wu(e){return null==e||Array.isArray(e)&&0===e.length?null:e}function Su(e,t){return JSON.stringify({sourceScopes:wu(e),operation:wu(t)})}function ku(e,t,r,o){return JSON.stringify({sourceScopes:wu(e),error:t??!1,durationAtLeastMs:wu(r),operation:wu(o)})}function Cu(e,t){return JSON.stringify({sourceScopes:wu(e),operation:wu(t)})}function Eu(e,t,r,o){switch(t){case"noisy":{const t=Su(r.sourceScopes,r.operation);for(const r of e)for(const e of r.noisyOperations)if((!o||e.ruleId!==o)&&Su(e.sourceScopes,e.operation)===t)return e.ruleId;return null}case"highlyRelevant":{const t=ku(r.sourceScopes,r.error,r.durationAtLeastMs,r.operation);for(const r of e)for(const e of r.highlyRelevantOperations)if((!o||e.ruleId!==o)&&ku(e.sourceScopes,e.error,e.durationAtLeastMs,e.operation)===t)return e.ruleId;return null}case"costReduction":{const t=Cu(r.sourceScopes,r.operation);for(const r of e)for(const e of r.costReductionRules)if((!o||e.ruleId!==o)&&Cu(e.sourceScopes,e.operation)===t)return e.ruleId;return null}}}function Au(e){if(!e||!e.enabled)return[{text:"Auto rule is ",variant:Qp.Default},{text:"disabled",variant:Qp.Action}];return[{text:`Keep ${e.keepPercentage??0}%`,variant:Qp.Action},{text:" of ",variant:Qp.Default},{text:"traces for kubelet health probes in the entire cluster",variant:Qp.Scope}]}function Du(e){return!(!0!==e.error||e.sourceScopes&&0!==e.sourceScopes.length||e.operation||null!=e.percentageAtLeast&&100!==e.percentageAtLeast)}function Tu(e){for(const t of e){const e=t.highlyRelevantOperations.find(Du);if(e)return{rule:e,samplingId:t.id}}return null}function Iu(e){return!e||e.disabled?[{text:"Auto rule is ",variant:Qp.Default},{text:"disabled",variant:Qp.Action}]:[{text:"Keep 100%",variant:Qp.Action},{text:" of ",variant:Qp.Default},{text:"error traces across the entire cluster",variant:Qp.Scope}]}function Nu(e){return!(e.sourceScopes&&0!==e.sourceScopes.length||e.operation)}function Ru(e){for(const t of e){const e=t.costReductionRules.find(Nu);if(e)return{rule:e,samplingId:t.id}}return null}function Ou(e){return!e||e.disabled?[{text:" is ",variant:Qp.Default},{text:"disabled",variant:Qp.Action}]:[{text:`Drop ${e.percentageAtMost}%`,variant:Qp.Action},{text:" of ",variant:Qp.Default},{text:"traces across the entire cluster",variant:Qp.Scope}]}var _u;!function(e){e.Create="create",e.View="view",e.EditAutoNoisy="edit-auto-noisy",e.EditAutoCostReduction="edit-auto-cost-reduction",e.EditAutoHighlyRelevant="edit-auto-highly-relevant"}(_u||(_u={}));const Fu=qt(null),Pu=["50","25","10","1","0"];function Lu(e){const t=String(e);return Pu.includes(t)?t:"custom"}const zu=({category:t,sourceOptions:r=[],namespaceOptions:o=[],children:n})=>{const{formData:i,handleFormChange:a,resetFormData:s}=$l(Op(t)),[l,c]=Wt(null);Ht(()=>{s(Op(t)),c(null)},[t]);const d=Vt(e=>{c(null),a(void 0,void 0,{...i,...e})},[i,a]),p=Vt(()=>{s(Op(t)),c(null)},[t,s]),u=Xt(()=>({formType:_u.Create,category:t,formData:i,handleChange:d,resetForm:p,duplicateWarning:l,setDuplicateWarning:c,sourceOptions:r,namespaceOptions:o}),[t,i,d,p,l,r,o]);return e(Fu.Provider,{value:u,children:n})},Mu=({data:t,defaultEditMode:r,sourceOptions:o=[],namespaceOptions:n=[],children:i})=>{const[a,s]=Wt(!1),{formData:l,handleFormChange:c,resetFormData:d}=$l(void 0),p=Gt(null),[u,h]=Wt(null);Ht(()=>{t!==p.current&&(p.current=t,t&&r?(d(Yp(t)),h(null),s(!0)):(s(!1),h(null)))},[t,r]);const m=Vt(e=>{h(null),c(void 0,void 0,{...l,...e})},[l,c]),g=Vt(()=>{t&&(d(Yp(t)),h(null),s(!0))},[t,d]),f=Vt(()=>{s(!1),h(null)},[]),x=Xt(()=>({formType:_u.View,data:t,isEditing:a,formData:l,handleChange:m,handleEdit:g,handleCancelEdit:f,duplicateWarning:u,setDuplicateWarning:h,sourceOptions:o,namespaceOptions:n}),[t,a,l,m,g,f,u,o,n]);return e(Fu.Provider,{value:x,children:i})};function Bu(e){const[t,r]=Wt(()=>Lu(e)),[o,n]=Wt(()=>"custom"===Lu(e)?String(e):"");Ht(()=>{const t=Lu(e);r(t),n("custom"===t?String(e):"")},[e]);const i=Xt(()=>"custom"===t?Number(o)||0:Number(t),[t,o]);return{percentagePreset:t,setPercentagePreset:r,customPercentage:o,setCustomPercentage:n,resolvedPercentage:i}}const Uu=({enabled:t,keepPercentage:r,children:o})=>{const[n,i]=Wt(t),a=Bu(r);Ht(()=>{i(t)},[t]);const s=Xt(()=>Au({enabled:n,keepPercentage:a.resolvedPercentage}),[n,a.resolvedPercentage]),l=Xt(()=>({formType:_u.EditAutoNoisy,localEnabled:n,setLocalEnabled:i,...a,summary:s}),[n,a,s]);return e(Fu.Provider,{value:l,children:o})},ju=({enabled:t,dropPercentage:r,children:o})=>{const[n,i]=Wt(t),a=Bu(r);Ht(()=>{i(t)},[t]);const s=Xt(()=>Ou(n?{disabled:!1,percentageAtMost:a.resolvedPercentage}:null),[n,a.resolvedPercentage]),l=Xt(()=>({formType:_u.EditAutoCostReduction,localEnabled:n,setLocalEnabled:i,...a,summary:s}),[n,a,s]);return e(Fu.Provider,{value:l,children:o})},Wu=({enabled:t,children:r})=>{const[o,n]=Wt(t);Ht(()=>{n(t)},[t]);const i=Xt(()=>Iu(o?{disabled:!1}:null),[o]),a=Xt(()=>({formType:_u.EditAutoHighlyRelevant,localEnabled:o,setLocalEnabled:n,summary:i}),[o,i]);return e(Fu.Provider,{value:a,children:r})},Hu=t=>{switch(t.formType){case _u.Create:return e(zu,{...t});case _u.View:return e(Mu,{...t});case _u.EditAutoNoisy:return e(Uu,{...t});case _u.EditAutoCostReduction:return e(ju,{...t});case _u.EditAutoHighlyRelevant:return e(Wu,{...t})}};function Xu(e){const t=Kt(Fu);if(!t)throw new Error("useSamplingRulesFormContext must be used within a SamplingRulesFormProvider");if(e&&t.formType!==e)throw new Error(`Expected formType "${e}" but found "${t.formType}"`);return t}const Gu=qt({snapshots:null,setSnapshots:()=>{},isFetching:!1,setIsFetching:()=>{},formData:[],handleSourceChange:()=>{},handleSelectAll:()=>{},formDiff:{},isFormDirty:!1}),Vu=({children:t,selectedConnectionIds:r,initialInputs:o})=>{const{tier:n}=Vl(),i=n===Lr.Onprem,{selectedStreamName:a}=Bs(),[s,l]=Wt(!1),[c,d]=Wt(null),[p,u]=Wt([]);Ht(()=>{c&&u(e=>{const t=((e,t)=>$r(((e,t)=>e.clusters.filter(({clusterId:e})=>!t||t.includes(e)))(e,t)))(c,r);return t.map(t=>{const r=e?.find(e=>e.clusterId===t.clusterId),n=r??t;if(o?.[t.clusterId]){const e=o[t.clusterId],r=$r(n);return e.forEach(e=>{const t=r.namespaces.find(t=>t.name===e.namespace);if(t)if(e.name&&e.kind){const r=t.workloads.find(t=>t.name===e.name&&t.kind===e.kind);r&&(r.selected=e.selected)}else t.selected=e.selected,e.selected&&t.workloads.forEach(e=>{Kl.has(e.kind)&&!i||(e.selected=!0)})}),r}return n})})},[c,r,o]);const{formDiff:h,isFormDirty:m}=Xt(()=>{const e=((e,t,r)=>{const o={};return e.forEach(e=>{e.namespaces.forEach(n=>{const i=t.find(t=>t.clusterId===e.clusterId)?.namespaces.find(e=>e.name===n.name),a=n.selected||!1,s=a!==i?.selected;if(s&&(o[e.clusterId]||(o[e.clusterId]=[]),o[e.clusterId].push({namespace:n.name,selected:a,currentStreamName:r}),a&&(o[e.clusterId]=o[e.clusterId].filter(e=>e.namespace!==n.name||e.namespace===n.name&&(!e.name||!e.kind)))),!s||!a){const t=((e,t,r)=>{const o=[];return t.workloads.forEach(n=>{const i=e?.workloads.find(e=>e.name===n.name&&e.kind===n.kind);n.selected!==i?.selected&&o.push({namespace:t.name,name:n.name,kind:n.kind,selected:n.selected||!1,currentStreamName:r})}),o})(i,n,r);t.length>0&&(o[e.clusterId]||(o[e.clusterId]=[]),o[e.clusterId].push(...t))}})}),o})(p,c?.clusters||[],a);return{formDiff:e,isFormDirty:Object.keys(e).length>0}},[p,c,a]),g=Vt(e=>!i&&Kl.has(e),[i]),f=Vt(({clusterId:e,workloadId:t,selected:r,auto:o})=>{u(n=>{const i=$r(n),a=i.findIndex(t=>t.clusterId===e);if(-1===a)return i;const s=i[a].namespaces.findIndex(e=>e.name===t.namespace);if(-1===s)return i;if(t.kind&&t.name){const e=i[a].namespaces[s].workloads.findIndex(e=>e.name===t.name&&e.kind===t.kind);if(-1===e)return i;const o="boolean"==typeof r?r:!i[a].namespaces[s].workloads[e].selected;if(i[a].namespaces[s].workloads[e].selected=o,o){const e=i[a].namespaces[s].workloads.filter(e=>!g(e.kind));e.every(e=>e.selected)&&(i[a].namespaces[s].selected=!0)}else i[a].namespaces[s].selected=!1}else{const e="boolean"==typeof o?o:!i[a].namespaces[s].selected;i[a].namespaces[s].selected=e,e?i[a].namespaces[s].workloads.forEach(e=>{g(e.kind)||(e.selected=!0)}):"boolean"!=typeof r||r||i[a].namespaces[s].workloads.forEach(e=>{e.selected=!1})}return i})},[g]),x=Vt(({clusterId:e,namespaceName:t,boolean:r,searchText:o="",searchBy:n="",filters:i})=>{u(a=>{const s=$r(a),l=n===jr.Namespace?o:"",c=n===jr.Source?o:"",d=!!l||!!c||!!i?.showOnlySelected;return s.forEach((o,n)=>{e&&o.clusterId!==e||o.namespaces.forEach(({name:e,workloads:o},a)=>{if(!t||e===t)if(d)if(t){o.forEach((e,t)=>{r&&g(e.kind)||Yl(e,c,i||{showOnlySelected:!1})&&(s[n].namespaces[a].workloads[t].selected=r)});const e=s[n].namespaces[a].workloads.filter(e=>!g(e.kind)),t=e.every(e=>e.selected);s[n].namespaces[a].selected=t}else{if(!Jl(s[n].namespaces[a],l,i||{showOnlySelected:!1}))return;s[n].namespaces[a].selected=r,o.forEach((e,t)=>{r&&g(e.kind)||(s[n].namespaces[a].workloads[t].selected=r)})}else s[n].namespaces[a].selected=r,o.forEach((e,t)=>{r&&g(e.kind)||(s[n].namespaces[a].workloads[t].selected=r)})})}),s})},[g]);return e(Gu.Provider,{value:{snapshots:c,setSnapshots:d,isFetching:s,setIsFetching:l,formData:p,handleSourceChange:f,handleSelectAll:x,formDiff:h,isFormDirty:m},children:t})},Ku=()=>Kt(Gu),qu=qt({formType:void 0}),Ju=({children:t,formType:r})=>{const o=Xt(()=>({formType:r}),[r]);return e(qu.Provider,{value:o,children:t})},Yu=()=>Kt(qu),Qu=o.div`
|
|
969
|
+
`,du=({items:r,children:o})=>{const{popupRef:n,popupOpen:i,setPopupOpen:a,popupPosition:s,handlePosition:l}=Vl({positionMode:"viewport",defaultClientHeight:48,defaultClientwidth:240}),c=e=>{l(e.clientX,e.clientY),a("mouseleave"!==e.type)};return t(lu,{onMouseEnter:c,onMouseMove:c,onMouseLeave:c,children:[o,e(Cc,{ref:n,isOpen:i,top:s.top,left:s.left,asPortal:!0,style:{backgroundColor:"transparent",border:"none"},borderRadius:"0",padding:"0",maxWidth:"300px",children:e(cu,{children:r.map((t,r)=>e(cn,{size:sn.XXXS,children:t},r))})})]})},pu=({parts:o})=>e(r,{children:o.map((o,n)=>{const i=e(su,{$variant:o.variant,$isMono:au.includes(o.variant),children:o.text});return t(jt,{children:[0!==n&&e(r,{children:" "}),o.tooltipItems?.length?e(du,{items:o.tooltipItems,children:i}):i]},`${o.variant}-${n}`)})});var uu;!function(e){e.Noisy="noisy",e.HighlyRelevant="highly-relevant",e.CostReduction="cost-reduction"}(uu||(uu={}));const hu=[{value:uu.Noisy,label:"1. Noisy Operations",tooltip:"Rules that reduce noise from high-volume, low-value operations"},{value:uu.HighlyRelevant,label:"2. Highly Relevant Operations",tooltip:"Rules that prioritize important traces for retention"},{value:uu.CostReduction,label:"3. Cost Reduction",tooltip:"Rules that optimize costs by sampling less critical data"}],mu={[uu.Noisy]:"This is the most efficient way to sample (with Head Sampling). Prefer to use it where possible.",[uu.HighlyRelevant]:'Any trace from the "Noisy Operations" category is sampled prior to checking highly relevance.',[uu.CostReduction]:"Cost reduction rules use Tail Sampling to drop traces that are unlikely to be useful for debugging or monitoring."},gu={[uu.Noisy]:"Noisy Operations rules list",[uu.HighlyRelevant]:"Highly Relevant Operations rules list",[uu.CostReduction]:"Cost Reduction rules list"},fu={[uu.Noisy]:"noisy",[uu.HighlyRelevant]:"highlyRelevant",[uu.CostReduction]:"costReduction"};function xu(e){if(e.workloadName){const t=e.workloadKind?.toLowerCase()||"deployment";return e.workloadNamespace?`${t} '${e.workloadName}' in namespace '${e.workloadNamespace}'`:`${t} '${e.workloadName}'`}return e.workloadNamespace?`namespace '${e.workloadNamespace}'`:e.workloadLanguage?`${e.workloadLanguage} services`:""}function yu(e){if(!e?.length)return[{text:" for ",variant:iu.Default},{text:"all services in the cluster",variant:iu.Scope}];const t=e.map(xu).filter(Boolean);if(!t.length)return[{text:" for ",variant:iu.Default},{text:"all services in the cluster",variant:iu.Scope}];const r=[{text:" for ",variant:iu.Default}],o=t.slice(0,2),n=t.slice(2);return o.forEach((e,t)=>{t>0&&r.push({text:", ",variant:iu.Default}),r.push({text:e,variant:iu.Scope})}),n.length>0&&r.push({text:` + ${n.length} more`,variant:iu.Default,tooltipItems:n}),r}function bu(e,t){if(!e)return[];const r=(o=e).startsWith("/")?o.slice(1):o;var o;const n=[{text:" starting at ",variant:iu.Default}];return t?n.push({text:`${t} /${r}`,variant:iu.Endpoint}):n.push({text:`endpoint /${r}`,variant:iu.Endpoint}),n}function vu(e){const t=[];if(null!=e.percentageAtMost?(t.push({text:`Drop ${100-e.percentageAtMost}%`,variant:iu.Action}),t.push({text:" of traces",variant:iu.Default})):t.push({text:"Drop all traces",variant:iu.Action}),e.operation){const r=e.operation.httpServer?.route||e.operation.httpServer?.routePrefix,o=e.operation.httpServer?.method||e.operation.httpClient?.method;t.push(...bu(r,o));const n=e.operation.httpClient,i=n?.templatedPath||n?.templatedPathPrefix,a=n?.serverAddress;if((i||a)&&!r){const e=i&&a?`${a}/${i}`:i||a;t.push({text:" to ",variant:iu.Default}),o?t.push({text:`${o} /${e}`,variant:iu.Endpoint}):t.push({text:`/${e}`,variant:iu.Endpoint})}}else t.push({text:" on ",variant:iu.Default}),t.push({text:"any operation",variant:iu.Endpoint});return t.push(...yu(e.sourceScopes)),t}function $u(e){const t=[];if(null!=e.percentageAtLeast?(t.push({text:`Keep at least ${e.percentageAtLeast}%`,variant:iu.Action}),t.push({text:" of traces",variant:iu.Default})):t.push({text:"Keep all traces",variant:iu.Action}),e.operation){const r=e.operation.httpServer?.route||e.operation.httpServer?.routePrefix,o=e.operation.httpServer?.method;t.push(...bu(r,o))}else t.push({text:" on ",variant:iu.Default}),t.push({text:"any operation",variant:iu.Endpoint});return t.push(...yu(e.sourceScopes)),!e.error&&null!=e.durationAtLeastMs&&e.durationAtLeastMs>0&&(t.push({text:" with duration > ",variant:iu.Default}),t.push({text:`${e.durationAtLeastMs}ms`,variant:iu.Duration})),t}function wu(e){const t=[];if(t.push({text:`Drop ${100-e.percentageAtMost}%`,variant:iu.Action}),t.push({text:" of traces",variant:iu.Default}),e.operation){const r=e.operation.httpServer?.route||e.operation.httpServer?.routePrefix,o=e.operation.httpServer?.method;t.push(...bu(r,o));const n=e.operation.kafkaConsumer?.kafkaTopic;n&&!r&&(t.push({text:" from ",variant:iu.Default}),t.push({text:`topic '${n}'`,variant:iu.Endpoint}))}else t.push({text:" on ",variant:iu.Default}),t.push({text:"any operation",variant:iu.Endpoint});return t.push(...yu(e.sourceScopes)),t}function Su(e){return e.error?"Error":null!=e.durationAtLeastMs?"Duration":"Relevance"}function ku(e,t,r){const o=fu[t],n=[];for(const i of e)switch(t){case uu.Noisy:for(const e of i.noisyOperations)r?.has(e.ruleId)||n.push({ruleId:e.ruleId,samplingId:i.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:vu(e),category:o});break;case uu.HighlyRelevant:for(const e of i.highlyRelevantOperations)r?.has(e.ruleId)||n.push({ruleId:e.ruleId,samplingId:i.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:$u(e),category:o,typeBadge:Su(e)});break;case uu.CostReduction:for(const e of i.costReductionRules)r?.has(e.ruleId)||n.push({ruleId:e.ruleId,samplingId:i.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:wu(e),category:o})}return n}function Cu(e,t){switch(e){case"noisy":return vu(t);case"highlyRelevant":return $u(t);case"costReduction":return wu(t)}}function Eu(e,t,r,o){for(const n of e)if(n.id===t)switch(o){case"noisy":{const e=n.noisyOperations.find(e=>e.ruleId===r);if(e)return{category:"noisy",samplingId:n.id,rule:e};break}case"highlyRelevant":{const e=n.highlyRelevantOperations.find(e=>e.ruleId===r);if(e)return{category:"highlyRelevant",samplingId:n.id,rule:e};break}case"costReduction":{const e=n.costReductionRules.find(e=>e.ruleId===r);if(e)return{category:"costReduction",samplingId:n.id,rule:e};break}}return null}function Au(e,t){const r=Eu(e,t.samplingId,t.rule.ruleId,t.category);return r?{...r,summary:Cu(r.category,r.rule)}:null}function Du(e,t){const r=Eu(e,t.samplingId,t.ruleId,t.category);return r?{...r,summary:t.summary}:null}function Tu(e){return null==e||Array.isArray(e)&&0===e.length?null:e}function Iu(e,t){return JSON.stringify({sourceScopes:Tu(e),operation:Tu(t)})}function Nu(e,t,r,o){return JSON.stringify({sourceScopes:Tu(e),error:t??!1,durationAtLeastMs:Tu(r),operation:Tu(o)})}function Ru(e,t){return JSON.stringify({sourceScopes:Tu(e),operation:Tu(t)})}function Ou(e,t,r,o){switch(t){case"noisy":{const t=Iu(r.sourceScopes,r.operation);for(const r of e)for(const e of r.noisyOperations)if((!o||e.ruleId!==o)&&Iu(e.sourceScopes,e.operation)===t)return e.ruleId;return null}case"highlyRelevant":{const t=Nu(r.sourceScopes,r.error,r.durationAtLeastMs,r.operation);for(const r of e)for(const e of r.highlyRelevantOperations)if((!o||e.ruleId!==o)&&Nu(e.sourceScopes,e.error,e.durationAtLeastMs,e.operation)===t)return e.ruleId;return null}case"costReduction":{const t=Ru(r.sourceScopes,r.operation);for(const r of e)for(const e of r.costReductionRules)if((!o||e.ruleId!==o)&&Ru(e.sourceScopes,e.operation)===t)return e.ruleId;return null}}}function _u(e){if(!e||!e.enabled)return[{text:"Auto rule is ",variant:iu.Default},{text:"disabled",variant:iu.Action}];return[{text:`Keep ${e.keepPercentage??0}%`,variant:iu.Action},{text:" of ",variant:iu.Default},{text:"traces for kubelet health probes in the entire cluster",variant:iu.Scope}]}function Fu(e){return!(!0!==e.error||e.sourceScopes&&0!==e.sourceScopes.length||e.operation||null!=e.percentageAtLeast&&100!==e.percentageAtLeast)}function Pu(e){for(const t of e){const e=t.highlyRelevantOperations.find(Fu);if(e)return{rule:e,samplingId:t.id}}return null}function Lu(e){return!e||e.disabled?[{text:"Auto rule is ",variant:iu.Default},{text:"disabled",variant:iu.Action}]:[{text:"Keep all traces",variant:iu.Action},{text:" of ",variant:iu.Default},{text:"error traces across the entire cluster",variant:iu.Scope}]}function zu(e){return!(e.sourceScopes&&0!==e.sourceScopes.length||e.operation)}function Mu(e){for(const t of e){const e=t.costReductionRules.find(zu);if(e)return{rule:e,samplingId:t.id}}return null}function Bu(e){return!e||e.disabled?[{text:" is ",variant:iu.Default},{text:"disabled",variant:iu.Action}]:[{text:`Drop ${100-e.percentageAtMost}%`,variant:iu.Action},{text:" of ",variant:iu.Default},{text:"traces across the entire cluster",variant:iu.Scope}]}var Uu;!function(e){e.Create="create",e.View="view",e.EditAutoNoisy="edit-auto-noisy",e.EditAutoCostReduction="edit-auto-cost-reduction",e.EditAutoHighlyRelevant="edit-auto-highly-relevant"}(Uu||(Uu={}));const ju=qt(null),Wu=["50","25","10","1"];function Hu(e){const t=String(e);return Wu.includes(t)?t:"custom"}const Xu=({category:t,sourceOptions:r=[],namespaceOptions:o=[],children:n})=>{const{formData:i,handleFormChange:a,resetFormData:s}=Dl(Bp(t)),[l,c]=Wt(null);Ht(()=>{s(Bp(t)),c(null)},[t]);const d=Vt(e=>{c(null),a(void 0,void 0,{...i,...e})},[i,a]),p=Vt(()=>{s(Bp(t)),c(null)},[t,s]),u=Xt(()=>({formType:Uu.Create,category:t,formData:i,handleChange:d,resetForm:p,duplicateWarning:l,setDuplicateWarning:c,sourceOptions:r,namespaceOptions:o}),[t,i,d,p,l,r,o]);return e(ju.Provider,{value:u,children:n})},Gu=({data:t,defaultEditMode:r,sourceOptions:o=[],namespaceOptions:n=[],children:i})=>{const[a,s]=Wt(!1),{formData:l,handleFormChange:c,resetFormData:d}=Dl(void 0),p=Gt(null),[u,h]=Wt(null);Ht(()=>{t!==p.current&&(p.current=t,t&&r?(d(nu(t)),h(null),s(!0)):(s(!1),h(null)))},[t,r]);const m=Vt(e=>{h(null),c(void 0,void 0,{...l,...e})},[l,c]),g=Vt(()=>{t&&(d(nu(t)),h(null),s(!0))},[t,d]),f=Vt(()=>{s(!1),h(null)},[]),x=Xt(()=>({formType:Uu.View,data:t,isEditing:a,formData:l,handleChange:m,handleEdit:g,handleCancelEdit:f,duplicateWarning:u,setDuplicateWarning:h,sourceOptions:o,namespaceOptions:n}),[t,a,l,m,g,f,u,o,n]);return e(ju.Provider,{value:x,children:i})};function Vu(e){const[t,r]=Wt(()=>0===e?"all":"sample"),[o,n]=Wt(()=>Hu(e)),[i,a]=Wt(()=>"custom"===Hu(e)?String(e):"");Ht(()=>{r(0===e?"all":"sample");const t=Hu(e);n(t),a("custom"===t?String(e):"")},[e]);const s=Xt(()=>"all"===t?0:"custom"===o?Number(i)||0:Number(o),[t,o,i]);return{percentageMode:t,setPercentageMode:r,percentagePreset:o,setPercentagePreset:n,customPercentage:i,setCustomPercentage:a,resolvedPercentage:s}}const Ku=({enabled:t,keepPercentage:r,children:o})=>{const[n,i]=Wt(t),a=Vu(r);Ht(()=>{i(t)},[t]);const s=Xt(()=>_u({enabled:n,keepPercentage:a.resolvedPercentage}),[n,a.resolvedPercentage]),l=Xt(()=>({formType:Uu.EditAutoNoisy,localEnabled:n,setLocalEnabled:i,...a,summary:s}),[n,a,s]);return e(ju.Provider,{value:l,children:o})},qu=({enabled:t,dropPercentage:r,children:o})=>{const[n,i]=Wt(t),a=Vu(r);Ht(()=>{i(t)},[t]);const s=Xt(()=>Bu(n?{disabled:!1,percentageAtMost:a.resolvedPercentage}:null),[n,a.resolvedPercentage]),l=Xt(()=>({formType:Uu.EditAutoCostReduction,localEnabled:n,setLocalEnabled:i,...a,summary:s}),[n,a,s]);return e(ju.Provider,{value:l,children:o})},Ju=({enabled:t,children:r})=>{const[o,n]=Wt(t);Ht(()=>{n(t)},[t]);const i=Xt(()=>Lu(o?{disabled:!1}:null),[o]),a=Xt(()=>({formType:Uu.EditAutoHighlyRelevant,localEnabled:o,setLocalEnabled:n,summary:i}),[o,i]);return e(ju.Provider,{value:a,children:r})},Yu=t=>{switch(t.formType){case Uu.Create:return e(Xu,{...t});case Uu.View:return e(Gu,{...t});case Uu.EditAutoNoisy:return e(Ku,{...t});case Uu.EditAutoCostReduction:return e(qu,{...t});case Uu.EditAutoHighlyRelevant:return e(Ju,{...t})}};function Qu(e){const t=Kt(ju);if(!t)throw new Error("useSamplingRulesFormContext must be used within a SamplingRulesFormProvider");if(e&&t.formType!==e)throw new Error(`Expected formType "${e}" but found "${t.formType}"`);return t}const Zu=qt({snapshots:null,setSnapshots:()=>{},isFetching:!1,setIsFetching:()=>{},formData:[],handleSourceChange:()=>{},handleSelectAll:()=>{},formDiff:{},isFormDirty:!1}),eh=({children:t,selectedConnectionIds:r,initialInputs:o})=>{const{tier:n}=ec(),i=n===Lr.Onprem,{selectedStreamName:a}=Vs(),[s,l]=Wt(!1),[c,d]=Wt(null),[p,u]=Wt([]);Ht(()=>{c&&u(e=>{const t=((e,t)=>$r(((e,t)=>e.clusters.filter(({clusterId:e})=>!t||t.includes(e)))(e,t)))(c,r);return t.map(t=>{const r=e?.find(e=>e.clusterId===t.clusterId),n=r??t;if(o?.[t.clusterId]){const e=o[t.clusterId],r=$r(n);return e.forEach(e=>{const t=r.namespaces.find(t=>t.name===e.namespace);if(t)if(e.name&&e.kind){const r=t.workloads.find(t=>t.name===e.name&&t.kind===e.kind);r&&(r.selected=e.selected)}else t.selected=e.selected,e.selected&&t.workloads.forEach(e=>{tc.has(e.kind)&&!i||(e.selected=!0)})}),r}return n})})},[c,r,o]);const{formDiff:h,isFormDirty:m}=Xt(()=>{const e=((e,t,r)=>{const o={};return e.forEach(e=>{e.namespaces.forEach(n=>{const i=t.find(t=>t.clusterId===e.clusterId)?.namespaces.find(e=>e.name===n.name),a=n.selected||!1,s=a!==i?.selected;if(s&&(o[e.clusterId]||(o[e.clusterId]=[]),o[e.clusterId].push({namespace:n.name,selected:a,currentStreamName:r}),a&&(o[e.clusterId]=o[e.clusterId].filter(e=>e.namespace!==n.name||e.namespace===n.name&&(!e.name||!e.kind)))),!s||!a){const t=((e,t,r)=>{const o=[];return t.workloads.forEach(n=>{const i=e?.workloads.find(e=>e.name===n.name&&e.kind===n.kind);n.selected!==i?.selected&&o.push({namespace:t.name,name:n.name,kind:n.kind,selected:n.selected||!1,currentStreamName:r})}),o})(i,n,r);t.length>0&&(o[e.clusterId]||(o[e.clusterId]=[]),o[e.clusterId].push(...t))}})}),o})(p,c?.clusters||[],a);return{formDiff:e,isFormDirty:Object.keys(e).length>0}},[p,c,a]),g=Vt(e=>!i&&tc.has(e),[i]),f=Vt(({clusterId:e,workloadId:t,selected:r,auto:o})=>{u(n=>{const i=$r(n),a=i.findIndex(t=>t.clusterId===e);if(-1===a)return i;const s=i[a].namespaces.findIndex(e=>e.name===t.namespace);if(-1===s)return i;if(t.kind&&t.name){const e=i[a].namespaces[s].workloads.findIndex(e=>e.name===t.name&&e.kind===t.kind);if(-1===e)return i;const o="boolean"==typeof r?r:!i[a].namespaces[s].workloads[e].selected;if(i[a].namespaces[s].workloads[e].selected=o,o){const e=i[a].namespaces[s].workloads.filter(e=>!g(e.kind));e.every(e=>e.selected)&&(i[a].namespaces[s].selected=!0)}else i[a].namespaces[s].selected=!1}else{const e="boolean"==typeof o?o:!i[a].namespaces[s].selected;i[a].namespaces[s].selected=e,e?i[a].namespaces[s].workloads.forEach(e=>{g(e.kind)||(e.selected=!0)}):"boolean"!=typeof r||r||i[a].namespaces[s].workloads.forEach(e=>{e.selected=!1})}return i})},[g]),x=Vt(({clusterId:e,namespaceName:t,boolean:r,searchText:o="",searchBy:n="",filters:i})=>{u(a=>{const s=$r(a),l=n===jr.Namespace?o:"",c=n===jr.Source?o:"",d=!!l||!!c||!!i?.showOnlySelected;return s.forEach((o,n)=>{e&&o.clusterId!==e||o.namespaces.forEach(({name:e,workloads:o},a)=>{if(!t||e===t)if(d)if(t){o.forEach((e,t)=>{r&&g(e.kind)||nc(e,c,i||{showOnlySelected:!1})&&(s[n].namespaces[a].workloads[t].selected=r)});const e=s[n].namespaces[a].workloads.filter(e=>!g(e.kind)),t=e.every(e=>e.selected);s[n].namespaces[a].selected=t}else{if(!oc(s[n].namespaces[a],l,i||{showOnlySelected:!1}))return;s[n].namespaces[a].selected=r,o.forEach((e,t)=>{r&&g(e.kind)||(s[n].namespaces[a].workloads[t].selected=r)})}else s[n].namespaces[a].selected=r,o.forEach((e,t)=>{r&&g(e.kind)||(s[n].namespaces[a].workloads[t].selected=r)})})}),s})},[g]);return e(Zu.Provider,{value:{snapshots:c,setSnapshots:d,isFetching:s,setIsFetching:l,formData:p,handleSourceChange:f,handleSelectAll:x,formDiff:h,isFormDirty:m},children:t})},th=()=>Kt(Zu),rh=qt({formType:void 0}),oh=({children:t,formType:r})=>{const o=Xt(()=>({formType:r}),[r]);return e(rh.Provider,{value:o,children:t})},nh=()=>Kt(rh),ih=o.div`
|
|
970
970
|
display: flex;
|
|
971
971
|
|
|
972
972
|
align-items: center;
|
|
973
973
|
gap: 6px;
|
|
974
974
|
margin-bottom: 4px;
|
|
975
|
-
`,
|
|
975
|
+
`,ah=o(Si)`
|
|
976
976
|
font-size: 14px;
|
|
977
977
|
opacity: 0.8;
|
|
978
978
|
line-height: 22px;
|
|
@@ -980,16 +980,16 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
980
980
|
white-space: nowrap;
|
|
981
981
|
text-overflow: ellipsis;
|
|
982
982
|
color: ${({$status:e,theme:t})=>e?t.text[e]:t.text.secondary};
|
|
983
|
-
`,
|
|
983
|
+
`,sh=o(Si)`
|
|
984
984
|
font-size: 12px;
|
|
985
985
|
color: ${({theme:e})=>e.text.darker_grey};
|
|
986
986
|
opacity: 0.8;
|
|
987
|
-
`,
|
|
987
|
+
`,lh=({title:r,required:o,tooltip:n,style:i,status:a})=>r?e(ih,{style:i,children:t(Rc,{text:n,withIcon:!0,children:[e(ah,{$status:a,children:r}),!o&&e(sh,{children:"(optional)"})]})}):null,ch=o.div`
|
|
988
988
|
display: flex;
|
|
989
989
|
flex-direction: column;
|
|
990
990
|
position: relative;
|
|
991
991
|
width: 100%;
|
|
992
|
-
`,
|
|
992
|
+
`,dh=o.div`
|
|
993
993
|
width: 100%;
|
|
994
994
|
display: flex;
|
|
995
995
|
align-items: center;
|
|
@@ -1015,7 +1015,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1015
1015
|
&:focus-within {
|
|
1016
1016
|
border-color: ${({theme:e})=>e.colors.secondary};
|
|
1017
1017
|
}
|
|
1018
|
-
`,
|
|
1018
|
+
`,ph=o.input`
|
|
1019
1019
|
padding-left: ${({$hasIcon:e})=>e?"0":"16px"};
|
|
1020
1020
|
flex: 1;
|
|
1021
1021
|
min-width: 150px;
|
|
@@ -1044,13 +1044,13 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1044
1044
|
-webkit-appearance: none;
|
|
1045
1045
|
margin: 0;
|
|
1046
1046
|
}
|
|
1047
|
-
`,
|
|
1047
|
+
`,uh=o.div`
|
|
1048
1048
|
display: flex;
|
|
1049
1049
|
align-items: center;
|
|
1050
1050
|
margin-left: 12px;
|
|
1051
|
-
`,
|
|
1051
|
+
`,hh=o(uh)`
|
|
1052
1052
|
cursor: pointer;
|
|
1053
|
-
`,
|
|
1053
|
+
`,mh=o.button`
|
|
1054
1054
|
background-color: ${({theme:e})=>e.colors.primary};
|
|
1055
1055
|
border: none;
|
|
1056
1056
|
color: ${({theme:e})=>e.text.secondary};
|
|
@@ -1065,15 +1065,15 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1065
1065
|
background-color: ${({theme:e})=>e.colors.border};
|
|
1066
1066
|
cursor: not-allowed;
|
|
1067
1067
|
}
|
|
1068
|
-
`,
|
|
1068
|
+
`,gh=({icon:r,buttonLabel:o,onButtonClick:n,hasError:a,errorMessage:s,title:l,tooltip:c,required:d,value:p,onChange:u,type:h=Xr.Text,name:m,status:g,...f})=>{const x=i(),y=h===Xr.Password,[b,v]=Wt(!1);return t(ch,{children:[e(lh,{title:l,required:d,tooltip:c,status:g}),t(dh,{$disabled:f.disabled,$hasError:a||!!s,$isActive:!!f.autoFocus,$status:g,children:[y?e(hh,{onClick:()=>v(e=>!e),children:e(b?At:Dt,{size:14,fill:x.text.grey})}):r?e(uh,{children:e(r,{size:14,fill:x.text.grey})}):null,e(ph,{"data-id":m,type:b||h===Xr.Number?Xr.Text:h,$hasIcon:!!r||y,name:m,value:p,onChange:e=>{e.stopPropagation(),h===Xr.Number&&(e.target.value=di(e.target.value)),u?.(e)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},...f}),o&&n&&e(mh,{onClick:n,disabled:f.disabled,children:o})]}),!!s&&e(Ei,{children:s})]})},fh=o.div`
|
|
1069
1069
|
display: flex;
|
|
1070
1070
|
flex-direction: column;
|
|
1071
1071
|
min-width: 120px;
|
|
1072
1072
|
width: 100%;
|
|
1073
1073
|
opacity: ${({$disabled:e})=>e?.5:1};
|
|
1074
|
-
`,
|
|
1074
|
+
`,xh=o.div`
|
|
1075
1075
|
position: relative;
|
|
1076
|
-
`,
|
|
1076
|
+
`,yh=o.div`
|
|
1077
1077
|
display: flex;
|
|
1078
1078
|
align-items: center;
|
|
1079
1079
|
justify-content: space-between;
|
|
@@ -1099,14 +1099,14 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1099
1099
|
&:hover {
|
|
1100
1100
|
border-color: ${({$isMulti:e,$hasSelections:t,$disabled:r,theme:o})=>r?"auto":e&&t?o.colors.border:o.colors.secondary};
|
|
1101
1101
|
}
|
|
1102
|
-
`,
|
|
1102
|
+
`,bh=o.div`
|
|
1103
1103
|
display: flex;
|
|
1104
1104
|
align-items: center;
|
|
1105
1105
|
gap: 4px;
|
|
1106
|
-
`,
|
|
1106
|
+
`,vh=({options:r,value:o,onSelect:n,onDeselect:i,title:a,tooltip:s,placeholder:l,disabled:c=!1,isMulti:d=!1,showSearch:p=!1,required:u=!1,errorMessage:h,hasError:m=!1,status:g})=>{const[f,x]=Wt(!1),[y,b]=Wt(!1),v=Gt(null);Xl(v,()=>x(!1));const $=()=>{(()=>{if(v.current){const e=v.current.getBoundingClientRect().bottom+300>window.innerHeight;b(e)}})(),x(e=>!e)},w=Array.isArray(o)?o.length:0;return t(fh,{$disabled:c,children:[e(lh,{title:a,required:u,tooltip:s,status:g}),t(xh,{ref:v,children:[t(yh,{$isOpen:f,$isMulti:d,$hasSelections:!!Array.isArray(o)&&!!o.length,$hasError:!!h||m,$status:g,$disabled:c,onClick:()=>!c&&$(),children:[e(kh,{value:o,placeholder:l,onDeselect:i}),t(bh,{children:[d&&e(Sl,{label:w,filled:!!w}),e(vd,{extend:f})]})]}),f&&e(Ah,{openUpwards:y,options:r,value:o,onSelect:e=>{n?.(e),d||$()},onDeselect:e=>{i?.(e),d||$()},isMulti:d,showSearch:p})]}),!!h&&e(Ei,{children:h})]})},$h=o(bh)`
|
|
1107
1107
|
max-width: calc(100% - 50px);
|
|
1108
1108
|
overflow-x: auto;
|
|
1109
|
-
`,
|
|
1109
|
+
`,wh=o(Si)`
|
|
1110
1110
|
display: flex;
|
|
1111
1111
|
align-items: center;
|
|
1112
1112
|
gap: 2px;
|
|
@@ -1121,7 +1121,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1121
1121
|
transition: transform 0.3s;
|
|
1122
1122
|
}
|
|
1123
1123
|
}
|
|
1124
|
-
`,
|
|
1124
|
+
`,Sh=o(Si)``,kh=({value:r,placeholder:o,onDeselect:n})=>{const a=i();return Array.isArray(r)?r.length?e($h,{children:r.map(r=>t(wh,{size:14,children:[r.value,e(vc,{orientation:"vertical",length:"10px",margin:"0 4px"}),e(yt,{size:12,onClick:e=>{e.stopPropagation(),n?.(r)}})]},`multi-label-${r.id}`))}):e(Sh,{size:14,color:a.text.darker_grey,children:o}):e(Sh,{size:14,color:r?.value?void 0:a.text.darker_grey,children:r?.value||o})},Ch=o.div`
|
|
1125
1125
|
position: absolute;
|
|
1126
1126
|
${({$openUpwards:e})=>e?"bottom":"top"}: calc(100% + 8px);
|
|
1127
1127
|
left: 0;
|
|
@@ -1136,11 +1136,11 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1136
1136
|
background-color: ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
1137
1137
|
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
1138
1138
|
border-radius: 24px;
|
|
1139
|
-
`,
|
|
1139
|
+
`,Eh=o.div`
|
|
1140
1140
|
display: flex;
|
|
1141
1141
|
flex-direction: column;
|
|
1142
1142
|
align-items: center;
|
|
1143
|
-
`,
|
|
1143
|
+
`,Ah=({openUpwards:r,options:o,value:n,onSelect:i,onDeselect:a,isMulti:s,showSearch:l})=>{const[c,d]=Wt(""),p=o.filter(e=>e.value?.toLowerCase().includes(c?.toLowerCase()));return t(Ch,{$openUpwards:r,children:[l&&t(Eh,{children:[e(gh,{placeholder:"Search...",icon:Tt,value:c,onChange:e=>d(e.target.value)}),e(vc,{thickness:1,margin:"8px 0 0 0"})]}),0===p.length?e(sp,{subTitle:l&&c?void 0:" "}):p.map((t,r)=>e(Th,{option:t,value:n,isMulti:s,onSelect:i,onDeselect:a},`dropdown-option-${t.id||r}`))]})},Dh=o.div`
|
|
1144
1144
|
padding: 8px 12px;
|
|
1145
1145
|
cursor: pointer;
|
|
1146
1146
|
display: flex;
|
|
@@ -1149,23 +1149,23 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1149
1149
|
border-radius: 32px;
|
|
1150
1150
|
&:hover,
|
|
1151
1151
|
&.selected {
|
|
1152
|
-
background: ${({theme:e})=>e.colors.majestic_blue+
|
|
1152
|
+
background: ${({theme:e})=>e.colors.majestic_blue+ml["024"]};
|
|
1153
1153
|
}
|
|
1154
|
-
`,
|
|
1154
|
+
`,Th=({option:r,value:o,isMulti:n,onSelect:a,onDeselect:s})=>{const l=i(),c=Array.isArray(o)?!!o?.find(e=>e.id===r.id):o?.id===r.id,d=e=>e?a?.(r):s?.(r);return n?e(Dh,{className:c?"selected":"",onClick:()=>d(!c),children:e(rd,{title:r.value||"",titleColor:l.text.secondary,value:c,onChange:d,style:{width:"100%"}})}):t(Dh,{className:c?"selected":"",onClick:()=>c?s?.(r):a?.(r),children:[t(Tn,{$gap:8,children:[r.icon&&e(r.icon,{}),e(Si,{size:14,children:r.value})]}),c&&e(ft,{})]})},Ih=o(In)`
|
|
1155
1155
|
gap: 12px;
|
|
1156
|
-
`,
|
|
1156
|
+
`,Nh=o(Tn)`
|
|
1157
1157
|
width: 100%;
|
|
1158
1158
|
gap: 12px;
|
|
1159
1159
|
align-items: flex-end;
|
|
1160
|
-
`,
|
|
1160
|
+
`,Rh=({clientX:r=0,flipX:o,clientY:n=0,flipY:a,isOpen:s,onClose:l,onSave:c,withDelete:d,onDelete:p,title:u,titleTooltip:h,warning:m,children:g})=>{const f=i(),{popupRef:x,popupPosition:y,handlePosition:b}=Vl({onClickOutside:l});return Hl({key:"Enter",active:s},c),Ht(()=>b(r,n),[r,n]),0===y.top&&0!==n||0===y.left&&0!==r?null:e(Cc,{ref:x,isOpen:s,top:a?void 0:y.top,bottom:a?y.top:void 0,left:o?void 0:y.left,right:o?y.left:void 0,padding:"24px",children:t(Ih,{children:[e(Rc,{text:h,withIcon:!0,children:e(Si,{size:14,children:u})}),t(Nh,{children:[g,t(Tn,{$gap:6,children:[e(Fc,{withBorder:!0,onClick:l,tooltip:"Cancel",children:e(yt,{})}),e(Fc,{withBorder:!0,backgroundColor:f.colors.secondary,onClick:c,tooltip:"Save",children:e(ft,{fill:f.text.primary})}),d&&e(Fc,{onClick:p,tooltip:"Undo",children:e(It,{})})]})]}),m&&e(Hc,{type:Gr.Warning,message:m})]})})},Oh=o.div`
|
|
1161
1161
|
position: relative;
|
|
1162
|
-
`,
|
|
1162
|
+
`,_h=({defaultLanguage:r=Br.Unknown,defaultVersion:o="",defaultOtelDistroName:n=null,handleSave:i})=>{const{tier:a}=ec(),{addNotification:s}=Zs(),{formData:l,handleFormChange:c,resetFormData:d}=Dl({language:r,version:o,otelDistroName:n}),[p,u]=Wt(!1),h=()=>{u(!1),d()},m=Xt(()=>{if(!l.language)return[];const e=Ws[l.language].community,t=a===Lr.Onprem?Ws[l.language].enterprise:[];return e.concat(t)},[l.language,a]);return t(Oh,{children:[e(Fc,{tooltip:Ao.OVERRIDE_RUNTIME_DETAILS,size:32,onClick:()=>{u(!0)},children:e(kt,{})}),e(Rh,{flipX:!0,clientX:36,isOpen:p,onClose:h,onSave:async()=>{!l.version||ni(l.version)?(await i({...l}),h()):s({type:Gr.Warning,message:Eo.INVALID_VERSION,hideFromHistory:!0})},withDelete:!0,onDelete:async()=>{await i({language:null,version:"",otelDistroName:null}),h()},title:Ao.OVERRIDE_RUNTIME_DETAILS,warning:Ao.OVERRIDE_RUNTIME_WARNING,children:t(In,{$gap:12,children:[t(Tn,{$gap:12,children:[e(vh,{title:Ao.LANGUAGE,options:Us,value:Us.find(e=>e.id===l.language),onSelect:e=>{c("language",e.id),c("version",""),c("otelDistroName",null)},required:!0}),e(gh,{title:Ao.RUNTIME_VERSION,placeholder:Ao.VERSION_PLACEHOLDER,value:l.version,onChange:e=>c("version",e.target.value),required:!1})]}),l.language&&e(vh,{title:"Otel Distro Name",options:m,value:m.find(e=>e.id===l.otelDistroName),onSelect:e=>c("otelDistroName",e.id),required:!1})]})})]})},Fh=o(Tn)`
|
|
1163
1163
|
width: 100%;
|
|
1164
1164
|
justify-content: center;
|
|
1165
|
-
`,
|
|
1165
|
+
`,Ph=({containerName:o,runtimeInfo:n,agentEnabled:a,overrides:s,callbackRuntimeOverride:l})=>{const c=i(),d=s?.runtimeInfo??n,p=d?.language??Br.Unknown,u=d?.runtimeVersion??"",h=null!=s?.runtimeInfo,m=a?.agentEnabled??!1,g=a?.agentEnabledStatus?.message??"",f=a?.otelDistroName??null,x=m?Gr.Success:g?Gr.Info:Gr.Warning,y=m?Vr.INSTRUMENTED:g?Vr.NOT_INSTRUMENTED:Vr.INSTRUMENTING;return e(Qd,{title:o,subTitle:`${p?Bs[p]:"no runtime info"}`+(u?` • Runtime Version: ${u}`:""),iconProps:{icon:Lo(p)},extendableProps:{isExtended:!!g,renderExtended:()=>e(Fh,{children:e(Si,{size:12,family:"secondary",color:c.text.info,children:ii(g)})})},renderActions:()=>t(r,{children:[e(Nd,{status:x,title:y,subtitle:f||void 0,withIcon:!0,withBorder:!0}),h&&e(Nd,{status:Gr.Default,forceIcon:Nt,title:Ao.OVERIDDEN,withIcon:!0,withBorder:!0}),l&&e(_h,{defaultLanguage:p,defaultVersion:u??"",defaultOtelDistroName:f,handleSave:e=>l({...e,containerName:o})})]})})},Lh=o.tr`
|
|
1166
1166
|
cursor: ${({$withHover:e})=>e?"pointer":"default"};
|
|
1167
1167
|
opacity: ${({$faded:e})=>e?.5:1};
|
|
1168
|
-
`,
|
|
1168
|
+
`,zh=o.td`
|
|
1169
1169
|
position: relative;
|
|
1170
1170
|
width: fit-content;
|
|
1171
1171
|
padding: 16px 8px 16px ${({$isFirst:e})=>e?"16px":"8px"};
|
|
@@ -1173,7 +1173,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1173
1173
|
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1174
1174
|
font-size: 14px;
|
|
1175
1175
|
white-space: nowrap;
|
|
1176
|
-
`,
|
|
1176
|
+
`,Mh=o(Si)`
|
|
1177
1177
|
font-size: 14px;
|
|
1178
1178
|
color: ${({$color:e,theme:t})=>e??t.text.secondary};
|
|
1179
1179
|
line-height: 16px;
|
|
@@ -1186,7 +1186,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1186
1186
|
display: -webkit-box;
|
|
1187
1187
|
-webkit-line-clamp: 2;
|
|
1188
1188
|
-webkit-box-orient: vertical;
|
|
1189
|
-
`,
|
|
1189
|
+
`,Bh=o.div`
|
|
1190
1190
|
position: absolute;
|
|
1191
1191
|
top: 0;
|
|
1192
1192
|
left: 0;
|
|
@@ -1194,57 +1194,57 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1194
1194
|
width: ${({$width:e})=>e}px;
|
|
1195
1195
|
height: ${({$height:e})=>e}px;
|
|
1196
1196
|
border-radius: 16px;
|
|
1197
|
-
background-color: ${({theme:e,$hovered:t,$status:r})=>t?r?e.text[r]+
|
|
1198
|
-
`,
|
|
1197
|
+
background-color: ${({theme:e,$hovered:t,$status:r})=>t?r?e.text[r]+ml["020"]:e.colors.majestic_blue+ml["030"]:r?e.text[r]+ml["010"]:e.colors.secondary+ml["005"]};
|
|
1198
|
+
`,Uh=({index:r,columns:o,cells:n,onClick:i,status:a,faded:s})=>{const{containerRef:l,containerHeight:c,containerWidth:d}=_l(),[p,u]=Wt(!1);return e(Lh,{ref:l,onMouseEnter:()=>!!i&&u(!0),onMouseLeave:()=>!!i&&u(!1),onClick:()=>!!i&&i(),$withHover:!!i,$faded:s,children:o.map(({key:o},i)=>{const s=n.find(({columnKey:e})=>e===o);if(!s)return null;const{value:l,textColor:u,withTooltip:h,icon:m,component:g}=s;return t(zh,{$isFirst:0===i,children:[m?e(Ud,{icon:m}):g?e(g,{}):e(Rc,{text:h&&l?String(l):"",children:e(Mh,{$color:u,children:Qn(l)?"-":l})}),0===i&&e(Bh,{$height:c,$width:d,$top:c*r,$hovered:p,$status:a})]},`table-row-${o}-${l}-${r}-${i}`)})})},jh=o.div`
|
|
1199
1199
|
width: 100%;
|
|
1200
|
-
`,
|
|
1200
|
+
`,Wh=o.table`
|
|
1201
1201
|
position: relative;
|
|
1202
1202
|
z-index: 0;
|
|
1203
1203
|
width: 100%;
|
|
1204
1204
|
border-collapse: separate;
|
|
1205
1205
|
border-spacing: 0 12px;
|
|
1206
|
-
`,
|
|
1206
|
+
`,Hh=o.thead`
|
|
1207
1207
|
// only supported with "border-collapse: collapse;"
|
|
1208
1208
|
// border-top: 1px solid ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
1209
1209
|
// border-bottom: 1px solid ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
1210
|
-
`,
|
|
1210
|
+
`,Xh=o.th`
|
|
1211
1211
|
// only required with "border-collapse: separate;"
|
|
1212
1212
|
border-top: 1px solid ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
1213
1213
|
border-bottom: 1px solid ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
1214
1214
|
|
|
1215
1215
|
padding: 8px;
|
|
1216
|
-
`,
|
|
1216
|
+
`,Gh=o(Tn)`
|
|
1217
1217
|
cursor: pointer;
|
|
1218
1218
|
&:hover {
|
|
1219
1219
|
* {
|
|
1220
1220
|
color: ${({theme:e})=>e.text.secondary};
|
|
1221
1221
|
}
|
|
1222
1222
|
}
|
|
1223
|
-
`,
|
|
1223
|
+
`,Vh=o(Si)`
|
|
1224
1224
|
color: ${({theme:e})=>e.text.darker_grey};
|
|
1225
1225
|
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
1226
1226
|
text-transform: uppercase;
|
|
1227
1227
|
font-size: 12px;
|
|
1228
1228
|
font-weight: 500;
|
|
1229
1229
|
text-wrap: nowrap;
|
|
1230
|
-
`,
|
|
1230
|
+
`,Kh=o.tbody``,qh=({columns:r,rows:o})=>{const[n,i]=Wt(Pr.Ascending),[a,s]=Wt("name"),l=Vt(e=>{a===e?i(e=>e===Pr.Ascending?Pr.Descending:Pr.Ascending):(s(e),i(Pr.Ascending))},[a]),c=Xt(()=>{const t=(e,t)=>e.cells.find(({columnKey:e})=>e===t)?.value??null;return(a?[...o].sort((e,r)=>{const o=t(e,a),i=t(r,a);return(n===Pr.Ascending?1:-1)*((e,t)=>"number"==typeof e&&"number"==typeof t?e-t:"string"==typeof e&&"string"==typeof t?e.localeCompare(t):"boolean"==typeof e&&"boolean"==typeof t?e===t?0:e?1:-1:String(e).localeCompare(String(t)))(o,i)}):o).map(({status:t,faded:o,cells:n,onClick:i},a)=>e(Uh,{index:a,columns:r,cells:n,onClick:i,status:t,faded:o},`row-${a}`))},[r,o,a,n]);return e(jh,{children:t(Wh,{children:[e(Hh,{children:e("tr",{children:r.map(({key:r,title:o,sortable:n})=>e(Xh,{children:n?t(Gh,{onClick:()=>l(r),children:[e(Rt,{}),e(Vh,{children:o})]}):e(Vh,{children:o})},`column-${r}`))})}),e(Kh,{children:c})]})})};var Jh;!function(e){e.Code="code",e.Table="table",e.Badge="badge",e.Loader="loader",e.Divider="divider",e.Monitors="monitors",e.CopyText="copy-text",e.ActiveStatus="active-status"}(Jh||(Jh={}));const Yh=o.div`
|
|
1231
1231
|
display: flex;
|
|
1232
1232
|
flex-wrap: wrap;
|
|
1233
1233
|
gap: 16px 32px;
|
|
1234
1234
|
width: 100%;
|
|
1235
|
-
`,
|
|
1235
|
+
`,Qh=o.div`
|
|
1236
1236
|
display: flex;
|
|
1237
1237
|
flex-direction: column;
|
|
1238
1238
|
gap: 2px;
|
|
1239
1239
|
width: ${({$width:e})=>e};
|
|
1240
|
-
`,
|
|
1240
|
+
`,Zh=o(Si)`
|
|
1241
1241
|
color: ${({theme:e})=>e.text.grey};
|
|
1242
1242
|
font-size: 10px;
|
|
1243
1243
|
line-height: 16px;
|
|
1244
|
-
`,
|
|
1244
|
+
`,em=o(Si)`
|
|
1245
1245
|
font-size: 12px;
|
|
1246
1246
|
white-space: pre-wrap;
|
|
1247
|
-
`,
|
|
1247
|
+
`,tm=({data:r})=>e(Yh,{children:r?.map(({type:r,title:o,titleIcon:n,tooltip:i,value:a},s)=>t(Qh,{$width:r&&[Jh.Code,Jh.Table].includes(r)?"inherit":r&&[Jh.Loader,Jh.Divider,Jh.CopyText].includes(r)?"100%":"unset",children:[e(Rc,{text:i,withIcon:!0,children:t(Tn,{$alignItems:"center",$gap:4,children:[n&&e(n,{size:14}),!!o&&e(Zh,{transform:"capitalize",children:o})]})}),e(rm,{type:r,value:a})]},`data-field-${o||(a?JSON.stringify(a):s)}`))}),rm=({type:t,value:r})=>{const o=i();switch(t){case Jh.Divider:return e(vc,{length:"100%",margin:"0"});case Jh.Loader:return e(Nn,{children:e(yd,{scale:1.2})});case Jh.Monitors:return e(Gd,{monitors:r?.split(", ")||[],withLabels:!0,color:o.colors.secondary});case Jh.Badge:{const{label:t,filled:o,...n}=qn(r,{label:"-",filled:!1});return e(Sl,{label:t,filled:o,...n})}case Jh.Code:{const{language:t,code:o,...n}=qn(r,{language:"",code:""});return e(ud,{language:t,code:o,...n})}case Jh.Table:{const{columns:t,rows:o,...n}=qn(r,{columns:[],rows:[{status:void 0,cells:[]}]});return e(qh,{columns:t,rows:o,...n})}case Jh.ActiveStatus:return e(Nd,{status:"true"==r?Gr.Success:Gr.Error,title:"true"==r?Ao.ENABLED:Ao.DISABLED,size:10,withIcon:!0,withBorder:!0});case Jh.CopyText:{const t="string"==typeof r?r:JSON.stringify(r);return e(_d,{value:t})}default:return e(em,{children:ui("string"==typeof r?r||"-":"")})}},om=o.div`
|
|
1248
1248
|
display: flex;
|
|
1249
1249
|
flex-direction: column;
|
|
1250
1250
|
align-items: flex-start;
|
|
@@ -1253,90 +1253,90 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1253
1253
|
padding: 24px;
|
|
1254
1254
|
border-radius: 24px;
|
|
1255
1255
|
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
1256
|
-
background-color: ${({theme:e,$hovered:t})=>t?e.colors.secondary+
|
|
1256
|
+
background-color: ${({theme:e,$hovered:t})=>t?e.colors.secondary+ml["010"]:"transparent"};
|
|
1257
1257
|
transition: background-color 0.3s;
|
|
1258
|
-
`,
|
|
1258
|
+
`,nm=o.div`
|
|
1259
1259
|
width: 100%;
|
|
1260
1260
|
display: flex;
|
|
1261
1261
|
flex-direction: column;
|
|
1262
1262
|
gap: 4px;
|
|
1263
1263
|
cursor: ${({$clickable:e})=>e?"pointer":"default"};
|
|
1264
|
-
`,
|
|
1264
|
+
`,im=o(Si)`
|
|
1265
1265
|
width: 100%;
|
|
1266
1266
|
display: flex;
|
|
1267
1267
|
align-items: center;
|
|
1268
1268
|
gap: 8px;
|
|
1269
1269
|
font-size: 16px;
|
|
1270
|
-
`,
|
|
1270
|
+
`,am=o(Si)`
|
|
1271
1271
|
font-size: 12px;
|
|
1272
1272
|
color: ${({theme:e})=>e.text.grey};
|
|
1273
|
-
`,
|
|
1273
|
+
`,sm=o(Tn)`
|
|
1274
1274
|
margin-left: auto;
|
|
1275
1275
|
gap: 8px;
|
|
1276
|
-
`,
|
|
1276
|
+
`,lm=({title:r="Details",titleBadge:o,titleIcon:n,description:i,action:a,withExtend:s,initialExtended:l=!1,data:c,children:d})=>{const[p,u]=Wt(l),[h,m]=Wt(!1);return t(om,{$hovered:h,children:[r||n||i||a?t(nm,{$clickable:s||!1,onClick:()=>s&&u(e=>!e),onMouseEnter:()=>s&&m(!0),onMouseLeave:()=>s&&m(!1),children:[t(Tn,{children:[t(Tn,{$alignItems:"center",$gap:8,children:[n&&e(Tn,{$alignItems:"center",children:e(n,{size:20})}),!!r&&e(im,{transform:"capitalize",children:r}),o===Kr.Loading?e(yd,{}):void 0!==o&&e(Sl,{label:o})]}),(!!a||s)&&t(sm,{children:["function"==typeof a?e(a,{hovered:h}):a,s&&e(vd,{extend:p})]})]}),!!i&&e(am,{children:i})]}):null,(!s||s&&p)&&(d||e(tm,{data:c}))]})},cm=o.div`
|
|
1277
1277
|
visibility: hidden;
|
|
1278
|
-
`,
|
|
1278
|
+
`,dm=o(Tn)`
|
|
1279
1279
|
align-self: stretch;
|
|
1280
1280
|
width: calc(100% - 32px);
|
|
1281
1281
|
padding: 16px;
|
|
1282
1282
|
border-radius: 16px;
|
|
1283
|
-
background-color: ${({theme:e})=>e.colors.secondary+
|
|
1283
|
+
background-color: ${({theme:e})=>e.colors.secondary+ml["005"]};
|
|
1284
1284
|
${({theme:e,$withClick:t})=>t?n`
|
|
1285
1285
|
&:hover {
|
|
1286
1286
|
cursor: pointer;
|
|
1287
|
-
background-color: ${e.colors.secondary+
|
|
1288
|
-
${
|
|
1287
|
+
background-color: ${e.colors.secondary+ml["010"]};
|
|
1288
|
+
${cm} {
|
|
1289
1289
|
visibility: visible;
|
|
1290
1290
|
}
|
|
1291
1291
|
}
|
|
1292
|
-
`:`\n &:hover {\n ${
|
|
1293
|
-
`,
|
|
1292
|
+
`:`\n &:hover {\n ${cm} {\n visibility: visible;\n }\n }\n `}
|
|
1293
|
+
`,pm=o(Tn)`
|
|
1294
1294
|
margin-left: auto;
|
|
1295
1295
|
gap: 8px;
|
|
1296
|
-
`,
|
|
1296
|
+
`,um=o(Si)`
|
|
1297
1297
|
font-size: 10px;
|
|
1298
1298
|
color: ${({theme:e})=>e.text.grey};
|
|
1299
|
-
`,
|
|
1299
|
+
`,hm=({title:o,subTitle:n,icons:a,iconSrcs:s,onClick:l,renderActions:c})=>{const d=i(),[p,u]=Wt(0),h=Gt(null),m=Gt(null);return Ht(()=>{if(h.current){const e=h.current.clientWidth,t=m.current?.clientWidth||0;u(e-(85+t))}},[]),t(dm,{ref:h,$gap:8,$withClick:!!l,onClick:l,children:[e(Hd,{id:`${o}-${n}`,icons:a,iconSrcs:s}),o&&e(zd,{maxWidth:p/2,text:o,textSize:14}),o&&n&&e(um,{children:"•"}),n&&e(zd,{maxWidth:p/2,text:n,textSize:10,textColor:d.text.grey}),e(pm,{ref:m,children:c&&t(r,{children:[e(vc,{orientation:"vertical",length:"24px",margin:"0"}),c()]})})]})},mm=({isOpen:t,noOverlay:r,name:o,type:n,isLastItem:i,onApprove:a,onDeny:s})=>{const l=n===jr.Source?"uninstrument":"delete";return e(Qc,{isOpen:t,noOverlay:r,title:`${l.charAt(0).toUpperCase()+l.substring(1)}${o?` ${o}`:""}`,description:`Are you sure you want to ${l}?`,note:i?{type:Gr.Warning,title:`You're about to ${l} the last ${n||o}`,message:""}:void 0,approveButton:{text:"Confirm",variant:"danger",onClick:a},denyButton:{text:"Go Back",onClick:s}})},gm=o(Al)`
|
|
1300
1300
|
display: flex;
|
|
1301
1301
|
align-items: center;
|
|
1302
1302
|
justify-content: center;
|
|
1303
1303
|
font-size: 14px;
|
|
1304
1304
|
gap: 6px;
|
|
1305
1305
|
min-width: 100px;
|
|
1306
|
-
`,
|
|
1306
|
+
`,fm=({endpoint:r="/",variant:o="secondary"})=>t(gm,{variant:o,onClick:()=>window.open(`https://docs.odigos.io${r}`,"_blank","noopener noreferrer"),children:[e(Ot,{size:18}),"Docs"]}),xm=o(Tn)`
|
|
1307
1307
|
border-bottom: ${({$hideBorder:e,theme:t})=>e?"none":`1px solid ${t.colors.border}`};
|
|
1308
|
-
`,
|
|
1308
|
+
`,ym=o.div`
|
|
1309
1309
|
display: flex;
|
|
1310
1310
|
align-items: center;
|
|
1311
1311
|
border-bottom: 2px solid ${({theme:e,$selected:t})=>t?e.colors.majestic_blue:"transparent"};
|
|
1312
1312
|
cursor: pointer;
|
|
1313
|
-
`,
|
|
1313
|
+
`,bm=o(Si)`
|
|
1314
1314
|
padding: 12px;
|
|
1315
1315
|
font-size: 14px;
|
|
1316
1316
|
color: ${({theme:e,$selected:t})=>t?e.text.secondary:e.text.grey};
|
|
1317
|
-
`,
|
|
1317
|
+
`,vm=({tabs:r,hideBorder:o=!1})=>r?.length?e(xm,{$hideBorder:o,children:r.map(({label:r,icon:o,onClick:n,selected:i})=>t(ym,{onClick:n,$selected:i,children:[e(bm,{$selected:i,children:r}),o&&e(o,{})]},`tab-${r}`))}):null,$m=o.section`
|
|
1318
1318
|
padding: 0px 32px;
|
|
1319
1319
|
border-bottom: 1px solid ${({theme:e})=>e.colors.border};
|
|
1320
|
-
`,
|
|
1320
|
+
`,wm=o.div`
|
|
1321
1321
|
height: 76px;
|
|
1322
1322
|
display: flex;
|
|
1323
1323
|
justify-content: space-between;
|
|
1324
1324
|
flex-shrink: 0;
|
|
1325
1325
|
align-self: stretch;
|
|
1326
|
-
`,
|
|
1326
|
+
`,Sm=o.div`
|
|
1327
1327
|
display: flex;
|
|
1328
1328
|
align-items: center;
|
|
1329
1329
|
gap: ${({$gap:e})=>e||16}px;
|
|
1330
|
-
`,
|
|
1330
|
+
`,km=o(Si)`
|
|
1331
1331
|
font-size: 18px;
|
|
1332
1332
|
line-height: 26px;
|
|
1333
1333
|
max-width: ${({$maxWidth:e})=>e};
|
|
1334
1334
|
overflow: hidden;
|
|
1335
1335
|
white-space: nowrap;
|
|
1336
1336
|
text-overflow: ellipsis;
|
|
1337
|
-
`,
|
|
1337
|
+
`,Cm=o(Al)`
|
|
1338
1338
|
gap: 8px;
|
|
1339
|
-
`,
|
|
1339
|
+
`,Em=o(Al)``,Am=({onClose:r,width:o,icons:n,iconSrcs:i,title:a,titleTooltip:s,replaceTitleWith:l,actions:c,actionButtons:d=[],tabs:p})=>t($m,{children:[t(wm,{children:[t(Sm,{children:[n?.length||i?.length?e(Hd,{icons:n,iconSrcs:i,id:`drawer-header-${a}`}):null,("function"==typeof l?e(l,{}):l||null)||e(Rc,{text:s||a,withIcon:!!s,children:a&&e(km,{$maxWidth:`calc(${o} ${c||d.length?"/ 5":"- 192px"})`,children:a})})]}),t(Sm,{$gap:2,children:[c,d.map((t,r)=>e(Cm,{...t},`header-action-button-${r}`)),e(Em,{"data-id":"drawer-close",variant:"secondary",onClick:r,children:e(yt,{size:12})})]})]}),e(vm,{tabs:p,hideBorder:!0})]}),Dm=o.div`
|
|
1340
1340
|
display: flex;
|
|
1341
1341
|
justify-content: space-between;
|
|
1342
1342
|
gap: 8px;
|
|
@@ -1344,17 +1344,17 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1344
1344
|
border-top: 1px solid ${({theme:e})=>e.colors.border};
|
|
1345
1345
|
background-color: ${({theme:e})=>e.colors.translucent_bg};
|
|
1346
1346
|
transform: translateY(100%);
|
|
1347
|
-
animation-name: ${
|
|
1348
|
-
`,
|
|
1347
|
+
animation-name: ${fl.in.bottom};
|
|
1348
|
+
`,Tm=o(Tn)`
|
|
1349
1349
|
margin-right: auto;
|
|
1350
|
-
`,
|
|
1350
|
+
`,Im=o(Tn)`
|
|
1351
1351
|
margin: 0 auto;
|
|
1352
|
-
`,
|
|
1352
|
+
`,Nm=o(Tn)`
|
|
1353
1353
|
margin-left: auto;
|
|
1354
|
-
`,
|
|
1354
|
+
`,Rm=o(Al)`
|
|
1355
1355
|
min-width: 140px;
|
|
1356
1356
|
font-size: 14px;
|
|
1357
|
-
`,
|
|
1357
|
+
`,Om=({isOpen:r,leftButtons:o=[],centerButtons:n=[],rightButtons:i=[]})=>r?t(Dm,{children:[e(Tm,{children:o.map((t,r)=>e(Rm,{...t},`footer-left-button-${r}`))}),e(Im,{children:n.map((t,r)=>e(Rm,{...t},`footer-center-button-${r}`))}),e(Nm,{children:i.map((t,r)=>e(Rm,{...t},`footer-right-button-${r}`))})]}):null,_m=o.div`
|
|
1358
1358
|
position: fixed;
|
|
1359
1359
|
top: 0;
|
|
1360
1360
|
bottom: 0;
|
|
@@ -1362,56 +1362,56 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1362
1362
|
z-index: 1000;
|
|
1363
1363
|
width: ${({$width:e})=>e};
|
|
1364
1364
|
background: ${({theme:e})=>e.colors.translucent_bg};
|
|
1365
|
-
box-shadow: 0 2px 10px ${({theme:e})=>e.colors.primary+
|
|
1365
|
+
box-shadow: 0 2px 10px ${({theme:e})=>e.colors.primary+ml["010"]};
|
|
1366
1366
|
overflow-y: auto;
|
|
1367
|
-
animation-name: ${({$position:e})=>
|
|
1368
|
-
`,
|
|
1367
|
+
animation-name: ${({$position:e})=>fl.in[e]};
|
|
1368
|
+
`,Fm=o.div`
|
|
1369
1369
|
display: flex;
|
|
1370
1370
|
flex-direction: column;
|
|
1371
1371
|
height: 100%;
|
|
1372
|
-
`,
|
|
1372
|
+
`,Pm=o.div`
|
|
1373
1373
|
flex-grow: 1;
|
|
1374
1374
|
padding: 24px 32px;
|
|
1375
1375
|
overflow-y: auto;
|
|
1376
|
-
`,
|
|
1376
|
+
`,Lm=({isOpen:o,onClose:n,closeOnEscape:i=!0,position:a="right",width:s="300px",children:l,header:c,footer:d})=>(Hl({key:"Escape",active:o&&i},()=>n()),Nl(o),o?dr.createPortal(t(r,{children:[e(On,{hidden:!o,onClick:n}),e(_m,{"data-id":"drawer",$position:a,$width:s,children:t(Fm,{children:[e(Am,{onClose:n,width:s,...c}),e(Pm,{children:l}),e(Om,{...d})]})})]}),document.body):null),zm=({error:r})=>{const o=i(),n={container:{display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",color:o.text.error,fontFamily:o.font_family.primary},errorMessage:{padding:10,borderRadius:5,whiteSpace:"pre-wrap",background:o.colors.error},errorStack:{whiteSpace:"pre-wrap",fontSize:"12px"},errorStackWrapper:{textAlign:"left",marginTop:10},infoText:{marginTop:100,color:o.text.secondary,fontSize:"14px"}};return t("div",{style:n.container,children:[e("h2",{children:"Something went wrong!"}),e("pre",{style:n.errorMessage,children:r?.message||"Unknown Error"}),t("details",{style:n.errorStackWrapper,children:[e("summary",{children:"Stack Trace"}),e("pre",{style:n.errorStack,children:r?.stack||"Unknown Stack"})]}),e("p",{style:n.infoText,children:"Try refreshing the page or contact support"}),e(Al,{variant:"secondary",onClick:()=>window.location.reload(),style:{fontSize:"1rem"},children:"Reload"})]})},Mm=({children:t})=>e(mr,{FallbackComponent:({error:t,...r})=>e(hl,{children:e(zm,{...r,error:t})}),children:t}),Bm=o(Tn)`
|
|
1377
1377
|
position: relative;
|
|
1378
1378
|
width: calc(100% - 24px);
|
|
1379
1379
|
padding: 12px;
|
|
1380
1380
|
background-color: ${({theme:e})=>e.colors.dark_grey};
|
|
1381
|
-
border-bottom: 1px solid ${({theme:e})=>e.colors.border+
|
|
1382
|
-
`,
|
|
1381
|
+
border-bottom: 1px solid ${({theme:e})=>e.colors.border+ml["050"]};
|
|
1382
|
+
`,Um=o(Tn)`
|
|
1383
1383
|
margin-right: auto;
|
|
1384
1384
|
margin-left: 32px;
|
|
1385
1385
|
gap: 12px;
|
|
1386
|
-
`,
|
|
1386
|
+
`,jm=o(Tn)`
|
|
1387
1387
|
margin-left: auto;
|
|
1388
1388
|
margin-right: 32px;
|
|
1389
1389
|
gap: 12px;
|
|
1390
|
-
`,
|
|
1390
|
+
`,Wm=o(Tn)`
|
|
1391
1391
|
position: absolute;
|
|
1392
1392
|
left: 50%;
|
|
1393
1393
|
transform: translateX(-50%);
|
|
1394
1394
|
gap: 12px;
|
|
1395
|
-
`,
|
|
1395
|
+
`,Hm=({left:r=[],center:o=[],right:n=[]})=>t(Bm,{children:[e(Um,{children:r.map((t,r)=>t&&e(jt,{children:t},r))}),e(Wm,{children:o.map((t,r)=>t&&e(jt,{children:t},r))}),e(jm,{children:n.map((t,r)=>t&&e(jt,{children:t},r))})]}),Xm=o(Si)`
|
|
1396
1396
|
color: ${({theme:e})=>e.text.grey};
|
|
1397
|
-
`,
|
|
1397
|
+
`,Gm=({icon:r,title:o,badge:n,badgeTooltip:i,loading:a})=>t(Tn,{$gap:6,children:[r&&e(r,{}),e(Xm,{size:14,children:o}),void 0!==n&&e(Rc,{text:i,children:e(Sl,{label:n})}),a&&e(yd,{})]}),Vm=o.div`
|
|
1398
1398
|
width: fit-content;
|
|
1399
1399
|
height: fit-content;
|
|
1400
1400
|
padding: 4px;
|
|
1401
1401
|
gap: 4px;
|
|
1402
1402
|
border-radius: 32px;
|
|
1403
|
-
border: 1px solid ${({theme:e})=>e.colors.border+
|
|
1403
|
+
border: 1px solid ${({theme:e})=>e.colors.border+ml["070"]};
|
|
1404
1404
|
|
|
1405
1405
|
display: flex;
|
|
1406
1406
|
flex-direction: ${({$orientation:e,$flip:t})=>("horizontal"===e?"row":"column")+(t?"-reverse":"")};
|
|
1407
1407
|
align-items: center;
|
|
1408
1408
|
justify-content: center;
|
|
1409
|
-
`,
|
|
1409
|
+
`,Km=o.div`
|
|
1410
1410
|
width: 32px;
|
|
1411
1411
|
height: 32px;
|
|
1412
1412
|
|
|
1413
1413
|
border-radius: 100%;
|
|
1414
|
-
background-color: ${({theme:e,$selected:t})=>t?e.colors.majestic_blue+
|
|
1414
|
+
background-color: ${({theme:e,$selected:t})=>t?e.colors.majestic_blue+ml["070"]:e.colors.secondary+ml["012"]};
|
|
1415
1415
|
transition: background-color 0.3s;
|
|
1416
1416
|
|
|
1417
1417
|
display: flex;
|
|
@@ -1419,63 +1419,63 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1419
1419
|
justify-content: center;
|
|
1420
1420
|
|
|
1421
1421
|
cursor: pointer;
|
|
1422
|
-
`,
|
|
1422
|
+
`,qm=({orientation:r="vertical",flip:o,mainIcons:n,subIcons:i})=>t(Vm,{$orientation:r,$flip:o,children:[n.map(({icon:t,selected:r,onClick:o,tooltip:n},i)=>e(Rc,{text:n,children:e(Km,{$selected:r,onClick:o,children:e(t,{size:20})})},`main-nav-icon-${i}`)),!!n.length&&!!i.length&&e(vc,{orientation:"vertical"===r?"horizontal":"vertical",margin:"0",length:"20px"}),i.map(({icon:t,selected:r,onClick:o,tooltip:n},i)=>e(Rc,{text:n,children:e(Km,{$selected:r,onClick:o,children:e(t,{size:20})})},`sub-nav-icon-${i}`))]}),Jm=o.div`
|
|
1423
1423
|
display: flex;
|
|
1424
1424
|
flex-direction: column;
|
|
1425
1425
|
width: 100%;
|
|
1426
|
-
`,
|
|
1426
|
+
`,Ym=o.div`
|
|
1427
1427
|
display: flex;
|
|
1428
1428
|
flex-direction: column;
|
|
1429
1429
|
gap: 8px;
|
|
1430
|
-
`,
|
|
1430
|
+
`,Qm=o.div`
|
|
1431
1431
|
display: flex;
|
|
1432
1432
|
align-items: center;
|
|
1433
1433
|
gap: 16px;
|
|
1434
|
-
`,
|
|
1434
|
+
`,Zm=o(Fc)`
|
|
1435
1435
|
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1436
1436
|
opacity: ${({$disabled:e})=>e?.5:1};
|
|
1437
|
-
`,
|
|
1437
|
+
`,eg=({initialValues:r=[],value:o,onChange:n,title:i,tooltip:a,required:s,errorMessage:l})=>{const[c,d]=Wt(o||r);Ht(()=>{c.length||d([""])},[]);const p=c.filter(e=>!!e.trim()),u=Gt(JSON.stringify(p));Ht(()=>{const e=JSON.stringify(p);u.current!==e&&(u.current=e,n&&n(p))},[p]);const h=(e,t)=>{d(r=>{const o=[...r];return o[t]=e,o})},m=c.length<=1,g=c.some(e=>""===e.trim()),f=m&&g;return t(Jm,{children:[e(lh,{title:i,required:s,tooltip:a}),e(Ym,{children:c.map((r,o)=>{const n=o===c.length-1;return t(Qm,{children:[e(gh,{value:r,onChange:e=>h(e.target.value,o),hasError:!!l,autoFocus:Qn(r)&&!m&&n}),o===c.length-1&&e(Zm,{withBorder:!0,size:30,$disabled:g,onClick:g?void 0:()=>{d(e=>{const t=[...e];return t.push(""),t})},children:e(St,{})}),e(Zm,{size:30,$disabled:f,onClick:f?void 0:()=>(e=>{m?h("",e):d(t=>t.filter((t,r)=>r!==e))})(o),children:e(It,{})})]},`input-list-${o}`)})}),!!l&&e(Ei,{children:l})]})},tg=({col:t,colIdx:r,row:o,rowIdx:n,rowsLength:i,maxWidth:a,handleChange:s,errorMessage:l,limitFieldsPerRow:c})=>{const{keyName:d,title:p,tooltip:u,placeholder:h,required:m,type:g,componentType:f,options:x,renderCondition:y}=t,b=o[d];if(y&&!y(o))return null;return e("td",{style:{maxWidth:a,padding:"4px 6px 4px 0"},children:(()=>{switch(f){case Hr.Dropdown:const t=x?.find(e=>e.id===b);return e(vh,{title:c?p:void 0,tooltip:c?u:void 0,placeholder:h,required:m,options:x||[],value:t,onSelect:e=>s(d,e.id,n),onDeselect:()=>s(d,"",n),hasError:!!l&&(!m||m&&Qn(b))});case"multi-dropdown":const o=Array.isArray(b)&&x?.filter(e=>b.includes(e.id))||[];return e(vh,{title:c?p:void 0,tooltip:c?u:void 0,placeholder:h,required:m,options:x||[],value:o,isMulti:!0,onSelect:e=>{const t=[...Array.isArray(b)?b:[],e.id];s(d,t,n)},onDeselect:e=>{const t=(Array.isArray(b)?b:[]).filter(t=>t!==e.id);s(d,t,n)},hasError:!!l&&(!m||m&&Qn(b))});default:const f=i>1&&n===i-1&&0===r&&Qn(b);return e(gh,{title:c?p:void 0,tooltip:c?u:void 0,placeholder:h,type:g,required:m,autoFocus:f,value:b,onChange:({target:{value:e}})=>s(d,e,n),style:{maxWidth:a,paddingLeft:10},hasError:!!l&&(!m||m&&Qn(b))})}})()},`input-table-${n}-${d}`)},rg=o.div`
|
|
1438
1438
|
display: flex;
|
|
1439
1439
|
flex-direction: column;
|
|
1440
1440
|
width: 100%;
|
|
1441
|
-
`,
|
|
1441
|
+
`,og=o.button`
|
|
1442
1442
|
margin-top: ${({$marginTop:e})=>e};
|
|
1443
1443
|
background: none;
|
|
1444
1444
|
border: none;
|
|
1445
1445
|
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
1446
1446
|
opacity: ${({disabled:e})=>e?.5:1};
|
|
1447
|
-
`,
|
|
1447
|
+
`,ng=({columns:r,initialValues:o=[],value:n,onChange:i,errorMessage:a,limitFieldsPerRow:s,title:l=""})=>{const[c,d]=Wt({}),[p,u]=Wt(n||o),h=Xt(()=>new Map(r.map(e=>[e.keyName,e])),[r]);Ht(()=>{if(!p.length){const e={};r.forEach(({keyName:t})=>e[t]=""),d(e),u([e])}},[]);const m=p.filter(e=>{for(const[t,r]of Object.entries(e)){const o=h.get(t);if((!o?.renderCondition||o.renderCondition(e))&&(o?.required&&Qn(r)))return!1}return!0}),g=Gt(JSON.stringify(m)),f=m.length!==p.length,x=`${Math.floor(640/((s||r.length)+.4))}px`;Ht(()=>{const e=JSON.stringify(m);g.current!==e&&(g.current=e,i&&i(m))},[m]);const y=(e,t,r)=>{u(o=>{const n=$r(o);return n[r][e]=t,n})},b=Xt(()=>{if(s){const e=[];for(let t=0;;t+=s){const o=r.slice(t,t+s);if(!o.length)break;e.push(o)}return e}return[r]},[s,r]);return t(rg,{children:[e(lh,{title:l}),t("table",{style:{borderCollapse:"collapse"},children:[!s&&e("thead",{children:t("tr",{children:[r.map(({title:t,tooltip:r,required:o})=>e("th",{style:{maxWidth:x},children:e(lh,{title:t,required:o,tooltip:r})},`input-table-head-${t}`)),e("th",{})]})}),e("tbody",{children:p.map((o,n)=>t(jt,{children:[s&&n>0?e("tr",{children:e("td",{colSpan:b.length,children:e(vc,{})})}):null,b.map((i,l)=>t("tr",{children:[i.map((t,r)=>e(tg,{col:t,colIdx:r,row:o,rowIdx:n,rowsLength:p.length,maxWidth:x,limitFieldsPerRow:s,errorMessage:a,handleChange:y},`input-table-row-${n}-col-${r}`)),0===l&&e("td",{children:e(og,{$marginTop:s?"24px":"0",onClick:()=>{return e=n,void(p.length>1?u(t=>t.filter((t,r)=>r!==e)):r.forEach(({keyName:t,type:r})=>y(t,r===Xr.Number?"0":"",e)));var e},children:e(It,{})})})]},`input-table-matrix-${n}-${l}`))]},`input-table-row-${n}`))})]}),!!a&&e(Ei,{children:a}),e(Rd,{onClick:()=>{u(e=>{const t=$r(e);return t.push($r(c)),t})},disabled:f})]})},ig=o.div`
|
|
1448
1448
|
display: flex;
|
|
1449
1449
|
flex-direction: column;
|
|
1450
1450
|
width: 100%;
|
|
1451
|
-
`,
|
|
1451
|
+
`,ag=o.div`
|
|
1452
1452
|
display: flex;
|
|
1453
1453
|
flex-direction: column;
|
|
1454
1454
|
gap: 8px;
|
|
1455
|
-
`,
|
|
1455
|
+
`,sg=o.div`
|
|
1456
1456
|
display: flex;
|
|
1457
1457
|
align-items: center;
|
|
1458
1458
|
gap: 8px;
|
|
1459
|
-
`,
|
|
1459
|
+
`,lg=o.div`
|
|
1460
1460
|
width: 100%;
|
|
1461
1461
|
max-width: ${({$maxWidth:e})=>e?`${e}px`:"unset"};
|
|
1462
|
-
`,
|
|
1462
|
+
`,cg=o(Fc)`
|
|
1463
1463
|
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1464
1464
|
opacity: ${({$disabled:e})=>e?.5:1};
|
|
1465
|
-
`,
|
|
1465
|
+
`,dg={key:"",value:""},pg=({initialKeyValuePairs:r=[],value:o,onChange:n,title:i,tooltip:a,disabled:s,required:l,errorMessage:c,keyPlaceholder:d="Key",valuePlaceholder:p="Value",inputMaxWidth:u=300})=>{const[h,m]=Wt(o||r);Ht(()=>{h.length||m([{...dg}])},[]);const g=h.filter(({key:e,value:t})=>!Qn(e.trim())&&!Qn(t.trim())),f=Gt(JSON.stringify(g));Ht(()=>{const e=JSON.stringify(g);f.current!==e&&(f.current=e,n&&n(g))},[g]);const x=(e,t,r)=>{m(o=>{const n=[...o];return n[r][e]=t,n})},y=h.length<=1,b=s||h.some(({key:e,value:t})=>""===e.trim()||""===t.trim()),v=s||y&&b;return t(ig,{children:[e(lh,{title:i,required:l,tooltip:a}),e(ag,{children:h.map(({key:r,value:o},n)=>t(sg,{children:[e(lg,{$maxWidth:u,children:e(gh,{placeholder:d,disabled:s,value:r,onChange:e=>x("key",e.target.value,n),hasError:!!c&&(!l||l&&!r),autoFocus:Qn(o)&&!y&&n===h.length-1})}),e(lg,{$maxWidth:n===h.length-1?u-38:u,children:e(gh,{placeholder:p,disabled:s,value:o,onChange:e=>x("value",e.target.value,n),hasError:!!c&&(!l||l&&Qn(o)),autoFocus:!1})}),n===h.length-1&&e(cg,{withBorder:!0,size:30,$disabled:b,onClick:b?void 0:()=>{m(e=>{const t=[...e];return t.push({...dg}),t})},children:e(St,{})}),e(cg,{size:30,$disabled:v,onClick:v?void 0:()=>(e=>{y?(x("key","",e),x("value","",e)):m(t=>t.filter((t,r)=>r!==e))})(n),children:e(It,{})})]},`key-value-input-list-${n}`))}),!!c&&e(Ei,{children:c})]})},ug=a`
|
|
1466
1466
|
0% {
|
|
1467
1467
|
background-position: 0% 50%;
|
|
1468
1468
|
}
|
|
1469
1469
|
100% {
|
|
1470
1470
|
background-position: 100% 50%;
|
|
1471
1471
|
}
|
|
1472
|
-
`,
|
|
1472
|
+
`,hg=o(Si)`
|
|
1473
1473
|
background: ${({$textColor:e,$stripColor:t})=>`linear-gradient(45deg, ${e} 0%, ${e} 40%, ${t} 50%, ${e} 60%, ${e} 100%)`};
|
|
1474
1474
|
background-size: 250% 100%; /* Expand background to allow movement */
|
|
1475
1475
|
background-clip: text;
|
|
1476
1476
|
color: transparent;
|
|
1477
|
-
animation: ${
|
|
1478
|
-
`,
|
|
1477
|
+
animation: ${ug} 1s reverse linear infinite;
|
|
1478
|
+
`,mg=({children:t="Loading...",textColor:r,stripColor:o,...n})=>{const a=i(),s=r||a.v2.colors.white[500],l=o||a.v2.colors.black[500];return e(hg,{$textColor:s,$stripColor:l,...n,children:t})},gg=o.div`
|
|
1479
1479
|
display: flex;
|
|
1480
1480
|
flex-direction: ${({$isVertical:e})=>e?"column":"row"};
|
|
1481
1481
|
gap: ${({$isVertical:e})=>e?"12px":"24px"};
|
|
@@ -1484,17 +1484,17 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1484
1484
|
border-radius: 32px;
|
|
1485
1485
|
padding: 8px;
|
|
1486
1486
|
`}
|
|
1487
|
-
`,
|
|
1487
|
+
`,fg=(e,t)=>!t?.length||!!t?.find(t=>t===e),xg=({isVertical:r,title:o="Monitors",required:n,errorMessage:i,allowedSignals:a,selectedSignals:s,setSelectedSignals:l})=>{const[c,d]=Wt(1===s.length),p=Gt(JSON.stringify(s));Ht(()=>{const e=s;e.length||Ms.forEach(({id:t})=>{fg(t,a)&&e.push(t)});const t=JSON.stringify(e);return p.current!==t&&(p.current=t,l(e),d(1===e.length)),()=>{p.current=""}},[a]);return t("div",{children:[o&&e(lh,{title:o,required:n}),e(gg,{$isVertical:r,$hasError:!!i,children:Ms.map(t=>{const r=fg(t.id,a),o=((e,t)=>!!t?.find(t=>t===e))(t.id,s);return r?e(rd,{title:t.value,disabled:!r||c&&o,value:o,onChange:e=>((e,t)=>{const r=e,o=t?[...s,r]:s.filter(e=>e!==r);l(o),d(1===o.length)})(t.id,e)},t.id):null})}),!!i&&e(Ei,{children:i})]})},yg=o.div`
|
|
1488
1488
|
display: flex;
|
|
1489
1489
|
gap: 8px;
|
|
1490
1490
|
align-items: center;
|
|
1491
|
-
`,
|
|
1491
|
+
`,bg=o(Al)`
|
|
1492
1492
|
display: flex;
|
|
1493
1493
|
align-items: center;
|
|
1494
1494
|
justify-content: center;
|
|
1495
1495
|
gap: 8px;
|
|
1496
1496
|
min-width: 90px;
|
|
1497
|
-
`,
|
|
1497
|
+
`,vg=({buttons:r})=>{const o=i(),n=({button:e,index:t})=>r.length>1&&0===t&&(e.icon||e.iconSrc),a=({button:t,rotate:r})=>t.icon?e(t.icon,{size:14,rotate:r,fill:o.text[t.variant||"secondary"]}):t.iconSrc?e("img",{src:t.iconSrc,alt:t.label,width:8,height:12}):null;return e(yg,{children:r.map((r,o)=>e(Rc,{text:r.tooltip||"",children:t(bg,{variant:r.variant||"secondary",onClick:r.onClick,disabled:r.disabled,children:[n({button:r,index:o})&&a({button:r,rotate:0}),r.label,!n({button:r,index:o})&&a({button:r,rotate:180})]},o)},o))})},$g=o.div`
|
|
1498
1498
|
width: 100%;
|
|
1499
1499
|
height: 100%;
|
|
1500
1500
|
|
|
@@ -1502,26 +1502,26 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1502
1502
|
animation: none !important;
|
|
1503
1503
|
transition: none !important;
|
|
1504
1504
|
}
|
|
1505
|
-
`,
|
|
1505
|
+
`,wg=({width:t="100%",height:r="100%",gap:o=0,elements:n,noAnimation:i=!1,onTopIndexChange:a})=>{const s=Gt(null),l=Xt(()=>o?n.map((t,r)=>e("div",{style:{paddingBottom:o},children:t},`scroll-y-item-${r}`)):n,[n,o]),c=Vt(e=>{if(!a||!s.current)return;const t=s.current.findItemIndex(e);a(t)},[a]),d=e(fr,{ref:s,style:{width:t,height:r},onScroll:a?c:void 0,children:l});return i?e($g,{children:d}):d},Sg=o.div`
|
|
1506
1506
|
display: flex;
|
|
1507
1507
|
justify-content: space-between;
|
|
1508
1508
|
align-items: center;
|
|
1509
1509
|
gap: 16px;
|
|
1510
|
-
`,
|
|
1510
|
+
`,kg=o.div`
|
|
1511
1511
|
display: flex;
|
|
1512
1512
|
flex-direction: column;
|
|
1513
1513
|
gap: 4px;
|
|
1514
|
-
`,
|
|
1514
|
+
`,Cg=o.div`
|
|
1515
1515
|
display: flex;
|
|
1516
1516
|
align-items: center;
|
|
1517
1517
|
gap: 8px;
|
|
1518
|
-
`,
|
|
1518
|
+
`,Eg=o(Si)``,Ag=o(Si)``,Dg=({title:r,description:o,badgeLabel:n,icon:i,actionButton:a,size:s="medium"})=>{const l="small"===s?16:"medium"===s?20:24,c="small"===s?12:"medium"===s?14:16;return t(Sg,{children:[t(kg,{children:[t(Cg,{children:[i&&e(i,{size:l}),e(Eg,{weight:300,size:l,children:r}),void 0!==n&&e(Sl,{label:n,filled:!!n})]}),e(Ag,{weight:200,opacity:.8,size:c,children:o})]}),a&&e("div",{children:a})]})},Tg=o.div`
|
|
1519
1519
|
position: relative;
|
|
1520
1520
|
gap: 0;
|
|
1521
1521
|
z-index: 0;
|
|
1522
1522
|
display: grid;
|
|
1523
1523
|
grid-template-columns: repeat(${({$count:e})=>e}, 1fr);
|
|
1524
|
-
`,
|
|
1524
|
+
`,Ig=o.button`
|
|
1525
1525
|
flex: 1;
|
|
1526
1526
|
display: flex;
|
|
1527
1527
|
align-items: center;
|
|
@@ -1535,7 +1535,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1535
1535
|
&:hover {
|
|
1536
1536
|
border: 1px solid ${({theme:e})=>e.colors.secondary};
|
|
1537
1537
|
}
|
|
1538
|
-
`,
|
|
1538
|
+
`,Ng=o.div`
|
|
1539
1539
|
position: absolute;
|
|
1540
1540
|
top: ${({$y:e})=>e}px;
|
|
1541
1541
|
left: ${({$x:e})=>e}px;
|
|
@@ -1545,85 +1545,85 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1545
1545
|
background-color: ${({theme:e,$bgColor:t})=>t||e.colors.dropdown_bg_2};
|
|
1546
1546
|
border-radius: ${({$isFirstItem:e,$isLastItem:t})=>e?"32px 0px 0px 32px":t?"0px 32px 32px 0px":"0"};
|
|
1547
1547
|
transition: all 0.3s;
|
|
1548
|
-
`,
|
|
1548
|
+
`,Rg=({options:r=[],selected:o,setSelected:n})=>{const i=r.findIndex(e=>e.value===o),[a,s]=Wt(r[i]?.selectedBgColor||""),[l,c]=Wt({width:0,height:0}),[d,p]=Wt({x:0,y:0}),u=Gt(null);return Ht(()=>{u.current&&(c({width:u.current.offsetWidth,height:u.current.offsetHeight}),p({x:u.current.offsetWidth*i,y:0}))},[o,i]),t(Tg,{$count:r.length,children:[r.map(({icon:i,label:a,value:l,selectedBgColor:c,selectedTextColor:d},p)=>{const h=o===l;return t(Ig,{ref:h?u:void 0,$isFirstItem:0===p,$isLastItem:p===r.length-1,onClick:()=>{n(l),s(c||"")},children:[i&&e(i,{}),a&&e(Si,{size:12,family:"secondary",decoration:"underline",color:h?d:void 0,children:a})]},`segment-${a||p}-${l}`)}),e(Ng,{$bgColor:a,$width:l.width,$height:l.height,$x:d.x,$y:d.y,$isFirstItem:0===i,$isLastItem:i===r.length-1})]})},Og=o(Al)`
|
|
1549
1549
|
gap: 8px;
|
|
1550
1550
|
text-transform: none;
|
|
1551
1551
|
text-decoration: none;
|
|
1552
1552
|
border: ${({theme:e,$withBorder:t})=>`1px solid ${t?e.colors.border:"transparent"}`};
|
|
1553
1553
|
&.not-selected {
|
|
1554
|
-
background-color: ${({theme:e,$color:t})=>t||e.colors.dropdown_bg_2+
|
|
1554
|
+
background-color: ${({theme:e,$color:t})=>t||e.colors.dropdown_bg_2+ml["060"]};
|
|
1555
1555
|
&:hover {
|
|
1556
1556
|
background-color: ${({theme:e,$hoverColor:t})=>t||e.colors.dropdown_bg_2};
|
|
1557
1557
|
}
|
|
1558
1558
|
}
|
|
1559
1559
|
&.selected {
|
|
1560
|
-
background-color: ${({theme:e})=>e.colors.majestic_blue+
|
|
1560
|
+
background-color: ${({theme:e})=>e.colors.majestic_blue+ml["030"]};
|
|
1561
1561
|
}
|
|
1562
|
-
`,
|
|
1562
|
+
`,_g=o(Si)`
|
|
1563
1563
|
white-space: nowrap;
|
|
1564
1564
|
overflow: hidden;
|
|
1565
1565
|
text-overflow: ellipsis;
|
|
1566
1566
|
font-size: 14px;
|
|
1567
|
-
`,
|
|
1567
|
+
`,Fg=({label:r,onClick:o,icon:n,iconSrc:a,badgeLabel:s,badgeFilled:l,isSelected:c,withBorder:d,color:p,hoverColor:u,style:h})=>{const m=i();return t(Og,{onClick:o,className:c?"selected":"not-selected",$withBorder:d,$color:p,$hoverColor:u,style:h,children:[n&&e("div",{children:e(n,{fill:m.text.info})}),a&&e("div",{children:e("img",{src:a,alt:"",width:16,height:16})}),e(_g,{children:r}),c&&e("div",{children:e(ft,{fill:m.colors.majestic_blue_soft})}),void 0!==s&&e(Sl,{label:s,filled:l||c})]})},Pg=o.div`
|
|
1568
1568
|
display: flex;
|
|
1569
1569
|
flex-direction: column;
|
|
1570
1570
|
gap: 16px;
|
|
1571
1571
|
${({$maxWidth:e})=>e&&`max-width: ${e};`}
|
|
1572
|
-
`,
|
|
1572
|
+
`,Lg=o.div`
|
|
1573
1573
|
display: flex;
|
|
1574
1574
|
align-items: center;
|
|
1575
1575
|
gap: 16px;
|
|
1576
|
-
`,
|
|
1576
|
+
`,zg=o.div`
|
|
1577
1577
|
width: 50px;
|
|
1578
1578
|
height: 50px;
|
|
1579
1579
|
border-radius: 8px;
|
|
1580
1580
|
background: ${({theme:e})=>`linear-gradient(90deg, ${e.colors.dropdown_bg_2} 25%, ${e.colors.dropdown_bg_2} 50%, ${e.colors.border} 75%)`};
|
|
1581
1581
|
background-size: 200% 100%;
|
|
1582
|
-
animation: ${
|
|
1583
|
-
`,
|
|
1582
|
+
animation: ${bl} 10s infinite linear;
|
|
1583
|
+
`,Mg=o(In)`
|
|
1584
1584
|
flex: 1;
|
|
1585
1585
|
gap: 12px;
|
|
1586
|
-
`,
|
|
1586
|
+
`,Bg=o.div`
|
|
1587
1587
|
width: ${({$width:e})=>e};
|
|
1588
1588
|
height: 16px;
|
|
1589
1589
|
background: ${({theme:e})=>`linear-gradient(90deg, ${e.colors.dropdown_bg_2} 25%, ${e.colors.dropdown_bg_2} 50%, ${e.colors.border} 75%)`};
|
|
1590
1590
|
background-size: 200% 100%;
|
|
1591
|
-
animation: ${
|
|
1591
|
+
animation: ${bl} 1.5s infinite linear;
|
|
1592
1592
|
border-radius: 4px;
|
|
1593
|
-
`,
|
|
1593
|
+
`,Ug=({size:r=5,maxWidth:o})=>e(Pg,{$maxWidth:o,children:[...Array(r)].map((r,o)=>t(Lg,{children:[e(zg,{}),t(Mg,{children:[e(Bg,{$width:"80%"}),e(Bg,{$width:"100%"})]})]},o))});var jg;!function(e){e.Active="active",e.Disabled="disabled",e.Finished="finish"}(jg||(jg={}));const Wg=o.div`
|
|
1594
1594
|
display: flex;
|
|
1595
1595
|
flex-direction: column;
|
|
1596
1596
|
gap: 32px;
|
|
1597
|
-
`,
|
|
1597
|
+
`,Hg=o.div`
|
|
1598
1598
|
display: flex;
|
|
1599
1599
|
gap: 16px;
|
|
1600
1600
|
padding: 8px;
|
|
1601
|
-
opacity: ${({$state:e})=>e===
|
|
1601
|
+
opacity: ${({$state:e})=>e===jg.Active?1:e===jg.Disabled?.5:.8};
|
|
1602
1602
|
transition: all 0.3s;
|
|
1603
|
-
`,
|
|
1603
|
+
`,Xg=o(Tn)`
|
|
1604
1604
|
justify-content: center;
|
|
1605
1605
|
width: 24px;
|
|
1606
1606
|
height: 24px;
|
|
1607
1607
|
border-radius: 32px;
|
|
1608
|
-
border: ${({theme:e,$state:t})=>t===
|
|
1609
|
-
opacity: ${({$state:e})=>e===
|
|
1610
|
-
`,
|
|
1608
|
+
border: ${({theme:e,$state:t})=>t===jg.Disabled?`1px dashed ${e.text.dark_grey}`:`1px solid ${e.colors.secondary}`};
|
|
1609
|
+
opacity: ${({$state:e})=>e===jg.Finished?.8:1};
|
|
1610
|
+
`,Gg=o(In)`
|
|
1611
1611
|
justify-content: center;
|
|
1612
1612
|
gap: 8px;
|
|
1613
|
-
`,
|
|
1613
|
+
`,Vg=o(Si)``,Kg=o(Si)``,qg=({data:r,currentStep:o=0})=>{const[n,i]=Wt([]);return Ht(()=>{i(r.map((e,t)=>t<o-1?{...e,state:jg.Finished,subtitle:e.subtitle||Gr.Success}:t===o-1?{...e,state:jg.Active,subtitle:""}:{...e,state:jg.Disabled,subtitle:""}))},[o,r]),e(Wg,{children:n.map((r,o)=>t(Hg,{$state:r.state,children:[e(Xg,{$state:r.state,children:[jg.Active,jg.Disabled].includes(r.state)?e(Si,{size:12,children:r.stepNumber}):r.state===jg.Finished?e(ft,{size:20}):null}),t(Gg,{children:[e(Vg,{family:"secondary",children:r.title}),r.subtitle&&e(Kg,{size:10,weight:300,children:r.subtitle})]})]},o))})},Jg=o(Tn)`
|
|
1614
1614
|
width: fit-content;
|
|
1615
1615
|
gap: 6px;
|
|
1616
1616
|
padding: 6px 12px;
|
|
1617
1617
|
border-radius: 360px;
|
|
1618
1618
|
background-color: ${({$type:e,theme:t})=>t.colors[e]};
|
|
1619
|
-
`,
|
|
1619
|
+
`,Yg=o(Si)`
|
|
1620
1620
|
color: ${({$type:e,theme:t})=>t.text[e]};
|
|
1621
|
-
`,
|
|
1621
|
+
`,Qg=({type:r=Gr.Info,icon:o,title:n,size:i,family:a,children:s,...l})=>t(Jg,{$type:r,children:[o&&e(o,{}),e(Yg,{$type:r,size:i||12,family:a||"secondary",...l,children:s||n})]}),Zg=o.div`
|
|
1622
1622
|
display: flex;
|
|
1623
1623
|
flex-direction: column;
|
|
1624
1624
|
position: relative;
|
|
1625
1625
|
width: 100%;
|
|
1626
|
-
`,
|
|
1626
|
+
`,ef=o.div`
|
|
1627
1627
|
width: 100%;
|
|
1628
1628
|
display: flex;
|
|
1629
1629
|
align-items: center;
|
|
@@ -1651,7 +1651,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1651
1651
|
&:focus-within {
|
|
1652
1652
|
border-color: ${({theme:e})=>e.colors.secondary};
|
|
1653
1653
|
}
|
|
1654
|
-
`,
|
|
1654
|
+
`,tf=o.textarea`
|
|
1655
1655
|
flex: 1;
|
|
1656
1656
|
border: none;
|
|
1657
1657
|
outline: none;
|
|
@@ -1675,13 +1675,13 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1675
1675
|
background-color: ${({theme:e})=>e.colors.border};
|
|
1676
1676
|
cursor: not-allowed;
|
|
1677
1677
|
}
|
|
1678
|
-
`,
|
|
1678
|
+
`,rf=({errorMessage:r,title:o,tooltip:n,required:i,onChange:a,name:s,...l})=>{const c=Gt(null),d=e=>{c.current&&(c.current.style.height="auto",e&&(c.current.style.height=`${c.current.scrollHeight}px`))};return t(Zg,{children:[e(lh,{title:o,required:i,tooltip:n}),e(ef,{$disabled:l.disabled,$hasError:!!r,$isActive:!!l.autoFocus,children:e(tf,{ref:c,"data-id":s,name:s,onFocus:()=>d(!0),onBlur:()=>d(!1),onChange:e=>{e.stopPropagation(),d(!0),a?.(e)},onKeyDown:e=>{e.stopPropagation()},...l})}),!!r&&e(Ei,{children:r})]})},of=o.div`
|
|
1679
1679
|
display: flex;
|
|
1680
1680
|
align-items: center;
|
|
1681
1681
|
gap: 12px;
|
|
1682
1682
|
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1683
1683
|
opacity: ${({$disabled:e})=>e?.6:1};
|
|
1684
|
-
`,
|
|
1684
|
+
`,nf=o.div`
|
|
1685
1685
|
width: 24px;
|
|
1686
1686
|
height: 12px;
|
|
1687
1687
|
border: 1px ${({$isActive:e,theme:t})=>e?`solid ${t.colors.majestic_blue}`:`dashed ${t.text.grey}`};
|
|
@@ -1703,11 +1703,11 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1703
1703
|
transform: ${({$isActive:e})=>e?"translateX(12px)":"translateX(0)"};
|
|
1704
1704
|
transition: background-color 0.3s, transform 0.3s;
|
|
1705
1705
|
}
|
|
1706
|
-
`,
|
|
1706
|
+
`,af=({title:r,tooltip:o,initialValue:n=!1,onChange:i,disabled:a,allowPropagation:s=!1,flipHorizontally:l})=>{const[c,d]=Wt(n);Ht(()=>d(n),[n]);return t(of,{$disabled:a,onClick:e=>{a||(s||e.stopPropagation(),i?i(!c):d(e=>!e))},children:[!l&&e(nf,{$disabled:a,$isActive:c}),(r||o)&&e(Rc,{text:o,withIcon:!0,children:r&&e(Si,{size:14,children:r})}),l&&e(nf,{$disabled:a,$isActive:c})]})};var sf={v:"5.12.1",fr:60,ip:0,op:80,w:220,h:620,nm:"Odigos - Trace Loader",ddd:0,assets:[{id:"comp_0",nm:"moving lines-5",fr:60,layers:[{ddd:0,ind:1,ty:4,nm:"moving lines-5",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[6.097,.571,0],ix:2,l:2},a:{a:0,k:[-.046,-149.04,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[-.055,-173.88],[.095,546.629]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"st",c:{a:0,k:[.976470588235,.976470588235,.976470588235,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:6,ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[85.714,85.714],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Vector",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.757],y:[.459]},o:{x:[.441],y:[0]},t:2.4,s:[0]},{i:{x:[.574],y:[.569]},o:{x:[.451],y:[.436]},t:18.172,s:[23.624]},{i:{x:[.571],y:[1]},o:{x:[.173],y:[.635]},t:36.174,s:[85.889]},{t:51,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[.757],y:[.582]},o:{x:[.441],y:[0]},t:0,s:[0]},{i:{x:[.574],y:[.569]},o:{x:[.451],y:[.436]},t:12.174,s:[23.624]},{i:{x:[.571],y:[1]},o:{x:[.173],y:[.635]},t:30.174,s:[85.889]},{t:45,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1}],ip:0,op:51,st:-26,ct:1,bm:0}]},{id:"comp_1",nm:"moving lines-4",fr:60,layers:[{ddd:0,ind:1,ty:4,nm:"moving lines-4",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[5.475,.571,0],ix:2,l:2},a:{a:0,k:[.144,-156.04,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[.167,-182.047],[.314,547.797]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"st",c:{a:0,k:[.976470588235,.976470588235,.976470588235,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:6,ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[85.714,85.714],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Vector",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.757],y:[.459]},o:{x:[.441],y:[0]},t:17.9,s:[0]},{i:{x:[.574],y:[.569]},o:{x:[.451],y:[.436]},t:38.055,s:[23.624]},{i:{x:[.571],y:[1]},o:{x:[.173],y:[.635]},t:61.053,s:[85.889]},{t:80,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[.757],y:[.582]},o:{x:[.441],y:[0]},t:0,s:[0]},{i:{x:[.574],y:[.569]},o:{x:[.451],y:[.436]},t:15.553,s:[23.624]},{i:{x:[.571],y:[1]},o:{x:[.173],y:[.635]},t:38.555,s:[85.889]},{t:57.5,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1}],ip:0,op:80,st:-26,ct:1,bm:0}]},{id:"comp_2",nm:"moving lines-3",fr:60,layers:[{ddd:0,ind:1,ty:4,nm:"moving lines-3",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[5.841,.571,0],ix:2,l:2},a:{a:0,k:[.324,-150.04,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[.382,-175.047],[-.051,538.464]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"st",c:{a:0,k:[.976470588235,.976470588235,.976470588235,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:6,ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[85.714,85.714],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Vector",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.757],y:[.459]},o:{x:[.441],y:[0]},t:6,s:[0]},{i:{x:[.574],y:[.569]},o:{x:[.451],y:[.436]},t:23.525,s:[23.624]},{i:{x:[.571],y:[1]},o:{x:[.173],y:[.635]},t:43.525,s:[85.889]},{t:60,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[.757],y:[.582]},o:{x:[.441],y:[0]},t:0,s:[0]},{i:{x:[.574],y:[.569]},o:{x:[.451],y:[.436]},t:13.525,s:[23.624]},{i:{x:[.571],y:[1]},o:{x:[.173],y:[.635]},t:33.525,s:[85.889]},{t:50,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1}],ip:0,op:60,st:-26,ct:1,bm:0}]}],layers:[{ddd:0,ind:1,ty:0,nm:"moving lines-5",refId:"comp_0",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[213,1,0],ix:2,l:2},a:{a:0,k:[6,0,0],ix:1,l:2},s:{a:0,k:[100,99.4,100],ix:6,l:2}},ao:0,w:12,h:619,ip:-22,op:29,st:-22,ct:1,bm:0},{ddd:0,ind:2,ty:0,nm:"moving lines-5",refId:"comp_0",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[213,1,0],ix:2,l:2},a:{a:0,k:[6,0,0],ix:1,l:2},s:{a:0,k:[100,99.4,100],ix:6,l:2}},ao:0,w:12,h:619,ip:56,op:107,st:56,ct:1,bm:0},{ddd:0,ind:3,ty:0,nm:"moving lines-5",refId:"comp_0",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[213,1,0],ix:2,l:2},a:{a:0,k:[6,0,0],ix:1,l:2},s:{a:0,k:[100,99.4,100],ix:6,l:2}},ao:0,w:12,h:619,ip:22,op:73,st:22,ct:1,bm:0},{ddd:0,ind:4,ty:0,nm:"moving lines-4",refId:"comp_1",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[110.5,1,0],ix:2,l:2},a:{a:0,k:[5.5,0,0],ix:1,l:2},s:{a:0,k:[100,98.2,100],ix:6,l:2}},ao:0,w:11,h:627,ip:-65,op:15,st:-65,ct:1,bm:0},{ddd:0,ind:5,ty:0,nm:"moving lines-4",refId:"comp_1",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[110.5,1,0],ix:2,l:2},a:{a:0,k:[5.5,0,0],ix:1,l:2},s:{a:0,k:[100,98.2,100],ix:6,l:2}},ao:0,w:11,h:627,ip:14,op:94,st:14,ct:1,bm:0},{ddd:0,ind:6,ty:0,nm:"moving lines-3",refId:"comp_2",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[7,1,0],ix:2,l:2},a:{a:0,k:[5.5,0,0],ix:1,l:2},s:{a:0,k:[100,100.4,100],ix:6,l:2}},ao:0,w:11,h:613,ip:2,op:62,st:2,ct:1,bm:0},{ddd:0,ind:7,ty:0,nm:"moving lines-3",refId:"comp_2",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[7,1,0],ix:2,l:2},a:{a:0,k:[5.5,0,0],ix:1,l:2},s:{a:0,k:[100,100.4,100],ix:6,l:2}},ao:0,w:11,h:613,ip:-36,op:20,st:-40,ct:1,bm:0},{ddd:0,ind:8,ty:0,nm:"moving lines-3",refId:"comp_2",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[7,1,0],ix:2,l:2},a:{a:0,k:[5.5,0,0],ix:1,l:2},s:{a:0,k:[100,100.4,100],ix:6,l:2}},ao:0,w:11,h:613,ip:39,op:99,st:39,ct:1,bm:0},{ddd:0,ind:9,ty:4,nm:"Vector :M",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[110,309.736,0],ix:2,l:2},a:{a:0,k:[308.5,313.236,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[205.677,618.844],[205.677,4.807]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ind:1,ty:"sh",ix:2,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[411.428,618.822],[411.333,4.99]],c:!1},ix:2},nm:"Path 6",mn:"ADBE Vector Shape - Group",hd:!1},{ind:2,ty:"sh",ix:3,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[308.5,618.796],[308.5,5.145]],c:!1},ix:2},nm:"Path 7",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"st",c:{a:0,k:[.975244164467,.975244164467,.975244164467,.639999985695],ix:3},o:{a:0,k:64,ix:4},w:{a:0,k:1,ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 7",mn:"ADBE Vector Graphic - Stroke",hd:!1}],ip:0,op:684,st:0,ct:1,bm:0}],markers:[],props:{}};const lf=o.div`
|
|
1707
1707
|
width: ${({$width:e})=>e}px;
|
|
1708
1708
|
height: ${({$height:e})=>e}px;
|
|
1709
1709
|
position: relative;
|
|
1710
|
-
`,
|
|
1710
|
+
`,cf=({width:t=620})=>{const{darkMode:r}=i(),o=t/(620/220);return e(lf,{$width:t,$height:o,children:e(gr,{autoplay:!0,loop:!0,animationData:sf,style:{width:o,height:t,transform:"rotate(-90deg)",position:"absolute",top:-(o-o/10),left:o-o/10,filter:r?"invert(0)":"invert(1)"}})})},df=o.div`
|
|
1711
1711
|
display: flex;
|
|
1712
1712
|
align-items: center;
|
|
1713
1713
|
justify-content: center;
|
|
@@ -1717,17 +1717,17 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1717
1717
|
padding: ${({$hasLabel:e})=>e?"4px 8px":"4px"};
|
|
1718
1718
|
border-radius: 100px;
|
|
1719
1719
|
background-color: ${({$backgroundColor:e})=>e};
|
|
1720
|
-
`,
|
|
1720
|
+
`,pf=({label:r,leftIcon:o,rightIcon:n,tooltip:a,status:s=qr.Unknown,useSecondaryTone:l=!1,invertColors:c=!1,textSize:d,textColor:p,backgroundColor:u,minWidth:h="unset",fullWidth:m=!1})=>{const g=i(),f=r?.toString(),x=s?[qr.Disabled].includes(s)?on(g,s,c?"400":"700"):[qr.Unknown].includes(s)?on(g,s,"600"):on(g,s,c?l?"400":"300":l?"700":"500"):g.v2.colors.grey[200],y=p||(c&&![qr.Unknown].includes(s)?x:[qr.Disabled].includes(s)?g.v2.colors.grey[400]:[Gr.Error,Gr.Warning,Gr.Success].includes(s)?g.v2.colors.black[500]:g.v2.colors.white[500]),b=u||(c&&![qr.Unknown].includes(s)?[qr.Disabled].includes(s)?g.v2.colors.grey[700]:g.v2.colors.silver[600]:x);return e(Rc,{text:a,fullWidth:m,children:t(df,{$backgroundColor:b,$minWidth:h,$fullWidth:m,$hasLabel:!!f,children:[o&&e(o,{fill:y,size:14}),f&&e(cn,{color:y,size:d||sn.XXS,nowrap:!0,children:f}),n&&e(n,{fill:y,size:14})]})})},uf=o.span`
|
|
1721
1721
|
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1722
1722
|
font-size: ${({$smallAndDark:e})=>e?"12px":"14px"};
|
|
1723
1723
|
font-weight: 400;
|
|
1724
1724
|
color: ${({theme:e,$smallAndDark:t})=>t?e.v2.colors.grey[400]:e.v2.colors.silver[200]};
|
|
1725
|
-
`,
|
|
1725
|
+
`,hf=o.span`
|
|
1726
1726
|
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1727
1727
|
font-size: 14px;
|
|
1728
1728
|
font-weight: 400;
|
|
1729
1729
|
color: ${({theme:e})=>e.v2.colors.red[500]};
|
|
1730
|
-
`,
|
|
1730
|
+
`,mf=({label:r,tooltip:o,required:n,badge:i,width:a,smallAndDark:s})=>r||o||n?t(Tn,{$width:a,$justifyContent:"space-between",children:[r&&e(uf,{$smallAndDark:s,children:r}),t(Tn,{$gap:4,children:[i&&e(pf,{...i,textSize:sn.XXXS}),n&&e(hf,{children:"*"}),o&&e(Rc,{text:o,withIcon:!0})]})]}):null,gf=({errorMessage:r,warnMessage:o,helpMessage:n})=>{const a=i(),s=r?a.v2.colors.red[500]:o?a.v2.colors.yellow[500]:a.v2.colors.silver[200],l=e(rt,{size:12,fill:s});return r||o||n?t(Tn,{$alignItems:"center",children:[l&&e(In,{children:l}),e(cn,{size:sn.XXS,weight:400,color:s,children:r||o||n})]}):null},ff=o.div`
|
|
1731
1731
|
padding: ${({$small:e})=>e?"4px":"6px 12px"};
|
|
1732
1732
|
|
|
1733
1733
|
display: flex;
|
|
@@ -1745,7 +1745,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1745
1745
|
border: 1px solid ${({theme:e})=>e.v2.colors.silver[300]};
|
|
1746
1746
|
}
|
|
1747
1747
|
`}
|
|
1748
|
-
`,
|
|
1748
|
+
`,xf=o.input`
|
|
1749
1749
|
max-width: ${({$maxWidth:e})=>e||"unset"};
|
|
1750
1750
|
width: ${({$width:e})=>e||"unset"};
|
|
1751
1751
|
|
|
@@ -1771,12 +1771,12 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1771
1771
|
overflow: hidden;
|
|
1772
1772
|
text-overflow: ellipsis;
|
|
1773
1773
|
white-space: nowrap;
|
|
1774
|
-
`,
|
|
1774
|
+
`,yf=o.div`
|
|
1775
1775
|
display: flex;
|
|
1776
1776
|
align-items: center;
|
|
1777
1777
|
justify-content: center;
|
|
1778
1778
|
cursor: pointer;
|
|
1779
|
-
`,
|
|
1779
|
+
`,bf=({label:r,required:o,tooltip:n,badge:a,leftIcon:s,rightIcon:l,hasError:c,errorMessage:d,warnMessage:p,helpMessage:u,type:h=Xr.Text,name:m,value:g,onChange:f,disabled:x,maxWidth:y,width:b,small:v=!1,onClick:$,...w})=>{const S=i(),k=h===Xr.Password,[C,E]=Wt(!1),[A,D]=Wt(null),T=c||!!d||!!A,I=g?S.v2.colors.white[500]:x?S.v2.colors.grey[400]:S.v2.colors.silver[200],N=v?14:18;return t(In,{$width:b,$gap:6,children:[e(mf,{label:r,tooltip:n,required:o,badge:a}),t(ff,{$small:v,$disabled:x,$error:T,onClick:$,children:[s?e(s,{size:N,fill:I}):null,e(xf,{"data-id":m,type:C||h===Xr.Number?Xr.Text:h,name:m,value:g,onChange:e=>{e.stopPropagation();const t=e.target.value;h===Xr.Number&&(e.target.value=di(t),t&&t!==e.target.value?D("Please enter a valid number"):D(null)),f?.(e)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},disabled:x,$maxWidth:y,$width:b,$small:v,...w}),k?e(yf,{onClick:()=>E(e=>!e),children:e(C?At:Dt,{size:N,fill:I})}):l?e(l,{size:N,fill:I}):null]}),e(gf,{errorMessage:A||d,warnMessage:p,helpMessage:u})]})};var vf,$f;!function(e){e.S="s",e.L="l"}(vf||(vf={})),function(e){e.Filled="filled",e.Underline="underline"}($f||($f={}));const wf=o.div`
|
|
1780
1780
|
display: flex;
|
|
1781
1781
|
align-items: center;
|
|
1782
1782
|
gap: 2px;
|
|
@@ -1784,20 +1784,20 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1784
1784
|
border-radius: 8px;
|
|
1785
1785
|
border: 1px solid ${({theme:e})=>e.v2.colors.grey[500]};
|
|
1786
1786
|
background-color: ${({theme:e})=>e.v2.colors.silver[700]};
|
|
1787
|
-
`,
|
|
1787
|
+
`,Sf=o.button`
|
|
1788
1788
|
flex: 1;
|
|
1789
1789
|
display: flex;
|
|
1790
1790
|
align-items: center;
|
|
1791
1791
|
justify-content: center;
|
|
1792
1792
|
gap: 8px;
|
|
1793
|
-
padding: ${({$size:e})=>e===
|
|
1793
|
+
padding: ${({$size:e})=>e===vf.S?"4px 8px":"8px 16px"};
|
|
1794
1794
|
border-radius: 6px;
|
|
1795
1795
|
border: none;
|
|
1796
1796
|
box-shadow: ${({$isSelected:e})=>e?"0 0 11px 0 rgba(0, 0, 0, 0.32)":"none"};
|
|
1797
1797
|
|
|
1798
1798
|
${({$disabled:e,$isSelected:t,$selectedBgColor:r,theme:o})=>e?n`
|
|
1799
1799
|
cursor: not-allowed;
|
|
1800
|
-
background-color: ${t?(r||o.v2.colors.black[500])+
|
|
1800
|
+
background-color: ${t?(r||o.v2.colors.black[500])+ml["040"]:"transparent"};
|
|
1801
1801
|
`:n`
|
|
1802
1802
|
cursor: pointer;
|
|
1803
1803
|
background-color: ${t?r||o.v2.colors.black[500]:"transparent"};
|
|
@@ -1805,10 +1805,10 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1805
1805
|
background-color: ${t?r||o.v2.colors.black[500]:o.v2.colors.silver[800]};
|
|
1806
1806
|
}
|
|
1807
1807
|
`}
|
|
1808
|
-
`,
|
|
1808
|
+
`,kf=o.div`
|
|
1809
1809
|
display: flex;
|
|
1810
1810
|
align-items: stretch;
|
|
1811
|
-
`,
|
|
1811
|
+
`,Cf=o.button`
|
|
1812
1812
|
display: flex;
|
|
1813
1813
|
height: 34px;
|
|
1814
1814
|
padding: 8px 12px 8px 16px;
|
|
@@ -1827,7 +1827,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1827
1827
|
&:hover {
|
|
1828
1828
|
border-bottom-color: ${({theme:e,$isSelected:t})=>t?e.v2.colors.white[500]:e.v2.colors.grey[500]};
|
|
1829
1829
|
}
|
|
1830
|
-
`,
|
|
1830
|
+
`,Ef=({"data-id":o,size:n=vf.L,variant:a=$f.Filled,options:s=[],selected:l,setSelected:c,disabled:d})=>{const p=i(),u=a===$f.Underline,h=u?Cf:Sf;return e(u?kf:wf,{"data-id":o,children:s.map(({value:o,label:i,icon:a,tooltip:s,selectedBgColor:m,disabled:g},f)=>{const x=l===o,y=g||d,b=y?p.v2.colors.grey[400]:u||x?p.v2.colors.white[500]:p.v2.colors.grey[300],v=n===vf.S?sn.XXS:sn.XS,$=x?500:400,w=t(r,{children:[a&&e(a,{fill:b}),i&&e(cn,{size:v,weight:$,color:b,nowrap:!0,children:i})]});return e(h,{onClick:()=>!y&&c(o),$disabled:y,$isSelected:x,$size:n,...!u&&{$selectedBgColor:m},children:s?e(Rc,{text:s,withIcon:!0,children:w}):w},`segment-${i||f}-${o}`)})})},Af=o.div`
|
|
1831
1831
|
box-sizing: border-box !important;
|
|
1832
1832
|
width: ${({$width:e})=>e??"fit-content"};
|
|
1833
1833
|
padding: ${({$withSegment:e})=>e?"2px 2px 2px 12px":"6px 12px"};
|
|
@@ -1841,7 +1841,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1841
1841
|
border: none;
|
|
1842
1842
|
border-radius: 6px;
|
|
1843
1843
|
background: ${({$isHovered:e,$isActive:t,$idleBackgroundColor:r,$emphasizeBackgroundColor:o,theme:n})=>{const i=r??n.v2.colors.silver[800],a=o??n.v2.colors.silver[700];return e||t?a:i}};
|
|
1844
|
-
|
|
1844
|
+
`,Df=o.input`
|
|
1845
1845
|
min-width: 0;
|
|
1846
1846
|
flex: 1;
|
|
1847
1847
|
font-family: ${({theme:e})=>e.font_family.primary};
|
|
@@ -1858,7 +1858,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1858
1858
|
overflow: hidden;
|
|
1859
1859
|
text-overflow: ellipsis;
|
|
1860
1860
|
white-space: nowrap;
|
|
1861
|
-
`,
|
|
1861
|
+
`,Tf=({"data-id":r,value:o,onChange:n,placeholder:a,width:s,segment:l,idleBackgroundColor:c,emphasizeBackgroundColor:d})=>{const p=i(),[u,h]=Wt(!1),[m,g]=Wt(!1),[f,x]=Wt(!1),y=u?p.v2.colors.white[500]:p.v2.colors.silver[200],b=!!l?.options?.length,v=Xt(()=>{if(b)return l?.options.find(e=>e.value===l.selected)?.label},[b,l?.options,l?.selected]),$=Xt(()=>a||(b&&v?`Search by ${v.toLowerCase()}`:"Search..."),[a,b,v]);return t(Af,{$width:s,$withSegment:b,onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),$isHovered:m&&!f,$isActive:u,$idleBackgroundColor:c,$emphasizeBackgroundColor:d,children:[e(Tt,{size:18,fill:y}),e(Df,{"data-id":r??"search",name:"search",type:"text",placeholder:$,value:o,onChange:e=>{e.stopPropagation(),n(e.target.value)},onFocus:()=>h(!0),onBlur:()=>h(!1),$textColor:y}),b&&e("div",{style:{flexShrink:0},onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),children:e(Ef,{"data-id":l["data-id"],options:l.options,selected:l.selected,setSelected:l.setSelected,size:vf.S})})]})};var If,Nf;!function(e){e.Primary="primary",e.Secondary="secondary",e.Text="text"}(If||(If={})),function(e){e.S="small",e.M="medium",e.L="large"}(Nf||(Nf={}));const Rf=o.button`
|
|
1862
1862
|
display: flex;
|
|
1863
1863
|
align-items: center;
|
|
1864
1864
|
justify-content: center;
|
|
@@ -1868,14 +1868,14 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1868
1868
|
`}
|
|
1869
1869
|
border: none;
|
|
1870
1870
|
border-radius: 6px;
|
|
1871
|
-
${({$size:e,$hasLabel:t})=>e===
|
|
1871
|
+
${({$size:e,$hasLabel:t})=>e===Nf.S?n`
|
|
1872
1872
|
height: 32px;
|
|
1873
1873
|
${t?n`
|
|
1874
1874
|
padding: 8px 16px;
|
|
1875
1875
|
`:n`
|
|
1876
1876
|
width: 32px;
|
|
1877
1877
|
`}
|
|
1878
|
-
`:e===
|
|
1878
|
+
`:e===Nf.M?n`
|
|
1879
1879
|
height: 38px;
|
|
1880
1880
|
${t?n`
|
|
1881
1881
|
padding: 8px 18px;
|
|
@@ -1900,7 +1900,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1900
1900
|
${({$withShadow:e})=>e?n`
|
|
1901
1901
|
box-shadow: 0 0 11px 0 rgba(0, 0, 0, 0.32);
|
|
1902
1902
|
`:""}
|
|
1903
|
-
${({$variant:e})=>e===
|
|
1903
|
+
${({$variant:e})=>e===If.Primary?n`
|
|
1904
1904
|
background-color: ${({theme:e})=>e.v2.colors.purple[500]};
|
|
1905
1905
|
&:hover {
|
|
1906
1906
|
background-color: ${({theme:e})=>e.v2.colors.purple[600]};
|
|
@@ -1908,7 +1908,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1908
1908
|
&:active {
|
|
1909
1909
|
background-color: ${({theme:e})=>e.v2.colors.purple[700]};
|
|
1910
1910
|
}
|
|
1911
|
-
`:e===
|
|
1911
|
+
`:e===If.Secondary?n`
|
|
1912
1912
|
background-color: ${({theme:e})=>e.v2.colors.silver[750]};
|
|
1913
1913
|
&:hover {
|
|
1914
1914
|
background-color: ${({theme:e})=>e.v2.colors.silver[600]};
|
|
@@ -1916,7 +1916,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1916
1916
|
&:active {
|
|
1917
1917
|
background-color: ${({theme:e})=>e.v2.colors.silver[500]};
|
|
1918
1918
|
}
|
|
1919
|
-
`:e===
|
|
1919
|
+
`:e===If.Text?n`
|
|
1920
1920
|
background-color: transparent;
|
|
1921
1921
|
&:hover {
|
|
1922
1922
|
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
@@ -1926,7 +1926,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1926
1926
|
}
|
|
1927
1927
|
`:""}
|
|
1928
1928
|
}
|
|
1929
|
-
`,
|
|
1929
|
+
`,Of=Ut(({"data-id":o,label:n,tooltip:a,hideTooltipIcon:s,leftIcon:l,rightIcon:c,variant:d=If.Primary,size:p=Nf.M,iconSize:u,loading:h,fullWidth:m,withShadow:g,textColor:f,disabled:x,onClick:y,...b},v)=>{const $=i(),w=u||(p===Nf.L?18:16),S=p===Nf.L?sn.S:sn.XS,k=f||(x?$.v2.colors.grey[400]:$.v2.colors.white[500]),[C,E]=Wt(!1),A=Vt(async e=>{e.stopPropagation(),E(!0),await(y?.(e)),E(!1)},[y]);return e(Rf,{ref:v,"data-id":o,$variant:d,$size:p,$fullWidth:m,$withShadow:g,$hasLabel:!!n,disabled:x,onClick:h||C?void 0:A,...b,children:e(Rc,{text:a,withIcon:!s,children:h||C?n?e(mg,{size:$.v2.text.size[S],textColor:k}):e(yd,{}):t(r,{children:[l&&e(l,{size:w,fill:k}),n?e(cn,{size:S,weight:500,color:k,nowrap:!0,children:n}):null,c&&e(c,{size:w,fill:k})]})})})});Of.displayName=Of.name;const _f=o.div`
|
|
1930
1930
|
display: flex;
|
|
1931
1931
|
align-items: center;
|
|
1932
1932
|
justify-content: center;
|
|
@@ -1935,31 +1935,31 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1935
1935
|
padding: 8px;
|
|
1936
1936
|
border-radius: 100%;
|
|
1937
1937
|
background-color: ${({theme:e})=>e.v2.colors.silver[700]};
|
|
1938
|
-
`,
|
|
1938
|
+
`,Ff=({icon:r=yt,hideIcon:o=!1,title:n="No data",subTitle:a,button:s})=>{const l=i().v2.colors.silver[200];return t(In,{$gap:12,$alignItems:"center",children:[!o&&e(_f,{children:e(r,{size:32,fill:l})}),t(In,{$gap:4,$alignItems:"center",children:[e(cn,{size:sn.S,align:"center",children:n}),a&&e(cn,{size:sn.XXS,align:"center",color:l,children:a})]}),s&&e(Of,{variant:If.Secondary,...s})]})};var Pf;!function(e){e.S="small",e.L="large"}(Pf||(Pf={}));const Lf=o.div`
|
|
1939
1939
|
width: fit-content;
|
|
1940
1940
|
display: flex;
|
|
1941
1941
|
align-items: center;
|
|
1942
1942
|
gap: 8px;
|
|
1943
1943
|
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1944
|
-
`,
|
|
1945
|
-
width: ${({$size:e})=>e===
|
|
1946
|
-
height: ${({$size:e})=>e===
|
|
1944
|
+
`,zf=o.div`
|
|
1945
|
+
width: ${({$size:e})=>e===Pf.S?"16px":"20px"};
|
|
1946
|
+
height: ${({$size:e})=>e===Pf.S?"16px":"20px"};
|
|
1947
1947
|
display: flex;
|
|
1948
1948
|
align-items: center;
|
|
1949
1949
|
justify-content: center;
|
|
1950
1950
|
border-radius: 4px;
|
|
1951
1951
|
border: 1px solid ${({$borderColor:e})=>e};
|
|
1952
1952
|
background-color: ${({$backgroundColor:e})=>e};
|
|
1953
|
-
`,
|
|
1953
|
+
`,Mf=({name:r,label:o,tooltip:n,badge:a,size:s=Pf.L,disabled:l,partiallyChecked:c,value:d,onChange:p,errorMessage:u,warnMessage:h,helpMessage:m})=>{const g=i(),[f,x]=Wt(!1),y=c||d,b=s===Pf.S?12:16,v=l?g.v2.colors.grey[400]:g.v2.colors.white[500],$=y?"transparent":l?g.v2.colors.grey[700]:f?g.v2.colors.silver[400]:g.v2.colors.silver[600],w=l?g.v2.colors.grey[600]:y?g.v2.colors.purple[500]:g.v2.colors.silver[900];return t(In,{$gap:4,children:[t(Tn,{$justifyContent:"space-between",children:[t(Lf,{"data-id":r||"checkbox"+(o?`-${o}`:""),onClick:e=>{e.stopPropagation(),l||p(!!c||!d)},$disabled:l,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),children:[e(zf,{$size:s,$borderColor:$,$backgroundColor:w,children:c?e(bt,{size:b,fill:v}):d?e(ft,{size:b,fill:v}):null}),o&&e(cn,{size:s===Pf.S?sn.XXS:sn.XS,nowrap:!0,children:o})]}),e(mf,{tooltip:n,badge:a})]}),e(gf,{errorMessage:u,warnMessage:h,helpMessage:m})]})},Bf=o.div`
|
|
1954
1954
|
display: flex;
|
|
1955
1955
|
flex-direction: ${({$direction:e})=>e===Fr.Horizontal?"row":"column"};
|
|
1956
1956
|
gap: ${({$direction:e})=>e===Fr.Horizontal?16:8}px;
|
|
1957
|
-
`,
|
|
1957
|
+
`,Uf=({direction:r=Fr.Vertical,title:o,size:n,disabled:i,withSelectAll:a,options:s,values:l,setValues:c})=>{const d=n===Pf.S?sn.XXS:sn.XS,p=Xt(()=>s.every(e=>l[e.id]),[s,l]),u=Xt(()=>s.some(e=>l[e.id])&&s.some(e=>!l[e.id]),[s,l]),h=(e,t)=>{c(r=>{const o={...r};return e?o[e]=t:s.forEach(e=>o[e.id]=t),o})};return t(Bf,{$direction:r,children:[o&&a?e(Mf,{label:o,partiallyChecked:u,value:p,onChange:e=>h("",e),size:n}):o&&!a?e(cn,{size:d,children:o}):null,s.map(t=>e(Mf,{...t,value:l[t.id],onChange:e=>h(t.id,e),disabled:i,size:n},`${o}-checkbox-${t.id}`))]})};var jf,Wf;!function(e){e.Left="left",e.Right="right"}(jf||(jf={})),function(e){e.Top="top",e.Bottom="bottom"}(Wf||(Wf={}));const Hf=o.div`
|
|
1958
1958
|
position: relative;
|
|
1959
1959
|
display: flex;
|
|
1960
1960
|
flex-direction: column;
|
|
1961
1961
|
gap: 4px;
|
|
1962
|
-
`,
|
|
1962
|
+
`,Xf=o.div`
|
|
1963
1963
|
position: fixed;
|
|
1964
1964
|
${({$coords:e})=>null!=e.top?`top: ${e.top}px;`:""}
|
|
1965
1965
|
${({$coords:e})=>null!=e.bottom?`bottom: ${e.bottom}px;`:""}
|
|
@@ -1977,7 +1977,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1977
1977
|
border-radius: 6px;
|
|
1978
1978
|
background-color: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
1979
1979
|
box-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.3);
|
|
1980
|
-
`,
|
|
1980
|
+
`,Gf=o.div`
|
|
1981
1981
|
display: flex;
|
|
1982
1982
|
flex-direction: column;
|
|
1983
1983
|
gap: 0;
|
|
@@ -1985,7 +1985,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
1985
1985
|
width: 100%;
|
|
1986
1986
|
max-height: ${({$maxHeight:e})=>e||"230px"};
|
|
1987
1987
|
overflow-y: auto;
|
|
1988
|
-
`,
|
|
1988
|
+
`,Vf=o.div`
|
|
1989
1989
|
display: flex;
|
|
1990
1990
|
align-items: center;
|
|
1991
1991
|
gap: 8px;
|
|
@@ -2001,7 +2001,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2001
2001
|
background-color: ${({theme:e})=>e.v2.colors.grey[700]};
|
|
2002
2002
|
}
|
|
2003
2003
|
`}
|
|
2004
|
-
`,
|
|
2004
|
+
`,Kf=({defaultOpen:r,open:o,onOpenChange:n,alignX:a,alignY:s,items:l,selectedIds:c,setSelectedIds:d,label:p,withMultiSelect:u,withSearch:h,fullWidth:m,maxHeight:g,buttonProps:f,iconButtonProps:x,isLoading:y,emptyMessage:b,children:v})=>{const $=i(),w=void 0!==o,S=!!f||!!x||!!v,[k,C]=Wt(r??!S),E=w?o:k,A=Vt(e=>{w||C(e),n?.(e)},[w,n]),[D,T]=Wt({x:a||jf.Left,y:s||Wf.Bottom}),I=Gt(null),N=Gt(null),[R,O]=Wt({}),_=Vt((e,t)=>{const r=I.current?.getBoundingClientRect();if(!r)return;const o=S?8:0;O({top:t===Wf.Bottom?S?r.bottom+o:r.top:void 0,bottom:t===Wf.Top?S?window.innerHeight-r.top+o:window.innerHeight-r.bottom:void 0,left:e===jf.Left?r.left:void 0,right:e===jf.Right?window.innerWidth-r.right:void 0,width:m?r.width:void 0})},[S,m]),F=e=>{const t=!E;if(A(t),!t)return;const r={x:a||(e.clientX>window.innerWidth/2?jf.Right:jf.Left),y:s||(e.clientY>window.innerHeight/2?Wf.Top:Wf.Bottom)};T(r),_(r.x,r.y)};Yt(()=>{E&&_(D.x,D.y)},[E,D.x,D.y,_]),Ht(()=>{if(!E)return;const e=e=>{const t=e.target;I.current?.contains(t)||N.current?.contains(t)||A(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}},[E,A]),Ht(()=>{if(!E)return;const e=()=>A(!1),t=()=>A(!1);return document.addEventListener("scroll",e,!0),window.addEventListener("resize",t),()=>{document.removeEventListener("scroll",e,!0),window.removeEventListener("resize",t)}},[E,A]);const P=e=>{d(u?c.includes(e)?c.filter(t=>t!==e):[...c,e]:[e]),S&&!u&&A(!1)},[L,z]=Wt(""),M=Xt(()=>L?l.filter(e=>e?.label?.toLowerCase().includes(L.toLowerCase())):l,[l.length,L]);return t(Hf,{ref:I,children:[p&&e(mf,{label:p}),f&&e(Of,{...f,fullWidth:m,rightIcon:E?_t:Ft,onClick:F}),x&&e(Ll,{...x,onClick:F}),"function"==typeof v?v({ChevronIcon:E?_t:Ft,handleClick:F}):v,E&&pr(t(Xf,{ref:N,$coords:R,children:[h&&e(Tf,{value:L,onChange:z,width:"100%"}),y?e(Un,{withSpinner:!0,title:"Loading...",titleSize:sn.XS}):M.length?e(Gf,{$maxHeight:g,children:M.map(r=>{if(!r)return null;const{id:o,label:n,icon:i,withCheckbox:a}=r,s=c.includes(o);return t(Vf,{"data-id":`option-${o}`,$selected:s&&!a,onClick:()=>P(o),children:[a&&e(Mf,{value:s,onChange:()=>P(o)}),i&&e(i,{size:14,fill:r.color||$.v2.colors.white[500]}),e(cn,{size:sn.XS,nowrap:!0,color:r.color||$.v2.colors.white[500],children:n})]},o)})}):e(Dn,{$padding:"6px 0",children:e(Ff,{hideIcon:!0,title:"No results",subTitle:b})}),u&&!!M.length&&e(Of,{label:"Done",onClick:()=>A(!1)})]}),document.body)]})},qf=t=>{const{"data-id":r,options:o,placeholder:n="Search...",isLoading:i}=t,a=!0===t.multiple,[s,l]=Wt(""),[c,d]=Wt(!1),p=Xt(()=>a?t.value:t.value?[t.value]:[],[a,t.value]),u=Xt(()=>{if(a){const e=p.length;return e?1===e?o.find(e=>e.id===p[0])?.label??"":`${e} selected`:""}return t.value?o.find(e=>e.id===t.value)?.label??"":""},[a,t,o,p]),h=c?s:u,m=Xt(()=>{const e=a?o.map(e=>({...e,withCheckbox:!0})):o;if(!s)return e;const t=s.toLowerCase();return e.filter(e=>e.label.toLowerCase().includes(t))},[a,o,s]),g=Vt(()=>{l(""),d(!0)},[]),f=Vt(e=>{l(e.target.value),c||d(!0),a||e.target.value||!t.value||t.onSelect(null)},[c,a,t]),x=Vt(e=>{d(e),e||l("")},[]),y=Vt(e=>{if(a)return void t.onSelect(e);const r=o.find(t=>t.id===e[0]);r&&(t.onSelect(r),l(""),d(!1))},[a,t,o]),b=c&&(i||m.length>0||s.length>0);return e(Kf,{open:b,onOpenChange:x,items:m,selectedIds:p,setSelectedIds:y,withMultiSelect:a,isLoading:i,emptyMessage:`No results matched the filter '${s}'`,fullWidth:!0,alignY:Wf.Bottom,children:e(bf,{name:r,leftIcon:Tt,placeholder:n,value:h,onChange:f,onFocus:g})})},Jf=o.button`
|
|
2005
2005
|
width: 100%;
|
|
2006
2006
|
padding: 0;
|
|
2007
2007
|
padding-right: 12px;
|
|
@@ -2022,7 +2022,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2022
2022
|
cursor: not-allowed;
|
|
2023
2023
|
opacity: 0.5;
|
|
2024
2024
|
}
|
|
2025
|
-
`,
|
|
2025
|
+
`,Yf=o.div`
|
|
2026
2026
|
width: ${({$hasIcon:e})=>e?"56px":"0"};
|
|
2027
2027
|
height: 56px;
|
|
2028
2028
|
display: flex;
|
|
@@ -2033,20 +2033,20 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2033
2033
|
`:n`
|
|
2034
2034
|
background-color: ${({theme:e})=>e.v2.colors.silver[700]};
|
|
2035
2035
|
`}
|
|
2036
|
-
`,
|
|
2036
|
+
`,Qf=o.div`
|
|
2037
2037
|
width: ${({$hasIcon:e})=>e?"calc(100% - 56px)":"100%"};
|
|
2038
2038
|
display: flex;
|
|
2039
2039
|
justify-content: space-between;
|
|
2040
2040
|
align-items: center;
|
|
2041
2041
|
gap: 8px;
|
|
2042
|
-
`,
|
|
2042
|
+
`,Zf=({label:r,icon:o,loading:n,disabled:i,onClick:a})=>{const[s,l]=Wt(!1);return t(Jf,{$hovered:s,type:"button",disabled:i||n,onClick:a,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[e(Yf,{$hovered:s,$hasIcon:!!o,children:o&&e(o,{size:36})}),t(Qf,{$hasIcon:!!o,children:[n?e(mg,{size:16}):e(cn,{variant:an.Span,align:"center",children:r}),e(Pt,{rotate:90,size:24})]})]})},ex=({buttons:t})=>e(In,{$gap:12,children:t.map(t=>e(Zf,{...t},t.label))});var tx;!function(e){e.Button="button",e.ButtonDropData="button-drop-data"}(tx||(tx={}));const rx=({onAnyClick:t,actions:r})=>e(Tn,{$gap:8,$alignItems:"center",children:r?.map(r=>{if(!r)return null;switch(r.type){case tx.Button:return e(Of,{...r.buttonProps,onClick:e=>{r.buttonProps?.onClick?.(e),t?.()}},r.id);case tx.ButtonDropData:return e(Kf,{...r.dropDataProps,items:r.dropDataProps?.items??[],withMultiSelect:!1,selectedIds:[],setSelectedIds:e=>{r.buttonProps?.onClick?.(e[0]),t?.()},buttonProps:r.buttonProps},r.id);default:return null}})}),ox=({children:t,fullText:r,...o})=>{const n=Gt(null),[i,a]=Wt(!1);Yt(()=>{const e=n.current;if(!e)return;const t=()=>{a(e.scrollWidth>e.clientWidth+1)};t();const r=new ResizeObserver(t);return r.observe(e),()=>r.disconnect()},[t]),Ht(()=>{if("undefined"==typeof document||!document.fonts?.ready)return;let e=!1;return document.fonts.ready.then(()=>{const t=n.current;!e&&t&&a(t.scrollWidth>t.clientWidth+1)}),()=>{e=!0}},[t]);const s=i?r??(null==t?"":String(t)):"";return e(Rc,{text:s,fullWidth:!0,ellipsis:!0,keepAlive:!0,children:e(cn,{ref:n,...o,children:t})})},nx=o.div`
|
|
2043
2043
|
display: flex;
|
|
2044
2044
|
align-items: center;
|
|
2045
2045
|
justify-content: center;
|
|
2046
2046
|
padding: 8px;
|
|
2047
2047
|
border-radius: 8px;
|
|
2048
2048
|
background-color: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
2049
|
-
`,
|
|
2049
|
+
`,ix=({icon:r,title:o,subTitle:n,withCopy:a,badge:s,children:l})=>{const c=i(),{CopyButton:d}=zl();return t(Tn,{$gap:n?8:6,$alignItems:"center",children:[r&&(n?e(nx,{children:e(r,{size:24})}):e(r,{size:24})),o||s||n?t(In,{children:[o||s?t(Tn,{$gap:6,$alignItems:"center",children:[o&&e(cn,{nowrap:!0,children:o}),a&&o&&e(d,{value:o,size:Fl.XS}),s&&e(pf,{...s})]}):null,n&&e(cn,{size:sn.XXS,color:c.v2.colors.silver[200],nowrap:!0,children:n})]}):null,l]})},ax=o.div`
|
|
2050
2050
|
display: flex;
|
|
2051
2051
|
flex-direction: column;
|
|
2052
2052
|
gap: ${({$moreSpacing:e})=>e?"16px":"12px"};
|
|
@@ -2055,19 +2055,19 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2055
2055
|
padding: ${({$moreSpacing:e})=>e?"16px":"12px"};
|
|
2056
2056
|
border-radius: ${({$moreSpacing:e})=>e?"16px":"12px"};
|
|
2057
2057
|
background-color: ${({theme:e,$bgTint:t})=>e.v2.colors.silver[t]};
|
|
2058
|
-
`,
|
|
2058
|
+
`,sx=o.div`
|
|
2059
2059
|
display: flex;
|
|
2060
2060
|
align-items: center;
|
|
2061
2061
|
flex-wrap: wrap;
|
|
2062
2062
|
width: 100%;
|
|
2063
|
-
`,
|
|
2063
|
+
`,lx=o.div`
|
|
2064
2064
|
width: calc(${({$cellsPerRow:e})=>100/e+"%"} - 16px);
|
|
2065
2065
|
margin: 8px;
|
|
2066
2066
|
display: flex;
|
|
2067
2067
|
flex-direction: column;
|
|
2068
2068
|
gap: 4px;
|
|
2069
2069
|
min-width: 0;
|
|
2070
|
-
`,
|
|
2070
|
+
`,cx=({item:r,cellsPerRow:o})=>{const n=i(),{CopyButton:a}=zl(),{title:s,label:l,withCopy:c,badge:d}=r;return t(lx,{$cellsPerRow:o,children:[!!s&&e(ox,{size:sn.XXXS,color:n.v2.colors.silver[200],nowrap:!0,children:s}),t(Tn,{$gap:4,children:[d&&e(pf,{...d}),l&&e(ox,{size:sn.XS,nowrap:!0,children:l}),c&&e(a,{value:l||d?.label?.toString()||"",size:Fl.XS})]})]})},dx=({bgTint:r="900",fullHeight:o=!1,moreSpacing:n=!1,richTitle:i,withCollapse:a,collapseIsDefaultOpen:s,actions:l=[],cellsPerRow:c,items:d,children:p})=>{const[u,h]=Wt(s||!1),m=!a||a&&u;return t(ax,{$bgTint:r,$fullHeight:o,$moreSpacing:n,children:[(i||a)&&t(Tn,{$gap:16,$justifyContent:"space-between",children:[i?e(ix,{...i}):e("div",{}),t(Tn,{children:[m&&e(rx,{actions:l}),a&&e(Tn,{$gap:8,$alignItems:"center",children:e(Of,{variant:If.Text,size:Nf.S,leftIcon:u?_t:Ft,onClick:()=>h(e=>!e)})})]})]}),m&&d?e(sx,{children:d.map(t=>e(cx,{item:t,cellsPerRow:c&&c<d.length?c:d.length},t.id))}):null,m&&p]})};var px;!function(e){e.S="small",e.M="medium"}(px||(px={}));const ux=o.div`
|
|
2071
2071
|
display: flex;
|
|
2072
2072
|
flex-direction: column;
|
|
2073
2073
|
gap: ${({$gap:e})=>e}px;
|
|
@@ -2076,7 +2076,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2076
2076
|
padding: ${({$padding:e})=>e}px;
|
|
2077
2077
|
border-radius: 16px;
|
|
2078
2078
|
background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
|
|
2079
|
-
`,
|
|
2079
|
+
`,hx=Ut(({id:r,size:o=px.M,fullHeight:n=!1,richTitle:i,search:a,actions:s,children:l},c)=>{const d=o===px.S?4:16,p=o===px.S?12:16;return t(ux,{ref:c,id:r,"data-section-name":r,$padding:p,$gap:d,$fullHeight:n,children:[a||i||s?t(Tn,{$gap:d,$justifyContent:"space-between",children:[a||i?e(ix,{...i,children:a&&e(Tf,{...a})}):null,e(rx,{actions:s??[]})]}):null,l]})});hx.displayName="SectionCard";const mx=o.div`
|
|
2080
2080
|
flex: 1;
|
|
2081
2081
|
align-self: stretch;
|
|
2082
2082
|
display: flex;
|
|
@@ -2085,7 +2085,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2085
2085
|
padding: 16px;
|
|
2086
2086
|
border-radius: 12px;
|
|
2087
2087
|
background-color: ${({theme:e,$status:t})=>on(e,t,t===qr.Unknown?"750":"500")};
|
|
2088
|
-
`,
|
|
2088
|
+
`,gx=o.div`
|
|
2089
2089
|
display: flex;
|
|
2090
2090
|
align-items: center;
|
|
2091
2091
|
justify-content: center;
|
|
@@ -2093,8 +2093,8 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2093
2093
|
height: fit-content;
|
|
2094
2094
|
padding: 8px;
|
|
2095
2095
|
border-radius: 12px;
|
|
2096
|
-
background-color: ${({theme:e,$status:t})=>t===qr.Unknown?on(e,t,"800"):on(e,t,"900")+
|
|
2097
|
-
`,
|
|
2096
|
+
background-color: ${({theme:e,$status:t})=>t===qr.Unknown?on(e,t,"800"):on(e,t,"900")+ml["015"]};
|
|
2097
|
+
`,fx=({status:r,icon:o,title:n,description:a})=>{const s=i(),l=o??jn(r,s),c=[Gr.Default,Gr.Info,qr.Disabled,qr.Unknown].includes(r)?s.v2.colors.white[500]:s.v2.colors.black[500];return t(mx,{$status:r,children:[e(gx,{$status:r,children:e(l,{size:32,fill:c})}),t(In,{$gap:2,$justifyContent:"center",children:[e(cn,{size:sn.M,weight:500,color:c,nowrap:!0,children:n}),e(cn,{size:sn.XXS,weight:300,color:c,nowrap:!0,children:a})]})]})},xx=o.div`
|
|
2098
2098
|
flex: 0.5;
|
|
2099
2099
|
display: flex;
|
|
2100
2100
|
flex-direction: column;
|
|
@@ -2102,25 +2102,25 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2102
2102
|
padding: 12px;
|
|
2103
2103
|
border-radius: 12px;
|
|
2104
2104
|
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
2105
|
-
`,
|
|
2105
|
+
`,yx=["-","N/A","undefined","null","undefined/undefined","null/null"],bx=({title:r,cells:o})=>{const n=i();return t(xx,{children:[e(cn,{size:sn.XXS,color:n.v2.colors.grey[150],children:r}),e(Tn,{$gap:32,children:o.map(o=>t(In,{$gap:2,children:[!o.isLoading||o.value&&!yx.includes(o.value)?e(cn,{size:o.label?sn.M:sn.L,children:o.value}):e(yd,{scale:.9}),o.label&&e(cn,{size:sn.XXS,children:o.label})]},`${r}-${o.label}-${o.value}`))})]})};var vx;!function(e){e.CurrentOfMax="currentOfMax",e.GoodAgainstBad="goodAgainstBad"}(vx||(vx={}));const $x=o.div`
|
|
2106
2106
|
display: flex;
|
|
2107
2107
|
align-items: flex-end;
|
|
2108
2108
|
justify-content: space-between;
|
|
2109
2109
|
gap: 24px;
|
|
2110
2110
|
width: fit-content;
|
|
2111
|
-
`,
|
|
2111
|
+
`,wx=o.div`
|
|
2112
2112
|
position: relative;
|
|
2113
2113
|
display: flex;
|
|
2114
2114
|
flex-direction: column;
|
|
2115
2115
|
align-items: center;
|
|
2116
2116
|
width: ${({$width:e})=>e??150}px;
|
|
2117
2117
|
flex-shrink: 0;
|
|
2118
|
-
`,
|
|
2118
|
+
`,Sx=o.svg`
|
|
2119
2119
|
display: block;
|
|
2120
2120
|
width: 100%;
|
|
2121
2121
|
height: auto;
|
|
2122
2122
|
overflow: visible;
|
|
2123
|
-
`,
|
|
2123
|
+
`,kx=o(In)`
|
|
2124
2124
|
position: absolute;
|
|
2125
2125
|
left: 0;
|
|
2126
2126
|
right: 0;
|
|
@@ -2128,14 +2128,14 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2128
2128
|
align-items: center;
|
|
2129
2129
|
gap: 2px;
|
|
2130
2130
|
pointer-events: none;
|
|
2131
|
-
`,
|
|
2131
|
+
`,Cx=o.span`
|
|
2132
2132
|
display: inline-block;
|
|
2133
2133
|
flex-shrink: 0;
|
|
2134
2134
|
width: 9px;
|
|
2135
2135
|
height: 9px;
|
|
2136
2136
|
border-radius: 50%;
|
|
2137
2137
|
background-color: ${({$color:e})=>e};
|
|
2138
|
-
`,
|
|
2138
|
+
`,Ex=e=>{if(null==e||""===e)return{number:0,prefix:"",suffix:""};if("number"==typeof e)return{number:e,prefix:"",suffix:""};const t=e.match(/^(\D*)(-?\d*\.?\d+)(.*)$/);return t?{number:parseFloat(t[2]),prefix:t[1]??"",suffix:(t[3]??"").trim()}:{number:0,prefix:"",suffix:""}},Ax=10,Dx=(e,t,r,o)=>{const n=o*Math.PI/180;return{x:e+r*Math.cos(n),y:t-r*Math.sin(n)}},Tx=(e,t,r,o,n)=>{const i=Dx(e,t,r,o),a=Dx(e,t,r,n),s=o>n?1:0,l=Math.abs(o-n)>180?1:0;return`M ${i.x} ${i.y} A ${r} ${r} 0 ${l} ${s} ${a.x} ${a.y}`},Ix=({variant:r=vx.CurrentOfMax,gaugeWidth:o,title:n,min:a=0,max:s,current:l,primaryLabel:c,primaryColor:d,secondaryLabel:p,secondaryColor:u})=>{const{number:h}=Ex(a),{number:m}=Ex(s),{number:g,prefix:f,suffix:x}=Ex(l),y=i(),b=((e,t,r)=>Math.min(Math.max(e,t),r))((g-h)/Math.max(m-h,1),0,1),v=180-180*b,$=b>0?Tx(60,60,55,180,v):null,w=b<1?Tx(60,60,55,v,0):null,S=Dx(60,60,55,180),k=Dx(60,60,55,0),C=d??(r===vx.GoodAgainstBad?y.v2.colors.green[500]:y.v2.colors.purple[400]),E=u??(r===vx.GoodAgainstBad?y.v2.colors.red[500]:y.v2.colors.silver[500]),[A,D]=Wt(null),T=e=>`${f}${e}${x}`,I=r===vx.GoodAgainstBad?Math.max(m-g,0):m,N="primary"===A?c:"secondary"===A?p:"",R="primary"===A?T(g):"secondary"===A?T(I):"",O=()=>D("primary"),_=()=>D("secondary"),F=()=>D(null);return t($x,{children:[t(wx,{$width:o,children:[e(Rc,{keepAlive:!0,fullWidth:!0,title:N,text:R,children:t(Sx,{viewBox:"0 0 120 65",role:"img","aria-label":`${n}: ${g} of ${m}`,children:[$&&e("path",{d:$,fill:"none",stroke:C,strokeWidth:Ax,strokeLinecap:1===b?"round":"butt",onMouseEnter:O,onMouseLeave:F}),w&&e("path",{d:w,fill:"none",stroke:E,strokeWidth:Ax,strokeLinecap:0===b?"round":"butt",onMouseEnter:_,onMouseLeave:F}),b>0&&e("circle",{cx:S.x,cy:S.y,r:5,fill:C,onMouseEnter:O,onMouseLeave:F}),b<1&&e("circle",{cx:k.x,cy:k.y,r:5,fill:E,onMouseEnter:_,onMouseLeave:F})]})}),n&&t(kx,{children:[e(cn,{size:sn.XXXS,color:y.v2.colors.grey[150],align:"center",children:n}),e(cn,{size:sn.L,weight:500,align:"center",children:`${f}${g}${x}`})]})]}),t(In,{$gap:7,children:[t(Tn,{$gap:8,$alignItems:"center",children:[e(Cx,{$color:C}),e(cn,{size:sn.XXXS,color:y.v2.colors.grey[150],nowrap:!0,children:c})]}),t(Tn,{$gap:8,$alignItems:"center",children:[e(Cx,{$color:E}),e(cn,{size:sn.XXXS,color:y.v2.colors.grey[150],nowrap:!0,children:p})]})]})]})},Nx=o(Tn)`
|
|
2139
2139
|
width: calc(100% - 20px);
|
|
2140
2140
|
padding: 10px;
|
|
2141
2141
|
border-radius: 6px;
|
|
@@ -2144,24 +2144,24 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2144
2144
|
align-items: center;
|
|
2145
2145
|
justify-content: space-between;
|
|
2146
2146
|
gap: 12px;
|
|
2147
|
-
`,
|
|
2147
|
+
`,Rx=o.div`
|
|
2148
2148
|
position: relative;
|
|
2149
2149
|
width: ${({$hideCopy:e})=>e?"100%":"calc(100% - 24px - 12px)"};
|
|
2150
2150
|
display: flex;
|
|
2151
2151
|
align-items: center;
|
|
2152
2152
|
gap: 4px;
|
|
2153
|
-
`,
|
|
2153
|
+
`,Ox=o.pre`
|
|
2154
2154
|
flex: 1;
|
|
2155
2155
|
margin: 0;
|
|
2156
2156
|
padding: 0;
|
|
2157
2157
|
font-size: 14px;
|
|
2158
2158
|
color: #5ffb98; // TODO: add to theme
|
|
2159
2159
|
overflow-x: auto;
|
|
2160
|
-
`,
|
|
2160
|
+
`,_x=o.span`
|
|
2161
2161
|
flex-shrink: 0;
|
|
2162
2162
|
font-size: 14px;
|
|
2163
2163
|
color: #5ffb98; // TODO: add to theme
|
|
2164
|
-
`,
|
|
2164
|
+
`,Fx=({value:r,hideCopy:o=!1,onDone:n})=>{const{CopyButton:i}=zl({onDone:n}),a=Gt(null),[s,l]=Wt(!1);return Ht(()=>{const e=()=>{if(a.current){const{scrollWidth:e,clientWidth:t}=a.current;l(e>t)}};e();const t=new ResizeObserver(e);return a.current&&t.observe(a.current),()=>{t.disconnect()}},[r]),t(Nx,{children:[t(Rx,{$hideCopy:o,children:[e(Ox,{ref:a,children:r}),s&&e(_x,{children:"..."})]}),!o&&e(i,{value:r,size:Fl.XS})]})},Px=o.div`
|
|
2165
2165
|
display: flex;
|
|
2166
2166
|
align-items: center;
|
|
2167
2167
|
gap: 8px;
|
|
@@ -2176,7 +2176,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2176
2176
|
background-color: ${t};
|
|
2177
2177
|
}
|
|
2178
2178
|
`}
|
|
2179
|
-
`,
|
|
2179
|
+
`,Lx=o.div`
|
|
2180
2180
|
display: flex;
|
|
2181
2181
|
align-items: center;
|
|
2182
2182
|
justify-content: center;
|
|
@@ -2185,44 +2185,44 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2185
2185
|
height: 42px;
|
|
2186
2186
|
border-radius: 11px;
|
|
2187
2187
|
background-color: ${({$backgroundColor:e})=>e};
|
|
2188
|
-
`,
|
|
2188
|
+
`,zx=o(In)`
|
|
2189
2189
|
flex: 1;
|
|
2190
2190
|
min-width: 0;
|
|
2191
|
-
`,
|
|
2191
|
+
`,Mx=o.div`
|
|
2192
2192
|
display: flex;
|
|
2193
2193
|
align-items: center;
|
|
2194
2194
|
justify-content: center;
|
|
2195
2195
|
flex-shrink: 0;
|
|
2196
2196
|
width: 24px;
|
|
2197
2197
|
height: 24px;
|
|
2198
|
-
`,
|
|
2198
|
+
`,Bx=({status:r,title:o,subTitle:n,badgeLabel:a,loading:s,isExtended:l=!1,toggleExtended:c,invertColors:d=!1})=>{const p=i(),u=jn(r,p),h=c?l?_t:Ft:void 0,m=r===qr.Unknown,g=r===qr.Disabled,f=[Gr.Error,Gr.Warning,Gr.Success].includes(r),x=on(p,r,g?d?"400":"700":m?"600":d?"300":"500"),y=g?p.v2.colors.grey[400]:d?p.v2.colors.white[500]:f?p.v2.colors.black[500]:p.v2.colors.white[500],b=d&&!m?x:y,v=d&&!m?g?p.v2.colors.grey[700]:l?p.v2.colors.silver[500]:p.v2.colors.silver[600]:"rgba(21, 22, 24, 0.1)",$=d||m?l?p.v2.colors.silver[700]:p.v2.colors.silver[800]:g?l?p.v2.colors.grey[800]:p.v2.colors.grey[900]:on(p,r,l?"400":"500"),w=d||m?l?p.v2.colors.silver[600]:p.v2.colors.silver[700]:g?l?p.v2.colors.grey[700]:p.v2.colors.grey[800]:on(p,r,l?"700":"800");return t(Px,{$withHover:!!c,$isExtended:l,$backgroundColor:$,$hoverBackgroundColor:w,onClick:c,children:[e(Lx,{$backgroundColor:v,children:s?e(yd,{scale:1.2}):e(u,{size:32,fill:b})}),t(zx,{$gap:4,$justifyContent:"center",children:[t(Tn,{$gap:10,$alignItems:"center",children:[e(cn,{size:sn.S,weight:500,color:y,children:o}),a&&e(pf,{label:a,backgroundColor:p.v2.colors.silver[600],textColor:p.v2.colors.white[500],textSize:sn.XXXS})]}),n&&e(cn,{size:sn.XXXS,color:y,children:n})]}),h&&e(Mx,{children:e(h,{size:24,fill:y})})]})},Ux=o.div`
|
|
2199
2199
|
display: flex;
|
|
2200
2200
|
flex-direction: column;
|
|
2201
2201
|
width: 100%;
|
|
2202
2202
|
border-radius: 12px;
|
|
2203
2203
|
overflow: hidden;
|
|
2204
|
-
`,
|
|
2204
|
+
`,jx=o.div`
|
|
2205
2205
|
display: flex;
|
|
2206
2206
|
flex-direction: column;
|
|
2207
2207
|
gap: 8px;
|
|
2208
2208
|
padding: 8px 12px 16px 12px;
|
|
2209
2209
|
background-color: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
2210
|
-
`,
|
|
2210
|
+
`,Wx=o.div`
|
|
2211
2211
|
display: flex;
|
|
2212
2212
|
align-items: center;
|
|
2213
2213
|
gap: 8px;
|
|
2214
|
-
`,
|
|
2214
|
+
`,Hx=o.div`
|
|
2215
2215
|
display: flex;
|
|
2216
2216
|
align-items: center;
|
|
2217
2217
|
justify-content: center;
|
|
2218
2218
|
flex-shrink: 0;
|
|
2219
2219
|
width: 18px;
|
|
2220
2220
|
height: 18px;
|
|
2221
|
-
`,
|
|
2221
|
+
`,Xx=({conditions:r,title:o,subTitle:n})=>{const a=i(),[s,l]=Wt(!1),c=Vt(()=>l(e=>!e),[]),d=Xt(()=>ai(r),[r]),{errors:p,hasErrors:u,warnings:h,hasWarnings:m,hasDisableds:g,hasLoadings:f}=Xt(()=>Fo(d),[d]);Ht(()=>{l(u||m||g)},[u,m,g]);const x=Xt(()=>(!d.length||f)&&!u&&!m&&!g,[d.length,f,u,m,g]),y=Xt(()=>u?Gr.Error:m?Gr.Warning:g?Gr.Info:Gr.Success,[u,m,g]),b=Xt(()=>o||(1===d.length?ii(d[0].reason||d[0].type):void 0)||(({hasErrors:e,hasWarnings:t,hasDisableds:r,loading:o})=>{const n="Something isn't right";return e?"Something Failed":t||r?n:o?"Loading...":"Everything Successful"})({hasErrors:u,hasWarnings:m,hasDisableds:g,loading:x}),[o,d,u,m,g,x]),v=Xt(()=>n||1===d.length&&d[0].message||void 0,[n,d]),$=Xt(()=>`${u?p.length:m?h.length:d.length}/${d.length}`,[u,p.length,m,h.length,d.length]);return t(Ux,{children:[e(Bx,{status:y,invertColors:!0,title:b,subTitle:v,badgeLabel:$,loading:x,isExtended:s,toggleExtended:c}),s&&e(jx,{children:d.map(({status:r,type:o,reason:n,message:i},s)=>{const l=r===Kr.Loading,c=r===Kr.Disabled?Gr.Info:r,d=l?null:jn(c,a),p=r===Gr.Error?on(a,Gr.Error,"500"):r===Gr.Warning?on(a,Gr.Warning,"500"):a.v2.colors.white[500],u=[o,i||n].filter(Boolean).join(" - ");return t(Wx,{children:[e(Hx,{children:l||!d?e(Un,{withSpinnerOld:!0}):e(d,{size:18})}),e(cn,{size:sn.XXXS,color:p,lineHeight:"16px",children:u})]},`condition-${s}`)})})]})};var Gx,Vx,Kx;!function(e){e.Default="default",e.SuccessError="successError"}(Gx||(Gx={})),function(e){e.S="small",e.L="large"}(Vx||(Vx={})),function(e){e.Left="left",e.Right="right"}(Kx||(Kx={}));const qx=o.div`
|
|
2222
2222
|
display: flex;
|
|
2223
2223
|
align-items: center;
|
|
2224
2224
|
gap: ${({$gap:e})=>e}px;
|
|
2225
|
-
`,
|
|
2225
|
+
`,Jx=o.div`
|
|
2226
2226
|
position: relative;
|
|
2227
2227
|
display: flex;
|
|
2228
2228
|
align-items: center;
|
|
@@ -2232,11 +2232,11 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2232
2232
|
height: ${({$size:e})=>e}px;
|
|
2233
2233
|
padding: ${4}px;
|
|
2234
2234
|
border-radius: ${({$size:e})=>2*e}px;
|
|
2235
|
-
background-color: ${({$disabled:e,$onBgColor:t,$offBgColor:r,$variant:o,$value:n,theme:i})=>{if(e)return i.v2.colors.grey[800];if(t&&n)return t;if(r&&!n)return r;switch(o){case
|
|
2235
|
+
background-color: ${({$disabled:e,$onBgColor:t,$offBgColor:r,$variant:o,$value:n,theme:i})=>{if(e)return i.v2.colors.grey[800];if(t&&n)return t;if(r&&!n)return r;switch(o){case Gx.SuccessError:return n?i.v2.colors.green[500]:i.v2.colors.red[500];case Gx.Default:default:return n?i.v2.colors.purple[500]:i.v2.colors.grey[400]}}};
|
|
2236
2236
|
|
|
2237
2237
|
border: 1px solid ${({$disabled:e,theme:t})=>e?t.v2.colors.grey[600]:"transparent"};
|
|
2238
2238
|
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
2239
|
-
`,
|
|
2239
|
+
`,Yx=o.div`
|
|
2240
2240
|
position: absolute;
|
|
2241
2241
|
top: 50%;
|
|
2242
2242
|
left: ${({$value:e,$size:t})=>e?`calc(100% - ${t}px - 4px)`:"4px"};
|
|
@@ -2246,17 +2246,17 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2246
2246
|
border-radius: 100%;
|
|
2247
2247
|
background-color: ${({$color:e})=>e};
|
|
2248
2248
|
box-shadow: ${({$disabled:e})=>e?"0 0 40px 0 rgba(0, 0, 0, 0.07)":"0 0 10px 0 rgba(0, 0, 0, 0.50)"};
|
|
2249
|
-
`,
|
|
2249
|
+
`,Qx=({variant:o=Gx.Default,size:n=Vx.L,name:a,label:s,labelAlign:l=Kx.Right,labelColor:c,tooltip:d,badge:p,value:u,onChange:h,disabled:m,withIcon:g,onIcon:f=ft,offIcon:x=yt,onBgColor:y,offBgColor:b,errorMessage:v,warnMessage:$,helpMessage:w})=>{const S=i(),k=m?S.v2.colors.grey[400]:S.v2.colors.white[500],C=n===Vx.S?10:16,E=c||S.v2.colors.silver[200],A=n===Vx.S?sn.XXXS:sn.XS,D=n===Vx.S?8:12;return t(In,{$gap:4,children:[t(Tn,{$justifyContent:"space-between",children:[t(qx,{"data-id":a||"toggle"+(s?`-${s}`:""),"data-toggle-value":u?"true":"false",$gap:D,children:[s&&l===Kx.Left&&e(cn,{color:E,size:A,nowrap:!0,children:s}),t(Jx,{$onBgColor:y,$offBgColor:b,$variant:o,$size:C,$value:u,$disabled:m,onClick:e=>{e.stopPropagation(),m||h(!u)},children:[e(Yx,{$color:k,$size:C,$value:u,$disabled:m}),g&&t(r,{children:[e(f,{size:C,fill:k}),e(x,{size:C,fill:k})]})]}),s&&l===Kx.Right&&e(cn,{color:E,size:A,nowrap:!0,children:s})]}),e(mf,{tooltip:d,badge:p})]}),e(gf,{errorMessage:v,warnMessage:$,helpMessage:w})]})},Zx=o.div`
|
|
2250
2250
|
display: flex;
|
|
2251
2251
|
flex-direction: ${({$direction:e})=>e===Fr.Horizontal?"row":"column"};
|
|
2252
2252
|
gap: ${({$direction:e})=>e===Fr.Horizontal?16:8}px;
|
|
2253
|
-
`,
|
|
2253
|
+
`,ey=({direction:r=Fr.Vertical,title:o,size:n,disabled:i,options:a,values:s,setValues:l})=>{const c=n===Vx.S?sn.XS:sn.S;return t(Zx,{$direction:r,children:[o&&e(cn,{size:c,children:o}),a.map(t=>e(Qx,{...t,labelAlign:Kx.Right,value:s[t.id],onChange:e=>{return r=t.id,o=e,void l(e=>{const t={...e};return r?t[r]=o:a.forEach(e=>t[e.id]=o),t});var r,o},disabled:i,size:n},`${o}-toggle-${t.id}`))]})},ty=o.div`
|
|
2254
2254
|
display: flex;
|
|
2255
2255
|
align-items: center;
|
|
2256
2256
|
justify-content: space-between;
|
|
2257
2257
|
width: 100%;
|
|
2258
2258
|
overflow: hidden;
|
|
2259
|
-
`,
|
|
2259
|
+
`,ry=o.div`
|
|
2260
2260
|
display: flex;
|
|
2261
2261
|
align-items: center;
|
|
2262
2262
|
gap: 16px;
|
|
@@ -2264,7 +2264,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2264
2264
|
min-width: 0;
|
|
2265
2265
|
flex: 1;
|
|
2266
2266
|
overflow: hidden;
|
|
2267
|
-
`,
|
|
2267
|
+
`,oy=o.div`
|
|
2268
2268
|
display: flex;
|
|
2269
2269
|
align-items: center;
|
|
2270
2270
|
justify-content: center;
|
|
@@ -2273,15 +2273,15 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2273
2273
|
height: 36px;
|
|
2274
2274
|
border-radius: 8px;
|
|
2275
2275
|
background: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
2276
|
-
`,
|
|
2276
|
+
`,ny=o.img`
|
|
2277
2277
|
width: 24px;
|
|
2278
2278
|
height: 24px;
|
|
2279
|
-
`,
|
|
2279
|
+
`,iy=o.div`
|
|
2280
2280
|
display: flex;
|
|
2281
2281
|
align-items: center;
|
|
2282
2282
|
gap: 16px;
|
|
2283
2283
|
flex-shrink: 0;
|
|
2284
|
-
`,
|
|
2284
|
+
`,ay=({icon:r,iconSrc:o,title:n,subTitle:i,toggleProps:a,actions:s,onClose:l,onCloseDisabled:c})=>t(ty,{children:[t(ry,{children:[r?e(oy,{children:e(r,{size:24})}):o?e(oy,{children:e(ny,{src:o,alt:n||"icon"})}):null,(n||i)&&t(In,{$gap:6,children:[n&&e(cn,{size:sn.S,weight:500,children:n}),i&&e(cn,{size:sn.XXS,children:i})]})]}),t(iy,{children:[a&&e(Qx,{...a}),s?.length?e(Kf,{iconButtonProps:{"data-id":"drawer-actions",icon:Lt},items:s,selectedIds:s?.filter(e=>e?.active)?.map(e=>e?.id)??[],setSelectedIds:e=>s?.find(t=>t?.id===e[0])?.onClick?.()}):null,l&&e(Ll,{"data-id":"drawer-close",icon:yt,size:Fl.M,onClick:l,disabled:c})]})]}),sy=o.div`
|
|
2285
2285
|
display: flex;
|
|
2286
2286
|
align-items: center;
|
|
2287
2287
|
gap: 10px;
|
|
@@ -2291,7 +2291,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2291
2291
|
padding: 4px 12px 4px 4px;
|
|
2292
2292
|
border-radius: 8px;
|
|
2293
2293
|
background-color: ${({theme:e,$status:t})=>on(e,t,[Gr.Info].includes(t)?"1000":"900")};
|
|
2294
|
-
`,
|
|
2294
|
+
`,ly=o.div`
|
|
2295
2295
|
width: ${({$smallIcon:e})=>e?"24px":"32px"};
|
|
2296
2296
|
height: ${({$smallIcon:e})=>e?"24px":"32px"};
|
|
2297
2297
|
display: flex;
|
|
@@ -2299,23 +2299,23 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2299
2299
|
justify-content: center;
|
|
2300
2300
|
border-radius: 6px;
|
|
2301
2301
|
background-color: ${({theme:e,$status:t})=>on(e,t,[Gr.Info].includes(t)?"900":"800")};
|
|
2302
|
-
`,
|
|
2302
|
+
`,cy=o.div`
|
|
2303
2303
|
margin-left: auto;
|
|
2304
2304
|
margin-right: 8px;
|
|
2305
2305
|
cursor: pointer;
|
|
2306
2306
|
&:hover {
|
|
2307
2307
|
transform: scale(1.2);
|
|
2308
2308
|
}
|
|
2309
|
-
`,
|
|
2309
|
+
`,dy=({status:r,message:o,action:n,fullWidth:a,smallIcon:s})=>{const l=i(),c=jn(r,l),d=on(l,r,r===Gr.Default?"300":r===Gr.Info?"400":"500");return t(sy,{$status:r,$fullWidth:a,children:[e("div",{children:e(ly,{$status:r,$smallIcon:s,children:e(c,{size:s?18:24})})}),e(cn,{color:d,size:sn.XXXS,weight:400,children:o}),n&&e(cy,{"data-id":n["data-id"],onClick:n.onClick,children:e(cn,{color:d,size:sn.XXS,weight:500,underline:!0,children:n.label})})]})},py=o.div`
|
|
2310
2310
|
display: flex;
|
|
2311
2311
|
align-items: center;
|
|
2312
2312
|
gap: 8px;
|
|
2313
2313
|
padding: 4px 12px;
|
|
2314
|
-
`,
|
|
2314
|
+
`,uy=o.div`
|
|
2315
2315
|
flex: 1;
|
|
2316
|
-
`,
|
|
2316
|
+
`,hy=o.div`
|
|
2317
2317
|
width: 150px;
|
|
2318
|
-
`,
|
|
2318
|
+
`,my=({note:r,actions:o,children:n})=>n?e(py,{children:n}):t(py,{children:[r&&e(dy,{...r}),e(uy,{}),o?.map((t,r)=>e(hy,{children:e(Of,{fullWidth:!0,...t})},t["data-id"]||`drawer-footer-button-${r}`))]}),gy=o.div`
|
|
2319
2319
|
position: fixed;
|
|
2320
2320
|
top: 0;
|
|
2321
2321
|
bottom: 0;
|
|
@@ -2334,16 +2334,16 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2334
2334
|
overflow: hidden;
|
|
2335
2335
|
|
|
2336
2336
|
${({$disableAnimation:e,$position:t})=>!e&&n`
|
|
2337
|
-
animation-name: ${
|
|
2337
|
+
animation-name: ${fl.in[t]};
|
|
2338
2338
|
`}
|
|
2339
|
-
`,
|
|
2339
|
+
`,fy=o.div`
|
|
2340
2340
|
display: flex;
|
|
2341
2341
|
flex-direction: column;
|
|
2342
2342
|
gap: 12px;
|
|
2343
2343
|
|
|
2344
2344
|
height: calc(100% - ${56}px);
|
|
2345
2345
|
overflow-y: auto;
|
|
2346
|
-
`,
|
|
2346
|
+
`,xy=({isOpen:o,hideOverlay:n=!1,disableAnimation:i=!1,position:a="right",width:s="600px",header:l,footer:c,children:d})=>(Nl(o),o?pr(t(r,{children:[!n&&e(On,{onClick:l?.onCloseDisabled?void 0:l?.onClose}),t(gy,{"data-id":"drawer",$position:a,$width:s,$disableAnimation:i,children:[l&&e(ay,{...l}),e(fy,{children:d}),c&&e(my,{...c})]})]}),document.body):null),yy=({options:t,values:r,setValues:o,withMultiSelect:n,withSearch:i,...a})=>{const s=Xt(()=>r?.length?`Selected: ${t.filter(e=>r.includes(e.id)).map(e=>e.label).join(", ")||"none"}`:"",[t,r]);return e(Kf,{withMultiSelect:n,withSearch:i,alignX:jf.Left,items:t,selectedIds:r,setSelectedIds:o,children:({ChevronIcon:t,handleClick:r})=>e(bf,{placeholder:"Select options...",...a,rightIcon:t,value:s,onChange:()=>{},onClick:r})})},by=o.header`
|
|
2347
2347
|
position: relative;
|
|
2348
2348
|
width: calc(100% - 36px);
|
|
2349
2349
|
padding: 12px 18px;
|
|
@@ -2351,12 +2351,12 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2351
2351
|
display: flex;
|
|
2352
2352
|
align-items: center;
|
|
2353
2353
|
justify-content: space-between;
|
|
2354
|
-
`,
|
|
2354
|
+
`,vy=o(Tn)`
|
|
2355
2355
|
position: absolute;
|
|
2356
2356
|
left: 50%;
|
|
2357
2357
|
transform: translateX(-50%);
|
|
2358
2358
|
gap: 16px;
|
|
2359
|
-
|
|
2359
|
+
`,$y=({left:r=[],center:o=[],right:n=[]})=>t(by,{children:[e(Tn,{$gap:16,children:r}),e(vy,{children:o}),e(Tn,{$gap:16,children:n})]}),wy=o.div`
|
|
2360
2360
|
display: flex;
|
|
2361
2361
|
align-items: center;
|
|
2362
2362
|
gap: 2px;
|
|
@@ -2371,17 +2371,17 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2371
2371
|
left: ${({$left:e})=>e||"unset"};
|
|
2372
2372
|
top: 50%;
|
|
2373
2373
|
transform: translateY(-50%);
|
|
2374
|
-
`,
|
|
2374
|
+
`,Sy=({isOpen:t,actions:r,positionRight:o,positionLeft:n})=>t?e(wy,{$right:o,$left:n,children:r.map(t=>{if(!t)return null;const{tooltip:r,...o}=t;return e(Rc,{text:r||"",children:e(Of,{...o,variant:If.Secondary,size:Nf.S})},o.id)})}):null,ky=({values:r,setValues:o,name:n,label:a,tooltip:s,badge:l,required:c,errorMessage:d,warnMessage:p,helpMessage:u,placeholder:h,disabled:m})=>{const g=i(),f=r.length<=1,x=m,y=m||f&&x,b=r.length?r:[""];return t(In,{"data-id":n,$gap:6,children:[e(mf,{label:a,tooltip:s,required:c,badge:l}),e(In,{$gap:8,children:b.map((n,i)=>{const a=i===b.length-1;return t(Tn,{$gap:8,$alignItems:"center",children:[e(bf,{width:"100%",autoFocus:Qn(n)&&!f&&a,value:n,onChange:e=>((e,t)=>{const n=[...r||[]];n[t]=e,o(n)})(e.target.value,i),disabled:m,placeholder:h,hasError:!!d}),a&&e(Of,{leftIcon:St,variant:If.Secondary,size:Nf.S,disabled:x,onClick:()=>(()=>{const e=[...r||[]];e.push(""),o(e)})()}),e(Of,{leftIcon:y?It:()=>e(It,{fill:g.v2.colors.red[500]}),variant:If.Secondary,size:Nf.S,disabled:y,onClick:()=>(e=>{const t=[...r||[]].filter((t,r)=>r!==e);t.length||t.push(""),o(t)})(i)})]},`input-list-${i}`)})}),e(gf,{errorMessage:d,warnMessage:p,helpMessage:u})]})},Cy=({col:t,colIdx:r,row:o,rowIdx:n,rowsLength:i,handleChange:a,errorMessage:s,disabled:l})=>{const{keyName:c,componentType:d,inputType:p,label:u,placeholder:h,options:m,renderCondition:g}=t,f=o[c];if(g&&!g(o))return null;switch(d){case Hr.Dropdown:case"multi-dropdown":{const t="multi-dropdown"===d,r=Array.isArray(f)?f:null!=f&&""!==f?[String(f)]:[],o=m?.filter(e=>r.includes(e.id)).map(e=>e.id)||[];return e(yy,{name:c,label:h?u:void 0,placeholder:h||u,options:m||[],withMultiSelect:t,withSearch:t,values:o,setValues:e=>a(c,t?e:e[0]??"",n),disabled:l,hasError:!!s},c)}default:const t=i>1&&0===n&&0===r&&Qn(f);return e(bf,{name:c,label:h?u:void 0,placeholder:h||u,autoFocus:t,type:p,value:f,onChange:({target:{value:e}})=>a(c,e,n),disabled:l,hasError:!!s})}},Ey=o.table`
|
|
2375
2375
|
width: 100%;
|
|
2376
2376
|
border-collapse: separate;
|
|
2377
2377
|
border-spacing: 0 8px;
|
|
2378
|
-
`,
|
|
2378
|
+
`,Ay=o.td`
|
|
2379
2379
|
padding: 0 8px 0 0;
|
|
2380
|
-
|
|
2380
|
+
`,Dy=o.td`
|
|
2381
2381
|
width: 72px;
|
|
2382
2382
|
padding-bottom: 2px;
|
|
2383
2383
|
vertical-align: bottom;
|
|
2384
|
-
`,
|
|
2384
|
+
`,Ty=({columns:r,values:o,setValues:n,name:a,label:s,tooltip:l,badge:c,required:d,disabled:p,errorMessage:u,warnMessage:h,helpMessage:m,limitFieldsPerRow:g})=>{const f=i(),x=Xt(()=>{const e={};return r.forEach(({keyName:t})=>e[t]=""),e},[r]),y=(e,t,r)=>{const i=o.length?$r(o):[$r(x)];i[r][e]=t,n(i)},b=Xt(()=>{if(g){const e=[];for(let t=0;;t+=g){const o=r.slice(t,t+g);if(!o.length)break;e.push(o)}return e}return[r]},[g,r]),v=o.length?o:[x];return t(In,{"data-id":a,$gap:0,children:[e(mf,{label:s,tooltip:l,required:d,badge:c}),e(Ey,{children:e("tbody",{children:v.map((r,i)=>{const a=i===v.length-1;return t(jt,{children:[g&&i>0?e("tr",{children:e(Ay,{colSpan:b.length})}):null,b.map((s,l)=>t("tr",{children:[s.map((t,o)=>t.renderCondition&&!t.renderCondition(r)?null:e(Ay,{children:e(Cy,{col:t,colIdx:o,row:r,rowIdx:i,rowsLength:v.length,handleChange:y,disabled:p,errorMessage:u})},`input-table-row-${i}-col-${l}-${o}`)),0===l&&e(Dy,{children:t(Tn,{$gap:8,$justifyContent:"flex-end",children:[a&&e(Of,{leftIcon:St,variant:If.Secondary,size:Nf.S,disabled:p,onClick:()=>(()=>{const e=$r(o);e.push($r(x)),n(e)})()}),e(Of,{leftIcon:p?It:()=>e(It,{fill:f.v2.colors.red[500]}),variant:If.Secondary,size:Nf.S,disabled:p,onClick:()=>(e=>{const t=o.filter((t,r)=>r!==e);t.length||t.push($r(x)),n(t)})(i)})]})})]},`input-table-matrix-${i}-${l}`))]},`input-table-row-${i}`)})})}),e(gf,{errorMessage:u,warnMessage:h,helpMessage:m})]})},Iy=o.div`
|
|
2385
2385
|
display: flex;
|
|
2386
2386
|
align-items: center;
|
|
2387
2387
|
justify-content: space-between;
|
|
@@ -2389,15 +2389,15 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2389
2389
|
|
|
2390
2390
|
padding: 18px 16px;
|
|
2391
2391
|
border-radius: 18px;
|
|
2392
|
-
background-color: ${({theme:e})=>e.v2.colors.black[500]+
|
|
2392
|
+
background-color: ${({theme:e})=>e.v2.colors.black[500]+ml["095"]};
|
|
2393
2393
|
box-shadow: 0 4px 16.7px 0 rgba(0, 0, 0, 0.83);
|
|
2394
2394
|
|
|
2395
2395
|
position: fixed;
|
|
2396
2396
|
bottom: 0;
|
|
2397
2397
|
left: 50%;
|
|
2398
2398
|
z-index: 1;
|
|
2399
|
-
animation-name: ${
|
|
2400
|
-
`,
|
|
2399
|
+
animation-name: ${fl.in.center};
|
|
2400
|
+
`,Ny=({isOpen:r,onClose:o,richTitle:n,actions:i})=>r?t(Iy,{children:[e(ix,{...n}),e(rx,{onAnyClick:o,actions:i})]}):null,Ry=o.div`
|
|
2401
2401
|
position: ${({$relativeToParent:e})=>e?"absolute":"fixed"};
|
|
2402
2402
|
top: 50%;
|
|
2403
2403
|
left: 50%;
|
|
@@ -2409,19 +2409,19 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2409
2409
|
box-shadow: 0 0 34px 0 rgba(0, 0, 0, 0.7);
|
|
2410
2410
|
overflow: hidden;
|
|
2411
2411
|
|
|
2412
|
-
animation-name: ${
|
|
2413
|
-
`,
|
|
2412
|
+
animation-name: ${fl.in.center};
|
|
2413
|
+
`,Oy=o.div`
|
|
2414
2414
|
position: relative;
|
|
2415
|
-
`,
|
|
2415
|
+
`,_y=o.div`
|
|
2416
2416
|
position: absolute;
|
|
2417
2417
|
top: 16px;
|
|
2418
2418
|
left: 16px;
|
|
2419
|
-
`,
|
|
2419
|
+
`,Fy=({isOpen:o,hideOverlay:n=!1,relativeToParent:i=!1,onBack:a,onClose:s,children:l})=>{if(Nl(o),!o)return null;const c=t(r,{children:[!n&&e(On,{$relativeToParent:i,onClick:s}),e(Ry,{"data-id":"modal",$relativeToParent:i,children:t(Oy,{children:[a&&e(_y,{children:e(Ll,{icon:t=>e(Pt,{rotate:-90,...t}),size:Fl.L,onClick:a})}),l]})})]});return i?c:pr(c,document.body)},Py=o.div`
|
|
2420
2420
|
position: relative;
|
|
2421
2421
|
width: ${64}px;
|
|
2422
2422
|
height: ${({$height:e})=>e};
|
|
2423
2423
|
flex-shrink: 0;
|
|
2424
|
-
`,
|
|
2424
|
+
`,Ly=o.aside`
|
|
2425
2425
|
position: absolute;
|
|
2426
2426
|
top: 0;
|
|
2427
2427
|
left: 0;
|
|
@@ -2439,7 +2439,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2439
2439
|
transition:
|
|
2440
2440
|
width 200ms ease,
|
|
2441
2441
|
padding 200ms ease;
|
|
2442
|
-
`,
|
|
2442
|
+
`,zy=o.button`
|
|
2443
2443
|
display: flex;
|
|
2444
2444
|
align-items: center;
|
|
2445
2445
|
width: 100%;
|
|
@@ -2459,58 +2459,58 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2459
2459
|
&:active {
|
|
2460
2460
|
background-color: ${({theme:e,$selected:t})=>t?e.v2.colors.purple[700]:e.v2.colors.silver[900]};
|
|
2461
2461
|
}
|
|
2462
|
-
`,
|
|
2462
|
+
`,My=o.div`
|
|
2463
2463
|
width: ${40}px;
|
|
2464
2464
|
height: ${40}px;
|
|
2465
2465
|
display: flex;
|
|
2466
2466
|
align-items: center;
|
|
2467
2467
|
justify-content: center;
|
|
2468
2468
|
flex-shrink: 0;
|
|
2469
|
-
`,
|
|
2469
|
+
`,By=o.div`
|
|
2470
2470
|
flex: 1 1 0;
|
|
2471
2471
|
min-width: 0;
|
|
2472
2472
|
overflow: hidden;
|
|
2473
2473
|
padding-right: 12px;
|
|
2474
2474
|
pointer-events: none;
|
|
2475
|
-
`,
|
|
2475
|
+
`,Uy=({height:r,icons:o})=>{const n=i(),[a,s]=Wt(!1);return e(Py,{$height:r,children:e(Ly,{$expanded:a,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:o.map(({id:r,label:o,selected:i,icon:s,onClick:l})=>t(zy,{$selected:i,onClick:l,"aria-label":o,title:a?void 0:o,children:[e(My,{children:e(s,{size:24,fill:n.v2.colors.white[500]})}),a&&e(By,{children:e(cn,{size:sn.S,weight:500,color:n.v2.colors.white[500],nowrap:!0,children:o})})]},r))})})};var jy;!function(e){e.S="small",e.L="large"}(jy||(jy={}));const Wy=o.div`
|
|
2476
2476
|
width: fit-content;
|
|
2477
2477
|
display: flex;
|
|
2478
2478
|
align-items: center;
|
|
2479
2479
|
gap: 8px;
|
|
2480
2480
|
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
2481
|
-
`,
|
|
2482
|
-
width: ${({$size:e})=>e===
|
|
2483
|
-
height: ${({$size:e})=>e===
|
|
2481
|
+
`,Hy=o.div`
|
|
2482
|
+
width: ${({$size:e})=>e===jy.S?"16px":"20px"};
|
|
2483
|
+
height: ${({$size:e})=>e===jy.S?"16px":"20px"};
|
|
2484
2484
|
display: flex;
|
|
2485
2485
|
align-items: center;
|
|
2486
2486
|
justify-content: center;
|
|
2487
2487
|
border-radius: 100%;
|
|
2488
2488
|
border: 1px solid ${({$borderColor:e})=>e};
|
|
2489
2489
|
background-color: ${({$backgroundColor:e})=>e};
|
|
2490
|
-
`,
|
|
2490
|
+
`,Xy=({"data-id":r,label:o,value:n,onChange:a,disabled:s,size:l=jy.L})=>{const c=i(),[d,p]=Wt(!1),u=n,h=l===jy.S?6:8,m=s?c.v2.colors.grey[400]:c.v2.colors.white[500],g=u?"transparent":s?c.v2.colors.grey[700]:d?c.v2.colors.silver[400]:c.v2.colors.silver[600],f=s?c.v2.colors.grey[600]:u?c.v2.colors.purple[500]:c.v2.colors.silver[900];return t(Wy,{"data-id":r??"radio"+(o?`-${o}`:""),onClick:e=>{e.stopPropagation(),s||a(!n)},$disabled:s,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[e(Hy,{$size:l,$borderColor:g,$backgroundColor:f,children:n?e(zt,{size:h,fill:m}):null}),o&&e(cn,{size:l===jy.S?sn.XXS:sn.XS,children:o})]})},Gy=o.div`
|
|
2491
2491
|
display: flex;
|
|
2492
2492
|
flex-direction: ${({$flexDirection:e})=>e};
|
|
2493
2493
|
gap: ${({$gap:e})=>e}px;
|
|
2494
|
-
`,
|
|
2494
|
+
`,Vy=({label:r,direction:o,disabled:n,size:i,options:a,values:s,setValues:l})=>t(Gy,{$flexDirection:o===Fr.Horizontal?"row":"column",$gap:o===Fr.Horizontal?16:8,children:[r&&e(cn,{children:r}),a.map(t=>e(Xy,{...t,value:s[t.id],onChange:e=>{return r=t.id,o=e,void l(e=>{const t={...e};return Object.keys(t).forEach(e=>t[e]=!1),t[r]=o,t});var r,o},disabled:n,size:i},`${r}-radio-${t.id}`))]}),Ky=({currentStep:r,data:o,gap:n=12})=>e(In,{$gap:n,children:o.map(o=>{const n=o.step<r,i=o.step===r;return t(Tn,{$gap:8,children:[n||o.forceDoneBadge?e(pf,{status:Gr.Success,label:"",leftIcon:ft}):e(pf,{status:Gr.Default,label:o.step.toString()}),e(cn,{size:i?sn.M:sn.XS,weight:i?500:400,opacity:i?1:.7,children:o.label})]},`stepper-item-${o.step}`)})});var qy;!function(e){e.Data="data",e.Pretty="pretty"}(qy||(qy={}));const Jy=o.div`
|
|
2495
2495
|
height: ${({$maxHeight:e})=>e};
|
|
2496
2496
|
width: 100%;
|
|
2497
2497
|
display: flex;
|
|
2498
2498
|
flex-direction: column;
|
|
2499
2499
|
overflow: hidden;
|
|
2500
|
-
`,
|
|
2500
|
+
`,Yy=o.div`
|
|
2501
2501
|
width: 100%;
|
|
2502
2502
|
flex: 1;
|
|
2503
2503
|
display: flex;
|
|
2504
2504
|
flex-direction: column;
|
|
2505
|
-
`,
|
|
2505
|
+
`,Qy=o.div`
|
|
2506
2506
|
flex-shrink: 0;
|
|
2507
2507
|
position: relative;
|
|
2508
2508
|
z-index: 2;
|
|
2509
|
-
`,
|
|
2509
|
+
`,Zy=o.div`
|
|
2510
2510
|
position: relative;
|
|
2511
2511
|
display: flex;
|
|
2512
2512
|
width: 100%;
|
|
2513
|
-
`,
|
|
2513
|
+
`,eb=o.div`
|
|
2514
2514
|
position: relative;
|
|
2515
2515
|
min-width: ${({$minWidth:e})=>e?`${e}px`:"auto"};
|
|
2516
2516
|
flex: ${({$flex:e})=>e??1};
|
|
@@ -2521,12 +2521,12 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2521
2521
|
|
|
2522
2522
|
${({$variant:e,$backgroundColor:t})=>{if(t)return n`
|
|
2523
2523
|
background-color: ${t};
|
|
2524
|
-
`;switch(e){case
|
|
2524
|
+
`;switch(e){case qy.Data:return n`
|
|
2525
2525
|
background-color: ${({theme:e})=>e.v2.colors.silver[750]};
|
|
2526
|
-
`;case
|
|
2526
|
+
`;case qy.Pretty:return n`
|
|
2527
2527
|
background-color: transparent;
|
|
2528
2528
|
`;default:return""}}}
|
|
2529
|
-
`,
|
|
2529
|
+
`,tb=o.div`
|
|
2530
2530
|
position: absolute;
|
|
2531
2531
|
top: 50%;
|
|
2532
2532
|
right: 0;
|
|
@@ -2534,7 +2534,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2534
2534
|
width: 1px;
|
|
2535
2535
|
height: 18px;
|
|
2536
2536
|
background: ${({theme:e})=>e.v2.colors.silver[500]};
|
|
2537
|
-
`,
|
|
2537
|
+
`,rb=o.div`
|
|
2538
2538
|
min-width: ${({$minWidth:e})=>e?`${e}px`:"auto"};
|
|
2539
2539
|
flex: ${({$flex:e})=>e??1};
|
|
2540
2540
|
overflow: hidden;
|
|
@@ -2545,23 +2545,23 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2545
2545
|
cursor: ${({$withClick:e})=>e?"pointer":"default"};
|
|
2546
2546
|
box-sizing: border-box;
|
|
2547
2547
|
|
|
2548
|
-
${({$variant:e,$selected:t,$hovered:r,$isLastRow:o,$isFirstCell:i,$isLastCell:a})=>{switch(e){case
|
|
2548
|
+
${({$variant:e,$selected:t,$hovered:r,$isLastRow:o,$isFirstCell:i,$isLastCell:a})=>{switch(e){case qy.Data:return n`
|
|
2549
2549
|
border-bottom: ${({theme:e})=>o?"none":`1px solid ${e.v2.colors.silver[500]}`};
|
|
2550
2550
|
border-radius: ${o?i?"0 0 0 4px":a?"0 0 4px 0":"0":"0"};
|
|
2551
2551
|
background-color: ${({theme:e})=>t?e.v2.colors.blue[1e3]:r?e.v2.colors.silver[700]:e.v2.colors.silver[800]};
|
|
2552
|
-
`;case
|
|
2552
|
+
`;case qy.Pretty:return n`
|
|
2553
2553
|
border: none;
|
|
2554
2554
|
border-radius: ${i?"12px 0 0 12px":a?"0 12px 12px 0":"0"};
|
|
2555
2555
|
background-color: ${({theme:e})=>t?e.v2.colors.blue[1e3]:r?e.v2.colors.silver[700]:e.v2.colors.silver[900]};
|
|
2556
2556
|
`;default:return""}}}
|
|
2557
|
-
`,
|
|
2557
|
+
`,ob=o.div`
|
|
2558
2558
|
width: 100%;
|
|
2559
2559
|
display: flex;
|
|
2560
2560
|
align-items: center;
|
|
2561
2561
|
justify-content: ${({$textAlign:e})=>"right"===e?"flex-end":"left"===e?"flex-start":"center"===e?"center":"unset"};
|
|
2562
2562
|
gap: 4px;
|
|
2563
2563
|
text-align: ${({$textAlign:e})=>e||"left"};
|
|
2564
|
-
`,
|
|
2564
|
+
`,nb=({variant:r,columns:o,rows:n,getRowActions:i,rowActionsPushRightPosition:a,rowActionsPushLeftPosition:s,withCheckboxes:l})=>{const[c,d]=Wt(null),p=Xt(()=>n.map((p,u)=>{const{cells:h,onClick:m,isSelected:g=!1,onSelect:f,onDeselect:x,hideCheckbox:y}=p,b=c===u,v=i(p),$=(e,t)=>({$isLastRow:u===n.length-1,$isFirstCell:e,$isLastCell:t,$selected:g,$withClick:!!m,onClick:()=>m?.(),$hovered:!!m&&b,onMouseEnter:()=>d(u),onMouseLeave:()=>d(null)});return t(Zy,{children:[l&&e(rb,{$variant:r,style:{flex:"0 0 68px"},...$(!0,!1),children:!y&&e(Mf,{value:g,onChange:()=>g?x?.():f?.()})},"checkbox-column"),o.map(({key:n,withTooltip:i,textAlign:c,flex:d,minWidth:p},m)=>{const g=h.find(e=>e.key===n),f=0===m&&!l,x=m===o.length-1,y=v.length&&(a&&x||s&&f||!a&&!s&&x),w=e(Tn,{$width:"100%",$justifyContent:"right"===c?"flex-end":"center"===c?"center":"flex-start",children:g?.component?e(g.component,{}):e(cn,{size:sn.XS,children:g?.rawValue||"-"})});return t(rb,{$variant:r,$flex:d,$minWidth:p,...$(f,x),children:[i?e(Rc,{text:g?.rawValue?.toString()||"",ellipsis:!0,children:w}):w,y?e(Sy,{isOpen:b,actions:v,positionRight:a,positionLeft:s}):null]},`row-${u}-cell-${m}`)})]},`row-${u}`)}),[n,c,i,a,s,l,o]);return e(wg,{gap:r===qy.Pretty?8:0,elements:p})},ib=({columnKey:t,sortDirection:r,sortByKey:o,onSort:n})=>{const a=i(),s=o===t?a.v2.colors.white[500]:a.v2.colors.grey[400],l=r===Pr.Ascending?0:180;return e(Ll,{icon:t=>e(Pt,{fill:s,rotate:l,...t}),onClick:()=>n(t)})},ab=({columnKey:t,filters:r,onFilter:o,rowsUnfiltered:n,filterOverride:a})=>{const s=i(),l=r[t]?.length?s.v2.colors.white[500]:s.v2.colors.grey[400],c=Xt(()=>{if(a)return a.options.map(({id:e,label:t})=>({id:e,label:t,withCheckbox:!0}));return Array.from(new Set(n.map(e=>e.cells.find(e=>e.key===t)?.rawValue?.toString()).filter(e=>!!e))).sort((e,t)=>e.localeCompare(t)).map(e=>({id:e,label:e,withCheckbox:!0}))},[n,t,a]);return e(Kf,{items:c,withMultiSelect:!0,selectedIds:r[t]?.map(e=>e.toString())??[],setSelectedIds:e=>o(t,e),defaultOpen:!1,iconButtonProps:{icon:t=>e(Mt,{fill:l,...t})}})},sb=({variant:r,backgroundColor:o,columns:n,rowsUnfiltered:i,sortDirection:a,sortByKey:s,onSort:l,filters:c,onFilter:d,withCheckboxes:p,partiallySelected:u,allSelected:h,onSelectAll:m})=>t(Zy,{children:[p&&e(eb,{$variant:r,$backgroundColor:o,$isFirst:!0,$isLast:!1,style:{flex:"0 0 68px"},children:e(Mf,{partiallyChecked:u&&!h,value:h||!1,onChange:m})},"checkbox-column"),n.map(({key:u,label:h,withTooltip:m,tooltip:g,noSort:f,noFilter:x,filterOverride:y,flex:b,minWidth:v,textAlign:$},w)=>{const S=0===w&&!p,k=w===n.length-1,C=e(cn,{size:sn.XS,align:$,children:h});return t(eb,{$variant:r,$backgroundColor:o,$flex:b,$minWidth:v,$isFirst:S,$isLast:k,children:[t(ob,{$textAlign:$,children:[g||m?e(Rc,{text:g||h,children:C}):C,!f&&e(ib,{columnKey:u,sortDirection:a,sortByKey:s,onSort:l}),!x&&e(ab,{columnKey:u,filters:c,onFilter:d,rowsUnfiltered:i,filterOverride:y})]}),!k&&r===qy.Data&&e(tb,{})]},`column-${u}`)})]}),lb=({variant:r,maxHeight:o="256px",headerBackgroundColor:n,hideHeader:i=!1,isLoading:a,noDataProps:s,columns:l,rows:c,getRowActions:d,rowActionsPushRightPosition:p,rowActionsPushLeftPosition:u,withCheckboxes:h,filters:m,onFiltersChange:g})=>{const[f,x]=Wt(Pr.Ascending),[y,b]=Wt(""),[v,$]=Wt({}),w=m??v,S=Vt(e=>{b(e),x(e=>e===Pr.Ascending?Pr.Descending:Pr.Ascending)},[]),k=Vt((e,t)=>{const r={...w,[e]:t};g&&g(r),void 0===m&&$(r)},[w,g,m]),C=Xt(()=>{const e=(e,t)=>{const r=e.cells.find(e=>e.key===t);return r&&(r.rawValue?.toString()||r.component?.({})?.props?.children?.toString())||""};return(y?[...c].sort((t,r)=>{const o=e(t,y),n=e(r,y);return(f===Pr.Ascending?1:-1)*((e,t)=>"string"==typeof e&&"string"==typeof t?e.localeCompare(t):"number"==typeof e&&"number"==typeof t?e-t:"boolean"==typeof e&&"boolean"==typeof t?e===t?0:e?1:-1:String(e).localeCompare(String(t)))(o,n)}):c).filter(t=>{for(const[r,o]of Object.entries(w)){if(!o.length)continue;const n=l.find(e=>e.key===r)?.filterOverride;if(n){if(!n.filterRow(t,o))return!1}else if(!o.includes(e(t,r)))return!1}return!0})},[c,y,f,w,l]),{partiallySelected:E,allSelected:A}=Xt(()=>{const e=C.filter(e=>!e.hideCheckbox);return{partiallySelected:e.length>0&&e.some(e=>e.isSelected),allSelected:e.length>0&&e.every(e=>e.isSelected)}},[C]);return e(Jy,{$maxHeight:o,children:t(Yy,{$variant:r,children:[!i&&e(Qy,{children:e(sb,{variant:r,backgroundColor:n,columns:l,rowsUnfiltered:c,sortDirection:f,sortByKey:y,onSort:S,filters:w,onFilter:k,withCheckboxes:h,partiallySelected:E,allSelected:A,onSelectAll:e=>{e?C.forEach(e=>!e.hideCheckbox&&e.onSelect?.()):C.forEach(e=>!e.hideCheckbox&&e.onDeselect?.())}})}),C.length?e(nb,{variant:r,columns:l,rows:C,getRowActions:d||(()=>[]),rowActionsPushRightPosition:p,rowActionsPushLeftPosition:u,withCheckboxes:h}):e(Nn,{style:{height:o},children:a?e(Un,{withSpinner:!0}):e(Ff,{...s})})]})})},cb=o.div`
|
|
2565
2565
|
display: flex;
|
|
2566
2566
|
align-items: center;
|
|
2567
2567
|
justify-content: center;
|
|
@@ -2593,7 +2593,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2593
2593
|
background-color: ${({theme:e})=>e.v2.colors.silver[750]};
|
|
2594
2594
|
border: 1px solid transparent;
|
|
2595
2595
|
`}
|
|
2596
|
-
`,
|
|
2596
|
+
`,db=({label:r,leftIcon:o,rightIcon:n,onClick:a,disabled:s,flex:l})=>{const c=i(),d=s?c.v2.colors.grey[400]:c.v2.colors.white[500];return t(cb,{$disabled:s,$withClick:!!a,onClick:()=>!s&&a?.(),$flex:l,children:[o&&e(o,{fill:d,size:16}),e(cn,{color:d,size:sn.XS,nowrap:!0,children:r}),n&&e(n,{fill:d,size:16})]})},pb=o.div`
|
|
2597
2597
|
padding: 6px 12px;
|
|
2598
2598
|
|
|
2599
2599
|
display: flex;
|
|
@@ -2611,7 +2611,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2611
2611
|
border: 1px solid ${({theme:e})=>e.v2.colors.silver[300]};
|
|
2612
2612
|
}
|
|
2613
2613
|
`}
|
|
2614
|
-
`,
|
|
2614
|
+
`,ub=o.textarea`
|
|
2615
2615
|
max-width: ${({$maxWidth:e})=>e||"unset"};
|
|
2616
2616
|
min-height: ${({$minHeight:e})=>e||"50px"};
|
|
2617
2617
|
flex: 1;
|
|
@@ -2636,24 +2636,24 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as
|
|
|
2636
2636
|
color: ${({theme:e})=>e.v2.colors.grey[400]};
|
|
2637
2637
|
}
|
|
2638
2638
|
}
|
|
2639
|
-
`,
|
|
2639
|
+
`,hb=({label:r,required:o,tooltip:n,badge:i,errorMessage:a,warnMessage:s,helpMessage:l,name:c,value:d,onChange:p,disabled:u,maxWidth:h,minHeight:m,...g})=>{const f=Gt(null),x=()=>{f.current&&(f.current.style.height="auto",f.current.style.height=`${f.current.scrollHeight}px`)};return t(In,{$gap:6,children:[e(mf,{label:r,tooltip:n,required:o,badge:i}),e(pb,{$disabled:u,$error:!!a,children:e(ub,{ref:f,"data-id":c,name:c,value:d,onChange:e=>{e.stopPropagation(),x(),p?.(e)},onKeyDown:e=>{e.stopPropagation()},onFocus:x,onBlur:x,disabled:u,$maxWidth:h,$minHeight:m,...g})}),e(gf,{errorMessage:a,warnMessage:s,helpMessage:l})]})},mb=[{id:"ms",label:"milliseconds"},{id:"s",label:"seconds"},{id:"m",label:"minutes"},{id:"h",label:"hours"}],gb=o.div`
|
|
2640
2640
|
flex: 1;
|
|
2641
2641
|
min-width: 0;
|
|
2642
|
-
`,
|
|
2642
|
+
`,fb=o.div`
|
|
2643
2643
|
flex: 0 0 auto;
|
|
2644
2644
|
min-width: 140px;
|
|
2645
|
-
`,
|
|
2645
|
+
`,xb=({name:r,label:o,tooltip:n,badge:i,placeholder:a,required:s,disabled:l,value:c,setValue:d,units:p=mb,defaultUnit:u,errorMessage:h,warnMessage:m,helpMessage:g,hasError:f,width:x})=>{const y=Xt(()=>u&&p.some(e=>e.id===u)?u:p[0]?.id||"s",[u,p]),{num:b,unit:v}=Xt(()=>((e,t,r)=>{if(null==e||""===e)return{num:"",unit:r};const o=[...t.map(e=>e.id)].sort((e,t)=>t.length-e.length),n=new RegExp(`^\\s*(\\d+)\\s*(${o.join("|")})\\s*$`,"i"),i=String(e).match(n);if(i)return{num:i[1],unit:i[2].toLowerCase()};const a=String(e).match(/^\s*(\d+)\s*$/);return a?{num:a[1],unit:r}:{num:"",unit:r}})(c,p,y),[c,p,y]),$=(e,t)=>{d(""!==e?`${e}${t}`:"")};return t(In,{$width:x,$gap:6,children:[e(mf,{label:o,tooltip:n,required:s,badge:i}),t(Tn,{$gap:8,$alignItems:"center",children:[e(gb,{children:e(bf,{name:r,placeholder:a,disabled:l,hasError:f||!!h,inputMode:"numeric",value:b,onChange:e=>$(di(e.target.value),v)})}),e(fb,{children:e(yy,{name:`${r}-unit`,disabled:l,hasError:f||!!h,withSearch:!1,options:p,values:[v],setValues:e=>$(b,e[0]||v)})})]}),e(gf,{errorMessage:h,warnMessage:m,helpMessage:g})]})},yb=o.div`
|
|
2646
2646
|
width: 530px;
|
|
2647
|
-
`,
|
|
2647
|
+
`,bb=o.div`
|
|
2648
2648
|
display: flex;
|
|
2649
2649
|
flex-direction: column;
|
|
2650
2650
|
align-items: center;
|
|
2651
2651
|
gap: 16px;
|
|
2652
2652
|
padding: 24px;
|
|
2653
|
-
`,
|
|
2653
|
+
`,vb=o.div`
|
|
2654
2654
|
display: flex;
|
|
2655
2655
|
justify-content: center;
|
|
2656
2656
|
gap: 16px;
|
|
2657
2657
|
padding: 16px 24px;
|
|
2658
2658
|
background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
|
|
2659
|
-
|
|
2659
|
+
`,$b=({visual:r,title:o,description:n,isOpen:a,onClose:s,onDeny:l,denyLabel:c="Deny",onApprove:d,approveLabel:p="Approve",...u})=>{const h=i();return e(Fy,{isOpen:a,onClose:s,...u,children:t(yb,{children:[t(bb,{children:[r&&e(r,{}),e(cn,{size:sn.M,weight:500,color:h.v2.colors.white[500],children:o}),e(In,{$alignItems:"center",$gap:4,children:n.split("\n").map(t=>e(cn,{size:sn.XS,weight:400,color:h.v2.colors.silver[200],children:t},t))})]}),(l||d)&&t(vb,{children:[e(Of,{"data-id":"deny",variant:If.Secondary,label:c,onClick:()=>{l?.(),s()}}),d&&e(Of,{"data-id":"approve",variant:If.Primary,label:p,onClick:()=>{d(),s()}})]})]})})};export{Qu as $,tx as A,Nf as B,ud as C,dx as D,Gr as E,In as F,mo as G,li as H,bf as I,ci as J,Ir as K,hi as L,io as M,Ff as N,Rc as O,ao as P,lo as Q,xo as R,Ef as S,Qx as T,fo as U,so as V,no as W,Mp as X,pf as Y,Bs as Z,Lo as _,If as a,Fs as a$,Uu as a0,Ss as a1,Fa as a2,qa as a3,Wa as a4,ks as a5,ws as a6,pa as a7,ua as a8,vf as a9,ol as aA,th as aB,jr as aC,el as aD,ko as aE,So as aF,Wo as aG,xy as aH,Do as aI,Dn as aJ,Xx as aK,_o as aL,Dl as aM,si as aN,Vs as aO,Er as aP,Jn as aQ,ii as aR,Zs as aS,Eo as aT,db as aU,Ko as aV,qi as aW,ta as aX,Yi as aY,ea as aZ,Yu as a_,hx as aa,wa as ab,ml as ac,Wi as ad,Hi as ae,Ao as af,Gi as ag,yy as ah,Ll as ai,Fl as aj,Un as ak,Vi as al,Uo as am,$r as an,qn as ao,qs as ap,Ki as aq,ec as ar,nc as as,tc as at,qr as au,Lr as av,Vx as aw,an as ax,oc as ay,rc as az,Nn as b,gs as b$,Ls as b0,Pa as b1,Zi as b2,Ps as b3,Ns as b4,Is as b5,_s as b6,Os as b7,Ds as b8,As as b9,An as bA,$f as bB,pu as bC,Sa as bD,as as bE,na as bF,ra as bG,oa as bH,ia as bI,uu as bJ,_u as bK,Pu as bL,Lu as bM,Mu as bN,Bu as bO,Au as bP,ku as bQ,Zp as bR,Qp as bS,Yp as bT,Du as bU,Cu as bV,fu as bW,Ou as bX,Cs as bY,fs as bZ,ms as b_,Ji as ba,xs as bb,Hl as bc,cc as bd,ei as be,Kf as bf,Wf as bg,jf as bh,Zl as bi,En as bj,lb as bk,qy as bl,eh as bm,_p as bn,Dp as bo,zp as bp,Ny as bq,Ky as br,ix as bs,rx as bt,nn as bu,Fx as bv,co as bw,fx as bx,Ix as by,bx as bz,Tr as c,fi as c$,hs as c0,us as c1,hu as c2,mu as c3,gu as c4,$b as c5,$s as c6,vs as c7,bs as c8,ys as c9,Ur as cA,Qs as cB,yi as cC,yc as cD,_n as cE,Hc as cF,Bi as cG,vg as cH,Fo as cI,Nd as cJ,Kr as cK,ai as cL,jn as cM,Ys as cN,kr as cO,Ud as cP,Go as cQ,Gd as cR,Fn as cS,Pn as cT,Gm as cU,jo as cV,Ln as cW,qh as cX,sp as cY,cf as cZ,Sl as c_,Gl as ca,Jh as cb,lh as cc,rd as cd,Ei as ce,gh as cf,ng as cg,af as ch,pg as ci,eg as cj,Fc as ck,Rd as cl,Rg as cm,Dg as cn,fm as co,xg as cp,rf as cq,Si as cr,Ks as cs,Lm as ct,mm as cu,Zc as cv,Il as cw,Xi as cx,Ad as cy,lm as cz,mf as d,zo as d$,yd as d0,Al as d1,nl as d2,Qd as d3,oo as d4,Xo as d5,Ho as d6,wg as d7,No as d8,Bo as d9,tm as dA,Yo as dB,Qg as dC,Wl as dD,Qc as dE,fl as dF,to as dG,Kn as dH,Ol as dI,Yr as dJ,Vn as dK,ji as dL,vp as dM,Fd as dN,qm as dO,Br as dP,Tf as dQ,Wn as dR,Yn as dS,_d as dT,np as dU,ap as dV,Sy as dW,ti as dX,pi as dY,Jl as dZ,Ph as d_,Ug as da,_l as db,To as dc,vo as dd,Cr as de,Rl as df,Vl as dg,Cc as dh,Rn as di,Fg as dj,Xl as dk,vh as dl,Ms as dm,Co as dn,Kl as dp,Ml as dq,sl as dr,wo as ds,vd as dt,Pd as du,Wr as dv,Ul as dw,xr as dx,yo as dy,qg as dz,Mf as e,rs as e$,lc as e0,Hd as e1,Po as e2,Rh as e3,Xs as e4,Ro as e5,id as e6,tn as e7,zd as e8,xb as e9,Ka as eA,fa as eB,xa as eC,va as eD,$a as eE,ka as eF,Ea as eG,Ca as eH,aa as eI,sa as eJ,ha as eK,Ja as eL,Ya as eM,ts as eN,zs as eO,la as eP,iu as eQ,Qi as eR,wu as eS,Jp as eT,$u as eU,qp as eV,vu as eW,Kp as eX,La as eY,Oa as eZ,za as e_,Ua as ea,ba as eb,Ba as ec,ya as ed,Va as ee,Ga as ef,Ra as eg,Ma as eh,Xa as ei,es as ej,_a as ek,Xy as el,Qa as em,Ta as en,ma as eo,Ia as ep,Da as eq,ga as er,Na as es,ls as et,Aa as eu,is as ev,cs as ew,ss as ex,ds as ey,ps as ez,gf as f,gl as f$,Ha as f0,os as f1,qf as f2,Za as f3,Pf as f4,vn as f5,Ar as f6,Zr as f7,Or as f8,eo as f9,Zo as fA,en as fB,rn as fC,on as fD,Hn as fE,Zn as fF,ri as fG,ni as fH,di as fI,ui as fJ,mi as fK,gi as fL,Sr as fM,xi as fN,ns as fO,Rs as fP,Ts as fQ,Es as fR,da as fS,ca as fT,Us as fU,js as fV,Ws as fW,ja as fX,Hs as fY,hl as fZ,$l as f_,Qr as fa,Mr as fb,Vr as fc,_r as fd,Fr as fe,Rr as ff,ro as fg,zr as fh,ho as fi,uo as fj,po as fk,Jr as fl,bo as fm,go as fn,Pr as fo,Nr as fp,wn as fq,$n as fr,Cn as fs,yr as ft,Io as fu,wr as fv,Mo as fw,Vo as fx,Jo as fy,Qo as fz,Oo as g,ul as g0,Nl as g1,Ql as g2,oh as g3,nh as g4,hp as g5,cp as g6,hm as g7,Om as g8,Am as g9,Mm as ga,Hm as gb,Md as gc,mg as gd,On as ge,vm as gf,vi as gg,$i as gh,wi as gi,Zf as gj,ex as gk,Uf as gl,Bx as gm,mb as gn,vx as go,$y as gp,Fy as gq,Uy as gr,Vy as gs,jy as gt,px as gu,ey as gv,Gx as gw,ox as gx,Xr as h,Qn as i,Ty as j,Kx as k,ky as l,vc as m,Tn as n,Of as o,Hr as p,Dr as q,Tp as r,cn as s,sn as t,zl as u,$o as v,hb as w,vr as x,Fp as y,dy as z};
|