@odigos/ui-kit 0.0.240 → 0.0.241

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/lib/chunks/{helpers-D-6cJlOn.js → helpers-L572q0MU.js} +1 -1
  3. package/lib/chunks/{index-RUJS9Blu.js → index-DHcHiz_q.js} +18 -16
  4. package/lib/chunks/{source-instrument-form-context-CEgbaSRi.js → source-instrument-form-context-vq8DFX7f.js} +1 -1
  5. package/lib/chunks/ui-components-DeKNGyn7.js +1570 -0
  6. package/lib/components/_v2/cards/data-card/index.d.ts +1 -0
  7. package/lib/components/v2.js +1 -1
  8. package/lib/components.js +1 -1
  9. package/lib/constants/strings/index.d.ts +13 -3
  10. package/lib/constants.js +1 -1
  11. package/lib/containers/_v2/_drawers/edit-source-drawer/common/pods-header.d.ts +1 -1
  12. package/lib/containers/_v2/_drawers/edit-source-drawer/overview/containers-card/popup-form.d.ts +4 -0
  13. package/lib/containers/_v2/_drawers/edit-source-drawer/overview/containers-card/runtime-override.d.ts +1 -0
  14. package/lib/containers/_v2/_drawers/edit-source-drawer/overview/index.d.ts +1 -2
  15. package/lib/containers/_v2/_drawers/edit-source-drawer/overview/pods-card/pods-list/container-row.d.ts +1 -1
  16. package/lib/containers/_v2/_drawers/edit-source-drawer/overview/pods-card/pods-list/helpers.d.ts +1 -2
  17. package/lib/containers/_v2/_drawers/edit-source-drawer/overview/pods-card/pods-list/pod-row.d.ts +1 -1
  18. package/lib/containers/_v2/_drawers/edit-source-drawer/overview/pods-card/pods-list/row-header.d.ts +3 -2
  19. package/lib/containers/_v2/_drawers/edit-source-drawer/overview/pods-card/pods-list/types.d.ts +1 -8
  20. package/lib/containers/_v2/_drawers/edit-source-drawer/overview/statuses-card.d.ts +0 -1
  21. package/lib/containers/_v2/_drawers/edit-source-drawer/pods/pod-debug-commands.d.ts +7 -0
  22. package/lib/containers/_v2/_drawers/edit-source-drawer/yaml-files/index.d.ts +6 -0
  23. package/lib/containers/v2.js +122 -115
  24. package/lib/containers.js +1 -1
  25. package/lib/contexts.js +1 -1
  26. package/lib/functions/build-badge-for-desired-status/index.d.ts +6 -0
  27. package/lib/functions/get-health-badge-label/index.d.ts +2 -0
  28. package/lib/functions/index.d.ts +2 -1
  29. package/lib/functions/map-desired-status-to-condition-status/index.d.ts +1 -1
  30. package/lib/functions.js +1 -1
  31. package/lib/hooks.js +1 -1
  32. package/lib/icons/common/inbound-icon/index.d.ts +2 -0
  33. package/lib/icons/common/index.d.ts +2 -0
  34. package/lib/icons/common/outbound-icon/index.d.ts +2 -0
  35. package/lib/icons/destinations/open-telemetry-logo/index.d.ts +1 -0
  36. package/lib/icons.js +1 -1
  37. package/lib/mock-data/sources/yamls.d.ts +22 -0
  38. package/lib/snippets/_v2/yaml-section-card/index.d.ts +2 -1
  39. package/lib/snippets/v2.js +1 -1
  40. package/lib/snippets.js +4 -4
  41. package/lib/store.js +1 -1
  42. package/lib/theme.js +1 -1
  43. package/lib/types/workload/index.d.ts +12 -4
  44. package/lib/types.js +1 -1
  45. package/lib/visuals.js +1 -1
  46. package/package.json +1 -1
  47. package/lib/chunks/ui-components-B0BVzW_z.js +0 -1570
  48. package/lib/containers/_v2/_drawers/edit-source-drawer/pods/debug-commands.d.ts +0 -6
  49. package/lib/functions/is-pod-injected-with-agent/index.d.ts +0 -4
@@ -1,1570 +0,0 @@
1
- import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import o,{css as r,useTheme as i,keyframes as a,ThemeProvider as s}from"styled-components";import{SamplerIcon as l,PiiMaskingIcon as c,ActionIcon as d,RenameAttributeIcon as p,DeleteAttributeIcon as u,AddClusterInfoIcon as h,K8sLogo as g,ImageErrorIcon as m,KafkaLogo as f,RedisLogo as b,PostgresLogo as y,NginxLogo as $,MysqlLogo as v,ElixirLogo as x,SwiftLogo as S,RustLogo as w,RubyLogo as E,PhpLogo as C,CPlusPlusLogo as T,CSharpLogo as A,DotnetLogo as k,PythonLogo as D,NodejsLogo as I,GoLogo as N,JavaLogo as R,PyroscopeLogo as O,AwsXrayLogo as _,VictoriaMetricsLogo as L,UptraceLogo as P,TraceloopLogo as F,TingyunLogo as M,TempoLogo as z,TelemetryHubLogo as U,SumoLogicLogo as B,SplunkLogo as j,SignozLogo as H,SeqLogo as W,AwsS3Logo as G,QuickwitLogo as X,GigapipeLogo as K,QrynLogo as V,PrometheusLogo as J,OpenTelemetryLogo as q,OracleLogo as Y,OpsVerseLogo as Q,OpenObserveLogo as Z,OneUptimeLogo as ee,OdigosLogo as te,ObserveLogo as ne,NewRelicLogo as oe,MiddlewareLogo as re,LumigoLogo as ie,LokiLogo as ae,LogzioLogo as se,LightstepLogo as le,Last9Logo as ce,KloudmateLogo as de,JaegerLogo as pe,InstanaLogo as ue,HyperDxLogo as he,HoneycombLogo as ge,GroundcoverLogo as me,GreptimeLogo as fe,GrafanaLogo as be,GoogleCloudPlatformLogo as ye,ElasticSearchLogo as $e,ElasticApmLogo as ve,DynatraceLogo as xe,DatadogLogo as Se,Dash0Logo as we,CoralogixLogo as Ee,AwsCloudwatchLogo as Ce,ClickhouseLogo as Te,ChronosphereLogo as Ae,ChecklyLogo as ke,CauselyLogo as De,BonreeLogo as Ie,BetterStackLogo as Ne,AzureMonitorLogo as Re,AzureBlobLogo as Oe,AxiomLogo as _e,AppDynamicsLogo as Le,AlibabaCloudLogo as Pe,AlaudaLogo as Fe,SamplingIcon as Me,InstrumentationRuleIcon as ze,DestinationIcon as Ue,SourceIcon as Be,NamespacesIcon as je,PayloadCollectionIcon as He,HeadersCollectionIcon as We,CustomInstrumentationIcon as Ge,CodeAttributesIcon as Xe,TracesIcon as Ke,MetricsIcon as Ve,LogsIcon as Je,VmLogo as qe,DotsHorizontalIcon as Ye,QuestionCircleIcon as Qe,XSquareIcon as Ze,VSquareIcon as et,ExclamationTriangleIcon as tt,ExclamationCircleIcon as nt,ISquareIcon as ot,AwsLogo as rt,AwsSecretsManagerLogo as it,AwsStepFunctionsLogo as at,AwsEventBridgeLogo as st,AwsBedrockLogo as lt,AwsApiGatewayLogo as ct,AwsEc2Logo as dt,AwsKinesisLogo as pt,AwsLambdaLogo as ut,AwsSnsLogo as ht,AwsSqsLogo as gt,AwsDynamoDbLogo as mt,AwsStsLogo as ft,VIcon as bt,CopyIcon as yt,ListIcon as $t,CodeIcon as vt,XIcon as xt,EyeClosedIcon as St,EyeOpenIcon as wt,SearchIcon as Et,MinusIcon as Ct,ChevronUpIcon as Tt,ChevronDownIcon as At,ArrowIcon as kt,DotsVerticalIcon as Dt,PlusIcon as It,TrashIcon as Nt,DotIcon as Rt,FilterIcon as Ot}from"../icons.js";import{create as _t}from"zustand";import{forwardRef as Lt,Fragment as Pt,useState as Ft,useEffect as Mt,useMemo as zt,useCallback as Ut,useRef as Bt,useLayoutEffect as jt,createElement as Ht}from"react";import Wt from"javascript-time-ago";import{p as Gt,c as Xt,l as Kt,s as Vt}from"./vendor-Be0cOokr.js";import{Highlight as Jt,themes as qt}from"prism-react-renderer";import{ErrorBoundary as Yt}from"react-error-boundary";import Qt,{createPortal as Zt}from"react-dom";import{VList as en}from"virtua";const tn=e=>e.charAt(0).toUpperCase()+e.slice(1),nn=e=>{const t=e=>e.filter(e=>"object"==typeof e&&null!==e?""!==e.key&&""!==e.value:""!==e),n=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>""!==e&&""!==t).map(([e,o])=>Array.isArray(o)?[e,t(o)]:"object"==typeof o&&null!==o?[e,n(o)]:[e,o]));return Object.entries(e).reduce((e,[o,r])=>{try{const i=JSON.parse(r);Array.isArray(i)?e[o]=JSON.stringify(t(i)):e[o]="object"==typeof i&&null!==i?JSON.stringify(n(i)):r}catch(i){"object"==typeof r&&null!==r?Array.isArray(r)?e[o]=JSON.stringify(t(r)):e[o]=JSON.stringify(n(r)):e[o]=r}return e},{})};var on;!function(e){e.SIGNALS="SIGNALS"}(on||(on={}));const rn=(e,t,n)=>{if(!e||!e.length)return!0;if(1===e.length)return"true"==e[0];const[o,r,i]=e;if(o===on.SIGNALS)switch(r){case"INCLUDES":return t?.includes(i);case"EXCLUDES":return!t?.includes(i);default:return!0}const a=n.find(e=>e.name===o||e.key===o);if(!a)return!1;const s=null==a.value?"":String(a.value);switch(r){case"===":case"==":return s===i;case"!==":case"!=":return s!==i;case">":return Number(s)>Number(i);case"<":return Number(s)<Number(i);case">=":return Number(s)>=Number(i);case"<=":return Number(s)<=Number(i);default:return!0}},an=e=>JSON.parse(JSON.stringify(e)),sn=(e,t)=>t.split(".").reduce((e,t)=>e?.[t],e),ln=(e,t,n)=>{const o=t.split(".");let r=e;for(let e=0;e<o.length-1;e++)o[e]in r&&"object"==typeof r[o[e]]||(r[o[e]]={}),r=r[o[e]];r[o[o.length-1]]=n},cn=(e,t)=>{let n=[...e];return t.monitors?.length&&(n=n.filter(e=>!!t.monitors?.find(t=>e.signals?.find(e=>e.toLowerCase()===t.id)))),n},dn=(e,t)=>{let n=[...e];return t.monitors?.length&&(n=n.filter(e=>!!t.monitors?.find(t=>e.exportedSignals[t.id]))),n},pn=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||!e.dataStreamNames.length):[];var un,hn,gn,mn,fn,bn,yn,$n,vn,xn,Sn,wn,En,Cn,Tn,An,kn,Dn,In,Nn,Rn,On,_n,Ln,Pn,Fn,Mn,zn,Un,Bn,jn,Hn,Wn,Gn,Xn,Kn,Vn,Jn,qn,Yn,Qn,Zn,eo,to,no;!function(e){e.Attributes="attributes",e.Samplers="samplers"}(un||(un={})),function(e){e.K8sAttributes="K8sAttributesResolver",e.AddClusterInfo="AddClusterInfo",e.DeleteAttributes="DeleteAttribute",e.RenameAttributes="RenameAttribute",e.PiiMasking="PiiMasking",e.ErrorSampler="ErrorSampler",e.ProbabilisticSampler="ProbabilisticSampler",e.LatencySampler="LatencySampler",e.ServiceNameSampler="ServiceNameSampler",e.SpanAttributeSampler="SpanAttributeSampler",e.URLTemplatization="URLTemplatization"}(hn||(hn={})),function(e){e.CollectContainerAttributes="collectContainerAttributes",e.CollectReplicaSetAttributes="collectReplicaSetAttributes",e.CollectWorkloadId="collectWorkloadId",e.CollectClusterId="collectClusterId",e.LabelsAttributes="labelsAttributes",e.AnnotationsAttributes="annotationsAttributes",e.ClusterAttributes="clusterAttributes",e.OverwriteExistingValues="overwriteExistingValues",e.AttributeNamesToDelete="attributeNamesToDelete",e.Renames="renames",e.PiiCategories="piiCategories",e.FallbackSamplingRatio="fallbackSamplingRatio",e.SamplingPercentage="samplingPercentage",e.EndpointsFilters="endpointsFilters",e.ServicesNameFilters="servicesNameFilters",e.AttributeFilters="attributeFilters",e.UrlTemplatizationRulesGroups="urlTemplatizationRulesGroups"}(gn||(gn={})),function(e){e.Pod="pod",e.Namespace="namespace",e.Node="node"}(mn||(mn={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.CONTAINS="contains",e.NOT_CONTAINS="not_contains",e.REGEX="regex"}(fn||(fn={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.GREATER_THAN="greater_than",e.LESS_THAN="less_than",e.GREATER_THAN_OR_EQUAL="greater_than_or_equal",e.LESS_THAN_OR_EQUAL="less_than_or_equal"}(bn||(bn={})),function(e){e.EXISTS="exists",e.EQUALS="equals"}(yn||(yn={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.IS_VALID_JSON="is_valid_json",e.IS_INVALID_JSON="is_invalid_json",e.JSONPATH_EXISTS="jsonpath_exists",e.KEY_EQUALS="key_equals",e.KEY_NOT_EQUALS="key_not_equals"}($n||($n={})),function(e){e.Horizontal="horizontal",e.Vertical="vertical"}(vn||(vn={})),function(e){e.Ascending="ascending",e.Descending="descending"}(xn||(xn={})),function(e){e.Community="community",e.Onprem="onprem"}(Sn||(Sn={})),function(e){e.K8s="k8s",e.Vm="vm"}(wn||(wn={})),function(e){e.Cli="odigos-cli",e.Helm="helm",e.Operator="odigos-operator"}(En||(En={})),function(e){e.Go="go",e.JavaScript="javascript",e.Python="python",e.Java="java",e.DotNet="dotnet",e.CSharp="csharp",e.CPlusPlus="cplusplus",e.Php="php",e.Ruby="ruby",e.Rust="rust",e.Swift="swift",e.Elixir="elixir",e.MySql="mysql",e.Nginx="nginx",e.Postgres="postgres",e.Redis="redis",e.Kafka="kafka",e.Ignored="ignored",e.Unknown="unknown",e.Processing="processing",e.NoContainers="no containers",e.NoRunningPods="no running pods"}(Cn||(Cn={})),function(e){e.Create="Create",e.Read="Read",e.Update="Update",e.Delete="Delete"}(Tn||(Tn={})),function(e){e.Namespace="Namespace",e.Source="Source",e.Destination="Destination",e.Action="Action",e.InstrumentationRule="InstrumentationRule",e.SamplingRule="SamplingRule"}(An||(An={})),function(e){e.DataStream="DataStream"}(kn||(kn={})),function(e){e.Input="input",e.MultiInput="multiInput",e.MultiTabledInput="multiTabledInput",e.KeyValuePair="keyValuePairs",e.TextArea="textarea",e.Dropdown="dropdown",e.Checkbox="checkbox",e.Toggle="toggle",e.Time="time"}(Dn||(Dn={})),function(e){e.Text="text",e.Password="password",e.Number="number",e.Decimal="decimal"}(In||(In={})),function(e){e.Warning="warning",e.Error="error",e.Success="success",e.Info="info",e.Default="default"}(Nn||(Nn={})),function(e){e.INSTRUMENTED="Instrumented",e.INSTRUMENTING="Instrumenting",e.UNINSTRUMENTED="Uninstrumented",e.NOT_INSTRUMENTED="Not Instrumented"}(Rn||(Rn={})),function(e){e.Loading="loading",e.Disabled="disabled"}(On||(On={})),function(e){e.Disabled="disabled",e.Unknown="unknown"}(_n||(_n={})),function(e){e.MarkedForInstrumentation="MarkedForInstrumentation",e.RuntimeDetection="RuntimeDetection",e.AgentEnabled="AgentEnabled",e.AgentInjected="AgentInjected",e.WorkloadRollout="WorkloadRollout",e.ProcessesHealthStatus="ProcessesHealthStatus",e.ExpectingTelemetry="ExpectingTelemetry",e.WorkloadOdigosHealth="WorkloadOdigosHealth"}(Ln||(Ln={})),function(e){e.TriggeredSuccessfully="RolloutTriggeredSuccessfully",e.RolloutFinished="RolloutFinished",e.PreviousRolloutOngoing="PreviousRolloutOngoing",e.Disabled="Disabled",e.NotRequired="NotRequired",e.WaitingForRestart="WaitingForRestart",e.WorkloadNotSupporting="WorkloadNotSupporting",e.WaitingInQueue="WaitingInQueue",e.FailedToPatch="FailedToPatch"}(Pn||(Pn={})),function(e){e.SuccessfullyInjected="SuccessfullyInjected",e.NoAgentInjected="NoAgentInjected",e.SomePodsAgentNotInjectedRolloutNeeded="SomePodsAgentNotInjectedRolloutNeeded",e.AgentInjectedAndDataSent="AgentInjectedAndDataSent"}(Fn||(Fn={})),function(e){e.CodeAttributes="code-attributes",e.FullPayloadCollection="full-payload-collection",e.DbPayloadCollection="db-payload-collection",e.QueryOperationDetector="query-operation-detector",e.AllowConcurrentAgents="allow_concurrent_agents",e.JavaEbpfInstrumentations="java-ebpf-instrumentations",e.JavaNativeInstrumentations="java-native-instrumentations",e.SizeS="size_s",e.SizeM="size_m",e.SizeL="size_l"}(Mn||(Mn={})),function(e){e.Header="header",e.Add="add",e.Base="base",e.Edged="edged",e.Frame="frame",e.Scroll="scroll",e.Skeleton="skeleton",e.MapItem="map-item",e.NoData="no-data",e.OdiLogo="odilogo"}(zn||(zn={})),function(e){e.Labeled="labeled"}(Un||(Un={})),function(e){e.AddRule="addRule",e.AddSource="addSource",e.AddAction="addAction",e.AddDestination="addDestination"}(Bn||(Bn={})),function(e){e.Alauda="alauda",e.AlibabaCloud="alibabacloud",e.AppDynamics="appdynamics",e.Axiom="axiom",e.AzureBlob="azureblob",e.AzureMonitor="azuremonitor",e.BetterStack="betterstack",e.Bonree="bonree",e.Causely="causely",e.Checkly="checkly",e.Chronosphere="chronosphere",e.ClickHouse="clickhouse",e.CloudWatch="cloudwatch",e.Coralogix="coralogix",e.Dash0="dash0",e.Datadog="datadog",e.Dynamic="dynamic",e.Dynatrace="dynatrace",e.ElasticApm="elasticapm",e.ElasticSearch="elasticsearch",e.GoogleCloud="googlecloud",e.GoogleCloudOTLP="googlecloudotlp",e.GrafanaCloudLoki="grafanacloudloki",e.GrafanaCloudPrometheus="grafanacloudprometheus",e.GrafanaCloudTempo="grafanacloudtempo",e.Greptime="greptime",e.Groundcover="groundcover",e.Honeycomb="honeycomb",e.HyperDX="hyperdx",e.Instana="instana",e.Jaeger="jaeger",e.Kafka="kafka",e.Kloudmate="kloudmate",e.Last9="last9",e.Lightstep="lightstep",e.LogzIo="logzio",e.Loki="loki",e.Lumigo="lumigo",e.Middleware="middleware",e.NewRelic="newrelic",e.Observe="observe",e.Odigos="odigos",e.OneUptime="oneuptime",e.OpenObserve="openobserve",e.Opsverse="opsverse",e.Oracle="oracle",e.OTLP="otlp",e.OTLPHttp="otlphttp",e.Prometheus="prometheus",e.Qryn="qryn",e.QrynOss="qryn-oss",e.Quickwit="quickwit",e.S3="s3",e.Seq="seq",e.Signalfx="signalfx",e.Signoz="signoz",e.Splunk="splunk",e.SplunkSapm="splunksapm",e.SplunkOtlp="splunkotlp",e.SumoLogic="sumologic",e.TelemetryHub="telemetryhub",e.Tempo="tempo",e.Tingyun="tingyun",e.Traceloop="traceloop",e.Uptrace="uptrace",e.VictoriaMetrics="victoriametrics",e.VictoriaMetricsCloud="victoriametricscloud",e.XRay="xray",e.Pyroscope="pyroscope"}(jn||(jn={})),function(e){e.Deployment="Deployment",e.DaemonSet="DaemonSet",e.StatefulSet="StatefulSet",e.CronJob="CronJob",e.Pod="Pod",e.StaticPod="StaticPod",e.Rollout="Rollout",e.ConfigMap="ConfigMap",e.DeploymentConfig="DeploymentConfig"}(Hn||(Hn={})),function(e){e.GolangCommunity="golang-community",e.NodejsCommunity="nodejs-community",e.PythonCommunity="python-community",e.JavaCommunity="java-community",e.DotNetCommunity="dotnet-community",e.RubyCommunity="ruby-community",e.PhpCommunity="php-community",e.GolangEnterprise="golang-enterprise",e.NodejsEnterprise="nodejs-enterprise",e.PythonEnterprise="python-enterprise",e.JavaEnterprise="java-enterprise",e.JavaEbpfInstrumentations="java-ebpf-instrumentations",e.OpentelemetryEbpfInstrumentation="opentelemetry-ebpf-instrumentation",e.DotNetLegacy="dotnet-legacy",e.DotNetEnterprise="dotnet-enterprise",e.RubyEnterprise="ruby-enterprise",e.CPlusPlusEnterprise="cplusplus-enterprise",e.MySqlEnterprise="mysql-enterprise"}(Wn||(Wn={})),function(e){e.Error="Error",e.Failure="Failure",e.Notice="Notice",e.Pending="Pending",e.Waiting="Waiting",e.Unsupported="Unsupported",e.Disabled="Disabled",e.Success="Success",e.Irrelevant="Irrelevant",e.Unknown="Unknown"}(Gn||(Gn={})),function(e){e.CodeAttributes="CodeAttributes",e.HeadersCollection="HeadersCollection",e.PayloadCollection="PayloadCollection",e.CustomInstrumentation="CustomInstrumentation",e.UnknownType="UnknownType"}(Xn||(Xn={})),function(e){e.Column="column",e.FilePath="filePath",e.Function="function",e.LineNumber="lineNumber",e.Namespace="namespace",e.StackTrace="stacktrace"}(Kn||(Kn={})),function(e){e.HeaderKeys="headerKeys"}(Vn||(Vn={})),function(e){e.Java="java",e.Golang="golang"}(Jn||(Jn={}));class oo{className;methodName;constructor(e,t){this.className=e,this.methodName=t}Verify(){return!!this.className&&!!this.methodName}toString(){return this.Verify()?`${this.className}.${this.methodName}`:"[Faulty Java Probe]"}}class ro{packageName;functionName;receiverName;receiverMethodName;constructor(e,t,n,o){this.packageName=e,this.functionName=t||"",this.receiverName=n||"",this.receiverMethodName=o||""}Verify(){return!!this.packageName&&(this.functionName?!(this.receiverMethodName||this.receiverName):!(!this.receiverMethodName||!this.receiverName))}toString(){return this.Verify()?this.functionName?`${this.packageName}.${this.functionName}`:this.receiverName&&this.receiverMethodName?`${this.packageName}.(${this.receiverName}).${this.receiverMethodName}`:"":"[Faulty Golang Probe]"}}!function(e){e.HttpRequest="httpRequest",e.HttpResponse="httpResponse",e.DbQuery="dbQuery",e.Messaging="messaging"}(qn||(qn={})),function(e){e.Healthy="Healthy",e.Updating="Updating",e.Degraded="Degraded",e.Failed="Failed",e.Down="Down",e.Unknown="Unknown"}(Yn||(Yn={})),function(e){e.Pending="Pending",e.Running="Running",e.Succeeded="Succeeded",e.Failed="Failed",e.Unknown="Unknown"}(Qn||(Qn={})),function(e){e.ContainerCreating="ContainerCreating",e.CrashLoopBackOff="CrashLoopBackOff",e.CreateContainerError="CreateContainerError",e.CreateContainerConfigError="CreateContainerConfigError",e.ErrImagePull="ErrImagePull",e.ErrImageNeverPull="ErrImageNeverPull",e.ImagePullBackOff="ImagePullBackOff",e.InvalidImageName="InvalidImageName",e.RegistryUnavailable="RegistryUnavailable",e.NetworkNotReady="NetworkNotReady",e.Running="Running",e.Completed="Completed",e.Error="Error",e.OOMKilled="OOMKilled",e.ContainerCannotRun="ContainerCannotRun",e.DeadlineExceeded="DeadlineExceeded",e.StartError="StartError"}(Zn||(Zn={})),function(e){e.Running="Running",e.Waiting="Waiting",e.Terminated="Terminated"}(eo||(eo={})),function(e){e.Logs="LOGS",e.Metrics="METRICS",e.Traces="TRACES",e.Profiles="PROFILES"}(to||(to={})),function(e){e.Logs="logs",e.Metrics="metrics",e.Traces="traces",e.Profiles="profiles"}(no||(no={}));const io={[to.Logs]:no.Logs,[to.Metrics]:no.Metrics,[to.Traces]:no.Traces,[to.Profiles]:no.Profiles},ao={[no.Logs]:to.Logs,[no.Metrics]:to.Metrics,[no.Traces]:to.Traces,[no.Profiles]:to.Profiles};var so;!function(e){e.Equals="equals",e.NotEquals="notEquals",e.EndWith="endWith",e.StartWith="startWith"}(so||(so={}));const lo=e=>{if(!e)return Nn.Info;switch(e){case Gn.Failure:case Gn.Error:return Nn.Error;case Gn.Notice:return Nn.Warning;case Gn.Pending:case Gn.Waiting:return On.Loading;case Gn.Unsupported:case Gn.Disabled:return On.Disabled;case Gn.Success:return Nn.Success;case Gn.Irrelevant:case Gn.Unknown:default:return Nn.Info}},co=(e,t)=>{let n=e;if(t.namespaces?.length){const e=new Set(t.namespaces.map(({id:e})=>e));n=n.filter(({id:t})=>e.has(t.namespace))}if(t.kinds?.length){const e=new Set(t.kinds.map(({id:e})=>e));n=n.filter(({id:t})=>e.has(t.kind))}if(t.languages?.length){const e=new Set(t.languages.map(({id:e})=>e));n=n.filter(({runtimeInfo:t,containers:n})=>t?.detectedLanguages?.some(t=>e.has(t))||n?.some(t=>{const n=t.overrides?.runtimeInfo?.language??t.runtimeInfo?.language;return!!n&&e.has(n)}))}if(t.podsAgentInjectionStatus?.length){const e=new Set(t.podsAgentInjectionStatus.map(({id:e})=>e));n=n.filter(({podsAgentInjectionStatus:t})=>e.has(t?.reasonEnum??"")||e.has(t?.message??""))}return t.onlyErrors&&(n=n.filter(e=>lo(e.workloadOdigosHealthStatus?.status)===Nn.Error)),n},po="https://docs.odigos.io",uo="default",ho="this-cluster",go="This Cluster",mo={SELECTED_DATA_STREAM:"SELECTED_DATA_STREAM",SELECTED_DATA_STREAM_WITH_PROXY:e=>`SELECTED_DATA_STREAM_${e}`,OVERVIEW_FILTERS:"OVERVIEW_FILTERS",DARK_MODE:"DARK_MODE"},fo={REQUIRED_FIELDS:"Required fields are missing",FIELD_IS_REQUIRED:"This field is required",FORBIDDEN:"Forbidden",ENTERPRISE_ONLY:(e="This")=>`${e} is an Enterprise feature. Please upgrade your plan.`,DEFINED_FOR_ALL_STREAMS:e=>`${e} are defined for all Data Streams.`,CANNOT_EDIT_RULE:"Cannot edit a system-managed instrumentation rule",CANNOT_DELETE_RULE:"Cannot delete a system-managed instrumentation rule",LATENCY_HTTP_ROUTE:'HTTP route must start with a forward slash "/"',READONLY_WARNING:"You're not allowed to create/update/delete in readonly mode",ILLEGAL_K8S_LABEL:'Must be 63 characters or less, must consist of alphanumeric characters, "-", "_", or ".", and must start & end with an alphanumeric character (e.g., my-name, 123.abc).',INVALID_VERSION:'Invalid version format, must be in the format of "major.minor.patch" (e.g. 1.0.0)'},bo={NAMESPACE:"Namespace",NAME:"Name",KIND:"Kind",CONNECTION:"Connection",CONNECTIONS:"Connections",DATA_STREAM:"Data Stream",DATA_STREAMS:"Data Streams",STREAM_NAME:"Data Stream name",NAME_YOUR_STREAM:"Name your Data Stream",NAME_YOUR_STREAM_PLACEHOLDER:"e.g. Highest priority",STREAM_DESCRIPTION:"Provide a clear and descriptive name for your pipeline to ensure its purpose is easily understood by you and your team.",STREAM_CONFIRM:"Confirm your new Data Stream",RENAME_STREAM:e=>`Rename "${e}"`,DATA_STREAM_EXISTS_WARNING:(e,t)=>`A Data Stream with this name already exists, you can still rename the current "${e}", but it will merge into the existing "${t}".`,DATA_STREAM_MERGE_WARNING:(e,t)=>e?`A Data Stream named "${t}" already exists. Saving will merge "${e}" into "${t}" - both streams will share the same configuration going forward.`:`A Data Stream named "${t}" already exists. Saving will merge into "${t}" - the new stream will share the existing configuration going forward.`,ACTION:"Action",ACTIONS:"Actions",ADD_ACTION:"Add Action",ACTION_DETAILS:"Action Details",INSTRUMENTATION_RULE:"Instrumentation Rule",INSTRUMENTATION_RULES:"Instrumentation Rules",ADD_INSTRUMENTATION_RULE:"Add Instrumentation Rule",INSTRUMENTATION_RULE_DETAILS:"Instrumentation Rule Details",DESTINATION:"Destination",DESTINATIONS:"Destinations",ADD_DESTINATION:"Add Destination",ADD_DESTINATIONS:"Add Destinations",ADD_DESTINATION_DESCRIPTION:"Add a destination to send your telemetry data to. You can add multiple destinations.",DESTINATION_DETAILS:"Destination Details",SELECTED_DESTINATIONS:"Selected Destinations",SOURCE:"Source",SOURCES:"Sources",ADD_SOURCE:"Add Source",SOURCE_DETAILS:"Source Details",SELECT_SOURCES:"Select Sources",SELECTED_SOURCES:"Selected Sources",SELECT_SOURCES_DESCRIPTION:"Choose which sources to monitor in your pipeline.",NO_SOURCES:"No sources",NO_SOURCES_GO_BACK:"No sources selected. Please go back to select sources.",PLEASE_ADD_SOURCE:"Please add a source",NO_SOURCES_NAMESPACE:"No sources available in this namespace",TRY_SEARCH_OR_OTHER_NAMESPACE:"Try searching again or select another namespace.",PLEASE_MAKE_SURE_UNIGNORED_NAMESPACES:"Please make sure your cluster has unignored namespaces",INSTALLATION:"Installation",SOURCES_SETUP:"Sources setup",DESTINATIONS_SETUP:"Destinations setup",SUMMARY:"Summary",REVIEW_SETUP:"Review your setup and confirm your choices.",NO_SOURCES_SELECTED:"No sources selected",ADD_SOURCE_PROMPT:"Add at least one source to start collecting data",NO_DESTINATIONS_SELECTED:"No destinations selected",ADD_DESTINATION_PROMPT:"Add destination so your data has somewhere to go",GET_STARTED_WITH:"Get started with",GET_STARTED_DESCRIPTION:"First, select the sources you want Odigos to monitor. Next, choose where your data should be sent by configuring destinations.",TYPE:"Type",NOTES:"Notes",STATUS:"Status",READONLY:"Readonly",LANGUAGE:"Language",VERSION:"Version",RUNTIME_VERSION:"Runtime Version",VERSION_PLACEHOLDER:"1.0.0",MONITORS:"Monitors",SIGNALS_FOR_PROCESSING:"Signals for Processing",MANAGED_BY_PROFILE:"Managed by Profile",TIER:"Tier",ENTERPRISE:"Enterprise",ENTERPRISE_TIER:"Enterprise Tier",COMMUNITY:"Community",COMMUNITY_TIER:"Community Tier",API_TOKEN:"API Token",API_TOKENS:"API Tokens",DESCRIBE_ODIGOS:"Describe Odigos",DESCRIBE_SOURCE:"Describe Source",OVERVIEW:"Overview",LIBRARIES:"Libraries",STANDARD_LIBRARY:"Standard Library",STANDARD:"Standard",PEER_SOURCES:"Peer Sources",PROFILING:"Profiling",INBOUND:"Inbound",OUTBOUND:"Outbound",INBOUND_DESCRIPTION:e=>`Services that send requests to ${e}`,OUTBOUND_DESCRIPTION:e=>`Services that ${e} sends requests to`,NO_INBOUND_CONNECTIONS:"No inbound connections",NO_OUTBOUND_CONNECTIONS:"No outbound connections",COULD_NOT_FETCH_PEER_SOURCES:"Could not fetch peer sources",VIRTUAL:"Virtual",VIRTUAL_TOOLTIP:"This service is not instrumented/injected with Odigos, but we can still see it in the service map because it is connected to other services.",NO_RESULTS:"No results",NO_RESULTS_FOR_FILTER:e=>`No results matched the filter '${e}'`,POD:"Pod",PODS:"Pods",PODS_HEALTHY:"Pods are healthy",PODS_NOT_HEALTHY:"Pods are not healthy",NO_RUNNING_PODS:"Check if you have any running pods and try again",AGENT_INJECTED:"Agent injected",AGENT_NOT_INJECTED:"Agent not injected",KUBERNETES_HEALTHY:"Kubernetes healthy",ODIGOS_HEALTHY:"Odigos healthy",HEALTHY:"Healthy",UNHEALTHY:"Unhealthy",NOT_HEALTHY:"Not Healthy",NODE:"Node",START_TIME:"Start Time",NOT_RUNNING:"Not Running",RESTARTS:"Restarts",LATEST_REVISION:"Latest Revision",OLD_REVISION:"Old Revision",READY:"Ready",NOT_READY:"Not Ready",STARTED:"Started",NOT_STARTED:"Not Started",CRASHLOOP:"Crashloop",NO_CRASHLOOP:"No Crashloop",CRASHLOOP_BACKOFF:"Crashloop backoff",CANNOT_POOL_IMAGE:"Cannot pool image",DEVICE_NAME:"Device Name",INSTRUMENTED:"Instrumented",UNINSTRUMENTED:"Uninstrumented",INSTRUMENTED_WITH_DISTRO:e=>`Instrumented | ${e}`,DEBUG_COMMANDS:"Debug Commands",GET_POD:"Get Pod",GET_POD_YAML:"Get Pod YAML",GET_POD_JSON:"Get Pod JSON",GET_POD_DESCRIBE:"Get Pod Describe",GET_POD_LOGS:"Get Pod Logs",CONTAINER:"Container",CONTAINERS:"Containers",DETECTED_CONTAINERS:"Detected Containers",DETECTED_CONTAINERS_DESCRIPTION:"The system automatically instruments the containers it detects with a supported programming language.",NO_CONTAINERS_DETECTED:"No containers detected",DETECTED_PROCESSES:"Detected Processes",DETECTED_PROCESSES_DESCRIPTION:"The system automatically instruments the processes it detects with a supported programming language.",NO_PROCESSES_DETECTED:"No processes detected",CONTAINER_NAME:"Container Name",PROCESS:"Process",PROCESSES:"Processes",PROCESS_FALLBACK_NAME:"process",OPEN_IN_POD_TAB:"Open in 'Pod' tab",ALL_CONTAINERS_HEALTHY:e=>`All ${e} containers are healthy`,ALL_PROCESSES_HEALTHY:e=>`All ${e} processes are healthy`,PID:e=>`#${e}`,IDENTIFYING_ATTRIBUTES:"Identifying Attributes",INSTRUMENTATION_LIBRARIES:"Instrumentation Libraries",FILTERED_COUNT_TOOLTIP:"Represents filtered amount, out of total amount",SEARCH_NAMESPACES:"Search Namespaces",SEARCH_SOURCES:"Search Sources",SELECT_ALL:"Select All",ONLY_SELECTED:"Only selected",ONLY_RUNNING_INSTANCES:"Only running instances",TO_COLLECT_OTEL_DATA:"To collect OpenTelemetry data",TO_MONITOR_OTEL_DATA:"To monitor OpenTelemetry data",TO_MODIFY_OTEL_DATA:"To modify OpenTelemetry data",NO_DATA_INSTRUMENTATION_RULES:"To configure how telemetry is collected",NO_DATA_SOURCES:"To start collecting telemetry from a Kubernetes workload",NO_DATA_ACTIONS:"To process telemetry before export",NO_DATA_DESTINATIONS:"To send telemetry to an observability backend",QUICK_BACK_TO_SUMMARY:"When you finish editing you can quickly go back to the summary.",GO_TO_SUMMARY:"Go to summary",FUTURE_APPS_TITLE:"Instrument entire namespace",FUTURE_APPS_DESCRIPTION:"When enabled, all applications in the namespace and new applications will be instrumented automatically and included in the current data stream using a Namespace Source.",OVERIDE:"Override",OVERIDDEN:"Overridden",OVERRIDE_RUNTIME_DETAILS:"Override Runtime Details",OVERRIDE_RUNTIME_WARNING:"This is an advanced configuration. If the selected programming language is incorrect, data collection may be incomplete or may not occur at all.",OVERRIDE_OTEL_DISTRO_NAME:"Override OTel distro name",OVERRIDE_OTEL_DISTRO_NAME_WARNING:"This is an advanced configuration. If the selected OTel distro name is incorrect, data collection may be incomplete or may not occur at all.",OTEL_DISTRO_NAME:"OTel distro name",WAITING_FOR_RUNTIME_DETECTION:"Waiting for runtime detection...",DETECTING_RUNTIME_INFO:"Detecting runtime info",NO_AVAILABLE_AGENT:"No available agent",ACTIVE:"Active",INACTIVE:"Inactive",ENABLED:"Enabled",DISABLED:"Disabled",NO_TRACES_FOUND:"No traces found",ARE_SERVICES_INSTRUMENTED_AND_PRODUCING_TRAFFIC:"Are your services instrumented & producing traffic?",JAVA_CUSTOM_PROBES:"Java Custom Probes",GOLANG_CUSTOM_PROBES:"Golang Custom Probes",ROLLOUT:"Rollout",ROLLOUT_RESTART:"Rollout Restart",ROLLOUT_NOT_REQUIRED:"Rollout Not Required",ROLLOUT_NOT_REQUIRED_MESSAGE:"This source is instrumented with eBPF and does not require a restart.",ROLLOUT_FAILED:"Rollout Failed",ROLLOUT_PREVIOUS_ONGOING:"Previous Rollout Ongoing",ROLLOUT_PREVIOUS_ONGOING_MESSAGE:"A previous rollout is ongoing. Please wait for it to finish before triggering a new one.",ROLLOUT_AUTO_DISABLED:"Auto Rollout Disabled",ROLLOUT_AUTO_DISABLED_MESSAGE:"Trigger a manual rollout to inject the agent.",ROLLOUT_FINISHED:"Rollout Finished",ROLLOUT_FINISHED_MESSAGE:"All pods have been updated and are healthy.",ROLLBACK:"Rollback",ROLLBACK_OCCURRED:"Rollback Occurred",ROLLBACK_OCCURRED_MESSAGE:"Odigos detected a crash and rolled back instrumentation to protect your workload.",ROLLBACK_SUCCESS:"Rollback Success",ROLLBACK_RECOVER:"Recover",FETCHING_NAMESPACES:"Fetching namespaces",FETCHING_NAMESPACES_SUBTITLE:"Please wait while we fetch the namespaces",ADD_SOURCES_DESCRIPTION:"Choose which sources to monitor in your pipeline.",CREATING_SOURCES:"Creating Sources...",CREATING_SOURCES_SUBTITLE:"This may take a few moments while sources are being created.",SELECT_NAMESPACE:"Select namespace from the list",SELECT_NAMESPACE_SUBTITLE:"Add namespace so you can select workloads from it.",CREATING_ACTION:"Creating action",CREATING_ACTION_SUBTITLE:"Please wait while we create the action",ADD_ACTION_DESCRIPTION:"Select an action to modify telemetry data before it's sent to destinations. Choose an action type and configure its details.",CREATING_INSTRUMENTATION_RULE:"Creating instrumentation rule",CREATING_INSTRUMENTATION_RULE_SUBTITLE:"Please wait while we create the instrumentation rule",ADD_INSTRUMENTATION_RULE_DESCRIPTION:"Define how telemetry is recorded from your application. Choose a rule type and configure the details.",CREATING_DESTINATION:"Creating destination",CREATING_DESTINATION_SUBTITLE:"Please wait while we create the destination",ADD_DESTINATION_DRAWER_DESCRIPTION:"Add backend destination you want to connect with Odigos.",THROUGHPUT_LAST_10_SECONDS:"Throughput (last 10 seconds)",DELETE_POD_TO_RESTART:"Delete Pod to Restart",RESTART_POD_DESCRIPTION:"Deleting a pod removes it and lets Kubernetes controllers recreate a new one.\nThe new pod starts fresh with the latest instrumentation agent and configuration.\nRecommended for non-production clusters only."},yo={GET_STARTED:"Get started",ADD:"Add",ADD_NEW:"Add New",NEW:"New",SELECT:"Select",CREATE:"Create",UPDATE:"Update",EDIT:"Edit",DELETE:"Delete",RESTART:"Restart",RESTART_POD:"Restart pod",REFRESH:"Refresh",CANCEL:"Cancel",DONE:"Done",SAVE:"Save",BACK:"Back",NEXT:"Next",TEST:"Test",TEST_CONNECTION:"Test Connection",INSTRUMENT:"Instrument",UNINSTRUMENT:"Uninstrument"},$o=(e,t)=>t?e.filter(e=>e.dataStreamNames?.includes(t)||t===uo&&!e.dataStreamNames?.length):[],vo=(e,t="",n={})=>{for(const o in e)if(e.hasOwnProperty(o)){const r=e[o],i=t?`${t}.${o}`:o;null===r||"object"!=typeof r||Array.isArray(r)?Array.isArray(r)?r.forEach((e,t)=>{const o=`${i}[${t}]`;null!==e&&"object"==typeof e?vo(e,o,n):n[o]=e}):n[i]=r:vo(r,i,n)}return n},xo=e=>{if(!e)return"0 KB/s";const t=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,t)).toFixed(0===t?0:1)} ${["Bytes/s","KB/s","MB/s","GB/s","TB/s"][t]}`},So=e=>{if(!e)return"0 ns";if(e<1e3)return`${e.toFixed(0)} ns`;if(e<1e6){const t=e/1e3;return`${t.toFixed(t<10?2:0)} μs`}if(e<1e9){const t=e/1e6;return`${t.toFixed(t<10?2:0)} ms`}if(e<6e10){const t=e/1e9;return`${t.toFixed(t<10?2:0)} s`}if(e<36e11){const t=e/6e10;return`${t.toFixed(t<10?2:0)} m`}if(e<864e11){const t=e/36e11;return`${t.toFixed(t<10?2:0)} h`}{const t=e/864e11;return`${t.toFixed(t<10?2:0)} d`}},wo=()=>{const e=crypto.getRandomValues(new Uint8Array(16));let t=0;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,n=>{const o=e[t%16];t++;return("1"===n?o:"0"===n?63&o|128:15&o|64).toString(16)})},Eo=e=>{const t=e?.toLowerCase(),n=t?.includes(un.Samplers),o=t===un.Attributes;if(n)return l;if(o)return c;return{[hn.K8sAttributes]:g,[hn.AddClusterInfo]:h,[hn.DeleteAttributes]:u,[hn.PiiMasking]:c,[hn.RenameAttributes]:p,[hn.URLTemplatization]:d,[hn.ErrorSampler]:l,[hn.ProbabilisticSampler]:l,[hn.LatencySampler]:l,[hn.ServiceNameSampler]:l,[hn.SpanAttributeSampler]:l}[e]||m},Co=e=>{if(!e)return To([]);if(Array.isArray(e))return To(e);const t=Object.values(e).reduce((e,t)=>(null!=t&&e.push({status:lo(t.status),type:t.name??"",reason:t.reasonEnum??null,message:t.message??null}),e),[]);return To(t)},To=e=>{const t=e?.filter(({status:e})=>e===Nn.Error),n=e?.filter(({status:e})=>e===Nn.Warning),o=e?.filter(({status:e})=>e===On.Disabled),r=e?.filter(({status:e})=>e===On.Loading),i=t.length>0,a=n.length>0,s=o.length>0;return{errors:t,hasErrors:i,warnings:n,hasWarnings:a,disableds:o,hasDisableds:s,loadings:r,hasLoadings:r.length>0,priorotizedStatus:i?Nn.Error:a?Nn.Warning:s?Nn.Info:void 0}},Ao=e=>{const t=e?.reduce((e,t)=>t.agentEnabled?.agentEnabled?e+1:e,0);return`${t}/${e?.length||0} instrumented`},ko=e=>({[Cn.Java]:R,[Cn.Go]:N,[Cn.JavaScript]:I,[Cn.Python]:D,[Cn.DotNet]:k,[Cn.CSharp]:A,[Cn.CPlusPlus]:T,[Cn.Php]:C,[Cn.Ruby]:E,[Cn.Rust]:w,[Cn.Swift]:S,[Cn.Elixir]:x,[Cn.MySql]:v,[Cn.Nginx]:$,[Cn.Postgres]:y,[Cn.Redis]:b,[Cn.Kafka]:f,[Cn.Ignored]:m,[Cn.Unknown]:m,[Cn.Processing]:m,[Cn.NoContainers]:m,[Cn.NoRunningPods]:m}[e]||m),Do=e=>e?e.overrides?.runtimeInfo?.language??e.runtimeInfo?.language??Cn.Unknown:Cn.Unknown,Io=e=>e?e.overrides?.runtimeInfo?.runtimeVersion??e.runtimeInfo?.runtimeVersion??null:null,No=e=>e?.map(e=>ko(Do(e)))||[],Ro=e=>e?.map(e=>ko(e))||[],Oo=e=>e.runtimeInfo?.detectedLanguages?.length?Ro(e.runtimeInfo?.detectedLanguages):No(e.containers),_o=(e,t)=>{const n={[jn.Alauda]:Fe,[jn.AlibabaCloud]:Pe,[jn.AppDynamics]:Le,[jn.Axiom]:_e,[jn.AzureBlob]:Oe,[jn.AzureMonitor]:Re,[jn.BetterStack]:Ne,[jn.Bonree]:Ie,[jn.Causely]:De,[jn.Checkly]:ke,[jn.Chronosphere]:Ae,[jn.ClickHouse]:Te,[jn.CloudWatch]:Ce,[jn.Coralogix]:Ee,[jn.Dash0]:we,[jn.Datadog]:Se,[jn.Dynamic]:q,[jn.Dynatrace]:xe,[jn.ElasticApm]:ve,[jn.ElasticSearch]:$e,[jn.GoogleCloud]:ye,[jn.GoogleCloudOTLP]:ye,[jn.GrafanaCloudLoki]:be,[jn.GrafanaCloudPrometheus]:be,[jn.GrafanaCloudTempo]:be,[jn.Greptime]:fe,[jn.Groundcover]:me,[jn.Honeycomb]:ge,[jn.HyperDX]:he,[jn.Instana]:ue,[jn.Jaeger]:pe,[jn.Kafka]:f,[jn.Kloudmate]:de,[jn.Last9]:ce,[jn.Lightstep]:le,[jn.LogzIo]:se,[jn.Loki]:ae,[jn.Lumigo]:ie,[jn.Middleware]:re,[jn.NewRelic]:oe,[jn.Observe]:ne,[jn.Odigos]:te,[jn.OneUptime]:ee,[jn.OpenObserve]:Z,[jn.Opsverse]:Q,[jn.Oracle]:Y,[jn.OTLP]:q,[jn.OTLPHttp]:q,[jn.Prometheus]:J,[jn.Qryn]:V,[jn.QrynOss]:K,[jn.Quickwit]:X,[jn.S3]:G,[jn.Seq]:W,[jn.Signalfx]:j,[jn.Signoz]:H,[jn.Splunk]:j,[jn.SplunkSapm]:j,[jn.SplunkOtlp]:j,[jn.SumoLogic]:B,[jn.TelemetryHub]:U,[jn.Tempo]:z,[jn.Tingyun]:M,[jn.Traceloop]:F,[jn.Uptrace]:P,[jn.VictoriaMetrics]:L,[jn.VictoriaMetricsCloud]:L,[jn.XRay]:_,[jn.Pyroscope]:O}[e];return n&&!t?{icon:n}:{iconSrc:`https://d15jtxgb40qetw.cloudfront.net/${e}.svg`}},Lo=e=>({[An.Namespace]:je,[An.Source]:Be,[An.Destination]:Ue,[An.Action]:d,[An.InstrumentationRule]:ze,[An.SamplingRule]:Me}[e]),Po=e=>"ruleId"in e&&e.ruleId?e.ruleId:"id"in e&&"string"==typeof e.id&&e.id||"id"in e&&"object"==typeof e.id&&e.id.namespace&&e.id.kind&&e.id.name?e.id:"namespace"in e&&e.namespace&&"kind"in e&&e.kind&&"name"in e&&e.name?{namespace:e.namespace,name:e.name,kind:e.kind}:"name"in e&&e.name?e.name:void 0,Fo=e=>e?"string"==typeof e?e:`${e.namespace}/${e.kind}/${e.name}`:"",Mo=e=>Fo(Po(e)),zo=(e,t,n)=>{const{extended:o,prioritizeDisplayName:r}=n||{};let i="",a="";switch(t){case An.InstrumentationRule:const t=e;i=t.type,a=t.ruleName;break;case An.Source:const n=e;i=n.id.name,a=n.serviceName||"";break;case An.Action:const o=e;i=o.type,a=o.name||"";break;case An.Destination:const r=e;i=r.destinationType.displayName,a=r.name;break;case An.Namespace:const s=e;i=s.name,a=s.name}return o?i+(a&&a!==i?` (${a})`:""):r&&a||i},Uo=(e,t)=>{if(t===An.Source){const t={namespace:"",name:"",kind:""};return e.split("&").forEach(e=>{const[n,o]=e.split("=");t[n]=o}),t}return e},Bo=e=>({[Xn.CodeAttributes]:Xe,[Xn.CustomInstrumentation]:Ge,[Xn.HeadersCollection]:We,[Xn.PayloadCollection]:He,[Xn.UnknownType]:m}[e]||m),jo=e=>e.overrides?.runtimeInfo?.language??e.runtimeInfo?.language??Cn.Unknown,Ho=e=>{const{numberOfInstances:t,containers:n}=e;if(!n)return t&&t>0?Cn.Processing:Cn.NoRunningPods;const o=n?.filter(e=>jo(e)!==Cn.Ignored);if(!o.length)return Cn.NoContainers;const r=o.find(e=>jo(e)!==Cn.Unknown);return r?jo(r):Cn.Unknown},Wo=(e,t,n)=>(t===An.Source?e?.sources.find(e=>e.kind===n.kind&&e.name===n.name&&e.namespace===n.namespace):e?.destinations.find(e=>e.id===n))||{throughput:0},Go=e=>({[to.Logs]:Je,[to.Metrics]:Ve,[to.Traces]:Ke,[to.Profiles]:te}[e]),Xo=e=>{if(!e)return te;return{[wn.K8s]:g,[wn.Vm]:qe}[e]},Ko=e=>{if(!e)return"Unknown";return{[wn.K8s]:"Kubernetes Cluster",[wn.Vm]:"Virtual Machine"}[e]},Vo=(e,t,n)=>{const o=e[t];return o?o.flatMap(e=>{const o=e[n],r=[];return void 0!==o&&(Array.isArray(o)?r.push(...o):r.push(o)),r.push(...Vo(e,t,n)),r}):[]},Jo=(e,t)=>{if(t===An.Source){let t="";return Object.entries(e).forEach(([e,n])=>{t+=`${e}=${n}&`}),t.slice(0,-1),t}return e},qo=(e,t,n)=>{switch(t){case Nn.Default:return e.v2.colors.purple[n];case Nn.Info:return e.v2.colors.blue[n];case Nn.Error:return e.v2.colors.red[n];case Nn.Warning:return e.v2.colors.yellow[n];case Nn.Success:return e.v2.colors.green[n];case On.Loading:case _n.Disabled:case _n.Unknown:return e.v2.colors.silver[n];default:return e.v2.colors.white[500]}},Yo=e=>{switch(e){case Yn.Updating:case Qn.Pending:case Zn.ContainerCreating:case eo.Waiting:return Nn.Info;case Yn.Healthy:case Qn.Succeeded:case Qn.Running:case Zn.Running:case eo.Running:return Nn.Success;case Yn.Degraded:return Nn.Warning;case Yn.Failed:case Qn.Failed:case Zn.Error:case Zn.CrashLoopBackOff:case Zn.CreateContainerError:case Zn.CreateContainerConfigError:case Zn.ErrImagePull:case Zn.ErrImageNeverPull:case Zn.ImagePullBackOff:case Zn.InvalidImageName:case Zn.RegistryUnavailable:case Zn.NetworkNotReady:case Zn.OOMKilled:case Zn.ContainerCannotRun:case eo.Terminated:case Zn.DeadlineExceeded:case Zn.StartError:return Nn.Error;case Yn.Down:case Zn.Completed:return _n.Disabled;case Yn.Unknown:case Qn.Unknown:default:return _n.Unknown}};var Qo,Zo,er;!function(e){e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.P="p",e.Span="span"}(Qo||(Qo={})),function(e){e.XXXS="xxxs",e.XXS="xxs",e.XS="xs",e.S="s",e.M="m",e.L="l",e.XL="xl",e.XXL="xxl",e.XXXL="xxxl"}(Zo||(Zo={})),function(e){e.Primary="primary",e.Secondary="secondary",e.Tertiary="tertiary",e.Disable="disable",e.Error="error",e.Mandatory="mandatory",e.Link="link",e.Success="success"}(er||(er={}));const tr=new Set(Object.values(er)),nr=(e,t)=>{if("string"!=typeof(n=t)||!tr.has(n))return t;var n;switch(t){case er.Primary:return e.v2.colors.white[500];case er.Secondary:return e.v2.colors.silver[200];case er.Tertiary:return e.v2.colors.black[500];case er.Disable:return e.v2.colors.grey[400];case er.Error:return e.v2.colors.red[500];case er.Mandatory:return e.v2.colors.red[600];case er.Link:return e.v2.colors.purple[400];case er.Success:return e.v2.colors.green[400];default:return}},or=o.p`
2
- margin: 0;
3
- color: ${({$color:e,theme:t})=>nr(t,e)||t.v2.colors.grey[50]};
4
- font-family: ${({theme:e})=>e.font_family.primary};
5
- font-size: ${({theme:e,$size:t})=>e.v2.text.size[t]}px;
6
- font-weight: ${({$weight:e})=>e};
7
- text-align: ${({$align:e})=>e};
8
- text-transform: ${({$transform:e})=>e};
9
- line-height: ${({theme:e,$lineHeight:t,$size:n})=>t||`${e.v2.text.size[n]+2}px`};
10
- opacity: ${({$opacity:e})=>e};
11
-
12
- ${({$nowrap:e})=>e&&r`
13
- text-wrap: nowrap;
14
- white-space: nowrap;
15
- overflow: hidden;
16
- text-overflow: ellipsis;
17
- `}
18
-
19
- ${({$underline:e})=>e&&r`
20
- text-decoration: underline;
21
- `}
22
-
23
- ${({$withClick:e})=>e&&r`
24
- cursor: pointer;
25
- &:hover {
26
- text-decoration: underline;
27
- }
28
- `}
29
- `,rr=Lt(({children:n,variant:o=Qo.P,color:r,size:i=Zo.S,weight:a=400,opacity:s=1,align:l="left",lineHeight:c,transform:d,nowrap:p,underline:u,onClick:h,disabled:g,...m},f)=>{const b=n?.toString().split("\n")||[];return e(or,{ref:f,as:o,$color:r,$size:i,$weight:a,$opacity:s,$align:l,$lineHeight:c,$transform:d,$nowrap:p,$underline:u,$withClick:!!h&&!g,onClick:g?void 0:h,...m,children:b.map((n,o)=>t(Pt,{children:[n,o!==b.length-1&&e("br",{})]},`typography-${o}-${n}`))})});rr.displayName="Typography";const ir=o.div`
30
- border-radius: 100%;
31
- background-color: ${({theme:e})=>e.v2.colors.silver[700]};
32
- position: relative;
33
- `,ar=o.div`
34
- width: 80px;
35
- height: 80px;
36
- border-radius: 100%;
37
- border: 4px solid ${({theme:e})=>e.v2.colors.green[300]};
38
- border-right-color: transparent;
39
- border-left-color: transparent;
40
- border-bottom-color: transparent;
41
- animation: spin 1s linear infinite;
42
- @keyframes spin {
43
- to {
44
- transform: rotate(360deg);
45
- }
46
- }
47
- `,sr=o(rr)`
48
- position: absolute;
49
- top: 50%;
50
- left: 50%;
51
- transform: translate(-50%, -50%);
52
- `,lr=({percentage:n})=>t(ir,{children:[e(ar,{}),"number"==typeof n?e(sr,{size:Zo.M,weight:500,children:`${n}%`}):null]}),cr={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function dr(e){if("number"==typeof e)return{value:e,unit:"px"};let t;const n=(e.match(/^[0-9.]*/)||"").toString();t=n.includes(".")?parseFloat(n):parseInt(n,10);const o=(e.match(/[^0-9]*$/)||"").toString();return cr[o]?{value:t,unit:o}:{value:t,unit:"px"}}function pr(e){const t=dr(e);return`${t.value}${t.unit}`}const ur=((e,t,n)=>{const o=`react-spinners-${e}-${n}`;if("undefined"==typeof window||!window.document)return o;const r=document.createElement("style");document.head.appendChild(r);const i=r.sheet,a=`\n @keyframes ${o} {\n ${t}\n }\n `;return i&&i.insertRule(a,0),o})("SpinnerOld","50% {opacity: 0.3} 100% {opacity: 1}","fade"),hr=({loading:n=!0,color:o,scale:r=1,speedMultiplier:a=1,cssOverride:s={},style:l={},...c})=>{const d=i(),p=o||d.text.secondary;if(!n)return null;const{value:u}=dr(2),h=u+4.2,g=h/2+h/5.5,m=4*h*r,f={position:"relative",width:`${m}px`,height:`${m}px`,scale:r,...l,...s},b=(e,t)=>({position:"absolute",width:pr(1.5),height:pr(4),borderRadius:pr(2),backgroundColor:p,transition:"2s",animationFillMode:"both",animation:`${ur} ${1.2/a}s ${.12*e}s infinite ease-in-out`,transform:`translate(-50%, -50%) rotate(${t}deg)`});return t("span",{style:f,...c,children:[e("span",{style:{...b(1,0),top:`calc(50% + ${h}px)`,left:"50%"}}),e("span",{style:{...b(2,-45),top:`calc(50% + ${g}px)`,left:`calc(50% + ${g}px)`}}),e("span",{style:{...b(3,90),top:"50%",left:`calc(50% + ${h}px)`}}),e("span",{style:{...b(4,45),top:`calc(50% + ${-1*g}px)`,left:`calc(50% + ${g}px)`}}),e("span",{style:{...b(5,0),top:`calc(50% + ${-1*h}px)`,left:"50%"}}),e("span",{style:{...b(6,-45),top:`calc(50% + ${-1*g}px)`,left:`calc(50% + ${-1*g}px)`}}),e("span",{style:{...b(7,90),top:"50%",left:`calc(50% + ${-1*h}px)`}}),e("span",{style:{...b(8,45),top:`calc(50% + ${g}px)`,left:`calc(50% + ${-1*g}px)`}})]})},gr=o.div`
53
- width: ${({$size:e})=>e}px;
54
- height: ${({$size:e})=>e}px;
55
- border-radius: 100%;
56
- background: ${({$color:e})=>e};
57
- display: flex;
58
- align-items: center;
59
- justify-content: center;
60
- `,mr=({scale:t,icon:n})=>{const o=i();return e(gr,{$size:45*t,$color:"rgba(80, 246, 232, 0.10)",children:e(gr,{$size:43*t,$color:"rgba(80, 246, 232, 0.20)",children:e(gr,{$size:39*t,$color:"rgba(80, 246, 232, 0.40)",children:e(gr,{$size:33*t,$color:"rgba(80, 246, 232, 0.60)",children:e(gr,{$size:23*t,$color:"#50F6E8",children:e(n,{size:16*t,fill:o.v2.colors.black[500]})})})})})})},fr=434,br=635,yr=o.div`
61
- width: ${434}px;
62
- height: ${635}px;
63
- display: flex;
64
- flex-direction: column;
65
- align-items: center;
66
- justify-content: center;
67
- padding: 16px;
68
- background: linear-gradient(180deg, #0b0517 2.82%, #190d31 100%);
69
- position: relative;
70
- `,$r=o.div`
71
- position: absolute;
72
- top: 50%;
73
- left: 50%;
74
- transform: translate(-50%, -50%);
75
- `,vr=()=>t(yr,{children:[e($r,{children:t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"464",height:"464",viewBox:"0 0 464 464",fill:"none",children:[e("path",{opacity:"0.1",d:"M231.567 463.134C359.458 463.134 463.134 359.458 463.134 231.567C463.134 103.676 359.458 0 231.567 0C103.676 0 0 103.676 0 231.567C0 359.458 103.676 463.134 231.567 463.134Z",fill:"url(#paint0_radial_164_65835)"}),e("defs",{children:t("radialGradient",{id:"paint0_radial_164_65835",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(201.232 229.641) scale(231.217)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.41",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.13"}),e("stop",{offset:"0.67",stopColor:"#7C3BFF",stopOpacity:"0.18"}),e("stop",{offset:"0.75",stopColor:"#7C3BFF",stopOpacity:"0.25"}),e("stop",{offset:"0.83",stopColor:"#7C3BFF",stopOpacity:"0.33"}),e("stop",{offset:"0.89",stopColor:"#7C3BFF",stopOpacity:"0.44"}),e("stop",{offset:"0.95",stopColor:"#7C3BFF",stopOpacity:"0.56"}),e("stop",{offset:"1",stopColor:"#7C3BFF",stopOpacity:"0.7"})]})})]})}),e($r,{children:t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"432",height:"432",viewBox:"0 0 432 432",fill:"none",children:[e("path",{opacity:"0.3",d:"M215.921 431.841C335.17 431.841 431.841 335.17 431.841 215.921C431.841 96.6709 335.17 0 215.921 0C96.6709 0 0 96.6709 0 215.921C0 335.17 96.6709 431.841 215.921 431.841Z",fill:"url(#paint0_radial_164_65836)"}),e("defs",{children:t("radialGradient",{id:"paint0_radial_164_65836",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(204.229 214.376) scale(216.276)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.38",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.52",stopColor:"#7C3BFF",stopOpacity:"0.13"}),e("stop",{offset:"0.62",stopColor:"#7C3BFF",stopOpacity:"0.18"}),e("stop",{offset:"0.69",stopColor:"#7C3BFF",stopOpacity:"0.25"}),e("stop",{offset:"0.76",stopColor:"#7C3BFF",stopOpacity:"0.33"}),e("stop",{offset:"0.82",stopColor:"#7C3BFF",stopOpacity:"0.44"}),e("stop",{offset:"0.88",stopColor:"#7C3BFF",stopOpacity:"0.57"}),e("stop",{offset:"0.93",stopColor:"#7C3BFF",stopOpacity:"0.72"}),e("stop",{offset:"0.97",stopColor:"#7C3BFF",stopOpacity:"0.88"}),e("stop",{offset:"1",stopColor:"#7C3BFF"})]})})]})}),e($r,{children:t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"374",height:"374",viewBox:"0 0 374 374",fill:"none",children:[e("path",{opacity:"0.5",d:"M186.963 373.927C290.22 373.927 373.927 290.22 373.927 186.963C373.927 83.7063 290.22 0 186.963 0C83.7063 0 0 83.7063 0 186.963C0 290.22 83.7063 373.927 186.963 373.927Z",fill:"url(#paint0_radial_164_65837)"}),e("defs",{children:t("radialGradient",{id:"paint0_radial_164_65837",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(166.792 184.246) scale(186.963)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),e("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),e("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),e("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),e("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),e("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),e("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),e("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),e("stop",{offset:"1",stopColor:"#7C3BFF"})]})})]})}),e($r,{children:t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"257",height:"257",viewBox:"0 0 257 257",fill:"none",children:[e("path",{opacity:"0.7",d:"M128.193 256.387C198.992 256.387 256.387 198.992 256.387 128.193C256.387 57.3941 198.992 0 128.193 0C57.3941 0 0 57.3941 0 128.193C0 198.992 57.3941 256.387 128.193 256.387Z",fill:"url(#paint0_radial_164_65838)"}),e("defs",{children:t("radialGradient",{id:"paint0_radial_164_65838",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(113.263 126.219) scale(128.08)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),e("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),e("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),e("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),e("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),e("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),e("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),e("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),e("stop",{offset:"1",stopColor:"#7C3BFF"})]})})]})}),e($r,{children:e(te,{size:112})})]}),xr=o.div`
76
- width: ${({$size:e})=>e}px;
77
- height: ${({$size:e})=>e}px;
78
- border-radius: 100%;
79
- background: ${({$color:e})=>e};
80
- display: flex;
81
- align-items: center;
82
- justify-content: center;
83
- `,Sr=({scale:t=1,icon:n})=>{const o=i();return e(xr,{$size:73*t,$color:"rgba(106, 42, 255, 0.10)",children:e(xr,{$size:71*t,$color:"rgba(106, 42, 255, 0.20)",children:e(xr,{$size:65*t,$color:"rgba(106, 42, 255, 0.40)",children:e(xr,{$size:56*t,$color:"rgba(106, 42, 255, 0.60)",children:e(xr,{$size:39*t,$color:o.v2.colors.purple[500],children:e(n,{size:32*t,fill:o.v2.colors.white[500]})})})})})})},wr=o.div`
84
- flex: 1;
85
- align-self: stretch;
86
- display: flex;
87
- flex-direction: column;
88
- gap: ${({$gap:e=24})=>e}px;
89
- overflow-x: scroll;
90
-
91
- max-height: calc(100vh - 24px - ${({$heightOffset:e})=>e||0}px);
92
- padding: 12px;
93
- `,Er=o.div`
94
- position: relative;
95
-
96
- // inherit all the properties of the parent (PageContent)
97
- flex: inherit;
98
- align-self: inherit;
99
- display: inherit;
100
- flex-direction: inherit;
101
- gap: inherit;
102
- overflow-x: inherit;
103
- `,Cr=o.div`
104
- padding: ${({$padding:e})=>e||"12px"};
105
- `,Tr=o.div`
106
- display: flex;
107
- flex-direction: row;
108
- flex-wrap: ${({$wrap:e="unset"})=>e};
109
- align-items: ${({$alignItems:e="center"})=>e};
110
- justify-content: ${({$justifyContent:e="unset"})=>e};
111
- gap: ${({$gap:e=2})=>e}px;
112
- width: ${({$width:e})=>e||"unset"};
113
- height: ${({$height:e})=>e||"unset"};
114
- margin: ${({$margin:e="unset"})=>e};
115
- padding: ${({$padding:e="unset"})=>e};
116
- `,Ar=o.div`
117
- display: flex;
118
- flex-direction: column;
119
- flex-wrap: ${({$wrap:e="unset"})=>e};
120
- align-items: ${({$alignItems:e="unset"})=>e};
121
- justify-content: ${({$justifyContent:e="unset"})=>e};
122
- gap: ${({$gap:e=2})=>e}px;
123
- width: ${({$width:e})=>e||"unset"};
124
- height: ${({$height:e})=>e||"unset"};
125
- margin: ${({$margin:e="unset"})=>e};
126
- padding: ${({$padding:e="unset"})=>e};
127
- `,kr=o(Ar)`
128
- width: ${({$width:e})=>e||"100%"};
129
- height: ${({$height:e})=>e||"unset"};
130
- padding: ${({$padding:e})=>e||"unset"};
131
- align-items: center;
132
- justify-content: center;
133
- `,Dr=o.div`
134
- display: flex;
135
- flex-direction: column;
136
- padding: 12px;
137
- overflow-y: scroll;
138
- `,Ir=o.div`
139
- position: ${({$relativeToParent:e})=>e?"absolute":"fixed"};
140
- top: 0;
141
- left: 0;
142
- right: 0;
143
- bottom: 0;
144
- // Sits at the modal/drawer layer; rendered before the surface in JSX so the surface
145
- // visually stacks above it via DOM order while sharing the same z-index level.
146
- z-index: ${({theme:e})=>e.v2.zIndex.modal};
147
- background: rgba(0, 0, 0, 0.6);
148
- backdrop-filter: blur(2px);
149
- `,Nr=o.div`
150
- width: 800px;
151
- min-height: ${({$minHeight:e})=>e||"unset"};
152
- height: ${({$isNotModal:e})=>e?"fit-content":"calc(100vh - 350px)"};
153
- margin: ${({$isNotModal:e})=>e?"64px 0 0 0":"64px 7vw 32px 7vw"};
154
- padding: 0 2px;
155
- overflow-y: scroll;
156
- `,Rr=o(Ar)`
157
- max-width: ${({$maxWidth:e})=>e||"unset"};
158
- width: 100%;
159
- `,Or=o(Tr)`
160
- gap: 16px;
161
- padding: 16px;
162
- `,_r=o.div`
163
- width: 100%;
164
- max-height: ${({$maxHeight:e})=>e||"unset"};
165
- overflow-y: auto;
166
- `,Lr=a`
167
- 0% {
168
- background-position: 0% 50%;
169
- }
170
- 100% {
171
- background-position: 100% 50%;
172
- }
173
- `,Pr=o(rr)`
174
- background: ${({$titleColor:e,$gradientColor:t})=>`linear-gradient(45deg, ${e} 0%, ${e} 40%, ${t} 50%, ${e} 60%, ${e} 100%)`};
175
- background-size: 250% 100%; /* Expand background to allow movement */
176
- background-clip: text;
177
- color: transparent;
178
- animation: ${Lr} 1s reverse linear infinite;
179
- `,Fr=e=>{const t=Math.max(0,Date.now()-e),n=Math.floor(t/1e3),o=Math.floor(n/60),r=n%60;return`${String(o).padStart(2,"0")}:${String(r).padStart(2,"0")}`},Mr=({icon:n,title:o,titleColor:r,titleSize:a=Zo.S,subTitle:s,subTitleColor:l,subTitleSize:c=Zo.XXXS,startedAt:d,withGradient:p,gradientColor:u,withSpinner:h,withSpinnerOld:g,scaleSpinnerOld:m=1,percentage:f,withVisual:b,visualIcon:y=Ye})=>{const $=i(),[v,x]=Ft(()=>d?Fr(d):"");Mt(()=>{if(!d)return;x(Fr(d));const e=setInterval(()=>x(Fr(d)),1e3);return()=>clearInterval(e)},[d]);const S=r||$.v2.colors.white[500],w=l||$.v2.colors.silver[200],E=u||$.v2.colors.black[500];return t(Ar,{$gap:16,$alignItems:"center",children:[b?e(mr,{scale:1.7,icon:y}):h?e(lr,{percentage:f}):g?e(hr,{scale:m}):null,(o||s||d||n)&&t(Ar,{$gap:8,$alignItems:"center",children:[t(Tr,{$gap:4,children:[n&&e(n,{}),p?e(Pr,{align:"center",size:a,$titleColor:S,$gradientColor:E,children:o}):e(rr,{align:"center",size:a,color:S,children:o})]}),s?e(rr,{align:"center",size:c,color:w,children:s}):null,v?e(rr,{align:"center",size:c,color:S,children:v}):null]})]})},zr=(e,t)=>({[Nn.Default]:n=>te({fill:qo(t,e,"300"),...n}),[Nn.Info]:n=>ot({fill:qo(t,e,"400"),...n}),[Nn.Error]:n=>nt({fill:qo(t,e,"500"),...n}),[Nn.Warning]:n=>tt({fill:qo(t,e,"500"),...n}),[Nn.Success]:n=>et({fill:qo(t,e,"500"),...n}),[On.Loading]:e=>Mr({withSpinnerOld:!0,...e}),[_n.Disabled]:n=>Ze({fill:qo(t,e,"400"),...n}),[_n.Unknown]:n=>Qe({fill:qo(t,e,"300"),...n})}[e]),Ur=e=>{switch(e){case Gn.Success:return Nn.Success;case Gn.Error:case Gn.Failure:return Nn.Error;case Gn.Notice:return Nn.Warning;case Gn.Unsupported:case Gn.Unknown:return Nn.Info;case Gn.Irrelevant:case Gn.Disabled:return On.Disabled;case Gn.Waiting:return On.Loading;case Gn.Pending:default:return Nn.Default}},Br=(e,t)=>{const n=t.find(([t,n])=>e>=t&&(null===n||e<=n));return n?.[2]||null},jr={redis:b,mysql:v,postgresql:y,postgres:y,kafka:f,elasticsearch:$e,clickhouse:Te,oracle:Y,aws:rt},Hr={sts:ft,dynamodb:mt,s3:G,sqs:gt,sns:ht,lambda:ut,kinesis:pt,ec2:dt,apigateway:ct,apigatewayv2:ct,bedrock:lt,bedrockruntime:lt,eventbridge:st,sfn:at,stepfunctions:at,secretsmanager:it,cloudwatch:Ce},Wr=e=>{const t=e.attributes,n=t["db.system"];if(n){const e=jr[n.toLowerCase()];if(e)return e}const o=t["messaging.system"];if(o){const e=jr[o.toLowerCase()];if(e)return e}const r=t["rpc.system"];if(r?.toLowerCase().includes("aws")){const e=t["rpc.service"]?.toLowerCase();if(e){const t=Hr[e];if(t)return t}return rt}const i=e.serviceName.toLowerCase();for(const[e,t]of Object.entries(jr))if(i.includes(e))return t;return Ue},Gr=e=>{if(!e)return{namespace:"",name:"",kind:""};if("id"in e&&"object"==typeof e.id)return{namespace:e.id.namespace,name:e.id.name,kind:e.id.kind};const{namespace:t,name:n,kind:o}=e;return{namespace:t,name:n,kind:o}};function Xr(e,t){if(!e)return t;if("object"==typeof e)return e;try{return JSON.parse(e)}catch(e){return t}}const Kr=(e,t)=>{const n=[],o=JSON.parse(JSON.stringify(e));for(const e of o){const o=Xr(t.fields,{}),r=e.items.findIndex(e=>e.type===t.destinationType.type);-1!==r&&n.push(...e.items[r].fields.map(e=>({...e,initialValue:o[e.name]})))}return n},Vr=(e,t)=>{const n=e=>e?.some(({healthy:e})=>e.status!==Nn.Success);return e?.length?e.some(({instrumentationInstances:e})=>n(e)):n(t)??!1},Jr=e=>Array.isArray(e)?!e?.length:"object"==typeof e?!Object.keys(e||{}).length:[void 0,null,""].includes(e),qr=e=>{if(!e)return!1;if(e.length>63)return!1;return/^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$/.test(e)},Yr=(e,t=0)=>{const n=(new Date).getTime();return new Date(e).getTime()-n<=t},Qr="PodManifestInjectionOptional",Zr="AgentNotInjectedAsExpected",ei=e=>e?.agentInjected||e?.agentInjectedStatus?.reasonEnum===Qr||e?.agentInjectedStatus?.reasonEnum===Zr,ti=e=>{const t=String(e).trim().toLowerCase();return["true","false","1","0"].includes(t)},ni=(e,t=0)=>(new Date).getTime()-new Date(e).getTime()>=t,oi=/^(\d+\.)?(\d+\.)?(\*|\d+)$/,ri=e=>oi.test(e),ii=e=>e?e.replace(/([a-z0-9])([A-Z])/g,"$1 $2"):"",ai=e=>e?.map(({status:e,type:t,reason:n,message:o})=>({status:e?.toLowerCase(),type:ii(t),reason:n?ii(n):"",message:o}))||[],si=(e,t)=>{const n=Xr(e.fields,{});return t.length?t.map(e=>({key:e.name,name:e.displayName||e.name,value:n[e.name]??null})).filter(e=>null!==e.value):Object.entries(n).map(([e,t])=>({key:e,name:e,value:t}))},li=e=>e?Object.keys(e).filter(t=>e[t]).map(e=>ao[e]):[],ci=e=>e?Object.keys(e).filter(t=>e[t].supported).map(e=>ao[e]):[],di=e=>{let t=e.replace(/[^\d.]/g,"");const n=t.indexOf(".");return-1!==n&&(t=t.slice(0,n+1)+t.slice(n+1).replace(/\./g,"")),t},pi=e=>e.replace(/[^\d]/g,""),ui=e=>{const t=String(e).trim().toLowerCase();return"true"===t||"1"===t},hi=e=>{let t="";try{const n=JSON.parse(e);t=Array.isArray(n)?n.map(e=>"object"==typeof e&&null!==e?`${e.key}: ${e.value}`:e).join(", "):"object"==typeof n&&null!==n?Object.entries(n).map(([e,t])=>`${e}: ${t}`).join(", "):e}catch(n){t=e}return t},gi=e=>{const t=e.fields.reduce((e,{key:t,value:n})=>{const o=(e=>{if(null!=e){if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return String(e);try{return JSON.stringify(e)}catch{return}}})(n);return void 0!==o&&e.push({key:t,value:o}),e},[]);return{...e,fields:t}},mi=e=>{if("object"!=typeof e)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(n=>{const o=e[n];if(Array.isArray(o)){const e=o.filter(e=>null!=e&&""!==e);e.length>0&&(t[n]=e.map(e=>mi(e)))}else if("object"==typeof o&&null!==o){const e=mi(o);Object.keys(e).length>0&&(t[n]=e)}else[void 0,null,""].includes(o)||(t[n]=o)}),t},fi=(e,t=2)=>JSON.stringify(e||{},null,t),bi=async(e=1e3)=>new Promise(t=>setTimeout(t,e)),yi=e=>Object.entries(e).reduce((e,[t,n])=>(e[t]="string"==typeof n?n:JSON.stringify(n),e),{}),$i=e=>{let t=e.toString().replace("v","").split("-")[0];t=t.match(/[\d.]+/)?.[0]||"";const n=t.split(".");return 1e4*parseInt(n[0]||"0",10)+parseInt(n[1]||"0",10)},vi=o.div`
180
- /* Portal: viewport coords (usePopup positionMode viewport). Non-portal: offset-parent coords, absolute. */
181
- position: ${({$asPortal:e})=>e?"fixed":"absolute"};
182
- ${({$top:e})=>void 0!==e&&`top: ${e}px;`}
183
- ${({$bottom:e})=>void 0!==e&&`bottom: ${e}px;`}
184
- ${({$left:e})=>void 0!==e&&`left: ${e}px;`}
185
- ${({$right:e})=>void 0!==e&&`right: ${e}px;`}
186
- z-index: 9999;
187
-
188
- background-color: ${({theme:e})=>e.colors.info};
189
- border: 1px solid ${({theme:e})=>e.colors.border};
190
- border-radius: ${({$borderRadius:e})=>void 0!==e?e:"24px"};
191
- max-width: ${({$maxWidth:e})=>void 0!==e?e:"unset"};
192
- width: ${({$width:e})=>void 0!==e?e:"unset"};
193
-
194
- ${({$asPortal:e,$withPointerEvents:t})=>e&&!t&&"pointer-events: none;"}
195
- `,xi=o.div`
196
- padding: ${({$padding:e})=>void 0!==e?e:"12px"};
197
- border-bottom: 1px solid ${({theme:e})=>e.colors.border};
198
- `,Si=o.div`
199
- padding: ${({$padding:e})=>void 0!==e?e:"12px"};
200
- `,wi=o.div`
201
- padding: ${({$padding:e})=>void 0!==e?e:"12px"};
202
- border-top: 1px solid ${({theme:e})=>e.colors.border};
203
- `,Ei=Lt(({isOpen:n,asPortal:o,...r},i)=>{const a=zt(()=>{const{children:n,top:a,bottom:s,left:l,right:c,borderRadius:d,padding:p,maxWidth:u,width:h,header:g,footer:m,withPointerEvents:f,...b}=r;return t(vi,{ref:i,$top:a,$bottom:s,$left:l,$right:c,$borderRadius:d,$padding:p,$maxWidth:u,$width:h,$asPortal:o,$withPointerEvents:f,...b,children:[g&&e(xi,{$padding:p,children:g}),e(Si,{$padding:p,children:n}),m&&e(wi,{$padding:p,children:m})]})},[i,r,o]);return n?o?Qt.createPortal(a,document.body):a:null});Ei.displayName=Ei.name;const Ci=[{type:hn.K8sAttributes,icon:Eo(hn.K8sAttributes),label:"Kubernetes Attributes",description:"Add dynamic k8s resource attributes to your data.",allowedSignals:[to.Traces,to.Metrics,to.Logs,to.Profiles],docsEndpoint:"/pipeline/actions/attributes/k8sattributes",docsDescription:"This action adds kubernetes related resource attributes to spans, metrics data points and log records."},{type:hn.AddClusterInfo,icon:Eo(hn.AddClusterInfo),label:"Add Cluster Info",description:"Add static cluster-scoped attributes to your data.",allowedSignals:[to.Traces,to.Metrics,to.Logs,to.Profiles],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:hn.DeleteAttributes,icon:Eo(hn.DeleteAttributes),label:"Delete Attribute",description:"Delete attributes from logs, metrics, and traces.",allowedSignals:[to.Traces,to.Metrics,to.Logs,to.Profiles],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:hn.RenameAttributes,icon:Eo(hn.RenameAttributes),label:"Rename Attribute",description:"Rename attributes in logs, metrics, and traces.",allowedSignals:[to.Traces,to.Metrics,to.Logs,to.Profiles],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:hn.PiiMasking,icon:Eo(hn.PiiMasking),label:"PII Masking",description:"Mask PII data in your traces.",allowedSignals:[to.Traces,to.Profiles],docsEndpoint:"/pipeline/actions/attributes/piimasking",docsDescription:"This action processes a list of PII categories to be masked from the traces."},{type:hn.URLTemplatization,icon:Eo(hn.URLTemplatization),label:"URL Templatization",description:"Replace dynamic URL path segments with named placeholders to reduce span cardinality.",allowedSignals:[to.Traces],docsEndpoint:"/pipeline/actions/attributes/urltemplatization",docsDescription:"Normalizes HTTP URL paths by replacing dynamic segments (IDs, UUIDs, dates) with named placeholders (e.g. /user/1234 → /user/{id}). Reduces cardinality of http.route and span names, improving usability in telemetry backends.",minVersion:$i("v1.21.0")}],Ti=[{type:hn.ErrorSampler,icon:Eo(un.Samplers),label:"Error Sampler",description:"Sample errors based on percentage.",allowedSignals:[to.Traces,to.Profiles],docsEndpoint:"/pipeline/actions/sampling/errorsampler",docsDescription:"This action is a Global Action that supports error sampling by filtering out non-error traces."},{type:hn.LatencySampler,icon:Eo(un.Samplers),label:"Latency Sampler",description:"Add latency to your traces.",allowedSignals:[to.Traces,to.Profiles],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:hn.ProbabilisticSampler,icon:Eo(un.Samplers),label:"Probabilistic Sampler",description:"Sample traces based on percentage.",allowedSignals:[to.Traces,to.Profiles],docsEndpoint:"/pipeline/actions/sampling/probabilisticsampler",docsDescription:"This action supports probabilistic sampling based on a configured sampling percentage applied to the TraceID."},{type:hn.ServiceNameSampler,icon:Eo(un.Samplers),label:"Service Name Sampler",description:"Sample traces based on the presence of specified services within a trace.",allowedSignals:[to.Traces,to.Profiles],docsEndpoint:"/pipeline/actions/sampling/servicenamesampler",docsDescription:"This action supports service name sampling based on the presence of specified services within a trace."},{type:hn.SpanAttributeSampler,icon:Eo(un.Samplers),label:"Span Attributes Sampler",description:"Sample traces based on the presence or value of specific attributes within a trace.",allowedSignals:[to.Traces,to.Profiles],docsEndpoint:"/pipeline/actions/sampling/spanattributesampler",docsDescription:"This action supports service name sampling based on the presence or value of specific attributes within a trace."}],Ai=[{label:"Attributes",icon:Eo(un.Attributes),items:Ci},{label:"Samplers",icon:Eo(un.Samplers),items:Ti}];var ki;!function(e){e.ALL="all",e.UNSAVED="unsaved",e.EXISTS="exists",e.DETECTED="detected",e.SELF_HOSTED="self-hosted",e.MANAGED="managed"}(ki||(ki={}));const Di={[ki.ALL]:{TITLE:"All",DESCRIPTION:"All destinations"},[ki.UNSAVED]:{TITLE:"Selected",DESCRIPTION:"These are destinations that you have not yet saved."},[ki.EXISTS]:{TITLE:"Already configured",DESCRIPTION:"These are destinations that you have already configured in other data-streams and can reuse them."},[ki.DETECTED]:{TITLE:"Suggested",DESCRIPTION:"Odigos found these destinations in your cluster and pre-filled their details. Review and enable them to start sending data."},[ki.SELF_HOSTED]:{TITLE:"Self hosted",DESCRIPTION:"Full control and customization for advanced application monitoring."},[ki.MANAGED]:{TITLE:"Managed",DESCRIPTION:"Effortless monitoring with scalable performance management."}},Ii=[{type:Xn.CodeAttributes,icon:Bo(Xn.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:[Cn.Go,Cn.Python]},{type:Xn.CustomInstrumentation,icon:Bo(Xn.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:[Cn.Go,Cn.Java]},{type:Xn.HeadersCollection,icon:Bo(Xn.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:[Cn.Go,Cn.Java,Cn.JavaScript]},{type:Xn.PayloadCollection,icon:Bo(Xn.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:[Cn.Go,Cn.JavaScript]}],Ni="Cancel",Ri="Save",Oi="Edit rule",_i="Edit auto rule",Li="Create rule",Pi="Delete rule",Fi="Save",Mi="Create your first rule",zi="No Rules Exist",Ui="No Results",Bi=e=>`No rules match the search term "${e}"`,ji="Rule name",Hi="Rule type",Wi="Select the type of condition that makes a trace highly relevant.",Gi="Rule Enabled",Xi="Rule Disabled",Ki="Enabled",Vi="Disabled",Ji="Note",qi="HTTP route",Yi="Method",Qi="Keep Percentage",Zi="Keep traces with duration larger than",ea="Keep traces with errors",ta="Keep at least this percentage of matching traces. A higher rate from another matching rule may apply instead.",na="Keep at most this percentage of matching traces. A lower rate from another matching rule may apply instead.",oa="Custom percentage",ra="Disabled rule",ia="Sample",aa="Keep all",sa="Drop all",la="Operation type",ca="HTTP route prefix",da="Templated path",pa="Templated path prefix",ua="Kafka topic",ha="Custom duration (ms)",ga="No preview available",ma="Server address",fa="Drop at most this percentage of matching traces",ba="Unnamed rule",ya="Sampling Preview",$a="Source Scope",va="Unknown source",xa="Operation",Sa="Duration",wa="Errors",Ea="Keep Percentage",Ca="Define which sources this rule applies to. You can target specific services, namespaces, or apply the rule to the entire cluster.",Ta="Define which operations this rule applies to. You can target specific endpoints or requests, or apply the rule to all operations in the selected services.",Aa="Define a duration threshold for this rule. Traces with a duration longer than the specified value will be considered important and retained.",ka="Retain traces with errors from the selected services and operations.",Da="Use Keep All to retain every matching trace, or Sample when keeping everything is too expensive. 100% means keep all",Ia="Use Drop All to discard every matching trace, or Sample to keep some examples. 0% means drop all.",Na={highlyRelevant:Da,noisy:Ia,costReduction:void 0},Ra="Type rule name",Oa="Add note here...",_a="Type here",La="Search source name",Pa="e.g. collector.my.vendor.com",Fa="Optional notes (not used by the system). Add any context or details for this sampling rule.",Ma="Rule will apply to all sources in the cluster",za="If multiple source scopes are set, they must all match simultaneously.",Ua="All sources",Ba="-",ja="All",Ha="All operations",Wa="HTTP server endpoint",Ga="HTTP client endpoint",Xa="Kafka consumer",Ka="Kafka producer",Va="Sampling Rules",Ja='Control how traces are categorized based on "Importance" and potential value, for fine grain control of what is kept and what is dropped.',qa="Refresh",Ya="Create rule",Qa="Sampling docs",Za="75vw",es="Delete rule?",ts="Are you sure you want to delete this sampling rule?",ns="Delete",os="Cancel",rs="Kubernetes Health Probes",is="Keep All Error Traces",as="Drop Traces Cluster-Wide",ss="A rule with the same matching conditions already exists.",ls="Create 'Noisy Operation Kubernetes Health Probes' rule",cs="Edit 'Noisy Operation Kubernetes Health Probes' rule",ds="Automatically detect and sample health probe traces across the cluster.",ps="Create 'Highly Relevant Operations' rule",us="Edit 'Highly Relevant Operations' rule",hs="Automatically keep all error traces across the entire cluster.",gs="Create 'Cost Reduction' rule",ms="Edit 'Cost Reduction' rule",fs="Automatically drop a percentage of traces across the entire cluster.",bs="Skip setup",ys="Start setup",$s="Next",vs="Go to Sampling",xs="Read more",Ss="Welcome to Sampling",ws="Cut costs without losing what matters",Es="Odigos sampling works in three stages:",Cs="Filter noisy traffic",Ts="Remove non-actionable traces like health checks.",As="Guarantee highly relevance operations",ks="Keep traces with errors, high latency, or mission-critical endpoints/services.",Ds="Reduce cost",Is="Sample routine traffic using percentages.",Ns="Sampling does not drop individual spans - it keeps or drops the entire trace.",Rs="Filter noisy operations",Os="Cut traces with little or no observability value (health-checks, metric scarping, etc)",_s="Odigos filters these efficiently, dropping them early with almost no resource cost.\n\nSampling happens at request start, so only root span attributes available at that moment can be used. Later insights about the trace (errors, latency) - aren’t available.",Ls="Preset Rules",Ps="Kubernetes Health Probes",Fs="Automatically ignore health checks",Ms="You can review, adjust, and add additional custom rules later.",zs="Choose your sampling strategy",Us="Pick the approach that best fits your balance of cost vs data-completeness",Bs="Keep List",js="Budget Friendly",Hs="Define which traces must be kept, while all others are sampled by default to minimize cost.",Ws="Cost-oriented - keeps only what you explicitly select.",Gs="Best for very large clusters with high volumes of traces and high costs.",Xs="Higher risk of missing important traces without ongoing review.",Ks="Drop List",Vs="Safe Choice",Js="Define which traces must be aggressively dropped, while all others are kept by default.",qs="Preserves most data unless explicitly filtered.",Ys="Safer by default - gaps in rules or system changes increase cost rather than risk losing important traces.",Qs="Advanced",Zs="Maximum Flexibility",el="Full control over all sampling rules and categories.\n\nBest for advanced users who want complete flexibility.",tl="'Keep List' profile",nl="Protect important traces",ol="Start by setting the default sampling rate for all traces.\nThen define rules to exclude highly relevant traces so they are guaranteed to be kept\n\nCommon use-cases include:",rl="Traces with errors",il="Slow requests (duration above threshold)",al="Mission-Critical endpoints or services",sl="Services under test or evaluation",ll="New deployments",cl="You can review, adjust, and add rules once onboarding is complete.",dl="Common Rules",pl="Preset Rules",ul="Error collection - entire cluster",hl="Keep all traces with errors",gl="Ambient sampling percentage",ml="'Drop List' profile",fl="Reduce high-volume traffic",bl="Start by keeping all traces by default. Then define rules to drop high-volume or low-value traces to reduce overall volume and cost.\n\nIn many systems, a small number of endpoints generate most of the trace volume.\nTargeting these high-volume sources can significantly reduce overall data.",yl="Advanced Configuration",$l="Configure sampling rules",vl="Advanced mode allows you to configure all sampling categories:",xl="Noise Filtering - remove non-actionable traces",Sl="Highly Relevance - guarantee important traces are kept",wl='Cost Control - drop traces for "Normal" operations',El="Rules can target:",Cl="Services",Tl="HTTP Endpoints",Al="DB Operations",kl="Errors",Dl="Latency and more...",Il="Sampling configured successfully!",Nl="Your sampling configuration is ready.\nYou can add and adjust rules anytime in Sampling Rules space.",Rl="Odigos will now:",Ol="Filter noisy operations",_l="Guarantee important traces",Ll="Reduce cost using controlled sampling",Pl="Recommended",Fl={noisy:"Rules that reduce noise from high-volume, low-value operations using Head Sampling.",highlyRelevant:"Add a rule to identify highly relevant operations. Traces with errors, long duration, or from critical endpoints and key workflows will be retained so important transactions are always available for analysis.",costReduction:"Rules that optimize costs by sampling less critical data using Tail Sampling."},Ml={noisy:ls,highlyRelevant:ps,costReduction:gs},zl={noisy:cs,highlyRelevant:us,costReduction:ms},Ul={noisy:"Noisy Operation",highlyRelevant:"Highly Relevant",costReduction:"Cost Reduction"},Bl=[{id:to.Logs,value:"Logs"},{id:to.Metrics,value:"Metrics"},{id:to.Traces,value:"Traces"},{id:to.Profiles,value:"Profiles"}],jl={PID:"process.pid",VPID:"process.vpid"},Hl={[Cn.Go]:"Go",[Cn.Java]:"Java",[Cn.JavaScript]:"Node.js",[Cn.Python]:"Python",[Cn.DotNet]:".NET",[Cn.CSharp]:"C#",[Cn.CPlusPlus]:"C++",[Cn.Php]:"PHP",[Cn.Ruby]:"Ruby",[Cn.Rust]:"Rust",[Cn.Swift]:"Swift",[Cn.Elixir]:"Elixir",[Cn.MySql]:"MySQL",[Cn.Nginx]:"Nginx",[Cn.Postgres]:"PostgreSQL",[Cn.Redis]:"Redis",[Cn.Kafka]:"Kafka",[Cn.Ignored]:"Ignored",[Cn.Unknown]:"Unknown",[Cn.Processing]:"Processing",[Cn.NoContainers]:"No Containers",[Cn.NoRunningPods]:"No Running Pods"},Wl=[{id:Cn.Go,label:Hl[Cn.Go],icon:ko(Cn.Go)},{id:Cn.Java,label:Hl[Cn.Java],icon:ko(Cn.Java)},{id:Cn.JavaScript,label:Hl[Cn.JavaScript],icon:ko(Cn.JavaScript)},{id:Cn.Python,label:Hl[Cn.Python],icon:ko(Cn.Python)},{id:Cn.Php,label:Hl[Cn.Php],icon:ko(Cn.Php)},{id:Cn.Ruby,label:Hl[Cn.Ruby],icon:ko(Cn.Ruby)},{id:Cn.Rust,label:Hl[Cn.Rust],icon:ko(Cn.Rust)},{id:Cn.DotNet,label:Hl[Cn.DotNet],icon:ko(Cn.DotNet)},{id:Cn.CSharp,label:Hl[Cn.CSharp],icon:ko(Cn.CSharp)},{id:Cn.CPlusPlus,label:Hl[Cn.CPlusPlus],icon:ko(Cn.CPlusPlus)},{id:Cn.Swift,label:Hl[Cn.Swift],icon:ko(Cn.Swift)},{id:Cn.Elixir,label:Hl[Cn.Elixir],icon:ko(Cn.Elixir)}],Gl={id:Wn.OpentelemetryEbpfInstrumentation,label:Wn.OpentelemetryEbpfInstrumentation,icon:q},Xl={[Cn.Go]:{community:[{id:Wn.GolangCommunity,label:Wn.GolangCommunity,icon:ko(Cn.Go)},Gl],enterprise:[{id:Wn.GolangEnterprise,label:Wn.GolangEnterprise,icon:ko(Cn.Go)}]},[Cn.JavaScript]:{community:[{id:Wn.NodejsCommunity,label:Wn.NodejsCommunity,icon:ko(Cn.JavaScript)},Gl],enterprise:[{id:Wn.NodejsEnterprise,label:Wn.NodejsEnterprise,icon:ko(Cn.JavaScript)}]},[Cn.Python]:{community:[{id:Wn.PythonCommunity,label:Wn.PythonCommunity,icon:ko(Cn.Python)},Gl],enterprise:[{id:Wn.PythonEnterprise,label:Wn.PythonEnterprise,icon:ko(Cn.Python)}]},[Cn.Java]:{community:[{id:Wn.JavaCommunity,label:Wn.JavaCommunity,icon:ko(Cn.Java)},Gl],enterprise:[{id:Wn.JavaEnterprise,label:Wn.JavaEnterprise,icon:ko(Cn.Java)},{id:Wn.JavaEbpfInstrumentations,label:Wn.JavaEbpfInstrumentations,icon:ko(Cn.Java)}]},[Cn.DotNet]:{community:[{id:Wn.DotNetCommunity,label:Wn.DotNetCommunity,icon:ko(Cn.DotNet)},Gl],enterprise:[{id:Wn.DotNetEnterprise,label:Wn.DotNetEnterprise,icon:ko(Cn.DotNet)}]},[Cn.Ruby]:{community:[{id:Wn.RubyCommunity,label:Wn.RubyCommunity,icon:ko(Cn.Ruby)},Gl],enterprise:[{id:Wn.RubyEnterprise,label:Wn.RubyEnterprise,icon:ko(Cn.Ruby)}]},[Cn.Php]:{community:[{id:Wn.PhpCommunity,label:Wn.PhpCommunity,icon:ko(Cn.Php)},Gl],enterprise:[]},[Cn.CSharp]:{community:[],enterprise:[{id:Wn.CPlusPlusEnterprise,label:Wn.CPlusPlusEnterprise,icon:ko(Cn.CSharp)}]},[Cn.MySql]:{community:[],enterprise:[{id:Wn.MySqlEnterprise,label:Wn.MySqlEnterprise,icon:ko(Cn.MySql)}]},[Cn.CPlusPlus]:{community:[Gl],enterprise:[]},[Cn.Rust]:{community:[Gl],enterprise:[]},[Cn.Swift]:{community:[Gl],enterprise:[]},[Cn.Elixir]:{community:[Gl],enterprise:[]},[Cn.Nginx]:{community:[Gl],enterprise:[]},[Cn.Postgres]:{community:[Gl],enterprise:[]},[Cn.Redis]:{community:[Gl],enterprise:[]},[Cn.Kafka]:{community:[Gl],enterprise:[]},[Cn.Ignored]:{community:[],enterprise:[]},[Cn.Unknown]:{community:[],enterprise:[]},[Cn.Processing]:{community:[],enterprise:[]},[Cn.NoContainers]:{community:[],enterprise:[]},[Cn.NoRunningPods]:{community:[],enterprise:[]}},Kl=6048e5,Vl=_t(e=>({activeNodeType:null,activeNodeId:null,setActiveNodeType:t=>e({activeNodeType:t}),setActiveNodeId:t=>e({activeNodeId:t})})),Jl=_t()(Gt(e=>({darkMode:!0,setDarkMode:t=>e({darkMode:t})}),{name:mo.DARK_MODE,storage:"undefined"!=typeof window?Xt(()=>localStorage):void 0})),ql={dataStreamsLoading:!1,dataStreams:[],selectedStreamName:uo},Yl=_t(e=>({...ql,setDataStreamsLoading:t=>e({dataStreamsLoading:t}),setDataStreams:t=>e({dataStreams:t}),addDataStreams:t=>e(e=>{const n=[...e.dataStreams,...t].map(e=>[e.name,e]);return{dataStreams:Array.from(new Map(n).values())}}),removeDataStreams:t=>e(e=>({dataStreams:e.dataStreams.filter(e=>!t.find(t=>t.name===e.name))})),setSelectedStreamName:t=>e({selectedStreamName:t}),resetDataStreamStore:()=>e(ql)})),Ql=_t(e=>({drawerType:null,drawerEntityId:null,setDrawerType:t=>e({drawerType:t}),setDrawerEntityId:t=>e({drawerEntityId:t})})),Zl=e=>[...e].sort((e,t)=>{const n=e.id.namespace.localeCompare(t.id.namespace);return 0!==n?n:e.id.name.localeCompare(t.id.name)}),ec=_t(e=>({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[],setEntitiesLoading:(t,n)=>{const o=t===An.Namespace?"namespacesLoading":t===An.Source?"sourcesLoading":t===An.Destination?"destinationsLoading":t===An.Action?"actionsLoading":t===An.InstrumentationRule?"instrumentationRulesLoading":"NONE";"NONE"!==o&&e({[o]:n})},setEntities:(t,n)=>{const o=t===An.Namespace?"namespaces":t===An.Source?"sources":t===An.Destination?"destinations":t===An.Action?"actions":t===An.InstrumentationRule?"instrumentationRules":"NONE";if("NONE"===o)return;const r="sources"===o?Zl(n):n;e({[o]:r})},addEntities:(t,n)=>{const o=t===An.Namespace?"namespaces":t===An.Source?"sources":t===An.Destination?"destinations":t===An.Action?"actions":t===An.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==o&&e(e=>{const t=[...e[o]],r=new Map;t.forEach((e,t)=>{r.set(Mo(e),t)}),n.forEach(e=>{const n=Mo(e),o=r.get(n);void 0!==o?t[o]={...t[o],...e}:(r.set(n,t.length),t.push(e))});const i="sources"===o?Zl(t):t;return{[o]:i}})},removeEntities:(t,n)=>{const o=t===An.Namespace?"namespaces":t===An.Source?"sources":t===An.Destination?"destinations":t===An.Action?"actions":t===An.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==o&&e(e=>{const t=new Set(n.map(e=>Fo(e))),r=e[o].filter(e=>!t.has(Mo(e)));return{[o]:r}})},resetEntityStore:()=>{e({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[]})}})),tc=()=>({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],podsAgentInjectionStatus:[],onlyErrors:!1}),nc=_t(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}),podsAgentInjectionStatus:[],setPodsAgentInjectionStatus:t=>e({podsAgentInjectionStatus:t}),onlyErrors:!1,setOnlyErrors:t=>e({onlyErrors:t}),setAll:t=>e(t),clearAll:()=>e({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],podsAgentInjectionStatus:[],onlyErrors:!1}),getEmptyState:tc})),oc=_t(e=>({currentModal:"",setCurrentModal:t=>e({currentModal:t})})),rc=_t((e,t)=>({notifications:[],addNotification:n=>{const o=new Date,r=`${o.getTime().toString()}${n.target?`#${n.target}`:""}`,{notifications:i}=t();i.some(e=>e.type===n.type&&e.title===n.title&&e.message===n.message&&!e.dismissed)||e(e=>({notifications:[{...n,id:r,time:o.toISOString(),dismissed:!1,seen:!1},...e.notifications]}))},markAsDismissed:t=>{e(e=>{const n=e.notifications.findIndex(e=>e.id===t);return-1!==n&&(e.notifications[n].dismissed=!0),{notifications:e.notifications}})},markAsSeen:t=>{e(e=>{const n=e.notifications.findIndex(e=>e.id===t);return-1!==n&&(e.notifications[n].seen=!0),{notifications:e.notifications}})},removeNotification:t=>{e(e=>{const n=e.notifications.findIndex(e=>e.id===t);return-1!==n&&e.notifications.splice(n,1),{notifications:e.notifications}})},removeNotifications:t=>{t&&e(e=>({notifications:e.notifications.filter(e=>e.id.split("#")[1]!==t)}))}}));var ic;!function(e){e.Instrumenting="instrumenting",e.Uninstrumenting="uninstrumenting",e.BulkInstrumenting="bulk-instrumenting",e.BulkUninstrumenting="bulk-uninstrumenting",e.DownloadingDiagnose="downloading-diagnose"}(ic||(ic={}));const ac=(e,t)=>({...t?.[e]||{total:0,current:0,percentage:0}}),sc=e=>(e.total<e.current&&(e.total=e.current+1),e.percentage=Math.round(e.current/e.total*100),e),lc=_t((e,t)=>({progress:{},setProgress:(n,o)=>{const r=t(),i=ac();return"number"==typeof o.total&&(i.total=o.total),"number"==typeof o.current&&(i.current=o.current),Array.isArray(o.list)&&(i.list=o.list),e({progress:{...r.progress,[n]:sc(i)}})},addProgress:(n,o,r)=>{const i=t(),a=ac(n,i.progress);return a.current+=o,r&&(a.list=a.list?.map(e=>e.label===r.label?{...e,status:r.status}:e)),e({progress:{...i.progress,[n]:sc(a)}})},resetProgress:t=>e({progress:{[t]:void 0}})})),cc=_t(e=>({selectedSources:{},setSelectedSources:t=>e({selectedSources:t}),resetSelectedState:()=>e(()=>({selectedSources:{},selectedConnection:null}))})),dc={configuredSources:{},configuredFutureApps:{},configuredDestinations:[],configuredDestinationsUpdateOnly:[]},pc=(e,t)=>e.destinationType.type!==t.destinationType.type,uc=_t(e=>({...dc,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=>pc(e,t))})),setConfiguredDestinationsUpdateOnly:t=>e({configuredDestinationsUpdateOnly:t}),addConfiguredDestinationUpdateOnly:t=>e(e=>{const n=[...e.configuredDestinationsUpdateOnly,t].map(e=>[e.id,e]);return{configuredDestinationsUpdateOnly:Array.from(new Map(n).values())}}),removeConfiguredDestinationUpdateOnly:t=>e(e=>({configuredDestinationsUpdateOnly:e.configuredDestinationsUpdateOnly.filter(e=>pc(e,t))})),clearStore:()=>e(()=>({...dc}))})),hc=e=>{function t(){return void 0===e?{}:an(e)}const[n,o]=Ft(t()),[r,i]=Ft({}),[a,s]=Ft(t()),l=Ut((e,t)=>{const n={};if(!t||"object"!=typeof t)return e?{...e}:n;for(const[o,r]of Object.entries(e)){const e=o;if(Array.isArray(r)){const o=t[e];Array.isArray(o)&&r.length===o.length&&r.every((e,t)=>"object"==typeof e&&null!==e?0===Object.keys(l(e,o[t])).length:e===o[t])||(n[e]=t[e])}else if("object"==typeof r&&null!==r)if(null==t[e]||"object"!=typeof t[e])n[e]=t[e];else{const o=l(r,t[e]);Object.keys(o).length>0&&(n[e]=o)}else r!==t[e]&&(n[e]=t[e])}for(const o of Object.keys(t))o in e||(n[o]=t[o]);return n},[]),c=(e,t)=>0===Object.keys(l(e,t)).length,d=zt(()=>!c(a,n),[a,n]);Mt(()=>{const r=t();void 0!==e&&"{}"===JSON.stringify(n)&&"{}"!==JSON.stringify(r)&&(o(r),s(r))},[e,n]);const p=Ut((e,t)=>sn("formData"===e?n:r,t.toString()),[n,r]);return{formData:n,formErrors:r,getFormDiff:l,areFormValuesEqual:c,isFormDirty:d,handleFormChange:(e,t,n)=>{if(e){const n=e.toString(),r=n.split(".");1===r.length?o(n=>({...n,[e]:t})):o(e=>{const n=an(e);let o=n;for(let e=0;e<r.length-1;e++){const t=r[e];o[t]&&"object"==typeof o[t]||(o[t]={}),o=o[t]}return o[r[r.length-1]]=t,n}),i(e=>{const t=n,o=r[r.length-1],i=void 0!==e[t],a=o!==t&&void 0!==e[o];if(!i&&!a)return e;const s={...e};return i&&delete s[t],a&&delete s[o],s})}else n&&o({...n})},handleErrorChange:(e,t,n)=>{if(e){const n=e.toString().split(".");1===n.length?i(n=>({...n,[e]:t})):i(e=>{const o=an(e);let r=o;for(let e=0;e<n.length-1;e++){const t=n[e];r[t]&&"object"==typeof r[t]||(r[t]={}),r=r[t]}return r[n[n.length-1]]=t,o})}else n&&i({...n})},resetFormData:e=>{const n=e||t();o(n),s(n),i({})},getNestedValue:p}},gc={type:"",name:"",notes:"",signals:[],disabled:!1,fields:{clusterAttributes:null,overwriteExistingValues:null,renames:null,attributeNamesToDelete:null,piiCategories:null,fallbackSamplingRatio:null,samplingPercentage:null,endpointsFilters:null,servicesNameFilters:null,attributeFilters:null,urlTemplatizationRulesGroups:null}},mc=()=>{const{addNotification:e}=rc(),{formData:t,formErrors:n,handleFormChange:o,handleErrorChange:r,resetFormData:i}=hc(gc),a=e=>e&&Array.isArray(e)?e.map(e=>!e.fromSources?.length&&e.from?{...e,fromSources:[e.from]}:e):e;return{formData:t,formErrors:n,handleFormChange:o,resetFormData:i,validateForm:n=>{const o={};let i=!0;if(Object.entries(t).forEach(([e,t])=>{switch(e){case"type":case"signals":Jr(t)&&(o[e]=fo.FIELD_IS_REQUIRED)}}),t.type===hn.URLTemplatization){const e=t.fields?.urlTemplatizationRulesGroups;if(e)for(const t of e)if(t.templatizationRules?.some(e=>!e.template?.trim())){o.fields=fo.FIELD_IS_REQUIRED;break}}return i=!Object.values(o).length,!i&&n?.withAlert&&e({type:Nn.Warning,title:n.alertTitle,message:fo.REQUIRED_FIELDS,hideFromHistory:!0}),r(void 0,void 0,o),i},loadFormWithDrawerItem:({type:e,signals:t,name:n,notes:r,disabled:i,fields:s})=>{const l={...an(gc),type:e,signals:t,name:n,notes:r,disabled:i};Object.entries(s).forEach(([e,t])=>{if(t)switch(e){case gn.LabelsAttributes:case gn.AnnotationsAttributes:l.fields||(l.fields={}),l.fields[e]=a(t);break;case gn.CollectContainerAttributes:case gn.CollectReplicaSetAttributes:case gn.CollectWorkloadId:case gn.CollectClusterId:case gn.ClusterAttributes:case gn.OverwriteExistingValues:case gn.AttributeNamesToDelete:case gn.Renames:case gn.PiiCategories:case gn.FallbackSamplingRatio:case gn.SamplingPercentage:case gn.EndpointsFilters:case gn.ServicesNameFilters:case gn.AttributeFilters:case gn.UrlTemplatizationRulesGroups:l.fields||(l.fields={}),l.fields[e]=t}}),o(void 0,void 0,l)}}},fc=e=>{Mt(()=>{if(e){const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])},bc=()=>{const{setCurrentModal:e}=oc(),{setDrawerType:t,setDrawerEntityId:n}=Ql(),{setActiveNodeType:o,setActiveNodeId:r,activeNodeId:i}=Vl();return{onClickNode:(a,s)=>{const{id:l,type:c,data:{id:d,type:p}}=s;switch(i===l?(o(null),r(null)):(o(c),r(l)),p){case An.Source:case An.Destination:case An.Action:case An.InstrumentationRule:t(p),n(d);break;case Bn.AddSource:e(An.Source);break;case Bn.AddDestination:e(An.Destination);break;case Bn.AddAction:e(An.Action);break;case Bn.AddRule:e(An.InstrumentationRule)}}}},yc=()=>{const{setDrawerType:e,setDrawerEntityId:t}=Ql(),{markAsDismissed:n,markAsSeen:o}=rc();return{onClickNotification:(r,i)=>{const{id:a,crdType:s,target:l}=r,{dismissToast:c}=i||{};if(s&&l)switch(s){case An.InstrumentationRule:e(An.InstrumentationRule),t(Uo(l,An.InstrumentationRule));break;case An.Source:case"InstrumentationConfig":case"InstrumentationInstance":e(An.Source),t(Uo(l,An.Source));break;case An.Action:e(An.Action),t(Uo(l,An.Action));break;case An.Destination:case"Destination":e(An.Destination),t(Uo(l,An.Destination))}o(a),c&&n(a)}}},$c=()=>{const e=Bt(null),[t,n]=Ft(0),[o,r]=Ft(0);return Mt(()=>{const t=()=>{if(e.current){const{width:t,height:o}=e.current.getBoundingClientRect();n(t),r(o)}};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),{containerRef:e,containerWidth:t,containerHeight:o}};var vc;!function(e){e[e.XS=16]="XS",e[e.S=18]="S",e[e.M=24]="M",e[e.L=32]="L"}(vc||(vc={}));const xc=o.div`
204
- width: ${({$size:e})=>1.5*e}px;
205
- height: ${({$size:e})=>1.5*e}px;
206
- display: flex;
207
- align-items: center;
208
- justify-content: center;
209
- border-radius: 100%;
210
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
211
- &:hover {
212
- background: ${({theme:e})=>e.v2.colors.silver[900]};
213
- }
214
- `,Sc=({"data-id":t,icon:n,size:o=vc.S,onClick:r,disabled:i})=>e(xc,{"data-id":t,$size:o,$disabled:i,onClick:e=>{r&&!i&&(e.stopPropagation(),r(e))},children:e(n,{size:o})}),wc=({onDone:t}={})=>{const[n,o]=Ft(!1),[r,i]=Ft(-1),a=Ut(async(e,r)=>{if(!n){if(o(!0),void 0!==r&&i(r),navigator?.clipboard&&navigator.clipboard.writeText)try{await navigator.clipboard.writeText(e)}catch(e){}else{const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select();try{document.execCommand("copy")}catch(e){}document.body.removeChild(t)}t?.(),setTimeout(()=>{o(!1),i(-1)},1e3)}},[n,t]);return{CopyButton:Ut(({value:t,size:o})=>e(Sc,{icon:n?bt:yt,size:o,onClick:()=>a(t)}),[n]),isCopied:n,copiedIndex:r,clickCopy:a}},Ec=e=>{const{addNotification:t}=rc(),{formData:n,handleFormChange:o,formErrors:r,handleErrorChange:i,resetFormData:a}=hc(e);return{formData:n,formErrors:r,handleFormChange:o,resetFormData:a,validateForm:e=>{const o={};let r=!0;return n.name?qr(n.name)?o.name=void 0:(r=!1,o.name=fo.ILLEGAL_K8S_LABEL):(r=!1,o.name=fo.FIELD_IS_REQUIRED),!r&&e?.withAlert&&t({type:Nn.Warning,title:e.alertTitle,message:fo.REQUIRED_FIELDS,hideFromHistory:!0}),i(void 0,void 0,o),r},loadFormWithDrawerItem:({name:t})=>{const n={...an(e),name:t};o(void 0,void 0,n)}}},Cc={type:"",name:"",exportedSignals:{logs:!1,metrics:!1,traces:!1,profiles:!1},fields:[],disabled:!1},Tc=e=>{const{supportedSignals:t,preLoadedFields:n}=e||{},{addNotification:o}=rc(),{formData:r,formErrors:i,handleFormChange:a,handleErrorChange:s,resetFormData:l}=hc(Cc),[c,d]=Ft([]),[p,u]=Ft([]);Mt(()=>{var e;u(c?(e=c,e.filter(e=>!!e).map(e=>{const{name:t,componentType:n,componentProperties:o,displayName:r,initialValue:i,renderCondition:a}=e;if(n===Dn.Dropdown){const e=Xr(o,{}),s=Array.isArray(e.values)?e.values.map(e=>({id:e,label:e})):Object.entries(e.values).map(([e,t])=>({id:e,label:t}));return{name:t,componentType:n,title:r,value:i,placeholder:e.placeholder||"Select an option",options:s,renderCondition:a,...e}}return{name:t,componentType:n,title:r,value:i,renderCondition:a,...Xr(o,{})}})).map(e=>{if(n){const t="string"==typeof n?Xr(n,{}):n;if(e.name in t)return{...e,value:t[e.name]}}return e}):[])},[c,n]),Mt(()=>{if(p){const e=p.map(e=>({key:e.name,value:e.value}));a("fields",e)}},[p]),Mt(()=>{if(t&&0===li(r.exportedSignals).length){const{logs:e,metrics:n,traces:o}=t;a("exportedSignals",{logs:e.supported,metrics:n.supported,traces:o.supported})}},[t,r.exportedSignals]);return{formData:r,formErrors:i,handleFormChange:a,resetFormData:l,validateForm:e=>{const t={};let n=!0;return p.forEach(({name:e,value:o,required:r})=>{r&&!o&&(n=!1,t[e]=fo.FIELD_IS_REQUIRED)}),!n&&e?.withAlert&&o({type:Nn.Warning,title:e.alertTitle,message:fo.REQUIRED_FIELDS,hideFromHistory:!0}),s(void 0,void 0,t),n},loadFormWithDrawerItem:({destinationType:{type:e},name:t,disabled:n,exportedSignals:o,fields:r})=>{const i={...an(Cc),type:e,name:t,disabled:n,exportedSignals:o,fields:Object.entries(Xr(r,{})).map(([e,t])=>({key:e,value:t}))};return a(void 0,void 0,i),i},yamlFields:c,setYamlFields:d,dynamicFields:p,setDynamicFields:u}},Ac={ruleName:"",notes:"",disabled:!1,workloads:null,instrumentationLibraries:null,payloadCollection:{[qn.HttpRequest]:null,[qn.HttpResponse]:null,[qn.DbQuery]:null,[qn.Messaging]:null},codeAttributes:{[Kn.Column]:null,[Kn.FilePath]:null,[Kn.Function]:null,[Kn.LineNumber]:null,[Kn.Namespace]:null,[Kn.StackTrace]:null},headersCollection:null,customInstrumentations:{[Jn.Java]:null,[Jn.Golang]:null}},kc=()=>{const{formData:e,formErrors:t,handleFormChange:n,handleErrorChange:o,resetFormData:r}=hc(Ac);return{formData:e,formErrors:t,handleFormChange:n,resetFormData:r,validateForm:()=>(o(void 0,void 0,{}),!0),loadFormWithDrawerItem:({ruleName:e,notes:t,disabled:o,payloadCollection:r,codeAttributes:i,headersCollection:a,customInstrumentations:s})=>{const l={...an(Ac),ruleName:e,notes:t,disabled:o};r&&(l.payloadCollection={[qn.HttpRequest]:r[qn.HttpRequest]?{}:null,[qn.HttpResponse]:r[qn.HttpResponse]?{}:null,[qn.DbQuery]:r[qn.DbQuery]?{}:null,[qn.Messaging]:r[qn.Messaging]?{}:null}),i&&(l.codeAttributes={[Kn.Column]:i[Kn.Column]||null,[Kn.FilePath]:i[Kn.FilePath]||null,[Kn.Function]:i[Kn.Function]||null,[Kn.LineNumber]:i[Kn.LineNumber]||null,[Kn.Namespace]:i[Kn.Namespace]||null,[Kn.StackTrace]:i[Kn.StackTrace]||null}),a&&(l.headersCollection=a),s&&(l.customInstrumentations={[Jn.Java]:s[Jn.Java]||null,[Jn.Golang]:s[Jn.Golang]||null}),n(void 0,void 0,l)}}},Dc=({active:e,key:t,withAltKey:n,withCtrlKey:o,withShiftKey:r,withMetaKey:i},a)=>(Mt(()=>{const s=s=>{e&&t===s.key&&(!n||n&&s.altKey)&&(!o||o&&s.ctrlKey)&&(!r||r&&s.shiftKey)&&(!i||i&&s.metaKey)&&(s.preventDefault(),s.stopPropagation(),a(s))};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}},[t,e,n,o,r,i,a]),null),Ic="data-ignore-outside-click",Nc=(e,t)=>{const n=Bt(t);n.current=t,Mt(()=>{const t=t=>{const o=t.target;e.current&&!e.current.contains(o)&&((e=>{let t=e;for(;t;){if(t instanceof Element&&t.hasAttribute(Ic))return!0;t=t.parentNode}return!1})(o)||n.current())};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}},[e])},Rc=({sectionNames:e,threshold:t=.4})=>{const[n,o]=Ft(e[0]||""),[r,i]=Ft(null),a=Bt({}),s=Bt(!1),l=Bt(!1),c=Ut((e,t)=>{a.current[e]=t},[]),d=Ut(e=>{i(e)},[]),p=Ut(e=>{l.current=!0,o(e)},[]);return Mt(()=>{if(!l.current)return;l.current=!1;const e=a.current[n];if(!e)return;s.current=!0,e.scrollIntoView({behavior:"smooth",block:"start"});const t=setTimeout(()=>{s.current=!1},600);return()=>clearTimeout(t)},[n]),Mt(()=>{const n=a.current,i=e.map(e=>n[e]).filter(Boolean);if(!i.length)return;const l=new IntersectionObserver(e=>{if(!s.current)for(const t of e)if(t.isIntersecting){const e=t.target.getAttribute("data-section-name");e&&o(e);break}},{threshold:t,root:r});return i.forEach(e=>l.observe(e)),()=>l.disconnect()},[e,t,r]),{selectedSection:n,setSelectedSection:p,setSectionRef:c,setScrollContainerRef:d}},Oc=({defaultClientHeight:e=0,defaultClientwidth:t=0,onClickOutside:n,positionMode:o="local"}={})=>{const r=Bt(null),[i,a]=Ft(!1),[s,l]=Ft({top:0,left:0}),[c,d]=Ft({edge:"top",align:"left"});Nc(r,()=>{i&&(a(!1),n?.())});return{popupRef:r,popupOpen:i,setPopupOpen:a,popupPosition:s,arrowPlacement:c,handlePosition:(n,i)=>{if("local"===o)return void l({top:i,left:n});const{innerWidth:a,innerHeight:s}=window,c=r.current?.clientWidth||t,p=r.current?.clientHeight||e,u=n/a,h=u<1/3?"left":u>2/3?"right":"center";d({edge:i<s/2?"top":"bottom",align:h});let g=i,m=n;if(g>=s/2&&(g+=-p),"center"===h){m=n-c/2;const e=8;m=Math.max(e,Math.min(m,a-c-e))}else m>=a/2&&(m=n-c);l({top:g,left:m})}}},_c=()=>({getItemSS:(e,t)=>{const n=sessionStorage.getItem(e);return n?Xr(n,t):t},setItemSS:(e,t)=>{sessionStorage.setItem(e,JSON.stringify(t))},removeItemSS:e=>{sessionStorage.removeItem(e)}}),Lc={otelServiceName:"",currentStreamName:""},Pc=()=>{const{formData:e,formErrors:t,handleFormChange:n,handleErrorChange:o,resetFormData:r}=hc(Lc);return{formData:e,formErrors:t,handleFormChange:n,resetFormData:r,validateForm:()=>(o(void 0,void 0,{}),!0),loadFormWithDrawerItem:({serviceName:e,id:t})=>{const o={...an(Lc),otelServiceName:e||t.name||""};n(void 0,void 0,o)}}};try{Wt.addDefaultLocale(Kt)}catch(e){}const Fc=new Wt(Kt.locale),Mc=[{ms:31536e6,long:["year","years"],short:"y"},{ms:2592e6,long:["month","months"],short:"mo"},{ms:864e5,long:["day","days"],short:"d"},{ms:36e5,long:["hour","hours"],short:"h"},{ms:6e4,long:["minute","minutes"],short:"m"},{ms:1e3,long:["second","seconds"],short:"s"}],zc=e=>"string"==typeof e?new Date(e.replace("t","T").replace("z","Z")):new Date(e),Uc=()=>{const[e,t]=Ft(0);Mt(()=>{const e=setInterval(()=>{t(e=>(e+1)%Number.MAX_SAFE_INTEGER)},1e3);return()=>clearInterval(e)},[]);return{formatTimeAgo:Ut(e=>{try{return Fc.format(zc(e))}catch(e){return"-"}},[e]),formatDurationAgo:Ut((e,{units:t=2,style:n="long",suffix:o=!0}={})=>{try{const r=zc(e);let i=Math.max(0,Date.now()-r.getTime());if(i<1e3)return"short"===n?"0s":o?"just now":"0 seconds";const a=[];for(const e of Mc){if(a.length===t)break;const o=Math.floor(i/e.ms);if(!(o<=0&&0===a.length)){if(o<=0)break;i-=o*e.ms,a.push("short"===n?`${o}${e.short}`:`${o} ${1===o?e.long[0]:e.long[1]}`)}}const s="short"===n?a.join(""):a.join(" ");return o&&"long"===n?`${s} ago`:s}catch(e){return"-"}},[e])}},Bc=o.div`
215
- color: ${({$color:e,theme:t})=>e||t.text.secondary};
216
- font-size: ${({$size:e})=>void 0!==e?e:16}px;
217
- font-weight: ${({$weight:e})=>void 0!==e?e:300};
218
- text-align: ${({$align:e})=>e||"left"};
219
- opacity: ${({$opacity:e})=>void 0!==e?e:1};
220
- text-decoration: ${({$decoration:e})=>e||"none"};
221
- text-transform: ${({$transform:e,$family:t})=>e||("secondary"===t?"uppercase":"none")};
222
- font-family: ${({theme:e,$family:t="primary"})=>e.font_family[t]};
223
- white-space: ${({$nowrap:e})=>e?"nowrap":"unset"};
224
- text-wrap: ${({$nowrap:e})=>e?"nowrap":"unset"};
225
- `,jc=e=>{const t=e.match(/<a[^>]*href="([^"]*)"[^>]*>(.*?)<\/a>/g);return t?.map(e=>{const[t,n,o]=e.split('"');return{original:e,href:n,label:o.replace("</a>","").replace(">","")}})},Hc=e=>{const t=e.match(/<strong[^>]*>(.*?)<\/strong>/g);return t?.map(e=>{const t=e.replace(/<strong[^>]*>/,"").replace(/<\/strong>/,"");return{original:e,label:t}})},Wc=(n,o)=>{const r=jc(n);r?.forEach((e,t)=>{n=n.replace(e.original,`LINK-${t}###`)});const i=Hc(n);i?.forEach((e,t)=>{n=n.replace(e.original,`STRONG-${t}###`)});return n.split(" ").map(n=>{if(n.includes("LINK-")){const[i,a]=n.split("###"),s=r?.[parseInt(i.replace("LINK-",""))];return t(Pt,{children:[e("a",{href:s?.href,target:"_blank",rel:"noreferrer",style:{color:o.colors.majestic_blue_soft},children:s?.label}),a?`${a} `:" "]},n)}if(n.includes("STRONG-")){const[o,r]=n.split("###"),a=i?.[parseInt(o.replace("STRONG-",""))];return t(Pt,{children:[e("strong",{style:{fontWeight:600},children:a?.label}),r?`${r} `:" "]},n)}return n+" "})},Gc=({children:n,color:o,size:r,weight:a,align:s,family:l,opacity:c,decoration:d,transform:p,nowrap:u,...h})=>{const g=i(),m=zt(()=>(n?["string","number"].includes(typeof n)?n.toString():Array.isArray(n)?n.map(e=>"object"==typeof e&&Object.hasOwn(e,"props")?e.props.children:e).filter(e=>e&&["string","number"].includes(typeof e)).join(" "):"":"").split("\n"),[n]);return e(Bc,{$color:o,$size:r,$weight:a,$align:s,$family:l,$opacity:c,$decoration:d,$transform:p,$nowrap:u,...h,children:m.length?m.map((n,o)=>t(Pt,{children:[Wc(n,g),o!==m.length-1?e("br",{}):null]},`text-${o}-${n}`)):n})},Xc=o.div`
226
- width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
227
- position: relative;
228
- display: flex;
229
- align-items: center;
230
- gap: 4px;
231
-
232
- /* Only signal "this is hoverable" when there's actually a tooltip to show. Important for callers (e.g. truncation-aware wrappers) that always mount the Tooltip with "keepAlive" and toggle "text" based on overflow — we don't want every wrapped element to show a help cursor when no tooltip would actually appear. */
233
- cursor: ${({$hasText:e})=>e?"help":"inherit"};
234
- ${({$ellipsis:e})=>e&&r`
235
- overflow: hidden;
236
- text-overflow: ellipsis;
237
- white-space: nowrap;
238
- `}
239
- `,Kc=o.div`
240
- display: flex;
241
- flex-direction: column;
242
- align-items: flex-start;
243
- gap: 8px;
244
- width: 100%;
245
- `,Vc=o.div`
246
- display: flex;
247
- width: 100%;
248
- flex-shrink: 0;
249
- box-sizing: border-box;
250
- line-height: 0;
251
-
252
- ${({$align:e})=>"left"===e&&"\n justify-content: flex-start;\n padding-left: 20px;\n padding-right: 10px;\n "}
253
- ${({$align:e})=>"right"===e&&"\n justify-content: flex-end;\n padding-left: 10px;\n padding-right: 20px;\n "}
254
- ${({$align:e})=>"center"===e&&"\n justify-content: center;\n align-items: center;\n min-height: 8px;\n "}
255
- `,Jc=o.div`
256
- width: 0;
257
- height: 0;
258
- border-style: solid;
259
- border-left: 6.5px solid transparent;
260
- border-right: 6.5px solid transparent;
261
- flex-shrink: 0;
262
-
263
- ${({$pointsUp:e,theme:t})=>e?`\n border-bottom: 8px solid ${t.v2.colors.black[500]};\n border-top-width: 0;\n `:`\n border-top: 8px solid ${t.v2.colors.black[500]};\n border-bottom-width: 0;\n `}
264
- `,qc=o.div`
265
- display: flex;
266
- flex-direction: column;
267
- align-items: stretch;
268
- min-width: 0;
269
- `,Yc=o.div`
270
- background-color: ${({theme:e})=>e.v2.colors.black[500]};
271
- border-radius: 4px;
272
- padding: 8px;
273
- box-sizing: border-box;
274
- min-width: 0;
275
- `,Qc=({withIcon:o,titleIcon:r,title:a,text:s,timestamp:l,children:c,fullWidth:d=!1,keepAlive:p=!1,ellipsis:u=!1})=>{const h=i(),{popupRef:g,popupOpen:m,setPopupOpen:f,popupPosition:b,arrowPlacement:y,handlePosition:$}=Oc({positionMode:"viewport",defaultClientHeight:48,defaultClientwidth:Math.min(7.5*(s?.length||0),300)}),v=zt(()=>!!jc(s||"")?.length,[s]),x=e=>{const{type:t,clientX:n,clientY:o}=e;v?$(b.left||n,b.top||o):$(n,o),f("mouseleave"!==t)};return s||p?t(Xc,{$fullWidth:d,$ellipsis:u,$hasText:!!s,onMouseEnter:x,onMouseMove:x,onMouseLeave:x,children:[c,o&&e(Qe,{fill:h.v2.colors.white[500]}),e(Ei,{ref:g,isOpen:m&&!!s,top:b.top,left:b.left,asPortal:!0,withPointerEvents:v,onMouseEnter:v?x:void 0,style:{backgroundColor:"transparent",border:"none"},maxWidth:"270px",borderRadius:"0",padding:"0",children:t(qc,{children:["top"===y.edge&&e(Vc,{$align:y.align,children:e(Jc,{$pointsUp:!0})}),e(Yc,{children:t(Kc,{children:[(!!r||!!a)&&t(Tr,{$gap:4,style:{alignItems:"center"},children:[r&&e(r,{size:16},"icon"),a&&e(rr,{size:Zo.XS,children:a},"title")]}),!!s&&e(rr,{size:Zo.XXXS,children:s}),!!l&&e(rr,{size:Zo.XXXS,color:er.Secondary,children:new Date(l).toLocaleString()})]})}),"bottom"===y.edge&&e(Vc,{$align:y.align,children:e(Jc,{$pointsUp:!1})})]})})]}):e(n,{children:c})},Zc=o(Tr)`
276
- gap: 0;
277
- `,ed=o.button`
278
- padding: 4px 8px;
279
- background-color: ${({theme:e,$selected:t})=>t?e.colors.dropdown_bg_2:"transparent"};
280
- border-radius: ${({$position:e})=>"left"===e?"32px 0px 0px 32px":"right"===e?"0px 32px 32px 0px":"0"};
281
- border: 1px solid ${({theme:e})=>e.colors.border};
282
- display: flex;
283
- align-items: center;
284
- justify-content: center;
285
- cursor: pointer;
286
- &:hover {
287
- border: 1px solid ${({theme:e})=>e.colors.secondary};
288
- }
289
- `,td=({isPrettyMode:n,setIsPrettyMode:o})=>t(Zc,{children:[e(ed,{$position:"left",$selected:n,onClick:()=>o(!0),children:e($t,{})}),e(ed,{$position:"right",$selected:!n,onClick:()=>o(!1),children:e(vt,{})})]}),nd=o.table`
290
- border-collapse: collapse;
291
- font-family: ${({theme:e})=>e.font_family.primary};
292
- `,od=o.tbody``,rd=o.tr`
293
- td:first-child {
294
- padding-left: 0 !important;
295
- }
296
- td:last-child {
297
- padding-right: 0 !important;
298
- }
299
- `,id=o.td`
300
- vertical-align: top;
301
- padding: 4px 6px;
302
- `,ad=o(Gc)`
303
- white-space: nowrap;
304
- `,sd=o.span`
305
- white-space: ${({$noWrap:e})=>e?"nowrap":"pre-wrap"};
306
- overflow-wrap: break-word;
307
- word-break: break-word;
308
- word-wrap: break-word;
309
- /* Fallback for older browsers */
310
- -ms-word-break: break-all;
311
- font-size: 12px;
312
- `,ld=({language:t,code:n,theme:o,flatten:r,pretty:a})=>{const{darkMode:s}=i(),l=o?qt[o]:s?qt.palenight:qt.vsLight;let c="";if("json"===t){const e=Xr(n,{}),t=mi(e);c=fi(r?vo(t):t)}else c=n;return a&&"json"===t?e(cd,{darkMode:s,str:c}):e(Jt,{theme:l||(s?qt.palenight:qt.vsLight),language:t,code:c,children:({getLineProps:t,getTokenProps:n,tokens:o})=>e("pre",{children:o.map((o,r)=>e("div",{...t({line:o}),children:o.map((t,o)=>e(sd,{...n({token:t})},`line-${r}-token-${o}`))},`line-${r}`))})})},cd=({darkMode:n,str:o})=>{const r=i(),a=(n,o)=>{const i=new Array(n).fill(n=>t(rd,{...n,children:[e(id,{}),e(id,{})]}));return e(Pt,{children:i.map((t,n)=>e(t,{style:0===n?{borderBottom:`1px solid ${r.colors.border}`}:{}},`empty-row-${o}-${n}`))})};return e(Jt,{theme:n?qt.palenight:qt.vsLight,language:"json",code:o,children:({getLineProps:n,getTokenProps:o,tokens:i})=>e(nd,{children:e(od,{children:i.map((i,s)=>{const l=(e=>{const t=["punctuation","plain","operator"];return e.filter(e=>!t.includes(e.types[0])).map(({types:e,content:t})=>{const n=[...e],o=["property","string"].includes(n[0])?t.replace(/"/g,""):t;return"string"===n[0]&&(["true","false"].includes(o.split("@")[0])&&(n[0]="boolean"),o.split("@")[0].match(/^[0-9]+$/)&&(n[0]="number")),{types:n,content:o}})})(i),c=n({line:l});return 1===l.length&&"property"===l[0].types[0]?t(Pt,{children:[a(2,s),t(rd,{...c,children:[e(id,{children:e(ad,{children:l[0].content})}),e(id,{})]})]},`line-${s}`):2===l.length?e(rd,{...c,children:l.map((n,i)=>{const{text:a,components:l}=((t,n)=>{const[o,...r]=t.split("@");return{text:o,components:r?.map((t,o)=>{if(!t.includes("="))return null;const[r,i]=t.split("=");switch(r){case"tooltip":return e(Qc,{withIcon:!0,text:i},`${r}-${i}-${o}`);case"status":if("none"===i)return e("div",{style:{width:16,height:16}},`${r}-${i}-${o}`);let t=zr(i,n);return t||(t=zr(Nn.Warning,n)),e(t,{},`${r}-${i}-${o}`);default:return null}})?.filter(e=>!!e)||[]}})(n.content,r),c=0===i;return e(id,{children:t(Tr,{children:[e(Tr,{children:l}),e(sd,{$noWrap:c,...o({token:n}),children:a})]})},`line-${s}-token-${i}`)})},`line-${s}`):(l.length,null)})})})})},dd={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:"#8855FF",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:{500:"#FF7CC8",600:"#FF7CA9"},orange:{600:"#F29142"}},zIndex:{base:1,island:100,drawer:1e3,modal:1e3,dropdown:1100,popover:1100,tooltip:1200}},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"}},pd={v2:dd.v2,darkMode:!0,colors:{...dd.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:dd.font_family},ud={v2:dd.v2,darkMode:!1,colors:{...dd.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:dd.font_family},hd=e=>e?pd:ud;var gd=Object.freeze({__proto__:null,baseTheme:dd,darkModeTheme:pd,getTheme:hd,lightModeTheme:ud});Vt('@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 md=({children:t})=>{const{darkMode:n}=Jl();return e(s,{theme:hd(n),children:t})},fd={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 bd=Object.freeze({__proto__:null,hex:fd});const yd={in:{left:a`
313
- from { transform: translateX(-100%); }
314
- to { transform: translateX(0); }
315
- `,right:a`
316
- from { transform: translateX(100%); }
317
- to { transform: translateX(0); }
318
- `,top:a`
319
- from { transform: translateY(-100%); }
320
- to { transform: translateY(0); }
321
- `,bottom:a`
322
- from { transform: translateY(100%); }
323
- to { transform: translateY(0); }
324
- `,center:a`
325
- from { transform: translate(-50%, 100%); }
326
- to { transform: translate(-50%, -50%); }
327
- `},out:{left:a`
328
- from { transform: translateX(0); }
329
- to { transform: translateX(-100%); }
330
- `,right:a`
331
- from { transform: translateX(0); }
332
- to { transform: translateX(100%); }
333
- `,top:a`
334
- from { transform: translateY(0); }
335
- to { transform: translateY(-100%); }
336
- `,bottom:a`
337
- from { transform: translateY(0); }
338
- to { transform: translateY(100%); }
339
- `,center:a`
340
- from { transform: translate(-50%, -50%); }
341
- to { transform: translate(-50%, 100%); }
342
- `}},$d={in:a`
343
- from {
344
- width: 0%;
345
- }
346
- to {
347
- width: 100%;
348
- }
349
- `,out:a`
350
- from {
351
- width: 100%;
352
- }
353
- to {
354
- width: 0%;
355
- }
356
- `},vd=a`
357
- 0% {
358
- transform: scale(1);
359
- opacity: 1;
360
- }
361
- 75%, 100% {
362
- transform: scale(2);
363
- opacity: 0;
364
- }
365
- `,xd=a`
366
- 0% {
367
- background-position: -500px 0;
368
- }
369
- 100% {
370
- background-position: 500px 0;
371
- }
372
- `,Sd={in:a`
373
- from {
374
- opacity: 0;
375
- }
376
- to {
377
- opacity: 1;
378
- }
379
- `,out:a`
380
- from {
381
- opacity: 1;
382
- }
383
- to {
384
- opacity: 0;
385
- }
386
- `};var wd=Object.freeze({__proto__:null,fade:Sd,ping:vd,progress:$d,shimmer:xd,slide:yd});const Ed=o.div`
387
- width: ${({$orientation:e,$thickness:t,$length:n})=>"vertical"===e?`${t}px`:n||"100%"};
388
- height: ${({$orientation:e,$thickness:t,$length:n})=>"horizontal"===e?`${t}px`:n||"100%"};
389
- margin: ${({$orientation:e,$margin:t})=>t||("horizontal"===e?"8px 0":"0 8px")};
390
- background-color: ${({$type:e,theme:t})=>(e?t.text[e]:t.colors.border)+fd["050"]};
391
- opacity: ${({$opacity:e})=>e||1};
392
- `,Cd=({orientation:t="horizontal",type:n,thickness:o=1,length:r,margin:i,opacity:a})=>e(Ed,{$orientation:t,$type:n,$thickness:o,$length:r,$margin:i,$opacity:a}),Td={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function Ad(e){if("number"==typeof e)return{value:e,unit:"px"};let t;const n=(e.match(/^[0-9.]*/)||"").toString();t=n.includes(".")?parseFloat(n):parseInt(n,10);const o=(e.match(/[^0-9]*$/)||"").toString();return Td[o]?{value:t,unit:o}:{value:t,unit:"px"}}function kd(e){const t=Ad(e);return`${t.value}${t.unit}`}const Dd=((e,t,n)=>{const o=`react-spinners-${e}-${n}`;if("undefined"==typeof window||!window.document)return o;const r=document.createElement("style");document.head.appendChild(r);const i=r.sheet,a=`\n @keyframes ${o} {\n ${t}\n }\n `;return i&&i.insertRule(a,0),o})("FadeLoader","50% {opacity: 0.3} 100% {opacity: 1}","fade"),Id=({loading:n=!0,color:o,scale:r=1,speedMultiplier:a=1,cssOverride:s={},style:l={},...c})=>{const d=i(),p=o||d.text.secondary;if(!n)return null;const{value:u}=Ad(2),h=u+4.2,g=h/2+h/5.5,m=4*h*r,f={position:"relative",width:`${m}px`,height:`${m}px`,scale:r,...l,...s},b=(e,t)=>({position:"absolute",width:kd(1.5),height:kd(4),borderRadius:kd(2),backgroundColor:p,transition:"2s",animationFillMode:"both",animation:`${Dd} ${1.2/a}s ${.12*e}s infinite ease-in-out`,transform:`translate(-50%, -50%) rotate(${t}deg)`});return t("span",{style:f,...c,children:[e("span",{style:{...b(1,0),top:`calc(50% + ${h}px)`,left:"50%"}}),e("span",{style:{...b(2,-45),top:`calc(50% + ${g}px)`,left:`calc(50% + ${g}px)`}}),e("span",{style:{...b(3,90),top:"50%",left:`calc(50% + ${h}px)`}}),e("span",{style:{...b(4,45),top:`calc(50% + ${-1*g}px)`,left:`calc(50% + ${g}px)`}}),e("span",{style:{...b(5,0),top:`calc(50% + ${-1*h}px)`,left:"50%"}}),e("span",{style:{...b(6,-45),top:`calc(50% + ${-1*g}px)`,left:`calc(50% + ${-1*g}px)`}}),e("span",{style:{...b(7,90),top:"50%",left:`calc(50% + ${-1*h}px)`}}),e("span",{style:{...b(8,45),top:`calc(50% + ${g}px)`,left:`calc(50% + ${-1*g}px)`}})]})},Nd=a`
393
- 0% {
394
- background-position: 0% 50%;
395
- }
396
- 100% {
397
- background-position: 100% 50%;
398
- }
399
- `,Rd=o(Gc)`
400
- background: ${({$textColor:e,$stripColor:t})=>`linear-gradient(45deg, ${e} 0%, ${e} 40%, ${t} 50%, ${e} 60%, ${e} 100%)`};
401
- background-size: 250% 100%; /* Expand background to allow movement */
402
- background-clip: text;
403
- color: transparent;
404
- animation: ${Nd} 1s reverse linear infinite;
405
- `,Od=({children:t="Loading...",textColor:n,stripColor:o,...r})=>{const a=i(),s=n||a.v2.colors.white[500],l=o||a.v2.colors.black[500];return e(Rd,{$textColor:s,$stripColor:l,...r,children:t})};var _d,Ld;!function(e){e.Primary="primary",e.Secondary="secondary",e.Text="text"}(_d||(_d={})),function(e){e.S="small",e.M="medium",e.L="large"}(Ld||(Ld={}));const Pd=o.button`
406
- display: flex;
407
- align-items: center;
408
- justify-content: center;
409
- gap: 8px;
410
- ${({$fullWidth:e})=>e&&r`
411
- width: 100%;
412
- `}
413
- border: none;
414
- border-radius: 6px;
415
- ${({$size:e,$hasLabel:t})=>e===Ld.S?r`
416
- height: 32px;
417
- ${t?r`
418
- padding: 8px 16px;
419
- `:r`
420
- width: 32px;
421
- `}
422
- `:e===Ld.M?r`
423
- height: 38px;
424
- ${t?r`
425
- padding: 8px 18px;
426
- `:r`
427
- width: 38px;
428
- `}
429
- `:r`
430
- height: 44px;
431
- ${t?r`
432
- padding: 8px 22px;
433
- `:r`
434
- width: 44px;
435
- `}
436
- `}
437
-
438
- cursor: pointer;
439
- &:disabled {
440
- background-color: ${({theme:e})=>e.v2.colors.silver[800]};
441
- cursor: not-allowed;
442
- }
443
- &:enabled {
444
- ${({$withShadow:e})=>e?r`
445
- box-shadow: 0 0 11px 0 rgba(0, 0, 0, 0.32);
446
- `:""}
447
- ${({$variant:e})=>e===_d.Primary?r`
448
- background-color: ${({theme:e})=>e.v2.colors.purple[500]};
449
- &:hover {
450
- background-color: ${({theme:e})=>e.v2.colors.purple[600]};
451
- }
452
- &:active {
453
- background-color: ${({theme:e})=>e.v2.colors.purple[700]};
454
- }
455
- `:e===_d.Secondary?r`
456
- background-color: ${({theme:e})=>e.v2.colors.silver[750]};
457
- &:hover {
458
- background-color: ${({theme:e})=>e.v2.colors.silver[600]};
459
- }
460
- &:active {
461
- background-color: ${({theme:e})=>e.v2.colors.silver[500]};
462
- }
463
- `:e===_d.Text?r`
464
- background-color: transparent;
465
- &:hover {
466
- background-color: ${({theme:e})=>e.v2.colors.silver[800]};
467
- }
468
- &:active {
469
- background-color: ${({theme:e})=>e.v2.colors.silver[900]};
470
- }
471
- `:""}
472
- }
473
- `,Fd=Lt(({"data-id":o,label:r,tooltip:a,hideTooltipIcon:s,leftIcon:l,rightIcon:c,variant:d=_d.Primary,size:p=Ld.M,iconSize:u,loading:h,fullWidth:g,withShadow:m,textColor:f,disabled:b,onClick:y,...$},v)=>{const x=i(),S=u||(p===Ld.L?18:16),w=p===Ld.L?Zo.S:Zo.XS,E=f||(b?x.v2.colors.grey[400]:x.v2.colors.white[500]),[C,T]=Ft(!1),A=Ut(async e=>{e.stopPropagation(),T(!0),await(y?.(e)),T(!1)},[y]);return e(Pd,{ref:v,"data-id":o,$variant:d,$size:p,$fullWidth:g,$withShadow:m,$hasLabel:!!r,disabled:b,onClick:h||C?void 0:A,...$,children:e(Qc,{text:a,withIcon:!s,children:h||C?r?e(Od,{size:x.v2.text.size[w],textColor:E}):e(Id,{}):t(n,{children:[l&&e(l,{size:S,fill:E}),r?e(rr,{size:w,weight:500,color:E,nowrap:!0,children:r}):null,c&&e(c,{size:S,fill:E})]})})})});Fd.displayName=Fd.name;const Md=({error:n})=>{const o=i(),r={container:{display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",color:o.text.error,fontFamily:o.font_family.primary},errorMessage:{padding:10,borderRadius:5,whiteSpace:"pre-wrap",background:o.colors.error},errorStack:{whiteSpace:"pre-wrap",fontSize:"12px"},errorStackWrapper:{textAlign:"left",marginTop:10},infoText:{marginTop:100,color:o.text.secondary,fontSize:"14px"}};return t("div",{style:r.container,children:[e("h2",{children:"Something went wrong!"}),e("pre",{style:r.errorMessage,children:n?.message||"Unknown Error"}),t("details",{style:r.errorStackWrapper,children:[e("summary",{children:"Stack Trace"}),e("pre",{style:r.errorStack,children:n?.stack||"Unknown Stack"})]}),e("p",{style:r.infoText,children:"Try refreshing the page or contact support"}),e(Fd,{variant:_d.Secondary,onClick:()=>window.location.reload(),label:"Reload Page"})]})},zd=({children:t})=>e(Yt,{FallbackComponent:({error:t,...n})=>e(md,{children:e(Md,{...n,error:t})}),children:t}),Ud=o.button`
474
- position: relative;
475
- width: ${({$size:e})=>e}px;
476
- height: ${({$size:e})=>e}px;
477
- border: ${({theme:e,$withBorder:t})=>t?`1px solid ${e.colors.border}`:"none"};
478
- border-radius: 100%;
479
- background-color: ${({$backgroundColor:e})=>e||"transparent"};
480
- display: flex;
481
- align-items: center;
482
- justify-content: center;
483
- cursor: pointer;
484
- &:hover {
485
- background-color: ${({theme:e,$backgroundColor:t})=>t?t+fd["070"]:e.colors.dropdown_bg_2};
486
- }
487
- `,Bd=o.div`
488
- position: absolute;
489
- top: ${({$size:e})=>e/5}px;
490
- right: ${({$size:e})=>e/5}px;
491
- width: 6px;
492
- height: 6px;
493
- border-radius: 100%;
494
- background-color: ${({theme:e,$color:t})=>t||e.colors.secondary};
495
-
496
- &::after {
497
- content: '';
498
- position: absolute;
499
- inset: 0;
500
- border-radius: 100%;
501
- background-color: ${({theme:e,$color:t})=>t||e.colors.secondary};
502
- animation: ${vd} 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
503
- }
504
- `,jd=({children:n,onClick:o,tooltip:r,size:i=36,withPing:a,pingColor:s,withBorder:l,backgroundColor:c,...d})=>e(Qc,{text:r,children:t(Ud,{$size:i,$withBorder:l,$backgroundColor:c,onClick:o,...d,children:[a&&e(Bd,{$size:i,$color:s}),n]})}),Hd=({src:t="",alt:n="",size:o=16})=>{const[r,i]=Ft(!1);return t&&!r?e("img",{src:t,alt:n,width:o,height:o,onError:()=>i(!0)}):e(m,{size:o})},Wd=o.div`
505
- display: flex;
506
- align-items: center;
507
- justify-content: center;
508
- width: ${({$size:e})=>e}px;
509
- height: ${({$size:e})=>e}px;
510
- border-radius: 8px;
511
- background: ${({$status:e,theme:t})=>{const n=t.colors[e||"dropdown_bg_2"];return`linear-gradient(180deg, ${n} 0%, ${n+fd["030"]} 100%)`}};
512
- `,Gd=({icon:t,src:n="",alt:o="",status:r,size:i=36})=>e(Wd,{$status:r,$size:i,children:n?e(Hd,{src:n,alt:o,size:i-12}):e(t||m,{size:i-12})}),Xd=o.div`
513
- position: relative;
514
- display: flex;
515
- flex-wrap: wrap;
516
- align-items: center;
517
- justify-content: center;
518
- width: ${({$size:e})=>e}px;
519
- height: ${({$size:e})=>e}px;
520
- `,Kd=o.div`
521
- position: absolute;
522
- top: ${({$top:e})=>e}px;
523
- left: ${({$left:e})=>e}px;
524
- z-index: ${({$zIndex:e})=>e};
525
- display: flex;
526
- align-items: center;
527
- justify-content: center;
528
- width: ${({$size:e})=>e}px;
529
- height: ${({$size:e})=>e}px;
530
- border-radius: 100%;
531
- border: 1px solid ${({theme:e,$status:t})=>(t?e.text[t]:e.colors.border)+fd["030"]};
532
- background: ${({$status:e,theme:t})=>{const n=t.colors[e||"dropdown_bg_2"];return`linear-gradient(180deg, ${n} 0%, ${n+fd["030"]} 100%)`}};
533
- `,Vd=({icons:n=[],iconSrcs:o=[],status:r,size:a=36,id:s})=>{const l=i(),c=1===n.length||1===o.length?a-12:a/2.7;if(o.length>0)return e(Vd,{icons:o.map(t=>()=>e(Hd,{src:t,size:c})),status:r,size:a,id:s});if(1===n.length)return e(Gd,{icon:n[0],status:r,size:a});const d=e=>n.length<=2?.5*c:0===e||1===e?0:1.15*c,p=e=>0===e?0:1===e?1.15*c:1.15*c*.5;return e(Xd,{$status:r,$size:a,children:n.map((o,i)=>i>2?null:e(Kd,{$status:r,$size:1.5*c,$top:d(i),$left:p(i),$zIndex:i+1,children:2===i&&n.length>3?t(Gc,{family:"secondary",color:l.text.dark_grey,size:.8*c,children:["+",n.length-2]}):e(o,{size:c})},`icon-${s}-${i}`))})},Jd=o.div`
534
- position: relative;
535
- &.animated {
536
- overflow: hidden;
537
- padding-bottom: 1px;
538
- border-radius: 32px;
539
- animation: ${({$isLeaving:e})=>e?yd.out.bottom:yd.in.bottom} ${({$duration:e})=>e/10}ms forwards;
540
- }
541
- `,qd=o.div`
542
- position: absolute;
543
- bottom: -1px;
544
- left: 0;
545
- z-index: -1;
546
- width: 100%;
547
- height: 100%;
548
- border-radius: 32px;
549
- background-color: ${({$type:e,theme:t})=>t.text[e]};
550
- animation: ${$d.out} ${({$duration:e})=>""+(e-e/10)}ms forwards;
551
- `,Yd=o.div`
552
- display: flex;
553
- align-items: center;
554
- flex: 1;
555
- gap: 8px;
556
- padding: 0 12px;
557
- border-radius: 32px;
558
- background-color: ${({$type:e,theme:t})=>t.colors[e]};
559
- `,Qd=o.div`
560
- display: flex;
561
- align-items: center;
562
- margin: 0 auto 0 0;
563
- padding: 8px 0;
564
- max-width: ${({$withAction:e,$overrideMaxWidth:t})=>t||(e?"400px":"500px")};
565
- min-height: 12px;
566
- `,Zd=o(Gc)`
567
- font-size: 14px;
568
- color: ${({$type:e,theme:t})=>t.text[e]};
569
- `,ep=o(Gc)`
570
- color: ${({$type:e,theme:t})=>t.text[e]};
571
- font-size: 12px;
572
- `,tp=o(Tr)``,np=o(Gc)`
573
- text-transform: uppercase;
574
- text-decoration: underline;
575
- font-size: 12px;
576
- font-family: ${({theme:e})=>e.font_family.secondary};
577
- white-space: nowrap;
578
- cursor: pointer;
579
- &:hover {
580
- transform: scale(1.1);
581
- transition: transform 0.3s;
582
- }
583
- `,op=({type:n,icon:o,title:r,message:a,action:s,onClose:l,duration:c=5e3,overrideMaxWidth:d,style:p})=>{const u=i(),[h,g]=Ft(!1),m=Bt(null),f=Bt(null),b=e=>{l&&(g(!0),l({asSeen:e?.asSeen}))};Mt(()=>(m.current=setTimeout(()=>b({asSeen:!1}),c),()=>{m.current&&clearTimeout(m.current)}),[c]);const y=o||zr(n,u);return t(Jd,{className:l?"animated":"",$duration:c,$isLeaving:h,onMouseEnter:()=>{m.current&&clearTimeout(m.current),f.current&&(f.current.style.animationPlayState="paused")},onMouseLeave:()=>{if(f.current){const e=f.current.offsetWidth/f.current.parentElement.offsetWidth*c;m.current=setTimeout(()=>b({asSeen:!1}),e),f.current.style.animationPlayState="running"}},children:[t(Yd,{"data-id":"toast",$type:n,style:p,children:[e(y,{fill:u.text[n]}),t(Qd,{$withAction:!!s,$overrideMaxWidth:d,children:[r&&e(Zd,{$type:n,children:r}),r&&a&&e(Cd,{orientation:"vertical",type:n}),a&&e(ep,{$type:n,children:a})]}),(!!s||!!l)&&t(tp,{children:[s&&e(np,{"data-id":"toast-action",onClick:s.onClick,children:s.label}),l&&e(jd,{"data-id":"toast-close",onClick:()=>b({asSeen:!0}),children:e(xt,{size:12})})]})]}),l&&e(qd,{ref:f,$duration:c,$type:n})]})},rp=o(Gc)`
584
- max-width: ${({$maxWidth:e})=>e?`${e}px`:"unset"};
585
- white-space: nowrap;
586
- overflow-x: auto;
587
-
588
- &::after {
589
- // This is to prevent the "browser default tooltip" from appearing when the title is too long
590
- content: '';
591
- display: block;
592
- }
593
- `,ip=({maxWidth:n,text:o,textSize:r=16,textColor:i})=>{const[a,s]=Ft(!1),l=Bt(null);return Mt(()=>{if(l.current){const{clientWidth:e}=l.current;s(e<1.05*(n-r)&&e>.95*(n-r))}},[n,r,o]),t(Tr,{$gap:0,children:[o&&e(Qc,{text:a?o:void 0,children:e(rp,{ref:l,$maxWidth:n-r,size:r,color:i,children:o})}),a&&e(rp,{$maxWidth:r,size:r,color:i,children:"..."})]})},ap=o.div`
594
- width: 100%;
595
- height: 100%;
596
-
597
- * {
598
- animation: none !important;
599
- transition: none !important;
600
- }
601
- `,sp=({width:t="100%",height:n="100%",gap:o=0,elements:r,noAnimation:i=!1,onTopIndexChange:a})=>{const s=Bt(null),l=zt(()=>o?r.map((t,n)=>e("div",{style:{paddingBottom:o},children:t},`scroll-y-item-${n}`)):r,[r,o]),c=Ut(e=>{if(!a||!s.current)return;const t=s.current.findItemIndex(e);a(t)},[a]),d=e(en,{ref:s,style:{width:t,height:n},onScroll:a?c:void 0,children:l});return i?e(ap,{children:d}):d},lp=o.div`
602
- display: flex;
603
- flex-direction: column;
604
- gap: 16px;
605
- ${({$maxWidth:e})=>e&&`max-width: ${e};`}
606
- `,cp=o.div`
607
- display: flex;
608
- align-items: center;
609
- gap: 16px;
610
- `,dp=o.div`
611
- width: 50px;
612
- height: 50px;
613
- border-radius: 8px;
614
- background: ${({theme:e})=>`linear-gradient(90deg, ${e.v2.colors.grey[600]} 25%, ${e.v2.colors.grey[600]} 50%, ${e.v2.colors.silver[500]} 75%)`};
615
- background-size: 200% 100%;
616
- animation: ${xd} 10s infinite linear;
617
- `,pp=o(Ar)`
618
- flex: 1;
619
- gap: 12px;
620
- `,up=o.div`
621
- width: ${({$width:e})=>e};
622
- height: 16px;
623
- background: ${({theme:e})=>`linear-gradient(90deg, ${e.v2.colors.grey[600]} 25%, ${e.v2.colors.grey[600]} 50%, ${e.v2.colors.silver[500]} 75%)`};
624
- background-size: 200% 100%;
625
- animation: ${xd} 1.5s infinite linear;
626
- border-radius: 4px;
627
- `,hp=({size:n=5,maxWidth:o})=>e(lp,{$maxWidth:o,children:[...Array(n)].map((n,o)=>t(cp,{children:[e(dp,{}),t(pp,{children:[e(up,{$width:"80%"}),e(up,{$width:"100%"})]})]},o))}),gp=o.div`
628
- display: flex;
629
- align-items: center;
630
- justify-content: center;
631
- gap: 4px;
632
- min-width: ${({$minWidth:e})=>e};
633
- width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
634
- padding: ${({$hasLabel:e})=>e?"4px 8px":"4px"};
635
- border-radius: 100px;
636
- background-color: ${({$backgroundColor:e})=>e};
637
- `,mp=({label:n,leftIcon:o,rightIcon:r,tooltip:a,status:s=_n.Unknown,useSecondaryTone:l=!1,invertColors:c=!1,textSize:d,textColor:p,backgroundColor:u,minWidth:h="unset",fullWidth:g=!1})=>{const m=i(),f=n?.toString(),b=On.Loading===s,y=s?[_n.Disabled,On.Disabled,On.Loading].includes(s)?qo(m,s,c?"400":"700"):[_n.Unknown].includes(s)?qo(m,s,"600"):qo(m,s,c?l?"500":"300":l?"700":"500"):m.v2.colors.grey[200],$=p||(c&&![_n.Unknown].includes(s)?y:[_n.Disabled,On.Disabled,On.Loading].includes(s)?m.v2.colors.grey[400]:[Nn.Error,Nn.Warning,Nn.Success].includes(s)?m.v2.colors.black[500]:m.v2.colors.white[500]),v=u||(c&&![_n.Unknown].includes(s)?[_n.Disabled,On.Disabled,On.Loading].includes(s)?m.v2.colors.grey[700]:m.v2.colors.silver[700]:y);return e(Qc,{text:a,fullWidth:g,children:t(gp,{$backgroundColor:v,$minWidth:h,$fullWidth:g,$hasLabel:!!f,children:[b?e(Mr,{withSpinnerOld:!0,scaleSpinnerOld:.5}):o?e(o,{fill:$,size:d?m.v2.text.size[d]+2:14}):null,f?b?e(Mr,{withGradient:!0,title:f,titleSize:d||Zo.XXS}):e(rr,{color:$,size:d||Zo.XXS,nowrap:!0,children:f}):null,r&&e(r,{fill:$,size:d?m.v2.text.size[d]+2:14})]})})},fp=o.span`
638
- font-family: ${({theme:e})=>e.font_family.primary};
639
- font-size: ${({$smallAndDark:e})=>e?"12px":"14px"};
640
- font-weight: 400;
641
- color: ${({theme:e,$smallAndDark:t})=>t?e.v2.colors.grey[400]:e.v2.colors.silver[200]};
642
- `,bp=o.span`
643
- font-family: ${({theme:e})=>e.font_family.primary};
644
- font-size: 14px;
645
- font-weight: 400;
646
- color: ${({theme:e})=>e.v2.colors.red[500]};
647
- `,yp=({label:n,tooltip:o,required:r,badge:i,width:a,smallAndDark:s})=>n||o||r?t(Tr,{$width:a,$justifyContent:"space-between",children:[n&&e(fp,{$smallAndDark:s,children:n}),t(Tr,{$gap:4,children:[i&&e(mp,{...i,textSize:Zo.XXXS}),r&&e(bp,{children:"*"}),o&&e(Qc,{text:o,withIcon:!0})]})]}):null,$p=({errorMessage:n,warnMessage:o,helpMessage:r})=>{const a=i(),s=n?a.v2.colors.red[500]:o?a.v2.colors.yellow[500]:a.v2.colors.silver[200],l=e(ot,{size:12,fill:s});return n||o||r?t(Tr,{$alignItems:"center",children:[l&&e(Ar,{children:l}),e(rr,{size:Zo.XXS,weight:400,color:s,children:n||o||r})]}):null},vp=o.div`
648
- padding: ${({$small:e})=>e?"4px":"6px 12px"};
649
-
650
- display: flex;
651
- align-self: stretch;
652
- align-items: center;
653
- gap: 8px;
654
- border-radius: 6px;
655
- cursor: ${({$clickable:e})=>e?"pointer":"inherit"};
656
-
657
- border: 1px solid ${({theme:e,$disabled:t,$error:n})=>t?e.v2.colors.grey[600]:n?e.v2.colors.red[500]:e.v2.colors.silver[500]};
658
- background: ${({theme:e,$disabled:t})=>t?e.v2.colors.grey[800]:e.v2.colors.black[500]};
659
- ${({$disabled:e,$error:t})=>!e&&!t&&r`
660
- &:hover,
661
- &:active,
662
- &:focus-within {
663
- border: 1px solid ${({theme:e})=>e.v2.colors.silver[300]};
664
- }
665
- `}
666
- `,xp=o.input`
667
- max-width: ${({$maxWidth:e})=>e||"unset"};
668
- width: ${({$width:e})=>e||"unset"};
669
-
670
- flex: 1;
671
- font-family: ${({theme:e})=>e.font_family.primary};
672
- font-size: ${({$small:e})=>e?"12px":"14px"};
673
- font-weight: 400;
674
-
675
- cursor: text;
676
- color: ${({theme:e})=>e.v2.colors.white[500]};
677
- &::placeholder {
678
- color: ${({theme:e})=>e.v2.colors.silver[600]};
679
- }
680
-
681
- &:disabled {
682
- cursor: not-allowed;
683
- color: ${({theme:e})=>e.v2.colors.grey[400]};
684
- &::placeholder {
685
- color: ${({theme:e})=>e.v2.colors.grey[400]};
686
- }
687
- }
688
-
689
- overflow: hidden;
690
- text-overflow: ellipsis;
691
- white-space: nowrap;
692
-
693
- &:read-only {
694
- cursor: pointer;
695
- pointer-events: none;
696
- user-select: none;
697
- }
698
- `,Sp=o.div`
699
- display: flex;
700
- align-items: center;
701
- justify-content: center;
702
- cursor: pointer;
703
- `,wp=({label:n,required:o,tooltip:r,badge:a,leftIcon:s,rightIcon:l,hasError:c,errorMessage:d,warnMessage:p,helpMessage:u,type:h=In.Text,name:g,value:m,onChange:f,disabled:b,maxWidth:y,width:$,small:v=!1,onClick:x,...S})=>{const w=i(),E=h===In.Password,[C,T]=Ft(!1),[A,k]=Ft(null),D=c||!!d||!!A,I=m?w.v2.colors.white[500]:b?w.v2.colors.grey[400]:w.v2.colors.silver[200],N=v?14:18,R=Bt(null),[O,_]=Ft(!1);jt(()=>{const e=R.current;if(!e)return;const t=()=>_(e.scrollWidth>e.clientWidth+1);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[m]),Mt(()=>{if("undefined"==typeof document||!document.fonts?.ready)return;let e=!1;return document.fonts.ready.then(()=>{const t=R.current;!e&&t&&_(t.scrollWidth>t.clientWidth+1)}),()=>{e=!0}},[m]);const L=S.readOnly&&O&&null!=m&&""!==m?String(m):"";return t(Ar,{$width:$,$gap:6,children:[e(yp,{label:n,tooltip:r,required:o,badge:a}),e(vp,{$small:v,$disabled:b,$error:D,$clickable:!!x&&!b,onClick:b?void 0:x,children:t(Qc,{text:L,fullWidth:!0,keepAlive:!0,children:[s?e(s,{size:N,fill:I}):null,e(xp,{"data-id":g,type:C||h===In.Number||h===In.Decimal?In.Text:h,name:g,value:m,onChange:e=>{e.stopPropagation();const t=e.target.value;if(h===In.Number||h===In.Decimal){const n=h===In.Number?pi(t):di(t),o=null!=S.min?Number(S.min):void 0,r=null!=S.max?Number(S.max):void 0,i=h===In.Decimal&&n.endsWith(".");let a=n,s=!1;if(n&&!i){const e=parseFloat(n);isNaN(e)||(null!=r&&e>r?(a=String(r),s=!0):null!=o&&e<o&&(a=String(o),s=!0))}if(e.target.value=a,t&&t!==n)k("Please enter a valid number");else if(s){k(`Value must be ${null!=o&&null!=r?`between ${o} and ${r}`:null!=r?`at most ${r}`:`at least ${o}`}`)}else k(null)}f?.(e)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},disabled:b,$maxWidth:y,$width:$,$small:v,...S,ref:R}),E?e(Sp,{onClick:()=>T(e=>!e),children:e(C?St:wt,{size:N,fill:I})}):l?e(l,{size:N,fill:I}):null]})}),e($p,{errorMessage:A||d,warnMessage:p,helpMessage:u})]})};var Ep,Cp;!function(e){e.S="s",e.L="l"}(Ep||(Ep={})),function(e){e.Filled="filled",e.Underline="underline"}(Cp||(Cp={}));const Tp=o.div`
704
- display: flex;
705
- align-items: center;
706
- gap: 2px;
707
- padding: 3px;
708
- border-radius: 8px;
709
- border: 1px solid ${({theme:e})=>e.v2.colors.grey[500]};
710
- background-color: ${({theme:e})=>e.v2.colors.silver[700]};
711
- width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
712
- `,Ap=o.button`
713
- flex: 1;
714
- display: flex;
715
- align-items: center;
716
- justify-content: center;
717
- gap: 8px;
718
- padding: ${({$size:e})=>e===Ep.S?"4px 8px":"8px 16px"};
719
- border-radius: 6px;
720
- border: 1px solid ${({$isSelected:e,$selectedBorderColor:t})=>e&&t?t:"transparent"};
721
- box-shadow: ${({$isSelected:e})=>e?"0 0 11px 0 rgba(0, 0, 0, 0.32)":"none"};
722
-
723
- ${({$disabled:e,$isSelected:t,$selectedBgColor:n,theme:o})=>e?r`
724
- cursor: not-allowed;
725
- background-color: ${t?(n||o.v2.colors.black[500])+fd["040"]:"transparent"};
726
- `:r`
727
- cursor: pointer;
728
- background-color: ${t?n||o.v2.colors.black[500]:"transparent"};
729
- &:hover {
730
- background-color: ${t?n||o.v2.colors.black[500]:o.v2.colors.silver[800]};
731
- }
732
- `}
733
- `,kp=o.div`
734
- display: flex;
735
- align-items: stretch;
736
- width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
737
- `,Dp=o.button`
738
- display: flex;
739
- height: 34px;
740
- padding: 8px 12px 8px 16px;
741
- justify-content: center;
742
- align-items: center;
743
- gap: 8px;
744
- border: none;
745
- border-bottom: 2px solid ${({theme:e,$isSelected:t})=>t?e.v2.colors.white[500]:"transparent"};
746
- border-radius: ${({$isSelected:e})=>e?"6px 6px 0 0":"0"};
747
- background-color: ${({theme:e,$isSelected:t})=>t?e.v2.colors.silver[1e3]:"transparent"};
748
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
749
- transition:
750
- border-color 0.2s,
751
- background-color 0.2s,
752
- border-radius 0.2s;
753
- &:hover {
754
- border-bottom-color: ${({theme:e,$isSelected:t})=>t?e.v2.colors.white[500]:e.v2.colors.grey[500]};
755
- }
756
- `,Ip=({"data-id":o,size:r=Ep.S,variant:a=Cp.Filled,options:s=[],selected:l,setSelected:c,disabled:d,fullWidth:p=!1})=>{const u=i(),h=a===Cp.Underline,g=h?Dp:Ap;return e(h?kp:Tp,{"data-id":o,$fullWidth:p,children:s.map(({value:o,label:i,icon:a,tooltip:s,selectedBgColor:p,selectedBorderColor:m,disabled:f},b)=>{const y=l===o,$=f||d,v=$?u.v2.colors.grey[400]:h||y?u.v2.colors.white[500]:u.v2.colors.grey[300],x=r===Ep.S?Zo.XXS:Zo.XS,S=y?500:400,w=t(n,{children:[a&&e(a,{fill:v}),i&&e(rr,{size:x,weight:S,color:v,nowrap:!0,children:i})]});return e(g,{onClick:()=>!$&&c(o),$disabled:$,$isSelected:y,$size:r,...!h&&{$selectedBgColor:p,$selectedBorderColor:m},children:s?e(Qc,{text:s,withIcon:!0,children:w}):w},`segment-${i||b}-${o}`)})})},Np=o.div`
757
- box-sizing: border-box !important;
758
- width: ${({$width:e})=>e??"fit-content"};
759
- padding: ${({$withSegment:e})=>e?"2px 2px 2px 12px":"6px 12px"};
760
- display: flex;
761
- align-self: stretch;
762
- align-items: center;
763
- gap: 8px;
764
- overflow: hidden;
765
- border-radius: 6px;
766
-
767
- border: none;
768
- border-radius: 6px;
769
- background: ${({$isHovered:e,$isActive:t,$idleBackgroundColor:n,$emphasizeBackgroundColor:o,theme:r})=>{const i=n??r.v2.colors.silver[800],a=o??r.v2.colors.silver[700];return e||t?a:i}};
770
- `,Rp=o.input`
771
- min-width: 0;
772
- flex: 1;
773
- font-family: ${({theme:e})=>e.font_family.primary};
774
- font-size: 14px;
775
- font-weight: 400;
776
- line-height: 20px;
777
-
778
- cursor: text;
779
- color: ${({$textColor:e})=>e};
780
- &::placeholder {
781
- color: ${({$textColor:e})=>e};
782
- }
783
-
784
- overflow: hidden;
785
- text-overflow: ellipsis;
786
- white-space: nowrap;
787
- `,Op=({"data-id":n,value:o,onChange:r,onFocus:a,onBlur:s,placeholder:l,width:c,segment:d,idleBackgroundColor:p,emphasizeBackgroundColor:u})=>{const h=i(),[g,m]=Ft(!1),[f,b]=Ft(!1),[y,$]=Ft(!1),v=g?h.v2.colors.white[500]:h.v2.colors.silver[200],x=!!d?.options?.length,S=zt(()=>{if(x)return d?.options.find(e=>e.value===d.selected)?.label},[x,d?.options,d?.selected]),w=zt(()=>l||(x&&S?`Search by ${S.toLowerCase()}`:"Search..."),[l,x,S]);return t(Np,{$width:c,$withSegment:x,onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),$isHovered:f&&!y,$isActive:g,$idleBackgroundColor:p,$emphasizeBackgroundColor:u,children:[e(Et,{size:18,fill:v}),e(Rp,{"data-id":n??"search",name:"search",type:"text",placeholder:w,value:o,onChange:e=>{e.stopPropagation(),r(e.target.value)},onFocus:()=>{m(!0),a?.()},onBlur:()=>{m(!1),s?.()},$textColor:v}),x&&e("div",{style:{flexShrink:0},onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),children:e(Ip,{"data-id":d["data-id"],options:d.options,selected:d.selected,setSelected:d.setSelected})})]})},_p=o.div`
788
- display: flex;
789
- align-items: center;
790
- justify-content: center;
791
- width: fit-content;
792
- height: fit-content;
793
- padding: 8px;
794
- border-radius: 100%;
795
- background-color: ${({theme:e})=>e.v2.colors.silver[700]};
796
- `,Lp=({icon:n=xt,hideIcon:o=!1,title:r="No data",subTitle:a,button:s})=>{const l=i().v2.colors.silver[200];return t(Ar,{$gap:12,$alignItems:"center",children:[!o&&e(_p,{children:e(n,{size:32,fill:l})}),t(Ar,{$gap:4,$alignItems:"center",children:[e(rr,{size:Zo.S,align:"center",children:r}),a&&e(rr,{size:Zo.XXS,align:"center",color:l,children:a})]}),s&&e(Fd,{variant:_d.Secondary,...s})]})};var Pp;!function(e){e.S="small",e.L="large"}(Pp||(Pp={}));const Fp=o.div`
797
- width: fit-content;
798
- display: flex;
799
- align-items: center;
800
- gap: 8px;
801
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
802
- `,Mp=o.div`
803
- width: ${({$size:e})=>e===Pp.S?"16px":"20px"};
804
- height: ${({$size:e})=>e===Pp.S?"16px":"20px"};
805
- display: flex;
806
- align-items: center;
807
- justify-content: center;
808
- border-radius: 4px;
809
- border: 1px solid ${({$borderColor:e})=>e};
810
- background-color: ${({$backgroundColor:e})=>e};
811
- `,zp=({name:n,label:o,tooltip:r,badge:a,size:s=Pp.L,disabled:l,partiallyChecked:c,value:d,onChange:p,errorMessage:u,warnMessage:h,helpMessage:g})=>{const m=i(),[f,b]=Ft(!1),y=c||d,$=s===Pp.S?12:16,v=l?m.v2.colors.grey[400]:m.v2.colors.white[500],x=y?"transparent":l?m.v2.colors.grey[700]:f?m.v2.colors.silver[400]:m.v2.colors.silver[600],S=l?m.v2.colors.grey[600]:y?m.v2.colors.purple[500]:m.v2.colors.silver[900];return t(Ar,{$gap:4,children:[t(Tr,{$justifyContent:"space-between",children:[t(Fp,{"data-id":n||"checkbox"+(o?`-${o}`:""),onClick:e=>{e.stopPropagation(),l||p(!!c||!d)},$disabled:l,onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),children:[e(Mp,{$size:s,$borderColor:x,$backgroundColor:S,children:c?e(Ct,{size:$,fill:v}):d?e(bt,{size:$,fill:v}):null}),o&&e(rr,{size:s===Pp.S?Zo.XXS:Zo.XS,nowrap:!0,children:o})]}),e(yp,{tooltip:r,badge:a})]}),e($p,{errorMessage:u,warnMessage:h,helpMessage:g})]})},Up=o.div`
812
- display: flex;
813
- flex-direction: ${({$direction:e})=>e===vn.Horizontal?"row":"column"};
814
- gap: ${({$direction:e})=>e===vn.Horizontal?16:8}px;
815
- `,Bp=({direction:n=vn.Vertical,title:o,size:r,disabled:i,withSelectAll:a,options:s,values:l,setValues:c})=>{const d=r===Pp.S?Zo.XXS:Zo.XS,p=zt(()=>s.every(e=>l[e.id]),[s,l]),u=zt(()=>s.some(e=>l[e.id])&&s.some(e=>!l[e.id]),[s,l]),h=(e,t)=>{c(n=>{const o={...n};return e?o[e]=t:s.forEach(e=>o[e.id]=t),o})};return t(Up,{$direction:n,children:[o&&a?e(zp,{label:o,partiallyChecked:u,value:p,onChange:e=>h("",e),size:r}):o&&!a?e(rr,{size:d,children:o}):null,s.map(t=>e(zp,{...t,value:l[t.id],onChange:e=>h(t.id,e),disabled:i,size:r},`${o}-checkbox-${t.id}`))]})};var jp,Hp;!function(e){e.Left="left",e.Right="right"}(jp||(jp={})),function(e){e.Top="top",e.Bottom="bottom"}(Hp||(Hp={}));const Wp=o.div`
816
- position: relative;
817
- display: flex;
818
- flex-direction: column;
819
- gap: 4px;
820
- `,Gp=o.div`
821
- position: fixed;
822
- ${({$coords:e})=>null!=e.top?`top: ${e.top}px;`:""}
823
- ${({$coords:e})=>null!=e.bottom?`bottom: ${e.bottom}px;`:""}
824
- ${({$coords:e})=>null!=e.left?`left: ${e.left}px;`:""}
825
- ${({$coords:e})=>null!=e.right?`right: ${e.right}px;`:""}
826
- ${({$coords:e})=>null!=e.width?`width: ${e.width-16}px;`:""}
827
- z-index: ${({theme:e})=>e.v2.zIndex.dropdown};
828
-
829
- display: flex;
830
- flex-direction: column;
831
- gap: 0;
832
-
833
- min-width: 120px;
834
- padding: 8px;
835
- border-radius: 6px;
836
- background-color: ${({theme:e})=>e.v2.colors.silver[900]};
837
- box-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.3);
838
- `,Xp=o.div`
839
- display: flex;
840
- flex-direction: column;
841
- gap: 0;
842
-
843
- width: 100%;
844
- max-height: ${({$maxHeight:e})=>e||"230px"};
845
- overflow-y: auto;
846
- `,Kp=o.div`
847
- display: flex;
848
- align-items: center;
849
- gap: 8px;
850
- width: calc(100% - 16px);
851
- padding: 8px;
852
- border-radius: 6px;
853
- cursor: pointer;
854
- ${({$selected:e})=>e?r`
855
- background-color: ${({theme:e})=>e.v2.colors.silver[500]};
856
- `:r`
857
- background-color: transparent;
858
- &:hover {
859
- background-color: ${({theme:e})=>e.v2.colors.grey[700]};
860
- }
861
- `}
862
- `,Vp=({defaultOpen:n,open:o,onOpenChange:r,alignX:a,alignY:s,items:l,selectedIds:c,setSelectedIds:d,label:p,withMultiSelect:u,withSearch:h,fullWidth:g,maxHeight:m,buttonProps:f,iconButtonProps:b,isLoading:y,emptyMessage:$,children:v})=>{const x=i(),S=void 0!==o,w=!!f||!!b||!!v,[E,C]=Ft(n??!w),T=S?o:E,A=Ut(e=>{S||C(e),r?.(e)},[S,r]),[k,D]=Ft({x:a||jp.Left,y:s||Hp.Bottom}),I=Bt(null);Nc(I,()=>A(!1));const[N,R]=Ft({}),O=Ut((e,t)=>{const n=I.current?.getBoundingClientRect();if(!n)return;const o=w?8:0;R({top:t===Hp.Bottom?w?n.bottom+o:n.top:void 0,bottom:t===Hp.Top?w?window.innerHeight-n.top+o:window.innerHeight-n.bottom:void 0,left:e===jp.Left?n.left:void 0,right:e===jp.Right?window.innerWidth-n.right:void 0,width:g?n.width:void 0})},[w,g]),_=e=>{const t=!T;if(A(t),!t)return;const n={x:a||(e.clientX>window.innerWidth/2?jp.Right:jp.Left),y:s||(e.clientY>window.innerHeight/2?Hp.Top:Hp.Bottom)};D(n),O(n.x,n.y)};jt(()=>{T&&O(k.x,k.y)},[T,k.x,k.y,O]);const L=e=>{d(u?c.includes(e)?c.filter(t=>t!==e):[...c,e]:[e]),w&&!u&&A(!1)},[P,F]=Ft(""),M=zt(()=>P?l.filter(e=>e?.label?.toLowerCase().includes(P.toLowerCase())):l,[l.length,P]);return t(Wp,{ref:I,children:[p&&e(yp,{label:p}),f&&e(Fd,{...f,fullWidth:g,rightIcon:T?Tt:At,onClick:_}),b&&e(Fd,{variant:_d.Text,size:Ld.S,...b,onClick:_}),"function"==typeof v?v({ChevronIcon:T?Tt:At,handleClick:_}):v,T&&Zt(t(Gp,{$coords:N,"data-ignore-outside-click":"true",children:[h&&e(Op,{value:P,onChange:F,width:"100%"}),y?e(Mr,{withSpinner:!0,title:"Loading...",titleSize:Zo.XS}):M.length?e(Xp,{$maxHeight:m,children:M.map(n=>{if(!n)return null;const{id:o,label:r,icon:i,withCheckbox:a}=n,s=c.includes(o);return t(Kp,{"data-id":`option-${o}`,$selected:s&&!a,onClick:()=>L(o),children:[a&&e(zp,{value:s,onChange:()=>L(o)}),i&&e(i,{size:14,fill:n.color||x.v2.colors.white[500]}),e(rr,{size:Zo.XS,nowrap:!0,color:n.color||er.Primary,children:r})]},o)})}):e(Cr,{$padding:"6px 0",children:e(Lp,{hideIcon:!0,title:"No results",subTitle:$})}),u&&!!M.length&&e(Fd,{label:"Done",onClick:()=>A(!1)})]}),document.body)]})},Jp=t=>{const{"data-id":n,options:o,placeholder:r="Search...",isLoading:i}=t,a=!0===t.multiple,[s,l]=Ft(""),[c,d]=Ft(!1),p=zt(()=>a?t.value:t.value?[t.value]:[],[a,t.value]),u=zt(()=>{if(a){const e=p.length;return e?1===e?o.find(e=>e.id===p[0])?.label??"":`${e} selected`:""}return t.value?o.find(e=>e.id===t.value)?.label??"":""},[a,t,o,p]),h=c?s:u,g=zt(()=>{const e=a?o.map(e=>({...e,withCheckbox:!0})):o;if(!s)return e;const t=s.toLowerCase();return e.filter(e=>e.label.toLowerCase().includes(t))},[a,o,s]),m=Ut(()=>{l(""),d(!0)},[]),f=Ut(e=>{l(e.target.value),c||d(!0),a||e.target.value||!t.value||t.onSelect(null)},[c,a,t]),b=Ut(e=>{d(e),e||l("")},[]),y=Ut(e=>{if(a)return void t.onSelect(e);const n=o.find(t=>t.id===e[0]);n&&(t.onSelect(n),l(""),d(!1))},[a,t,o]),$=c&&(i||g.length>0||s.length>0);return e(Vp,{open:$,onOpenChange:b,items:g,selectedIds:p,setSelectedIds:y,withMultiSelect:a,isLoading:i,emptyMessage:`No results matched the filter '${s}'`,fullWidth:!0,alignY:Hp.Bottom,children:e(wp,{name:n,leftIcon:Et,placeholder:r,value:h,onChange:f,onFocus:m})})},qp=o.button`
863
- width: 100%;
864
- padding: 0;
865
- padding-right: 12px;
866
- display: flex;
867
- align-items: center;
868
- justify-content: flex-start;
869
- gap: 12px;
870
- border-radius: 8px;
871
- border: none;
872
- ${({$hovered:e})=>e?r`
873
- background-color: ${({theme:e})=>e.v2.colors.silver[750]};
874
- `:r`
875
- background-color: ${({theme:e})=>e.v2.colors.silver[800]};
876
- `}
877
- overflow: hidden;
878
- cursor: pointer;
879
- &:disabled {
880
- cursor: not-allowed;
881
- opacity: 0.5;
882
- }
883
- `,Yp=o.div`
884
- width: ${({$hasIcon:e})=>e?"56px":"0"};
885
- height: 56px;
886
- display: flex;
887
- align-items: center;
888
- justify-content: center;
889
- ${({$hovered:e})=>e?r`
890
- background-color: ${({theme:e})=>e.v2.colors.silver[600]};
891
- `:r`
892
- background-color: ${({theme:e})=>e.v2.colors.silver[700]};
893
- `}
894
- `,Qp=o.div`
895
- width: ${({$hasIcon:e})=>e?"calc(100% - 56px)":"100%"};
896
- display: flex;
897
- justify-content: space-between;
898
- align-items: center;
899
- gap: 8px;
900
- `,Zp=({label:n,icon:o,loading:r,disabled:i,onClick:a})=>{const[s,l]=Ft(!1);return t(qp,{$hovered:s,type:"button",disabled:i||r,onClick:a,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[e(Yp,{$hovered:s,$hasIcon:!!o,children:o&&e(o,{size:36})}),t(Qp,{$hasIcon:!!o,children:[r?e(Od,{size:16}):e(rr,{variant:Qo.Span,align:"center",children:n}),e(kt,{rotate:90,size:24})]})]})},eu=({buttons:t})=>e(Ar,{$gap:12,children:t.map(t=>e(Zp,{...t},t.label))});var tu;!function(e){e.Button="button",e.ButtonDropData="button-drop-data"}(tu||(tu={}));const nu=({onAnyClick:t,actions:n})=>e(Tr,{$gap:8,$alignItems:"center",children:n?.map(n=>{if(!n)return null;switch(n.type){case tu.Button:return e(Fd,{...n.buttonProps,onClick:e=>{n.buttonProps?.onClick?.(e),t?.()}},n.id);case tu.ButtonDropData:return e(Vp,{...n.dropDataProps,items:n.dropDataProps?.items??[],withMultiSelect:!1,selectedIds:[],setSelectedIds:e=>{n.buttonProps?.onClick?.(e[0]),t?.()},buttonProps:n.buttonProps},n.id);default:return null}})}),ou=({children:t,fullText:n,...o})=>{const r=Bt(null),[i,a]=Ft(!1);jt(()=>{const e=r.current;if(!e)return;const t=()=>{a(e.scrollWidth>e.clientWidth+1)};t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[t]),Mt(()=>{if("undefined"==typeof document||!document.fonts?.ready)return;let e=!1;return document.fonts.ready.then(()=>{const t=r.current;!e&&t&&a(t.scrollWidth>t.clientWidth+1)}),()=>{e=!0}},[t]);const s=i?n??(null==t?"":String(t)):"";return e(Qc,{text:s,fullWidth:!0,ellipsis:!0,keepAlive:!0,children:e(rr,{ref:r,...o,children:t})})},ru=o.div`
901
- display: flex;
902
- align-items: center;
903
- justify-content: center;
904
- padding: 8px;
905
- border-radius: 8px;
906
- background-color: ${({theme:e})=>e.v2.colors.white[500]+fd["004"]};
907
- `,iu=({icon:n,iconWithWrapper:o=!1,title:r,titleSize:i=Zo.S,subTitle:a,subTitleSize:s=Zo.XXS,tooltip:l,withCopy:c,badge:d,gap:p,children:u})=>{const{CopyButton:h}=wc();return t(Tr,{$gap:a?8:6,$alignItems:"center",children:[n&&(o||a?e(ru,{children:e(n,{size:24})}):e(n,{size:24})),r||d||a?t(Ar,{children:[r||d?t(Tr,{$gap:6,$alignItems:"center",children:[r&&e(rr,{size:i,nowrap:!0,children:r}),c&&r&&e(h,{value:r,size:vc.XS}),l&&e(Qc,{text:l,withIcon:!0}),d&&e(mp,{...d})]}):null,a&&e(rr,{size:s,color:er.Secondary,nowrap:!0,children:a})]}):null,e(Tr,{$gap:p,$margin:`0 0 0 ${p??0}px`,$alignItems:"center",children:u})]})},au=o.section`
908
- display: flex;
909
- flex-direction: column;
910
- gap: ${({$moreSpacing:e})=>e?"16px":"12px"};
911
- width: ${({$width:e="100%",$moreSpacing:t})=>`calc(${e} - ${t?32:24}px)`};
912
- align-self: ${({$fullHeight:e})=>e?"stretch":"auto"};
913
- padding: ${({$moreSpacing:e})=>e?"16px":"12px"};
914
- border-radius: ${({$moreSpacing:e})=>e?"16px":"12px"};
915
- background-color: ${({theme:e,$bgTint:t})=>e.v2.colors.silver[t]};
916
- `,su=o(Tr)`
917
- cursor: ${({$clickable:e})=>e?"pointer":"default"};
918
- user-select: ${({$clickable:e})=>e?"none":"auto"};
919
- `,lu=o.div`
920
- display: flex;
921
- align-items: flex-end;
922
- flex-wrap: wrap;
923
- width: 100%;
924
- `,cu=o.div`
925
- width: ${({$cellsPerRow:e})=>e?`calc(${100/e}% - 16px)`:"unset"};
926
- margin: 8px;
927
- display: flex;
928
- flex-direction: column;
929
- gap: 4px;
930
- min-width: 0;
931
- `,du=({item:n,cellsPerRow:o})=>{const{CopyButton:r}=wc(),{spacer:i,title:a,titleTooltip:s,label:l,labelTooltip:c,withCopy:d,badge:p}=n;return i?e("div",{style:{flex:1}}):t(cu,{$cellsPerRow:o,children:[!!a&&e(Qc,{text:s,children:e(ou,{size:Zo.XXXS,color:er.Secondary,nowrap:!0,children:a})}),t(Tr,{$gap:4,children:[p&&e(mp,{...p}),l&&e(Qc,{text:c,children:e(ou,{size:Zo.XS,nowrap:!0,children:l})}),d&&e(r,{value:l||p?.label?.toString()||"",size:vc.XS})]})]})},pu=({bgTint:n="900",width:o,fullHeight:r=!1,moreSpacing:i=!1,richTitle:a,withCollapse:s,collapseIsDefaultOpen:l,badges:c=[],actions:d=[],dropDataActions:p=[],cellsPerRow:u,items:h,children:g})=>{const[m,f]=Ft(l||!1),b=()=>f(e=>!e),y=!s||s&&m,$=!!d.length,v=!!p.length,x=!!c.length;return t(au,{$width:o,$bgTint:n,$fullHeight:r,$moreSpacing:i,children:[(a||s)&&t(su,{$gap:16,$justifyContent:"space-between",$clickable:!!s,onClick:e=>{s&&e.target.closest("section")&&b()},children:[a?e(iu,{...a}):e("div",{}),t(Tr,{$gap:12,children:[$&&y&&e(nu,{actions:d}),x&&e(Tr,{$gap:8,children:c.map(e=>Ht(mp,{...e,key:e.key||e.label}))}),(v||s)&&t(Tr,{$gap:2,children:[v&&e(Vp,{iconButtonProps:{"data-id":"drawer-actions",leftIcon:Dt},items:p,selectedIds:[],setSelectedIds:e=>p?.find(t=>t?.id===e[0])?.onClick?.()}),s&&e(Fd,{variant:_d.Text,size:Ld.S,leftIcon:m?Tt:At,onClick:b})]})]})]}),y&&h?e(lu,{children:h.map(t=>e(du,{item:t,cellsPerRow:u&&u<=h.length?u:void 0},t.id))}):null,y&&g]})};var uu;!function(e){e.S="small",e.M="medium"}(uu||(uu={}));const hu=o.div`
932
- display: flex;
933
- flex-direction: column;
934
- gap: ${({$gap:e})=>e}px;
935
- width: ${({$padding:e})=>`calc(100% - ${2*e}px)`};
936
- align-self: ${({$fullHeight:e})=>e?"stretch":"auto"};
937
- padding: ${({$padding:e})=>e}px;
938
- border-radius: 16px;
939
- background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
940
- `,gu=Lt(({id:n,size:o=uu.M,fullHeight:r=!1,richTitle:i,customTitle:a,search:s,customSearch:l,filters:c,actions:d,children:p},u)=>{const h=o===uu.S?4:16,g=o===uu.S?12:16,m=a??(i?e(iu,{...i}):null),f=l??(s?e(Op,{...s}):null),b=!!m||!!f,y=!!d&&d.length>0;return t(hu,{ref:u,id:n,"data-section-name":n,$padding:g,$gap:h,$fullHeight:r,children:[b||y?t(Tr,{$gap:h,$justifyContent:"space-between",children:[b?t(Tr,{$gap:h,$alignItems:"center",children:[m,f,c]}):null,y&&e(nu,{actions:d??[]})]}):null,p]})});gu.displayName="SectionCard";const mu=o.div`
941
- flex: 1;
942
- align-self: stretch;
943
- display: flex;
944
- align-items: center;
945
- gap: 8px;
946
- padding: 16px;
947
- border-radius: 12px;
948
- background-color: ${({theme:e,$status:t})=>qo(e,t,t===_n.Unknown?"750":"500")};
949
- `,fu=o.div`
950
- display: flex;
951
- align-items: center;
952
- justify-content: center;
953
- width: fit-content;
954
- height: fit-content;
955
- padding: 8px;
956
- border-radius: 12px;
957
- background-color: ${({theme:e,$status:t})=>t===_n.Unknown?qo(e,t,"800"):qo(e,t,"900")+fd["015"]};
958
- `,bu=({status:n,icon:o,title:r,description:a})=>{const s=i(),l=o??zr(n,s),c=[Nn.Default,Nn.Info,_n.Disabled,_n.Unknown].includes(n)?s.v2.colors.white[500]:s.v2.colors.black[500];return t(mu,{$status:n,children:[e(fu,{$status:n,children:e(l,{size:32,fill:c})}),t(Ar,{$gap:2,$justifyContent:"center",children:[e(rr,{size:Zo.M,weight:500,color:c,nowrap:!0,children:r}),e(rr,{size:Zo.XXS,weight:300,color:c,nowrap:!0,children:a})]})]})},yu=o.div`
959
- flex: 0.5;
960
- display: flex;
961
- flex-direction: column;
962
- gap: 12px;
963
- padding: 12px;
964
- border-radius: 12px;
965
- background-color: ${({theme:e})=>e.v2.colors.silver[800]};
966
- `,$u=["-","N/A","undefined","null","undefined/undefined","null/null"],vu=({title:n,cells:o})=>{const r=i();return t(yu,{children:[e(rr,{size:Zo.XXS,color:r.v2.colors.grey[150],children:n}),e(Tr,{$gap:32,children:o.map(o=>t(Ar,{$gap:2,children:[!o.isLoading||o.value&&!$u.includes(o.value)?e(rr,{size:o.label?Zo.M:Zo.L,children:o.value}):e(Id,{scale:.9}),o.label&&e(rr,{size:Zo.XXS,children:o.label})]},`${n}-${o.label}-${o.value}`))})]})};var xu;!function(e){e.CurrentOfMax="currentOfMax",e.GoodAgainstBad="goodAgainstBad"}(xu||(xu={}));const Su=o.div`
967
- display: flex;
968
- align-items: flex-end;
969
- justify-content: space-between;
970
- gap: 24px;
971
- width: fit-content;
972
- `,wu=o.div`
973
- position: relative;
974
- display: flex;
975
- flex-direction: column;
976
- align-items: center;
977
- width: ${({$width:e})=>e??150}px;
978
- flex-shrink: 0;
979
- `,Eu=o.svg`
980
- display: block;
981
- width: 100%;
982
- height: auto;
983
- overflow: visible;
984
- `,Cu=o(Ar)`
985
- position: absolute;
986
- left: 0;
987
- right: 0;
988
- bottom: 4px;
989
- align-items: center;
990
- gap: 2px;
991
- pointer-events: none;
992
- `,Tu=o.span`
993
- display: inline-block;
994
- flex-shrink: 0;
995
- width: 9px;
996
- height: 9px;
997
- border-radius: 50%;
998
- background-color: ${({$color:e})=>e};
999
- `,Au=e=>{if(null==e||""===e)return{number:0,prefix:"",suffix:""};if("number"==typeof e)return{number:e,prefix:"",suffix:""};const t=e.match(/^(\D*)(-?\d*\.?\d+)(.*)$/);return t?{number:parseFloat(t[2]),prefix:t[1]??"",suffix:(t[3]??"").trim()}:{number:0,prefix:"",suffix:""}},ku=10,Du=(e,t,n,o)=>{const r=o*Math.PI/180;return{x:e+n*Math.cos(r),y:t-n*Math.sin(r)}},Iu=(e,t,n,o,r)=>{const i=Du(e,t,n,o),a=Du(e,t,n,r),s=o>r?1:0,l=Math.abs(o-r)>180?1:0;return`M ${i.x} ${i.y} A ${n} ${n} 0 ${l} ${s} ${a.x} ${a.y}`},Nu=({variant:n=xu.CurrentOfMax,gaugeWidth:o,title:r,min:a=0,max:s,current:l,primaryLabel:c,primaryColor:d,secondaryLabel:p,secondaryColor:u})=>{const{number:h}=Au(a),{number:g}=Au(s),{number:m,prefix:f,suffix:b}=Au(l),y=i(),$=((e,t,n)=>Math.min(Math.max(e,t),n))((m-h)/Math.max(g-h,1),0,1),v=180-180*$,x=$>0?Iu(60,60,55,180,v):null,S=$<1?Iu(60,60,55,v,0):null,w=Du(60,60,55,180),E=Du(60,60,55,0),C=d??(n===xu.GoodAgainstBad?y.v2.colors.green[500]:y.v2.colors.purple[400]),T=u??(n===xu.GoodAgainstBad?y.v2.colors.red[500]:y.v2.colors.silver[500]),[A,k]=Ft(null),D=e=>`${f}${e}${b}`,I=n===xu.GoodAgainstBad?Math.max(g-m,0):g,N="primary"===A?c:"secondary"===A?p:"",R="primary"===A?D(m):"secondary"===A?D(I):"",O=()=>k("primary"),_=()=>k("secondary"),L=()=>k(null);return t(Su,{children:[t(wu,{$width:o,children:[e(Qc,{keepAlive:!0,fullWidth:!0,title:N,text:R,children:t(Eu,{viewBox:"0 0 120 65",role:"img","aria-label":`${r}: ${m} of ${g}`,children:[x&&e("path",{d:x,fill:"none",stroke:C,strokeWidth:ku,strokeLinecap:1===$?"round":"butt",onMouseEnter:O,onMouseLeave:L}),S&&e("path",{d:S,fill:"none",stroke:T,strokeWidth:ku,strokeLinecap:0===$?"round":"butt",onMouseEnter:_,onMouseLeave:L}),$>0&&e("circle",{cx:w.x,cy:w.y,r:5,fill:C,onMouseEnter:O,onMouseLeave:L}),$<1&&e("circle",{cx:E.x,cy:E.y,r:5,fill:T,onMouseEnter:_,onMouseLeave:L})]})}),r&&t(Cu,{children:[e(rr,{size:Zo.XXXS,color:y.v2.colors.grey[150],align:"center",children:r}),e(rr,{size:Zo.L,weight:500,align:"center",children:`${f}${m}${b}`})]})]}),t(Ar,{$gap:7,children:[t(Tr,{$gap:8,$alignItems:"center",children:[e(Tu,{$color:C}),e(rr,{size:Zo.XXXS,color:y.v2.colors.grey[150],nowrap:!0,children:c})]}),t(Tr,{$gap:8,$alignItems:"center",children:[e(Tu,{$color:T}),e(rr,{size:Zo.XXXS,color:y.v2.colors.grey[150],nowrap:!0,children:p})]})]})]})},Ru=o(Tr)`
1000
- width: calc(100% - 20px);
1001
- padding: 8px 12px;
1002
- border-radius: 6px;
1003
- background-color: ${({theme:e,$bgTint:t})=>e.v2.colors.silver[t||"800"]};
1004
- display: flex;
1005
- align-items: center;
1006
- justify-content: space-between;
1007
- gap: 12px;
1008
- `,Ou=o.div`
1009
- position: relative;
1010
- width: ${({$hideCopy:e})=>e?"100%":"calc(100% - 24px - 12px)"};
1011
- display: flex;
1012
- align-items: center;
1013
- gap: 4px;
1014
- `,_u=o.pre`
1015
- flex: 1;
1016
- margin: 0;
1017
- padding: 0;
1018
- font-size: 12px;
1019
- color: #5ffb98; // TODO: add to theme
1020
- overflow-x: auto;
1021
- `,Lu=o.span`
1022
- flex-shrink: 0;
1023
- font-size: 14px;
1024
- color: #5ffb98; // TODO: add to theme
1025
- `,Pu=({bgTint:n,label:o,value:r,hideCopy:i=!1,onDone:a})=>{const{CopyButton:s}=wc({onDone:a}),l=Bt(null),[c,d]=Ft(!1);return Mt(()=>{const e=()=>{if(l.current){const{scrollWidth:e,clientWidth:t}=l.current;d(e>t)}};e();const t=new ResizeObserver(e);return l.current&&t.observe(l.current),()=>{t.disconnect()}},[r]),t(Ar,{$gap:4,children:[o&&e(rr,{size:Zo.XXXS,color:er.Secondary,children:o}),t(Ru,{$bgTint:n,children:[t(Ou,{$hideCopy:i,children:[e(_u,{ref:l,children:r}),c&&e(Lu,{children:"..."})]}),!i&&e(s,{value:r,size:vc.XS})]})]})},Fu=o.div`
1026
- display: flex;
1027
- align-items: center;
1028
- gap: 8px;
1029
- padding: ${({$hideBackground:e,$slim:t})=>e?"0":t?"8px":"16px"};
1030
- width: ${({$width:e})=>e||"auto"};
1031
- border-radius: ${({$isExtended:e})=>e?"12px 12px 0 0":"12px"};
1032
- background-color: ${({$hideBackground:e,$backgroundColor:t})=>e?"transparent":t};
1033
-
1034
- ${({$withHover:e,$hideBackground:t,$hoverBackgroundColor:n})=>e&&r`
1035
- cursor: pointer;
1036
- transition: background 0.2s;
1037
- &:hover {
1038
- background-color: ${t?"transparent":n};
1039
- }
1040
- `}
1041
- `,Mu=o.div`
1042
- display: flex;
1043
- align-items: center;
1044
- justify-content: center;
1045
- flex-shrink: 0;
1046
- width: ${({$slim:e})=>e?"32px":"42px"};
1047
- height: ${({$slim:e})=>e?"32px":"42px"};
1048
- border-radius: 11px;
1049
- background-color: ${({$backgroundColor:e,$slim:t})=>t?"transparent":e};
1050
- ${({$withClick:e})=>e&&r`
1051
- cursor: pointer;
1052
- & * {
1053
- cursor: pointer;
1054
- }
1055
- &:hover {
1056
- transform: scale(1.2);
1057
- }
1058
- `}
1059
- `,zu=o(Ar)`
1060
- flex: 1;
1061
- min-width: 0;
1062
- `,Uu=o.div`
1063
- display: flex;
1064
- align-items: center;
1065
- justify-content: center;
1066
- flex-shrink: 0;
1067
- width: 24px;
1068
- height: 24px;
1069
- `,Bu=({status:n,title:o,subTitle:r,badgeLabel:a,loading:s,action:l,isExtended:c=!1,toggleExtended:d,invertColors:p=!1,hideIcon:u=!1,hideBackground:h=!1,width:g,slim:m=!1})=>{const f=i(),b=zr(n,f),y=d?c?Tt:At:void 0,$=n===_n.Unknown,v=n===_n.Disabled,x=n===On.Loading||s,S=[Nn.Error,Nn.Warning,Nn.Success].includes(n),w=qo(f,n,v?p?"400":"700":$?"600":p?"300":"500"),E=v?f.v2.colors.grey[400]:p?f.v2.colors.white[500]:S?f.v2.colors.black[500]:f.v2.colors.white[500],C=p&&!$?w:E,T=!p||$||v?"rgba(0, 0, 0, 0.13)":qo(f,n,"800"),A=v?f.v2.colors.grey[900]:p||$?f.v2.colors.silver[800]:w,k=v?f.v2.colors.grey[800]:p||$?f.v2.colors.silver[700]:qo(f,n,"600");return t(Fu,{$width:g,$withHover:!!d,$isExtended:c,$hideBackground:h,$backgroundColor:A,$hoverBackgroundColor:k,$slim:m,onClick:d,children:[!u&&e(Mu,{$backgroundColor:T,$slim:m,children:x?e(Mr,{withSpinnerOld:!0,scaleSpinnerOld:1.2}):e(b,{size:32,fill:C})}),t(zu,{$gap:4,$justifyContent:"center",children:[t(Tr,{$gap:10,$alignItems:"center",children:[e(rr,{size:m?Zo.XS:Zo.S,weight:500,color:C,children:o}),a&&e(mp,{label:a,backgroundColor:f.v2.colors.silver[600],textColor:f.v2.colors.white[500],textSize:Zo.XXXS})]}),r&&e(rr,{size:Zo.XXXS,color:E,children:r})]}),l&&e(Mu,{"data-id":l["data-id"],$backgroundColor:f.v2.colors.silver[750],$slim:m,$withClick:!!l.onClick,onClick:l.onClick,children:e(Qc,{text:l.tooltip,children:e(l.icon,{size:32,fill:E})})}),y&&e(Uu,{children:e(y,{size:24,fill:E})})]})},ju=o.div`
1070
- display: flex;
1071
- flex-direction: column;
1072
- width: 100%;
1073
- border-radius: 12px;
1074
- overflow: hidden;
1075
- `,Hu=o.div`
1076
- display: flex;
1077
- flex-direction: column;
1078
- gap: 8px;
1079
- padding: 8px 12px 16px 12px;
1080
- background-color: ${({theme:e})=>e.v2.colors.silver[900]};
1081
- `,Wu=o.div`
1082
- display: flex;
1083
- align-items: center;
1084
- gap: 8px;
1085
- `,Gu=o.div`
1086
- display: flex;
1087
- align-items: center;
1088
- justify-content: center;
1089
- flex-shrink: 0;
1090
- width: 18px;
1091
- height: 18px;
1092
- `,Xu=({conditions:n,title:o,subTitle:r})=>{const a=i(),[s,l]=Ft(!1),c=Ut(()=>l(e=>!e),[]),d=zt(()=>ai(n),[n]),{errors:p,hasErrors:u,warnings:h,hasWarnings:g,hasDisableds:m,hasLoadings:f}=zt(()=>Co(d),[d]);Mt(()=>{l(u||g||m)},[u,g,m]);const b=zt(()=>(!d.length||f)&&!u&&!g&&!m,[d.length,f,u,g,m]),y=zt(()=>u?Nn.Error:g?Nn.Warning:m?Nn.Info:Nn.Success,[u,g,m]),$=zt(()=>o||(1===d.length?ii(d[0].reason||d[0].type):void 0)||(({hasErrors:e,hasWarnings:t,hasDisableds:n,loading:o})=>{const r="Something isn't right";return e?"Something Failed":t||n?r:o?"Loading...":"Everything Successful"})({hasErrors:u,hasWarnings:g,hasDisableds:m,loading:b}),[o,d,u,g,m,b]),v=zt(()=>r||1===d.length&&d[0].message||void 0,[r,d]),x=zt(()=>`${u?p.length:g?h.length:d.length}/${d.length}`,[u,p.length,g,h.length,d.length]);return t(ju,{children:[e(Bu,{status:y,invertColors:!0,title:$,subTitle:v,badgeLabel:x,loading:b,isExtended:s,toggleExtended:c}),s&&e(Hu,{children:d.map(({status:n,type:o,reason:r,message:i},s)=>{const l=n===On.Loading,c=n===On.Disabled?Nn.Info:n,d=l?null:zr(c,a),p=n===Nn.Error?qo(a,Nn.Error,"500"):n===Nn.Warning?qo(a,Nn.Warning,"500"):a.v2.colors.white[500],u=[o,i||r].filter(Boolean).join(" - ");return t(Wu,{children:[e(Gu,{children:l||!d?e(Mr,{withSpinnerOld:!0,scaleSpinnerOld:.8}):e(d,{size:18})}),e(rr,{size:Zo.XXXS,color:p,lineHeight:"16px",children:u})]},`condition-${s}`)})})]})};var Ku,Vu,Ju;!function(e){e.Default="default",e.SuccessError="successError"}(Ku||(Ku={})),function(e){e.S="small",e.L="large"}(Vu||(Vu={})),function(e){e.Left="left",e.Right="right"}(Ju||(Ju={}));const qu=o.div`
1093
- display: flex;
1094
- align-items: center;
1095
- gap: ${({$gap:e})=>e}px;
1096
- `,Yu=o.div`
1097
- position: relative;
1098
- display: flex;
1099
- align-items: center;
1100
- justify-content: space-between;
1101
-
1102
- width: ${({$size:e})=>2*e+2}px;
1103
- height: ${({$size:e})=>e}px;
1104
- padding: ${4}px;
1105
- border-radius: ${({$size:e})=>2*e}px;
1106
- background-color: ${({$disabled:e,$onBgColor:t,$offBgColor:n,$variant:o,$value:r,theme:i})=>{if(e)return i.v2.colors.grey[800];if(t&&r)return t;if(n&&!r)return n;switch(o){case Ku.SuccessError:return r?i.v2.colors.green[500]:i.v2.colors.red[500];case Ku.Default:default:return r?i.v2.colors.purple[500]:i.v2.colors.grey[400]}}};
1107
-
1108
- border: 1px solid ${({$disabled:e,theme:t})=>e?t.v2.colors.grey[600]:"transparent"};
1109
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
1110
- `,Qu=o.div`
1111
- position: absolute;
1112
- top: 50%;
1113
- left: ${({$value:e,$size:t})=>e?`calc(100% - ${t}px - 4px)`:"4px"};
1114
- transform: translateY(-50%);
1115
- width: ${({$size:e})=>e}px;
1116
- height: ${({$size:e})=>e}px;
1117
- border-radius: 100%;
1118
- background-color: ${({$color:e})=>e};
1119
- box-shadow: ${({$disabled:e})=>e?"0 0 40px 0 rgba(0, 0, 0, 0.07)":"0 0 10px 0 rgba(0, 0, 0, 0.50)"};
1120
- `,Zu=({variant:o=Ku.Default,size:r=Vu.L,name:a,label:s,labelAlign:l=Ju.Right,labelColor:c,tooltip:d,badge:p,value:u,onChange:h,disabled:g,withIcon:m,onIcon:f=bt,offIcon:b=xt,onBgColor:y,offBgColor:$,errorMessage:v,warnMessage:x,helpMessage:S})=>{const w=i(),E=g?w.v2.colors.grey[400]:w.v2.colors.white[500],C=r===Vu.S?10:16,T=c||w.v2.colors.silver[200],A=r===Vu.S?Zo.XXXS:Zo.XS,k=r===Vu.S?8:12;return t(Ar,{$gap:4,children:[t(Tr,{$justifyContent:"space-between",children:[t(qu,{"data-id":a||"toggle"+(s?`-${s}`:""),"data-toggle-value":u?"true":"false",$gap:k,children:[s&&l===Ju.Left&&e(rr,{color:T,size:A,nowrap:!0,children:s}),t(Yu,{$onBgColor:y,$offBgColor:$,$variant:o,$size:C,$value:u,$disabled:g,onClick:e=>{e.stopPropagation(),g||h(!u)},children:[e(Qu,{$color:E,$size:C,$value:u,$disabled:g}),m&&t(n,{children:[e(f,{size:C,fill:E}),e(b,{size:C,fill:E})]})]}),s&&l===Ju.Right&&e(rr,{color:T,size:A,nowrap:!0,children:s})]}),e(yp,{tooltip:d,badge:p})]}),e($p,{errorMessage:v,warnMessage:x,helpMessage:S})]})},eh=o.div`
1121
- display: flex;
1122
- flex-direction: ${({$direction:e})=>e===vn.Horizontal?"row":"column"};
1123
- gap: ${({$direction:e})=>e===vn.Horizontal?16:8}px;
1124
- `,th=({direction:n=vn.Vertical,title:o,size:r,disabled:i,options:a,values:s,setValues:l})=>{const c=r===Vu.S?Zo.XS:Zo.S;return t(eh,{$direction:n,children:[o&&e(rr,{size:c,children:o}),a.map(t=>e(Zu,{...t,labelAlign:Ju.Right,value:s[t.id],onChange:e=>{return n=t.id,o=e,void l(e=>{const t={...e};return n?t[n]=o:a.forEach(e=>t[e.id]=o),t});var n,o},disabled:i,size:r},`${o}-toggle-${t.id}`))]})},nh=o.div`
1125
- display: flex;
1126
- align-items: center;
1127
- justify-content: space-between;
1128
- width: 100%;
1129
- overflow: hidden;
1130
- `,oh=o.div`
1131
- display: flex;
1132
- align-items: center;
1133
- gap: 16px;
1134
- padding: 6px 0;
1135
- min-width: 0;
1136
- flex: 1;
1137
- overflow: hidden;
1138
- `,rh=o.div`
1139
- display: flex;
1140
- align-items: center;
1141
- justify-content: center;
1142
- flex: 0 0 36px;
1143
- width: 36px;
1144
- height: 36px;
1145
- border-radius: 8px;
1146
- background: ${({theme:e})=>e.v2.colors.silver[800]};
1147
- `,ih=o.img`
1148
- width: 24px;
1149
- height: 24px;
1150
- `,ah=o.div`
1151
- display: flex;
1152
- align-items: center;
1153
- gap: 16px;
1154
- flex-shrink: 0;
1155
- `,sh=({icon:n,iconSrc:o,title:r,titleBadges:i,subTitle:a,toggleProps:s,actions:l,onClose:c,onCloseDisabled:d})=>t(nh,{children:[t(oh,{children:[n?e(rh,{children:e(n,{size:24})}):o?e(rh,{children:e(ih,{src:o,alt:r||"icon"})}):null,(r||i?.length||a)&&t(Ar,{$gap:6,children:[(r||i?.length)&&t(Tr,{$gap:16,children:[r&&e(rr,{size:Zo.S,weight:500,children:r}),i?.length&&e(Tr,{$gap:4,children:i?.map(t=>e(mp,{...t},t.label))})]}),a&&e(rr,{size:Zo.XXS,children:a})]})]}),t(ah,{children:[s&&e(Zu,{...s}),l?.length?e(Vp,{iconButtonProps:{"data-id":"drawer-actions",leftIcon:Dt},items:l,selectedIds:l?.filter(e=>e?.active)?.map(e=>e?.id)??[],setSelectedIds:e=>l?.find(t=>t?.id===e[0])?.onClick?.()}):null,c&&e(Sc,{"data-id":"drawer-close",icon:xt,size:vc.M,onClick:c,disabled:d})]})]}),lh=o.div`
1156
- display: flex;
1157
- align-items: center;
1158
- gap: 10px;
1159
- ${({$fullWidth:e})=>e&&r`
1160
- width: calc(100% - 16px);
1161
- `}
1162
- padding: 4px 12px 4px 4px;
1163
- border-radius: 8px;
1164
- background-color: ${({theme:e,$status:t})=>qo(e,t,[Nn.Info,Nn.Warning].includes(t)?"1000":"900")};
1165
- `,ch=o.div`
1166
- width: ${({$smallIcon:e})=>e?"24px":"32px"};
1167
- height: ${({$smallIcon:e})=>e?"24px":"32px"};
1168
- display: flex;
1169
- align-items: center;
1170
- justify-content: center;
1171
- border-radius: 6px;
1172
- background-color: ${({theme:e,$status:t})=>qo(e,t,[Nn.Info].includes(t)?"900":"800")};
1173
- `,dh=o.div`
1174
- margin-left: auto;
1175
- margin-right: 8px;
1176
- cursor: pointer;
1177
- &:hover {
1178
- transform: scale(1.2);
1179
- }
1180
- `,ph=({status:n,message:o,action:r,fullWidth:a,smallIcon:s})=>{const l=i(),c=zr(n,l),d=qo(l,n,n===Nn.Default?"300":n===Nn.Info?"400":"500");return t(lh,{$status:n,$fullWidth:a,children:[e("div",{children:e(ch,{$status:n,$smallIcon:s,children:e(c,{size:s?18:24})})}),e(rr,{color:d,size:Zo.XXXS,weight:400,children:o}),r&&e(dh,{"data-id":r["data-id"],onClick:r.onClick,children:e(rr,{color:d,size:Zo.XXS,weight:500,underline:!0,children:r.label})})]})},uh=o.div`
1181
- display: flex;
1182
- align-items: center;
1183
- gap: 8px;
1184
- padding: 4px 12px;
1185
- `,hh=o.div`
1186
- flex: 1;
1187
- `,gh=o.div`
1188
- width: 150px;
1189
- `,mh=({note:n,actions:o,children:r})=>r?e(uh,{children:r}):t(uh,{children:[n&&e(ph,{...n}),e(hh,{}),o?.map((t,n)=>e(gh,{children:e(Fd,{fullWidth:!0,...t})},t["data-id"]||`drawer-footer-button-${n}`))]}),fh=o.div`
1190
- position: fixed;
1191
- top: 0;
1192
- bottom: 0;
1193
- ${({$position:e})=>e}: 0;
1194
- z-index: ${({theme:e})=>e.v2.zIndex.drawer};
1195
-
1196
- display: flex;
1197
- flex-direction: column;
1198
- gap: 12px;
1199
-
1200
- width: calc(${({$width:e})=>e} - 32px);
1201
- padding: 12px;
1202
- border-radius: ${({$position:e})=>"left"===e?"0 20px 20px 0":"20px 0 0 20px"};
1203
- background: ${({theme:e})=>e.v2.colors.black[500]};
1204
- box-shadow: 0 0 34px 0 rgba(0, 0, 0, 0.7);
1205
- overflow: hidden;
1206
-
1207
- ${({$disableAnimation:e,$position:t})=>!e&&r`
1208
- animation-name: ${yd.in[t]};
1209
- `}
1210
- `,bh=o.div`
1211
- display: flex;
1212
- flex-direction: column;
1213
- gap: 12px;
1214
-
1215
- height: calc(100% - ${56}px);
1216
- overflow-y: auto;
1217
- `,yh=({isOpen:o,hideOverlay:r=!1,disableAnimation:i=!1,position:a="right",width:s="600px",header:l,footer:c,children:d})=>(fc(o),o?Zt(t(n,{children:[!r&&e(Ir,{onClick:l?.onCloseDisabled?void 0:l?.onClose}),t(fh,{"data-id":"drawer",$position:a,$width:s,$disableAnimation:i,children:[l&&e(sh,{...l}),e(bh,{children:d}),c&&e(mh,{...c})]})]}),document.body):null),$h=({options:t,values:n,setValues:o,withMultiSelect:r,withSearch:i,...a})=>{const s=zt(()=>t.filter(e=>n.includes(e.id)),[t,n]),l=zt(()=>s.map(e=>e.label).join(", "),[s]);return e(Vp,{withMultiSelect:r,withSearch:i,fullWidth:!0,alignX:jp.Left,items:t,selectedIds:n,setSelectedIds:o,children:({ChevronIcon:t,handleClick:n})=>e(wp,{placeholder:"Select options...",...a,rightIcon:t,leftIcon:1===s.length?s[0].icon:void 0,value:l,onChange:()=>{},onClick:n,readOnly:!0,tabIndex:-1,width:"100%"})})},vh=o.header`
1218
- position: relative;
1219
- width: calc(100% - 36px);
1220
- padding: 12px 18px;
1221
- background-color: ${({theme:e})=>e.v2.colors.black[500]};
1222
- display: flex;
1223
- align-items: center;
1224
- justify-content: space-between;
1225
- `,xh=o(Tr)`
1226
- position: absolute;
1227
- left: 50%;
1228
- transform: translateX(-50%);
1229
- gap: 16px;
1230
- `,Sh=({left:n=[],center:o=[],right:r=[]})=>t(vh,{children:[e(Tr,{$gap:16,children:n}),e(xh,{children:o}),e(Tr,{$gap:16,children:r})]}),wh=o.div`
1231
- display: flex;
1232
- align-items: center;
1233
- gap: 2px;
1234
- width: fit-content;
1235
- padding: 4px;
1236
- border-radius: 8px;
1237
- background-color: ${({theme:e})=>e.v2.colors.silver[600]};
1238
- box-shadow: 0 3px 8px 0 rgba(0, 0, 0, 0.25);
1239
-
1240
- position: absolute;
1241
- right: ${({$right:e,$left:t})=>e||(t?"unset":"12px")};
1242
- left: ${({$left:e})=>e||"unset"};
1243
- top: 50%;
1244
- transform: translateY(-50%);
1245
- `,Eh=({isOpen:t,actions:n,positionRight:o,positionLeft:r})=>t?e(wh,{$right:o,$left:r,children:n.map(t=>{if(!t)return null;const{tooltip:n,...o}=t;return e(Qc,{text:n||"",children:e(Fd,{...o,variant:_d.Secondary,size:Ld.S})},o.id)})}):null,Ch=o.div`
1246
- display: flex;
1247
- align-items: center;
1248
- justify-content: center;
1249
- min-width: 32px;
1250
- min-height: 32px;
1251
- aspect-ratio: 1 / 1;
1252
- padding: 2px;
1253
- border-radius: 8px;
1254
- background-color: ${({theme:e,$noBackground:t})=>t?"transparent":e.v2.colors.silver[750]+fd["050"]};
1255
- `,Th=o.div`
1256
- display: flex;
1257
- align-items: center;
1258
- justify-content: center;
1259
- padding: 2px;
1260
- border-radius: 4px;
1261
- background-color: ${({theme:e})=>e.v2.colors.silver[750]+fd["050"]};
1262
- `,Ah=({icons:n,icon:o,iconSrc:r,smallIconSize:i=12,largeIconSize:a=22})=>{if(n&&n.length>1){const o=n.slice(0,3),r=n.length-o.length,a=o.slice(0,2),s=o.slice(2),l=s.length>0;return e("div",{style:{width:"fit-content"},children:e(Ch,{$noBackground:!0,children:t(Ar,{$gap:1,children:[e(Tr,{$gap:1,$justifyContent:"space-between",children:a.map((t,n)=>e(Th,{children:e(t,{size:i})},`top-${n}`))}),l&&t(Tr,{$gap:1,$justifyContent:"space-between",children:[s.map((t,n)=>e(Th,{children:e(t,{size:i})},`bottom-${n}`)),r>0&&e(Th,{children:e(rr,{size:Zo.XXXS,weight:500,children:`+${r}`})})]})]})})})}const s=n?.[0]||o;return e("div",{style:{width:"fit-content"},children:e(Ch,{children:s?e(s,{size:a}):e("img",{src:r,alt:"icon",width:a,height:a})})})},kh=({values:n,setValues:o,name:r,label:a,tooltip:s,badge:l,required:c,errorMessage:d,warnMessage:p,helpMessage:u,placeholder:h,disabled:g})=>{const m=i(),f=n.length<=1,b=g,y=g||f&&b,$=n.length?n:[""];return t(Ar,{"data-id":r,$gap:6,children:[e(yp,{label:a,tooltip:s,required:c,badge:l}),e(Ar,{$gap:8,children:$.map((r,i)=>{const a=i===$.length-1;return t(Tr,{$gap:8,$alignItems:"center",children:[e(wp,{width:"100%",autoFocus:Jr(r)&&!f&&a,value:r,onChange:e=>((e,t)=>{const r=[...n||[]];r[t]=e,o(r)})(e.target.value,i),disabled:g,placeholder:h,hasError:!!d}),a&&e(Fd,{leftIcon:It,variant:_d.Secondary,size:Ld.S,disabled:b,onClick:()=>(()=>{const e=[...n||[]];e.push(""),o(e)})()}),e(Fd,{leftIcon:y?Nt:()=>e(Nt,{fill:m.v2.colors.red[500]}),variant:_d.Secondary,size:Ld.S,disabled:y,onClick:()=>(e=>{const t=[...n||[]].filter((t,n)=>n!==e);t.length||t.push(""),o(t)})(i)})]},`input-list-${i}`)})}),e($p,{errorMessage:d,warnMessage:p,helpMessage:u})]})},Dh=({col:t,colIdx:n,row:o,rowIdx:r,rowsLength:i,handleChange:a,errorMessage:s,disabled:l})=>{const{keyName:c,componentType:d,inputType:p,label:u,placeholder:h,options:g,renderCondition:m,min:f,max:b}=t,y=o[c];if(m&&!m(o))return null;switch(d){case Dn.Dropdown:case"multi-dropdown":{const t="multi-dropdown"===d,n=Array.isArray(y)?y:null!=y&&""!==y?[String(y)]:[],o=g?.filter(e=>n.includes(e.id)).map(e=>e.id)||[];return e($h,{name:c,label:h?u:void 0,placeholder:h||u,options:g||[],withMultiSelect:t,withSearch:t,values:o,setValues:e=>a(c,t?e:e[0]??"",r),disabled:l,hasError:!!s},c)}default:const t=i>1&&0===r&&0===n&&Jr(y);return e(wp,{name:c,label:h?u:void 0,placeholder:h||u,autoFocus:t,type:p,min:f,max:b,value:y,onChange:({target:{value:e}})=>a(c,e,r),disabled:l,hasError:!!s})}},Ih=o.table`
1263
- width: 100%;
1264
- border-collapse: separate;
1265
- border-spacing: 0 8px;
1266
- `,Nh=o.td`
1267
- padding: 0 8px 0 0;
1268
- `,Rh=o.td`
1269
- width: 72px;
1270
- padding-bottom: 2px;
1271
- vertical-align: bottom;
1272
- `,Oh=({columns:n,values:o,setValues:r,name:a,label:s,tooltip:l,badge:c,required:d,disabled:p,errorMessage:u,warnMessage:h,helpMessage:g,limitFieldsPerRow:m})=>{const f=i(),b=zt(()=>{const e={};return n.forEach(({keyName:t})=>e[t]=""),e},[n]),y=(e,t,n)=>{const i=o.length?an(o):[an(b)];i[n][e]=t,r(i)},$=zt(()=>{if(m){const e=[];for(let t=0;;t+=m){const o=n.slice(t,t+m);if(!o.length)break;e.push(o)}return e}return[n]},[m,n]),v=o.length?o:[b];return t(Ar,{"data-id":a,$gap:0,children:[e(yp,{label:s,tooltip:l,required:d,badge:c}),e(Ih,{children:e("tbody",{children:v.map((n,i)=>{const a=i===v.length-1;return t(Pt,{children:[m&&i>0?e("tr",{children:e(Nh,{colSpan:$.length})}):null,$.map((s,l)=>t("tr",{children:[s.map((t,o)=>t.renderCondition&&!t.renderCondition(n)?null:e(Nh,{children:e(Dh,{col:t,colIdx:o,row:n,rowIdx:i,rowsLength:v.length,handleChange:y,disabled:p,errorMessage:u})},`input-table-row-${i}-col-${l}-${o}`)),0===l&&e(Rh,{children:t(Tr,{$gap:8,$justifyContent:"flex-end",children:[a&&e(Fd,{leftIcon:It,variant:_d.Secondary,size:Ld.S,disabled:p,onClick:()=>(()=>{const e=an(o);e.push(an(b)),r(e)})()}),e(Fd,{leftIcon:p?Nt:()=>e(Nt,{fill:f.v2.colors.red[500]}),variant:_d.Secondary,size:Ld.S,disabled:p,onClick:()=>(e=>{const t=o.filter((t,n)=>n!==e);t.length||t.push(an(b)),r(t)})(i)})]})})]},`input-table-matrix-${i}-${l}`))]},`input-table-row-${i}`)})})}),e($p,{errorMessage:u,warnMessage:h,helpMessage:g})]})},_h=o.div`
1273
- display: flex;
1274
- align-items: center;
1275
- justify-content: space-between;
1276
- gap: 32px;
1277
-
1278
- padding: 18px 16px;
1279
- border-radius: 18px;
1280
- background-color: ${({theme:e})=>e.v2.colors.black[500]+fd["095"]};
1281
- box-shadow: 0 4px 16.7px 0 rgba(0, 0, 0, 0.83);
1282
-
1283
- position: fixed;
1284
- bottom: 0;
1285
- left: 50%;
1286
- z-index: ${({theme:e})=>e.v2.zIndex.island};
1287
- animation-name: ${yd.in.center};
1288
- `,Lh=({isOpen:n,onClose:o,richTitle:r,actions:i})=>n?t(_h,{children:[e(iu,{...r}),e(nu,{onAnyClick:o,actions:i})]}):null,Ph=o.div`
1289
- position: ${({$relativeToParent:e})=>e?"absolute":"fixed"};
1290
- top: 50%;
1291
- left: 50%;
1292
- transform: translate(-50%, -50%);
1293
- z-index: ${({theme:e})=>e.v2.zIndex.modal};
1294
- width: fit-content;
1295
- border-radius: 20px;
1296
- background: ${({theme:e})=>e.v2.colors.black[500]};
1297
- box-shadow: 0 0 34px 0 rgba(0, 0, 0, 0.7);
1298
- overflow: hidden;
1299
-
1300
- /* Promote to its own composited layer and isolate paint/layout so descendant
1301
- re-renders during the slide animation can't trigger reflows of the rest of
1302
- the page. Without this, the global \`* { transition: all 300ms }\` rule plus
1303
- a heavy modal body (forms, etc.) make the close visibly stutter. */
1304
- will-change: transform;
1305
- contain: layout paint;
1306
-
1307
- animation-name: ${({$closing:e})=>e?yd.out.center:yd.in.center};
1308
- /* Snappier close: shorter duration with an ease-in curve. The slide-in keeps
1309
- the global 300ms default which pairs with the fade-in for a soft entrance. */
1310
- animation-duration: ${({$closing:e})=>e?"180ms":"300ms"};
1311
- animation-timing-function: ${({$closing:e})=>e?"cubic-bezier(0.4, 0, 1, 1)":"cubic-bezier(0, 0, 0.2, 1)"};
1312
-
1313
- /* Block hover/click work on form children mid-close so their transitions
1314
- don't compete with the slide-out. */
1315
- ${({$closing:e})=>e&&"pointer-events: none;"}
1316
- `,Fh=o(Ir)`
1317
- will-change: opacity;
1318
- animation-name: ${({$closing:e})=>e?Sd.out:Sd.in};
1319
- animation-duration: ${({$closing:e})=>e?"180ms":"300ms"};
1320
-
1321
- /* The blurred backdrop is the most expensive thing on screen during the close
1322
- — animating opacity on a backdrop-filtered element forces a full GPU
1323
- recomposite per frame. Drop the blur while closing; visually identical
1324
- because the overlay is fading to 0. */
1325
- ${({$closing:e})=>e&&"backdrop-filter: none; pointer-events: none;"}
1326
- `,Mh=o.div`
1327
- position: relative;
1328
- `,zh=o.div`
1329
- position: absolute;
1330
- top: 16px;
1331
- left: 16px;
1332
- `,Uh=({isOpen:o,hideOverlay:r=!1,relativeToParent:i=!1,onBack:a,onClose:s,onCloseEnd:l,children:c})=>{const[d,p]=Ft(o),[u,h]=Ft(!1);if(Mt(()=>{o?(p(!0),h(!1)):d&&h(!0)},[o]),fc(d),!d)return null;const g=t(n,{children:[!r&&e(Fh,{$relativeToParent:i,$closing:u,onClick:u?void 0:s}),e(Ph,{"data-id":"modal",$relativeToParent:i,$closing:u,onAnimationEnd:e=>{e.target===e.currentTarget&&u&&(p(!1),h(!1),l?.())},children:t(Mh,{children:[a&&e(zh,{children:e(Sc,{icon:t=>e(kt,{rotate:-90,...t}),size:vc.L,onClick:a})}),c]})})]});return i?g:Zt(g,document.body)},Bh=o.div`
1333
- position: relative;
1334
- width: ${64}px;
1335
- height: ${({$height:e})=>e};
1336
- flex-shrink: 0;
1337
- `,jh=o.aside`
1338
- position: absolute;
1339
- top: 0;
1340
- left: 0;
1341
- bottom: 0;
1342
- display: flex;
1343
- flex-direction: column;
1344
- gap: 8px;
1345
- width: ${({$expanded:e})=>e?"220px":"64px"};
1346
- padding: 16px ${12}px;
1347
- box-sizing: border-box;
1348
- background-color: ${({theme:e})=>e.v2.colors.black[500]};
1349
- overflow-x: hidden;
1350
- overflow-y: auto;
1351
- z-index: 10;
1352
- transition:
1353
- width 200ms ease,
1354
- padding 200ms ease;
1355
- `,Hh=o.button`
1356
- display: flex;
1357
- align-items: center;
1358
- width: 100%;
1359
- min-width: 0;
1360
- height: ${40}px;
1361
- padding: 0;
1362
- margin: 0;
1363
- border: none;
1364
- border-radius: 6px;
1365
- box-sizing: border-box;
1366
- cursor: pointer;
1367
- font: inherit;
1368
- background-color: ${({theme:e,$selected:t})=>t?e.v2.colors.purple[500]:"transparent"};
1369
- &:hover {
1370
- background-color: ${({theme:e,$selected:t})=>t?e.v2.colors.purple[600]:e.v2.colors.silver[800]};
1371
- }
1372
- &:active {
1373
- background-color: ${({theme:e,$selected:t})=>t?e.v2.colors.purple[700]:e.v2.colors.silver[900]};
1374
- }
1375
- `,Wh=o.div`
1376
- width: ${40}px;
1377
- height: ${40}px;
1378
- display: flex;
1379
- align-items: center;
1380
- justify-content: center;
1381
- flex-shrink: 0;
1382
- `,Gh=o.div`
1383
- flex: 1 1 0;
1384
- min-width: 0;
1385
- overflow: hidden;
1386
- padding-right: 12px;
1387
- pointer-events: none;
1388
- `,Xh=({height:n,icons:o})=>{const r=i(),[a,s]=Ft(!1);return e(Bh,{$height:n,children:e(jh,{$expanded:a,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:o.map(({id:n,label:o,selected:i,icon:s,onClick:l})=>t(Hh,{$selected:i,onClick:l,"aria-label":o,title:a?void 0:o,children:[e(Wh,{children:e(s,{size:24,fill:r.v2.colors.white[500]})}),a&&e(Gh,{children:e(rr,{size:Zo.S,weight:500,color:er.Primary,nowrap:!0,children:o})})]},n))})})};var Kh;!function(e){e.S="small",e.L="large"}(Kh||(Kh={}));const Vh=o.div`
1389
- width: fit-content;
1390
- display: flex;
1391
- align-items: center;
1392
- gap: 8px;
1393
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
1394
- `,Jh=o.div`
1395
- width: ${({$size:e})=>e===Kh.S?"16px":"20px"};
1396
- height: ${({$size:e})=>e===Kh.S?"16px":"20px"};
1397
- display: flex;
1398
- align-items: center;
1399
- justify-content: center;
1400
- border-radius: 100%;
1401
- border: 1px solid ${({$borderColor:e})=>e};
1402
- background-color: ${({$backgroundColor:e})=>e};
1403
- `,qh=({"data-id":n,label:o,value:r,onChange:a,disabled:s,size:l=Kh.L})=>{const c=i(),[d,p]=Ft(!1),u=r,h=l===Kh.S?6:8,g=s?c.v2.colors.grey[400]:c.v2.colors.white[500],m=u?"transparent":s?c.v2.colors.grey[700]:d?c.v2.colors.silver[400]:c.v2.colors.silver[600],f=s?c.v2.colors.grey[600]:u?c.v2.colors.purple[500]:c.v2.colors.silver[900];return t(Vh,{"data-id":n??"radio"+(o?`-${o}`:""),onClick:e=>{e.stopPropagation(),s||a(!r)},$disabled:s,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[e(Jh,{$size:l,$borderColor:m,$backgroundColor:f,children:r?e(Rt,{size:h,fill:g}):null}),o&&e(rr,{size:l===Kh.S?Zo.XXS:Zo.XS,children:o})]})},Yh=o.div`
1404
- display: flex;
1405
- flex-direction: ${({$flexDirection:e})=>e};
1406
- gap: ${({$gap:e})=>e}px;
1407
- `,Qh=({label:n,direction:o,disabled:r,size:i,options:a,values:s,setValues:l})=>t(Yh,{$flexDirection:o===vn.Horizontal?"row":"column",$gap:o===vn.Horizontal?16:8,children:[n&&e(rr,{children:n}),a.map(t=>e(qh,{...t,value:s[t.id],onChange:e=>{return n=t.id,o=e,void l(e=>{const t={...e};return Object.keys(t).forEach(e=>t[e]=!1),t[n]=o,t});var n,o},disabled:r,size:i},`${n}-radio-${t.id}`))]}),Zh=({currentStep:n,data:o,gap:r=12})=>e(Ar,{$gap:r,children:o.map(o=>{const r=o.step<n,i=o.step===n;return t(Tr,{$gap:8,children:[r||o.forceDoneBadge?e(mp,{status:Nn.Success,label:"",leftIcon:bt}):e(mp,{status:Nn.Default,label:o.step.toString()}),e(rr,{size:i?Zo.M:Zo.XS,weight:i?500:400,opacity:i?1:.7,children:o.label})]},`stepper-item-${o.step}`)})});var eg;!function(e){e.Data="data",e.Pretty="pretty"}(eg||(eg={}));const tg=o.div`
1408
- height: ${({$maxHeight:e})=>e};
1409
- width: 100%;
1410
- display: flex;
1411
- flex-direction: column;
1412
- overflow: hidden;
1413
- `,ng=o.div`
1414
- width: 100%;
1415
- flex: 1;
1416
- display: flex;
1417
- flex-direction: column;
1418
- `,og=o.div`
1419
- flex-shrink: 0;
1420
- position: relative;
1421
- z-index: 2;
1422
- `,rg=o.div`
1423
- position: relative;
1424
- display: flex;
1425
- width: 100%;
1426
- `,ig=o.div`
1427
- position: relative;
1428
- min-width: ${({$minWidth:e})=>e?`${e}px`:"auto"};
1429
- flex: ${({$flex:e})=>e??1};
1430
- padding: 18px 24px;
1431
- border: none;
1432
- border-radius: ${({$isFirst:e,$isLast:t})=>e?"4px 0 0 0":t?"0 4px 0 0":"0"};
1433
- box-sizing: border-box;
1434
-
1435
- ${({$variant:e,$backgroundColor:t})=>{if(t)return r`
1436
- background-color: ${t};
1437
- `;switch(e){case eg.Data:return r`
1438
- background-color: ${({theme:e})=>e.v2.colors.silver[750]};
1439
- `;case eg.Pretty:return r`
1440
- background-color: transparent;
1441
- `;default:return""}}}
1442
- `,ag=o.div`
1443
- position: absolute;
1444
- top: 50%;
1445
- right: 0;
1446
- transform: translateY(-50%);
1447
- width: 1px;
1448
- height: 18px;
1449
- background: ${({theme:e})=>e.v2.colors.silver[500]};
1450
- `,sg=o.div`
1451
- min-width: ${({$minWidth:e})=>e?`${e}px`:"auto"};
1452
- flex: ${({$flex:e})=>e??1};
1453
- overflow: hidden;
1454
- display: flex;
1455
- align-items: center;
1456
-
1457
- padding: 18px 24px;
1458
- cursor: ${({$withClick:e})=>e?"pointer":"default"};
1459
- box-sizing: border-box;
1460
-
1461
- ${({$variant:e,$selected:t,$hovered:n,$isLastRow:o,$isFirstCell:i,$isLastCell:a})=>{switch(e){case eg.Data:return r`
1462
- border-bottom: ${({theme:e})=>o?"none":`1px solid ${e.v2.colors.silver[500]}`};
1463
- border-radius: ${o?i?"0 0 0 4px":a?"0 0 4px 0":"0":"0"};
1464
- background-color: ${({theme:e})=>t?e.v2.colors.blue[1e3]:n?e.v2.colors.silver[700]:e.v2.colors.silver[800]};
1465
- `;case eg.Pretty:return r`
1466
- border: none;
1467
- border-radius: ${i?"12px 0 0 12px":a?"0 12px 12px 0":"0"};
1468
- background-color: ${({theme:e})=>t?e.v2.colors.blue[1e3]:n?e.v2.colors.silver[700]:e.v2.colors.silver[900]};
1469
- `;default:return""}}}
1470
- `,lg=o.div`
1471
- width: 100%;
1472
- display: flex;
1473
- align-items: center;
1474
- justify-content: ${({$textAlign:e})=>"right"===e?"flex-end":"left"===e?"flex-start":"center"===e?"center":"unset"};
1475
- gap: 4px;
1476
- text-align: ${({$textAlign:e})=>e||"left"};
1477
- `,cg=({variant:n,columns:o,rows:r,getRowActions:i,rowActionsPushRightPosition:a,rowActionsPushLeftPosition:s,withCheckboxes:l})=>{const[c,d]=Ft(null),p=zt(()=>r.map((p,u)=>{const{cells:h,onClick:g,isSelected:m=!1,onSelect:f,onDeselect:b,hideCheckbox:y}=p,$=c===u,v=i(p),x=(e,t)=>({$isLastRow:u===r.length-1,$isFirstCell:e,$isLastCell:t,$selected:m,$withClick:!!g,onClick:()=>g?.(),$hovered:!!g&&$,onMouseEnter:()=>d(u),onMouseLeave:()=>d(null)});return t(rg,{children:[l&&e(sg,{$variant:n,style:{flex:"0 0 68px"},...x(!0,!1),children:!y&&e(zp,{value:m,onChange:()=>m?b?.():f?.()})},"checkbox-column"),o.map(({key:r,withTooltip:i,textAlign:c,flex:d,minWidth:p},g)=>{const m=h.find(e=>e.key===r),f=0===g&&!l,b=g===o.length-1,y=v.length&&(a&&b||s&&f||!a&&!s&&b),S=e(Tr,{$width:"100%",$justifyContent:"right"===c?"flex-end":"center"===c?"center":"flex-start",children:m?.component?e(m.component,{}):e(rr,{size:Zo.XS,children:m?.rawValue||"-"})});return t(sg,{$variant:n,$flex:d,$minWidth:p,...x(f,b),children:[i?e(Qc,{text:m?.rawValue?.toString()||"",ellipsis:!0,children:S}):S,y?e(Eh,{isOpen:$,actions:v,positionRight:a,positionLeft:s}):null]},`row-${u}-cell-${g}`)})]},`row-${u}`)}),[r,c,i,a,s,l,o]);return e(sp,{gap:n===eg.Pretty?8:0,elements:p})},dg=({columnKey:t,sortDirection:n,sortByKey:o,onSort:r})=>{const a=i(),s=o===t?a.v2.colors.white[500]:a.v2.colors.grey[400],l=n===xn.Ascending?0:180;return e(Sc,{icon:t=>e(kt,{fill:s,rotate:l,...t}),onClick:()=>r(t)})},pg=({columnKey:t,filters:n,onFilter:o,rowsUnfiltered:r,filterOverride:a})=>{const s=i(),l=n[t]?.length?s.v2.colors.white[500]:s.v2.colors.grey[400],c=zt(()=>{if(a)return a.options.map(({id:e,label:t})=>({id:e,label:t,withCheckbox:!0}));return Array.from(new Set(r.map(e=>e.cells.find(e=>e.key===t)?.rawValue?.toString()).filter(e=>!!e))).sort((e,t)=>e.localeCompare(t)).map(e=>({id:e,label:e,withCheckbox:!0}))},[r,t,a]);return e(Vp,{items:c,withMultiSelect:!0,selectedIds:n[t]?.map(e=>e.toString())??[],setSelectedIds:e=>o(t,e),defaultOpen:!1,iconButtonProps:{leftIcon:t=>e(Ot,{fill:l,...t})}})},ug=({variant:n,backgroundColor:o,columns:r,rowsUnfiltered:i,sortDirection:a,sortByKey:s,onSort:l,filters:c,onFilter:d,withCheckboxes:p,partiallySelected:u,allSelected:h,onSelectAll:g})=>t(rg,{children:[p&&e(ig,{$variant:n,$backgroundColor:o,$isFirst:!0,$isLast:!1,style:{flex:"0 0 68px"},children:e(zp,{partiallyChecked:u&&!h,value:h||!1,onChange:g})},"checkbox-column"),r.map(({key:u,label:h,withTooltip:g,tooltip:m,noSort:f,noFilter:b,filterOverride:y,flex:$,minWidth:v,textAlign:x},S)=>{const w=0===S&&!p,E=S===r.length-1,C=e(rr,{size:Zo.XS,align:x,children:h});return t(ig,{$variant:n,$backgroundColor:o,$flex:$,$minWidth:v,$isFirst:w,$isLast:E,children:[t(lg,{$textAlign:x,children:[m||g?e(Qc,{text:m||h,children:C}):C,!f&&e(dg,{columnKey:u,sortDirection:a,sortByKey:s,onSort:l}),!b&&e(pg,{columnKey:u,filters:c,onFilter:d,rowsUnfiltered:i,filterOverride:y})]}),!E&&n===eg.Data&&e(ag,{})]},`column-${u}`)})]}),hg=({variant:n,maxHeight:o="256px",headerBackgroundColor:r,hideHeader:i=!1,isLoading:a,noDataProps:s,columns:l,rows:c,getRowActions:d,rowActionsPushRightPosition:p,rowActionsPushLeftPosition:u,withCheckboxes:h,filters:g,onFiltersChange:m})=>{const[f,b]=Ft(xn.Ascending),[y,$]=Ft(""),[v,x]=Ft({}),S=g??v,w=Ut(e=>{$(e),b(e=>e===xn.Ascending?xn.Descending:xn.Ascending)},[]),E=Ut((e,t)=>{const n={...S,[e]:t};m&&m(n),void 0===g&&x(n)},[S,m,g]),C=zt(()=>{const e=(e,t)=>{const n=e.cells.find(e=>e.key===t);return n&&(n.rawValue?.toString()||n.component?.({})?.props?.children?.toString())||""};return(y?[...c].sort((t,n)=>{const o=e(t,y),r=e(n,y);return(f===xn.Ascending?1:-1)*((e,t)=>"string"==typeof e&&"string"==typeof t?e.localeCompare(t):"number"==typeof e&&"number"==typeof t?e-t:"boolean"==typeof e&&"boolean"==typeof t?e===t?0:e?1:-1:String(e).localeCompare(String(t)))(o,r)}):c).filter(t=>{for(const[n,o]of Object.entries(S)){if(!o.length)continue;const r=l.find(e=>e.key===n)?.filterOverride;if(r){if(!r.filterRow(t,o))return!1}else if(!o.includes(e(t,n)))return!1}return!0})},[c,y,f,S,l]),{partiallySelected:T,allSelected:A}=zt(()=>{const e=C.filter(e=>!e.hideCheckbox);return{partiallySelected:e.length>0&&e.some(e=>e.isSelected),allSelected:e.length>0&&e.every(e=>e.isSelected)}},[C]);return e(tg,{$maxHeight:o,children:t(ng,{$variant:n,children:[!i&&e(og,{children:e(ug,{variant:n,backgroundColor:r,columns:l,rowsUnfiltered:c,sortDirection:f,sortByKey:y,onSort:w,filters:S,onFilter:E,withCheckboxes:h,partiallySelected:T,allSelected:A,onSelectAll:e=>{e?C.forEach(e=>!e.hideCheckbox&&e.onSelect?.()):C.forEach(e=>!e.hideCheckbox&&e.onDeselect?.())}})}),C.length?e(cg,{variant:n,columns:l,rows:C,getRowActions:d||(()=>[]),rowActionsPushRightPosition:p,rowActionsPushLeftPosition:u,withCheckboxes:h}):e(kr,{style:{height:o},children:a?e(Mr,{withSpinner:!0}):e(Lp,{...s})})]})})};var gg;!function(e){e.Default="default",e.Purple="purple",e.Yellow="yellow",e.Blue="blue",e.Pink="pink",e.Green="green",e.Loader="loader"}(gg||(gg={}));const mg=(e,t,n)=>{switch(t){case gg.Purple:return e.v2.colors.purple[n?"300":"900"];case gg.Yellow:return e.v2.colors.yellow[n?"300":"1000"];case gg.Blue:return e.v2.colors.blue[n?"300":"1000"];case gg.Pink:return e.v2.colors.red[n?"300":"1000"];case gg.Green:return e.v2.colors.green[n?"300":"900"];case gg.Loader:return e.v2.colors.grey[n?"600":"800"];default:return e.v2.colors.grey[n?"300":"500"]}},fg=o.div`
1478
- display: flex;
1479
- align-items: center;
1480
- justify-content: center;
1481
- gap: 8px;
1482
- padding: 4px 8px;
1483
- border-radius: 6px;
1484
- border: 1px solid transparent;
1485
-
1486
- ${({$flex:e})=>e?r`
1487
- flex: ${e};
1488
- `:r`
1489
- width: fit-content;
1490
- `}
1491
-
1492
- ${({$disabled:e,$variant:t,$withClick:n})=>e?r`
1493
- background-color: ${({theme:e})=>e.v2.colors.grey[800]};
1494
- cursor: not-allowed;
1495
- `:r`
1496
- background-color: ${({theme:e})=>mg(e,t)};
1497
- ${n&&r`
1498
- cursor: pointer;
1499
- &:hover,
1500
- &:active {
1501
- border: 1px solid ${({theme:e})=>mg(e,t,!0)};
1502
- }
1503
- `}
1504
- `}
1505
- `,bg=({variant:n=gg.Default,label:o,leftIcon:r,rightIcon:a,onClick:s,disabled:l,flex:c})=>{const d=i(),p=l?d.v2.colors.grey[400]:n===gg.Default?d.v2.colors.white[500]:mg(d,n,!0),u=n===gg.Loader;return t(fg,{$variant:n,$disabled:l,$withClick:!!s,onClick:()=>!l&&s?.(),$flex:c,children:[r&&e(r,{fill:p,size:16}),u?e(Mr,{withGradient:!0,title:o,titleSize:Zo.XXS}):e(rr,{color:p,size:Zo.XXS,nowrap:!0,children:o}),a&&e(a,{fill:p,size:16})]})},yg=o.div`
1506
- padding: 6px 12px;
1507
-
1508
- display: flex;
1509
- align-self: stretch;
1510
- align-items: flex-start;
1511
- gap: 8px;
1512
- border-radius: 6px;
1513
-
1514
- border: 1px solid ${({theme:e,$disabled:t,$error:n})=>t?e.v2.colors.grey[600]:n?e.v2.colors.red[500]:e.v2.colors.silver[500]};
1515
- background: ${({theme:e,$disabled:t})=>t?e.v2.colors.grey[800]:e.v2.colors.black[500]};
1516
- ${({$disabled:e,$error:t})=>!e&&!t&&r`
1517
- &:hover,
1518
- &:active,
1519
- &:focus-within {
1520
- border: 1px solid ${({theme:e})=>e.v2.colors.silver[300]};
1521
- }
1522
- `}
1523
- `,$g=o.textarea`
1524
- max-width: ${({$maxWidth:e})=>e||"unset"};
1525
- min-height: ${({$minHeight:e})=>e||"50px"};
1526
- flex: 1;
1527
- font-family: ${({theme:e})=>e.font_family.primary};
1528
- font-size: 14px;
1529
- font-weight: 400;
1530
- resize: none;
1531
-
1532
- background: transparent;
1533
- border: none;
1534
- outline: none;
1535
- cursor: text;
1536
- color: ${({theme:e})=>e.v2.colors.white[500]};
1537
- &::placeholder {
1538
- color: ${({theme:e})=>e.v2.colors.silver[600]};
1539
- }
1540
-
1541
- &:disabled {
1542
- cursor: not-allowed;
1543
- color: ${({theme:e})=>e.v2.colors.grey[400]};
1544
- &::placeholder {
1545
- color: ${({theme:e})=>e.v2.colors.grey[400]};
1546
- }
1547
- }
1548
- `,vg=({label:n,required:o,tooltip:r,badge:i,errorMessage:a,warnMessage:s,helpMessage:l,name:c,value:d,onChange:p,disabled:u,maxWidth:h,minHeight:g,...m})=>{const f=Bt(null),b=()=>{f.current&&(f.current.style.height="auto",f.current.style.height=`${f.current.scrollHeight}px`)};return t(Ar,{$gap:6,children:[e(yp,{label:n,tooltip:r,required:o,badge:i}),e(yg,{$disabled:u,$error:!!a,children:e($g,{ref:f,"data-id":c,name:c,value:d,onChange:e=>{e.stopPropagation(),b(),p?.(e)},onKeyDown:e=>{e.stopPropagation()},onFocus:b,onBlur:b,disabled:u,$maxWidth:h,$minHeight:g,...m})}),e($p,{errorMessage:a,warnMessage:s,helpMessage:l})]})},xg=[{id:"ms",label:"milliseconds"},{id:"s",label:"seconds"},{id:"m",label:"minutes"},{id:"h",label:"hours"}],Sg=o.div`
1549
- flex: 1;
1550
- min-width: 0;
1551
- `,wg=o.div`
1552
- flex: 0 0 auto;
1553
- min-width: 140px;
1554
- `,Eg=({name:n,label:o,tooltip:r,badge:i,placeholder:a,required:s,disabled:l,value:c,setValue:d,units:p=xg,defaultUnit:u,errorMessage:h,warnMessage:g,helpMessage:m,hasError:f,width:b})=>{const y=zt(()=>u&&p.some(e=>e.id===u)?u:p[0]?.id||"s",[u,p]),{num:$,unit:v}=zt(()=>((e,t,n)=>{if(null==e||""===e)return{num:"",unit:n};const o=[...t.map(e=>e.id)].sort((e,t)=>t.length-e.length),r=new RegExp(`^\\s*(\\d+)\\s*(${o.join("|")})\\s*$`,"i"),i=String(e).match(r);if(i)return{num:i[1],unit:i[2].toLowerCase()};const a=String(e).match(/^\s*(\d+)\s*$/);return a?{num:a[1],unit:n}:{num:"",unit:n}})(c,p,y),[c,p,y]),x=(e,t)=>{d(""!==e?`${e}${t}`:"")};return t(Ar,{$width:b,$gap:6,children:[e(yp,{label:o,tooltip:r,required:s,badge:i}),t(Tr,{$gap:8,$alignItems:"center",children:[e(Sg,{children:e(wp,{name:n,placeholder:a,disabled:l,hasError:f||!!h,inputMode:"numeric",value:$,onChange:e=>x(pi(e.target.value),v)})}),e(wg,{children:e($h,{name:`${n}-unit`,disabled:l,hasError:f||!!h,withSearch:!1,options:p,values:[v],setValues:e=>x($,e[0]||v)})})]}),e($p,{errorMessage:h,warnMessage:g,helpMessage:m})]})},Cg=o.div`
1555
- min-width: 500px;
1556
- `,Tg=o.div`
1557
- display: flex;
1558
- flex-direction: column;
1559
- align-items: center;
1560
- gap: 16px;
1561
- padding: 24px;
1562
- width: calc(100% - 48px);
1563
- `,Ag=o.div`
1564
- display: flex;
1565
- justify-content: center;
1566
- gap: 16px;
1567
- padding: 16px 24px;
1568
- width: calc(100% - 48px);
1569
- background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
1570
- `,kg=({visual:n,title:o,description:r,isOpen:i,onClose:a,denyButton:s,approveButton:l,children:c,...d})=>e(Uh,{isOpen:i,onClose:a,...d,children:t(Cg,{children:[t(Tg,{children:[n&&e(n,{}),e(rr,{size:Zo.M,weight:500,color:er.Primary,children:o}),e(Ar,{$alignItems:"center",$gap:4,children:r.split("\n").map(t=>e(rr,{size:Zo.XS,weight:400,color:er.Secondary,children:t},t))}),c]}),(s||l)&&t(Ag,{children:[s&&e(Fd,{"data-id":"deny",...s}),l&&e(Fd,{"data-id":"approve",...l})]})]})});export{yp as $,Ci as A,fo as B,Tn as C,bo as D,An as E,Ar as F,Jr as G,Yl as H,jd as I,qr as J,ki as K,ci as L,to as M,Lp as N,Xr as O,wn as P,li as Q,Dn as R,Nn as S,Sn as T,Ii as U,Vn as V,Jn as W,ro as X,oo as Y,Xn as Z,Hn as _,Ei as a,lo as a$,zp as a0,$p as a1,wp as a2,In as a3,Oh as a4,mn as a5,Zu as a6,Ju as a7,kh as a8,Fd as a9,kr as aA,$h as aB,Sc as aC,vc as aD,Mr as aE,Di as aF,_o as aG,_n as aH,Vu as aI,Qo as aJ,lc as aK,ic as aL,go as aM,ho as aN,Po as aO,yo as aP,Cr as aQ,pu as aR,Xu as aS,Eo as aT,si as aU,pn as aV,Kr as aW,ii as aX,bg as aY,Bo as aZ,ei as a_,Ld as aa,_d as ab,po as ac,Ip as ad,vg as ae,rn as af,ph as ag,gi as ah,er as ai,Kn as aj,Qc as ak,qn as al,mp as am,Hl as an,ko as ao,kg as ap,is as aq,fa as ar,Ea as as,as as at,Ia as au,rs as av,Ki as aw,Vi as ax,gu as ay,oa as az,rr as b,Il as b$,Gn as b0,Bu as b1,Pu as b2,jl as b3,Do as b4,On as b5,gg as b6,tu as b7,Op as b8,sp as b9,Ml as bA,hs as bB,us as bC,fs as bD,ms as bE,ds as bF,cs as bG,Ri as bH,Za as bI,Dc as bJ,Yr as bK,Vp as bL,Hp as bM,jp as bN,wo as bO,oc as bP,Uh as bQ,Pl as bR,$s as bS,Rs as bT,Os as bU,_s as bV,Ls as bW,Fs as bX,Ps as bY,Ms as bZ,Sr as b_,Ql as ba,Gr as bb,Ah as bc,xo as bd,wc as be,Ur as bf,Pn as bg,Fn as bh,Nc as bi,Xl as bj,Wl as bk,ri as bl,Io as bm,Cp as bn,Cn as bo,hg as bp,eg as bq,No as br,Ni as bs,Fi as bt,Oi as bu,Pi as bv,Fl as bw,zl as bx,ba as by,Li as bz,Zo as c,ll as c$,Nl as c0,Rl as c1,Ol as c2,_l as c3,Ll as c4,vs as c5,Ss as c6,ws as c7,Es as c8,Ts as c9,xs as cA,xl as cB,Sl as cC,wl as cD,vl as cE,Cl as cF,Tl as cG,Al as cH,kl as cI,Dl as cJ,El as cK,yl as cL,$l as cM,cl as cN,ml as cO,fl as cP,bl as cQ,pl as cR,hl as cS,ul as cT,tl as cU,nl as cV,ol as cW,rl as cX,il as cY,al as cZ,sl as c_,Cs as ca,ks as cb,As as cc,Is as cd,Ds as ce,Ns as cf,bs as cg,ys as ch,zs as ci,Us as cj,Xs as ck,Ws as cl,Gs as cm,js as cn,Hs as co,Bs as cp,qs as cq,Ys as cr,Vs as cs,Js as ct,Ks as cu,Zs as cv,el as cw,Qs as cx,qh as cy,Kh as cz,rc as d,ma as d$,dl as d0,gl as d1,wr as d2,Lh as d3,Zh as d4,nc as d5,$o as d6,mo as d7,Bl as d8,_c as d9,ja as dA,Ui as dB,Mi as dC,zi as dD,Bi as dE,ss as dF,Qa as dG,qa as dH,Ya as dI,Ja as dJ,Va as dK,ns as dL,os as dM,ts as dN,es as dO,Rc as dP,Eg as dQ,wa as dR,ea as dS,Sa as dT,Zi as dU,ka as dV,Aa as dW,ha as dX,xa as dY,Ta as dZ,Pa as d_,bc as da,zo as db,Lo as dc,Pp as dd,cc as de,ou as df,Mo as dg,hp as dh,Fo as di,$c as dj,co as dk,dn as dl,cn as dm,uc as dn,uo as dp,iu as dq,nu as dr,Yo as ds,Yn as dt,bu as du,Nu as dv,vu as dw,Er as dx,Ep as dy,ra as dz,Gc as e,xn as e$,_a as e0,da as e1,qi as e2,pa as e3,ca as e4,Yi as e5,ua as e6,Wa as e7,la as e8,Ba as e9,za as eA,Jp as eB,La as eC,mr as eD,ld as eE,Vd as eF,un as eG,Bn as eH,yn as eI,Ln as eJ,jn as eK,Un as eL,En as eM,Rn as eN,$n as eO,so as eP,vn as eQ,bn as eR,Wn as eS,kn as eT,eo as eU,Zn as eV,Qn as eW,Mn as eX,ao as eY,io as eZ,no as e_,Ga as ea,Ha as eb,Xa as ec,Ka as ed,Na as ee,Qi as ef,ta as eg,na as eh,ia as ei,sa as ej,aa as ek,ji as el,Hi as em,Ji as en,Ra as eo,Oa as ep,Fa as eq,Ul as er,Wi as es,_i as et,ya as eu,ga as ev,$a as ew,Ma as ex,va as ey,Ca as ez,Uc as f,Nr as f$,fn as f0,br as f1,fr as f2,vr as f3,Zr as f4,Qr as f5,tn as f6,nn as f7,di as f8,vo as f9,Ai as fA,Ua as fB,gs as fC,ps as fD,ls as fE,Da as fF,Xi as fG,Gi as fH,Gl as fI,Kl as fJ,Jl as fK,Ic as fL,mc as fM,fc as fN,Ec as fO,Tc as fP,kc as fQ,Pc as fR,md as fS,wd as fT,bd as fU,gd as fV,zd as fW,Id as fX,Gd as fY,Hd as fZ,Od as f_,So as fa,Ao as fb,sn as fc,Ro as fd,Uo as fe,Ho as ff,Wo as fg,Go as fh,Xo as fi,Ko as fj,Vo as fk,Jo as fl,qo as fm,Br as fn,Vr as fo,ti as fp,ni as fq,ai as fr,pi as fs,ui as ft,hi as fu,mi as fv,fi as fw,ln as fx,bi as fy,yi as fz,yc as g,Ir as g0,ip as g1,Rr as g2,Or as g3,_r as g4,td as g5,Dr as g6,jc as g7,Hc as g8,Wc as g9,Zp as ga,eu as gb,Bp as gc,xg as gd,xu as ge,Sh as gf,Eh as gg,Xh as gh,Qh as gi,uu as gj,th as gk,Ku as gl,nr as gm,Tr as h,fd as i,zr as j,zn as k,Wr as l,Oo as m,Co as n,yh as o,Cd as p,ec as q,Vl as r,op as s,$i as t,Oc as u,hc as v,an as w,Ti as x,gn as y,hn as z};