@odigos/ui-kit 0.0.237 → 0.0.239
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/lib/chunks/{index-DB_UqHYt.js → index-B5PgIL40.js} +1 -1
- package/lib/chunks/index-Dy4pkeq6.js +145 -0
- package/lib/chunks/index-uXyrp4Xe.js +41 -0
- package/lib/chunks/ui-components-BPdnIOmj.js +2248 -0
- package/lib/components/_v2/cards/data-card/index.d.ts +6 -1
- package/lib/components/_v2/drawer/header/index.d.ts +2 -0
- package/lib/components/_v2/drawer/index.d.ts +1 -1
- package/lib/components/_v2/drop-data/index.d.ts +1 -2
- package/lib/components/_v2/icon-group/index.d.ts +10 -0
- package/lib/components/_v2/index.d.ts +1 -0
- package/lib/components/_v2/tag/index.d.ts +10 -0
- package/lib/components/_v2/typography/index.d.ts +2 -0
- package/lib/components/v2.js +1 -1
- package/lib/components.js +1 -1
- package/lib/constants/sampling/index.d.ts +5 -6
- package/lib/constants/sources/index.d.ts +5 -0
- package/lib/constants/strings/index.d.ts +89 -0
- package/lib/constants.js +1 -1
- package/lib/containers/_v2/_drawers/edit-source-drawer/common/index.d.ts +1 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/common/pods-header.d.ts +8 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/helpers.d.ts +12 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/index.d.ts +19 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/containers-card/distro-override.d.ts +11 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/containers-card/index.d.ts +7 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/containers-card/popup-form.d.ts +15 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/containers-card/runtime-override.d.ts +10 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/health-card.d.ts +6 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/index.d.ts +10 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/main-card.d.ts +6 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/pods-card/index.d.ts +6 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/pods-card/pods-list/container-row.d.ts +9 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/pods-card/pods-list/helpers.d.ts +16 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/pods-card/pods-list/index.d.ts +12 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/pods-card/pods-list/pod-row.d.ts +8 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/pods-card/pods-list/process-row.d.ts +10 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/pods-card/pods-list/row-header.d.ts +13 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/pods-card/pods-list/types.d.ts +18 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/statuses-card.d.ts +8 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/peers/index.d.ts +11 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/pods/containers-card/index.d.ts +7 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/pods/containers-card/process-card.d.ts +3 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/pods/debug-commands.d.ts +6 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/pods/index.d.ts +7 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/pods/pod-card.d.ts +8 -0
- package/lib/containers/_v2/_drawers/index.d.ts +1 -0
- package/lib/containers/_v2/_forms/edit-source-form/index.d.ts +2 -0
- package/lib/containers/_v2/_forms/index.d.ts +1 -0
- package/lib/containers/_v2/_modals/index.d.ts +1 -0
- package/lib/containers/_v2/_modals/onboarding-done/background.d.ts +5 -0
- package/lib/containers/_v2/_modals/onboarding-done/index.d.ts +3 -0
- package/lib/containers/_v2/overview/drawers/index.d.ts +1 -3
- package/lib/containers/_v2/sampling-rules/converters.d.ts +2 -0
- package/lib/containers/source-drawer/index.d.ts +1 -1
- package/lib/containers/v2.js +226 -121
- package/lib/containers.js +49 -19
- package/lib/contexts/action-form-context.d.ts +0 -1
- package/lib/contexts/destination-form-context.d.ts +0 -1
- package/lib/contexts/index.d.ts +1 -0
- package/lib/contexts/rule-form-context.d.ts +0 -1
- package/lib/contexts/source-edit-form-context.d.ts +17 -0
- package/lib/contexts.js +1 -1
- package/lib/functions/decimals-only/index.d.ts +1 -0
- package/lib/functions/get-containers-icons/index.d.ts +3 -1
- package/lib/functions/get-virtual-service-icon/index.d.ts +1 -1
- package/lib/functions/get-workload-id/index.d.ts +2 -2
- package/lib/functions/index.d.ts +3 -0
- package/lib/functions/is-pod-injected-with-agent/index.d.ts +3 -0
- package/lib/functions/map-desired-status-to-condition-status/index.d.ts +2 -0
- package/lib/functions.js +1 -1
- package/lib/hooks.js +1 -1
- package/lib/icons/brand/index.d.ts +3 -0
- package/lib/icons/brand/odigos-logo-text-colored-central/index.d.ts +2 -0
- package/lib/icons/brand/odigos-logo-text-colored-community/index.d.ts +2 -0
- package/lib/icons/brand/odigos-logo-text-colored-enterprise/index.d.ts +2 -0
- package/lib/icons.js +1 -1
- package/lib/mock-data/profiling/index.d.ts +1 -1
- package/lib/mock-data/service-map/index.d.ts +1 -1
- package/lib/mock-data/sources/index.d.ts +1 -1
- package/lib/snippets/_v2/odigos-logo-text-by-tier/index.d.ts +2 -0
- package/lib/snippets/_v2/rich-title/index.d.ts +5 -0
- package/lib/snippets/_v2/sampling-rule-form-sections/percentage.d.ts +1 -1
- package/lib/snippets/_v2/sampling-rule-form-sections/preset-with-custom-input.d.ts +5 -2
- package/lib/snippets/_v2/wide-drawer/index.d.ts +7 -1
- package/lib/snippets/source-container/index.d.ts +1 -2
- package/lib/snippets/v2.js +1 -1
- package/lib/snippets.js +1 -1
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types/common/index.d.ts +30 -1
- package/lib/types/service-map/index.d.ts +2 -2
- package/lib/types/sources/index.d.ts +7 -3
- package/lib/types/workload/index.d.ts +178 -1
- package/lib/types.js +1 -1
- package/lib/visuals.js +1 -1
- package/package.json +1 -1
- package/lib/chunks/index-92vqd713.js +0 -145
- package/lib/chunks/index-zOzusnDO.js +0 -77
- package/lib/chunks/ui-components-CjDRcQJq.js +0 -2235
- /package/lib/containers/{source-drawer → _v2/_drawers/edit-source-drawer}/profiling/flame-graph-canvas.d.ts +0 -0
- /package/lib/containers/{source-drawer → _v2/_drawers/edit-source-drawer}/profiling/flamebearer.d.ts +0 -0
- /package/lib/containers/{source-drawer → _v2/_drawers/edit-source-drawer}/profiling/index.d.ts +0 -0
- /package/lib/containers/{source-drawer → _v2/_drawers/edit-source-drawer}/profiling/symbol-table.d.ts +0 -0
|
@@ -1,2235 +0,0 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import n,{css as o,useTheme as i,keyframes as a,ThemeProvider as s}from"styled-components";import{SamplerIcon as l,PiiMaskingIcon as c,ActionIcon as d,RenameAttributeIcon as u,DeleteAttributeIcon as p,AddClusterInfoIcon as h,K8sLogo as m,ImageErrorIcon as g,KafkaLogo as f,RedisLogo as y,PostgresLogo as b,NginxLogo as v,MysqlLogo as x,ElixirLogo as $,SwiftLogo as w,RustLogo as S,RubyLogo as C,PhpLogo as E,CPlusPlusLogo as k,CSharpLogo as A,DotnetLogo as D,PythonLogo as T,NodejsLogo as I,GoLogo as N,JavaLogo as R,PyroscopeLogo as O,AwsXrayLogo as P,VictoriaMetricsLogo as F,UptraceLogo as _,TraceloopLogo as L,TingyunLogo as M,TempoLogo as z,TelemetryHubLogo as B,SumoLogicLogo as U,SplunkLogo as j,SignozLogo as W,SeqLogo as H,AwsS3Logo as X,QuickwitLogo as G,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 re,NewRelicLogo as ne,MiddlewareLogo as oe,LumigoLogo as ie,LokiLogo as ae,LogzioLogo as se,LightstepLogo as le,Last9Logo as ce,KloudmateLogo as de,JaegerLogo as ue,InstanaLogo as pe,HyperDxLogo as he,HoneycombLogo as me,GroundcoverLogo as ge,GreptimeLogo as fe,GrafanaLogo as ye,GoogleCloudPlatformLogo as be,ElasticSearchLogo as ve,ElasticApmLogo as xe,DynatraceLogo as $e,DatadogLogo as we,Dash0Logo as Se,CoralogixLogo as Ce,AwsCloudwatchLogo as Ee,ClickhouseLogo as ke,ChronosphereLogo as Ae,ChecklyLogo as De,CauselyLogo as Te,BonreeLogo as Ie,BetterStackLogo as Ne,AzureMonitorLogo as Re,AzureBlobLogo as Oe,AxiomLogo as Pe,AppDynamicsLogo as Fe,AlibabaCloudLogo as _e,AlaudaLogo as Le,SamplingIcon as Me,InstrumentationRuleIcon as ze,DestinationIcon as Be,SourceIcon as Ue,NamespacesIcon as je,PayloadCollectionIcon as We,HeadersCollectionIcon as He,CustomInstrumentationIcon as Xe,CodeAttributesIcon as Ge,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 rt,ISquareIcon as nt,AwsLogo as ot,AwsSecretsManagerLogo as it,AwsStepFunctionsLogo as at,AwsEventBridgeLogo as st,AwsBedrockLogo as lt,AwsApiGatewayLogo as ct,AwsEc2Logo as dt,AwsKinesisLogo as ut,AwsLambdaLogo as pt,AwsSnsLogo as ht,AwsSqsLogo as mt,AwsDynamoDbLogo as gt,AwsStsLogo as ft,VIcon as yt,CopyIcon as bt,XIcon as vt,MinusIcon as xt,ListIcon as $t,CodeIcon as wt,ExtendArrowIcon as St,PlusIcon as Ct,NoDataIcon as Et,RefreshIcon as kt,EyeClosedIcon as At,EyeOpenIcon as Dt,SearchIcon as Tt,TrashIcon as It,EditIcon as Nt,EditedIcon as Rt,ChevronUpIcon as Ot,ChevronDownIcon as Pt,ArrowIcon as Ft,DotsVerticalIcon as _t,DotIcon as Lt,FilterIcon as Mt}from"../icons.js";import{create as zt}from"zustand";import{forwardRef as Bt,Fragment as Ut,useState as jt,useEffect as Wt,useRef as Ht,useMemo as Xt,useCallback as Gt,useContext as Kt,createContext as Vt,memo as Jt,useLayoutEffect as qt,createElement as Yt}from"react";import Qt from"javascript-time-ago";import{p as Zt,c as er,s as tr,l as rr}from"./vendor-C150cdxb.js";import{Handle as nr,Position as or,ReactFlowProvider as ir,ReactFlow as ar,Controls as sr,ControlButton as lr,useReactFlow as cr}from"@xyflow/react";import dr,{createPortal as ur}from"react-dom";import{Highlight as pr,themes as hr}from"prism-react-renderer";import{ErrorBoundary as mr}from"react-error-boundary";import{VList as gr}from"virtua";const fr=e=>e.charAt(0).toUpperCase()+e.slice(1),yr=e=>{const t=e=>e.filter(e=>"object"==typeof e&&null!==e?""!==e.key&&""!==e.value:""!==e),r=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>""!==e&&""!==t).map(([e,n])=>Array.isArray(n)?[e,t(n)]:"object"==typeof n&&null!==n?[e,r(n)]:[e,n]));return Object.entries(e).reduce((e,[n,o])=>{try{const i=JSON.parse(o);Array.isArray(i)?e[n]=JSON.stringify(t(i)):e[n]="object"==typeof i&&null!==i?JSON.stringify(r(i)):o}catch(i){"object"==typeof o&&null!==o?Array.isArray(o)?e[n]=JSON.stringify(t(o)):e[n]=JSON.stringify(r(o)):e[n]=o}return e},{})};var br;!function(e){e.SIGNALS="SIGNALS"}(br||(br={}));const vr=(e,t,r)=>{if(!e||!e.length)return!0;if(1===e.length)return"true"==e[0];const[n,o,i]=e;if(n===br.SIGNALS)switch(o){case"INCLUDES":return t?.includes(i);case"EXCLUDES":return!t?.includes(i);default:return!0}const a=r.find(e=>e.name===n||e.key===n);if(!a)return!1;const s=null==a.value?"":String(a.value);switch(o){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}},xr=e=>JSON.parse(JSON.stringify(e)),$r=(e,t)=>t.split(".").reduce((e,t)=>e?.[t],e),wr=(e,t,r)=>{const n=t.split(".");let o=e;for(let e=0;e<n.length-1;e++)n[e]in o&&"object"==typeof o[n[e]]||(o[n[e]]={}),o=o[n[e]];o[n[n.length-1]]=r},Sr=(e,t)=>{let r=[...e];return t.monitors?.length&&(r=r.filter(e=>!!t.monitors?.find(t=>e.signals?.find(e=>e.toLowerCase()===t.id)))),r},Cr=(e,t)=>{let r=[...e];return t.monitors?.length&&(r=r.filter(e=>!!t.monitors?.find(t=>e.exportedSignals[t.id]))),r},Er=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||!e.dataStreamNames.length):[];var kr,Ar,Dr,Tr,Ir,Nr,Rr,Or,Pr,Fr,_r,Lr,Mr,zr,Br,Ur,jr,Wr,Hr,Xr,Gr,Kr,Vr,Jr,qr,Yr,Qr,Zr,en,tn,rn,nn,on,an,sn,ln,cn,dn,un,pn,hn,mn;!function(e){e.Attributes="attributes",e.Samplers="samplers"}(kr||(kr={})),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"}(Ar||(Ar={})),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"}(Dr||(Dr={})),function(e){e.Pod="pod",e.Namespace="namespace",e.Node="node"}(Tr||(Tr={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.CONTAINS="contains",e.NOT_CONTAINS="not_contains",e.REGEX="regex"}(Ir||(Ir={})),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"}(Nr||(Nr={})),function(e){e.EXISTS="exists",e.EQUALS="equals"}(Rr||(Rr={})),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"}(Or||(Or={})),function(e){e.Horizontal="horizontal",e.Vertical="vertical"}(Pr||(Pr={})),function(e){e.Ascending="ascending",e.Descending="descending"}(Fr||(Fr={})),function(e){e.Community="community",e.Onprem="onprem"}(_r||(_r={})),function(e){e.K8s="k8s",e.Vm="vm"}(Lr||(Lr={})),function(e){e.Cli="odigos-cli",e.Helm="helm",e.Operator="odigos-operator"}(Mr||(Mr={})),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"}(zr||(zr={})),function(e){e.Create="Create",e.Read="Read",e.Update="Update",e.Delete="Delete"}(Br||(Br={})),function(e){e.Namespace="Namespace",e.Source="Source",e.Destination="Destination",e.Action="Action",e.InstrumentationRule="InstrumentationRule",e.SamplingRule="SamplingRule"}(Ur||(Ur={})),function(e){e.DataStream="DataStream"}(jr||(jr={})),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"}(Wr||(Wr={})),function(e){e.Text="text",e.Password="password",e.Number="number"}(Hr||(Hr={})),function(e){e.Warning="warning",e.Error="error",e.Success="success",e.Info="info",e.Default="default"}(Xr||(Xr={})),function(e){e.INSTRUMENTED="Instrumented",e.INSTRUMENTING="Instrumenting",e.UNINSTRUMENTED="Uninstrumented",e.NOT_INSTRUMENTED="Not Instrumented"}(Gr||(Gr={})),function(e){e.Loading="loading",e.Disabled="disabled"}(Kr||(Kr={})),function(e){e.Disabled="disabled",e.Unknown="unknown"}(Vr||(Vr={})),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"}(Jr||(Jr={})),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"}(qr||(qr={})),function(e){e.Labeled="labeled"}(Yr||(Yr={})),function(e){e.AddRule="addRule",e.AddSource="addSource",e.AddAction="addAction",e.AddDestination="addDestination"}(Qr||(Qr={})),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"}(Zr||(Zr={})),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"}(en||(en={})),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"}(tn||(tn={})),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"}(rn||(rn={})),function(e){e.CodeAttributes="CodeAttributes",e.HeadersCollection="HeadersCollection",e.PayloadCollection="PayloadCollection",e.CustomInstrumentation="CustomInstrumentation",e.UnknownType="UnknownType"}(nn||(nn={})),function(e){e.Column="column",e.FilePath="filePath",e.Function="function",e.LineNumber="lineNumber",e.Namespace="namespace",e.StackTrace="stacktrace"}(on||(on={})),function(e){e.HeaderKeys="headerKeys"}(an||(an={})),function(e){e.Java="java",e.Golang="golang"}(sn||(sn={}));class gn{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 fn{packageName;functionName;receiverName;receiverMethodName;constructor(e,t,r,n){this.packageName=e,this.functionName=t||"",this.receiverName=r||"",this.receiverMethodName=n||""}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"}(ln||(ln={})),function(e){e.Healthy="Healthy",e.Updating="Updating",e.Degraded="Degraded",e.Failed="Failed",e.Down="Down",e.Unknown="Unknown"}(cn||(cn={})),function(e){e.Pending="Pending",e.Running="Running",e.Succeeded="Succeeded",e.Failed="Failed",e.Unknown="Unknown"}(dn||(dn={})),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"}(un||(un={})),function(e){e.Running="Running",e.Waiting="Waiting",e.Terminated="Terminated"}(pn||(pn={})),function(e){e.Logs="LOGS",e.Metrics="METRICS",e.Traces="TRACES",e.Profiles="PROFILES"}(hn||(hn={})),function(e){e.Logs="logs",e.Metrics="metrics",e.Traces="traces",e.Profiles="profiles"}(mn||(mn={}));const yn={[hn.Logs]:mn.Logs,[hn.Metrics]:mn.Metrics,[hn.Traces]:mn.Traces,[hn.Profiles]:mn.Profiles},bn={[mn.Logs]:hn.Logs,[mn.Metrics]:hn.Metrics,[mn.Traces]:hn.Traces,[mn.Profiles]:hn.Profiles},vn=(e,t)=>{let r=e;if(t.namespaces?.length){const e=new Set(t.namespaces.map(({id:e})=>e));r=r.filter(({namespace:t})=>e.has(t))}if(t.kinds?.length){const e=new Set(t.kinds.map(({id:e})=>e));r=r.filter(({kind:t})=>e.has(t))}if(t.languages?.length){const e=new Set(t.languages.map(({id:e})=>e));r=r.filter(({detectedLanguages:t,containers:r})=>t?.some(t=>e.has(t))||r?.some(t=>{const r=t.overrides?.runtimeInfo?.language??t.runtimeInfo?.language;return!!r&&e.has(r)}))}if(t.conditions?.length){const e=new Set(t.conditions.map(({id:e})=>e));r=r.filter(({conditions:t})=>t?.some(({type:t,reason:r})=>e.has(`${t}#${r}`)))}if(t.podsAgentInjectionStatus?.length){const e=new Set(t.podsAgentInjectionStatus.map(({id:e})=>e));r=r.filter(({podsAgentInjectionStatus:t})=>e.has(t?.reasonEnum)||e.has(t?.message))}if(t.onlyErrors&&(r=r.filter(e=>e.conditions?.some(e=>e.status===Xr.Error))),t.errors?.length){const e=new Set(t.errors.map(({id:e})=>e));r=r.filter(t=>t.conditions?.some(t=>e.has(t.message)))}return r},xn="https://docs.odigos.io",$n="default",wn="this-cluster",Sn="This Cluster",Cn={SELECTED_DATA_STREAM:"SELECTED_DATA_STREAM",SELECTED_DATA_STREAM_WITH_PROXY:e=>`SELECTED_DATA_STREAM_${e}`,OVERVIEW_FILTERS:"OVERVIEW_FILTERS",DARK_MODE:"DARK_MODE"},En={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)'},kn={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",DETECTED_CONTAINERS:"Detected Containers",DETECTED_CONTAINERS_DESCRIPTION:"The system automatically instruments the containers it detects with a supported programming language.",DETECTED_PROCESSES:"Detected Processes",DETECTED_PROCESSES_DESCRIPTION:"The system automatically instruments the processes it detects with a supported programming language.",CONTAINER_NAME:"Container Name",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.",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",ROLLBACK_OCCURRED_MESSAGE:"Odigos detected a crash and rolled back instrumentation to protect your workload.",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."},An={GET_STARTED:"Get started",ADD:"Add",ADD_NEW:"Add New",NEW:"New",SELECT:"Select",CREATE:"Create",UPDATE:"Update",EDIT:"Edit",DELETE:"Delete",CANCEL:"Cancel",DONE:"Done",SAVE:"Save",BACK:"Back",NEXT:"Next",TEST:"Test",TEST_CONNECTION:"Test Connection",INSTRUMENT:"Instrument",UNINSTRUMENT:"Uninstrument"},Dn=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||t===$n&&!e.dataStreamNames.length):[],Tn=(e,t="",r={})=>{for(const n in e)if(e.hasOwnProperty(n)){const o=e[n],i=t?`${t}.${n}`:n;null===o||"object"!=typeof o||Array.isArray(o)?Array.isArray(o)?o.forEach((e,t)=>{const n=`${i}[${t}]`;null!==e&&"object"==typeof e?Tn(e,n,r):r[n]=e}):r[i]=o:Tn(o,i,r)}return r},In=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]}`},Nn=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`}},Rn=()=>{const e=crypto.getRandomValues(new Uint8Array(16));let t=0;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,r=>{const n=e[t%16];t++;return("1"===r?n:"0"===r?63&n|128:15&n|64).toString(16)})},On=e=>{const t=e?.toLowerCase(),r=t?.includes(kr.Samplers),n=t===kr.Attributes;if(r)return l;if(n)return c;return{[Ar.K8sAttributes]:m,[Ar.AddClusterInfo]:h,[Ar.DeleteAttributes]:p,[Ar.PiiMasking]:c,[Ar.RenameAttributes]:u,[Ar.URLTemplatization]:d,[Ar.ErrorSampler]:l,[Ar.ProbabilisticSampler]:l,[Ar.LatencySampler]:l,[Ar.ServiceNameSampler]:l,[Ar.SpanAttributeSampler]:l}[e]||g},Pn=e=>{const t=e?.filter(({status:e})=>e===Xr.Error),r=e?.filter(({status:e})=>e===Xr.Warning),n=e?.filter(({status:e})=>e===Kr.Disabled),o=e?.filter(({status:e})=>e===Kr.Loading),i=t.length>0,a=r.length>0,s=n.length>0;return{errors:t,hasErrors:i,warnings:r,hasWarnings:a,disableds:n,hasDisableds:s,loadings:o,hasLoadings:o.length>0,priorotizedStatus:i?Xr.Error:a?Xr.Warning:s?Xr.Info:void 0}},Fn=e=>{const t=e?.reduce((e,t)=>t.agentEnabled?.agentEnabled?e+1:e,0);return`${t}/${e?.length||0} instrumented`},_n=e=>({[zr.Java]:R,[zr.Go]:N,[zr.JavaScript]:I,[zr.Python]:T,[zr.DotNet]:D,[zr.CSharp]:A,[zr.CPlusPlus]:k,[zr.Php]:E,[zr.Ruby]:C,[zr.Rust]:S,[zr.Swift]:w,[zr.Elixir]:$,[zr.MySql]:x,[zr.Nginx]:v,[zr.Postgres]:b,[zr.Redis]:y,[zr.Kafka]:f,[zr.Ignored]:g,[zr.Unknown]:g,[zr.Processing]:g,[zr.NoContainers]:g,[zr.NoRunningPods]:g}[e]||g),Ln=e=>e?.map(e=>{return _n((t=e,t.overrides?.runtimeInfo?.language??t.runtimeInfo?.language??"unknown"));var t})||[],Mn=e=>e?.map(e=>_n(e))||[],zn=e=>e.detectedLanguages?.length?Mn(e.detectedLanguages):Ln(e.containers),Bn=(e,t)=>{const r={[Zr.Alauda]:Le,[Zr.AlibabaCloud]:_e,[Zr.AppDynamics]:Fe,[Zr.Axiom]:Pe,[Zr.AzureBlob]:Oe,[Zr.AzureMonitor]:Re,[Zr.BetterStack]:Ne,[Zr.Bonree]:Ie,[Zr.Causely]:Te,[Zr.Checkly]:De,[Zr.Chronosphere]:Ae,[Zr.ClickHouse]:ke,[Zr.CloudWatch]:Ee,[Zr.Coralogix]:Ce,[Zr.Dash0]:Se,[Zr.Datadog]:we,[Zr.Dynamic]:q,[Zr.Dynatrace]:$e,[Zr.ElasticApm]:xe,[Zr.ElasticSearch]:ve,[Zr.GoogleCloud]:be,[Zr.GoogleCloudOTLP]:be,[Zr.GrafanaCloudLoki]:ye,[Zr.GrafanaCloudPrometheus]:ye,[Zr.GrafanaCloudTempo]:ye,[Zr.Greptime]:fe,[Zr.Groundcover]:ge,[Zr.Honeycomb]:me,[Zr.HyperDX]:he,[Zr.Instana]:pe,[Zr.Jaeger]:ue,[Zr.Kafka]:f,[Zr.Kloudmate]:de,[Zr.Last9]:ce,[Zr.Lightstep]:le,[Zr.LogzIo]:se,[Zr.Loki]:ae,[Zr.Lumigo]:ie,[Zr.Middleware]:oe,[Zr.NewRelic]:ne,[Zr.Observe]:re,[Zr.Odigos]:te,[Zr.OneUptime]:ee,[Zr.OpenObserve]:Z,[Zr.Opsverse]:Q,[Zr.Oracle]:Y,[Zr.OTLP]:q,[Zr.OTLPHttp]:q,[Zr.Prometheus]:J,[Zr.Qryn]:V,[Zr.QrynOss]:K,[Zr.Quickwit]:G,[Zr.S3]:X,[Zr.Seq]:H,[Zr.Signalfx]:j,[Zr.Signoz]:W,[Zr.Splunk]:j,[Zr.SplunkSapm]:j,[Zr.SplunkOtlp]:j,[Zr.SumoLogic]:U,[Zr.TelemetryHub]:B,[Zr.Tempo]:z,[Zr.Tingyun]:M,[Zr.Traceloop]:L,[Zr.Uptrace]:_,[Zr.VictoriaMetrics]:F,[Zr.VictoriaMetricsCloud]:F,[Zr.XRay]:P,[Zr.Pyroscope]:O}[e];return r&&!t?{icon:r}:{iconSrc:`https://d15jtxgb40qetw.cloudfront.net/${e}.svg`}},Un=e=>({[Ur.Namespace]:je,[Ur.Source]:Ue,[Ur.Destination]:Be,[Ur.Action]:d,[Ur.InstrumentationRule]:ze,[Ur.SamplingRule]:Me}[e]),jn=e=>"ruleId"in e&&e.ruleId?e.ruleId:"id"in e&&e.id?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,Wn=e=>e?"string"==typeof e?e:`${e.namespace}/${e.kind}/${e.name}`:"",Hn=e=>Wn(jn(e)),Xn=(e,t,r)=>{const{extended:n,prioritizeDisplayName:o}=r||{};let i="",a="";switch(t){case Ur.InstrumentationRule:const t=e;i=t.type,a=t.ruleName;break;case Ur.Source:const r=e;i=r.name,a=r.otelServiceName;break;case Ur.Action:const n=e;i=n.type,a=n.name;break;case Ur.Destination:const o=e;i=o.destinationType.displayName,a=o.name;break;case Ur.Namespace:const s=e;i=s.name,a=s.name}return n?i+(a&&a!==i?` (${a})`:""):o&&a||i},Gn=(e,t)=>{if(t===Ur.Source){const t={namespace:"",name:"",kind:""};return e.split("&").forEach(e=>{const[r,n]=e.split("=");t[r]=n}),t}return e},Kn=e=>({[nn.CodeAttributes]:Ge,[nn.CustomInstrumentation]:Xe,[nn.HeadersCollection]:He,[nn.PayloadCollection]:We,[nn.UnknownType]:g}[e]||g),Vn=e=>e.overrides?.runtimeInfo?.language??e.runtimeInfo?.language??zr.Unknown,Jn=e=>{const{numberOfInstances:t,containers:r}=e;if(!r)return t&&t>0?zr.Processing:zr.NoRunningPods;const n=r?.filter(e=>Vn(e)!==zr.Ignored);if(!n.length)return zr.NoContainers;const o=n.find(e=>Vn(e)!==zr.Unknown);return o?Vn(o):zr.Unknown},qn=(e,t,r)=>(t===Ur.Source?e?.sources.find(e=>e.kind===r.kind&&e.name===r.name&&e.namespace===r.namespace):e?.destinations.find(e=>e.id===r))||{throughput:0},Yn=e=>({[hn.Logs]:Je,[hn.Metrics]:Ve,[hn.Traces]:Ke,[hn.Profiles]:te}[e]),Qn=e=>{if(!e)return te;return{[Lr.K8s]:m,[Lr.Vm]:qe}[e]},Zn=e=>{if(!e)return"Unknown";return{[Lr.K8s]:"Kubernetes Cluster",[Lr.Vm]:"Virtual Machine"}[e]},eo=(e,t,r)=>{const n=e[t];return n?n.flatMap(e=>{const n=e[r],o=[];return void 0!==n&&(Array.isArray(n)?o.push(...n):o.push(n)),o.push(...eo(e,t,r)),o}):[]},to=(e,t)=>{if(t===Ur.Source){let t="";return Object.entries(e).forEach(([e,r])=>{t+=`${e}=${r}&`}),t.slice(0,-1),t}return e},ro=(e,t,r)=>{switch(t){case Xr.Default:return e.v2.colors.purple[r];case Xr.Info:return e.v2.colors.blue[r];case Xr.Error:return e.v2.colors.red[r];case Xr.Warning:return e.v2.colors.yellow[r];case Xr.Success:return e.v2.colors.green[r];case Kr.Loading:case Vr.Disabled:case Vr.Unknown:return e.v2.colors.silver[r];default:return e.v2.colors.white[500]}},no=e=>{switch(e){case cn.Updating:case dn.Pending:case un.ContainerCreating:case pn.Waiting:return Xr.Info;case cn.Healthy:case dn.Succeeded:case dn.Running:case un.Running:case pn.Running:return Xr.Success;case cn.Degraded:return Xr.Warning;case cn.Failed:case dn.Failed:case un.Error:case un.CrashLoopBackOff:case un.CreateContainerError:case un.CreateContainerConfigError:case un.ErrImagePull:case un.ErrImageNeverPull:case un.ImagePullBackOff:case un.InvalidImageName:case un.RegistryUnavailable:case un.NetworkNotReady:case un.OOMKilled:case un.ContainerCannotRun:case pn.Terminated:case un.DeadlineExceeded:case un.StartError:return Xr.Error;case cn.Down:case un.Completed:return Vr.Disabled;case cn.Unknown:case dn.Unknown:default:return Vr.Unknown}};var oo,io,ao;!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"}(oo||(oo={})),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"}(io||(io={})),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"}(ao||(ao={}));const so=new Set(Object.values(ao)),lo=(e,t)=>{if("string"!=typeof(r=t)||!so.has(r))return t;var r;switch(t){case ao.Primary:return e.v2.colors.white[500];case ao.Secondary:return e.v2.colors.silver[200];case ao.Tertiary:return e.v2.colors.black[500];case ao.Disable:return e.v2.colors.grey[400];case ao.Error:return e.v2.colors.red[500];case ao.Mandatory:return e.v2.colors.red[600];case ao.Link:return e.v2.colors.purple[400];case ao.Success:return e.v2.colors.green[400];default:return}},co=n.p`
|
|
2
|
-
margin: 0;
|
|
3
|
-
color: ${({$color:e,theme:t})=>lo(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:r})=>t||`${e.v2.text.size[r]+2}px`};
|
|
10
|
-
opacity: ${({$opacity:e})=>e};
|
|
11
|
-
|
|
12
|
-
${({$nowrap:e})=>e&&o`
|
|
13
|
-
text-wrap: nowrap;
|
|
14
|
-
white-space: nowrap;
|
|
15
|
-
overflow: hidden;
|
|
16
|
-
text-overflow: ellipsis;
|
|
17
|
-
`}
|
|
18
|
-
|
|
19
|
-
${({$underline:e})=>e&&o`
|
|
20
|
-
text-decoration: underline;
|
|
21
|
-
`}
|
|
22
|
-
|
|
23
|
-
${({$withClick:e})=>e&&o`
|
|
24
|
-
cursor: pointer;
|
|
25
|
-
&:hover {
|
|
26
|
-
text-decoration: underline;
|
|
27
|
-
}
|
|
28
|
-
`}
|
|
29
|
-
`,uo=Bt(({children:r,variant:n=oo.P,color:o,size:i=io.S,weight:a=400,opacity:s=1,align:l="left",lineHeight:c,transform:d,nowrap:u,underline:p,onClick:h,disabled:m,...g},f)=>{const y=r?.toString().split("\n")||[];return e(co,{ref:f,as:n,$color:o,$size:i,$weight:a,$opacity:s,$align:l,$lineHeight:c,$transform:d,$nowrap:u,$underline:p,$withClick:!!h&&!m,onClick:m?void 0:h,...g,children:y.map((r,n)=>t(Ut,{children:[r,n!==y.length-1&&e("br",{})]},`typography-${n}-${r}`))})});uo.displayName="Typography";const po=n.div`
|
|
30
|
-
border-radius: 100%;
|
|
31
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[700]};
|
|
32
|
-
position: relative;
|
|
33
|
-
`,ho=n.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
|
-
`,mo=n(uo)`
|
|
48
|
-
position: absolute;
|
|
49
|
-
top: 50%;
|
|
50
|
-
left: 50%;
|
|
51
|
-
transform: translate(-50%, -50%);
|
|
52
|
-
`,go=({percentage:r})=>t(po,{children:[e(ho,{}),"number"==typeof r?e(mo,{size:io.M,weight:500,children:`${r}%`}):null]}),fo={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 yo(e){if("number"==typeof e)return{value:e,unit:"px"};let t;const r=(e.match(/^[0-9.]*/)||"").toString();t=r.includes(".")?parseFloat(r):parseInt(r,10);const n=(e.match(/[^0-9]*$/)||"").toString();return fo[n]?{value:t,unit:n}:{value:t,unit:"px"}}function bo(e){const t=yo(e);return`${t.value}${t.unit}`}const vo=((e,t,r)=>{const n=`react-spinners-${e}-${r}`;if("undefined"==typeof window||!window.document)return n;const o=document.createElement("style");document.head.appendChild(o);const i=o.sheet,a=`\n @keyframes ${n} {\n ${t}\n }\n `;return i&&i.insertRule(a,0),n})("SpinnerOld","50% {opacity: 0.3} 100% {opacity: 1}","fade"),xo=({loading:r=!0,color:n,scale:o=1,speedMultiplier:a=1,cssOverride:s={},style:l={},...c})=>{const d=i(),u=n||d.text.secondary;if(!r)return null;const{value:p}=yo(2),h=p+4.2,m=h/2+h/5.5,g=4*h*o,f={position:"relative",width:`${g}px`,height:`${g}px`,scale:o,...l,...s},y=(e,t)=>({position:"absolute",width:bo(1.5),height:bo(4),borderRadius:bo(2),backgroundColor:u,transition:"2s",animationFillMode:"both",animation:`${vo} ${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:{...y(1,0),top:`calc(50% + ${h}px)`,left:"50%"}}),e("span",{style:{...y(2,-45),top:`calc(50% + ${m}px)`,left:`calc(50% + ${m}px)`}}),e("span",{style:{...y(3,90),top:"50%",left:`calc(50% + ${h}px)`}}),e("span",{style:{...y(4,45),top:`calc(50% + ${-1*m}px)`,left:`calc(50% + ${m}px)`}}),e("span",{style:{...y(5,0),top:`calc(50% + ${-1*h}px)`,left:"50%"}}),e("span",{style:{...y(6,-45),top:`calc(50% + ${-1*m}px)`,left:`calc(50% + ${-1*m}px)`}}),e("span",{style:{...y(7,90),top:"50%",left:`calc(50% + ${-1*h}px)`}}),e("span",{style:{...y(8,45),top:`calc(50% + ${m}px)`,left:`calc(50% + ${-1*m}px)`}})]})},$o=n.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
|
-
`,wo=({scale:t,icon:r})=>{const n=i();return e($o,{$size:45*t,$color:"rgba(80, 246, 232, 0.10)",children:e($o,{$size:43*t,$color:"rgba(80, 246, 232, 0.20)",children:e($o,{$size:39*t,$color:"rgba(80, 246, 232, 0.40)",children:e($o,{$size:33*t,$color:"rgba(80, 246, 232, 0.60)",children:e($o,{$size:23*t,$color:"#50F6E8",children:e(r,{size:16*t,fill:n.v2.colors.black[500]})})})})})})},So=434,Co=635,Eo=n.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
|
-
`,ko=n.div`
|
|
71
|
-
position: absolute;
|
|
72
|
-
top: 50%;
|
|
73
|
-
left: 50%;
|
|
74
|
-
transform: translate(-50%, -50%);
|
|
75
|
-
`,Ao=()=>t(Eo,{children:[e(ko,{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(ko,{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(ko,{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(ko,{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(ko,{children:e(te,{size:112})})]}),Do=n.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
|
-
`,To=({scale:t=1,icon:r})=>{const n=i();return e(Do,{$size:73*t,$color:"rgba(106, 42, 255, 0.10)",children:e(Do,{$size:71*t,$color:"rgba(106, 42, 255, 0.20)",children:e(Do,{$size:65*t,$color:"rgba(106, 42, 255, 0.40)",children:e(Do,{$size:56*t,$color:"rgba(106, 42, 255, 0.60)",children:e(Do,{$size:39*t,$color:n.v2.colors.purple[500],children:e(r,{size:32*t,fill:n.v2.colors.white[500]})})})})})})},Io=n.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: 24px 24px 0 24px;
|
|
93
|
-
`,No=n.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
|
-
`,Ro=n.div`
|
|
104
|
-
padding: ${({$padding:e})=>e||"12px"};
|
|
105
|
-
`,Oo=n.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
|
-
`,Po=n.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
|
-
`,Fo=n(Po)`
|
|
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
|
-
`,_o=n.div`
|
|
134
|
-
display: flex;
|
|
135
|
-
flex-direction: column;
|
|
136
|
-
padding: 12px;
|
|
137
|
-
overflow-y: scroll;
|
|
138
|
-
`,Lo=n.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
|
-
`,Mo=n.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
|
-
`,zo=n(Po)`
|
|
157
|
-
max-width: ${({$maxWidth:e})=>e||"unset"};
|
|
158
|
-
width: 100%;
|
|
159
|
-
`,Bo=n(Oo)`
|
|
160
|
-
gap: 16px;
|
|
161
|
-
padding: 16px;
|
|
162
|
-
`,Uo=n.div`
|
|
163
|
-
width: 100%;
|
|
164
|
-
max-height: ${({$maxHeight:e})=>e||"unset"};
|
|
165
|
-
overflow-y: auto;
|
|
166
|
-
`,jo=a`
|
|
167
|
-
0% {
|
|
168
|
-
background-position: 0% 50%;
|
|
169
|
-
}
|
|
170
|
-
100% {
|
|
171
|
-
background-position: 100% 50%;
|
|
172
|
-
}
|
|
173
|
-
`,Wo=n(uo)`
|
|
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: ${jo} 1s reverse linear infinite;
|
|
179
|
-
`,Ho=e=>{const t=Math.max(0,Date.now()-e),r=Math.floor(t/1e3),n=Math.floor(r/60),o=r%60;return`${String(n).padStart(2,"0")}:${String(o).padStart(2,"0")}`},Xo=({icon:r,title:n,titleColor:o,titleSize:a=io.S,subTitle:s,subTitleColor:l,subTitleSize:c=io.XXXS,startedAt:d,withGradient:u,gradientColor:p,withSpinner:h,withSpinnerOld:m,scaleSpinnerOld:g=1,percentage:f,withVisual:y,visualIcon:b=Ye})=>{const v=i(),[x,$]=jt(()=>d?Ho(d):"");Wt(()=>{if(!d)return;$(Ho(d));const e=setInterval(()=>$(Ho(d)),1e3);return()=>clearInterval(e)},[d]);const w=o||v.v2.colors.white[500],S=l||v.v2.colors.silver[200],C=p||v.v2.colors.black[500];return t(Po,{$gap:16,$alignItems:"center",children:[y?e(wo,{scale:1.7,icon:b}):h?e(go,{percentage:f}):m?e(xo,{scale:g}):null,(n||s||d||r)&&t(Po,{$gap:8,$alignItems:"center",children:[t(Oo,{$gap:4,children:[r&&e(r,{}),u?e(Wo,{align:"center",size:a,$titleColor:w,$gradientColor:C,children:n}):e(uo,{align:"center",size:a,color:w,children:n})]}),s?e(uo,{align:"center",size:c,color:S,children:s}):null,x?e(uo,{align:"center",size:c,color:w,children:x}):null]})]})},Go=(e,t)=>({[Xr.Default]:r=>te({fill:ro(t,e,"300"),...r}),[Xr.Info]:r=>nt({fill:ro(t,e,"400"),...r}),[Xr.Error]:r=>rt({fill:ro(t,e,"500"),...r}),[Xr.Warning]:r=>tt({fill:ro(t,e,"500"),...r}),[Xr.Success]:r=>et({fill:ro(t,e,"500"),...r}),[Kr.Loading]:e=>Xo({withSpinnerOld:!0,...e}),[Vr.Disabled]:r=>Ze({fill:ro(t,e,"400"),...r}),[Vr.Unknown]:r=>Qe({fill:ro(t,e,"300"),...r})}[e]),Ko=e=>{switch(e){case rn.Success:return Xr.Success;case rn.Error:case rn.Failure:return Xr.Error;case rn.Notice:return Xr.Warning;case rn.Unsupported:case rn.Unknown:return Xr.Info;case rn.Irrelevant:case rn.Disabled:return Kr.Disabled;case rn.Waiting:return Kr.Loading;case rn.Pending:default:return Xr.Default}},Vo=(e,t)=>{const r=t.find(([t,r])=>e>=t&&(null===r||e<=r));return r?.[2]||null},Jo={redis:y,mysql:x,postgresql:b,postgres:b,kafka:f,elasticsearch:ve,clickhouse:ke,oracle:Y,aws:ot},qo={sts:ft,dynamodb:gt,s3:X,sqs:mt,sns:ht,lambda:pt,kinesis:ut,ec2:dt,apigateway:ct,apigatewayv2:ct,bedrock:lt,bedrockruntime:lt,eventbridge:st,sfn:at,stepfunctions:at,secretsmanager:it,cloudwatch:Ee},Yo=e=>{const t=e.attributes,r=t["db.system"];if(r){const e=Jo[r.toLowerCase()];if(e)return e}const n=t["messaging.system"];if(n){const e=Jo[n.toLowerCase()];if(e)return e}const o=t["rpc.system"];if(o?.toLowerCase().includes("aws")){const e=t["rpc.service"]?.toLowerCase();if(e){const t=qo[e];if(t)return t}return ot}const i=e.serviceName.toLowerCase();for(const[e,t]of Object.entries(Jo))if(i.includes(e))return t;return Be},Qo=({namespace:e,name:t,kind:r})=>({namespace:e,name:t,kind:r});function Zo(e,t){if(!e)return t;if("object"==typeof e)return e;try{return JSON.parse(e)}catch(e){return t}}const ei=(e,t)=>{const r=[],n=JSON.parse(JSON.stringify(e));for(const e of n){const n=Zo(t.fields,{}),o=e.items.findIndex(e=>e.type===t.destinationType.type);-1!==o&&r.push(...e.items[o].fields.map(e=>({...e,initialValue:n[e.name]})))}return r},ti=(e,t)=>{const r=e=>e?.some(({healthy:e})=>e.status!==Xr.Success);return e?.length?e.some(({instrumentationInstances:e})=>r(e)):r(t)??!1},ri=e=>Array.isArray(e)?!e?.length:"object"==typeof e?!Object.keys(e||{}).length:[void 0,null,""].includes(e),ni=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)},oi=(e,t=0)=>{const r=(new Date).getTime();return new Date(e).getTime()-r<=t},ii=e=>{const t=String(e).trim().toLowerCase();return["true","false","1","0"].includes(t)},ai=(e,t=0)=>(new Date).getTime()-new Date(e).getTime()>=t,si=/^(\d+\.)?(\d+\.)?(\*|\d+)$/,li=e=>si.test(e),ci=e=>e?e.replace(/([a-z0-9])([A-Z])/g,"$1 $2"):"",di=e=>e?.map(({status:e,type:t,reason:r,message:n})=>({status:e?.toLowerCase(),type:ci(t),reason:r?ci(r):"",message:n}))||[],ui=(e,t)=>{const r=Zo(e.fields,{});return t.length?t.map(e=>({key:e.name,name:e.displayName||e.name,value:r[e.name]??null})).filter(e=>null!==e.value):Object.entries(r).map(([e,t])=>({key:e,name:e,value:t}))},pi=e=>e?Object.keys(e).filter(t=>e[t]).map(e=>bn[e]):[],hi=e=>e?Object.keys(e).filter(t=>e[t].supported).map(e=>bn[e]):[],mi=e=>e.replace(/[^\d]/g,""),gi=e=>{const t=String(e).trim().toLowerCase();return"true"===t||"1"===t},fi=e=>{let t="";try{const r=JSON.parse(e);t=Array.isArray(r)?r.map(e=>"object"==typeof e&&null!==e?`${e.key}: ${e.value}`:e).join(", "):"object"==typeof r&&null!==r?Object.entries(r).map(([e,t])=>`${e}: ${t}`).join(", "):e}catch(r){t=e}return t},yi=e=>{const t=e.fields.reduce((e,{key:t,value:r})=>{const n=(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}}})(r);return void 0!==n&&e.push({key:t,value:n}),e},[]);return{...e,fields:t}},bi=e=>{if("object"!=typeof e)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(r=>{const n=e[r];if(Array.isArray(n)){const e=n.filter(e=>null!=e&&""!==e);e.length>0&&(t[r]=e.map(e=>bi(e)))}else if("object"==typeof n&&null!==n){const e=bi(n);Object.keys(e).length>0&&(t[r]=e)}else[void 0,null,""].includes(n)||(t[r]=n)}),t},vi=(e,t=2)=>JSON.stringify(e||{},null,t),xi=async(e=1e3)=>new Promise(t=>setTimeout(t,e)),$i=e=>Object.entries(e).reduce((e,[t,r])=>(e[t]="string"==typeof r?r:JSON.stringify(r),e),{}),wi=e=>{let t=e.toString().replace("v","").split("-")[0];t=t.match(/[\d.]+/)?.[0]||"";const r=t.split(".");return 1e4*parseInt(r[0]||"0",10)+parseInt(r[1]||"0",10)},Si=zt(e=>({activeNodeType:null,activeNodeId:null,setActiveNodeType:t=>e({activeNodeType:t}),setActiveNodeId:t=>e({activeNodeId:t})})),Ci=[{type:Ar.K8sAttributes,icon:On(Ar.K8sAttributes),label:"Kubernetes Attributes",description:"Add dynamic k8s resource attributes to your data.",allowedSignals:[hn.Traces,hn.Metrics,hn.Logs,hn.Profiles],docsEndpoint:"/pipeline/actions/attributes/k8sattributes",docsDescription:"This action adds kubernetes related resource attributes to spans, metrics data points and log records."},{type:Ar.AddClusterInfo,icon:On(Ar.AddClusterInfo),label:"Add Cluster Info",description:"Add static cluster-scoped attributes to your data.",allowedSignals:[hn.Traces,hn.Metrics,hn.Logs,hn.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:Ar.DeleteAttributes,icon:On(Ar.DeleteAttributes),label:"Delete Attribute",description:"Delete attributes from logs, metrics, and traces.",allowedSignals:[hn.Traces,hn.Metrics,hn.Logs,hn.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:Ar.RenameAttributes,icon:On(Ar.RenameAttributes),label:"Rename Attribute",description:"Rename attributes in logs, metrics, and traces.",allowedSignals:[hn.Traces,hn.Metrics,hn.Logs,hn.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:Ar.PiiMasking,icon:On(Ar.PiiMasking),label:"PII Masking",description:"Mask PII data in your traces.",allowedSignals:[hn.Traces,hn.Profiles],docsEndpoint:"/pipeline/actions/attributes/piimasking",docsDescription:"This action processes a list of PII categories to be masked from the traces."},{type:Ar.URLTemplatization,icon:On(Ar.URLTemplatization),label:"URL Templatization",description:"Replace dynamic URL path segments with named placeholders to reduce span cardinality.",allowedSignals:[hn.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:wi("v1.21.0")}],Ei=[{type:Ar.ErrorSampler,icon:On(kr.Samplers),label:"Error Sampler",description:"Sample errors based on percentage.",allowedSignals:[hn.Traces,hn.Profiles],docsEndpoint:"/pipeline/actions/sampling/errorsampler",docsDescription:"This action is a Global Action that supports error sampling by filtering out non-error traces."},{type:Ar.LatencySampler,icon:On(kr.Samplers),label:"Latency Sampler",description:"Add latency to your traces.",allowedSignals:[hn.Traces,hn.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:Ar.ProbabilisticSampler,icon:On(kr.Samplers),label:"Probabilistic Sampler",description:"Sample traces based on percentage.",allowedSignals:[hn.Traces,hn.Profiles],docsEndpoint:"/pipeline/actions/sampling/probabilisticsampler",docsDescription:"This action supports probabilistic sampling based on a configured sampling percentage applied to the TraceID."},{type:Ar.ServiceNameSampler,icon:On(kr.Samplers),label:"Service Name Sampler",description:"Sample traces based on the presence of specified services within a trace.",allowedSignals:[hn.Traces,hn.Profiles],docsEndpoint:"/pipeline/actions/sampling/servicenamesampler",docsDescription:"This action supports service name sampling based on the presence of specified services within a trace."},{type:Ar.SpanAttributeSampler,icon:On(kr.Samplers),label:"Span Attributes Sampler",description:"Sample traces based on the presence or value of specific attributes within a trace.",allowedSignals:[hn.Traces,hn.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."}],ki=[{label:"Attributes",icon:On(kr.Attributes),items:Ci},{label:"Samplers",icon:On(kr.Samplers),items:Ei}];var Ai;!function(e){e.ALL="all",e.UNSAVED="unsaved",e.EXISTS="exists",e.DETECTED="detected",e.SELF_HOSTED="self-hosted",e.MANAGED="managed"}(Ai||(Ai={}));const Di={[Ai.ALL]:{TITLE:"All",DESCRIPTION:"All destinations"},[Ai.UNSAVED]:{TITLE:"Selected",DESCRIPTION:"These are destinations that you have not yet saved."},[Ai.EXISTS]:{TITLE:"Already configured",DESCRIPTION:"These are destinations that you have already configured in other data-streams and can reuse them."},[Ai.DETECTED]:{TITLE:"Detected by system",DESCRIPTION:"Odigos found these destinations in your cluster and pre-filled their details. Review and enable them to start sending data."},[Ai.SELF_HOSTED]:{TITLE:"Self hosted",DESCRIPTION:"Full control and customization for advanced application monitoring."},[Ai.MANAGED]:{TITLE:"Managed",DESCRIPTION:"Effortless monitoring with scalable performance management."}},Ti=[{type:nn.CodeAttributes,icon:Kn(nn.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:[zr.Go,zr.Python]},{type:nn.CustomInstrumentation,icon:Kn(nn.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:[zr.Go,zr.Java]},{type:nn.HeadersCollection,icon:Kn(nn.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:[zr.Go,zr.Java,zr.JavaScript]},{type:nn.PayloadCollection,icon:Kn(nn.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:[zr.Go,zr.JavaScript]}],Ii="Cancel",Ni="Save",Ri="Edit rule",Oi="Edit auto rule",Pi="Create rule",Fi="Delete rule",_i="Save",Li="Create your first rule",Mi="No Rules Exist",zi="No Results",Bi=e=>`No rules match the search term "${e}"`,Ui="Rule name",ji="Rule type",Wi="Select the type of condition that makes a trace highly relevant.",Hi="Rule Enabled",Xi="Rule Disabled",Gi="Enabled",Ki="Disabled",Vi="Note",Ji="HTTP route",qi="Method",Yi="Keep Percentage",Qi="Drop Percentage",Zi="Keep traces with duration larger than",ea="Keep traces with errors",ta="Keep at least this percentage of matching traces",ra="Keep at most this percentage of matching traces",na="Custom percentage",oa="Disabled rule",ia="Sample",aa="Keep all",sa="Drop all",la="Operation type",ca="HTTP route prefix",da="Templated path",ua="Templated path prefix",pa="Kafka topic",ha="Custom duration (ms)",ma="No preview available",ga="Server address",fa="Drop at most this percentage of matching traces",ya="Unnamed rule",ba="Sampling Preview",va="Source Scope",xa="Unknown source",$a="Operation",wa="Duration",Sa="Errors",Ca="Keep Percentage",Ea="Drop Percentage",ka="Define which sources this rule applies to. You can target specific services, namespaces, or apply the rule to the entire cluster.",Aa="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.",Da="Define a duration threshold for this rule. Traces with a duration longer than the specified value will be considered important and retained.",Ta="Retain traces with errors from the selected services and operations.",Ia="Specify the exact percentage of matching traces to keep",Na="Specify the exact percentage of matching traces to drop",Ra="Type rule name",Oa="Add note here...",Pa="Type here",Fa="Search source name",_a="e.g. collector.my.vendor.com",La="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.",Ba="All sources",Ua="-",ja="All",Wa="All operations",Ha="HTTP server endpoint",Xa="HTTP client endpoint",Ga="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?",rs="Delete",ns="Cancel",os="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.",us="Create 'Highly Relevant Operations' rule",ps="Edit 'Highly Relevant Operations' rule",hs="Automatically keep all error traces across the entire cluster.",ms="Create 'Cost Reduction' rule",gs="Edit 'Cost Reduction' rule",fs="Automatically drop a percentage of traces across the entire cluster.",ys="Skip setup",bs="Start setup",vs="Next",xs="Go to Sampling",$s="Read more",ws="Welcome to Sampling",Ss="Cut costs without losing what matters",Cs="Odigos sampling works in three stages:",Es="Filter noisy traffic",ks="Remove non-actionable traces like health checks.",As="Guarantee highly relevance operations",Ds="Keep traces with errors, high latency, or mission-critical endpoints/services.",Ts="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)",Ps="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.",Fs="Preset Rules",_s="Kubernetes Health Probes",Ls="Automatically ignore health checks",Ms="You can review, adjust, and add additional custom rules later.",zs="Choose your sampling strategy",Bs="Pick the approach that best fits your balance of cost vs data-completeness",Us="Keep List",js="Budget Friendly",Ws="Define which traces must be kept, while all others are sampled by default to minimize cost.",Hs="Cost-oriented - keeps only what you explicitly select.",Xs="Best for very large clusters with high volumes of traces and high costs.",Gs="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",rl="Protect important traces",nl="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:",ol="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",ul="Preset Rules",pl="Error collection - entire cluster",hl="Keep all traces with errors",ml="Ambient sampling percentage",gl="'Drop List' profile",fl="Reduce high-volume traffic",yl="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.",bl="Advanced Configuration",vl="Configure sampling rules",xl="Advanced mode allows you to configure all sampling categories:",$l="Noise Filtering - remove non-actionable traces",wl="Highly Relevance - guarantee important traces are kept",Sl='Cost Control - drop traces for "Normal" operations',Cl="Rules can target:",El="Services",kl="HTTP Endpoints",Al="DB Operations",Dl="Errors",Tl="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",Pl="Guarantee important traces",Fl="Reduce cost using controlled sampling",_l="Recommended",Ll={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:us,costReduction:ms},zl={noisy:cs,highlyRelevant:ps,costReduction:gs},Bl={noisy:"Noisy Operation",highlyRelevant:"Highly Relevant",costReduction:"Cost Reduction"},Ul=[{id:hn.Logs,value:"Logs"},{id:hn.Metrics,value:"Metrics"},{id:hn.Traces,value:"Traces"},{id:hn.Profiles,value:"Profiles"}],jl={[zr.Go]:"Go",[zr.Java]:"Java",[zr.JavaScript]:"Node.js",[zr.Python]:"Python",[zr.DotNet]:".NET",[zr.CSharp]:"C#",[zr.CPlusPlus]:"C++",[zr.Php]:"PHP",[zr.Ruby]:"Ruby",[zr.Rust]:"Rust",[zr.Swift]:"Swift",[zr.Elixir]:"Elixir",[zr.MySql]:"MySQL",[zr.Nginx]:"Nginx",[zr.Postgres]:"PostgreSQL",[zr.Redis]:"Redis",[zr.Kafka]:"Kafka",[zr.Ignored]:"Ignored",[zr.Unknown]:"Unknown",[zr.Processing]:"Processing",[zr.NoContainers]:"No Containers",[zr.NoRunningPods]:"No Running Pods"},Wl=[{id:zr.Go,value:jl[zr.Go],icon:_n(zr.Go)},{id:zr.Java,value:jl[zr.Java],icon:_n(zr.Java)},{id:zr.JavaScript,value:jl[zr.JavaScript],icon:_n(zr.JavaScript)},{id:zr.Python,value:jl[zr.Python],icon:_n(zr.Python)},{id:zr.Php,value:jl[zr.Php],icon:_n(zr.Php)},{id:zr.Ruby,value:jl[zr.Ruby],icon:_n(zr.Ruby)},{id:zr.Rust,value:jl[zr.Rust],icon:_n(zr.Rust)},{id:zr.DotNet,value:jl[zr.DotNet],icon:_n(zr.DotNet)},{id:zr.CSharp,value:jl[zr.CSharp],icon:_n(zr.CSharp)},{id:zr.CPlusPlus,value:jl[zr.CPlusPlus],icon:_n(zr.CPlusPlus)},{id:zr.Swift,value:jl[zr.Swift],icon:_n(zr.Swift)},{id:zr.Elixir,value:jl[zr.Elixir],icon:_n(zr.Elixir)}],Hl={id:tn.OpentelemetryEbpfInstrumentation,value:tn.OpentelemetryEbpfInstrumentation,icon:q},Xl={[zr.Go]:{community:[{id:tn.GolangCommunity,value:tn.GolangCommunity,icon:_n(zr.Go)},Hl],enterprise:[{id:tn.GolangEnterprise,value:tn.GolangEnterprise,icon:_n(zr.Go)}]},[zr.JavaScript]:{community:[{id:tn.NodejsCommunity,value:tn.NodejsCommunity,icon:_n(zr.JavaScript)},Hl],enterprise:[{id:tn.NodejsEnterprise,value:tn.NodejsEnterprise,icon:_n(zr.JavaScript)}]},[zr.Python]:{community:[{id:tn.PythonCommunity,value:tn.PythonCommunity,icon:_n(zr.Python)},Hl],enterprise:[{id:tn.PythonEnterprise,value:tn.PythonEnterprise,icon:_n(zr.Python)}]},[zr.Java]:{community:[{id:tn.JavaCommunity,value:tn.JavaCommunity,icon:_n(zr.Java)},Hl],enterprise:[{id:tn.JavaEnterprise,value:tn.JavaEnterprise,icon:_n(zr.Java)},{id:tn.JavaEbpfInstrumentations,value:tn.JavaEbpfInstrumentations,icon:_n(zr.Java)}]},[zr.DotNet]:{community:[{id:tn.DotNetCommunity,value:tn.DotNetCommunity,icon:_n(zr.DotNet)},Hl],enterprise:[{id:tn.DotNetEnterprise,value:tn.DotNetEnterprise,icon:_n(zr.DotNet)}]},[zr.Ruby]:{community:[{id:tn.RubyCommunity,value:tn.RubyCommunity,icon:_n(zr.Ruby)},Hl],enterprise:[{id:tn.RubyEnterprise,value:tn.RubyEnterprise,icon:_n(zr.Ruby)}]},[zr.Php]:{community:[{id:tn.PhpCommunity,value:tn.PhpCommunity,icon:_n(zr.Php)},Hl],enterprise:[]},[zr.CSharp]:{community:[],enterprise:[{id:tn.CPlusPlusEnterprise,value:tn.CPlusPlusEnterprise,icon:_n(zr.CSharp)}]},[zr.MySql]:{community:[],enterprise:[{id:tn.MySqlEnterprise,value:tn.MySqlEnterprise,icon:_n(zr.MySql)}]},[zr.CPlusPlus]:{community:[Hl],enterprise:[]},[zr.Rust]:{community:[Hl],enterprise:[]},[zr.Swift]:{community:[Hl],enterprise:[]},[zr.Elixir]:{community:[Hl],enterprise:[]},[zr.Nginx]:{community:[Hl],enterprise:[]},[zr.Postgres]:{community:[Hl],enterprise:[]},[zr.Redis]:{community:[Hl],enterprise:[]},[zr.Kafka]:{community:[Hl],enterprise:[]},[zr.Ignored]:{community:[],enterprise:[]},[zr.Unknown]:{community:[],enterprise:[]},[zr.Processing]:{community:[],enterprise:[]},[zr.NoContainers]:{community:[],enterprise:[]},[zr.NoRunningPods]:{community:[],enterprise:[]}},Gl=6048e5,Kl=zt()(Zt(e=>({darkMode:!0,setDarkMode:t=>e({darkMode:t})}),{name:Cn.DARK_MODE,storage:"undefined"!=typeof window?er(()=>localStorage):void 0})),Vl={dataStreamsLoading:!1,dataStreams:[],selectedStreamName:$n},Jl=zt(e=>({...Vl,setDataStreamsLoading:t=>e({dataStreamsLoading:t}),setDataStreams:t=>e({dataStreams:t}),addDataStreams:t=>e(e=>{const r=[...e.dataStreams,...t].map(e=>[e.name,e]);return{dataStreams:Array.from(new Map(r).values())}}),removeDataStreams:t=>e(e=>({dataStreams:e.dataStreams.filter(e=>!t.find(t=>t.name===e.name))})),setSelectedStreamName:t=>e({selectedStreamName:t}),resetDataStreamStore:()=>e(Vl)})),ql=zt(e=>({drawerType:null,drawerEntityId:null,setDrawerType:t=>e({drawerType:t}),setDrawerEntityId:t=>e({drawerEntityId:t})})),Yl=zt(e=>({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[],setEntitiesLoading:(t,r)=>{const n=t===Ur.Namespace?"namespacesLoading":t===Ur.Source?"sourcesLoading":t===Ur.Destination?"destinationsLoading":t===Ur.Action?"actionsLoading":t===Ur.InstrumentationRule?"instrumentationRulesLoading":"NONE";"NONE"!==n&&e({[n]:r})},setEntities:(t,r)=>{const n=t===Ur.Namespace?"namespaces":t===Ur.Source?"sources":t===Ur.Destination?"destinations":t===Ur.Action?"actions":t===Ur.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==n&&e({[n]:r})},addEntities:(t,r)=>{const n=t===Ur.Namespace?"namespaces":t===Ur.Source?"sources":t===Ur.Destination?"destinations":t===Ur.Action?"actions":t===Ur.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==n&&e(e=>{const t=[...e[n]],o=new Map;return t.forEach((e,t)=>{o.set(Hn(e),t)}),r.forEach(e=>{const r=Hn(e),n=o.get(r);void 0!==n?t[n]={...t[n],...e}:(o.set(r,t.length),t.push(e))}),{[n]:t}})},removeEntities:(t,r)=>{const n=t===Ur.Namespace?"namespaces":t===Ur.Source?"sources":t===Ur.Destination?"destinations":t===Ur.Action?"actions":t===Ur.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==n&&e(e=>{const t=new Set(r.map(e=>Wn(e))),o=e[n].filter(e=>!t.has(Hn(e)));return{[n]:o}})},resetEntityStore:()=>{e({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[]})}})),Ql=()=>({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],conditions:[],podsAgentInjectionStatus:[],errors:[],onlyErrors:!1}),Zl=zt(e=>({searchText:"",setSearchText:t=>e({searchText:t}),statuses:[],setStatuses:t=>e({statuses:t}),platformTypes:[],setPlatformTypes:t=>e({platformTypes:t}),namespaces:[],setNamespaces:t=>e({namespaces:t}),kinds:[],setKinds:t=>e({kinds:t}),monitors:[],setMonitors:t=>e({monitors:t}),languages:[],setLanguages:t=>e({languages:t}),conditions:[],setConditions:t=>e({conditions:t}),podsAgentInjectionStatus:[],setPodsAgentInjectionStatus:t=>e({podsAgentInjectionStatus:t}),errors:[],setErrors:t=>e({errors:t}),onlyErrors:!1,setOnlyErrors:t=>e({onlyErrors:t}),setAll:t=>e(t),clearAll:()=>e({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],conditions:[],podsAgentInjectionStatus:[],errors:[],onlyErrors:!1}),getEmptyState:Ql})),ec=zt(e=>({currentModal:"",setCurrentModal:t=>e({currentModal:t})})),tc=zt((e,t)=>({notifications:[],addNotification:r=>{const n=new Date,o=`${n.getTime().toString()}${r.target?`#${r.target}`:""}`,{notifications:i}=t();i.some(e=>e.type===r.type&&e.title===r.title&&e.message===r.message&&!e.dismissed)||e(e=>({notifications:[{...r,id:o,time:n.toISOString(),dismissed:!1,seen:!1},...e.notifications]}))},markAsDismissed:t=>{e(e=>{const r=e.notifications.findIndex(e=>e.id===t);return-1!==r&&(e.notifications[r].dismissed=!0),{notifications:e.notifications}})},markAsSeen:t=>{e(e=>{const r=e.notifications.findIndex(e=>e.id===t);return-1!==r&&(e.notifications[r].seen=!0),{notifications:e.notifications}})},removeNotification:t=>{e(e=>{const r=e.notifications.findIndex(e=>e.id===t);return-1!==r&&e.notifications.splice(r,1),{notifications:e.notifications}})},removeNotifications:t=>{t&&e(e=>({notifications:e.notifications.filter(e=>e.id.split("#")[1]!==t)}))}}));var rc;!function(e){e.Instrumenting="instrumenting",e.Uninstrumenting="uninstrumenting",e.BulkInstrumenting="bulk-instrumenting",e.BulkUninstrumenting="bulk-uninstrumenting",e.DownloadingDiagnose="downloading-diagnose"}(rc||(rc={}));const nc=(e,t)=>({...t?.[e]||{total:0,current:0,percentage:0}}),oc=e=>(e.total<e.current&&(e.total=e.current+1),e.percentage=Math.round(e.current/e.total*100),e),ic=zt((e,t)=>({progress:{},setProgress:(r,n)=>{const o=t(),i=nc();return"number"==typeof n.total&&(i.total=n.total),"number"==typeof n.current&&(i.current=n.current),Array.isArray(n.list)&&(i.list=n.list),e({progress:{...o.progress,[r]:oc(i)}})},addProgress:(r,n,o)=>{const i=t(),a=nc(r,i.progress);return a.current+=n,o&&(a.list=a.list?.map(e=>e.label===o.label?{...e,status:o.status}:e)),e({progress:{...i.progress,[r]:oc(a)}})},resetProgress:t=>e({progress:{[t]:void 0}})})),ac=zt(e=>({selectedSources:{},setSelectedSources:t=>e({selectedSources:t}),resetSelectedState:()=>e(()=>({selectedSources:{},selectedConnection:null}))})),sc={configuredSources:{},configuredFutureApps:{},configuredDestinations:[],configuredDestinationsUpdateOnly:[]},lc=(e,t)=>e.destinationType.type!==t.destinationType.type,cc=zt(e=>({...sc,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=>lc(e,t))})),setConfiguredDestinationsUpdateOnly:t=>e({configuredDestinationsUpdateOnly:t}),addConfiguredDestinationUpdateOnly:t=>e(e=>{const r=[...e.configuredDestinationsUpdateOnly,t].map(e=>[e.id,e]);return{configuredDestinationsUpdateOnly:Array.from(new Map(r).values())}}),removeConfiguredDestinationUpdateOnly:t=>e(e=>({configuredDestinationsUpdateOnly:e.configuredDestinationsUpdateOnly.filter(e=>lc(e,t))})),clearStore:()=>e(()=>({...sc}))})),dc={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"}},uc={v2:dc.v2,darkMode:!0,colors:{...dc.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:dc.font_family},pc={v2:dc.v2,darkMode:!1,colors:{...dc.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:dc.font_family},hc=e=>e?uc:pc;var mc=Object.freeze({__proto__:null,baseTheme:dc,darkModeTheme:uc,getTheme:hc,lightModeTheme:pc});tr('@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=Kode+Mono:wght@100;200;300;400;500;600;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap");*{-ms-overflow-style:none;scrollbar-width:none}::-webkit-scrollbar{display:none}*{animation-duration:.3s;animation-fill-mode:forwards;transition:all .3s}input{all:unset}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-transition:all 50000s ease-in-out 0s;transition:all 50000s ease-in-out 0s}');const gc=({children:t})=>{const{darkMode:r}=Kl();return e(s,{theme:hc(r),children:t})},fc={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 yc=Object.freeze({__proto__:null,hex:fc});const bc={in:{left:a`
|
|
180
|
-
from { transform: translateX(-100%); }
|
|
181
|
-
to { transform: translateX(0); }
|
|
182
|
-
`,right:a`
|
|
183
|
-
from { transform: translateX(100%); }
|
|
184
|
-
to { transform: translateX(0); }
|
|
185
|
-
`,top:a`
|
|
186
|
-
from { transform: translateY(-100%); }
|
|
187
|
-
to { transform: translateY(0); }
|
|
188
|
-
`,bottom:a`
|
|
189
|
-
from { transform: translateY(100%); }
|
|
190
|
-
to { transform: translateY(0); }
|
|
191
|
-
`,center:a`
|
|
192
|
-
from { transform: translate(-50%, 100%); }
|
|
193
|
-
to { transform: translate(-50%, -50%); }
|
|
194
|
-
`},out:{left:a`
|
|
195
|
-
from { transform: translateX(0); }
|
|
196
|
-
to { transform: translateX(-100%); }
|
|
197
|
-
`,right:a`
|
|
198
|
-
from { transform: translateX(0); }
|
|
199
|
-
to { transform: translateX(100%); }
|
|
200
|
-
`,top:a`
|
|
201
|
-
from { transform: translateY(0); }
|
|
202
|
-
to { transform: translateY(-100%); }
|
|
203
|
-
`,bottom:a`
|
|
204
|
-
from { transform: translateY(0); }
|
|
205
|
-
to { transform: translateY(100%); }
|
|
206
|
-
`,center:a`
|
|
207
|
-
from { transform: translate(-50%, -50%); }
|
|
208
|
-
to { transform: translate(-50%, 100%); }
|
|
209
|
-
`}},vc={in:a`
|
|
210
|
-
from {
|
|
211
|
-
width: 0%;
|
|
212
|
-
}
|
|
213
|
-
to {
|
|
214
|
-
width: 100%;
|
|
215
|
-
}
|
|
216
|
-
`,out:a`
|
|
217
|
-
from {
|
|
218
|
-
width: 100%;
|
|
219
|
-
}
|
|
220
|
-
to {
|
|
221
|
-
width: 0%;
|
|
222
|
-
}
|
|
223
|
-
`},xc=a`
|
|
224
|
-
0% {
|
|
225
|
-
transform: scale(1);
|
|
226
|
-
opacity: 1;
|
|
227
|
-
}
|
|
228
|
-
75%, 100% {
|
|
229
|
-
transform: scale(2);
|
|
230
|
-
opacity: 0;
|
|
231
|
-
}
|
|
232
|
-
`,$c=a`
|
|
233
|
-
0% {
|
|
234
|
-
background-position: -500px 0;
|
|
235
|
-
}
|
|
236
|
-
100% {
|
|
237
|
-
background-position: 500px 0;
|
|
238
|
-
}
|
|
239
|
-
`,wc={in:a`
|
|
240
|
-
from {
|
|
241
|
-
opacity: 0;
|
|
242
|
-
}
|
|
243
|
-
to {
|
|
244
|
-
opacity: 1;
|
|
245
|
-
}
|
|
246
|
-
`,out:a`
|
|
247
|
-
from {
|
|
248
|
-
opacity: 1;
|
|
249
|
-
}
|
|
250
|
-
to {
|
|
251
|
-
opacity: 0;
|
|
252
|
-
}
|
|
253
|
-
`};var Sc=Object.freeze({__proto__:null,fade:wc,ping:xc,progress:vc,shimmer:$c,slide:bc});const Cc=n.span`
|
|
254
|
-
display: flex;
|
|
255
|
-
align-items: center;
|
|
256
|
-
justify-content: center;
|
|
257
|
-
|
|
258
|
-
min-height: 16px;
|
|
259
|
-
min-width: 16px;
|
|
260
|
-
width: fit-content;
|
|
261
|
-
padding: 4px;
|
|
262
|
-
gap: 2px;
|
|
263
|
-
|
|
264
|
-
border-radius: 50px;
|
|
265
|
-
border: 1px solid ${({theme:e,$filled:t,$status:r})=>r?e.text[r]+(t?"":fc["050"]):t?"transparent":e.colors.border};
|
|
266
|
-
background-color: ${({theme:e,$filled:t,$status:r})=>t?r?e.colors[r]:e.colors.majestic_blue:"transparent"};
|
|
267
|
-
color: ${({theme:e,$filled:t,$status:r})=>t&&r?e.text.secondary:t?e.text.white:r?e.text[r]:e.text.grey};
|
|
268
|
-
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
269
|
-
font-size: 12px;
|
|
270
|
-
white-space: nowrap;
|
|
271
|
-
|
|
272
|
-
${({theme:e,$filled:t,$status:r,$clickable:n})=>n&&`&:hover {\n cursor: pointer;\n background-color: ${r?e.colors[r]+fc["020"]:t?e.colors.majestic_blue_soft:e.colors.secondary+fc["020"]};\n }`}
|
|
273
|
-
`,Ec=({label:r,filled:n,status:o,withIcon:a,onClick:s})=>{const l=i(),c=o&&a?Go(o,l):null;return t(Cc,{$filled:n,$status:o,$clickable:!!s,onClick:s,children:[!!c&&e(c,{}),r]})},kc=n.div`
|
|
274
|
-
height: fit-content;
|
|
275
|
-
border: 2px solid transparent;
|
|
276
|
-
padding: 2px;
|
|
277
|
-
border-radius: 32px;
|
|
278
|
-
background-color: transparent;
|
|
279
|
-
transition: border-color 0.3s ease;
|
|
280
|
-
&:focus-within {
|
|
281
|
-
border-color: ${({theme:e})=>e.colors.secondary};
|
|
282
|
-
}
|
|
283
|
-
`,Ac={primary:o`
|
|
284
|
-
border: 1px solid ${({theme:e})=>e.text.secondary+fc["024"]};
|
|
285
|
-
background: ${({theme:e})=>e.colors.secondary};
|
|
286
|
-
color: ${({theme:e})=>e.colors.primary};
|
|
287
|
-
&:hover {
|
|
288
|
-
background: ${({theme:e})=>e.colors.secondary+fc["080"]};
|
|
289
|
-
}
|
|
290
|
-
&:active {
|
|
291
|
-
background: ${({theme:e})=>e.text.secondary+fc["060"]};
|
|
292
|
-
}
|
|
293
|
-
`,secondary:o`
|
|
294
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
295
|
-
background: ${({theme:e})=>e.colors.primary};
|
|
296
|
-
color: ${({theme:e})=>e.colors.secondary};
|
|
297
|
-
&:hover {
|
|
298
|
-
border: 1px solid ${({theme:e})=>e.text.darker_grey};
|
|
299
|
-
background: ${({theme:e})=>e.colors.secondary+fc["010"]};
|
|
300
|
-
}
|
|
301
|
-
&:active {
|
|
302
|
-
border: 1px solid ${({theme:e})=>e.text.dark_grey};
|
|
303
|
-
background: ${({theme:e})=>e.colors.secondary+fc["015"]};
|
|
304
|
-
}
|
|
305
|
-
`,tertiary:o`
|
|
306
|
-
border-color: transparent;
|
|
307
|
-
background: transparent;
|
|
308
|
-
&:hover {
|
|
309
|
-
background: ${({theme:e})=>e.colors.dropdown_bg_2+fc["040"]};
|
|
310
|
-
}
|
|
311
|
-
&:active {
|
|
312
|
-
background: ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
313
|
-
}
|
|
314
|
-
`,danger:o`
|
|
315
|
-
border-color: transparent;
|
|
316
|
-
background: ${({theme:e})=>e.text.error};
|
|
317
|
-
&:hover {
|
|
318
|
-
background: ${({theme:e})=>e.text.error+fc["090"]};
|
|
319
|
-
}
|
|
320
|
-
&:active {
|
|
321
|
-
background: ${({theme:e})=>e.text.error+fc["080"]};
|
|
322
|
-
}
|
|
323
|
-
`,warning:o`
|
|
324
|
-
border-color: transparent;
|
|
325
|
-
background: ${({theme:e})=>e.text.warning};
|
|
326
|
-
&:hover {
|
|
327
|
-
background: ${({theme:e})=>e.text.warning+fc["090"]};
|
|
328
|
-
}
|
|
329
|
-
&:active {
|
|
330
|
-
background: ${({theme:e})=>e.text.warning+fc["080"]};
|
|
331
|
-
}
|
|
332
|
-
`},Dc=n.button`
|
|
333
|
-
height: 36px;
|
|
334
|
-
border-radius: 32px;
|
|
335
|
-
cursor: pointer;
|
|
336
|
-
display: flex;
|
|
337
|
-
align-items: center;
|
|
338
|
-
justify-content: center;
|
|
339
|
-
gap: 8px;
|
|
340
|
-
padding: 0 12px;
|
|
341
|
-
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
342
|
-
text-transform: uppercase;
|
|
343
|
-
text-decoration: underline;
|
|
344
|
-
font-weight: 600;
|
|
345
|
-
outline: none;
|
|
346
|
-
${({$variant:e})=>e&&Ac[e]}
|
|
347
|
-
${({disabled:e,$variant:t})=>e&&o`
|
|
348
|
-
opacity: 0.5;
|
|
349
|
-
cursor: not-allowed;
|
|
350
|
-
|
|
351
|
-
${"primary"===t?o`
|
|
352
|
-
color: ${({theme:e})=>e.colors.secondary};
|
|
353
|
-
background: ${({theme:e})=>e.text.secondary+fc["010"]};
|
|
354
|
-
&:hover {
|
|
355
|
-
background: ${({theme:e})=>e.text.secondary+fc["015"]};
|
|
356
|
-
}
|
|
357
|
-
`:""}
|
|
358
|
-
`}
|
|
359
|
-
`,Tc=({children:t,variant:r="primary",onClick:n,...o})=>{const i=Ht(null);return e(kc,{$variant:r,children:e(Dc,{ref:i,$variant:r,onClick:e=>{n&&n(e),i.current?.blur()},...o,children:t})})},Ic=n.div`
|
|
360
|
-
color: ${({$color:e,theme:t})=>e||t.text.secondary};
|
|
361
|
-
font-size: ${({$size:e})=>void 0!==e?e:16}px;
|
|
362
|
-
font-weight: ${({$weight:e})=>void 0!==e?e:300};
|
|
363
|
-
text-align: ${({$align:e})=>e||"left"};
|
|
364
|
-
opacity: ${({$opacity:e})=>void 0!==e?e:1};
|
|
365
|
-
text-decoration: ${({$decoration:e})=>e||"none"};
|
|
366
|
-
text-transform: ${({$transform:e,$family:t})=>e||("secondary"===t?"uppercase":"none")};
|
|
367
|
-
font-family: ${({theme:e,$family:t="primary"})=>e.font_family[t]};
|
|
368
|
-
white-space: ${({$nowrap:e})=>e?"nowrap":"unset"};
|
|
369
|
-
text-wrap: ${({$nowrap:e})=>e?"nowrap":"unset"};
|
|
370
|
-
`,Nc=e=>{const t=e.match(/<a[^>]*href="([^"]*)"[^>]*>(.*?)<\/a>/g);return t?.map(e=>{const[t,r,n]=e.split('"');return{original:e,href:r,label:n.replace("</a>","").replace(">","")}})},Rc=e=>{const t=e.match(/<strong[^>]*>(.*?)<\/strong>/g);return t?.map(e=>{const t=e.replace(/<strong[^>]*>/,"").replace(/<\/strong>/,"");return{original:e,label:t}})},Oc=(r,n)=>{const o=Nc(r);o?.forEach((e,t)=>{r=r.replace(e.original,`LINK-${t}###`)});const i=Rc(r);i?.forEach((e,t)=>{r=r.replace(e.original,`STRONG-${t}###`)});return r.split(" ").map(r=>{if(r.includes("LINK-")){const[i,a]=r.split("###"),s=o?.[parseInt(i.replace("LINK-",""))];return t(Ut,{children:[e("a",{href:s?.href,target:"_blank",rel:"noreferrer",style:{color:n.colors.majestic_blue_soft},children:s?.label}),a?`${a} `:" "]},r)}if(r.includes("STRONG-")){const[n,o]=r.split("###"),a=i?.[parseInt(n.replace("STRONG-",""))];return t(Ut,{children:[e("strong",{style:{fontWeight:600},children:a?.label}),o?`${o} `:" "]},r)}return r+" "})},Pc=({children:r,color:n,size:o,weight:a,align:s,family:l,opacity:c,decoration:d,transform:u,nowrap:p,...h})=>{const m=i(),g=Xt(()=>(r?["string","number"].includes(typeof r)?r.toString():Array.isArray(r)?r.map(e=>"object"==typeof e&&Object.hasOwn(e,"props")?e.props.children:e).filter(e=>e&&["string","number"].includes(typeof e)).join(" "):"":"").split("\n"),[r]);return e(Ic,{$color:n,$size:o,$weight:a,$align:s,$family:l,$opacity:c,$decoration:d,$transform:u,$nowrap:p,...h,children:g.length?g.map((r,n)=>t(Ut,{children:[Oc(r,m),n!==g.length-1?e("br",{}):null]},`text-${n}-${r}`)):r})},Fc=e=>{function t(){return void 0===e?{}:xr(e)}const[r,n]=jt(t()),[o,i]=jt({}),[a,s]=jt(t()),l=Gt((e,t)=>{const r={};if(!t||"object"!=typeof t)return e?{...e}:r;for(const[n,o]of Object.entries(e)){const e=n;if(Array.isArray(o)){const n=t[e];Array.isArray(n)&&o.length===n.length&&o.every((e,t)=>"object"==typeof e&&null!==e?0===Object.keys(l(e,n[t])).length:e===n[t])||(r[e]=t[e])}else if("object"==typeof o&&null!==o)if(null==t[e]||"object"!=typeof t[e])r[e]=t[e];else{const n=l(o,t[e]);Object.keys(n).length>0&&(r[e]=n)}else o!==t[e]&&(r[e]=t[e])}for(const n of Object.keys(t))n in e||(r[n]=t[n]);return r},[]),c=(e,t)=>0===Object.keys(l(e,t)).length,d=Xt(()=>!c(a,r),[a,r]);Wt(()=>{const o=t();void 0!==e&&"{}"===JSON.stringify(r)&&"{}"!==JSON.stringify(o)&&(n(o),s(o))},[e,r]);const u=Gt((e,t)=>$r("formData"===e?r:o,t.toString()),[r,o]);return{formData:r,formErrors:o,getFormDiff:l,areFormValuesEqual:c,isFormDirty:d,handleFormChange:(e,t,r)=>{if(e){const r=e.toString().split(".");1===r.length?n(r=>({...r,[e]:t})):n(e=>{const n=xr(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})}else r&&n({...r})},handleErrorChange:(e,t,r)=>{if(e){const r=e.toString().split(".");1===r.length?i(r=>({...r,[e]:t})):i(e=>{const n=xr(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})}else r&&i({...r})},resetFormData:e=>{const r=e||t();n(r),s(r),i({})},getNestedValue:u}},_c={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}},Lc=()=>{const{addNotification:e}=tc(),{formData:t,formErrors:r,handleFormChange:n,handleErrorChange:o,resetFormData:i}=Fc(_c),a=e=>e&&Array.isArray(e)?e.map(e=>!e.fromSources?.length&&e.from?{...e,fromSources:[e.from]}:e):e;return{formData:t,formErrors:r,handleFormChange:n,resetFormData:i,validateForm:r=>{const n={};let i=!0;if(Object.entries(t).forEach(([e,t])=>{switch(e){case"type":case"signals":ri(t)&&(n[e]=En.FIELD_IS_REQUIRED)}}),t.type===Ar.URLTemplatization){const e=t.fields?.urlTemplatizationRulesGroups;if(e)for(const t of e)if(t.templatizationRules?.some(e=>!e.template?.trim())){n.fields=En.FIELD_IS_REQUIRED;break}}return i=!Object.values(n).length,!i&&r?.withAlert&&e({type:Xr.Warning,title:r.alertTitle,message:En.REQUIRED_FIELDS,hideFromHistory:!0}),o(void 0,void 0,n),i},loadFormWithDrawerItem:({type:e,signals:t,name:r,notes:o,disabled:i,fields:s})=>{const l={...xr(_c),type:e,signals:t,name:r,notes:o,disabled:i};Object.entries(s).forEach(([e,t])=>{if(t)switch(e){case Dr.LabelsAttributes:case Dr.AnnotationsAttributes:l.fields||(l.fields={}),l.fields[e]=a(t);break;case Dr.CollectContainerAttributes:case Dr.CollectReplicaSetAttributes:case Dr.CollectWorkloadId:case Dr.CollectClusterId:case Dr.ClusterAttributes:case Dr.OverwriteExistingValues:case Dr.AttributeNamesToDelete:case Dr.Renames:case Dr.PiiCategories:case Dr.FallbackSamplingRatio:case Dr.SamplingPercentage:case Dr.EndpointsFilters:case Dr.ServicesNameFilters:case Dr.AttributeFilters:case Dr.UrlTemplatizationRulesGroups:l.fields||(l.fields={}),l.fields[e]=t}}),n(void 0,void 0,l)}}},Mc=e=>{Wt(()=>{if(e){const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])},zc=()=>{const{setCurrentModal:e}=ec(),{setDrawerType:t,setDrawerEntityId:r}=ql(),{setActiveNodeType:n,setActiveNodeId:o,activeNodeId:i}=Si();return{onClickNode:(a,s)=>{const{id:l,type:c,data:{id:d,type:u}}=s;switch(i===l?(n(null),o(null)):(n(c),o(l)),u){case Ur.Source:case Ur.Destination:case Ur.Action:case Ur.InstrumentationRule:t(u),r(d);break;case Qr.AddSource:e(Ur.Source);break;case Qr.AddDestination:e(Ur.Destination);break;case Qr.AddAction:e(Ur.Action);break;case Qr.AddRule:e(Ur.InstrumentationRule)}}}},Bc=()=>{const{setDrawerType:e,setDrawerEntityId:t}=ql(),{markAsDismissed:r,markAsSeen:n}=tc();return{onClickNotification:(o,i)=>{const{id:a,crdType:s,target:l}=o,{dismissToast:c}=i||{};if(s&&l)switch(s){case Ur.InstrumentationRule:e(Ur.InstrumentationRule),t(Gn(l,Ur.InstrumentationRule));break;case Ur.Source:case"InstrumentationConfig":case"InstrumentationInstance":e(Ur.Source),t(Gn(l,Ur.Source));break;case Ur.Action:e(Ur.Action),t(Gn(l,Ur.Action));break;case Ur.Destination:case"Destination":e(Ur.Destination),t(Gn(l,Ur.Destination))}n(a),c&&r(a)}}},Uc=()=>{const e=Ht(null),[t,r]=jt(0),[n,o]=jt(0);return Wt(()=>{const t=()=>{if(e.current){const{width:t,height:n}=e.current.getBoundingClientRect();r(t),o(n)}};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),{containerRef:e,containerWidth:t,containerHeight:n}};var jc;!function(e){e[e.XS=16]="XS",e[e.S=18]="S",e[e.M=24]="M",e[e.L=32]="L"}(jc||(jc={}));const Wc=n.div`
|
|
371
|
-
width: ${({$size:e})=>1.5*e}px;
|
|
372
|
-
height: ${({$size:e})=>1.5*e}px;
|
|
373
|
-
display: flex;
|
|
374
|
-
align-items: center;
|
|
375
|
-
justify-content: center;
|
|
376
|
-
border-radius: 100%;
|
|
377
|
-
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
378
|
-
&:hover {
|
|
379
|
-
background: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
380
|
-
}
|
|
381
|
-
`,Hc=({"data-id":t,icon:r,size:n=jc.S,onClick:o,disabled:i})=>e(Wc,{"data-id":t,$size:n,$disabled:i,onClick:e=>{o&&!i&&(e.stopPropagation(),o(e))},children:e(r,{size:n})}),Xc=({onDone:t}={})=>{const[r,n]=jt(!1),[o,i]=jt(-1),a=Gt(async(e,o)=>{if(!r){if(n(!0),void 0!==o&&i(o),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(()=>{n(!1),i(-1)},1e3)}},[r,t]);return{CopyButton:Gt(({value:t,size:n})=>e(Hc,{icon:r?yt:bt,size:n,onClick:()=>a(t)}),[r]),isCopied:r,copiedIndex:o,clickCopy:a}},Gc=e=>{const{addNotification:t}=tc(),{formData:r,handleFormChange:n,formErrors:o,handleErrorChange:i,resetFormData:a}=Fc(e);return{formData:r,formErrors:o,handleFormChange:n,resetFormData:a,validateForm:e=>{const n={};let o=!0;return r.name?ni(r.name)?n.name=void 0:(o=!1,n.name=En.ILLEGAL_K8S_LABEL):(o=!1,n.name=En.FIELD_IS_REQUIRED),!o&&e?.withAlert&&t({type:Xr.Warning,title:e.alertTitle,message:En.REQUIRED_FIELDS,hideFromHistory:!0}),i(void 0,void 0,n),o},loadFormWithDrawerItem:({name:t})=>{const r={...xr(e),name:t};n(void 0,void 0,r)}}},Kc={type:"",name:"",exportedSignals:{logs:!1,metrics:!1,traces:!1,profiles:!1},fields:[],disabled:!1},Vc=e=>{const{supportedSignals:t,preLoadedFields:r}=e||{},{addNotification:n}=tc(),{formData:o,formErrors:i,handleFormChange:a,handleErrorChange:s,resetFormData:l}=Fc(Kc),[c,d]=jt([]),[u,p]=jt([]);Wt(()=>{var e;p(c?(e=c,e.filter(e=>!!e).map(e=>{const{name:t,componentType:r,componentProperties:n,displayName:o,initialValue:i,renderCondition:a}=e;if(r===Wr.Dropdown){const e=Zo(n,{}),s=Array.isArray(e.values)?e.values.map(e=>({id:e,value:e})):Object.entries(e.values).map(([e,t])=>({id:e,value:t}));return{name:t,componentType:r,title:o,value:i,placeholder:e.placeholder||"Select an option",options:s,renderCondition:a,...e}}return{name:t,componentType:r,title:o,value:i,renderCondition:a,...Zo(n,{})}})).map(e=>{if(r){const t="string"==typeof r?Zo(r,{}):r;if(e.name in t)return{...e,value:t[e.name]}}return e}):[])},[c,r]),Wt(()=>{if(u){const e=u.map(e=>({key:e.name,value:e.value}));a("fields",e)}},[u]),Wt(()=>{if(t&&0===pi(o.exportedSignals).length){const{logs:e,metrics:r,traces:n}=t;a("exportedSignals",{logs:e.supported,metrics:r.supported,traces:n.supported})}},[t,o.exportedSignals]);return{formData:o,formErrors:i,handleFormChange:a,resetFormData:l,validateForm:e=>{const t={};let r=!0;return u.forEach(({name:e,value:n,required:o})=>{o&&!n&&(r=!1,t[e]=En.FIELD_IS_REQUIRED)}),!r&&e?.withAlert&&n({type:Xr.Warning,title:e.alertTitle,message:En.REQUIRED_FIELDS,hideFromHistory:!0}),s(void 0,void 0,t),r},loadFormWithDrawerItem:({destinationType:{type:e},name:t,disabled:r,exportedSignals:n,fields:o})=>{const i={...xr(Kc),type:e,name:t,disabled:r,exportedSignals:n,fields:Object.entries(Zo(o,{})).map(([e,t])=>({key:e,value:t}))};return a(void 0,void 0,i),i},yamlFields:c,setYamlFields:d,dynamicFields:u,setDynamicFields:p}},Jc={ruleName:"",notes:"",disabled:!1,workloads:null,instrumentationLibraries:null,payloadCollection:{[ln.HttpRequest]:null,[ln.HttpResponse]:null,[ln.DbQuery]:null,[ln.Messaging]:null},codeAttributes:{[on.Column]:null,[on.FilePath]:null,[on.Function]:null,[on.LineNumber]:null,[on.Namespace]:null,[on.StackTrace]:null},headersCollection:null,customInstrumentations:{[sn.Java]:null,[sn.Golang]:null}},qc=()=>{const{formData:e,formErrors:t,handleFormChange:r,handleErrorChange:n,resetFormData:o}=Fc(Jc);return{formData:e,formErrors:t,handleFormChange:r,resetFormData:o,validateForm:()=>(n(void 0,void 0,{}),!0),loadFormWithDrawerItem:({ruleName:e,notes:t,disabled:n,payloadCollection:o,codeAttributes:i,headersCollection:a,customInstrumentations:s})=>{const l={...xr(Jc),ruleName:e,notes:t,disabled:n};o&&(l.payloadCollection={[ln.HttpRequest]:o[ln.HttpRequest]?{}:null,[ln.HttpResponse]:o[ln.HttpResponse]?{}:null,[ln.DbQuery]:o[ln.DbQuery]?{}:null,[ln.Messaging]:o[ln.Messaging]?{}:null}),i&&(l.codeAttributes={[on.Column]:i[on.Column]||null,[on.FilePath]:i[on.FilePath]||null,[on.Function]:i[on.Function]||null,[on.LineNumber]:i[on.LineNumber]||null,[on.Namespace]:i[on.Namespace]||null,[on.StackTrace]:i[on.StackTrace]||null}),a&&(l.headersCollection=a),s&&(l.customInstrumentations={[sn.Java]:s[sn.Java]||null,[sn.Golang]:s[sn.Golang]||null}),r(void 0,void 0,l)}}},Yc=({active:e,key:t,withAltKey:r,withCtrlKey:n,withShiftKey:o,withMetaKey:i},a)=>(Wt(()=>{const s=s=>{e&&t===s.key&&(!r||r&&s.altKey)&&(!n||n&&s.ctrlKey)&&(!o||o&&s.shiftKey)&&(!i||i&&s.metaKey)&&(s.preventDefault(),s.stopPropagation(),a(s))};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}},[t,e,r,n,o,i,a]),null),Qc="data-ignore-outside-click",Zc=(e,t)=>{const r=Ht(t);r.current=t,Wt(()=>{const t=t=>{const n=t.target;e.current&&!e.current.contains(n)&&((e=>{let t=e;for(;t;){if(t instanceof Element&&t.hasAttribute(Qc))return!0;t=t.parentNode}return!1})(n)||r.current())};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}},[e])},ed=({sectionNames:e,threshold:t=.4})=>{const[r,n]=jt(e[0]||""),[o,i]=jt(null),a=Ht({}),s=Ht(!1),l=Ht(!1),c=Gt((e,t)=>{a.current[e]=t},[]),d=Gt(e=>{i(e)},[]),u=Gt(e=>{l.current=!0,n(e)},[]);return Wt(()=>{if(!l.current)return;l.current=!1;const e=a.current[r];if(!e)return;s.current=!0,e.scrollIntoView({behavior:"smooth",block:"start"});const t=setTimeout(()=>{s.current=!1},600);return()=>clearTimeout(t)},[r]),Wt(()=>{const r=a.current,i=e.map(e=>r[e]).filter(Boolean);if(!i.length)return;const l=new IntersectionObserver(e=>{if(!s.current)for(const t of e)if(t.isIntersecting){const e=t.target.getAttribute("data-section-name");e&&n(e);break}},{threshold:t,root:o});return i.forEach(e=>l.observe(e)),()=>l.disconnect()},[e,t,o]),{selectedSection:r,setSelectedSection:u,setSectionRef:c,setScrollContainerRef:d}},td=({defaultClientHeight:e=0,defaultClientwidth:t=0,onClickOutside:r,positionMode:n="local"}={})=>{const o=Ht(null),[i,a]=jt(!1),[s,l]=jt({top:0,left:0}),[c,d]=jt({edge:"top",align:"left"});Zc(o,()=>{i&&(a(!1),r?.())});return{popupRef:o,popupOpen:i,setPopupOpen:a,popupPosition:s,arrowPlacement:c,handlePosition:(r,i)=>{if("local"===n)return void l({top:i,left:r});const{innerWidth:a,innerHeight:s}=window,c=o.current?.clientWidth||t,u=o.current?.clientHeight||e,p=r/a,h=p<1/3?"left":p>2/3?"right":"center";d({edge:i<s/2?"top":"bottom",align:h});let m=i,g=r;if(m>=s/2&&(m+=-u),"center"===h){g=r-c/2;const e=8;g=Math.max(e,Math.min(g,a-c-e))}else g>=a/2&&(g=r-c);l({top:m,left:g})}}},rd=()=>({getItemSS:(e,t)=>{const r=sessionStorage.getItem(e);return r?Zo(r,t):t},setItemSS:(e,t)=>{sessionStorage.setItem(e,JSON.stringify(t))},removeItemSS:e=>{sessionStorage.removeItem(e)}}),nd={otelServiceName:"",currentStreamName:""},od=()=>{const{formData:e,formErrors:t,handleFormChange:r,handleErrorChange:n,resetFormData:o}=Fc(nd);return{formData:e,formErrors:t,handleFormChange:r,resetFormData:o,validateForm:()=>(n(void 0,void 0,{}),!0),loadFormWithDrawerItem:({otelServiceName:e,name:t})=>{const n={...xr(nd),otelServiceName:e||t||""};r(void 0,void 0,n)}}},id=Vt({platformType:Lr.K8s,tier:_r.Community,version:"v0.0.0"}),ad=({children:t,platformType:r,tier:n,version:o})=>{const i=Xt(()=>({platformType:r,tier:n,version:o}),[r,n,o]);return e(id.Provider,{value:i,children:t})},sd=(e,t)=>!t||wi(e)>=wi(t),ld=e=>{const t=Kt(id),r=sd(t.version,e),n=t.platformType===Lr.Vm;return{...t,isVersionSupported:r,isVm:n,isEnterprise:t.tier===_r.Onprem}},cd=new Set([en.StaticPod]),dd=e=>{const t=e.workloads.filter(({selected:e})=>e).length,r=e.workloads.length;return{selectedCount:t,isAllSourced:t>0&&t===r,isSomeSourced:t>0&&t<r,isFutureApps:e.selected||!1}},ud=(e,t,r)=>{if(t&&!e.name.toLowerCase().includes(t.toLowerCase()))return!1;if(r.showOnlySelected){const{isAllSourced:t,isSomeSourced:r,isFutureApps:n}=dd(e);return t||r||n}return!0},pd=(e,t,r)=>!(t&&!e.name.toLowerCase().includes(t.toLowerCase()))&&(!r.showOnlySelected||e.selected),hd=(e,t,r)=>{const n=!!e.dataStreamNames?.length||!!e.currentStreamName?.length,o=n&&e.dataStreamNames?.includes(t)||e.currentStreamName===t,i=e.selected&&(!n||o)||!1;return{namespace:e.namespace,name:e.name,kind:e.kind,selected:i,numberOfInstances:e.numberOfInstances}},md=(e,t,r)=>({...hd(e,t),currentStreamName:t}),gd=(e,t,r)=>{const n="boolean"==typeof r,o=e.dataStreamNames?.includes(t),i=(n?r:e.selected)||!1;return{namespace:e.name,selected:!(!o&&!n)&&i,currentStreamName:t}},fd=e=>{const{fetchNamespacesWithWorkloads:t}=e,{tier:r}=ld(),n=e=>r!==_r.Onprem&&cd.has(e),{selectedStreamName:o}=Jl(),{namespaces:i,addEntities:a}=Yl(),[s,l]=jt(!1),[c,d]=jt({}),[u,p]=jt(!1),[h,m]=jt(""),[g,f]=jt({}),[y,b]=jt({}),[v,x]=jt(""),[$,w]=jt(Ur.Source),[S,C]=jt(!1),[E,k]=jt(!1),A=Xt(()=>{const e=(e,t)=>!v||$!==t||$===t&&e.toLowerCase().includes(v),t={};return Object.entries(y).filter(([t])=>e(t,Ur.Namespace)).forEach(([r,n])=>{const o=n.filter(t=>{return e(t.name,Ur.Source)&&(r=t,!S||r.selected)&&(e=>!E||(e.numberOfInstances||0)>0)(t);var r});(!v||v&&($===Ur.Namespace||$===Ur.Source&&o.length))&&(t[r]=o)}),t},[y,v,$,S,E]);return Wt(()=>{(async()=>{l(!0);const e=await t();l(!1);const r=e.data;if(!r?.length)return;const n=[...r].sort((e,t)=>e.name.localeCompare(t.name)),i={},s={},c={};for(const e of n){const t=[...e.sources||[]].sort((e,t)=>e.name.localeCompare(t.name));i[e.name]=t.map(e=>hd(e,o)),s[e.name]=t.map(e=>md(e,o)),c[e.name]=gd(e,o)}a(Ur.Namespace,r.map(({sources:e,...t})=>t));const{configuredSources:u,configuredFutureApps:p}=cc.getState();Object.entries(u).forEach(([e,t])=>{s[e]&&t.forEach(t=>{const r=s[e].findIndex(e=>e.name===t.name&&e.kind===t.kind);-1!==r&&(s[e][r]={...s[e][r],selected:t.selected,currentStreamName:t.currentStreamName})})}),Object.entries(p).forEach(([e,t])=>{c[e]&&(c[e]=t)}),d(i),b(s),f(c)})()},[o]),{loading:s,availableSources:c,filteredNamespacesAndSources:A,getApiSourcesPayload:()=>{const e={};return Object.entries(y).forEach(([t,r])=>{r.forEach(r=>{const n=c[t]?.find(e=>e.name===r.name&&e.kind===r.kind);n?.selected!==r.selected&&(e[t]||(e[t]=[]),e[t].push(r))})}),e},getApiFutureAppsPayload:()=>{const e={};return Object.entries(g).forEach(([t,r])=>{const n=i?.find(e=>e.name===t);(r.selected&&!n?.dataStreamNames?.includes(o)||!r.selected&&n?.dataStreamNames?.includes(o))&&(e[t]=r)}),e},selectedNamespace:h,onSelectNamespace:(e,t)=>{if(i.find(t=>t.name===e)){const r="boolean"==typeof t;m(t=>t!==e||r?e:""),r&&(b(r=>({...r,[e]:(r[e]||[]).map(e=>t&&n(e.kind)?e:{...e,selected:t,currentStreamName:o})})),p(!1))}},selectedAllNamespaces:u,onSelectAllNamespaces:e=>{p(e),b(t=>{const r={};for(const[i,a]of Object.entries(t))r[i]=a.map(t=>e&&n(t.kind)?t:{...t,selected:e,currentStreamName:o});return r})},selectedSources:y,onSelectSource:(e,t)=>{const r=t||h;if(!r)return;if(n(e.kind))return;const i=[...y[r]||[]],a=i.findIndex(({name:t,kind:r})=>t===e.name&&r===e.kind);if(-1!==a){const e={...i[a],selected:!i[a].selected,currentStreamName:o};i[a]=e}else i.push({...e,selected:!0,currentStreamName:o});b(e=>({...e,[r]:i})),p(!1)},selectedFutureApps:g,onSelectFutureApps:(e,t)=>{const r=t||h;if(!r)return;const n=i.find(e=>e.name===t);n&&f(t=>({...t,[r]:gd(n,o,e)}))},searchText:v,setSearchText:x,searchBy:$,setSearchBy:w,showSelectedOnly:S,setShowSelectedOnly:C,showRunningOnly:E,setShowRunningOnly:k}};try{Qt.addDefaultLocale(rr)}catch(e){}const yd=()=>{const e=Ht(new Qt(rr.locale));return{formatTimeAgo:Gt(t=>{try{return"string"==typeof t&&(t=t.replace("t","T").replace("z","Z")),e.current.format(new Date(t))}catch(e){return"-"}},[])}},bd=n.div`
|
|
382
|
-
position: fixed;
|
|
383
|
-
top: 50%;
|
|
384
|
-
left: 50%;
|
|
385
|
-
transform: translate(-50%, -50%);
|
|
386
|
-
z-index: 1000;
|
|
387
|
-
width: fit-content;
|
|
388
|
-
background: ${({theme:e})=>e.colors.translucent_bg};
|
|
389
|
-
border: ${({theme:e})=>`1px solid ${e.colors.border}`};
|
|
390
|
-
border-radius: 40px;
|
|
391
|
-
box-shadow: ${({theme:e})=>{const t=e.colors.primary+fc["010"];return`0px 1px 1px 0px ${t}, 0px 2px 2px 0px ${t}, 0px 5px 5px 0px ${t}, 0px 10px 10px 0px ${t}, 0px 0px 8px 0px ${t}`}};
|
|
392
|
-
animation-name: ${bc.in.center};
|
|
393
|
-
`,vd=n.div`
|
|
394
|
-
display: flex;
|
|
395
|
-
justify-content: space-between;
|
|
396
|
-
align-items: center;
|
|
397
|
-
height: 80px;
|
|
398
|
-
border-bottom: 1px solid ${({theme:e})=>e.colors.border};
|
|
399
|
-
padding: 0 24px;
|
|
400
|
-
`,xd=n.div`
|
|
401
|
-
cursor: pointer;
|
|
402
|
-
display: flex;
|
|
403
|
-
align-items: center;
|
|
404
|
-
gap: 8px;
|
|
405
|
-
`,$d=n.div`
|
|
406
|
-
display: flex;
|
|
407
|
-
align-items: center;
|
|
408
|
-
gap: 8px;
|
|
409
|
-
`,wd=n(Fo)`
|
|
410
|
-
min-width: 350px;
|
|
411
|
-
min-height: 150px;
|
|
412
|
-
`,Sd=n.div`
|
|
413
|
-
position: absolute;
|
|
414
|
-
left: 50%;
|
|
415
|
-
transform: translateX(-50%);
|
|
416
|
-
display: flex;
|
|
417
|
-
align-items: center;
|
|
418
|
-
justify-content: center;
|
|
419
|
-
width: 100%;
|
|
420
|
-
pointer-events: none;
|
|
421
|
-
`,Cd=n(Pc)`
|
|
422
|
-
text-transform: uppercase;
|
|
423
|
-
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
424
|
-
pointer-events: auto;
|
|
425
|
-
`,Ed=n(Pc)`
|
|
426
|
-
text-transform: uppercase;
|
|
427
|
-
font-weight: 500;
|
|
428
|
-
font-size: 14px;
|
|
429
|
-
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
430
|
-
text-decoration: underline;
|
|
431
|
-
cursor: pointer;
|
|
432
|
-
`,kd=({isOpen:n,noOverlay:o,header:i,actionComponent:a,onClose:s,children:l,closeOnEscape:c=!0})=>(Yc({key:"Escape",active:n&&c},()=>s()),Mc(n),n?dr.createPortal(t(r,{children:[e(Lo,{hidden:!n,onClick:s,style:{opacity:o?0:1}}),t(bd,{"data-id":"modal"+(i?`-${i.title.replaceAll(" ","-")}`:""),children:[i&&t(vd,{children:[t(xd,{onClick:s,children:[e(vt,{}),e(Ed,{children:"Cancel"})]}),e(Sd,{children:e(Cd,{children:i.title})}),e($d,{children:a})]}),e(wd,{children:l})]})]}),document.body):null),Ad=n.div`
|
|
433
|
-
width: ${({$orientation:e,$thickness:t,$length:r})=>"vertical"===e?`${t}px`:r||"100%"};
|
|
434
|
-
height: ${({$orientation:e,$thickness:t,$length:r})=>"horizontal"===e?`${t}px`:r||"100%"};
|
|
435
|
-
margin: ${({$orientation:e,$margin:t})=>t||("horizontal"===e?"8px 0":"0 8px")};
|
|
436
|
-
background-color: ${({$type:e,theme:t})=>(e?t.text[e]:t.colors.border)+fc["050"]};
|
|
437
|
-
opacity: ${({$opacity:e})=>e||1};
|
|
438
|
-
`,Dd=({orientation:t="horizontal",type:r,thickness:n=1,length:o,margin:i,opacity:a})=>e(Ad,{$orientation:t,$type:r,$thickness:n,$length:o,$margin:i,$opacity:a}),Td=n.div`
|
|
439
|
-
/* Portal: viewport coords (usePopup positionMode viewport). Non-portal: offset-parent coords, absolute. */
|
|
440
|
-
position: ${({$asPortal:e})=>e?"fixed":"absolute"};
|
|
441
|
-
${({$top:e})=>void 0!==e&&`top: ${e}px;`}
|
|
442
|
-
${({$bottom:e})=>void 0!==e&&`bottom: ${e}px;`}
|
|
443
|
-
${({$left:e})=>void 0!==e&&`left: ${e}px;`}
|
|
444
|
-
${({$right:e})=>void 0!==e&&`right: ${e}px;`}
|
|
445
|
-
z-index: 9999;
|
|
446
|
-
|
|
447
|
-
background-color: ${({theme:e})=>e.colors.info};
|
|
448
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
449
|
-
border-radius: ${({$borderRadius:e})=>void 0!==e?e:"24px"};
|
|
450
|
-
max-width: ${({$maxWidth:e})=>void 0!==e?e:"unset"};
|
|
451
|
-
width: ${({$width:e})=>void 0!==e?e:"unset"};
|
|
452
|
-
|
|
453
|
-
${({$asPortal:e,$withPointerEvents:t})=>e&&!t&&"pointer-events: none;"}
|
|
454
|
-
`,Id=n.div`
|
|
455
|
-
padding: ${({$padding:e})=>void 0!==e?e:"12px"};
|
|
456
|
-
border-bottom: 1px solid ${({theme:e})=>e.colors.border};
|
|
457
|
-
`,Nd=n.div`
|
|
458
|
-
padding: ${({$padding:e})=>void 0!==e?e:"12px"};
|
|
459
|
-
`,Rd=n.div`
|
|
460
|
-
padding: ${({$padding:e})=>void 0!==e?e:"12px"};
|
|
461
|
-
border-top: 1px solid ${({theme:e})=>e.colors.border};
|
|
462
|
-
`,Od=Bt(({isOpen:r,asPortal:n,...o},i)=>{const a=Xt(()=>{const{children:r,top:a,bottom:s,left:l,right:c,borderRadius:d,padding:u,maxWidth:p,width:h,header:m,footer:g,withPointerEvents:f,...y}=o;return t(Td,{ref:i,$top:a,$bottom:s,$left:l,$right:c,$borderRadius:d,$padding:u,$maxWidth:p,$width:h,$asPortal:n,$withPointerEvents:f,...y,children:[m&&e(Id,{$padding:u,children:m}),e(Nd,{$padding:u,children:r}),g&&e(Rd,{$padding:u,children:g})]})},[i,o,n]);return r?n?dr.createPortal(a,document.body):a:null});Od.displayName=Od.name;const Pd=n.div`
|
|
463
|
-
width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
|
|
464
|
-
position: relative;
|
|
465
|
-
display: flex;
|
|
466
|
-
align-items: center;
|
|
467
|
-
gap: 4px;
|
|
468
|
-
|
|
469
|
-
/* 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. */
|
|
470
|
-
cursor: ${({$hasText:e})=>e?"help":"inherit"};
|
|
471
|
-
${({$ellipsis:e})=>e&&o`
|
|
472
|
-
overflow: hidden;
|
|
473
|
-
text-overflow: ellipsis;
|
|
474
|
-
white-space: nowrap;
|
|
475
|
-
`}
|
|
476
|
-
`,Fd=n.div`
|
|
477
|
-
display: flex;
|
|
478
|
-
flex-direction: column;
|
|
479
|
-
align-items: flex-start;
|
|
480
|
-
gap: 8px;
|
|
481
|
-
width: 100%;
|
|
482
|
-
`,_d=n.div`
|
|
483
|
-
display: flex;
|
|
484
|
-
width: 100%;
|
|
485
|
-
flex-shrink: 0;
|
|
486
|
-
box-sizing: border-box;
|
|
487
|
-
line-height: 0;
|
|
488
|
-
|
|
489
|
-
${({$align:e})=>"left"===e&&"\n justify-content: flex-start;\n padding-left: 20px;\n padding-right: 10px;\n "}
|
|
490
|
-
${({$align:e})=>"right"===e&&"\n justify-content: flex-end;\n padding-left: 10px;\n padding-right: 20px;\n "}
|
|
491
|
-
${({$align:e})=>"center"===e&&"\n justify-content: center;\n align-items: center;\n min-height: 8px;\n "}
|
|
492
|
-
`,Ld=n.div`
|
|
493
|
-
width: 0;
|
|
494
|
-
height: 0;
|
|
495
|
-
border-style: solid;
|
|
496
|
-
border-left: 6.5px solid transparent;
|
|
497
|
-
border-right: 6.5px solid transparent;
|
|
498
|
-
flex-shrink: 0;
|
|
499
|
-
|
|
500
|
-
${({$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 `}
|
|
501
|
-
`,Md=n.div`
|
|
502
|
-
display: flex;
|
|
503
|
-
flex-direction: column;
|
|
504
|
-
align-items: stretch;
|
|
505
|
-
min-width: 0;
|
|
506
|
-
`,zd=n.div`
|
|
507
|
-
background-color: ${({theme:e})=>e.v2.colors.black[500]};
|
|
508
|
-
border-radius: 4px;
|
|
509
|
-
padding: 8px;
|
|
510
|
-
box-sizing: border-box;
|
|
511
|
-
min-width: 0;
|
|
512
|
-
`,Bd=({withIcon:n,titleIcon:o,title:a,text:s,timestamp:l,children:c,fullWidth:d=!1,keepAlive:u=!1,ellipsis:p=!1})=>{const h=i(),{popupRef:m,popupOpen:g,setPopupOpen:f,popupPosition:y,arrowPlacement:b,handlePosition:v}=td({positionMode:"viewport",defaultClientHeight:48,defaultClientwidth:Math.min(7.5*(s?.length||0),300)}),x=Xt(()=>!!Nc(s||"")?.length,[s]),$=e=>{const{type:t,clientX:r,clientY:n}=e;x?v(y.left||r,y.top||n):v(r,n),f("mouseleave"!==t)};return s||u?t(Pd,{$fullWidth:d,$ellipsis:p,$hasText:!!s,onMouseEnter:$,onMouseMove:$,onMouseLeave:$,children:[c,n&&e(Qe,{fill:h.v2.colors.white[500]}),e(Od,{ref:m,isOpen:g&&!!s,top:y.top,left:y.left,asPortal:!0,withPointerEvents:x,onMouseEnter:x?$:void 0,style:{backgroundColor:"transparent",border:"none"},maxWidth:"270px",borderRadius:"0",padding:"0",children:t(Md,{children:["top"===b.edge&&e(_d,{$align:b.align,children:e(Ld,{$pointsUp:!0})}),e(zd,{children:t(Fd,{children:[(!!o||!!a)&&t(Oo,{$gap:4,style:{alignItems:"center"},children:[o&&e(o,{size:16},"icon"),a&&e(uo,{size:io.XS,children:a},"title")]}),!!s&&e(uo,{size:io.XXXS,children:s}),!!l&&e(uo,{size:io.XXXS,color:ao.Secondary,children:new Date(l).toLocaleString()})]})}),"bottom"===b.edge&&e(_d,{$align:b.align,children:e(Ld,{$pointsUp:!1})})]})})]}):e(r,{children:c})},Ud=n.button`
|
|
513
|
-
position: relative;
|
|
514
|
-
width: ${({$size:e})=>e}px;
|
|
515
|
-
height: ${({$size:e})=>e}px;
|
|
516
|
-
border: ${({theme:e,$withBorder:t})=>t?`1px solid ${e.colors.border}`:"none"};
|
|
517
|
-
border-radius: 100%;
|
|
518
|
-
background-color: ${({$backgroundColor:e})=>e||"transparent"};
|
|
519
|
-
display: flex;
|
|
520
|
-
align-items: center;
|
|
521
|
-
justify-content: center;
|
|
522
|
-
cursor: pointer;
|
|
523
|
-
&:hover {
|
|
524
|
-
background-color: ${({theme:e,$backgroundColor:t})=>t?t+fc["070"]:e.colors.dropdown_bg_2};
|
|
525
|
-
}
|
|
526
|
-
`,jd=n.div`
|
|
527
|
-
position: absolute;
|
|
528
|
-
top: ${({$size:e})=>e/5}px;
|
|
529
|
-
right: ${({$size:e})=>e/5}px;
|
|
530
|
-
width: 6px;
|
|
531
|
-
height: 6px;
|
|
532
|
-
border-radius: 100%;
|
|
533
|
-
background-color: ${({theme:e,$color:t})=>t||e.colors.secondary};
|
|
534
|
-
|
|
535
|
-
&::after {
|
|
536
|
-
content: '';
|
|
537
|
-
position: absolute;
|
|
538
|
-
inset: 0;
|
|
539
|
-
border-radius: 100%;
|
|
540
|
-
background-color: ${({theme:e,$color:t})=>t||e.colors.secondary};
|
|
541
|
-
animation: ${xc} 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
|
|
542
|
-
}
|
|
543
|
-
`,Wd=({children:r,onClick:n,tooltip:o,size:i=36,withPing:a,pingColor:s,withBorder:l,backgroundColor:c,...d})=>e(Bd,{text:o,children:t(Ud,{$size:i,$withBorder:l,$backgroundColor:c,onClick:n,...d,children:[a&&e(jd,{$size:i,$color:s}),r]})}),Hd=n.div`
|
|
544
|
-
position: relative;
|
|
545
|
-
&.animated {
|
|
546
|
-
overflow: hidden;
|
|
547
|
-
padding-bottom: 1px;
|
|
548
|
-
border-radius: 32px;
|
|
549
|
-
animation: ${({$isLeaving:e})=>e?bc.out.bottom:bc.in.bottom} ${({$duration:e})=>e/10}ms forwards;
|
|
550
|
-
}
|
|
551
|
-
`,Xd=n.div`
|
|
552
|
-
position: absolute;
|
|
553
|
-
bottom: -1px;
|
|
554
|
-
left: 0;
|
|
555
|
-
z-index: -1;
|
|
556
|
-
width: 100%;
|
|
557
|
-
height: 100%;
|
|
558
|
-
border-radius: 32px;
|
|
559
|
-
background-color: ${({$type:e,theme:t})=>t.text[e]};
|
|
560
|
-
animation: ${vc.out} ${({$duration:e})=>""+(e-e/10)}ms forwards;
|
|
561
|
-
`,Gd=n.div`
|
|
562
|
-
display: flex;
|
|
563
|
-
align-items: center;
|
|
564
|
-
flex: 1;
|
|
565
|
-
gap: 8px;
|
|
566
|
-
padding: 0 12px;
|
|
567
|
-
border-radius: 32px;
|
|
568
|
-
background-color: ${({$type:e,theme:t})=>t.colors[e]};
|
|
569
|
-
`,Kd=n.div`
|
|
570
|
-
display: flex;
|
|
571
|
-
align-items: center;
|
|
572
|
-
margin: 0 auto 0 0;
|
|
573
|
-
padding: 8px 0;
|
|
574
|
-
max-width: ${({$withAction:e,$overrideMaxWidth:t})=>t||(e?"400px":"500px")};
|
|
575
|
-
min-height: 12px;
|
|
576
|
-
`,Vd=n(Pc)`
|
|
577
|
-
font-size: 14px;
|
|
578
|
-
color: ${({$type:e,theme:t})=>t.text[e]};
|
|
579
|
-
`,Jd=n(Pc)`
|
|
580
|
-
color: ${({$type:e,theme:t})=>t.text[e]};
|
|
581
|
-
font-size: 12px;
|
|
582
|
-
`,qd=n(Oo)``,Yd=n(Pc)`
|
|
583
|
-
text-transform: uppercase;
|
|
584
|
-
text-decoration: underline;
|
|
585
|
-
font-size: 12px;
|
|
586
|
-
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
587
|
-
white-space: nowrap;
|
|
588
|
-
cursor: pointer;
|
|
589
|
-
&:hover {
|
|
590
|
-
transform: scale(1.1);
|
|
591
|
-
transition: transform 0.3s;
|
|
592
|
-
}
|
|
593
|
-
`,Qd=({type:r,icon:n,title:o,message:a,action:s,onClose:l,duration:c=5e3,overrideMaxWidth:d,style:u})=>{const p=i(),[h,m]=jt(!1),g=Ht(null),f=Ht(null),y=e=>{l&&(m(!0),l({asSeen:e?.asSeen}))};Wt(()=>(g.current=setTimeout(()=>y({asSeen:!1}),c),()=>{g.current&&clearTimeout(g.current)}),[c]);const b=n||Go(r,p);return t(Hd,{className:l?"animated":"",$duration:c,$isLeaving:h,onMouseEnter:()=>{g.current&&clearTimeout(g.current),f.current&&(f.current.style.animationPlayState="paused")},onMouseLeave:()=>{if(f.current){const e=f.current.offsetWidth/f.current.parentElement.offsetWidth*c;g.current=setTimeout(()=>y({asSeen:!1}),e),f.current.style.animationPlayState="running"}},children:[t(Gd,{"data-id":"toast",$type:r,style:u,children:[e(b,{fill:p.text[r]}),t(Kd,{$withAction:!!s,$overrideMaxWidth:d,children:[o&&e(Vd,{$type:r,children:o}),o&&a&&e(Dd,{orientation:"vertical",type:r}),a&&e(Jd,{$type:r,children:a})]}),(!!s||!!l)&&t(qd,{children:[s&&e(Yd,{"data-id":"toast-action",onClick:s.onClick,children:s.label}),l&&e(Wd,{"data-id":"toast-close",onClick:()=>y({asSeen:!0}),children:e(vt,{size:12})})]})]}),l&&e(Xd,{ref:f,$duration:c,$type:r})]})},Zd=n.div`
|
|
594
|
-
padding: 24px 32px;
|
|
595
|
-
`,eu=n.div`
|
|
596
|
-
padding: ${({$withNote:e})=>e?"12px 0px":"12px 0px 32px 0"};
|
|
597
|
-
`,tu=n(Pc)`
|
|
598
|
-
font-size: 20px;
|
|
599
|
-
line-height: 28px;
|
|
600
|
-
`,ru=n(Pc)`
|
|
601
|
-
color: ${({theme:e})=>e.text.grey};
|
|
602
|
-
width: 416px;
|
|
603
|
-
font-style: normal;
|
|
604
|
-
font-weight: 300;
|
|
605
|
-
line-height: 24px;
|
|
606
|
-
`,nu=n.div`
|
|
607
|
-
display: flex;
|
|
608
|
-
justify-content: space-between;
|
|
609
|
-
gap: 12px;
|
|
610
|
-
`,ou=n(Tc)`
|
|
611
|
-
width: 250px;
|
|
612
|
-
`,iu=n.div`
|
|
613
|
-
margin-bottom: 12px;
|
|
614
|
-
`,au=({isOpen:r,noOverlay:n,title:o="",description:i="",note:a,approveButton:s,denyButton:l,closeOnEscape:c=!0})=>{Yc({key:"Enter",active:r&&c},()=>s.onClick());const d=()=>l.onClick();return e(kd,{isOpen:r,noOverlay:n,onClose:d,children:t(Zd,{children:[e(tu,{children:o}),e(eu,{$withNote:!!a,children:e(ru,{children:i})}),!!a&&e(iu,{children:e(Qd,{type:a.type,title:a.title,message:a.message})}),t(nu,{children:[e(ou,{"data-id":"approve",variant:s.variant||"primary",onClick:()=>s.onClick(),children:s.text}),e(ou,{"data-id":"deny",variant:l.variant||"secondary",onClick:d,children:l.text})]})]})})},su=({isOpen:t,noOverlay:r,name:n,onApprove:o,onDeny:i})=>e(au,{isOpen:t,noOverlay:r,title:"Cancel"+(n?` ${n}`:""),description:"Are you sure you want to cancel?",approveButton:{text:"Confirm",variant:Xr.Warning,onClick:o},denyButton:{text:"Go Back",onClick:i}}),lu=n.div`
|
|
615
|
-
padding: 4px 0 0 0;
|
|
616
|
-
`,cu=n(Pc)`
|
|
617
|
-
font-size: 12px;
|
|
618
|
-
color: ${({theme:e})=>e.text.error};
|
|
619
|
-
`,du=({children:t})=>e(lu,{children:e(cu,{children:t})}),uu=n.div`
|
|
620
|
-
display: flex;
|
|
621
|
-
align-items: center;
|
|
622
|
-
gap: 8px;
|
|
623
|
-
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
624
|
-
opacity: ${({$disabled:e})=>e?.6:1};
|
|
625
|
-
`,pu=n.div`
|
|
626
|
-
width: 18px;
|
|
627
|
-
height: 18px;
|
|
628
|
-
border-radius: 6px;
|
|
629
|
-
border: 1px dashed ${({$isChecked:e,$isPartiallyChecked:t,theme:r})=>e||t?"transparent":r.colors.secondary};
|
|
630
|
-
display: flex;
|
|
631
|
-
align-items: center;
|
|
632
|
-
justify-content: center;
|
|
633
|
-
background-color: ${({$isChecked:e,$isPartiallyChecked:t,theme:r})=>e?r.colors.majestic_blue:t?r.colors.majestic_blue_soft:r.colors.secondary+fc["020"]};
|
|
634
|
-
pointer-events: ${({$disabled:e})=>e?"none":"auto"};
|
|
635
|
-
transition: border 0.3s;
|
|
636
|
-
&:hover {
|
|
637
|
-
border: 1px solid ${({theme:e})=>e.colors.secondary};
|
|
638
|
-
}
|
|
639
|
-
`,hu=({title:r,titleColor:n,tooltip:o,value:a=!1,partiallyChecked:s=!1,onChange:l,disabled:c,style:d,errorMessage:u,allowPropagation:p=!1})=>{const h=i(),[m,g]=jt(a);Wt(()=>g(a),[a]);return t(Po,{children:[t(uu,{"data-id":"checkbox"+(r?`-${r}`:""),$disabled:c,onClick:e=>{c||(p||e.stopPropagation(),l?l(!!s||!m):g(e=>!!s||!e))},style:d,children:[e(pu,{$isChecked:m,$isPartiallyChecked:s,$disabled:c,children:s?e(xt,{fill:h.text.white}):m?e(yt,{fill:h.text.white}):null}),r&&e(Bd,{text:o,withIcon:!0,children:e(Pc,{size:12,color:n||h.text.grey,style:{maxWidth:"90%"},children:r})})]}),!!u&&e(du,{children:u})]})},mu=n(Oo)`
|
|
640
|
-
gap: 0;
|
|
641
|
-
`,gu=n.button`
|
|
642
|
-
padding: 4px 8px;
|
|
643
|
-
background-color: ${({theme:e,$selected:t})=>t?e.colors.dropdown_bg_2:"transparent"};
|
|
644
|
-
border-radius: ${({$position:e})=>"left"===e?"32px 0px 0px 32px":"right"===e?"0px 32px 32px 0px":"0"};
|
|
645
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
646
|
-
display: flex;
|
|
647
|
-
align-items: center;
|
|
648
|
-
justify-content: center;
|
|
649
|
-
cursor: pointer;
|
|
650
|
-
&:hover {
|
|
651
|
-
border: 1px solid ${({theme:e})=>e.colors.secondary};
|
|
652
|
-
}
|
|
653
|
-
`,fu=({isPrettyMode:r,setIsPrettyMode:n})=>t(mu,{children:[e(gu,{$position:"left",$selected:r,onClick:()=>n(!0),children:e($t,{})}),e(gu,{$position:"right",$selected:!r,onClick:()=>n(!1),children:e(wt,{})})]}),yu=n.table`
|
|
654
|
-
border-collapse: collapse;
|
|
655
|
-
font-family: ${({theme:e})=>e.font_family.primary};
|
|
656
|
-
`,bu=n.tbody``,vu=n.tr`
|
|
657
|
-
td:first-child {
|
|
658
|
-
padding-left: 0 !important;
|
|
659
|
-
}
|
|
660
|
-
td:last-child {
|
|
661
|
-
padding-right: 0 !important;
|
|
662
|
-
}
|
|
663
|
-
`,xu=n.td`
|
|
664
|
-
vertical-align: top;
|
|
665
|
-
padding: 4px 6px;
|
|
666
|
-
`,$u=n(Pc)`
|
|
667
|
-
white-space: nowrap;
|
|
668
|
-
`,wu=n.span`
|
|
669
|
-
white-space: ${({$noWrap:e})=>e?"nowrap":"pre-wrap"};
|
|
670
|
-
overflow-wrap: break-word;
|
|
671
|
-
word-break: break-word;
|
|
672
|
-
word-wrap: break-word;
|
|
673
|
-
/* Fallback for older browsers */
|
|
674
|
-
-ms-word-break: break-all;
|
|
675
|
-
font-size: 12px;
|
|
676
|
-
`,Su=({language:t,code:r,theme:n,flatten:o,pretty:a})=>{const{darkMode:s}=i(),l=n?hr[n]:s?hr.palenight:hr.vsLight;let c="";if("json"===t){const e=Zo(r,{}),t=bi(e);c=vi(o?Tn(t):t)}else c=r;return a&&"json"===t?e(Cu,{darkMode:s,str:c}):e(pr,{theme:l||(s?hr.palenight:hr.vsLight),language:t,code:c,children:({getLineProps:t,getTokenProps:r,tokens:n})=>e("pre",{children:n.map((n,o)=>e("div",{...t({line:n}),children:n.map((t,n)=>e(wu,{...r({token:t})},`line-${o}-token-${n}`))},`line-${o}`))})})},Cu=({darkMode:r,str:n})=>{const o=i(),a=(r,n)=>{const i=new Array(r).fill(r=>t(vu,{...r,children:[e(xu,{}),e(xu,{})]}));return e(Ut,{children:i.map((t,r)=>e(t,{style:0===r?{borderBottom:`1px solid ${o.colors.border}`}:{}},`empty-row-${n}-${r}`))})};return e(pr,{theme:r?hr.palenight:hr.vsLight,language:"json",code:n,children:({getLineProps:r,getTokenProps:n,tokens:i})=>e(yu,{children:e(bu,{children:i.map((i,s)=>{const l=(e=>{const t=["punctuation","plain","operator"];return e.filter(e=>!t.includes(e.types[0])).map(({types:e,content:t})=>{const r=[...e],n=["property","string"].includes(r[0])?t.replace(/"/g,""):t;return"string"===r[0]&&(["true","false"].includes(n.split("@")[0])&&(r[0]="boolean"),n.split("@")[0].match(/^[0-9]+$/)&&(r[0]="number")),{types:r,content:n}})})(i),c=r({line:l});return 1===l.length&&"property"===l[0].types[0]?t(Ut,{children:[a(2,s),t(vu,{...c,children:[e(xu,{children:e($u,{children:l[0].content})}),e(xu,{})]})]},`line-${s}`):2===l.length?e(vu,{...c,children:l.map((r,i)=>{const{text:a,components:l}=((t,r)=>{const[n,...o]=t.split("@");return{text:n,components:o?.map((t,n)=>{if(!t.includes("="))return null;const[o,i]=t.split("=");switch(o){case"tooltip":return e(Bd,{withIcon:!0,text:i},`${o}-${i}-${n}`);case"status":if("none"===i)return e("div",{style:{width:16,height:16}},`${o}-${i}-${n}`);let t=Go(i,r);return t||(t=Go(Xr.Warning,r)),e(t,{},`${o}-${i}-${n}`);default:return null}})?.filter(e=>!!e)||[]}})(r.content,o),c=0===i;return e(xu,{children:t(Oo,{children:[e(Oo,{children:l}),e(wu,{$noWrap:c,...n({token:r}),children:a})]})},`line-${s}-token-${i}`)})},`line-${s}`):(l.length,null)})})})})},Eu={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 ku(e){if("number"==typeof e)return{value:e,unit:"px"};let t;const r=(e.match(/^[0-9.]*/)||"").toString();t=r.includes(".")?parseFloat(r):parseInt(r,10);const n=(e.match(/[^0-9]*$/)||"").toString();return Eu[n]?{value:t,unit:n}:{value:t,unit:"px"}}function Au(e){const t=ku(e);return`${t.value}${t.unit}`}const Du=((e,t,r)=>{const n=`react-spinners-${e}-${r}`;if("undefined"==typeof window||!window.document)return n;const o=document.createElement("style");document.head.appendChild(o);const i=o.sheet,a=`\n @keyframes ${n} {\n ${t}\n }\n `;return i&&i.insertRule(a,0),n})("FadeLoader","50% {opacity: 0.3} 100% {opacity: 1}","fade"),Tu=({loading:r=!0,color:n,scale:o=1,speedMultiplier:a=1,cssOverride:s={},style:l={},...c})=>{const d=i(),u=n||d.text.secondary;if(!r)return null;const{value:p}=ku(2),h=p+4.2,m=h/2+h/5.5,g=4*h*o,f={position:"relative",width:`${g}px`,height:`${g}px`,scale:o,...l,...s},y=(e,t)=>({position:"absolute",width:Au(1.5),height:Au(4),borderRadius:Au(2),backgroundColor:u,transition:"2s",animationFillMode:"both",animation:`${Du} ${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:{...y(1,0),top:`calc(50% + ${h}px)`,left:"50%"}}),e("span",{style:{...y(2,-45),top:`calc(50% + ${m}px)`,left:`calc(50% + ${m}px)`}}),e("span",{style:{...y(3,90),top:"50%",left:`calc(50% + ${h}px)`}}),e("span",{style:{...y(4,45),top:`calc(50% + ${-1*m}px)`,left:`calc(50% + ${m}px)`}}),e("span",{style:{...y(5,0),top:`calc(50% + ${-1*h}px)`,left:"50%"}}),e("span",{style:{...y(6,-45),top:`calc(50% + ${-1*m}px)`,left:`calc(50% + ${-1*m}px)`}}),e("span",{style:{...y(7,90),top:"50%",left:`calc(50% + ${-1*h}px)`}}),e("span",{style:{...y(8,45),top:`calc(50% + ${m}px)`,left:`calc(50% + ${-1*m}px)`}})]})},Iu=n.div`
|
|
677
|
-
margin: ${({$align:e})=>"right"===e?"auto 6px auto auto":"left"===e?"auto auto auto 6px":"auto"};
|
|
678
|
-
display: flex;
|
|
679
|
-
align-items: center;
|
|
680
|
-
justify-content: center;
|
|
681
|
-
`,Nu=({extend:t,size:r=14,align:n="center"})=>e(Iu,{$align:n,children:e(St,{size:r,rotate:t?180:0})}),Ru=n.div`
|
|
682
|
-
border-radius: 24px;
|
|
683
|
-
background-color: ${({theme:e,$status:t})=>t===Xr.Error?e.text.error+fc["010"]:t===Xr.Warning?e.text.warning+fc["010"]:e.colors.secondary+fc["005"]};
|
|
684
|
-
&:hover {
|
|
685
|
-
background-color: ${({theme:e,$status:t})=>t===Xr.Error?e.text.error+fc["020"]:t===Xr.Warning?e.text.warning+fc["020"]:e.colors.secondary+fc["010"]};
|
|
686
|
-
}
|
|
687
|
-
cursor: pointer;
|
|
688
|
-
transition: background 0.3s;
|
|
689
|
-
`,Ou=n.div`
|
|
690
|
-
display: flex;
|
|
691
|
-
align-items: center;
|
|
692
|
-
gap: 12px;
|
|
693
|
-
padding: 12px 18px;
|
|
694
|
-
`,Pu=n.div`
|
|
695
|
-
display: flex;
|
|
696
|
-
flex-direction: column;
|
|
697
|
-
gap: 8px;
|
|
698
|
-
padding: 6px 18px 12px 18px;
|
|
699
|
-
`,Fu=n.div`
|
|
700
|
-
display: flex;
|
|
701
|
-
align-items: center;
|
|
702
|
-
gap: 12px;
|
|
703
|
-
`,_u=n(Pc)`
|
|
704
|
-
white-space: nowrap;
|
|
705
|
-
`,Lu=n(Po)`
|
|
706
|
-
width: 16px;
|
|
707
|
-
`,Mu=({conditions:r,headerLabelError:n="Something Failed",headerLabelWarning:o="Something isn't right",headerLabelSuccess:a="Everything Successful"})=>{const s=i(),[l,c]=jt(!1),d=Xt(()=>di(r),[r]),{errors:u,hasErrors:p,warnings:h,hasWarnings:m,hasDisableds:g,hasLoadings:f}=Xt(()=>Pn(d),[d]);Wt(()=>{c(p||m||g)},[p,m,g]);const y=(!d.length||f)&&!p&&!m&&!g,b=p?Xr.Error:m?Xr.Warning:g?Xr.Info:Xr.Success,v=Go(b,s),x=p?n:m||g?o:y?"Loading...":a,$=p?s.text.error:m?s.text.warning:s.text.info,w=`(${p?u.length:m?h.length:d.length}/${d.length})`,S=p?s.text.error_secondary:m?s.text.warning_secondary:s.text.info_secondary,C=Gt(()=>c(e=>!e),[]);return t(Ru,{onClick:C,$status:b,children:[t(Ou,{children:[e(y?Tu:v,{}),e(Pc,{color:$,size:14,children:x}),e(Pc,{color:S,size:12,family:"secondary",children:w}),e(Nu,{extend:l,align:"right"})]}),l&&e(Pu,{children:d.map(({status:r,type:n,reason:o,message:i},a)=>{const l=r===Kr.Loading?()=>e(Tu,{scale:.8}):r===Kr.Disabled?Go(Xr.Info,s):Go(r,s),c=r===Kr.Disabled?s.text.info:r===Xr.Error?s.text.error:r===Xr.Warning?s.text.warning:s.text.info,d=r===Kr.Disabled?s.text.info_secondary:r===Xr.Error?s.text.error_secondary:r===Xr.Warning?s.text.warning_secondary:s.text.info_secondary;return t(Fu,{children:[e(Lu,{children:e(l,{})}),t(Pc,{color:c,size:12,children:[e(_u,{color:d,size:12,weight:700,children:n}),i||o]})]},`condition-${a}`)})})]})},zu=n.div`
|
|
708
|
-
display: flex;
|
|
709
|
-
align-items: center;
|
|
710
|
-
gap: ${({$size:e})=>e/3}px;
|
|
711
|
-
padding: ${({$size:e,$withBorder:t,$withBackground:r})=>t||r?`${e/(t?3:2)}px ${e/(t?1.5:1)}px`:"0"};
|
|
712
|
-
width: ${({$width:e})=>e||"fit-content"};
|
|
713
|
-
border-radius: 360px;
|
|
714
|
-
border: ${({$withBorder:e,$status:t,theme:r})=>e?`1px solid ${r.text[t]+fc["050"]}`:"none"};
|
|
715
|
-
background: ${({$withBackground:e,$status:t,theme:r})=>e?`linear-gradient(90deg, transparent 0%, ${r.text[t]+fc["030"]} 100%)`:"transparent"};
|
|
716
|
-
`,Bu=n.div`
|
|
717
|
-
display: flex;
|
|
718
|
-
align-items: center;
|
|
719
|
-
`,Uu=n.div`
|
|
720
|
-
display: flex;
|
|
721
|
-
align-items: center;
|
|
722
|
-
`,ju=({title:r,subtitle:n,status:o=Xr.Default,forceIcon:a,withIcon:s,withBorder:l,withBackground:c,width:d,size:u=12,family:p="secondary",nowrap:h=!1})=>{const m=i(),g=[Kr.Loading,Kr.Disabled].includes(o)?Xr.Info:o,f=a?()=>e(a,{size:u+2,fill:m.text[g]}):o===Kr.Loading?()=>e(Tu,{scale:.8}):()=>Go(g,m)?.({size:u+2});return t(zu,{$status:g,$width:d,$size:u,$withIcon:s,$withBorder:l,$withBackground:c,children:[s&&e(Bu,{children:e(f,{})}),(!!r||!!n)&&t(Uu,{children:[!!r&&e(Pc,{size:u,family:p,color:m.text[g],nowrap:h,children:r}),!!r&&!!n&&e(Dd,{orientation:"vertical",length:u-2+"px",type:g}),!!n&&e(Pc,{size:u-2,family:p,color:m.text[`${g}_secondary`],nowrap:h,children:n})]})]})},Wu=({label:r,onClick:n,variant:o="tertiary",textProps:a,...s})=>{const l=i();return t(Tc,{onClick:n,variant:o,...s,children:[e(Ct,{fill:"primary"===o?l.text.primary:l.text.info}),e(Pc,{size:14,family:"secondary",decoration:"underline",color:"primary"===o?l.text.primary:void 0,...a,children:r||An.ADD})]})},Hu=n(Oo)`
|
|
723
|
-
width: 100%;
|
|
724
|
-
border-radius: 8px;
|
|
725
|
-
background-color: ${({theme:e})=>e.colors.secondary+fc["010"]};
|
|
726
|
-
pre {
|
|
727
|
-
color: ${({theme:e})=>e.text.default};
|
|
728
|
-
font-size: 12px;
|
|
729
|
-
overflow-x: auto;
|
|
730
|
-
width: 100%;
|
|
731
|
-
padding-left: 12px;
|
|
732
|
-
}
|
|
733
|
-
`,Xu=({value:r,callbackCopyDone:n})=>{const{clickCopy:o,isCopied:i}=Xc();return t(Hu,{children:[e("pre",{children:r}),e(Wd,{onClick:e=>{e.stopPropagation(),o(r),n?.()},tooltip:i?"Copied!":"Copy",children:e(i?yt:bt,{})})]})},Gu=n(Pc)`
|
|
734
|
-
max-width: ${({$maxWidth:e})=>e?`${e}px`:"unset"};
|
|
735
|
-
white-space: nowrap;
|
|
736
|
-
overflow-x: auto;
|
|
737
|
-
|
|
738
|
-
&::after {
|
|
739
|
-
// This is to prevent the "browser default tooltip" from appearing when the title is too long
|
|
740
|
-
content: '';
|
|
741
|
-
display: block;
|
|
742
|
-
}
|
|
743
|
-
`,Ku=({maxWidth:r,text:n,textSize:o=16,textColor:i})=>{const[a,s]=jt(!1),l=Ht(null);return Wt(()=>{if(l.current){const{clientWidth:e}=l.current;s(e<1.05*(r-o)&&e>.95*(r-o))}},[r,o,n]),t(Oo,{$gap:0,children:[n&&e(Bd,{text:a?n:void 0,children:e(Gu,{ref:l,$maxWidth:r-o,size:o,color:i,children:n})}),a&&e(Gu,{$maxWidth:o,size:o,color:i,children:"..."})]})},Vu=({src:t="",alt:r="",size:n=16})=>{const[o,i]=jt(!1);return t&&!o?e("img",{src:t,alt:r,width:n,height:n,onError:()=>i(!0)}):e(g,{size:n})},Ju=n.div`
|
|
744
|
-
display: flex;
|
|
745
|
-
align-items: center;
|
|
746
|
-
justify-content: center;
|
|
747
|
-
width: ${({$size:e})=>e}px;
|
|
748
|
-
height: ${({$size:e})=>e}px;
|
|
749
|
-
border-radius: 8px;
|
|
750
|
-
background: ${({$status:e,theme:t})=>{const r=t.colors[e||"dropdown_bg_2"];return`linear-gradient(180deg, ${r} 0%, ${r+fc["030"]} 100%)`}};
|
|
751
|
-
`,qu=({icon:t,src:r="",alt:n="",status:o,size:i=36})=>e(Ju,{$status:o,$size:i,children:r?e(Vu,{src:r,alt:n,size:i-12}):e(t||g,{size:i-12})}),Yu=n.div`
|
|
752
|
-
position: relative;
|
|
753
|
-
display: flex;
|
|
754
|
-
flex-wrap: wrap;
|
|
755
|
-
align-items: center;
|
|
756
|
-
justify-content: center;
|
|
757
|
-
width: ${({$size:e})=>e}px;
|
|
758
|
-
height: ${({$size:e})=>e}px;
|
|
759
|
-
`,Qu=n.div`
|
|
760
|
-
position: absolute;
|
|
761
|
-
top: ${({$top:e})=>e}px;
|
|
762
|
-
left: ${({$left:e})=>e}px;
|
|
763
|
-
z-index: ${({$zIndex:e})=>e};
|
|
764
|
-
display: flex;
|
|
765
|
-
align-items: center;
|
|
766
|
-
justify-content: center;
|
|
767
|
-
width: ${({$size:e})=>e}px;
|
|
768
|
-
height: ${({$size:e})=>e}px;
|
|
769
|
-
border-radius: 100%;
|
|
770
|
-
border: 1px solid ${({theme:e,$status:t})=>(t?e.text[t]:e.colors.border)+fc["030"]};
|
|
771
|
-
background: ${({$status:e,theme:t})=>{const r=t.colors[e||"dropdown_bg_2"];return`linear-gradient(180deg, ${r} 0%, ${r+fc["030"]} 100%)`}};
|
|
772
|
-
`,Zu=({icons:r=[],iconSrcs:n=[],status:o,size:a=36,id:s})=>{const l=i(),c=1===r.length||1===n.length?a-12:a/2.7;if(n.length>0)return e(Zu,{icons:n.map(t=>()=>e(Vu,{src:t,size:c})),status:o,size:a,id:s});if(1===r.length)return e(qu,{icon:r[0],status:o,size:a});const d=e=>r.length<=2?.5*c:0===e||1===e?0:1.15*c,u=e=>0===e?0:1===e?1.15*c:1.15*c*.5;return e(Yu,{$status:o,$size:a,children:r.map((n,i)=>i>2?null:e(Qu,{$status:o,$size:1.5*c,$top:d(i),$left:u(i),$zIndex:i+1,children:2===i&&r.length>3?t(Pc,{family:"secondary",color:l.text.dark_grey,size:.8*c,children:["+",r.length-2]}):e(n,{size:c})},`icon-${s}-${i}`))})},ep=Ul.map(({id:e})=>e),tp=({monitors:r=ep,withTooltips:n,withLabels:o,size:a=12,color:s})=>{const l=i(),c=s||l.text.grey;return e(Oo,{$gap:o?a:a/2,children:r.map(r=>{const i=fr(r.toLowerCase()),s=Yn(r);return s?e(Bd,{text:n?i:"",children:t(Oo,{$gap:a/3,children:[e(s,{size:o?a+2:a,fill:c}),o&&e(Pc,{size:a,color:c,children:i})]})},r):null})})},rp=n.div`
|
|
773
|
-
visibility: hidden;
|
|
774
|
-
`,np=n.div`
|
|
775
|
-
display: flex;
|
|
776
|
-
flex-direction: column;
|
|
777
|
-
align-self: stretch;
|
|
778
|
-
padding: 16px;
|
|
779
|
-
width: calc(100% - 32px);
|
|
780
|
-
border-radius: 16px;
|
|
781
|
-
background-color: ${({theme:e,$status:t,$bgColor:r})=>r||(t?e.text[t]+fc["010"]:e.colors.secondary+fc["005"])};
|
|
782
|
-
opacity: ${({$faded:e})=>e?.5:1};
|
|
783
|
-
|
|
784
|
-
${({theme:e,$status:t,$bgColorHover:r,$withClick:n})=>n?o`
|
|
785
|
-
&:hover {
|
|
786
|
-
cursor: pointer;
|
|
787
|
-
background-color: ${r||(t?e.text[t]+fc["020"]:e.colors.secondary+fc["010"])};
|
|
788
|
-
${rp} {
|
|
789
|
-
visibility: visible;
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
`:`\n &:hover {\n ${rp} {\n visibility: visible;\n }\n }\n `}
|
|
793
|
-
`,op=n.div`
|
|
794
|
-
display: flex;
|
|
795
|
-
align-items: center;
|
|
796
|
-
gap: 8px;
|
|
797
|
-
margin-left: auto;
|
|
798
|
-
`,ip=n(Pc)`
|
|
799
|
-
margin-right: 16px;
|
|
800
|
-
`,ap=n(Pc)`
|
|
801
|
-
font-size: 10px;
|
|
802
|
-
color: ${({theme:e})=>e.text.grey};
|
|
803
|
-
`,sp=({title:r,subTitle:n,hoverText:o,onClick:a,renderActions:s,iconProps:{icon:l,icons:c,iconSrc:d,iconSrcs:u}={},visualProps:{status:p,faded:h,bgColor:m,bgColorHover:g,monitors:f,monitorsWithLabels:y,componentsUnderTitles:b}={},checkboxProps:{withCheckbox:v,isCheckboxDisabled:x,isChecked:$,isLoading:w,onCheckboxChange:S}={},extendableProps:{withExtend:C,isExtended:E,renderExtended:k}={},...A})=>{const D=i(),[T,I]=jt(E||!1),[N,R]=jt(0),O=Ht(null),P=Ht(null),F=Ht(null);return Wt(()=>{if(O.current){const e=O.current.clientWidth,t=P.current?.clientWidth||0;R(e-((v?125:85)+t))}},[v]),t(np,{ref:O,$status:p,$faded:h,$bgColor:m,$bgColorHover:g,$withClick:!!a,onClick:a,...A,children:[t(Oo,{$gap:8,children:[t(Oo,{$gap:16,children:[w?e(Tu,{}):v?e(hu,{value:$,onChange:S,disabled:x}):null,c?.length||u?.length?e(Zu,{icons:c,iconSrcs:u,status:p,id:`${r}-${n}`}):l||d?e(qu,{icon:l,src:d,status:p}):null]}),t(Po,{$gap:4,children:[r&&e(Ku,{maxWidth:N,text:r,textSize:14}),t(Oo,{$gap:4,children:[n&&e(Ku,{maxWidth:N-(F.current?.clientWidth||0),text:n,textSize:10,textColor:D.text.grey}),f&&f.length>0&&t(Oo,{$gap:4,ref:F,children:[n&&e(ap,{children:"•"}),e(tp,{monitors:f,withLabels:y,size:10})]})]}),b&&b.length>0?e(Oo,{$gap:4,children:b?.map((t,r)=>e(Ut,{children:t},`componentsUnderTitles-${r}`))}):null]}),t(op,{ref:P,children:[!!o&&e(rp,{children:e(ip,{size:14,family:"secondary",children:o})}),s&&s(),C&&t(Ut,{children:[e(Dd,{orientation:"vertical",length:"16px",margin:"0 2px"}),e(Wd,{onClick:()=>I(e=>!e),children:e(Nu,{extend:T})})]})]})]}),T&&k&&t(Po,{children:[e(Dd,{margin:"16px 0"}),k()]})]})},lp=n(Oo)`
|
|
804
|
-
width: 100%;
|
|
805
|
-
justify-content: space-between;
|
|
806
|
-
`,cp=n(Pc)`
|
|
807
|
-
font-size: 12px;
|
|
808
|
-
color: ${({theme:e})=>e.text.grey};
|
|
809
|
-
`,dp=n(Pc)`
|
|
810
|
-
font-size: 10px;
|
|
811
|
-
color: ${({theme:e})=>e.text.darker_grey};
|
|
812
|
-
`,up=n.div`
|
|
813
|
-
display: flex;
|
|
814
|
-
align-items: center;
|
|
815
|
-
gap: 8px;
|
|
816
|
-
margin-left: auto;
|
|
817
|
-
`,pp=n(Pc)`
|
|
818
|
-
font-size: 12px;
|
|
819
|
-
text-align: right;
|
|
820
|
-
`,hp=({title:r,subTitle:n,tooltip:o,value:i})=>t(lp,{children:[e(Po,{$gap:4,children:t(Bd,{text:o||"",children:[r&&e(cp,{children:r},"title"),n&&e(dp,{children:n},"subtitle")]})}),e(up,{children:i?.status?e(ju,{status:"transitioning"===i.status?Kr.Loading:i.status,title:i.text||i.status,withBorder:!0,withIcon:!0}):e(pp,{children:i?.text||"-"})})]}),mp=n(Po)`
|
|
821
|
-
width: 100%;
|
|
822
|
-
`,gp=({containerName:r,actualDevices:n,started:o,ready:i,instrumentationInstances:a})=>{const s=Xt(()=>{const t=[];return o?.name&&t.push(e(ju,{status:ii(o.value)?gi(o.value)?Xr.Success:Xr.Error:Xr.Default,title:o.name,withIcon:!0,withBorder:!0,size:8},"started")),i?.name&&t.push(e(ju,{status:ii(i.value)?gi(i.value)?Xr.Success:Xr.Error:Xr.Default,title:i.name,withIcon:!0,withBorder:!0,size:8},"ready")),t},[o?.name,o?.value,i?.name,i?.value]);return e(sp,{title:r.value,subTitle:a.length?`${a.length} Instrumented Processes`:void 0,visualProps:{componentsUnderTitles:s},renderActions:()=>e(ju,{status:Xr.Info,title:"Instrumentation Device",subtitle:n.value&&"[]"!==n.value?n.value:"none",withBorder:!0}),extendableProps:{isExtended:!!a.length,renderExtended:()=>e(mp,{$gap:24,children:a.map((r,n)=>t(mp,{$gap:8,children:[e(hp,{title:`Instrumented Process #${n+1}`,subTitle:r.message?.value||"",value:{status:r.healthy.status,text:r.healthy.status===Xr.Success?"healthy":"unhealthy"}}),r.identifyingAttributes?.map(({name:t,value:r})=>e(hp,{title:t,subTitle:"",value:{text:r,status:void 0}},`describe-${t}-${r}`))]},`process-${n}`))})}})},fp=({title:r="Data not found",subTitle:n})=>{const o=i().v2.colors.grey[400];return t(Fo,{children:[t(Oo,{$gap:8,children:[e(Et,{fill:o}),e(uo,{size:io.XS,color:o,align:"center",children:r})]}),n&&e(uo,{size:io.XXS,color:o,align:"center",children:n})]})},yp=n(Po)`
|
|
823
|
-
max-width: 300px;
|
|
824
|
-
padding: 12px;
|
|
825
|
-
border-radius: 12px;
|
|
826
|
-
background-color: ${({theme:e})=>e.colors.dropdown_bg};
|
|
827
|
-
justify-content: center;
|
|
828
|
-
`,bp=Jt(({id:t,data:r})=>{const{title:n,subTitle:o}=r;return e(yp,{"data-id":t,children:e(fp,{title:n,subTitle:o})})});bp.displayName=bp.name;const vp=n.div`
|
|
829
|
-
padding: 6px;
|
|
830
|
-
border-radius: 12px;
|
|
831
|
-
background-color: ${({theme:e})=>e.colors.dropdown_bg};
|
|
832
|
-
cursor: pointer;
|
|
833
|
-
${({$isVirtual:e,theme:t})=>e&&`\n border: 1px dashed ${t.colors.border};\n opacity: 0.8;\n `}
|
|
834
|
-
`,xp=n.div`
|
|
835
|
-
position: relative;
|
|
836
|
-
`,$p=n.div`
|
|
837
|
-
position: absolute;
|
|
838
|
-
top: 100%;
|
|
839
|
-
margin-top: 4px;
|
|
840
|
-
left: 50%;
|
|
841
|
-
transform: translateX(-50%);
|
|
842
|
-
display: flex;
|
|
843
|
-
flex-direction: column;
|
|
844
|
-
align-items: center;
|
|
845
|
-
gap: 2px;
|
|
846
|
-
width: 140px;
|
|
847
|
-
text-align: center;
|
|
848
|
-
`,wp=Jt(({id:n,data:o})=>{const{id:a,status:s,title:l,icons:c,isVirtual:d}=o,u=i(),p=d||s!==Xr.Error?null:Go(s,u);return t(r,{children:[e(nr,{type:"source",position:or.Right,style:{visibility:"hidden"}}),e(nr,{type:"target",position:or.Left,style:{visibility:"hidden"}}),t(xp,{"data-id":n,children:[e(vp,{$isVirtual:d,children:e(Zu,{id:a,icons:c,status:d?void 0:s})}),t($p,{children:[p&&e(p,{}),e(Pc,{size:12,style:{textAlign:"center",wordBreak:"break-word",lineHeight:"1.3"},children:l})]})]})]})});wp.displayName=wp.name;const Sp={duration:300,padding:.1,includeHiddenNodes:!0},Cp=n.div`
|
|
849
|
-
height: 100%;
|
|
850
|
-
.react-flow__attribution {
|
|
851
|
-
visibility: hidden;
|
|
852
|
-
}
|
|
853
|
-
`,Ep=n.div`
|
|
854
|
-
button {
|
|
855
|
-
padding: 8px;
|
|
856
|
-
margin: 8px;
|
|
857
|
-
border-radius: 8px;
|
|
858
|
-
border: 1px solid ${({theme:e})=>e.colors.border} !important;
|
|
859
|
-
background-color: ${({theme:e})=>e.colors.dropdown_bg};
|
|
860
|
-
path {
|
|
861
|
-
fill: ${({theme:e})=>e.text.secondary};
|
|
862
|
-
}
|
|
863
|
-
&:hover {
|
|
864
|
-
background-color: ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
865
|
-
}
|
|
866
|
-
&:last-child svg {
|
|
867
|
-
transform: scale(1.4);
|
|
868
|
-
}
|
|
869
|
-
}
|
|
870
|
-
`,kp={[qr.MapItem]:wp,[qr.NoData]:bp},Ap=({trigger:e})=>{const{fitView:t}=cr(),r=Ht(!0);return Wt(()=>{r.current?r.current=!1:e>0&&requestAnimationFrame(()=>t(Sp))},[e,t]),null},Dp=({nodes:r,edges:n,onNodesChange:o,onEdgesChange:i,fitViewTrigger:a=0,zoomOnScroll:s=!1,onEdgeClick:l,onNodeMouseEnter:c,onNodeMouseLeave:d,onRefresh:u})=>{const{onClickNode:p}=zc(),{setActiveNodeType:h,setActiveNodeId:m}=Si();return t(ar,{zoomOnScroll:s,nodes:r,nodeTypes:kp,edges:n,onNodeClick:p,onEdgeClick:l,onNodeMouseEnter:c,onNodeMouseLeave:d,onNodesChange:o,onEdgesChange:i,onBlur:()=>{h(null),m(null)},children:[e(Ap,{trigger:a}),e(Ep,{children:e(sr,{position:"bottom-right",orientation:"horizontal",showInteractive:!1,showZoom:!0,showFitView:!0,fitViewOptions:Sp,children:u&&e(lr,{onClick:u,children:e(kt,{size:20})})})})]})},Tp=t=>e(Cp,{children:e(ir,{children:e(Dp,{...t})})}),Ip={type:"",disabled:!1,name:"",notes:"",signals:[],fields:{}},Np=Vt(null),Rp="All row fields are required",Op="At least one row is required",Pp=En.LATENCY_HTTP_ROUTE,Fp=e=>"string"==typeof e?!e.trim():ri(e),_p=(e,t)=>!!e&&t.every(t=>{const r=e[t];return Array.isArray(r)?r.length>0:!Fp(r)}),Lp=({children:t})=>{const[r,n]=jt(null),[o,i]=jt(void 0),a=Fc(Ip),s=Gt(e=>{a.resetFormData(),a.handleErrorChange(void 0,void 0,{}),i(void 0),e?.type&&a.handleFormChange("type",e.type),n(e)},[]),l=Gt(e=>{var t;a.resetFormData((({type:e,name:t,notes:r,disabled:n,signals:o,fields:i})=>({type:e,name:t||"",notes:r||"",disabled:!!n,signals:o??[],fields:i??{}}))(e)),a.handleErrorChange(void 0,void 0,{}),i(void 0),n((t=e.type,Ci.find(e=>e.type===t)??Ei.find(e=>e.type===t)??null))},[]),c=Gt(()=>{if(!r)return{errorMessage:"No action type selected",preparedFormData:xr(Ip)};const e=(e=>{const t=xr(e),r=t.fields||{},n=r[Dr.UrlTemplatizationRulesGroups];n?.length&&(r[Dr.UrlTemplatizationRulesGroups]=n.map(e=>({...e,templatizationRules:(e.templatizationRules||[]).filter(e=>!!e.template?.trim())})));const o=r[Dr.AttributeNamesToDelete];o?.length&&(r[Dr.AttributeNamesToDelete]=o.filter(e=>!!e?.trim()));const i=r[Dr.Renames];return i&&(r[Dr.Renames]=Object.fromEntries(Object.entries(i).filter(([e,t])=>!!e?.trim()&&!!t?.trim()))),t.fields=r,t})(a.formData),t={};ri(e.signals)&&(t.signals=En.FIELD_IS_REQUIRED),r.type&&Object.assign(t,((e,t,r)=>{const n={},o=t.fields||{},i=r.fields||{};switch(e){case Ar.K8sAttributes:{const e=!(o[Dr.CollectContainerAttributes]||o[Dr.CollectReplicaSetAttributes]||o[Dr.CollectWorkloadId]||o[Dr.CollectClusterId]),t=!o[Dr.LabelsAttributes]?.length,r=!o[Dr.AnnotationsAttributes]?.length;e&&t&&r&&(n[Dr.CollectContainerAttributes]="Enable at least one option or add a label/annotation row");const i=o[Dr.LabelsAttributes];i?.some(e=>!_p(e,["labelKey","attributeKey","fromSources"]))&&(n[Dr.LabelsAttributes]=Rp);const a=o[Dr.AnnotationsAttributes];a?.some(e=>!_p(e,["annotationKey","attributeKey","fromSources"]))&&(n[Dr.AnnotationsAttributes]=Rp);break}case Ar.AddClusterInfo:{const e=o[Dr.ClusterAttributes];e?.length?e.some(e=>!_p(e,["attributeName","attributeStringValue"]))&&(n[Dr.ClusterAttributes]=Rp):n[Dr.ClusterAttributes]=Op;break}case Ar.DeleteAttributes:{const e=i[Dr.AttributeNamesToDelete]||[],t=o[Dr.AttributeNamesToDelete]||[];t.length?e.length>t.length&&(n[Dr.AttributeNamesToDelete]=Rp):n[Dr.AttributeNamesToDelete]=e.length?Rp:Op;break}case Ar.RenameAttributes:{const e=Object.entries(i[Dr.Renames]||{}),t=Object.entries(o[Dr.Renames]||{}),r=e.some(([e,t])=>!e?.trim()||!t?.trim());t.length?r&&(n[Dr.Renames]=Rp):n[Dr.Renames]=e.length?Rp:Op;break}case Ar.PiiMasking:{const e=o[Dr.PiiCategories];e?.length||(n[Dr.PiiCategories]="Select at least one attribute to mask");break}case Ar.ErrorSampler:Fp(o[Dr.FallbackSamplingRatio])&&(n[Dr.FallbackSamplingRatio]=En.FIELD_IS_REQUIRED);break;case Ar.ProbabilisticSampler:Fp(o[Dr.SamplingPercentage])&&(n[Dr.SamplingPercentage]=En.FIELD_IS_REQUIRED);break;case Ar.LatencySampler:{const e=o[Dr.EndpointsFilters];e?.length?e.some(e=>!_p(e,["serviceName","httpRoute","minimumLatencyThreshold","fallbackSamplingRatio"]))?n[Dr.EndpointsFilters]=Rp:e.some(e=>!!e.httpRoute&&!e.httpRoute.startsWith("/"))&&(n[Dr.EndpointsFilters]=Pp):n[Dr.EndpointsFilters]=Op;break}case Ar.ServiceNameSampler:{const e=o[Dr.ServicesNameFilters];e?.length?e.some(e=>!_p(e,["serviceName","samplingRatio","fallbackSamplingRatio"]))&&(n[Dr.ServicesNameFilters]=Rp):n[Dr.ServicesNameFilters]=Op;break}case Ar.SpanAttributeSampler:{const e=o[Dr.AttributeFilters],t=["stringCondition","numberCondition","booleanCondition","jsonCondition"],r=new Set(["exists","is_valid_json","is_invalid_json","jsonpath_exists"]);e?.length?e.some(e=>{if(!_p(e,["serviceName","attributeKey","fallbackSamplingRatio"]))return!0;const n=e.condition||{},o=t.find(e=>!!n[e]);if(!o)return!0;const i=n[o]||{},a=i.operation;return!a||!(r.has(a)||!Fp(i.expectedValue))})&&(n[Dr.AttributeFilters]=Rp):n[Dr.AttributeFilters]=Op;break}case Ar.URLTemplatization:{const e=o[Dr.UrlTemplatizationRulesGroups];(!e?.length||e.some(e=>!e.templatizationRules?.length))&&(n[Dr.UrlTemplatizationRulesGroups]="Each rule group needs at least one non-blank template");break}}return n})(r.type,e,a.formData)),a.handleErrorChange(void 0,void 0,t);const n=Object.keys(t).length>0?"Invalid form values":void 0;return i(n),{errorMessage:n,preparedFormData:e}},[a,r]),d=Xt(()=>({selectedOption:r,onSelectOption:s,loadAction:l,genericForm:a,validateFormData:c,errorMessage:o}),[r,s,l,a,c,o]);return e(Np.Provider,{value:d,children:t})},Mp=()=>{const e=Kt(Np);if(!e)throw new Error("useActionFormContext must be used within an ActionFormContextProvider");return e},zp={name:""},Bp=Vt(null),Up=({children:t,defaultExcludeName:r=""})=>{const{dataStreams:n}=Jl(),[o,i]=jt(void 0),[a,s]=jt(r),[l,c]=jt(void 0),[d,u]=jt(null),p=Ht(null),h=Fc(zp),m=Gt(e=>{h.resetFormData({name:e}),h.handleErrorChange(void 0,void 0,{}),i(void 0),s(e),c(e),u(null),p.current=null},[]),g=Gt(()=>{const e=xr(h.formData),t=(e=>{const t={};return e.name?ni(e.name)||(t.name=En.ILLEGAL_K8S_LABEL):t.name=En.FIELD_IS_REQUIRED,t})(e);h.handleErrorChange(void 0,void 0,t);const r=Object.keys(t).length>0?En.REQUIRED_FIELDS:void 0;return i(r),{errorMessage:r,preparedFormData:e}},[h]),f=Gt(async e=>{const{errorMessage:t,preparedFormData:r}=g();if(t)return;const o=n.find(e=>e.name===r.name&&e.name!==a);if(o)return p.current=e,void u({preparedFormData:r,existingName:o.name,editingName:l});await e(r)},[g,n,a,l]),y=Gt(async()=>{const e=p.current,t=d?.preparedFormData;p.current=null,u(null),e&&t&&await e(t)},[d]),b=Gt(()=>{p.current=null,u(null)},[]),v=Xt(()=>({genericForm:h,loadDataStream:m,editingName:l,validateFormData:g,requestSubmit:f,pendingMerge:d,confirmMerge:y,cancelMerge:b,errorMessage:o,excludeName:a,setExcludeName:s}),[h,m,l,g,f,d,y,b,o,a]);return e(Bp.Provider,{value:v,children:t})},jp=()=>{const e=Kt(Bp);if(!e)throw new Error("useDataStreamFormContext must be used within a DataStreamFormContextProvider");return e},Wp={type:"",name:"",currentStreamName:"",disabled:!1,exportedSignals:{logs:!1,metrics:!1,traces:!1,profiles:!1},fields:[]},Hp={activeForm:null,onChangeActiveForm:()=>{},loadDestination:()=>{},genericForm:void 0,formErrorMessage:void 0,validateFormData:()=>({isOk:!1,preparedFormData:xr(Wp)}),unsavedDestinations:[],thisUnsavedDestination:void 0,setUnsavedDestinations:()=>{},addUnsavedDestination:()=>{},updateUnsavedDestination:()=>{},deleteUnsavedDestination:()=>{}},Xp=Vt(Hp),Gp=e=>e.filter(e=>!!e).map(e=>{const{name:t,componentType:r,componentProperties:n,displayName:o,initialValue:i,renderCondition:a}=e,s=r===Wr.Dropdown,l=Zo(n,{});return{componentType:r,renderCondition:a,name:t,title:o,value:i,placeholder:l.placeholder||(s?"Select an option":void 0),options:s&&Array.isArray(l.values)?l.values.map(e=>({id:e,value:e})):void 0,...l}}),Kp=({children:t})=>{const{selectedStreamName:r}=Jl(),n=Yl(e=>e.destinations),[o,i]=jt(null),[a,s]=jt(),[l,c]=jt(Hp.unsavedDestinations),d=Xt(()=>"number"==typeof o?.unsavedIdx?l[o.unsavedIdx]:void 0,[o,l]),u=Gt((e,t)=>{o&&(c(t=>[...t,{...e,option:o.option}]),i(t?e=>e?{...e,listType:Ai.UNSAVED,unsavedIdx:l.length}:null:null))},[o,l.length]),p=Gt((e,t,r)=>{o&&(c(r=>r.map((r,n)=>n===e?{...r,...t,option:o.option}:r)),i(r?e=>e?{...e,listType:Ai.UNSAVED}:null:null))},[o]),h=Gt(e=>{c(t=>t.filter((t,r)=>r!==e)),i(null)},[]),m=Fc({...Wp,currentStreamName:r});Wt(()=>{if(!o)return;if(d)return void m.resetFormData({...d.formData});if(o.listType===Ai.EXISTS&&o.option.id){const e=n.find(e=>e.id===o.option.id);if(e)return void m.resetFormData({type:e.destinationType.type,name:e.name||e.destinationType.displayName,currentStreamName:r,disabled:!!e.disabled,exportedSignals:{logs:!!e.exportedSignals?.logs,metrics:!!e.exportedSignals?.metrics,traces:!!e.exportedSignals?.traces,profiles:!!e.exportedSignals?.profiles},fields:o.dynamicFields.map(e=>({key:e.name,value:e.value}))})}const e=hi(o.option.supportedSignals);m.resetFormData({type:o.option.type,name:o.option.displayName,currentStreamName:r,disabled:!1,exportedSignals:{logs:e.includes(hn.Logs),metrics:e.includes(hn.Metrics),traces:e.includes(hn.Traces),profiles:e.includes(hn.Profiles)},fields:o.dynamicFields.map(e=>({key:e.name,value:e.value}))})},[o,d]);const g=Gt(e=>{m.resetFormData(),m.handleErrorChange(void 0,void 0,{}),s(void 0),i(e?{...e,dynamicFields:e.option?.fields?Gp(e.option.fields):[]}:null)},[]),f=Gt((e,t)=>{let r;for(const n of t){const t=n.items.find(t=>t.type===e.destinationType.type);if(t){r=t;break}}const n=Zo(e.fields,{}),o={id:e.id,type:e.destinationType.type,displayName:e.name||e.destinationType.displayName,selected:!0,testConnectionSupported:r?.testConnectionSupported??!1,supportedSignals:e.destinationType.supportedSignals,fields:r?r.fields.map(e=>({...e,initialValue:n[e.name]??e.initialValue})):[]},a=Gp(o.fields);i({listType:Ai.EXISTS,option:o,dynamicFields:a}),s(void 0)},[]),y=Gt(()=>{const e=xr(m.formData),t={};o?.dynamicFields.forEach(({name:r,required:n})=>{if(n){const n=e.fields.find(e=>e.key===r)?.value;ri(n)&&(t[r]=En.FIELD_IS_REQUIRED)}});pi(e.exportedSignals).length||(t.exportedSignals=En.FIELD_IS_REQUIRED);const r=0===Object.keys(t).length?void 0:"Invalid form values";return m.handleErrorChange(void 0,void 0,t),s(r),{errorMessage:r,preparedFormData:e}},[m,o]);return e(Xp.Provider,{value:{activeForm:o,onChangeActiveForm:g,loadDestination:f,genericForm:m,formErrorMessage:a,validateFormData:y,unsavedDestinations:l,thisUnsavedDestination:d,setUnsavedDestinations:c,addUnsavedDestination:u,updateUnsavedDestination:p,deleteUnsavedDestination:h},children:t})},Vp=()=>Kt(Xp),Jp={disabled:!1,ruleName:"",notes:"",workloads:null,instrumentationLibraries:null,payloadCollection:null,codeAttributes:null,headersCollection:null,customInstrumentations:null},qp=Vt(null),Yp=({children:t})=>{const[r,n]=jt(null),[o,i]=jt(void 0),a=Fc(Jp),s=Gt(e=>{a.resetFormData(),a.handleErrorChange(void 0,void 0,{}),i(void 0),n(e)},[]),l=Gt(e=>{var t;a.resetFormData((({ruleName:e,notes:t,disabled:r,workloads:n,instrumentationLibraries:o,payloadCollection:i,codeAttributes:a,headersCollection:s,customInstrumentations:l})=>({ruleName:e||"",notes:t||"",disabled:!!r,workloads:n??null,instrumentationLibraries:o??null,payloadCollection:i??null,codeAttributes:a??null,headersCollection:s??null,customInstrumentations:l??null}))(e)),a.handleErrorChange(void 0,void 0,{}),i(void 0),n((t=e.type,Ti.find(e=>e.type===t)??null))},[]),c=Gt(()=>{if(!r)return{errorMessage:"No rule type selected",preparedFormData:xr(Jp)};const e=(e=>{const t=xr(e);return t.headersCollection?.[an.HeaderKeys]?.length&&(t.headersCollection[an.HeaderKeys]=t.headersCollection[an.HeaderKeys].map(e=>e.trim()).filter(e=>e)),t.customInstrumentations?.[sn.Golang]?.length&&(t.customInstrumentations[sn.Golang]=t.customInstrumentations[sn.Golang].map(e=>new fn(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)).filter(e=>{return t=e,!!(t.packageName?.trim()||t.functionName?.trim()||t.receiverName?.trim()||t.receiverMethodName?.trim());var t})),t.customInstrumentations?.[sn.Java]?.length&&(t.customInstrumentations[sn.Java]=t.customInstrumentations[sn.Java].map(e=>new gn(e.className,e.methodName)).filter(e=>{return t=e,!(!t.className?.trim()&&!t.methodName?.trim());var t})),t})(a.formData),t=((e,t)=>{const r={};switch(e){case nn.CodeAttributes:Object.values(t.codeAttributes||{}).some(e=>null!=e)||(r.codeAttributes="Code attributes are required");break;case nn.PayloadCollection:Object.values(t.payloadCollection||{}).some(e=>null!=e)||(r.payloadCollection="Payload collection are required");break;case nn.HeadersCollection:t.headersCollection?.[an.HeaderKeys]?.length||(r.headersCollection="Header keys are required");break;case nn.CustomInstrumentation:{const e=t.customInstrumentations?.[sn.Golang]||[],n=t.customInstrumentations?.[sn.Java]||[];if(!e.length&&!n.length){r.customInstrumentations="Custom instrumentation are required";break}const o=e.findIndex(e=>!new fn(e.packageName,e.functionName,e.receiverName,e.receiverMethodName).Verify());if(-1!==o){r.customInstrumentations=`Golang probe #${o+1} is invalid: provide a package name plus either a function name OR both a receiver name and receiver method name`;break}const i=n.findIndex(e=>!new gn(e.className,e.methodName).Verify());if(-1!==i){r.customInstrumentations=`Java probe #${i+1} is invalid: both class name and method name are required`;break}break}}return r})(r.type,e);a.handleErrorChange(void 0,void 0,t);const n=Object.keys(t).length>0?"Invalid form values":void 0;return i(n),{errorMessage:n,preparedFormData:e}},[a,r]),d=Xt(()=>({selectedOption:r,onSelectOption:s,loadRule:l,genericForm:a,validateFormData:c,errorMessage:o}),[r,s,l,a,c,o]);return e(qp.Provider,{value:d,children:t})},Qp=()=>{const e=Kt(qp);if(!e)throw new Error("useRuleFormContext must be used within a RuleFormContextProvider");return e};function Zp(e){return!e||!e.sources.length&&!e.namespaces.length&&!e.languages.length}function eh(e){return{name:"",notes:"",disabled:!1,ruleType:"Relevance",sourceScopes:{sources:[],namespaces:[],languages:[]},operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:"",durationPreset:"500",customDurationMs:"",keepErrors:!1,percentageMode:"costReduction"===e?"sample":"all",percentagePreset:"0",customPercentage:""}}function th(e){return Zp(e.sourceScopes)?null:e.sourceScopes}function rh(e){return th(e)}function nh(e){if("all"===e.percentageMode)return null;if("custom"===e.percentagePreset){const t=parseFloat(e.customPercentage);return isNaN(t)?null:t}return parseFloat(e.percentagePreset)}function oh(e){if("custom"===e.durationPreset){const t=parseFloat(e.customDurationMs);return isNaN(t)?null:t}return parseInt(e.durationPreset,10)}function ih(e){return{httpServer:{[e.routeType]:e.route||null,method:e.method||null}}}function ah(e){return"all"===e.operationType?null:"httpServer"===e.operationType?ih(e):"httpClient"===e.operationType?{httpClient:{serverAddress:e.serverAddress||null,["route"===e.routeType?"templatedPath":"templatedPathPrefix"]:e.route||null,method:e.method||null}}:null}function sh(e){return"all"===e.operationType?null:"httpServer"===e.operationType?ih(e):"kafkaConsumer"===e.operationType?{kafkaConsumer:{kafkaTopic:e.kafkaTopic||null}}:"kafkaProducer"===e.operationType?{kafkaProducer:{kafkaTopic:e.kafkaTopic||null}}:null}function lh(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:th(e),percentageAtMost:nh(e),operation:ah(e)}}function ch(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:th(e),error:e.keepErrors,durationAtLeastMs:"Duration"===e.ruleType?oh(e):null,percentageAtLeast:nh(e),operation:sh(e)}}function dh(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:th(e),percentageAtMost:nh(e)??0,operation:sh(e)}}function uh(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:rh(e),operation:ah(e),percentageAtMost:nh(e),notes:e.notes||null}}function ph(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:rh(e),error:"Error"===e.ruleType,durationAtLeastMs:"Duration"===e.ruleType?oh(e):null,operation:sh(e),percentageAtLeast:nh(e),notes:e.notes||null}}function hh(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:rh(e),operation:sh(e),percentageAtMost:nh(e)??0,notes:e.notes||null}}const mh=["5000","1000","500","100","50"],gh=["50","25","10","1","0.5","0.1","0"];function fh(e){if(null==e)return{percentageMode:"all",percentagePreset:"0",customPercentage:""};const t=gh.find(t=>Number(t)===e);return t?{percentageMode:"sample",percentagePreset:t,customPercentage:""}:{percentageMode:"sample",percentagePreset:"custom",customPercentage:String(e)}}function yh(e){if(!e)return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""};const t=e;if(t.httpServer){return{operationType:"httpServer",routeType:t.httpServer.routePrefix?"routePrefix":"route",route:t.httpServer.route||t.httpServer.routePrefix||"",serverAddress:"",method:t.httpServer.method||"",kafkaTopic:""}}return t.kafkaConsumer?{operationType:"kafkaConsumer",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:t.kafkaConsumer.kafkaTopic||""}:t.kafkaProducer?{operationType:"kafkaProducer",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:t.kafkaProducer.kafkaTopic||""}:{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""}}function bh(e){const t=eh(),r=(n=e.rule.sourceScopes)?{sources:n.sources?[...n.sources]:[],namespaces:n.namespaces?[...n.namespaces]:[],languages:n.languages?[...n.languages]:[]}:{sources:[],namespaces:[],languages:[]};var n;const o=function(e){return"highlyRelevant"!==e.category?"Relevance":e.rule.error?"Error":null!=e.rule.durationAtLeastMs?"Duration":"Relevance"}(e);let i,a,s={durationPreset:"500",customDurationMs:""},l=!1;switch(e.category){case"noisy":i=function(e){const t=e.rule.operation;if(!t)return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""};if(t.httpServer)return{operationType:"httpServer",routeType:t.httpServer.routePrefix?"routePrefix":"route",route:t.httpServer.route||t.httpServer.routePrefix||"",serverAddress:"",method:t.httpServer.method||"",kafkaTopic:""};if(t.httpClient)return{operationType:"httpClient",routeType:t.httpClient.templatedPathPrefix?"routePrefix":"route",route:t.httpClient.templatedPath||t.httpClient.templatedPathPrefix||"",serverAddress:t.httpClient.serverAddress||"",method:t.httpClient.method||"",kafkaTopic:""};return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""}}(e),a=fh(e.rule.percentageAtMost);break;case"highlyRelevant":i=yh(e.rule.operation),a=fh(e.rule.percentageAtLeast),s=function(e){if(null==e)return{durationPreset:"500",customDurationMs:""};const t=mh.find(t=>Number(t)===e);return t?{durationPreset:t,customDurationMs:""}:{durationPreset:"custom",customDurationMs:String(e)}}(e.rule.durationAtLeastMs),l=e.rule.error;break;case"costReduction":i=yh(e.rule.operation),a=fh(e.rule.percentageAtMost)}return{...t,name:e.rule.name||"",notes:e.rule.notes||"",disabled:e.rule.disabled,ruleType:o,sourceScopes:r,...i,...s,keepErrors:l,...a}}var vh;!function(e){e.Default="default",e.Action="action",e.Endpoint="endpoint",e.Scope="scope",e.Duration="duration"}(vh||(vh={}));const xh=[vh.Action,vh.Endpoint,vh.Scope,vh.Duration],$h=n.span`
|
|
871
|
-
font-family: ${({theme:e,$isMono:t})=>t?e.font_family.secondary:e.font_family.primary};
|
|
872
|
-
font-size: ${({theme:e})=>e.v2.text.size.xxs}px;
|
|
873
|
-
line-height: 20px;
|
|
874
|
-
color: ${({theme:e,$variant:t})=>{const r=e.v2.colors;switch(t){case"action":return r.green[400];case"endpoint":return r.purple[300];case"scope":return r.yellow[400];case"duration":return r.orange[600];default:return r.white[500]}}};
|
|
875
|
-
`,wh=n.span`
|
|
876
|
-
display: inline;
|
|
877
|
-
cursor: help;
|
|
878
|
-
text-decoration: underline dotted;
|
|
879
|
-
text-underline-offset: 3px;
|
|
880
|
-
`,Sh=n.div`
|
|
881
|
-
display: flex;
|
|
882
|
-
flex-direction: column;
|
|
883
|
-
gap: 4px;
|
|
884
|
-
background-color: ${({theme:e})=>e.v2.colors.black[500]};
|
|
885
|
-
border-radius: 4px;
|
|
886
|
-
padding: 8px;
|
|
887
|
-
max-width: 300px;
|
|
888
|
-
`,Ch=({items:r,children:n})=>{const{popupRef:o,popupOpen:i,setPopupOpen:a,popupPosition:s,handlePosition:l}=td({positionMode:"viewport",defaultClientHeight:48,defaultClientwidth:240}),c=e=>{l(e.clientX,e.clientY),a("mouseleave"!==e.type)};return t(wh,{onMouseEnter:c,onMouseMove:c,onMouseLeave:c,children:[n,e(Od,{ref:o,isOpen:i,top:s.top,left:s.left,asPortal:!0,style:{backgroundColor:"transparent",border:"none"},borderRadius:"0",padding:"0",maxWidth:"300px",children:e(Sh,{children:r.map((t,r)=>e(uo,{size:io.XXXS,children:t},r))})})]})},Eh=({parts:n})=>e(r,{children:n.map((n,o)=>{const i=e($h,{$variant:n.variant,$isMono:xh.includes(n.variant),children:n.text});return t(Ut,{children:[0!==o&&e(r,{children:" "}),n.tooltipItems?.length?e(Ch,{items:n.tooltipItems,children:i}):i]},`${n.variant}-${o}`)})});var kh;!function(e){e.Noisy="noisy",e.HighlyRelevant="highly-relevant",e.CostReduction="cost-reduction"}(kh||(kh={}));const Ah=[{value:kh.Noisy,label:"1. Noisy Operations",tooltip:"Rules that reduce noise from high-volume, low-value operations"},{value:kh.HighlyRelevant,label:"2. Highly Relevant Operations",tooltip:"Rules that prioritize important traces for retention"},{value:kh.CostReduction,label:"3. Cost Reduction",tooltip:"Rules that optimize costs by sampling less critical data"}],Dh={[kh.Noisy]:"This is the most efficient way to sample (with Head Sampling). Prefer to use it where possible.",[kh.HighlyRelevant]:'Any trace from the "Noisy Operations" category is sampled prior to checking highly relevance.',[kh.CostReduction]:"Cost reduction rules use Tail Sampling to drop traces that are unlikely to be useful for debugging or monitoring."},Th={[kh.Noisy]:"Noisy Operations rules list",[kh.HighlyRelevant]:"Highly Relevant Operations rules list",[kh.CostReduction]:"Cost Reduction rules list"},Ih={[kh.Noisy]:"noisy",[kh.HighlyRelevant]:"highlyRelevant",[kh.CostReduction]:"costReduction"};function Nh(e){const t=e.kind?String(e.kind).toLowerCase():"deployment";return e.namespace&&e.name?`${t} '${e.name}' in namespace '${e.namespace}'`:e.name?`${t} '${e.name}'`:e.namespace?`namespace '${e.namespace}'`:""}function Rh(e){return`namespace '${e}'`}function Oh(e){return`${e} services`}function Ph(e){const t=function(e){if(!e)return[];const t=[];for(const r of e.sources??[]){const e=Nh(r);e&&t.push(e)}for(const r of e.namespaces??[])r&&t.push(Rh(r));for(const r of e.languages??[])r&&t.push(Oh(r));return t}(e);if(!t.length)return[{text:" for ",variant:vh.Default},{text:"all services in the cluster",variant:vh.Scope}];const r=[{text:" for ",variant:vh.Default}],n=t.slice(0,2),o=t.slice(2);return n.forEach((e,t)=>{t>0&&r.push({text:", ",variant:vh.Default}),r.push({text:e,variant:vh.Scope})}),o.length>0&&r.push({text:` + ${o.length} more`,variant:vh.Default,tooltipItems:o}),r}function Fh(e,t){if(!e)return[];const r=(n=e).startsWith("/")?n.slice(1):n;var n;const o=[{text:" starting at ",variant:vh.Default}];return t?o.push({text:`${t} /${r}`,variant:vh.Endpoint}):o.push({text:`endpoint /${r}`,variant:vh.Endpoint}),o}function _h(e){const t=[];if(null!=e.percentageAtMost?(t.push({text:`Drop ${100-e.percentageAtMost}%`,variant:vh.Action}),t.push({text:" of traces",variant:vh.Default})):t.push({text:"Drop all traces",variant:vh.Action}),e.operation){const r=e.operation.httpServer?.route||e.operation.httpServer?.routePrefix,n=e.operation.httpServer?.method||e.operation.httpClient?.method;t.push(...Fh(r,n));const o=e.operation.httpClient,i=o?.templatedPath||o?.templatedPathPrefix,a=o?.serverAddress;if((i||a)&&!r){const e=i&&a?`${a}/${i}`:i||a;t.push({text:" to ",variant:vh.Default}),n?t.push({text:`${n} /${e}`,variant:vh.Endpoint}):t.push({text:`/${e}`,variant:vh.Endpoint})}}else t.push({text:" on ",variant:vh.Default}),t.push({text:"any operation",variant:vh.Endpoint});return t.push(...Ph(e.sourceScopes)),t}function Lh(e){const t=[];if(null!=e.percentageAtLeast?(t.push({text:`Keep at least ${e.percentageAtLeast}%`,variant:vh.Action}),t.push({text:" of traces",variant:vh.Default})):t.push({text:"Keep all traces",variant:vh.Action}),e.operation){const r=e.operation.httpServer?.route||e.operation.httpServer?.routePrefix,n=e.operation.httpServer?.method;t.push(...Fh(r,n))}else t.push({text:" on ",variant:vh.Default}),t.push({text:"any operation",variant:vh.Endpoint});return t.push(...Ph(e.sourceScopes)),!e.error&&null!=e.durationAtLeastMs&&e.durationAtLeastMs>0&&(t.push({text:" with duration > ",variant:vh.Default}),t.push({text:`${e.durationAtLeastMs}ms`,variant:vh.Duration})),t}function Mh(e){const t=[];if(t.push({text:`Drop ${100-e.percentageAtMost}%`,variant:vh.Action}),t.push({text:" of traces",variant:vh.Default}),e.operation){const r=e.operation.httpServer?.route||e.operation.httpServer?.routePrefix,n=e.operation.httpServer?.method;t.push(...Fh(r,n));const o=e.operation.kafkaConsumer?.kafkaTopic;o&&!r&&(t.push({text:" from ",variant:vh.Default}),t.push({text:`topic '${o}'`,variant:vh.Endpoint}))}else t.push({text:" on ",variant:vh.Default}),t.push({text:"any operation",variant:vh.Endpoint});return t.push(...Ph(e.sourceScopes)),t}function zh(e){return e.error?"Error":null!=e.durationAtLeastMs?"Duration":"Relevance"}function Bh(e,t,r){const n=Ih[t],o=[];for(const i of e)switch(t){case kh.Noisy:for(const e of i.noisyOperations)r?.has(e.ruleId)||o.push({ruleId:e.ruleId,samplingId:i.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:_h(e),category:n});break;case kh.HighlyRelevant:for(const e of i.highlyRelevantOperations)r?.has(e.ruleId)||o.push({ruleId:e.ruleId,samplingId:i.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:Lh(e),category:n,typeBadge:zh(e)});break;case kh.CostReduction:for(const e of i.costReductionRules)r?.has(e.ruleId)||o.push({ruleId:e.ruleId,samplingId:i.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:Mh(e),category:n})}return o}function Uh(e,t){switch(e){case"noisy":return _h(t);case"highlyRelevant":return Lh(t);case"costReduction":return Mh(t)}}function jh(e,t,r,n){for(const o of e)if(o.id===t)switch(n){case"noisy":{const e=o.noisyOperations.find(e=>e.ruleId===r);if(e)return{category:"noisy",samplingId:o.id,rule:e};break}case"highlyRelevant":{const e=o.highlyRelevantOperations.find(e=>e.ruleId===r);if(e)return{category:"highlyRelevant",samplingId:o.id,rule:e};break}case"costReduction":{const e=o.costReductionRules.find(e=>e.ruleId===r);if(e)return{category:"costReduction",samplingId:o.id,rule:e};break}}return null}function Wh(e,t){const r=jh(e,t.samplingId,t.rule.ruleId,t.category);return r?{...r,summary:Uh(r.category,r.rule)}:null}function Hh(e,t){const r=jh(e,t.samplingId,t.ruleId,t.category);return r?{...r,summary:t.summary}:null}function Xh(e){if(!e)return null;const t=(e.sources??[]).map(e=>`${e.namespace}/${e.kind}/${e.name}`).sort(),r=(e.namespaces??[]).slice().sort(),n=(e.languages??[]).slice().sort();return t.length||r.length||n.length?[t.join("|"),r.join("|"),n.join("|")].join("::"):null}function Gh(e){return null==e?null:e}function Kh(e,t){return JSON.stringify({sourceScopes:Xh(e),operation:Gh(t)})}function Vh(e,t,r,n){return JSON.stringify({sourceScopes:Xh(e),error:t??!1,durationAtLeastMs:(o=r,null==o?null:o),operation:Gh(n)});var o}function Jh(e,t){return JSON.stringify({sourceScopes:Xh(e),operation:Gh(t)})}function qh(e,t,r,n){switch(t){case"noisy":{const t=Kh(r.sourceScopes,r.operation);for(const r of e)for(const e of r.noisyOperations)if((!n||e.ruleId!==n)&&Kh(e.sourceScopes,e.operation)===t)return e.ruleId;return null}case"highlyRelevant":{const t=Vh(r.sourceScopes,r.error,r.durationAtLeastMs,r.operation);for(const r of e)for(const e of r.highlyRelevantOperations)if((!n||e.ruleId!==n)&&Vh(e.sourceScopes,e.error,e.durationAtLeastMs,e.operation)===t)return e.ruleId;return null}case"costReduction":{const t=Jh(r.sourceScopes,r.operation);for(const r of e)for(const e of r.costReductionRules)if((!n||e.ruleId!==n)&&Jh(e.sourceScopes,e.operation)===t)return e.ruleId;return null}}}function Yh(e){if(!e||!e.enabled)return[{text:"Auto rule is ",variant:vh.Default},{text:"disabled",variant:vh.Action}];return[{text:`Keep ${e.keepPercentage??0}%`,variant:vh.Action},{text:" of ",variant:vh.Default},{text:"traces for kubelet health probes in the entire cluster",variant:vh.Scope}]}function Qh(e){return!0===e.error&&Zp(e.sourceScopes)&&!e.operation&&(null==e.percentageAtLeast||100===e.percentageAtLeast)}function Zh(e){for(const t of e){const e=t.highlyRelevantOperations.find(Qh);if(e)return{rule:e,samplingId:t.id}}return null}function em(e){return!e||e.disabled?[{text:"Auto rule is ",variant:vh.Default},{text:"disabled",variant:vh.Action}]:[{text:"Keep all traces",variant:vh.Action},{text:" of ",variant:vh.Default},{text:"error traces across the entire cluster",variant:vh.Scope}]}function tm(e){return Zp(e.sourceScopes)&&!e.operation}function rm(e){for(const t of e){const e=t.costReductionRules.find(tm);if(e)return{rule:e,samplingId:t.id}}return null}function nm(e){return!e||e.disabled?[{text:" is ",variant:vh.Default},{text:"disabled",variant:vh.Action}]:[{text:`Drop ${100-e.percentageAtMost}%`,variant:vh.Action},{text:" of ",variant:vh.Default},{text:"traces across the entire cluster",variant:vh.Scope}]}var om;!function(e){e.Create="create",e.View="view",e.EditAutoNoisy="edit-auto-noisy",e.EditAutoCostReduction="edit-auto-cost-reduction",e.EditAutoHighlyRelevant="edit-auto-highly-relevant"}(om||(om={}));const im=Vt(null),am=["50","25","10","1"];function sm(e){const t=String(e);return am.includes(t)?t:"custom"}const lm=({category:t,sourceOptions:r=[],namespaceOptions:n=[],children:o})=>{const{formData:i,handleFormChange:a,resetFormData:s}=Fc(eh(t)),[l,c]=jt(null);Wt(()=>{s(eh(t)),c(null)},[t]);const d=Gt(e=>{c(null),a(void 0,void 0,{...i,...e})},[i,a]),u=Gt(()=>{s(eh(t)),c(null)},[t,s]),p=Xt(()=>({formType:om.Create,category:t,formData:i,handleChange:d,resetForm:u,duplicateWarning:l,setDuplicateWarning:c,sourceOptions:r,namespaceOptions:n}),[t,i,d,u,l,r,n]);return e(im.Provider,{value:p,children:o})},cm=({data:t,defaultEditMode:r,sourceOptions:n=[],namespaceOptions:o=[],children:i})=>{const[a,s]=jt(!1),{formData:l,handleFormChange:c,resetFormData:d}=Fc(void 0),u=Ht(null),[p,h]=jt(null);Wt(()=>{t!==u.current&&(u.current=t,t&&r?(d(bh(t)),h(null),s(!0)):(s(!1),h(null)))},[t,r]);const m=Gt(e=>{h(null),c(void 0,void 0,{...l,...e})},[l,c]),g=Gt(()=>{t&&(d(bh(t)),h(null),s(!0))},[t,d]),f=Gt(()=>{s(!1),h(null)},[]),y=Xt(()=>({formType:om.View,data:t,isEditing:a,formData:l,handleChange:m,handleEdit:g,handleCancelEdit:f,duplicateWarning:p,setDuplicateWarning:h,sourceOptions:n,namespaceOptions:o}),[t,a,l,m,g,f,p,n,o]);return e(im.Provider,{value:y,children:i})};function dm(e){const[t,r]=jt(()=>0===e?"all":"sample"),[n,o]=jt(()=>sm(e)),[i,a]=jt(()=>"custom"===sm(e)?String(e):"");Wt(()=>{r(0===e?"all":"sample");const t=sm(e);o(t),a("custom"===t?String(e):"")},[e]);const s=Xt(()=>"all"===t?0:"custom"===n?Number(i)||0:Number(n),[t,n,i]);return{percentageMode:t,setPercentageMode:r,percentagePreset:n,setPercentagePreset:o,customPercentage:i,setCustomPercentage:a,resolvedPercentage:s}}const um=({enabled:t,keepPercentage:r,children:n})=>{const[o,i]=jt(t),a=dm(r);Wt(()=>{i(t)},[t]);const s=Xt(()=>Yh({enabled:o,keepPercentage:a.resolvedPercentage}),[o,a.resolvedPercentage]),l=Xt(()=>({formType:om.EditAutoNoisy,localEnabled:o,setLocalEnabled:i,...a,summary:s}),[o,a,s]);return e(im.Provider,{value:l,children:n})},pm=({enabled:t,dropPercentage:r,children:n})=>{const[o,i]=jt(t),a=dm(r);Wt(()=>{i(t)},[t]);const s=Xt(()=>nm(o?{disabled:!1,percentageAtMost:a.resolvedPercentage}:null),[o,a.resolvedPercentage]),l=Xt(()=>({formType:om.EditAutoCostReduction,localEnabled:o,setLocalEnabled:i,...a,summary:s}),[o,a,s]);return e(im.Provider,{value:l,children:n})},hm=({enabled:t,children:r})=>{const[n,o]=jt(t);Wt(()=>{o(t)},[t]);const i=Xt(()=>em(n?{disabled:!1}:null),[n]),a=Xt(()=>({formType:om.EditAutoHighlyRelevant,localEnabled:n,setLocalEnabled:o,summary:i}),[n,i]);return e(im.Provider,{value:a,children:r})},mm=t=>{switch(t.formType){case om.Create:return e(lm,{...t});case om.View:return e(cm,{...t});case om.EditAutoNoisy:return e(um,{...t});case om.EditAutoCostReduction:return e(pm,{...t});case om.EditAutoHighlyRelevant:return e(hm,{...t})}};function gm(e){const t=Kt(im);if(!t)throw new Error("useSamplingRulesFormContext must be used within a SamplingRulesFormProvider");if(e&&t.formType!==e)throw new Error(`Expected formType "${e}" but found "${t.formType}"`);return t}const fm=Vt({snapshots:null,setSnapshots:()=>{},isFetching:!1,setIsFetching:()=>{},formData:[],handleSourceChange:()=>{},handleSelectAll:()=>{},formDiff:{},isFormDirty:!1}),ym=({children:t,selectedConnectionIds:r,initialInputs:n})=>{const{tier:o}=ld(),i=o===_r.Onprem,{selectedStreamName:a}=Jl(),[s,l]=jt(!1),[c,d]=jt(null),[u,p]=jt([]);Wt(()=>{c&&p(e=>{const t=((e,t)=>xr(((e,t)=>e.clusters.filter(({clusterId:e})=>!t||t.includes(e)))(e,t)))(c,r);return t.map(t=>{const r=e?.find(e=>e.clusterId===t.clusterId),o=r??t;if(n?.[t.clusterId]){const e=n[t.clusterId],r=xr(o);return e.forEach(e=>{const t=r.namespaces.find(t=>t.name===e.namespace);if(t)if(e.name&&e.kind){const r=t.workloads.find(t=>t.name===e.name&&t.kind===e.kind);r&&(r.selected=e.selected)}else t.selected=e.selected,e.selected&&t.workloads.forEach(e=>{cd.has(e.kind)&&!i||(e.selected=!0)})}),r}return o})})},[c,r,n]);const{formDiff:h,isFormDirty:m}=Xt(()=>{const e=((e,t,r)=>{const n={};return e.forEach(e=>{e.namespaces.forEach(o=>{const i=t.find(t=>t.clusterId===e.clusterId)?.namespaces.find(e=>e.name===o.name),a=o.selected||!1;if(a!==i?.selected)n[e.clusterId]||(n[e.clusterId]=[]),n[e.clusterId].push({namespace:o.name,selected:a,currentStreamName:r}),a?n[e.clusterId]=n[e.clusterId].filter(e=>e.namespace!==o.name||e.namespace===o.name&&(!e.name||!e.kind)):o.workloads.forEach(t=>{t.selected&&n[e.clusterId].push({namespace:o.name,name:t.name,kind:t.kind,selected:!0,currentStreamName:r})});else{const t=((e,t,r)=>{const n=[];return t.workloads.forEach(o=>{const i=e?.workloads.find(e=>e.name===o.name&&e.kind===o.kind);o.selected!==i?.selected&&n.push({namespace:t.name,name:o.name,kind:o.kind,selected:o.selected||!1,currentStreamName:r})}),n})(i,o,r);t.length>0&&(n[e.clusterId]||(n[e.clusterId]=[]),n[e.clusterId].push(...t))}})}),n})(u,c?.clusters||[],a);return{formDiff:e,isFormDirty:Object.keys(e).length>0}},[u,c,a]),g=Gt(e=>!i&&cd.has(e),[i]),f=Gt(({clusterId:e,workloadId:t,selected:r,auto:n})=>{p(o=>{const i=xr(o),a=i.findIndex(t=>t.clusterId===e);if(-1===a)return i;const s=i[a].namespaces.findIndex(e=>e.name===t.namespace);if(-1===s)return i;if(t.kind&&t.name){const e=i[a].namespaces[s].workloads.findIndex(e=>e.name===t.name&&e.kind===t.kind);if(-1===e)return i;const n="boolean"==typeof r?r:!i[a].namespaces[s].workloads[e].selected;if(i[a].namespaces[s].workloads[e].selected=n,n){i[a].namespaces[s].workloads.filter(e=>!g(e.kind)).every(e=>e.selected)&&(i[a].namespaces[s].selected=!0)}else i[a].namespaces[s].selected=!1}else{const e="boolean"==typeof n?n:!i[a].namespaces[s].selected;i[a].namespaces[s].selected=e,e?i[a].namespaces[s].workloads.forEach(e=>{g(e.kind)||(e.selected=!0)}):"boolean"!=typeof r||r||i[a].namespaces[s].workloads.forEach(e=>{e.selected=!1})}return i})},[g]),y=Gt(({clusterId:e,namespaceName:t,boolean:r,searchText:n="",searchBy:o="",filters:i})=>{p(a=>{const s=xr(a),l=o===Ur.Namespace?n:"",c=o===Ur.Source?n:"",d=!!l||!!c||!!i?.showOnlySelected;return s.forEach((n,o)=>{e&&n.clusterId!==e||n.namespaces.forEach(({name:e,workloads:n},a)=>{if(!t||e===t)if(d)if(t){n.forEach((e,t)=>{r&&g(e.kind)||pd(e,c,i||{showOnlySelected:!1})&&(s[o].namespaces[a].workloads[t].selected=r)});const e=s[o].namespaces[a].workloads.filter(e=>!g(e.kind)).every(e=>e.selected);s[o].namespaces[a].selected=e}else{if(!ud(s[o].namespaces[a],l,i||{showOnlySelected:!1}))return;s[o].namespaces[a].selected=r,n.forEach((e,t)=>{r&&g(e.kind)||(s[o].namespaces[a].workloads[t].selected=r)})}else s[o].namespaces[a].selected=r,n.forEach((e,t)=>{r&&g(e.kind)||(s[o].namespaces[a].workloads[t].selected=r)})})}),s})},[g]);return e(fm.Provider,{value:{snapshots:c,setSnapshots:d,isFetching:s,setIsFetching:l,formData:u,handleSourceChange:f,handleSelectAll:y,formDiff:h,isFormDirty:m},children:t})},bm=()=>Kt(fm),vm=Vt({formType:void 0}),xm=({children:t,formType:r})=>{const n=Xt(()=>({formType:r}),[r]);return e(vm.Provider,{value:n,children:t})},$m=()=>Kt(vm),wm=n.div`
|
|
889
|
-
display: flex;
|
|
890
|
-
|
|
891
|
-
align-items: center;
|
|
892
|
-
gap: 6px;
|
|
893
|
-
margin-bottom: 4px;
|
|
894
|
-
`,Sm=n(Pc)`
|
|
895
|
-
font-size: 14px;
|
|
896
|
-
opacity: 0.8;
|
|
897
|
-
line-height: 22px;
|
|
898
|
-
overflow: hidden;
|
|
899
|
-
white-space: nowrap;
|
|
900
|
-
text-overflow: ellipsis;
|
|
901
|
-
color: ${({$status:e,theme:t})=>e?t.text[e]:t.text.secondary};
|
|
902
|
-
`,Cm=n(Pc)`
|
|
903
|
-
font-size: 12px;
|
|
904
|
-
color: ${({theme:e})=>e.text.darker_grey};
|
|
905
|
-
opacity: 0.8;
|
|
906
|
-
`,Em=({title:r,required:n,tooltip:o,style:i,status:a})=>r?e(wm,{style:i,children:t(Bd,{text:o,withIcon:!0,children:[e(Sm,{$status:a,children:r}),!n&&e(Cm,{children:"(optional)"})]})}):null,km=n.div`
|
|
907
|
-
display: flex;
|
|
908
|
-
flex-direction: column;
|
|
909
|
-
position: relative;
|
|
910
|
-
width: 100%;
|
|
911
|
-
`,Am=n.div`
|
|
912
|
-
width: 100%;
|
|
913
|
-
display: flex;
|
|
914
|
-
align-items: center;
|
|
915
|
-
height: 36px;
|
|
916
|
-
gap: 12px;
|
|
917
|
-
transition: border-color 0.3s;
|
|
918
|
-
border-radius: 32px;
|
|
919
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
920
|
-
${({$disabled:e})=>e&&o`
|
|
921
|
-
cursor: not-allowed;
|
|
922
|
-
opacity: 0.6;
|
|
923
|
-
`}
|
|
924
|
-
${({$isActive:e,$hasError:t,$status:r})=>e?o`
|
|
925
|
-
border-color: ${({theme:e})=>e.colors.secondary};
|
|
926
|
-
`:t?o`
|
|
927
|
-
border-color: ${({theme:e})=>e.text.error};
|
|
928
|
-
`:r?o`
|
|
929
|
-
border-color: ${({theme:e})=>e.text[r]};
|
|
930
|
-
`:""}
|
|
931
|
-
&:hover {
|
|
932
|
-
border-color: ${({theme:e})=>e.colors.secondary};
|
|
933
|
-
}
|
|
934
|
-
&:focus-within {
|
|
935
|
-
border-color: ${({theme:e})=>e.colors.secondary};
|
|
936
|
-
}
|
|
937
|
-
`,Dm=n.input`
|
|
938
|
-
padding-left: ${({$hasIcon:e})=>e?"0":"16px"};
|
|
939
|
-
flex: 1;
|
|
940
|
-
min-width: 150px;
|
|
941
|
-
width: 100%;
|
|
942
|
-
border: none;
|
|
943
|
-
outline: none;
|
|
944
|
-
background: none;
|
|
945
|
-
color: ${({theme:e})=>e.text.secondary};
|
|
946
|
-
font-size: 14px;
|
|
947
|
-
font-family: ${({theme:e})=>e.font_family.primary};
|
|
948
|
-
font-weight: 300;
|
|
949
|
-
&::placeholder {
|
|
950
|
-
color: ${({theme:e})=>e.text.secondary};
|
|
951
|
-
font-family: ${({theme:e})=>e.font_family.primary};
|
|
952
|
-
opacity: 0.4;
|
|
953
|
-
font-size: 14px;
|
|
954
|
-
font-weight: 300;
|
|
955
|
-
line-height: 22px; /* 157.143% */
|
|
956
|
-
}
|
|
957
|
-
&:disabled {
|
|
958
|
-
cursor: not-allowed;
|
|
959
|
-
opacity: 0.6;
|
|
960
|
-
}
|
|
961
|
-
&::-webkit-inner-spin-button,
|
|
962
|
-
&::-webkit-outer-spin-button {
|
|
963
|
-
-webkit-appearance: none;
|
|
964
|
-
margin: 0;
|
|
965
|
-
}
|
|
966
|
-
`,Tm=n.div`
|
|
967
|
-
display: flex;
|
|
968
|
-
align-items: center;
|
|
969
|
-
margin-left: 12px;
|
|
970
|
-
`,Im=n(Tm)`
|
|
971
|
-
cursor: pointer;
|
|
972
|
-
`,Nm=n.button`
|
|
973
|
-
background-color: ${({theme:e})=>e.colors.primary};
|
|
974
|
-
border: none;
|
|
975
|
-
color: ${({theme:e})=>e.text.secondary};
|
|
976
|
-
padding: 8px 16px;
|
|
977
|
-
border-radius: 20px;
|
|
978
|
-
cursor: pointer;
|
|
979
|
-
margin-left: 8px;
|
|
980
|
-
&:hover {
|
|
981
|
-
background-color: ${({theme:e})=>e.colors.secondary};
|
|
982
|
-
}
|
|
983
|
-
&:disabled {
|
|
984
|
-
background-color: ${({theme:e})=>e.colors.border};
|
|
985
|
-
cursor: not-allowed;
|
|
986
|
-
}
|
|
987
|
-
`,Rm=({icon:r,buttonLabel:n,onButtonClick:o,hasError:a,errorMessage:s,title:l,tooltip:c,required:d,value:u,onChange:p,type:h=Hr.Text,name:m,status:g,...f})=>{const y=i(),b=h===Hr.Password,[v,x]=jt(!1);return t(km,{children:[e(Em,{title:l,required:d,tooltip:c,status:g}),t(Am,{$disabled:f.disabled,$hasError:a||!!s,$isActive:!!f.autoFocus,$status:g,children:[b?e(Im,{onClick:()=>x(e=>!e),children:e(v?At:Dt,{size:14,fill:y.text.grey})}):r?e(Tm,{children:e(r,{size:14,fill:y.text.grey})}):null,e(Dm,{"data-id":m,type:v||h===Hr.Number?Hr.Text:h,$hasIcon:!!r||b,name:m,value:u,onChange:e=>{e.stopPropagation(),h===Hr.Number&&(e.target.value=mi(e.target.value)),p?.(e)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},...f}),n&&o&&e(Nm,{onClick:o,disabled:f.disabled,children:n})]}),!!s&&e(du,{children:s})]})},Om=n.div`
|
|
988
|
-
display: flex;
|
|
989
|
-
flex-direction: column;
|
|
990
|
-
min-width: 120px;
|
|
991
|
-
width: 100%;
|
|
992
|
-
opacity: ${({$disabled:e})=>e?.5:1};
|
|
993
|
-
`,Pm=n.div`
|
|
994
|
-
position: relative;
|
|
995
|
-
`,Fm=n.div`
|
|
996
|
-
display: flex;
|
|
997
|
-
align-items: center;
|
|
998
|
-
justify-content: space-between;
|
|
999
|
-
height: 36px;
|
|
1000
|
-
padding: ${({$isMulti:e,$hasSelections:t})=>e&&t?"0 16px 0 6px":"0 16px"};
|
|
1001
|
-
border-radius: 32px;
|
|
1002
|
-
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1003
|
-
|
|
1004
|
-
${({$isOpen:e,$isMulti:t,theme:r})=>e&&!t?o`
|
|
1005
|
-
border: 1px solid ${r.text.grey};
|
|
1006
|
-
background: ${r.colors.dropdown_bg_2};
|
|
1007
|
-
`:o`
|
|
1008
|
-
border: 1px solid ${r.colors.border};
|
|
1009
|
-
background: transparent;
|
|
1010
|
-
`};
|
|
1011
|
-
|
|
1012
|
-
${({$hasError:e,$status:t})=>e?o`
|
|
1013
|
-
border-color: ${({theme:e})=>e.text.error};
|
|
1014
|
-
`:t?o`
|
|
1015
|
-
border-color: ${({theme:e})=>e.text[t]};
|
|
1016
|
-
`:""}
|
|
1017
|
-
|
|
1018
|
-
&:hover {
|
|
1019
|
-
border-color: ${({$isMulti:e,$hasSelections:t,$disabled:r,theme:n})=>r?"auto":e&&t?n.colors.border:n.colors.secondary};
|
|
1020
|
-
}
|
|
1021
|
-
`,_m=n.div`
|
|
1022
|
-
display: flex;
|
|
1023
|
-
align-items: center;
|
|
1024
|
-
gap: 4px;
|
|
1025
|
-
`,Lm=({options:r,value:n,onSelect:o,onDeselect:i,title:a,tooltip:s,placeholder:l,disabled:c=!1,isMulti:d=!1,showSearch:u=!1,required:p=!1,errorMessage:h,hasError:m=!1,status:g})=>{const[f,y]=jt(!1),[b,v]=jt(!1),x=Ht(null);Zc(x,()=>y(!1));const $=()=>{(()=>{if(x.current){const e=x.current.getBoundingClientRect().bottom+300>window.innerHeight;v(e)}})(),y(e=>!e)},w=Array.isArray(n)?n.length:0;return t(Om,{$disabled:c,children:[e(Em,{title:a,required:p,tooltip:s,status:g}),t(Pm,{ref:x,children:[t(Fm,{$isOpen:f,$isMulti:d,$hasSelections:!!Array.isArray(n)&&!!n.length,$hasError:!!h||m,$status:g,$disabled:c,onClick:()=>!c&&$(),children:[e(Um,{value:n,placeholder:l,onDeselect:i}),t(_m,{children:[d&&e(Ec,{label:w,filled:!!w}),e(Nu,{extend:f})]})]}),f&&e(Hm,{openUpwards:b,options:r,value:n,onSelect:e=>{o?.(e),d||$()},onDeselect:e=>{i?.(e),d||$()},isMulti:d,showSearch:u})]}),!!h&&e(du,{children:h})]})},Mm=n(_m)`
|
|
1026
|
-
max-width: calc(100% - 50px);
|
|
1027
|
-
overflow-x: auto;
|
|
1028
|
-
`,zm=n(Pc)`
|
|
1029
|
-
display: flex;
|
|
1030
|
-
align-items: center;
|
|
1031
|
-
gap: 2px;
|
|
1032
|
-
padding: 4px 12px;
|
|
1033
|
-
background: ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
1034
|
-
border-radius: 360px;
|
|
1035
|
-
white-space: nowrap;
|
|
1036
|
-
text-overflow: ellipsis;
|
|
1037
|
-
img {
|
|
1038
|
-
&:hover {
|
|
1039
|
-
transform: scale(2);
|
|
1040
|
-
transition: transform 0.3s;
|
|
1041
|
-
}
|
|
1042
|
-
}
|
|
1043
|
-
`,Bm=n(Pc)``,Um=({value:r,placeholder:n,onDeselect:o})=>{const a=i();return Array.isArray(r)?r.length?e(Mm,{children:r.map(r=>t(zm,{size:14,children:[r.value,e(Dd,{orientation:"vertical",length:"10px",margin:"0 4px"}),e(vt,{size:12,onClick:e=>{e.stopPropagation(),o?.(r)}})]},`multi-label-${r.id}`))}):e(Bm,{size:14,color:a.text.darker_grey,children:n}):e(Bm,{size:14,color:r?.value?void 0:a.text.darker_grey,children:r?.value||n})},jm=n.div`
|
|
1044
|
-
position: absolute;
|
|
1045
|
-
${({$openUpwards:e})=>e?"bottom":"top"}: calc(100% + 8px);
|
|
1046
|
-
left: 0;
|
|
1047
|
-
z-index: 1;
|
|
1048
|
-
display: flex;
|
|
1049
|
-
flex-direction: column;
|
|
1050
|
-
overflow-y: auto;
|
|
1051
|
-
width: calc(100% - 16px);
|
|
1052
|
-
max-height: 200px;
|
|
1053
|
-
gap: 8px;
|
|
1054
|
-
padding: 8px;
|
|
1055
|
-
background-color: ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
1056
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
1057
|
-
border-radius: 24px;
|
|
1058
|
-
`,Wm=n.div`
|
|
1059
|
-
display: flex;
|
|
1060
|
-
flex-direction: column;
|
|
1061
|
-
align-items: center;
|
|
1062
|
-
`,Hm=({openUpwards:r,options:n,value:o,onSelect:i,onDeselect:a,isMulti:s,showSearch:l})=>{const[c,d]=jt(""),u=n.filter(e=>e.value?.toLowerCase().includes(c?.toLowerCase()));return t(jm,{$openUpwards:r,children:[l&&t(Wm,{children:[e(Rm,{placeholder:"Search...",icon:Tt,value:c,onChange:e=>d(e.target.value)}),e(Dd,{thickness:1,margin:"8px 0 0 0"})]}),0===u.length?e(fp,{subTitle:l&&c?void 0:" "}):u.map((t,r)=>e(Gm,{option:t,value:o,isMulti:s,onSelect:i,onDeselect:a},`dropdown-option-${t.id||r}`))]})},Xm=n.div`
|
|
1063
|
-
padding: 8px 12px;
|
|
1064
|
-
cursor: pointer;
|
|
1065
|
-
display: flex;
|
|
1066
|
-
justify-content: space-between;
|
|
1067
|
-
align-items: center;
|
|
1068
|
-
border-radius: 32px;
|
|
1069
|
-
&:hover,
|
|
1070
|
-
&.selected {
|
|
1071
|
-
background: ${({theme:e})=>e.colors.majestic_blue+fc["024"]};
|
|
1072
|
-
}
|
|
1073
|
-
`,Gm=({option:r,value:n,isMulti:o,onSelect:a,onDeselect:s})=>{const l=i(),c=Array.isArray(n)?!!n?.find(e=>e.id===r.id):n?.id===r.id,d=e=>e?a?.(r):s?.(r);return o?e(Xm,{className:c?"selected":"",onClick:()=>d(!c),children:e(hu,{title:r.value||"",titleColor:l.text.secondary,value:c,onChange:d,style:{width:"100%"}})}):t(Xm,{className:c?"selected":"",onClick:()=>c?s?.(r):a?.(r),children:[t(Oo,{$gap:8,children:[r.icon&&e(r.icon,{}),e(Pc,{size:14,children:r.value})]}),c&&e(yt,{})]})},Km=n(Po)`
|
|
1074
|
-
gap: 12px;
|
|
1075
|
-
`,Vm=n(Oo)`
|
|
1076
|
-
width: 100%;
|
|
1077
|
-
gap: 12px;
|
|
1078
|
-
align-items: flex-end;
|
|
1079
|
-
`,Jm=({clientX:r=0,flipX:n,clientY:o=0,flipY:a,isOpen:s,onClose:l,onSave:c,withDelete:d,onDelete:u,title:p,titleTooltip:h,warning:m,children:g})=>{const f=i(),{popupRef:y,popupPosition:b,handlePosition:v}=td({onClickOutside:l});return Yc({key:"Enter",active:s},c),Wt(()=>v(r,o),[r,o]),0===b.top&&0!==o||0===b.left&&0!==r?null:e(Od,{ref:y,isOpen:s,top:a?void 0:b.top,bottom:a?b.top:void 0,left:n?void 0:b.left,right:n?b.left:void 0,padding:"24px",children:t(Km,{children:[e(Bd,{text:h,withIcon:!0,children:e(Pc,{size:14,children:p})}),t(Vm,{children:[g,t(Oo,{$gap:6,children:[e(Wd,{withBorder:!0,onClick:l,tooltip:"Cancel",children:e(vt,{})}),e(Wd,{withBorder:!0,backgroundColor:f.colors.secondary,onClick:c,tooltip:"Save",children:e(yt,{fill:f.text.primary})}),d&&e(Wd,{onClick:u,tooltip:"Undo",children:e(It,{})})]})]}),m&&e(Qd,{type:Xr.Warning,message:m})]})})},qm=n.div`
|
|
1080
|
-
position: relative;
|
|
1081
|
-
`,Ym=({defaultLanguage:r=zr.Unknown,defaultVersion:n="",defaultOtelDistroName:o=null,handleSave:i})=>{const{tier:a}=ld(),{addNotification:s}=tc(),{formData:l,handleFormChange:c,resetFormData:d}=Fc({language:r,version:n,otelDistroName:o}),[u,p]=jt(!1),h=()=>{p(!1),d()},m=Xt(()=>{if(!l.language)return[];const e=Xl[l.language].community,t=a===_r.Onprem?Xl[l.language].enterprise:[];return e.concat(t)},[l.language,a]);return t(qm,{children:[e(Wd,{tooltip:kn.OVERRIDE_RUNTIME_DETAILS,size:32,onClick:()=>{p(!0)},children:e(Nt,{})}),e(Jm,{flipX:!0,clientX:36,isOpen:u,onClose:h,onSave:async()=>{!l.version||li(l.version)?(await i({...l}),h()):s({type:Xr.Warning,message:En.INVALID_VERSION,hideFromHistory:!0})},withDelete:!0,onDelete:async()=>{await i({language:null,version:"",otelDistroName:null}),h()},title:kn.OVERRIDE_RUNTIME_DETAILS,warning:kn.OVERRIDE_RUNTIME_WARNING,children:t(Po,{$gap:12,children:[t(Oo,{$gap:12,children:[e(Lm,{title:kn.LANGUAGE,options:Wl,value:Wl.find(e=>e.id===l.language),onSelect:e=>{c("language",e.id),c("version",""),c("otelDistroName",null)},required:!0}),e(Rm,{title:kn.RUNTIME_VERSION,placeholder:kn.VERSION_PLACEHOLDER,value:l.version,onChange:e=>c("version",e.target.value),required:!1})]}),l.language&&e(Lm,{title:"Otel Distro Name",options:m,value:m.find(e=>e.id===l.otelDistroName),onSelect:e=>c("otelDistroName",e.id),required:!1})]})})]})},Qm=n(Oo)`
|
|
1082
|
-
width: 100%;
|
|
1083
|
-
justify-content: center;
|
|
1084
|
-
`,Zm=({containerName:n,runtimeInfo:o,agentEnabled:a,overrides:s,callbackRuntimeOverride:l})=>{const c=i(),d=s?.runtimeInfo??o,u=d?.language??zr.Unknown,p=d?.runtimeVersion??"",h=null!=s?.runtimeInfo,m=a?.agentEnabled??!1,g=a?.agentEnabledStatus?.message??"",f=a?.otelDistroName??null,y=m?Xr.Success:g?Xr.Info:Xr.Warning,b=m?Gr.INSTRUMENTED:g?Gr.NOT_INSTRUMENTED:Gr.INSTRUMENTING;return e(sp,{title:n,subTitle:`${u?jl[u]:"no runtime info"}`+(p?` • Runtime Version: ${p}`:""),iconProps:{icon:_n(u)},extendableProps:{isExtended:!!g,renderExtended:()=>e(Qm,{children:e(Pc,{size:12,family:"secondary",color:c.text.info,children:ci(g)})})},renderActions:()=>t(r,{children:[e(ju,{status:y,title:b,subtitle:f||void 0,withIcon:!0,withBorder:!0}),h&&e(ju,{status:Xr.Default,forceIcon:Rt,title:kn.OVERIDDEN,withIcon:!0,withBorder:!0}),l&&e(Ym,{defaultLanguage:u,defaultVersion:p??"",defaultOtelDistroName:f,handleSave:e=>l({...e,containerName:n})})]})})};var eg;!function(e){e.Code="code",e.Badge="badge",e.Loader="loader",e.Divider="divider",e.Monitors="monitors",e.CopyText="copy-text",e.ActiveStatus="active-status"}(eg||(eg={}));const tg=n.div`
|
|
1085
|
-
display: flex;
|
|
1086
|
-
flex-wrap: wrap;
|
|
1087
|
-
gap: 16px 32px;
|
|
1088
|
-
width: 100%;
|
|
1089
|
-
`,rg=n.div`
|
|
1090
|
-
display: flex;
|
|
1091
|
-
flex-direction: column;
|
|
1092
|
-
gap: 2px;
|
|
1093
|
-
width: ${({$width:e})=>e};
|
|
1094
|
-
`,ng=n(Pc)`
|
|
1095
|
-
color: ${({theme:e})=>e.text.grey};
|
|
1096
|
-
font-size: 10px;
|
|
1097
|
-
line-height: 16px;
|
|
1098
|
-
`,og=n(Pc)`
|
|
1099
|
-
font-size: 12px;
|
|
1100
|
-
white-space: pre-wrap;
|
|
1101
|
-
`,ig=({data:r})=>e(tg,{children:r?.map(({type:r,title:n,titleIcon:o,tooltip:i,value:a},s)=>t(rg,{$width:r&&[eg.Code].includes(r)?"inherit":r&&[eg.Loader,eg.Divider,eg.CopyText].includes(r)?"100%":"unset",children:[e(Bd,{text:i,withIcon:!0,children:t(Oo,{$alignItems:"center",$gap:4,children:[o&&e(o,{size:14}),!!n&&e(ng,{transform:"capitalize",children:n})]})}),e(ag,{type:r,value:a})]},`data-field-${n||(a?JSON.stringify(a):s)}`))}),ag=({type:t,value:r})=>{const n=i();switch(t){case eg.Divider:return e(Dd,{length:"100%",margin:"0"});case eg.Loader:return e(Fo,{children:e(Tu,{scale:1.2})});case eg.Monitors:return e(tp,{monitors:r?.split(", ")||[],withLabels:!0,color:n.colors.secondary});case eg.Badge:{const{label:t,filled:n,...o}=Zo(r,{label:"-",filled:!1});return e(Ec,{label:t,filled:n,...o})}case eg.Code:{const{language:t,code:n,...o}=Zo(r,{language:"",code:""});return e(Su,{language:t,code:n,...o})}case eg.ActiveStatus:return e(ju,{status:"true"==r?Xr.Success:Xr.Error,title:"true"==r?kn.ENABLED:kn.DISABLED,size:10,withIcon:!0,withBorder:!0});case eg.CopyText:{const t="string"==typeof r?r:JSON.stringify(r);return e(Xu,{value:t})}default:return e(og,{children:fi("string"==typeof r?r||"-":"")})}},sg=n.div`
|
|
1102
|
-
display: flex;
|
|
1103
|
-
flex-direction: column;
|
|
1104
|
-
align-items: flex-start;
|
|
1105
|
-
align-self: stretch;
|
|
1106
|
-
gap: 16px;
|
|
1107
|
-
padding: 24px;
|
|
1108
|
-
border-radius: 24px;
|
|
1109
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
1110
|
-
background-color: ${({theme:e,$hovered:t})=>t?e.colors.secondary+fc["010"]:"transparent"};
|
|
1111
|
-
transition: background-color 0.3s;
|
|
1112
|
-
`,lg=n.div`
|
|
1113
|
-
width: 100%;
|
|
1114
|
-
display: flex;
|
|
1115
|
-
flex-direction: column;
|
|
1116
|
-
gap: 4px;
|
|
1117
|
-
cursor: ${({$clickable:e})=>e?"pointer":"default"};
|
|
1118
|
-
`,cg=n(Pc)`
|
|
1119
|
-
width: 100%;
|
|
1120
|
-
display: flex;
|
|
1121
|
-
align-items: center;
|
|
1122
|
-
gap: 8px;
|
|
1123
|
-
font-size: 16px;
|
|
1124
|
-
`,dg=n(Pc)`
|
|
1125
|
-
font-size: 12px;
|
|
1126
|
-
color: ${({theme:e})=>e.text.grey};
|
|
1127
|
-
`,ug=n(Oo)`
|
|
1128
|
-
margin-left: auto;
|
|
1129
|
-
gap: 8px;
|
|
1130
|
-
`,pg=({title:r="Details",titleBadge:n,titleIcon:o,description:i,action:a,withExtend:s,initialExtended:l=!1,data:c,children:d})=>{const[u,p]=jt(l),[h,m]=jt(!1);return t(sg,{$hovered:h,children:[r||o||i||a?t(lg,{$clickable:s||!1,onClick:()=>s&&p(e=>!e),onMouseEnter:()=>s&&m(!0),onMouseLeave:()=>s&&m(!1),children:[t(Oo,{children:[t(Oo,{$alignItems:"center",$gap:8,children:[o&&e(Oo,{$alignItems:"center",children:e(o,{size:20})}),!!r&&e(cg,{transform:"capitalize",children:r}),n===Kr.Loading?e(Tu,{}):void 0!==n&&e(Ec,{label:n})]}),(!!a||s)&&t(ug,{children:["function"==typeof a?e(a,{hovered:h}):a,s&&e(Nu,{extend:u})]})]}),!!i&&e(dg,{children:i})]}):null,(!s||s&&u)&&(d||e(ig,{data:c}))]})},hg=({isOpen:t,noOverlay:r,name:n,type:o,isLastItem:i,onApprove:a,onDeny:s})=>{const l=o===Ur.Source?"uninstrument":"delete";return e(au,{isOpen:t,noOverlay:r,title:`${l.charAt(0).toUpperCase()+l.substring(1)}${n?` ${n}`:""}`,description:`Are you sure you want to ${l}?`,note:i?{type:Xr.Warning,title:`You're about to ${l} the last ${o||n}`,message:""}:void 0,approveButton:{text:"Confirm",variant:"danger",onClick:a},denyButton:{text:"Go Back",onClick:s}})},mg=n(Oo)`
|
|
1131
|
-
border-bottom: ${({$hideBorder:e,theme:t})=>e?"none":`1px solid ${t.colors.border}`};
|
|
1132
|
-
`,gg=n.div`
|
|
1133
|
-
display: flex;
|
|
1134
|
-
align-items: center;
|
|
1135
|
-
border-bottom: 2px solid ${({theme:e,$selected:t})=>t?e.colors.majestic_blue:"transparent"};
|
|
1136
|
-
cursor: pointer;
|
|
1137
|
-
`,fg=n(Pc)`
|
|
1138
|
-
padding: 12px;
|
|
1139
|
-
font-size: 14px;
|
|
1140
|
-
color: ${({theme:e,$selected:t})=>t?e.text.secondary:e.text.grey};
|
|
1141
|
-
`,yg=({tabs:r,hideBorder:n=!1})=>r?.length?e(mg,{$hideBorder:n,children:r.map(({label:r,icon:n,onClick:o,selected:i})=>t(gg,{onClick:o,$selected:i,children:[e(fg,{$selected:i,children:r}),n&&e(n,{})]},`tab-${r}`))}):null,bg=n.section`
|
|
1142
|
-
padding: 0px 32px;
|
|
1143
|
-
border-bottom: 1px solid ${({theme:e})=>e.colors.border};
|
|
1144
|
-
`,vg=n.div`
|
|
1145
|
-
height: 76px;
|
|
1146
|
-
display: flex;
|
|
1147
|
-
justify-content: space-between;
|
|
1148
|
-
flex-shrink: 0;
|
|
1149
|
-
align-self: stretch;
|
|
1150
|
-
`,xg=n.div`
|
|
1151
|
-
display: flex;
|
|
1152
|
-
align-items: center;
|
|
1153
|
-
gap: ${({$gap:e})=>e||16}px;
|
|
1154
|
-
`,$g=n(Pc)`
|
|
1155
|
-
font-size: 18px;
|
|
1156
|
-
line-height: 26px;
|
|
1157
|
-
max-width: ${({$maxWidth:e})=>e};
|
|
1158
|
-
overflow: hidden;
|
|
1159
|
-
white-space: nowrap;
|
|
1160
|
-
text-overflow: ellipsis;
|
|
1161
|
-
`,wg=n(Tc)`
|
|
1162
|
-
gap: 8px;
|
|
1163
|
-
`,Sg=n(Tc)``,Cg=({onClose:r,width:n,icons:o,iconSrcs:i,title:a,titleTooltip:s,replaceTitleWith:l,actions:c,actionButtons:d=[],tabs:u})=>t(bg,{children:[t(vg,{children:[t(xg,{children:[o?.length||i?.length?e(Zu,{icons:o,iconSrcs:i,id:`drawer-header-${a}`}):null,("function"==typeof l?e(l,{}):l||null)||e(Bd,{text:s||a,withIcon:!!s,children:a&&e($g,{$maxWidth:`calc(${n} ${c||d.length?"/ 5":"- 192px"})`,children:a})})]}),t(xg,{$gap:2,children:[c,d.map((t,r)=>e(wg,{...t},`header-action-button-${r}`)),e(Sg,{"data-id":"drawer-close",variant:"secondary",onClick:r,children:e(vt,{size:12})})]})]}),e(yg,{tabs:u,hideBorder:!0})]}),Eg=n.div`
|
|
1164
|
-
display: flex;
|
|
1165
|
-
justify-content: space-between;
|
|
1166
|
-
gap: 8px;
|
|
1167
|
-
padding: 24px 18px 24px 32px;
|
|
1168
|
-
border-top: 1px solid ${({theme:e})=>e.colors.border};
|
|
1169
|
-
background-color: ${({theme:e})=>e.colors.translucent_bg};
|
|
1170
|
-
transform: translateY(100%);
|
|
1171
|
-
animation-name: ${bc.in.bottom};
|
|
1172
|
-
`,kg=n(Oo)`
|
|
1173
|
-
margin-right: auto;
|
|
1174
|
-
`,Ag=n(Oo)`
|
|
1175
|
-
margin: 0 auto;
|
|
1176
|
-
`,Dg=n(Oo)`
|
|
1177
|
-
margin-left: auto;
|
|
1178
|
-
`,Tg=n(Tc)`
|
|
1179
|
-
min-width: 140px;
|
|
1180
|
-
font-size: 14px;
|
|
1181
|
-
`,Ig=({isOpen:r,leftButtons:n=[],centerButtons:o=[],rightButtons:i=[]})=>r?t(Eg,{children:[e(kg,{children:n.map((t,r)=>e(Tg,{...t},`footer-left-button-${r}`))}),e(Ag,{children:o.map((t,r)=>e(Tg,{...t},`footer-center-button-${r}`))}),e(Dg,{children:i.map((t,r)=>e(Tg,{...t},`footer-right-button-${r}`))})]}):null,Ng=n.div`
|
|
1182
|
-
position: fixed;
|
|
1183
|
-
top: 0;
|
|
1184
|
-
bottom: 0;
|
|
1185
|
-
${({$position:e})=>e}: 0;
|
|
1186
|
-
z-index: 1000;
|
|
1187
|
-
width: ${({$width:e})=>e};
|
|
1188
|
-
background: ${({theme:e})=>e.colors.translucent_bg};
|
|
1189
|
-
box-shadow: 0 2px 10px ${({theme:e})=>e.colors.primary+fc["010"]};
|
|
1190
|
-
overflow-y: auto;
|
|
1191
|
-
animation-name: ${({$position:e})=>bc.in[e]};
|
|
1192
|
-
`,Rg=n.div`
|
|
1193
|
-
display: flex;
|
|
1194
|
-
flex-direction: column;
|
|
1195
|
-
height: 100%;
|
|
1196
|
-
`,Og=n.div`
|
|
1197
|
-
flex-grow: 1;
|
|
1198
|
-
padding: 24px 32px;
|
|
1199
|
-
overflow-y: auto;
|
|
1200
|
-
`,Pg=({isOpen:n,onClose:o,closeOnEscape:i=!0,position:a="right",width:s="300px",children:l,header:c,footer:d})=>(Yc({key:"Escape",active:n&&i},()=>o()),Mc(n),n?dr.createPortal(t(r,{children:[e(Lo,{hidden:!n,onClick:o}),e(Ng,{"data-id":"drawer",$position:a,$width:s,children:t(Rg,{children:[e(Cg,{onClose:o,width:s,...c}),e(Og,{children:l}),e(Ig,{...d})]})})]}),document.body):null),Fg=({error:r})=>{const n=i(),o={container:{display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",color:n.text.error,fontFamily:n.font_family.primary},errorMessage:{padding:10,borderRadius:5,whiteSpace:"pre-wrap",background:n.colors.error},errorStack:{whiteSpace:"pre-wrap",fontSize:"12px"},errorStackWrapper:{textAlign:"left",marginTop:10},infoText:{marginTop:100,color:n.text.secondary,fontSize:"14px"}};return t("div",{style:o.container,children:[e("h2",{children:"Something went wrong!"}),e("pre",{style:o.errorMessage,children:r?.message||"Unknown Error"}),t("details",{style:o.errorStackWrapper,children:[e("summary",{children:"Stack Trace"}),e("pre",{style:o.errorStack,children:r?.stack||"Unknown Stack"})]}),e("p",{style:o.infoText,children:"Try refreshing the page or contact support"}),e(Tc,{variant:"secondary",onClick:()=>window.location.reload(),style:{fontSize:"1rem"},children:"Reload"})]})},_g=({children:t})=>e(mr,{FallbackComponent:({error:t,...r})=>e(gc,{children:e(Fg,{...r,error:t})}),children:t}),Lg=a`
|
|
1201
|
-
0% {
|
|
1202
|
-
background-position: 0% 50%;
|
|
1203
|
-
}
|
|
1204
|
-
100% {
|
|
1205
|
-
background-position: 100% 50%;
|
|
1206
|
-
}
|
|
1207
|
-
`,Mg=n(Pc)`
|
|
1208
|
-
background: ${({$textColor:e,$stripColor:t})=>`linear-gradient(45deg, ${e} 0%, ${e} 40%, ${t} 50%, ${e} 60%, ${e} 100%)`};
|
|
1209
|
-
background-size: 250% 100%; /* Expand background to allow movement */
|
|
1210
|
-
background-clip: text;
|
|
1211
|
-
color: transparent;
|
|
1212
|
-
animation: ${Lg} 1s reverse linear infinite;
|
|
1213
|
-
`,zg=({children:t="Loading...",textColor:r,stripColor:n,...o})=>{const a=i(),s=r||a.v2.colors.white[500],l=n||a.v2.colors.black[500];return e(Mg,{$textColor:s,$stripColor:l,...o,children:t})},Bg=n.div`
|
|
1214
|
-
width: 100%;
|
|
1215
|
-
height: 100%;
|
|
1216
|
-
|
|
1217
|
-
* {
|
|
1218
|
-
animation: none !important;
|
|
1219
|
-
transition: none !important;
|
|
1220
|
-
}
|
|
1221
|
-
`,Ug=({width:t="100%",height:r="100%",gap:n=0,elements:o,noAnimation:i=!1,onTopIndexChange:a})=>{const s=Ht(null),l=Xt(()=>n?o.map((t,r)=>e("div",{style:{paddingBottom:n},children:t},`scroll-y-item-${r}`)):o,[o,n]),c=Gt(e=>{if(!a||!s.current)return;const t=s.current.findItemIndex(e);a(t)},[a]),d=e(gr,{ref:s,style:{width:t,height:r},onScroll:a?c:void 0,children:l});return i?e(Bg,{children:d}):d},jg=n.div`
|
|
1222
|
-
display: flex;
|
|
1223
|
-
flex-direction: column;
|
|
1224
|
-
gap: 16px;
|
|
1225
|
-
${({$maxWidth:e})=>e&&`max-width: ${e};`}
|
|
1226
|
-
`,Wg=n.div`
|
|
1227
|
-
display: flex;
|
|
1228
|
-
align-items: center;
|
|
1229
|
-
gap: 16px;
|
|
1230
|
-
`,Hg=n.div`
|
|
1231
|
-
width: 50px;
|
|
1232
|
-
height: 50px;
|
|
1233
|
-
border-radius: 8px;
|
|
1234
|
-
background: ${({theme:e})=>`linear-gradient(90deg, ${e.v2.colors.grey[600]} 25%, ${e.v2.colors.grey[600]} 50%, ${e.v2.colors.silver[500]} 75%)`};
|
|
1235
|
-
background-size: 200% 100%;
|
|
1236
|
-
animation: ${$c} 10s infinite linear;
|
|
1237
|
-
`,Xg=n(Po)`
|
|
1238
|
-
flex: 1;
|
|
1239
|
-
gap: 12px;
|
|
1240
|
-
`,Gg=n.div`
|
|
1241
|
-
width: ${({$width:e})=>e};
|
|
1242
|
-
height: 16px;
|
|
1243
|
-
background: ${({theme:e})=>`linear-gradient(90deg, ${e.v2.colors.grey[600]} 25%, ${e.v2.colors.grey[600]} 50%, ${e.v2.colors.silver[500]} 75%)`};
|
|
1244
|
-
background-size: 200% 100%;
|
|
1245
|
-
animation: ${$c} 1.5s infinite linear;
|
|
1246
|
-
border-radius: 4px;
|
|
1247
|
-
`,Kg=({size:r=5,maxWidth:n})=>e(jg,{$maxWidth:n,children:[...Array(r)].map((r,n)=>t(Wg,{children:[e(Hg,{}),t(Xg,{children:[e(Gg,{$width:"80%"}),e(Gg,{$width:"100%"})]})]},n))}),Vg=n.div`
|
|
1248
|
-
display: flex;
|
|
1249
|
-
align-items: center;
|
|
1250
|
-
justify-content: center;
|
|
1251
|
-
gap: 4px;
|
|
1252
|
-
min-width: ${({$minWidth:e})=>e};
|
|
1253
|
-
width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
|
|
1254
|
-
padding: ${({$hasLabel:e})=>e?"4px 8px":"4px"};
|
|
1255
|
-
border-radius: 100px;
|
|
1256
|
-
background-color: ${({$backgroundColor:e})=>e};
|
|
1257
|
-
`,Jg=({label:r,leftIcon:n,rightIcon:o,tooltip:a,status:s=Vr.Unknown,useSecondaryTone:l=!1,invertColors:c=!1,textSize:d,textColor:u,backgroundColor:p,minWidth:h="unset",fullWidth:m=!1})=>{const g=i(),f=r?.toString(),y=Kr.Loading===s,b=s?[Vr.Disabled,Kr.Disabled,Kr.Loading].includes(s)?ro(g,s,c?"400":"700"):[Vr.Unknown].includes(s)?ro(g,s,"600"):ro(g,s,c?l?"500":"300":l?"700":"500"):g.v2.colors.grey[200],v=u||(c&&![Vr.Unknown].includes(s)?b:[Vr.Disabled,Kr.Disabled,Kr.Loading].includes(s)?g.v2.colors.grey[400]:[Xr.Error,Xr.Warning,Xr.Success].includes(s)?g.v2.colors.black[500]:g.v2.colors.white[500]),x=p||(c&&![Vr.Unknown].includes(s)?[Vr.Disabled,Kr.Disabled,Kr.Loading].includes(s)?g.v2.colors.grey[700]:g.v2.colors.silver[700]:b);return e(Bd,{text:a,fullWidth:m,children:t(Vg,{$backgroundColor:x,$minWidth:h,$fullWidth:m,$hasLabel:!!f,children:[y?e(Xo,{withSpinnerOld:!0}):n?e(n,{fill:v,size:14}):null,f?y?e(Xo,{withGradient:!0,title:f,titleSize:d||io.XXS}):e(uo,{color:v,size:d||io.XXS,nowrap:!0,children:f}):null,o&&e(o,{fill:v,size:14})]})})},qg=n.span`
|
|
1258
|
-
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1259
|
-
font-size: ${({$smallAndDark:e})=>e?"12px":"14px"};
|
|
1260
|
-
font-weight: 400;
|
|
1261
|
-
color: ${({theme:e,$smallAndDark:t})=>t?e.v2.colors.grey[400]:e.v2.colors.silver[200]};
|
|
1262
|
-
`,Yg=n.span`
|
|
1263
|
-
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1264
|
-
font-size: 14px;
|
|
1265
|
-
font-weight: 400;
|
|
1266
|
-
color: ${({theme:e})=>e.v2.colors.red[500]};
|
|
1267
|
-
`,Qg=({label:r,tooltip:n,required:o,badge:i,width:a,smallAndDark:s})=>r||n||o?t(Oo,{$width:a,$justifyContent:"space-between",children:[r&&e(qg,{$smallAndDark:s,children:r}),t(Oo,{$gap:4,children:[i&&e(Jg,{...i,textSize:io.XXXS}),o&&e(Yg,{children:"*"}),n&&e(Bd,{text:n,withIcon:!0})]})]}):null,Zg=({errorMessage:r,warnMessage:n,helpMessage:o})=>{const a=i(),s=r?a.v2.colors.red[500]:n?a.v2.colors.yellow[500]:a.v2.colors.silver[200],l=e(nt,{size:12,fill:s});return r||n||o?t(Oo,{$alignItems:"center",children:[l&&e(Po,{children:l}),e(uo,{size:io.XXS,weight:400,color:s,children:r||n||o})]}):null},ef=n.div`
|
|
1268
|
-
padding: ${({$small:e})=>e?"4px":"6px 12px"};
|
|
1269
|
-
|
|
1270
|
-
display: flex;
|
|
1271
|
-
align-self: stretch;
|
|
1272
|
-
align-items: center;
|
|
1273
|
-
gap: 8px;
|
|
1274
|
-
border-radius: 6px;
|
|
1275
|
-
|
|
1276
|
-
border: 1px solid ${({theme:e,$disabled:t,$error:r})=>t?e.v2.colors.grey[600]:r?e.v2.colors.red[500]:e.v2.colors.silver[500]};
|
|
1277
|
-
background: ${({theme:e,$disabled:t})=>t?e.v2.colors.grey[800]:e.v2.colors.black[500]};
|
|
1278
|
-
${({$disabled:e,$error:t})=>!e&&!t&&o`
|
|
1279
|
-
&:hover,
|
|
1280
|
-
&:active,
|
|
1281
|
-
&:focus-within {
|
|
1282
|
-
border: 1px solid ${({theme:e})=>e.v2.colors.silver[300]};
|
|
1283
|
-
}
|
|
1284
|
-
`}
|
|
1285
|
-
`,tf=n.input`
|
|
1286
|
-
max-width: ${({$maxWidth:e})=>e||"unset"};
|
|
1287
|
-
width: ${({$width:e})=>e||"unset"};
|
|
1288
|
-
|
|
1289
|
-
flex: 1;
|
|
1290
|
-
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1291
|
-
font-size: ${({$small:e})=>e?"12px":"14px"};
|
|
1292
|
-
font-weight: 400;
|
|
1293
|
-
|
|
1294
|
-
cursor: text;
|
|
1295
|
-
color: ${({theme:e})=>e.v2.colors.white[500]};
|
|
1296
|
-
&::placeholder {
|
|
1297
|
-
color: ${({theme:e})=>e.v2.colors.silver[600]};
|
|
1298
|
-
}
|
|
1299
|
-
|
|
1300
|
-
&:disabled {
|
|
1301
|
-
cursor: not-allowed;
|
|
1302
|
-
color: ${({theme:e})=>e.v2.colors.grey[400]};
|
|
1303
|
-
&::placeholder {
|
|
1304
|
-
color: ${({theme:e})=>e.v2.colors.grey[400]};
|
|
1305
|
-
}
|
|
1306
|
-
}
|
|
1307
|
-
|
|
1308
|
-
overflow: hidden;
|
|
1309
|
-
text-overflow: ellipsis;
|
|
1310
|
-
white-space: nowrap;
|
|
1311
|
-
`,rf=n.div`
|
|
1312
|
-
display: flex;
|
|
1313
|
-
align-items: center;
|
|
1314
|
-
justify-content: center;
|
|
1315
|
-
cursor: pointer;
|
|
1316
|
-
`,nf=({label:r,required:n,tooltip:o,badge:a,leftIcon:s,rightIcon:l,hasError:c,errorMessage:d,warnMessage:u,helpMessage:p,type:h=Hr.Text,name:m,value:g,onChange:f,disabled:y,maxWidth:b,width:v,small:x=!1,onClick:$,...w})=>{const S=i(),C=h===Hr.Password,[E,k]=jt(!1),[A,D]=jt(null),T=c||!!d||!!A,I=g?S.v2.colors.white[500]:y?S.v2.colors.grey[400]:S.v2.colors.silver[200],N=x?14:18;return t(Po,{$width:v,$gap:6,children:[e(Qg,{label:r,tooltip:o,required:n,badge:a}),t(ef,{$small:x,$disabled:y,$error:T,onClick:y?void 0:$,children:[s?e(s,{size:N,fill:I}):null,e(tf,{"data-id":m,type:E||h===Hr.Number?Hr.Text:h,name:m,value:g,onChange:e=>{e.stopPropagation();const t=e.target.value;h===Hr.Number&&(e.target.value=mi(t),t&&t!==e.target.value?D("Please enter a valid number"):D(null)),f?.(e)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},disabled:y,$maxWidth:b,$width:v,$small:x,...w}),C?e(rf,{onClick:()=>k(e=>!e),children:e(E?At:Dt,{size:N,fill:I})}):l?e(l,{size:N,fill:I}):null]}),e(Zg,{errorMessage:A||d,warnMessage:u,helpMessage:p})]})};var of,af;!function(e){e.S="s",e.L="l"}(of||(of={})),function(e){e.Filled="filled",e.Underline="underline"}(af||(af={}));const sf=n.div`
|
|
1317
|
-
display: flex;
|
|
1318
|
-
align-items: center;
|
|
1319
|
-
gap: 2px;
|
|
1320
|
-
padding: 3px;
|
|
1321
|
-
border-radius: 8px;
|
|
1322
|
-
border: 1px solid ${({theme:e})=>e.v2.colors.grey[500]};
|
|
1323
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[700]};
|
|
1324
|
-
width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
|
|
1325
|
-
`,lf=n.button`
|
|
1326
|
-
flex: 1;
|
|
1327
|
-
display: flex;
|
|
1328
|
-
align-items: center;
|
|
1329
|
-
justify-content: center;
|
|
1330
|
-
gap: 8px;
|
|
1331
|
-
padding: ${({$size:e})=>e===of.S?"4px 8px":"8px 16px"};
|
|
1332
|
-
border-radius: 6px;
|
|
1333
|
-
border: 1px solid ${({$isSelected:e,$selectedBorderColor:t})=>e&&t?t:"transparent"};
|
|
1334
|
-
box-shadow: ${({$isSelected:e})=>e?"0 0 11px 0 rgba(0, 0, 0, 0.32)":"none"};
|
|
1335
|
-
|
|
1336
|
-
${({$disabled:e,$isSelected:t,$selectedBgColor:r,theme:n})=>e?o`
|
|
1337
|
-
cursor: not-allowed;
|
|
1338
|
-
background-color: ${t?(r||n.v2.colors.black[500])+fc["040"]:"transparent"};
|
|
1339
|
-
`:o`
|
|
1340
|
-
cursor: pointer;
|
|
1341
|
-
background-color: ${t?r||n.v2.colors.black[500]:"transparent"};
|
|
1342
|
-
&:hover {
|
|
1343
|
-
background-color: ${t?r||n.v2.colors.black[500]:n.v2.colors.silver[800]};
|
|
1344
|
-
}
|
|
1345
|
-
`}
|
|
1346
|
-
`,cf=n.div`
|
|
1347
|
-
display: flex;
|
|
1348
|
-
align-items: stretch;
|
|
1349
|
-
width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
|
|
1350
|
-
`,df=n.button`
|
|
1351
|
-
display: flex;
|
|
1352
|
-
height: 34px;
|
|
1353
|
-
padding: 8px 12px 8px 16px;
|
|
1354
|
-
justify-content: center;
|
|
1355
|
-
align-items: center;
|
|
1356
|
-
gap: 8px;
|
|
1357
|
-
border: none;
|
|
1358
|
-
border-bottom: 2px solid ${({theme:e,$isSelected:t})=>t?e.v2.colors.white[500]:"transparent"};
|
|
1359
|
-
border-radius: ${({$isSelected:e})=>e?"6px 6px 0 0":"0"};
|
|
1360
|
-
background-color: ${({theme:e,$isSelected:t})=>t?e.v2.colors.silver[1e3]:"transparent"};
|
|
1361
|
-
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1362
|
-
transition:
|
|
1363
|
-
border-color 0.2s,
|
|
1364
|
-
background-color 0.2s,
|
|
1365
|
-
border-radius 0.2s;
|
|
1366
|
-
&:hover {
|
|
1367
|
-
border-bottom-color: ${({theme:e,$isSelected:t})=>t?e.v2.colors.white[500]:e.v2.colors.grey[500]};
|
|
1368
|
-
}
|
|
1369
|
-
`,uf=({"data-id":n,size:o=of.L,variant:a=af.Filled,options:s=[],selected:l,setSelected:c,disabled:d,fullWidth:u})=>{const p=i(),h=a===af.Underline,m=h?df:lf;return e(h?cf:sf,{"data-id":n,$fullWidth:u,children:s.map(({value:n,label:i,icon:a,tooltip:s,selectedBgColor:u,selectedBorderColor:g,disabled:f},y)=>{const b=l===n,v=f||d,x=v?p.v2.colors.grey[400]:h||b?p.v2.colors.white[500]:p.v2.colors.grey[300],$=o===of.S?io.XXS:io.XS,w=b?500:400,S=t(r,{children:[a&&e(a,{fill:x}),i&&e(uo,{size:$,weight:w,color:x,nowrap:!0,children:i})]});return e(m,{onClick:()=>!v&&c(n),$disabled:v,$isSelected:b,$size:o,...!h&&{$selectedBgColor:u,$selectedBorderColor:g},children:s?e(Bd,{text:s,withIcon:!0,children:S}):S},`segment-${i||y}-${n}`)})})},pf=n.div`
|
|
1370
|
-
box-sizing: border-box !important;
|
|
1371
|
-
width: ${({$width:e})=>e??"fit-content"};
|
|
1372
|
-
padding: ${({$withSegment:e})=>e?"2px 2px 2px 12px":"6px 12px"};
|
|
1373
|
-
display: flex;
|
|
1374
|
-
align-self: stretch;
|
|
1375
|
-
align-items: center;
|
|
1376
|
-
gap: 8px;
|
|
1377
|
-
overflow: hidden;
|
|
1378
|
-
border-radius: 6px;
|
|
1379
|
-
|
|
1380
|
-
border: none;
|
|
1381
|
-
border-radius: 6px;
|
|
1382
|
-
background: ${({$isHovered:e,$isActive:t,$idleBackgroundColor:r,$emphasizeBackgroundColor:n,theme:o})=>{const i=r??o.v2.colors.silver[800],a=n??o.v2.colors.silver[700];return e||t?a:i}};
|
|
1383
|
-
`,hf=n.input`
|
|
1384
|
-
min-width: 0;
|
|
1385
|
-
flex: 1;
|
|
1386
|
-
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1387
|
-
font-size: 14px;
|
|
1388
|
-
font-weight: 400;
|
|
1389
|
-
line-height: 20px;
|
|
1390
|
-
|
|
1391
|
-
cursor: text;
|
|
1392
|
-
color: ${({$textColor:e})=>e};
|
|
1393
|
-
&::placeholder {
|
|
1394
|
-
color: ${({$textColor:e})=>e};
|
|
1395
|
-
}
|
|
1396
|
-
|
|
1397
|
-
overflow: hidden;
|
|
1398
|
-
text-overflow: ellipsis;
|
|
1399
|
-
white-space: nowrap;
|
|
1400
|
-
`,mf=({"data-id":r,value:n,onChange:o,onFocus:a,onBlur:s,placeholder:l,width:c,segment:d,idleBackgroundColor:u,emphasizeBackgroundColor:p})=>{const h=i(),[m,g]=jt(!1),[f,y]=jt(!1),[b,v]=jt(!1),x=m?h.v2.colors.white[500]:h.v2.colors.silver[200],$=!!d?.options?.length,w=Xt(()=>{if($)return d?.options.find(e=>e.value===d.selected)?.label},[$,d?.options,d?.selected]),S=Xt(()=>l||($&&w?`Search by ${w.toLowerCase()}`:"Search..."),[l,$,w]);return t(pf,{$width:c,$withSegment:$,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),$isHovered:f&&!b,$isActive:m,$idleBackgroundColor:u,$emphasizeBackgroundColor:p,children:[e(Tt,{size:18,fill:x}),e(hf,{"data-id":r??"search",name:"search",type:"text",placeholder:S,value:n,onChange:e=>{e.stopPropagation(),o(e.target.value)},onFocus:()=>{g(!0),a?.()},onBlur:()=>{g(!1),s?.()},$textColor:x}),$&&e("div",{style:{flexShrink:0},onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),children:e(uf,{"data-id":d["data-id"],options:d.options,selected:d.selected,setSelected:d.setSelected,size:of.S})})]})};var gf,ff;!function(e){e.Primary="primary",e.Secondary="secondary",e.Text="text"}(gf||(gf={})),function(e){e.S="small",e.M="medium",e.L="large"}(ff||(ff={}));const yf=n.button`
|
|
1401
|
-
display: flex;
|
|
1402
|
-
align-items: center;
|
|
1403
|
-
justify-content: center;
|
|
1404
|
-
gap: 8px;
|
|
1405
|
-
${({$fullWidth:e})=>e&&o`
|
|
1406
|
-
width: 100%;
|
|
1407
|
-
`}
|
|
1408
|
-
border: none;
|
|
1409
|
-
border-radius: 6px;
|
|
1410
|
-
${({$size:e,$hasLabel:t})=>e===ff.S?o`
|
|
1411
|
-
height: 32px;
|
|
1412
|
-
${t?o`
|
|
1413
|
-
padding: 8px 16px;
|
|
1414
|
-
`:o`
|
|
1415
|
-
width: 32px;
|
|
1416
|
-
`}
|
|
1417
|
-
`:e===ff.M?o`
|
|
1418
|
-
height: 38px;
|
|
1419
|
-
${t?o`
|
|
1420
|
-
padding: 8px 18px;
|
|
1421
|
-
`:o`
|
|
1422
|
-
width: 38px;
|
|
1423
|
-
`}
|
|
1424
|
-
`:o`
|
|
1425
|
-
height: 44px;
|
|
1426
|
-
${t?o`
|
|
1427
|
-
padding: 8px 22px;
|
|
1428
|
-
`:o`
|
|
1429
|
-
width: 44px;
|
|
1430
|
-
`}
|
|
1431
|
-
`}
|
|
1432
|
-
|
|
1433
|
-
cursor: pointer;
|
|
1434
|
-
&:disabled {
|
|
1435
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
1436
|
-
cursor: not-allowed;
|
|
1437
|
-
}
|
|
1438
|
-
&:enabled {
|
|
1439
|
-
${({$withShadow:e})=>e?o`
|
|
1440
|
-
box-shadow: 0 0 11px 0 rgba(0, 0, 0, 0.32);
|
|
1441
|
-
`:""}
|
|
1442
|
-
${({$variant:e})=>e===gf.Primary?o`
|
|
1443
|
-
background-color: ${({theme:e})=>e.v2.colors.purple[500]};
|
|
1444
|
-
&:hover {
|
|
1445
|
-
background-color: ${({theme:e})=>e.v2.colors.purple[600]};
|
|
1446
|
-
}
|
|
1447
|
-
&:active {
|
|
1448
|
-
background-color: ${({theme:e})=>e.v2.colors.purple[700]};
|
|
1449
|
-
}
|
|
1450
|
-
`:e===gf.Secondary?o`
|
|
1451
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[750]};
|
|
1452
|
-
&:hover {
|
|
1453
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[600]};
|
|
1454
|
-
}
|
|
1455
|
-
&:active {
|
|
1456
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[500]};
|
|
1457
|
-
}
|
|
1458
|
-
`:e===gf.Text?o`
|
|
1459
|
-
background-color: transparent;
|
|
1460
|
-
&:hover {
|
|
1461
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
1462
|
-
}
|
|
1463
|
-
&:active {
|
|
1464
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
1465
|
-
}
|
|
1466
|
-
`:""}
|
|
1467
|
-
}
|
|
1468
|
-
`,bf=Bt(({"data-id":n,label:o,tooltip:a,hideTooltipIcon:s,leftIcon:l,rightIcon:c,variant:d=gf.Primary,size:u=ff.M,iconSize:p,loading:h,fullWidth:m,withShadow:g,textColor:f,disabled:y,onClick:b,...v},x)=>{const $=i(),w=p||(u===ff.L?18:16),S=u===ff.L?io.S:io.XS,C=f||(y?$.v2.colors.grey[400]:$.v2.colors.white[500]),[E,k]=jt(!1),A=Gt(async e=>{e.stopPropagation(),k(!0),await(b?.(e)),k(!1)},[b]);return e(yf,{ref:x,"data-id":n,$variant:d,$size:u,$fullWidth:m,$withShadow:g,$hasLabel:!!o,disabled:y,onClick:h||E?void 0:A,...v,children:e(Bd,{text:a,withIcon:!s,children:h||E?o?e(zg,{size:$.v2.text.size[S],textColor:C}):e(Tu,{}):t(r,{children:[l&&e(l,{size:w,fill:C}),o?e(uo,{size:S,weight:500,color:C,nowrap:!0,children:o}):null,c&&e(c,{size:w,fill:C})]})})})});bf.displayName=bf.name;const vf=n.div`
|
|
1469
|
-
display: flex;
|
|
1470
|
-
align-items: center;
|
|
1471
|
-
justify-content: center;
|
|
1472
|
-
width: fit-content;
|
|
1473
|
-
height: fit-content;
|
|
1474
|
-
padding: 8px;
|
|
1475
|
-
border-radius: 100%;
|
|
1476
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[700]};
|
|
1477
|
-
`,xf=({icon:r=vt,hideIcon:n=!1,title:o="No data",subTitle:a,button:s})=>{const l=i().v2.colors.silver[200];return t(Po,{$gap:12,$alignItems:"center",children:[!n&&e(vf,{children:e(r,{size:32,fill:l})}),t(Po,{$gap:4,$alignItems:"center",children:[e(uo,{size:io.S,align:"center",children:o}),a&&e(uo,{size:io.XXS,align:"center",color:l,children:a})]}),s&&e(bf,{variant:gf.Secondary,...s})]})};var $f;!function(e){e.S="small",e.L="large"}($f||($f={}));const wf=n.div`
|
|
1478
|
-
width: fit-content;
|
|
1479
|
-
display: flex;
|
|
1480
|
-
align-items: center;
|
|
1481
|
-
gap: 8px;
|
|
1482
|
-
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1483
|
-
`,Sf=n.div`
|
|
1484
|
-
width: ${({$size:e})=>e===$f.S?"16px":"20px"};
|
|
1485
|
-
height: ${({$size:e})=>e===$f.S?"16px":"20px"};
|
|
1486
|
-
display: flex;
|
|
1487
|
-
align-items: center;
|
|
1488
|
-
justify-content: center;
|
|
1489
|
-
border-radius: 4px;
|
|
1490
|
-
border: 1px solid ${({$borderColor:e})=>e};
|
|
1491
|
-
background-color: ${({$backgroundColor:e})=>e};
|
|
1492
|
-
`,Cf=({name:r,label:n,tooltip:o,badge:a,size:s=$f.L,disabled:l,partiallyChecked:c,value:d,onChange:u,errorMessage:p,warnMessage:h,helpMessage:m})=>{const g=i(),[f,y]=jt(!1),b=c||d,v=s===$f.S?12:16,x=l?g.v2.colors.grey[400]:g.v2.colors.white[500],$=b?"transparent":l?g.v2.colors.grey[700]:f?g.v2.colors.silver[400]:g.v2.colors.silver[600],w=l?g.v2.colors.grey[600]:b?g.v2.colors.purple[500]:g.v2.colors.silver[900];return t(Po,{$gap:4,children:[t(Oo,{$justifyContent:"space-between",children:[t(wf,{"data-id":r||"checkbox"+(n?`-${n}`:""),onClick:e=>{e.stopPropagation(),l||u(!!c||!d)},$disabled:l,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),children:[e(Sf,{$size:s,$borderColor:$,$backgroundColor:w,children:c?e(xt,{size:v,fill:x}):d?e(yt,{size:v,fill:x}):null}),n&&e(uo,{size:s===$f.S?io.XXS:io.XS,nowrap:!0,children:n})]}),e(Qg,{tooltip:o,badge:a})]}),e(Zg,{errorMessage:p,warnMessage:h,helpMessage:m})]})},Ef=n.div`
|
|
1493
|
-
display: flex;
|
|
1494
|
-
flex-direction: ${({$direction:e})=>e===Pr.Horizontal?"row":"column"};
|
|
1495
|
-
gap: ${({$direction:e})=>e===Pr.Horizontal?16:8}px;
|
|
1496
|
-
`,kf=({direction:r=Pr.Vertical,title:n,size:o,disabled:i,withSelectAll:a,options:s,values:l,setValues:c})=>{const d=o===$f.S?io.XXS:io.XS,u=Xt(()=>s.every(e=>l[e.id]),[s,l]),p=Xt(()=>s.some(e=>l[e.id])&&s.some(e=>!l[e.id]),[s,l]),h=(e,t)=>{c(r=>{const n={...r};return e?n[e]=t:s.forEach(e=>n[e.id]=t),n})};return t(Ef,{$direction:r,children:[n&&a?e(Cf,{label:n,partiallyChecked:p,value:u,onChange:e=>h("",e),size:o}):n&&!a?e(uo,{size:d,children:n}):null,s.map(t=>e(Cf,{...t,value:l[t.id],onChange:e=>h(t.id,e),disabled:i,size:o},`${n}-checkbox-${t.id}`))]})};var Af,Df;!function(e){e.Left="left",e.Right="right"}(Af||(Af={})),function(e){e.Top="top",e.Bottom="bottom"}(Df||(Df={}));const Tf=n.div`
|
|
1497
|
-
position: relative;
|
|
1498
|
-
display: flex;
|
|
1499
|
-
flex-direction: column;
|
|
1500
|
-
gap: 4px;
|
|
1501
|
-
`,If=n.div`
|
|
1502
|
-
position: fixed;
|
|
1503
|
-
${({$coords:e})=>null!=e.top?`top: ${e.top}px;`:""}
|
|
1504
|
-
${({$coords:e})=>null!=e.bottom?`bottom: ${e.bottom}px;`:""}
|
|
1505
|
-
${({$coords:e})=>null!=e.left?`left: ${e.left}px;`:""}
|
|
1506
|
-
${({$coords:e})=>null!=e.right?`right: ${e.right}px;`:""}
|
|
1507
|
-
${({$coords:e})=>null!=e.width?`width: ${e.width-16}px;`:""}
|
|
1508
|
-
z-index: ${({theme:e})=>e.v2.zIndex.dropdown};
|
|
1509
|
-
|
|
1510
|
-
display: flex;
|
|
1511
|
-
flex-direction: column;
|
|
1512
|
-
gap: 0;
|
|
1513
|
-
|
|
1514
|
-
min-width: 120px;
|
|
1515
|
-
padding: 8px;
|
|
1516
|
-
border-radius: 6px;
|
|
1517
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
1518
|
-
box-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.3);
|
|
1519
|
-
`,Nf=n.div`
|
|
1520
|
-
display: flex;
|
|
1521
|
-
flex-direction: column;
|
|
1522
|
-
gap: 0;
|
|
1523
|
-
|
|
1524
|
-
width: 100%;
|
|
1525
|
-
max-height: ${({$maxHeight:e})=>e||"230px"};
|
|
1526
|
-
overflow-y: auto;
|
|
1527
|
-
`,Rf=n.div`
|
|
1528
|
-
display: flex;
|
|
1529
|
-
align-items: center;
|
|
1530
|
-
gap: 8px;
|
|
1531
|
-
width: calc(100% - 16px);
|
|
1532
|
-
padding: 8px;
|
|
1533
|
-
border-radius: 6px;
|
|
1534
|
-
cursor: pointer;
|
|
1535
|
-
${({$selected:e})=>e?o`
|
|
1536
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[500]};
|
|
1537
|
-
`:o`
|
|
1538
|
-
background-color: transparent;
|
|
1539
|
-
&:hover {
|
|
1540
|
-
background-color: ${({theme:e})=>e.v2.colors.grey[700]};
|
|
1541
|
-
}
|
|
1542
|
-
`}
|
|
1543
|
-
`,Of=({defaultOpen:r,open:n,onOpenChange:o,alignX:a,alignY:s,items:l,selectedIds:c,setSelectedIds:d,label:u,withMultiSelect:p,withSearch:h,fullWidth:m,maxHeight:g,buttonProps:f,iconButtonProps:y,isLoading:b,emptyMessage:v,children:x})=>{const $=i(),w=void 0!==n,S=!!f||!!y||!!x,[C,E]=jt(r??!S),k=w?n:C,A=Gt(e=>{w||E(e),o?.(e)},[w,o]),[D,T]=jt({x:a||Af.Left,y:s||Df.Bottom}),I=Ht(null);Zc(I,()=>A(!1));const[N,R]=jt({}),O=Gt((e,t)=>{const r=I.current?.getBoundingClientRect();if(!r)return;const n=S?8:0;R({top:t===Df.Bottom?S?r.bottom+n:r.top:void 0,bottom:t===Df.Top?S?window.innerHeight-r.top+n:window.innerHeight-r.bottom:void 0,left:e===Af.Left?r.left:void 0,right:e===Af.Right?window.innerWidth-r.right:void 0,width:m?r.width:void 0})},[S,m]),P=e=>{const t=!k;if(A(t),!t)return;const r={x:a||(e.clientX>window.innerWidth/2?Af.Right:Af.Left),y:s||(e.clientY>window.innerHeight/2?Df.Top:Df.Bottom)};T(r),O(r.x,r.y)};qt(()=>{k&&O(D.x,D.y)},[k,D.x,D.y,O]);const F=e=>{d(p?c.includes(e)?c.filter(t=>t!==e):[...c,e]:[e]),S&&!p&&A(!1)},[_,L]=jt(""),M=Xt(()=>_?l.filter(e=>e?.label?.toLowerCase().includes(_.toLowerCase())):l,[l.length,_]);return t(Tf,{ref:I,children:[u&&e(Qg,{label:u}),f&&e(bf,{...f,fullWidth:m,rightIcon:k?Ot:Pt,onClick:P}),y&&e(Hc,{...y,onClick:P}),"function"==typeof x?x({ChevronIcon:k?Ot:Pt,handleClick:P}):x,k&&ur(t(If,{$coords:N,"data-ignore-outside-click":"true",children:[h&&e(mf,{value:_,onChange:L,width:"100%"}),b?e(Xo,{withSpinner:!0,title:"Loading...",titleSize:io.XS}):M.length?e(Nf,{$maxHeight:g,children:M.map(r=>{if(!r)return null;const{id:n,label:o,icon:i,withCheckbox:a}=r,s=c.includes(n);return t(Rf,{"data-id":`option-${n}`,$selected:s&&!a,onClick:()=>F(n),children:[a&&e(Cf,{value:s,onChange:()=>F(n)}),i&&e(i,{size:14,fill:r.color||$.v2.colors.white[500]}),e(uo,{size:io.XS,nowrap:!0,color:r.color||ao.Primary,children:o})]},n)})}):e(Ro,{$padding:"6px 0",children:e(xf,{hideIcon:!0,title:"No results",subTitle:v})}),p&&!!M.length&&e(bf,{label:"Done",onClick:()=>A(!1)})]}),document.body)]})},Pf=t=>{const{"data-id":r,options:n,placeholder:o="Search...",isLoading:i}=t,a=!0===t.multiple,[s,l]=jt(""),[c,d]=jt(!1),u=Xt(()=>a?t.value:t.value?[t.value]:[],[a,t.value]),p=Xt(()=>{if(a){const e=u.length;return e?1===e?n.find(e=>e.id===u[0])?.label??"":`${e} selected`:""}return t.value?n.find(e=>e.id===t.value)?.label??"":""},[a,t,n,u]),h=c?s:p,m=Xt(()=>{const e=a?n.map(e=>({...e,withCheckbox:!0})):n;if(!s)return e;const t=s.toLowerCase();return e.filter(e=>e.label.toLowerCase().includes(t))},[a,n,s]),g=Gt(()=>{l(""),d(!0)},[]),f=Gt(e=>{l(e.target.value),c||d(!0),a||e.target.value||!t.value||t.onSelect(null)},[c,a,t]),y=Gt(e=>{d(e),e||l("")},[]),b=Gt(e=>{if(a)return void t.onSelect(e);const r=n.find(t=>t.id===e[0]);r&&(t.onSelect(r),l(""),d(!1))},[a,t,n]),v=c&&(i||m.length>0||s.length>0);return e(Of,{open:v,onOpenChange:y,items:m,selectedIds:u,setSelectedIds:b,withMultiSelect:a,isLoading:i,emptyMessage:`No results matched the filter '${s}'`,fullWidth:!0,alignY:Df.Bottom,children:e(nf,{name:r,leftIcon:Tt,placeholder:o,value:h,onChange:f,onFocus:g})})},Ff=n.button`
|
|
1544
|
-
width: 100%;
|
|
1545
|
-
padding: 0;
|
|
1546
|
-
padding-right: 12px;
|
|
1547
|
-
display: flex;
|
|
1548
|
-
align-items: center;
|
|
1549
|
-
justify-content: flex-start;
|
|
1550
|
-
gap: 12px;
|
|
1551
|
-
border-radius: 8px;
|
|
1552
|
-
border: none;
|
|
1553
|
-
${({$hovered:e})=>e?o`
|
|
1554
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[750]};
|
|
1555
|
-
`:o`
|
|
1556
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
1557
|
-
`}
|
|
1558
|
-
overflow: hidden;
|
|
1559
|
-
cursor: pointer;
|
|
1560
|
-
&:disabled {
|
|
1561
|
-
cursor: not-allowed;
|
|
1562
|
-
opacity: 0.5;
|
|
1563
|
-
}
|
|
1564
|
-
`,_f=n.div`
|
|
1565
|
-
width: ${({$hasIcon:e})=>e?"56px":"0"};
|
|
1566
|
-
height: 56px;
|
|
1567
|
-
display: flex;
|
|
1568
|
-
align-items: center;
|
|
1569
|
-
justify-content: center;
|
|
1570
|
-
${({$hovered:e})=>e?o`
|
|
1571
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[600]};
|
|
1572
|
-
`:o`
|
|
1573
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[700]};
|
|
1574
|
-
`}
|
|
1575
|
-
`,Lf=n.div`
|
|
1576
|
-
width: ${({$hasIcon:e})=>e?"calc(100% - 56px)":"100%"};
|
|
1577
|
-
display: flex;
|
|
1578
|
-
justify-content: space-between;
|
|
1579
|
-
align-items: center;
|
|
1580
|
-
gap: 8px;
|
|
1581
|
-
`,Mf=({label:r,icon:n,loading:o,disabled:i,onClick:a})=>{const[s,l]=jt(!1);return t(Ff,{$hovered:s,type:"button",disabled:i||o,onClick:a,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[e(_f,{$hovered:s,$hasIcon:!!n,children:n&&e(n,{size:36})}),t(Lf,{$hasIcon:!!n,children:[o?e(zg,{size:16}):e(uo,{variant:oo.Span,align:"center",children:r}),e(Ft,{rotate:90,size:24})]})]})},zf=({buttons:t})=>e(Po,{$gap:12,children:t.map(t=>e(Mf,{...t},t.label))});var Bf;!function(e){e.Button="button",e.ButtonDropData="button-drop-data"}(Bf||(Bf={}));const Uf=({onAnyClick:t,actions:r})=>e(Oo,{$gap:8,$alignItems:"center",children:r?.map(r=>{if(!r)return null;switch(r.type){case Bf.Button:return e(bf,{...r.buttonProps,onClick:e=>{r.buttonProps?.onClick?.(e),t?.()}},r.id);case Bf.ButtonDropData:return e(Of,{...r.dropDataProps,items:r.dropDataProps?.items??[],withMultiSelect:!1,selectedIds:[],setSelectedIds:e=>{r.buttonProps?.onClick?.(e[0]),t?.()},buttonProps:r.buttonProps},r.id);default:return null}})}),jf=({children:t,fullText:r,...n})=>{const o=Ht(null),[i,a]=jt(!1);qt(()=>{const e=o.current;if(!e)return;const t=()=>{a(e.scrollWidth>e.clientWidth+1)};t();const r=new ResizeObserver(t);return r.observe(e),()=>r.disconnect()},[t]),Wt(()=>{if("undefined"==typeof document||!document.fonts?.ready)return;let e=!1;return document.fonts.ready.then(()=>{const t=o.current;!e&&t&&a(t.scrollWidth>t.clientWidth+1)}),()=>{e=!0}},[t]);const s=i?r??(null==t?"":String(t)):"";return e(Bd,{text:s,fullWidth:!0,ellipsis:!0,keepAlive:!0,children:e(uo,{ref:o,...n,children:t})})},Wf=n.div`
|
|
1582
|
-
display: flex;
|
|
1583
|
-
align-items: center;
|
|
1584
|
-
justify-content: center;
|
|
1585
|
-
padding: 8px;
|
|
1586
|
-
border-radius: 8px;
|
|
1587
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
1588
|
-
`,Hf=({icon:r,title:n,subTitle:o,withCopy:i,badge:a,gap:s,children:l})=>{const{CopyButton:c}=Xc();return t(Oo,{$gap:o?8:6,$alignItems:"center",children:[r&&(o?e(Wf,{children:e(r,{size:24})}):e(r,{size:24})),n||a||o?t(Po,{children:[n||a?t(Oo,{$gap:6,$alignItems:"center",children:[n&&e(uo,{nowrap:!0,children:n}),i&&n&&e(c,{value:n,size:jc.XS}),a&&e(Jg,{...a})]}):null,o&&e(uo,{size:io.XXS,color:ao.Secondary,nowrap:!0,children:o})]}):null,e(Oo,{$gap:s,$margin:`0 0 0 ${s??0}px`,$alignItems:"center",children:l})]})},Xf=n.div`
|
|
1589
|
-
display: flex;
|
|
1590
|
-
flex-direction: column;
|
|
1591
|
-
gap: ${({$moreSpacing:e})=>e?"16px":"12px"};
|
|
1592
|
-
width: ${({$width:e="100%",$moreSpacing:t})=>`calc(${e} - ${t?32:24}px)`};
|
|
1593
|
-
align-self: ${({$fullHeight:e})=>e?"stretch":"auto"};
|
|
1594
|
-
padding: ${({$moreSpacing:e})=>e?"16px":"12px"};
|
|
1595
|
-
border-radius: ${({$moreSpacing:e})=>e?"16px":"12px"};
|
|
1596
|
-
background-color: ${({theme:e,$bgTint:t})=>e.v2.colors.silver[t]};
|
|
1597
|
-
`,Gf=n.div`
|
|
1598
|
-
display: flex;
|
|
1599
|
-
align-items: center;
|
|
1600
|
-
flex-wrap: wrap;
|
|
1601
|
-
width: 100%;
|
|
1602
|
-
`,Kf=n.div`
|
|
1603
|
-
width: calc(${({$cellsPerRow:e})=>100/e+"%"} - 16px);
|
|
1604
|
-
margin: 8px;
|
|
1605
|
-
display: flex;
|
|
1606
|
-
flex-direction: column;
|
|
1607
|
-
gap: 4px;
|
|
1608
|
-
min-width: 0;
|
|
1609
|
-
`,Vf=({item:r,cellsPerRow:n})=>{const{CopyButton:o}=Xc(),{title:i,titleTooltip:a,label:s,labelTooltip:l,withCopy:c,badge:d}=r;return t(Kf,{$cellsPerRow:n,children:[!!i&&e(Bd,{text:a,children:e(jf,{size:io.XXXS,color:ao.Secondary,nowrap:!0,children:i})}),t(Oo,{$gap:4,children:[d&&e(Jg,{...d}),s&&e(Bd,{text:l,children:e(jf,{size:io.XS,nowrap:!0,children:s})}),c&&e(o,{value:s||d?.label?.toString()||"",size:jc.XS})]})]})},Jf=({bgTint:r="900",width:n,fullHeight:o=!1,moreSpacing:i=!1,richTitle:a,withCollapse:s,collapseIsDefaultOpen:l,actions:c=[],badges:d=[],cellsPerRow:u,items:p,children:h})=>{const[m,g]=jt(l||!1),f=!s||s&&m;return t(Xf,{$width:n,$bgTint:r,$fullHeight:o,$moreSpacing:i,children:[(a||s)&&t(Oo,{$gap:16,$justifyContent:"space-between",children:[a?e(Hf,{...a}):e("div",{}),t(Oo,{children:[f&&!!c.length&&e(Uf,{actions:c}),d.map(e=>Yt(Jg,{...e,key:e.key||e.label})),s&&e(Oo,{$gap:8,$alignItems:"center",children:e(bf,{variant:gf.Text,size:ff.S,leftIcon:m?Ot:Pt,onClick:()=>g(e=>!e)})})]})]}),f&&p?e(Gf,{children:p.map(t=>e(Vf,{item:t,cellsPerRow:u&&u<=p.length?u:p.length},t.id))}):null,f&&h]})};var qf;!function(e){e.S="small",e.M="medium"}(qf||(qf={}));const Yf=n.div`
|
|
1610
|
-
display: flex;
|
|
1611
|
-
flex-direction: column;
|
|
1612
|
-
gap: ${({$gap:e})=>e}px;
|
|
1613
|
-
width: ${({$padding:e})=>`calc(100% - ${2*e}px)`};
|
|
1614
|
-
align-self: ${({$fullHeight:e})=>e?"stretch":"auto"};
|
|
1615
|
-
padding: ${({$padding:e})=>e}px;
|
|
1616
|
-
border-radius: 16px;
|
|
1617
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
|
|
1618
|
-
`,Qf=Bt(({id:r,size:n=qf.M,fullHeight:o=!1,richTitle:i,customTitle:a,search:s,customSearch:l,filters:c,actions:d,children:u},p)=>{const h=n===qf.S?4:16,m=n===qf.S?12:16,g=a??(i?e(Hf,{...i}):null),f=l??(s?e(mf,{...s}):null),y=!!g||!!f,b=!!d&&d.length>0;return t(Yf,{ref:p,id:r,"data-section-name":r,$padding:m,$gap:h,$fullHeight:o,children:[y||b?t(Oo,{$gap:h,$justifyContent:"space-between",children:[y?t(Oo,{$gap:h,$alignItems:"center",children:[g,f,c]}):null,b&&e(Uf,{actions:d??[]})]}):null,u]})});Qf.displayName="SectionCard";const Zf=n.div`
|
|
1619
|
-
flex: 1;
|
|
1620
|
-
align-self: stretch;
|
|
1621
|
-
display: flex;
|
|
1622
|
-
align-items: center;
|
|
1623
|
-
gap: 8px;
|
|
1624
|
-
padding: 16px;
|
|
1625
|
-
border-radius: 12px;
|
|
1626
|
-
background-color: ${({theme:e,$status:t})=>ro(e,t,t===Vr.Unknown?"750":"500")};
|
|
1627
|
-
`,ey=n.div`
|
|
1628
|
-
display: flex;
|
|
1629
|
-
align-items: center;
|
|
1630
|
-
justify-content: center;
|
|
1631
|
-
width: fit-content;
|
|
1632
|
-
height: fit-content;
|
|
1633
|
-
padding: 8px;
|
|
1634
|
-
border-radius: 12px;
|
|
1635
|
-
background-color: ${({theme:e,$status:t})=>t===Vr.Unknown?ro(e,t,"800"):ro(e,t,"900")+fc["015"]};
|
|
1636
|
-
`,ty=({status:r,icon:n,title:o,description:a})=>{const s=i(),l=n??Go(r,s),c=[Xr.Default,Xr.Info,Vr.Disabled,Vr.Unknown].includes(r)?s.v2.colors.white[500]:s.v2.colors.black[500];return t(Zf,{$status:r,children:[e(ey,{$status:r,children:e(l,{size:32,fill:c})}),t(Po,{$gap:2,$justifyContent:"center",children:[e(uo,{size:io.M,weight:500,color:c,nowrap:!0,children:o}),e(uo,{size:io.XXS,weight:300,color:c,nowrap:!0,children:a})]})]})},ry=n.div`
|
|
1637
|
-
flex: 0.5;
|
|
1638
|
-
display: flex;
|
|
1639
|
-
flex-direction: column;
|
|
1640
|
-
gap: 12px;
|
|
1641
|
-
padding: 12px;
|
|
1642
|
-
border-radius: 12px;
|
|
1643
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
1644
|
-
`,ny=["-","N/A","undefined","null","undefined/undefined","null/null"],oy=({title:r,cells:n})=>{const o=i();return t(ry,{children:[e(uo,{size:io.XXS,color:o.v2.colors.grey[150],children:r}),e(Oo,{$gap:32,children:n.map(n=>t(Po,{$gap:2,children:[!n.isLoading||n.value&&!ny.includes(n.value)?e(uo,{size:n.label?io.M:io.L,children:n.value}):e(Tu,{scale:.9}),n.label&&e(uo,{size:io.XXS,children:n.label})]},`${r}-${n.label}-${n.value}`))})]})};var iy;!function(e){e.CurrentOfMax="currentOfMax",e.GoodAgainstBad="goodAgainstBad"}(iy||(iy={}));const ay=n.div`
|
|
1645
|
-
display: flex;
|
|
1646
|
-
align-items: flex-end;
|
|
1647
|
-
justify-content: space-between;
|
|
1648
|
-
gap: 24px;
|
|
1649
|
-
width: fit-content;
|
|
1650
|
-
`,sy=n.div`
|
|
1651
|
-
position: relative;
|
|
1652
|
-
display: flex;
|
|
1653
|
-
flex-direction: column;
|
|
1654
|
-
align-items: center;
|
|
1655
|
-
width: ${({$width:e})=>e??150}px;
|
|
1656
|
-
flex-shrink: 0;
|
|
1657
|
-
`,ly=n.svg`
|
|
1658
|
-
display: block;
|
|
1659
|
-
width: 100%;
|
|
1660
|
-
height: auto;
|
|
1661
|
-
overflow: visible;
|
|
1662
|
-
`,cy=n(Po)`
|
|
1663
|
-
position: absolute;
|
|
1664
|
-
left: 0;
|
|
1665
|
-
right: 0;
|
|
1666
|
-
bottom: 4px;
|
|
1667
|
-
align-items: center;
|
|
1668
|
-
gap: 2px;
|
|
1669
|
-
pointer-events: none;
|
|
1670
|
-
`,dy=n.span`
|
|
1671
|
-
display: inline-block;
|
|
1672
|
-
flex-shrink: 0;
|
|
1673
|
-
width: 9px;
|
|
1674
|
-
height: 9px;
|
|
1675
|
-
border-radius: 50%;
|
|
1676
|
-
background-color: ${({$color:e})=>e};
|
|
1677
|
-
`,uy=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:""}},py=10,hy=(e,t,r,n)=>{const o=n*Math.PI/180;return{x:e+r*Math.cos(o),y:t-r*Math.sin(o)}},my=(e,t,r,n,o)=>{const i=hy(e,t,r,n),a=hy(e,t,r,o),s=n>o?1:0,l=Math.abs(n-o)>180?1:0;return`M ${i.x} ${i.y} A ${r} ${r} 0 ${l} ${s} ${a.x} ${a.y}`},gy=({variant:r=iy.CurrentOfMax,gaugeWidth:n,title:o,min:a=0,max:s,current:l,primaryLabel:c,primaryColor:d,secondaryLabel:u,secondaryColor:p})=>{const{number:h}=uy(a),{number:m}=uy(s),{number:g,prefix:f,suffix:y}=uy(l),b=i(),v=((e,t,r)=>Math.min(Math.max(e,t),r))((g-h)/Math.max(m-h,1),0,1),x=180-180*v,$=v>0?my(60,60,55,180,x):null,w=v<1?my(60,60,55,x,0):null,S=hy(60,60,55,180),C=hy(60,60,55,0),E=d??(r===iy.GoodAgainstBad?b.v2.colors.green[500]:b.v2.colors.purple[400]),k=p??(r===iy.GoodAgainstBad?b.v2.colors.red[500]:b.v2.colors.silver[500]),[A,D]=jt(null),T=e=>`${f}${e}${y}`,I=r===iy.GoodAgainstBad?Math.max(m-g,0):m,N="primary"===A?c:"secondary"===A?u:"",R="primary"===A?T(g):"secondary"===A?T(I):"",O=()=>D("primary"),P=()=>D("secondary"),F=()=>D(null);return t(ay,{children:[t(sy,{$width:n,children:[e(Bd,{keepAlive:!0,fullWidth:!0,title:N,text:R,children:t(ly,{viewBox:"0 0 120 65",role:"img","aria-label":`${o}: ${g} of ${m}`,children:[$&&e("path",{d:$,fill:"none",stroke:E,strokeWidth:py,strokeLinecap:1===v?"round":"butt",onMouseEnter:O,onMouseLeave:F}),w&&e("path",{d:w,fill:"none",stroke:k,strokeWidth:py,strokeLinecap:0===v?"round":"butt",onMouseEnter:P,onMouseLeave:F}),v>0&&e("circle",{cx:S.x,cy:S.y,r:5,fill:E,onMouseEnter:O,onMouseLeave:F}),v<1&&e("circle",{cx:C.x,cy:C.y,r:5,fill:k,onMouseEnter:P,onMouseLeave:F})]})}),o&&t(cy,{children:[e(uo,{size:io.XXXS,color:b.v2.colors.grey[150],align:"center",children:o}),e(uo,{size:io.L,weight:500,align:"center",children:`${f}${g}${y}`})]})]}),t(Po,{$gap:7,children:[t(Oo,{$gap:8,$alignItems:"center",children:[e(dy,{$color:E}),e(uo,{size:io.XXXS,color:b.v2.colors.grey[150],nowrap:!0,children:c})]}),t(Oo,{$gap:8,$alignItems:"center",children:[e(dy,{$color:k}),e(uo,{size:io.XXXS,color:b.v2.colors.grey[150],nowrap:!0,children:u})]})]})]})},fy=n(Oo)`
|
|
1678
|
-
width: calc(100% - 20px);
|
|
1679
|
-
padding: 8px 12px;
|
|
1680
|
-
border-radius: 6px;
|
|
1681
|
-
background-color: ${({theme:e,$bgTint:t})=>e.v2.colors.silver[t||"800"]};
|
|
1682
|
-
display: flex;
|
|
1683
|
-
align-items: center;
|
|
1684
|
-
justify-content: space-between;
|
|
1685
|
-
gap: 12px;
|
|
1686
|
-
`,yy=n.div`
|
|
1687
|
-
position: relative;
|
|
1688
|
-
width: ${({$hideCopy:e})=>e?"100%":"calc(100% - 24px - 12px)"};
|
|
1689
|
-
display: flex;
|
|
1690
|
-
align-items: center;
|
|
1691
|
-
gap: 4px;
|
|
1692
|
-
`,by=n.pre`
|
|
1693
|
-
flex: 1;
|
|
1694
|
-
margin: 0;
|
|
1695
|
-
padding: 0;
|
|
1696
|
-
font-size: 12px;
|
|
1697
|
-
color: #5ffb98; // TODO: add to theme
|
|
1698
|
-
overflow-x: auto;
|
|
1699
|
-
`,vy=n.span`
|
|
1700
|
-
flex-shrink: 0;
|
|
1701
|
-
font-size: 14px;
|
|
1702
|
-
color: #5ffb98; // TODO: add to theme
|
|
1703
|
-
`,xy=({bgTint:r,label:n,value:o,hideCopy:i=!1,onDone:a})=>{const{CopyButton:s}=Xc({onDone:a}),l=Ht(null),[c,d]=jt(!1);return Wt(()=>{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()}},[o]),t(Po,{$gap:4,children:[n&&e(uo,{size:io.XXXS,color:ao.Secondary,children:n}),t(fy,{$bgTint:r,children:[t(yy,{$hideCopy:i,children:[e(by,{ref:l,children:o}),c&&e(vy,{children:"..."})]}),!i&&e(s,{value:o,size:jc.XS})]})]})},$y=n.div`
|
|
1704
|
-
display: flex;
|
|
1705
|
-
align-items: center;
|
|
1706
|
-
gap: 8px;
|
|
1707
|
-
padding: ${({$hideBackground:e})=>e?"0":"16px"};
|
|
1708
|
-
width: ${({$width:e})=>e||"auto"};
|
|
1709
|
-
border-radius: ${({$isExtended:e})=>e?"12px 12px 0 0":"12px"};
|
|
1710
|
-
background-color: ${({$hideBackground:e,$backgroundColor:t})=>e?"transparent":t};
|
|
1711
|
-
|
|
1712
|
-
${({$withHover:e,$hideBackground:t,$hoverBackgroundColor:r})=>e&&o`
|
|
1713
|
-
cursor: pointer;
|
|
1714
|
-
transition: background 0.2s;
|
|
1715
|
-
&:hover {
|
|
1716
|
-
background-color: ${t?"transparent":r};
|
|
1717
|
-
}
|
|
1718
|
-
`}
|
|
1719
|
-
`,wy=n.div`
|
|
1720
|
-
display: flex;
|
|
1721
|
-
align-items: center;
|
|
1722
|
-
justify-content: center;
|
|
1723
|
-
flex-shrink: 0;
|
|
1724
|
-
width: 42px;
|
|
1725
|
-
height: 42px;
|
|
1726
|
-
border-radius: 11px;
|
|
1727
|
-
background-color: ${({$backgroundColor:e})=>e};
|
|
1728
|
-
${({$withClick:e})=>e&&o`
|
|
1729
|
-
cursor: pointer;
|
|
1730
|
-
& * {
|
|
1731
|
-
cursor: pointer;
|
|
1732
|
-
}
|
|
1733
|
-
&:hover {
|
|
1734
|
-
transform: scale(1.2);
|
|
1735
|
-
}
|
|
1736
|
-
`}
|
|
1737
|
-
`,Sy=n(Po)`
|
|
1738
|
-
flex: 1;
|
|
1739
|
-
min-width: 0;
|
|
1740
|
-
`,Cy=n.div`
|
|
1741
|
-
display: flex;
|
|
1742
|
-
align-items: center;
|
|
1743
|
-
justify-content: center;
|
|
1744
|
-
flex-shrink: 0;
|
|
1745
|
-
width: 24px;
|
|
1746
|
-
height: 24px;
|
|
1747
|
-
`,Ey=({status:r,title:n,subTitle:o,badgeLabel:a,loading:s,action:l,isExtended:c=!1,toggleExtended:d,invertColors:u=!1,hideIcon:p=!1,hideBackground:h=!1,width:m})=>{const g=i(),f=Go(r,g),y=d?c?Ot:Pt:void 0,b=r===Vr.Unknown,v=r===Vr.Disabled,x=r===Kr.Loading||s,$=[Xr.Error,Xr.Warning,Xr.Success].includes(r),w=ro(g,r,v?u?"400":"700":b?"600":u?"300":"500"),S=v?g.v2.colors.grey[400]:u?g.v2.colors.white[500]:$?g.v2.colors.black[500]:g.v2.colors.white[500],C=u&&!b?w:S,E=!u||b||v?"rgba(0, 0, 0, 0.13)":ro(g,r,"800"),k=v?g.v2.colors.grey[900]:u||b?g.v2.colors.silver[800]:w,A=v?g.v2.colors.grey[800]:u||b?g.v2.colors.silver[700]:ro(g,r,"600");return t($y,{$width:m,$withHover:!!d,$isExtended:c,$hideBackground:h,$backgroundColor:k,$hoverBackgroundColor:A,onClick:d,children:[!p&&e(wy,{$backgroundColor:E,children:x?e(Xo,{withSpinnerOld:!0,scaleSpinnerOld:1.8}):e(f,{size:32,fill:C})}),t(Sy,{$gap:4,$justifyContent:"center",children:[t(Oo,{$gap:10,$alignItems:"center",children:[e(uo,{size:io.S,weight:500,color:S,children:n}),a&&e(Jg,{label:a,backgroundColor:g.v2.colors.silver[600],textColor:g.v2.colors.white[500],textSize:io.XXXS})]}),o&&e(uo,{size:io.XXXS,color:S,children:o})]}),l&&e(wy,{"data-id":l["data-id"],$backgroundColor:g.v2.colors.silver[750],$withClick:!!l.onClick,onClick:l.onClick,children:e(Bd,{text:l.tooltip,children:e(l.icon,{size:32,fill:S})})}),y&&e(Cy,{children:e(y,{size:24,fill:S})})]})},ky=n.div`
|
|
1748
|
-
display: flex;
|
|
1749
|
-
flex-direction: column;
|
|
1750
|
-
width: 100%;
|
|
1751
|
-
border-radius: 12px;
|
|
1752
|
-
overflow: hidden;
|
|
1753
|
-
`,Ay=n.div`
|
|
1754
|
-
display: flex;
|
|
1755
|
-
flex-direction: column;
|
|
1756
|
-
gap: 8px;
|
|
1757
|
-
padding: 8px 12px 16px 12px;
|
|
1758
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
1759
|
-
`,Dy=n.div`
|
|
1760
|
-
display: flex;
|
|
1761
|
-
align-items: center;
|
|
1762
|
-
gap: 8px;
|
|
1763
|
-
`,Ty=n.div`
|
|
1764
|
-
display: flex;
|
|
1765
|
-
align-items: center;
|
|
1766
|
-
justify-content: center;
|
|
1767
|
-
flex-shrink: 0;
|
|
1768
|
-
width: 18px;
|
|
1769
|
-
height: 18px;
|
|
1770
|
-
`,Iy=({conditions:r,title:n,subTitle:o})=>{const a=i(),[s,l]=jt(!1),c=Gt(()=>l(e=>!e),[]),d=Xt(()=>di(r),[r]),{errors:u,hasErrors:p,warnings:h,hasWarnings:m,hasDisableds:g,hasLoadings:f}=Xt(()=>Pn(d),[d]);Wt(()=>{l(p||m||g)},[p,m,g]);const y=Xt(()=>(!d.length||f)&&!p&&!m&&!g,[d.length,f,p,m,g]),b=Xt(()=>p?Xr.Error:m?Xr.Warning:g?Xr.Info:Xr.Success,[p,m,g]),v=Xt(()=>n||(1===d.length?ci(d[0].reason||d[0].type):void 0)||(({hasErrors:e,hasWarnings:t,hasDisableds:r,loading:n})=>{const o="Something isn't right";return e?"Something Failed":t||r?o:n?"Loading...":"Everything Successful"})({hasErrors:p,hasWarnings:m,hasDisableds:g,loading:y}),[n,d,p,m,g,y]),x=Xt(()=>o||1===d.length&&d[0].message||void 0,[o,d]),$=Xt(()=>`${p?u.length:m?h.length:d.length}/${d.length}`,[p,u.length,m,h.length,d.length]);return t(ky,{children:[e(Ey,{status:b,invertColors:!0,title:v,subTitle:x,badgeLabel:$,loading:y,isExtended:s,toggleExtended:c}),s&&e(Ay,{children:d.map(({status:r,type:n,reason:o,message:i},s)=>{const l=r===Kr.Loading,c=r===Kr.Disabled?Xr.Info:r,d=l?null:Go(c,a),u=r===Xr.Error?ro(a,Xr.Error,"500"):r===Xr.Warning?ro(a,Xr.Warning,"500"):a.v2.colors.white[500],p=[n,i||o].filter(Boolean).join(" - ");return t(Dy,{children:[e(Ty,{children:l||!d?e(Xo,{withSpinnerOld:!0}):e(d,{size:18})}),e(uo,{size:io.XXXS,color:u,lineHeight:"16px",children:p})]},`condition-${s}`)})})]})};var Ny,Ry,Oy;!function(e){e.Default="default",e.SuccessError="successError"}(Ny||(Ny={})),function(e){e.S="small",e.L="large"}(Ry||(Ry={})),function(e){e.Left="left",e.Right="right"}(Oy||(Oy={}));const Py=n.div`
|
|
1771
|
-
display: flex;
|
|
1772
|
-
align-items: center;
|
|
1773
|
-
gap: ${({$gap:e})=>e}px;
|
|
1774
|
-
`,Fy=n.div`
|
|
1775
|
-
position: relative;
|
|
1776
|
-
display: flex;
|
|
1777
|
-
align-items: center;
|
|
1778
|
-
justify-content: space-between;
|
|
1779
|
-
|
|
1780
|
-
width: ${({$size:e})=>2*e+2}px;
|
|
1781
|
-
height: ${({$size:e})=>e}px;
|
|
1782
|
-
padding: ${4}px;
|
|
1783
|
-
border-radius: ${({$size:e})=>2*e}px;
|
|
1784
|
-
background-color: ${({$disabled:e,$onBgColor:t,$offBgColor:r,$variant:n,$value:o,theme:i})=>{if(e)return i.v2.colors.grey[800];if(t&&o)return t;if(r&&!o)return r;switch(n){case Ny.SuccessError:return o?i.v2.colors.green[500]:i.v2.colors.red[500];case Ny.Default:default:return o?i.v2.colors.purple[500]:i.v2.colors.grey[400]}}};
|
|
1785
|
-
|
|
1786
|
-
border: 1px solid ${({$disabled:e,theme:t})=>e?t.v2.colors.grey[600]:"transparent"};
|
|
1787
|
-
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1788
|
-
`,_y=n.div`
|
|
1789
|
-
position: absolute;
|
|
1790
|
-
top: 50%;
|
|
1791
|
-
left: ${({$value:e,$size:t})=>e?`calc(100% - ${t}px - 4px)`:"4px"};
|
|
1792
|
-
transform: translateY(-50%);
|
|
1793
|
-
width: ${({$size:e})=>e}px;
|
|
1794
|
-
height: ${({$size:e})=>e}px;
|
|
1795
|
-
border-radius: 100%;
|
|
1796
|
-
background-color: ${({$color:e})=>e};
|
|
1797
|
-
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)"};
|
|
1798
|
-
`,Ly=({variant:n=Ny.Default,size:o=Ry.L,name:a,label:s,labelAlign:l=Oy.Right,labelColor:c,tooltip:d,badge:u,value:p,onChange:h,disabled:m,withIcon:g,onIcon:f=yt,offIcon:y=vt,onBgColor:b,offBgColor:v,errorMessage:x,warnMessage:$,helpMessage:w})=>{const S=i(),C=m?S.v2.colors.grey[400]:S.v2.colors.white[500],E=o===Ry.S?10:16,k=c||S.v2.colors.silver[200],A=o===Ry.S?io.XXXS:io.XS,D=o===Ry.S?8:12;return t(Po,{$gap:4,children:[t(Oo,{$justifyContent:"space-between",children:[t(Py,{"data-id":a||"toggle"+(s?`-${s}`:""),"data-toggle-value":p?"true":"false",$gap:D,children:[s&&l===Oy.Left&&e(uo,{color:k,size:A,nowrap:!0,children:s}),t(Fy,{$onBgColor:b,$offBgColor:v,$variant:n,$size:E,$value:p,$disabled:m,onClick:e=>{e.stopPropagation(),m||h(!p)},children:[e(_y,{$color:C,$size:E,$value:p,$disabled:m}),g&&t(r,{children:[e(f,{size:E,fill:C}),e(y,{size:E,fill:C})]})]}),s&&l===Oy.Right&&e(uo,{color:k,size:A,nowrap:!0,children:s})]}),e(Qg,{tooltip:d,badge:u})]}),e(Zg,{errorMessage:x,warnMessage:$,helpMessage:w})]})},My=n.div`
|
|
1799
|
-
display: flex;
|
|
1800
|
-
flex-direction: ${({$direction:e})=>e===Pr.Horizontal?"row":"column"};
|
|
1801
|
-
gap: ${({$direction:e})=>e===Pr.Horizontal?16:8}px;
|
|
1802
|
-
`,zy=({direction:r=Pr.Vertical,title:n,size:o,disabled:i,options:a,values:s,setValues:l})=>{const c=o===Ry.S?io.XS:io.S;return t(My,{$direction:r,children:[n&&e(uo,{size:c,children:n}),a.map(t=>e(Ly,{...t,labelAlign:Oy.Right,value:s[t.id],onChange:e=>{return r=t.id,n=e,void l(e=>{const t={...e};return r?t[r]=n:a.forEach(e=>t[e.id]=n),t});var r,n},disabled:i,size:o},`${n}-toggle-${t.id}`))]})},By=n.div`
|
|
1803
|
-
display: flex;
|
|
1804
|
-
align-items: center;
|
|
1805
|
-
justify-content: space-between;
|
|
1806
|
-
width: 100%;
|
|
1807
|
-
overflow: hidden;
|
|
1808
|
-
`,Uy=n.div`
|
|
1809
|
-
display: flex;
|
|
1810
|
-
align-items: center;
|
|
1811
|
-
gap: 16px;
|
|
1812
|
-
padding: 6px 0;
|
|
1813
|
-
min-width: 0;
|
|
1814
|
-
flex: 1;
|
|
1815
|
-
overflow: hidden;
|
|
1816
|
-
`,jy=n.div`
|
|
1817
|
-
display: flex;
|
|
1818
|
-
align-items: center;
|
|
1819
|
-
justify-content: center;
|
|
1820
|
-
flex: 0 0 36px;
|
|
1821
|
-
width: 36px;
|
|
1822
|
-
height: 36px;
|
|
1823
|
-
border-radius: 8px;
|
|
1824
|
-
background: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
1825
|
-
`,Wy=n.img`
|
|
1826
|
-
width: 24px;
|
|
1827
|
-
height: 24px;
|
|
1828
|
-
`,Hy=n.div`
|
|
1829
|
-
display: flex;
|
|
1830
|
-
align-items: center;
|
|
1831
|
-
gap: 16px;
|
|
1832
|
-
flex-shrink: 0;
|
|
1833
|
-
`,Xy=({icon:r,iconSrc:n,title:o,subTitle:i,toggleProps:a,actions:s,onClose:l,onCloseDisabled:c})=>t(By,{children:[t(Uy,{children:[r?e(jy,{children:e(r,{size:24})}):n?e(jy,{children:e(Wy,{src:n,alt:o||"icon"})}):null,(o||i)&&t(Po,{$gap:6,children:[o&&e(uo,{size:io.S,weight:500,children:o}),i&&e(uo,{size:io.XXS,children:i})]})]}),t(Hy,{children:[a&&e(Ly,{...a}),s?.length?e(Of,{iconButtonProps:{"data-id":"drawer-actions",icon:_t},items:s,selectedIds:s?.filter(e=>e?.active)?.map(e=>e?.id)??[],setSelectedIds:e=>s?.find(t=>t?.id===e[0])?.onClick?.()}):null,l&&e(Hc,{"data-id":"drawer-close",icon:vt,size:jc.M,onClick:l,disabled:c})]})]}),Gy=n.div`
|
|
1834
|
-
display: flex;
|
|
1835
|
-
align-items: center;
|
|
1836
|
-
gap: 10px;
|
|
1837
|
-
${({$fullWidth:e})=>e&&o`
|
|
1838
|
-
width: calc(100% - 16px);
|
|
1839
|
-
`}
|
|
1840
|
-
padding: 4px 12px 4px 4px;
|
|
1841
|
-
border-radius: 8px;
|
|
1842
|
-
background-color: ${({theme:e,$status:t})=>ro(e,t,[Xr.Info,Xr.Warning].includes(t)?"1000":"900")};
|
|
1843
|
-
`,Ky=n.div`
|
|
1844
|
-
width: ${({$smallIcon:e})=>e?"24px":"32px"};
|
|
1845
|
-
height: ${({$smallIcon:e})=>e?"24px":"32px"};
|
|
1846
|
-
display: flex;
|
|
1847
|
-
align-items: center;
|
|
1848
|
-
justify-content: center;
|
|
1849
|
-
border-radius: 6px;
|
|
1850
|
-
background-color: ${({theme:e,$status:t})=>ro(e,t,[Xr.Info].includes(t)?"900":"800")};
|
|
1851
|
-
`,Vy=n.div`
|
|
1852
|
-
margin-left: auto;
|
|
1853
|
-
margin-right: 8px;
|
|
1854
|
-
cursor: pointer;
|
|
1855
|
-
&:hover {
|
|
1856
|
-
transform: scale(1.2);
|
|
1857
|
-
}
|
|
1858
|
-
`,Jy=({status:r,message:n,action:o,fullWidth:a,smallIcon:s})=>{const l=i(),c=Go(r,l),d=ro(l,r,r===Xr.Default?"300":r===Xr.Info?"400":"500");return t(Gy,{$status:r,$fullWidth:a,children:[e("div",{children:e(Ky,{$status:r,$smallIcon:s,children:e(c,{size:s?18:24})})}),e(uo,{color:d,size:io.XXXS,weight:400,children:n}),o&&e(Vy,{"data-id":o["data-id"],onClick:o.onClick,children:e(uo,{color:d,size:io.XXS,weight:500,underline:!0,children:o.label})})]})},qy=n.div`
|
|
1859
|
-
display: flex;
|
|
1860
|
-
align-items: center;
|
|
1861
|
-
gap: 8px;
|
|
1862
|
-
padding: 4px 12px;
|
|
1863
|
-
`,Yy=n.div`
|
|
1864
|
-
flex: 1;
|
|
1865
|
-
`,Qy=n.div`
|
|
1866
|
-
width: 150px;
|
|
1867
|
-
`,Zy=({note:r,actions:n,children:o})=>o?e(qy,{children:o}):t(qy,{children:[r&&e(Jy,{...r}),e(Yy,{}),n?.map((t,r)=>e(Qy,{children:e(bf,{fullWidth:!0,...t})},t["data-id"]||`drawer-footer-button-${r}`))]}),eb=n.div`
|
|
1868
|
-
position: fixed;
|
|
1869
|
-
top: 0;
|
|
1870
|
-
bottom: 0;
|
|
1871
|
-
${({$position:e})=>e}: 0;
|
|
1872
|
-
z-index: ${({theme:e})=>e.v2.zIndex.drawer};
|
|
1873
|
-
|
|
1874
|
-
display: flex;
|
|
1875
|
-
flex-direction: column;
|
|
1876
|
-
gap: 12px;
|
|
1877
|
-
|
|
1878
|
-
width: calc(${({$width:e})=>e} - 32px);
|
|
1879
|
-
padding: 12px;
|
|
1880
|
-
border-radius: ${({$position:e})=>"left"===e?"0 20px 20px 0":"20px 0 0 20px"};
|
|
1881
|
-
background: ${({theme:e})=>e.v2.colors.black[500]};
|
|
1882
|
-
box-shadow: 0 0 34px 0 rgba(0, 0, 0, 0.7);
|
|
1883
|
-
overflow: hidden;
|
|
1884
|
-
|
|
1885
|
-
${({$disableAnimation:e,$position:t})=>!e&&o`
|
|
1886
|
-
animation-name: ${bc.in[t]};
|
|
1887
|
-
`}
|
|
1888
|
-
`,tb=n.div`
|
|
1889
|
-
display: flex;
|
|
1890
|
-
flex-direction: column;
|
|
1891
|
-
gap: 12px;
|
|
1892
|
-
|
|
1893
|
-
height: calc(100% - ${56}px);
|
|
1894
|
-
overflow-y: auto;
|
|
1895
|
-
`,rb=({isOpen:n,hideOverlay:o=!1,disableAnimation:i=!1,position:a="right",width:s="600px",header:l,footer:c,children:d})=>(Mc(n),n?ur(t(r,{children:[!o&&e(Lo,{onClick:l?.onCloseDisabled?void 0:l?.onClose}),t(eb,{"data-id":"drawer",$position:a,$width:s,$disableAnimation:i,children:[l&&e(Xy,{...l}),e(tb,{children:d}),c&&e(Zy,{...c})]})]}),document.body):null),nb=({options:t,values:r,setValues:n,withMultiSelect:o,withSearch:i,...a})=>{const s=Xt(()=>r?.length?`Selected: ${t.filter(e=>r.includes(e.id)).map(e=>e.label).join(", ")||"none"}`:"",[t,r]);return e(Of,{withMultiSelect:o,withSearch:i,fullWidth:!0,alignX:Af.Left,items:t,selectedIds:r,setSelectedIds:n,children:({ChevronIcon:t,handleClick:r})=>e(nf,{placeholder:"Select options...",...a,rightIcon:t,value:s,onChange:()=>{},onClick:r})})},ob=n.header`
|
|
1896
|
-
position: relative;
|
|
1897
|
-
width: calc(100% - 36px);
|
|
1898
|
-
padding: 12px 18px;
|
|
1899
|
-
background-color: ${({theme:e})=>e.v2.colors.black[500]};
|
|
1900
|
-
display: flex;
|
|
1901
|
-
align-items: center;
|
|
1902
|
-
justify-content: space-between;
|
|
1903
|
-
`,ib=n(Oo)`
|
|
1904
|
-
position: absolute;
|
|
1905
|
-
left: 50%;
|
|
1906
|
-
transform: translateX(-50%);
|
|
1907
|
-
gap: 16px;
|
|
1908
|
-
`,ab=({left:r=[],center:n=[],right:o=[]})=>t(ob,{children:[e(Oo,{$gap:16,children:r}),e(ib,{children:n}),e(Oo,{$gap:16,children:o})]}),sb=n.div`
|
|
1909
|
-
display: flex;
|
|
1910
|
-
align-items: center;
|
|
1911
|
-
gap: 2px;
|
|
1912
|
-
width: fit-content;
|
|
1913
|
-
padding: 4px;
|
|
1914
|
-
border-radius: 8px;
|
|
1915
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[600]};
|
|
1916
|
-
box-shadow: 0 3px 8px 0 rgba(0, 0, 0, 0.25);
|
|
1917
|
-
|
|
1918
|
-
position: absolute;
|
|
1919
|
-
right: ${({$right:e,$left:t})=>e||(t?"unset":"12px")};
|
|
1920
|
-
left: ${({$left:e})=>e||"unset"};
|
|
1921
|
-
top: 50%;
|
|
1922
|
-
transform: translateY(-50%);
|
|
1923
|
-
`,lb=({isOpen:t,actions:r,positionRight:n,positionLeft:o})=>t?e(sb,{$right:n,$left:o,children:r.map(t=>{if(!t)return null;const{tooltip:r,...n}=t;return e(Bd,{text:r||"",children:e(bf,{...n,variant:gf.Secondary,size:ff.S})},n.id)})}):null,cb=({values:r,setValues:n,name:o,label:a,tooltip:s,badge:l,required:c,errorMessage:d,warnMessage:u,helpMessage:p,placeholder:h,disabled:m})=>{const g=i(),f=r.length<=1,y=m,b=m||f&&y,v=r.length?r:[""];return t(Po,{"data-id":o,$gap:6,children:[e(Qg,{label:a,tooltip:s,required:c,badge:l}),e(Po,{$gap:8,children:v.map((o,i)=>{const a=i===v.length-1;return t(Oo,{$gap:8,$alignItems:"center",children:[e(nf,{width:"100%",autoFocus:ri(o)&&!f&&a,value:o,onChange:e=>((e,t)=>{const o=[...r||[]];o[t]=e,n(o)})(e.target.value,i),disabled:m,placeholder:h,hasError:!!d}),a&&e(bf,{leftIcon:Ct,variant:gf.Secondary,size:ff.S,disabled:y,onClick:()=>(()=>{const e=[...r||[]];e.push(""),n(e)})()}),e(bf,{leftIcon:b?It:()=>e(It,{fill:g.v2.colors.red[500]}),variant:gf.Secondary,size:ff.S,disabled:b,onClick:()=>(e=>{const t=[...r||[]].filter((t,r)=>r!==e);t.length||t.push(""),n(t)})(i)})]},`input-list-${i}`)})}),e(Zg,{errorMessage:d,warnMessage:u,helpMessage:p})]})},db=({col:t,colIdx:r,row:n,rowIdx:o,rowsLength:i,handleChange:a,errorMessage:s,disabled:l})=>{const{keyName:c,componentType:d,inputType:u,label:p,placeholder:h,options:m,renderCondition:g}=t,f=n[c];if(g&&!g(n))return null;switch(d){case Wr.Dropdown:case"multi-dropdown":{const t="multi-dropdown"===d,r=Array.isArray(f)?f:null!=f&&""!==f?[String(f)]:[],n=m?.filter(e=>r.includes(e.id)).map(e=>e.id)||[];return e(nb,{name:c,label:h?p:void 0,placeholder:h||p,options:m||[],withMultiSelect:t,withSearch:t,values:n,setValues:e=>a(c,t?e:e[0]??"",o),disabled:l,hasError:!!s},c)}default:const t=i>1&&0===o&&0===r&&ri(f);return e(nf,{name:c,label:h?p:void 0,placeholder:h||p,autoFocus:t,type:u,value:f,onChange:({target:{value:e}})=>a(c,e,o),disabled:l,hasError:!!s})}},ub=n.table`
|
|
1924
|
-
width: 100%;
|
|
1925
|
-
border-collapse: separate;
|
|
1926
|
-
border-spacing: 0 8px;
|
|
1927
|
-
`,pb=n.td`
|
|
1928
|
-
padding: 0 8px 0 0;
|
|
1929
|
-
`,hb=n.td`
|
|
1930
|
-
width: 72px;
|
|
1931
|
-
padding-bottom: 2px;
|
|
1932
|
-
vertical-align: bottom;
|
|
1933
|
-
`,mb=({columns:r,values:n,setValues:o,name:a,label:s,tooltip:l,badge:c,required:d,disabled:u,errorMessage:p,warnMessage:h,helpMessage:m,limitFieldsPerRow:g})=>{const f=i(),y=Xt(()=>{const e={};return r.forEach(({keyName:t})=>e[t]=""),e},[r]),b=(e,t,r)=>{const i=n.length?xr(n):[xr(y)];i[r][e]=t,o(i)},v=Xt(()=>{if(g){const e=[];for(let t=0;;t+=g){const n=r.slice(t,t+g);if(!n.length)break;e.push(n)}return e}return[r]},[g,r]),x=n.length?n:[y];return t(Po,{"data-id":a,$gap:0,children:[e(Qg,{label:s,tooltip:l,required:d,badge:c}),e(ub,{children:e("tbody",{children:x.map((r,i)=>{const a=i===x.length-1;return t(Ut,{children:[g&&i>0?e("tr",{children:e(pb,{colSpan:v.length})}):null,v.map((s,l)=>t("tr",{children:[s.map((t,n)=>t.renderCondition&&!t.renderCondition(r)?null:e(pb,{children:e(db,{col:t,colIdx:n,row:r,rowIdx:i,rowsLength:x.length,handleChange:b,disabled:u,errorMessage:p})},`input-table-row-${i}-col-${l}-${n}`)),0===l&&e(hb,{children:t(Oo,{$gap:8,$justifyContent:"flex-end",children:[a&&e(bf,{leftIcon:Ct,variant:gf.Secondary,size:ff.S,disabled:u,onClick:()=>(()=>{const e=xr(n);e.push(xr(y)),o(e)})()}),e(bf,{leftIcon:u?It:()=>e(It,{fill:f.v2.colors.red[500]}),variant:gf.Secondary,size:ff.S,disabled:u,onClick:()=>(e=>{const t=n.filter((t,r)=>r!==e);t.length||t.push(xr(y)),o(t)})(i)})]})})]},`input-table-matrix-${i}-${l}`))]},`input-table-row-${i}`)})})}),e(Zg,{errorMessage:p,warnMessage:h,helpMessage:m})]})},gb=n.div`
|
|
1934
|
-
display: flex;
|
|
1935
|
-
align-items: center;
|
|
1936
|
-
justify-content: space-between;
|
|
1937
|
-
gap: 32px;
|
|
1938
|
-
|
|
1939
|
-
padding: 18px 16px;
|
|
1940
|
-
border-radius: 18px;
|
|
1941
|
-
background-color: ${({theme:e})=>e.v2.colors.black[500]+fc["095"]};
|
|
1942
|
-
box-shadow: 0 4px 16.7px 0 rgba(0, 0, 0, 0.83);
|
|
1943
|
-
|
|
1944
|
-
position: fixed;
|
|
1945
|
-
bottom: 0;
|
|
1946
|
-
left: 50%;
|
|
1947
|
-
z-index: ${({theme:e})=>e.v2.zIndex.island};
|
|
1948
|
-
animation-name: ${bc.in.center};
|
|
1949
|
-
`,fb=({isOpen:r,onClose:n,richTitle:o,actions:i})=>r?t(gb,{children:[e(Hf,{...o}),e(Uf,{onAnyClick:n,actions:i})]}):null,yb=n.div`
|
|
1950
|
-
position: ${({$relativeToParent:e})=>e?"absolute":"fixed"};
|
|
1951
|
-
top: 50%;
|
|
1952
|
-
left: 50%;
|
|
1953
|
-
transform: translate(-50%, -50%);
|
|
1954
|
-
z-index: ${({theme:e})=>e.v2.zIndex.modal};
|
|
1955
|
-
width: fit-content;
|
|
1956
|
-
border-radius: 20px;
|
|
1957
|
-
background: ${({theme:e})=>e.v2.colors.black[500]};
|
|
1958
|
-
box-shadow: 0 0 34px 0 rgba(0, 0, 0, 0.7);
|
|
1959
|
-
overflow: hidden;
|
|
1960
|
-
|
|
1961
|
-
/* Promote to its own composited layer and isolate paint/layout so descendant
|
|
1962
|
-
re-renders during the slide animation can't trigger reflows of the rest of
|
|
1963
|
-
the page. Without this, the global \`* { transition: all 300ms }\` rule plus
|
|
1964
|
-
a heavy modal body (forms, etc.) make the close visibly stutter. */
|
|
1965
|
-
will-change: transform;
|
|
1966
|
-
contain: layout paint;
|
|
1967
|
-
|
|
1968
|
-
animation-name: ${({$closing:e})=>e?bc.out.center:bc.in.center};
|
|
1969
|
-
/* Snappier close: shorter duration with an ease-in curve. The slide-in keeps
|
|
1970
|
-
the global 300ms default which pairs with the fade-in for a soft entrance. */
|
|
1971
|
-
animation-duration: ${({$closing:e})=>e?"180ms":"300ms"};
|
|
1972
|
-
animation-timing-function: ${({$closing:e})=>e?"cubic-bezier(0.4, 0, 1, 1)":"cubic-bezier(0, 0, 0.2, 1)"};
|
|
1973
|
-
|
|
1974
|
-
/* Block hover/click work on form children mid-close so their transitions
|
|
1975
|
-
don't compete with the slide-out. */
|
|
1976
|
-
${({$closing:e})=>e&&"pointer-events: none;"}
|
|
1977
|
-
`,bb=n(Lo)`
|
|
1978
|
-
will-change: opacity;
|
|
1979
|
-
animation-name: ${({$closing:e})=>e?wc.out:wc.in};
|
|
1980
|
-
animation-duration: ${({$closing:e})=>e?"180ms":"300ms"};
|
|
1981
|
-
|
|
1982
|
-
/* The blurred backdrop is the most expensive thing on screen during the close
|
|
1983
|
-
— animating opacity on a backdrop-filtered element forces a full GPU
|
|
1984
|
-
recomposite per frame. Drop the blur while closing; visually identical
|
|
1985
|
-
because the overlay is fading to 0. */
|
|
1986
|
-
${({$closing:e})=>e&&"backdrop-filter: none; pointer-events: none;"}
|
|
1987
|
-
`,vb=n.div`
|
|
1988
|
-
position: relative;
|
|
1989
|
-
`,xb=n.div`
|
|
1990
|
-
position: absolute;
|
|
1991
|
-
top: 16px;
|
|
1992
|
-
left: 16px;
|
|
1993
|
-
`,$b=({isOpen:n,hideOverlay:o=!1,relativeToParent:i=!1,onBack:a,onClose:s,onCloseEnd:l,children:c})=>{const[d,u]=jt(n),[p,h]=jt(!1);if(Wt(()=>{n?(u(!0),h(!1)):d&&h(!0)},[n]),Mc(d),!d)return null;const m=t(r,{children:[!o&&e(bb,{$relativeToParent:i,$closing:p,onClick:p?void 0:s}),e(yb,{"data-id":"modal",$relativeToParent:i,$closing:p,onAnimationEnd:e=>{e.target===e.currentTarget&&p&&(u(!1),h(!1),l?.())},children:t(vb,{children:[a&&e(xb,{children:e(Hc,{icon:t=>e(Ft,{rotate:-90,...t}),size:jc.L,onClick:a})}),c]})})]});return i?m:ur(m,document.body)},wb=n.div`
|
|
1994
|
-
position: relative;
|
|
1995
|
-
width: ${64}px;
|
|
1996
|
-
height: ${({$height:e})=>e};
|
|
1997
|
-
flex-shrink: 0;
|
|
1998
|
-
`,Sb=n.aside`
|
|
1999
|
-
position: absolute;
|
|
2000
|
-
top: 0;
|
|
2001
|
-
left: 0;
|
|
2002
|
-
bottom: 0;
|
|
2003
|
-
display: flex;
|
|
2004
|
-
flex-direction: column;
|
|
2005
|
-
gap: 8px;
|
|
2006
|
-
width: ${({$expanded:e})=>e?"220px":"64px"};
|
|
2007
|
-
padding: 16px ${12}px;
|
|
2008
|
-
box-sizing: border-box;
|
|
2009
|
-
background-color: ${({theme:e})=>e.v2.colors.black[500]};
|
|
2010
|
-
overflow-x: hidden;
|
|
2011
|
-
overflow-y: auto;
|
|
2012
|
-
z-index: 10;
|
|
2013
|
-
transition:
|
|
2014
|
-
width 200ms ease,
|
|
2015
|
-
padding 200ms ease;
|
|
2016
|
-
`,Cb=n.button`
|
|
2017
|
-
display: flex;
|
|
2018
|
-
align-items: center;
|
|
2019
|
-
width: 100%;
|
|
2020
|
-
min-width: 0;
|
|
2021
|
-
height: ${40}px;
|
|
2022
|
-
padding: 0;
|
|
2023
|
-
margin: 0;
|
|
2024
|
-
border: none;
|
|
2025
|
-
border-radius: 6px;
|
|
2026
|
-
box-sizing: border-box;
|
|
2027
|
-
cursor: pointer;
|
|
2028
|
-
font: inherit;
|
|
2029
|
-
background-color: ${({theme:e,$selected:t})=>t?e.v2.colors.purple[500]:"transparent"};
|
|
2030
|
-
&:hover {
|
|
2031
|
-
background-color: ${({theme:e,$selected:t})=>t?e.v2.colors.purple[600]:e.v2.colors.silver[800]};
|
|
2032
|
-
}
|
|
2033
|
-
&:active {
|
|
2034
|
-
background-color: ${({theme:e,$selected:t})=>t?e.v2.colors.purple[700]:e.v2.colors.silver[900]};
|
|
2035
|
-
}
|
|
2036
|
-
`,Eb=n.div`
|
|
2037
|
-
width: ${40}px;
|
|
2038
|
-
height: ${40}px;
|
|
2039
|
-
display: flex;
|
|
2040
|
-
align-items: center;
|
|
2041
|
-
justify-content: center;
|
|
2042
|
-
flex-shrink: 0;
|
|
2043
|
-
`,kb=n.div`
|
|
2044
|
-
flex: 1 1 0;
|
|
2045
|
-
min-width: 0;
|
|
2046
|
-
overflow: hidden;
|
|
2047
|
-
padding-right: 12px;
|
|
2048
|
-
pointer-events: none;
|
|
2049
|
-
`,Ab=({height:r,icons:n})=>{const o=i(),[a,s]=jt(!1);return e(wb,{$height:r,children:e(Sb,{$expanded:a,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:n.map(({id:r,label:n,selected:i,icon:s,onClick:l})=>t(Cb,{$selected:i,onClick:l,"aria-label":n,title:a?void 0:n,children:[e(Eb,{children:e(s,{size:24,fill:o.v2.colors.white[500]})}),a&&e(kb,{children:e(uo,{size:io.S,weight:500,color:ao.Primary,nowrap:!0,children:n})})]},r))})})};var Db;!function(e){e.S="small",e.L="large"}(Db||(Db={}));const Tb=n.div`
|
|
2050
|
-
width: fit-content;
|
|
2051
|
-
display: flex;
|
|
2052
|
-
align-items: center;
|
|
2053
|
-
gap: 8px;
|
|
2054
|
-
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
2055
|
-
`,Ib=n.div`
|
|
2056
|
-
width: ${({$size:e})=>e===Db.S?"16px":"20px"};
|
|
2057
|
-
height: ${({$size:e})=>e===Db.S?"16px":"20px"};
|
|
2058
|
-
display: flex;
|
|
2059
|
-
align-items: center;
|
|
2060
|
-
justify-content: center;
|
|
2061
|
-
border-radius: 100%;
|
|
2062
|
-
border: 1px solid ${({$borderColor:e})=>e};
|
|
2063
|
-
background-color: ${({$backgroundColor:e})=>e};
|
|
2064
|
-
`,Nb=({"data-id":r,label:n,value:o,onChange:a,disabled:s,size:l=Db.L})=>{const c=i(),[d,u]=jt(!1),p=o,h=l===Db.S?6:8,m=s?c.v2.colors.grey[400]:c.v2.colors.white[500],g=p?"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]:p?c.v2.colors.purple[500]:c.v2.colors.silver[900];return t(Tb,{"data-id":r??"radio"+(n?`-${n}`:""),onClick:e=>{e.stopPropagation(),s||a(!o)},$disabled:s,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:[e(Ib,{$size:l,$borderColor:g,$backgroundColor:f,children:o?e(Lt,{size:h,fill:m}):null}),n&&e(uo,{size:l===Db.S?io.XXS:io.XS,children:n})]})},Rb=n.div`
|
|
2065
|
-
display: flex;
|
|
2066
|
-
flex-direction: ${({$flexDirection:e})=>e};
|
|
2067
|
-
gap: ${({$gap:e})=>e}px;
|
|
2068
|
-
`,Ob=({label:r,direction:n,disabled:o,size:i,options:a,values:s,setValues:l})=>t(Rb,{$flexDirection:n===Pr.Horizontal?"row":"column",$gap:n===Pr.Horizontal?16:8,children:[r&&e(uo,{children:r}),a.map(t=>e(Nb,{...t,value:s[t.id],onChange:e=>{return r=t.id,n=e,void l(e=>{const t={...e};return Object.keys(t).forEach(e=>t[e]=!1),t[r]=n,t});var r,n},disabled:o,size:i},`${r}-radio-${t.id}`))]}),Pb=({currentStep:r,data:n,gap:o=12})=>e(Po,{$gap:o,children:n.map(n=>{const o=n.step<r,i=n.step===r;return t(Oo,{$gap:8,children:[o||n.forceDoneBadge?e(Jg,{status:Xr.Success,label:"",leftIcon:yt}):e(Jg,{status:Xr.Default,label:n.step.toString()}),e(uo,{size:i?io.M:io.XS,weight:i?500:400,opacity:i?1:.7,children:n.label})]},`stepper-item-${n.step}`)})});var Fb;!function(e){e.Data="data",e.Pretty="pretty"}(Fb||(Fb={}));const _b=n.div`
|
|
2069
|
-
height: ${({$maxHeight:e})=>e};
|
|
2070
|
-
width: 100%;
|
|
2071
|
-
display: flex;
|
|
2072
|
-
flex-direction: column;
|
|
2073
|
-
overflow: hidden;
|
|
2074
|
-
`,Lb=n.div`
|
|
2075
|
-
width: 100%;
|
|
2076
|
-
flex: 1;
|
|
2077
|
-
display: flex;
|
|
2078
|
-
flex-direction: column;
|
|
2079
|
-
`,Mb=n.div`
|
|
2080
|
-
flex-shrink: 0;
|
|
2081
|
-
position: relative;
|
|
2082
|
-
z-index: 2;
|
|
2083
|
-
`,zb=n.div`
|
|
2084
|
-
position: relative;
|
|
2085
|
-
display: flex;
|
|
2086
|
-
width: 100%;
|
|
2087
|
-
`,Bb=n.div`
|
|
2088
|
-
position: relative;
|
|
2089
|
-
min-width: ${({$minWidth:e})=>e?`${e}px`:"auto"};
|
|
2090
|
-
flex: ${({$flex:e})=>e??1};
|
|
2091
|
-
padding: 18px 24px;
|
|
2092
|
-
border: none;
|
|
2093
|
-
border-radius: ${({$isFirst:e,$isLast:t})=>e?"4px 0 0 0":t?"0 4px 0 0":"0"};
|
|
2094
|
-
box-sizing: border-box;
|
|
2095
|
-
|
|
2096
|
-
${({$variant:e,$backgroundColor:t})=>{if(t)return o`
|
|
2097
|
-
background-color: ${t};
|
|
2098
|
-
`;switch(e){case Fb.Data:return o`
|
|
2099
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[750]};
|
|
2100
|
-
`;case Fb.Pretty:return o`
|
|
2101
|
-
background-color: transparent;
|
|
2102
|
-
`;default:return""}}}
|
|
2103
|
-
`,Ub=n.div`
|
|
2104
|
-
position: absolute;
|
|
2105
|
-
top: 50%;
|
|
2106
|
-
right: 0;
|
|
2107
|
-
transform: translateY(-50%);
|
|
2108
|
-
width: 1px;
|
|
2109
|
-
height: 18px;
|
|
2110
|
-
background: ${({theme:e})=>e.v2.colors.silver[500]};
|
|
2111
|
-
`,jb=n.div`
|
|
2112
|
-
min-width: ${({$minWidth:e})=>e?`${e}px`:"auto"};
|
|
2113
|
-
flex: ${({$flex:e})=>e??1};
|
|
2114
|
-
overflow: hidden;
|
|
2115
|
-
display: flex;
|
|
2116
|
-
align-items: center;
|
|
2117
|
-
|
|
2118
|
-
padding: 18px 24px;
|
|
2119
|
-
cursor: ${({$withClick:e})=>e?"pointer":"default"};
|
|
2120
|
-
box-sizing: border-box;
|
|
2121
|
-
|
|
2122
|
-
${({$variant:e,$selected:t,$hovered:r,$isLastRow:n,$isFirstCell:i,$isLastCell:a})=>{switch(e){case Fb.Data:return o`
|
|
2123
|
-
border-bottom: ${({theme:e})=>n?"none":`1px solid ${e.v2.colors.silver[500]}`};
|
|
2124
|
-
border-radius: ${n?i?"0 0 0 4px":a?"0 0 4px 0":"0":"0"};
|
|
2125
|
-
background-color: ${({theme:e})=>t?e.v2.colors.blue[1e3]:r?e.v2.colors.silver[700]:e.v2.colors.silver[800]};
|
|
2126
|
-
`;case Fb.Pretty:return o`
|
|
2127
|
-
border: none;
|
|
2128
|
-
border-radius: ${i?"12px 0 0 12px":a?"0 12px 12px 0":"0"};
|
|
2129
|
-
background-color: ${({theme:e})=>t?e.v2.colors.blue[1e3]:r?e.v2.colors.silver[700]:e.v2.colors.silver[900]};
|
|
2130
|
-
`;default:return""}}}
|
|
2131
|
-
`,Wb=n.div`
|
|
2132
|
-
width: 100%;
|
|
2133
|
-
display: flex;
|
|
2134
|
-
align-items: center;
|
|
2135
|
-
justify-content: ${({$textAlign:e})=>"right"===e?"flex-end":"left"===e?"flex-start":"center"===e?"center":"unset"};
|
|
2136
|
-
gap: 4px;
|
|
2137
|
-
text-align: ${({$textAlign:e})=>e||"left"};
|
|
2138
|
-
`,Hb=({variant:r,columns:n,rows:o,getRowActions:i,rowActionsPushRightPosition:a,rowActionsPushLeftPosition:s,withCheckboxes:l})=>{const[c,d]=jt(null),u=Xt(()=>o.map((u,p)=>{const{cells:h,onClick:m,isSelected:g=!1,onSelect:f,onDeselect:y,hideCheckbox:b}=u,v=c===p,x=i(u),$=(e,t)=>({$isLastRow:p===o.length-1,$isFirstCell:e,$isLastCell:t,$selected:g,$withClick:!!m,onClick:()=>m?.(),$hovered:!!m&&v,onMouseEnter:()=>d(p),onMouseLeave:()=>d(null)});return t(zb,{children:[l&&e(jb,{$variant:r,style:{flex:"0 0 68px"},...$(!0,!1),children:!b&&e(Cf,{value:g,onChange:()=>g?y?.():f?.()})},"checkbox-column"),n.map(({key:o,withTooltip:i,textAlign:c,flex:d,minWidth:u},m)=>{const g=h.find(e=>e.key===o),f=0===m&&!l,y=m===n.length-1,b=x.length&&(a&&y||s&&f||!a&&!s&&y),w=e(Oo,{$width:"100%",$justifyContent:"right"===c?"flex-end":"center"===c?"center":"flex-start",children:g?.component?e(g.component,{}):e(uo,{size:io.XS,children:g?.rawValue||"-"})});return t(jb,{$variant:r,$flex:d,$minWidth:u,...$(f,y),children:[i?e(Bd,{text:g?.rawValue?.toString()||"",ellipsis:!0,children:w}):w,b?e(lb,{isOpen:v,actions:x,positionRight:a,positionLeft:s}):null]},`row-${p}-cell-${m}`)})]},`row-${p}`)}),[o,c,i,a,s,l,n]);return e(Ug,{gap:r===Fb.Pretty?8:0,elements:u})},Xb=({columnKey:t,sortDirection:r,sortByKey:n,onSort:o})=>{const a=i(),s=n===t?a.v2.colors.white[500]:a.v2.colors.grey[400],l=r===Fr.Ascending?0:180;return e(Hc,{icon:t=>e(Ft,{fill:s,rotate:l,...t}),onClick:()=>o(t)})},Gb=({columnKey:t,filters:r,onFilter:n,rowsUnfiltered:o,filterOverride:a})=>{const s=i(),l=r[t]?.length?s.v2.colors.white[500]:s.v2.colors.grey[400],c=Xt(()=>{if(a)return a.options.map(({id:e,label:t})=>({id:e,label:t,withCheckbox:!0}));return Array.from(new Set(o.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}))},[o,t,a]);return e(Of,{items:c,withMultiSelect:!0,selectedIds:r[t]?.map(e=>e.toString())??[],setSelectedIds:e=>n(t,e),defaultOpen:!1,iconButtonProps:{icon:t=>e(Mt,{fill:l,...t})}})},Kb=({variant:r,backgroundColor:n,columns:o,rowsUnfiltered:i,sortDirection:a,sortByKey:s,onSort:l,filters:c,onFilter:d,withCheckboxes:u,partiallySelected:p,allSelected:h,onSelectAll:m})=>t(zb,{children:[u&&e(Bb,{$variant:r,$backgroundColor:n,$isFirst:!0,$isLast:!1,style:{flex:"0 0 68px"},children:e(Cf,{partiallyChecked:p&&!h,value:h||!1,onChange:m})},"checkbox-column"),o.map(({key:p,label:h,withTooltip:m,tooltip:g,noSort:f,noFilter:y,filterOverride:b,flex:v,minWidth:x,textAlign:$},w)=>{const S=0===w&&!u,C=w===o.length-1,E=e(uo,{size:io.XS,align:$,children:h});return t(Bb,{$variant:r,$backgroundColor:n,$flex:v,$minWidth:x,$isFirst:S,$isLast:C,children:[t(Wb,{$textAlign:$,children:[g||m?e(Bd,{text:g||h,children:E}):E,!f&&e(Xb,{columnKey:p,sortDirection:a,sortByKey:s,onSort:l}),!y&&e(Gb,{columnKey:p,filters:c,onFilter:d,rowsUnfiltered:i,filterOverride:b})]}),!C&&r===Fb.Data&&e(Ub,{})]},`column-${p}`)})]}),Vb=({variant:r,maxHeight:n="256px",headerBackgroundColor:o,hideHeader:i=!1,isLoading:a,noDataProps:s,columns:l,rows:c,getRowActions:d,rowActionsPushRightPosition:u,rowActionsPushLeftPosition:p,withCheckboxes:h,filters:m,onFiltersChange:g})=>{const[f,y]=jt(Fr.Ascending),[b,v]=jt(""),[x,$]=jt({}),w=m??x,S=Gt(e=>{v(e),y(e=>e===Fr.Ascending?Fr.Descending:Fr.Ascending)},[]),C=Gt((e,t)=>{const r={...w,[e]:t};g&&g(r),void 0===m&&$(r)},[w,g,m]),E=Xt(()=>{const e=(e,t)=>{const r=e.cells.find(e=>e.key===t);return r&&(r.rawValue?.toString()||r.component?.({})?.props?.children?.toString())||""};return(b?[...c].sort((t,r)=>{const n=e(t,b),o=e(r,b);return(f===Fr.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)))(n,o)}):c).filter(t=>{for(const[r,n]of Object.entries(w)){if(!n.length)continue;const o=l.find(e=>e.key===r)?.filterOverride;if(o){if(!o.filterRow(t,n))return!1}else if(!n.includes(e(t,r)))return!1}return!0})},[c,b,f,w,l]),{partiallySelected:k,allSelected:A}=Xt(()=>{const e=E.filter(e=>!e.hideCheckbox);return{partiallySelected:e.length>0&&e.some(e=>e.isSelected),allSelected:e.length>0&&e.every(e=>e.isSelected)}},[E]);return e(_b,{$maxHeight:n,children:t(Lb,{$variant:r,children:[!i&&e(Mb,{children:e(Kb,{variant:r,backgroundColor:o,columns:l,rowsUnfiltered:c,sortDirection:f,sortByKey:b,onSort:S,filters:w,onFilter:C,withCheckboxes:h,partiallySelected:k,allSelected:A,onSelectAll:e=>{e?E.forEach(e=>!e.hideCheckbox&&e.onSelect?.()):E.forEach(e=>!e.hideCheckbox&&e.onDeselect?.())}})}),E.length?e(Hb,{variant:r,columns:l,rows:E,getRowActions:d||(()=>[]),rowActionsPushRightPosition:u,rowActionsPushLeftPosition:p,withCheckboxes:h}):e(Fo,{style:{height:n},children:a?e(Xo,{withSpinner:!0}):e(xf,{...s})})]})})},Jb=n.div`
|
|
2139
|
-
display: flex;
|
|
2140
|
-
align-items: center;
|
|
2141
|
-
justify-content: center;
|
|
2142
|
-
gap: 8px;
|
|
2143
|
-
padding: 8px;
|
|
2144
|
-
border-radius: 6px;
|
|
2145
|
-
|
|
2146
|
-
${({$flex:e})=>e?o`
|
|
2147
|
-
flex: ${e};
|
|
2148
|
-
`:o`
|
|
2149
|
-
width: fit-content;
|
|
2150
|
-
`}
|
|
2151
|
-
|
|
2152
|
-
${({$disabled:e,$withClick:t})=>e?o`
|
|
2153
|
-
cursor: not-allowed;
|
|
2154
|
-
background-color: ${({theme:e})=>e.v2.colors.grey[800]};
|
|
2155
|
-
border: 1px solid transparent;
|
|
2156
|
-
`:t?o`
|
|
2157
|
-
cursor: pointer;
|
|
2158
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[750]};
|
|
2159
|
-
&:hover {
|
|
2160
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[600]};
|
|
2161
|
-
}
|
|
2162
|
-
&:active {
|
|
2163
|
-
background-color: ${({theme:e})=>e.v2.colors.purple[900]};
|
|
2164
|
-
border: 1px solid ${({theme:e})=>e.v2.colors.purple[400]};
|
|
2165
|
-
}
|
|
2166
|
-
`:o`
|
|
2167
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[750]};
|
|
2168
|
-
border: 1px solid transparent;
|
|
2169
|
-
`}
|
|
2170
|
-
`,qb=({label:r,leftIcon:n,rightIcon:o,onClick:a,disabled:s,flex:l})=>{const c=i(),d=s?c.v2.colors.grey[400]:c.v2.colors.white[500];return t(Jb,{$disabled:s,$withClick:!!a,onClick:()=>!s&&a?.(),$flex:l,children:[n&&e(n,{fill:d,size:16}),e(uo,{color:d,size:io.XS,nowrap:!0,children:r}),o&&e(o,{fill:d,size:16})]})},Yb=n.div`
|
|
2171
|
-
padding: 6px 12px;
|
|
2172
|
-
|
|
2173
|
-
display: flex;
|
|
2174
|
-
align-self: stretch;
|
|
2175
|
-
align-items: flex-start;
|
|
2176
|
-
gap: 8px;
|
|
2177
|
-
border-radius: 6px;
|
|
2178
|
-
|
|
2179
|
-
border: 1px solid ${({theme:e,$disabled:t,$error:r})=>t?e.v2.colors.grey[600]:r?e.v2.colors.red[500]:e.v2.colors.silver[500]};
|
|
2180
|
-
background: ${({theme:e,$disabled:t})=>t?e.v2.colors.grey[800]:e.v2.colors.black[500]};
|
|
2181
|
-
${({$disabled:e,$error:t})=>!e&&!t&&o`
|
|
2182
|
-
&:hover,
|
|
2183
|
-
&:active,
|
|
2184
|
-
&:focus-within {
|
|
2185
|
-
border: 1px solid ${({theme:e})=>e.v2.colors.silver[300]};
|
|
2186
|
-
}
|
|
2187
|
-
`}
|
|
2188
|
-
`,Qb=n.textarea`
|
|
2189
|
-
max-width: ${({$maxWidth:e})=>e||"unset"};
|
|
2190
|
-
min-height: ${({$minHeight:e})=>e||"50px"};
|
|
2191
|
-
flex: 1;
|
|
2192
|
-
font-family: ${({theme:e})=>e.font_family.primary};
|
|
2193
|
-
font-size: 14px;
|
|
2194
|
-
font-weight: 400;
|
|
2195
|
-
resize: none;
|
|
2196
|
-
|
|
2197
|
-
background: transparent;
|
|
2198
|
-
border: none;
|
|
2199
|
-
outline: none;
|
|
2200
|
-
cursor: text;
|
|
2201
|
-
color: ${({theme:e})=>e.v2.colors.white[500]};
|
|
2202
|
-
&::placeholder {
|
|
2203
|
-
color: ${({theme:e})=>e.v2.colors.silver[600]};
|
|
2204
|
-
}
|
|
2205
|
-
|
|
2206
|
-
&:disabled {
|
|
2207
|
-
cursor: not-allowed;
|
|
2208
|
-
color: ${({theme:e})=>e.v2.colors.grey[400]};
|
|
2209
|
-
&::placeholder {
|
|
2210
|
-
color: ${({theme:e})=>e.v2.colors.grey[400]};
|
|
2211
|
-
}
|
|
2212
|
-
}
|
|
2213
|
-
`,Zb=({label:r,required:n,tooltip:o,badge:i,errorMessage:a,warnMessage:s,helpMessage:l,name:c,value:d,onChange:u,disabled:p,maxWidth:h,minHeight:m,...g})=>{const f=Ht(null),y=()=>{f.current&&(f.current.style.height="auto",f.current.style.height=`${f.current.scrollHeight}px`)};return t(Po,{$gap:6,children:[e(Qg,{label:r,tooltip:o,required:n,badge:i}),e(Yb,{$disabled:p,$error:!!a,children:e(Qb,{ref:f,"data-id":c,name:c,value:d,onChange:e=>{e.stopPropagation(),y(),u?.(e)},onKeyDown:e=>{e.stopPropagation()},onFocus:y,onBlur:y,disabled:p,$maxWidth:h,$minHeight:m,...g})}),e(Zg,{errorMessage:a,warnMessage:s,helpMessage:l})]})},ev=[{id:"ms",label:"milliseconds"},{id:"s",label:"seconds"},{id:"m",label:"minutes"},{id:"h",label:"hours"}],tv=n.div`
|
|
2214
|
-
flex: 1;
|
|
2215
|
-
min-width: 0;
|
|
2216
|
-
`,rv=n.div`
|
|
2217
|
-
flex: 0 0 auto;
|
|
2218
|
-
min-width: 140px;
|
|
2219
|
-
`,nv=({name:r,label:n,tooltip:o,badge:i,placeholder:a,required:s,disabled:l,value:c,setValue:d,units:u=ev,defaultUnit:p,errorMessage:h,warnMessage:m,helpMessage:g,hasError:f,width:y})=>{const b=Xt(()=>p&&u.some(e=>e.id===p)?p:u[0]?.id||"s",[p,u]),{num:v,unit:x}=Xt(()=>((e,t,r)=>{if(null==e||""===e)return{num:"",unit:r};const n=[...t.map(e=>e.id)].sort((e,t)=>t.length-e.length),o=new RegExp(`^\\s*(\\d+)\\s*(${n.join("|")})\\s*$`,"i"),i=String(e).match(o);if(i)return{num:i[1],unit:i[2].toLowerCase()};const a=String(e).match(/^\s*(\d+)\s*$/);return a?{num:a[1],unit:r}:{num:"",unit:r}})(c,u,b),[c,u,b]),$=(e,t)=>{d(""!==e?`${e}${t}`:"")};return t(Po,{$width:y,$gap:6,children:[e(Qg,{label:n,tooltip:o,required:s,badge:i}),t(Oo,{$gap:8,$alignItems:"center",children:[e(tv,{children:e(nf,{name:r,placeholder:a,disabled:l,hasError:f||!!h,inputMode:"numeric",value:v,onChange:e=>$(mi(e.target.value),x)})}),e(rv,{children:e(nb,{name:`${r}-unit`,disabled:l,hasError:f||!!h,withSearch:!1,options:u,values:[x],setValues:e=>$(v,e[0]||x)})})]}),e(Zg,{errorMessage:h,warnMessage:m,helpMessage:g})]})},ov=n.div`
|
|
2220
|
-
min-width: 500px;
|
|
2221
|
-
`,iv=n.div`
|
|
2222
|
-
display: flex;
|
|
2223
|
-
flex-direction: column;
|
|
2224
|
-
align-items: center;
|
|
2225
|
-
gap: 16px;
|
|
2226
|
-
padding: 24px;
|
|
2227
|
-
width: calc(100% - 48px);
|
|
2228
|
-
`,av=n.div`
|
|
2229
|
-
display: flex;
|
|
2230
|
-
justify-content: center;
|
|
2231
|
-
gap: 16px;
|
|
2232
|
-
padding: 16px 24px;
|
|
2233
|
-
width: calc(100% - 48px);
|
|
2234
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
|
|
2235
|
-
`,sv=({visual:r,title:n,description:o,isOpen:i,onClose:a,denyButton:s,approveButton:l,children:c,...d})=>e($b,{isOpen:i,onClose:a,...d,children:t(ov,{children:[t(iv,{children:[r&&e(r,{}),e(uo,{size:io.M,weight:500,color:ao.Primary,children:n}),e(Po,{$alignItems:"center",$gap:4,children:o.split("\n").map(t=>e(uo,{size:io.XS,weight:400,color:ao.Secondary,children:t},t))}),c]}),(s||l)&&t(av,{children:[s&&e(bf,{"data-id":"deny",...s}),l&&e(bf,{"data-id":"approve",...l})]})]})});export{lb as $,Bf as A,ff as B,Su as C,Jf as D,Ur as E,Po as F,An as G,Pg as H,Wd as I,hg as J,su as K,Rm as L,eg as M,xf as N,ci as O,Od as P,ju as Q,Kr as R,Xr as S,Pc as T,Ko as U,Tu as V,ti as W,Xu as X,hp as Y,gp as Z,pg as _,gf as a,sv as a$,xr as a0,ii as a1,gi as a2,Ly as a3,Ry as a4,Oy as a5,bf as a6,uo as a7,ao as a8,io as a9,ri as aA,mb as aB,Tr as aC,cb as aD,Wr as aE,Ar as aF,Mp as aG,xn as aH,Zb as aI,vr as aJ,Vp as aK,Jy as aL,hn as aM,pi as aN,hi as aO,yi as aP,on as aQ,an as aR,ln as aS,fn as aT,gn as aU,sn as aV,nn as aW,Qp as aX,jl as aY,_n as aZ,jp as a_,Bd as aa,uf as ab,af as ac,of as ad,zr as ae,Vb as af,Fb as ag,Xo as ah,mf as ai,Jg as aj,ld as ak,Jl as al,Dn as am,od as an,Qo as ao,en as ap,Mu as aq,Zm as ar,au as as,Ln as at,Dr as au,Qg as av,Cf as aw,Zg as ax,nf as ay,Hr as az,Fo as b,oi as b$,gm as b0,om as b1,is as b2,fa as b3,Na as b4,Ea as b5,as as b6,os as b7,Gi as b8,Ki as b9,Iy as bA,On as bB,Fc as bC,ui as bD,Er as bE,ei as bF,En as bG,qb as bH,Kn as bI,Ii as bJ,_i as bK,Ri as bL,Fi as bM,mm as bN,Ll as bO,zl as bP,ya as bQ,Pi as bR,Ml as bS,hs as bT,ps as bU,fs as bV,gs as bW,ds as bX,cs as bY,Ni as bZ,Za as b_,Qf as ba,na as bb,Ci as bc,Ei as bd,Ai as be,nb as bf,Hc as bg,jc as bh,Di as bi,Bn as bj,Zo as bk,Ti as bl,pd as bm,cd as bn,Vr as bo,_r as bp,oo as bq,ud as br,dd as bs,ic as bt,bm as bu,rc as bv,Sn as bw,wn as bx,jn as by,Ro as bz,tc as c,bl as c$,Of as c0,Df as c1,Af as c2,_l as c3,Eh as c4,vs as c5,Yh as c6,Rs as c7,Os as c8,Ps as c9,Gs as cA,Hs as cB,Xs as cC,js as cD,Ws as cE,Us as cF,qs as cG,Ys as cH,Vs as cI,Js as cJ,Ks as cK,Zs as cL,el as cM,Qs as cN,Nb as cO,Db as cP,$s as cQ,$l as cR,wl as cS,Sl as cT,xl as cU,El as cV,kl as cW,Al as cX,Dl as cY,Tl as cZ,Cl as c_,Fs as ca,Ls as cb,_s as cc,Ms as cd,To as ce,Il as cf,Nl as cg,Rl as ch,Ol as ci,Pl as cj,Fl as ck,xs as cl,ws as cm,Ss as cn,Cs as co,ks as cp,Es as cq,Ds as cr,As as cs,Is as ct,Ts as cu,Ns as cv,ys as cw,bs as cx,zs as cy,Bs as cz,td as d,oa as d$,vl as d0,cl as d1,em as d2,gl as d3,fl as d4,yl as d5,ul as d6,hl as d7,pl as d8,tl as d9,Un as dA,ec as dB,$f as dC,ac as dD,jf as dE,rn as dF,Hn as dG,Ug as dH,Kg as dI,Wn as dJ,In as dK,Uc as dL,vn as dM,Cr as dN,Sr as dO,cc as dP,Up as dQ,$n as dR,Hf as dS,Uf as dT,no as dU,xy as dV,cn as dW,ty as dX,gy as dY,oy as dZ,No as d_,rl as da,nl as db,ol as dc,il as dd,al as de,sl as df,ll as dg,dl as dh,ml as di,$b as dj,sd as dk,Io as dl,ym as dm,Kp as dn,Lp as dp,Yp as dq,fb as dr,Pb as ds,Zl as dt,Cn as du,Zc as dv,Ul as dw,rd as dx,zc as dy,Xn as dz,fp as e,ia as e$,ja as e0,zi as e1,Li as e2,Mi as e3,Bi as e4,kh as e5,Zh as e6,rm as e7,nm as e8,Wh as e9,Zi as eA,Ta as eB,Da as eC,ha as eD,$a as eE,Aa as eF,_a as eG,ga as eH,Pa as eI,da as eJ,Ji as eK,ua as eL,ca as eM,qi as eN,pa as eO,Ha as eP,la as eQ,Ua as eR,Xa as eS,Wa as eT,Ga as eU,Ka as eV,Ia as eW,Yi as eX,Qi as eY,ta as eZ,ra as e_,Bh as ea,hh as eb,ph as ec,uh as ed,Hh as ee,Uh as ef,Ih as eg,qh as eh,ss as ei,Qa as ej,qa as ek,Ya as el,Ja as em,Va as en,Ah as eo,Dh as ep,Th as eq,rs as er,ns as es,ts as et,es as eu,ed as ev,nv as ew,Sa as ex,ea as ey,wa as ez,yd as f,qn as f$,sa as f0,aa as f1,Ui as f2,ji as f3,Vi as f4,Ra as f5,Oa as f6,La as f7,Bl as f8,Wi as f9,Or as fA,Pr as fB,Nr as fC,tn as fD,jr as fE,Lr as fF,pn as fG,un as fH,dn as fI,Jr as fJ,bn as fK,yn as fL,mn as fM,Fr as fN,Ir as fO,Co as fP,So as fQ,Ao as fR,fr as fS,yr as fT,Tn as fU,Nn as fV,Fn as fW,$r as fX,Mn as fY,Gn as fZ,Jn as f_,vh as fa,Oi as fb,Mh as fc,Lh as fd,_h as fe,ba as ff,ma as fg,dh as fh,ch as fi,lh as fj,Zp as fk,va as fl,Ma as fm,xa as fn,ka as fo,za as fp,Pf as fq,Fa as fr,wo as fs,kr as ft,Qr as fu,Rr as fv,Zr as fw,Yr as fx,Mr as fy,Gr as fz,Rn as g,Vu as g$,Yn as g0,Qn as g1,Zn as g2,eo as g3,to as g4,ro as g5,Vo as g6,ni as g7,ai as g8,li as g9,Qc as gA,Lc as gB,Mc as gC,Gc as gD,Vc as gE,qc as gF,fd as gG,ad as gH,xm as gI,$m as gJ,Wu as gK,wp as gL,bp as gM,Ec as gN,Tc as gO,hu as gP,ig as gQ,sp as gR,Ig as gS,Cg as gT,Lm as gU,_g as gV,Nu as gW,du as gX,Em as gY,Zu as gZ,qu as g_,di as ga,mi as gb,fi as gc,bi as gd,vi as ge,wr as gf,xi as gg,$i as gh,wi as gi,ki as gj,Ba as gk,ms as gl,us as gm,ls as gn,Xi as go,Hi as gp,Wl as gq,Hl as gr,Xl as gs,Ca as gt,Gl as gu,Kl as gv,gc as gw,Sc as gx,yc as gy,mc as gz,Bc as h,zg as h0,kd as h1,Mo as h2,tp as h3,Lo as h4,Jm as h5,Ku as h6,yg as h7,zo as h8,Bo as h9,Uo as ha,fu as hb,_o as hc,Nc as hd,Rc as he,Oc as hf,Mf as hg,zf as hh,kf as hi,Ey as hj,ev as hk,iy as hl,ab as hm,Ab as hn,Ob as ho,qf as hp,zy as hq,Ny as hr,Br as i,Oo as j,fc as k,Go as l,qr as m,kn as n,Yo as o,zn as p,Pn as q,rb as r,Dd as s,Yl as t,Xc as u,Si as v,Tp as w,Qd as x,ql as y,Yc as z};
|