@odigos/ui-kit 0.0.199 → 0.0.200

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.200](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.199...ui-kit-v0.0.200) (2026-03-02)
4
+
5
+
6
+ ### Features
7
+
8
+ * refactor source selection to use cached bulk namespace query ([#698](https://github.com/odigos-io/ui-kit/issues/698)) ([ecf256d](https://github.com/odigos-io/ui-kit/commit/ecf256d78f0980199742abe937ddad63b3787342))
9
+
3
10
  ## [0.0.199](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.198...ui-kit-v0.0.199) (2026-03-01)
4
11
 
5
12
 
@@ -1,3 +1,3 @@
1
- import{jsx as t}from"react/jsx-runtime";import{useState as o,useMemo as e}from"react";import i from"styled-components";import{al as a,s,q as n,ay as r,aw as l,ap as c,cK as p,l as m,N as d}from"./ui-components-DSKV7uC0.js";import{VIcon as u,CopyIcon as f,ChevronUpIcon as h,ChevronDownIcon as y,YamlIcon as b}from"../icons.js";const k=i.div`
1
+ import{jsx as t}from"react/jsx-runtime";import{useState as o,useMemo as e}from"react";import i from"styled-components";import{al as a,s,q as n,ay as r,aw as l,ap as c,cJ as p,l as m,N as d}from"./ui-components-Bw_jKy4u.js";import{VIcon as u,CopyIcon as f,ChevronUpIcon as h,ChevronDownIcon as y,YamlIcon as b}from"../icons.js";const k=i.div`
2
2
  padding: 0 12px;
3
3
  `,C=({title:i="YAML",yaml:C,defaultOpen:Y})=>{const{clickCopy:g,isCopied:j}=a(),[v,x]=o(Y??!1),A=e(()=>C?[{id:l(),type:r.Button,buttonProps:{variant:n.Secondary,size:s.S,leftIcon:j?u:f,onClick:()=>g(C||""),disabled:j}},{id:l(),type:r.Button,buttonProps:{variant:n.Secondary,size:s.S,leftIcon:v?h:y,onClick:()=>x(t=>!t)}}]:[],[C,j,v]);return t(c,{richTitle:{icon:b,title:i},actions:A,children:v&&t(k,{children:C?t(p,{code:C,language:"yaml",theme:"duotoneDark"}):t(m,{children:t(d,{title:"YAML not found",subTitle:"The YAML for this resource is not available"})})})})};export{C as Y};
@@ -142,7 +142,7 @@ import{SamplerIcon as e,PiiMaskingIcon as t,RenameAttributeIcon as i,DeleteAttri
142
142
  margin: 4px 0 0 0;
143
143
  list-style: none;
144
144
  width: 100%;
145
- `,No=(e,t)=>t?e.reduce((e,i)=>{if(i.items){const n=No(i.items,t);n.length&&e.push({...i,items:n})}else i.label.toLowerCase().includes(t.toLowerCase())&&e.push(i);return e},[]):e,Oo=({placeholder:e="Type to search...",options:t,selectedOption:i,onOptionSelect:n,defaultText:o,onTextChange:r,style:a,disabled:s,errorMessage:l,...c})=>{const[d,p]=yt(i?.label||o||""),[u,h]=yt(No(t,d)),[m,g]=yt(!1);yt(-1),wt(()=>h(No(t,d)),[t]);const $=i?.icon,x=e=>{e&&(p(e.label),r?.(e.label)),g(!e),n?.(e)};return zt(bo,{style:a,children:[zt(yo,{$hasError:!!l,children:[$&&Ft($,{}),Ft(wo,{type:"text",value:d,placeholder:e,onChange:e=>{e.stopPropagation();const i=e.target.value,n=No(t,i),o=1===n.length&&n[0].label===i?n[0]:void 0;p(i),r?.(i),h(n),x(o)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},disabled:s,onBlur:()=>!s&&g(!1),onFocus:()=>!s&&g(!0),...c})]}),m&&u.length?Ft(vo,{children:u.map(e=>Ft(Fo,{option:e,onClick:x},e.type||e.label))}):null,l&&Ft(fo,{children:l})]})},Fo=({option:e,renderIcon:t=!0,onClick:i})=>{const n=!!e.items&&e.items.length>0,o=e.icon;return zt(Co,{"data-id":`option-${e.type||e.label}`,$isList:n,onMouseDown:()=>n?null:i(e),children:[o&&t&&Ft(o,{}),zt(ko,{children:[zt(Ao,{children:[Ft(To,{children:e.label}),Ft(Do,{children:e.description})]}),n&&Ft(Io,{children:e.items?.map(e=>zt(Eo,{children:[Ft(So,{}),Ft(Fo,{option:e,renderIcon:!1,onClick:i})]},e.type||e.label))})]})]})},zo=xt(e=>({activeNodeType:null,activeNodeId:null,setActiveNodeType:t=>e({activeNodeType:t}),setActiveNodeId:t=>e({activeNodeId:t})})),_o=[{type:si.K8sAttributes,icon:pn(si.K8sAttributes),label:"Kubernetes Attributes",description:"Add dynamic k8s resource attributes to your data.",allowedSignals:[qi.Traces,qi.Metrics,qi.Logs],docsEndpoint:"/pipeline/actions/attributes/k8sattributes",docsDescription:"This action adds kubernetes related resource attributes to spans, metrics data points and log records."},{type:si.AddClusterInfo,icon:pn(si.AddClusterInfo),label:"Add Cluster Info",description:"Add static cluster-scoped attributes to your data.",allowedSignals:[qi.Traces,qi.Metrics,qi.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:si.DeleteAttributes,icon:pn(si.DeleteAttributes),label:"Delete Attribute",description:"Delete attributes from logs, metrics, and traces.",allowedSignals:[qi.Traces,qi.Metrics,qi.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:si.RenameAttributes,icon:pn(si.RenameAttributes),label:"Rename Attribute",description:"Rename attributes in logs, metrics, and traces.",allowedSignals:[qi.Traces,qi.Metrics,qi.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:si.PiiMasking,icon:pn(si.PiiMasking),label:"PII Masking",description:"Mask PII data in your traces.",allowedSignals:[qi.Traces],docsEndpoint:"/pipeline/actions/attributes/piimasking",docsDescription:"This action processes a list of PII categories to be masked from the traces."}],Ro=[{type:si.ErrorSampler,icon:pn(ai.Samplers),label:"Error Sampler",description:"Sample errors based on percentage.",allowedSignals:[qi.Traces],docsEndpoint:"/pipeline/actions/sampling/errorsampler",docsDescription:"This action is a Global Action that supports error sampling by filtering out non-error traces."},{type:si.LatencySampler,icon:pn(ai.Samplers),label:"Latency Sampler",description:"Add latency to your traces.",allowedSignals:[qi.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:si.ProbabilisticSampler,icon:pn(ai.Samplers),label:"Probabilistic Sampler",description:"Sample traces based on percentage.",allowedSignals:[qi.Traces],docsEndpoint:"/pipeline/actions/sampling/probabilisticsampler",docsDescription:"This action supports probabilistic sampling based on a configured sampling percentage applied to the TraceID."},{type:si.ServiceNameSampler,icon:pn(ai.Samplers),label:"Service Name Sampler",description:"Sample traces based on the presence of specified services within a trace.",allowedSignals:[qi.Traces],docsEndpoint:"/pipeline/actions/sampling/servicenamesampler",docsDescription:"This action supports service name sampling based on the presence of specified services within a trace."},{type:si.SpanAttributeSampler,icon:pn(ai.Samplers),label:"Span Attributes Sampler",description:"Sample traces based on the presence or value of specific attributes within a trace.",allowedSignals:[qi.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."}],Bo=[{label:"Attributes",icon:pn(ai.Attributes),items:_o},{label:"Samplers",icon:pn(ai.Samplers),items:Ro}];var Mo;!function(e){e.ALL="all",e.EXISTS="exists",e.DETECTED="detected",e.SELF_HOSTED="self-hosted",e.MANAGED="managed"}(Mo||(Mo={}));const Lo={[Mo.ALL]:{TITLE:"All",DESCRIPTION:"All destinations"},[Mo.EXISTS]:{TITLE:"Already configured",DESCRIPTION:"These are destinations that you have already configured in other data-streams and can reuse them."},[Mo.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."},[Mo.SELF_HOSTED]:{TITLE:"Self hosted",DESCRIPTION:"Full control and customization for advanced application monitoring."},[Mo.MANAGED]:{TITLE:"Managed",DESCRIPTION:"Effortless monitoring with scalable performance management."}},Po=[{type:Bi.CodeAttributes,icon:wn(Bi.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:[bi.Go,bi.Python]},{type:Bi.CustomInstrumentation,icon:wn(Bi.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:[bi.Go,bi.Java]},{type:Bi.HeadersCollection,icon:wn(Bi.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:[bi.Go,bi.Java,bi.JavaScript]},{type:Bi.PayloadCollection,icon:wn(Bi.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:[bi.Go]}],jo=[{id:qi.Logs,value:"Logs"},{id:qi.Metrics,value:"Metrics"},{id:qi.Traces,value:"Traces"}],Uo={[bi.Go]:"Go",[bi.Java]:"Java",[bi.JavaScript]:"Node.js",[bi.Python]:"Python",[bi.DotNet]:".NET",[bi.CSharp]:"C#",[bi.CPlusPlus]:"C++",[bi.Php]:"PHP",[bi.Ruby]:"Ruby",[bi.Rust]:"Rust",[bi.Swift]:"Swift",[bi.Elixir]:"Elixir",[bi.MySql]:"MySQL",[bi.Nginx]:"Nginx",[bi.Postgres]:"PostgreSQL",[bi.Redis]:"Redis",[bi.Kafka]:"Kafka",[bi.Ignored]:"Ignored",[bi.Unknown]:"Unknown",[bi.Processing]:"Processing",[bi.NoContainers]:"No Containers",[bi.NoRunningPods]:"No Running Pods"},Wo=[{id:bi.Go,value:Uo[bi.Go],icon:mn(bi.Go)},{id:bi.Java,value:Uo[bi.Java],icon:mn(bi.Java)},{id:bi.JavaScript,value:Uo[bi.JavaScript],icon:mn(bi.JavaScript)},{id:bi.Python,value:Uo[bi.Python],icon:mn(bi.Python)},{id:bi.Php,value:Uo[bi.Php],icon:mn(bi.Php)},{id:bi.Ruby,value:Uo[bi.Ruby],icon:mn(bi.Ruby)},{id:bi.Rust,value:Uo[bi.Rust],icon:mn(bi.Rust)},{id:bi.DotNet,value:Uo[bi.DotNet],icon:mn(bi.DotNet)},{id:bi.CSharp,value:Uo[bi.CSharp],icon:mn(bi.CSharp)},{id:bi.CPlusPlus,value:Uo[bi.CPlusPlus],icon:mn(bi.CPlusPlus)},{id:bi.Swift,value:Uo[bi.Swift],icon:mn(bi.Swift)},{id:bi.Elixir,value:Uo[bi.Elixir],icon:mn(bi.Elixir)}],Vo={[bi.Go]:{community:[{id:_i.GolangCommunity,value:_i.GolangCommunity,icon:mn(bi.Go)}],enterprise:[{id:_i.GolangEnterprise,value:_i.GolangEnterprise,icon:mn(bi.Go)}]},[bi.JavaScript]:{community:[{id:_i.NodejsCommunity,value:_i.NodejsCommunity,icon:mn(bi.JavaScript)}],enterprise:[{id:_i.NodejsEnterprise,value:_i.NodejsEnterprise,icon:mn(bi.JavaScript)}]},[bi.Python]:{community:[{id:_i.PythonCommunity,value:_i.PythonCommunity,icon:mn(bi.Python)}],enterprise:[{id:_i.PythonEnterprise,value:_i.PythonEnterprise,icon:mn(bi.Python)}]},[bi.Java]:{community:[{id:_i.JavaCommunity,value:_i.JavaCommunity,icon:mn(bi.Java)}],enterprise:[{id:_i.JavaEnterprise,value:_i.JavaEnterprise,icon:mn(bi.Java)},{id:_i.JavaEbpfInstrumentations,value:_i.JavaEbpfInstrumentations,icon:mn(bi.Java)}]},[bi.DotNet]:{community:[{id:_i.DotNetCommunity,value:_i.DotNetCommunity,icon:mn(bi.DotNet)}],enterprise:[{id:_i.DotNetEnterprise,value:_i.DotNetEnterprise,icon:mn(bi.DotNet)}]},[bi.Ruby]:{community:[{id:_i.RubyCommunity,value:_i.RubyCommunity,icon:mn(bi.Ruby)}],enterprise:[{id:_i.RubyEnterprise,value:_i.RubyEnterprise,icon:mn(bi.Ruby)}]},[bi.Php]:{community:[{id:_i.PhpCommunity,value:_i.PhpCommunity,icon:mn(bi.Php)}],enterprise:[]},[bi.CSharp]:{community:[],enterprise:[{id:_i.CPlusPlusEnterprise,value:_i.CPlusPlusEnterprise,icon:mn(bi.CSharp)}]},[bi.MySql]:{community:[],enterprise:[{id:_i.MySqlEnterprise,value:_i.MySqlEnterprise,icon:mn(bi.MySql)}]},[bi.CPlusPlus]:{community:[],enterprise:[]},[bi.Rust]:{community:[],enterprise:[]},[bi.Swift]:{community:[],enterprise:[]},[bi.Elixir]:{community:[],enterprise:[]},[bi.Nginx]:{community:[],enterprise:[]},[bi.Postgres]:{community:[],enterprise:[]},[bi.Redis]:{community:[],enterprise:[]},[bi.Kafka]:{community:[],enterprise:[]},[bi.Ignored]:{community:[],enterprise:[]},[bi.Unknown]:{community:[],enterprise:[]},[bi.Processing]:{community:[],enterprise:[]},[bi.NoContainers]:{community:[],enterprise:[]},[bi.NoRunningPods]:{community:[],enterprise:[]}},Go=6048e5,qo=xt()(Dt(e=>({darkMode:!0,setDarkMode:t=>e({darkMode:t})}),{name:tn.DARK_MODE,storage:"undefined"!=typeof window?It(()=>localStorage):void 0})),Ho={dataStreamsLoading:!1,dataStreams:[],selectedStreamName:""},Ko=xt(e=>({...Ho,setDataStreamsLoading:t=>e({dataStreamsLoading:t}),setDataStreams:t=>e({dataStreams:t}),addDataStreams:t=>e(e=>{const i=[...e.dataStreams,...t].map(e=>[e.name,e]);return{dataStreams:Array.from(new Map(i).values())}}),removeDataStreams:t=>e(e=>({dataStreams:e.dataStreams.filter(e=>!t.find(t=>t.name===e.name))})),setSelectedStreamName:t=>e({selectedStreamName:t}),resetDataStreamStore:()=>e(Ho)})),Yo=xt(e=>({drawerType:null,drawerEntityId:null,setDrawerType:t=>e({drawerType:t}),setDrawerEntityId:t=>e({drawerEntityId:t})})),Jo=xt(e=>({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[],setEntitiesLoading:(t,i)=>{const n=t===wi.Namespace?"namespacesLoading":t===wi.Source?"sourcesLoading":t===wi.Destination?"destinationsLoading":t===wi.Action?"actionsLoading":t===wi.InstrumentationRule?"instrumentationRulesLoading":"NONE";"NONE"!==n&&e({[n]:i})},setEntities:(t,i)=>{const n=t===wi.Namespace?"namespaces":t===wi.Source?"sources":t===wi.Destination?"destinations":t===wi.Action?"actions":t===wi.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==n&&e({[n]:i})},addEntities:(t,i)=>{const n=t===wi.Namespace?"namespaces":t===wi.Source?"sources":t===wi.Destination?"destinations":t===wi.Action?"actions":t===wi.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==n&&e(e=>{const t=[...e[n]],o=new Map;return t.forEach((e,t)=>{o.set(JSON.stringify(fn(e)),t)}),i.forEach(e=>{const i=JSON.stringify(fn(e)),n=o.get(i);void 0!==n?t[n]={...t[n],...e}:(o.set(i,t.length),t.push(e))}),{[n]:t}})},removeEntities:(t,i)=>{const n=t===wi.Namespace?"namespaces":t===wi.Source?"sources":t===wi.Destination?"destinations":t===wi.Action?"actions":t===wi.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==n&&e(e=>{const o=new Set;i.forEach(e=>{const i=t===wi.Source?JSON.stringify(fn(e)):String(e);o.add(i)});const r=e[n].filter(e=>{const i=t===wi.Source?JSON.stringify(fn(e)):String(fn(e));return!o.has(i)});return{[n]:r}})},resetEntityStore:()=>{e({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[]})}})),Xo=()=>({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],conditions:[],podsAgentInjectionStatus:[],errors:[],onlyErrors:!1}),Zo=xt(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:Xo})),Qo=xt(e=>({currentModal:"",setCurrentModal:t=>e({currentModal:t})})),er=xt((e,t)=>({notifications:[],addNotification:i=>{const n=new Date,o=`${n.getTime().toString()}${i.target?`#${i.target}`:""}`,{notifications:r}=t();r.some(e=>e.type===i.type&&e.title===i.title&&e.message===i.message&&!e.dismissed)||e(e=>({notifications:[{...i,id:o,time:n.toISOString(),dismissed:!1,seen:!1},...e.notifications]}))},markAsDismissed:t=>{e(e=>{const i=e.notifications.findIndex(e=>e.id===t);return-1!==i&&(e.notifications[i].dismissed=!0),{notifications:e.notifications}})},markAsSeen:t=>{e(e=>{const i=e.notifications.findIndex(e=>e.id===t);return-1!==i&&(e.notifications[i].seen=!0),{notifications:e.notifications}})},removeNotification:t=>{e(e=>{const i=e.notifications.findIndex(e=>e.id===t);return-1!==i&&e.notifications.splice(i,1),{notifications:e.notifications}})},removeNotifications:t=>{t&&e(e=>({notifications:e.notifications.filter(e=>e.id.split("#")[1]!==t)}))}}));var tr;!function(e){e.Instrumenting="instrumenting",e.Uninstrumenting="uninstrumenting",e.BulkInstrumenting="bulk-instrumenting",e.BulkUninstrumenting="bulk-uninstrumenting"}(tr||(tr={}));const ir=(e,t)=>({...t?.[e]||{total:0,current:0,percentage:0}}),nr=e=>(e.total<e.current&&(e.total=e.current+1),e.percentage=Math.round(e.current/e.total*100),e),or=xt((e,t)=>({progress:{},setProgress:(i,n)=>{const o=t(),r=ir();return"number"==typeof n.total&&(r.total=n.total),"number"==typeof n.current&&(r.current=n.current),e({progress:{...o.progress,[i]:nr(r)}})},addProgress:(i,n)=>{const o=t(),r=ir(i,o.progress);return r.current+=n,e({progress:{...o.progress,[i]:nr(r)}})},resetProgress:t=>e({progress:{[t]:void 0}})})),rr=xt(e=>({selectedSources:{},setSelectedSources:t=>e({selectedSources:t}),resetSelectedState:()=>e(()=>({selectedSources:{},selectedConnection:null}))})),ar={availableSources:{},configuredSources:{},configuredFutureApps:{},configuredDestinations:[],configuredDestinationsUpdateOnly:[]},sr=(e,t)=>e.destinationType.type!==t.destinationType.type,lr=xt(e=>({...ar,setAvailableSources:t=>e({availableSources:t}),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=>sr(e,t))})),setConfiguredDestinationsUpdateOnly:t=>e({configuredDestinationsUpdateOnly:t}),addConfiguredDestinationUpdateOnly:t=>e(e=>{const i=[...e.configuredDestinationsUpdateOnly,t].map(e=>[e.id,e]);return{configuredDestinationsUpdateOnly:Array.from(new Map(i).values())}}),removeConfiguredDestinationUpdateOnly:t=>e(e=>({configuredDestinationsUpdateOnly:e.configuredDestinationsUpdateOnly.filter(e=>sr(e,t))})),clearStore:()=>e(()=>({...ar}))})),cr={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"}},dr={v2:cr.v2,darkMode:!0,colors:{...cr.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:cr.font_family},pr={v2:cr.v2,darkMode:!1,colors:{...cr.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:cr.font_family},ur=e=>e?dr:pr;var hr=Object.freeze({__proto__:null,baseTheme:cr,darkModeTheme:dr,getTheme:ur,lightModeTheme:pr});Nt('@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 mr=({children:e})=>{const{darkMode:t}=qo();return Ft(Lt,{theme:ur(t),children:e})},gr={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 $r=Object.freeze({__proto__:null,hex:gr});const xr={in:{left:Pt`
145
+ `,No=(e,t)=>t?e.reduce((e,i)=>{if(i.items){const n=No(i.items,t);n.length&&e.push({...i,items:n})}else i.label.toLowerCase().includes(t.toLowerCase())&&e.push(i);return e},[]):e,Oo=({placeholder:e="Type to search...",options:t,selectedOption:i,onOptionSelect:n,defaultText:o,onTextChange:r,style:a,disabled:s,errorMessage:l,...c})=>{const[d,p]=yt(i?.label||o||""),[u,h]=yt(No(t,d)),[m,g]=yt(!1);yt(-1),wt(()=>h(No(t,d)),[t]);const $=i?.icon,x=e=>{e&&(p(e.label),r?.(e.label)),g(!e),n?.(e)};return zt(bo,{style:a,children:[zt(yo,{$hasError:!!l,children:[$&&Ft($,{}),Ft(wo,{type:"text",value:d,placeholder:e,onChange:e=>{e.stopPropagation();const i=e.target.value,n=No(t,i),o=1===n.length&&n[0].label===i?n[0]:void 0;p(i),r?.(i),h(n),x(o)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},disabled:s,onBlur:()=>!s&&g(!1),onFocus:()=>!s&&g(!0),...c})]}),m&&u.length?Ft(vo,{children:u.map(e=>Ft(Fo,{option:e,onClick:x},e.type||e.label))}):null,l&&Ft(fo,{children:l})]})},Fo=({option:e,renderIcon:t=!0,onClick:i})=>{const n=!!e.items&&e.items.length>0,o=e.icon;return zt(Co,{"data-id":`option-${e.type||e.label}`,$isList:n,onMouseDown:()=>n?null:i(e),children:[o&&t&&Ft(o,{}),zt(ko,{children:[zt(Ao,{children:[Ft(To,{children:e.label}),Ft(Do,{children:e.description})]}),n&&Ft(Io,{children:e.items?.map(e=>zt(Eo,{children:[Ft(So,{}),Ft(Fo,{option:e,renderIcon:!1,onClick:i})]},e.type||e.label))})]})]})},zo=xt(e=>({activeNodeType:null,activeNodeId:null,setActiveNodeType:t=>e({activeNodeType:t}),setActiveNodeId:t=>e({activeNodeId:t})})),_o=[{type:si.K8sAttributes,icon:pn(si.K8sAttributes),label:"Kubernetes Attributes",description:"Add dynamic k8s resource attributes to your data.",allowedSignals:[qi.Traces,qi.Metrics,qi.Logs],docsEndpoint:"/pipeline/actions/attributes/k8sattributes",docsDescription:"This action adds kubernetes related resource attributes to spans, metrics data points and log records."},{type:si.AddClusterInfo,icon:pn(si.AddClusterInfo),label:"Add Cluster Info",description:"Add static cluster-scoped attributes to your data.",allowedSignals:[qi.Traces,qi.Metrics,qi.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:si.DeleteAttributes,icon:pn(si.DeleteAttributes),label:"Delete Attribute",description:"Delete attributes from logs, metrics, and traces.",allowedSignals:[qi.Traces,qi.Metrics,qi.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:si.RenameAttributes,icon:pn(si.RenameAttributes),label:"Rename Attribute",description:"Rename attributes in logs, metrics, and traces.",allowedSignals:[qi.Traces,qi.Metrics,qi.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:si.PiiMasking,icon:pn(si.PiiMasking),label:"PII Masking",description:"Mask PII data in your traces.",allowedSignals:[qi.Traces],docsEndpoint:"/pipeline/actions/attributes/piimasking",docsDescription:"This action processes a list of PII categories to be masked from the traces."}],Ro=[{type:si.ErrorSampler,icon:pn(ai.Samplers),label:"Error Sampler",description:"Sample errors based on percentage.",allowedSignals:[qi.Traces],docsEndpoint:"/pipeline/actions/sampling/errorsampler",docsDescription:"This action is a Global Action that supports error sampling by filtering out non-error traces."},{type:si.LatencySampler,icon:pn(ai.Samplers),label:"Latency Sampler",description:"Add latency to your traces.",allowedSignals:[qi.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:si.ProbabilisticSampler,icon:pn(ai.Samplers),label:"Probabilistic Sampler",description:"Sample traces based on percentage.",allowedSignals:[qi.Traces],docsEndpoint:"/pipeline/actions/sampling/probabilisticsampler",docsDescription:"This action supports probabilistic sampling based on a configured sampling percentage applied to the TraceID."},{type:si.ServiceNameSampler,icon:pn(ai.Samplers),label:"Service Name Sampler",description:"Sample traces based on the presence of specified services within a trace.",allowedSignals:[qi.Traces],docsEndpoint:"/pipeline/actions/sampling/servicenamesampler",docsDescription:"This action supports service name sampling based on the presence of specified services within a trace."},{type:si.SpanAttributeSampler,icon:pn(ai.Samplers),label:"Span Attributes Sampler",description:"Sample traces based on the presence or value of specific attributes within a trace.",allowedSignals:[qi.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."}],Bo=[{label:"Attributes",icon:pn(ai.Attributes),items:_o},{label:"Samplers",icon:pn(ai.Samplers),items:Ro}];var Mo;!function(e){e.ALL="all",e.EXISTS="exists",e.DETECTED="detected",e.SELF_HOSTED="self-hosted",e.MANAGED="managed"}(Mo||(Mo={}));const Lo={[Mo.ALL]:{TITLE:"All",DESCRIPTION:"All destinations"},[Mo.EXISTS]:{TITLE:"Already configured",DESCRIPTION:"These are destinations that you have already configured in other data-streams and can reuse them."},[Mo.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."},[Mo.SELF_HOSTED]:{TITLE:"Self hosted",DESCRIPTION:"Full control and customization for advanced application monitoring."},[Mo.MANAGED]:{TITLE:"Managed",DESCRIPTION:"Effortless monitoring with scalable performance management."}},Po=[{type:Bi.CodeAttributes,icon:wn(Bi.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:[bi.Go,bi.Python]},{type:Bi.CustomInstrumentation,icon:wn(Bi.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:[bi.Go,bi.Java]},{type:Bi.HeadersCollection,icon:wn(Bi.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:[bi.Go,bi.Java,bi.JavaScript]},{type:Bi.PayloadCollection,icon:wn(Bi.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:[bi.Go]}],jo=[{id:qi.Logs,value:"Logs"},{id:qi.Metrics,value:"Metrics"},{id:qi.Traces,value:"Traces"}],Uo={[bi.Go]:"Go",[bi.Java]:"Java",[bi.JavaScript]:"Node.js",[bi.Python]:"Python",[bi.DotNet]:".NET",[bi.CSharp]:"C#",[bi.CPlusPlus]:"C++",[bi.Php]:"PHP",[bi.Ruby]:"Ruby",[bi.Rust]:"Rust",[bi.Swift]:"Swift",[bi.Elixir]:"Elixir",[bi.MySql]:"MySQL",[bi.Nginx]:"Nginx",[bi.Postgres]:"PostgreSQL",[bi.Redis]:"Redis",[bi.Kafka]:"Kafka",[bi.Ignored]:"Ignored",[bi.Unknown]:"Unknown",[bi.Processing]:"Processing",[bi.NoContainers]:"No Containers",[bi.NoRunningPods]:"No Running Pods"},Wo=[{id:bi.Go,value:Uo[bi.Go],icon:mn(bi.Go)},{id:bi.Java,value:Uo[bi.Java],icon:mn(bi.Java)},{id:bi.JavaScript,value:Uo[bi.JavaScript],icon:mn(bi.JavaScript)},{id:bi.Python,value:Uo[bi.Python],icon:mn(bi.Python)},{id:bi.Php,value:Uo[bi.Php],icon:mn(bi.Php)},{id:bi.Ruby,value:Uo[bi.Ruby],icon:mn(bi.Ruby)},{id:bi.Rust,value:Uo[bi.Rust],icon:mn(bi.Rust)},{id:bi.DotNet,value:Uo[bi.DotNet],icon:mn(bi.DotNet)},{id:bi.CSharp,value:Uo[bi.CSharp],icon:mn(bi.CSharp)},{id:bi.CPlusPlus,value:Uo[bi.CPlusPlus],icon:mn(bi.CPlusPlus)},{id:bi.Swift,value:Uo[bi.Swift],icon:mn(bi.Swift)},{id:bi.Elixir,value:Uo[bi.Elixir],icon:mn(bi.Elixir)}],Vo={[bi.Go]:{community:[{id:_i.GolangCommunity,value:_i.GolangCommunity,icon:mn(bi.Go)}],enterprise:[{id:_i.GolangEnterprise,value:_i.GolangEnterprise,icon:mn(bi.Go)}]},[bi.JavaScript]:{community:[{id:_i.NodejsCommunity,value:_i.NodejsCommunity,icon:mn(bi.JavaScript)}],enterprise:[{id:_i.NodejsEnterprise,value:_i.NodejsEnterprise,icon:mn(bi.JavaScript)}]},[bi.Python]:{community:[{id:_i.PythonCommunity,value:_i.PythonCommunity,icon:mn(bi.Python)}],enterprise:[{id:_i.PythonEnterprise,value:_i.PythonEnterprise,icon:mn(bi.Python)}]},[bi.Java]:{community:[{id:_i.JavaCommunity,value:_i.JavaCommunity,icon:mn(bi.Java)}],enterprise:[{id:_i.JavaEnterprise,value:_i.JavaEnterprise,icon:mn(bi.Java)},{id:_i.JavaEbpfInstrumentations,value:_i.JavaEbpfInstrumentations,icon:mn(bi.Java)}]},[bi.DotNet]:{community:[{id:_i.DotNetCommunity,value:_i.DotNetCommunity,icon:mn(bi.DotNet)}],enterprise:[{id:_i.DotNetEnterprise,value:_i.DotNetEnterprise,icon:mn(bi.DotNet)}]},[bi.Ruby]:{community:[{id:_i.RubyCommunity,value:_i.RubyCommunity,icon:mn(bi.Ruby)}],enterprise:[{id:_i.RubyEnterprise,value:_i.RubyEnterprise,icon:mn(bi.Ruby)}]},[bi.Php]:{community:[{id:_i.PhpCommunity,value:_i.PhpCommunity,icon:mn(bi.Php)}],enterprise:[]},[bi.CSharp]:{community:[],enterprise:[{id:_i.CPlusPlusEnterprise,value:_i.CPlusPlusEnterprise,icon:mn(bi.CSharp)}]},[bi.MySql]:{community:[],enterprise:[{id:_i.MySqlEnterprise,value:_i.MySqlEnterprise,icon:mn(bi.MySql)}]},[bi.CPlusPlus]:{community:[],enterprise:[]},[bi.Rust]:{community:[],enterprise:[]},[bi.Swift]:{community:[],enterprise:[]},[bi.Elixir]:{community:[],enterprise:[]},[bi.Nginx]:{community:[],enterprise:[]},[bi.Postgres]:{community:[],enterprise:[]},[bi.Redis]:{community:[],enterprise:[]},[bi.Kafka]:{community:[],enterprise:[]},[bi.Ignored]:{community:[],enterprise:[]},[bi.Unknown]:{community:[],enterprise:[]},[bi.Processing]:{community:[],enterprise:[]},[bi.NoContainers]:{community:[],enterprise:[]},[bi.NoRunningPods]:{community:[],enterprise:[]}},Go=6048e5,qo=xt()(Dt(e=>({darkMode:!0,setDarkMode:t=>e({darkMode:t})}),{name:tn.DARK_MODE,storage:"undefined"!=typeof window?It(()=>localStorage):void 0})),Ho={dataStreamsLoading:!1,dataStreams:[],selectedStreamName:""},Ko=xt(e=>({...Ho,setDataStreamsLoading:t=>e({dataStreamsLoading:t}),setDataStreams:t=>e({dataStreams:t}),addDataStreams:t=>e(e=>{const i=[...e.dataStreams,...t].map(e=>[e.name,e]);return{dataStreams:Array.from(new Map(i).values())}}),removeDataStreams:t=>e(e=>({dataStreams:e.dataStreams.filter(e=>!t.find(t=>t.name===e.name))})),setSelectedStreamName:t=>e({selectedStreamName:t}),resetDataStreamStore:()=>e(Ho)})),Yo=xt(e=>({drawerType:null,drawerEntityId:null,setDrawerType:t=>e({drawerType:t}),setDrawerEntityId:t=>e({drawerEntityId:t})})),Jo=xt(e=>({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[],setEntitiesLoading:(t,i)=>{const n=t===wi.Namespace?"namespacesLoading":t===wi.Source?"sourcesLoading":t===wi.Destination?"destinationsLoading":t===wi.Action?"actionsLoading":t===wi.InstrumentationRule?"instrumentationRulesLoading":"NONE";"NONE"!==n&&e({[n]:i})},setEntities:(t,i)=>{const n=t===wi.Namespace?"namespaces":t===wi.Source?"sources":t===wi.Destination?"destinations":t===wi.Action?"actions":t===wi.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==n&&e({[n]:i})},addEntities:(t,i)=>{const n=t===wi.Namespace?"namespaces":t===wi.Source?"sources":t===wi.Destination?"destinations":t===wi.Action?"actions":t===wi.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==n&&e(e=>{const t=[...e[n]],o=new Map;return t.forEach((e,t)=>{o.set(JSON.stringify(fn(e)),t)}),i.forEach(e=>{const i=JSON.stringify(fn(e)),n=o.get(i);void 0!==n?t[n]={...t[n],...e}:(o.set(i,t.length),t.push(e))}),{[n]:t}})},removeEntities:(t,i)=>{const n=t===wi.Namespace?"namespaces":t===wi.Source?"sources":t===wi.Destination?"destinations":t===wi.Action?"actions":t===wi.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==n&&e(e=>{const o=new Set;i.forEach(e=>{const i=t===wi.Source?JSON.stringify(fn(e)):String(e);o.add(i)});const r=e[n].filter(e=>{const i=t===wi.Source?JSON.stringify(fn(e)):String(fn(e));return!o.has(i)});return{[n]:r}})},resetEntityStore:()=>{e({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[]})}})),Xo=()=>({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],conditions:[],podsAgentInjectionStatus:[],errors:[],onlyErrors:!1}),Zo=xt(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:Xo})),Qo=xt(e=>({currentModal:"",setCurrentModal:t=>e({currentModal:t})})),er=xt((e,t)=>({notifications:[],addNotification:i=>{const n=new Date,o=`${n.getTime().toString()}${i.target?`#${i.target}`:""}`,{notifications:r}=t();r.some(e=>e.type===i.type&&e.title===i.title&&e.message===i.message&&!e.dismissed)||e(e=>({notifications:[{...i,id:o,time:n.toISOString(),dismissed:!1,seen:!1},...e.notifications]}))},markAsDismissed:t=>{e(e=>{const i=e.notifications.findIndex(e=>e.id===t);return-1!==i&&(e.notifications[i].dismissed=!0),{notifications:e.notifications}})},markAsSeen:t=>{e(e=>{const i=e.notifications.findIndex(e=>e.id===t);return-1!==i&&(e.notifications[i].seen=!0),{notifications:e.notifications}})},removeNotification:t=>{e(e=>{const i=e.notifications.findIndex(e=>e.id===t);return-1!==i&&e.notifications.splice(i,1),{notifications:e.notifications}})},removeNotifications:t=>{t&&e(e=>({notifications:e.notifications.filter(e=>e.id.split("#")[1]!==t)}))}}));var tr;!function(e){e.Instrumenting="instrumenting",e.Uninstrumenting="uninstrumenting",e.BulkInstrumenting="bulk-instrumenting",e.BulkUninstrumenting="bulk-uninstrumenting"}(tr||(tr={}));const ir=(e,t)=>({...t?.[e]||{total:0,current:0,percentage:0}}),nr=e=>(e.total<e.current&&(e.total=e.current+1),e.percentage=Math.round(e.current/e.total*100),e),or=xt((e,t)=>({progress:{},setProgress:(i,n)=>{const o=t(),r=ir();return"number"==typeof n.total&&(r.total=n.total),"number"==typeof n.current&&(r.current=n.current),e({progress:{...o.progress,[i]:nr(r)}})},addProgress:(i,n)=>{const o=t(),r=ir(i,o.progress);return r.current+=n,e({progress:{...o.progress,[i]:nr(r)}})},resetProgress:t=>e({progress:{[t]:void 0}})})),rr=xt(e=>({selectedSources:{},setSelectedSources:t=>e({selectedSources:t}),resetSelectedState:()=>e(()=>({selectedSources:{},selectedConnection:null}))})),ar={configuredSources:{},configuredFutureApps:{},configuredDestinations:[],configuredDestinationsUpdateOnly:[]},sr=(e,t)=>e.destinationType.type!==t.destinationType.type,lr=xt(e=>({...ar,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=>sr(e,t))})),setConfiguredDestinationsUpdateOnly:t=>e({configuredDestinationsUpdateOnly:t}),addConfiguredDestinationUpdateOnly:t=>e(e=>{const i=[...e.configuredDestinationsUpdateOnly,t].map(e=>[e.id,e]);return{configuredDestinationsUpdateOnly:Array.from(new Map(i).values())}}),removeConfiguredDestinationUpdateOnly:t=>e(e=>({configuredDestinationsUpdateOnly:e.configuredDestinationsUpdateOnly.filter(e=>sr(e,t))})),clearStore:()=>e(()=>({...ar}))})),cr={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"}},dr={v2:cr.v2,darkMode:!0,colors:{...cr.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:cr.font_family},pr={v2:cr.v2,darkMode:!1,colors:{...cr.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:cr.font_family},ur=e=>e?dr:pr;var hr=Object.freeze({__proto__:null,baseTheme:cr,darkModeTheme:dr,getTheme:ur,lightModeTheme:pr});Nt('@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 mr=({children:e})=>{const{darkMode:t}=qo();return Ft(Lt,{theme:ur(t),children:e})},gr={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 $r=Object.freeze({__proto__:null,hex:gr});const xr={in:{left:Pt`
146
146
  from { transform: translateX(-100%); }
147
147
  to { transform: translateX(0); }
148
148
  `,right:Pt`
@@ -333,7 +333,7 @@ import{SamplerIcon as e,PiiMaskingIcon as t,RenameAttributeIcon as i,DeleteAttri
333
333
  &:hover {
334
334
  background: ${({theme:e})=>e.v2.colors.silver[900]};
335
335
  }
336
- `,Mr=({icon:e,size:t=Rr.S,onClick:i,disabled:n})=>Ft(Br,{$size:t,$disabled:n,onClick:e=>{i&&!n&&(e.stopPropagation(),i(e))},children:Ft(e,{size:t})}),Lr=({onDone:e}={})=>{const[t,i]=yt(!1),[n,o]=yt(-1),r=Ct(async(n,r)=>{if(!t){if(i(!0),void 0!==r&&o(r),navigator?.clipboard&&navigator.clipboard.writeText)try{await navigator.clipboard.writeText(n)}catch(e){}else{const e=document.createElement("textarea");e.value=n,document.body.appendChild(e),e.select();try{document.execCommand("copy")}catch(e){}document.body.removeChild(e)}e?.(),setTimeout(()=>{i(!1),o(-1)},1e3)}},[t,e]);return{CopyButton:Ct(({value:e,size:i})=>Ft(Mr,{icon:t?He:Ke,size:i,onClick:()=>r(e)}),[t]),isCopied:t,copiedIndex:n,clickCopy:r}},Pr=e=>{const{addNotification:t}=er(),{formData:i,handleFormChange:n,formErrors:o,handleErrorChange:r,resetFormData:a}=Dr(e);return{formData:i,formErrors:o,handleFormChange:n,resetFormData:a,validateForm:e=>{const n={};let o=!0;return i.name?Ln(i.name)?n.name=void 0:(o=!1,n.name=nn.ILLEGAL_K8S_LABEL):(o=!1,n.name=nn.FIELD_IS_REQUIRED),!o&&e?.withAlert&&t({type:Ei.Warning,title:e.alertTitle,message:nn.REQUIRED_FIELDS,hideFromHistory:!0}),r(void 0,void 0,n),o},loadFormWithDrawerItem:({name:t})=>{const i={...ii(e),name:t};n(void 0,void 0,i)}}},jr={type:"",name:"",exportedSignals:{logs:!1,metrics:!1,traces:!1},fields:[],disabled:!1},Ur=e=>{const{supportedSignals:t,preLoadedFields:i}=e||{},{addNotification:n}=er(),{formData:o,formErrors:r,handleFormChange:a,handleErrorChange:s,resetFormData:l}=Dr(jr),[c,d]=yt([]),[p,u]=yt([]);return wt(()=>{var e;u(c?(e=c,e.filter(e=>!!e).map(e=>{const{name:t,componentType:i,componentProperties:n,displayName:o,initialValue:r,renderCondition:a}=e;if(i===Ci.Dropdown){const e=_n(n,{}),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:i,title:o,value:r,placeholder:e.placeholder||"Select an option",options:s,renderCondition:a,...e}}return{name:t,componentType:i,title:o,value:r,renderCondition:a,..._n(n,{})}})).map(e=>{if(i){const t="string"==typeof i?_n(i,{}):i;if(e.name in t)return{...e,value:t[e.name]}}return e}):[])},[c,i]),wt(()=>{if(p){const e=p.map(e=>({key:e.name,value:e.value}));a("fields",e)}},[p]),wt(()=>{if(t&&0===Kn(o.exportedSignals).length){const{logs:e,metrics:i,traces:n}=t;a("exportedSignals",{logs:e.supported,metrics:i.supported,traces:n.supported})}},[t,o.exportedSignals]),{formData:o,formErrors:r,handleFormChange:a,resetFormData:l,validateForm:e=>{const t={};let i=!0;return p.forEach(({name:e,value:n,required:o})=>{o&&!n&&(i=!1,t[e]=nn.FIELD_IS_REQUIRED)}),!i&&e?.withAlert&&n({type:Ei.Warning,title:e.alertTitle,message:nn.REQUIRED_FIELDS,hideFromHistory:!0}),s(void 0,void 0,t),i},loadFormWithDrawerItem:({destinationType:{type:e},name:t,disabled:i,exportedSignals:n,fields:o})=>{const r={...ii(jr),type:e,name:t,disabled:i,exportedSignals:n,fields:Object.entries(_n(o,{})).map(([e,t])=>({key:e,value:t}))};return a(void 0,void 0,r),r},yamlFields:c,setYamlFields:d,dynamicFields:p,setDynamicFields:u}},Wr={ruleName:"",notes:"",disabled:!1,workloads:null,instrumentationLibraries:null,payloadCollection:{[ji.HttpRequest]:null,[ji.HttpResponse]:null,[ji.DbQuery]:null,[ji.Messaging]:null},codeAttributes:{[Mi.Column]:null,[Mi.FilePath]:null,[Mi.Function]:null,[Mi.LineNumber]:null,[Mi.Namespace]:null,[Mi.StackTrace]:null},headersCollection:null,customInstrumentations:{[Pi.Java]:null,[Pi.Golang]:null}},Vr=()=>{const{formData:e,formErrors:t,handleFormChange:i,handleErrorChange:n,resetFormData:o}=Dr(Wr);return{formData:e,formErrors:t,handleFormChange:i,resetFormData:o,validateForm:()=>(n(void 0,void 0,{}),!0),loadFormWithDrawerItem:({ruleName:e,notes:t,disabled:n,payloadCollection:o,codeAttributes:r,headersCollection:a,customInstrumentations:s})=>{const l={...ii(Wr),ruleName:e,notes:t,disabled:n};o&&(l.payloadCollection={[ji.HttpRequest]:o[ji.HttpRequest]?{}:null,[ji.HttpResponse]:o[ji.HttpResponse]?{}:null,[ji.DbQuery]:o[ji.DbQuery]?{}:null,[ji.Messaging]:o[ji.Messaging]?{}:null}),r&&(l.codeAttributes={[Mi.Column]:r[Mi.Column]||null,[Mi.FilePath]:r[Mi.FilePath]||null,[Mi.Function]:r[Mi.Function]||null,[Mi.LineNumber]:r[Mi.LineNumber]||null,[Mi.Namespace]:r[Mi.Namespace]||null,[Mi.StackTrace]:r[Mi.StackTrace]||null}),a&&(l.headersCollection=a),s&&(l.customInstrumentations={[Pi.Java]:s[Pi.Java]||null,[Pi.Golang]:s[Pi.Golang]||null}),i(void 0,void 0,l)}}},Gr=({active:e,key:t,withAltKey:i,withCtrlKey:n,withShiftKey:o,withMetaKey:r},a)=>(wt(()=>{const s=s=>{e&&t===s.key&&(!i||i&&s.altKey)&&(!n||n&&s.ctrlKey)&&(!o||o&&s.shiftKey)&&(!r||r&&s.metaKey)&&(s.preventDefault(),s.stopPropagation(),a(s))};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}},[t,e,i,n,o,r,a]),null),qr=(e,t)=>{wt(()=>{const i=i=>{e.current&&!e.current.contains(i.target)&&t()};return document.addEventListener("mousedown",i),document.addEventListener("touchstart",i),()=>{document.removeEventListener("mousedown",i),document.removeEventListener("touchstart",i)}},[e,t])},Hr=({defaultClientHeight:e=0,defaultClientwidth:t=0,onClickOutside:i}={})=>{const n=vt(null),[o,r]=yt(!1),[a,s]=yt({top:0,left:0});return qr(n,()=>{o&&(r(!1),i?.())}),{popupRef:n,popupOpen:o,setPopupOpen:r,popupPosition:a,handlePosition:(i,o)=>{const{innerWidth:r,innerHeight:a}=window;let l=o,c=i;l>=a/2&&(l+=-(n.current?.clientHeight||e)),c>=r/2&&(c+=-(n.current?.clientWidth||t)),s({top:l,left:c})}}},Kr=()=>({getItemSS:(e,t)=>{const i=sessionStorage.getItem(e);return i?_n(i,t):t},setItemSS:(e,t)=>{sessionStorage.setItem(e,JSON.stringify(t))},removeItemSS:e=>{sessionStorage.removeItem(e)}}),Yr={otelServiceName:"",currentStreamName:""},Jr=()=>{const{formData:e,formErrors:t,handleFormChange:i,handleErrorChange:n,resetFormData:o}=Dr(Yr);return{formData:e,formErrors:t,handleFormChange:i,resetFormData:o,validateForm:()=>(n(void 0,void 0,{}),!0),loadFormWithDrawerItem:({otelServiceName:e,name:t})=>{const n={...ii(Yr),otelServiceName:e||t||""};i(void 0,void 0,n)}}},Xr=(e,t,i)=>{const n="boolean"==typeof i,o=!!e.dataStreamNames?.length||!!e.currentStreamName?.length,r=o&&e.dataStreamNames?.includes(t)||e.currentStreamName===t,a=(n?i:e.selected&&(!o||r))||!1;return{namespace:e.namespace,name:e.name,kind:e.kind,selected:a,numberOfInstances:e.numberOfInstances}},Zr=(e,t,i)=>({...Xr(e,t,i),currentStreamName:t}),Qr=(e,t,i)=>{const n="boolean"==typeof i,o=e.dataStreamNames?.includes(t),r=(n?i:e.selected)||!1;return{namespace:e.name,selected:!(!o&&!n)&&r,currentStreamName:t}},ea=e=>{const{fetchSingleNamespace:t}=e||{},{selectedStreamName:i}=Ko(),{namespaces:n,addEntities:o}=Jo(),r=vt(!1),{configuredSources:a,configuredFutureApps:s,availableSources:l,setAvailableSources:c}=lr(),[d,p]=yt(l),[u,h]=yt(""),[m,g]=yt(!1),[$,x]=yt([]),[f,b]=yt(""),[y,w]=yt(s),[v,C]=yt(((e,t,i)=>{const n={};return Object.entries(e).forEach(([e,t])=>{n[e]=t.map(e=>Zr(e,i))}),Object.entries(t).forEach(([e,t])=>{t.forEach(t=>{const o=n[e].findIndex(e=>e.name===t.name&&e.kind===t.kind),r=Zr(t,i);-1!==o?n[e][o]=r:n[e].push(r)})}),n})(l,a,i)),k=async(e,n)=>{if(t)if($.includes(e.name))C(t=>({...t,[e.name]:t[e.name].map(e=>({...e,selected:"boolean"==typeof n?n:e.selected,currentStreamName:i}))}));else{h(e.name);const{data:a}=await t({namespaceName:e.name});h("");const s=a?.computePlatform?.k8sActualNamespace;if(!s||!r.current)return;o(wi.Namespace,[{...s,sources:[]}]);const l=s.sources?.map(e=>Xr(e,i))||[];x(e=>[...e,s.name]),c({...lr.getState().availableSources,[s.name]:l}),p(e=>({...e,[s.name]:l})),C(e=>({...e,[s.name]:"boolean"!=typeof n&&e[s.name]?.length?e[s.name]:s.sources?.map(e=>Zr(e,i,n))||[]})),w(e=>({...e,[s.name]:Qr(s,i,n)}))}};wt(()=>(n?.length&&(p(e=>{const t={...e};return n.forEach(({name:e})=>t[e]=t[e]||[]),t}),C(e=>{const t={...e};return n.forEach(({name:e})=>t[e]=t[e]||[]),t}),w(e=>{const t={...e};return n.forEach(e=>t[e.name]=t[e.name]||Qr(e,i)),t}),r.current=!0,(async()=>{for await(const e of n){if(!r.current)break;await k(e)}})()),()=>{r.current=!1}),[n.length,i]);const[E,S]=yt(""),[A,T]=yt(wi.Source),[D,I]=yt(!1),[N,O]=yt(!1),F=bt(()=>{const e=(e,t)=>!E||A!==t||A===t&&e.toLowerCase().includes(E),t={};return Object.entries(v).filter(([t])=>e(t,wi.Namespace)).forEach(([i,n])=>{const o=n.filter(t=>e(t.name,wi.Source)&&(!D||t.selected)&&(e=>!N||(e.numberOfInstances||0)>0)(t));(!E||E&&(A===wi.Namespace||A===wi.Source&&o.length))&&(t[i]=o)}),t},[v,E,A,D,N]);return{fetchingNamespace:u,fetchedNamespaces:$,availableSources:d,filteredNamespacesAndSources:F,getApiSourcesPayload:()=>{const e={};return Object.entries(v).forEach(([t,i])=>{i.forEach(i=>{const n=d[t]?.find(e=>e.name===i.name&&e.kind===i.kind);n?.selected!==i.selected&&(e[t]||(e[t]=[]),e[t].push(i))})}),e},getApiFutureAppsPayload:()=>{const e={};return Object.entries(y).forEach(([t,o])=>{const r=n?.find(e=>e.name===t);(o.selected&&!r?.dataStreamNames?.includes(i)||!o.selected&&r?.dataStreamNames?.includes(i))&&(e[t]=o)}),e},selectedNamespace:f,onSelectNamespace:(e,t)=>{const i=n.find(t=>t.name===e);if(i){const n="boolean"==typeof t;b(t=>t!==e||n?e:""),k(i,t),n&&g(!1)}},selectedAllNamespaces:m,onSelectAllNamespaces:e=>{g(e),n.forEach(t=>k(t,e))},selectedSources:v,onSelectSource:(e,t)=>{const n=t||f;if(!n)return;const o=[...v[n]||[]],r=o.findIndex(({name:t,kind:i})=>t===e.name&&i===e.kind);if(-1!==r){const e={...o[r],selected:!o[r].selected,currentStreamName:i};o[r]=e}else o.push({...e,selected:!0,currentStreamName:i});C(e=>({...e,[n]:o})),g(!1)},selectedFutureApps:y,onSelectFutureApps:(e,t)=>{const o=t||f;if(!o)return;const r=n.find(e=>e.name===t);r&&w(t=>({...t,[o]:Qr(r,i,e)}))},searchText:E,setSearchText:S,searchBy:A,setSearchBy:T,showSelectedOnly:D,setShowSelectedOnly:I,showRunningOnly:N,setShowRunningOnly:O}};try{Tt.addDefaultLocale(Ot)}catch(e){}const ta=()=>{const e=vt(new Tt(Ot.locale));return{formatTimeAgo:Ct(t=>{try{return"string"==typeof t&&(t=t.replace("t","T").replace("z","Z")),e.current.format(new Date(t))}catch(e){return"-"}},[])}},ia=Rt.div`
336
+ `,Mr=({icon:e,size:t=Rr.S,onClick:i,disabled:n})=>Ft(Br,{$size:t,$disabled:n,onClick:e=>{i&&!n&&(e.stopPropagation(),i(e))},children:Ft(e,{size:t})}),Lr=({onDone:e}={})=>{const[t,i]=yt(!1),[n,o]=yt(-1),r=Ct(async(n,r)=>{if(!t){if(i(!0),void 0!==r&&o(r),navigator?.clipboard&&navigator.clipboard.writeText)try{await navigator.clipboard.writeText(n)}catch(e){}else{const e=document.createElement("textarea");e.value=n,document.body.appendChild(e),e.select();try{document.execCommand("copy")}catch(e){}document.body.removeChild(e)}e?.(),setTimeout(()=>{i(!1),o(-1)},1e3)}},[t,e]);return{CopyButton:Ct(({value:e,size:i})=>Ft(Mr,{icon:t?He:Ke,size:i,onClick:()=>r(e)}),[t]),isCopied:t,copiedIndex:n,clickCopy:r}},Pr=e=>{const{addNotification:t}=er(),{formData:i,handleFormChange:n,formErrors:o,handleErrorChange:r,resetFormData:a}=Dr(e);return{formData:i,formErrors:o,handleFormChange:n,resetFormData:a,validateForm:e=>{const n={};let o=!0;return i.name?Ln(i.name)?n.name=void 0:(o=!1,n.name=nn.ILLEGAL_K8S_LABEL):(o=!1,n.name=nn.FIELD_IS_REQUIRED),!o&&e?.withAlert&&t({type:Ei.Warning,title:e.alertTitle,message:nn.REQUIRED_FIELDS,hideFromHistory:!0}),r(void 0,void 0,n),o},loadFormWithDrawerItem:({name:t})=>{const i={...ii(e),name:t};n(void 0,void 0,i)}}},jr={type:"",name:"",exportedSignals:{logs:!1,metrics:!1,traces:!1},fields:[],disabled:!1},Ur=e=>{const{supportedSignals:t,preLoadedFields:i}=e||{},{addNotification:n}=er(),{formData:o,formErrors:r,handleFormChange:a,handleErrorChange:s,resetFormData:l}=Dr(jr),[c,d]=yt([]),[p,u]=yt([]);return wt(()=>{var e;u(c?(e=c,e.filter(e=>!!e).map(e=>{const{name:t,componentType:i,componentProperties:n,displayName:o,initialValue:r,renderCondition:a}=e;if(i===Ci.Dropdown){const e=_n(n,{}),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:i,title:o,value:r,placeholder:e.placeholder||"Select an option",options:s,renderCondition:a,...e}}return{name:t,componentType:i,title:o,value:r,renderCondition:a,..._n(n,{})}})).map(e=>{if(i){const t="string"==typeof i?_n(i,{}):i;if(e.name in t)return{...e,value:t[e.name]}}return e}):[])},[c,i]),wt(()=>{if(p){const e=p.map(e=>({key:e.name,value:e.value}));a("fields",e)}},[p]),wt(()=>{if(t&&0===Kn(o.exportedSignals).length){const{logs:e,metrics:i,traces:n}=t;a("exportedSignals",{logs:e.supported,metrics:i.supported,traces:n.supported})}},[t,o.exportedSignals]),{formData:o,formErrors:r,handleFormChange:a,resetFormData:l,validateForm:e=>{const t={};let i=!0;return p.forEach(({name:e,value:n,required:o})=>{o&&!n&&(i=!1,t[e]=nn.FIELD_IS_REQUIRED)}),!i&&e?.withAlert&&n({type:Ei.Warning,title:e.alertTitle,message:nn.REQUIRED_FIELDS,hideFromHistory:!0}),s(void 0,void 0,t),i},loadFormWithDrawerItem:({destinationType:{type:e},name:t,disabled:i,exportedSignals:n,fields:o})=>{const r={...ii(jr),type:e,name:t,disabled:i,exportedSignals:n,fields:Object.entries(_n(o,{})).map(([e,t])=>({key:e,value:t}))};return a(void 0,void 0,r),r},yamlFields:c,setYamlFields:d,dynamicFields:p,setDynamicFields:u}},Wr={ruleName:"",notes:"",disabled:!1,workloads:null,instrumentationLibraries:null,payloadCollection:{[ji.HttpRequest]:null,[ji.HttpResponse]:null,[ji.DbQuery]:null,[ji.Messaging]:null},codeAttributes:{[Mi.Column]:null,[Mi.FilePath]:null,[Mi.Function]:null,[Mi.LineNumber]:null,[Mi.Namespace]:null,[Mi.StackTrace]:null},headersCollection:null,customInstrumentations:{[Pi.Java]:null,[Pi.Golang]:null}},Vr=()=>{const{formData:e,formErrors:t,handleFormChange:i,handleErrorChange:n,resetFormData:o}=Dr(Wr);return{formData:e,formErrors:t,handleFormChange:i,resetFormData:o,validateForm:()=>(n(void 0,void 0,{}),!0),loadFormWithDrawerItem:({ruleName:e,notes:t,disabled:n,payloadCollection:o,codeAttributes:r,headersCollection:a,customInstrumentations:s})=>{const l={...ii(Wr),ruleName:e,notes:t,disabled:n};o&&(l.payloadCollection={[ji.HttpRequest]:o[ji.HttpRequest]?{}:null,[ji.HttpResponse]:o[ji.HttpResponse]?{}:null,[ji.DbQuery]:o[ji.DbQuery]?{}:null,[ji.Messaging]:o[ji.Messaging]?{}:null}),r&&(l.codeAttributes={[Mi.Column]:r[Mi.Column]||null,[Mi.FilePath]:r[Mi.FilePath]||null,[Mi.Function]:r[Mi.Function]||null,[Mi.LineNumber]:r[Mi.LineNumber]||null,[Mi.Namespace]:r[Mi.Namespace]||null,[Mi.StackTrace]:r[Mi.StackTrace]||null}),a&&(l.headersCollection=a),s&&(l.customInstrumentations={[Pi.Java]:s[Pi.Java]||null,[Pi.Golang]:s[Pi.Golang]||null}),i(void 0,void 0,l)}}},Gr=({active:e,key:t,withAltKey:i,withCtrlKey:n,withShiftKey:o,withMetaKey:r},a)=>(wt(()=>{const s=s=>{e&&t===s.key&&(!i||i&&s.altKey)&&(!n||n&&s.ctrlKey)&&(!o||o&&s.shiftKey)&&(!r||r&&s.metaKey)&&(s.preventDefault(),s.stopPropagation(),a(s))};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}},[t,e,i,n,o,r,a]),null),qr=(e,t)=>{wt(()=>{const i=i=>{e.current&&!e.current.contains(i.target)&&t()};return document.addEventListener("mousedown",i),document.addEventListener("touchstart",i),()=>{document.removeEventListener("mousedown",i),document.removeEventListener("touchstart",i)}},[e,t])},Hr=({defaultClientHeight:e=0,defaultClientwidth:t=0,onClickOutside:i}={})=>{const n=vt(null),[o,r]=yt(!1),[a,s]=yt({top:0,left:0});return qr(n,()=>{o&&(r(!1),i?.())}),{popupRef:n,popupOpen:o,setPopupOpen:r,popupPosition:a,handlePosition:(i,o)=>{const{innerWidth:r,innerHeight:a}=window;let l=o,c=i;l>=a/2&&(l+=-(n.current?.clientHeight||e)),c>=r/2&&(c+=-(n.current?.clientWidth||t)),s({top:l,left:c})}}},Kr=()=>({getItemSS:(e,t)=>{const i=sessionStorage.getItem(e);return i?_n(i,t):t},setItemSS:(e,t)=>{sessionStorage.setItem(e,JSON.stringify(t))},removeItemSS:e=>{sessionStorage.removeItem(e)}}),Yr={otelServiceName:"",currentStreamName:""},Jr=()=>{const{formData:e,formErrors:t,handleFormChange:i,handleErrorChange:n,resetFormData:o}=Dr(Yr);return{formData:e,formErrors:t,handleFormChange:i,resetFormData:o,validateForm:()=>(n(void 0,void 0,{}),!0),loadFormWithDrawerItem:({otelServiceName:e,name:t})=>{const n={...ii(Yr),otelServiceName:e||t||""};i(void 0,void 0,n)}}},Xr=(e,t,i)=>{const n=!!e.dataStreamNames?.length||!!e.currentStreamName?.length,o=n&&e.dataStreamNames?.includes(t)||e.currentStreamName===t,r=e.selected&&(!n||o)||!1;return{namespace:e.namespace,name:e.name,kind:e.kind,selected:r,numberOfInstances:e.numberOfInstances}},Zr=(e,t,i)=>({...Xr(e,t),currentStreamName:t}),Qr=(e,t,i)=>{const n="boolean"==typeof i,o=e.dataStreamNames?.includes(t),r=(n?i:e.selected)||!1;return{namespace:e.name,selected:!(!o&&!n)&&r,currentStreamName:t}},ea=e=>{const{fetchNamespacesWithWorkloads:t}=e,{selectedStreamName:i}=Ko(),{namespaces:n,addEntities:o}=Jo(),r=vt(!1),[a,s]=yt(!1),[l,c]=yt({}),[d,p]=yt(!1),[u,h]=yt(""),[m,g]=yt({}),[$,x]=yt({}),[f,b]=yt(""),[y,w]=yt(wi.Source),[v,C]=yt(!1),[k,E]=yt(!1),S=bt(()=>{const e=(e,t)=>!f||y!==t||y===t&&e.toLowerCase().includes(f),t={};return Object.entries($).filter(([t])=>e(t,wi.Namespace)).forEach(([i,n])=>{const o=n.filter(t=>e(t.name,wi.Source)&&(!v||t.selected)&&(e=>!k||(e.numberOfInstances||0)>0)(t));(!f||f&&(y===wi.Namespace||y===wi.Source&&o.length))&&(t[i]=o)}),t},[$,f,y,v,k]);return wt(()=>(r.current=!0,(async()=>{s(!0);const e=await t();if(!r.current)return;s(!1);const n=e.data;if(!n?.length)return;const a=[...n].sort((e,t)=>e.name.localeCompare(t.name)),l={},d={},p={};for(const e of a){const t=[...e.sources||[]].sort((e,t)=>e.name.localeCompare(t.name));l[e.name]=t.map(e=>Xr(e,i)),d[e.name]=t.map(e=>Zr(e,i)),p[e.name]=Qr(e,i)}o(wi.Namespace,n.map(({sources:e,...t})=>t));const{configuredSources:u,configuredFutureApps:h}=lr.getState();Object.entries(u).forEach(([e,t])=>{d[e]&&t.forEach(t=>{const i=d[e].findIndex(e=>e.name===t.name&&e.kind===t.kind);-1!==i&&(d[e][i]={...d[e][i],selected:t.selected,currentStreamName:t.currentStreamName})})}),Object.entries(h).forEach(([e,t])=>{p[e]&&(p[e]=t)}),c(l),x(d),g(p)})(),()=>{r.current=!1}),[i]),{loading:a,availableSources:l,filteredNamespacesAndSources:S,getApiSourcesPayload:()=>{const e={};return Object.entries($).forEach(([t,i])=>{i.forEach(i=>{const n=l[t]?.find(e=>e.name===i.name&&e.kind===i.kind);n?.selected!==i.selected&&(e[t]||(e[t]=[]),e[t].push(i))})}),e},getApiFutureAppsPayload:()=>{const e={};return Object.entries(m).forEach(([t,o])=>{const r=n?.find(e=>e.name===t);(o.selected&&!r?.dataStreamNames?.includes(i)||!o.selected&&r?.dataStreamNames?.includes(i))&&(e[t]=o)}),e},selectedNamespace:u,onSelectNamespace:(e,t)=>{if(n.find(t=>t.name===e)){const n="boolean"==typeof t;h(t=>t!==e||n?e:""),n&&(x(n=>({...n,[e]:(n[e]||[]).map(e=>({...e,selected:t,currentStreamName:i}))})),p(!1))}},selectedAllNamespaces:d,onSelectAllNamespaces:e=>{p(e),x(t=>{const n={};for(const[o,r]of Object.entries(t))n[o]=r.map(t=>({...t,selected:e,currentStreamName:i}));return n})},selectedSources:$,onSelectSource:(e,t)=>{const n=t||u;if(!n)return;const o=[...$[n]||[]],r=o.findIndex(({name:t,kind:i})=>t===e.name&&i===e.kind);if(-1!==r){const e={...o[r],selected:!o[r].selected,currentStreamName:i};o[r]=e}else o.push({...e,selected:!0,currentStreamName:i});x(e=>({...e,[n]:o})),p(!1)},selectedFutureApps:m,onSelectFutureApps:(e,t)=>{const o=t||u;if(!o)return;const r=n.find(e=>e.name===t);r&&g(t=>({...t,[o]:Qr(r,i,e)}))},searchText:f,setSearchText:b,searchBy:y,setSearchBy:w,showSelectedOnly:v,setShowSelectedOnly:C,showRunningOnly:k,setShowRunningOnly:E}};try{Tt.addDefaultLocale(Ot)}catch(e){}const ta=()=>{const e=vt(new Tt(Ot.locale));return{formatTimeAgo:Ct(t=>{try{return"string"==typeof t&&(t=t.replace("t","T").replace("z","Z")),e.current.format(new Date(t))}catch(e){return"-"}},[])}},ia=Rt.div`
337
337
  flex: 1;
338
338
  align-self: stretch;
339
339
  display: flex;
@@ -2379,4 +2379,4 @@ import{SamplerIcon as e,PiiMaskingIcon as t,RenameAttributeIcon as i,DeleteAttri
2379
2379
  gap: 16px;
2380
2380
  padding: 16px 24px;
2381
2381
  background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
2382
- `,fm=({visual:e,title:t,description:i,isOpen:n,onClose:o,onDeny:r,denyLabel:a="Deny",onApprove:s,approveLabel:l="Approve",...c})=>{const d=Mt();return Ft(Sh,{isOpen:n,onClose:o,...c,children:zt(gm,{children:[zt($m,{children:[e&&Ft(e,{}),Ft(so,{size:ro.M,weight:500,color:d.v2.colors.white[500],children:t}),Ft(ra,{$alignItems:"center",$gap:4,children:i.split("\n").map(e=>Ft(so,{size:ro.XS,weight:400,color:d.v2.colors.silver[200],children:e},e))})]}),(r||s)&&zt(xm,{children:[Ft(zp,{variant:Np.Secondary,label:a,onClick:()=>{r?.(),o()}}),s&&Ft(zp,{variant:Np.Primary,label:l,onClick:()=>{s(),o()}})]})]})})};export{mn as $,li as A,zp as B,Qp as C,zu as D,qi as E,ra as F,Kn as G,Mi as H,Uu as I,Oa as J,ci as K,vh as L,jo as M,Ih as N,Li as O,ji as P,Yi as Q,uu as R,Vd as S,um as T,Ki as U,hh as V,fm as W,Pi as X,Bi as Y,co as Z,Uo as _,Bu as a,go as a$,gr as a0,_o as a1,Ro as a2,Dr as a3,on as a4,nn as a5,Mr as a6,Rr as a7,Mo as a8,Lo as a9,ia as aA,em as aB,jh as aC,ih as aD,In as aE,fs as aF,Su as aG,wr as aH,du as aI,fu as aJ,wu as aK,Ui as aL,na as aM,fc as aN,Il as aO,is as aP,fo as aQ,Bl as aR,Sd as aS,Ap as aT,Fd as aU,vd as aV,ep as aW,Jd as aX,Mc as aY,Ld as aZ,kp as a_,$n as aa,Wp as ab,Ko as ac,Po as ad,Ti as ae,sm as af,oo as ag,or as ah,en as ai,wi as aj,tr as ak,Lr as al,Gr as am,ta as an,Pn as ao,gu as ap,Jo as aq,lu as ar,nu as as,iu as at,Cl as au,Up as av,dn as aw,vl as ax,cu as ay,rn as az,Mu as b,_a as b$,Yo as b0,rd as b1,Rc as b2,Qa as b3,Nr as b4,fn as b5,Bo as b6,As as b7,Ic as b8,pn as b9,kr as bA,to as bB,Tr as bC,rr as bD,Zs as bE,ln as bF,wn as bG,gn as bH,Ri as bI,cp as bJ,_r as bK,an as bL,ri as bM,Zi as bN,oi as bO,Fr as bP,Hr as bQ,Da as bR,sa as bS,np as bT,qr as bU,Gn as bV,Ul as bW,tn as bX,Kr as bY,Pr as bZ,lr as b_,yi as ba,Qo as bb,va as bc,ca as bd,Va as be,Oo as bf,ka as bg,Ud as bh,un as bi,Ns as bj,Ai as bk,qn as bl,Nn as bm,Zo as bn,ni as bo,js as bp,bn as bq,qs as br,da as bs,pa as bt,md as bu,xn as bv,ua as bw,xc as bx,sl as by,Ip as bz,ki as c,Xi as c$,ys as c0,Os as c1,Rs as c2,vi as c3,Hn as c4,Ur as c5,Rn as c6,Zt as c7,Ji as c8,xp as c9,oc as cA,ea as cB,Vs as cC,hn as cD,ec as cE,qo as cF,cn as cG,rs as cH,An as cI,Ms as cJ,us as cK,ai as cL,Oi as cM,ui as cN,Fi as cO,Ni as cP,fi as cQ,Si as cR,hi as cS,mi as cT,pi as cU,_i as cV,xi as cW,Gi as cX,Vi as cY,Wi as cZ,Di as c_,Cc as ca,Cn as cb,yp as cc,er as cd,Vr as ce,$i as cf,Za as cg,xr as ch,zn as ci,zr as cj,Ii as ck,bl as cl,Rd as cm,_s as cn,xd as co,On as cp,Bn as cq,zs as cr,ol as cs,al as ct,Ku as cu,jn as cv,Xn as cw,Jr as cx,zi as cy,bi as cz,eh as d,im as d$,Hi as d0,gi as d1,di as d2,Qt as d3,sn as d4,yn as d5,vn as d6,kn as d7,En as d8,Sn as d9,cl as dA,_c as dB,td as dC,Yc as dD,sd as dE,ud as dF,Ls as dG,la as dH,Uc as dI,ha as dJ,uo as dK,ho as dL,mo as dM,gh as dN,mh as dO,fh as dP,Mp as dQ,Lp as dR,tu as dS,Jp as dT,qu as dU,Sh as dV,Th as dW,Mh as dX,Ph as dY,_h as dZ,hu as d_,Tn as da,Dn as db,Fn as dc,Ln as dd,Un as de,Vn as df,Jn as dg,Zn as dh,Qn as di,eo as dj,io as dk,no as dl,Wo as dm,Vo as dn,Go as dp,zo as dq,mr as dr,vr as ds,$r as dt,hr as du,Or as dv,wl as dw,El as dx,Sl as dy,gl as dz,lm as e,mm as e0,am as e1,Yu as f,Ci as g,si as h,Mn as i,ii as j,oa as k,aa as l,ro as m,Yp as n,zh as o,Ei as p,Np as q,so as r,Op as s,Qi as t,qp as u,rm as v,ti as w,Wu as x,_n as y,Yn as z};
2382
+ `,fm=({visual:e,title:t,description:i,isOpen:n,onClose:o,onDeny:r,denyLabel:a="Deny",onApprove:s,approveLabel:l="Approve",...c})=>{const d=Mt();return Ft(Sh,{isOpen:n,onClose:o,...c,children:zt(gm,{children:[zt($m,{children:[e&&Ft(e,{}),Ft(so,{size:ro.M,weight:500,color:d.v2.colors.white[500],children:t}),Ft(ra,{$alignItems:"center",$gap:4,children:i.split("\n").map(e=>Ft(so,{size:ro.XS,weight:400,color:d.v2.colors.silver[200],children:e},e))})]}),(r||s)&&zt(xm,{children:[Ft(zp,{variant:Np.Secondary,label:a,onClick:()=>{r?.(),o()}}),s&&Ft(zp,{variant:Np.Primary,label:l,onClick:()=>{s(),o()}})]})]})})};export{mn as $,li as A,zp as B,Qp as C,zu as D,qi as E,ra as F,Kn as G,Mi as H,Uu as I,Oa as J,ci as K,vh as L,jo as M,Ih as N,Li as O,ji as P,Yi as Q,uu as R,Vd as S,um as T,Ki as U,hh as V,fm as W,Pi as X,Bi as Y,co as Z,Uo as _,Bu as a,go as a$,gr as a0,_o as a1,Ro as a2,Dr as a3,on as a4,nn as a5,Mr as a6,Rr as a7,Mo as a8,Lo as a9,ia as aA,em as aB,jh as aC,ih as aD,In as aE,fs as aF,Su as aG,wr as aH,du as aI,fu as aJ,wu as aK,Ui as aL,na as aM,fc as aN,Il as aO,is as aP,fo as aQ,Bl as aR,Sd as aS,Ap as aT,Fd as aU,vd as aV,ep as aW,Jd as aX,Mc as aY,Ld as aZ,kp as a_,$n as aa,Wp as ab,Ko as ac,Po as ad,Ti as ae,sm as af,oo as ag,or as ah,en as ai,wi as aj,tr as ak,Lr as al,Gr as am,ta as an,Pn as ao,gu as ap,Jo as aq,lu as ar,nu as as,iu as at,Cl as au,Up as av,dn as aw,vl as ax,cu as ay,rn as az,Mu as b,_a as b$,Yo as b0,rd as b1,Rc as b2,Qa as b3,Nr as b4,fn as b5,Bo as b6,As as b7,Ic as b8,pn as b9,kr as bA,to as bB,Tr as bC,rr as bD,Zs as bE,ln as bF,wn as bG,gn as bH,Ri as bI,cp as bJ,_r as bK,an as bL,ri as bM,Zi as bN,oi as bO,Fr as bP,Hr as bQ,Da as bR,sa as bS,np as bT,qr as bU,Gn as bV,Ul as bW,tn as bX,Kr as bY,Pr as bZ,lr as b_,yi as ba,Qo as bb,va as bc,ca as bd,Va as be,Oo as bf,ka as bg,Ud as bh,un as bi,Ns as bj,Ai as bk,qn as bl,Nn as bm,Zo as bn,ni as bo,js as bp,bn as bq,qs as br,da as bs,pa as bt,md as bu,xn as bv,ua as bw,xc as bx,sl as by,Ip as bz,ki as c,Hi as c$,ys as c0,Os as c1,Rs as c2,vi as c3,Hn as c4,Ur as c5,Rn as c6,Zt as c7,Ji as c8,xp as c9,ea as cA,Vs as cB,hn as cC,ec as cD,qo as cE,cn as cF,rs as cG,An as cH,Ms as cI,us as cJ,ai as cK,Oi as cL,ui as cM,Fi as cN,Ni as cO,fi as cP,Si as cQ,hi as cR,mi as cS,pi as cT,_i as cU,xi as cV,Gi as cW,Vi as cX,Wi as cY,Di as cZ,Xi as c_,Cc as ca,Cn as cb,yp as cc,er as cd,Vr as ce,$i as cf,Za as cg,xr as ch,zn as ci,zr as cj,Ii as ck,bl as cl,_s as cm,xd as cn,On as co,Bn as cp,zs as cq,ol as cr,al as cs,Ku as ct,jn as cu,Xn as cv,Jr as cw,zi as cx,bi as cy,oc as cz,eh as d,im as d$,gi as d0,di as d1,Qt as d2,sn as d3,yn as d4,vn as d5,kn as d6,En as d7,Sn as d8,Tn as d9,_c as dA,td as dB,Yc as dC,sd as dD,ud as dE,Ls as dF,Rd as dG,la as dH,Uc as dI,ha as dJ,uo as dK,ho as dL,mo as dM,gh as dN,mh as dO,fh as dP,Mp as dQ,Lp as dR,tu as dS,Jp as dT,qu as dU,Sh as dV,Th as dW,Mh as dX,Ph as dY,_h as dZ,hu as d_,Dn as da,Fn as db,Ln as dc,Un as dd,Vn as de,Jn as df,Zn as dg,Qn as dh,eo as di,io as dj,no as dk,Wo as dl,Vo as dm,Go as dn,zo as dp,mr as dq,vr as dr,$r as ds,hr as dt,Or as du,wl as dv,El as dw,Sl as dx,gl as dy,cl as dz,lm as e,mm as e0,am as e1,Yu as f,Ci as g,si as h,Mn as i,ii as j,oa as k,aa as l,ro as m,Yp as n,zh as o,Ei as p,Np as q,so as r,Op as s,Qi as t,qp as u,rm as v,ti as w,Wu as x,_n as y,Yn as z};
@@ -1 +1 @@
1
- export{Z as Badge,B as Button,s as ButtonSize,dQ as ButtonTab,dR as ButtonTabList,q as ButtonVariants,C as Checkbox,dS as CheckboxList,dT as CheckboxSize,aG as CliCommand,av as DataCard,D as Drawer,ar as DropData,at as DropDataAlignX,as as DropDataAlignY,x as DropDown,b as FieldMessage,a as FieldTitle,dU as Header,cu as HoverActions,a6 as IconButton,a7 as IconButtonSize,I as Input,f as InputList,d as InputTable,aD as Island,L as Loader,dV as Modal,dW as Navbar,N as NoData,o as Note,dX as Radio,dY as RadioGroup,dZ as RadioSize,n as Search,ap as SectionCard,d_ as SectionCardSize,u as Segment,ab as SegmentSize,aJ as StatusCard,aB as Table,aC as TableVariant,d$ as Tag,v as TextArea,aK as TextCard,T as Toggle,e as ToggleLabelAlign,e0 as ToggleList,af as ToggleSize,e1 as ToggleVariant,r as Typography,m as TypographySize,ag as TypographyVariants,W as WarningModal}from"../chunks/ui-components-DSKV7uC0.js";import"../icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"../chunks/vendor-DUWBN0Mg.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
1
+ export{Z as Badge,B as Button,s as ButtonSize,dQ as ButtonTab,dR as ButtonTabList,q as ButtonVariants,C as Checkbox,dS as CheckboxList,dT as CheckboxSize,aG as CliCommand,av as DataCard,D as Drawer,ar as DropData,at as DropDataAlignX,as as DropDataAlignY,x as DropDown,b as FieldMessage,a as FieldTitle,dU as Header,ct as HoverActions,a6 as IconButton,a7 as IconButtonSize,I as Input,f as InputList,d as InputTable,aD as Island,L as Loader,dV as Modal,dW as Navbar,N as NoData,o as Note,dX as Radio,dY as RadioGroup,dZ as RadioSize,n as Search,ap as SectionCard,d_ as SectionCardSize,u as Segment,ab as SegmentSize,aJ as StatusCard,aB as Table,aC as TableVariant,d$ as Tag,v as TextArea,aK as TextCard,T as Toggle,e as ToggleLabelAlign,e0 as ToggleList,af as ToggleSize,e1 as ToggleVariant,r as Typography,m as TypographySize,ag as TypographyVariants,W as WarningModal}from"../chunks/ui-components-Bw_jKy4u.js";import"../icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"../chunks/vendor-DUWBN0Mg.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
package/lib/components.js CHANGED
@@ -1 +1 @@
1
- export{bf as AutocompleteInput,bA as Badge,bC as Button,b3 as CancelWarning,l as CenterThis,aP as Checkbox,cK as Code,b7 as ConditionDetails,b8 as DataCard,aN as DataCardFieldTypes,ca as DataCardFields,dB as DataFinger,bE as DataTab,b2 as DeleteWarning,cs as DescribeRow,bg as Divider,aY as DocsButton,b1 as Drawer,dC as DrawerFooter,dD as DrawerHeader,bW as Dropdown,dE as ErrorBoundary,c0 as ExtendArrow,aF as FadeLoader,aQ as FieldError,aO as FieldLabel,F as FlexColumn,k as FlexRow,dF as Header,b$ as IconButton,cC as IconGroup,bu as IconTitleBadge,bp as IconWrapped,co as IconsNav,dG as ImageControlled,aR as Input,aV as InputList,aS as InputTable,bx as InteractiveTable,aU as KeyValueInputsList,cm as LoadingText,bc as Modal,bd as ModalBody,aZ as MonitorsCheckboxes,br as MonitorsIcons,bh as NavigationButtons,by as NoDataFound,be as NotificationNote,dH as Overlay,aA as PageContent,bR as Popup,cE as PopupForm,cJ as ScrollX,S as ScrollY,aX as SectionTitle,aW as Segment,bT as SelectionButton,bJ as SkeletonLoader,bj as Status,c9 as Stepper,dI as TabList,bs as TableContainer,bt as TableTitleWrap,bw as TableWrap,cc as Tag,a$ as Text,a_ as TextArea,aT as Toggle,cH as ToggleCodeComponent,J as Tooltip,bz as TraceLoader,aM as UpgradeRequiredWrapper,bS as VerticalScroll,cg as WarningModal,dJ as WhiteSpace,dK as getLinksFromText,dL as getStrongsFromText,dM as renderText}from"./chunks/ui-components-DSKV7uC0.js";import"./icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-DUWBN0Mg.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
1
+ export{bf as AutocompleteInput,bA as Badge,bC as Button,b3 as CancelWarning,l as CenterThis,aP as Checkbox,cJ as Code,b7 as ConditionDetails,b8 as DataCard,aN as DataCardFieldTypes,ca as DataCardFields,dA as DataFinger,bE as DataTab,b2 as DeleteWarning,cr as DescribeRow,bg as Divider,aY as DocsButton,b1 as Drawer,dB as DrawerFooter,dC as DrawerHeader,bW as Dropdown,dD as ErrorBoundary,c0 as ExtendArrow,aF as FadeLoader,aQ as FieldError,aO as FieldLabel,F as FlexColumn,k as FlexRow,dE as Header,b$ as IconButton,cB as IconGroup,bu as IconTitleBadge,bp as IconWrapped,cn as IconsNav,dF as ImageControlled,aR as Input,aV as InputList,aS as InputTable,bx as InteractiveTable,aU as KeyValueInputsList,dG as LoadingText,bc as Modal,bd as ModalBody,aZ as MonitorsCheckboxes,br as MonitorsIcons,bh as NavigationButtons,by as NoDataFound,be as NotificationNote,dH as Overlay,aA as PageContent,bR as Popup,cD as PopupForm,cI as ScrollX,S as ScrollY,aX as SectionTitle,aW as Segment,bT as SelectionButton,bJ as SkeletonLoader,bj as Status,c9 as Stepper,dI as TabList,bs as TableContainer,bt as TableTitleWrap,bw as TableWrap,cc as Tag,a$ as Text,a_ as TextArea,aT as Toggle,cG as ToggleCodeComponent,J as Tooltip,bz as TraceLoader,aM as UpgradeRequiredWrapper,bS as VerticalScroll,cg as WarningModal,dJ as WhiteSpace,dK as getLinksFromText,dL as getStrongsFromText,dM as renderText}from"./chunks/ui-components-Bw_jKy4u.js";import"./icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-DUWBN0Mg.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
package/lib/constants.js CHANGED
@@ -1 +1 @@
1
- export{a1 as ACTION_ATTRIBUTE_OPTIONS,b6 as ACTION_OPTIONS,a2 as ACTION_SAMPLER_OPTIONS,az as BUTTON_TEXTS,ai as DEFAULT_DATA_STREAM_NAME,a9 as DESTINATION_CATEGORIES,_ as DISPLAY_LANGUAGES,a4 as DISPLAY_TITLES,t as DOCS_BASE_URL,a8 as DestinationCategoryTypes,a5 as FORM_ALERTS,ad as INSTRUMENTATION_RULE_OPTIONS,dm as LANGUAGE_OPTIONS,M as MONITORS_OPTIONS,dn as OTEL_DISTRO_NAME_OPTIONS,bX as STORAGE_KEYS,dp as TOKEN_ABOUT_TO_EXPIRE}from"./chunks/ui-components-DSKV7uC0.js";import"./icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-DUWBN0Mg.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
1
+ export{a1 as ACTION_ATTRIBUTE_OPTIONS,b6 as ACTION_OPTIONS,a2 as ACTION_SAMPLER_OPTIONS,az as BUTTON_TEXTS,ai as DEFAULT_DATA_STREAM_NAME,a9 as DESTINATION_CATEGORIES,_ as DISPLAY_LANGUAGES,a4 as DISPLAY_TITLES,t as DOCS_BASE_URL,a8 as DestinationCategoryTypes,a5 as FORM_ALERTS,ad as INSTRUMENTATION_RULE_OPTIONS,dl as LANGUAGE_OPTIONS,M as MONITORS_OPTIONS,dm as OTEL_DISTRO_NAME_OPTIONS,bX as STORAGE_KEYS,dn as TOKEN_ABOUT_TO_EXPIRE}from"./chunks/ui-components-Bw_jKy4u.js";import"./icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-DUWBN0Mg.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
@@ -1,7 +1,7 @@
1
1
  import { type FC } from 'react';
2
- import { type FetchSingleNamespace, type PersistSources } from '@/types';
2
+ import { type FetchNamespacesWithWorkloads, type PersistSources } from '@/types';
3
3
  interface SourceModalProps {
4
- fetchSingleNamespace: FetchSingleNamespace;
4
+ fetchNamespacesWithWorkloads: FetchNamespacesWithWorkloads;
5
5
  persistSources: PersistSources;
6
6
  }
7
7
  declare const SourceModal: FC<SourceModalProps>;
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import { type FetchSingleNamespace } from '@/types';
2
+ import { type FetchNamespacesWithWorkloads } from '@/types';
3
3
  import { type NamespaceSelectionFormData, type SourceSelectionFormData } from '@/store';
4
4
  interface SourceSelectionFormProps {
5
5
  isModal?: boolean;
6
- fetchSingleNamespace: FetchSingleNamespace;
6
+ fetchNamespacesWithWorkloads: FetchNamespacesWithWorkloads;
7
7
  onClickSummary?: () => void;
8
8
  }
9
9
  interface SourceSelectionFormRef {
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as t,Fragment as l}from"react/jsx-runtime";import{useEffect as a,useState as n,useRef as o,forwardRef as i,useImperativeHandle as r,useMemo as s,Children as c,useCallback as d}from"react";import u,{useTheme as h}from"styled-components";import{A as p,F as m,a as g,C as b,b as f,I as C,c as y,i as v,d as w,K as k,T as S,e as $,f as x,g as I,h as T,W as A,j as N,M as D,k as O,V,S as F,l as M,N as R,D as P,L,m as E,R as z,n as j,o as q,p as H,B as _,q as B,r as K,s as W,t as G,u as J,v as U,w as Y,x as X,y as Z,z as Q,E as ee,G as te,H as le,J as ae,O as ne,P as oe,Q as ie,U as re,X as se,Y as ce,Z as de,_ as ue,$ as he,a0 as pe,a1 as me,a2 as ge,a3 as be,a4 as fe,a5 as Ce,a6 as ye,a7 as ve,a8 as we,a9 as ke,aa as Se,ab as $e,ac as xe,ad as Ie,ae as Te,af as Ae,ag as Ne,ah as De,ai as Oe,aj as Ve,ak as Fe,al as Me,am as Re,an as Pe,ao as Le,ap as Ee,aq as ze,ar as je,as as qe,at as He,au as _e,av as Be,aw as Ke,ax as We,ay as Ge,az as Je,aA as Ue,aB as Ye,aC as Xe,aD as Ze,aE as Qe,aF as et,aG as tt,aH as lt,aI as at,aJ as nt,aK as ot,aL as it,aM as rt}from"../chunks/ui-components-DSKV7uC0.js";import{VSquareIcon as st,OdigosLogo as ct,BookIcon as dt,XSquareIcon as ut,GoLogo as ht,JavaLogo as pt,ChevronRightIcon as mt,ActionIcon as gt,DestinationIcon as bt,ChevronUpIcon as ft,ChevronDownIcon as Ct,InstrumentationRuleIcon as yt,SourceIcon as vt,SettingsIcon as wt,XIcon as kt,VIcon as St,EditIcon as $t,ExclamationTriangleIcon as xt,ExclamationCircleIcon as It,KeyIcon as Tt,DiagnoseIcon as At,DownloadIcon as Nt,TerminalIcon as Dt,DeleteIcon as Ot,RefreshIcon as Vt,ConnectionsIcon as Ft,PodIcon as Mt,ArrowDownSquareIcon as Rt,ArrowUpSquareIcon as Pt,PipelineCollectorIcon as Lt,GatewayIcon as Et,YamlIcon as zt}from"../icons.js";import{Y as jt}from"../chunks/index-DXnojvL1.js";import"zustand";import"javascript-time-ago";import"../chunks/vendor-DUWBN0Mg.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";const qt=[{id:"CREDIT_CARD",label:"Credit card"}],Ht=[{id:p.CollectContainerAttributes,label:"Collect container attributes"},{id:p.CollectReplicaSetAttributes,label:"Collect ReplicaSet attributes"},{id:p.CollectWorkloadId,label:"Collect workload ID"},{id:p.CollectClusterId,label:"Collect cluster ID"}],_t=[{id:k.Pod,label:k.Pod},{id:k.Namespace,label:k.Namespace},{id:k.Node,label:k.Node}],Bt=[{label:"Label key",keyName:"labelKey",placeholder:"app.kubernetes.io/name"},{label:"Attribute key",keyName:"attributeKey",placeholder:"app.kubernetes.name"},{label:"From sources",keyName:"fromSources",placeholder:"pod, namespace",tooltip:"Select multiple sources. Higher precedence sources (pod > namespace > node) will override lower ones.",componentType:"multi-dropdown",options:_t}],Kt=[{label:"Annotation key",keyName:"annotationKey",placeholder:"kubectl.kubernetes.io/restartedAt"},{label:"Attribute key",keyName:"attributeKey",placeholder:"kubectl.kubernetes.restartedAt"},{label:"From sources",keyName:"fromSources",placeholder:"pod, namespace",tooltip:"Select multiple sources. Higher precedence sources (pod > namespace > node) will override lower ones.",componentType:"multi-dropdown",options:_t}],Wt=[{label:"Service",keyName:"serviceName",placeholder:"e.g. my-service",tooltip:"Service name: The rule applies to a specific service name. Only traces originating from this service’s root span will be considered."},{label:"HTTP route",keyName:"httpRoute",placeholder:"e.g. /api/v1/users",tooltip:"HTTP route: The specific HTTP route prefix to match for sampling. Only traces with routes beginning with this prefix will be considered. For instance, configuring /buy will also match /buy/product."},{label:"Threshold",keyName:"minimumLatencyThreshold",placeholder:"e.g. 1000",tooltip:"Minimum latency threshold (ms): Specifies the minimum latency in milliseconds; traces with latency below this threshold are ignored.",inputType:y.Number},{label:"Fallback",keyName:"fallbackSamplingRatio",placeholder:"e.g. 100",tooltip:"Fallback sampling ratio: Specifies the percentage of traces that meet the service/http_route filter but fall below the threshold that you still want to retain. For example, if a rule is set for service A and http_route B with a minimum latency threshold of 1 second, you might still want to keep some traces below this threshold. Setting the ratio to 20% ensures that 20% of these traces will be retained.",inputType:y.Number}],Gt=[{label:"Service name",keyName:"serviceName",placeholder:"e.g. my-service",tooltip:"Specifies the service name to search within the trace (Across all available spans)."},{label:"Sampling ratio",keyName:"samplingRatio",placeholder:"e.g. 10",tooltip:"Specifies the sample rate for all traces.",inputType:y.Number},{label:"Fallback sampling ratio",keyName:"fallbackSamplingRatio",placeholder:"e.g. 100",tooltip:"Specifies the percentage of traces that don’t meet the service name filter and that you still like to retain.",inputType:y.Number}],Jt=[{label:"Service name",keyName:"serviceName",placeholder:"e.g. my-service",tooltip:"Specifies the service name to search within the trace (across all available spans)."},{label:"Attribute key",keyName:"attributeKey",placeholder:"e.g. http.request.method",tooltip:"Specifies the attribute key inside of the span."},{label:"Fallback sampling ratio",keyName:"fallbackSamplingRatio",placeholder:"e.g. 100",tooltip:"Specifies the percentage of traces that don’t meet the service name filter and that you still like to retain.",inputType:y.Number},{label:"Condition",keyName:"condition",tooltip:"An object representing the filters for span attributes filters.",componentType:I.Dropdown,options:[{id:"stringCondition",label:"String condition"},{id:"numberCondition",label:"Number condition"},{id:"booleanCondition",label:"Boolean condition"},{id:"jsonCondition",label:"JSON condition"}]},{label:"Operation",keyName:"operation",tooltip:"Specifies the operation to run against the attribute.",componentType:I.Dropdown,options:[{id:"exists",label:"Exists"},{id:"equals",label:"Equals"},{id:"not_equals",label:"Not equals"},{id:"contains",label:"Contains"},{id:"not_contains",label:"Not contains"},{id:"regex",label:"Regex"},{id:"greater_than",label:"Greater than"},{id:"less_than",label:"Less than"},{id:"greater_than_or_equal",label:"Greater than or equal"},{id:"less_than_or_equal",label:"Less than or equal"},{id:"is_valid_json",label:"Is valid JSON"},{id:"is_invalid_json",label:"Is invalid JSON"},{id:"jsonpath_exists",label:"JSON path exists"},{id:"key_equals",label:"Key equals"},{id:"key_not_equals",label:"Key not equals"}]},{label:"Expected value",keyName:"expectedValue",placeholder:"e.g. GET",tooltip:"The values to test the attribute against."},{label:"JSON path",keyName:"jsonPath",placeholder:"e.g. $.user.role",tooltip:"An expression used to navigate the JSON structure.",renderCondition:e=>"jsonCondition"===e.condition}],Ut={[T.K8sAttributes]:({value:n,setValue:o,formErrors:i})=>(a(()=>{n[p.CollectContainerAttributes]||n[p.CollectReplicaSetAttributes]||n[p.CollectWorkloadId]||n[p.CollectClusterId]||n[p.LabelsAttributes]?.length||n[p.AnnotationsAttributes]?.length||(o(p.CollectContainerAttributes,!0),o(p.CollectReplicaSetAttributes,!0),o(p.CollectWorkloadId,!0),o(p.CollectClusterId,!0),o(p.LabelsAttributes,[]),o(p.AnnotationsAttributes,[]))},[]),e(l,{children:[t(m,{$gap:6,children:Ht.map(({id:l,label:a})=>e(m,{children:[t(b,{label:a,value:n[l]||!1,onChange:e=>o(l,e)}),t(f,{errorMessage:i[l]})]},l))}),t(w,{label:"Label attributes",limitFieldsPerRow:2,columns:Bt,values:n[p.LabelsAttributes]||[],setValues:e=>o(p.LabelsAttributes,e),errorMessage:i[p.LabelsAttributes]}),t(w,{label:"Annotation attributes",limitFieldsPerRow:2,columns:Kt,values:n[p.AnnotationsAttributes]||[],setValues:e=>o(p.AnnotationsAttributes,e),errorMessage:i[p.AnnotationsAttributes]})]})),[T.AddClusterInfo]:({value:a,setValue:n,formErrors:o})=>{const i=h();return e(l,{children:[t(S,{label:"Overwrite existing values",labelAlign:$.Left,labelColor:i.v2.colors.silver[200],tooltip:"If enabled, the resource attributes will overwrite any existing attributes with the same name.",value:a[p.OverwriteExistingValues]||!1,onChange:e=>n(p.OverwriteExistingValues,e)}),t(w,{label:"Resource attributes",limitFieldsPerRow:2,columns:[{keyName:"attributeName",label:"Attribute name"},{keyName:"attributeStringValue",label:"Attribute value"}],values:a[p.ClusterAttributes]||[],setValues:e=>n(p.ClusterAttributes,e),errorMessage:o[p.ClusterAttributes]})]})},[T.DeleteAttributes]:({value:e,setValue:l,formErrors:a})=>t(x,{label:"Attributes to delete",values:e[p.AttributeNamesToDelete]||[],setValues:e=>l(p.AttributeNamesToDelete,e),errorMessage:a[p.AttributeNamesToDelete]}),[T.RenameAttributes]:({value:e,setValue:l,formErrors:a})=>t(w,{label:"Attributes to rename",limitFieldsPerRow:2,columns:[{keyName:"oldKey",label:"Old key"},{keyName:"newKey",label:"New key"}],values:Object.entries(e[p.Renames]||{}).map(([e,t])=>({oldKey:e,newKey:t})),setValues:e=>{const t={};e.forEach(e=>t[e.oldKey]=e.newKey),l(p.Renames,t)},errorMessage:a[p.Renames]}),[T.PiiMasking]:({value:l,setValue:n,formErrors:o})=>(a(()=>{l[p.PiiCategories]?.length||n(p.PiiCategories,qt.map(({id:e})=>e))},[]),e(m,{$gap:12,children:[t(g,{label:"Attributes to mask"}),t(m,{$gap:6,children:qt.map(({id:e,label:a})=>t(b,{label:a,value:l[p.PiiCategories]?.includes(e)||!1,onChange:t=>{const a=l[p.PiiCategories]||[],o=t?[...a,e]:a.filter(t=>t!==e);n(p.PiiCategories,o)}},e))}),t(f,{errorMessage:o[p.PiiCategories]})]})),[T.ErrorSampler]:({value:e,setValue:l,formErrors:a})=>{const n=a[p.FallbackSamplingRatio],o=v(e[p.FallbackSamplingRatio])?"":String(e[p.FallbackSamplingRatio]);return t(C,{label:"Fallback sampling ratio",type:y.Number,min:0,max:100,value:o,placeholder:"0-100",onChange:e=>{return t=e.target.value,l(p.FallbackSamplingRatio,Math.max(0,Math.min(Number(t),100))||0);var t},errorMessage:n})},[T.ProbabilisticSampler]:({value:e,setValue:l,formErrors:a})=>{const n=a[p.SamplingPercentage],o=v(e[p.SamplingPercentage])?"":String(e[p.SamplingPercentage]);return t(C,{label:"Sampling percentage",type:y.Number,min:0,max:100,value:o,placeholder:"0-100",onChange:e=>{return t=e.target.value,l(p.SamplingPercentage,Math.max(0,Math.min(Number(t),100))||0);var t},errorMessage:n})},[T.LatencySampler]:({value:e,setValue:l,formErrors:a})=>{const n=a[p.EndpointsFilters],o=e[p.EndpointsFilters]||[];return t(w,{limitFieldsPerRow:2,columns:Wt,values:o,setValues:e=>{l(p.EndpointsFilters,e.map(({serviceName:e,httpRoute:t,minimumLatencyThreshold:l,fallbackSamplingRatio:a})=>({serviceName:e,httpRoute:t,minimumLatencyThreshold:Number(l),fallbackSamplingRatio:Number(a)})))},errorMessage:n})},[T.ServiceNameSampler]:({value:e,setValue:l,formErrors:a})=>{const n=a[p.ServicesNameFilters],o=e[p.ServicesNameFilters]||[];return t(w,{limitFieldsPerRow:2,columns:Gt,values:o,setValues:e=>{l(p.ServicesNameFilters,e.map(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:l})=>({serviceName:e,samplingRatio:Number(t),fallbackSamplingRatio:Number(l)})))},errorMessage:n})},[T.SpanAttributeSampler]:({value:e,setValue:l,formErrors:a})=>{const n=a[p.AttributeFilters],o=(e[p.AttributeFilters]||[]).map(({serviceName:e,attributeKey:t,fallbackSamplingRatio:l,condition:a})=>{const n=Object.entries(a).filter(([e,t])=>t)[0][0];return{serviceName:e,attributeKey:t,fallbackSamplingRatio:l,condition:n,operation:a[n]?.operation,expectedValue:a[n]?.expectedValue,jsonPath:a[n]?.jsonPath}});return t(w,{limitFieldsPerRow:2,columns:Jt,values:o,setValues:e=>{l(p.AttributeFilters,e.map(({serviceName:e,attributeKey:t,fallbackSamplingRatio:l,condition:a,operation:n,expectedValue:o,jsonPath:i})=>{const r={serviceName:e,attributeKey:t,fallbackSamplingRatio:Number(l),condition:{[a]:{operation:n,expectedValue:o}}};return i&&(r.condition[a].jsonPath=i),r}))},errorMessage:n})}},Yt=({actionType:e,value:l,setValue:a,formErrors:n})=>{if(!e)return null;const o=Ut[e];return o?t(o,{value:l,setValue:a,formErrors:n}):null},Xt=({isOpen:e,onClose:l,onDeny:a,onApprove:n})=>t(A,{title:"Discard changes?",description:"You have unsaved changes.\nIf you cancel now, your changes won't be saved.",isOpen:e,onClose:l,onDeny:a,denyLabel:"Keep editing",onApprove:n,approveLabel:"Discard changes"}),Zt=({isOpen:e,onClose:l,onDeny:a,onApprove:n,action:o="delete",target:i})=>{const r=o.charAt(0).toUpperCase()+o.substring(1),s=i?.endsWith("s")?"these":"this";return t(A,{title:`${r}${i?` ${i}`:""}?`,description:`Are you sure you want to ${o}${i?` ${s} ${i}`:""}?`,isOpen:e,onClose:l,onDeny:a,denyLabel:"Go back",onApprove:n,approveLabel:r})},Qt=(e,t)=>!t?.length||!!t?.find(t=>t===e),el=({title:l="Signals",required:i,errorMessage:r,allowedSignals:s,selectedSignals:c,setSelectedSignals:d})=>{const[u,h]=n(1===c.length),p=o(JSON.stringify(c));return a(()=>{const e=N(c);e.length||D.forEach(({id:t})=>{Qt(t,s)&&e.push(t)});const t=JSON.stringify(e);p.current!==t&&(p.current=t,d(e),h(1===e.length))},[s,c]),e(m,{$gap:12,children:[t(g,{label:l,required:i}),t(O,{$gap:12,children:D.map(e=>{const l=Qt(e.id,s),a=((e,t)=>!!t?.find(t=>t===e))(e.id,c);return l?t(b,{label:e.value,disabled:!l||u&&a,value:a,onChange:t=>((e,t)=>{const l=e,a=t?[...c,l]:c.filter(e=>e!==l);d(a),h(1===a.length)})(e.id,t)},e.id):null})}),t(f,{errorMessage:r})]})},tl=({minSupportedVersion:e,currentVersion:l})=>t(A,{isOpen:!0,onClose:()=>{},relativeToParent:!0,visual:()=>t(V,{scale:2.4,icon:()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"21",viewBox:"0 0 22 21",fill:"none",children:t("path",{fill:"#151618",d:"M9.4844 0.730003C9.99694 -0.243259 11.4076 -0.24341 11.92 0.730003L11.9685 0.831353L14.3039 6.22012L20.153 6.77755C21.3553 6.89211 21.841 8.38683 20.9358 9.18621L16.5314 13.0731L17.8091 18.8079C18.0716 19.9868 16.8005 20.9109 15.7605 20.2969L10.7017 17.3093L5.64282 20.2969C4.60289 20.9104 3.33173 19.9866 3.59427 18.8079L4.87192 13.0741L0.468608 9.18621C-0.43662 8.38693 0.0482932 6.8924 1.25029 6.77755L7.09837 6.22012L9.43588 0.831353L9.4844 0.730003ZM8.55284 7.02876C8.35287 7.48992 7.9179 7.80589 7.41751 7.85357L2.03952 8.36571L6.09027 11.941C6.46691 12.2737 6.63296 12.7852 6.5237 13.2758L5.34956 18.5459L10.0008 15.8009L10.1669 15.7179C10.5087 15.574 10.8945 15.5741 11.2364 15.7179L11.4036 15.8009L16.0538 18.5459L14.8807 13.2758C14.7714 12.7851 14.9374 12.2737 15.3141 11.941L19.3627 8.36571L13.9858 7.85357C13.4855 7.80587 13.0505 7.4899 12.8505 7.02876L10.7017 2.07342L8.55284 7.02876Z"})})}),title:"Upgrade Required",description:`To use this feature, please upgrade to Odigos v${e} or later.\nCurrent version: ${l}.`}),ll=u.div`
1
+ import{jsxs as e,jsx as t,Fragment as l}from"react/jsx-runtime";import{useEffect as a,useState as n,useRef as o,forwardRef as i,useImperativeHandle as r,useMemo as s,Children as c,useCallback as d}from"react";import u,{useTheme as h}from"styled-components";import{A as p,F as m,a as g,C as b,b as f,I as C,c as y,i as v,d as w,K as k,T as S,e as $,f as x,g as I,h as T,W as A,j as N,M as D,k as O,V,S as F,l as M,N as R,D as P,L,m as E,R as z,n as j,o as q,p as H,B as _,q as B,r as K,s as W,t as G,u as J,v as U,w as Y,x as X,y as Z,z as Q,E as ee,G as te,H as le,J as ae,O as ne,P as oe,Q as ie,U as re,X as se,Y as ce,Z as de,_ as ue,$ as he,a0 as pe,a1 as me,a2 as ge,a3 as be,a4 as fe,a5 as Ce,a6 as ye,a7 as ve,a8 as we,a9 as ke,aa as Se,ab as $e,ac as xe,ad as Ie,ae as Te,af as Ae,ag as Ne,ah as De,ai as Oe,aj as Ve,ak as Fe,al as Me,am as Re,an as Pe,ao as Le,ap as Ee,aq as ze,ar as je,as as qe,at as He,au as _e,av as Be,aw as Ke,ax as We,ay as Ge,az as Je,aA as Ue,aB as Ye,aC as Xe,aD as Ze,aE as Qe,aF as et,aG as tt,aH as lt,aI as at,aJ as nt,aK as ot,aL as it,aM as rt}from"../chunks/ui-components-Bw_jKy4u.js";import{VSquareIcon as st,OdigosLogo as ct,BookIcon as dt,XSquareIcon as ut,GoLogo as ht,JavaLogo as pt,ChevronRightIcon as mt,ActionIcon as gt,DestinationIcon as bt,ChevronUpIcon as ft,ChevronDownIcon as Ct,InstrumentationRuleIcon as yt,SourceIcon as vt,SettingsIcon as wt,XIcon as kt,VIcon as St,EditIcon as $t,ExclamationTriangleIcon as xt,ExclamationCircleIcon as It,KeyIcon as Tt,DiagnoseIcon as At,DownloadIcon as Nt,TerminalIcon as Dt,DeleteIcon as Ot,RefreshIcon as Vt,ConnectionsIcon as Ft,PodIcon as Mt,ArrowDownSquareIcon as Rt,ArrowUpSquareIcon as Pt,PipelineCollectorIcon as Lt,GatewayIcon as Et,YamlIcon as zt}from"../icons.js";import{Y as jt}from"../chunks/index-COFnKh_j.js";import"zustand";import"javascript-time-ago";import"../chunks/vendor-DUWBN0Mg.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";const qt=[{id:"CREDIT_CARD",label:"Credit card"}],Ht=[{id:p.CollectContainerAttributes,label:"Collect container attributes"},{id:p.CollectReplicaSetAttributes,label:"Collect ReplicaSet attributes"},{id:p.CollectWorkloadId,label:"Collect workload ID"},{id:p.CollectClusterId,label:"Collect cluster ID"}],_t=[{id:k.Pod,label:k.Pod},{id:k.Namespace,label:k.Namespace},{id:k.Node,label:k.Node}],Bt=[{label:"Label key",keyName:"labelKey",placeholder:"app.kubernetes.io/name"},{label:"Attribute key",keyName:"attributeKey",placeholder:"app.kubernetes.name"},{label:"From sources",keyName:"fromSources",placeholder:"pod, namespace",tooltip:"Select multiple sources. Higher precedence sources (pod > namespace > node) will override lower ones.",componentType:"multi-dropdown",options:_t}],Kt=[{label:"Annotation key",keyName:"annotationKey",placeholder:"kubectl.kubernetes.io/restartedAt"},{label:"Attribute key",keyName:"attributeKey",placeholder:"kubectl.kubernetes.restartedAt"},{label:"From sources",keyName:"fromSources",placeholder:"pod, namespace",tooltip:"Select multiple sources. Higher precedence sources (pod > namespace > node) will override lower ones.",componentType:"multi-dropdown",options:_t}],Wt=[{label:"Service",keyName:"serviceName",placeholder:"e.g. my-service",tooltip:"Service name: The rule applies to a specific service name. Only traces originating from this service’s root span will be considered."},{label:"HTTP route",keyName:"httpRoute",placeholder:"e.g. /api/v1/users",tooltip:"HTTP route: The specific HTTP route prefix to match for sampling. Only traces with routes beginning with this prefix will be considered. For instance, configuring /buy will also match /buy/product."},{label:"Threshold",keyName:"minimumLatencyThreshold",placeholder:"e.g. 1000",tooltip:"Minimum latency threshold (ms): Specifies the minimum latency in milliseconds; traces with latency below this threshold are ignored.",inputType:y.Number},{label:"Fallback",keyName:"fallbackSamplingRatio",placeholder:"e.g. 100",tooltip:"Fallback sampling ratio: Specifies the percentage of traces that meet the service/http_route filter but fall below the threshold that you still want to retain. For example, if a rule is set for service A and http_route B with a minimum latency threshold of 1 second, you might still want to keep some traces below this threshold. Setting the ratio to 20% ensures that 20% of these traces will be retained.",inputType:y.Number}],Gt=[{label:"Service name",keyName:"serviceName",placeholder:"e.g. my-service",tooltip:"Specifies the service name to search within the trace (Across all available spans)."},{label:"Sampling ratio",keyName:"samplingRatio",placeholder:"e.g. 10",tooltip:"Specifies the sample rate for all traces.",inputType:y.Number},{label:"Fallback sampling ratio",keyName:"fallbackSamplingRatio",placeholder:"e.g. 100",tooltip:"Specifies the percentage of traces that don’t meet the service name filter and that you still like to retain.",inputType:y.Number}],Jt=[{label:"Service name",keyName:"serviceName",placeholder:"e.g. my-service",tooltip:"Specifies the service name to search within the trace (across all available spans)."},{label:"Attribute key",keyName:"attributeKey",placeholder:"e.g. http.request.method",tooltip:"Specifies the attribute key inside of the span."},{label:"Fallback sampling ratio",keyName:"fallbackSamplingRatio",placeholder:"e.g. 100",tooltip:"Specifies the percentage of traces that don’t meet the service name filter and that you still like to retain.",inputType:y.Number},{label:"Condition",keyName:"condition",tooltip:"An object representing the filters for span attributes filters.",componentType:I.Dropdown,options:[{id:"stringCondition",label:"String condition"},{id:"numberCondition",label:"Number condition"},{id:"booleanCondition",label:"Boolean condition"},{id:"jsonCondition",label:"JSON condition"}]},{label:"Operation",keyName:"operation",tooltip:"Specifies the operation to run against the attribute.",componentType:I.Dropdown,options:[{id:"exists",label:"Exists"},{id:"equals",label:"Equals"},{id:"not_equals",label:"Not equals"},{id:"contains",label:"Contains"},{id:"not_contains",label:"Not contains"},{id:"regex",label:"Regex"},{id:"greater_than",label:"Greater than"},{id:"less_than",label:"Less than"},{id:"greater_than_or_equal",label:"Greater than or equal"},{id:"less_than_or_equal",label:"Less than or equal"},{id:"is_valid_json",label:"Is valid JSON"},{id:"is_invalid_json",label:"Is invalid JSON"},{id:"jsonpath_exists",label:"JSON path exists"},{id:"key_equals",label:"Key equals"},{id:"key_not_equals",label:"Key not equals"}]},{label:"Expected value",keyName:"expectedValue",placeholder:"e.g. GET",tooltip:"The values to test the attribute against."},{label:"JSON path",keyName:"jsonPath",placeholder:"e.g. $.user.role",tooltip:"An expression used to navigate the JSON structure.",renderCondition:e=>"jsonCondition"===e.condition}],Ut={[T.K8sAttributes]:({value:n,setValue:o,formErrors:i})=>(a(()=>{n[p.CollectContainerAttributes]||n[p.CollectReplicaSetAttributes]||n[p.CollectWorkloadId]||n[p.CollectClusterId]||n[p.LabelsAttributes]?.length||n[p.AnnotationsAttributes]?.length||(o(p.CollectContainerAttributes,!0),o(p.CollectReplicaSetAttributes,!0),o(p.CollectWorkloadId,!0),o(p.CollectClusterId,!0),o(p.LabelsAttributes,[]),o(p.AnnotationsAttributes,[]))},[]),e(l,{children:[t(m,{$gap:6,children:Ht.map(({id:l,label:a})=>e(m,{children:[t(b,{label:a,value:n[l]||!1,onChange:e=>o(l,e)}),t(f,{errorMessage:i[l]})]},l))}),t(w,{label:"Label attributes",limitFieldsPerRow:2,columns:Bt,values:n[p.LabelsAttributes]||[],setValues:e=>o(p.LabelsAttributes,e),errorMessage:i[p.LabelsAttributes]}),t(w,{label:"Annotation attributes",limitFieldsPerRow:2,columns:Kt,values:n[p.AnnotationsAttributes]||[],setValues:e=>o(p.AnnotationsAttributes,e),errorMessage:i[p.AnnotationsAttributes]})]})),[T.AddClusterInfo]:({value:a,setValue:n,formErrors:o})=>{const i=h();return e(l,{children:[t(S,{label:"Overwrite existing values",labelAlign:$.Left,labelColor:i.v2.colors.silver[200],tooltip:"If enabled, the resource attributes will overwrite any existing attributes with the same name.",value:a[p.OverwriteExistingValues]||!1,onChange:e=>n(p.OverwriteExistingValues,e)}),t(w,{label:"Resource attributes",limitFieldsPerRow:2,columns:[{keyName:"attributeName",label:"Attribute name"},{keyName:"attributeStringValue",label:"Attribute value"}],values:a[p.ClusterAttributes]||[],setValues:e=>n(p.ClusterAttributes,e),errorMessage:o[p.ClusterAttributes]})]})},[T.DeleteAttributes]:({value:e,setValue:l,formErrors:a})=>t(x,{label:"Attributes to delete",values:e[p.AttributeNamesToDelete]||[],setValues:e=>l(p.AttributeNamesToDelete,e),errorMessage:a[p.AttributeNamesToDelete]}),[T.RenameAttributes]:({value:e,setValue:l,formErrors:a})=>t(w,{label:"Attributes to rename",limitFieldsPerRow:2,columns:[{keyName:"oldKey",label:"Old key"},{keyName:"newKey",label:"New key"}],values:Object.entries(e[p.Renames]||{}).map(([e,t])=>({oldKey:e,newKey:t})),setValues:e=>{const t={};e.forEach(e=>t[e.oldKey]=e.newKey),l(p.Renames,t)},errorMessage:a[p.Renames]}),[T.PiiMasking]:({value:l,setValue:n,formErrors:o})=>(a(()=>{l[p.PiiCategories]?.length||n(p.PiiCategories,qt.map(({id:e})=>e))},[]),e(m,{$gap:12,children:[t(g,{label:"Attributes to mask"}),t(m,{$gap:6,children:qt.map(({id:e,label:a})=>t(b,{label:a,value:l[p.PiiCategories]?.includes(e)||!1,onChange:t=>{const a=l[p.PiiCategories]||[],o=t?[...a,e]:a.filter(t=>t!==e);n(p.PiiCategories,o)}},e))}),t(f,{errorMessage:o[p.PiiCategories]})]})),[T.ErrorSampler]:({value:e,setValue:l,formErrors:a})=>{const n=a[p.FallbackSamplingRatio],o=v(e[p.FallbackSamplingRatio])?"":String(e[p.FallbackSamplingRatio]);return t(C,{label:"Fallback sampling ratio",type:y.Number,min:0,max:100,value:o,placeholder:"0-100",onChange:e=>{return t=e.target.value,l(p.FallbackSamplingRatio,Math.max(0,Math.min(Number(t),100))||0);var t},errorMessage:n})},[T.ProbabilisticSampler]:({value:e,setValue:l,formErrors:a})=>{const n=a[p.SamplingPercentage],o=v(e[p.SamplingPercentage])?"":String(e[p.SamplingPercentage]);return t(C,{label:"Sampling percentage",type:y.Number,min:0,max:100,value:o,placeholder:"0-100",onChange:e=>{return t=e.target.value,l(p.SamplingPercentage,Math.max(0,Math.min(Number(t),100))||0);var t},errorMessage:n})},[T.LatencySampler]:({value:e,setValue:l,formErrors:a})=>{const n=a[p.EndpointsFilters],o=e[p.EndpointsFilters]||[];return t(w,{limitFieldsPerRow:2,columns:Wt,values:o,setValues:e=>{l(p.EndpointsFilters,e.map(({serviceName:e,httpRoute:t,minimumLatencyThreshold:l,fallbackSamplingRatio:a})=>({serviceName:e,httpRoute:t,minimumLatencyThreshold:Number(l),fallbackSamplingRatio:Number(a)})))},errorMessage:n})},[T.ServiceNameSampler]:({value:e,setValue:l,formErrors:a})=>{const n=a[p.ServicesNameFilters],o=e[p.ServicesNameFilters]||[];return t(w,{limitFieldsPerRow:2,columns:Gt,values:o,setValues:e=>{l(p.ServicesNameFilters,e.map(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:l})=>({serviceName:e,samplingRatio:Number(t),fallbackSamplingRatio:Number(l)})))},errorMessage:n})},[T.SpanAttributeSampler]:({value:e,setValue:l,formErrors:a})=>{const n=a[p.AttributeFilters],o=(e[p.AttributeFilters]||[]).map(({serviceName:e,attributeKey:t,fallbackSamplingRatio:l,condition:a})=>{const n=Object.entries(a).filter(([e,t])=>t)[0][0];return{serviceName:e,attributeKey:t,fallbackSamplingRatio:l,condition:n,operation:a[n]?.operation,expectedValue:a[n]?.expectedValue,jsonPath:a[n]?.jsonPath}});return t(w,{limitFieldsPerRow:2,columns:Jt,values:o,setValues:e=>{l(p.AttributeFilters,e.map(({serviceName:e,attributeKey:t,fallbackSamplingRatio:l,condition:a,operation:n,expectedValue:o,jsonPath:i})=>{const r={serviceName:e,attributeKey:t,fallbackSamplingRatio:Number(l),condition:{[a]:{operation:n,expectedValue:o}}};return i&&(r.condition[a].jsonPath=i),r}))},errorMessage:n})}},Yt=({actionType:e,value:l,setValue:a,formErrors:n})=>{if(!e)return null;const o=Ut[e];return o?t(o,{value:l,setValue:a,formErrors:n}):null},Xt=({isOpen:e,onClose:l,onDeny:a,onApprove:n})=>t(A,{title:"Discard changes?",description:"You have unsaved changes.\nIf you cancel now, your changes won't be saved.",isOpen:e,onClose:l,onDeny:a,denyLabel:"Keep editing",onApprove:n,approveLabel:"Discard changes"}),Zt=({isOpen:e,onClose:l,onDeny:a,onApprove:n,action:o="delete",target:i})=>{const r=o.charAt(0).toUpperCase()+o.substring(1),s=i?.endsWith("s")?"these":"this";return t(A,{title:`${r}${i?` ${i}`:""}?`,description:`Are you sure you want to ${o}${i?` ${s} ${i}`:""}?`,isOpen:e,onClose:l,onDeny:a,denyLabel:"Go back",onApprove:n,approveLabel:r})},Qt=(e,t)=>!t?.length||!!t?.find(t=>t===e),el=({title:l="Signals",required:i,errorMessage:r,allowedSignals:s,selectedSignals:c,setSelectedSignals:d})=>{const[u,h]=n(1===c.length),p=o(JSON.stringify(c));return a(()=>{const e=N(c);e.length||D.forEach(({id:t})=>{Qt(t,s)&&e.push(t)});const t=JSON.stringify(e);p.current!==t&&(p.current=t,d(e),h(1===e.length))},[s,c]),e(m,{$gap:12,children:[t(g,{label:l,required:i}),t(O,{$gap:12,children:D.map(e=>{const l=Qt(e.id,s),a=((e,t)=>!!t?.find(t=>t===e))(e.id,c);return l?t(b,{label:e.value,disabled:!l||u&&a,value:a,onChange:t=>((e,t)=>{const l=e,a=t?[...c,l]:c.filter(e=>e!==l);d(a),h(1===a.length)})(e.id,t)},e.id):null})}),t(f,{errorMessage:r})]})},tl=({minSupportedVersion:e,currentVersion:l})=>t(A,{isOpen:!0,onClose:()=>{},relativeToParent:!0,visual:()=>t(V,{scale:2.4,icon:()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"21",viewBox:"0 0 22 21",fill:"none",children:t("path",{fill:"#151618",d:"M9.4844 0.730003C9.99694 -0.243259 11.4076 -0.24341 11.92 0.730003L11.9685 0.831353L14.3039 6.22012L20.153 6.77755C21.3553 6.89211 21.841 8.38683 20.9358 9.18621L16.5314 13.0731L17.8091 18.8079C18.0716 19.9868 16.8005 20.9109 15.7605 20.2969L10.7017 17.3093L5.64282 20.2969C4.60289 20.9104 3.33173 19.9866 3.59427 18.8079L4.87192 13.0741L0.468608 9.18621C-0.43662 8.38693 0.0482932 6.8924 1.25029 6.77755L7.09837 6.22012L9.43588 0.831353L9.4844 0.730003ZM8.55284 7.02876C8.35287 7.48992 7.9179 7.80589 7.41751 7.85357L2.03952 8.36571L6.09027 11.941C6.46691 12.2737 6.63296 12.7852 6.5237 13.2758L5.34956 18.5459L10.0008 15.8009L10.1669 15.7179C10.5087 15.574 10.8945 15.5741 11.2364 15.7179L11.4036 15.8009L16.0538 18.5459L14.8807 13.2758C14.7714 12.7851 14.9374 12.2737 15.3141 11.941L19.3627 8.36571L13.9858 7.85357C13.4855 7.80587 13.0505 7.4899 12.8505 7.02876L10.7017 2.07342L8.55284 7.02876Z"})})}),title:"Upgrade Required",description:`To use this feature, please upgrade to Odigos v${e} or later.\nCurrent version: ${l}.`}),ll=u.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  justify-content: flex-end;