import{u as n,h as i,m as r,p as C,aC as F,y as d,a as c,e as S,H as f,b as u,q as N,f as M,aY as b,aD as E,n as P,l as R}from"./index-BKr2rJhV.js";import{m as g}from"./theme-colors-BFneJNsI.js";import{c as A}from"./countBy-DcWJUjKY.js";import{c as H}from"./complement-DGLuzEAM.js";import{w as l}from"./whereEq-B89ULFn6.js";import{a as m}from"./any-Db6pVWyk.js";const O=t=>g[t%g.length],I="Feature monitoring configurations can only be created or edited using the Hopsworks Python library.",Y=({featureName:t,statisticsComparisonConfigs:s})=>{const e=s==null?void 0:s[0];if(!e)return"";const o=e.metric??e.distributionMetric;return o?`?configs=${encodeURIComponent(JSON.stringify([{"config-feature":`${t}.${e.id}.${o}`,color:O(0)}]))}`:""},_=(t,s=[])=>e=>{const o=M(u("id",t),e??[]);if(!o)return[];const p=o.featureStatisticsConfigs??[];return p.length===0?s.map(a=>({featureName:a,config:{metric:"MEAN"}})):p.flatMap(({featureName:a,statisticsComparisonConfigs:h})=>(h??[{metric:"MEAN"}]).map(y=>({featureName:a,config:y})))},v=(t,s)=>m(b(m(u("featureName",t)),"featureStatisticsConfigs"))(s),G=t=>i(f(i(s=>s.featureStatisticsConfigs??[],m(l({featureName:t})))),r(S({featureStatisticsConfigs:M(l({featureName:t}))}))),j=n(i(r(i(c([],"featureStatisticsResults"),r(S({statisticsComparisonResults:i(f(u("shiftDetected",!0)))})),f(i(c([],"statisticsComparisonResults"),H(N))))),(t=>t.flat()),d(t=>t.featureName),r(i(r(i(t=>t.statisticsComparisonResults,n(r(C("statisticsComparisonConfigId"))))),t=>t.flat(),A(F)))));n(i(r(C("statisticsComparisonConfigs")),(t=>t.flat()),P(R),d(t=>String(t==null?void 0:t.id)),r(i(E,t=>(t==null?void 0:t.distributionMetric)??(t==null?void 0:t.metric)))));export{I as F,j as a,Y as b,G as c,_ as e,v as f,O as g};
