@datarecce/ui 1.46.0-nightly.20260428 → 1.46.0
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/dist/advanced.d.ts +2 -2
- package/dist/advanced.js +1 -1
- package/dist/advanced.js.map +1 -1
- package/dist/components-run.js +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/components.js +1 -1
- package/dist/{hooks-AAVgIiqs.js → hooks-Il_UWbPS.js} +3 -3
- package/dist/hooks-Il_UWbPS.js.map +1 -0
- package/dist/hooks.d.ts +2 -2
- package/dist/hooks.js +1 -1
- package/dist/{index-CvaSvmdN.d.ts → index-CM0J0dSs.d.ts} +8 -15
- package/dist/index-CM0J0dSs.d.ts.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/{lineage-DHtCE9gx.d.ts → lineage-BANDXeKr.d.ts} +37 -3
- package/dist/lineage-BANDXeKr.d.ts.map +1 -0
- package/dist/primitives.js +1 -1
- package/dist/result.js +1 -1
- package/dist/src-DaZ7zHjP.js +12 -0
- package/dist/src-DaZ7zHjP.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/utils-Cpt1f5aU.js.map +1 -1
- package/package.json +1 -1
- package/dist/hooks-AAVgIiqs.js.map +0 -1
- package/dist/index-CvaSvmdN.d.ts.map +0 -1
- package/dist/lineage-DHtCE9gx.d.ts.map +0 -1
- package/dist/src-DJN3ojqS.js +0 -12
- package/dist/src-DJN3ojqS.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-CvaSvmdN.d.ts","names":[],"sources":["../src/components/ui/mui-provider.tsx","../src/hooks/CheckContextAdapter.tsx","../src/hooks/LineageGraphAdapter.tsx","../src/hooks/QueryContextAdapter.tsx","../src/hooks/RecceActionAdapter.tsx","../src/hooks/RecceContextProvider.tsx","../src/hooks/RecceShareStateContext.tsx","../src/hooks/ScreenShot.tsx","../src/hooks/useApiConfig.ts","../src/hooks/useAvatar.ts","../src/hooks/useCheckEvents.ts","../src/hooks/useClipBoardToast.tsx","../src/hooks/useCountdownToast.tsx","../src/hooks/useCSVExport.ts","../src/hooks/useFeedbackCollectionToast.tsx","../src/hooks/useGuideToast.tsx","../src/hooks/useIsDark.ts","../src/hooks/useModelColumns.tsx","../src/hooks/useMultiNodesAction.ts","../src/hooks/useRun.tsx","../src/hooks/useValueDiffAlertDialog.tsx"],"mappings":";;;;;;;;;;;;UAQU,gBAAA;EACR,QAAA,EAAU,SAAA;;;;EAIV,WAAA;;;;;EAKA,iBAAA;AAAA;;;AAbgD;;;;;;;;;;AA8BlD;;iBAAgB,WAAA,CAAA;EACd,QAAA;EACA,WAAA;EACA;AAAA,GACC,gBAAA,GAAgB,oBAAA,CAAA,GAAA,CAAA,OAAA;;;UClCT,wBAAA;EACR,QAAA,EAAU,SAAA;AAAA;;;;;;UAQK,eAAA;EACf,qBAAA;EACA,wBAAA,GAA2B,OAAA;AAAA;;;ADXqB;;;;;;;;iBCwBlC,mBAAA,CAAA;EAAsB;AAAA,GAAY,wBAAA,GAAwB,oBAAA,CAAA,GAAA,CAAA,OAAA;;ADM1E;;;iBCqBgB,oBAAA,CAAA,GAAwB,eAAA;;;UC+L9B,wBAAA;EACR,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;;;;;;;;;;;;AFnPgC;iBEkQlC,mBAAA,CAAA;EAAsB;AAAA,GAAY,wBAAA,GAAwB,oBAAA,CAAA,GAAA,CAAA,OAAA;;;UClQhE,wBAAA;EACR,QAAA,EAAU,SAAA;AAAA;AAAA,cAGC,eAAA;;;;;;UAOI,eAAA;EACf,QAAA;EACA,WAAA,GAAc,GAAA;EACd,WAAA;EACA,cAAA,GAAiB,GAAA;EACjB,eAAA;EACA,gBAAA,GAAmB,QAAA;EACnB,YAAA;EACA,eAAA,GAAkB,GAAA;AAAA;;;;;;AHWpB;;;;;;;iBGIgB,mBAAA,CAAA;EAAsB;AAAA,GAAY,wBAAA,GAAwB,oBA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0D;EgBtIxE,KAAA;AAAA;;;;;;;;;;Af/H+C;;;;;AAOjD;;;;;AAOA;;;;;;;;;;;;;;;;;;AAuBA;ce+Ia,mBAAA,GACX,KAAA,EAAO,gBAAA,IACP,OAAA,EAAS,0BAAA,KACR,yBAAA;;;UChLc,YAAA;EACf,GAAA,GAAM,GAAA;EACN,QAAA;EACA,SAAA;EACA,KAAA,EAAO,KAAA;EACP,QAAA,QAAgB,OAAA;EAChB,aAAA,GAAgB,aAAA;AAAA;AAAA,cAGL,MAAA,GAAU,KAAA,cAAiB,YAAA;;;;;;UCOvB,8BAAA;;EAEf,SAAA,IAAa,SAAA;;EAEb,QAAA,IAAY,SAAA;AAAA;;;;UAMG,6BAAA;;EAEf,OAAA,GAAU,SAAA,aAAsB,OAAA;EpB7BR;EoB+BxB,WAAA,EAAa,GAAA,CAAI,OAAA;AAAA;;;;;;;ApBJnB;;;;;;;;;;;;;;;;;;;;;;;;ACjCiD;;;;;AAYjD;;;;;;;;;AAeA;;;;;;;;iBmBiEgB,uBAAA,CACd,OAAA,GAAU,8BAAA,GACT,6BAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lineage-DHtCE9gx.d.ts","names":[],"sources":["../src/components/lineage/computeColumnLineage.ts","../src/components/lineage/config/zoomConstants.ts","../src/components/app/EnvInfo.tsx","../src/components/app/MainLayout.tsx","../src/components/check/CheckDetailOss.tsx","../src/components/check/CheckEmptyStateOss.tsx","../src/components/check/CheckListOss.tsx","../src/components/check/CheckPageContentOss.tsx","../src/components/check/CheckPageLoadingOss.tsx","../src/components/errorboundary/ErrorBoundary.tsx","../src/components/histogram/HistogramDiffForm.tsx","../src/components/histogram/HistogramResultView.tsx","../src/components/lineage/LineagePageOss.tsx","../src/components/lineage/NodeView.tsx","../src/components/lineage/styles.tsx","../src/components/notifications/LineageViewNotification.tsx","../src/components/onboarding-guide/Notification.tsx","../src/components/profile/ProfileDiffForm.tsx","../src/components/profile/ProfileResultView.tsx","../src/components/query/QueryDiffResultView.tsx","../src/components/query/QueryForm.tsx","../src/components/query/QueryPageOss.tsx","../src/components/query/QueryResultView.tsx","../src/components/query/SetupConnectionGuide.tsx","../src/components/query/SqlEditor.tsx","../src/components/rowcount/RowCountResultView.tsx","../src/components/schema/ColumnNameCell.tsx","../src/components/schema/SchemaView.tsx","../src/components/shared/HistoryToggle.tsx","../src/components/summary/types.ts","../src/components/summary/ChangeSummary.tsx","../src/components/summary/SchemaSummary.tsx","../src/components/summary/utils.ts","../src/components/timeout/IdleTimeoutBadge.tsx","../src/components/top-k/TopKDiffForm.tsx","../src/components/top-k/TopKDiffResultView.tsx","../src/components/ui/DataTypeIcon/classifyType.ts","../src/components/ui/DataTypeIcon/tooltipText.ts","../src/components/ui/DataTypeIcon/index.tsx","../src/components/ui/SquareIcon.tsx","../src/components/valuediff/ValueDiffDetailResultView.tsx","../src/components/valuediff/ValueDiffForm.tsx","../src/components/valuediff/ValueDiffResultView.tsx","../src/components/views/ChecksView.tsx","../src/providers/contexts/ThemeContext.tsx","../src/index.ts","../src/components/lineage/lineage.ts"],"mappings":";;;;;;;;;;;;;;;;;;UAEiB,gBAAA;EACf,MAAA;EACA,UAAA;EACA,kBAAA;EACA,YAAA;AAAA;;;;;;;;;;;;;;;;;;;cCWW,gBAAA;;cAGA,gBAAA;;cAGA,gBAAA;;cAGA,UAAA;;;iBC2EG,OAAA,CAAA,GAAO,oBAAA,CAAA,GAAA,CAAA,OAAA;;;UCzEb,eAAA;EACR,QAAA,EAAU,SAAA;;EAEV,OAAA,EAAS,SAAA;AAAA;AAAA,iBA4BK,UAAA,CAAA;EAAa,QAAA;EAAU;AAAA,GAAW,eAAA,GAAe,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,UAqCvD,SAAA;EACR,QAAA,EAAU,SAAA;EACV,OAAA,EAAS,SAAA;EACT,cAAA;;EAEA,sBAAA;AAAA;AAAA,iBAGc,IAAA,CAAA;EACd,QAAA;EACA,OAAA;EACA,cAAA;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MAAA,EAAQ,UAAA;EACR,SAAA,EAAW,aAAA;EACX,KAAA,EAAO,SAAA;EACP,eAAA,EAAiB,mBAAA;EACjB,aAAA,EAAe,iBAAA;EACf,gBAAA;EACA,QAAA;EACA,SAAA;EACA,mBAAA;EACA,YAAA;EACA,aAAA;EACA,YAAA;EACA,iBAAA;EACA,mBAAA;EACA,eAAA;EACA,uBAAA;EACA,MAAA;EACA,YAAA;EACA,WAAA;EACA,WAAA;EACA,SAAA;EACA;AAAA,GACC,eAAA,GAAe,oBAAA,CAAA,GAAA,CAAA,OAAA;;;;cAuML,UAAA,EAAU,OAAA,CAAA,mBAAA,QAAA,mBAAA;;;;;;KC/YlB,SAAA;;;;UAKK,iBAAA;EACR,IAAA,EAAM,SAAA;EACN,YAAA;EACA,OAAA,GAAU,IAAA,EAAM,SAAA;AAAA;;;;;;iBAWF,aAAA,CAAA,GAAiB,iBAAA;;;cC7BpB,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;iBCoCG,WAAA,CACd,YAAA,EAAc,YAAA,EACd,OAAA;EACE,aAAA;EACA,GAAA,GAAM,iBAAA;EACN,iBAAA,GAAoB,GAAA;IAAc,CAAA;IAAW,CAAA;EAAA;EAC7C,gBAAA;EACA,cAAA,GAAiB,GAAA,SAAY,gBAAA;AAAA,KAE7B,iBAAA,IAAqB,gBAAA,IAAoB,gBAAA;;;;;A7C/B7C;;;;;AAGA;c6CqUa,MAAA,GACX,KAAA,EAAO,iBAAA,IACP,KAAA,EAAO,gBAAA,IACP,SAAA"}
|
package/dist/src-DJN3ojqS.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{$ as e,A as t,D as n,G as r,J as i,K as a,M as o,N as s,O as c,R as l,S as u,W as d,X as f,_t as p,a as m,c as h,d as g,et as _,gt as v,h as y,it as b,j as x,k as S,l as C,lt as w,m as T,mt as E,n as D,nt as O,o as k,p as ee,s as te,u as A,w as ne,x as re}from"./api-BqrSvFO2.js";import{c as ie,f as j}from"./keepAlive-DbC0X4zr.js";import{n as M,r as ae,t as oe}from"./fetchClient-BVyYwVMf.js";import{C as se,O as ce,T as N,_ as P,a as F,b as le,d as ue,f as de,g as fe,h as pe,j as me,k as he,l as ge,m as _e,o as ve,p as ye,s as be,u as xe,v as Se,w as Ce,y as we}from"./utils-COgjW7er.js";import{i as Te,n as I}from"./colors-BbPSDR1X.js";import{$t as Ee,A as De,B as L,Bt as Oe,C as ke,Cn as Ae,D as je,Dn as Me,En as Ne,Fn as Pe,Ft as Fe,Ht as Ie,I as Le,In as R,It as z,Jt as Re,Lt as ze,Mn as Be,Mt as Ve,Nn as He,O as Ue,Pt as We,Qt as Ge,Sn as Ke,T as qe,Tn as Je,Ut as Ye,Vt as B,Wt as Xe,Xt as Ze,Yt as Qe,Zt as $e,_n as et,a as tt,an as nt,bn as rt,cn as it,ct as at,d as ot,en as st,et as ct,f as lt,ft as ut,gn as dt,gt as ft,in as pt,j as mt,k as ht,ln as gt,lt as _t,n as vt,nn as yt,o as bt,on as xt,p as St,rn as Ct,s as wt,t as Tt,u as Et,ut as Dt,vn as Ot,vt as kt,w as At,wn as jt,x as Mt,xn as Nt,yn as Pt,yt as Ft,zt as It}from"./hooks-AAVgIiqs.js";import{Ft as Lt,Pt as Rt,a as zt,ct as Bt,dt as Vt,i as Ht,m as Ut,o as Wt,r as Gt,s as Kt,t as qt}from"./utils-Cpt1f5aU.js";import{fetchGitHubAvatar as Jt,fetchUser as Yt}from"./lib/api/user.js";import{PUBLIC_API_URL as Xt,PUBLIC_CLOUD_WEB_URL as Zt,RECCE_SUPPORT_CALENDAR_URL as Qt}from"./lib/const.js";import{EXPLORE_ACTION as $t,EXPLORE_FORM_EVENT as en,EXPLORE_SOURCE as tn,trackArtifactUploadStarted as nn,trackColumnLevelLineage as rn,trackCopyToClipboard as an,trackDwSetupCompleted as on,trackDwSetupShown as sn,trackDwSetupSkipped as cn,trackEnvironmentConfig as ln,trackExploreAction as un,trackExploreActionForm as dn,trackHistoryAction as fn,trackInit as pn,trackLineageSelection as mn,trackLineageViewRender as hn,trackMultiNodesAction as gn,trackNavigation as _n,trackOssShareButtonClicked as vn,trackPreviewChange as yn,trackPreviewChangeFeedback as bn,trackRedirectToCloudSession as xn,trackSignupCompleted as Sn,trackSignupRedirectInitiated as Cn,trackSingleEnvironment as wn,trackStateAction as Tn}from"./lib/api/track.js";import{t as En}from"./constants-D-hOGDbU.js";import{QueryClient as Dn,QueryClientProvider as On,useMutation as kn,useQuery as An,useQueryClient as jn}from"@tanstack/react-query";import{Suspense as Mn,createContext as Nn,forwardRef as Pn,memo as Fn,useCallback as V,useContext as In,useEffect as Ln,useImperativeHandle as Rn,useLayoutEffect as zn,useMemo as H,useRef as Bn,useState as U}from"react";import{Fragment as W,jsx as G,jsxs as K}from"react/jsx-runtime";import q from"@mui/material/Box";import J from"@mui/material/Button";import Vn from"@mui/material/Dialog";import Hn from"@mui/material/DialogActions";import Un from"@mui/material/DialogContent";import Wn from"@mui/material/DialogTitle";import Gn from"@mui/material/Link";import Y from"@mui/material/Stack";import X from"@mui/material/Typography";import Kn from"js-cookie";import{LuExternalLink as qn,LuSave as Jn}from"react-icons/lu";import{alpha as Yn,useTheme as Xn}from"@mui/material/styles";import{useTheme as Zn}from"next-themes";import Z from"@mui/material/IconButton";import Qn from"next/link";import{IoBookmarksOutline as $n,IoClose as er,IoSync as tr,IoWarning as nr}from"react-icons/io5";import rr from"@mui/material/Divider";import ir from"@mui/material/CircularProgress";import Q from"@mui/material/Tooltip";import{FaCloud as ar,FaExpandArrowsAlt as or,FaGithub as sr,FaQuestionCircle as cr,FaRegDotCircle as lr,FaSlack as ur,FaUser as dr}from"react-icons/fa";import{PiBookmarkSimple as fr,PiCaretDown as pr,PiChatText as mr,PiCheckCircle as hr,PiCircle as gr,PiCopy as _r,PiExport as vr,PiInfo as yr,PiInfoFill as br,PiMoon as xr,PiNotePencil as Sr,PiPencil as Cr,PiPencilSimple as wr,PiPlusCircle as Tr,PiRepeat as Er,PiSun as Dr,PiTrashFill as Or,PiTrashSimple as kr,PiUserPlus as Ar,PiX as jr}from"react-icons/pi";import Mr from"@mui/material/Chip";import{Background as Nr,BackgroundVariant as Pr,BaseEdge as Fr,ControlButton as Ir,Controls as Lr,MiniMap as Rr,Panel as zr,Position as Br,ReactFlow as Vr,ReactFlowProvider as Hr,getBezierPath as Ur,getNodesBounds as Wr,useEdgesState as Gr,useNodesState as Kr,useReactFlow as qr,useStore as Jr}from"@xyflow/react";import Yr from"file-saver";import Xr from"@mui/material/Checkbox";import Zr from"@mui/material/FormControlLabel";import Qr from"@mui/material/Alert";import $r from"@mui/material/Menu";import $ from"@mui/material/MenuItem";import{isEmpty as ei}from"lodash";import{VscCircleLarge as ti,VscFeedback as ni,VscGitPullRequest as ri,VscHistory as ii,VscKebabVertical as ai}from"react-icons/vsc";import oi from"@mui/material/ListSubheader";import si from"@mui/material/FormControl";import ci from"@mui/material/TextField";import{format as li,formatDistanceToNow as ui,parseISO as di}from"date-fns";import fi from"@mui/material/Tab";import pi from"@mui/material/Tabs";import mi from"@mui/material/List";import hi from"@mui/material/ListItem";import"@xyflow/react/dist/style.css";import{Box as gi,Typography as _i}from"@mui/material";import vi from"@mui/material/Avatar";import yi from"@mui/material/Popover";import{usePathname as bi,useRouter as xi,useSearchParams as Si}from"next/navigation";import{TbChecklist as Ci,TbEdit as wi}from"react-icons/tb";import Ti from"@mui/material/ListItemIcon";import Ei from"@mui/material/ListItemText";import{FiArrowRight as Di,FiCopy as Oi,FiInfo as ki,FiPackage as Ai}from"react-icons/fi";import ji from"@mui/material/Switch";import{RiArrowDownSFill as Mi,RiArrowUpSFill as Ni,RiMindMap as Pi,RiSwapLine as Fi,RiTerminalBoxLine as Ii}from"react-icons/ri";import{FaBookmark as Li,FaFileImport as Ri}from"react-icons/fa6";import{BiArrowFromBottom as zi,BiArrowToBottom as Bi}from"react-icons/bi";import Vi from"@dagrejs/dagre";import Hi from"@mui/material/Skeleton";import{AiOutlineExperiment as Ui}from"react-icons/ai";import Wi from"@mui/material/Radio";import Gi from"@mui/material/RadioGroup";import Ki from"@mui/material/Table";import qi from"@mui/material/TableBody";import Ji from"@mui/material/TableCell";import Yi from"@mui/material/TableContainer";import Xi from"@mui/material/TableHead";import Zi from"@mui/material/TableRow";import Qi from"@mui/material/InputLabel";import $i from"@mui/material/Select";import ea from"@mui/material/Badge";import ta from"@mui/material/Grid";import{stripIndents as na}from"common-tags";import{IoMdCodeWorking as ra}from"react-icons/io";import{DragDropContext as ia,Draggable as aa,Droppable as oa}from"@hello-pangea/dnd";import sa from"@mui/material/Card";import ca from"@mui/material/CardContent";import la from"@mui/material/CardHeader";const ua=Nn(null);ua.displayName=`RecceRoutingContext`;function da(){return In(ua)||{basePath:``,buildPath:e=>e,pathname:``,navigate:e=>{typeof window<`u`&&(window.location.href=e)}}}function fa(){let{pathname:e,navigate:t}=da();return[e,t]}function pa({children:e,config:t}){let n=t?.basePath??``,r=t?.pathname??``,i=t?.onNavigate,a=V(e=>n?`${n}${e.startsWith(`/`)?e:`/${e}`}`:e,[n]),o=V((e,t)=>{i?i(e,t):typeof window<`u`&&(t?.replace?(window.history.replaceState(null,``,e),window.dispatchEvent(new PopStateEvent(`popstate`))):window.location.href=e)},[i]),s=H(()=>({basePath:n,buildPath:a,pathname:r,navigate:o}),[n,a,r,o]);return G(ua.Provider,{value:s,children:e})}const ma=e=>new Dn({defaultOptions:{queries:{staleTime:e?.staleTime??1e3*60,gcTime:e?.gcTime??1e3*60*5,retry:1,refetchOnWindowFocus:!1}}});function ha({children:e,api:t,theme:n=`system`,routing:r,queryClient:i,runActions:a,lineage:o,checks:s,query:c,features:l={}}){let u=i?.staleTime,d=i?.gcTime,f=H(()=>ma({staleTime:u,gcTime:d}),[u,d]),{enableInstance:p=!0,enableIdleTimeout:m=!0,enableLineage:h=!0,enableRunActions:g=!0,enableChecks:_=!0,enableQuery:v=!0}=l,y=e;return y=G(pa,{config:r,children:y}),y=G(Lt,{defaultMode:n,children:y}),y=G(ie,{config:t,children:y}),y=G(On,{client:f,children:y}),v&&(y=G(He,{sql:c?.sql,isExecuting:c?.isExecuting,error:c?.error,baseResult:c?.baseResult,currentResult:c?.currentResult,onSqlChange:c?.onSqlChange,onExecute:c?.onExecute,onCancel:c?.onCancel,children:y})),_&&(y=G(Pe,{checks:s?.checks,isLoading:s?.isLoading,error:s?.error,selectedCheckId:s?.selectedCheckId,onSelectCheck:s?.onSelectCheck,onCreateCheck:s?.onCreateCheck,onUpdateCheck:s?.onUpdateCheck,onDeleteCheck:s?.onDeleteCheck,onReorderChecks:s?.onReorderChecks,refetchChecks:s?.refetchChecks,children:y})),g&&(y=G(ce,{onRunAction:a?.onRunAction,onShowRunId:a?.onShowRunId,initialRunId:a?.initialRunId,initialHistoryOpen:a?.initialHistoryOpen,children:y})),h&&(y=G(fe,{lineageGraph:o?.lineageGraph,envInfo:o?.envInfo,reviewMode:o?.reviewMode,cloudMode:o?.cloudMode,fileMode:o?.fileMode,fileName:o?.fileName,isDemoSite:o?.isDemoSite,isCodespace:o?.isCodespace,isLoading:o?.isLoading,error:o?.error,supportTasks:o?.supportTasks,onRefetchLineageGraph:o?.onRefetchLineageGraph,runsAggregated:o?.runsAggregated,onRefetchRunsAggregated:o?.onRefetchRunsAggregated,children:y})),m&&(y=G(we,{children:y})),p&&(y=G(se,{children:y})),y}function ga({actionState:e,onCancel:t,onClose:n}){let r=()=>e.mode===`per_node`?`${e.completed} / ${e.total}`:e.currentRun?.progress?.percentage?`${e.currentRun.progress.percentage*100}%`:e.status===`completed`?`100%`:`0%`,i=e.status===`running`||e.status===`canceling`;return G(q,{sx:{bgcolor:`background.paper`,borderRadius:1,boxShadow:6},children:K(Y,{direction:`row`,divider:G(rr,{orientation:`vertical`,flexItem:!0}),spacing:2,sx:{p:`5px 15px`,mt:2},children:[K(q,{sx:{fontSize:`10pt`},children:[`Progress: `,r(),` `,e.status===`canceled`?` (canceled)`:``]}),i?G(J,{size:`small`,variant:`outlined`,onClick:t,disabled:e.status===`canceling`,children:e.status===`canceling`?`Canceling`:`Cancel`}):G(Y,{direction:`row`,children:G(J,{size:`small`,variant:`outlined`,onClick:n,children:`Close`})})]})})}const _a=({lineageGraph:e,cllInput:t,onCenterNode:n})=>{let r={cursor:`pointer`,fontFamily:`monospace`,bgcolor:Rt()?`grey.700`:`grey.100`,px:.5,borderRadius:.5};if(!e)return G(W,{});if(!t)return G(W,{children:`Default View`});if(t.node_id===void 0)return G(X,{component:`span`,children:`Impact Radius for All Changed Models`});let i=t.node_id in e.nodes?e.nodes[t.node_id].data.name:t.node_id;if(!t.column){let e=t.node_id;return K(W,{children:[G(X,{component:`span`,sx:{mr:`5px`},children:`Impact Radius for`}),G(q,{component:`code`,onClick:()=>{n(e)},sx:r,children:i})]})}let a=`${t.node_id}_${t.column}`;return K(W,{children:[K(X,{component:`span`,sx:{mr:`5px`},children:[`Column Lineage for`,` `]}),K(q,{component:`code`,onClick:()=>{n(a)},sx:r,children:[i,`.`,t.column]})]})},va=({action:e,interactive:t,viewOptions:n,lineageGraph:r,singleEnvMode:i=!1,changeAnalysisAvailable:a=!0,onShowCll:o,onResetCll:s,onCenterNode:c,setChangeAnalysisMode:l,newCllExperience:u=!1,changeAnalysisMode:d=!1})=>{let f=n.column_level_lineage,p=!r?.catalogMetadata.current,m=u&&d,h=f&&!(u&&!f.column);return K(Y,{direction:`row`,spacing:`5px`,children:[!i&&!m&&G(q,{sx:{borderRadius:1,boxShadow:3},children:G(Q,{enterDelay:50,title:a?p?`Please provide catalog.json to enable Impact Radius`:``:`Requires warehouse connection`,placement:`top`,children:G(`span`,{children:G(J,{size:`small`,variant:`outlined`,color:`neutral`,sx:{whiteSpace:`nowrap`,display:`inline-flex`,bgcolor:`background.paper`},disabled:!t||p||!a||e.isPending,startIcon:G(lr,{}),onClick:()=>{l?.(!0),o({no_upstream:!0,change_analysis:!0})},children:`Impact Radius`})})})}),h&&K(Y,{direction:`row`,sx:{alignItems:`center`,borderRadius:1,boxShadow:3,border:`1px solid`,borderColor:`divider`,bgcolor:`background.paper`,fontSize:`0.8rem`,p:`0 0.625rem`},children:[G(_a,{lineageGraph:r,cllInput:f,onCenterNode:c}),e.isError&&G(Q,{title:`Error: ${e.error.message}`,placement:`bottom`,children:G(X,{component:`span`,sx:{color:`error.main`,ml:`2px`,display:`inline-flex`,alignItems:`center`},children:G(q,{component:yr,sx:{color:`error.main`,fontSize:`14px`}})})}),e.isPending?G(ir,{size:12,sx:{ml:`2px`}}):G(Z,{size:`small`,sx:{ml:`2px`},"aria-label":`Reset Column Level Lineage`,onClick:()=>{s()},children:G(jr,{size:`10px`})})]})]})};function ya({onClose:e}){let{cancel:t,actionState:n}=pe();return G(ga,{actionState:n,onCancel:t,onClose:e})}const ba=({action:e})=>{let{showColumnLevelLineage:t,resetColumnLevelLineage:n,interactive:r,viewOptions:i,centerNode:a,setChangeAnalysisMode:o,newCllExperience:s,changeAnalysisMode:c}=pe(),{data:l}=xe(),u=l?.single_env_onboarding??!1,{lineageGraph:d,isActionAvailable:f}=P();return G(va,{action:e,interactive:r,viewOptions:i,lineageGraph:d,singleEnvMode:u,changeAnalysisAvailable:f(`change_analysis`),onShowCll:t,onResetCll:()=>n(),onCenterNode:a,setChangeAnalysisMode:o,newCllExperience:s,changeAnalysisMode:c})};function xa(e){let{id:t,data:n}=e,{id:r}=n.node,{column:i,type:a,transformationType:o,changeStatus:s,isImpacted:c}=n,l=Jr(e=>e.transform[2]>.3),{isDark:u}=Tt(),{viewOptions:d,showContextMenu:f,isNodeHighlighted:p,isNodeShowingChangeAnalysis:m,newCllExperience:h}=pe(),g=d.column_level_lineage?.node_id,_=i===d.column_level_lineage?.column&&r===g,v=p(t),y=m(r);return G(dt,{id:t,data:{column:i,type:a,nodeId:r,transformationType:o,changeStatus:s,isHighlighted:v,isFocused:_,isImpacted:c},showContent:l,showChangeAnalysis:y,isDark:u,newCllExperience:h,onContextMenu:(t,n)=>{f(t,e)}})}const Sa=Fn(xa);Sa.displayName=`GraphColumnNode`;function Ca(e){let{source:t,target:n,sourceX:r,sourceY:i,targetX:a,targetY:o,sourcePosition:s,targetPosition:c,style:l={},markerEnd:u,data:d,isEdgeHighlighted:f}=e,p={...l};d?.changeStatus&&(p.stroke=Ke(d.changeStatus).hexColor,p.strokeDasharray=`5`),!f||f(t,n)||(p.filter=jt);let[m]=Ur({sourceX:r,sourceY:i,sourcePosition:s,targetX:a,targetY:o,targetPosition:c});return G(W,{children:G(Fr,{path:m,markerEnd:u,style:{...p,...l}})})}const wa=Fn(Ca);wa.displayName=`GraphEdge`;function Ta(e){let{isEdgeHighlighted:t}=pe();return G(wa,{...e,isEdgeHighlighted:t})}const Ea=()=>G(`svg`,{stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`,viewBox:`0 0 256 256`,height:`1em`,width:`1em`,xmlns:`http://www.w3.org/2000/svg`,children:G(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z`})}),Da=()=>G(`svg`,{stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`,viewBox:`0 0 256 256`,height:`1em`,width:`1em`,xmlns:`http://www.w3.org/2000/svg`,children:G(`path`,{d:`M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z`})});function Oa({skipReason:e}){return G(Mr,{size:`small`,label:K(Y,{direction:`row`,sx:{fontSize:`10pt`,color:`grey.500`,alignItems:`center`,gap:`3px`},children:[G(q,{children:`Skipped`}),e&&G(Q,{title:e,children:G(q,{component:`span`,sx:{display:`flex`},children:G(Ea,{})})})]}),sx:{bgcolor:`grey.100`}})}function ka({errorMessage:e}){return K(Y,{direction:`row`,sx:{fontSize:`10pt`,color:`gray`,alignItems:`center`},children:[G(q,{children:`Error`}),e&&G(Q,{title:e,children:G(q,{component:`span`,sx:{display:`flex`},children:G(Da,{})})})]})}function Aa({result:e}){let{mismatchedColumns:t}=e,n=t>0;return G(Mr,{size:`small`,sx:{bgcolor:n?`error.light`:`success.light`},label:G(Y,{direction:`row`,sx:{fontSize:`10pt`,color:n?`error.main`:`success.main`,alignItems:`center`,gap:`3px`},children:n?`${t} columns mismatched`:`All columns match`})})}function ja({result:e}){let{base:t,current:n}=e,r=t===null?`N/A`:t.toLocaleString(),i=n===null?`N/A`:n.toLocaleString(),a=``,o=`grey.500`;return t!==null&&n!==null&&(n>t?(a=`↑`,o=`success.main`):n<t?(a=`↓`,o=`error.main`):a=`=`),G(Mr,{size:`small`,sx:{bgcolor:`grey.100`},label:K(Y,{direction:`row`,sx:{fontSize:`10pt`,alignItems:`center`,gap:`3px`},children:[G(q,{children:r}),G(q,{children:`→`}),G(q,{children:i}),a&&G(q,{component:`span`,sx:{color:o,ml:.5},children:a})]})})}function Ma({status:e,skipReason:t,errorMessage:n,progress:r,valueDiffResult:i,rowCountDiffResult:a,runId:o,"data-testid":s}){return e===`pending`?G(ir,{size:16,"data-testid":s,"data-status":`pending`}):e===`skipped`?G(q,{"data-testid":s,"data-status":`skipped`,children:G(Oa,{skipReason:t})}):e===`running`?r?.percentage===void 0?G(ir,{size:16,"data-testid":s,"data-status":`running`}):G(ir,{variant:`determinate`,value:r.percentage*100,size:16,"data-testid":s,"data-status":`running`}):e===`error`?G(q,{"data-testid":s,"data-status":`error`,children:G(ka,{errorMessage:n})}):i?G(q,{"data-testid":s,"data-status":`success`,children:G(Aa,{result:i})}):a?G(q,{"data-testid":s,"data-status":`success`,children:G(ja,{result:a})}):G(q,{"data-testid":s,"data-status":`success`,children:o||`Complete`})}const Na=Fn(Ma);Na.displayName=`ActionTag`;const Pa={success:`#059669`,failure:`#ef4444`,error:`#ef4444`,warning:`#f59e0b`},Fa={success:`PASSED`,failure:`FAILED`,error:`ERROR`,warning:`WARNING`};function Ia(e){return Pa[e]??`#6b7280`}function La(e){return Fa[e]??e.toUpperCase()}function Ra({run:e,index:t,onClick:n}){let r=Ia(e.status),i=La(e.status),a=ui(new Date(e.run_at),{addSuffix:!0}),o=!!n;return K(gi,{component:o?`button`:`div`,type:o?`button`:void 0,onClick:o?()=>n?.(e.run_id):void 0,"aria-label":o?`View run #${t} — ${i}`:void 0,sx:{p:1,border:`none`,borderLeft:`3px solid ${r}`,borderRadius:1,bgcolor:`action.hover`,cursor:o?`pointer`:`default`,"&:hover":o?{bgcolor:`action.selected`}:{},textAlign:`left`,width:`100%`,font:`inherit`,color:`inherit`},children:[K(_i,{variant:`body2`,sx:{fontWeight:600,fontSize:`0.75rem`},children:[`Run #`,t,` — `,i,e.triggered_by===`recce_ai`&&G(_i,{component:`span`,sx:{ml:.75,fontSize:`0.65rem`,fontWeight:500,color:`#7c3aed`},children:`by AI`})]}),e.summary&&G(_i,{variant:`body2`,sx:{color:`text.secondary`,fontSize:`0.7rem`,mt:.25},children:e.summary}),G(_i,{variant:`body2`,sx:{color:`text.secondary`,fontSize:`0.65rem`,mt:.25},children:a})]})}function za({event:e}){let t=l(e),n={create:Tr,comment:mr,approve:hr,unapprove:gr,edit:Sr,preset:fr},r={create:`primary.main`,comment:`grey.500`,approve:`success.main`,unapprove:`grey.400`,edit:`warning.main`,preset:`secondary.main`},i=n[t],a=r[t];return G(q,{component:i,sx:{color:a,fontSize:16}})}function Ba({event:e}){let{actor:t}=e,{avatarUrl:n}=Oe({userId:t.user_id}),r=(t.fullname||t.login||`User`).charAt(0).toUpperCase();return G(vi,{src:n||void 0,sx:{width:24,height:24,fontSize:`0.75rem`},children:r})}function Va({event:e}){let{actor:t}=e,n=t.fullname||t.login||`Someone`,r=ui(new Date(e.created_at),{addSuffix:!0}),i=``;switch(e.event_type){case`check_created`:i=`created this check`;break;case`approval_change`:i=e.new_value===`true`?`approved this check`:`unapproved this check`;break;case`description_change`:i=`updated the description`;break;case`name_change`:i=`renamed this check`;break;case`preset_applied`:i=`applied a preset`;break;default:i=`made a change`}return K(q,{sx:{display:`flex`,gap:1,alignItems:`flex-start`,py:1},children:[G(q,{sx:{pt:`2px`},children:G(za,{event:e})}),G(q,{sx:{flex:1},children:K(Y,{direction:`row`,spacing:.5,sx:{flexWrap:`wrap`,alignItems:`center`},children:[G(Ba,{event:e}),G(X,{variant:`body2`,sx:{fontWeight:`500`},children:n}),G(X,{variant:`body2`,sx:{color:`text.secondary`},children:i}),G(X,{variant:`caption`,sx:{color:`text.disabled`},children:r})]})})]})}function Ha({event:e,currentUserId:t,onEdit:n,onDelete:r}){let i=Rt(),[a,o]=U(!1),[s,c]=U(e.content||``),[l,u]=U(!1),[d,f]=U(!1),[p,m]=U(null),h=!!p,{actor:g}=e,_=g.fullname||g.login||`Someone`,v=ui(new Date(e.created_at),{addSuffix:!0}),y=t&&String(g.user_id)===String(t),b=()=>{c(e.content||``),o(!0)},x=()=>{c(e.content||``),o(!1)},S=async()=>{let t=s.trim();if(!t||t===e.content){x();return}if(n){u(!0);try{await n(e.id,t),o(!1)}finally{u(!1)}}},C=e=>{e.key===`Escape`?x():e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),S())},w=e=>{m(e.currentTarget)},T=()=>{m(null)};return e.is_deleted?K(q,{sx:{display:`flex`,gap:1,alignItems:`center`,py:1},children:[G(q,{sx:{pt:`2px`,display:`flex`,alignItems:`center`},children:G(za,{event:e})}),G(q,{sx:{display:`flex`,flex:1,alignItems:`center`},children:G(X,{variant:`body2`,sx:{color:`text.disabled`,fontStyle:`italic`},children:`Comment deleted`})})]}):K(q,{sx:{display:`flex`,gap:1,alignItems:`flex-start`,py:1},children:[G(q,{sx:{pt:`2px`},children:G(za,{event:e})}),K(q,{sx:{flex:1},children:[K(Y,{direction:`row`,spacing:.5,sx:{flexWrap:`wrap`,alignItems:`center`,mb:.5},children:[G(Ba,{event:e}),K(X,{variant:`body2`,sx:{fontWeight:`500`},children:[_,y&&K(X,{component:`span`,variant:`body2`,sx:{color:`text.secondary`},children:[` `,`(Author)`]})]}),G(X,{variant:`caption`,sx:{color:`text.disabled`},children:v}),e.is_edited&&G(X,{variant:`caption`,sx:{color:`text.disabled`},children:`(edited)`})]}),a?K(q,{children:[G(ci,{value:s,onChange:e=>c(e.target.value),onKeyDown:C,size:`small`,multiline:!0,minRows:3,fullWidth:!0,disabled:l,autoFocus:!0,sx:{"& .MuiOutlinedInput-root":{bgcolor:`background.paper`,"&:focus-within":{borderColor:`primary.main`}}}}),K(Y,{direction:`row`,spacing:1,sx:{justifyContent:`flex-end`,mt:1},children:[G(J,{size:`small`,variant:`text`,onClick:x,disabled:l,children:`Cancel`}),G(J,{size:`small`,variant:`contained`,onClick:S,disabled:!s.trim()||l,children:l?`Saving...`:`Save`})]})]}):K(q,{sx:{bgcolor:i?`grey.800`:`grey.50`,borderRadius:1,p:1,border:`1px solid`,borderColor:i?`grey.700`:`grey.200`,position:`relative`,"&:hover .comment-actions":{opacity:1}},children:[G(ut,{content:e.content||``,fontSize:`sm`}),y&&(n||r)&&K(Y,{className:`comment-actions`,direction:`row`,spacing:0,sx:{position:`absolute`,top:4,right:4,opacity:0,transition:`opacity 0.2s`},children:[n&&G(Q,{title:`Edit comment`,children:G(Z,{"aria-label":`Edit comment`,size:`small`,onClick:b,children:G(wr,{})})}),r&&K(W,{children:[G(Q,{title:`Delete comment`,children:G(Z,{"aria-label":`Delete comment`,size:`small`,color:`error`,onClick:w,children:G(kr,{})})}),G(yi,{open:h,anchorEl:p,onClose:T,anchorOrigin:{vertical:`bottom`,horizontal:`center`},transformOrigin:{vertical:`top`,horizontal:`center`},children:K(q,{sx:{p:2},children:[G(X,{variant:`body2`,sx:{mb:2},children:`Delete this comment?`}),K(Y,{direction:`row`,spacing:1,sx:{justifyContent:`flex-end`},children:[G(J,{size:`small`,variant:`text`,onClick:T,disabled:d,children:`Cancel`}),G(J,{size:`small`,variant:`contained`,color:`error`,onClick:async()=>{if(r){f(!0);try{await r(e.id),T()}finally{f(!1)}}},disabled:d,children:d?`Deleting...`:`Delete`})]})]})})]})]})]})]})]})}function Ua({event:e,currentUserId:t,onEdit:n,onDelete:r}){return e.event_type===`comment`?G(Ha,{event:e,currentUserId:t,onEdit:n,onDelete:r}):G(Va,{event:e})}function Wa(e,t){let n=e?.toLowerCase();return n===`finished`?t?`error`:`success`:n===`failed`?`error`:e??`unknown`}function Ga(e,t){let n=[];for(let t of e)n.push({kind:`event`,event:t,at:t.created_at});if(t){let e=[...t].sort((e,t)=>new Date(e.run_at).getTime()-new Date(t.run_at).getTime());for(let t=0;t<e.length;t++)n.push({kind:`run`,run:e[t],index:t+1,at:e[t].run_at})}return n.sort((e,t)=>new Date(t.at).getTime()-new Date(e.at).getTime()),n}function Ka({checkId:e}){let t=Rt(),{apiClient:n,authToken:r}=B(),{events:i,isLoading:a,error:o,createComment:s,isCreatingComment:c,updateComment:l,deleteComment:u}=Et(e),{data:d}=An({queryKey:j.user(),queryFn:()=>Yt(n),retry:!1}),{data:p}=An({queryKey:[`check-runs`,e],queryFn:async()=>(await f(n)).filter(t=>t.check_id===e).map(e=>({run_id:e.run_id,run_at:e.run_at,status:Wa(e.status,e.error),summary:e.error||void 0,triggered_by:e.triggered_by})),enabled:!!r,staleTime:3e4}),m=H(()=>Ga(i,p),[i,p]),h=e=>{s(e)},g=async(e,t)=>{await l({eventId:e,content:t})},_=async e=>{await u(e)};return a?G(q,{sx:{height:`100%`,p:4,display:`flex`,justifyContent:`center`,alignItems:`center`},children:G(ir,{size:20})}):o?G(q,{sx:{height:`100%`,p:4,display:`flex`,justifyContent:`center`,alignItems:`center`},children:G(X,{sx:{fontSize:`0.875rem`,color:`error.main`},children:`Failed to load timeline`})}):K(Y,{sx:{height:`100%`,alignItems:`stretch`,borderLeft:`1px solid`,borderColor:t?`grey.700`:`grey.200`},spacing:0,children:[G(q,{sx:{px:3,py:2,borderBottom:`1px solid`,borderColor:t?`grey.700`:`grey.200`},children:G(X,{variant:`subtitle2`,sx:{fontWeight:500},children:`Activity`})}),G(q,{sx:{flex:1,overflowY:`auto`,px:3,py:2},children:m.length===0?G(X,{sx:{fontSize:`0.875rem`,color:`grey.500`},children:`No activity yet`}):G(Y,{sx:{alignItems:`stretch`},spacing:0,children:m.map((e,n)=>K(q,{children:[e.kind===`event`?G(Ua,{event:e.event,currentUserId:d?.id,onEdit:g,onDelete:_}):G(Ra,{run:e.run,index:e.index}),n<m.length-1&&G(rr,{sx:{borderColor:t?`grey.700`:`grey.100`}})]},e.kind===`event`?e.event.id:e.run.run_id))})}),G(q,{sx:{px:3,py:3,borderTop:`1px solid`,borderColor:t?`grey.700`:`grey.200`,bgcolor:t?`grey.900`:`grey.50`},children:G(It,{onSubmit:h,isSubmitting:c})})]})}function qa({color:e}){return G(q,{component:`span`,sx:{display:`inline-block`,width:`10px`,height:`10px`,bgcolor:e,mr:1,borderRadius:`4px`}})}const Ja=({defaultPrimaryKeys:e,onPrimaryKeysChange:t,...n})=>{let{isActionAvailable:r}=P(),i=H(()=>[],[]);return G(q,{sx:{display:`flex`},...n,children:K(Y,{spacing:0,sx:{m:`0 0.5rem`},children:[K(Y,{direction:`row`,spacing:.5,sx:{alignItems:`center`},children:[G(X,{component:`label`,sx:{fontSize:`0.625rem`,color:`text.secondary`},children:`Diff with Primary Key(s) (suggested)`}),G(Q,{title:`Provide a primary key to perform query diff in data warehouse and only return changed rows.`,placement:`bottom-end`,children:G(q,{component:`span`,sx:{display:`flex`,color:`grey.600`,cursor:`help`},children:G(yr,{fontSize:`0.75rem`})})})]}),G(gt,{className:`no-track-pii-safe`,unitName:`key`,defaultValues:e,suggestionList:i,onValuesChange:t,size:`2xs`,width:`240px`,placeholder:`Select or type to add keys`,disabled:!r(`query_diff_with_primary_key`)})]})})};function Ya({supportCalendarUrl:e=`https://cal.com/team/recce/chat`}){let{data:t}=N();return G(`div`,{className:`flex flex-1 h-full min-h-0 m-2 p-4 bg-blue-50 rounded-lg shadow-md justify-center`,children:K(`div`,{className:`w-4/5 flex flex-col overflow-y-auto gap-6 px-8 pb-8`,children:[K(Y,{spacing:2,sx:{alignItems:`center`},children:[G(q,{sx:{p:1,bgcolor:`background.paper`,borderRadius:`50%`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:2},children:G(q,{component:Ii,sx:{fontSize:28,color:`iochmara.500`}})}),G(X,{variant:`h5`,sx:{mt:2},children:`Wait, there's more!`}),K(X,{sx:{fontSize:`1rem`,textAlign:`center`},children:[`Query functions disabled without a`,` `,G(X,{component:`span`,sx:{fontWeight:`bold`},children:`data warehouse connection`})]})]}),G(Y,{sx:{width:`50%`,mt:3,mx:`auto`},children:G(J,{color:`iochmara`,variant:`contained`,size:`large`,onClick:()=>{window.open(qt(t,e),`_blank`)},children:`Connect to Data Warehouse`})})]})})}const Xa=()=>{let{isCustomQueries:e,setCustomQueries:t,sqlQuery:n,setBaseSqlQuery:r}=Mt();return K(q,{children:[K(Y,{direction:`row`,spacing:.5,sx:{alignItems:`center`,fontSize:`0.75rem`},children:[G(X,{variant:`body2`,sx:{fontSize:`0.75rem`},children:`Custom Queries`}),G(Q,{title:`Custom queries allow you to use two SQL queries to compare results between current and base environments.`,children:G(q,{component:`span`,sx:{display:`flex`,color:`grey.600`},children:G(br,{fontSize:`1rem`})})})]}),G(ji,{size:`small`,checked:e,onChange:()=>{!e&&r&&r(n),t(!e)},color:`primary`})]})},Za=()=>{let{sqlQuery:e,baseSqlQuery:t,setSqlQuery:n,setBaseSqlQuery:i,primaryKeys:o,setPrimaryKeys:s,isCustomQueries:c}=Mt(),{lineageGraph:l,envInfo:u}=P(),{featureToggles:f,singleEnv:p}=Ce(),m=e;u?.adapterType===`sqlmesh`&&e===`select * from {{ ref("mymodel") }}`&&(m=`select * from db.mymodel`),f.mode===`read only`&&(m=`--- Would like to do query here? Book a demo with us at ${Qt}\n${m}`);let{showRunId:h}=he(),{apiClient:g}=B(),{mutate:v,isPending:y}=kn({mutationFn:async e=>{function n(e){switch(e){case`query`:return d;case`query_base`:return r;case`query_diff`:return a;default:throw Error(`Unknown query type: ${e}`)}}let i=e===`query_base`?t??``:m,s=n(e),l={sql_template:i},u={nowait:!0};e===`query_diff`&&(l.primary_keys=o,c&&(l.base_sql_template=t));let{run_id:f}=await s(l,u,g);return h(f),await _(f,void 0,g)}}),b=H(()=>{let e={};if(!l)return`N/A`;for(let t in l.nodes){let n=l.nodes[t].data.schema;n&&(e[n]=(e[n]||0)+1)}return Object.keys(e).reduce((t,n)=>e[n]>(e[t]||0)?n:t,`N/A`)},[l]);return p||f.mode===`metadata only`?K(q,{sx:{display:`flex`,flexDirection:`column`,height:`100%`},children:[K(q,{sx:{display:`flex`,justifyContent:`right`,alignItems:`center`,padding:`4pt 8pt`,gap:`5px`,height:`54px`,borderBottom:`1px solid`,borderColor:`divider`},children:[G(_s,{}),G(q,{sx:{flexGrow:1}}),p?G(Q,{title:`Please configure the base environment before running the diff`,placement:`left`,children:G(`span`,{children:G(J,{variant:`contained`,disabled:!0,size:`small`,sx:{fontSize:`14px`,mt:`16px`},children:`Run Diff`})})}):G(xc,{display:f.mode===`metadata only`,children:G(J,{variant:`contained`,disabled:!0,size:`small`,sx:{fontSize:`14px`,mt:`16px`},children:`Run Diff`})})]}),G(Ue,{value:m,onChange:n,onRun:()=>{v(`query`)},labels:[`base (production)`,`current (${b})`],SetupGuide:f.mode===`metadata only`?G(Ya,{}):G(fs,{})})]}):K(q,{sx:{display:`flex`,flexDirection:`column`,height:`100%`},children:[K(q,{sx:{display:`flex`,justifyContent:`right`,alignItems:`flex-end`,padding:`4pt 8pt`,gap:`5px`,height:`54px`,borderBottom:`1px solid`,borderColor:`divider`,flex:`0 0 54px`},children:[G(_s,{}),G(Xa,{}),G(q,{sx:{flexGrow:1}}),G(Ja,{defaultPrimaryKeys:o,onPrimaryKeysChange:s}),G(J,{variant:`contained`,onClick:()=>{v(`query_diff`)},disabled:y||f.disableDatabaseQuery,size:`small`,children:`Run Diff`})]}),G(q,{sx:{width:`100%`,flex:1,overflowY:`auto`},children:c?G(Ue,{value:m,baseValue:t,onChange:n,onChangeBase:i,onRun:()=>{v(`query`)},onRunBase:()=>{v(`query_base`)},onRunDiff:()=>{v(`query_diff`)}}):G(ht,{value:m,onChange:n,onRun:()=>{v(`query`)},onRunDiff:()=>{v(`query_diff`)}})})]})};function Qa({rowCount:e}){let t=e.base,n=e.curr,r=e.base===null?`N/A`:`${e.base} Rows`,i=e.curr===null?`N/A`:`${e.curr} Rows`,a,o;t===null&&n===null?(a=`Failed to load`,o=`default`):t===null||n===null?(a=`${r} -> ${i}`,o=t===null?`success`:`error`):t===n?(a=`=`,o=`default`):(a=`${Ut(t,n)} Rows`,o=t<n?`success`:`error`);let s=L(`row_count_diff`).icon;return G(Mr,{size:`small`,color:o,icon:s?G(s,{}):void 0,label:a,sx:{height:20,fontSize:`0.7rem`}})}function $a({id:e,inverted:t}){let{lineageGraph:n,runsAggregated:r}=P(),{text:i,isDark:a}=Tt(),o=r?.[e],s=n?.nodes[e];if(!o&&!s)return null;let c;s?.data.change?.columns&&(c=Object.keys(s.data.change.columns).length>0);let l;if(o?.row_count_diff){let e=o.row_count_diff.result;l=e.curr!==e.base}let u=t?i.inverted:Ke(`modified`).color,d=t?i.secondary:a?`grey.700`:`grey.100`,f=L(`schema_diff`).icon;return K(q,{sx:{display:`flex`,flex:1,alignItems:`center`},children:[c!==void 0&&G(Q,{title:`Schema (${c?`changed`:`no change`})`,enterDelay:500,children:G(q,{sx:{height:16},children:f&&G(q,{component:f,sx:{color:c?u:d}})})}),G(q,{sx:{flexGrow:1}}),o?.row_count_diff&&l!==void 0&&G(Q,{title:`Row count (${l?`changed`:`=`})`,enterDelay:500,children:G(q,{children:G(Qa,{rowCount:o.row_count_diff.result})})})]})}function eo({nodeId:e,nodeName:t}){let{getNodeAction:n}=pe(),r=n(e);if(!r)return null;let{status:i,skipReason:a,run:o}=r;if(i===`pending`)return G(Na,{status:`pending`});if(i===`skipped`)return G(Na,{status:`skipped`,skipReason:a});if(!o)return G(Na,{status:`pending`});let{error:s,run_id:c,progress:l}=o;if(i===`running`)return G(Na,{status:`running`,progress:{percentage:l?.percentage}});if(s)return G(Na,{status:`error`,errorMessage:s});if(o.type===`value_diff`&&o.result){let e=o.result,t=0,n=e.data.data.length;for(let n of e.data.data)n[2]<1&&t++;return G(Na,{status:`success`,valueDiffResult:{mismatchedColumns:t,totalColumns:n}})}if(w(o)&&o.result){let e=o.result[t];if(e)return G(Qa,{rowCount:e})}if(o.type===`row_count`&&o.result){let e=o.result[t];if(e?.curr!==void 0&&e.curr!==null)return G(Mr,{size:`small`,label:`${e.curr.toLocaleString()} Rows`,sx:{height:20,fontSize:`0.7rem`}})}return G(Na,{status:`success`,runId:c})}function to(e){let{data:t}=e,{id:n,resourceType:r,changeStatus:i,name:a}=t,o=Jr(e=>e.transform[2]>.3),{isDark:s}=Tt(),{interactive:c,selectNode:l,selectMode:u,focusedNode:d,getNodeAction:f,getNodeColumnSet:p,isNodeHighlighted:m,isNodeSelected:h,isNodeShowingChangeAnalysis:g,showContextMenu:_,viewOptions:v,cll:y,impactedNodeIds:b,newCllExperience:x,showColumnLevelLineage:S,setChangeAnalysisMode:C}=pe(),{isActionAvailable:w}=P(),T=x?b.has(n):!1,E=y?.current.nodes[n]?.change_category,D=m(n),O=h(n),k=v.column_level_lineage?.node_id===n&&v.column_level_lineage.column===void 0,ee=d?.id===n||k,te=g(n),A=p(t.id),ne=u===`action_result`?f(t.id):void 0,re=i,ie=u,j=u===`action_result`&&ne?G(eo,{nodeId:n,nodeName:a}):void 0,M=u!==`action_result`&&t.resourceType===`model`?G($a,{id:t.id,inverted:u===`selecting`&&O}):void 0;return G(nt,{id:n,data:{label:a,changeStatus:re,resourceType:r,materialized:t.materialized},newCllExperience:x,isImpacted:T,interactive:c,selectMode:ie,isNodeSelected:O,isFocused:ee,isHighlighted:D,showContent:o,actionTag:j,showChangeAnalysis:te,changeCategory:E,runsAggregatedTag:M,hasParents:Object.keys(t.parents).length>0,hasChildren:Object.keys(t.children).length>0,columnCount:A.size,columnHeight:24,isDark:s,onSelect:e=>{l(e)},onContextMenu:(t,n)=>{_(t,e)},onShowImpactRadius:i===`modified`&&w(`change_analysis`)?e=>{C(!0),S({node_id:e,change_analysis:!0,no_upstream:!0})}:void 0})}const no=Fn(to);no.displayName=`GraphNode`;const ro={lineageGraphNode:no,lineageGraphColumnNode:Sa},io={lineageGraphEdge:Ta},ao=[],oo=e=>e.data.changeStatus?Ke(e.data.changeStatus).hexColor:I.neutral[400],so={ROW_COUNT:`row_count`,ROW_COUNT_DIFF:`row_count_diff`,PROFILE:`profile`,PROFILE_DIFF:`profile_diff`,VALUE_DIFF:`value_diff`,HISTOGRAM_DIFF:`histogram_diff`,TOP_K_DIFF:`top_k_diff`},co={LINEAGE_VIEW_CONTEXT_MENU:`lineage_view_context_menu`},lo={SELECT_PARENT_NODES:`select_parent_nodes`,SELECT_CHILD_NODES:`select_child_nodes`,SELECT_ALL_UPSTREAM:`select_all_upstream`,SELECT_ALL_DOWNSTREAM:`select_all_downstream`},uo=({menuItems:e,open:t,onClose:n,x:r,y:i,featureToggles:a,DisabledItemWrapper:o})=>{let s=o??(({children:e})=>G(W,{children:e})),c=a?.mode===`metadata only`;return G($r,{open:t,onClose:n,anchorReference:`anchorPosition`,anchorPosition:{top:i,left:r},slotProps:{paper:{sx:{fontSize:`0.85rem`,width:`250px`}}},children:e.length===0?G($,{disabled:!0,children:`No action available`},`no action`):e.map(({isSeparator:e,label:t,isDisabled:r,action:i,itemIcon:a})=>{if(e)return G(rr,{},t);let l=K($,{disabled:r,onClick:()=>{i&&i(),n()},children:[a,` `,t]},t);return r&&o?G(s,{display:c,children:l},t):l})})},fo=({isOpen:e,onClose:t,x:n,y:r,node:i,deps:a={},viewOptions:o={},featureToggles:s={},serverFlags:c={},noCatalogCurrent:l=!1,isActionAvailable:u=()=>!0})=>{let d=[],{runAction:f,onNavigate:p,onTrack:m,findByRunType:h,setSqlQuery:g,setPrimaryKeys:_,getPrimaryKey:v,DisabledItemWrapper:y}=a,{selectMode:b,cll:x,showColumnLevelLineage:S,setChangeAnalysisMode:C,selectParentNodes:w,selectChildNodes:T,getNodeColumnSet:E}=o,D=c.single_env_onboarding??!1,O=s.disableDatabaseQuery??!1;if(!i?.data)return G(W,{});let k=i.data,ee=k.resourceType,te=E?Array.from(E(i.id)):[],A={source:`lineage_model_node`},ne=k.changeStatus,re=v?.(k.name);if(ne===`modified`&&d.push({label:`Show Impact Radius`,itemIcon:G(lr,{}),isDisabled:l||!u(`change_analysis`),action:()=>{C?.(!0),S?.({node_id:i.id,change_analysis:!0,no_upstream:!0})}}),!b&&ee&&[`model`,`seed`,`snapshot`].includes(ee)){d.length>0&&d.push({label:`select group one`,isSeparator:!0});let e=h?.(D?`query`:`query_diff`),t=k.change?.columns?Object.keys(k.change.columns):[],n=Wt(t,t),r=`select * from {{ ref("${k.name}") }}`;if(n.length&&(r=`select \n ${n.join(`
|
|
3
|
-
`)}\nfrom {{ ref("${k.name}") }}`),e&&d.push({label:`Query`,itemIcon:G(q,{component:e.icon,sx:{display:`inline-flex`}}),isDisabled:O,action:()=>{g?.(r),u(`query_diff_with_primary_key`)&&_?.(re===void 0?void 0:[re]),p?.(`/query`)}}),te.length>0&&e)if(x!==void 0){let t=new Set;re&&t.add(re),te.forEach(e=>{t.add(e)}),d.push({label:`Query Related Columns`,itemIcon:G(q,{component:e.icon,sx:{display:`inline-flex`}}),isDisabled:O,action:()=>{let e=`select \n ${Array.from(t).join(`,
|
|
4
|
-
`)}\nfrom {{ ref("${k.name}") }}`;g?.(e),u(`query_diff_with_primary_key`)&&_?.(re===void 0?void 0:[re]),p?.(`/query`)}})}else{let t=Object.entries(k.change?.columns??{}).filter(([,e])=>e===`modified`).map(([e])=>e);if(t.length>0){let n=new Set;re&&n.add(re),t.forEach(e=>{n.add(e)}),d.push({label:`Query Modified Columns`,itemIcon:G(q,{component:e.icon,sx:{display:`inline-flex`}}),isDisabled:O,action:()=>{let e=`select \n ${Array.from(n).join(`,
|
|
5
|
-
`)}\nfrom {{ ref("${k.name}") }}`;g?.(e),u(`query_diff_with_primary_key`)&&_?.(re===void 0?void 0:[re]),p?.(`/query`)}})}}let a=D?`row_count`:`row_count_diff`,o=h?.(a);o&&d.push({label:o.title,itemIcon:G(q,{component:o.icon,sx:{display:`inline-flex`}}),isDisabled:O,action:()=>{m?.(`explore_action`,{action:D?so.ROW_COUNT:so.ROW_COUNT_DIFF,source:co.LINEAGE_VIEW_CONTEXT_MENU,node_count:1}),f?.(a,{node_names:[k.name]},{showForm:!1,trackProps:A})}});let s=D?`profile`:`profile_diff`,c=h?.(s);if(c&&d.push({label:c.title,itemIcon:G(q,{component:c.icon,sx:{display:`inline-flex`}}),isDisabled:O,action:()=>{let e=E?Array.from(E(i.id)):[];m?.(`explore_action`,{action:D?so.PROFILE:so.PROFILE_DIFF,source:co.LINEAGE_VIEW_CONTEXT_MENU,node_count:1}),f?.(s,{model:k.name,columns:e},{showForm:!0,trackProps:A})}}),!D){let e=h?.(`value_diff`);e&&d.push({label:e.title,itemIcon:G(q,{component:e.icon,sx:{display:`inline-flex`}}),isDisabled:O,action:()=>{let e=E?Array.from(E(i.id)):[];m?.(`explore_action`,{action:so.VALUE_DIFF,source:co.LINEAGE_VIEW_CONTEXT_MENU,node_count:1}),f?.(`value_diff`,{model:k.name,columns:e},{showForm:!0,trackProps:A})}})}}return D||(d.length>0&&d.push({label:`select group two`,isSeparator:!0}),d.push({label:`Select Parent Nodes`,itemIcon:G(zi,{}),action:()=>{m?.(`lineage_selection`,{action:lo.SELECT_PARENT_NODES}),w?.(i.id,1)}}),d.push({label:`Select Child Nodes`,itemIcon:G(Bi,{}),action:()=>{m?.(`lineage_selection`,{action:lo.SELECT_CHILD_NODES}),T?.(i.id,1)}}),d.push({label:`Select All Upstream Nodes`,itemIcon:G(zi,{}),action:()=>{m?.(`lineage_selection`,{action:lo.SELECT_ALL_UPSTREAM}),w?.(i.id)}}),d.push({label:`Select All Downstream Nodes`,itemIcon:G(Bi,{}),action:()=>{m?.(`lineage_selection`,{action:lo.SELECT_ALL_DOWNSTREAM}),T?.(i.id)}})),G(uo,{x:n,y:r,menuItems:d,open:e,onClose:t,featureToggles:s,DisabledItemWrapper:y})},po=({isOpen:e,onClose:t,x:n,y:r,node:i,deps:a={},featureToggles:o={},serverFlags:s={},isActionAvailable:c=()=>!0})=>{let l=[],{runAction:u,onTrack:d,findByRunType:f,supportsHistogramDiff:p,DisabledItemWrapper:m}=a,h=s.single_env_onboarding??!1,g=o.disableDatabaseQuery??!1;if(i?.data===void 0)return G(W,{});let _=i.data,v=_.node,y=_.column,b=_.type,x={source:`lineage_column_node`},S=()=>{d?.(`explore_action`,{action:so.PROFILE_DIFF,source:co.LINEAGE_VIEW_CONTEXT_MENU,node_count:1}),u?.(`profile_diff`,{model:v.name,columns:[y]},{showForm:!1,trackProps:x})},C=()=>{d?.(`explore_action`,{action:so.HISTOGRAM_DIFF,source:co.LINEAGE_VIEW_CONTEXT_MENU,node_count:1}),u?.(`histogram_diff`,{model:v.name,column_name:y,column_type:b},{showForm:!1,trackProps:x})},w=()=>{d?.(`explore_action`,{action:so.TOP_K_DIFF,source:co.LINEAGE_VIEW_CONTEXT_MENU,node_count:1}),u?.(`top_k_diff`,{model:v.name,column_name:y,k:50},{showForm:!1,trackProps:x})},T=()=>{d?.(`explore_action`,{action:so.VALUE_DIFF,source:co.LINEAGE_VIEW_CONTEXT_MENU,node_count:1}),u?.(`value_diff`,{model:v.name,columns:[y]},{showForm:!0,trackProps:x})},E=_.changeStatus===`added`||_.changeStatus===`removed`,D=f?.(h?`profile`:`profile_diff`);if(D&&l.push({label:D.title,itemIcon:G(q,{component:D.icon,sx:{display:`inline-flex`}}),action:S,isDisabled:E||!c(`profile_diff`)||g}),!h){let e=f?.(`histogram_diff`);if(e){let t=p?.(b)??!0;l.push({label:e.title,itemIcon:G(q,{component:e.icon,sx:{display:`inline-flex`}}),action:C,isDisabled:E||!t||g})}let t=f?.(`top_k_diff`);t&&l.push({label:t.title,itemIcon:G(q,{component:t.icon,sx:{display:`inline-flex`}}),action:w,isDisabled:E||g});let n=f?.(`value_diff`);n&&l.push({label:n.title,itemIcon:G(q,{component:n.icon,sx:{display:`inline-flex`}}),action:T,isDisabled:E||g})}return G(uo,{x:n,y:r,menuItems:l,open:e,onClose:t,featureToggles:o,DisabledItemWrapper:m})},mo=({isOpen:e,onClose:t,x:n,y:r,node:i,deps:a={},viewOptions:o={},featureToggles:s={},serverFlags:c={},noCatalogCurrent:l=!1,isActionAvailable:u=()=>!0})=>s.disableViewActionDropdown?G(uo,{menuItems:[],open:e,onClose:t,x:n,y:r,featureToggles:s,DisabledItemWrapper:a.DisabledItemWrapper}):i&&de(i)?G(fo,{x:n,y:r,isOpen:e,onClose:t,node:i,deps:a,viewOptions:o,featureToggles:s,serverFlags:c,noCatalogCurrent:l,isActionAvailable:u}):i&&ue(i)?G(po,{x:n,y:r,isOpen:e,onClose:t,node:i,deps:a,featureToggles:s,serverFlags:c,isActionAvailable:u}):null,ho=()=>{let[e,t]=U(!1),n=()=>t(!0),r=()=>t(!1),[i,a]=U({x:0,y:0}),[o,s]=U();return{props:{x:i.x,y:i.y,node:o,isOpen:e,onClose:r},showContextMenu:(e,t,r)=>{a({x:e,y:t}),s(r),n()},closeContextMenu:()=>{a({x:0,y:0}),s(void 0),r()}}},go=()=>{let{isDark:e}=Tt(),{successToast:t,failToast:n}=Bt();return lt({renderLibrary:`html-to-image`,imageType:`png`,shadowEffect:!0,backgroundColor:e?I.neutral[900]:I.neutral[50],ignoreElements:e=>{try{return e.classList.contains(ot)}catch{return e.className?e.className.includes(ot):!1}},onSuccess:()=>{t(`Copied the Lineage View as an image to clipboard`)},onError:e=>{console.error(`Error taking screenshot`,e),n(`Failed to copy image to clipboard`,e)}})},_o=()=>{let e=xi(),{basePath:t}=me();return V(n=>{n.check_id&&e.push(`${t}/checks/?id=${n.check_id}`)},[e.push,t])};function vo(){let[e,t]=U(()=>new Set),[n,r]=U(()=>new Set);return{impactedNodeIds:e,impactedColumnIds:n,publish:V(e=>{t(e.nodeIds),r(e.columnIds)},[])}}const yo=(e,t)=>{let n=Bn({width:0,height:0});Ln(()=>{let r=e.current,i=new ResizeObserver(e=>{for(let r of e){let e=r.contentRect.width,i=r.contentRect.height;(Math.abs(i-n.current.height)>10||Math.abs(e-n.current.width)>10)&&n.current.height>0&&i>0&&n.current.width>0&&e>0&&t(),n.current={width:e,height:i}}});return r&&i.observe(r),()=>{r&&i.unobserve(r)}},[t,e])},bo=()=>V((e,t,n,r,i)=>{let a=e.filter(de),o=Object.groupBy(a,e=>e.data.changeStatus??`unchanged`),s=Object.fromEntries(Object.entries(o).map(([e,t])=>[`nodes_${e}`,t?.length??0])),c={node_count:a.length,view_mode:t,impact_radius_enabled:n,right_sidebar_open:i,...s};r&&(c.cll_column_active=!0),hn(c)},[]),xo={row_count:$t.ROW_COUNT,row_count_diff:$t.ROW_COUNT_DIFF,value_diff:$t.VALUE_DIFF},So=e=>{let t=xo[e.action];t&&un({action:t,source:tn.LINEAGE_VIEW_TOP_BAR,node_count:e.node_count})},Co=(e,t)=>At(e,{...t,onTrackAction:So,trackingSource:tn.LINEAGE_VIEW_TOP_BAR});function wo(){return ke({onConfirm:()=>dn({action:$t.VALUE_DIFF,event:en.EXECUTE}),onCancel:()=>dn({action:$t.VALUE_DIFF,event:en.CANCEL})})}function To({notification:e,type:t}){let n=k.lineageNotificationDismissed,[r,i]=U(()=>sessionStorage.getItem(n)!==`true`);if(e===null||!r)return null;let a={info:`iochmara.light`,success:`success.light`,warning:`warning.light`,error:`error.light`}[t];return K(q,{sx:{width:`100%`,display:`flex`,flexDirection:`row`,p:`5px 10px`,gap:`5px`,alignItems:`flex-start`,borderRadius:1,boxShadow:4,border:`1px solid`,borderColor:`neutral.light`,bgcolor:a},children:[e,G(q,{sx:{flex:1}}),G(Z,{size:`small`,onClick:()=>{sessionStorage.setItem(n,`true`),i(!1)},children:G(er,{})})]})}function Eo(e,t,n,r){let{parent_map:i,child_map:a,columns:o}=e.current,s=new Map,c=new Set;function l(e,t){if(c.has(e))return;c.add(e);let n=o[e];if(n){let t=e.slice(0,-(n.name.length+1)),i=s.get(t)??[];i.push({column:n.name,isImpacted:r.has(e),transformationType:n.transformation_type,changeStatus:n.change_status}),s.set(t,i)}let i=t[e]??[];for(let e of i)l(e,t)}let u=`${t}_${n}`,d=o[u];if(d){let e=u.slice(0,-(d.name.length+1));s.set(e,[{column:d.name,isImpacted:r.has(u),transformationType:d.transformation_type,changeStatus:d.change_status}])}c.add(u);for(let e of i[u]??[])l(e,i);for(let e of a[u]??[])l(e,a);return s}function Do(e){let{columns:t,parent_map:n}=e.current,r=new Map;function i(e){let a=r.get(e);if(a===`pending`)return!1;if(a!==void 0)return a;if(r.set(e,`pending`),t[e]?.change_status)return r.set(e,!0),!0;let o=n[e]??[];for(let t of o)if(i(t))return r.set(e,!0),!0;return r.set(e,!1),!1}let a=new Set;for(let e of Object.keys(t))i(e)&&a.add(e);return a}function Oo(e,t,n,r){if(n)return!0;if(!t)return!1;if(t.current.nodes[e]?.impacted)return!0;let i=r,a=`${e}_`;for(let e of i)if(e.startsWith(a))return!0;return!1}const ko=e=>{let{runAction:t}=he(),{setSqlQuery:n,setPrimaryKeys:r}=Mt(),i=xi(),{primaryKey:a}=tt(e),{basePath:o}=me();return{runAction:(e,n,r)=>{t(e,n,r)},onNavigate:e=>{i.push(`${o}${e}`)},onTrack:(e,t)=>{e===`explore_action`?un({action:t.action,source:co.LINEAGE_VIEW_CONTEXT_MENU,node_count:t.node_count}):e===`lineage_selection`&&mn({action:t.action})},supportsHistogramDiff:it,findByRunType:e=>{let t=L(e);return t?{title:t.title,icon:t.icon}:void 0},setSqlQuery:n,setPrimaryKeys:r,getPrimaryKey:()=>a,DisabledItemWrapper:xc}},Ao=({isOpen:e,onClose:t,x:n,y:r,node:i})=>{let{selectParentNodes:a,selectChildNodes:o,getNodeColumnSet:s,selectMode:c,cll:l,showColumnLevelLineage:u,setChangeAnalysisMode:d}=pe(),{featureToggles:f}=Ce(),{isActionAvailable:p,lineageGraph:m}=P(),{data:h}=xe(),g=!m?.catalogMetadata.current;return G(mo,{x:n,y:r,node:i,isOpen:e,onClose:t,deps:ko(i?.type===`lineageGraphNode`?i.data?.name:i?.type===`lineageGraphColumnNode`?i.data?.node?.name:void 0),viewOptions:{selectMode:c,cll:l,showColumnLevelLineage:u,setChangeAnalysisMode:d,selectParentNodes:a,selectChildNodes:o,getNodeColumnSet:s},featureToggles:{disableDatabaseQuery:f.disableDatabaseQuery,disableViewActionDropdown:f.disableViewActionDropdown,mode:f.mode??void 0},serverFlags:{single_env_onboarding:h?.single_env_onboarding},noCatalogCurrent:g,isActionAvailable:p})},jo=ho;function Mo(e,t){let n=[],r=[],{selectedNodes:i,cll:a,existingPositions:o,newCllExperience:s,columnAncestry:c}=t??{},l={};function u(e){return e===`removed`?0:e===`added`?2:1}function d(e,t){let n=u(e.data?.changeStatus),r=u(t.data?.changeStatus);return n<r?-1:+(n>r)}let f=i===void 0?void 0:new Set(i),p=Object.values(e.nodes).sort(d);for(let e of p){if(f&&!f.has(e.id))continue;let t=new Set,i=0;if(a&&!s){let o=a.current,s=o?.parent_map[e.id]??new Set;for(let t of s){let n=t,i=e.id;r.push({id:`m2c_${n}_${i}`,source:n,target:i,style:{zIndex:9999}})}let c=Object.entries(o?.columns??{}).filter(([t])=>t.startsWith(`${e.id}_`)).map(([t])=>t.slice(e.id.length+1));for(let o of c){let s=`${e.id}_${o}`,c=a.current,l=c?.columns[s],u=c?.parent_map[s]??new Set;if(l!=null){n.push({id:s,position:{x:10,y:70+i*24},parentId:e.id,extent:`parent`,draggable:!1,className:`no-track-pii-safe`,data:{node:e.data,column:l.name,type:l.type,transformationType:l.transformation_type,changeStatus:l.change_status},style:{zIndex:9999},type:`lineageGraphColumnNode`,targetPosition:Br.Left,sourcePosition:Br.Right});for(let e of u){let t=e,n=s;r.push({id:`${t}_${n}`,source:t,target:n,style:{zIndex:9999}})}i++,t.add(l.name)}}}l[e.id]=t;let c=60;i>0&&(c+=20+i*24);let u=o?.get(e.id);n.unshift({id:e.id,position:u??{x:0,y:0},width:300,height:c,className:`no-track-pii-safe`,data:{...e.data},type:`lineageGraphNode`,targetPosition:Br.Left,sourcePosition:Br.Right,style:{width:300,height:c}})}let m=Object.values(e.edges).sort(d);for(let e of m)f&&(!f.has(e.source)||!f.has(e.target))||r.push({id:e.id,type:`lineageGraphEdge`,source:e.source,target:e.target,data:{...e.data}});return s&&c&&a&&No(n,r,c,a,f),n.some(e=>e.type===`lineageGraphNode`&&!o?.has(e.id))&&Po(n,r),[n,r,l]}function No(e,t,n,r,i){let a=new Set,o=new Map;for(let[t,s]of n)if(!(i&&!i.has(t))){for(let n=0;n<s.length;n++){let i=s[n],c=`${t}_${i.column}`;a.add(c),o.set(c,{modelId:t,isImpacted:i.isImpacted});let l=r.current.columns[c];e.push({id:c,position:{x:10,y:64+n*24},parentId:t,draggable:!1,className:`no-track-pii-safe`,data:{node:{id:t},column:i.column,type:l?.type,transformationType:i.transformationType,changeStatus:i.changeStatus,isHighlighted:!0,isFocused:!1,isImpacted:i.isImpacted},style:{zIndex:9999},type:`lineageGraphColumnNode`,targetPosition:Br.Left,sourcePosition:Br.Right})}if(s.length>0){let n=e.find(e=>e.id===t&&e.type===`lineageGraphNode`);n&&(n.height=80+s.length*24)}}for(let e of a){let n=r.current.parent_map[e]??[];for(let r of n)if(a.has(r)){let n=o.get(r)?.isImpacted??!1;t.push({id:`ancestry_${r}_${e}`,source:r,target:e,style:{zIndex:9999,strokeWidth:2,stroke:n?Nt.impacted:Nt.unchanged}})}}}const Po=(e,t,n=`LR`)=>{F(Vi,e,t,n)};function Fo(){return K(q,{sx:{display:`flex`,gap:2,px:1,py:.5,fontSize:`0.75rem`,color:`text.secondary`},children:[K(`span`,{children:[G(`span`,{className:`schema-change-badge schema-change-badge-added`,children:`+`}),` `,`added`]}),K(`span`,{children:[G(`span`,{className:`schema-change-badge schema-change-badge-removed`,children:`-`}),` `,`removed`]}),K(`span`,{children:[G(`span`,{className:`schema-change-badge schema-change-badge-changed`,children:`~`}),` `,`changed`]})]})}function Io({current:e,showMenu:t=!0},n){let r=_e(),[i,a]=U(null),[o,s]=U(new Map),{columns:c,rows:l}=H(()=>ct({type:`schema_single`,columns:e?.columns},{node:e,cllRunningMap:o,showMenu:t}),[e,o,t]),{lineageGraph:u,isActionAvailable:d}=P(),f=d(`change_analysis`),p=!u?.catalogMetadata.current,m;p&&(m="catalog.json not found. Run `recce debug` to troubleshoot.");let h=e&&e.columns===void 0,g;h&&(g=`Node schema not found in catalog.json. Please regenerate your catalog.json to update.`);let _=async t=>{if(!f)return;rn({action:`view`,source:`schema_column`}),s(e=>new Map(e).set(t,!0));let n=e?.id;n&&await r?.showColumnLevelLineage({node_id:n,column:t}),s(e=>new Map(e).set(t,!1))},v=V(t=>`${e?.id}-${t.data.name}`,[e?.id]),y=r?.viewOptions.column_level_lineage,b=y?`${y.node_id}-${y.column}`:null;Ln(()=>{if(i&&(i.deselectAll(),b)){let e=i.getRowNode(b);e&&e.setSelected(!0)}},[i,b]);let x=V(e=>{a(e.api)},[]);return K(q,{sx:{display:`flex`,flexDirection:`column`,height:`100%`},children:[m?G(Qr,{severity:`warning`,sx:{fontSize:`12px`,p:1},children:m}):g?G(Qr,{severity:`warning`,sx:{fontSize:`12px`,p:1},children:g}):G(W,{}),l.length>0&&G(Ft,{style:{blockSize:`auto`,maxHeight:`100%`,overflow:`auto`,fontSize:`10pt`,borderWidth:1},columns:c,rows:l,renderers:{noRowsFallback:G(kt,{})},ref:n,getRowId:v,getRowClass:e=>r!==void 0&&f?`row-normal row-selectable`:`row-normal`,onCellClicked:async e=>{if((e.event?.target)?.closest(`.row-context-menu`))return;let t=e.data;t&&await _(t.name)},onGridReady:x,rowSelection:{mode:`singleRow`,checkboxes:!1},containerClassName:`no-track-pii-safe`,rowClassName:`no-track-pii-safe`})]})}function Lo({base:e,current:t,showMenu:n=!0,columnChanges:r,onViewCode:i},a){let o=_e(),{data:s}=xe(),c=s?.new_cll_experience??!1,[l,u]=U(null),[d,f]=U(new Map),p=H(()=>{if(!c)return;let e=o?.impactedColumnIds;return e?.size?e:void 0},[c,o?.impactedColumnIds]),{columns:m,rows:h}=H(()=>{let a=t?.resource_type??e?.resource_type,o=a&&[`model`,`seed`,`snapshot`,`source`].includes(a)?t??e:void 0,s=t?.id??e?.id;return ct({type:`schema_diff`,base:e?.columns,current:t?.columns},{node:o,cllRunningMap:d,showMenu:n,columnChanges:r,onViewCode:i,impactedColumns:p,nodeId:s})},[e,t,d,n,r,i,p]),{lineageGraph:g,isActionAvailable:_}=P(),v=_(`change_analysis`),y=!g?.catalogMetadata.base,b=!g?.catalogMetadata.current,x;y&&b?x="catalog.json not found on both environments. Run `recce debug` to troubleshoot.":y?x="catalog.json not found on base environment. Run `recce debug` to troubleshoot.":b&&(x="catalog.json not found on current environment. Run `recce debug` to troubleshoot.");let S=e&&e.columns===void 0,C=t&&t.columns===void 0,w;S&&C?w=`Node schema not found in catalog.json on both environments. Please regenerate your catalog.json to update.`:C?w=`Node schema not found in catalog.json on current environment. Please regenerate your catalog.json to update.`:S&&(w=`Node schema not found in catalog.json on base environment. Please regenerate your catalog.json to update.`);let T=async n=>{if(!v)return;rn({action:`view`,source:`schema_column`}),f(e=>new Map(e).set(n,!0));let r=t?.id??e?.id;r&&await o?.showColumnLevelLineage({node_id:r,column:n}),f(e=>new Map(e).set(n,!1))},E=V(n=>`${t?.id??e?.id}-${n.data.name}`,[t?.id,e?.id]),D=o?.viewOptions.column_level_lineage,O=D?`${D.node_id}-${D.column}`:null;Ln(()=>{if(l&&(l.deselectAll(),O)){let e=l.getRowNode(O);e&&e.setSelected(!0)}},[l,O]);let k=V(e=>{u(e.api)},[]);return K(q,{sx:{display:`flex`,flexDirection:`column`,height:`100%`},children:[x?G(Qr,{severity:`warning`,sx:{fontSize:`12px`,p:1},children:x}):w?G(Qr,{severity:`warning`,sx:{fontSize:`12px`,p:1},children:w}):G(W,{}),G(Fo,{}),h.length>0&&G(Ft,{style:{blockSize:`auto`,maxHeight:`100%`,overflow:`auto`,fontSize:`0.8rem`,borderWidth:1},columns:m,rows:h,rowHeight:35,renderers:{noRowsFallback:G(kt,{})},className:`rdg-light no-track-pii-safe${c?` cll-experience`:``}`,ref:a,getRowId:E,getRowClass:e=>{let t=e.data;if(!t)return`row-normal`;let n;if(t.baseIndex===void 0)n=`row-added`;else if(t.currentIndex===void 0)return`row-removed`;else n=t.baseType!==t.currentType||t.reordered===!0||t.definitionChanged===!0?`row-changed`:t.isImpacted?`row-impacted`:`row-normal`;return o!==void 0&&v&&(n+=` row-selectable`),n},onCellClicked:async e=>{if((e.event?.target)?.closest(`.row-context-menu`))return;let t=e.data;t&&(t.baseIndex!==void 0&&t.currentIndex===void 0||await T(t.name))},onGridReady:k,rowSelection:{mode:`singleRow`,checkboxes:!1},containerClassName:`no-track-pii-safe`,rowClassName:`no-track-pii-safe`})]})}const Ro=Pn(Lo),zo=Pn(Io),Bo=({node:e,modelDetail:t,isSingleEnv:n,CodeEditor:r,DiffEditor:i,isDark:a=!1})=>{let[o,s]=U(!1),[c,l]=U(!1);if(e.data.resourceType!==`model`&&e.data.resourceType!==`snapshot`)return`Not available`;let u=t?.base?.raw_code,d=t?.current?.raw_code,f=t?.base?.name??t?.current?.name??e.data.name??``,p=u!=null||d!=null;return K(q,{className:`no-track-pii-safe`,sx:{position:`relative`,height:`100%`},onMouseEnter:()=>{l(!0)},onMouseLeave:()=>{l(!1)},children:[p?n?G(r,{language:`sql`,value:u??``,readOnly:!0,lineNumbers:!0,wordWrap:!1,theme:a?`dark`:`light`}):G(i,{original:u??``,modified:d??``,language:`sql`,readOnly:!0,lineNumbers:!0,sideBySide:!1,theme:a?`dark`:`light`,height:`100%`}):G(q,{sx:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100%`,color:`text.secondary`},children:`No code available`}),G(Z,{onClick:()=>s(!0),size:`medium`,"aria-label":`Expand`,sx:{position:`absolute`,top:`5px`,right:`20px`,opacity:c?.5:.1,transition:`opacity 0.3s ease-in-out`},children:G(or,{})}),K(Vn,{open:o,onClose:()=>s(!1),maxWidth:`sm`,fullWidth:!0,slotProps:{paper:{sx:{height:`75%`,overflowY:`auto`}}},children:[K(Wn,{sx:{display:`flex`,alignItems:`center`},children:[n?K(W,{children:[G(`code`,{children:f}),`\xA0Model Code`]}):K(W,{children:[G(`code`,{children:f}),`\xA0Model Code Diff`]}),G(q,{sx:{flex:1}}),G(Z,{size:`small`,onClick:()=>s(!1),children:G(er,{})})]}),G(Un,{children:p?n?G(r,{language:`sql`,value:u??``,fontSize:16,readOnly:!0,lineNumbers:!0,wordWrap:!1,theme:a?`dark`:`light`}):G(i,{original:u??``,modified:d??``,language:`sql`,theme:a?`dark`:`light`,className:`text-base`}):G(q,{sx:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100%`,color:`text.secondary`},children:`No code available`})})]})]})},Vo=({node:e})=>{let{data:t,isLoading:n}=xe(),r=Rt(),{apiClient:i}=B(),a=e.data.resourceType,o=a===`model`||a===`snapshot`,{data:s,isLoading:c}=An({queryKey:[`modelDetail`,e.id],queryFn:()=>u(e.id,i),enabled:o&&!!i,staleTime:300*1e3,retry:1});return n?G(W,{}):o&&c?G(q,{"aria-label":`Loading model code`,sx:{p:2,height:`100%`},"data-testid":`node-sql-view-loading`,children:G(Hi,{variant:`rectangular`,height:`100%`,animation:`wave`})}):G(Bo,{node:e,modelDetail:s?.model,isSingleEnv:t?.single_env_onboarding??!1,CodeEditor:Xe,DiffEditor:ft,isDark:r})};function Ho({rowCount:e}){let t=e.base,n=e.curr,r=e.base===null?`N/A`:`${e.base} rows`,i=e.curr===null?`N/A`:`${e.curr} rows`;return t===null&&n===null?G(W,{children:` Failed to load`}):t===null||n===null?K(Y,{direction:`row`,spacing:.5,sx:{alignItems:`center`},children:[G(X,{variant:`body2`,component:`span`,children:r}),G(Di,{}),G(X,{variant:`body2`,component:`span`,children:i})]}):t===n?K(Y,{direction:`row`,spacing:.5,sx:{alignItems:`center`},children:[G(X,{variant:`body2`,component:`span`,children:i}),G(q,{component:`span`,sx:{color:`grey.500`,display:`flex`},children:G(Fi,{})}),G(X,{variant:`body2`,component:`span`,sx:{color:`grey.500`},children:`No Change`})]}):t<n?K(Y,{direction:`row`,spacing:.5,sx:{alignItems:`center`},children:[G(X,{variant:`body2`,component:`span`,children:i}),G(q,{component:`span`,sx:{color:`success.main`,display:`flex`},children:G(Ni,{})}),G(X,{variant:`body2`,component:`span`,sx:{color:`success.main`},children:Ut(t,n)})]}):K(Y,{direction:`row`,spacing:.5,sx:{alignItems:`center`},children:[G(X,{variant:`body2`,component:`span`,children:i}),G(q,{component:`span`,sx:{color:`error.main`,display:`flex`},children:G(Mi,{})}),G(X,{variant:`body2`,component:`span`,sx:{color:`error.main`},children:Ut(t,n)})]})}function Uo({rowCount:e,node:t,onRefresh:n,isFetching:r}){let i=Rt(),{featureToggles:a}=Ce(),{runsAggregated:o}=P(),s=o?.[t.id]?.row_count_diff.result,c=L(`row_count_diff`).icon,l=e??s,u=l;return G(Q,{title:l?`${l.base??`N/A`} -> ${l.curr??`N/A`} rows`:``,children:G(xc,{display:a.mode===`metadata only`,children:K(q,{component:`span`,sx:{...Ct(i),gap:.5},children:[G(c,{}),u!=null||r?r?G(Hi,{width:30,height:16}):u==null?G(X,{variant:`caption`,children:`row count`}):G(Ho,{rowCount:u}):G(X,{variant:`caption`,children:`row count`}),n&&G(Z,{"aria-label":`Query Row Count`,size:`small`,onClick:n,disabled:a.disableDatabaseQuery,sx:{p:0,ml:.5},children:G(Er,{size:12})})]})})})}function Wo({rowCount:e,node:t,onRefresh:n,isFetching:r}){let i=Rt(),{runsAggregated:a}=P(),o=a?.[t.id]?.row_count.result,s=L(`row_count`).icon,c,l=e??o;return l&&(c=`${l.curr??`N/A`} rows`),K(q,{component:`span`,sx:Ct(i),children:[G(q,{component:`span`,sx:pt,children:G(s,{})}),l||r?r?G(Hi,{width:30,height:16}):G(X,{variant:`caption`,children:c}):G(X,{variant:`caption`,children:`row count`}),n&&G(Z,{"aria-label":`Query Row Count`,size:`small`,onClick:n,disabled:t.data.changeStatus===`removed`,sx:{p:0,ml:.5},children:G(Er,{size:12})})]})}function Go({children:e,value:t,index:n}){return t===n?G(W,{children:e}):null}const Ko=()=>G(`span`,{}),qo=({children:e})=>G(W,{children:e}),Jo=()=>!0;function Yo(e,t,n){return e?En.add_or_remove:n(t)?``:`This action is not supported yet.`}function Xo({node:e,actionCallbacks:t,runTypeIcons:n,isActionAvailable:r}){let i=e.data.changeStatus===`added`||e.data.changeStatus===`removed`,a=n?.query??Ko,o=n?.row_count??Ko,s=n?.profile??Ko;return K(Y,{direction:`row`,sx:{alignItems:`center`,flexWrap:`wrap`,gap:1},children:[G(J,{size:`xsmall`,variant:`outlined`,color:`neutral`,startIcon:G(a,{fontSize:`small`}),onClick:t?.onQueryClick,sx:{textTransform:`none`},children:`Query`}),G(J,{size:`xsmall`,variant:`outlined`,color:`neutral`,startIcon:G(o,{fontSize:`small`}),onClick:t?.onRowCountClick,sx:{textTransform:`none`},children:`Row Count`}),G(Q,{title:Yo(i,`profile`,r),placement:`top`,children:G(`span`,{children:G(J,{size:`xsmall`,variant:`outlined`,color:`neutral`,startIcon:G(s,{fontSize:`small`}),onClick:t?.onProfileClick,disabled:i,sx:{textTransform:`none`},children:`Profile`})})})]})}function Zo({actionCallbacks:e,runTypeIcons:t,featureToggles:n,ConnectionPopoverWrapper:r}){let i=n?.mode===`metadata only`,a=t?.schema_diff??Ko,o=t?.sandbox??Ko;return K(Y,{direction:`row`,sx:{alignItems:`center`,flexWrap:`wrap`,gap:1,mr:1},children:[G(J,{size:`xsmall`,variant:`outlined`,color:`neutral`,startIcon:G(a,{fontSize:`small`}),onClick:e?.onAddSchemaDiffClick,sx:{textTransform:`none`},children:`Add schema diff to checklist`}),G(r,{display:i,children:G(J,{size:`xsmall`,variant:`outlined`,color:`neutral`,startIcon:G(o,{fontSize:`small`}),onClick:e?.onSandboxClick,disabled:n?.disableDatabaseQuery,sx:{textTransform:`none`},children:`Sandbox`})})]})}function Qo({node:e,actionCallbacks:t,runTypeIcons:n,featureToggles:r,isActionAvailable:i,ConnectionPopoverWrapper:a}){let o=r?.mode===`metadata only`,s=e.data.changeStatus===`added`||e.data.changeStatus===`removed`,c=n?.query_diff??Ko,l=n?.row_count_diff??Ko,u=n?.profile_diff??Ko,d=n?.value_diff??Ko,f=n?.top_k_diff??Ko,p=n?.histogram_diff??Ko,m=(e,t)=>o?G(a,{display:!0,children:e}):G(Q,{title:Yo(s,t,i),placement:`top`,children:G(`span`,{children:e})});return K(Y,{direction:`row`,sx:{alignItems:`center`,flexWrap:`wrap`,gap:2},children:[G(X,{variant:`caption`,sx:{fontWeight:`bold`},children:`Diff`}),K(Y,{direction:`row`,sx:{alignItems:`center`,flexWrap:`wrap`,gap:1,width:`93%`},children:[G(a,{display:o,children:G(J,{size:`xsmall`,variant:`outlined`,color:`neutral`,startIcon:G(l,{fontSize:`small`}),onClick:t?.onRowCountDiffClick,disabled:r?.disableDatabaseQuery,sx:{textTransform:`none`},children:`Row Count`})}),m(G(J,{size:`xsmall`,variant:`outlined`,color:`neutral`,startIcon:G(u,{fontSize:`small`}),onClick:t?.onProfileDiffClick,disabled:s||r?.disableDatabaseQuery,sx:{textTransform:`none`},children:`Profile`}),`profile_diff`),m(G(J,{size:`xsmall`,variant:`outlined`,color:`neutral`,startIcon:G(d,{fontSize:`small`}),onClick:t?.onValueDiffClick,disabled:s||r?.disableDatabaseQuery,sx:{textTransform:`none`},children:`Value`}),`value_diff`),m(G(J,{size:`xsmall`,variant:`outlined`,color:`neutral`,startIcon:G(f,{fontSize:`small`}),onClick:t?.onTopKDiffClick,disabled:s||r?.disableDatabaseQuery,sx:{textTransform:`none`},children:`Top-K`}),`top_k_diff`),m(G(J,{size:`xsmall`,variant:`outlined`,color:`neutral`,startIcon:G(p,{fontSize:`small`}),onClick:t?.onHistogramDiffClick,disabled:s||r?.disableDatabaseQuery,sx:{textTransform:`none`},children:`Histogram`}),`histogram_diff`),G(a,{display:o,children:G(J,{size:`xsmall`,variant:`outlined`,color:`neutral`,startIcon:G(c,{fontSize:`small`}),onClick:t?.onQueryDiffClick,disabled:r?.disableDatabaseQuery,sx:{textTransform:`none`},children:`Query`})})]})]})}function $o({node:e,onCloseNode:t,isSingleEnv:n,featureToggles:r,modelDetail:i,SchemaView:a,SingleEnvSchemaView:o,NodeSqlView:s,RowCountDiffTag:c,RowCountTag:l,ResourceTypeTag:u,NotificationComponent:d,ConnectionPopoverWrapper:f=qo,SandboxDialog:p,runTypeIcons:m,actionCallbacks:h,isActionAvailable:g=Jo}){let _=e.data.resourceType===`model`||e.data.resourceType===`seed`||e.data.resourceType===`source`||e.data.resourceType===`snapshot`,[v,y]=U(!1),[b,x]=U(!0),[S,C]=U(0),{base:w,current:T}=i??{},E=!n&&e.data.change?.columns!=null&&Object.keys(e.data.change.columns).length>0,D=!n&&e.data.changeStatus===`modified`,O=e.data.resourceType===`model`||e.data.resourceType===`seed`||e.data.resourceType===`snapshot`,k={...h,onSandboxClick:()=>{h?.onSandboxClick?.(),y(!0)}};return K(q,{sx:{height:`100%`,display:`flex`,flexDirection:`column`},children:[K(Y,{direction:`row`,sx:{alignItems:`center`},children:[G(q,{sx:{flex:`0 1 20%`,p:2},children:G(X,{variant:`subtitle1`,className:`no-track-pii-safe`,sx:{fontWeight:600},children:e.data.name})}),G(q,{sx:{flexGrow:1}}),!n&&O&&G(Zo,{node:e,actionCallbacks:k,runTypeIcons:m,featureToggles:r,ConnectionPopoverWrapper:f}),G(q,{sx:{flex:`0 1 1%`},children:G(Z,{size:`small`,onClick:t,children:G(er,{})})})]}),G(q,{sx:{color:`text.secondary`,pl:2},children:K(Y,{direction:`row`,spacing:1,children:[u&&G(u,{node:e}),O&&(n?l&&G(l,{node:e,onRefresh:h?.onRowCountClick}):c&&G(c,{node:e,onRefresh:h?.onRowCountDiffClick}))]})}),O&&G(q,{sx:{pl:2,py:1},children:n?G(Xo,{node:e,actionCallbacks:h,runTypeIcons:m,isActionAvailable:g}):G(Qo,{node:e,actionCallbacks:k,runTypeIcons:m,featureToggles:r,isActionAvailable:g,ConnectionPopoverWrapper:f})}),_&&K(q,{sx:{overflow:`auto`,display:`flex`,flexDirection:`column`,flex:1,minHeight:0},children:[n&&b&&d&&G(q,{sx:{p:1.5},children:G(d,{onClose:()=>x(!1),children:G(X,{variant:`body2`,children:`Enable the Recce Checklist and start adding checks for better data validation and review.`})})}),K(pi,{value:S,onChange:(e,t)=>C(t),sx:{borderBottom:1,borderColor:`divider`},children:[G(fi,{label:K(q,{component:`span`,sx:{display:`flex`,alignItems:`center`,gap:.75},children:[`Columns`,E&&G(q,{component:`span`,sx:{color:`amber.main`,fontSize:`0.5rem`,lineHeight:1},children:`●`})]})}),G(fi,{label:K(q,{component:`span`,sx:{display:`flex`,alignItems:`center`,gap:.75},children:[`Code`,D&&G(q,{component:`span`,sx:{color:`amber.main`,fontSize:`0.5rem`,lineHeight:1},children:`●`})]})})]}),K(q,{sx:{overflow:`auto`,height:`calc(100% - 48px)`},children:[G(Go,{value:S,index:0,children:G(q,{sx:{overflowY:`auto`,height:`100%`},children:n?o&&G(o,{current:T}):a&&G(a,{base:w,current:T,columnChanges:e.data.change?.columns,onViewCode:()=>C(1)})})}),G(Go,{value:S,index:1,children:G(q,{sx:{height:`100%`},children:s&&G(s,{node:e})})})]})]}),p&&G(p,{isOpen:v,onClose:()=>y(!1),current:T})]})}function es(e){return li(di(e),`yyyy-MM-dd'T'HH:mm:ss`)}function ts({current:e,primaryKeys:t,onPrimaryKeysChange:n,onRunResultOpen:r,runQuery:i,isPending:a,isCodeLoading:o=!1,QueryForm:s}){let c=!!e?.raw_code,l=a||o||!c,u=o?`Loading model code...`:c?`Run diff to see the changes`:`No code available for this model`;return K(Y,{direction:`row`,sx:{justifyContent:`flex-end`,alignItems:`center`,p:`4pt 8pt`,gap:`5px`,height:`54px`,borderBottom:`1px solid`,borderBottomColor:`divider`,flex:`0 0 54px`},children:[K(q,{children:[K(X,{variant:`h6`,component:`h2`,sx:{display:`flex`,alignItems:`center`,gap:`5px`},children:[G(q,{component:Ui,sx:{fontSize:`1.2em`}}),`Sandbox`]}),K(X,{sx:{fontSize:`0.75rem`,color:`grey.500`},children:[`Compare the run results based on the modified SQL code of model`,` `,G(`b`,{children:e?.name})]})]}),G(q,{sx:{flexGrow:1}}),G(s,{defaultPrimaryKeys:t,onPrimaryKeysChange:n}),G(Q,{title:u,children:G(`span`,{children:G(J,{size:`small`,sx:{mt:`16px`,fontSize:`14px`},onClick:()=>{r(),i()},color:`iochmara`,variant:`contained`,disabled:l,children:a?`Running...`:`Run Diff`})})})]})}function ns({currentModelID:e,height:t=`32px`,flex:n=`0 0 auto`,isDark:r=!1}){let{lineageGraph:i,envInfo:a}=P(),o=`0 16px`,s=ui(es(a?.dbt?.current?.generated_at??``),{addSuffix:!0}),c=`N/A`;if(i?.nodes[e]){let t=i.nodes[e];t.data.schema&&(c=t.data.schema)}return K(Y,{direction:`row`,sx:{gap:0,height:t,flex:n,fontSize:`14px`,alignItems:`center`,m:0,bgcolor:Yn(r?I.neutral[700]:I.neutral[100],.5)},children:[G(Y,{sx:{width:`50%`},children:K(X,{sx:{fontWeight:`bold`,margin:o},children:[`ORIGINAL (Schema: `,c,`, Last Updated: `,s,`)`]})}),G(Y,{sx:{width:`50%`},children:G(X,{sx:{fontWeight:`bold`,margin:o},children:`SANDBOX EDITOR`})})]})}function rs({current:e,onChange:t,isDark:n,isCodeLoading:r=!1,DiffEditor:i}){return r?G(q,{sx:{flex:1,p:2},"data-testid":`sandbox-sql-preview-loading`,"aria-label":`Loading model code`,children:G(Hi,{variant:`rectangular`,height:`100%`,animation:`wave`})}):e?.raw_code?G(i,{original:e.raw_code,modified:e.raw_code,language:`sql`,readOnly:!1,lineNumbers:!0,sideBySide:!0,theme:n?`dark`:`light`,height:`100%`,onModifiedChange:t}):G(q,{sx:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`text.secondary`},children:`No code available for this model.`})}function is({isOpen:e,onClose:t,current:n,DiffEditor:r,QueryForm:i,RunResultPane:a,isDark:o=!1,primaryKeys:s=[],onPrimaryKeysChange:c,isPending:l=!1,onRunQuery:u,onRunResultOpen:d,onModifiedCodeChange:f,onShowFeedback:p,tracking:m,logoUrl:h=`/logo/recce-logo-white.png`,brandName:g=`RECCE`,isCodeLoading:_=!1}){let[v,y]=U(!1),b=e=>{f?.(e)},x=()=>{y(!0),d?.()},S=()=>{u?.()},C=()=>{t(),y(!1),m?.onPreviewChange?.({action:`close`,node:n?.name})};return K(Vn,{open:e,onClose:C,maxWidth:!1,fullWidth:!0,slotProps:{paper:{sx:{width:`100%`,height:`100%`,maxWidth:`100%`,maxHeight:`100%`,m:0}}},children:[K(q,{sx:{height:`40px`,bgcolor:`cyan.600`,px:0,py:2,display:`flex`,alignItems:`center`},children:[K(Y,{direction:`row`,sx:{alignItems:`center`,height:`100%`,gap:`10px`},children:[G(q,{component:`img`,sx:{width:`20px`,height:`20px`,ml:`18px`},src:h,alt:`logo`}),G(X,{variant:`h6`,component:`h1`,sx:{fontFamily:`"Montserrat", sans-serif`,fontSize:`1.125rem`,color:`common.white`},children:g}),G(Mr,{label:`Experiment`,size:`small`,variant:`outlined`,sx:{fontSize:`0.875rem`,color:`common.white`,borderColor:`rgba(255,255,255,0.5)`}})]}),G(Z,{"aria-label":`close`,onClick:C,sx:{position:`absolute`,right:8,top:4,color:`common.white`},children:G(er,{})})]}),G(Un,{sx:{p:0},children:K(_t,{sizes:v?[50,50]:[100,0],minSize:0,gutterSize:5,className:v?void 0:`split-gutter-hidden`,style:{flex:`1`,contain:`size`,height:`100%`},children:[K(Y,{sx:{height:`100%`,m:0,p:0},children:[G(ts,{current:n,primaryKeys:s,onPrimaryKeysChange:e=>{c?.(e)},onRunResultOpen:x,runQuery:S,isPending:l,isCodeLoading:_,QueryForm:i}),G(ns,{height:`32px`,flex:`0 0 auto`,currentModelID:n?.id??``,isDark:o}),G(rs,{current:n,onChange:b,isDark:o,isCodeLoading:_,DiffEditor:r})]}),v?G(a,{onClose:()=>y(!1),disableAddToChecklist:!0}):G(q,{})]})}),G(q,{sx:{position:`fixed`,bottom:16,right:16,opacity:.5},children:G(Q,{title:`Give us feedback`,children:G(Z,{"aria-label":`feedback`,size:`medium`,onClick:()=>{p?.()},children:G(ni,{})})})})]})}function as({isOpen:e,onClose:t,current:n}){let{showRunId:r,clearRunResult:i}=he(),{primaryKeys:o,setPrimaryKeys:s}=Mt(),{data:c,isLoading:l}=xe(),{apiClient:d}=B(),f=Rt(),p=n?.raw_code,h=e&&!!n?.id&&p==null,{data:g,isLoading:v}=An({queryKey:[`modelDetail`,n?.id??``],queryFn:()=>u(n?.id??``,d),enabled:h&&!!d,staleTime:300*1e3,retry:1}),y=H(()=>p??g?.model.current?.raw_code??g?.model.base?.raw_code??void 0,[p,g]),b=H(()=>{if(n)return y===n.raw_code?n:{...n,raw_code:y}},[n,y]),[x,S]=U(``),[C,w]=U(e),[T,E]=U(y),D=Bn(!1),O=V(e=>{D.current=!0,S(e)},[]);e===C?e&&y!==T&&!D.current&&(E(y),S(y??``)):(w(e),e&&(D.current=!1,S(y??``),E(y)));let{mutate:k,isPending:ee}=kn({mutationFn:async()=>{let e=x,{run_id:t}=await a({current_model:n?.name??``,primary_keys:o,sql_template:e},{nowait:!0},d);return r(t),await _(t,void 0,d)},onSuccess(e){e.error?yn({action:`run`,node:n?.name,status:`failure`}):(yn({action:`run`,node:n?.name,status:`success`}),setTimeout(()=>{te()},1e3),!l&&c?.single_env_onboarding&&setTimeout(()=>{ne()},2e3))}}),{feedbackToast:te,closeToast:A}=wt({feedbackId:m.previewChangeFeedbackID,description:`Enjoy preview change?`,onFeedbackSubmit:e=>{switch(e){case`like`:bn({feedback:`like`,node:n?.name});break;case`dislike`:bn({feedback:`dislike`,node:n?.name});break;case`link`:bn({feedback:`form`,node:n?.name});break;default:console.log(`Not support feedback type`)}},externalLink:`https://docs.google.com/forms/d/e/1FAIpQLSd7Lei7Ijwo7MinWaI0K6rzZi_21gV1BKetmiNEX254kDziDA/viewform?usp=header`,externalLinkText:`Give us feedback`}),{guideToast:ne,closeGuideToast:re}=bt({guideId:m.prepareEnvGuideID,description:`Want to compare data changes with production data?`,externalLink:`https://docs.reccehq.com/get-started/#prepare-dbt-artifacts`,externalLinkText:`Learn how.`,onExternalLinkClick:()=>{wn({action:`external_link`,from:`preview_changes`,node:n?.name})}});return G(is,{isOpen:e,onClose:()=>{t(),i(),A(),re()},current:b,DiffEditor:ft,QueryForm:Ja,RunResultPane:je,isDark:f,primaryKeys:o??[],onPrimaryKeysChange:s,isPending:ee,isCodeLoading:h&&v,onRunQuery:k,onModifiedCodeChange:O,onShowFeedback:()=>te(!0),tracking:{onPreviewChange:yn}})}const os=({node:e})=>G(yt,{resourceType:e.data.resourceType,materialized:e.data.materialized});function ss({onClose:e}){return G(mt,{onClose:e,align:`flex-start`,children:K(X,{variant:`body2`,children:[`Enable the Recce Checklist and start adding checks for better data validation and review.`,G(`br`,{}),G(De,{})]})})}function cs({node:e,onCloseNode:t}){let n=xi(),{runAction:r}=he(),{isActionAvailable:i,envInfo:a}=P(),{singleEnv:o,featureToggles:s}=Ce(),{setSqlQuery:c,setPrimaryKeys:l}=Mt(),{primaryKey:d}=tt(e.data.name),{apiClient:f}=B(),{basePath:p}=me(),{data:m}=An({queryKey:[`modelDetail`,e.id],queryFn:()=>u(e.id,f),enabled:!!f,staleTime:300*1e3}),h=m?.model,g=H(()=>({query:L(`query`).icon,row_count:L(`row_count`).icon,row_count_diff:L(`row_count_diff`).icon,profile:L(`profile`).icon,profile_diff:L(`profile_diff`).icon,query_diff:L(`query_diff`).icon,value_diff:L(`value_diff`).icon,top_k_diff:L(`top_k_diff`).icon,histogram_diff:L(`histogram_diff`).icon,schema_diff:L(`schema_diff`).icon,sandbox:L(`sandbox`).icon}),[]),_=Wt(Object.keys(h?.base?.columns??{}),Object.keys(h?.current?.columns??{})),v=H(()=>_.length?`select \n ${_.join(`
|
|
6
|
-
`)}\nfrom {{ ref("${e.data.name}") }}`:`select * from {{ ref("${e.data.name}") }}`,[_,e.data.name]),b=H(()=>({onQueryClick:()=>{a?.adapterType===`dbt`?c(v):a?.adapterType===`sqlmesh`&&c(`select * from ${e.data.name}`),n.push(`${p}/query`)},onRowCountClick:()=>{un({action:$t.ROW_COUNT,source:tn.SCHEMA_ROW_COUNT_BUTTON,node_count:1}),r(`row_count`,{node_names:[e.data.name]},{showForm:!1,showLast:!1})},onRowCountDiffClick:()=>{un({action:$t.ROW_COUNT_DIFF,source:tn.SCHEMA_ROW_COUNT_BUTTON,node_count:1}),r(`row_count_diff`,{node_names:[e.data.name]},{showForm:!1,showLast:!1})},onProfileClick:()=>{un({action:$t.PROFILE,source:tn.NODE_SIDEBAR_SINGLE_ENV,node_count:1}),r(`profile`,{model:e.data.name},{showForm:!0,showLast:!1})},onProfileDiffClick:()=>{un({action:$t.PROFILE_DIFF,source:tn.NODE_SIDEBAR_MULTI_ENV,node_count:1}),r(`profile_diff`,{model:e.data.name},{showForm:!0,showLast:!1})},onQueryDiffClick:()=>{a?.adapterType===`dbt`?c(v):a?.adapterType===`sqlmesh`&&c(`select * from ${e.data.name}`),i(`query_diff_with_primary_key`)&&l(d===void 0?void 0:[d]),n.push(`${p}/query`)},onValueDiffClick:()=>{un({action:$t.VALUE_DIFF,source:tn.NODE_SIDEBAR_MULTI_ENV,node_count:1}),r(`value_diff`,{model:e.data.name},{showForm:!0,showLast:!1})},onTopKDiffClick:()=>{un({action:$t.TOP_K_DIFF,source:tn.NODE_SIDEBAR_MULTI_ENV,node_count:1}),r(`top_k_diff`,{model:e.data.name,column_name:``,k:50},{showForm:!0})},onHistogramDiffClick:()=>{un({action:$t.HISTOGRAM_DIFF,source:tn.NODE_SIDEBAR_MULTI_ENV,node_count:1}),r(`histogram_diff`,{model:e.data.name,column_name:``,column_type:``},{showForm:!0})},onAddSchemaDiffClick:async()=>{let t=await y({node_id:e.id},f);n.push(`${p}/checks/?id=${t.check_id}`)},onSandboxClick:()=>{i(`query_diff_with_primary_key`)&&l(d===void 0?void 0:[d]),yn({action:`explore`,node:e.data.name})}}),[e,v,a,c,r,i,l,d,f,n.push,p]);return G($o,{node:e,onCloseNode:t,isSingleEnv:o??!1,featureToggles:s,modelDetail:(()=>{if(!h)return;let t=!!h.base&&Object.keys(h.base).length>0,n=!!h.current&&Object.keys(h.current).length>0;if(!(!t&&!n))return{base:t?{id:e.id,unique_id:e.id,name:e.data.name,resource_type:e.data.resourceType,package_name:e.data.packageName,...h.base}:void 0,current:n?{id:e.id,unique_id:e.id,name:e.data.name,resource_type:e.data.resourceType,package_name:e.data.packageName,...h.current}:void 0}})(),SchemaView:Ro,SingleEnvSchemaView:zo,NodeSqlView:Vo,ResourceTypeTag:os,RowCountDiffTag:Uo,RowCountTag:Wo,NotificationComponent:ss,ConnectionPopoverWrapper:xc,SandboxDialog:as,runTypeIcons:g,actionCallbacks:b,isActionAvailable:i})}function ls(e,t){let n={...e.nodes};for(let[e,r]of Object.entries(t.current.nodes)){if(!r.change_status)continue;let t=n[e];if(!t)continue;let i;if(r.columns){let e={},t=!1;for(let n of Object.values(r.columns))n.change_status&&(e[n.name]=n.change_status,t=!0);t&&(i=e)}n[e]={...t,change_status:r.change_status,change:r.change_category?{category:r.change_category,columns:i}:t.change}}return{...e,nodes:n}}function us({featureToggles:e,settingsUrl:t}){return e.mode===`metadata only`?G(q,{sx:{display:`flex`,alignItems:`center`,width:`100%`,px:1,py:.25,bgcolor:`cyan.50`},children:K(Y,{direction:`row`,spacing:1,sx:{alignItems:`center`,flex:1,fontSize:`0.875rem`,color:`cyan.600`},children:[G(q,{component:yr}),G(X,{sx:{fontSize:`inherit`,color:`inherit`},children:`Query functions disabled without a data warehouse connection.`}),G(J,{sx:{bgcolor:`iochmara.400`},size:`small`,variant:`contained`,onClick:()=>{window.open(t,`_blank`)},children:`Connect to Data Warehouse`})]})}):null}function ds(e){let{featureToggles:t}=Ce(),{data:n}=N();return G(us,{featureToggles:e.featureToggles??t,settingsUrl:e.settingsUrl??qt(n,Qt)})}function fs({docsUrl:e=`https://docs.reccehq.com/get-started/#prepare-dbt-artifacts`,onStartClick:t}={}){return G(Y,{sx:{flex:1,height:`100%`,minHeight:0,m:1,p:2,bgcolor:`iochmara.50`,borderRadius:2,boxShadow:2,justifyContent:`center`},children:K(Y,{sx:{alignSelf:`center`,width:`80%`,overflowY:`auto`,gap:3,px:4,pb:4},children:[K(Y,{spacing:2,sx:{alignItems:`center`},children:[G(q,{sx:{p:1,bgcolor:`background.paper`,borderRadius:`50%`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:2},children:G(q,{component:Ii,sx:{fontSize:28,color:`iochmara.500`}})}),G(X,{variant:`h5`,sx:{mt:2},children:`Wait, there's more!`}),K(X,{sx:{textAlign:`center`},children:[`Recce is currently running in`,` `,G(X,{component:`span`,sx:{fontWeight:`bold`},children:`limited functionality mode`}),` `,`so you can run queries but`,` `,G(X,{component:`span`,sx:{fontWeight:`bold`},children:`can't diff the results yet!`})]})]}),K(Y,{spacing:1,children:[G(X,{children:`To unlock the full power of Recce, set up a base environment of dbt artifacts for comparison.`}),G(X,{children:`Once configured, you'll be able to:`}),K(mi,{sx:{listStyleType:`disc`,pl:2},children:[G(hi,{sx:{display:`list-item`,p:0},children:G(X,{children:`Run statistical data diffs`})}),G(hi,{sx:{display:`list-item`,p:0},children:G(X,{children:`Run query diffs`})}),G(hi,{sx:{display:`list-item`,p:0},children:G(X,{children:`Save checks to your Recce Checklist`})}),G(hi,{sx:{display:`list-item`,p:0},children:G(X,{children:`...and more!`})})]}),G(X,{children:`Take the next step toward better data impact assessment.`})]}),G(Y,{sx:{width:`100%`,mt:3},children:G(J,{color:`iochmara`,variant:`contained`,size:`large`,onClick:()=>{t?t():window.open(e,`_blank`)},children:`Start Now`})})]})})}function ps({docsUrl:e=`https://docs.reccehq.com/configure-diff/`}={}){return K(Y,{direction:`row`,spacing:`10px`,sx:{alignItems:`flex-start`},children:[G(q,{component:Pi,sx:{color:`iochmara.main`,fontSize:20}}),K(Y,{spacing:`5px`,children:[K(X,{sx:{fontWeight:700},children:[`Single Environment Mode`,` `,G(X,{component:`span`,sx:{color:`error.main`,fontWeight:600},children:`Limited Functionality`})]}),G(X,{sx:{fontSize:`0.875rem`},children:`Single Environment Mode allows you to explore your dbt project but won't show data comparisons between environments.`}),G(X,{sx:{fontSize:`0.875rem`},children:`To set up full environment comparison:`}),K(mi,{sx:{pl:2},children:[G(hi,{sx:{p:0,display:`list-item`},children:G(X,{sx:{fontSize:`0.875rem`},children:"Run `recce debug` for setup assistance"})}),G(hi,{sx:{p:0,display:`list-item`},children:K(X,{sx:{fontSize:`0.875rem`},children:[`Visit`,` `,G(Gn,{sx:{color:`primary.main`,fontWeight:500},target:`_blank`,href:e,children:`docs`}),` `,`for configuration details`]})})]})]})]})}function ms(){return G(q,{sx:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:G(ir,{size:48})})}function hs({error:e,onRetry:t}){return G(q,{sx:{height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:K(Y,{spacing:1,sx:{alignItems:`center`},children:[G(q,{children:`Failed to load lineage data. This could be because the server has been terminated or there is a network error.`}),K(q,{children:[`[Reason: `,e,`]`]}),G(J,{color:`iochmara`,variant:`contained`,onClick:()=>{t&&t()},children:`Retry`})]})})}function gs({viewOptions:e,onViewOptionsChanged:t}){return G(q,{sx:{height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:K(Y,{spacing:1,sx:{alignItems:`center`},children:[G(W,{children:`No change detected`}),G(J,{color:`iochmara`,variant:`contained`,onClick:async()=>{await t({...e,view_mode:`all`})},children:`Show all nodes`})]})})}function _s(){let{isHistoryOpen:e,showHistory:t}=he();if(!e)return K(q,{children:[G(q,{sx:{fontSize:`8pt`},children:`History`}),G(J,{size:`xsmall`,variant:`outlined`,color:`neutral`,startIcon:G(ii,{}),onClick:()=>{fn({name:e?`hide`:`show`}),t()},children:`Show`})]})}const vs=e=>({fontSize:`8pt`,bgcolor:e?`grey.700`:`grey.100`,px:.5,borderRadius:1}),ys=()=>{let e=vs(Rt());return K(Y,{spacing:0,sx:{alignItems:`flex-start`},children:[G(X,{sx:{fontSize:`10pt`,color:`text.secondary`,pb:1},children:`Select nodes by dbt node selector syntax`}),K(X,{sx:{fontSize:`8pt`},children:[G(q,{component:`code`,sx:e,children:`model_name`}),` `,`Select a node`]}),K(X,{sx:{fontSize:`8pt`},children:[G(q,{component:`code`,sx:e,children:`model_name+`}),` `,`Select downstream nodes`]}),K(X,{sx:{fontSize:`8pt`},children:[G(q,{component:`code`,sx:e,children:`+model_name`}),` `,`Select upstream nodes`]}),K(X,{sx:{fontSize:`8pt`},children:[G(q,{component:`code`,sx:e,children:`model*`}),` `,`Select by wildcard`]})]})},bs=({isDisabled:e,viewOptions:t,onViewOptionsChanged:n})=>{let[r,i]=U(null),a=!!r,o=t.view_mode??`changed_models`,s=o===`changed_models`?`Changed Models`:`All`,c=e=>{i(e.currentTarget)},l=()=>{i(null)},u=e=>{n({...t,view_mode:e}),l()},d=Ae(`model`).icon;return K(W,{children:[G(J,{size:`xsmall`,variant:`outlined`,color:`neutral`,onClick:c,disabled:e,startIcon:d&&G(d,{}),endIcon:G(pr,{}),sx:{minWidth:100,textTransform:`none`,fontSize:`0.75rem`},children:s}),K($r,{anchorEl:r,open:a,onClose:l,children:[G(oi,{sx:{lineHeight:`32px`,bgcolor:`transparent`},children:`mode`}),K(Gi,{value:o,children:[G($,{onClick:()=>u(`changed_models`),children:G(Zr,{value:`changed_models`,control:G(Wi,{size:`small`,sx:{py:0}}),label:`Changed Models`,sx:{m:0}})}),G($,{onClick:()=>u(`all`),children:G(Zr,{value:`all`,control:G(Wi,{size:`small`,sx:{py:0}}),label:`All`,sx:{m:0}})})]})]})]})},xs=({isDisabled:e,viewOptions:t,onViewOptionsChanged:n,lineageGraph:r})=>{let[i,a]=U(null),o=!!i,s=new Set,c=Object.values(r?.nodes??{});for(let e of c)e.data.packageName&&s.add(e.data.packageName);let l=r?.manifestMetadata.current?.project_name,u=t.packages?new Set(t.packages):l?new Set([l]):s,d=u.size===s.size,f=u.size===0,p=u.size===1?Array.from(u)[0]:d?`All Packages`:f?`No Package`:`${u.size} Packages`,m=e=>{a(e.currentTarget)},h=()=>{a(null)},g=()=>{n(d?{...t,packages:[]}:{...t,packages:Array.from(s)})},_=e=>{let r=new Set(u);r.has(e)?r.delete(e):r.add(e),n({...t,packages:Array.from(r)})};return K(W,{children:[G(J,{size:`xsmall`,variant:`outlined`,color:`neutral`,onClick:m,disabled:e,startIcon:G(Ai,{}),endIcon:G(pr,{}),sx:{minWidth:100,textTransform:`none`,fontSize:`0.75rem`},children:p}),K($r,{anchorEl:i,open:o,onClose:h,children:[G(oi,{sx:{lineHeight:`32px`,bgcolor:`transparent`},children:`Select Packages`}),K($,{onClick:g,children:[G(Xr,{checked:d,indeterminate:!d&&!f,size:`small`,sx:{py:0}}),G(Ei,{children:`Select All`})]}),G(rr,{}),Array.from(s).map(e=>K($,{onClick:()=>_(e),children:[G(Xr,{checked:u.has(e),size:`small`,sx:{py:0}}),G(Ei,{className:`no-track-pii-safe`,children:e})]},e))]})]})},Ss=({value:e,onChange:t,isDisabled:n,tooltipComponent:r,showTooltip:i=!0})=>{let[a,o]=U(e),s=Bn(null);return Ln(()=>{s.current&&(s.current.value=e)},[e]),G(Q,{title:i?r:``,placement:`bottom-start`,slotProps:{tooltip:{sx:{width:`18.75rem`,p:2,boxShadow:3,border:1,borderRadius:1,color:`text.primary`,bgcolor:`background.paper`}}},children:G(ci,{inputRef:s,size:`small`,placeholder:`with selectors`,disabled:n,value:a,onChange:e=>{o(e.target.value)},onKeyUp:n=>{n.key===`Enter`?t(a):n.key===`Escape`&&(n.preventDefault(),o(e),s.current&&s.current.blur())},onBlur:()=>{o(e)},sx:{"& .MuiInputBase-root":{width:`18.75rem`,height:24,fontSize:`0.75rem`},"& .MuiInputBase-input":{py:.5,px:1}}})})},Cs=({isDisabled:e,viewOptions:t,onViewOptionsChanged:n,showTooltip:r})=>G(Ss,{isDisabled:e,value:t.select??``,onChange:e=>{n({...t,select:e||void 0})},tooltipComponent:G(ys,{}),showTooltip:r}),ws=({isDisabled:e,viewOptions:t,onViewOptionsChanged:n})=>G(Ss,{isDisabled:e,value:t.exclude??``,onChange:e=>{n({...t,exclude:e||void 0})}}),Ts=({label:e,children:t,style:n})=>K(q,{style:n,sx:{maxWidth:300},children:[G(X,{sx:{fontSize:`8pt`},children:(e??``).trim()||G(W,{children:`\xA0`})}),t]}),Es=({children:e})=>G(W,{children:e}),Ds=({viewOptions:e,onViewOptionsChanged:t,lineageGraph:n,featureToggles:r,serverFlags:i,focusedNode:a,selectedNodes:o,onDeselect:s,onRunRowCount:c,onRunRowCountDiff:l,onRunValueDiff:u,onAddLineageDiffCheck:d,onAddSchemaDiffCheck:f,runTypeIcons:p,historyToggleSlot:m,SetupConnectionPopoverSlot:h=Es})=>{let g=i?.single_env_onboarding,[_,v]=U(null),y=!!_,b=o.length>0,x=b,S=e=>{v(e.currentTarget)},C=()=>{v(null)},w=p.rowCountDiff,T=p.valueDiff,E=p.lineageDiff,D=p.schemaDiff;return G(Y,{direction:`row`,sx:{alignItems:`center`,borderBottom:1,borderColor:`neutral.light`,width:`100%`,p:`4pt 8pt`,gap:`0.5rem`},children:K(Y,{direction:`row`,sx:{alignItems:`center`,flex:1,gap:`0.5rem`},children:[m,G(Ts,{label:`Mode`,style:{flexShrink:1},children:G(bs,{isDisabled:x,viewOptions:e,onViewOptionsChanged:t})}),G(Ts,{label:`Package`,style:{flexShrink:1},children:G(xs,{isDisabled:x,viewOptions:e,onViewOptionsChanged:t,lineageGraph:n})}),G(Ts,{label:`Select`,style:{flexShrink:1},children:G(Cs,{isDisabled:x,viewOptions:e,onViewOptionsChanged:t,showTooltip:g})}),G(Ts,{label:`Exclude`,style:{flexShrink:1},children:G(ws,{isDisabled:x,viewOptions:e,onViewOptionsChanged:t})}),G(q,{sx:{flexGrow:1}}),b&&K(W,{children:[G(Ts,{label:``,style:{flexShrink:0},children:G(X,{sx:{fontSize:`9pt`,color:`text.secondary`},children:o.length>1?`${o.length} nodes selected`:`${o.length} node selected`})}),G(Ts,{label:``,children:G(J,{variant:`outlined`,color:`neutral`,size:`xsmall`,onClick:()=>{s()},sx:{textTransform:`none`,fontSize:`9pt`},children:`Deselect`})}),g&&G(Ts,{label:`Explore`,children:K(q,{sx:{display:`inline-flex`},children:[G(J,{size:`xsmall`,color:`neutral`,variant:`outlined`,onClick:S,endIcon:G(pr,{}),sx:{textTransform:`none`,fontSize:`0.75rem`},children:`Actions`}),G($r,{anchorEl:_,open:y,onClose:C,anchorOrigin:{vertical:`bottom`,horizontal:`right`},transformOrigin:{vertical:`top`,horizontal:`right`},children:K($,{disabled:r.disableDatabaseQuery,onClick:async()=>{await c?.(),C()},children:[G(Ti,{children:G(w,{fontSize:`small`})}),G(Ei,{children:`Row Count`})]})})]})})]}),!g&&G(Ts,{label:`Explore`,children:K(q,{sx:{display:`inline-flex`},children:[G(J,{size:`xsmall`,color:`neutral`,variant:`outlined`,disabled:r.disableViewActionDropdown,onClick:S,endIcon:G(pr,{}),sx:{textTransform:`none`,fontSize:`0.75rem`},children:`Actions`}),K($r,{anchorEl:_,open:y,onClose:C,anchorOrigin:{vertical:`bottom`,horizontal:`right`},transformOrigin:{vertical:`top`,horizontal:`right`},children:[G(oi,{sx:{lineHeight:`32px`,bgcolor:`transparent`},children:`Diff`}),G(h,{display:r.mode===`metadata only`,children:K($,{disabled:r.disableDatabaseQuery,onClick:async()=>{await l?.(),C()},children:[G(Ti,{children:G(w,{fontSize:`small`})}),G(Ei,{children:`Row Count Diff`})]})}),G(h,{display:r.mode===`metadata only`,children:K($,{disabled:r.disableDatabaseQuery,onClick:async()=>{await u?.(),C()},children:[G(Ti,{children:G(T,{fontSize:`small`})}),G(Ei,{children:`Value Diff`})]})}),(!r.disableUpdateChecklist||r.checklistPermissionDenied)&&[G(rr,{},`checklist-divider`),G(oi,{sx:{lineHeight:`32px`,bgcolor:`transparent`},children:`Add to Checklist`},`checklist-header`),G(Q,{title:r.checklistPermissionDenied?`You don't have permission to add checks`:``,placement:`left`,children:G(`span`,{children:K($,{disabled:r.checklistPermissionDenied,onClick:()=>{r.checklistPermissionDenied||(d?.(e.view_mode),C())},children:[G(Ti,{children:G(E,{fontSize:`small`})}),G(Ei,{children:`Lineage Diff`})]})})},`add-lineage-diff`),G(Q,{title:r.checklistPermissionDenied?`You don't have permission to add checks`:``,placement:`left`,children:G(`span`,{children:K($,{disabled:r.checklistPermissionDenied,onClick:()=>{r.checklistPermissionDenied||(f?.(),C())},children:[G(Ti,{children:G(D,{fontSize:`small`})}),G(Ei,{children:`Schema Diff`})]})})},`add-schema-diff`)]]})]})})]})})},Os=({display:e,children:t})=>G(xc,{display:e,children:t}),ks=()=>{let{deselect:e,focusedNode:t,selectedNodes:n,viewOptions:r,onViewOptionsChanged:i,runRowCount:a,runRowCountDiff:o,runValueDiff:s,addLineageDiffCheck:c,addSchemaDiffCheck:l}=pe(),{lineageGraph:u}=P(),{featureToggles:d}=Ce(),{data:f}=xe();return G(Ds,{viewOptions:r,onViewOptionsChanged:i,lineageGraph:u,featureToggles:d,serverFlags:f,focusedNode:t,selectedNodes:n,onDeselect:e,onRunRowCount:a,onRunRowCountDiff:o,onRunValueDiff:s,onAddLineageDiffCheck:c,onAddSchemaDiffCheck:l,runTypeIcons:{rowCountDiff:L(`row_count_diff`).icon,valueDiff:L(`value_diff`).icon,lineageDiff:L(`lineage_diff`).icon,schemaDiff:L(`schema_diff`).icon},historyToggleSlot:G(_s,{}),SetupConnectionPopoverSlot:Os})};function As(e,t){let n=Do(t),r=new Set;for(let i of Object.keys(e.nodes)){let a=e.nodes[i];Oo(i,t,a.data.changeStatus,n)&&r.add(i)}return{nodeIds:r,columnIds:n}}function js(e,t,n,r){return e&&t&&n?.node_id&&n?.column?Eo(t,n.node_id,n.column,r??new Set):void 0}async function Ms(e,t,n,r,i){let a={...e,change_analysis:e.change_analysis??t},o=await n.mutateAsync(a);return a.change_analysis&&o&&(r.current={pending:!0,cllData:o},i.setQueryData(j.lineage(),e=>e&&{...e,lineage:ls(e.lineage,o)})),o}function Ns({interactive:e=!1,...t},n){let{isDark:r}=Tt(),{apiClient:i}=B(),a=jn(),o=qr(),s=Bn(null),{copyToClipboard:c,ImageDownloadModal:l,ref:u}=go(),[d,f,m]=Kr(ao),[h,g,_]=Gr([]),{lineageGraph:x,refetchLineageGraph:S,isLoading:C,error:w,refetchRunsAggregated:D}=P(),{featureToggles:k,singleEnv:ee}=Ce(),{data:te}=xe(),A=te?.new_cll_experience??!1,{runId:ie,showRunId:M,closeRunResult:ae,runAction:se,isRunResultOpen:ce}=he(),{run:N}=vt(ie),[F,le]=U({...t.viewOptions}),fe=bo(),pe=Bn([]).current,[me,_e]=U(void 0),[Se,we]=U(!1),Te=Bn(!1);Te.current=Se;let Ee=kn({mutationFn:e=>ne(e,i)}),De=Bn({pending:!1}),[L,Oe]=U({}),ke=V(e=>d.filter(de).find(t=>t.data.name===e),[d]);Rn(n,()=>({copyToClipboard:c}));let Ae=H(()=>!!(x&&x.modifiedSet.length>0),[x]),je=F.view_mode??`changed_models`,Pe=H(()=>d.filter(e=>e.type===`lineageGraphNode`).map(e=>e.id),[d]),Fe=H(()=>x?Pe.map(e=>x.nodes[e]):[],[x,Pe]),[Ie,Le]=U(),R=Ie?x?.nodes[Ie]:void 0,[z,Re]=U(),[ze,Be]=U(new Set),Ve=H(()=>x?Array.from(ze).map(e=>x.nodes[e]):[],[x,ze]),He=Co(Ve.length>0?Ve:Fe,{onActionStarted:()=>{Re(`action_result`)},onActionNodeUpdated:e=>{f(t=>t.map(t=>t.id===e.id?{...t}:t))},onActionCompleted:()=>{}}),Ue=V(()=>{let e=new Map,t=o.getNodes();for(let n of t)!n.parentId&&n.position&&e.set(n.id,{x:n.position.x,y:n.position.y});return e},[o]),We=H(()=>{if(!x)return new Set;let e=new Set;if(me){for(let[t,n]of Object.entries(me.current.nodes))n.impacted!==!1&&e.add(t);for(let t of Object.keys(me.current.columns))e.add(t)}else if(z===`action_result`){let t=Object.keys(He.actionState.actions);e=new Set(t)}else e=R?ge(be(x,[R.id]),ve(x,[R.id])):Ae?ve(x,x.modifiedSet):new Set(Pe);return new Set(e)},[x,me,z,R,Ae,He.actionState.actions,Pe]),Ge=jo(),Ke=()=>{Ge.closeContextMenu()},qe=Bn(!1),{impactedNodeIds:Ye,impactedColumnIds:Xe,publish:Ze}=vo();zn(()=>{(async()=>{let e;if(!x)return;if(F.node_ids)e=F.node_ids;else{let n=x.manifestMetadata.current?.project_name,r={view_mode:F.view_mode??(Ae?`changed_models`:`all`),packages:n?[n]:void 0,...t.viewOptions};try{e=(await T({select:r.select,exclude:r.exclude,packages:r.packages,view_mode:r.view_mode},i)).nodes}catch{r.view_mode=`all`,e=(await T({select:r.select,exclude:r.exclude,packages:r.packages,view_mode:r.view_mode},i)).nodes}le(r)}let n=F.column_level_lineage,r=!1;te?.impact_at_startup&&!qe.current&&!n&&(qe.current=!0,r=!0,Te.current=!0,we(!0),n={change_analysis:!0,no_upstream:!0},le(e=>({...e,column_level_lineage:n})));let o;if(n)if(De.current.pending)o=De.current.cllData,De.current={pending:!1};else try{o=await Ms(n,Te.current,Ee,De,a)}catch(e){if(r&&(Te.current=!1,we(!1),le(e=>({...e,column_level_lineage:void 0})),n=void 0),e instanceof oe){Vt.create({title:`Column Level Lineage error`,description:e.data?.detail??e.message,type:`error`,closable:!0});return}}else De.current={pending:!1};let s=A&&o?As(x,o):void 0,[c,l,u]=await Mo(x,{selectedNodes:e,cll:o,newCllExperience:A,columnAncestry:js(A,o,n,s?.columnIds)});f(c),g(l),Oe(u),_e(o),s&&n?.change_analysis&&!n?.column&&Ze(s),fe(c,F.view_mode??`changed_models`,Te.current,!!n?.column,!!Ie||!!N)})()},[x,te?.impact_at_startup]);let Qe=()=>{Le(void 0)},$e=async e=>{let t=d.find(t=>t.id===e);if(t){if(t.parentId){let e=t.parentId;t=d.find(t=>t.id===e)??t}if(t.measured!=null){let{width:e,height:n}=t.measured;if(e&&n){let r=t.position.x+e/2,i=t.position.y+n/2,a=o.getZoom();await o.setCenter(r,i,{zoom:a,duration:200})}}}},et=_o();yo(s,async()=>{z!==`selecting`&&(Ie?await $e(Ie):await o.fitView({nodes:d,duration:200,padding:Ne,minZoom:Me,maxZoom:1}))});let tt=async(e,t=!1)=>{let n=F.column_level_lineage;!e&&!A&&we(!1);let r=n!==void 0;await ct({...F,column_level_lineage:e},!1,r),t||pe.push(n),e?.node_id?Le(e.node_id):e||Le(void 0)},nt=async e=>{if(e){if(pe.length===0)return;let e=pe.pop();e?await tt(e,!0):await tt(void 0,!0)}else A&&Se?await tt({change_analysis:!0,no_upstream:!0},!0):await tt(void 0,!0)},rt=(e,t)=>{z||tt({node_id:t.data.node.id,column:t.data.column})},it=(t,n)=>{if(e&&x){if(ue(n)){rt(t,n);return}if(Ke(),!z)Le(n.id);else if(z===`action_result`){let e=He.actionState.actions[n.id];e.run?.run_id&&M(e.run.run_id),Le(n.id)}else{let e=new Set(ze);ze.has(n.id)?e.delete(n.id):e.add(n.id),Be(e),e.size===0&&Re(void 0)}}},st=async e=>{let{viewOptions:t=F}=e,{fitView:n,preservePositions:r=!1}=e,s;if(!x)return;if(F.select!==t.select||F.exclude!==t.exclude||F.packages!==t.packages||F.view_mode!==t.view_mode){try{let e=await T({select:t.select,exclude:t.exclude,packages:t.packages,view_mode:t.view_mode},i);t={...t,column_level_lineage:void 0},s=e.nodes}catch(e){e instanceof oe&&Vt.create({title:`Select node error`,description:e.data?.detail??e.message,type:`error`,closable:!0});return}Le(void 0)}else s=d.map(e=>e.id);let c;if(t.column_level_lineage)try{c=await Ms(t.column_level_lineage,Se,Ee,De,a)}catch(e){if(e instanceof oe){Vt.create({title:`Column Level Lineage error`,description:e.data?.detail??e.message,type:`error`,closable:!0});return}}else A||we(!1);let l;(r||A)&&(l=Ue());let u=t.column_level_lineage,m=A&&c?As(x,c):void 0,[h,_,y]=await Mo(x,{selectedNodes:s,cll:c,existingPositions:l,newCllExperience:A,columnAncestry:js(A,c,u,m?.columnIds)});f(h),g(_),Oe(y),_e(c),m&&!u?.column&&Ze(m),fe(h,t.view_mode??`changed_models`,Se,!!t.column_level_lineage?.column,!!Ie||!!N),N&&(E(N)||b(N)||O(N)||p(N)||v(N))&&N.params?.model&&!ke(N.params.model)&&ae(),n&&(await new Promise(e=>setTimeout(e,1)),o.fitView({nodes:h,duration:200,padding:Ne,minZoom:Me,maxZoom:1}))},ct=async(e,t=!0,n=!1)=>{le(e),await st({viewOptions:e,fitView:t,preservePositions:n})},lt=wo();Ln(()=>{let t=N?.type;if(e&&ce&&!(!t||[`query_diff`,`query`,`row_count`,`row_count_diff`].includes(t))&&!z){let e;(E(N)||b(N)||O(N)||p(N)||v(N))&&(e=N.params?.model);let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window});if(e){let n=ke(e);n?de(n)&&R?.id!==n.id&&it(t,n):ct({...F,view_mode:`all`})}else Qe()}},[N,F,ce,z,ke,R,e]);let ut=(e,t=1e3)=>{z===`action_result`||x===void 0||(z||(Re(`selecting`),He.reset(),F.column_level_lineage&&ct({...F,column_level_lineage:void 0})),Be(ge(ze,be(x,[e],t))))},dt=(e,t=1e3)=>{z===`action_result`||x===void 0||(z||(Re(`selecting`),He.reset(),F.column_level_lineage&&ct({...F,column_level_lineage:void 0})),Be(ge(ze,ve(x,[e],t))))},ft=(t,n)=>{if(!e||z===`action_result`)return;t.preventDefault();let r=u.current,i=r.getBoundingClientRect(),a=t.clientX-i.left,o=t.clientY-i.top+r.offsetTop;Ge.showContextMenu(a,o,n)},pt=e=>{if(!z){if(!x)return;Be(new Set([e])),Re(`selecting`),Le(void 0),He.reset()}else if(z===`selecting`){let t=new Set(ze);ze.has(e)?t.delete(e):t.add(e),Be(t),t.size===0&&Re(void 0)}},mt=()=>{Re(void 0),Be(new Set),Le(void 0),ae(),D?.()},ht={interactive:e,nodes:d,focusedNode:R,selectedNodes:Ve,viewOptions:F,showContextMenu:ft,onViewOptionsChanged:ct,selectMode:z,selectNode:pt,selectParentNodes:ut,selectChildNodes:dt,deselect:mt,impactedNodeIds:Ye,impactedColumnIds:Xe,isNodeHighlighted:e=>We.has(e),isNodeSelected:e=>ze.has(e),isEdgeHighlighted:(e,t)=>me?e in me.current.parent_map?t in me.current.parent_map[e]:!1:We.has(e)&&We.has(t),isNodeShowingChangeAnalysis:e=>{if(!x||!Se)return!1;let t=e in x.nodes?x.nodes[e]:void 0,n=F.column_level_lineage;return n?.node_id&&!n.column?n.node_id===e&&!!t?.data.changeStatus:!!t?.data.changeStatus},changeAnalysisMode:Se,newCllExperience:A,setChangeAnalysisMode:we,getNodeAction:e=>He.actionState.actions[e],getNodeColumnSet:e=>e in L?new Set(L[e]):new Set,runRowCount:async()=>{z===`selecting`?(await He.runRowCount(),gn({type:`row_count`,selected:`multi`})):R?(se(`row_count`,{node_names:[R.data.name]},{showForm:!1,showLast:!1}),gn({type:`row_count`,selected:`single`})):(se(`row_count`,{select:F.select,exclude:F.exclude,packages:F.packages,view_mode:F.view_mode}),gn({type:`row_count`,selected:`none`}))},runRowCountDiff:async()=>{z===`selecting`?(await He.runRowCountDiff(),gn({type:`row_count_diff`,selected:`multi`})):R?(se(`row_count_diff`,{node_names:[R.data.name]},{showForm:!1,showLast:!1}),gn({type:`row_count_diff`,selected:`single`})):(se(`row_count_diff`,{select:F.select,exclude:F.exclude,packages:F.packages,view_mode:F.view_mode}),gn({type:`row_count_diff`,selected:`none`}))},runValueDiff:async()=>{if(R)se(`value_diff`,{model:R.data.name},{showForm:!0,showLast:!1}),gn({type:`value_diff`,selected:`single`});else{let e=z===`selecting`?Ve.length:Pe.length;await lt.confirm(e)&&(await He.runValueDiff(),gn({type:`value_diff`,selected:z===`selecting`?`multi`:`none`}))}},addLineageDiffCheck:async()=>{let e=await re(F,i),t;t=z===`selecting`?`multi`:R?`single`:`none`,gn({type:`lineage_diff`,selected:t}),e&&(await a.invalidateQueries({queryKey:j.checks()}),et(e))},addSchemaDiffCheck:async()=>{let e;z===`selecting`?Ve.length>0&&(e=await He.addSchemaDiffCheck(),mt(),gn({type:`schema_diff`,selected:`multi`})):R?(e=await y({node_id:R.id},i),gn({type:`schema_diff`,selected:`single`})):(e=await y({select:F.select,exclude:F.exclude,packages:F.packages,view_mode:F.view_mode},i),gn({type:`schema_diff`,selected:`none`})),e&&(await a.invalidateQueries({queryKey:j.checks()}),et(e))},cancel:He.cancel,actionState:He.actionState,centerNode:$e,cll:me,showColumnLevelLineage:tt,resetColumnLevelLineage:nt};return C?G(ms,{}):w?G(hs,{error:w,onRetry:S}):!x||d==ao?G(W,{}):je===`changed_models`&&!x.modifiedSet.length?G(gs,{viewOptions:F,onViewOptionsChanged:ct}):K(ye.Provider,{value:ht,children:[K(at,{sizes:R?[70,30]:[100,0],minSize:0,gutterSize:5,className:R?void 0:`split-gutter-hidden`,style:{height:`100%`,width:`100%`},children:[K(Y,{ref:s,divider:G(rr,{sx:{borderColor:`grey.200`}}),spacing:0,sx:{contain:`strict`,position:`relative`},children:[e&&K(W,{children:[G(ks,{}),k.mode===`metadata only`&&G(ds,{})]}),K(Vr,{proOptions:{hideAttribution:!0},nodeTypes:ro,edgeTypes:io,nodes:d,edges:h,onNodesChange:m,onEdgesChange:_,onNodeClick:it,onNodeContextMenu:ft,onClick:Ke,onInit:async()=>{if(Ae){let e=d.filter(e=>de(e)&&e.data.changeStatus!==void 0),t=e.length>0?e:d;await o.fitView({nodes:t,duration:200,padding:Ne,minZoom:Me,maxZoom:1})}else{let e=Wr(d,{});await o.setCenter(e.x+e.width/2,e.y+e.height/2,{zoom:1})}},maxZoom:1,minZoom:Je,nodesDraggable:e,ref:u,colorMode:r?`dark`:`light`,children:[G(Nr,{id:`lineage-bg`,variant:Pr.Dots,color:r?I.neutral[700]:I.neutral[300],gap:20,size:2}),G(Lr,{showInteractive:!1,position:`top-right`,className:ot,style:{backgroundColor:r?I.neutral[700]:void 0,borderColor:r?I.neutral[600]:void 0},children:G(Ir,{title:`copy image`,onClick:async()=>{await c(),an({type:je,from:`lineage_view`})},style:{backgroundColor:r?I.neutral[700]:void 0,color:r?I.neutral[200]:void 0},children:G(q,{component:Oi})})}),G(l,{}),G(zr,{position:`bottom-left`,children:K(Y,{spacing:`5px`,children:[Ae&&G(xt,{variant:`changeStatus`,newCllExperience:A}),F.column_level_lineage&&G(xt,{variant:`transformation`})]})}),G(zr,{position:`top-center`,children:G(To,{notification:ee?G(ps,{}):null,type:`info`})}),G(zr,{position:`top-left`,children:K(Y,{spacing:`5px`,children:[G(ba,{action:Ee}),d.length==0&&G(X,{sx:{fontSize:`1.25rem`,color:`grey`,opacity:.5},children:`No nodes`})]})}),d.length<=500&&G(Rr,{nodeColor:oo,nodeStrokeWidth:3,zoomable:!0,pannable:!0,bgColor:r?I.neutral[800]:void 0,maskColor:r?`${I.neutral[900]}99`:`${I.neutral[100]}99`}),z===`action_result`&&G(zr,{position:`bottom-center`,className:`ignore-screenshot`,children:G(ya,{onClose:()=>{mt()}})})]}),G(Ao,{...Ge.props})]}),R?G(q,{sx:{borderLeft:`solid 1px`,borderColor:`divider`,height:`100%`},children:G(cs,{node:R,onCloseNode:Qe})}):G(q,{})]}),lt.AlertDialog]})}const Ps=Pn(Ns);function Fs(){return G(Hr,{children:G(Ps,{interactive:!0})})}const Is=M({baseURL:Xt??``});async function Ls(e=Is){return(await e.post(`/api/connect`)).data}function Rs({handleParentClose:e,parentOpen:t=!1,ignoreCookie:n=!1,variant:r=`auth`}){let{authed:i}=Ce(),{apiClient:a}=B(),[o,s]=U(t||!i),c=Kn.get(`authState`)??`pending`,[l,u]=U(n?`pending`:c);if(l===`ignored`&&!n||i)return null;let d={auth:{title:`Configure Cloud Token`,action:`Get token and configure`},"enable-share":{title:`Enable Sharing with Cloud`,action:`Enable sharing`},"user-profile":{title:`Configure Cloud Token`,action:`Get token and configure`}}[r],f=()=>{s(!1),e&&e(!1)};return K(Vn,{open:o,onClose:f,maxWidth:`sm`,fullWidth:!0,slotProps:{paper:{sx:{borderRadius:`1rem`}}},children:[l!==`authenticating`&&G(Wn,{sx:{textAlign:`center`,fontSize:`1.5rem`},children:d.title}),l===`authenticating`?K(W,{children:[G(Un,{className:`space-y-2 self-center font-light`,children:K(Y,{spacing:2,sx:{alignItems:`center`,pt:`1rem`},children:[G(q,{component:`img`,sx:{height:`6rem`,objectFit:`contain`,mx:`auto`,mb:1},src:`/imgs/reload-image.svg`,alt:`Reload`}),G(X,{sx:{fontSize:`1.5rem`,fontWeight:500},children:`Reload to Finish`}),G(X,{children:`Reload to complete connection to Recce Cloud`})]})}),G(Hn,{sx:{px:3,pb:3},children:G(J,{fullWidth:!0,color:`brand`,variant:`contained`,onClick:()=>{window.location.reload()},children:`Reload`})})]}):K(W,{children:[K(Un,{className:`space-y-2 font-light`,children:[G(X,{children:`To enable sharing, get your token from Recce Cloud and launch your local instance with it.`}),K(`ul`,{className:`list-inside list-disc`,children:[G(`li`,{children:`Share your instance with teammates via Recce Cloud.`}),G(`li`,{children:`Your instance will be securely and freely hosted for sharing.`}),r===`auth`&&G(`li`,{children:`This step is recommended but optional.`})]}),K(q,{sx:{display:`flex`,gap:1},children:[`More directions`,K(Gn,{underline:`always`,sx:{color:`primary.main`,"&:focus":{outline:`none`}},href:new URL(`/connect-to-cloud`,Zt).href,target:`_blank`,children:[`here `,G(qn,{style:{display:`inline`}})]})]})]}),K(Hn,{sx:{flexDirection:`column`,gap:1,px:3,pb:3},children:[K(J,{fullWidth:!0,color:`brand`,variant:`contained`,sx:{borderRadius:2,fontWeight:500},onClick:async()=>{u(`authenticating`);let{connection_url:e}=await Ls(a);window.open(e,`_blank`)},children:[d.action,` `,G(qn,{style:{marginLeft:4}})]}),G(J,{fullWidth:!0,color:`neutral`,variant:`text`,size:`small`,sx:{borderRadius:2,fontWeight:500},onClick:f,children:r===`auth`?`Skip`:`Cancel`}),r===`auth`&&G(J,{fullWidth:!0,variant:`text`,size:`small`,sx:{borderRadius:2,fontWeight:500,color:`text.primary`},onClick:()=>{Kn.set(`authState`,`ignored`,{expires:30}),u(`ignored`),f()},children:`Snooze for 30 days`})]})]})]})}function zs(){let{apiClient:e}=B(),{data:t,isLoading:n,error:r}=An({queryKey:j.user(),queryFn:()=>Yt(e),retry:!1}),{data:i}=An({queryKey:[`github-avatar`,t?.id],queryFn:()=>t?Jt(t.id):Promise.resolve(null),enabled:!!t?.id&&t.login_type===`github`,retry:!1,staleTime:300*1e3}),[a,o]=U(null),s=!!a,c=e=>{o(e.currentTarget)},l=()=>{o(null)},u=!n&&!r&&t;return K(W,{children:[n?G(q,{onClick:c,sx:{width:32,height:32,borderRadius:`50%`,bgcolor:`background.paper`,color:`primary.main`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`},children:G(ir,{size:16})}):G(vi,{onClick:c,src:i||void 0,sx:{width:28,height:28,cursor:`pointer`,outline:`1px solid white`,fontSize:`0.875rem`},children:(e=>e?e.charAt(0).toUpperCase():`U`)(t?.login)}),K($r,{anchorEl:a,open:s,onClose:l,slotProps:{paper:{sx:{bgcolor:`background.paper`,borderColor:`divider`,boxShadow:3,minWidth:180}}},children:[K(q,{sx:{px:2,py:1.5},children:[n&&K(q,{sx:{display:`flex`,alignItems:`center`,gap:1},children:[G(X,{variant:`body2`,sx:{color:`text.primary`},children:`Loading...`}),G(ir,{size:16})]}),r&&G(X,{variant:`caption`,color:`error`,children:`Failed to load user information`}),u&&K(W,{children:[G(X,{variant:`body2`,sx:{fontWeight:`600`,color:`text.primary`},children:t.login}),t.email&&G(X,{variant:`caption`,sx:{color:`text.secondary`},children:t.email})]})]}),G(rr,{}),K($,{onClick:()=>{window.open(Zt,`_blank`),l()},children:[G(Ti,{children:G(ar,{})}),G(Ei,{children:`Recce Cloud`})]}),K($,{onClick:()=>{window.open(Qt,`_blank`),l()},children:[G(Ti,{children:G(dr,{})}),G(Ei,{children:`Get live support`})]})]})]})}const Bs=()=>{let{setTheme:e,resolvedTheme:t}=Zn(),[n,r]=U(!1);Ln(()=>{r(!0)},[]);let i=()=>{e(t===`dark`?`light`:`dark`)};if(!n)return G(Z,{size:`small`,sx:{color:`rgba(255, 255, 255, 0.8)`,"&:hover":{bgcolor:`rgba(255, 255, 255, 0.1)`}},disabled:!0,children:G(Dr,{style:{width:18,height:18}})});let a=t===`dark`;return G(Q,{title:a?`Switch to light mode`:`Switch to dark mode`,children:G(Z,{size:`small`,onClick:i,sx:{color:`rgba(255, 255, 255, 0.8)`,"&:hover":{bgcolor:`rgba(255, 255, 255, 0.1)`}},"aria-label":a?`Switch to light mode`:`Switch to dark mode`,children:G(a?Dr:xr,{style:{width:18,height:18}})})})};function Vs(e,t,n,r){let i=e?.git,a=e?.pullRequest,o=e?.dbt?.base,s=e?.dbt?.current,c={review_mode:t||!1,adapter_type:e?.adapterType||null,has_git_info:!ei(i),has_pr_info:!ei(a)};return e?.adapterType===`dbt`&&(c.base={schema_count:n.size,dbt_version:o?.dbt_version||null,timestamp:o?.generated_at||null},c.current={schema_count:r.size,dbt_version:s?.dbt_version||null,timestamp:s?.generated_at||null},c.schemas_match=n.size===r.size&&Array.from(n).every(e=>r.has(e))),e?.adapterType===`sqlmesh`&&(c.base={has_env:!!e.sqlmesh?.base_env},c.current={has_env:!!e.sqlmesh?.current_env}),c}function Hs(e){return Object.values(e).every(e=>e===null)?[G(q,{sx:{ml:`10px`},children:`No information`},`no info`)]:Object.entries(e).filter(([e,t])=>e!==`url`&&t!=null).map(([e,t])=>K(`li`,{style:{marginLeft:`10px`},children:[e,`: `,t]},e))}function Us(){let{envInfo:e,reviewMode:t,lineageGraph:n}=P(),[r,i]=U(!1),a=e?.git,o=e?.pullRequest,s={...a,...o},c=e?.dbt?.base,l=e?.dbt?.current,u=c?.generated_at?zt(c.generated_at):``,d=l?.generated_at?zt(l.generated_at):``,f=``,p=``;c&&(f=c.generated_at?Ht(c.generated_at):``),l&&(p=l.generated_at?Ht(l.generated_at):``);let[m,h]=Kt(n),g=Bn(!1);Ln(()=>{!g.current&&e&&(g.current=!0,ln(Vs(e,t,m,h)))},[e,t,m,h]);let _=()=>i(!0),v=()=>i(!1);return K(W,{children:[G(Q,{title:`Environment Info`,placement:`bottom-end`,children:K(q,{sx:{display:`flex`,alignItems:`center`,cursor:`pointer`,"&:hover":{color:`text.primary`}},onClick:_,children:[K(Y,{direction:`column`,sx:{display:{xs:`none`,lg:`flex`},fontSize:`0.875rem`},children:[K(q,{sx:{display:`flex`,alignItems:`baseline`,gap:.5},children:[G(X,{component:`span`,noWrap:!0,sx:{color:`warning.main`,maxWidth:128},className:`no-track-pii-safe`,children:Array.from(m).join(`, `)}),K(X,{component:`span`,noWrap:!0,children:[`(`,f,`)`]})]}),K(q,{sx:{display:`flex`,alignItems:`baseline`,gap:.5},children:[G(X,{component:`span`,noWrap:!0,sx:{color:`primary.main`,maxWidth:128},className:`no-track-pii-safe`,children:Array.from(h).join(`, `)}),K(X,{component:`span`,noWrap:!0,children:[`(`,p,`)`]})]})]}),G(Z,{size:`small`,"aria-label":`Environment Info`,children:G(q,{component:yr,sx:{fontSize:16,verticalAlign:`middle`}})})]})}),K(Vn,{open:r,onClose:v,maxWidth:`sm`,fullWidth:!0,children:[K(Wn,{sx:{display:`flex`,alignItems:`center`},children:[`Environment Information`,G(q,{sx:{flexGrow:1}}),G(Z,{size:`small`,onClick:v,children:G(er,{})})]}),G(Un,{children:K(Y,{direction:`column`,spacing:1,children:[t?K(Y,{direction:`column`,spacing:.5,children:[G(X,{variant:`h6`,sx:{fontSize:`1rem`},children:`Review Information`}),K(`ul`,{style:{margin:0,paddingLeft:`20px`},children:[s.url&&K(`li`,{style:{marginLeft:`10px`},children:[`url:`,` `,K(Gn,{href:s.url,target:`_blank`,sx:{color:`primary.main`},children:[s.url,` `,G(qn,{})]})]}),!ei(s)&&Hs(s)]})]}):K(Y,{direction:`column`,spacing:.5,children:[G(X,{variant:`h6`,sx:{fontSize:`1rem`},children:`Dev Information`}),G(`ul`,{style:{margin:0,paddingLeft:`20px`},children:a&&Hs(a)})]}),G(rr,{}),e?.adapterType===`dbt`&&K(Y,{direction:`column`,spacing:.5,children:[G(X,{variant:`h6`,sx:{fontSize:`1rem`},children:`DBT`}),G(Yi,{sx:{border:1,borderColor:`divider`,maxHeight:`30rem`},children:K(Ki,{size:`small`,stickyHeader:!0,children:[G(Xi,{children:K(Zi,{children:[G(Ji,{}),G(Ji,{children:`base`}),G(Ji,{children:`current`})]})}),K(qi,{children:[K(Zi,{children:[G(Ji,{children:`schema`}),G(Ji,{className:`no-track-pii-safe`,children:Array.from(m).map(e=>G(Q,{title:e,placement:`bottom`,children:G(`div`,{className:`max-w-72 truncate`,children:e})},e))}),G(Ji,{className:`no-track-pii-safe`,children:Array.from(h).map(e=>G(Q,{title:e,placement:`bottom`,children:G(`div`,{className:`max-w-72 truncate`,children:e})},e))})]}),K(Zi,{children:[G(Ji,{children:`version`}),G(Ji,{children:c?.dbt_version}),G(Ji,{children:l?.dbt_version})]}),K(Zi,{children:[G(Ji,{children:`timestamp`}),G(Ji,{children:u}),G(Ji,{children:d})]})]})]})})]}),e?.adapterType===`sqlmesh`&&K(Y,{direction:`column`,spacing:.5,children:[G(X,{variant:`h6`,sx:{fontSize:`1rem`},children:`SQLMesh`}),G(Yi,{sx:{border:1,borderColor:`divider`,maxHeight:`30rem`},children:K(Ki,{stickyHeader:!0,children:[G(Xi,{children:K(Zi,{children:[G(Ji,{}),G(Ji,{children:`base`}),G(Ji,{children:`current`})]})}),G(qi,{children:K(Zi,{children:[G(Ji,{children:`Environment`}),G(Ji,{className:`no-track-pii-safe`,children:e.sqlmesh?.base_env}),G(Ji,{className:`no-track-pii-safe`,children:e.sqlmesh?.current_env})]})})]})})]})]})}),G(Hn,{children:G(J,{color:`iochmara`,onClick:v,children:`Close`})})]})]})}const Ws=()=>({toastSuccess:e=>{Vt.create({description:e,type:`success`,duration:5e3,closable:!0})},toastError:(e,t)=>{let n=e;t!=null&&(n=ae(t)?`${e}. ${String(t.data?.detail)}`:`${e}. ${t}`),Vt.create({description:n,type:`error`,duration:5e3,closable:!0})}}),Gs=e=>{Ln(()=>{let t=e=>{e.preventDefault()};return e&&window.addEventListener(`beforeunload`,t),()=>{e&&window.removeEventListener(`beforeunload`,t)}},[e])},Ks=()=>{let{featureToggles:e}=Ce(),{fileName:t,cloudMode:n,isDemoSite:r,envInfo:i}=P(),{apiClient:a}=B(),[o,c]=U(!1),[l,u]=U(!1),d=!t&&!n&&!r,{data:f}=s(d),p=f!=null&&f.filter(e=>!e.is_preset).length>0;Gs(d&&p);let[{newFileName:h,errorMessage:_,modified:v,overwriteWithMethod:y,bypass:b},x]=U({newFileName:t??`recce_state.json`,bypass:!1}),S=Bn(null),{toastSuccess:C,toastError:w}=Ws(),T=jn(),E=()=>{x({newFileName:t??`recce_state.json`,modified:!t,bypass:!1}),c(!0)},D=()=>c(!1),O=()=>u(!1),k=async(e,t)=>{if(!h)return;let n=localStorage.getItem(m.bypassSaveOverwrite)===`true`;try{e===`save`?await g({filename:h,overwrite:t??n},a):await A({filename:h,overwrite:t??n},a),C(e===`save`?`Save file successfully`:`Rename file successfully`),await T.invalidateQueries({queryKey:j.lineage()}),b&&localStorage.setItem(m.bypassSaveOverwrite,`true`)}catch(t){if(ae(t)&&t.status===409){x(t=>({...t,overwriteWithMethod:e})),u(!0);return}w(e===`save`?`Save file failed`:`Rename file failed`,t)}finally{D()}},ee=()=>{O(),c(!0),x(e=>({...e,overwriteWithMethod:void 0}))};if(n||r)return G(W,{});let te=`New Instance`+(p?` (unsaved)`:``),ne;if(e.disableSaveToFile&&t){let e=i?.stateMetadata?.generated_at,n=e?Ve(new Date(e)):null;ne=n?`${t} (${n})`:null}return K(W,{children:[K(Y,{direction:`row`,sx:{alignItems:`center`,justifyContent:`center`},children:[G(q,{sx:{fontWeight:600},children:ne??t??te}),!e.disableSaveToFile&&G(Q,{title:t?`Change Filename`:`Save`,enterDelay:1e3,children:G(Z,{onClick:E,"aria-label":t?`Change Filename`:`Save`,size:`small`,children:G(q,{component:t?Cr:Jn,sx:{fontSize:16,verticalAlign:`middle`}})})})]}),K(Vn,{open:o,onClose:D,children:[K(Wn,{sx:{display:`flex`,alignItems:`center`},children:[t?`Change Filename`:`Save File`,G(q,{sx:{flexGrow:1}}),G(Z,{size:`small`,onClick:D,children:G(er,{})})]}),G(Un,{onKeyDown:e=>{e.stopPropagation()},children:G(ci,{inputRef:S,value:h,label:`File name`,placeholder:`Enter filename`,error:!!_,helperText:_,fullWidth:!0,size:`small`,sx:{mt:1},onChange:e=>{let n=e.target.value,r;n?n.endsWith(`.json`)?/^[a-zA-Z0-9 _-]+\.json$/.test(n)?t&&n===t&&(r=`Filename is the same as the current one.`):r=`Invalid filename. Only alphanumeric, space, _ and - are allowed.`:r=`Filename must end with .json.`:r=`Filename cannot be empty.`,x(e=>({...e,modified:!0,newFileName:n,errorMessage:r}))},onKeyDown:e=>{if(e.key===`Enter`){if(_)return;k(t?`rename`:`save`)}else e.key===`Escape`&&D()}})}),K(Hn,{sx:{gap:`5px`},children:[G(J,{size:`small`,color:t?`inherit`:`iochmara`,variant:`contained`,onClick:async()=>{await k(`save`)},disabled:!h||!!_||!v,children:t?`Save as New File`:`Confirm`}),t&&G(J,{size:`small`,color:`iochmara`,variant:`contained`,onClick:async()=>{await k(`rename`)},disabled:!h||!!_||!v,children:`Rename`})]})]}),K(Vn,{open:l,onClose:O,children:[K(Wn,{sx:{display:`flex`,alignItems:`center`},children:[`Overwrite File?`,G(q,{sx:{flexGrow:1}}),G(Z,{size:`small`,onClick:O,children:G(er,{})})]}),K(Un,{sx:{borderTop:`solid 1px`,borderBottom:`solid 1px`,borderColor:`divider`},onKeyDown:e=>{e.stopPropagation()},children:[G(X,{sx:{fontSize:`12pt`},children:y===`save`?`Saving a file with this name will overwrite the existing file. Are you sure you wish to continue?`:`Renaming the file with this name will overwrite the existing file. Are you sure you wish to continue?`}),G(Zr,{control:G(Xr,{size:`small`,checked:b,onChange:e=>{x(t=>({...t,bypass:e.target.checked}))}}),label:G(X,{sx:{fontWeight:`bold`,pt:`8px`},children:`Don't show this again`})})]}),K(Hn,{sx:{gap:`5px`},children:[G(J,{variant:`outlined`,onClick:ee,size:`small`,children:`Back`}),G(J,{size:`small`,color:`iochmara`,variant:`contained`,onClick:()=>{y&&(k(y,!0),O())},children:`Overwrite`})]})]})]})};async function qs(e){return(await e.get(`/api/cloud/organizations`)).data.organizations}async function Js(e,t){return(await e.get(`/api/cloud/organizations/${t}/projects`)).data.projects}async function Ys(e,t,n){return(await e.get(`/api/cloud/organizations/${t}/projects/${n}/base-status`)).data}async function Xs(e,t){return(await e.post(`/api/cloud/upload`,t)).data}async function Zs(e){return(await e.get(`/api/connection-info`)).data.connection_info}async function Qs(e,t){return(await e.post(`/api/cloud/warehouse-setup`,t)).data}const $s={snowflake:{type:`snowflake`,label:`Snowflake`,commonFields:[{name:`account`,label:`Account`,type:`text`,isCredential:!1,required:!0},{name:`user`,label:`User`,type:`text`,isCredential:!1,required:!0},{name:`warehouse`,label:`Warehouse`,type:`text`,isCredential:!1,required:!0},{name:`database`,label:`Database`,type:`text`,isCredential:!1,required:!0},{name:`schema`,label:`Schema`,type:`text`,isCredential:!1,required:!0}],authMethods:[{value:`user-password`,label:`User & Password`,fields:[{name:`password`,label:`Password`,type:`password`,isCredential:!0,required:!0}]},{value:`key-pair`,label:`Key Pair`,fields:[{name:`private_key`,label:`Private Key`,type:`textarea`,isCredential:!0,required:!0,placeholder:`Paste PEM-encoded private key`},{name:`private_key_passphrase`,label:`Private Key Passphrase`,type:`password`,isCredential:!0,required:!1}]}]},databricks:{type:`databricks`,label:`Databricks`,commonFields:[{name:`host`,label:`Host`,type:`text`,isCredential:!1,required:!0},{name:`http_path`,label:`HTTP Path`,type:`text`,isCredential:!1,required:!0},{name:`catalog`,label:`Catalog`,type:`text`,isCredential:!1,required:!1,prefillFrom:`database`},{name:`schema`,label:`Schema`,type:`text`,isCredential:!1,required:!0}],authMethods:[{value:`token`,label:`Token`,fields:[{name:`token`,label:`Access Token`,type:`password`,isCredential:!0,required:!0}]},{value:`oauth`,label:`OAuth (M2M)`,fields:[{name:`client_id`,label:`Client ID`,type:`text`,isCredential:!0,required:!0},{name:`client_secret`,label:`Client Secret`,type:`password`,isCredential:!0,required:!0}]}]},bigquery:{type:`bigquery`,label:`BigQuery`,commonFields:[{name:`project`,label:`Project`,type:`text`,isCredential:!1,required:!0,prefillFrom:`database`},{name:`dataset`,label:`Dataset`,type:`text`,isCredential:!1,required:!0,prefillFrom:`schema`}],authMethods:[{value:`service-account-json`,label:`Service Account JSON`,fields:[{name:`keyfile_json`,label:`Service Account Key (JSON)`,type:`textarea`,isCredential:!0,required:!0,placeholder:`Paste service account JSON`}]}]},redshift:{type:`redshift`,label:`Redshift`,commonFields:[{name:`host`,label:`Host`,type:`text`,isCredential:!1,required:!0},{name:`user`,label:`User`,type:`text`,isCredential:!1,required:!0},{name:`port`,label:`Port`,type:`number`,isCredential:!1,required:!0},{name:`dbname`,label:`Database`,type:`text`,isCredential:!1,required:!0,prefillFrom:`database`},{name:`schema`,label:`Schema`,type:`text`,isCredential:!1,required:!0}],authMethods:[{value:`password`,label:`Password`,fields:[{name:`password`,label:`Password`,type:`password`,isCredential:!0,required:!0}]}]}};function ec(e){return e in $s}function tc(e){return $s[e]?.authMethods[0]?.value??``}function nc(e,t){let n=$s[e];if(!n)return[];let r=n.authMethods.find(e=>e.value===t);return[...n.commonFields,...r?.fields??[]]}function rc(e,t){let n=$s[e];if(!n)return{};let r={};for(let e of n.commonFields){if(e.isCredential)continue;let n=t[e.prefillFrom??e.name];n!=null&&(r[e.name]=String(n))}return r}function ic({open:e,onClose:t}){let{apiClient:n}=B(),[r,i]=U(`select`),[a,o]=U([]),[s,c]=U([]),[l,u]=U(``),[d,f]=U(``),[p,m]=U(``),[h,g]=U(!1),[_,v]=U(!1),[y,b]=U(``),[x,S]=U(!1),[C,w]=U(``),[T,E]=U(null),[D,O]=U({}),[k,ee]=U(``),[te,A]=U(null);Ln(()=>{e&&(i(`select`),m(`dev-${new Date().toISOString().slice(0,16).replace(`T`,`-`).replace(`:`,``)}`),g(!0),qs(n).then(e=>{o(e),e.length===1&&u(String(e[0].id))}).catch(()=>o([])).finally(()=>g(!1)))},[e,n]),Ln(()=>{if(!l){c([]),f(``);return}v(!0),f(``),Js(n,l).then(e=>{c(e),e.length===1&&f(String(e[0].id))}).catch(()=>c([])).finally(()=>v(!1))},[l,n]),Ln(()=>{if(!l||!d){S(!1);return}Ys(n,l,d).then(e=>S(e.base_needs_upload)).catch(()=>S(!1))},[l,d,n]);let ne=async()=>{if(!(!l||!d||!p.trim())){nn(),i(`uploading`);try{let e=await Xs(n,{org_id:l,project_id:d,session_name:p.trim()});if(e.status===`success`&&e.session_url){A({sessionUrl:e.session_url,baseUploaded:x});let t=M?.warehouse_connection?null:await Zs(n);t&&ec(t.type)?(E(t),O(rc(t.type,t)),ee(tc(t.type)),sn(),i(`dw_setup`)):(b(e.session_url),i(`success`),xn(),window.open(e.session_url,`_blank`))}else w(e.message||`Upload failed`),i(`error`)}catch(e){w(e instanceof Error?e.message:`An error occurred during upload`),i(`error`)}}},re=async()=>{if(!T||!te)return;let e=nc(T.type,k),t=[];for(let n of e){let e=D[n.name]?.trim();if(n.required&&!e)t.push(`${n.label} is required`);else if(n.type===`number`&&e){let r=Number(e);Number.isFinite(r)||t.push(`${n.label} must be a valid number`)}}if(t.length>0){w(t.join(`. `)),i(`dw_error`);return}i(`dw_saving`);try{let t={type:T.type};T.type===`databricks`&&k===`oauth`&&(t.auth_type=`oauth`),T.type===`bigquery`&&(t.method=`service-account-json`);for(let n of e){let e=D[n.name];e&&(t[n.name]=n.type===`number`?Number(e):e)}await Qs(n,{org_id:l,project_id:d,connection_name:`${M?.display_name||M?.name||`Project`} DW`,config:t}),on(),b(te.sessionUrl),i(`success`),xn(),window.open(te.sessionUrl,`_blank`)}catch(e){w(e instanceof Error?e.message:`Failed to set up warehouse connection`),i(`dw_error`)}},ie=()=>{te&&(cn(),b(te.sessionUrl),i(`success`),xn(),window.open(te.sessionUrl,`_blank`))},j=a.find(e=>String(e.id)===l),M=s.find(e=>String(e.id)===d),ae=j&&M?`${Zt}/${j.name}/${M.name}`:void 0,oe=l&&d&&p.trim()&&!h;return K(Vn,{open:e,onClose:r===`uploading`||r===`dw_saving`?void 0:t,maxWidth:`sm`,fullWidth:!0,slotProps:{paper:{sx:{borderRadius:`1rem`}}},children:[r===`select`&&K(W,{children:[G(Wn,{sx:{textAlign:`center`,fontSize:`1.25rem`,pb:.5},children:`Upload to Recce Cloud`}),G(Un,{children:K(Y,{spacing:2,sx:{pt:.5},children:[G(X,{variant:`body2`,sx:{color:`text.secondary`},children:`Upload your local artifacts to Recce Cloud so your team can review and query the data.`}),K(si,{fullWidth:!0,size:`small`,children:[G(Qi,{children:`Organization`}),G($i,{value:l,label:`Organization`,onChange:e=>u(e.target.value),disabled:h,children:a.map(e=>G($,{value:String(e.id),children:e.display_name||e.name},e.id))})]}),K(si,{fullWidth:!0,size:`small`,children:[G(Qi,{children:`Project`}),G($i,{value:d,label:`Project`,onChange:e=>f(e.target.value),disabled:!l||_,children:s.map(e=>G($,{value:String(e.id),children:e.display_name||e.name},e.id))})]}),G(ci,{fullWidth:!0,size:`small`,label:`Session Name`,value:p,onChange:e=>m(e.target.value),placeholder:`e.g., my-feature-review`}),x&&G(X,{variant:`body2`,sx:{color:`text.secondary`},children:`Base artifacts will also be uploaded to set up the project's base environment for diffing.`})]})}),G(Hn,{sx:{px:3,pb:3},children:G(J,{fullWidth:!0,variant:`contained`,color:`primary`,onClick:ne,disabled:!oe,sx:{borderRadius:2,fontWeight:500},children:`Upload`})})]}),r===`uploading`&&G(Un,{children:K(Y,{spacing:1.5,sx:{alignItems:`center`,py:3},children:[G(ir,{size:36}),G(X,{sx:{fontWeight:500,fontSize:`1rem`},children:`Uploading artifacts...`}),G(X,{variant:`body2`,sx:{color:`text.secondary`,textAlign:`center`},children:x?`Uploading base and current artifacts. This may take a moment.`:`This may take a moment.`})]})}),r===`dw_setup`&&T&&(()=>{let e=$s[T.type];if(!e)return null;let t=e.authMethods.length>1,n=e.authMethods.find(e=>e.value===k);return K(W,{children:[G(Wn,{sx:{textAlign:`center`,fontSize:`1.25rem`,pb:.5},children:`Set Up Data Warehouse`}),G(Un,{children:K(Y,{spacing:2,sx:{pt:.5},children:[K(X,{variant:`body2`,sx:{color:`text.secondary`},children:[`Connect your `,e.label,` warehouse so Recce Cloud can query your data. You can skip this and set it up later.`]}),e.commonFields.map(e=>G(ci,{fullWidth:!0,size:`small`,label:e.label,type:e.type===`textarea`?`text`:e.type,multiline:e.type===`textarea`,minRows:e.type===`textarea`?3:void 0,required:e.required,placeholder:e.placeholder,value:D[e.name]??``,onChange:t=>O(n=>({...n,[e.name]:t.target.value}))},e.name)),t&&K(si,{fullWidth:!0,size:`small`,children:[G(Qi,{children:`Authentication`}),G($i,{value:k,label:`Authentication`,onChange:t=>{ee(t.target.value),O(t=>{let n={...t};for(let t of e.authMethods)for(let e of t.fields)delete n[e.name];return n})},children:e.authMethods.map(e=>G($,{value:e.value,children:e.label},e.value))})]}),n?.fields.map(e=>G(ci,{fullWidth:!0,size:`small`,label:e.label,type:e.type===`textarea`?`text`:e.type,multiline:e.type===`textarea`,minRows:e.type===`textarea`?3:void 0,required:e.required,placeholder:e.placeholder,value:D[e.name]??``,onChange:t=>O(n=>({...n,[e.name]:t.target.value}))},e.name))]})}),K(Hn,{sx:{px:3,pb:3,gap:1},children:[G(J,{fullWidth:!0,variant:`outlined`,color:`neutral`,onClick:ie,sx:{borderRadius:2,fontWeight:500},children:`Skip`}),G(J,{fullWidth:!0,variant:`contained`,color:`primary`,onClick:re,sx:{borderRadius:2,fontWeight:500},children:`Setup & Continue`})]})]})})(),r===`dw_saving`&&G(Un,{children:K(Y,{spacing:1.5,sx:{alignItems:`center`,py:3},children:[G(ir,{size:36}),G(X,{sx:{fontWeight:500,fontSize:`1rem`},children:`Setting up warehouse connection...`})]})}),r===`success`&&K(Un,{sx:{position:`relative`},children:[G(Z,{size:`small`,onClick:t,sx:{position:`absolute`,top:8,right:8},"aria-label":`Close`,children:G(jr,{})}),K(Y,{spacing:1.5,sx:{alignItems:`center`,pt:2,pb:1},children:[G(q,{component:hr,sx:{fontSize:36,color:`success.main`}}),G(X,{sx:{fontWeight:600,fontSize:`1rem`},children:`Upload Complete`}),G(X,{variant:`body2`,sx:{color:`text.secondary`,textAlign:`center`},children:`Your artifacts have been uploaded to Recce Cloud.`}),G(J,{variant:`contained`,color:`primary`,href:y,target:`_blank`,component:`a`,sx:{borderRadius:2,textTransform:`none`,fontWeight:600,mt:1},children:`Open in Recce Cloud`}),ae&&K(Gn,{href:ae,target:`_blank`,sx:{display:`flex`,alignItems:`center`,gap:.5,fontSize:`0.8125rem`,mt:1},children:[`Go to project page `,G(qn,{size:12})]})]})]}),r===`dw_error`&&K(W,{children:[G(Un,{children:K(Y,{spacing:1.5,sx:{alignItems:`center`,py:2},children:[G(X,{sx:{fontWeight:500,fontSize:`1rem`},children:`Warehouse Setup Failed`}),G(X,{variant:`body2`,sx:{color:`text.secondary`,textAlign:`center`},children:C})]})}),K(Hn,{sx:{px:3,pb:2,gap:1},children:[G(J,{fullWidth:!0,variant:`outlined`,color:`neutral`,onClick:ie,sx:{borderRadius:2,fontWeight:500},children:`Skip`}),G(J,{fullWidth:!0,variant:`contained`,color:`primary`,onClick:()=>i(`dw_setup`),sx:{borderRadius:2,fontWeight:500},children:`Retry Setup`})]})]}),r===`error`&&K(W,{children:[G(Un,{children:K(Y,{spacing:1.5,sx:{alignItems:`center`,py:2},children:[G(X,{sx:{fontWeight:500,fontSize:`1rem`},children:`Upload Failed`}),G(X,{variant:`body2`,sx:{color:`text.secondary`,textAlign:`center`},children:C})]})}),G(Hn,{sx:{px:3,pb:2},children:G(J,{fullWidth:!0,variant:`outlined`,color:`neutral`,onClick:()=>i(`select`),sx:{borderRadius:2,fontWeight:500},children:`Try Again`})})]})]})}function ac(){let{authed:e}=Ce(),{apiClient:t}=B(),[n,r]=U(null),[i,a]=U(`signup`),[o,s]=U(!1),c=Bn(!1),l=V(async()=>{if(c.current)try{await Yt(t),c.current=!1,Sn(),a(`reload`)}catch{}},[t]);if(Ln(()=>{let e=()=>{document.visibilityState===`visible`&&l()};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[l]),e)return K(W,{children:[G(J,{variant:`contained`,color:`primary`,size:`small`,startIcon:G(Ar,{}),onClick:()=>{vn({authed:!0}),s(!0)},sx:{borderRadius:`100px`,textTransform:`none`,fontWeight:600,px:2,py:.5,mr:1,whiteSpace:`nowrap`},children:`Share`}),G(ic,{open:o,onClose:()=>s(!1)})]});let u=e=>{vn({authed:!1}),a(`signup`),c.current=!1,r(e.currentTarget)},d=()=>{r(null),c.current=!1},f=async()=>{Cn();let e=window.open(``,`_blank`);try{let{connection_url:n}=await Ls(t);e&&!e.closed?e.location.href=n:window.open(n,`_blank`),c.current=!0,a(`waiting`)}catch{e?.close(),a(`error`)}};return K(W,{children:[G(J,{variant:`contained`,color:`primary`,size:`small`,startIcon:G(Ar,{}),onClick:u,sx:{borderRadius:`100px`,textTransform:`none`,fontWeight:600,px:2,py:.5,mr:1,whiteSpace:`nowrap`},children:`Share`}),G(yi,{open:!!n,anchorEl:n,onClose:d,anchorOrigin:{vertical:`bottom`,horizontal:`right`},transformOrigin:{vertical:`top`,horizontal:`right`},slotProps:{paper:{sx:{borderRadius:`12px`,p:3,maxWidth:360,mt:1}}},children:K(q,{sx:{position:`relative`},children:[G(Z,{size:`small`,onClick:d,sx:{position:`absolute`,top:-12,right:-12},"aria-label":`Close`,children:G(jr,{})}),i===`signup`&&K(W,{children:[G(X,{sx:{mb:3,pr:2},children:`Sign up to Recce Cloud so your team members can see and query your instance directly`}),G(J,{variant:`contained`,color:`primary`,onClick:f,sx:{borderRadius:`8px`,textTransform:`none`,fontWeight:600,px:4,py:1},children:`Sign up`})]}),i===`waiting`&&K(Y,{spacing:2,sx:{alignItems:`center`,py:1},children:[G(ir,{size:40}),G(X,{sx:{fontWeight:500,fontSize:`1.1rem`},children:`Waiting for signup...`}),G(X,{sx:{color:`text.secondary`,textAlign:`center`},children:`Complete signup in the browser tab.`}),G(J,{fullWidth:!0,variant:`text`,color:`primary`,size:`small`,onClick:f,sx:{textTransform:`none`},children:`Retry`})]}),i===`reload`&&K(Y,{spacing:2,sx:{alignItems:`center`,py:1},children:[G(q,{component:`img`,sx:{height:`5rem`,objectFit:`contain`},src:`/imgs/reload-image.svg`,alt:`Reload`}),G(X,{sx:{fontWeight:500,fontSize:`1.1rem`},children:`Reload to Finish`}),G(X,{sx:{color:`text.secondary`,textAlign:`center`},children:`Signup complete! Reload to connect to Recce Cloud.`}),G(J,{fullWidth:!0,variant:`contained`,color:`primary`,onClick:()=>window.location.reload(),sx:{borderRadius:`8px`,textTransform:`none`,fontWeight:600},children:`Reload`})]}),i===`error`&&K(Y,{spacing:2,sx:{alignItems:`center`,py:1},children:[G(X,{sx:{fontWeight:500,fontSize:`1.1rem`},children:`Connection Failed`}),G(X,{sx:{color:`text.secondary`,textAlign:`center`},children:`Could not connect to Recce Cloud. Please try again.`}),G(J,{fullWidth:!0,variant:`contained`,color:`primary`,onClick:f,sx:{borderRadius:`8px`,textTransform:`none`,fontWeight:600},children:`Retry`})]})]})})]})}function oc(){let{featureToggles:e}=Ce(),{apiClient:t}=B(),n=async()=>{try{let e=await te(t),n=JSON.stringify(e,null,2);Yr(new Blob([n],{type:`application/json`}),`recce-state-${li(new Date,`yyyy-MM-dd-HH-mm-ss`)}.json`)}catch(e){console.error(`Export failed`,e),Vt.create({title:`Export failed`,description:String(e),type:`error`,duration:5e3,closable:!0})}};return G(Q,{title:`Export`,children:G(Z,{size:`small`,"aria-label":`Export state`,onClick:async()=>{await n(),Tn({name:`export`})},disabled:e.disableExportStateFile,children:G(q,{component:vr,sx:{verticalAlign:`middle`,width:`16px`,height:`16px`}})})})}function sc(e){return/^\/checks\/([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/.test(e)}function cc(){return G(Q,{title:`Syncing`,children:G(q,{sx:{mx:`10px`},children:G(ir,{size:20})})})}function lc(){let[e,t]=U(!1),n=jn(),{apiClient:r}=B(),i=xi(),a=bi(),{basePath:o}=me(),[s,c]=U(!1),[l,u]=U(``),{data:d}=N(),f=()=>c(!1),p=V(async e=>{if(c(!1),t(!0),(await ee(e,r)).status===`conflict`){c(!0),t(!1);return}for(;await C(r);)await new Promise(e=>setTimeout(e,1e3));Vt.create({description:`Sync Completed`,type:`success`,duration:5e3,closable:!0}),t(!1),u(``),await n.invalidateQueries({queryKey:j.lineage()}),await n.invalidateQueries({queryKey:j.checks()}),await n.invalidateQueries({queryKey:j.runs()}),sc(a)&&i.push(`${o}/checks`)},[n,a,r,i.push,o]);return e?G(cc,{}):K(W,{children:[G(Q,{title:`Sync with Cloud`,children:G(Z,{size:`small`,"aria-label":`Sync state`,onClick:()=>p(d?.session_id?{method:`merge`}:{}),children:G(q,{component:tr,sx:{fontSize:16,verticalAlign:`middle`}})})}),K(Vn,{open:s,onClose:f,children:[K(Wn,{sx:{display:`flex`,alignItems:`center`,fontWeight:`bold`},children:[`Sync with Cloud`,G(q,{sx:{flexGrow:1}}),G(Z,{size:`small`,onClick:f,children:G(er,{})})]}),K(Un,{children:[G(X,{children:`New changes have been detected in the cloud. Please choose a method to sync your state`}),G(q,{sx:{mt:`5px`},children:G(Gi,{value:l,onChange:e=>{u(e.target.value)},children:K(Y,{direction:`column`,children:[G(Zr,{value:`merge`,control:G(Wi,{}),label:K(Y,{direction:`row`,sx:{alignItems:`center`},children:[`Merge`,G(Q,{title:`This will merge the local and remote states.`,children:G(q,{component:yr,sx:{ml:2,cursor:`pointer`}})})]})}),G(Zr,{value:`overwrite`,control:G(Wi,{}),label:K(Y,{direction:`row`,sx:{alignItems:`center`},children:[`Overwrite`,G(Q,{title:`This will overwrite the remote state file with the local state.`,children:G(q,{component:yr,sx:{ml:2,cursor:`pointer`}})})]})}),G(Zr,{value:`revert`,control:G(Wi,{}),label:K(Y,{direction:`row`,sx:{alignItems:`center`},children:[`Revert`,G(Q,{title:`This will discard local changes and revert to the cloud state.`,children:G(q,{component:yr,sx:{ml:2,cursor:`pointer`}})})]})})]})})})]}),K(Hn,{children:[G(J,{onClick:f,sx:{mr:1},children:`Cancel`}),G(J,{color:`iochmara`,variant:`contained`,onClick:()=>p({method:l||void 0}),disabled:!l,children:`Sync`})]})]})]})}const uc=[{path:`/lineage`,name:`Lineage`},{path:`/query`,name:`Query`},{path:`/checks`,name:`Checklist`}];function dc({queryKey:e,fetchCallback:t,selectCallback:n}){let{data:r,isLoading:i,error:a}=An({queryKey:e,queryFn:t,select:n});return i||a||r===0?G(W,{}):G(q,{sx:{bgcolor:`brand.main`,display:`flex`,justifyContent:`center`,alignItems:`center`,p:1,borderRadius:`100%`,color:`white`,fontWeight:700,fontSize:`0.75rem`},children:G(`span`,{children:r})})}function fc(){let{apiClient:e}=B();return G(dc,{queryKey:j.checks(),fetchCallback:()=>S(e),selectCallback:e=>e.filter(e=>!e.is_checked).length})}const pc=()=>{let e=bi(),{isDemoSite:t,isLoading:n,cloudMode:r}=P(),{featureToggles:i}=Ce(),{data:a,isLoading:o}=xe(),s=Bn(null);return Ln(()=>{s.current&&s.current!==e&&_n({from:s.current,to:e}),s.current=e},[e]),G(q,{sx:{borderBottom:`1px solid lightgray`,px:`12px`},children:K(q,{sx:{display:`grid`,gridTemplateColumns:`1fr auto 1fr`,width:`100%`,alignItems:`center`},children:[G(pi,{value:H(()=>e.startsWith(`/checks`)?`/checks`:e.startsWith(`/query`)?`/query`:e.startsWith(`/runs`)?`/runs`:`/lineage`,[e]),sx:{borderBottom:`none`,minHeight:`auto`},children:uc.map(({path:e,name:t})=>t===`Query`&&a?.single_env_onboarding?null:t===`Checklist`&&fc?G(fi,{value:e,disabled:n||o,sx:{p:0},label:G(q,{sx:{display:`flex`,alignItems:`center`,gap:`4px`},children:K(Qn,{href:e,style:{textDecoration:`none`,color:`inherit`,padding:`0.875rem 1.1875rem`,display:`flex`,gap:3,alignItems:`center`},children:[t,` `,G(fc,{})]})})},e):G(fi,{value:e,disabled:n||o,sx:{p:0},label:G(q,{sx:{display:`flex`,alignItems:`center`,gap:`4px`},children:G(Qn,{href:e,style:{textDecoration:`none`,color:`inherit`,padding:`0.875rem 1.1875rem`},children:t})})},e))}),G(q,{sx:{display:`flex`,alignItems:`center`,gap:`12px`,justifyContent:`center`},children:!n&&!t&&G(Ks,{})}),!n&&K(q,{sx:{display:`flex`,justifyContent:`right`,alignItems:`center`,mr:`8px`},children:[!t&&!a?.single_env_onboarding&&!i.disableShare&&G(ac,{}),G(Us,{}),r&&G(lc,{}),G(oc,{})]})]})})};function mc(){let{remainingSeconds:e,isEnabled:t}=le();return!t||e===null||e>60?null:K(ea,{color:`warning`,variant:`standard`,sx:{display:`flex`,alignItems:`center`,gap:1,fontSize:`0.75rem`,mr:2},children:[G(q,{component:nr,sx:{display:`inline-flex`}}),`Idle timeout: `,Gt(e,`compact`)]})}const hc=()=>{let{version:e,latestVersion:t}=D(),n=H(()=>RegExp(`^\\d+\\.\\d+\\.\\d+$`),[]);return Ln(()=>{if(n.test(e)&&e!==t){let e=`recce-update-toast-shown`;if(sessionStorage.getItem(e))return;setTimeout(()=>{Vt.create({id:`recce-update-available`,title:`Update available`,description:K(`span`,{children:[`A new version of Recce (v`,t,`) is available.`,G(`br`,{}),`Please run`,` `,G(q,{component:`code`,sx:{bgcolor:`grey.200`,px:.5,py:.25,borderRadius:.5,fontFamily:`monospace`,fontSize:`0.875em`},children:`pip install --upgrade recce`}),` `,`to update Recce.`,G(`br`,{}),G(Gn,{sx:{color:`primary.main`,fontWeight:`bold`,"&:hover":{textDecoration:`underline`}},href:`https://github.com/DataRecce/recce/releases/tag/v${t}`,target:`_blank`,children:`Click here to view the detail of latest release`})]}),duration:60*1e3,closable:!0}),sessionStorage.setItem(e,`true`)},0)}},[e,t,n]),n.test(e)?G(Gn,{href:`https://github.com/DataRecce/recce/releases/tag/v${e}`,sx:{"&:hover":{textDecoration:`none`},fontSize:`sm`,color:`rgba(255,255,255,0.8)`,textTransform:`uppercase`,borderWidth:1,px:1,borderRadius:.75},target:`_blank`,children:e}):G(X,{component:`span`,sx:{fontSize:`sm`,color:`rgba(255,255,255,0.8)`,textTransform:`uppercase`,borderWidth:1,px:1,borderRadius:.75},children:e})};function gc({icon:e,href:t,sx:n,...r}){let i=Xn();return G(Gn,{sx:{height:`20px`,color:`common.white`,...n},href:t,target:`_blank`,...r,children:G(e,{style:{color:i.palette.common.white,width:20,height:20}})})}const _c=()=>{let{reviewMode:e,isDemoSite:t,envInfo:n,cloudMode:r}=P(),{featureToggles:i,authed:a}=Ce(),{url:o,id:s}=n?.pullRequest??{},c=o?o.split(`/`).pop():null,l=r||a?Zt:`https://reccehq.com/`,[u,d]=U(!1);return K(q,{sx:{display:`flex`,gap:`10px`,minHeight:`40px`,alignItems:`center`,bgcolor:I.brand[400]},children:[G(Gn,{href:l,target:`_blank`,sx:{"&:hover":{textDecoration:`none`}},children:K(q,{sx:{display:`flex`,gap:`10px`,alignItems:`center`},children:[G(q,{component:`img`,sx:{width:20,height:20,ml:`18px`},src:`/logo/recce-logo-white.png`,alt:`recce-logo-white`}),G(X,{variant:`h4`,sx:{fontFamily:`"Montserrat", sans-serif`,color:`common.white`,fontSize:`1.25rem`},children:`RECCE`})]})}),G(Bs,{}),G(hc,{}),(i.mode??e)&&G(ea,{sx:{fontSize:`0.875rem`,color:`rgba(255,255,255,0.8)`,textTransform:`uppercase`,borderWidth:1,px:1,borderRadius:.75,borderColor:`rgba(255,255,255,0.8)`},children:i.mode??`review mode`}),r&&s&&G(ea,{sx:{fontSize:`0.875rem`,color:`rgba(255,255,255,0.8)`,textTransform:`uppercase`,borderWidth:1,px:1,borderRadius:.75,borderColor:`rgba(255,255,255,0.8)`},children:K(Y,{direction:`row`,spacing:1,sx:{alignItems:`center`},children:[G(q,{children:`cloud mode`}),G(q,{sx:{borderLeft:`1px solid rgba(255,255,255,0.8)`,pl:`8px`},children:K(Gn,{href:o,sx:{"&:hover":{textDecoration:`none`}},target:`_blank`,children:[G(ri,{style:{color:`rgba(255,255,255,0.8)`,width:12,height:12,marginRight:2,display:`inline`,verticalAlign:`middle`}}),G(X,{component:`span`,sx:{color:`rgba(255,255,255,0.8)`,display:`inline`},children:`#${String(s)}`})]})})]})}),t&&o&&c&&G(ea,{sx:{fontSize:`0.875rem`,color:`rgba(255,255,255,0.8)`,textTransform:`uppercase`,borderWidth:1,px:1,borderRadius:.75,borderColor:`rgba(255,255,255,0.8)`},children:K(Y,{direction:`row`,spacing:1,sx:{alignItems:`center`},children:[G(q,{children:`demo mode`}),G(q,{sx:{borderLeft:`1px solid rgba(255,255,255,0.8)`,pl:`8px`},children:K(Gn,{href:o,sx:{"&:hover":{textDecoration:`none`}},target:`_blank`,children:[G(ri,{style:{color:`rgba(255,255,255,0.8)`,width:12,height:12,marginRight:2,display:`inline`,verticalAlign:`middle`}}),G(X,{component:`span`,sx:{color:`rgba(255,255,255,0.8)`,display:`inline`},children:`#${c}`})]})})]})}),G(q,{sx:{flex:1}}),(t||i.mode===`read only`)&&K(W,{children:[G(gc,{icon:sr,href:`https://github.com/DataRecce/recce`}),G(gc,{icon:ur,href:`https://getdbt.slack.com/archives/C05C28V7CPP`}),G(gc,{sx:{mr:2},icon:cr,href:`https://docs.reccehq.com`})]}),!t&&i.mode!==`read only`&&K(W,{children:[G(mc,{}),a||r?G(q,{sx:{mr:2},children:G(zs,{})}):K(W,{children:[G(q,{component:`button`,sx:{color:`common.white`,fontSize:`0.875rem`,fontWeight:600,bgcolor:`brand.700`,borderRadius:1,px:3,py:1,mr:2,cursor:`pointer`,border:`none`},onClick:()=>{d(!0)},children:`Connect to Cloud`}),u&&G(Rs,{parentOpen:u,handleParentClose:d,ignoreCookie:!0,variant:`user-profile`})]})]})]})};function vc(){return G(q,{sx:{display:`flex`,height:`100%`,alignItems:`center`,justifyContent:`center`,contain:`size`},children:G(q,{sx:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100%`},children:G(ir,{size:48})})})}function yc({children:e,lineage:t}){let n=bi(),{isDemoSite:r,isLoading:i,isCodespace:a}=P(),{featureToggles:o}=Ce(),s=n.replace(/\/$/,``)||`/`,c=s===`/lineage`||s===`/`;return Ln(()=>{pn()},[]),K(q,{sx:{display:`flex`,flexDirection:`column`,height:`100vh`,overflow:`hidden`},children:[G(_c,{}),G(pc,{}),G(bc,{isLineageRoute:c,lineage:t,children:e}),!i&&!r&&!a&&o.mode===null&&G(Rs,{})]})}function bc({children:e,lineage:t,isLineageRoute:n,disableInternalHistory:r=!1}){let{isRunResultOpen:i,isHistoryOpen:a,closeRunResult:o}=he(),{basePath:s}=me(),{data:c}=xe(),l=bi(),u=Rt(),d=i&&!l.startsWith(`${s}/checks`),f=r?!1:a&&!l.startsWith(`${s}/checks`);return K(at,{sizes:f?[20,80]:[0,100],minSize:0,gutterSize:5,className:f?void 0:`split-gutter-hidden`,style:{height:`100%`},children:[G(q,{style:{contain:`size`},suppressHydrationWarning:!0,children:f&&G(Le,{})}),K(_t,{sizes:d?[50,50]:[100,0],minSize:0,gutterSize:5,className:d?void 0:`split-gutter-hidden`,style:{flex:`1`,contain:`size`},children:[G(Mn,{fallback:G(vc,{}),children:K(q,{sx:{p:0,contain:`content`,height:`100%`,position:`relative`},suppressHydrationWarning:!0,children:[G(q,{sx:{display:n?`block`:`none`,height:`100%`,position:n?`relative`:`absolute`,inset:0},children:t}),!n&&e]})}),G(q,{sx:{height:`100%`,bgcolor:u?`grey.900`:`grey.50`},suppressHydrationWarning:!0,children:d?G(je,{onClose:o,isSingleEnvironment:!!c?.single_env_onboarding}):null})]})]})}function xc({children:e,display:t}){let[n,r]=U(!1),i=Bn(null),a=Bn(null),o=V(()=>{i.current&&=(clearTimeout(i.current),null),r(!0)},[]),s=V(()=>{i.current=setTimeout(()=>{r(!1)},100)},[]);return t?K(W,{children:[G(q,{ref:a,onMouseEnter:o,onMouseLeave:s,sx:{display:`contents`},children:e}),K(yi,{open:n,anchorEl:a.current,onClose:()=>r(!1),anchorOrigin:{vertical:`bottom`,horizontal:`left`},transformOrigin:{vertical:`top`,horizontal:`left`},disableAutoFocus:!0,disableEnforceFocus:!0,sx:{pointerEvents:`none`},slotProps:{paper:{onMouseEnter:o,onMouseLeave:s,sx:{bgcolor:`grey.600`,color:`white`,p:1.5,pointerEvents:`auto`}}},children:[`Connect to a data warehouse to unlock Diff.`,` `,G(Gn,{href:Qt,target:`_blank`,sx:{color:`white`,textDecoration:`underline`},children:`Learn more`}),`.`]})]}):e}function Sc({checksOnly:e=!0}){let t=Rt(),{featureToggles:n}=Ce(),r=jn(),{apiClient:i}=B(),a=Bn(null),o=Bn(null),[s,c]=U(null),[l,u]=U(!1),d=xi(),f=bi(),{basePath:p}=me(),[,m]=Se(),g=V(async()=>{if(s){try{let{runs:t,checks:n}=await h(s,e,i);m?.(),await r.invalidateQueries({queryKey:j.checks()}),await r.invalidateQueries({queryKey:j.runs()}),f.includes(`/checks`)&&d.push(`${p}/checks`);let a=e?`${n} checks imported successfully`:`${t} runs and ${n} checks imported successfully`;Vt.create({description:a,type:`info`,duration:5e3,closable:!0})}catch(e){console.error(`Import failed`,e),Vt.create({title:`Import failed`,description:String(e),type:`error`,duration:5e3,closable:!0})}u(!1)}},[r,s,f,m,e,i,d.push,p]),_=()=>{a.current&&a.current.click()},v=e=>{e.target.files?.length===1&&(c(e.target.files[0]),u(!0)),a.current&&(a.current.value=``)},y=()=>u(!1),b=e?`checks`:`runs and checks`,{isDemoSite:x}=P();return K(W,{children:[G(Q,{title:`Import Checklist from State File`+(x?` (Disabled in the demo site)`:``),children:G(Z,{sx:{pt:`6px`,color:t?`grey.300`:`grey.600`,"&:hover":{color:t?`grey.100`:`grey.800`},fontSize:20},"aria-label":`Import state`,onClick:()=>{_(),Tn({name:`import`})},disabled:n.disableImportStateFile||x,children:G(Ri,{})})}),G(`input`,{type:`file`,style:{display:`none`},ref:a,onChange:v}),K(Vn,{open:l,onClose:y,maxWidth:`sm`,fullWidth:!0,"aria-labelledby":`import-dialog-title`,children:[K(Wn,{id:`import-dialog-title`,sx:{display:`flex`,alignItems:`center`,fontWeight:`bold`},children:[`Import state`,G(q,{sx:{flexGrow:1}}),G(Z,{size:`small`,onClick:y,children:G(er,{})})]}),G(Un,{children:K(Y,{direction:`column`,spacing:1,sx:{px:`5px`,borderRadius:1},children:[K(Y,{direction:`row`,spacing:.5,sx:{alignItems:`center`},children:[G(q,{component:yr,sx:{color:`error.main`}}),G(X,{component:`span`,sx:{fontWeight:500,color:`error.main`},children:`Caution!`})]}),K(X,{children:[`The current `,b,` will be`,` `,G(X,{component:`span`,sx:{fontWeight:600},children:`merged`}),` `,`with the imported state`]})]})}),K(Hn,{children:[G(J,{ref:o,onClick:y,children:`Cancel`}),G(J,{color:`iochmara`,variant:`contained`,onClick:g,sx:{ml:`5px`},children:`Import`})]})]})]})}function Cc({check:e},t){return G(q,{sx:{display:`flex`,flexDirection:`column`,height:`100%`},children:G(Hr,{children:G(Ps,{viewOptions:{...e.params,...e.view_options},interactive:!1,ref:t})})})}const wc=Pn(Cc),Tc=({node:e,selected:t,onSelect:n,schemaChanged:r,isDark:i})=>{let{icon:a}=Ae(e.data.resourceType),o,s;return r?(o=L(`schema_diff`).icon,s=Ke(`modified`).color):e.data.changeStatus===`added`?(o=Ke(`added`).icon,s=Ke(`added`).color):e.data.changeStatus===`removed`&&(o=Ke(`removed`).icon,s=Ke(`removed`).color),G(hi,{disablePadding:!0,children:K(q,{sx:{display:`flex`,width:`100%`,fontSize:`10pt`,p:`5px 8px`,cursor:`pointer`,"&:hover":{bgcolor:i?`grey.700`:`grey.200`},bgcolor:t?i?`grey.800`:`grey.100`:`inherit`,alignItems:`center`,gap:`5px`},onClick:()=>{n(e.id)},children:[a&&G(q,{component:a}),G(q,{sx:{flex:1,textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`},children:e.data.name}),o&&s&&G(q,{component:o,sx:{color:s}})]})})};function Ec({check:e},t){let n=Rt(),{apiClient:r}=B(),{lineageGraph:i}=P(),a=e.params,{isLoading:o,error:s,data:c}=An({queryKey:[...j.check(e.check_id),`select`],queryFn:async()=>T({select:a.select,exclude:a.exclude,packages:a.packages,view_mode:a.view_mode},r),refetchOnMount:!0,enabled:!a.node_id}),[l,d]=H(()=>{let e=[],t=[],n=[],r=[];if(a.node_id){let t=a.node_id instanceof Array?a.node_id:[a.node_id];for(let n of t){let t=i?.nodes[n];t&&e.push(t)}}else for(let t of c?.nodes??[]){let n=i?.nodes[t];n&&e.push(n)}let o=e.filter(e=>e.data.resourceType===`model`||e.data.resourceType===`seed`||e.data.resourceType===`source`||e.data.resourceType===`snapshot`);for(let e of o)e.data.change?.columns&&Object.keys(e.data.change.columns).length>0?t.push(e.id):e.data.changeStatus===`added`?n.push(e.id):e.data.changeStatus===`removed`&&r.push(e.id);function s(e){return t.includes(e.id)?3:n.includes(e.id)?2:+!!r.includes(e.id)}return o.sort((e,t)=>{let n=s(e),r=s(t);return n===r?e.data.name.localeCompare(t.data.name):r-n}),[o,t]},[a.node_id,c?.nodes,i]),[f,p]=U(0),m=f<l.length?l[f]:void 0,{data:h}=An({queryKey:[`modelDetail`,m?.id],queryFn:()=>u(m?.id??``,r),enabled:!!m&&!!r,staleTime:300*1e3});if(o)return G(q,{sx:{display:`flex`,alignItems:`center`,justifyContent:`center`,bgcolor:n?`grey.900`:`grey.50`,height:`100%`},children:`Loading...`});if(s)return K(q,{sx:{display:`flex`,alignItems:`center`,justifyContent:`center`,bgcolor:n?`grey.900`:`grey.50`,height:`100%`},className:`no-track-pii-safe`,children:[`Error: `,s.message]});if(l.length==0)return G(q,{sx:{display:`flex`,alignItems:`center`,justifyContent:`center`,bgcolor:n?`grey.900`:`grey.50`,height:`100%`},children:`No nodes matched`});if(f<l.length){let e=l[f];return K(at,{sizes:[80,20],minSize:30,style:{height:`100%`},children:[G(Ro,{base:h?.model?.base&&Object.keys(h.model.base).length>0?{id:e.id,unique_id:e.id,name:e.data.name,...h.model.base}:void 0,current:h?.model?.current&&Object.keys(h.model.current).length>0?{id:e.id,unique_id:e.id,name:e.data.name,...h.model.current}:void 0,columnChanges:e.data.change?.columns,enableScreenshot:!0,showMenu:!1,ref:t}),G(mi,{sx:{overflow:`auto`,bgcolor:`background.paper`,listStyle:`none`},children:l.map((e,t)=>G(Tc,{node:e,schemaChanged:d.includes(e.id),selected:t===f,isDark:n,onSelect:()=>{p(t)}},e.id))})]})}return G(W,{})}const Dc=Pn(Ec);function Oc({checkId:r,refreshCheckList:a}){let s=Xn(),l=Rt(),{apiClient:u}=B(),{featureToggles:d,sessionId:f}=Ce(),{setLatestSelectedCheckId:p}=Be(),{cloudMode:m}=P(),h=jn(),g=xi(),{basePath:_}=me(),{setSqlQuery:v,setBaseSqlQuery:y,setCustomQueries:b,setPrimaryKeys:x}=Mt(),{successToast:S,failToast:C}=Bt(),[w,T]=U(),[E]=U(),[D,O]=U(!1),[k,ee]=U(!1),[te,A]=U(null),ne=!!te,{isLoading:re,error:ie,data:M}=An({queryKey:j.check(r),queryFn:async()=>c(r,u),refetchOnMount:!0}),ae=w??M?.last_run?.run_id,{run:oe,error:se}=vt(ae),ce=w?!oe||oe.status===`Running`:oe?.status===`Running`,N=M?.type?L(M.type):void 0,F;N&&(F=N.RunResultView);let le=M?.is_preset??!1,ue=Bn(null),{mutate:de}=kn({mutationFn:e=>o(r,e,u),onSuccess:async()=>{await h.invalidateQueries({queryKey:j.check(r)}),await h.invalidateQueries({queryKey:j.checks()})}}),{mutate:fe}=kn({mutationFn:()=>n(r,u),onSuccess:async()=>{p(``),await h.invalidateQueries({queryKey:j.checks()}),g.push(`${_}/checks`)}}),{mutate:pe,isPending:he}=kn({mutationFn:async()=>{if(!M)throw Error(`Check not found`);return await t(r,u)},onSuccess:async()=>{S(`Check marked as preset successfully`),await h.invalidateQueries({queryKey:j.check(r)})},onError:e=>{C(`Failed to mark check as preset`,e)}}),ge=V(async()=>{M?.type&&(T((await e(r,{nowait:!0},u)).run_id),await h.invalidateQueries({queryKey:j.check(r)}),a&&a())},[M,r,h,a,u]),_e=V(async()=>{if(O(!0),ae)return await i(ae,u)},[ae,u]),ve=async()=>{if(!M)return;let e=kc(M);if(!window.isSecureContext){C(`Failed to copy the check to clipboard`,Error(`Copy to clipboard is available only in secure contexts (HTTPS)`));return}try{await navigator.clipboard.writeText(e),S(`Copied the check to the clipboard`)}catch(e){C(`Failed to copy the check to clipboard`,e)}},ye=V(()=>{let e=M?.is_checked;de({is_checked:!e}),e||Vt.create({title:`Marked as approved`,type:`success`,duration:2e3})},[M?.is_checked,de]),be=e=>{de({view_options:e})},xe=e=>{de({description:e})},Se=e=>{A(e.currentTarget)},we=()=>{A(null)},Te=V(()=>{if(!M)return;let e=M.params;v(e?.sql_template||``),`base_sql_template`in e&&e.base_sql_template?(y(e.base_sql_template),b(!0)):(y(``),b(!1)),`primary_keys`in e&&e.primary_keys?x(e.primary_keys):x(void 0),g.push(`${_}/query`)},[M,g,_,v,y,b,x]),[I,Ee]=U(`result`),{ref:De,onCopyToClipboard:Oe,onMouseEnter:ke,onMouseLeave:Ae}=St(),je=Ye({name:M?.name??``,description:M?.description??``,type:M?.type??``,params:M?.params,viewOptions:M?.view_options});if(re)return G(q,{sx:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100%`},children:`Loading`});if(ie)return K(q,{sx:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100%`},children:[`Error: `,G(`span`,{className:`no-track-pii-safe`,children:ie.message})]});if(!M)return G(_t,{minSize:100,sizes:[30,70],style:{height:`100%`,width:`100%`,maxHeight:`100%`},children:G(q,{style:{contain:`strict`},sx:{display:`flex`,flexDirection:`column`},children:G(q,{sx:{display:`flex`,p:`0px 16px`,alignItems:`center`,height:40},children:G(st,{name:`Check not found`,disabled:!0})})})});let Me=oe?.run_at?ui(new Date(oe.run_at),{addSuffix:!0}):null,Ne=N?.icon;return K(ta,{spacing:0,container:!0,sx:{height:`100%`,width:`100%`},children:[G(ta,{size:{xs:12,md:m?9:12},sx:{height:`100%`},children:K(_t,{minSize:100,sizes:[40,60],style:{height:`100%`,width:`100%`,maxHeight:`100%`},children:[G(q,{sx:{height:`100%`,contain:`strict`,display:`flex`,flexDirection:`row`},children:K(q,{sx:{flex:1,height:`100%`,display:`flex`,flexDirection:`column`,overflow:`hidden`,minWidth:0},children:[K(q,{sx:{display:`flex`,p:`0px 16px`,alignItems:`center`,height:40,borderBottom:`2px solid`,borderColor:l?`grey.700`:`grey.300`},children:[Ne&&G(q,{component:Ne,sx:{fontSize:20,mr:1,flexShrink:0}}),G(st,{name:M.name,onNameChange:e=>{de({name:e})}}),G(q,{sx:{flexGrow:1}}),K(Y,{direction:`row`,spacing:2,sx:{mr:`10px`},children:[le&&G(Q,{title:`This is a preset check`,children:G(q,{sx:{display:`flex`,alignItems:`center`,justifyContent:`center`},children:G(Li,{size:`1rem`,color:s.palette.iochmara.dark})})}),M?.actor_type&&!M.is_preset&&Ge[M.actor_type]&&G(Mr,{label:Ge[M.actor_type].label,size:`small`,sx:{height:20,fontSize:`0.65rem`,fontWeight:500,backgroundColor:Ge[M.actor_type].bg,color:Ge[M.actor_type].color,flexShrink:0,"& .MuiChip-label":{px:.75}}}),G(Z,{size:`small`,onClick:Se,children:G(ai,{})}),K($r,{anchorEl:te,open:ne,onClose:we,children:[f&&K($,{onClick:()=>{pe(),we()},disabled:he||le,children:[G(Ti,{children:G($n,{})}),G(Ei,{children:`Mark as Preset Check`})]}),K($,{onClick:()=>{ee(!0),we()},children:[G(Ti,{children:G(ra,{})}),G(Ei,{children:`Get Preset Check Template`})]}),K($,{onClick:()=>{ve(),we()},children:[G(Ti,{children:G(_r,{})}),G(Ei,{children:`Copy Markdown`})]}),G(rr,{}),K($,{onClick:()=>{fe(),we()},disabled:d.disableUpdateChecklist,sx:{color:`error.main`},children:[G(Ti,{sx:{color:`error.main`},children:G(Or,{})}),G(Ei,{children:`Delete`})]})]}),G(Q,{title:ze({type:M.type,hasResult:!!oe?.result,hasError:!!oe?.error})?`Run the check first`:M.is_checked?`Remove approval`:`Mark as approved`,placement:`bottom-end`,children:G(J,{size:`small`,color:M.is_checked?`success`:`neutral`,variant:M.is_checked?`contained`:`outlined`,onClick:()=>{ye()},disabled:ze({type:M.type,hasResult:!!oe?.result,hasError:!!oe?.error})||d.disableUpdateChecklist,startIcon:M.is_checked?G(hr,{}):G(ti,{style:{color:l?s.palette.grey[600]:s.palette.grey[400]}}),sx:{flex:`0 0 auto`,textTransform:`none`},children:M.is_checked?`Approved`:`Pending`})})]})]}),G(q,{sx:{flex:1,p:`8px 16px`,minHeight:100},children:G($e,{value:M.description,onChange:xe,disabled:d.disableUpdateChecklist},M.check_id)})]})}),G(q,{style:{contain:`strict`},children:K(q,{sx:{height:`100%`,display:`flex`,flexDirection:`column`},children:[K(q,{sx:{display:`flex`,alignItems:`center`,borderBottom:1,borderColor:`divider`,height:50},children:[K(pi,{value:I,onChange:(e,t)=>Ee(t),children:[G(fi,{label:`Result`,value:`result`,sx:{fontSize:`0.75rem`,textTransform:`none`}}),(M.type===`query`||M.type===`query_diff`)&&G(fi,{label:`Query`,value:`query`,sx:{fontSize:`0.75rem`,textTransform:`none`}})]}),Me&&G(X,{variant:`caption`,sx:{color:`text.secondary`,ml:1,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,minWidth:0,display:`flex`,alignItems:`center`},children:Me}),G(q,{sx:{flexGrow:1}}),K(Y,{direction:`row`,spacing:1,sx:{mr:`10px`},children:[(M.type===`query`||M.type===`query_base`||M.type===`query_diff`)&&G(Q,{title:`Open in Query tab`,children:G(J,{variant:`outlined`,color:`neutral`,size:`small`,onClick:Te,disabled:d.disableDatabaseQuery,startIcon:G(wi,{}),sx:{textTransform:`none`},children:`Open Query`})}),F&&G(Q,{title:`Rerun`,children:G(J,{variant:`outlined`,color:`neutral`,size:`small`,onClick:()=>ge(),disabled:d.disableDatabaseQuery||ce,startIcon:G(Er,{}),sx:{textTransform:`none`},children:ce?`Running...`:`Rerun`})}),G(J,{variant:`outlined`,color:`neutral`,disabled:ze({type:M.type,hasResult:!!oe?.result,hasError:!!oe?.error})||I!==`result`,onMouseEnter:ke,onMouseLeave:Ae,size:`small`,onClick:async()=>{M.type===`lineage_diff`?ue.current?.copyToClipboard():await Oe(),an({type:M.type,from:`check`})},startIcon:G(_r,{}),sx:{textTransform:`none`},children:`Copy to Clipboard`})]})]}),K(q,{sx:{flex:1,contain:`strict`},children:[I===`result`&&K(q,{sx:{width:`100%`,height:`100%`},children:[F&&(M.last_run||ae?G(qe,{ref:De,isRunning:ce,isAborting:D,run:ae?oe:M.last_run,error:se,progress:E,RunResultView:F,viewOptions:M.view_options,onViewOptionsChanged:be,onCancel:_e,onExecuteRun:ge}):G(q,{sx:{display:`flex`,alignItems:`center`,justifyContent:`center`,bgcolor:l?`grey.900`:`grey.50`,height:`100%`},children:K(Y,{spacing:2,sx:{alignItems:`center`},children:[G(q,{children:`This action is part of the initial preset and has not been performed yet. Once performed, the result will be shown here.`}),G(xc,{display:d.mode===`metadata only`,children:G(J,{onClick:ge,variant:`contained`,size:`small`,disabled:d.disableDatabaseQuery,children:`Run Query`})})]})})),M.type===`schema_diff`&&G(Dc,{check:M,ref:De},M.check_id),M.type===`lineage_diff`&&G(wc,{check:M,ref:ue},M.check_id)]}),I===`query`&&(M.type===`query`||M.type===`query_diff`||M.type===`query_base`)&&G(q,{sx:{height:`100%`,width:`100%`},children:M.params.base_sql_template?G(Ue,{value:M.params.sql_template||``,baseValue:M.params.base_sql_template??``,options:{readOnly:!0}}):G(ht,{value:M.params.sql_template||``,options:{readOnly:!0}})})]})]})}),K(Vn,{open:k,onClose:()=>ee(!1),maxWidth:`md`,fullWidth:!0,children:[G(Wn,{children:`Preset Check Template`}),K(Un,{children:[K(X,{variant:`subtitle2`,sx:{fontWeight:`bold`,mb:2},children:[`Please`,` `,G(X,{component:`span`,sx:{cursor:`pointer`,"&:hover":{textDecoration:`underline`},color:`primary.main`},onClick:async()=>{await navigator.clipboard.writeText(je),S(`Copied the template to the clipboard`)},children:`copy`}),` `,`the following template and paste it into the`,` `,G(q,{component:`span`,sx:{px:.5,bgcolor:`error.light`,borderRadius:.5},children:`recce.yml`}),` `,`file.`]}),G(Ie,{yamlTemplate:je})]}),G(Hn,{children:G(Z,{size:`small`,onClick:()=>ee(!1),sx:{position:`absolute`,top:8,right:8},children:G(er,{})})})]})]})}),m&&G(ta,{size:3,sx:{height:`100%`,overflow:`hidden`,flexShrink:0,display:{xs:`none`,md:`block`}},children:G(Ka,{checkId:r})})]})}function kc(e){return na`
|
|
7
|
-
<details><summary>${Fe({name:e.name,isChecked:e.is_checked})}</summary>
|
|
8
|
-
|
|
9
|
-
${Ac(e)}
|
|
10
|
-
|
|
11
|
-
</details>`}function Ac(e){let t=We({description:e.description});if(e.type===`query`||e.type===`query_diff`){let n=e.params;return`${t}\n\n${z({sql:n&&`sql_template`in n?n.sql_template:``})}`}return t}const jc=()=>{let e=jn(),t=xi(),{apiClient:n}=B(),{basePath:r}=me(),{mutate:i,isPending:a}=kn({mutationFn:()=>y({select:`state:modified`},n),onSuccess:async n=>{await e.invalidateQueries({queryKey:j.checks()}),t.push(`${r}/checks/?id=${n.check_id}`)}});return G(Qe,{title:`No checks yet`,description:`Checks help you validate data quality and catch issues.`,icon:G(Ci,{size:48}),actionText:`Create Schema Diff Check`,onAction:()=>{i()},isLoading:a,helperText:`The schema checks compare modified models between environments to detect changes, additions, or removals.`})},Mc=({check:e,selected:t,onSelect:n,onApprovalChange:r})=>{let{featureToggles:i}=Ce(),a=e.last_run?.run_id,{run:o}=vt(a),s=ze({type:e.type,hasResult:!!o?.result,hasError:!!o?.error}),c=s||i.disableUpdateChecklist;return G(Ee,{check:{id:e.check_id,name:e.name,type:e.type,isApproved:e.is_checked,runStatus:(()=>{if(o){if(o.error)return`error`;if(o.result)return`success`}})(),isPreset:e.is_preset,isOutdated:e.is_outdated,lastRunAt:e.last_run?.run_at,actorType:e.actor_type},isSelected:t,onClick:n,onApprovalChange:r,disableApproval:c,disabledApprovalTooltip:s?`Run the check first`:void 0})},Nc=({checks:e,selectedItem:t,onCheckSelected:n,onChecksReordered:r})=>{let[i,a]=U(!1),[s,c]=U(!1),[l,u]=U(null),d=jn(),{apiClient:f}=B(),{mutate:p}=kn({mutationFn:({checkId:e,isChecked:t})=>o(e,{is_checked:t},f),onSuccess:async(e,{checkId:t})=>{await d.invalidateQueries({queryKey:j.check(t)}),await d.invalidateQueries({queryKey:j.checks()})}}),m=e=>{e.destination&&r(e.source.index,e.destination.index)},h=()=>c(!0),g=()=>{c(!1),u(null)},_=()=>{Vt.create({title:`Marked as approved`,type:`success`,duration:2e3})},v=(e,t)=>{t?localStorage.getItem(`bypassMarkAsApprovedWarning`)===`true`?(p({checkId:e,isChecked:!0}),_()):(u(e),h()):p({checkId:e,isChecked:!1})};return K(W,{children:[G(ia,{onDragEnd:m,children:G(oa,{droppableId:`checklist`,children:r=>K(Y,{...r.droppableProps,ref:r.innerRef,className:`no-track-pii-safe`,sx:{width:`100%`,flex:1,overflow:`auto`},spacing:0,children:[e.map((e,r)=>G(aa,{draggableId:e.check_id,index:r,children:(r,i)=>{let a=r.draggableProps.style;if(i.isDragging&&a&&`left`in a){let e={x:0,y:80};a={...a,left:a.left-e.x,top:a.top-e.y}}return G(q,{ref:r.innerRef,...r.draggableProps,...r.dragHandleProps,style:a,sx:{borderBottom:`1px solid`,borderColor:`divider`,width:`100%`},children:G(Mc,{check:e,selected:e.check_id===t,onSelect:n,onApprovalChange:v},e.check_id)})}},e.check_id)),r.placeholder]})})}),K(Vn,{open:s,onClose:g,maxWidth:`xs`,fullWidth:!0,children:[K(Wn,{sx:{display:`flex`,alignItems:`center`},children:[`Mark as Approved?`,G(q,{sx:{flexGrow:1}}),G(Z,{size:`small`,onClick:g,children:G(er,{})})]}),G(rr,{}),K(Un,{sx:{fontSize:`0.875rem`},children:[G(X,{children:`Please ensure you have reviewed the contents of this check before marking it as approved.`}),G(Zr,{control:G(Xr,{checked:i,onChange:e=>{a(e.target.checked)},size:`small`}),label:G(X,{sx:{fontWeight:`bold`,pt:`8px`},children:`Don't show this again`})})]}),G(rr,{}),K(Hn,{sx:{gap:0},children:[G(J,{variant:`outlined`,size:`small`,onClick:g,children:`Cancel`}),G(J,{color:`iochmara`,variant:`contained`,size:`small`,onClick:()=>{l&&(p({checkId:l,isChecked:!0}),i&&localStorage.setItem(`bypassMarkAsApprovedWarning`,`true`),_(),g(),u(null))},children:`Mark as approved`})]})]})]})},Pc=()=>{let e=Xn().palette.mode===`dark`?`grey.700`:`grey.300`,t=xi(),n=Si().get(`id`),{latestSelectedCheckId:r,setLatestSelectedCheckId:i}=Be(),a=jn(),{apiClient:o}=B(),{basePath:s}=me(),c=n;Ln(()=>{c&&i(c)},[c,i]);let{isLoading:l,error:u,data:d,status:f,refetch:p}=An({queryKey:j.checks(),queryFn:()=>S(o),refetchOnMount:!0}),m=V(e=>{t.push(`${s}/checks/?id=${e}`)},[t.push,s]),[h,g]=U(d??[]),[_,v]=U(d);d!==_&&(v(d),g(d??[]));let{mutate:y}=kn({mutationFn:e=>x(e,o),onSuccess:async()=>{await a.invalidateQueries({queryKey:j.checks()})}}),b=V((e,t)=>{let n=[...h],[r]=n.splice(e,1);n.splice(t,0,r),y({source:e,destination:t}),g(n)},[h,y]),C=H(()=>!!(c&&d?.some(e=>e.check_id===c)),[c,d]);return Ln(()=>{f!==`success`||d.length===0||C||(r&&d.some(e=>e.check_id===r)?t.replace(`${s}/checks/?id=${r}`):t.replace(`${s}/checks/?id=${d[0].check_id}`))},[f,C,d,r,t.replace,s]),l?null:u?K(q,{children:[`Error: `,G(`span`,{className:`no-track-pii-safe`,children:u.message})]}):d?.length?K(at,{style:{height:`100%`},minSize:50,sizes:[20,80],children:[G(q,{sx:{height:`100%`},style:{contain:`size`},children:K(Y,{sx:{height:`100%`,alignItems:`stretch`},style:{contain:`strict`},spacing:0,children:[G(q,{sx:{display:`flex`,justifyContent:`flex-end`,p:`0px 10px`},children:G(Sc,{checksOnly:!0})}),G(rr,{}),G(Nc,{checks:h,selectedItem:c,onCheckSelected:m,onChecksReordered:b})]})}),G(q,{sx:{height:`100%`},children:C&&c&&G(Oc,{checkId:c,refreshCheckList:p},c)})]}):K(at,{style:{height:`100%`},minSize:50,sizes:[20,80],children:[G(q,{sx:{borderRight:`1px solid`,borderRightColor:e,height:`100%`},style:{contain:`size`},children:K(Y,{sx:{height:`100%`,alignItems:`stretch`},style:{contain:`strict`},spacing:0,children:[G(q,{sx:{display:`flex`,justifyContent:`flex-end`,p:`0px 10px`},children:G(Sc,{checksOnly:!0})}),G(rr,{}),G(q,{sx:{height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`},children:G(q,{sx:{textAlign:`center`,color:`grey.500`},children:`No checks`})})]})}),G(q,{children:G(q,{sx:{height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`},children:G(jc,{})})})]})},Fc=()=>K(at,{style:{height:`100%`},minSize:50,sizes:[20,80],children:[G(q,{sx:{borderRight:`1px solid`,borderRightColor:Xn().palette.mode===`dark`?`grey.700`:`grey.300`,height:`100%`},style:{contain:`size`},children:G(q,{sx:{height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`},children:G(ir,{size:20})})}),G(q,{children:G(q,{sx:{height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`},children:G(ir,{size:20})})})]}),Ic={added:[`Model Added`,`Added resource`],removed:[`Model Removed`,`Removed resource`],modified:[`Model Modified`,`Modified resource`],col_added:[`Column Added`,`Added column`],col_removed:[`Column Removed`,`Removed column`],col_changed:[`Column Modified`,`Modified column`],folder_changed:[`Modified`,`Modified folder`]};function Lc(e){let t=String(Te(`colors.green.solid`)),n=String(Te(`colors.red.solid`)),r=String(Te(`colors.amber.emphasized`));return e===`added`?{color:t,icon:et}:e===`removed`?{color:n,icon:rt}:e===`modified`?{color:r,icon:Pt}:e===`col_added`?{color:t,icon:et}:e===`col_removed`?{color:n,icon:rt}:e===`col_changed`?{color:r,icon:Pt}:e===`folder_changed`?{color:r,icon:Ot}:{color:`inherit`,icon:void 0}}function Rc(e,t){let n=0,r=0,i=0;return!e&&!t?{adds:n,removes:r,modifies:i}:(t&&Object.keys(t.columns??{}).forEach(t=>{e?.columns?.[t]||n++}),e&&Object.keys(e.columns??{}).forEach(e=>{t?.columns?.[e]||r++}),t&&e&&Object.keys(t.columns??{}).forEach(n=>{e.columns&&t.columns?.[n]&&e.columns[n]&&e.columns[n].type!==t.columns[n].type&&i++}),{adds:n,removes:r,modifies:i})}function zc(e){let t=e.modifiedSet,n=0,r=0,i=0,a=0,o=0,s=0;return t.forEach(t=>{e.nodes[t].data.changeStatus===`added`?n++:e.nodes[t].data.changeStatus===`removed`?r++:e.nodes[t].data.changeStatus===`modified`&&i++;let c=e.nodes[t].data.change?.columns;if(c)for(let e of Object.values(c))e===`added`?a++:e===`removed`?o++:e===`modified`&&s++}),{adds:n,removes:r,modifies:i,col_added:a,col_removed:o,col_changed:s}}function Bc({name:e,value:t,tip:n}){return K(Y,{sx:{alignItems:`stretch`},children:[K(X,{sx:{fontSize:`0.875rem`,color:`grey.600`},children:[e,n&&G(Q,{title:n,children:G(q,{sx:{display:`inline-block`},children:G(q,{component:ki,sx:{mx:`2px`,fontSize:12,verticalAlign:`middle`}})})})]}),t]})}function Vc({changeStatus:e,value:t}){let[n]=e?Ic[e]:[``],{icon:r,color:i}=Lc(e);return K(Y,{sx:{alignItems:`stretch`},children:[K(Y,{direction:`row`,sx:{alignItems:`center`,fontSize:`0.875rem`,color:`grey.600`},children:[r&&G(q,{component:r,sx:{mr:`5px`,color:i,fontSize:`1rem`}}),n]}),G(X,{sx:{fontSize:`0.875rem`},children:t})]})}function Hc({lineageGraph:e}){let{adds:t,removes:n,modifies:r,col_added:i,col_removed:a,col_changed:o}=zc(e);return K(ta,{container:!0,sx:{mb:`10px`,borderTop:`1px solid`,borderColor:`divider`,p:`2.5vw`},children:[G(ta,{size:6,sx:{borderColor:`divider`},children:G(Bc,{name:`Code Changes`,value:K(ta,{container:!0,sx:{width:`100%`},children:[G(ta,{size:4,children:G(Vc,{changeStatus:`added`,value:t})}),G(ta,{size:4,children:G(Vc,{changeStatus:`removed`,value:n})}),G(ta,{size:4,children:G(Vc,{changeStatus:`modified`,value:r})})]})})}),G(ta,{size:6,sx:{borderLeft:`1px solid`,borderLeftColor:`divider`,pl:`12px`},children:G(Bc,{name:`Column Changes`,value:K(ta,{container:!0,sx:{width:`100%`},children:[G(ta,{size:4,children:G(Vc,{changeStatus:`col_added`,value:i})}),G(ta,{size:4,children:G(Vc,{changeStatus:`col_removed`,value:a})}),G(ta,{size:4,children:G(Vc,{changeStatus:`col_changed`,value:o})})]})})})]})}function Uc({node:e,...t}){let{apiClient:n}=B(),{data:r,isLoading:i}=An({queryKey:[`modelDetail`,e.id],queryFn:()=>u(e.id,n),enabled:!!n,staleTime:300*1e3}),a=r?.model;return K(sa,{sx:{maxWidth:500},children:[G(la,{title:G(X,{sx:{fontSize:18,fontWeight:`bold`},children:t.title}),subheader:K(Y,{direction:`row`,spacing:`8px`,sx:{p:`16px`},children:[G(yt,{resourceType:e.data.resourceType,materialized:e.data.materialized}),e.data.resourceType===`model`&&G(Uo,{node:e})]})}),G(ca,{children:G(q,{sx:{display:`flex`},children:i?G(Hi,{variant:`rectangular`,width:`100%`,height:100}):G(Ro,{base:a?.base&&Object.keys(a.base).length>0?{id:e.id,unique_id:e.id,name:e.data.name,...a.base}:void 0,current:a?.current&&Object.keys(a.current).length>0?{id:e.id,unique_id:e.id,name:e.data.name,...a.current}:void 0,columnChanges:e.data.change?.columns})})})]})}function Wc(e){let t=[],n=e.nodes;return e.modifiedSet.forEach(e=>{let r=n[e];r.data.change?.columns&&Object.keys(r.data.change.columns).length>0&&t.push(r)}),t}function Gc({lineageGraph:e}){let[t,n]=U([]);return Ln(()=>{n(Wc(e))},[e]),K(W,{children:[G(q,{sx:{width:`100%`,pb:`10px`,mb:`20px`,mt:`20px`},children:G(X,{variant:`h5`,sx:{fontSize:24},children:`Schema Summary`})}),G(q,{sx:{width:`100%`,pb:`10px`,mb:`20px`},children:t.length===0?G(X,{sx:{fontSize:18,color:`grey.600`},children:`No schema changes detected.`}):G(q,{sx:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(400px, 1fr))`,gap:`2vw`,p:`2.5vw`,width:`100%`,bgcolor:`lightgray`},children:t.map(e=>G(Uc,{title:e.data.name,node:e},e.id))})})]})}function Kc({checks:e,isLoading:t,error:n,selectedCheckId:r,onCheckSelect:i,onApprovalChange:a,onAction:o,onReorder:s,onDescriptionChange:c,onNameChange:l,onCreateCheck:u,getCheckTabs:d,getPrimaryActions:f,getSecondaryActions:p,disableApproval:m=!1,disabledApprovalTooltip:h,height:g=`100%`,listPaneSize:_=30,minListSize:v=200,maxListSize:y=500,listTitle:b,className:x}){let S=R(),C=e??S.checks,w=t===void 0?S.isLoading:t,T=n??S.error,E=r??S.selectedCheckId,D=i??S.onSelectCheck,O=H(()=>C.map(e=>({id:e.check_id,name:e.name,type:e.type,description:e.description,isApproved:e.is_checked})),[C]),k=H(()=>C.find(e=>e.check_id===E),[C,E]),ee=V(e=>{D?.(e)},[D]),te=V((e,t)=>{o?.(e,t)},[o]),A=V(e=>{E&&c?.(E,e)},[E,c]),ne=V(e=>{E&&l?.(E,e)},[E,l]);if(w)return G(q,{className:x,sx:{width:`100%`,height:g,display:`flex`,alignItems:`center`,justifyContent:`center`},children:G(ir,{})});if(T)return G(q,{className:x,sx:{width:`100%`,height:g,display:`flex`,alignItems:`center`,justifyContent:`center`},children:G(X,{color:`error`,children:T})});if(C.length===0)return G(q,{className:x,sx:{width:`100%`,height:g,display:`flex`,alignItems:`center`,justifyContent:`center`},children:G(Qe,{title:`No checks yet`,description:`Create your first check to start validating your data.`,actionText:`Create Check`,onAction:u})});let re=k?d?.(k):void 0,ie=k?f?.(k):void 0,j=k?p?.(k):void 0;return G(q,{className:x,sx:{width:`100%`,height:g},children:K(Dt,{direction:`horizontal`,sizes:[_,100-_],minSizes:[v,200],maxSizes:[y,1/0],children:[G(q,{sx:{height:`100%`,overflow:`auto`},children:G(Re,{checks:O,selectedId:E,onCheckSelect:ee,onApprovalChange:a,onReorder:s,disableApproval:m,disabledApprovalTooltip:h,title:b})}),G(q,{sx:{height:`100%`,overflow:`auto`},children:k?G(Ze,{checkId:k.check_id,name:k.name,type:k.type,description:k.description,isApproved:k.is_checked,tabs:re,primaryActions:ie,secondaryActions:j,onAction:te,onDescriptionChange:A,onNameChange:ne}):G(q,{sx:{height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:G(X,{sx:{color:`text.secondary`},children:`Select a check from the list to view details`})})})]})})}const qc=Fn(Kc);qc.displayName=`ChecksView`;const Jc=`0.2.0`;export{Ya as A,zo as C,Do as D,Oo as E,da as F,qa as M,ha as N,To as O,fa as P,Ro as S,Mo as T,Us as _,zc as a,$o as b,Ic as c,Nc as d,jc as f,mc as g,yc as h,Hc as i,Ja as j,Za as k,Fc as l,bc as m,qc as n,Rc as o,Oc as p,Gc as r,Lc as s,Jc as t,Pc as u,Fs as v,Po as w,Fo as x,_s as y};
|
|
12
|
-
//# sourceMappingURL=src-DJN3ojqS.js.map
|