recce 1.34.1__py3-none-any.whl → 1.35.1__py3-none-any.whl
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.
- recce/VERSION +1 -1
- recce/data/404/index.html +2 -2
- recce/data/404.html +2 -2
- recce/data/__next.@lineage.!KHNsb3Qp.__PAGE__.txt +2 -2
- recce/data/__next.@lineage.!KHNsb3Qp.txt +1 -1
- recce/data/__next.__PAGE__.txt +1 -1
- recce/data/__next._full.txt +9 -9
- recce/data/__next._head.txt +1 -1
- recce/data/__next._index.txt +5 -5
- recce/data/__next._tree.txt +1 -1
- recce/data/_next/static/chunks/0a923708f953a4d5.js +1 -0
- recce/data/_next/static/chunks/2001bbd020dd9677.js +1 -0
- recce/data/_next/static/chunks/2ca0ead49cd6e3d8.js +1 -0
- recce/data/_next/static/chunks/{7bb921acbf2d3876.js → 402515b96c6a6ab0.js} +44 -44
- recce/data/_next/static/chunks/{a30fe1ec4d0d0199.js → 5aca6207265dcd75.js} +8 -8
- recce/data/_next/static/chunks/{1bbfc841a3bbdeab.js → 8563e224cbc87121.js} +1 -1
- recce/data/_next/static/chunks/9b0af135176cb39a.js +72 -0
- recce/data/_next/static/chunks/{9469a701a796ba64.js → dd3c746dfbaa94c7.js} +2 -2
- recce/data/_next/static/chunks/{b491ab151a29aba2.js → e04b27771be44e58.js} +11 -11
- recce/data/_next/static/chunks/{5d86ee6b69e79ebd.js → fa00228e4374d59f.js} +1 -1
- recce/data/_not-found/__next._full.txt +6 -6
- recce/data/_not-found/__next._head.txt +1 -1
- recce/data/_not-found/__next._index.txt +5 -5
- recce/data/_not-found/__next._not-found.__PAGE__.txt +1 -1
- recce/data/_not-found/__next._not-found.txt +1 -1
- recce/data/_not-found/__next._tree.txt +1 -1
- recce/data/_not-found/index.html +2 -2
- recce/data/_not-found/index.txt +6 -6
- recce/data/checks/__next.@lineage.__DEFAULT__.txt +2 -2
- recce/data/checks/__next._full.txt +12 -12
- recce/data/checks/__next._head.txt +1 -1
- recce/data/checks/__next._index.txt +5 -5
- recce/data/checks/__next._tree.txt +1 -1
- recce/data/checks/__next.checks.__PAGE__.txt +2 -2
- recce/data/checks/__next.checks.txt +1 -1
- recce/data/checks/index.html +2 -2
- recce/data/checks/index.txt +12 -12
- recce/data/index.html +2 -2
- recce/data/index.txt +9 -9
- recce/data/lineage/__next.@lineage.__DEFAULT__.txt +2 -2
- recce/data/lineage/__next._full.txt +9 -9
- recce/data/lineage/__next._head.txt +1 -1
- recce/data/lineage/__next._index.txt +5 -5
- recce/data/lineage/__next._tree.txt +1 -1
- recce/data/lineage/__next.lineage.__PAGE__.txt +2 -2
- recce/data/lineage/__next.lineage.txt +1 -1
- recce/data/lineage/index.html +2 -2
- recce/data/lineage/index.txt +9 -9
- recce/data/query/__next.@lineage.__DEFAULT__.txt +2 -2
- recce/data/query/__next._full.txt +10 -10
- recce/data/query/__next._head.txt +1 -1
- recce/data/query/__next._index.txt +5 -5
- recce/data/query/__next._tree.txt +1 -1
- recce/data/query/__next.query.__PAGE__.txt +2 -2
- recce/data/query/__next.query.txt +1 -1
- recce/data/query/index.html +2 -2
- recce/data/query/index.txt +10 -10
- {recce-1.34.1.dist-info → recce-1.35.1.dist-info}/METADATA +2 -2
- {recce-1.34.1.dist-info → recce-1.35.1.dist-info}/RECORD +65 -66
- recce/data/_next/static/chunks/1c9a95df941df4af.js +0 -1
- recce/data/_next/static/chunks/49dd9a35f25a3c78.js +0 -1
- recce/data/_next/static/chunks/55f691775a443af1.js +0 -72
- recce/data/_next/static/chunks/c141122216926f40.js +0 -1
- recce/data/_next/static/chunks/dafbfe5da3f2c3e7.js +0 -1
- /recce/data/_next/static/{rRopaMiU51gUmORexSTEw → 5dYeWIYae9t1W2AtSUuur}/_buildManifest.js +0 -0
- /recce/data/_next/static/{rRopaMiU51gUmORexSTEw → 5dYeWIYae9t1W2AtSUuur}/_clientMiddlewareManifest.json +0 -0
- /recce/data/_next/static/{rRopaMiU51gUmORexSTEw → 5dYeWIYae9t1W2AtSUuur}/_ssgManifest.js +0 -0
- {recce-1.34.1.dist-info → recce-1.35.1.dist-info}/WHEEL +0 -0
- {recce-1.34.1.dist-info → recce-1.35.1.dist-info}/entry_points.txt +0 -0
- {recce-1.34.1.dist-info → recce-1.35.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,825036,(e,t,r)=>{t.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},826807,(e,t,r)=>{t.exports=e.g&&e.g.Object===Object&&e.g},528253,(e,t,r)=>{var n=e.r(826807),a="object"==typeof self&&self&&self.Object===Object&&self;t.exports=n||a||Function("return this")()},318359,(e,t,r)=>{var n=e.r(528253);t.exports=function(){return n.Date.now()}},919424,(e,t,r)=>{var n=/\s/;t.exports=function(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}},425390,(e,t,r)=>{var n=e.r(919424),a=/^\s+/;t.exports=function(e){return e?e.slice(0,n(e)+1).replace(a,""):e}},854057,(e,t,r)=>{t.exports=e.r(528253).Symbol},347466,(e,t,r)=>{var n=e.r(854057),a=Object.prototype,o=a.hasOwnProperty,i=a.toString,s=n?n.toStringTag:void 0;t.exports=function(e){var t=o.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var a=i.call(e);return n&&(t?e[s]=r:delete e[s]),a}},903830,(e,t,r)=>{var n=Object.prototype.toString;t.exports=function(e){return n.call(e)}},919490,(e,t,r)=>{var n=e.r(854057),a=e.r(347466),o=e.r(903830),i=n?n.toStringTag:void 0;t.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?a(e):o(e)}},423327,(e,t,r)=>{t.exports=function(e){return null!=e&&"object"==typeof e}},961322,(e,t,r)=>{var n=e.r(919490),a=e.r(423327);t.exports=function(e){return"symbol"==typeof e||a(e)&&"[object Symbol]"==n(e)}},914715,(e,t,r)=>{var n=e.r(425390),a=e.r(825036),o=e.r(961322),i=0/0,s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;t.exports=function(e){if("number"==typeof e)return e;if(o(e))return i;if(a(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=l.test(e);return r||c.test(e)?u(e.slice(2),r?2:8):s.test(e)?i:+e}},476293,(e,t,r)=>{var n=e.r(825036),a=e.r(318359),o=e.r(914715),i=Math.max,s=Math.min;t.exports=function(e,t,r){var l,c,u,d,f,h,p=0,m=!1,g=!1,x=!0;if("function"!=typeof e)throw TypeError("Expected a function");function y(t){var r=l,n=c;return l=c=void 0,p=t,d=e.apply(n,r)}function b(e){var r=e-h,n=e-p;return void 0===h||r>=t||r<0||g&&n>=u}function v(){var e,r,n,o=a();if(b(o))return j(o);f=setTimeout(v,(e=o-h,r=o-p,n=t-e,g?s(n,u-r):n))}function j(e){return(f=void 0,x&&l)?y(e):(l=c=void 0,d)}function C(){var e,r=a(),n=b(r);if(l=arguments,c=this,h=r,n){if(void 0===f)return p=e=h,f=setTimeout(v,t),m?y(e):d;if(g)return clearTimeout(f),f=setTimeout(v,t),y(h)}return void 0===f&&(f=setTimeout(v,t)),d}return t=o(t)||0,n(r)&&(m=!!r.leading,u=(g="maxWait"in r)?i(o(r.maxWait)||0,t):u,x="trailing"in r?!!r.trailing:x),C.cancel=function(){void 0!==f&&clearTimeout(f),p=0,l=h=c=f=void 0},C.flush=function(){return void 0===f?d:j(a())},C}},668707,(e,t,r)=>{var n=e.r(476293),a=e.r(825036);t.exports=function(e,t,r){var o=!0,i=!0;if("function"!=typeof e)throw TypeError("Expected a function");return a(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),n(e,t,{leading:o,maxWait:t,trailing:i})}},623416,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return l},searchParamsToUrlQuery:function(){return o},urlQueryToSearchParams:function(){return s}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});function o(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function i(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function s(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,i(e));else t.set(r,i(n));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},269963,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return c},urlObjectKeys:function(){return l}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(744066)._(e.r(623416)),i=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",a=e.pathname||"",s=e.hash||"",l=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),l&&"object"==typeof l&&(l=String(o.urlQueryToSearchParams(l)));let u=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==c?(c="//"+(c||""),a&&"/"!==a[0]&&(a="/"+a)):c||(c=""),s&&"#"!==s[0]&&(s="#"+s),u&&"?"!==u[0]&&(u="?"+u),a=a.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${a}${u}${s}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return s(e)}},205206,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return a}});let n=e.r(600943);function a(e,t){let r=(0,n.useRef)(null),a=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(r.current=o(e,n)),t&&(a.current=o(t,n))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},575610,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return x},MiddlewareNotFoundError:function(){return j},MissingStaticPage:function(){return v},NormalizeError:function(){return y},PageNotFoundError:function(){return b},SP:function(){return m},ST:function(){return g},WEB_VITALS:function(){return o},execOnce:function(){return i},getDisplayName:function(){return d},getLocationOrigin:function(){return c},getURL:function(){return u},isAbsoluteUrl:function(){return l},isResSent:function(){return f},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return C}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=["CLS","FCP","FID","INP","LCP","TTFB"];function i(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>s.test(e);function c(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function u(){let{href:e}=window.location,t=c();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return n}let m="u">typeof performance,g=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class x extends Error{}class y extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class v extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class j extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function C(e){return JSON.stringify({message:e.message,stack:e.stack})}},982195,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return o}});let n=e.r(575610),a=e.r(681285);function o(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,a.hasBasePath)(r.pathname)}catch(e){return!1}}},6731,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},493043,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return x},useLinkStatus:function(){return b}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(744066),i=e.r(991047),s=o._(e.r(600943)),l=e.r(269963),c=e.r(322142),u=e.r(205206),d=e.r(575610),f=e.r(74063);e.r(970437);let h=e.r(683748),p=e.r(982195),m=e.r(784936);function g(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}function x(t){var r;let n,a,o,[l,x]=(0,s.useOptimistic)(h.IDLE_LINK_STATUS),b=(0,s.useRef)(null),{href:v,as:j,children:C,prefetch:w=null,passHref:S,replace:k,shallow:T,scroll:O,onClick:_,onMouseEnter:M,onTouchStart:R,legacyBehavior:E=!1,onNavigate:I,ref:P,unstable_dynamicOnHover:A,...$}=t;n=C,E&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let z=s.default.useContext(c.AppRouterContext),D=!1!==w,L=!1!==w?null===(r=w)||"auto"===r?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,{href:F,as:q}=s.default.useMemo(()=>{let e=g(v);return{href:e,as:j?g(j):e}},[v,j]);if(E){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=s.default.Children.only(n)}let W=E?a&&"object"==typeof a&&a.ref:P,N=s.default.useCallback(e=>(null!==z&&(b.current=(0,h.mountLinkInstance)(e,F,z,L,D,x)),()=>{b.current&&((0,h.unmountLinkForCurrentNavigation)(b.current),b.current=null),(0,h.unmountPrefetchableInstance)(e)}),[D,F,z,L,x]),Q={ref:(0,u.useMergedRef)(N,W),onClick(t){E||"function"!=typeof _||_(t),E&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!z||t.defaultPrevented||function(t,r,n,a,o,i,l){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,p.isLocalURL)(r)){o&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(538087);s.default.startTransition(()=>{d(n||r,o?"replace":"push",i??!0,a.current)})}}(t,F,q,b,k,O,I)},onMouseEnter(e){E||"function"!=typeof M||M(e),E&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),z&&D&&(0,h.onNavigationIntent)(e.currentTarget,!0===A)},onTouchStart:function(e){E||"function"!=typeof R||R(e),E&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),z&&D&&(0,h.onNavigationIntent)(e.currentTarget,!0===A)}};return(0,d.isAbsoluteUrl)(q)?Q.href=q:E&&!S&&("a"!==a.type||"href"in a.props)||(Q.href=(0,f.addBasePath)(q)),o=E?s.default.cloneElement(a,Q):(0,i.jsx)("a",{...$,...Q,children:n}),(0,i.jsx)(y.Provider,{value:l,children:o})}e.r(6731);let y=(0,s.createContext)(h.IDLE_LINK_STATUS),b=()=>(0,s.useContext)(y);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},743410,(e,t,r)=>{var n=Object.prototype;t.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},718248,(e,t,r)=>{t.exports=function(e,t){return function(r){return e(t(r))}}},953374,(e,t,r)=>{t.exports=e.r(718248)(Object.keys,Object)},552945,(e,t,r)=>{var n=e.r(743410),a=e.r(953374),o=Object.prototype.hasOwnProperty;t.exports=function(e){if(!n(e))return a(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}},729495,(e,t,r)=>{var n=e.r(919490),a=e.r(825036);t.exports=function(e){if(!a(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},400500,(e,t,r)=>{t.exports=e.r(528253)["__core-js_shared__"]},320076,(e,t,r)=>{var n,a=e.r(400500),o=(n=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(e){return!!o&&o in e}},853215,(e,t,r)=>{var n=Function.prototype.toString;t.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},854465,(e,t,r)=>{var n=e.r(729495),a=e.r(320076),o=e.r(825036),i=e.r(853215),s=/^\[object .+?Constructor\]$/,l=Object.prototype,c=Function.prototype.toString,u=l.hasOwnProperty,d=RegExp("^"+c.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(e){return!(!o(e)||a(e))&&(n(e)?d:s).test(i(e))}},122720,(e,t,r)=>{t.exports=function(e,t){return null==e?void 0:e[t]}},783147,(e,t,r)=>{var n=e.r(854465),a=e.r(122720);t.exports=function(e,t){var r=a(e,t);return n(r)?r:void 0}},448213,(e,t,r)=>{t.exports=e.r(783147)(e.r(528253),"DataView")},202363,(e,t,r)=>{t.exports=e.r(783147)(e.r(528253),"Map")},637962,(e,t,r)=>{t.exports=e.r(783147)(e.r(528253),"Promise")},539227,(e,t,r)=>{t.exports=e.r(783147)(e.r(528253),"Set")},968768,(e,t,r)=>{t.exports=e.r(783147)(e.r(528253),"WeakMap")},488480,(e,t,r)=>{var n=e.r(448213),a=e.r(202363),o=e.r(637962),i=e.r(539227),s=e.r(968768),l=e.r(919490),c=e.r(853215),u="[object Map]",d="[object Promise]",f="[object Set]",h="[object WeakMap]",p="[object DataView]",m=c(n),g=c(a),x=c(o),y=c(i),b=c(s),v=l;(n&&v(new n(new ArrayBuffer(1)))!=p||a&&v(new a)!=u||o&&v(o.resolve())!=d||i&&v(new i)!=f||s&&v(new s)!=h)&&(v=function(e){var t=l(e),r="[object Object]"==t?e.constructor:void 0,n=r?c(r):"";if(n)switch(n){case m:return p;case g:return u;case x:return d;case y:return f;case b:return h}return t}),t.exports=v},35501,(e,t,r)=>{var n=e.r(919490),a=e.r(423327);t.exports=function(e){return a(e)&&"[object Arguments]"==n(e)}},490330,(e,t,r)=>{var n=e.r(35501),a=e.r(423327),o=Object.prototype,i=o.hasOwnProperty,s=o.propertyIsEnumerable;t.exports=n(function(){return arguments}())?n:function(e){return a(e)&&i.call(e,"callee")&&!s.call(e,"callee")}},828729,(e,t,r)=>{t.exports=Array.isArray},981785,(e,t,r)=>{t.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}},750761,(e,t,r)=>{var n=e.r(729495),a=e.r(981785);t.exports=function(e){return null!=e&&a(e.length)&&!n(e)}},730687,(e,t,r)=>{t.exports=function(){return!1}},739996,(e,t,r)=>{var n=e.r(528253),a=e.r(730687),o=r&&!r.nodeType&&r,i=o&&t&&!t.nodeType&&t,s=i&&i.exports===o?n.Buffer:void 0;t.exports=(s?s.isBuffer:void 0)||a},15268,(e,t,r)=>{var n=e.r(919490),a=e.r(981785),o=e.r(423327),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,t.exports=function(e){return o(e)&&a(e.length)&&!!i[n(e)]}},26479,(e,t,r)=>{t.exports=function(e){return function(t){return e(t)}}},667880,(e,t,r)=>{var n=e.r(826807),a=r&&!r.nodeType&&r,o=a&&t&&!t.nodeType&&t,i=o&&o.exports===a&&n.process;t.exports=function(){try{var e=o&&o.require&&o.require("util").types;if(e)return e;return i&&i.binding&&i.binding("util")}catch(e){}}()},667606,(e,t,r)=>{var n=e.r(15268),a=e.r(26479),o=e.r(667880),i=o&&o.isTypedArray;t.exports=i?a(i):n},149813,(e,t,r)=>{var n=e.r(552945),a=e.r(488480),o=e.r(490330),i=e.r(828729),s=e.r(750761),l=e.r(739996),c=e.r(743410),u=e.r(667606),d=Object.prototype.hasOwnProperty;t.exports=function(e){if(null==e)return!0;if(s(e)&&(i(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||u(e)||o(e)))return!e.length;var t=a(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!n(e).length;for(var r in e)if(d.call(e,r))return!1;return!0}},889276,e=>{"use strict";var t=e.i(991047),r=e.i(98340),n=e.i(600943),a=(e,t,r,n,a,o,i,s)=>{let l=document.documentElement,c=["light","dark"];function u(t){var r;(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,n=r&&o?a.map(e=>o[e]||e):a;r?(l.classList.remove(...n),l.classList.add(o&&o[t]?o[t]:t)):l.setAttribute(e,t)}),r=t,s&&c.includes(r)&&(l.style.colorScheme=r)}if(n)u(n);else try{let e=localStorage.getItem(t)||r,n=i&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;u(n)}catch(e){}},o=["light","dark"],i="(prefers-color-scheme: dark)",s="u"<typeof window,l=n.createContext(void 0),c={setTheme:e=>{},themes:[]},u=()=>{var e;return null!=(e=n.useContext(l))?e:c},d=e=>n.useContext(l)?n.createElement(n.Fragment,null,e.children):n.createElement(h,{...e}),f=["light","dark"],h=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:r=!0,enableColorScheme:a=!0,storageKey:s="theme",themes:c=f,defaultTheme:u=r?"system":"light",attribute:d="data-theme",value:h,children:y,nonce:b,scriptProps:v})=>{let[j,C]=n.useState(()=>m(s,u)),[w,S]=n.useState(()=>"system"===j?x():j),k=h?Object.values(h):c,T=n.useCallback(e=>{let n=e;if(!n)return;"system"===e&&r&&(n=x());let i=h?h[n]:n,s=t?g(b):null,l=document.documentElement,c=e=>{"class"===e?(l.classList.remove(...k),i&&l.classList.add(i)):e.startsWith("data-")&&(i?l.setAttribute(e,i):l.removeAttribute(e))};if(Array.isArray(d)?d.forEach(c):c(d),a){let e=o.includes(u)?u:null,t=o.includes(n)?n:e;l.style.colorScheme=t}null==s||s()},[b]),O=n.useCallback(e=>{let t="function"==typeof e?e(j):e;C(t);try{localStorage.setItem(s,t)}catch(e){}},[j]),_=n.useCallback(t=>{S(x(t)),"system"===j&&r&&!e&&T("system")},[j,e]);n.useEffect(()=>{let e=window.matchMedia(i);return e.addListener(_),_(e),()=>e.removeListener(_)},[_]),n.useEffect(()=>{let e=e=>{e.key===s&&(e.newValue?C(e.newValue):O(u))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[O]),n.useEffect(()=>{T(null!=e?e:j)},[e,j]);let M=n.useMemo(()=>({theme:j,setTheme:O,forcedTheme:e,resolvedTheme:"system"===j?w:j,themes:r?[...c,"system"]:c,systemTheme:r?w:void 0}),[j,O,e,w,r,c]);return n.createElement(l.Provider,{value:M},n.createElement(p,{forcedTheme:e,storageKey:s,attribute:d,enableSystem:r,enableColorScheme:a,defaultTheme:u,value:h,themes:c,nonce:b,scriptProps:v}),y)},p=n.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:o,enableColorScheme:i,defaultTheme:s,value:l,themes:c,nonce:u,scriptProps:d})=>{let f=JSON.stringify([r,t,s,e,c,l,o,i]).slice(1,-1);return n.createElement("script",{...d,suppressHydrationWarning:!0,nonce:"u"<typeof window?u:"",dangerouslySetInnerHTML:{__html:`(${a.toString()})(${f})`}})}),m=(e,t)=>{let r;if(!s){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},g=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},x=e=>(e||(e=window.matchMedia(i)),e.matches?"dark":"light"),y=e.i(987562);let b=0,v=!1,j=null;async function C(e){if(Date.now()-b<3e3||v)return!1;try{return v=!0,await e.post("/api/keep-alive"),b=Date.now(),j&&j(b),!0}catch(e){return window.RECCE_DEBUG_IDLE&&console.log("[Keep-Alive] Failed to send",{error:e instanceof Error?e.message:String(e),timestamp:new Date().toISOString(),willRetryOnNextActivity:!0}),!1}finally{v=!1}}var w=e.i(837510);let S=(0,n.createContext)(void 0);var k=e.i(752036),T=e.i(668707);let O=k.default.create();function _(e,t){window.RECCE_DEBUG_IDLE&&(t?console.log(e,t):console.log(e))}let M=["focus","mousemove","keydown","scroll"];function R({children:e}){let{data:r}=(0,w.useRecceInstanceInfo)(),a=(0,n.useRef)(Date.now()),[o,i]=(0,n.useState)(null),[s,l]=(0,n.useState)(!1),c=r?.idle_timeout??null,u=null!==c&&c>0,d=(0,n.useRef)(u);(0,n.useEffect)(()=>{d.current=u},[u]),(0,n.useEffect)(()=>{if(!u)return void(j=null);j=e=>{d.current&&(a.current=e)};let e=b;return e>0&&(a.current=e),()=>{j=null}},[u]);let f=(0,n.useCallback)(()=>{l(!0)},[]),h=(0,n.useCallback)(()=>{l(!1),a.current=Date.now()},[]);return(0,n.useEffect)(()=>{if(!u||null===c)return void i(null);if(s)return;let e=()=>{i(Math.max(0,c-(Date.now()-a.current)/1e3))};e();let t=setInterval(e,1e3);return()=>{clearInterval(t)}},[u,c,s]),(0,t.jsxs)(S.Provider,{value:{remainingSeconds:o,idleTimeout:c,isEnabled:u,setDisconnected:f,resetConnection:h,isDisconnected:s},children:[(0,t.jsx)(E,{}),e]})}function E(){return!function(){let{data:e,isLoading:t,isError:r}=(0,w.useRecceInstanceInfo)(),a=(0,n.useContext)(S)??null,o=a?.isDisconnected??!1,i=(0,y.useApiConfigOptional)(),s=i?.apiClient??O,l=e?.idle_timeout,c=void 0!==l&&l>0&&!o;_("[Idle Detection] Instance info",{isLoading:t,isError:r,hasIdleTimeout:void 0!==l,idleTimeout:void 0!==l?`${l}s`:"not configured",isDisconnected:o,isEnabled:c});let u=(0,n.useCallback)(async()=>{document.hidden||await C(s)&&_("[Idle Detection] Keep-alive sent successfully",{timestamp:new Date().toISOString()})},[s]),d=(0,n.useCallback)(e=>{c&&!document.hidden&&(_("[Idle Detection] Activity detected",{event:e.type,tabActive:!document.hidden}),u())},[c,u]),f=(0,n.useCallback)(()=>{c&&(document.hidden||(_("[Idle Detection] Tab became active",{timestamp:new Date().toISOString()}),u()))},[c,u]),h=(0,n.useMemo)(()=>(0,T.default)(d,150,{leading:!0,trailing:!0}),[d]);(0,n.useEffect)(()=>c?(_("[Idle Detection] Initialized",{enabled:!0,idleTimeout:`${l}s`,eventThrottle:"150ms",apiThrottle:"3s (axios layer)",monitoredEvents:M.join(", ")}),M.forEach(e=>{window.addEventListener(e,h,{passive:!0})}),document.addEventListener("visibilitychange",f),()=>{_("[Idle Detection] Cleanup - removing event listeners"),M.forEach(e=>{window.removeEventListener(e,h)}),document.removeEventListener("visibilitychange",f),h.cancel()}):void _("[Idle Detection] Disabled",{idleTimeout:l,reason:void 0===l?"idle_timeout not configured on server":0===l?"idle_timeout is 0":"disconnected"}),[c,h,f,l])}(),null}function I(){let e=(0,n.useContext)(S);if(!e)throw Error("useIdleTimeout must be used within IdleTimeoutProvider");return e}var P=e.i(457918),A=e.i(809608),$=e.i(242397),z=e.i(936016),D=e.i(107276),L=e.i(3792),F=e.i(700196),q=e.i(601328),W=e.i(367745),N=e.i(955371),Q=e.i(493043),K=e.i(652011),H=e.i(70800),B=e.i(763123),U=e.i(543723),G=e.i(353251),V=e.i(633921);function J({connect:e,idleSeconds:r}){let n=null!=r&&r>0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(F.default,{children:"Server Disconnected"}),(0,t.jsx)(L.default,{children:n?(0,t.jsxs)(W.default,{children:["The server has been idle for ",(0,V.formatDuration)(r)," and was automatically stopped. Please restart the Recce server to continue."]}):(0,t.jsx)(W.default,{children:"The server connection has been lost. Please restart the Recce server and try again."})}),(0,t.jsx)(D.default,{children:(0,t.jsx)($.default,{color:"iochmara",variant:"contained",onClick:()=>{e()},children:"Retry"})})]})}function X({shareUrl:e,mode:r,supportCalendarUrl:n,LinkComponent:a}){let o={"read only":{title:"Share Instance Expired",body:"This Share Instance has expired. Please restart the share instance.",action:"Restart",link:e},"metadata only":{title:"Preview Instance Expired",body:"This Preview Instance has expired. To browse more, please book a meeting with us.",action:"Contact us",link:n}}[r],i=(0,t.jsx)($.default,{color:"iochmara",variant:"contained",children:o.action});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(F.default,{children:o.title}),(0,t.jsx)(L.default,{children:(0,t.jsx)(W.default,{children:o.body})}),(0,t.jsx)(D.default,{children:"read only"===r?a?(0,t.jsx)(a,{href:o.link,children:i}):(0,t.jsx)("a",{href:o.link,children:i}):(0,t.jsx)($.default,{color:"iochmara",variant:"contained",onClick:()=>window.open(o.link,"_blank"),children:o.action})})]})}var Y=e.i(708241),Z=e.i(458874),ee=e.i(280490),et=e.i(616191),er=e.i(211363),en=e.i(307215),ea=e.i(861291);function eo({children:e}){let{idleTimeout:a,remainingSeconds:o,isEnabled:i,setDisconnected:s,resetConnection:l}=I(),{apiClient:c,apiPrefix:u,baseUrl:d}=(0,ea.useApiConfig)(),f=(0,N.useQuery)({queryKey:B.cacheKeys.lineage(),queryFn:()=>(0,U.getServerInfo)(c)}),h=(0,N.useQuery)({queryKey:B.cacheKeys.runsAggregated(),queryFn:()=>(0,H.aggregateRuns)(c)}),p=(0,n.useMemo)(()=>{let e=f.data?.lineage;if(e?.base)return(0,Z.buildLineageGraph)(e.base,e.current,e.diff)},[f.data]),m=f.error?.message,{state_metadata:g,lineage:x,sqlmesh:y,demo:b,codespace:v,review_mode:j,cloud_mode:C,file_mode:w,filename:S,adapter_type:k,git:T,pull_request:O,support_tasks:_}=f.data??{demo:!1},M=x?.base.manifest_metadata,R=x?.current.manifest_metadata,{connectionStatus:E,connect:A,envStatus:V}=function({enabled:e=!0,baseUrl:t,apiPrefix:a}={}){let[o,i]=(0,n.useState)(void 0),s=(0,n.useRef)({ws:void 0,status:"pending",artifactsUpdatedToastId:void 0}),[l,c]=(0,n.useState)(e?"pending":"connected"),[u,d]=(0,n.useState)(void 0);(0,n.useEffect)(()=>{s.current.status=l},[l]),(0,n.useEffect)(()=>{s.current.artifactsUpdatedToastId=o},[o]);let f=(0,r.useQueryClient)(),h=(0,n.useCallback)(()=>{f.invalidateQueries({queryKey:B.cacheKeys.lineage()}),f.invalidateQueries({queryKey:B.cacheKeys.checks()}),f.invalidateQueries({queryKey:B.cacheKeys.runs()})},[f]),p=(0,n.useCallback)(()=>{let e=t??en.PUBLIC_API_URL,r=a?`${a}/ws`:"/api/ws",n=new WebSocket(`${e.replace(/(http)(s)?:\/\//,"ws$2://")}${r}`);s.current.ws=n,n.onopen=()=>{n.send("ping")},n.onmessage=e=>{if("pong"===e.data){"disconnected"===s.current.status&&h(),c("connected");return}try{let t=JSON.parse(e.data);if("refresh"===t.command){let{eventType:e,srcPath:r}=t.event,[n,a]=r.split("/").slice(-2),o=a.replace(/\.[^/.]+$/,""),l=`${n}-${o}-${e}`;null==s.current.artifactsUpdatedToastId&&i(Y.toaster.create({id:l,description:`Detected ${n} ${o} ${e}`,type:"info",duration:5e3,closable:!0})),h()}else if("relaunch"===t.command)d("relaunch");else{let{id:e,title:r,description:n,status:a,duration:o}=t.event;i(Y.toaster.create({id:e||"broadcast",title:r,description:n,type:a??"info",duration:o??5e3,closable:!0}))}}catch(e){console.error(e)}},n.onerror=e=>{console.error("An error occurred during Handling WebSockets",e)},n.onclose=()=>{c(e=>"connected"===e?"disconnected":e),s.current.ws=void 0}},[h,t,a]);return(0,n.useEffect)(()=>{if(!e)return;let t=s.current;return p(),()=>{t.ws&&t.ws.close()}},[p,e]),{connectionStatus:l,connect:p,envStatus:u}}({enabled:!0,baseUrl:d,apiPrefix:u});(0,n.useEffect)(()=>{"disconnected"===E?s():"connected"===E&&l()},[E,s,l]);let{data:eo,isLoading:ei}=(0,et.useRecceServerFlag)(),{featureToggles:es,shareUrl:el}=(0,P.useRecceInstanceContext)(),[ec,eu]=(0,n.useState)(!1),[ed,ef]=(0,n.useState)(!1),eh=(0,r.useQueryClient)(),ep=!ei&&"relaunch"===V&&eo?.single_env_onboarding===!0&&eo.show_relaunch_hint;ep!==ed&&(ef(ep),eu(ep)),(0,n.useEffect)(()=>{ep&&ec&&(0,er.trackSingleEnvironment)({action:"target_base_added"})},[ep,ec]);let em=()=>{eu(!1),(0,G.markRelaunchHintCompleted)(c),eh.invalidateQueries({queryKey:B.cacheKeys.flag()})},eg=(0,n.useCallback)(()=>{h.refetch()},[h]),ex=(0,n.useCallback)(()=>{h.refetch()},[h]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ee.LineageGraphProvider,{lineageGraph:p,envInfo:{stateMetadata:g,adapterType:k,git:T,pullRequest:O,dbt:{base:M,current:R},sqlmesh:y},reviewMode:j,cloudMode:C,fileMode:w,fileName:S,isDemoSite:b??!1,isCodespace:v,isLoading:f.isLoading,error:m,supportTasks:_,onRefetchLineageGraph:eg,runsAggregated:h.data,onRefetchRunsAggregated:ex,children:e}),(0,t.jsx)(z.default,{open:"disconnected"===E,onClose:()=>void 0,children:el&&null!==es.mode?(0,t.jsx)(X,{shareUrl:el,mode:es.mode,supportCalendarUrl:en.RECCE_SUPPORT_CALENDAR_URL,LinkComponent:({href:e,children:r})=>(0,t.jsx)(Q.default,{href:e,passHref:!0,children:r})}):(0,t.jsx)(J,{connect:A,idleSeconds:i&&null!==a&&null!==o&&o<=5?a-Math.max(0,o):void 0})}),eo?.single_env_onboarding&&(0,t.jsxs)(z.default,{open:ec,onClose:em,children:[(0,t.jsx)(F.default,{children:"Target-base Added"}),(0,t.jsx)(q.default,{"aria-label":"close",onClick:em,sx:{position:"absolute",right:8,top:8,color:"grey.500"},children:(0,t.jsx)(K.IoClose,{})}),(0,t.jsx)(L.default,{children:(0,t.jsx)(W.default,{children:"Please restart the Recce server."})}),(0,t.jsx)(D.default,{children:(0,t.jsx)($.default,{color:"iochmara",variant:"contained",onClick:em,children:"Got it!"})})]})]})}var ei=e.i(854535),es=e.i(174734),el=e.i(286791),ec=e.i(492192),eu=e.i(283276),ed=e.i(572537),ef=e.i(760437),eh=e.i(721394);let ep=({size:e=16})=>(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,t.jsx)("path",{d:"M12 16v-4"}),(0,t.jsx)("path",{d:"M12 8h.01"})]});function em({isOpen:e,onClose:r,onExecute:a,type:o,title:i,params:s,RunForm:l,onCancel:c,onExecuteClick:u,documentationUrl:d,InfoIcon:f=ep}){let[h,p]=(0,n.useState)(s??{}),[m,g]=(0,n.useState)(null),[x,y]=(0,n.useState)(!1),b=(0,n.useRef)(!1),v=()=>{b.current||c?.(),b.current=!1,r()};return(0,t.jsxs)(z.default,{open:e,onClose:v,maxWidth:"sm",fullWidth:!0,scroll:"paper",slotProps:{paper:{sx:{height:"75%",minHeight:"400px"}}},children:[(0,t.jsxs)(F.default,{sx:{display:"flex",alignItems:"center"},children:[i," ",d&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(q.default,{size:"small","aria-label":"Click this button to learn more about the SQL behind",onMouseEnter:e=>g(e.currentTarget),onMouseLeave:()=>g(null),onClick:()=>window.open(d,"_blank"),children:(0,t.jsx)(eu.default,{component:f,sx:{fontSize:"16px"}})}),(0,t.jsx)(ef.default,{open:!!m,anchorEl:m,onClose:()=>g(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},disableRestoreFocus:!0,sx:{pointerEvents:"none"},slotProps:{paper:{sx:{bgcolor:"black",color:"white",p:1}}},children:(0,t.jsxs)(W.default,{sx:{fontSize:"0.875rem"},children:["Click"," ",(0,t.jsx)(ed.default,{href:d,target:"_blank",sx:{textDecoration:"underline",color:"white","&:hover":{color:"iochmara.300"}},children:"here"})," ","to learn more about the SQL behind"]})})]})]}),(0,t.jsx)(q.default,{"aria-label":"close",onClick:v,sx:{position:"absolute",right:8,top:8,color:"grey.500"},children:(0,t.jsx)(K.IoClose,{})}),(0,t.jsx)(L.default,{sx:{p:0,overflow:"auto",borderTop:"1px solid",borderBottom:"1px solid",borderColor:"divider"},children:(0,t.jsx)(eu.default,{sx:{contain:"layout"},children:l&&(0,t.jsx)(l,{params:h,onParamsChanged:p,setIsReadyToExecute:y})})}),(0,t.jsx)(D.default,{children:(0,t.jsx)(eh.default,{direction:"row",spacing:"10px",children:(0,t.jsx)($.default,{disabled:!x,color:"iochmara",variant:"contained",onClick:()=>{b.current=!0,u?.(),a(o,h)},children:"Execute"})})})]})}function eg({isOpen:e,onClose:r,onExecute:n,type:a,title:o,params:i,initialRun:s,RunForm:l}){return(0,t.jsx)(em,{isOpen:e,onClose:r,onExecute:n,type:a,title:o,params:i,initialRun:s,RunForm:l,onCancel:()=>{(0,er.isExploreAction)(a)&&(0,er.trackExploreActionForm)({action:a,event:er.EXPLORE_FORM_EVENT.CANCEL})},onExecuteClick:()=>{(0,er.isExploreAction)(a)&&(0,er.trackExploreActionForm)({action:a,event:er.EXPLORE_FORM_EVENT.EXECUTE})},documentationUrl:{value_diff:"https://docs.datarecce.io/features/lineage/#value-diff",profile_diff:"https://docs.datarecce.io/features/lineage/#profile-diff",histogram_diff:"https://docs.datarecce.io/features/lineage/#histogram-diff",top_k_diff:"https://docs.datarecce.io/features/lineage/#top-k-diff"}[a]||null,InfoIcon:ec.PiInfo})}var ex=e.i(968287),ey=e.i(983740);function eb({children:e}){let a,{apiClient:o}=(0,ea.useApiConfig)(),[i,s]=(0,n.useState)(),[l,c]=(0,n.useState)(!1),u=(0,n.useCallback)(()=>c(!0),[]),d=(0,n.useCallback)(()=>c(!1),[]),f=(0,es.useRouter)(),h=(0,es.usePathname)(),p=(0,r.useQueryClient)(),{basePath:m}=(0,ey.useRouteConfig)(),g=(0,n.useRef)(null);a=(0,es.usePathname)(),(0,n.useEffect)(()=>{d()},[d,a]);let x=(0,n.useCallback)(async(e,t)=>{!1!==t&&await p.invalidateQueries({queryKey:B.cacheKeys.runs()})},[p]),y=(0,n.useCallback)(async(e,t,r)=>{try{let n,a=new Date().getTime().toString();if(r?.showLast){let r=await (0,H.searchRuns)(e,t,1,o);1===r.length&&(n=r[0])}let i=(0,el.findByRunType)(e),l=i.RunResultView,{title:c,RunForm:d}=i;if(void 0===l)throw Error(`Run type ${e} does not have a result view`);if(void 0===d||!r?.showForm){let{run_id:n}=await (0,H.submitRun)(e,t,{nowait:!0,trackProps:r?.trackProps},o);await p.invalidateQueries({queryKey:B.cacheKeys.runs()}),g.current&&g.current(n),h.startsWith("/lineage")&&f.push(`${m}/lineage`);return}s({session:a,title:c,type:e,params:t,lastRun:n,options:r,RunForm:d}),u();return}catch(e){Y.toaster.create({title:"Failed to submit a run",description:e instanceof Error?e.message:void 0,type:"error",duration:5e3,closable:!0});return}},[u,p,o,h,f,m]),b=(0,n.useCallback)(async(e,t)=>{try{d();let{run_id:r}=await (0,H.submitRun)(e,t,{nowait:!0,trackProps:i?.options?.trackProps},o);g.current&&g.current(r)}catch(e){Y.toaster.create({title:"Failed to submit a run",description:e instanceof Error?e.message:void 0,type:"error",duration:5e3,closable:!0})}},[d,i?.options?.trackProps,o]);return(0,t.jsxs)(ex.RecceActionProvider,{onRunAction:y,onShowRunId:x,children:[(0,t.jsx)(ev,{showRunIdRef:g,children:e}),i&&(0,t.jsx)(eg,{isOpen:l,onClose:d,onExecute:b,title:i.title,type:i.type,params:i.params,initialRun:i.lastRun,RunForm:i.options?.showForm&&i.RunForm?i.RunForm:void 0},i.session)]})}function ev({children:e,showRunIdRef:r}){let{showRunId:a}=(0,ex.useRecceActionContext)();return(0,n.useEffect)(()=>(r.current=a,()=>{r.current=null}),[a,r]),(0,t.jsx)(t.Fragment,{children:e})}var ej=e.i(12606);function eC({children:e}){return(0,t.jsx)(P.RecceInstanceInfoProvider,{children:(0,t.jsx)(ej.RecceShareStateContextProvider,{children:(0,t.jsx)(ei.QueryContextAdapter,{children:(0,t.jsx)(eo,{children:(0,t.jsx)(eb,{children:(0,t.jsx)(A.CheckContextAdapter,{children:e})})})})})})}var ew=e.i(766271),eS=e.i(959243),ek=e.i(259864),eT=e.i(578889),eO=class extends eT.Subscribable{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){let n=t.queryKey,a=t.queryHash??(0,ew.hashQueryKeyByOptions)(n,t),o=this.get(a);return o||(o=new eS.Query({client:e,queryKey:n,queryHash:a,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(n)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ek.notifyManager.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,ew.matchQuery)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,ew.matchQuery)(e,t)):t}notify(e){ek.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ek.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ek.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},e_=e.i(51449),eM=eT,eR=class extends eM.Subscribable{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#r=new Map,this.#n=0}#t;#r;#n;build(e,t,r){let n=new e_.Mutation({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){this.#t.add(e);let t=eE(e);if("string"==typeof t){let r=this.#r.get(t);r?r.push(e):this.#r.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){let t=eE(e);if("string"==typeof t){let r=this.#r.get(t);if(r)if(r.length>1){let t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&this.#r.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=eE(e);if("string"!=typeof t)return!0;{let r=this.#r.get(t),n=r?.find(e=>"pending"===e.state.status);return!n||n===e}}runNext(e){let t=eE(e);if("string"!=typeof t)return Promise.resolve();{let r=this.#r.get(t)?.find(t=>t!==e&&t.state.isPaused);return r?.continue()??Promise.resolve()}}clear(){ek.notifyManager.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#r.clear()})}getAll(){return Array.from(this.#t)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,ew.matchMutation)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,ew.matchMutation)(e,t))}notify(e){ek.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return ek.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(ew.noop))))}};function eE(e){return e.options.scope?.id}var eI=e.i(82679),eP=e.i(60045);function eA(e){return{onFetch:(t,r)=>{let n=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],i=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},l=0,c=async()=>{let r=!1,c=(0,ew.ensureQueryFn)(t.options,t.fetchOptions),u=async(e,n,a)=>{let o;if(r)return Promise.reject();if(null==n&&e.pages.length)return Promise.resolve(e);let i=(o={client:t.client,queryKey:t.queryKey,pageParam:n,direction:a?"backward":"forward",meta:t.options.meta},(0,ew.addConsumeAwareSignal)(o,()=>t.signal,()=>r=!0),o),s=await c(i),{maxPages:l}=t.options,u=a?ew.addToStart:ew.addToEnd;return{pages:u(e.pages,s,l),pageParams:u(e.pageParams,n,l)}};if(a&&o.length){let e="backward"===a,t={pages:o,pageParams:i},r=(e?function(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}:e$)(n,t);s=await u(t,r,e)}else{let t=e??o.length;do{let e=0===l?i[0]??n.initialPageParam:e$(n,s);if(l>0&&null==e)break;s=await u(s,e),l++}while(l<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=c}}}function e$(e,{pages:t,pageParams:r}){let n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}let ez=new class{#a;#o;#i;#s;#l;#c;#u;#d;constructor(e={}){this.#a=e.queryCache||new eO,this.#o=e.mutationCache||new eR,this.#i=e.defaultOptions||{},this.#s=new Map,this.#l=new Map,this.#c=0}mount(){this.#c++,1===this.#c&&(this.#u=eI.focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#a.onFocus())}),this.#d=eP.onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#a.onOnline())}))}unmount(){this.#c--,0===this.#c&&(this.#u?.(),this.#u=void 0,this.#d?.(),this.#d=void 0)}isFetching(e){return this.#a.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#o.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#a.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=this.#a.build(this,t),n=r.state.data;return void 0===n?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime((0,ew.resolveStaleTime)(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return this.#a.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){let n=this.defaultQueryOptions({queryKey:e}),a=this.#a.get(n.queryHash),o=a?.state.data,i=(0,ew.functionalUpdate)(t,o);if(void 0!==i)return this.#a.build(this,n).setData(i,{...r,manual:!0})}setQueriesData(e,t,r){return ek.notifyManager.batch(()=>this.#a.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#a.get(t.queryHash)?.state}removeQueries(e){let t=this.#a;ek.notifyManager.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let r=this.#a;return ek.notifyManager.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let r={revert:!0,...t};return Promise.all(ek.notifyManager.batch(()=>this.#a.findAll(e).map(e=>e.cancel(r)))).then(ew.noop).catch(ew.noop)}invalidateQueries(e,t={}){return ek.notifyManager.batch(()=>(this.#a.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let r={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(ek.notifyManager.batch(()=>this.#a.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(ew.noop)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(ew.noop)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let r=this.#a.build(this,t);return r.isStaleByTime((0,ew.resolveStaleTime)(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ew.noop).catch(ew.noop)}fetchInfiniteQuery(e){return e.behavior=eA(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ew.noop).catch(ew.noop)}ensureInfiniteQueryData(e){return e.behavior=eA(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return eP.onlineManager.isOnline()?this.#o.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#a}getMutationCache(){return this.#o}getDefaultOptions(){return this.#i}setDefaultOptions(e){this.#i=e}setQueryDefaults(e,t){this.#s.set((0,ew.hashKey)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#s.values()],r={};return t.forEach(t=>{(0,ew.partialMatchKey)(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){this.#l.set((0,ew.hashKey)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#l.values()],r={};return t.forEach(t=>{(0,ew.partialMatchKey)(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#i.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,ew.hashQueryKeyByOptions)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ew.skipToken&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#i.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#a.clear(),this.#o.clear()}};e.i(139507);var eD=e.i(57803),eL=e.i(138961);let eF="function"==typeof(0,eD.globalCss)({}),eq=(e,t=!1)=>{let r={};t&&e.colorSchemes&&"function"==typeof e.getColorSchemeSelector&&Object.entries(e.colorSchemes).forEach(([t,n])=>{let a=e.getColorSchemeSelector(t);a.startsWith("@")?r[a]={":root":{colorScheme:n.palette?.mode}}:r[a.replace(/\s*&/,"")]={colorScheme:n.palette?.mode}});let n={html:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...t&&!e.vars&&{colorScheme:e.palette.mode}},"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...{color:(e.vars||e).palette.text.primary,...e.typography.body1,backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}},"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...r},a=e.components?.MuiCssBaseline?.styleOverrides;return a&&(n=[n,a]),n},eW="mui-ecs",eN=(0,eD.globalCss)(eF?({theme:e,enableColorScheme:t})=>eq(e,t):({theme:e})=>{let t,r;return r=Array.isArray(t=eq(e,!1))?t[0]:t,!e.vars&&r&&(r.html[`:root:has(${eW})`]={colorScheme:e.palette.mode}),e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([t,n])=>{let a=e.getColorSchemeSelector(t);a.startsWith("@")?r[a]={[`:root:not(:has(.${eW}))`]:{colorScheme:n.palette?.mode}}:r[a.replace(/\s*&/,"")]={[`&:not(:has(.${eW}))`]:{colorScheme:n.palette?.mode}}}),t}),eQ=function(e){let{children:r,enableColorScheme:a=!1}=(0,eL.useDefaultProps)({props:e,name:"MuiCssBaseline"});return(0,t.jsxs)(n.Fragment,{children:[eF&&(0,t.jsx)(eN,{enableColorScheme:a}),!eF&&!a&&(0,t.jsx)("span",{className:eW,style:{display:"none"}}),r]})},eK=n.createContext(null);function eH(){return n.useContext(eK)}let eB="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",eU=function(e){let{children:r,theme:a}=e,o=eH(),i=n.useMemo(()=>{var e,t;let r=null===o?{...a}:(e=o,"function"==typeof(t=a)?t(e):{...e,...t});return null!=r&&(r[eB]=null!==o),r},[a,o]);return(0,t.jsx)(eK.Provider,{value:i,children:r})};var eG=e.i(547607),eV=e.i(527488),eJ=e.i(942711),eX=e.i(592634),eY=e.i(514934),eZ=e.i(455832),e0=e.i(516304);let e1={};function e5(e,t,r,a=!1){return n.useMemo(()=>{let n=e&&t[e]||t;if("function"==typeof r){let o=r(n),i=e?{...t,[e]:o}:o;return a?()=>i:i}return e?{...t,[e]:r}:{...t,...r}},[e,t,r,a])}let e2=function(e){let{children:r,theme:n,themeId:a}=e,o=(0,eV.default)(e1),i=eH()||e1,s=e5(a,o,n),l=e5(a,i,n,!0),c="rtl"===(a?s[a]:s).direction,u=function(e){let r=(0,eV.default)(),n=(0,eZ.default)()||"",{modularCssLayers:a}=e,o="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return(o=a&&null===r?"string"==typeof a?a.replace(/mui(?!\.)/g,o):`@layer ${o};`:"",(0,eY.default)(()=>{let e=document.querySelector("head");if(!e)return;let t=e.firstChild;if(o){if(t&&t.hasAttribute?.("data-mui-layer-order")&&t.getAttribute("data-mui-layer-order")===n)return;let r=document.createElement("style");r.setAttribute("data-mui-layer-order",n),r.textContent=o,e.prepend(r)}else e.querySelector(`style[data-mui-layer-order="${n}"]`)?.remove()},[o,n]),o)?(0,t.jsx)(e0.default,{styles:o}):null}(s);return(0,t.jsx)(eU,{theme:l,children:(0,t.jsx)(eG.ThemeContext.Provider,{value:s,children:(0,t.jsx)(eJ.default,{value:c,children:(0,t.jsxs)(eX.default,{value:a?s[a].components:s.components,children:[u,r]})})})})};var e6=e.i(75400);function e8({theme:e,...r}){let n=e6.default in e?e[e6.default]:void 0;return(0,t.jsx)(e2,{...r,themeId:n?e6.default:void 0,theme:n||e})}var e4=e.i(274105),e3=e.i(316571);let e7="mode",e9="color-scheme";function te(){}let tt=({key:e,storageWindow:t})=>(!t&&"u">typeof window&&(t=window),{get(r){let n;if("u">typeof window){if(!t)return r;try{n=t.localStorage.getItem(e)}catch{}return n||r}},set:r=>{if(t)try{t.localStorage.setItem(e,r)}catch{}},subscribe:r=>{if(!t)return te;let n=t=>{let n=t.newValue;t.key===e&&r(n)};return t.addEventListener("storage",n),()=>{t.removeEventListener("storage",n)}}});function tr(){}function tn(e){if("u">typeof window&&"function"==typeof window.matchMedia&&"system"===e)return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function ta(e,t){return"light"===e.mode||"system"===e.mode&&"light"===e.systemMode?t("light"):"dark"===e.mode||"system"===e.mode&&"dark"===e.systemMode?t("dark"):void 0}var to=e.i(779788),ti=e.i(327556);let{CssVarsProvider:ts,useColorScheme:tl,getInitColorSchemeScript:tc}=function(e){let{themeId:r,theme:a={},modeStorageKey:o=e7,colorSchemeStorageKey:i=e9,disableTransitionOnChange:s=!1,defaultColorScheme:l,resolveTheme:c}=e,u={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},d=n.createContext(void 0),f={},h={},p="string"==typeof l?l:l.light,m="string"==typeof l?l:l.dark;return{CssVarsProvider:function(e){let{children:u,theme:p,modeStorageKey:m=o,colorSchemeStorageKey:g=i,disableTransitionOnChange:x=s,storageManager:y,storageWindow:b="u"<typeof window?void 0:window,documentNode:v="u"<typeof document?void 0:document,colorSchemeNode:j="u"<typeof document?void 0:document.documentElement,disableNestedContext:C=!1,disableStyleSheetGeneration:w=!1,defaultMode:S="system",forceThemeRerender:k=!1,noSsr:T}=e,O=n.useRef(!1),_=eH(),M=n.useContext(d),R=!!M&&!C,E=n.useMemo(()=>p||("function"==typeof a?a():a),[p]),I=E[r],P=I||E,{colorSchemes:A=f,components:$=h,cssVarPrefix:z}=P,D=Object.keys(A).filter(e=>!!A[e]).join(","),L=n.useMemo(()=>D.split(","),[D]),F="string"==typeof l?l:l.light,q="string"==typeof l?l:l.dark,W=A[F]&&A[q]?S:A[P.defaultColorScheme]?.palette?.mode||P.palette?.mode,{mode:N,setMode:Q,systemMode:K,lightColorScheme:H,darkColorScheme:B,colorScheme:U,setColorScheme:G}=function(e){let{defaultMode:t="light",defaultLightColorScheme:r,defaultDarkColorScheme:a,supportedColorSchemes:o=[],modeStorageKey:i=e7,colorSchemeStorageKey:s=e9,storageWindow:l="u"<typeof window?void 0:window,storageManager:c=tt,noSsr:u=!1}=e,d=o.join(","),f=o.length>1,h=n.useMemo(()=>c?.({key:i,storageWindow:l}),[c,i,l]),p=n.useMemo(()=>c?.({key:`${s}-light`,storageWindow:l}),[c,s,l]),m=n.useMemo(()=>c?.({key:`${s}-dark`,storageWindow:l}),[c,s,l]),[g,x]=n.useState(()=>{let e=h?.get(t)||t,n=p?.get(r)||r,o=m?.get(a)||a;return{mode:e,systemMode:tn(e),lightColorScheme:n,darkColorScheme:o}}),[y,b]=n.useState(u||!f);n.useEffect(()=>{b(!0)},[]);let v=ta(g,e=>"light"===e?g.lightColorScheme:"dark"===e?g.darkColorScheme:void 0),j=n.useCallback(e=>{x(r=>{if(e===r.mode)return r;let n=e??t;return h?.set(n),{...r,mode:n,systemMode:tn(n)}})},[h,t]),C=n.useCallback(e=>{e?"string"==typeof e?e&&!d.includes(e)?console.error(`\`${e}\` does not exist in \`theme.colorSchemes\`.`):x(t=>{let r={...t};return ta(t,t=>{"light"===t&&(p?.set(e),r.lightColorScheme=e),"dark"===t&&(m?.set(e),r.darkColorScheme=e)}),r}):x(t=>{let n={...t},o=null===e.light?r:e.light,i=null===e.dark?a:e.dark;return o&&(d.includes(o)?(n.lightColorScheme=o,p?.set(o)):console.error(`\`${o}\` does not exist in \`theme.colorSchemes\`.`)),i&&(d.includes(i)?(n.darkColorScheme=i,m?.set(i)):console.error(`\`${i}\` does not exist in \`theme.colorSchemes\`.`)),n}):x(e=>(p?.set(r),m?.set(a),{...e,lightColorScheme:r,darkColorScheme:a}))},[d,p,m,r,a]),w=n.useCallback(e=>{"system"===g.mode&&x(t=>{let r=e?.matches?"dark":"light";return t.systemMode===r?t:{...t,systemMode:r}})},[g.mode]),S=n.useRef(w);return S.current=w,n.useEffect(()=>{if("function"!=typeof window.matchMedia||!f)return;let e=(...e)=>S.current(...e),t=window.matchMedia("(prefers-color-scheme: dark)");return t.addListener(e),e(t),()=>{t.removeListener(e)}},[f]),n.useEffect(()=>{if(f){let e=h?.subscribe(e=>{(!e||["light","dark","system"].includes(e))&&j(e||t)})||tr,r=p?.subscribe(e=>{(!e||d.match(e))&&C({light:e})})||tr,n=m?.subscribe(e=>{(!e||d.match(e))&&C({dark:e})})||tr;return()=>{e(),r(),n()}}},[C,j,d,t,l,f,h,p,m]),{...g,mode:y?g.mode:void 0,systemMode:y?g.systemMode:void 0,colorScheme:y?v:void 0,setMode:j,setColorScheme:C}}({supportedColorSchemes:L,defaultLightColorScheme:F,defaultDarkColorScheme:q,modeStorageKey:m,colorSchemeStorageKey:g,defaultMode:W,storageManager:y,storageWindow:b,noSsr:T}),V=N,J=U;R&&(V=M.mode,J=M.colorScheme);let X=J||P.defaultColorScheme;P.vars&&!k&&(X=P.defaultColorScheme);let Y=n.useMemo(()=>{let e=P.generateThemeVars?.()||P.vars,t={...P,components:$,colorSchemes:A,cssVarPrefix:z,vars:e};if("function"==typeof t.generateSpacing&&(t.spacing=t.generateSpacing()),X){let e=A[X];e&&"object"==typeof e&&Object.keys(e).forEach(r=>{e[r]&&"object"==typeof e[r]?t[r]={...t[r],...e[r]}:t[r]=e[r]})}return c?c(t):t},[P,X,$,A,z]),Z=P.colorSchemeSelector;(0,eY.default)(()=>{if(J&&j&&Z&&"media"!==Z){let e=Z;if("class"===Z&&(e=".%s"),"data"===Z&&(e="[data-%s]"),Z?.startsWith("data-")&&!Z.includes("%s")&&(e=`[${Z}="%s"]`),e.startsWith("."))j.classList.remove(...L.map(t=>e.substring(1).replace("%s",t))),j.classList.add(e.substring(1).replace("%s",J));else{let t=e.replace("%s",J).match(/\[([^\]]+)\]/);if(t){let[e,r]=t[1].split("=");r||L.forEach(t=>{j.removeAttribute(e.replace(J,t))}),j.setAttribute(e,r?r.replace(/"|'/g,""):"")}else j.setAttribute(e,J)}}},[J,Z,j,L]),n.useEffect(()=>{let e;if(x&&O.current&&v){let t=v.createElement("style");t.appendChild(v.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),v.head.appendChild(t),window.getComputedStyle(v.body),e=setTimeout(()=>{v.head.removeChild(t)},1)}return()=>{clearTimeout(e)}},[J,x,v]),n.useEffect(()=>(O.current=!0,()=>{O.current=!1}),[]);let ee=n.useMemo(()=>({allColorSchemes:L,colorScheme:J,darkColorScheme:B,lightColorScheme:H,mode:V,setColorScheme:G,setMode:Q,systemMode:K}),[L,J,B,H,V,G,Q,K,Y.colorSchemeSelector]),et=!0;(w||!1===P.cssVariables||R&&_?.cssVarPrefix===z)&&(et=!1);let er=(0,t.jsxs)(n.Fragment,{children:[(0,t.jsx)(e2,{themeId:I?r:void 0,theme:Y,children:u}),et&&(0,t.jsx)(e3.GlobalStyles,{styles:Y.generateStyleSheets?.()||[]})]});return R?er:(0,t.jsx)(d.Provider,{value:ee,children:er})},useColorScheme:()=>n.useContext(d)||u,getInitColorSchemeScript:e=>(function(e){let{defaultMode:r="system",defaultLightColorScheme:n="light",defaultDarkColorScheme:a="dark",modeStorageKey:o=e7,colorSchemeStorageKey:i=e9,attribute:s="data-color-scheme",colorSchemeNode:l="document.documentElement",nonce:c}=e||{},u="",d=s;if("class"===s&&(d=".%s"),"data"===s&&(d="[data-%s]"),d.startsWith(".")){let e=d.substring(1);u+=`${l}.classList.remove('${e}'.replace('%s', light), '${e}'.replace('%s', dark));
|
|
2
|
-
${
|
|
3
|
-
${
|
|
4
|
-
${
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,825036,(e,t,r)=>{t.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},826807,(e,t,r)=>{t.exports=e.g&&e.g.Object===Object&&e.g},528253,(e,t,r)=>{var n=e.r(826807),a="object"==typeof self&&self&&self.Object===Object&&self;t.exports=n||a||Function("return this")()},318359,(e,t,r)=>{var n=e.r(528253);t.exports=function(){return n.Date.now()}},919424,(e,t,r)=>{var n=/\s/;t.exports=function(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}},425390,(e,t,r)=>{var n=e.r(919424),a=/^\s+/;t.exports=function(e){return e?e.slice(0,n(e)+1).replace(a,""):e}},854057,(e,t,r)=>{t.exports=e.r(528253).Symbol},347466,(e,t,r)=>{var n=e.r(854057),a=Object.prototype,o=a.hasOwnProperty,i=a.toString,l=n?n.toStringTag:void 0;t.exports=function(e){var t=o.call(e,l),r=e[l];try{e[l]=void 0;var n=!0}catch(e){}var a=i.call(e);return n&&(t?e[l]=r:delete e[l]),a}},903830,(e,t,r)=>{var n=Object.prototype.toString;t.exports=function(e){return n.call(e)}},919490,(e,t,r)=>{var n=e.r(854057),a=e.r(347466),o=e.r(903830),i=n?n.toStringTag:void 0;t.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?a(e):o(e)}},423327,(e,t,r)=>{t.exports=function(e){return null!=e&&"object"==typeof e}},961322,(e,t,r)=>{var n=e.r(919490),a=e.r(423327);t.exports=function(e){return"symbol"==typeof e||a(e)&&"[object Symbol]"==n(e)}},914715,(e,t,r)=>{var n=e.r(425390),a=e.r(825036),o=e.r(961322),i=0/0,l=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;t.exports=function(e){if("number"==typeof e)return e;if(o(e))return i;if(a(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=s.test(e);return r||c.test(e)?u(e.slice(2),r?2:8):l.test(e)?i:+e}},476293,(e,t,r)=>{var n=e.r(825036),a=e.r(318359),o=e.r(914715),i=Math.max,l=Math.min;t.exports=function(e,t,r){var s,c,u,d,f,h,p=0,m=!1,g=!1,x=!0;if("function"!=typeof e)throw TypeError("Expected a function");function y(t){var r=s,n=c;return s=c=void 0,p=t,d=e.apply(n,r)}function b(e){var r=e-h,n=e-p;return void 0===h||r>=t||r<0||g&&n>=u}function v(){var e,r,n,o=a();if(b(o))return j(o);f=setTimeout(v,(e=o-h,r=o-p,n=t-e,g?l(n,u-r):n))}function j(e){return(f=void 0,x&&s)?y(e):(s=c=void 0,d)}function C(){var e,r=a(),n=b(r);if(s=arguments,c=this,h=r,n){if(void 0===f)return p=e=h,f=setTimeout(v,t),m?y(e):d;if(g)return clearTimeout(f),f=setTimeout(v,t),y(h)}return void 0===f&&(f=setTimeout(v,t)),d}return t=o(t)||0,n(r)&&(m=!!r.leading,u=(g="maxWait"in r)?i(o(r.maxWait)||0,t):u,x="trailing"in r?!!r.trailing:x),C.cancel=function(){void 0!==f&&clearTimeout(f),p=0,s=h=c=f=void 0},C.flush=function(){return void 0===f?d:j(a())},C}},668707,(e,t,r)=>{var n=e.r(476293),a=e.r(825036);t.exports=function(e,t,r){var o=!0,i=!0;if("function"!=typeof e)throw TypeError("Expected a function");return a(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),n(e,t,{leading:o,maxWait:t,trailing:i})}},623416,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return s},searchParamsToUrlQuery:function(){return o},urlQueryToSearchParams:function(){return l}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});function o(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function i(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function l(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,i(e));else t.set(r,i(n));return t}function s(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},269963,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return l},formatWithValidation:function(){return c},urlObjectKeys:function(){return s}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(744066)._(e.r(623416)),i=/https?|ftp|gopher|file/;function l(e){let{auth:t,hostname:r}=e,n=e.protocol||"",a=e.pathname||"",l=e.hash||"",s=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),s&&"object"==typeof s&&(s=String(o.urlQueryToSearchParams(s)));let u=e.search||s&&`?${s}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==c?(c="//"+(c||""),a&&"/"!==a[0]&&(a="/"+a)):c||(c=""),l&&"#"!==l[0]&&(l="#"+l),u&&"?"!==u[0]&&(u="?"+u),a=a.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${a}${u}${l}`}let s=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return l(e)}},205206,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return a}});let n=e.r(600943);function a(e,t){let r=(0,n.useRef)(null),a=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(r.current=o(e,n)),t&&(a.current=o(t,n))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},575610,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return x},MiddlewareNotFoundError:function(){return j},MissingStaticPage:function(){return v},NormalizeError:function(){return y},PageNotFoundError:function(){return b},SP:function(){return m},ST:function(){return g},WEB_VITALS:function(){return o},execOnce:function(){return i},getDisplayName:function(){return d},getLocationOrigin:function(){return c},getURL:function(){return u},isAbsoluteUrl:function(){return s},isResSent:function(){return f},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return C}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=["CLS","FCP","FID","INP","LCP","TTFB"];function i(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let l=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,s=e=>l.test(e);function c(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function u(){let{href:e}=window.location,t=c();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return n}let m="u">typeof performance,g=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class x extends Error{}class y extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class v extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class j extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function C(e){return JSON.stringify({message:e.message,stack:e.stack})}},982195,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return o}});let n=e.r(575610),a=e.r(681285);function o(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,a.hasBasePath)(r.pathname)}catch(e){return!1}}},6731,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},493043,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return x},useLinkStatus:function(){return b}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(744066),i=e.r(991047),l=o._(e.r(600943)),s=e.r(269963),c=e.r(322142),u=e.r(205206),d=e.r(575610),f=e.r(74063);e.r(970437);let h=e.r(683748),p=e.r(982195),m=e.r(784936);function g(e){return"string"==typeof e?e:(0,s.formatUrl)(e)}function x(t){var r;let n,a,o,[s,x]=(0,l.useOptimistic)(h.IDLE_LINK_STATUS),b=(0,l.useRef)(null),{href:v,as:j,children:C,prefetch:w=null,passHref:S,replace:k,shallow:O,scroll:T,onClick:_,onMouseEnter:M,onTouchStart:R,legacyBehavior:E=!1,onNavigate:I,ref:P,unstable_dynamicOnHover:A,...$}=t;n=C,E&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let z=l.default.useContext(c.AppRouterContext),D=!1!==w,L=!1!==w?null===(r=w)||"auto"===r?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,{href:F,as:q}=l.default.useMemo(()=>{let e=g(v);return{href:e,as:j?g(j):e}},[v,j]);if(E){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=l.default.Children.only(n)}let W=E?a&&"object"==typeof a&&a.ref:P,N=l.default.useCallback(e=>(null!==z&&(b.current=(0,h.mountLinkInstance)(e,F,z,L,D,x)),()=>{b.current&&((0,h.unmountLinkForCurrentNavigation)(b.current),b.current=null),(0,h.unmountPrefetchableInstance)(e)}),[D,F,z,L,x]),Q={ref:(0,u.useMergedRef)(N,W),onClick(t){E||"function"!=typeof _||_(t),E&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!z||t.defaultPrevented||function(t,r,n,a,o,i,s){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,p.isLocalURL)(r)){o&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),s){let e=!1;if(s({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(538087);l.default.startTransition(()=>{d(n||r,o?"replace":"push",i??!0,a.current)})}}(t,F,q,b,k,T,I)},onMouseEnter(e){E||"function"!=typeof M||M(e),E&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),z&&D&&(0,h.onNavigationIntent)(e.currentTarget,!0===A)},onTouchStart:function(e){E||"function"!=typeof R||R(e),E&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),z&&D&&(0,h.onNavigationIntent)(e.currentTarget,!0===A)}};return(0,d.isAbsoluteUrl)(q)?Q.href=q:E&&!S&&("a"!==a.type||"href"in a.props)||(Q.href=(0,f.addBasePath)(q)),o=E?l.default.cloneElement(a,Q):(0,i.jsx)("a",{...$,...Q,children:n}),(0,i.jsx)(y.Provider,{value:s,children:o})}e.r(6731);let y=(0,l.createContext)(h.IDLE_LINK_STATUS),b=()=>(0,l.useContext)(y);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},743410,(e,t,r)=>{var n=Object.prototype;t.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},718248,(e,t,r)=>{t.exports=function(e,t){return function(r){return e(t(r))}}},953374,(e,t,r)=>{t.exports=e.r(718248)(Object.keys,Object)},552945,(e,t,r)=>{var n=e.r(743410),a=e.r(953374),o=Object.prototype.hasOwnProperty;t.exports=function(e){if(!n(e))return a(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}},729495,(e,t,r)=>{var n=e.r(919490),a=e.r(825036);t.exports=function(e){if(!a(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},400500,(e,t,r)=>{t.exports=e.r(528253)["__core-js_shared__"]},320076,(e,t,r)=>{var n,a=e.r(400500),o=(n=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(e){return!!o&&o in e}},853215,(e,t,r)=>{var n=Function.prototype.toString;t.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},854465,(e,t,r)=>{var n=e.r(729495),a=e.r(320076),o=e.r(825036),i=e.r(853215),l=/^\[object .+?Constructor\]$/,s=Object.prototype,c=Function.prototype.toString,u=s.hasOwnProperty,d=RegExp("^"+c.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(e){return!(!o(e)||a(e))&&(n(e)?d:l).test(i(e))}},122720,(e,t,r)=>{t.exports=function(e,t){return null==e?void 0:e[t]}},783147,(e,t,r)=>{var n=e.r(854465),a=e.r(122720);t.exports=function(e,t){var r=a(e,t);return n(r)?r:void 0}},448213,(e,t,r)=>{t.exports=e.r(783147)(e.r(528253),"DataView")},202363,(e,t,r)=>{t.exports=e.r(783147)(e.r(528253),"Map")},637962,(e,t,r)=>{t.exports=e.r(783147)(e.r(528253),"Promise")},539227,(e,t,r)=>{t.exports=e.r(783147)(e.r(528253),"Set")},968768,(e,t,r)=>{t.exports=e.r(783147)(e.r(528253),"WeakMap")},488480,(e,t,r)=>{var n=e.r(448213),a=e.r(202363),o=e.r(637962),i=e.r(539227),l=e.r(968768),s=e.r(919490),c=e.r(853215),u="[object Map]",d="[object Promise]",f="[object Set]",h="[object WeakMap]",p="[object DataView]",m=c(n),g=c(a),x=c(o),y=c(i),b=c(l),v=s;(n&&v(new n(new ArrayBuffer(1)))!=p||a&&v(new a)!=u||o&&v(o.resolve())!=d||i&&v(new i)!=f||l&&v(new l)!=h)&&(v=function(e){var t=s(e),r="[object Object]"==t?e.constructor:void 0,n=r?c(r):"";if(n)switch(n){case m:return p;case g:return u;case x:return d;case y:return f;case b:return h}return t}),t.exports=v},35501,(e,t,r)=>{var n=e.r(919490),a=e.r(423327);t.exports=function(e){return a(e)&&"[object Arguments]"==n(e)}},490330,(e,t,r)=>{var n=e.r(35501),a=e.r(423327),o=Object.prototype,i=o.hasOwnProperty,l=o.propertyIsEnumerable;t.exports=n(function(){return arguments}())?n:function(e){return a(e)&&i.call(e,"callee")&&!l.call(e,"callee")}},828729,(e,t,r)=>{t.exports=Array.isArray},981785,(e,t,r)=>{t.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}},750761,(e,t,r)=>{var n=e.r(729495),a=e.r(981785);t.exports=function(e){return null!=e&&a(e.length)&&!n(e)}},730687,(e,t,r)=>{t.exports=function(){return!1}},739996,(e,t,r)=>{var n=e.r(528253),a=e.r(730687),o=r&&!r.nodeType&&r,i=o&&t&&!t.nodeType&&t,l=i&&i.exports===o?n.Buffer:void 0;t.exports=(l?l.isBuffer:void 0)||a},15268,(e,t,r)=>{var n=e.r(919490),a=e.r(981785),o=e.r(423327),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,t.exports=function(e){return o(e)&&a(e.length)&&!!i[n(e)]}},26479,(e,t,r)=>{t.exports=function(e){return function(t){return e(t)}}},667880,(e,t,r)=>{var n=e.r(826807),a=r&&!r.nodeType&&r,o=a&&t&&!t.nodeType&&t,i=o&&o.exports===a&&n.process;t.exports=function(){try{var e=o&&o.require&&o.require("util").types;if(e)return e;return i&&i.binding&&i.binding("util")}catch(e){}}()},667606,(e,t,r)=>{var n=e.r(15268),a=e.r(26479),o=e.r(667880),i=o&&o.isTypedArray;t.exports=i?a(i):n},149813,(e,t,r)=>{var n=e.r(552945),a=e.r(488480),o=e.r(490330),i=e.r(828729),l=e.r(750761),s=e.r(739996),c=e.r(743410),u=e.r(667606),d=Object.prototype.hasOwnProperty;t.exports=function(e){if(null==e)return!0;if(l(e)&&(i(e)||"string"==typeof e||"function"==typeof e.splice||s(e)||u(e)||o(e)))return!e.length;var t=a(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!n(e).length;for(var r in e)if(d.call(e,r))return!1;return!0}},889276,e=>{"use strict";var t=e.i(991047),r=e.i(98340),n=e.i(600943),a=(e,t,r,n,a,o,i,l)=>{let s=document.documentElement,c=["light","dark"];function u(t){var r;(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,n=r&&o?a.map(e=>o[e]||e):a;r?(s.classList.remove(...n),s.classList.add(o&&o[t]?o[t]:t)):s.setAttribute(e,t)}),r=t,l&&c.includes(r)&&(s.style.colorScheme=r)}if(n)u(n);else try{let e=localStorage.getItem(t)||r,n=i&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;u(n)}catch(e){}},o=["light","dark"],i="(prefers-color-scheme: dark)",l="u"<typeof window,s=n.createContext(void 0),c={setTheme:e=>{},themes:[]},u=()=>{var e;return null!=(e=n.useContext(s))?e:c},d=e=>n.useContext(s)?n.createElement(n.Fragment,null,e.children):n.createElement(h,{...e}),f=["light","dark"],h=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:r=!0,enableColorScheme:a=!0,storageKey:l="theme",themes:c=f,defaultTheme:u=r?"system":"light",attribute:d="data-theme",value:h,children:y,nonce:b,scriptProps:v})=>{let[j,C]=n.useState(()=>m(l,u)),[w,S]=n.useState(()=>"system"===j?x():j),k=h?Object.values(h):c,O=n.useCallback(e=>{let n=e;if(!n)return;"system"===e&&r&&(n=x());let i=h?h[n]:n,l=t?g(b):null,s=document.documentElement,c=e=>{"class"===e?(s.classList.remove(...k),i&&s.classList.add(i)):e.startsWith("data-")&&(i?s.setAttribute(e,i):s.removeAttribute(e))};if(Array.isArray(d)?d.forEach(c):c(d),a){let e=o.includes(u)?u:null,t=o.includes(n)?n:e;s.style.colorScheme=t}null==l||l()},[b]),T=n.useCallback(e=>{let t="function"==typeof e?e(j):e;C(t);try{localStorage.setItem(l,t)}catch(e){}},[j]),_=n.useCallback(t=>{S(x(t)),"system"===j&&r&&!e&&O("system")},[j,e]);n.useEffect(()=>{let e=window.matchMedia(i);return e.addListener(_),_(e),()=>e.removeListener(_)},[_]),n.useEffect(()=>{let e=e=>{e.key===l&&(e.newValue?C(e.newValue):T(u))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[T]),n.useEffect(()=>{O(null!=e?e:j)},[e,j]);let M=n.useMemo(()=>({theme:j,setTheme:T,forcedTheme:e,resolvedTheme:"system"===j?w:j,themes:r?[...c,"system"]:c,systemTheme:r?w:void 0}),[j,T,e,w,r,c]);return n.createElement(s.Provider,{value:M},n.createElement(p,{forcedTheme:e,storageKey:l,attribute:d,enableSystem:r,enableColorScheme:a,defaultTheme:u,value:h,themes:c,nonce:b,scriptProps:v}),y)},p=n.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:o,enableColorScheme:i,defaultTheme:l,value:s,themes:c,nonce:u,scriptProps:d})=>{let f=JSON.stringify([r,t,l,e,c,s,o,i]).slice(1,-1);return n.createElement("script",{...d,suppressHydrationWarning:!0,nonce:"u"<typeof window?u:"",dangerouslySetInnerHTML:{__html:`(${a.toString()})(${f})`}})}),m=(e,t)=>{let r;if(!l){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},g=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},x=e=>(e||(e=window.matchMedia(i)),e.matches?"dark":"light"),y=e.i(987562);let b=0,v=!1,j=null;async function C(e){if(Date.now()-b<3e3||v)return!1;try{return v=!0,await e.post("/api/keep-alive"),b=Date.now(),j&&j(b),!0}catch(e){return window.RECCE_DEBUG_IDLE&&console.log("[Keep-Alive] Failed to send",{error:e instanceof Error?e.message:String(e),timestamp:new Date().toISOString(),willRetryOnNextActivity:!0}),!1}finally{v=!1}}var w=e.i(837510);let S=(0,n.createContext)(void 0);var k=e.i(752036),O=e.i(668707);let T=k.default.create();function _(e,t){window.RECCE_DEBUG_IDLE&&(t?console.log(e,t):console.log(e))}let M=["focus","mousemove","keydown","scroll"];function R({children:e}){let{data:r}=(0,w.useRecceInstanceInfo)(),a=(0,n.useRef)(Date.now()),[o,i]=(0,n.useState)(null),[l,s]=(0,n.useState)(!1),c=r?.idle_timeout??null,u=null!==c&&c>0,d=(0,n.useRef)(u);(0,n.useEffect)(()=>{d.current=u},[u]),(0,n.useEffect)(()=>{if(!u)return void(j=null);j=e=>{d.current&&(a.current=e)};let e=b;return e>0&&(a.current=e),()=>{j=null}},[u]);let f=(0,n.useCallback)(()=>{s(!0)},[]),h=(0,n.useCallback)(()=>{s(!1),a.current=Date.now()},[]);return(0,n.useEffect)(()=>{if(!u||null===c)return void i(null);if(l)return;let e=()=>{i(Math.max(0,c-(Date.now()-a.current)/1e3))};e();let t=setInterval(e,1e3);return()=>{clearInterval(t)}},[u,c,l]),(0,t.jsxs)(S.Provider,{value:{remainingSeconds:o,idleTimeout:c,isEnabled:u,setDisconnected:f,resetConnection:h,isDisconnected:l},children:[(0,t.jsx)(E,{}),e]})}function E(){return!function(){let{data:e,isLoading:t,isError:r}=(0,w.useRecceInstanceInfo)(),a=(0,n.useContext)(S)??null,o=a?.isDisconnected??!1,i=(0,y.useApiConfigOptional)(),l=i?.apiClient??T,s=e?.idle_timeout,c=void 0!==s&&s>0&&!o;_("[Idle Detection] Instance info",{isLoading:t,isError:r,hasIdleTimeout:void 0!==s,idleTimeout:void 0!==s?`${s}s`:"not configured",isDisconnected:o,isEnabled:c});let u=(0,n.useCallback)(async()=>{document.hidden||await C(l)&&_("[Idle Detection] Keep-alive sent successfully",{timestamp:new Date().toISOString()})},[l]),d=(0,n.useCallback)(e=>{c&&!document.hidden&&(_("[Idle Detection] Activity detected",{event:e.type,tabActive:!document.hidden}),u())},[c,u]),f=(0,n.useCallback)(()=>{c&&(document.hidden||(_("[Idle Detection] Tab became active",{timestamp:new Date().toISOString()}),u()))},[c,u]),h=(0,n.useMemo)(()=>(0,O.default)(d,150,{leading:!0,trailing:!0}),[d]);(0,n.useEffect)(()=>c?(_("[Idle Detection] Initialized",{enabled:!0,idleTimeout:`${s}s`,eventThrottle:"150ms",apiThrottle:"3s (axios layer)",monitoredEvents:M.join(", ")}),M.forEach(e=>{window.addEventListener(e,h,{passive:!0})}),document.addEventListener("visibilitychange",f),()=>{_("[Idle Detection] Cleanup - removing event listeners"),M.forEach(e=>{window.removeEventListener(e,h)}),document.removeEventListener("visibilitychange",f),h.cancel()}):void _("[Idle Detection] Disabled",{idleTimeout:s,reason:void 0===s?"idle_timeout not configured on server":0===s?"idle_timeout is 0":"disconnected"}),[c,h,f,s])}(),null}function I(){let e=(0,n.useContext)(S);if(!e)throw Error("useIdleTimeout must be used within IdleTimeoutProvider");return e}var P=e.i(457918),A=e.i(809608),$=e.i(242397),z=e.i(936016),D=e.i(107276),L=e.i(3792),F=e.i(700196),q=e.i(601328),W=e.i(367745),N=e.i(955371),Q=e.i(493043),K=e.i(652011),H=e.i(70800),B=e.i(763123),U=e.i(543723),G=e.i(353251),V=e.i(633921);function J({connect:e,idleSeconds:r}){let n=null!=r&&r>0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(F.default,{children:"Server Disconnected"}),(0,t.jsx)(L.default,{children:n?(0,t.jsxs)(W.default,{children:["The server has been idle for ",(0,V.formatDuration)(r)," and was automatically stopped. Please restart the Recce server to continue."]}):(0,t.jsx)(W.default,{children:"The server connection has been lost. Please restart the Recce server and try again."})}),(0,t.jsx)(D.default,{children:(0,t.jsx)($.default,{color:"iochmara",variant:"contained",onClick:()=>{e()},children:"Retry"})})]})}function X({shareUrl:e,mode:r,supportCalendarUrl:n,LinkComponent:a}){let o={"read only":{title:"Share Instance Expired",body:"This Share Instance has expired. Please restart the share instance.",action:"Restart",link:e},"metadata only":{title:"Preview Instance Expired",body:"This Preview Instance has expired. To browse more, please book a meeting with us.",action:"Contact us",link:n}}[r],i=(0,t.jsx)($.default,{color:"iochmara",variant:"contained",children:o.action});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(F.default,{children:o.title}),(0,t.jsx)(L.default,{children:(0,t.jsx)(W.default,{children:o.body})}),(0,t.jsx)(D.default,{children:"read only"===r?a?(0,t.jsx)(a,{href:o.link,children:i}):(0,t.jsx)("a",{href:o.link,children:i}):(0,t.jsx)($.default,{color:"iochmara",variant:"contained",onClick:()=>window.open(o.link,"_blank"),children:o.action})})]})}var Y=e.i(708241),Z=e.i(458874),ee=e.i(280490),et=e.i(616191),er=e.i(211363),en=e.i(307215),ea=e.i(861291);function eo({children:e}){let{idleTimeout:a,remainingSeconds:o,isEnabled:i,setDisconnected:l,resetConnection:s}=I(),{apiClient:c,apiPrefix:u,baseUrl:d}=(0,ea.useApiConfig)(),f=(0,N.useQuery)({queryKey:B.cacheKeys.lineage(),queryFn:()=>(0,U.getServerInfo)(c)}),h=(0,N.useQuery)({queryKey:B.cacheKeys.runsAggregated(),queryFn:()=>(0,H.aggregateRuns)(c)}),p=(0,n.useMemo)(()=>{let e=f.data?.lineage;if(e?.base)return(0,Z.buildLineageGraph)(e.base,e.current,e.diff)},[f.data]),m=f.error?.message,{state_metadata:g,lineage:x,sqlmesh:y,demo:b,codespace:v,review_mode:j,cloud_mode:C,file_mode:w,filename:S,adapter_type:k,git:O,pull_request:T,support_tasks:_}=f.data??{demo:!1},M=x?.base.manifest_metadata,R=x?.current.manifest_metadata,{connectionStatus:E,connect:A,envStatus:V}=function({enabled:e=!0,baseUrl:t,apiPrefix:a}={}){let[o,i]=(0,n.useState)(void 0),l=(0,n.useRef)({ws:void 0,status:"pending",artifactsUpdatedToastId:void 0}),[s,c]=(0,n.useState)(e?"pending":"connected"),[u,d]=(0,n.useState)(void 0);(0,n.useEffect)(()=>{l.current.status=s},[s]),(0,n.useEffect)(()=>{l.current.artifactsUpdatedToastId=o},[o]);let f=(0,r.useQueryClient)(),h=(0,n.useCallback)(()=>{f.invalidateQueries({queryKey:B.cacheKeys.lineage()}),f.invalidateQueries({queryKey:B.cacheKeys.checks()}),f.invalidateQueries({queryKey:B.cacheKeys.runs()})},[f]),p=(0,n.useCallback)(()=>{let e=t??en.PUBLIC_API_URL,r=a?`${a}/ws`:"/api/ws",n=new WebSocket(`${e.replace(/(http)(s)?:\/\//,"ws$2://")}${r}`);l.current.ws=n,n.onopen=()=>{n.send("ping")},n.onmessage=e=>{if("pong"===e.data){"disconnected"===l.current.status&&h(),c("connected");return}try{let t=JSON.parse(e.data);if("refresh"===t.command){let{eventType:e,srcPath:r}=t.event,[n,a]=r.split("/").slice(-2),o=a.replace(/\.[^/.]+$/,""),s=`${n}-${o}-${e}`;null==l.current.artifactsUpdatedToastId&&i(Y.toaster.create({id:s,description:`Detected ${n} ${o} ${e}`,type:"info",duration:5e3,closable:!0})),h()}else if("relaunch"===t.command)d("relaunch");else{let{id:e,title:r,description:n,status:a,duration:o}=t.event;i(Y.toaster.create({id:e||"broadcast",title:r,description:n,type:a??"info",duration:o??5e3,closable:!0}))}}catch(e){console.error(e)}},n.onerror=e=>{console.error("An error occurred during Handling WebSockets",e)},n.onclose=()=>{c(e=>"connected"===e?"disconnected":e),l.current.ws=void 0}},[h,t,a]);return(0,n.useEffect)(()=>{if(!e)return;let t=l.current;return p(),()=>{t.ws&&t.ws.close()}},[p,e]),{connectionStatus:s,connect:p,envStatus:u}}({enabled:!0,baseUrl:d,apiPrefix:u});(0,n.useEffect)(()=>{"disconnected"===E?l():"connected"===E&&s()},[E,l,s]);let{data:eo,isLoading:ei}=(0,et.useRecceServerFlag)(),{featureToggles:el,shareUrl:es}=(0,P.useRecceInstanceContext)(),[ec,eu]=(0,n.useState)(!1),[ed,ef]=(0,n.useState)(!1),eh=(0,r.useQueryClient)(),ep=!ei&&"relaunch"===V&&eo?.single_env_onboarding===!0&&eo.show_relaunch_hint;ep!==ed&&(ef(ep),eu(ep)),(0,n.useEffect)(()=>{ep&&ec&&(0,er.trackSingleEnvironment)({action:"target_base_added"})},[ep,ec]);let em=()=>{eu(!1),(0,G.markRelaunchHintCompleted)(c),eh.invalidateQueries({queryKey:B.cacheKeys.flag()})},eg=(0,n.useCallback)(()=>{h.refetch()},[h]),ex=(0,n.useCallback)(()=>{h.refetch()},[h]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ee.LineageGraphProvider,{lineageGraph:p,envInfo:{stateMetadata:g,adapterType:k,git:O,pullRequest:T,dbt:{base:M,current:R},sqlmesh:y},reviewMode:j,cloudMode:C,fileMode:w,fileName:S,isDemoSite:b??!1,isCodespace:v,isLoading:f.isLoading,error:m,supportTasks:_,onRefetchLineageGraph:eg,runsAggregated:h.data,onRefetchRunsAggregated:ex,children:e}),(0,t.jsx)(z.default,{open:"disconnected"===E,onClose:()=>void 0,children:es&&null!==el.mode?(0,t.jsx)(X,{shareUrl:es,mode:el.mode,supportCalendarUrl:en.RECCE_SUPPORT_CALENDAR_URL,LinkComponent:({href:e,children:r})=>(0,t.jsx)(Q.default,{href:e,passHref:!0,children:r})}):(0,t.jsx)(J,{connect:A,idleSeconds:i&&null!==a&&null!==o&&o<=5?a-Math.max(0,o):void 0})}),eo?.single_env_onboarding&&(0,t.jsxs)(z.default,{open:ec,onClose:em,children:[(0,t.jsx)(F.default,{children:"Target-base Added"}),(0,t.jsx)(q.default,{"aria-label":"close",onClick:em,sx:{position:"absolute",right:8,top:8,color:"grey.500"},children:(0,t.jsx)(K.IoClose,{})}),(0,t.jsx)(L.default,{children:(0,t.jsx)(W.default,{children:"Please restart the Recce server."})}),(0,t.jsx)(D.default,{children:(0,t.jsx)($.default,{color:"iochmara",variant:"contained",onClick:em,children:"Got it!"})})]})]})}var ei=e.i(854535),el=e.i(174734),es=e.i(286791),ec=e.i(492192),eu=e.i(283276),ed=e.i(572537),ef=e.i(760437),eh=e.i(721394);let ep=({size:e=16})=>(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,t.jsx)("path",{d:"M12 16v-4"}),(0,t.jsx)("path",{d:"M12 8h.01"})]});function em({isOpen:e,onClose:r,onExecute:a,type:o,title:i,params:l,RunForm:s,onCancel:c,onExecuteClick:u,documentationUrl:d,InfoIcon:f=ep}){let[h,p]=(0,n.useState)(l??{}),[m,g]=(0,n.useState)(null),[x,y]=(0,n.useState)(!1),b=(0,n.useRef)(!1),v=()=>{b.current||c?.(),b.current=!1,r()};return(0,t.jsxs)(z.default,{open:e,onClose:v,maxWidth:"sm",fullWidth:!0,scroll:"paper",slotProps:{paper:{sx:{height:"75%",minHeight:"400px"}}},children:[(0,t.jsxs)(F.default,{sx:{display:"flex",alignItems:"center"},children:[i," ",d&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(q.default,{size:"small","aria-label":"Click this button to learn more about the SQL behind",onMouseEnter:e=>g(e.currentTarget),onMouseLeave:()=>g(null),onClick:()=>window.open(d,"_blank"),children:(0,t.jsx)(eu.default,{component:f,sx:{fontSize:"16px"}})}),(0,t.jsx)(ef.default,{open:!!m,anchorEl:m,onClose:()=>g(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},disableRestoreFocus:!0,sx:{pointerEvents:"none"},slotProps:{paper:{sx:{bgcolor:"black",color:"white",p:1}}},children:(0,t.jsxs)(W.default,{sx:{fontSize:"0.875rem"},children:["Click"," ",(0,t.jsx)(ed.default,{href:d,target:"_blank",sx:{textDecoration:"underline",color:"white","&:hover":{color:"iochmara.300"}},children:"here"})," ","to learn more about the SQL behind"]})})]})]}),(0,t.jsx)(q.default,{"aria-label":"close",onClick:v,sx:{position:"absolute",right:8,top:8,color:"grey.500"},children:(0,t.jsx)(K.IoClose,{})}),(0,t.jsx)(L.default,{sx:{p:0,overflow:"auto",borderTop:"1px solid",borderBottom:"1px solid",borderColor:"divider"},children:(0,t.jsx)(eu.default,{sx:{contain:"layout"},children:s&&(0,t.jsx)(s,{params:h,onParamsChanged:p,setIsReadyToExecute:y})})}),(0,t.jsx)(D.default,{children:(0,t.jsx)(eh.default,{direction:"row",spacing:"10px",children:(0,t.jsx)($.default,{disabled:!x,color:"iochmara",variant:"contained",onClick:()=>{b.current=!0,u?.(),a(o,h)},children:"Execute"})})})]})}function eg({isOpen:e,onClose:r,onExecute:n,type:a,title:o,params:i,initialRun:l,RunForm:s}){return(0,t.jsx)(em,{isOpen:e,onClose:r,onExecute:n,type:a,title:o,params:i,initialRun:l,RunForm:s,onCancel:()=>{(0,er.isExploreAction)(a)&&(0,er.trackExploreActionForm)({action:a,event:er.EXPLORE_FORM_EVENT.CANCEL})},onExecuteClick:()=>{(0,er.isExploreAction)(a)&&(0,er.trackExploreActionForm)({action:a,event:er.EXPLORE_FORM_EVENT.EXECUTE})},documentationUrl:{value_diff:"https://docs.datarecce.io/features/lineage/#value-diff",profile_diff:"https://docs.datarecce.io/features/lineage/#profile-diff",histogram_diff:"https://docs.datarecce.io/features/lineage/#histogram-diff",top_k_diff:"https://docs.datarecce.io/features/lineage/#top-k-diff"}[a]||null,InfoIcon:ec.PiInfo})}var ex=e.i(968287),ey=e.i(983740);function eb({children:e}){let a,{apiClient:o}=(0,ea.useApiConfig)(),[i,l]=(0,n.useState)(),[s,c]=(0,n.useState)(!1),u=(0,n.useCallback)(()=>c(!0),[]),d=(0,n.useCallback)(()=>c(!1),[]),f=(0,el.useRouter)(),h=(0,el.usePathname)(),p=(0,r.useQueryClient)(),{basePath:m}=(0,ey.useRouteConfig)(),g=(0,n.useRef)(null);a=(0,el.usePathname)(),(0,n.useEffect)(()=>{d()},[d,a]);let x=(0,n.useCallback)(async(e,t)=>{!1!==t&&await p.invalidateQueries({queryKey:B.cacheKeys.runs()})},[p]),y=(0,n.useCallback)(async(e,t,r)=>{try{let n,a=new Date().getTime().toString();if(r?.showLast){let r=await (0,H.searchRuns)(e,t,1,o);1===r.length&&(n=r[0])}let i=(0,es.findByRunType)(e),s=i.RunResultView,{title:c,RunForm:d}=i;if(void 0===s)throw Error(`Run type ${e} does not have a result view`);if(void 0===d||!r?.showForm){let{run_id:n}=await (0,H.submitRun)(e,t,{nowait:!0,trackProps:r?.trackProps},o);await p.invalidateQueries({queryKey:B.cacheKeys.runs()}),g.current&&g.current(n),h.startsWith("/lineage")&&f.push(`${m}/lineage`);return}l({session:a,title:c,type:e,params:t,lastRun:n,options:r,RunForm:d}),u();return}catch(e){Y.toaster.create({title:"Failed to submit a run",description:e instanceof Error?e.message:void 0,type:"error",duration:5e3,closable:!0});return}},[u,p,o,h,f,m]),b=(0,n.useCallback)(async(e,t)=>{try{d();let{run_id:r}=await (0,H.submitRun)(e,t,{nowait:!0,trackProps:i?.options?.trackProps},o);g.current&&g.current(r)}catch(e){Y.toaster.create({title:"Failed to submit a run",description:e instanceof Error?e.message:void 0,type:"error",duration:5e3,closable:!0})}},[d,i?.options?.trackProps,o]);return(0,t.jsxs)(ex.RecceActionProvider,{onRunAction:y,onShowRunId:x,children:[(0,t.jsx)(ev,{showRunIdRef:g,children:e}),i&&(0,t.jsx)(eg,{isOpen:s,onClose:d,onExecute:b,title:i.title,type:i.type,params:i.params,initialRun:i.lastRun,RunForm:i.options?.showForm&&i.RunForm?i.RunForm:void 0},i.session)]})}function ev({children:e,showRunIdRef:r}){let{showRunId:a}=(0,ex.useRecceActionContext)();return(0,n.useEffect)(()=>(r.current=a,()=>{r.current=null}),[a,r]),(0,t.jsx)(t.Fragment,{children:e})}var ej=e.i(12606);function eC({children:e}){return(0,t.jsx)(P.RecceInstanceInfoProvider,{children:(0,t.jsx)(ej.RecceShareStateContextProvider,{children:(0,t.jsx)(ei.QueryContextAdapter,{children:(0,t.jsx)(eo,{children:(0,t.jsx)(eb,{children:(0,t.jsx)(A.CheckContextAdapter,{children:e})})})})})})}var ew=e.i(766271),eS=e.i(959243),ek=e.i(259864),eO=e.i(578889),eT=class extends eO.Subscribable{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){let n=t.queryKey,a=t.queryHash??(0,ew.hashQueryKeyByOptions)(n,t),o=this.get(a);return o||(o=new eS.Query({client:e,queryKey:n,queryHash:a,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(n)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ek.notifyManager.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,ew.matchQuery)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,ew.matchQuery)(e,t)):t}notify(e){ek.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ek.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ek.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},e_=e.i(51449),eM=eO,eR=class extends eM.Subscribable{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#r=new Map,this.#n=0}#t;#r;#n;build(e,t,r){let n=new e_.Mutation({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){this.#t.add(e);let t=eE(e);if("string"==typeof t){let r=this.#r.get(t);r?r.push(e):this.#r.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){let t=eE(e);if("string"==typeof t){let r=this.#r.get(t);if(r)if(r.length>1){let t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&this.#r.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=eE(e);if("string"!=typeof t)return!0;{let r=this.#r.get(t),n=r?.find(e=>"pending"===e.state.status);return!n||n===e}}runNext(e){let t=eE(e);if("string"!=typeof t)return Promise.resolve();{let r=this.#r.get(t)?.find(t=>t!==e&&t.state.isPaused);return r?.continue()??Promise.resolve()}}clear(){ek.notifyManager.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#r.clear()})}getAll(){return Array.from(this.#t)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,ew.matchMutation)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,ew.matchMutation)(e,t))}notify(e){ek.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return ek.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(ew.noop))))}};function eE(e){return e.options.scope?.id}var eI=e.i(82679),eP=e.i(60045);function eA(e){return{onFetch:(t,r)=>{let n=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],i=t.state.data?.pageParams||[],l={pages:[],pageParams:[]},s=0,c=async()=>{let r=!1,c=(0,ew.ensureQueryFn)(t.options,t.fetchOptions),u=async(e,n,a)=>{let o;if(r)return Promise.reject();if(null==n&&e.pages.length)return Promise.resolve(e);let i=(o={client:t.client,queryKey:t.queryKey,pageParam:n,direction:a?"backward":"forward",meta:t.options.meta},(0,ew.addConsumeAwareSignal)(o,()=>t.signal,()=>r=!0),o),l=await c(i),{maxPages:s}=t.options,u=a?ew.addToStart:ew.addToEnd;return{pages:u(e.pages,l,s),pageParams:u(e.pageParams,n,s)}};if(a&&o.length){let e="backward"===a,t={pages:o,pageParams:i},r=(e?function(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}:e$)(n,t);l=await u(t,r,e)}else{let t=e??o.length;do{let e=0===s?i[0]??n.initialPageParam:e$(n,l);if(s>0&&null==e)break;l=await u(l,e),s++}while(s<t)}return l};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=c}}}function e$(e,{pages:t,pageParams:r}){let n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}let ez=new class{#a;#o;#i;#l;#s;#c;#u;#d;constructor(e={}){this.#a=e.queryCache||new eT,this.#o=e.mutationCache||new eR,this.#i=e.defaultOptions||{},this.#l=new Map,this.#s=new Map,this.#c=0}mount(){this.#c++,1===this.#c&&(this.#u=eI.focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#a.onFocus())}),this.#d=eP.onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#a.onOnline())}))}unmount(){this.#c--,0===this.#c&&(this.#u?.(),this.#u=void 0,this.#d?.(),this.#d=void 0)}isFetching(e){return this.#a.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#o.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#a.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=this.#a.build(this,t),n=r.state.data;return void 0===n?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime((0,ew.resolveStaleTime)(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return this.#a.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){let n=this.defaultQueryOptions({queryKey:e}),a=this.#a.get(n.queryHash),o=a?.state.data,i=(0,ew.functionalUpdate)(t,o);if(void 0!==i)return this.#a.build(this,n).setData(i,{...r,manual:!0})}setQueriesData(e,t,r){return ek.notifyManager.batch(()=>this.#a.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#a.get(t.queryHash)?.state}removeQueries(e){let t=this.#a;ek.notifyManager.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let r=this.#a;return ek.notifyManager.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let r={revert:!0,...t};return Promise.all(ek.notifyManager.batch(()=>this.#a.findAll(e).map(e=>e.cancel(r)))).then(ew.noop).catch(ew.noop)}invalidateQueries(e,t={}){return ek.notifyManager.batch(()=>(this.#a.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let r={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(ek.notifyManager.batch(()=>this.#a.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(ew.noop)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(ew.noop)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let r=this.#a.build(this,t);return r.isStaleByTime((0,ew.resolveStaleTime)(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ew.noop).catch(ew.noop)}fetchInfiniteQuery(e){return e.behavior=eA(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ew.noop).catch(ew.noop)}ensureInfiniteQueryData(e){return e.behavior=eA(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return eP.onlineManager.isOnline()?this.#o.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#a}getMutationCache(){return this.#o}getDefaultOptions(){return this.#i}setDefaultOptions(e){this.#i=e}setQueryDefaults(e,t){this.#l.set((0,ew.hashKey)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#l.values()],r={};return t.forEach(t=>{(0,ew.partialMatchKey)(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){this.#s.set((0,ew.hashKey)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#s.values()],r={};return t.forEach(t=>{(0,ew.partialMatchKey)(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#i.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,ew.hashQueryKeyByOptions)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ew.skipToken&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#i.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#a.clear(),this.#o.clear()}};e.i(139507);var eD=e.i(57803),eL=e.i(138961);let eF="function"==typeof(0,eD.globalCss)({}),eq=(e,t=!1)=>{let r={};t&&e.colorSchemes&&"function"==typeof e.getColorSchemeSelector&&Object.entries(e.colorSchemes).forEach(([t,n])=>{let a=e.getColorSchemeSelector(t);a.startsWith("@")?r[a]={":root":{colorScheme:n.palette?.mode}}:r[a.replace(/\s*&/,"")]={colorScheme:n.palette?.mode}});let n={html:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...t&&!e.vars&&{colorScheme:e.palette.mode}},"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...{color:(e.vars||e).palette.text.primary,...e.typography.body1,backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}},"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...r},a=e.components?.MuiCssBaseline?.styleOverrides;return a&&(n=[n,a]),n},eW="mui-ecs",eN=(0,eD.globalCss)(eF?({theme:e,enableColorScheme:t})=>eq(e,t):({theme:e})=>{let t,r;return r=Array.isArray(t=eq(e,!1))?t[0]:t,!e.vars&&r&&(r.html[`:root:has(${eW})`]={colorScheme:e.palette.mode}),e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([t,n])=>{let a=e.getColorSchemeSelector(t);a.startsWith("@")?r[a]={[`:root:not(:has(.${eW}))`]:{colorScheme:n.palette?.mode}}:r[a.replace(/\s*&/,"")]={[`&:not(:has(.${eW}))`]:{colorScheme:n.palette?.mode}}}),t}),eQ=function(e){let{children:r,enableColorScheme:a=!1}=(0,eL.useDefaultProps)({props:e,name:"MuiCssBaseline"});return(0,t.jsxs)(n.Fragment,{children:[eF&&(0,t.jsx)(eN,{enableColorScheme:a}),!eF&&!a&&(0,t.jsx)("span",{className:eW,style:{display:"none"}}),r]})},eK=n.createContext(null);function eH(){return n.useContext(eK)}let eB="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",eU=function(e){let{children:r,theme:a}=e,o=eH(),i=n.useMemo(()=>{var e,t;let r=null===o?{...a}:(e=o,"function"==typeof(t=a)?t(e):{...e,...t});return null!=r&&(r[eB]=null!==o),r},[a,o]);return(0,t.jsx)(eK.Provider,{value:i,children:r})};var eG=e.i(547607),eV=e.i(527488),eJ=e.i(942711),eX=e.i(592634),eY=e.i(514934),eZ=e.i(455832),e0=e.i(516304);let e1={};function e5(e,t,r,a=!1){return n.useMemo(()=>{let n=e&&t[e]||t;if("function"==typeof r){let o=r(n),i=e?{...t,[e]:o}:o;return a?()=>i:i}return e?{...t,[e]:r}:{...t,...r}},[e,t,r,a])}let e2=function(e){let{children:r,theme:n,themeId:a}=e,o=(0,eV.default)(e1),i=eH()||e1,l=e5(a,o,n),s=e5(a,i,n,!0),c="rtl"===(a?l[a]:l).direction,u=function(e){let r=(0,eV.default)(),n=(0,eZ.default)()||"",{modularCssLayers:a}=e,o="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return(o=a&&null===r?"string"==typeof a?a.replace(/mui(?!\.)/g,o):`@layer ${o};`:"",(0,eY.default)(()=>{let e=document.querySelector("head");if(!e)return;let t=e.firstChild;if(o){if(t&&t.hasAttribute?.("data-mui-layer-order")&&t.getAttribute("data-mui-layer-order")===n)return;let r=document.createElement("style");r.setAttribute("data-mui-layer-order",n),r.textContent=o,e.prepend(r)}else e.querySelector(`style[data-mui-layer-order="${n}"]`)?.remove()},[o,n]),o)?(0,t.jsx)(e0.default,{styles:o}):null}(l);return(0,t.jsx)(eU,{theme:s,children:(0,t.jsx)(eG.ThemeContext.Provider,{value:l,children:(0,t.jsx)(eJ.default,{value:c,children:(0,t.jsxs)(eX.default,{value:a?l[a].components:l.components,children:[u,r]})})})})};var e6=e.i(75400);function e4({theme:e,...r}){let n=e6.default in e?e[e6.default]:void 0;return(0,t.jsx)(e2,{...r,themeId:n?e6.default:void 0,theme:n||e})}var e8=e.i(274105),e3=e.i(316571);let e7="mode",e9="color-scheme";function te(){}let tt=({key:e,storageWindow:t})=>(!t&&"u">typeof window&&(t=window),{get(r){let n;if("u">typeof window){if(!t)return r;try{n=t.localStorage.getItem(e)}catch{}return n||r}},set:r=>{if(t)try{t.localStorage.setItem(e,r)}catch{}},subscribe:r=>{if(!t)return te;let n=t=>{let n=t.newValue;t.key===e&&r(n)};return t.addEventListener("storage",n),()=>{t.removeEventListener("storage",n)}}});function tr(){}function tn(e){if("u">typeof window&&"function"==typeof window.matchMedia&&"system"===e)return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function ta(e,t){return"light"===e.mode||"system"===e.mode&&"light"===e.systemMode?t("light"):"dark"===e.mode||"system"===e.mode&&"dark"===e.systemMode?t("dark"):void 0}var to=e.i(779788),ti=e.i(327556);let{CssVarsProvider:tl,useColorScheme:ts,getInitColorSchemeScript:tc}=function(e){let{themeId:r,theme:a={},modeStorageKey:o=e7,colorSchemeStorageKey:i=e9,disableTransitionOnChange:l=!1,defaultColorScheme:s,resolveTheme:c}=e,u={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},d=n.createContext(void 0),f={},h={},p="string"==typeof s?s:s.light,m="string"==typeof s?s:s.dark;return{CssVarsProvider:function(e){let{children:u,theme:p,modeStorageKey:m=o,colorSchemeStorageKey:g=i,disableTransitionOnChange:x=l,storageManager:y,storageWindow:b="u"<typeof window?void 0:window,documentNode:v="u"<typeof document?void 0:document,colorSchemeNode:j="u"<typeof document?void 0:document.documentElement,disableNestedContext:C=!1,disableStyleSheetGeneration:w=!1,defaultMode:S="system",forceThemeRerender:k=!1,noSsr:O}=e,T=n.useRef(!1),_=eH(),M=n.useContext(d),R=!!M&&!C,E=n.useMemo(()=>p||("function"==typeof a?a():a),[p]),I=E[r],P=I||E,{colorSchemes:A=f,components:$=h,cssVarPrefix:z}=P,D=Object.keys(A).filter(e=>!!A[e]).join(","),L=n.useMemo(()=>D.split(","),[D]),F="string"==typeof s?s:s.light,q="string"==typeof s?s:s.dark,W=A[F]&&A[q]?S:A[P.defaultColorScheme]?.palette?.mode||P.palette?.mode,{mode:N,setMode:Q,systemMode:K,lightColorScheme:H,darkColorScheme:B,colorScheme:U,setColorScheme:G}=function(e){let{defaultMode:t="light",defaultLightColorScheme:r,defaultDarkColorScheme:a,supportedColorSchemes:o=[],modeStorageKey:i=e7,colorSchemeStorageKey:l=e9,storageWindow:s="u"<typeof window?void 0:window,storageManager:c=tt,noSsr:u=!1}=e,d=o.join(","),f=o.length>1,h=n.useMemo(()=>c?.({key:i,storageWindow:s}),[c,i,s]),p=n.useMemo(()=>c?.({key:`${l}-light`,storageWindow:s}),[c,l,s]),m=n.useMemo(()=>c?.({key:`${l}-dark`,storageWindow:s}),[c,l,s]),[g,x]=n.useState(()=>{let e=h?.get(t)||t,n=p?.get(r)||r,o=m?.get(a)||a;return{mode:e,systemMode:tn(e),lightColorScheme:n,darkColorScheme:o}}),[y,b]=n.useState(u||!f);n.useEffect(()=>{b(!0)},[]);let v=ta(g,e=>"light"===e?g.lightColorScheme:"dark"===e?g.darkColorScheme:void 0),j=n.useCallback(e=>{x(r=>{if(e===r.mode)return r;let n=e??t;return h?.set(n),{...r,mode:n,systemMode:tn(n)}})},[h,t]),C=n.useCallback(e=>{e?"string"==typeof e?e&&!d.includes(e)?console.error(`\`${e}\` does not exist in \`theme.colorSchemes\`.`):x(t=>{let r={...t};return ta(t,t=>{"light"===t&&(p?.set(e),r.lightColorScheme=e),"dark"===t&&(m?.set(e),r.darkColorScheme=e)}),r}):x(t=>{let n={...t},o=null===e.light?r:e.light,i=null===e.dark?a:e.dark;return o&&(d.includes(o)?(n.lightColorScheme=o,p?.set(o)):console.error(`\`${o}\` does not exist in \`theme.colorSchemes\`.`)),i&&(d.includes(i)?(n.darkColorScheme=i,m?.set(i)):console.error(`\`${i}\` does not exist in \`theme.colorSchemes\`.`)),n}):x(e=>(p?.set(r),m?.set(a),{...e,lightColorScheme:r,darkColorScheme:a}))},[d,p,m,r,a]),w=n.useCallback(e=>{"system"===g.mode&&x(t=>{let r=e?.matches?"dark":"light";return t.systemMode===r?t:{...t,systemMode:r}})},[g.mode]),S=n.useRef(w);return S.current=w,n.useEffect(()=>{if("function"!=typeof window.matchMedia||!f)return;let e=(...e)=>S.current(...e),t=window.matchMedia("(prefers-color-scheme: dark)");return t.addListener(e),e(t),()=>{t.removeListener(e)}},[f]),n.useEffect(()=>{if(f){let e=h?.subscribe(e=>{(!e||["light","dark","system"].includes(e))&&j(e||t)})||tr,r=p?.subscribe(e=>{(!e||d.match(e))&&C({light:e})})||tr,n=m?.subscribe(e=>{(!e||d.match(e))&&C({dark:e})})||tr;return()=>{e(),r(),n()}}},[C,j,d,t,s,f,h,p,m]),{...g,mode:y?g.mode:void 0,systemMode:y?g.systemMode:void 0,colorScheme:y?v:void 0,setMode:j,setColorScheme:C}}({supportedColorSchemes:L,defaultLightColorScheme:F,defaultDarkColorScheme:q,modeStorageKey:m,colorSchemeStorageKey:g,defaultMode:W,storageManager:y,storageWindow:b,noSsr:O}),V=N,J=U;R&&(V=M.mode,J=M.colorScheme);let X=J||P.defaultColorScheme;P.vars&&!k&&(X=P.defaultColorScheme);let Y=n.useMemo(()=>{let e=P.generateThemeVars?.()||P.vars,t={...P,components:$,colorSchemes:A,cssVarPrefix:z,vars:e};if("function"==typeof t.generateSpacing&&(t.spacing=t.generateSpacing()),X){let e=A[X];e&&"object"==typeof e&&Object.keys(e).forEach(r=>{e[r]&&"object"==typeof e[r]?t[r]={...t[r],...e[r]}:t[r]=e[r]})}return c?c(t):t},[P,X,$,A,z]),Z=P.colorSchemeSelector;(0,eY.default)(()=>{if(J&&j&&Z&&"media"!==Z){let e=Z;if("class"===Z&&(e=".%s"),"data"===Z&&(e="[data-%s]"),Z?.startsWith("data-")&&!Z.includes("%s")&&(e=`[${Z}="%s"]`),e.startsWith("."))j.classList.remove(...L.map(t=>e.substring(1).replace("%s",t))),j.classList.add(e.substring(1).replace("%s",J));else{let t=e.replace("%s",J).match(/\[([^\]]+)\]/);if(t){let[e,r]=t[1].split("=");r||L.forEach(t=>{j.removeAttribute(e.replace(J,t))}),j.setAttribute(e,r?r.replace(/"|'/g,""):"")}else j.setAttribute(e,J)}}},[J,Z,j,L]),n.useEffect(()=>{let e;if(x&&T.current&&v){let t=v.createElement("style");t.appendChild(v.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),v.head.appendChild(t),window.getComputedStyle(v.body),e=setTimeout(()=>{v.head.removeChild(t)},1)}return()=>{clearTimeout(e)}},[J,x,v]),n.useEffect(()=>(T.current=!0,()=>{T.current=!1}),[]);let ee=n.useMemo(()=>({allColorSchemes:L,colorScheme:J,darkColorScheme:B,lightColorScheme:H,mode:V,setColorScheme:G,setMode:Q,systemMode:K}),[L,J,B,H,V,G,Q,K,Y.colorSchemeSelector]),et=!0;(w||!1===P.cssVariables||R&&_?.cssVarPrefix===z)&&(et=!1);let er=(0,t.jsxs)(n.Fragment,{children:[(0,t.jsx)(e2,{themeId:I?r:void 0,theme:Y,children:u}),et&&(0,t.jsx)(e3.GlobalStyles,{styles:Y.generateStyleSheets?.()||[]})]});return R?er:(0,t.jsx)(d.Provider,{value:ee,children:er})},useColorScheme:()=>n.useContext(d)||u,getInitColorSchemeScript:e=>(function(e){let{defaultMode:r="system",defaultLightColorScheme:n="light",defaultDarkColorScheme:a="dark",modeStorageKey:o=e7,colorSchemeStorageKey:i=e9,attribute:l="data-color-scheme",colorSchemeNode:s="document.documentElement",nonce:c}=e||{},u="",d=l;if("class"===l&&(d=".%s"),"data"===l&&(d="[data-%s]"),d.startsWith(".")){let e=d.substring(1);u+=`${s}.classList.remove('${e}'.replace('%s', light), '${e}'.replace('%s', dark));
|
|
2
|
+
${s}.classList.add('${e}'.replace('%s', colorScheme));`}let f=d.match(/\[([^[\]]+)\]/);if(f){let[e,t]=f[1].split("=");t||(u+=`${s}.removeAttribute('${e}'.replace('%s', light));
|
|
3
|
+
${s}.removeAttribute('${e}'.replace('%s', dark));`),u+=`
|
|
4
|
+
${s}.setAttribute('${e}'.replace('%s', colorScheme), ${t?`${t}.replace('%s', colorScheme)`:'""'});`}else".%s"!==d&&(u+=`${s}.setAttribute('${d}', colorScheme);`);return(0,t.jsx)("script",{suppressHydrationWarning:!0,nonce:"u"<typeof window?c:"",dangerouslySetInnerHTML:{__html:`(function() {
|
|
5
5
|
try {
|
|
6
6
|
let colorScheme = '';
|
|
7
7
|
const mode = localStorage.getItem('${o}') || '${r}';
|
|
@@ -25,15 +25,15 @@ try {
|
|
|
25
25
|
if (colorScheme) {
|
|
26
26
|
${u}
|
|
27
27
|
}
|
|
28
|
-
} catch(e){}})();`}},"mui-color-scheme-init")})({colorSchemeStorageKey:i,defaultLightColorScheme:p,defaultDarkColorScheme:m,modeStorageKey:o,...e})}}({themeId:e6.default,theme:()=>(0,to.default)({cssVariables:!0}),colorSchemeStorageKey:"mui-color-scheme",modeStorageKey:"mui-mode",defaultColorScheme:{light:"light",dark:"dark"},resolveTheme:e=>{let t={...e,typography:(0,ti.default)(e.palette,e.typography)};return t.unstable_sx=function(e){return(0,e4.default)({sx:e,theme:this})},t}});function tu({theme:e,...r}){let a=n.useMemo(()=>{if("function"==typeof e)return e;let t=e6.default in e?e[e6.default]:e;return"colorSchemes"in t?null:"vars"in t?e:{...e,vars:null}},[e]);return a?(0,t.jsx)(e8,{theme:a,...r}):(0,t.jsx)(ts,{theme:e,...r})}var td=e.i(102767),tf=e.i(896772);function th(e,t){return[{props:{color:e,variant:"contained"},style:{backgroundColor:`var(--mui-palette-${e}-main, ${t[500]})`,color:`var(--mui-palette-${e}-contrastText, #ffffff)`,"&:hover":{backgroundColor:`var(--mui-palette-${e}-dark, ${t[600]})`}}},{props:{color:e,variant:"outlined"},style:{"&&":{borderColor:`var(--mui-palette-${e}-main, ${t[500]})`,color:`var(--mui-palette-${e}-dark, ${t[600]})`},"&:hover":{borderColor:`var(--mui-palette-${e}-dark, ${t[600]})`,backgroundColor:`color-mix(in srgb, var(--mui-palette-${e}-light, ${t[50]}) 30%, transparent)`}}},{props:{color:e,variant:"text"},style:{"&&":{color:`var(--mui-palette-${e}-dark, ${t[600]})`},"&:hover":{backgroundColor:`color-mix(in srgb, var(--mui-palette-${e}-light, ${t[50]}) 30%, transparent)`}}}]}function tp(e,t){return[{props:{color:e,variant:"filled"},style:{backgroundColor:`var(--mui-palette-${e}-main, ${t[500]})`,color:`var(--mui-palette-${e}-contrastText, #ffffff)`,"&:hover":{backgroundColor:`var(--mui-palette-${e}-dark, ${t[600]})`},"&.MuiChip-clickable:hover":{backgroundColor:`var(--mui-palette-${e}-dark, ${t[600]})`}}},{props:{color:e,variant:"outlined"},style:{"&&":{borderColor:`var(--mui-palette-${e}-main, ${t[500]})`,color:`var(--mui-palette-${e}-dark, ${t[600]})`},"&:hover":{backgroundColor:`color-mix(in srgb, var(--mui-palette-${e}-light, ${t[50]}) 25%, transparent)`}}}]}function tm(e,t){return[{props:{color:e},style:{"& .MuiBadge-badge":{backgroundColor:`var(--mui-palette-${e}-main, ${t[500]})`,color:`var(--mui-palette-${e}-contrastText, #ffffff)`}}}]}function tg(e,t){return[{props:{color:e},style:{color:`var(--mui-palette-${e}-main, ${t[500]})`}}]}let tx={typography:{fontFamily:'-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"',fontSize:14,h1:{fontWeight:600},h2:{fontWeight:600},h3:{fontWeight:600},h4:{fontWeight:600},h5:{fontWeight:600},h6:{fontWeight:600},button:{textTransform:"none",fontWeight:500}},shape:{borderRadius:8},components:{MuiButton:{defaultProps:{disableElevation:!0},styleOverrides:{root:{borderRadius:6,boxShadow:"none",textTransform:"none",fontWeight:500,"&:hover":{boxShadow:"none"}},sizeSmall:{fontSize:"0.8125rem",padding:"4px 10px"},sizeMedium:{padding:"0.5rem 1rem",fontSize:"1rem"},sizeLarge:{padding:"0.75rem 1.5rem",fontSize:"1.125rem"},contained:{"&:hover":{boxShadow:"none"}},outlined:{borderWidth:"1px","&:hover":{borderWidth:"1px"}}},variants:[{props:{size:"xsmall"},style:{fontSize:"0.75rem",padding:"2px 8px",minHeight:24}},...th("brand",tf.colors.brand),...th("iochmara",tf.colors.iochmara),...th("cyan",tf.colors.cyan),...th("amber",tf.colors.amber),...th("green",tf.colors.green),...th("red",tf.colors.red),...th("rose",tf.colors.rose),...th("fuchsia",tf.colors.fuchsia),...th("neutral",tf.colors.neutral)]},MuiChip:{styleOverrides:{root:{borderRadius:6,fontWeight:500},sizeSmall:{fontSize:"0.75rem",height:24},sizeMedium:{height:32,fontSize:"0.875rem"}},variants:[{props:{size:"xsmall"},style:{fontSize:"0.6875rem",height:20,"& .MuiChip-label":{padding:"0 6px"}}},...tp("brand",tf.colors.brand),...tp("iochmara",tf.colors.iochmara),...tp("cyan",tf.colors.cyan),...tp("amber",tf.colors.amber),...tp("green",tf.colors.green),...tp("red",tf.colors.red),...tp("rose",tf.colors.rose),...tp("fuchsia",tf.colors.fuchsia),...tp("neutral",tf.colors.neutral)]},MuiBadge:{variants:[...tm("brand",tf.colors.brand),...tm("iochmara",tf.colors.iochmara)],styleOverrides:{badge:{fontWeight:500,fontSize:"0.75rem"}}},MuiAlert:{styleOverrides:{root:{borderRadius:6},standardSuccess:{backgroundColor:"var(--mui-palette-success-light)",color:"var(--mui-palette-success-dark)"},standardWarning:{backgroundColor:"var(--mui-palette-warning-light)",color:"var(--mui-palette-warning-dark)"},standardError:{backgroundColor:"var(--mui-palette-error-light)",color:"var(--mui-palette-error-dark)"},standardInfo:{backgroundColor:"var(--mui-palette-info-light)",color:"var(--mui-palette-info-dark)"}}},MuiTabs:{styleOverrides:{indicator:{height:2}}},MuiTab:{styleOverrides:{root:{textTransform:"none",fontWeight:500,minHeight:48}}},MuiAvatar:{styleOverrides:{root:{fontWeight:500}}},MuiCircularProgress:{defaultProps:{color:"primary"},variants:[...tg("brand",tf.colors.brand),...tg("iochmara",tf.colors.iochmara)]},MuiLink:{defaultProps:{underline:"hover"},styleOverrides:{root:{fontWeight:500,color:"var(--mui-palette-secondary-main)",textDecorationColor:"var(--mui-palette-secondary-light)","&:hover":{color:"var(--mui-palette-secondary-dark)"}}}},MuiPopover:{styleOverrides:{paper:{borderRadius:8,boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)"}}},MuiDivider:{styleOverrides:{root:{borderColor:"var(--mui-palette-divider)"}}},MuiBreadcrumbs:{styleOverrides:{separator:{color:"var(--mui-palette-text-secondary)"}}},MuiCard:{styleOverrides:{root:{borderRadius:8,boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"}}},MuiPaper:{styleOverrides:{root:{backgroundImage:"none"}}},MuiTooltip:{styleOverrides:{tooltip:{fontSize:"0.75rem"}}},MuiIconButton:{styleOverrides:{root:{borderRadius:6},sizeSmall:{padding:4},sizeMedium:{padding:8},sizeLarge:{padding:12}}},MuiTextField:{defaultProps:{variant:"outlined",size:"small"},styleOverrides:{root:{"& .MuiOutlinedInput-root":{borderRadius:6}}}},MuiOutlinedInput:{styleOverrides:{root:{borderRadius:6,"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"var(--mui-palette-secondary-light)"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"var(--mui-palette-secondary-main)",borderWidth:2}},notchedOutline:{borderColor:"var(--mui-palette-divider)"}}},MuiCheckbox:{defaultProps:{color:"primary"},styleOverrides:{root:{borderRadius:4}}},MuiSwitch:{defaultProps:{color:"primary"}},MuiDialog:{styleOverrides:{paper:{borderRadius:8}}},MuiDialogTitle:{styleOverrides:{root:{fontWeight:600,fontSize:"1.125rem"}}},MuiMenu:{styleOverrides:{paper:{borderRadius:8,boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)"}}},MuiMenuItem:{styleOverrides:{root:{fontSize:"0.875rem",padding:"0.5rem 0.75rem","&:hover":{backgroundColor:"var(--mui-palette-action-hover)"},"&.Mui-selected":{backgroundColor:"var(--mui-palette-action-selected)","&:hover":{backgroundColor:"var(--mui-palette-action-selected)"}}}}}}},ty=(0,td.createTheme)({cssVariables:{colorSchemeSelector:"class"},colorSchemes:{light:{palette:{mode:"light",primary:{main:tf.colors.iochmara[500],light:tf.colors.iochmara[300],dark:tf.colors.iochmara[600],contrastText:"#ffffff"},secondary:{main:tf.colors.cyan[500],light:tf.colors.cyan[400],dark:tf.colors.cyan[600],contrastText:"#ffffff"},brand:{light:tf.colors.brand[400],main:tf.colors.brand[500],dark:tf.colors.brand[600],contrastText:"#ffffff"},iochmara:{light:tf.colors.iochmara[400],main:tf.colors.iochmara[500],dark:tf.colors.iochmara[600],contrastText:"#ffffff"},cyan:{main:tf.colors.cyan[500],light:tf.colors.cyan[300],dark:tf.colors.cyan[600],contrastText:"#ffffff"},amber:{main:tf.colors.amber[500],light:tf.colors.amber[300],dark:tf.colors.amber[600],contrastText:"#ffffff"},green:{main:tf.colors.green[500],light:tf.colors.green[300],dark:tf.colors.green[600],contrastText:"#ffffff"},red:{main:tf.colors.red[500],light:tf.colors.red[300],dark:tf.colors.red[600],contrastText:"#ffffff"},rose:{main:tf.colors.rose[500],light:tf.colors.rose[300],dark:tf.colors.rose[600],contrastText:"#ffffff"},fuchsia:{main:tf.colors.fuchsia[500],light:tf.colors.fuchsia[300],dark:tf.colors.fuchsia[600],contrastText:"#ffffff"},neutral:{main:tf.colors.neutral[500],light:tf.colors.neutral[300],dark:tf.colors.neutral[600],contrastText:"#ffffff"},grey:tf.colors.neutral,success:tf.colors.success,warning:tf.colors.warning,error:tf.colors.error,info:tf.colors.info,background:{default:"#ffffff",paper:tf.colors.neutral[50]},text:{primary:tf.colors.neutral[900],secondary:tf.colors.neutral[600],disabled:tf.colors.neutral[400]},divider:tf.colors.neutral[200]}},dark:{palette:{mode:"dark",primary:{main:tf.colors.iochmara[500],light:tf.colors.iochmara[300],dark:tf.colors.iochmara[600],contrastText:"#ffffff"},secondary:{main:tf.colors.cyan[500],light:tf.colors.cyan[400],dark:tf.colors.cyan[600],contrastText:"#ffffff"},brand:{light:tf.colors.brand[300],main:tf.colors.brand[400],dark:tf.colors.brand[600],contrastText:"#ffffff"},iochmara:{light:tf.colors.iochmara[300],main:tf.colors.iochmara[400],dark:tf.colors.iochmara[600],contrastText:"#ffffff"},cyan:{main:tf.colors.cyan[400],light:tf.colors.cyan[300],dark:tf.colors.cyan[600],contrastText:"#ffffff"},amber:{main:tf.colors.amber[400],light:tf.colors.amber[300],dark:tf.colors.amber[600],contrastText:"#000000"},green:{main:tf.colors.green[400],light:tf.colors.green[300],dark:tf.colors.green[600],contrastText:"#ffffff"},red:{main:tf.colors.red[400],light:tf.colors.red[300],dark:tf.colors.red[600],contrastText:"#ffffff"},rose:{main:tf.colors.rose[400],light:tf.colors.rose[300],dark:tf.colors.rose[600],contrastText:"#ffffff"},fuchsia:{main:tf.colors.fuchsia[400],light:tf.colors.fuchsia[300],dark:tf.colors.fuchsia[600],contrastText:"#ffffff"},neutral:{main:tf.colors.neutral[500],light:tf.colors.neutral[400],dark:tf.colors.neutral[100],contrastText:"#ffffff"},grey:tf.colors.neutral,success:{light:tf.colors.success.light,main:tf.colors.success.main,dark:tf.colors.success.dark,contrastText:"#000000"},warning:{light:tf.colors.warning.light,main:tf.colors.warning.main,dark:tf.colors.warning.dark,contrastText:"#000000"},error:{light:tf.colors.error.light,main:tf.colors.error.main,dark:tf.colors.error.dark,contrastText:"#ffffff"},info:{light:tf.colors.info.light,main:tf.colors.info.main,dark:tf.colors.info.dark,contrastText:"#ffffff"},background:{default:tf.colors.neutral[900],paper:tf.colors.neutral[800]},text:{primary:tf.colors.neutral[50],secondary:tf.colors.neutral[400],disabled:tf.colors.neutral[600]},divider:tf.colors.neutral[700]}}},...tx});function tb({children:e,forcedTheme:r,enableCssBaseline:a=!1}){let{resolvedTheme:o}=u();return(0,n.useEffect)(()=>{"dark"===(r??o)?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},[r,o]),(0,t.jsxs)(tu,{theme:ty,children:[a&&(0,t.jsx)(eQ,{}),e]})}var tv=e.i(241019),tj=e.i(178675),tC=e.i(712754),tw=e.i(125611),tS=e.i(691838);let tk=(0,n.memo)(function({status:e,showSpinner:r=!0,size:n="small",className:a}){let{color:o,label:i}=function(e){switch(e){case"Running":return{color:"blue",label:"Running"};case"Finished":default:return{color:"green",label:"Finished"};case"Failed":return{color:"red",label:"Failed"};case"Cancelled":return{color:"grey",label:"Cancelled"}}}(e);return(0,t.jsxs)(eu.default,{className:a,sx:{display:"inline-flex",alignItems:"center",gap:.5},children:["Running"===e&&r&&(0,t.jsx)(tv.default,{size:"small"===n?12:16,color:"primary"}),(0,t.jsx)(W.default,{component:"span",sx:{fontWeight:500,fontSize:"small"===n?"0.75rem":"0.875rem",color:`${o}.500`},children:i})]})});function tT(e){if(null==e)return null;let t=new Date,r=new Date;r.setDate(t.getDate()-1);let n=e.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1});if(t.toDateString()===e.toDateString())return`Today, ${n}`;{if(r.toDateString()===e.toDateString())return`Yesterday, ${n}`;let t=e.toLocaleDateString("en-US",{month:"short",day:"numeric"});return`${t}, ${n}`}}tk.displayName="RunStatusBadge";let tO=(0,n.memo)(function({status:e,runAt:r,className:n}){let a=r?tT("string"==typeof r?new Date(r):r):null;return(0,t.jsxs)(eu.default,{className:n,sx:{display:"flex",alignItems:"center",gap:.5,fontSize:"0.75rem",color:"text.secondary"},children:[(0,t.jsx)(tk,{status:e,size:"small"}),a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(W.default,{component:"span",sx:{fontSize:"inherit"},children:"•"}),(0,t.jsx)(W.default,{component:"span",sx:{fontSize:"inherit",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a})]})]})});tO.displayName="RunStatusWithDate",(0,n.memo)(function({run:e,className:r}){let n=e.status?e.status:e.result?"Finished":e.error?"Failed":"Finished";return(0,t.jsx)(tO,{status:n,runAt:e.run_at,className:r})}).displayName="RunStatusAndDate";let t_=(0,n.memo)(function({run:e,isSelected:r=!1,icon:n,onClick:a,onAddToChecklist:o,onGoToCheck:i,addToChecklistIcon:s,goToCheckIcon:l,hideAddToChecklist:c=!1,className:u}){let d=(0,tj.useIsDark)(),f=null!=e.checkId;return(0,t.jsxs)(eu.default,{className:u,onClick:()=>a?.(e.id),sx:e=>({display:"flex",flexDirection:"column",width:"100%",p:"8px 16px",cursor:"pointer",borderBottom:1,borderColor:"divider",borderLeft:"4px solid",borderLeftColor:r?"warning.main":"transparent",bgcolor:r?d?"warning.dark":"warning.light":"transparent","&:hover":{bgcolor:r?d?"warning.dark":"warning.light":e.palette.action.hover}}),children:[(0,t.jsxs)(eu.default,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[n&&(0,t.jsx)(eu.default,{sx:{fontSize:16,color:"text.secondary",flexShrink:0},children:n}),(0,t.jsx)(W.default,{sx:{flex:1,fontSize:"0.875rem",fontWeight:500,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:e.name?"text.primary":"text.secondary"},children:e.name?.trim()||"<no name>"}),f&&i&&(0,t.jsx)(tS.default,{title:"Go to Check",children:(0,t.jsx)(q.default,{size:"small",onClick:t=>{t.stopPropagation(),e.checkId&&i(e.checkId)},sx:{p:.5},children:l||(0,t.jsx)(eu.default,{component:"span",sx:{fontSize:14,color:"success.main"},children:"✓"})})}),!c&&!f&&o&&(0,t.jsx)(tS.default,{title:"Add to Checklist",children:(0,t.jsx)(q.default,{size:"small",onClick:t=>{t.stopPropagation(),o(e.id)},sx:{p:.5},children:s||(0,t.jsx)(eu.default,{component:"span",sx:{fontSize:14},children:"○"})})})]}),(0,t.jsx)(tO,{status:e.status,runAt:e.runAt})]})});t_.displayName="RunListItem";let tM=(0,n.memo)(function({date:e}){return(0,t.jsx)(eu.default,{sx:{width:"100%",p:"8px 16px",borderBottom:1,borderColor:"divider",color:"text.secondary",fontSize:"0.75rem",fontWeight:500,bgcolor:"action.hover"},children:e})}),tR=(0,n.memo)(function({runs:e,selectedId:r,isLoading:n=!1,onRunSelect:a,onAddToChecklist:o,onGoToCheck:i,getRunIcon:s,hideAddToChecklist:l=!1,title:c="Runs",headerActions:u,emptyMessage:d="No runs",loadingMessage:f="Loading...",groupByDate:h=!1,addToChecklistIcon:p,goToCheckIcon:m,className:g}){return(0,t.jsxs)(eu.default,{className:g,sx:{display:"flex",flexDirection:"column",height:"100%",width:"100%"},children:[(0,t.jsxs)(eh.default,{direction:"row",alignItems:"center",sx:{flex:"0 0 auto",px:2,py:1.5,borderBottom:1,borderColor:"divider"},children:[(0,t.jsx)(W.default,{variant:"h6",children:c}),(0,t.jsx)(eu.default,{sx:{flex:1}}),u]}),(0,t.jsx)(eu.default,{sx:{flex:1,overflow:"auto"},children:n?(0,t.jsx)(eu.default,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",color:"text.secondary"},children:f}):(()=>{if(0===e.length)return(0,t.jsx)(eu.default,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",color:"text.secondary",p:4},children:d});let n=null;return e.map(e=>{let c=e.runAt?function(e){if(null==e)return null;let t=new Date,r=new Date;return(r.setDate(t.getDate()-1),t.toDateString()===e.toDateString())?"Today":r.toDateString()===e.toDateString()?"Yesterday":e.toLocaleDateString("en-US",{month:"short",day:"numeric"})}(new Date(e.runAt)):null,u=h&&c&&n!==c;return n=c,(0,t.jsxs)(eu.default,{children:[u&&(0,t.jsx)(tM,{date:c}),(0,t.jsx)(t_,{run:e,isSelected:e.id===r,icon:s?.(e.type),onClick:a,onAddToChecklist:o,onGoToCheck:i,hideAddToChecklist:l,addToChecklistIcon:p,goToCheckIcon:m})]},e.id)})})()})]})});function tE(e){return{id:e.run_id,name:e.name,type:e.type,status:e.status??"Finished",runAt:e.run_at,checkId:e.check_id}}function tI(){let{closeHistory:e,showRunId:a,runId:o}=(0,ex.useRecceActionContext)(),{featureToggles:i}=(0,P.useRecceInstanceContext)(),{apiClient:s}=(0,ea.useApiConfig)(),l=(0,es.useRouter)(),c=(0,r.useQueryClient)(),{basePath:u}=(0,ey.useRouteConfig)(),{data:d,isLoading:f}=(0,N.useQuery)({queryKey:B.cacheKeys.runs(),queryFn:async()=>await (0,H.listRuns)(s),retry:!1}),h=(0,n.useMemo)(()=>(d??[]).map(tE),[d]),p=(0,n.useCallback)(e=>{(0,er.trackHistoryAction)({name:"click_run"}),a(e,!1)},[a]),m=(0,n.useCallback)(async e=>{(0,er.trackHistoryAction)({name:"add_to_checklist"});let t=await (0,tw.createCheckByRun)(e,void 0,s);await c.invalidateQueries({queryKey:B.cacheKeys.checks()}),l.push(`${u}/checks/?id=${t.check_id}`)},[s,c,l.push,u]),g=(0,n.useCallback)(e=>{(0,er.trackHistoryAction)({name:"go_to_check"}),l.push(`${u}/checks/?id=${e}`)},[l.push,u]),x=(0,n.useCallback)(()=>{(0,er.trackHistoryAction)({name:"hide"}),e()},[e]),y=(0,n.useCallback)(e=>{let r=(0,el.findByRunType)(e),n=r?.icon;return n?(0,t.jsx)(n,{}):null},[]),b=(0,t.jsx)(q.default,{"aria-label":"Close History",onClick:x,children:(0,t.jsx)(ec.PiX,{})});return(0,t.jsx)(tR,{runs:h,selectedId:o,isLoading:f,onRunSelect:p,onAddToChecklist:m,onGoToCheck:g,getRunIcon:y,hideAddToChecklist:i.disableUpdateChecklist,title:"History",headerActions:b,emptyMessage:"No runs",loadingMessage:"Loading...",groupByDate:!0,addToChecklistIcon:(0,t.jsx)(tC.FaRegCheckCircle,{}),goToCheckIcon:(0,t.jsx)(tC.FaCheckCircle,{color:"green"})})}tR.displayName="RunList";var tP=e.i(278474),tA=e.i(80123),t$=e.i(814938),tz=e.i(991303),tD=e.i(45623),tL=e.i(144899),tF=e.i(7284),tq=e.i(295456);let tW=n.createContext();var tN=e.i(721431),tQ=e.i(842196),tK=e.i(11507),tH=e.i(222942);function tB(e){return(0,tH.default)("MuiTable",e)}(0,tK.default)("MuiTable",["root","stickyHeader"]);let tU=(0,tN.styled)("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.stickyHeader&&t.stickyHeader]}})((0,tQ.default)(({theme:e})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...e.typography.body2,padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:e})=>e.stickyHeader,style:{borderCollapse:"separate"}}]}))),tG="table",tV=n.forwardRef(function(e,r){let a=(0,eL.useDefaultProps)({props:e,name:"MuiTable"}),{className:o,component:i=tG,padding:s="normal",size:l="medium",stickyHeader:c=!1,...u}=a,d={...a,component:i,padding:s,size:l,stickyHeader:c},f=(e=>{let{classes:t,stickyHeader:r}=e;return(0,tq.default)({root:["root",r&&"stickyHeader"]},tB,t)})(d),h=n.useMemo(()=>({padding:s,size:l,stickyHeader:c}),[s,l,c]);return(0,t.jsx)(tW.Provider,{value:h,children:(0,t.jsx)(tU,{as:i,role:i===tG?null:"table",ref:r,className:(0,tF.default)(f.root,o),ownerState:d,...u})})}),tJ=n.createContext();function tX(e){return(0,tH.default)("MuiTableBody",e)}(0,tK.default)("MuiTableBody",["root"]);let tY=(0,tN.styled)("tbody",{name:"MuiTableBody",slot:"Root"})({display:"table-row-group"}),tZ={variant:"body"},t0="tbody",t1=n.forwardRef(function(e,r){let n=(0,eL.useDefaultProps)({props:e,name:"MuiTableBody"}),{className:a,component:o=t0,...i}=n,s={...n,component:o},l=(e=>{let{classes:t}=e;return(0,tq.default)({root:["root"]},tX,t)})(s);return(0,t.jsx)(tJ.Provider,{value:tZ,children:(0,t.jsx)(tY,{className:(0,tF.default)(l.root,a),as:o,ref:r,role:o===t0?null:"rowgroup",ownerState:s,...i})})});var t5=e.i(663888);function t2(e){return(0,tH.default)("MuiTableCell",e)}let t6=(0,tK.default)("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),t8=(0,tN.styled)("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[r.variant],t[`size${(0,t5.default)(r.size)}`],"normal"!==r.padding&&t[`padding${(0,t5.default)(r.padding)}`],"inherit"!==r.align&&t[`align${(0,t5.default)(r.align)}`],r.stickyHeader&&t.stickyHeader]}})((0,tQ.default)(({theme:e})=>({...e.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid
|
|
29
|
-
${"light"===e.palette.mode?e.lighten(e.alpha(e.palette.divider,1),.88):e.darken(e.alpha(e.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:"footer"},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${t6.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:e})=>e.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}}]}))),t4=n.forwardRef(function(e,r){let a,o=(0,eL.useDefaultProps)({props:e,name:"MuiTableCell"}),{align:i="inherit",className:s,component:l,padding:c,scope:u,size:d,sortDirection:f,variant:h,...p}=o,m=n.useContext(tW),g=n.useContext(tJ),x=g&&"head"===g.variant,y=u;"td"===(a=l||(x?"th":"td"))?y=void 0:!y&&x&&(y="col");let b=h||g&&g.variant,v={...o,align:i,component:a,padding:c||(m&&m.padding?m.padding:"normal"),size:d||(m&&m.size?m.size:"medium"),sortDirection:f,stickyHeader:"head"===b&&m&&m.stickyHeader,variant:b},j=(e=>{let{classes:t,variant:r,align:n,padding:a,size:o,stickyHeader:i}=e,s={root:["root",r,i&&"stickyHeader","inherit"!==n&&`align${(0,t5.default)(n)}`,"normal"!==a&&`padding${(0,t5.default)(a)}`,`size${(0,t5.default)(o)}`]};return(0,tq.default)(s,t2,t)})(v),C=null;return f&&(C="asc"===f?"ascending":"descending"),(0,t.jsx)(t8,{as:a,ref:r,className:(0,tF.default)(j.root,s),"aria-sort":C,scope:y,ownerState:v,...p})});function t3(e){return(0,tH.default)("MuiTableContainer",e)}(0,tK.default)("MuiTableContainer",["root"]);let t7=(0,tN.styled)("div",{name:"MuiTableContainer",slot:"Root"})({width:"100%",overflowX:"auto"}),t9=n.forwardRef(function(e,r){let n=(0,eL.useDefaultProps)({props:e,name:"MuiTableContainer"}),{className:a,component:o="div",...i}=n,s={...n,component:o},l=(e=>{let{classes:t}=e;return(0,tq.default)({root:["root"]},t3,t)})(s);return(0,t.jsx)(t7,{ref:r,as:o,className:(0,tF.default)(l.root,a),ownerState:s,...i})});function re(e){return(0,tH.default)("MuiTableHead",e)}(0,tK.default)("MuiTableHead",["root"]);let rt=(0,tN.styled)("thead",{name:"MuiTableHead",slot:"Root"})({display:"table-header-group"}),rr={variant:"head"},rn="thead",ra=n.forwardRef(function(e,r){let n=(0,eL.useDefaultProps)({props:e,name:"MuiTableHead"}),{className:a,component:o=rn,...i}=n,s={...n,component:o},l=(e=>{let{classes:t}=e;return(0,tq.default)({root:["root"]},re,t)})(s);return(0,t.jsx)(tJ.Provider,{value:rr,children:(0,t.jsx)(rt,{as:o,className:(0,tF.default)(l.root,a),ref:r,role:o===rn?null:"rowgroup",ownerState:s,...i})})});function ro(e){return(0,tH.default)("MuiTableRow",e)}let ri=(0,tK.default)("MuiTableRow",["root","selected","hover","head","footer"]),rs=(0,tN.styled)("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.head&&t.head,r.footer&&t.footer]}})((0,tQ.default)(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${ri.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${ri.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)}}}))),rl=n.forwardRef(function(e,r){let a=(0,eL.useDefaultProps)({props:e,name:"MuiTableRow"}),{className:o,component:i="tr",hover:s=!1,selected:l=!1,...c}=a,u=n.useContext(tJ),d={...a,component:i,hover:s,selected:l,head:u&&"head"===u.variant,footer:u&&"footer"===u.variant},f=(e=>{let{classes:t,selected:r,hover:n,head:a,footer:o}=e;return(0,tq.default)({root:["root",r&&"selected",n&&"hover",a&&"head",o&&"footer"]},ro,t)})(d);return(0,t.jsx)(rs,{as:i,ref:r,className:(0,tF.default)(f.root,o),role:"tr"===i?null:"row",ownerState:d,...c})});var rc=e.i(149813),ru=e.i(227751),rd=e.i(568029);function rf(e){return Object.values(e).every(e=>null===e)?[(0,t.jsx)(eu.default,{sx:{ml:"10px"},children:"No information"},"no info")]:Object.entries(e).filter(([e,t])=>"url"!==e&&null!=t).map(([e,r])=>(0,t.jsxs)("li",{style:{marginLeft:"10px"},children:[e,": ",r]},e))}function rh(){let{envInfo:e,reviewMode:r,lineageGraph:a}=(0,ee.useLineageGraphContext)(),[o,i]=(0,n.useState)(!1),s=e?.git,l=e?.pullRequest,c={...s,...l},u=e?.dbt?.base,d=e?.dbt?.current,f=u?.generated_at?(0,V.formatTimestamp)(u.generated_at):"",h=d?.generated_at?(0,V.formatTimestamp)(d.generated_at):"",p="",m="";u&&(p=u.generated_at?(0,V.formatTimeToNow)(u.generated_at):""),d&&(m=d.generated_at?(0,V.formatTimeToNow)(d.generated_at):"");let[g,x]=(0,rd.extractSchemas)(a),y=(0,n.useRef)(!1);(0,n.useEffect)(()=>{if(!y.current&&e){let t,n,a,o,i;y.current=!0;let s=(t=e?.git,n=e?.pullRequest,a=e?.dbt?.base,o=e?.dbt?.current,i={review_mode:r||!1,adapter_type:e?.adapterType||null,has_git_info:!(0,rc.default)(t),has_pr_info:!(0,rc.default)(n)},e?.adapterType==="dbt"&&(i.base={schema_count:g.size,dbt_version:a?.dbt_version||null,timestamp:a?.generated_at||null},i.current={schema_count:x.size,dbt_version:o?.dbt_version||null,timestamp:o?.generated_at||null},i.schemas_match=g.size===x.size&&Array.from(g).every(e=>x.has(e))),e?.adapterType==="sqlmesh"&&(i.base={has_env:!!e.sqlmesh?.base_env},i.current={has_env:!!e.sqlmesh?.current_env}),i);(0,er.trackEnvironmentConfig)(s)}},[e,r,g,x]);let b=()=>i(!1);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(tS.default,{title:"Environment Info",placement:"bottom-end",children:(0,t.jsxs)(eu.default,{sx:{display:"flex",alignItems:"center",cursor:"pointer","&:hover":{color:"text.primary"}},onClick:()=>i(!0),children:[(0,t.jsxs)(eh.default,{direction:"column",sx:{display:{xs:"none",lg:"flex"},fontSize:"0.875rem"},children:[(0,t.jsxs)(eu.default,{sx:{display:"flex",gap:.5},children:[(0,t.jsx)(W.default,{component:"span",noWrap:!0,sx:{color:"warning.main",maxWidth:128},className:"no-track-pii-safe",children:Array.from(g).join(", ")})," ","(",p,")"]}),(0,t.jsxs)(eu.default,{sx:{display:"flex",gap:.5},children:[(0,t.jsx)(W.default,{component:"span",noWrap:!0,sx:{color:"primary.main",maxWidth:128},className:"no-track-pii-safe",children:Array.from(x).join(", ")})," ","(",m,")"]})]}),(0,t.jsx)(q.default,{size:"small","aria-label":"Environment Info",children:(0,t.jsx)(eu.default,{component:ec.PiInfo,sx:{fontSize:16,verticalAlign:"middle"}})})]})}),(0,t.jsxs)(z.default,{open:o,onClose:b,maxWidth:"sm",fullWidth:!0,children:[(0,t.jsxs)(F.default,{sx:{display:"flex",alignItems:"center"},children:["Environment Information",(0,t.jsx)(eu.default,{sx:{flexGrow:1}}),(0,t.jsx)(q.default,{size:"small",onClick:b,children:(0,t.jsx)(K.IoClose,{})})]}),(0,t.jsx)(L.default,{children:(0,t.jsxs)(eh.default,{direction:"column",spacing:1,children:[r?(0,t.jsxs)(eh.default,{direction:"column",spacing:.5,children:[(0,t.jsx)(W.default,{variant:"h6",sx:{fontSize:"1rem"},children:"Review Information"}),(0,t.jsxs)("ul",{style:{margin:0,paddingLeft:"20px"},children:[c.url&&(0,t.jsxs)("li",{style:{marginLeft:"10px"},children:["url:"," ",(0,t.jsxs)(ed.default,{href:c.url,target:"_blank",sx:{color:"primary.main"},children:[c.url," ",(0,t.jsx)(ru.LuExternalLink,{})]})]}),!(0,rc.default)(c)&&rf(c)]})]}):(0,t.jsxs)(eh.default,{direction:"column",spacing:.5,children:[(0,t.jsx)(W.default,{variant:"h6",sx:{fontSize:"1rem"},children:"Dev Information"}),(0,t.jsx)("ul",{style:{margin:0,paddingLeft:"20px"},children:s&&rf(s)})]}),(0,t.jsx)(tL.default,{}),e?.adapterType==="dbt"&&(0,t.jsxs)(eh.default,{direction:"column",spacing:.5,children:[(0,t.jsx)(W.default,{variant:"h6",sx:{fontSize:"1rem"},children:"DBT"}),(0,t.jsx)(t9,{sx:{border:1,borderColor:"divider",maxHeight:"30rem"},children:(0,t.jsxs)(tV,{size:"small",stickyHeader:!0,children:[(0,t.jsx)(ra,{children:(0,t.jsxs)(rl,{children:[(0,t.jsx)(t4,{}),(0,t.jsx)(t4,{children:"base"}),(0,t.jsx)(t4,{children:"current"})]})}),(0,t.jsxs)(t1,{children:[(0,t.jsxs)(rl,{children:[(0,t.jsx)(t4,{children:"schema"}),(0,t.jsx)(t4,{className:"no-track-pii-safe",children:Array.from(g).map(e=>(0,t.jsx)(tS.default,{title:e,placement:"bottom",children:(0,t.jsx)("div",{className:"max-w-72 truncate",children:e})},e))}),(0,t.jsx)(t4,{className:"no-track-pii-safe",children:Array.from(x).map(e=>(0,t.jsx)(tS.default,{title:e,placement:"bottom",children:(0,t.jsx)("div",{className:"max-w-72 truncate",children:e})},e))})]}),(0,t.jsxs)(rl,{children:[(0,t.jsx)(t4,{children:"version"}),(0,t.jsx)(t4,{children:u?.dbt_version}),(0,t.jsx)(t4,{children:d?.dbt_version})]}),(0,t.jsxs)(rl,{children:[(0,t.jsx)(t4,{children:"timestamp"}),(0,t.jsx)(t4,{children:f}),(0,t.jsx)(t4,{children:h})]})]})]})})]}),e?.adapterType==="sqlmesh"&&(0,t.jsxs)(eh.default,{direction:"column",spacing:.5,children:[(0,t.jsx)(W.default,{variant:"h6",sx:{fontSize:"1rem"},children:"SQLMesh"}),(0,t.jsx)(t9,{sx:{border:1,borderColor:"divider",maxHeight:"30rem"},children:(0,t.jsxs)(tV,{stickyHeader:!0,children:[(0,t.jsx)(ra,{children:(0,t.jsxs)(rl,{children:[(0,t.jsx)(t4,{}),(0,t.jsx)(t4,{children:"base"}),(0,t.jsx)(t4,{children:"current"})]})}),(0,t.jsx)(t1,{children:(0,t.jsxs)(rl,{children:[(0,t.jsx)(t4,{children:"Environment"}),(0,t.jsx)(t4,{className:"no-track-pii-safe",children:e.sqlmesh?.base_env}),(0,t.jsx)(t4,{className:"no-track-pii-safe",children:e.sqlmesh?.current_env})]})})]})})]})]})}),(0,t.jsx)(D.default,{children:(0,t.jsx)($.default,{color:"iochmara",onClick:b,children:"Close"})})]})]})}var rp=e.i(194663),rm=e.i(738019),rg=e.i(468595),rx=e.i(269214),ry=e.i(354290),rb=e.i(560547);let rv=()=>{var e;let a,{featureToggles:o}=(0,P.useRecceInstanceContext)(),{fileName:i,cloudMode:s,isDemoSite:l,envInfo:c}=(0,ee.useLineageGraphContext)(),{apiClient:u}=(0,ea.useApiConfig)(),[d,f]=(0,n.useState)(!1),[h,p]=(0,n.useState)(!1),m=!i&&!s&&!l,{data:g}=(0,tw.useChecks)(m),x=void 0!=g&&g.filter(e=>!e.is_preset).length>0;e=m&&x,(0,n.useEffect)(()=>{let t=e=>{e.preventDefault()};return e&&window.addEventListener("beforeunload",t),()=>{e&&window.removeEventListener("beforeunload",t)}},[e]);let[{newFileName:y,errorMessage:b,modified:v,overwriteWithMethod:j,bypass:C},w]=(0,n.useState)({newFileName:i??"recce_state.json",bypass:!1}),S=(0,n.useRef)(null),{toastSuccess:k,toastError:T}={toastSuccess:e=>{Y.toaster.create({description:e,type:"success",duration:5e3,closable:!0})},toastError:(e,t)=>{let r=e;null!=t&&(r=(0,rx.isAxiosError)(t)?`${e}. ${String(t.response?.data?.detail)}`:`${e}. ${t}`),Y.toaster.create({description:r,type:"error",duration:5e3,closable:!0})}},O=(0,r.useQueryClient)(),_=()=>f(!1),M=()=>p(!1),R=async(e,t)=>{if(!y)return;let r="true"===localStorage.getItem(ry.LOCAL_STORAGE_KEYS.bypassSaveOverwrite);try{"save"===e?await (0,rb.saveAs)({filename:y,overwrite:t??r},u):await (0,rb.rename)({filename:y,overwrite:t??r},u),k("save"===e?"Save file successfully":"Rename file successfully"),await O.invalidateQueries({queryKey:B.cacheKeys.lineage()}),C&&localStorage.setItem(ry.LOCAL_STORAGE_KEYS.bypassSaveOverwrite,"true")}catch(t){if((0,rx.isAxiosError)(t)&&t.response?.status===409){w(t=>({...t,overwriteWithMethod:e})),p(!0);return}T("save"===e?"Save file failed":"Rename file failed",t)}finally{_()}};if(s||l)return(0,t.jsx)(t.Fragment,{});if(o.disableSaveToFile&&i){let e=c?.stateMetadata?.generated_at,t=e?tT(new Date(e)):null;a=t?`${i} (${t})`:null}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(eh.default,{direction:"row",alignItems:"center",justifyContent:"center",children:[(0,t.jsx)(eu.default,{sx:{fontWeight:600},children:a??i??"New Instance"+(x?" (unsaved)":"")}),!o.disableSaveToFile&&(0,t.jsx)(tS.default,{title:i?"Change Filename":"Save",enterDelay:1e3,children:(0,t.jsx)(q.default,{onClick:()=>{w({newFileName:i??"recce_state.json",modified:!i,bypass:!1}),f(!0)},"aria-label":i?"Change Filename":"Save",size:"small",children:(0,t.jsx)(eu.default,{component:i?ec.PiPencil:ru.LuSave,sx:{fontSize:16,verticalAlign:"middle"}})})})]}),(0,t.jsxs)(z.default,{open:d,onClose:_,children:[(0,t.jsxs)(F.default,{sx:{display:"flex",alignItems:"center"},children:[i?"Change Filename":"Save File",(0,t.jsx)(eu.default,{sx:{flexGrow:1}}),(0,t.jsx)(q.default,{size:"small",onClick:_,children:(0,t.jsx)(K.IoClose,{})})]}),(0,t.jsx)(L.default,{onKeyDown:e=>{e.stopPropagation()},children:(0,t.jsx)(rg.default,{inputRef:S,value:y,label:"File name",placeholder:"Enter filename",error:!!b,helperText:b,fullWidth:!0,size:"small",sx:{mt:1},onChange:e=>{let t,r=e.target.value;r?r.endsWith(".json")?/^[a-zA-Z0-9 _-]+\.json$/.test(r)?i&&r===i&&(t="Filename is the same as the current one."):t="Invalid filename. Only alphanumeric, space, _ and - are allowed.":t="Filename must end with .json.":t="Filename cannot be empty.",w(e=>({...e,modified:!0,newFileName:r,errorMessage:t}))},onKeyDown:e=>{"Enter"===e.key?b||(i?R("rename"):R("save")):"Escape"===e.key&&_()}})}),(0,t.jsxs)(D.default,{sx:{gap:"5px"},children:[(0,t.jsx)($.default,{size:"small",color:i?"inherit":"iochmara",variant:"contained",onClick:async()=>{await R("save")},disabled:!y||!!b||!v,children:i?"Save as New File":"Confirm"}),i&&(0,t.jsx)($.default,{size:"small",color:"iochmara",variant:"contained",onClick:async()=>{await R("rename")},disabled:!y||!!b||!v,children:"Rename"})]})]}),(0,t.jsxs)(z.default,{open:h,onClose:M,children:[(0,t.jsxs)(F.default,{sx:{display:"flex",alignItems:"center"},children:["Overwrite File?",(0,t.jsx)(eu.default,{sx:{flexGrow:1}}),(0,t.jsx)(q.default,{size:"small",onClick:M,children:(0,t.jsx)(K.IoClose,{})})]}),(0,t.jsxs)(L.default,{sx:{borderTop:"solid 1px",borderBottom:"solid 1px",borderColor:"divider"},onKeyDown:e=>{e.stopPropagation()},children:[(0,t.jsx)(W.default,{sx:{fontSize:"12pt"},children:"save"===j?"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?"}),(0,t.jsx)(rm.default,{control:(0,t.jsx)(rp.default,{size:"small",checked:C,onChange:e=>{w(t=>({...t,bypass:e.target.checked}))}}),label:(0,t.jsx)(W.default,{sx:{fontWeight:"bold",pt:"8px"},children:"Don't show this again"})})]}),(0,t.jsxs)(D.default,{sx:{gap:"5px"},children:[(0,t.jsx)($.default,{variant:"outlined",onClick:()=>{M(),f(!0),w(e=>({...e,overwriteWithMethod:void 0}))},size:"small",children:"Back"}),(0,t.jsx)($.default,{size:"small",color:"iochmara",variant:"contained",onClick:()=>{j&&(R(j,!0),M())},children:"Overwrite"})]})]})]})};var rj=e.i(230902),rC=e.i(82114);function rw(){let{featureToggles:e}=(0,P.useRecceInstanceContext)(),{apiClient:r}=(0,ea.useApiConfig)(),n=async()=>{try{let e=await (0,rb.exportState)(r),t=JSON.stringify(e,null,2),n=new Blob([t],{type:"application/json"}),a=new Date,o=`recce-state-${(0,rj.format)(a,"yyyy-MM-dd-HH-mm-ss")}.json`;(0,rC.default)(n,o)}catch(e){console.error("Export failed",e),Y.toaster.create({title:"Export failed",description:String(e),type:"error",duration:5e3,closable:!0})}};return(0,t.jsx)(tS.default,{title:"Export",children:(0,t.jsx)(q.default,{size:"small","aria-label":"Export state",onClick:async()=>{await n(),(0,er.trackStateAction)({name:"export"})},disabled:e.disableExportStateFile,children:(0,t.jsx)(eu.default,{component:ec.PiExport,sx:{verticalAlign:"middle",width:"16px",height:"16px"}})})})}var rS=e.i(878678),rk=e.i(250646),rT=e.i(117343);let rO=["Processing...","Still processing, please wait...","Almost there, thanks for your patience..."];function r_(){let{successToast:e,failToast:r}=(0,rT.useClipBoardToast)(),[,a]=(0,rk.useCopyToClipboard)(),{authed:o}=(0,P.useRecceInstanceContext)(),{shareUrl:i,isLoading:s,error:l,handleShareClick:c}=(0,ej.useRecceShareStateContext)(),[u,d]=(0,n.useState)(!1),[f,h]=(0,n.useState)(0),[p,m]=(0,n.useState)(s);s!==p&&(m(s),s&&h(0)),(0,rk.useInterval)(()=>{h(e=>Math.min(e+1,rO.length-1))},s?3e4:null),(0,n.useEffect)(()=>{l&&r("Failed to share state",l)},[l,r]);let g=async()=>{try{await a(String(i)),e("Copied the link to clipboard")}catch(e){r("Failed to copy the link",e)}};return o?(0,t.jsxs)(eh.default,{direction:"row",sx:{flex:1,alignItems:"center",gap:"5px"},children:[(0,t.jsx)($.default,{size:"xsmall",variant:"outlined",color:"neutral",startIcon:(0,t.jsx)(rS.TbCloudUpload,{}),endIcon:i?(0,t.jsx)(eu.default,{component:ec.PiCheckCircle,sx:{color:"success.main"}}):void 0,onClick:async()=>{await c(),(0,er.trackShareState)({name:"create"})},disabled:s,children:s?"Sharing...":"Share"}),s&&(0,t.jsx)(W.default,{sx:{fontSize:14,color:"grey.500"},children:rO[f]}),(0,t.jsx)(eh.default,{direction:"row",spacing:.5,alignItems:"center",children:i&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eu.default,{sx:{overflowX:"auto",whiteSpace:"nowrap",maxWidth:"350px"},children:(0,t.jsx)(W.default,{sx:{fontSize:14},children:i})}),(0,t.jsx)(q.default,{size:"small","aria-label":"Copy the share URL",onClick:async()=>{await g(),(0,er.trackShareState)({name:"copy"})},children:(0,t.jsx)(ec.PiCopy,{})})]})})]}):(0,t.jsxs)(eh.default,{direction:"row",sx:{flex:1,alignItems:"center"},children:[(0,t.jsx)($.default,{size:"xsmall",color:"neutral",variant:"outlined",onClick:()=>{d(!0)},startIcon:(0,t.jsx)(rS.TbCloudUpload,{}),children:"Share"}),u&&(0,t.jsx)(t$.default,{parentOpen:u,handleParentClose:d,ignoreCookie:!0,variant:"enable-share"})]})}var rM=e.i(954052),rR=e.i(91766);function rE(){return(0,t.jsx)(tS.default,{title:"Syncing",children:(0,t.jsx)(eu.default,{sx:{mx:"10px"},children:(0,t.jsx)(tv.default,{size:20})})})}function rI(){let[e,a]=(0,n.useState)(!1),o=(0,r.useQueryClient)(),{apiClient:i}=(0,ea.useApiConfig)(),s=(0,es.useRouter)(),l=(0,es.usePathname)(),{basePath:c}=(0,ey.useRouteConfig)(),[u,d]=(0,n.useState)(!1),[f,h]=(0,n.useState)(""),{data:p}=(0,w.useRecceInstanceInfo)(),m=()=>d(!1),g=(0,n.useCallback)(async e=>{if(d(!1),a(!0),"conflict"===(await (0,rb.syncState)(e,i)).status){d(!0),a(!1);return}for(;await (0,rb.isStateSyncing)(i);)await new Promise(e=>setTimeout(e,1e3));Y.toaster.create({description:"Sync Completed",type:"success",duration:5e3,closable:!0}),a(!1),h(""),await o.invalidateQueries({queryKey:B.cacheKeys.lineage()}),await o.invalidateQueries({queryKey:B.cacheKeys.checks()}),await o.invalidateQueries({queryKey:B.cacheKeys.runs()}),/^\/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(l)&&s.push(`${c}/checks`)},[o,l,i,s.push,c]);return e?(0,t.jsx)(rE,{}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(tS.default,{title:"Sync with Cloud",children:(0,t.jsx)(q.default,{size:"small","aria-label":"Sync state",onClick:()=>g(p?.session_id?{method:"merge"}:{}),children:(0,t.jsx)(eu.default,{component:K.IoSync,sx:{fontSize:16,verticalAlign:"middle"}})})}),(0,t.jsxs)(z.default,{open:u,onClose:m,children:[(0,t.jsxs)(F.default,{sx:{display:"flex",alignItems:"center",fontWeight:"bold"},children:["Sync with Cloud",(0,t.jsx)(eu.default,{sx:{flexGrow:1}}),(0,t.jsx)(q.default,{size:"small",onClick:m,children:(0,t.jsx)(K.IoClose,{})})]}),(0,t.jsxs)(L.default,{children:[(0,t.jsx)(W.default,{children:"New changes have been detected in the cloud. Please choose a method to sync your state"}),(0,t.jsx)(eu.default,{sx:{mt:"5px"},children:(0,t.jsx)(rR.default,{value:f,onChange:e=>{h(e.target.value)},children:(0,t.jsxs)(eh.default,{direction:"column",children:[(0,t.jsx)(rm.default,{value:"merge",control:(0,t.jsx)(rM.default,{}),label:(0,t.jsxs)(eh.default,{direction:"row",alignItems:"center",children:["Merge",(0,t.jsx)(tS.default,{title:"This will merge the local and remote states.",children:(0,t.jsx)(eu.default,{component:ec.PiInfo,sx:{ml:2,cursor:"pointer"}})})]})}),(0,t.jsx)(rm.default,{value:"overwrite",control:(0,t.jsx)(rM.default,{}),label:(0,t.jsxs)(eh.default,{direction:"row",alignItems:"center",children:["Overwrite",(0,t.jsx)(tS.default,{title:"This will overwrite the remote state file with the local state.",children:(0,t.jsx)(eu.default,{component:ec.PiInfo,sx:{ml:2,cursor:"pointer"}})})]})}),(0,t.jsx)(rm.default,{value:"revert",control:(0,t.jsx)(rM.default,{}),label:(0,t.jsxs)(eh.default,{direction:"row",alignItems:"center",children:["Revert",(0,t.jsx)(tS.default,{title:"This will discard local changes and revert to the cloud state.",children:(0,t.jsx)(eu.default,{component:ec.PiInfo,sx:{ml:2,cursor:"pointer"}})})]})})]})})})]}),(0,t.jsxs)(D.default,{children:[(0,t.jsx)($.default,{onClick:m,sx:{mr:1},children:"Cancel"}),(0,t.jsx)($.default,{color:"iochmara",variant:"contained",onClick:()=>g({method:f||void 0}),disabled:!f,children:"Sync"})]})]})]})}let rP=[{path:"/lineage",name:"Lineage"},{path:"/query",name:"Query"},{path:"/checks",name:"Checklist"}];function rA({queryKey:e,fetchCallback:r,selectCallback:n}){let{data:a,isLoading:o,error:i}=(0,N.useQuery)({queryKey:e,queryFn:r,select:n});return o||i||0===a?(0,t.jsx)(t.Fragment,{}):(0,t.jsx)(eu.default,{bgcolor:"brand.main",display:"flex",justifyContent:"center",alignItems:"center",p:1,borderRadius:"100%",color:"white",fontWeight:700,fontSize:"0.75rem",children:(0,t.jsx)("span",{children:a})})}function r$(){let{apiClient:e}=(0,ea.useApiConfig)();return(0,t.jsx)(rA,{queryKey:B.cacheKeys.checks(),fetchCallback:()=>(0,tw.listChecks)(e),selectCallback:e=>e.filter(e=>!e.is_checked).length})}let rz=()=>{let e=(0,es.usePathname)(),{isDemoSite:r,isLoading:a,cloudMode:o}=(0,ee.useLineageGraphContext)(),{featureToggles:i}=(0,P.useRecceInstanceContext)(),{data:s,isLoading:l}=(0,et.useRecceServerFlag)(),c=(0,n.useRef)(null);(0,n.useEffect)(()=>{c.current&&c.current!==e&&(0,er.trackNavigation)({from:c.current,to:e}),c.current=e},[e]);let u=(0,n.useMemo)(()=>e.startsWith("/checks")?"/checks":e.startsWith("/query")?"/query":e.startsWith("/runs")?"/runs":"/lineage",[e]);return(0,t.jsx)(eu.default,{sx:{borderBottom:"1px solid lightgray",px:"12px"},children:(0,t.jsxs)(eu.default,{sx:{display:"grid",gridTemplateColumns:"1fr auto 1fr",width:"100%",alignItems:"center"},children:[(0,t.jsx)(tD.default,{value:u,sx:{borderBottom:"none",minHeight:"auto"},children:rP.map(({path:e,name:r})=>"Query"===r&&s?.single_env_onboarding?null:"Checklist"===r&&r$?(0,t.jsx)(tz.default,{value:e,disabled:a||l,sx:{p:0},label:(0,t.jsx)(eu.default,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:(0,t.jsxs)(Q.default,{href:e,style:{textDecoration:"none",color:"inherit",padding:"0.875rem 1.1875rem",display:"flex",gap:3,alignItems:"center"},children:[r," ",(0,t.jsx)(r$,{})]})})},e):(0,t.jsx)(tz.default,{value:e,disabled:a||l,sx:{p:0},label:(0,t.jsx)(eu.default,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:(0,t.jsx)(Q.default,{href:e,style:{textDecoration:"none",color:"inherit",padding:"0.875rem 1.1875rem"},children:r})})},e))}),(0,t.jsxs)(eu.default,{sx:{display:"flex",alignItems:"center",gap:"12px",justifyContent:"center"},children:[!a&&!r&&(0,t.jsx)(rv,{}),!a&&!r&&!s?.single_env_onboarding&&!i.disableShare&&(0,t.jsx)(r_,{})]}),!a&&(0,t.jsxs)(eu.default,{sx:{display:"flex",justifyContent:"right",alignItems:"center",mr:"8px"},children:[(0,t.jsx)(rh,{}),o&&(0,t.jsx)(rI,{}),(0,t.jsx)(rw,{})]})]})})},rD=function(e){let t=n.useRef({});return n.useEffect(()=>{t.current=e}),t.current},rL=function(e){let{badgeContent:t,invisible:r=!1,max:n=99,showZero:a=!1}=e,o=rD({badgeContent:t,max:n}),i=r;!1!==r||0!==t||a||(i=!0);let{badgeContent:s,max:l=n}=i?o:e,c=s&&Number(s)>l?`${l}+`:s;return{badgeContent:s,invisible:i,max:l,displayValue:c}};var rF=e.i(234308);function rq(e){return(0,tH.default)("MuiBadge",e)}let rW=(0,tK.default)("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]);var rN=e.i(707706);let rQ=(0,tN.styled)("span",{name:"MuiBadge",slot:"Root"})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),rK=(0,tN.styled)("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.badge,t[r.variant],t[`anchorOrigin${(0,t5.default)(r.anchorOrigin.vertical)}${(0,t5.default)(r.anchorOrigin.horizontal)}${(0,t5.default)(r.overlap)}`],"default"!==r.color&&t[`color${(0,t5.default)(r.color)}`],r.invisible&&t.invisible]}})((0,tQ.default)(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter((0,rF.default)(["contrastText"])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}})),{props:{variant:"dot"},style:{borderRadius:4,height:8,minWidth:8,padding:0}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${rW.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${rW.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${rW.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${rW.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${rW.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${rW.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${rW.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${rW.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]})));function rH(e){return{vertical:e?.vertical??"top",horizontal:e?.horizontal??"right"}}let rB=n.forwardRef(function(e,r){let n=(0,eL.useDefaultProps)({props:e,name:"MuiBadge"}),{anchorOrigin:a,className:o,classes:i,component:s,components:l={},componentsProps:c={},children:u,overlap:d="rectangular",color:f="default",invisible:h=!1,max:p=99,badgeContent:m,slots:g,slotProps:x,showZero:y=!1,variant:b="standard",...v}=n,{badgeContent:j,invisible:C,max:w,displayValue:S}=rL({max:p,invisible:h,badgeContent:m,showZero:y}),k=rD({anchorOrigin:rH(a),color:f,overlap:d,variant:b,badgeContent:m}),T=C||null==j&&"dot"!==b,{color:O=f,overlap:_=d,anchorOrigin:M,variant:R=b}=T?k:n,E=rH(M),I="dot"!==R?S:void 0,P={...n,badgeContent:j,invisible:T,max:w,displayValue:I,showZero:y,anchorOrigin:E,color:O,overlap:_,variant:R},A=(e=>{let{color:t,anchorOrigin:r,invisible:n,overlap:a,variant:o,classes:i={}}=e,s={root:["root"],badge:["badge",o,n&&"invisible",`anchorOrigin${(0,t5.default)(r.vertical)}${(0,t5.default)(r.horizontal)}`,`anchorOrigin${(0,t5.default)(r.vertical)}${(0,t5.default)(r.horizontal)}${(0,t5.default)(a)}`,`overlap${(0,t5.default)(a)}`,"default"!==t&&`color${(0,t5.default)(t)}`]};return(0,tq.default)(s,rq,i)})(P),$={slots:{root:g?.root??l.Root,badge:g?.badge??l.Badge},slotProps:{root:x?.root??c.root,badge:x?.badge??c.badge}},[z,D]=(0,rN.default)("root",{elementType:rQ,externalForwardedProps:{...$,...v},ownerState:P,className:(0,tF.default)(A.root,o),ref:r,additionalProps:{as:s}}),[L,F]=(0,rN.default)("badge",{elementType:rK,externalForwardedProps:$,ownerState:P,className:A.badge});return(0,t.jsxs)(z,{...D,children:[u,(0,t.jsx)(L,{...F,children:I})]})});var rU=e.i(473287),rG=e.i(109253);function rV(){let{remainingSeconds:e,isEnabled:r}=I();return!r||null===e||e>60?null:(0,t.jsxs)(rB,{color:"warning",variant:"standard",sx:{display:"flex",alignItems:"center",gap:1,fontSize:"0.75rem",mr:2},children:[(0,t.jsx)(eu.default,{component:K.IoWarning,sx:{display:"inline-flex"}}),"Idle timeout: ",(0,V.formatDuration)(e,"compact")]})}var rJ=e.i(600395),rX=e.i(139023),rY=e.i(734499),rZ=e.i(765165),r0=e.i(278013),r1=e.i(548878);function r5(){var e;let{apiClient:r}=(0,ea.useApiConfig)(),{data:a,isLoading:o,error:i}=(0,N.useQuery)({queryKey:B.cacheKeys.user(),queryFn:()=>(0,r1.fetchUser)(r),retry:!1}),{data:s}=(0,N.useQuery)({queryKey:["github-avatar",a?.id],queryFn:()=>a?(0,r1.fetchGitHubAvatar)(a.id):Promise.resolve(null),enabled:!!a?.id&&"github"===a.login_type,retry:!1,staleTime:3e5}),[l,c]=(0,n.useState)(null),u=e=>{c(e.currentTarget)},d=()=>{c(null)},f=!o&&!i&&a;return(0,t.jsxs)(t.Fragment,{children:[o?(0,t.jsx)(eu.default,{onClick:u,sx:{width:32,height:32,borderRadius:"50%",bgcolor:"background.paper",color:"primary.main",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},children:(0,t.jsx)(tv.default,{size:16})}):(0,t.jsx)(rJ.default,{onClick:u,src:s||void 0,sx:{width:28,height:28,cursor:"pointer",outline:"1px solid white",fontSize:"0.875rem"},children:(e=a?.login)?e.charAt(0).toUpperCase():"U"}),(0,t.jsxs)(rZ.default,{anchorEl:l,open:!!l,onClose:d,slotProps:{paper:{sx:{bgcolor:"background.paper",borderColor:"divider",boxShadow:3,minWidth:180}}},children:[(0,t.jsxs)(eu.default,{sx:{px:2,py:1.5},children:[o&&(0,t.jsxs)(eu.default,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,t.jsx)(W.default,{variant:"body2",color:"text.primary",children:"Loading..."}),(0,t.jsx)(tv.default,{size:16})]}),i&&(0,t.jsx)(W.default,{variant:"caption",color:"error",children:"Failed to load user information"}),f&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(W.default,{variant:"body2",fontWeight:"600",color:"text.primary",children:a.login}),a.email&&(0,t.jsx)(W.default,{variant:"caption",color:"text.secondary",children:a.email})]})]}),(0,t.jsx)(tL.default,{}),(0,t.jsxs)(r0.default,{onClick:()=>{window.open("https://cloud.datarecce.io/","_blank"),d()},children:[(0,t.jsx)(rX.default,{children:(0,t.jsx)(tC.FaCloud,{})}),(0,t.jsx)(rY.default,{children:"Recce Cloud"})]}),(0,t.jsxs)(r0.default,{onClick:()=>{window.open(en.RECCE_SUPPORT_CALENDAR_URL,"_blank"),d()},children:[(0,t.jsx)(rX.default,{children:(0,t.jsx)(tC.FaUser,{})}),(0,t.jsx)(rY.default,{children:"Get live support"})]})]})]})}let r2=()=>{let{setTheme:e,resolvedTheme:r}=u(),[a,o]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{o(!0)},[]),!a)return(0,t.jsx)(q.default,{size:"small",sx:{color:"rgba(255, 255, 255, 0.8)","&:hover":{bgcolor:"rgba(255, 255, 255, 0.1)"}},disabled:!0,children:(0,t.jsx)(ec.PiSun,{style:{width:18,height:18}})});let i="dark"===r;return(0,t.jsx)(tS.default,{title:i?"Switch to light mode":"Switch to dark mode",children:(0,t.jsx)(q.default,{size:"small",onClick:()=>{e("dark"===r?"light":"dark")},sx:{color:"rgba(255, 255, 255, 0.8)","&:hover":{bgcolor:"rgba(255, 255, 255, 0.1)"}},"aria-label":i?"Switch to light mode":"Switch to dark mode",children:i?(0,t.jsx)(ec.PiSun,{style:{width:18,height:18}}):(0,t.jsx)(ec.PiMoon,{style:{width:18,height:18}})})})},r6=k.default.create();async function r8(e){return(await e.get("/api/version")).data}let r4=()=>{let{version:e,latestVersion:r}=function(){let[e,t]=(0,n.useState)(""),[r,a]=(0,n.useState)(""),o=(0,y.useApiConfigOptional)(),i=o?.apiClient??r6;return(0,n.useEffect)(()=>{!async function(){try{let{version:e,latestVersion:r}=await r8(i);t(e),a(r)}catch(e){console.error("Error fetching version number:",e)}}()},[i]),{version:e,latestVersion:r}}(),a=(0,n.useMemo)(()=>RegExp("^\\d+\\.\\d+\\.\\d+$"),[]);return((0,n.useEffect)(()=>{if(a.test(e)&&e!==r){let e="recce-update-toast-shown";sessionStorage.getItem(e)||setTimeout(()=>{Y.toaster.create({id:"recce-update-available",title:"Update available",description:(0,t.jsxs)("span",{children:["A new version of Recce (v",r,") is available.",(0,t.jsx)("br",{}),"Please run"," ",(0,t.jsx)(eu.default,{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.",(0,t.jsx)("br",{}),(0,t.jsx)(ed.default,{sx:{color:"primary.main",fontWeight:"bold","&:hover":{textDecoration:"underline"}},href:`https://github.com/DataRecce/recce/releases/tag/v${r}`,target:"_blank",children:"Click here to view the detail of latest release"})]}),duration:6e4,closable:!0}),sessionStorage.setItem(e,"true")},0)}},[e,r,a]),a.test(e))?(0,t.jsx)(ed.default,{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}):(0,t.jsx)(W.default,{component:"span",sx:{fontSize:"sm",color:"rgba(255,255,255,0.8)",textTransform:"uppercase",borderWidth:1,px:1,borderRadius:.75},children:e})};function r3({icon:e,href:r,sx:n,...a}){let o=(0,rU.useTheme)();return(0,t.jsx)(ed.default,{sx:{height:"20px",color:"common.white",...n},href:r,target:"_blank",...a,children:(0,t.jsx)(e,{style:{color:o.palette.common.white,width:20,height:20}})})}let r7=()=>{let{reviewMode:e,isDemoSite:r,envInfo:a,cloudMode:o}=(0,ee.useLineageGraphContext)(),{featureToggles:i,authed:s}=(0,P.useRecceInstanceContext)(),{url:l,id:c}=a?.pullRequest??{},u=l?l.split("/").pop():null,d=o||s?"https://cloud.datarecce.io/":"https://reccehq.com/",[f,h]=(0,n.useState)(!1);return(0,t.jsxs)(eu.default,{sx:{display:"flex",gap:"10px",minHeight:"40px",alignItems:"center",bgcolor:tf.colors.brand[400]},children:[(0,t.jsx)(ed.default,{href:d,target:"_blank",sx:{"&:hover":{textDecoration:"none"}},children:(0,t.jsxs)(eu.default,{sx:{display:"flex",gap:"10px",alignItems:"center"},children:[(0,t.jsx)(eu.default,{component:"img",sx:{width:20,height:20,ml:"18px"},src:"/logo/recce-logo-white.png",alt:"recce-logo-white"}),(0,t.jsx)(W.default,{variant:"h4",sx:{fontFamily:'"Montserrat", sans-serif',color:"common.white",fontSize:"1.25rem"},children:"RECCE"})]})}),(0,t.jsx)(r2,{}),(0,t.jsx)(r4,{}),(i.mode??e)&&(0,t.jsx)(rB,{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"}),o&&c&&(0,t.jsx)(rB,{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:(0,t.jsxs)(eh.default,{direction:"row",spacing:1,alignItems:"center",children:[(0,t.jsx)(eu.default,{children:"cloud mode"}),(0,t.jsx)(eu.default,{sx:{borderLeft:"1px solid rgba(255,255,255,0.8)",pl:"8px"},children:(0,t.jsxs)(ed.default,{href:l,sx:{"&:hover":{textDecoration:"none"}},target:"_blank",children:[(0,t.jsx)(rG.VscGitPullRequest,{style:{color:"rgba(255,255,255,0.8)",width:12,height:12,marginRight:2,display:"inline",verticalAlign:"middle"}}),(0,t.jsx)(W.default,{component:"span",sx:{color:"rgba(255,255,255,0.8)",display:"inline"},children:`#${String(c)}`})]})})]})}),r&&l&&u&&(0,t.jsx)(rB,{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:(0,t.jsxs)(eh.default,{direction:"row",spacing:1,alignItems:"center",children:[(0,t.jsx)(eu.default,{children:"demo mode"}),(0,t.jsx)(eu.default,{sx:{borderLeft:"1px solid rgba(255,255,255,0.8)",pl:"8px"},children:(0,t.jsxs)(ed.default,{href:l,sx:{"&:hover":{textDecoration:"none"}},target:"_blank",children:[(0,t.jsx)(rG.VscGitPullRequest,{style:{color:"rgba(255,255,255,0.8)",width:12,height:12,marginRight:2,display:"inline",verticalAlign:"middle"}}),(0,t.jsx)(W.default,{component:"span",sx:{color:"rgba(255,255,255,0.8)",display:"inline"},children:`#${u}`})]})})]})}),(0,t.jsx)(eu.default,{sx:{flex:1}}),(r||"read only"===i.mode)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r3,{icon:tC.FaGithub,href:"https://github.com/DataRecce/recce"}),(0,t.jsx)(r3,{icon:tC.FaSlack,href:"https://getdbt.slack.com/archives/C05C28V7CPP"}),(0,t.jsx)(r3,{sx:{mr:2},icon:tC.FaQuestionCircle,href:"https://docs.datarecce.io"})]}),!r&&"read only"!==i.mode&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(rV,{}),s||o?(0,t.jsx)(eu.default,{sx:{mr:2},children:(0,t.jsx)(r5,{})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eu.default,{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:()=>{h(!0)},children:"Connect to Cloud"}),f&&(0,t.jsx)(t$.default,{parentOpen:f,handleParentClose:h,ignoreCookie:!0,variant:"user-profile"})]})]})]})};function r9(){return(0,t.jsx)(eu.default,{sx:{display:"flex",height:"100%",alignItems:"center",justifyContent:"center",contain:"size"},children:(0,t.jsx)(eu.default,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:(0,t.jsx)(tv.default,{size:48})})})}function ne({children:e,lineage:r}){let a=(0,es.usePathname)(),{isDemoSite:o,isLoading:i,isCodespace:s}=(0,ee.useLineageGraphContext)(),{featureToggles:l}=(0,P.useRecceInstanceContext)(),c=a.replace(/\/$/,"")||"/";return(0,n.useEffect)(()=>{(0,er.trackInit)()},[]),(0,t.jsxs)(eu.default,{sx:{display:"flex",flexDirection:"column",height:"100vh",overflow:"hidden"},children:[(0,t.jsx)(r7,{}),(0,t.jsx)(rz,{}),(0,t.jsx)(nt,{isLineageRoute:"/lineage"===c||"/"===c,lineage:r,children:e}),!i&&!o&&!s&&null===l.mode&&(0,t.jsx)(t$.default,{})]})}function nt({children:e,lineage:r,isLineageRoute:a,disableInternalHistory:o=!1}){let{isRunResultOpen:i,isHistoryOpen:s,closeRunResult:l}=(0,ex.useRecceActionContext)(),{basePath:c}=(0,ey.useRouteConfig)(),{data:u}=(0,et.useRecceServerFlag)(),d=(0,es.usePathname)(),f=(0,tj.useIsDark)(),h=i&&!d.startsWith(`${c}/checks`),p=!o&&s&&!d.startsWith(`${c}/checks`);return(0,t.jsxs)(tA.HSplit,{sizes:[0,100],minSize:300*!!p,gutterSize:5*!!p,style:{height:"100%"},children:[(0,t.jsx)(eu.default,{style:{contain:"size"},suppressHydrationWarning:!0,children:p&&(0,t.jsx)(tI,{})}),(0,t.jsxs)(tA.VSplit,{sizes:h?[50,50]:[100,0],minSize:100*!!h,gutterSize:5*!!h,style:{flex:"1",contain:"size"},children:[(0,t.jsx)(n.Suspense,{fallback:(0,t.jsx)(r9,{}),children:(0,t.jsxs)(eu.default,{sx:{p:0,contain:"content",height:"100%",position:"relative"},suppressHydrationWarning:!0,children:[(0,t.jsx)(eu.default,{sx:{display:a?"block":"none",height:"100%",position:a?"relative":"absolute",inset:0},children:r}),!a&&e]})}),(0,t.jsx)(eu.default,{sx:{height:"100%",bgcolor:f?"grey.900":"grey.50"},suppressHydrationWarning:!0,children:h?(0,t.jsx)(tP.RunResultPaneOss,{onClose:l,isSingleEnvironment:!!u?.single_env_onboarding}):null})]})]})}function nr({children:e,lineage:n}){return(0,t.jsx)(d,{attribute:"class",defaultTheme:"light",enableSystem:!1,children:(0,t.jsx)(tb,{enableCssBaseline:!0,children:(0,t.jsx)(r.QueryClientProvider,{client:ez,children:(0,t.jsx)(y.ApiProvider,{config:{baseUrl:en.PUBLIC_API_URL},children:(0,t.jsx)(R,{children:(0,t.jsxs)(eC,{children:[(0,t.jsx)(ne,{lineage:n,children:e}),(0,t.jsx)(Y.Toaster,{})]})})})})})})}e.s(["default",()=>nr],889276)},699694,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function({html:e,height:t=null,width:r=null,children:o,dataNtpc:i=""}){return(0,a.useEffect)(()=>{i&&performance.mark("mark_feature_usage",{detail:{feature:`next-third-parties-${i}`}})},[i]),(0,n.jsxs)(n.Fragment,{children:[o,e?(0,n.jsx)("div",{style:{height:null!=t?`${t}px`:"auto",width:null!=r?`${r}px`:"auto"},"data-ntpc":i,dangerouslySetInnerHTML:{__html:e}}):null]})};let n=e.r(991047),a=e.r(600943)},593496,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={cancelIdleCallback:function(){return i},requestIdleCallback:function(){return o}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o="u">typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},i="u">typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},171088,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return b},handleClientScriptLoad:function(){return g},initScriptLoader:function(){return x}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(481258),i=e.r(744066),s=e.r(991047),l=o._(e.r(631467)),c=i._(e.r(600943)),u=e.r(213286),d=e.r(434078),f=e.r(593496),h=new Map,p=new Set,m=e=>{let{src:t,id:r,onLoad:n=()=>{},onReady:a=null,dangerouslySetInnerHTML:o,children:i="",strategy:s="afterInteractive",onError:c,stylesheets:u}=e,f=r||t;if(f&&p.has(f))return;if(h.has(t)){p.add(f),h.get(t).then(n,c);return}let m=()=>{a&&a(),p.add(f)},g=document.createElement("script"),x=new Promise((e,t)=>{g.addEventListener("load",function(t){e(),n&&n.call(this,t),m()}),g.addEventListener("error",function(e){t(e)})}).catch(function(e){c&&c(e)});o?(g.innerHTML=o.__html||"",m()):i?(g.textContent="string"==typeof i?i:Array.isArray(i)?i.join(""):"",m()):t&&(g.src=t,h.set(t,x)),(0,d.setAttributesFromProps)(g,e),"worker"===s&&g.setAttribute("type","text/partytown"),g.setAttribute("data-nscript",s),u&&(e=>{if(l.default.preinit)return e.forEach(e=>{l.default.preinit(e,{as:"style"})});if("u">typeof window){let t=document.head;e.forEach(e=>{let r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,t.appendChild(r)})}})(u),document.body.appendChild(g)};function g(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,f.requestIdleCallback)(()=>m(e))}):m(e)}function x(e){e.forEach(g),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");p.add(t)})}function y(e){let{id:t,src:r="",onLoad:n=()=>{},onReady:a=null,strategy:o="afterInteractive",onError:i,stylesheets:d,...h}=e,{updateScripts:g,scripts:x,getIsSsr:y,appDir:b,nonce:v}=(0,c.useContext)(u.HeadManagerContext);v=h.nonce||v;let j=(0,c.useRef)(!1);(0,c.useEffect)(()=>{let e=t||r;j.current||(a&&e&&p.has(e)&&a(),j.current=!0)},[a,t,r]);let C=(0,c.useRef)(!1);if((0,c.useEffect)(()=>{if(!C.current){if("afterInteractive"===o)m(e);else"lazyOnload"===o&&("complete"===document.readyState?(0,f.requestIdleCallback)(()=>m(e)):window.addEventListener("load",()=>{(0,f.requestIdleCallback)(()=>m(e))}));C.current=!0}},[e,o]),("beforeInteractive"===o||"worker"===o)&&(g?(x[o]=(x[o]||[]).concat([{id:t,src:r,onLoad:n,onReady:a,onError:i,...h,nonce:v}]),g(x)):y&&y()?p.add(t||r):y&&!y()&&m({...e,nonce:v})),b){if(d&&d.forEach(e=>{l.default.preinit(e,{as:"style"})}),"beforeInteractive"===o)if(!r)return h.dangerouslySetInnerHTML&&(h.children=h.dangerouslySetInnerHTML.__html,delete h.dangerouslySetInnerHTML),(0,s.jsx)("script",{nonce:v,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${JSON.stringify([0,{...h,id:t}])})`}});else return l.default.preload(r,h.integrity?{as:"script",integrity:h.integrity,nonce:v,crossOrigin:h.crossOrigin}:{as:"script",nonce:v,crossOrigin:h.crossOrigin}),(0,s.jsx)("script",{nonce:v,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${JSON.stringify([r,{...h,id:t}])})`}});"afterInteractive"===o&&r&&l.default.preload(r,h.integrity?{as:"script",integrity:h.integrity,nonce:v,crossOrigin:h.crossOrigin}:{as:"script",nonce:v,crossOrigin:h.crossOrigin})}return null}Object.defineProperty(y,"__nextScript",{value:!0});let b=y;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},241152,(e,t,r)=>{t.exports=e.r(171088)},613710,(e,t,r)=>{"use strict";var n=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.sendGTMEvent=void 0,r.GoogleTagManager=function(e){let{gtmId:t,gtmScriptUrl:r,dataLayerName:n="dataLayer",auth:l,preview:c,dataLayer:u,nonce:d}=e;s=n;let f=new URL(r||"https://www.googletagmanager.com/gtm.js");return t&&f.searchParams.set("id",t),"dataLayer"!==n&&f.searchParams.set("l",n),l&&f.searchParams.set("gtm_auth",l),c&&(f.searchParams.set("gtm_preview",c),f.searchParams.set("gtm_cookies_win","x")),(0,o.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-gtm"}})},[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.default,{id:"_next-gtm-init",dangerouslySetInnerHTML:{__html:`
|
|
28
|
+
} catch(e){}})();`}},"mui-color-scheme-init")})({colorSchemeStorageKey:i,defaultLightColorScheme:p,defaultDarkColorScheme:m,modeStorageKey:o,...e})}}({themeId:e6.default,theme:()=>(0,to.default)({cssVariables:!0}),colorSchemeStorageKey:"mui-color-scheme",modeStorageKey:"mui-mode",defaultColorScheme:{light:"light",dark:"dark"},resolveTheme:e=>{let t={...e,typography:(0,ti.default)(e.palette,e.typography)};return t.unstable_sx=function(e){return(0,e8.default)({sx:e,theme:this})},t}});function tu({theme:e,...r}){let a=n.useMemo(()=>{if("function"==typeof e)return e;let t=e6.default in e?e[e6.default]:e;return"colorSchemes"in t?null:"vars"in t?e:{...e,vars:null}},[e]);return a?(0,t.jsx)(e4,{theme:a,...r}):(0,t.jsx)(tl,{theme:e,...r})}var td=e.i(102767),tf=e.i(896772);function th(e,t){return[{props:{color:e,variant:"contained"},style:{backgroundColor:`var(--mui-palette-${e}-main, ${t[500]})`,color:`var(--mui-palette-${e}-contrastText, #ffffff)`,"&:hover":{backgroundColor:`var(--mui-palette-${e}-dark, ${t[600]})`}}},{props:{color:e,variant:"outlined"},style:{"&&":{borderColor:`var(--mui-palette-${e}-main, ${t[500]})`,color:`var(--mui-palette-${e}-dark, ${t[600]})`},"&:hover":{borderColor:`var(--mui-palette-${e}-dark, ${t[600]})`,backgroundColor:`color-mix(in srgb, var(--mui-palette-${e}-light, ${t[50]}) 30%, transparent)`}}},{props:{color:e,variant:"text"},style:{"&&":{color:`var(--mui-palette-${e}-dark, ${t[600]})`},"&:hover":{backgroundColor:`color-mix(in srgb, var(--mui-palette-${e}-light, ${t[50]}) 30%, transparent)`}}}]}function tp(e,t){return[{props:{color:e,variant:"filled"},style:{backgroundColor:`var(--mui-palette-${e}-main, ${t[500]})`,color:`var(--mui-palette-${e}-contrastText, #ffffff)`,"&:hover":{backgroundColor:`var(--mui-palette-${e}-dark, ${t[600]})`},"&.MuiChip-clickable:hover":{backgroundColor:`var(--mui-palette-${e}-dark, ${t[600]})`}}},{props:{color:e,variant:"outlined"},style:{"&&":{borderColor:`var(--mui-palette-${e}-main, ${t[500]})`,color:`var(--mui-palette-${e}-dark, ${t[600]})`},"&:hover":{backgroundColor:`color-mix(in srgb, var(--mui-palette-${e}-light, ${t[50]}) 25%, transparent)`}}}]}function tm(e,t){return[{props:{color:e},style:{"& .MuiBadge-badge":{backgroundColor:`var(--mui-palette-${e}-main, ${t[500]})`,color:`var(--mui-palette-${e}-contrastText, #ffffff)`}}}]}function tg(e,t){return[{props:{color:e},style:{color:`var(--mui-palette-${e}-main, ${t[500]})`}}]}let tx={typography:{fontFamily:'-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"',fontSize:14,h1:{fontWeight:600},h2:{fontWeight:600},h3:{fontWeight:600},h4:{fontWeight:600},h5:{fontWeight:600},h6:{fontWeight:600},button:{textTransform:"none",fontWeight:500}},shape:{borderRadius:8},components:{MuiButton:{defaultProps:{disableElevation:!0},styleOverrides:{root:{borderRadius:6,boxShadow:"none",textTransform:"none",fontWeight:500,"&:hover":{boxShadow:"none"}},sizeSmall:{fontSize:"0.8125rem",padding:"4px 10px"},sizeMedium:{padding:"0.5rem 1rem",fontSize:"1rem"},sizeLarge:{padding:"0.75rem 1.5rem",fontSize:"1.125rem"},contained:{"&:hover":{boxShadow:"none"}},outlined:{borderWidth:"1px","&:hover":{borderWidth:"1px"}}},variants:[{props:{size:"xsmall"},style:{fontSize:"0.75rem",padding:"2px 8px",minHeight:24}},...th("brand",tf.colors.brand),...th("iochmara",tf.colors.iochmara),...th("cyan",tf.colors.cyan),...th("amber",tf.colors.amber),...th("green",tf.colors.green),...th("red",tf.colors.red),...th("rose",tf.colors.rose),...th("fuchsia",tf.colors.fuchsia),...th("neutral",tf.colors.neutral)]},MuiChip:{styleOverrides:{root:{borderRadius:6,fontWeight:500},sizeSmall:{fontSize:"0.75rem",height:24},sizeMedium:{height:32,fontSize:"0.875rem"}},variants:[{props:{size:"xsmall"},style:{fontSize:"0.6875rem",height:20,"& .MuiChip-label":{padding:"0 6px"}}},...tp("brand",tf.colors.brand),...tp("iochmara",tf.colors.iochmara),...tp("cyan",tf.colors.cyan),...tp("amber",tf.colors.amber),...tp("green",tf.colors.green),...tp("red",tf.colors.red),...tp("rose",tf.colors.rose),...tp("fuchsia",tf.colors.fuchsia),...tp("neutral",tf.colors.neutral)]},MuiBadge:{variants:[...tm("brand",tf.colors.brand),...tm("iochmara",tf.colors.iochmara)],styleOverrides:{badge:{fontWeight:500,fontSize:"0.75rem"}}},MuiAlert:{styleOverrides:{root:{borderRadius:6},standardSuccess:{backgroundColor:"var(--mui-palette-success-light)",color:"var(--mui-palette-success-dark)","& .MuiAlert-icon":{color:"var(--mui-palette-success-dark)"}},standardWarning:{backgroundColor:"var(--mui-palette-warning-light)",color:"var(--mui-palette-warning-dark)","& .MuiAlert-icon":{color:"var(--mui-palette-warning-dark)"}},standardError:{backgroundColor:"var(--mui-palette-error-light)",color:"var(--mui-palette-error-dark)","& .MuiAlert-icon":{color:"var(--mui-palette-error-dark)"}},standardInfo:{backgroundColor:"var(--mui-palette-info-light)",color:"var(--mui-palette-info-dark)","& .MuiAlert-icon":{color:"var(--mui-palette-info-dark)"}}}},MuiTabs:{styleOverrides:{indicator:{height:2}}},MuiTab:{styleOverrides:{root:{textTransform:"none",fontWeight:500,minHeight:48}}},MuiAvatar:{styleOverrides:{root:{fontWeight:500}}},MuiCircularProgress:{defaultProps:{color:"primary"},variants:[...tg("brand",tf.colors.brand),...tg("iochmara",tf.colors.iochmara)]},MuiLink:{defaultProps:{underline:"hover"},styleOverrides:{root:{fontWeight:500,color:"var(--mui-palette-secondary-main)",textDecorationColor:"var(--mui-palette-secondary-light)","&:hover":{color:"var(--mui-palette-secondary-dark)"}}}},MuiPopover:{styleOverrides:{paper:{borderRadius:8,boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)"}}},MuiDivider:{styleOverrides:{root:{borderColor:"var(--mui-palette-divider)"}}},MuiBreadcrumbs:{styleOverrides:{separator:{color:"var(--mui-palette-text-secondary)"}}},MuiCard:{styleOverrides:{root:{borderRadius:8,boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"}}},MuiPaper:{styleOverrides:{root:{backgroundImage:"none"}}},MuiTooltip:{styleOverrides:{tooltip:{fontSize:"0.75rem"}}},MuiIconButton:{styleOverrides:{root:{borderRadius:6},sizeSmall:{padding:4},sizeMedium:{padding:8},sizeLarge:{padding:12}}},MuiTextField:{defaultProps:{variant:"outlined",size:"small"},styleOverrides:{root:{"& .MuiOutlinedInput-root":{borderRadius:6}}}},MuiOutlinedInput:{styleOverrides:{root:{borderRadius:6,"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"var(--mui-palette-secondary-light)"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"var(--mui-palette-secondary-main)",borderWidth:2}},notchedOutline:{borderColor:"var(--mui-palette-divider)"}}},MuiCheckbox:{defaultProps:{color:"primary"},styleOverrides:{root:{borderRadius:4}}},MuiSwitch:{defaultProps:{color:"primary"}},MuiDialog:{styleOverrides:{paper:{borderRadius:8}}},MuiDialogTitle:{styleOverrides:{root:{fontWeight:600,fontSize:"1.125rem"}}},MuiMenu:{styleOverrides:{paper:{borderRadius:8,boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)"}}},MuiMenuItem:{styleOverrides:{root:{fontSize:"0.875rem",padding:"0.5rem 0.75rem","&:hover":{backgroundColor:"var(--mui-palette-action-hover)"},"&.Mui-selected":{backgroundColor:"var(--mui-palette-action-selected)","&:hover":{backgroundColor:"var(--mui-palette-action-selected)"}}}}},MuiAutocomplete:{styleOverrides:{paper:{borderRadius:6,boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.15), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",backgroundColor:tf.colors.neutral[200],".dark &":{backgroundColor:tf.colors.neutral[700]}},listbox:{padding:"4px 0"},option:{fontSize:"0.875rem",padding:"0.5rem 0.75rem",'&[aria-selected="true"]':{backgroundColor:"var(--mui-palette-action-selected)"},"&.Mui-focused":{backgroundColor:"var(--mui-palette-action-hover)"}}}}}},ty=(0,td.createTheme)({cssVariables:{colorSchemeSelector:"class"},colorSchemes:{light:{palette:{mode:"light",primary:{main:tf.colors.iochmara[500],light:tf.colors.iochmara[300],dark:tf.colors.iochmara[600],contrastText:"#ffffff"},secondary:{main:tf.colors.cyan[500],light:tf.colors.cyan[400],dark:tf.colors.cyan[600],contrastText:"#ffffff"},brand:{light:tf.colors.brand[400],main:tf.colors.brand[500],dark:tf.colors.brand[600],contrastText:"#ffffff"},iochmara:{light:tf.colors.iochmara[400],main:tf.colors.iochmara[500],dark:tf.colors.iochmara[600],contrastText:"#ffffff"},cyan:{main:tf.colors.cyan[500],light:tf.colors.cyan[300],dark:tf.colors.cyan[600],contrastText:"#ffffff"},amber:{main:tf.colors.amber[500],light:tf.colors.amber[300],dark:tf.colors.amber[600],contrastText:"#ffffff"},green:{main:tf.colors.green[500],light:tf.colors.green[300],dark:tf.colors.green[600],contrastText:"#ffffff"},red:{main:tf.colors.red[500],light:tf.colors.red[300],dark:tf.colors.red[600],contrastText:"#ffffff"},rose:{main:tf.colors.rose[500],light:tf.colors.rose[300],dark:tf.colors.rose[600],contrastText:"#ffffff"},fuchsia:{main:tf.colors.fuchsia[500],light:tf.colors.fuchsia[300],dark:tf.colors.fuchsia[600],contrastText:"#ffffff"},neutral:{main:tf.colors.neutral[600],light:tf.colors.neutral[300],dark:tf.colors.neutral[700],contrastText:"#ffffff"},grey:tf.colors.neutral,success:tf.colors.success,warning:tf.colors.warning,error:tf.colors.error,info:tf.colors.info,background:{default:"#ffffff",paper:tf.colors.neutral[50]},text:{primary:tf.colors.neutral[900],secondary:tf.colors.neutral[600],disabled:tf.colors.neutral[400]},divider:tf.colors.neutral[200]}},dark:{palette:{mode:"dark",primary:{main:tf.colors.iochmara[500],light:tf.colors.iochmara[300],dark:tf.colors.iochmara[600],contrastText:"#ffffff"},secondary:{main:tf.colors.cyan[500],light:tf.colors.cyan[400],dark:tf.colors.cyan[600],contrastText:"#ffffff"},brand:{light:tf.colors.brand[300],main:tf.colors.brand[400],dark:tf.colors.brand[600],contrastText:"#ffffff"},iochmara:{light:tf.colors.iochmara[300],main:tf.colors.iochmara[400],dark:tf.colors.iochmara[600],contrastText:"#ffffff"},cyan:{main:tf.colors.cyan[400],light:tf.colors.cyan[300],dark:tf.colors.cyan[600],contrastText:"#ffffff"},amber:{main:tf.colors.amber[400],light:tf.colors.amber[300],dark:tf.colors.amber[600],contrastText:"#000000"},green:{main:tf.colors.green[400],light:tf.colors.green[300],dark:tf.colors.green[600],contrastText:"#ffffff"},red:{main:tf.colors.red[400],light:tf.colors.red[300],dark:tf.colors.red[600],contrastText:"#ffffff"},rose:{main:tf.colors.rose[400],light:tf.colors.rose[300],dark:tf.colors.rose[600],contrastText:"#ffffff"},fuchsia:{main:tf.colors.fuchsia[400],light:tf.colors.fuchsia[300],dark:tf.colors.fuchsia[600],contrastText:"#ffffff"},neutral:{main:tf.colors.neutral[400],light:tf.colors.neutral[300],dark:tf.colors.neutral[200],contrastText:tf.colors.neutral[900]},grey:tf.colors.neutral,success:{light:tf.colors.success.light,main:tf.colors.success.main,dark:tf.colors.success.dark,contrastText:"#000000"},warning:{light:tf.colors.warning.light,main:tf.colors.warning.main,dark:tf.colors.warning.dark,contrastText:"#000000"},error:{light:tf.colors.error.light,main:tf.colors.error.main,dark:tf.colors.error.dark,contrastText:"#ffffff"},info:{light:tf.colors.info.light,main:tf.colors.info.main,dark:tf.colors.info.dark,contrastText:"#ffffff"},background:{default:tf.colors.neutral[900],paper:tf.colors.neutral[800]},text:{primary:tf.colors.neutral[50],secondary:tf.colors.neutral[400],disabled:tf.colors.neutral[600]},divider:tf.colors.neutral[700]}}},...tx});function tb({children:e,forcedTheme:r,enableCssBaseline:a=!1}){let{resolvedTheme:o}=u();return(0,n.useEffect)(()=>{"dark"===(r??o)?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},[r,o]),(0,t.jsxs)(tu,{theme:ty,children:[a&&(0,t.jsx)(eQ,{}),e]})}var tv=e.i(241019),tj=e.i(178675),tC=e.i(712754),tw=e.i(125611),tS=e.i(691838);let tk=(0,n.memo)(function({status:e,showSpinner:r=!0,size:n="small",className:a}){let{color:o,label:i}=function(e){switch(e){case"Running":return{color:"blue",label:"Running"};case"Finished":default:return{color:"green",label:"Finished"};case"Failed":return{color:"red",label:"Failed"};case"Cancelled":return{color:"grey",label:"Cancelled"}}}(e);return(0,t.jsxs)(eu.default,{className:a,sx:{display:"inline-flex",alignItems:"center",gap:.5},children:["Running"===e&&r&&(0,t.jsx)(tv.default,{size:"small"===n?12:16,color:"primary"}),(0,t.jsx)(W.default,{component:"span",sx:{fontWeight:500,fontSize:"small"===n?"0.75rem":"0.875rem",color:`${o}.500`},children:i})]})});function tO(e){if(null==e)return null;let t=new Date,r=new Date;r.setDate(t.getDate()-1);let n=e.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1});if(t.toDateString()===e.toDateString())return`Today, ${n}`;{if(r.toDateString()===e.toDateString())return`Yesterday, ${n}`;let t=e.toLocaleDateString("en-US",{month:"short",day:"numeric"});return`${t}, ${n}`}}tk.displayName="RunStatusBadge";let tT=(0,n.memo)(function({status:e,runAt:r,className:n}){let a=r?tO("string"==typeof r?new Date(r):r):null;return(0,t.jsxs)(eu.default,{className:n,sx:{display:"flex",alignItems:"center",gap:.5,fontSize:"0.75rem",color:"text.secondary"},children:[(0,t.jsx)(tk,{status:e,size:"small"}),a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(W.default,{component:"span",sx:{fontSize:"inherit"},children:"•"}),(0,t.jsx)(W.default,{component:"span",sx:{fontSize:"inherit",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a})]})]})});tT.displayName="RunStatusWithDate",(0,n.memo)(function({run:e,className:r}){let n=e.status?e.status:e.result?"Finished":e.error?"Failed":"Finished";return(0,t.jsx)(tT,{status:n,runAt:e.run_at,className:r})}).displayName="RunStatusAndDate";let t_=(0,n.memo)(function({run:e,isSelected:r=!1,icon:n,onClick:a,onAddToChecklist:o,onGoToCheck:i,addToChecklistIcon:l,goToCheckIcon:s,hideAddToChecklist:c=!1,className:u}){let d=(0,tj.useIsDark)(),f=null!=e.checkId;return(0,t.jsxs)(eu.default,{className:u,onClick:()=>a?.(e.id),sx:e=>({display:"flex",flexDirection:"column",width:"100%",p:"8px 16px",cursor:"pointer",borderBottom:1,borderColor:"divider",borderLeft:"4px solid",borderLeftColor:r?"warning.main":"transparent",bgcolor:r?d?"warning.dark":"warning.light":"transparent","&:hover":{bgcolor:r?d?"warning.dark":"warning.light":e.palette.action.hover}}),children:[(0,t.jsxs)(eu.default,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[n&&(0,t.jsx)(eu.default,{sx:{fontSize:16,color:"text.secondary",flexShrink:0},children:n}),(0,t.jsx)(W.default,{sx:{flex:1,fontSize:"0.875rem",fontWeight:500,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:e.name?"text.primary":"text.secondary"},children:e.name?.trim()||"<no name>"}),f&&i&&(0,t.jsx)(tS.default,{title:"Go to Check",children:(0,t.jsx)(q.default,{size:"small",onClick:t=>{t.stopPropagation(),e.checkId&&i(e.checkId)},sx:{p:.5},children:s||(0,t.jsx)(eu.default,{component:"span",sx:{fontSize:14,color:"success.main"},children:"✓"})})}),!c&&!f&&o&&(0,t.jsx)(tS.default,{title:"Add to Checklist",children:(0,t.jsx)(q.default,{size:"small",onClick:t=>{t.stopPropagation(),o(e.id)},sx:{p:.5},children:l||(0,t.jsx)(eu.default,{component:"span",sx:{fontSize:14},children:"○"})})})]}),(0,t.jsx)(tT,{status:e.status,runAt:e.runAt})]})});t_.displayName="RunListItem";let tM=(0,n.memo)(function({date:e}){return(0,t.jsx)(eu.default,{sx:{width:"100%",p:"8px 16px",borderBottom:1,borderColor:"divider",color:"text.secondary",fontSize:"0.75rem",fontWeight:500,bgcolor:"action.hover"},children:e})}),tR=(0,n.memo)(function({runs:e,selectedId:r,isLoading:n=!1,onRunSelect:a,onAddToChecklist:o,onGoToCheck:i,getRunIcon:l,hideAddToChecklist:s=!1,title:c="Runs",headerActions:u,emptyMessage:d="No runs",loadingMessage:f="Loading...",groupByDate:h=!1,addToChecklistIcon:p,goToCheckIcon:m,className:g}){return(0,t.jsxs)(eu.default,{className:g,sx:{display:"flex",flexDirection:"column",height:"100%",width:"100%"},children:[(0,t.jsxs)(eh.default,{direction:"row",alignItems:"center",sx:{flex:"0 0 auto",px:2,py:1.5,borderBottom:1,borderColor:"divider"},children:[(0,t.jsx)(W.default,{variant:"h6",children:c}),(0,t.jsx)(eu.default,{sx:{flex:1}}),u]}),(0,t.jsx)(eu.default,{sx:{flex:1,overflow:"auto"},children:n?(0,t.jsx)(eu.default,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",color:"text.secondary"},children:f}):(()=>{if(0===e.length)return(0,t.jsx)(eu.default,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",color:"text.secondary",p:4},children:d});let n=null;return e.map(e=>{let c=e.runAt?function(e){if(null==e)return null;let t=new Date,r=new Date;return(r.setDate(t.getDate()-1),t.toDateString()===e.toDateString())?"Today":r.toDateString()===e.toDateString()?"Yesterday":e.toLocaleDateString("en-US",{month:"short",day:"numeric"})}(new Date(e.runAt)):null,u=h&&c&&n!==c;return n=c,(0,t.jsxs)(eu.default,{children:[u&&(0,t.jsx)(tM,{date:c}),(0,t.jsx)(t_,{run:e,isSelected:e.id===r,icon:l?.(e.type),onClick:a,onAddToChecklist:o,onGoToCheck:i,hideAddToChecklist:s,addToChecklistIcon:p,goToCheckIcon:m})]},e.id)})})()})]})});function tE(e){return{id:e.run_id,name:e.name,type:e.type,status:e.status??"Finished",runAt:e.run_at,checkId:e.check_id}}function tI(){let{closeHistory:e,showRunId:a,runId:o}=(0,ex.useRecceActionContext)(),{featureToggles:i}=(0,P.useRecceInstanceContext)(),{apiClient:l}=(0,ea.useApiConfig)(),s=(0,el.useRouter)(),c=(0,r.useQueryClient)(),{basePath:u}=(0,ey.useRouteConfig)(),{data:d,isLoading:f}=(0,N.useQuery)({queryKey:B.cacheKeys.runs(),queryFn:async()=>await (0,H.listRuns)(l),retry:!1}),h=(0,n.useMemo)(()=>(d??[]).map(tE),[d]),p=(0,n.useCallback)(e=>{(0,er.trackHistoryAction)({name:"click_run"}),a(e,!1)},[a]),m=(0,n.useCallback)(async e=>{(0,er.trackHistoryAction)({name:"add_to_checklist"});let t=await (0,tw.createCheckByRun)(e,void 0,l);await c.invalidateQueries({queryKey:B.cacheKeys.checks()}),s.push(`${u}/checks/?id=${t.check_id}`)},[l,c,s.push,u]),g=(0,n.useCallback)(e=>{(0,er.trackHistoryAction)({name:"go_to_check"}),s.push(`${u}/checks/?id=${e}`)},[s.push,u]),x=(0,n.useCallback)(()=>{(0,er.trackHistoryAction)({name:"hide"}),e()},[e]),y=(0,n.useCallback)(e=>{let r=(0,es.findByRunType)(e),n=r?.icon;return n?(0,t.jsx)(n,{}):null},[]),b=(0,t.jsx)(q.default,{"aria-label":"Close History",onClick:x,children:(0,t.jsx)(ec.PiX,{})});return(0,t.jsx)(tR,{runs:h,selectedId:o,isLoading:f,onRunSelect:p,onAddToChecklist:m,onGoToCheck:g,getRunIcon:y,hideAddToChecklist:i.disableUpdateChecklist,title:"History",headerActions:b,emptyMessage:"No runs",loadingMessage:"Loading...",groupByDate:!0,addToChecklistIcon:(0,t.jsx)(tC.FaRegCheckCircle,{}),goToCheckIcon:(0,t.jsx)(tC.FaCheckCircle,{color:"green"})})}tR.displayName="RunList";var tP=e.i(278474),tA=e.i(80123),t$=e.i(814938),tz=e.i(991303),tD=e.i(45623),tL=e.i(144899),tF=e.i(7284),tq=e.i(295456);let tW=n.createContext();var tN=e.i(721431),tQ=e.i(842196),tK=e.i(11507),tH=e.i(222942);function tB(e){return(0,tH.default)("MuiTable",e)}(0,tK.default)("MuiTable",["root","stickyHeader"]);let tU=(0,tN.styled)("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.stickyHeader&&t.stickyHeader]}})((0,tQ.default)(({theme:e})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...e.typography.body2,padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:e})=>e.stickyHeader,style:{borderCollapse:"separate"}}]}))),tG="table",tV=n.forwardRef(function(e,r){let a=(0,eL.useDefaultProps)({props:e,name:"MuiTable"}),{className:o,component:i=tG,padding:l="normal",size:s="medium",stickyHeader:c=!1,...u}=a,d={...a,component:i,padding:l,size:s,stickyHeader:c},f=(e=>{let{classes:t,stickyHeader:r}=e;return(0,tq.default)({root:["root",r&&"stickyHeader"]},tB,t)})(d),h=n.useMemo(()=>({padding:l,size:s,stickyHeader:c}),[l,s,c]);return(0,t.jsx)(tW.Provider,{value:h,children:(0,t.jsx)(tU,{as:i,role:i===tG?null:"table",ref:r,className:(0,tF.default)(f.root,o),ownerState:d,...u})})}),tJ=n.createContext();function tX(e){return(0,tH.default)("MuiTableBody",e)}(0,tK.default)("MuiTableBody",["root"]);let tY=(0,tN.styled)("tbody",{name:"MuiTableBody",slot:"Root"})({display:"table-row-group"}),tZ={variant:"body"},t0="tbody",t1=n.forwardRef(function(e,r){let n=(0,eL.useDefaultProps)({props:e,name:"MuiTableBody"}),{className:a,component:o=t0,...i}=n,l={...n,component:o},s=(e=>{let{classes:t}=e;return(0,tq.default)({root:["root"]},tX,t)})(l);return(0,t.jsx)(tJ.Provider,{value:tZ,children:(0,t.jsx)(tY,{className:(0,tF.default)(s.root,a),as:o,ref:r,role:o===t0?null:"rowgroup",ownerState:l,...i})})});var t5=e.i(663888);function t2(e){return(0,tH.default)("MuiTableCell",e)}let t6=(0,tK.default)("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),t4=(0,tN.styled)("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[r.variant],t[`size${(0,t5.default)(r.size)}`],"normal"!==r.padding&&t[`padding${(0,t5.default)(r.padding)}`],"inherit"!==r.align&&t[`align${(0,t5.default)(r.align)}`],r.stickyHeader&&t.stickyHeader]}})((0,tQ.default)(({theme:e})=>({...e.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid
|
|
29
|
+
${"light"===e.palette.mode?e.lighten(e.alpha(e.palette.divider,1),.88):e.darken(e.alpha(e.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:"footer"},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${t6.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:e})=>e.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}}]}))),t8=n.forwardRef(function(e,r){let a,o=(0,eL.useDefaultProps)({props:e,name:"MuiTableCell"}),{align:i="inherit",className:l,component:s,padding:c,scope:u,size:d,sortDirection:f,variant:h,...p}=o,m=n.useContext(tW),g=n.useContext(tJ),x=g&&"head"===g.variant,y=u;"td"===(a=s||(x?"th":"td"))?y=void 0:!y&&x&&(y="col");let b=h||g&&g.variant,v={...o,align:i,component:a,padding:c||(m&&m.padding?m.padding:"normal"),size:d||(m&&m.size?m.size:"medium"),sortDirection:f,stickyHeader:"head"===b&&m&&m.stickyHeader,variant:b},j=(e=>{let{classes:t,variant:r,align:n,padding:a,size:o,stickyHeader:i}=e,l={root:["root",r,i&&"stickyHeader","inherit"!==n&&`align${(0,t5.default)(n)}`,"normal"!==a&&`padding${(0,t5.default)(a)}`,`size${(0,t5.default)(o)}`]};return(0,tq.default)(l,t2,t)})(v),C=null;return f&&(C="asc"===f?"ascending":"descending"),(0,t.jsx)(t4,{as:a,ref:r,className:(0,tF.default)(j.root,l),"aria-sort":C,scope:y,ownerState:v,...p})});function t3(e){return(0,tH.default)("MuiTableContainer",e)}(0,tK.default)("MuiTableContainer",["root"]);let t7=(0,tN.styled)("div",{name:"MuiTableContainer",slot:"Root"})({width:"100%",overflowX:"auto"}),t9=n.forwardRef(function(e,r){let n=(0,eL.useDefaultProps)({props:e,name:"MuiTableContainer"}),{className:a,component:o="div",...i}=n,l={...n,component:o},s=(e=>{let{classes:t}=e;return(0,tq.default)({root:["root"]},t3,t)})(l);return(0,t.jsx)(t7,{ref:r,as:o,className:(0,tF.default)(s.root,a),ownerState:l,...i})});function re(e){return(0,tH.default)("MuiTableHead",e)}(0,tK.default)("MuiTableHead",["root"]);let rt=(0,tN.styled)("thead",{name:"MuiTableHead",slot:"Root"})({display:"table-header-group"}),rr={variant:"head"},rn="thead",ra=n.forwardRef(function(e,r){let n=(0,eL.useDefaultProps)({props:e,name:"MuiTableHead"}),{className:a,component:o=rn,...i}=n,l={...n,component:o},s=(e=>{let{classes:t}=e;return(0,tq.default)({root:["root"]},re,t)})(l);return(0,t.jsx)(tJ.Provider,{value:rr,children:(0,t.jsx)(rt,{as:o,className:(0,tF.default)(s.root,a),ref:r,role:o===rn?null:"rowgroup",ownerState:l,...i})})});function ro(e){return(0,tH.default)("MuiTableRow",e)}let ri=(0,tK.default)("MuiTableRow",["root","selected","hover","head","footer"]),rl=(0,tN.styled)("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.head&&t.head,r.footer&&t.footer]}})((0,tQ.default)(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${ri.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${ri.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)}}}))),rs=n.forwardRef(function(e,r){let a=(0,eL.useDefaultProps)({props:e,name:"MuiTableRow"}),{className:o,component:i="tr",hover:l=!1,selected:s=!1,...c}=a,u=n.useContext(tJ),d={...a,component:i,hover:l,selected:s,head:u&&"head"===u.variant,footer:u&&"footer"===u.variant},f=(e=>{let{classes:t,selected:r,hover:n,head:a,footer:o}=e;return(0,tq.default)({root:["root",r&&"selected",n&&"hover",a&&"head",o&&"footer"]},ro,t)})(d);return(0,t.jsx)(rl,{as:i,ref:r,className:(0,tF.default)(f.root,o),role:"tr"===i?null:"row",ownerState:d,...c})});var rc=e.i(149813),ru=e.i(227751),rd=e.i(568029);function rf(e){return Object.values(e).every(e=>null===e)?[(0,t.jsx)(eu.default,{sx:{ml:"10px"},children:"No information"},"no info")]:Object.entries(e).filter(([e,t])=>"url"!==e&&null!=t).map(([e,r])=>(0,t.jsxs)("li",{style:{marginLeft:"10px"},children:[e,": ",r]},e))}function rh(){let{envInfo:e,reviewMode:r,lineageGraph:a}=(0,ee.useLineageGraphContext)(),[o,i]=(0,n.useState)(!1),l=e?.git,s=e?.pullRequest,c={...l,...s},u=e?.dbt?.base,d=e?.dbt?.current,f=u?.generated_at?(0,V.formatTimestamp)(u.generated_at):"",h=d?.generated_at?(0,V.formatTimestamp)(d.generated_at):"",p="",m="";u&&(p=u.generated_at?(0,V.formatTimeToNow)(u.generated_at):""),d&&(m=d.generated_at?(0,V.formatTimeToNow)(d.generated_at):"");let[g,x]=(0,rd.extractSchemas)(a),y=(0,n.useRef)(!1);(0,n.useEffect)(()=>{if(!y.current&&e){let t,n,a,o,i;y.current=!0;let l=(t=e?.git,n=e?.pullRequest,a=e?.dbt?.base,o=e?.dbt?.current,i={review_mode:r||!1,adapter_type:e?.adapterType||null,has_git_info:!(0,rc.default)(t),has_pr_info:!(0,rc.default)(n)},e?.adapterType==="dbt"&&(i.base={schema_count:g.size,dbt_version:a?.dbt_version||null,timestamp:a?.generated_at||null},i.current={schema_count:x.size,dbt_version:o?.dbt_version||null,timestamp:o?.generated_at||null},i.schemas_match=g.size===x.size&&Array.from(g).every(e=>x.has(e))),e?.adapterType==="sqlmesh"&&(i.base={has_env:!!e.sqlmesh?.base_env},i.current={has_env:!!e.sqlmesh?.current_env}),i);(0,er.trackEnvironmentConfig)(l)}},[e,r,g,x]);let b=()=>i(!1);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(tS.default,{title:"Environment Info",placement:"bottom-end",children:(0,t.jsxs)(eu.default,{sx:{display:"flex",alignItems:"center",cursor:"pointer","&:hover":{color:"text.primary"}},onClick:()=>i(!0),children:[(0,t.jsxs)(eh.default,{direction:"column",sx:{display:{xs:"none",lg:"flex"},fontSize:"0.875rem"},children:[(0,t.jsxs)(eu.default,{sx:{display:"flex",gap:.5},children:[(0,t.jsx)(W.default,{component:"span",noWrap:!0,sx:{color:"warning.main",maxWidth:128},className:"no-track-pii-safe",children:Array.from(g).join(", ")})," ","(",p,")"]}),(0,t.jsxs)(eu.default,{sx:{display:"flex",gap:.5},children:[(0,t.jsx)(W.default,{component:"span",noWrap:!0,sx:{color:"primary.main",maxWidth:128},className:"no-track-pii-safe",children:Array.from(x).join(", ")})," ","(",m,")"]})]}),(0,t.jsx)(q.default,{size:"small","aria-label":"Environment Info",children:(0,t.jsx)(eu.default,{component:ec.PiInfo,sx:{fontSize:16,verticalAlign:"middle"}})})]})}),(0,t.jsxs)(z.default,{open:o,onClose:b,maxWidth:"sm",fullWidth:!0,children:[(0,t.jsxs)(F.default,{sx:{display:"flex",alignItems:"center"},children:["Environment Information",(0,t.jsx)(eu.default,{sx:{flexGrow:1}}),(0,t.jsx)(q.default,{size:"small",onClick:b,children:(0,t.jsx)(K.IoClose,{})})]}),(0,t.jsx)(L.default,{children:(0,t.jsxs)(eh.default,{direction:"column",spacing:1,children:[r?(0,t.jsxs)(eh.default,{direction:"column",spacing:.5,children:[(0,t.jsx)(W.default,{variant:"h6",sx:{fontSize:"1rem"},children:"Review Information"}),(0,t.jsxs)("ul",{style:{margin:0,paddingLeft:"20px"},children:[c.url&&(0,t.jsxs)("li",{style:{marginLeft:"10px"},children:["url:"," ",(0,t.jsxs)(ed.default,{href:c.url,target:"_blank",sx:{color:"primary.main"},children:[c.url," ",(0,t.jsx)(ru.LuExternalLink,{})]})]}),!(0,rc.default)(c)&&rf(c)]})]}):(0,t.jsxs)(eh.default,{direction:"column",spacing:.5,children:[(0,t.jsx)(W.default,{variant:"h6",sx:{fontSize:"1rem"},children:"Dev Information"}),(0,t.jsx)("ul",{style:{margin:0,paddingLeft:"20px"},children:l&&rf(l)})]}),(0,t.jsx)(tL.default,{}),e?.adapterType==="dbt"&&(0,t.jsxs)(eh.default,{direction:"column",spacing:.5,children:[(0,t.jsx)(W.default,{variant:"h6",sx:{fontSize:"1rem"},children:"DBT"}),(0,t.jsx)(t9,{sx:{border:1,borderColor:"divider",maxHeight:"30rem"},children:(0,t.jsxs)(tV,{size:"small",stickyHeader:!0,children:[(0,t.jsx)(ra,{children:(0,t.jsxs)(rs,{children:[(0,t.jsx)(t8,{}),(0,t.jsx)(t8,{children:"base"}),(0,t.jsx)(t8,{children:"current"})]})}),(0,t.jsxs)(t1,{children:[(0,t.jsxs)(rs,{children:[(0,t.jsx)(t8,{children:"schema"}),(0,t.jsx)(t8,{className:"no-track-pii-safe",children:Array.from(g).map(e=>(0,t.jsx)(tS.default,{title:e,placement:"bottom",children:(0,t.jsx)("div",{className:"max-w-72 truncate",children:e})},e))}),(0,t.jsx)(t8,{className:"no-track-pii-safe",children:Array.from(x).map(e=>(0,t.jsx)(tS.default,{title:e,placement:"bottom",children:(0,t.jsx)("div",{className:"max-w-72 truncate",children:e})},e))})]}),(0,t.jsxs)(rs,{children:[(0,t.jsx)(t8,{children:"version"}),(0,t.jsx)(t8,{children:u?.dbt_version}),(0,t.jsx)(t8,{children:d?.dbt_version})]}),(0,t.jsxs)(rs,{children:[(0,t.jsx)(t8,{children:"timestamp"}),(0,t.jsx)(t8,{children:f}),(0,t.jsx)(t8,{children:h})]})]})]})})]}),e?.adapterType==="sqlmesh"&&(0,t.jsxs)(eh.default,{direction:"column",spacing:.5,children:[(0,t.jsx)(W.default,{variant:"h6",sx:{fontSize:"1rem"},children:"SQLMesh"}),(0,t.jsx)(t9,{sx:{border:1,borderColor:"divider",maxHeight:"30rem"},children:(0,t.jsxs)(tV,{stickyHeader:!0,children:[(0,t.jsx)(ra,{children:(0,t.jsxs)(rs,{children:[(0,t.jsx)(t8,{}),(0,t.jsx)(t8,{children:"base"}),(0,t.jsx)(t8,{children:"current"})]})}),(0,t.jsx)(t1,{children:(0,t.jsxs)(rs,{children:[(0,t.jsx)(t8,{children:"Environment"}),(0,t.jsx)(t8,{className:"no-track-pii-safe",children:e.sqlmesh?.base_env}),(0,t.jsx)(t8,{className:"no-track-pii-safe",children:e.sqlmesh?.current_env})]})})]})})]})]})}),(0,t.jsx)(D.default,{children:(0,t.jsx)($.default,{color:"iochmara",onClick:b,children:"Close"})})]})]})}var rp=e.i(194663),rm=e.i(738019),rg=e.i(468595),rx=e.i(269214),ry=e.i(354290),rb=e.i(560547);let rv=()=>{var e;let a,{featureToggles:o}=(0,P.useRecceInstanceContext)(),{fileName:i,cloudMode:l,isDemoSite:s,envInfo:c}=(0,ee.useLineageGraphContext)(),{apiClient:u}=(0,ea.useApiConfig)(),[d,f]=(0,n.useState)(!1),[h,p]=(0,n.useState)(!1),m=!i&&!l&&!s,{data:g}=(0,tw.useChecks)(m),x=void 0!=g&&g.filter(e=>!e.is_preset).length>0;e=m&&x,(0,n.useEffect)(()=>{let t=e=>{e.preventDefault()};return e&&window.addEventListener("beforeunload",t),()=>{e&&window.removeEventListener("beforeunload",t)}},[e]);let[{newFileName:y,errorMessage:b,modified:v,overwriteWithMethod:j,bypass:C},w]=(0,n.useState)({newFileName:i??"recce_state.json",bypass:!1}),S=(0,n.useRef)(null),{toastSuccess:k,toastError:O}={toastSuccess:e=>{Y.toaster.create({description:e,type:"success",duration:5e3,closable:!0})},toastError:(e,t)=>{let r=e;null!=t&&(r=(0,rx.isAxiosError)(t)?`${e}. ${String(t.response?.data?.detail)}`:`${e}. ${t}`),Y.toaster.create({description:r,type:"error",duration:5e3,closable:!0})}},T=(0,r.useQueryClient)(),_=()=>f(!1),M=()=>p(!1),R=async(e,t)=>{if(!y)return;let r="true"===localStorage.getItem(ry.LOCAL_STORAGE_KEYS.bypassSaveOverwrite);try{"save"===e?await (0,rb.saveAs)({filename:y,overwrite:t??r},u):await (0,rb.rename)({filename:y,overwrite:t??r},u),k("save"===e?"Save file successfully":"Rename file successfully"),await T.invalidateQueries({queryKey:B.cacheKeys.lineage()}),C&&localStorage.setItem(ry.LOCAL_STORAGE_KEYS.bypassSaveOverwrite,"true")}catch(t){if((0,rx.isAxiosError)(t)&&t.response?.status===409){w(t=>({...t,overwriteWithMethod:e})),p(!0);return}O("save"===e?"Save file failed":"Rename file failed",t)}finally{_()}};if(l||s)return(0,t.jsx)(t.Fragment,{});if(o.disableSaveToFile&&i){let e=c?.stateMetadata?.generated_at,t=e?tO(new Date(e)):null;a=t?`${i} (${t})`:null}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(eh.default,{direction:"row",alignItems:"center",justifyContent:"center",children:[(0,t.jsx)(eu.default,{sx:{fontWeight:600},children:a??i??"New Instance"+(x?" (unsaved)":"")}),!o.disableSaveToFile&&(0,t.jsx)(tS.default,{title:i?"Change Filename":"Save",enterDelay:1e3,children:(0,t.jsx)(q.default,{onClick:()=>{w({newFileName:i??"recce_state.json",modified:!i,bypass:!1}),f(!0)},"aria-label":i?"Change Filename":"Save",size:"small",children:(0,t.jsx)(eu.default,{component:i?ec.PiPencil:ru.LuSave,sx:{fontSize:16,verticalAlign:"middle"}})})})]}),(0,t.jsxs)(z.default,{open:d,onClose:_,children:[(0,t.jsxs)(F.default,{sx:{display:"flex",alignItems:"center"},children:[i?"Change Filename":"Save File",(0,t.jsx)(eu.default,{sx:{flexGrow:1}}),(0,t.jsx)(q.default,{size:"small",onClick:_,children:(0,t.jsx)(K.IoClose,{})})]}),(0,t.jsx)(L.default,{onKeyDown:e=>{e.stopPropagation()},children:(0,t.jsx)(rg.default,{inputRef:S,value:y,label:"File name",placeholder:"Enter filename",error:!!b,helperText:b,fullWidth:!0,size:"small",sx:{mt:1},onChange:e=>{let t,r=e.target.value;r?r.endsWith(".json")?/^[a-zA-Z0-9 _-]+\.json$/.test(r)?i&&r===i&&(t="Filename is the same as the current one."):t="Invalid filename. Only alphanumeric, space, _ and - are allowed.":t="Filename must end with .json.":t="Filename cannot be empty.",w(e=>({...e,modified:!0,newFileName:r,errorMessage:t}))},onKeyDown:e=>{"Enter"===e.key?b||(i?R("rename"):R("save")):"Escape"===e.key&&_()}})}),(0,t.jsxs)(D.default,{sx:{gap:"5px"},children:[(0,t.jsx)($.default,{size:"small",color:i?"inherit":"iochmara",variant:"contained",onClick:async()=>{await R("save")},disabled:!y||!!b||!v,children:i?"Save as New File":"Confirm"}),i&&(0,t.jsx)($.default,{size:"small",color:"iochmara",variant:"contained",onClick:async()=>{await R("rename")},disabled:!y||!!b||!v,children:"Rename"})]})]}),(0,t.jsxs)(z.default,{open:h,onClose:M,children:[(0,t.jsxs)(F.default,{sx:{display:"flex",alignItems:"center"},children:["Overwrite File?",(0,t.jsx)(eu.default,{sx:{flexGrow:1}}),(0,t.jsx)(q.default,{size:"small",onClick:M,children:(0,t.jsx)(K.IoClose,{})})]}),(0,t.jsxs)(L.default,{sx:{borderTop:"solid 1px",borderBottom:"solid 1px",borderColor:"divider"},onKeyDown:e=>{e.stopPropagation()},children:[(0,t.jsx)(W.default,{sx:{fontSize:"12pt"},children:"save"===j?"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?"}),(0,t.jsx)(rm.default,{control:(0,t.jsx)(rp.default,{size:"small",checked:C,onChange:e=>{w(t=>({...t,bypass:e.target.checked}))}}),label:(0,t.jsx)(W.default,{sx:{fontWeight:"bold",pt:"8px"},children:"Don't show this again"})})]}),(0,t.jsxs)(D.default,{sx:{gap:"5px"},children:[(0,t.jsx)($.default,{variant:"outlined",onClick:()=>{M(),f(!0),w(e=>({...e,overwriteWithMethod:void 0}))},size:"small",children:"Back"}),(0,t.jsx)($.default,{size:"small",color:"iochmara",variant:"contained",onClick:()=>{j&&(R(j,!0),M())},children:"Overwrite"})]})]})]})};var rj=e.i(230902),rC=e.i(82114);function rw(){let{featureToggles:e}=(0,P.useRecceInstanceContext)(),{apiClient:r}=(0,ea.useApiConfig)(),n=async()=>{try{let e=await (0,rb.exportState)(r),t=JSON.stringify(e,null,2),n=new Blob([t],{type:"application/json"}),a=new Date,o=`recce-state-${(0,rj.format)(a,"yyyy-MM-dd-HH-mm-ss")}.json`;(0,rC.default)(n,o)}catch(e){console.error("Export failed",e),Y.toaster.create({title:"Export failed",description:String(e),type:"error",duration:5e3,closable:!0})}};return(0,t.jsx)(tS.default,{title:"Export",children:(0,t.jsx)(q.default,{size:"small","aria-label":"Export state",onClick:async()=>{await n(),(0,er.trackStateAction)({name:"export"})},disabled:e.disableExportStateFile,children:(0,t.jsx)(eu.default,{component:ec.PiExport,sx:{verticalAlign:"middle",width:"16px",height:"16px"}})})})}var rS=e.i(878678),rk=e.i(250646),rO=e.i(117343);let rT=["Processing...","Still processing, please wait...","Almost there, thanks for your patience..."];function r_(){let{successToast:e,failToast:r}=(0,rO.useClipBoardToast)(),[,a]=(0,rk.useCopyToClipboard)(),{authed:o}=(0,P.useRecceInstanceContext)(),{shareUrl:i,isLoading:l,error:s,handleShareClick:c}=(0,ej.useRecceShareStateContext)(),[u,d]=(0,n.useState)(!1),[f,h]=(0,n.useState)(0),[p,m]=(0,n.useState)(l);l!==p&&(m(l),l&&h(0)),(0,rk.useInterval)(()=>{h(e=>Math.min(e+1,rT.length-1))},l?3e4:null),(0,n.useEffect)(()=>{s&&r("Failed to share state",s)},[s,r]);let g=async()=>{try{await a(String(i)),e("Copied the link to clipboard")}catch(e){r("Failed to copy the link",e)}};return o?(0,t.jsxs)(eh.default,{direction:"row",sx:{flex:1,alignItems:"center",gap:"5px"},children:[(0,t.jsx)($.default,{size:"xsmall",variant:"outlined",color:"neutral",startIcon:(0,t.jsx)(rS.TbCloudUpload,{}),endIcon:i?(0,t.jsx)(eu.default,{component:ec.PiCheckCircle,sx:{color:"success.main"}}):void 0,onClick:async()=>{await c(),(0,er.trackShareState)({name:"create"})},disabled:l,children:l?"Sharing...":"Share"}),l&&(0,t.jsx)(W.default,{sx:{fontSize:14,color:"grey.500"},children:rT[f]}),(0,t.jsx)(eh.default,{direction:"row",spacing:.5,alignItems:"center",children:i&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eu.default,{sx:{overflowX:"auto",whiteSpace:"nowrap",maxWidth:"350px"},children:(0,t.jsx)(W.default,{sx:{fontSize:14},children:i})}),(0,t.jsx)(q.default,{size:"small","aria-label":"Copy the share URL",onClick:async()=>{await g(),(0,er.trackShareState)({name:"copy"})},children:(0,t.jsx)(ec.PiCopy,{})})]})})]}):(0,t.jsxs)(eh.default,{direction:"row",sx:{flex:1,alignItems:"center"},children:[(0,t.jsx)($.default,{size:"xsmall",color:"neutral",variant:"outlined",onClick:()=>{d(!0)},startIcon:(0,t.jsx)(rS.TbCloudUpload,{}),children:"Share"}),u&&(0,t.jsx)(t$.default,{parentOpen:u,handleParentClose:d,ignoreCookie:!0,variant:"enable-share"})]})}var rM=e.i(954052),rR=e.i(91766);function rE(){return(0,t.jsx)(tS.default,{title:"Syncing",children:(0,t.jsx)(eu.default,{sx:{mx:"10px"},children:(0,t.jsx)(tv.default,{size:20})})})}function rI(){let[e,a]=(0,n.useState)(!1),o=(0,r.useQueryClient)(),{apiClient:i}=(0,ea.useApiConfig)(),l=(0,el.useRouter)(),s=(0,el.usePathname)(),{basePath:c}=(0,ey.useRouteConfig)(),[u,d]=(0,n.useState)(!1),[f,h]=(0,n.useState)(""),{data:p}=(0,w.useRecceInstanceInfo)(),m=()=>d(!1),g=(0,n.useCallback)(async e=>{if(d(!1),a(!0),"conflict"===(await (0,rb.syncState)(e,i)).status){d(!0),a(!1);return}for(;await (0,rb.isStateSyncing)(i);)await new Promise(e=>setTimeout(e,1e3));Y.toaster.create({description:"Sync Completed",type:"success",duration:5e3,closable:!0}),a(!1),h(""),await o.invalidateQueries({queryKey:B.cacheKeys.lineage()}),await o.invalidateQueries({queryKey:B.cacheKeys.checks()}),await o.invalidateQueries({queryKey:B.cacheKeys.runs()}),/^\/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(s)&&l.push(`${c}/checks`)},[o,s,i,l.push,c]);return e?(0,t.jsx)(rE,{}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(tS.default,{title:"Sync with Cloud",children:(0,t.jsx)(q.default,{size:"small","aria-label":"Sync state",onClick:()=>g(p?.session_id?{method:"merge"}:{}),children:(0,t.jsx)(eu.default,{component:K.IoSync,sx:{fontSize:16,verticalAlign:"middle"}})})}),(0,t.jsxs)(z.default,{open:u,onClose:m,children:[(0,t.jsxs)(F.default,{sx:{display:"flex",alignItems:"center",fontWeight:"bold"},children:["Sync with Cloud",(0,t.jsx)(eu.default,{sx:{flexGrow:1}}),(0,t.jsx)(q.default,{size:"small",onClick:m,children:(0,t.jsx)(K.IoClose,{})})]}),(0,t.jsxs)(L.default,{children:[(0,t.jsx)(W.default,{children:"New changes have been detected in the cloud. Please choose a method to sync your state"}),(0,t.jsx)(eu.default,{sx:{mt:"5px"},children:(0,t.jsx)(rR.default,{value:f,onChange:e=>{h(e.target.value)},children:(0,t.jsxs)(eh.default,{direction:"column",children:[(0,t.jsx)(rm.default,{value:"merge",control:(0,t.jsx)(rM.default,{}),label:(0,t.jsxs)(eh.default,{direction:"row",alignItems:"center",children:["Merge",(0,t.jsx)(tS.default,{title:"This will merge the local and remote states.",children:(0,t.jsx)(eu.default,{component:ec.PiInfo,sx:{ml:2,cursor:"pointer"}})})]})}),(0,t.jsx)(rm.default,{value:"overwrite",control:(0,t.jsx)(rM.default,{}),label:(0,t.jsxs)(eh.default,{direction:"row",alignItems:"center",children:["Overwrite",(0,t.jsx)(tS.default,{title:"This will overwrite the remote state file with the local state.",children:(0,t.jsx)(eu.default,{component:ec.PiInfo,sx:{ml:2,cursor:"pointer"}})})]})}),(0,t.jsx)(rm.default,{value:"revert",control:(0,t.jsx)(rM.default,{}),label:(0,t.jsxs)(eh.default,{direction:"row",alignItems:"center",children:["Revert",(0,t.jsx)(tS.default,{title:"This will discard local changes and revert to the cloud state.",children:(0,t.jsx)(eu.default,{component:ec.PiInfo,sx:{ml:2,cursor:"pointer"}})})]})})]})})})]}),(0,t.jsxs)(D.default,{children:[(0,t.jsx)($.default,{onClick:m,sx:{mr:1},children:"Cancel"}),(0,t.jsx)($.default,{color:"iochmara",variant:"contained",onClick:()=>g({method:f||void 0}),disabled:!f,children:"Sync"})]})]})]})}let rP=[{path:"/lineage",name:"Lineage"},{path:"/query",name:"Query"},{path:"/checks",name:"Checklist"}];function rA({queryKey:e,fetchCallback:r,selectCallback:n}){let{data:a,isLoading:o,error:i}=(0,N.useQuery)({queryKey:e,queryFn:r,select:n});return o||i||0===a?(0,t.jsx)(t.Fragment,{}):(0,t.jsx)(eu.default,{bgcolor:"brand.main",display:"flex",justifyContent:"center",alignItems:"center",p:1,borderRadius:"100%",color:"white",fontWeight:700,fontSize:"0.75rem",children:(0,t.jsx)("span",{children:a})})}function r$(){let{apiClient:e}=(0,ea.useApiConfig)();return(0,t.jsx)(rA,{queryKey:B.cacheKeys.checks(),fetchCallback:()=>(0,tw.listChecks)(e),selectCallback:e=>e.filter(e=>!e.is_checked).length})}let rz=()=>{let e=(0,el.usePathname)(),{isDemoSite:r,isLoading:a,cloudMode:o}=(0,ee.useLineageGraphContext)(),{featureToggles:i}=(0,P.useRecceInstanceContext)(),{data:l,isLoading:s}=(0,et.useRecceServerFlag)(),c=(0,n.useRef)(null);(0,n.useEffect)(()=>{c.current&&c.current!==e&&(0,er.trackNavigation)({from:c.current,to:e}),c.current=e},[e]);let u=(0,n.useMemo)(()=>e.startsWith("/checks")?"/checks":e.startsWith("/query")?"/query":e.startsWith("/runs")?"/runs":"/lineage",[e]);return(0,t.jsx)(eu.default,{sx:{borderBottom:"1px solid lightgray",px:"12px"},children:(0,t.jsxs)(eu.default,{sx:{display:"grid",gridTemplateColumns:"1fr auto 1fr",width:"100%",alignItems:"center"},children:[(0,t.jsx)(tD.default,{value:u,sx:{borderBottom:"none",minHeight:"auto"},children:rP.map(({path:e,name:r})=>"Query"===r&&l?.single_env_onboarding?null:"Checklist"===r&&r$?(0,t.jsx)(tz.default,{value:e,disabled:a||s,sx:{p:0},label:(0,t.jsx)(eu.default,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:(0,t.jsxs)(Q.default,{href:e,style:{textDecoration:"none",color:"inherit",padding:"0.875rem 1.1875rem",display:"flex",gap:3,alignItems:"center"},children:[r," ",(0,t.jsx)(r$,{})]})})},e):(0,t.jsx)(tz.default,{value:e,disabled:a||s,sx:{p:0},label:(0,t.jsx)(eu.default,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:(0,t.jsx)(Q.default,{href:e,style:{textDecoration:"none",color:"inherit",padding:"0.875rem 1.1875rem"},children:r})})},e))}),(0,t.jsxs)(eu.default,{sx:{display:"flex",alignItems:"center",gap:"12px",justifyContent:"center"},children:[!a&&!r&&(0,t.jsx)(rv,{}),!a&&!r&&!l?.single_env_onboarding&&!i.disableShare&&(0,t.jsx)(r_,{})]}),!a&&(0,t.jsxs)(eu.default,{sx:{display:"flex",justifyContent:"right",alignItems:"center",mr:"8px"},children:[(0,t.jsx)(rh,{}),o&&(0,t.jsx)(rI,{}),(0,t.jsx)(rw,{})]})]})})};var rD=e.i(456114);let rL=function(e){let{badgeContent:t,invisible:r=!1,max:n=99,showZero:a=!1}=e,o=(0,rD.default)({badgeContent:t,max:n}),i=r;!1!==r||0!==t||a||(i=!0);let{badgeContent:l,max:s=n}=i?o:e,c=l&&Number(l)>s?`${s}+`:l;return{badgeContent:l,invisible:i,max:s,displayValue:c}};var rF=e.i(234308);function rq(e){return(0,tH.default)("MuiBadge",e)}let rW=(0,tK.default)("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]);var rN=e.i(707706);let rQ=(0,tN.styled)("span",{name:"MuiBadge",slot:"Root"})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),rK=(0,tN.styled)("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.badge,t[r.variant],t[`anchorOrigin${(0,t5.default)(r.anchorOrigin.vertical)}${(0,t5.default)(r.anchorOrigin.horizontal)}${(0,t5.default)(r.overlap)}`],"default"!==r.color&&t[`color${(0,t5.default)(r.color)}`],r.invisible&&t.invisible]}})((0,tQ.default)(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter((0,rF.default)(["contrastText"])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}})),{props:{variant:"dot"},style:{borderRadius:4,height:8,minWidth:8,padding:0}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${rW.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${rW.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${rW.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${rW.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${rW.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${rW.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${rW.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${rW.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]})));function rH(e){return{vertical:e?.vertical??"top",horizontal:e?.horizontal??"right"}}let rB=n.forwardRef(function(e,r){let n=(0,eL.useDefaultProps)({props:e,name:"MuiBadge"}),{anchorOrigin:a,className:o,classes:i,component:l,components:s={},componentsProps:c={},children:u,overlap:d="rectangular",color:f="default",invisible:h=!1,max:p=99,badgeContent:m,slots:g,slotProps:x,showZero:y=!1,variant:b="standard",...v}=n,{badgeContent:j,invisible:C,max:w,displayValue:S}=rL({max:p,invisible:h,badgeContent:m,showZero:y}),k=(0,rD.default)({anchorOrigin:rH(a),color:f,overlap:d,variant:b,badgeContent:m}),O=C||null==j&&"dot"!==b,{color:T=f,overlap:_=d,anchorOrigin:M,variant:R=b}=O?k:n,E=rH(M),I="dot"!==R?S:void 0,P={...n,badgeContent:j,invisible:O,max:w,displayValue:I,showZero:y,anchorOrigin:E,color:T,overlap:_,variant:R},A=(e=>{let{color:t,anchorOrigin:r,invisible:n,overlap:a,variant:o,classes:i={}}=e,l={root:["root"],badge:["badge",o,n&&"invisible",`anchorOrigin${(0,t5.default)(r.vertical)}${(0,t5.default)(r.horizontal)}`,`anchorOrigin${(0,t5.default)(r.vertical)}${(0,t5.default)(r.horizontal)}${(0,t5.default)(a)}`,`overlap${(0,t5.default)(a)}`,"default"!==t&&`color${(0,t5.default)(t)}`]};return(0,tq.default)(l,rq,i)})(P),$={slots:{root:g?.root??s.Root,badge:g?.badge??s.Badge},slotProps:{root:x?.root??c.root,badge:x?.badge??c.badge}},[z,D]=(0,rN.default)("root",{elementType:rQ,externalForwardedProps:{...$,...v},ownerState:P,className:(0,tF.default)(A.root,o),ref:r,additionalProps:{as:l}}),[L,F]=(0,rN.default)("badge",{elementType:rK,externalForwardedProps:$,ownerState:P,className:A.badge});return(0,t.jsxs)(z,{...D,children:[u,(0,t.jsx)(L,{...F,children:I})]})});var rU=e.i(473287),rG=e.i(109253);function rV(){let{remainingSeconds:e,isEnabled:r}=I();return!r||null===e||e>60?null:(0,t.jsxs)(rB,{color:"warning",variant:"standard",sx:{display:"flex",alignItems:"center",gap:1,fontSize:"0.75rem",mr:2},children:[(0,t.jsx)(eu.default,{component:K.IoWarning,sx:{display:"inline-flex"}}),"Idle timeout: ",(0,V.formatDuration)(e,"compact")]})}var rJ=e.i(600395),rX=e.i(139023),rY=e.i(734499),rZ=e.i(765165),r0=e.i(278013),r1=e.i(548878);function r5(){var e;let{apiClient:r}=(0,ea.useApiConfig)(),{data:a,isLoading:o,error:i}=(0,N.useQuery)({queryKey:B.cacheKeys.user(),queryFn:()=>(0,r1.fetchUser)(r),retry:!1}),{data:l}=(0,N.useQuery)({queryKey:["github-avatar",a?.id],queryFn:()=>a?(0,r1.fetchGitHubAvatar)(a.id):Promise.resolve(null),enabled:!!a?.id&&"github"===a.login_type,retry:!1,staleTime:3e5}),[s,c]=(0,n.useState)(null),u=e=>{c(e.currentTarget)},d=()=>{c(null)},f=!o&&!i&&a;return(0,t.jsxs)(t.Fragment,{children:[o?(0,t.jsx)(eu.default,{onClick:u,sx:{width:32,height:32,borderRadius:"50%",bgcolor:"background.paper",color:"primary.main",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},children:(0,t.jsx)(tv.default,{size:16})}):(0,t.jsx)(rJ.default,{onClick:u,src:l||void 0,sx:{width:28,height:28,cursor:"pointer",outline:"1px solid white",fontSize:"0.875rem"},children:(e=a?.login)?e.charAt(0).toUpperCase():"U"}),(0,t.jsxs)(rZ.default,{anchorEl:s,open:!!s,onClose:d,slotProps:{paper:{sx:{bgcolor:"background.paper",borderColor:"divider",boxShadow:3,minWidth:180}}},children:[(0,t.jsxs)(eu.default,{sx:{px:2,py:1.5},children:[o&&(0,t.jsxs)(eu.default,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,t.jsx)(W.default,{variant:"body2",color:"text.primary",children:"Loading..."}),(0,t.jsx)(tv.default,{size:16})]}),i&&(0,t.jsx)(W.default,{variant:"caption",color:"error",children:"Failed to load user information"}),f&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(W.default,{variant:"body2",fontWeight:"600",color:"text.primary",children:a.login}),a.email&&(0,t.jsx)(W.default,{variant:"caption",color:"text.secondary",children:a.email})]})]}),(0,t.jsx)(tL.default,{}),(0,t.jsxs)(r0.default,{onClick:()=>{window.open("https://cloud.datarecce.io/","_blank"),d()},children:[(0,t.jsx)(rX.default,{children:(0,t.jsx)(tC.FaCloud,{})}),(0,t.jsx)(rY.default,{children:"Recce Cloud"})]}),(0,t.jsxs)(r0.default,{onClick:()=>{window.open(en.RECCE_SUPPORT_CALENDAR_URL,"_blank"),d()},children:[(0,t.jsx)(rX.default,{children:(0,t.jsx)(tC.FaUser,{})}),(0,t.jsx)(rY.default,{children:"Get live support"})]})]})]})}let r2=()=>{let{setTheme:e,resolvedTheme:r}=u(),[a,o]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{o(!0)},[]),!a)return(0,t.jsx)(q.default,{size:"small",sx:{color:"rgba(255, 255, 255, 0.8)","&:hover":{bgcolor:"rgba(255, 255, 255, 0.1)"}},disabled:!0,children:(0,t.jsx)(ec.PiSun,{style:{width:18,height:18}})});let i="dark"===r;return(0,t.jsx)(tS.default,{title:i?"Switch to light mode":"Switch to dark mode",children:(0,t.jsx)(q.default,{size:"small",onClick:()=>{e("dark"===r?"light":"dark")},sx:{color:"rgba(255, 255, 255, 0.8)","&:hover":{bgcolor:"rgba(255, 255, 255, 0.1)"}},"aria-label":i?"Switch to light mode":"Switch to dark mode",children:i?(0,t.jsx)(ec.PiSun,{style:{width:18,height:18}}):(0,t.jsx)(ec.PiMoon,{style:{width:18,height:18}})})})},r6=k.default.create();async function r4(e){return(await e.get("/api/version")).data}let r8=()=>{let{version:e,latestVersion:r}=function(){let[e,t]=(0,n.useState)(""),[r,a]=(0,n.useState)(""),o=(0,y.useApiConfigOptional)(),i=o?.apiClient??r6;return(0,n.useEffect)(()=>{!async function(){try{let{version:e,latestVersion:r}=await r4(i);t(e),a(r)}catch(e){console.error("Error fetching version number:",e)}}()},[i]),{version:e,latestVersion:r}}(),a=(0,n.useMemo)(()=>RegExp("^\\d+\\.\\d+\\.\\d+$"),[]);return((0,n.useEffect)(()=>{if(a.test(e)&&e!==r){let e="recce-update-toast-shown";sessionStorage.getItem(e)||setTimeout(()=>{Y.toaster.create({id:"recce-update-available",title:"Update available",description:(0,t.jsxs)("span",{children:["A new version of Recce (v",r,") is available.",(0,t.jsx)("br",{}),"Please run"," ",(0,t.jsx)(eu.default,{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.",(0,t.jsx)("br",{}),(0,t.jsx)(ed.default,{sx:{color:"primary.main",fontWeight:"bold","&:hover":{textDecoration:"underline"}},href:`https://github.com/DataRecce/recce/releases/tag/v${r}`,target:"_blank",children:"Click here to view the detail of latest release"})]}),duration:6e4,closable:!0}),sessionStorage.setItem(e,"true")},0)}},[e,r,a]),a.test(e))?(0,t.jsx)(ed.default,{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}):(0,t.jsx)(W.default,{component:"span",sx:{fontSize:"sm",color:"rgba(255,255,255,0.8)",textTransform:"uppercase",borderWidth:1,px:1,borderRadius:.75},children:e})};function r3({icon:e,href:r,sx:n,...a}){let o=(0,rU.useTheme)();return(0,t.jsx)(ed.default,{sx:{height:"20px",color:"common.white",...n},href:r,target:"_blank",...a,children:(0,t.jsx)(e,{style:{color:o.palette.common.white,width:20,height:20}})})}let r7=()=>{let{reviewMode:e,isDemoSite:r,envInfo:a,cloudMode:o}=(0,ee.useLineageGraphContext)(),{featureToggles:i,authed:l}=(0,P.useRecceInstanceContext)(),{url:s,id:c}=a?.pullRequest??{},u=s?s.split("/").pop():null,d=o||l?"https://cloud.datarecce.io/":"https://reccehq.com/",[f,h]=(0,n.useState)(!1);return(0,t.jsxs)(eu.default,{sx:{display:"flex",gap:"10px",minHeight:"40px",alignItems:"center",bgcolor:tf.colors.brand[400]},children:[(0,t.jsx)(ed.default,{href:d,target:"_blank",sx:{"&:hover":{textDecoration:"none"}},children:(0,t.jsxs)(eu.default,{sx:{display:"flex",gap:"10px",alignItems:"center"},children:[(0,t.jsx)(eu.default,{component:"img",sx:{width:20,height:20,ml:"18px"},src:"/logo/recce-logo-white.png",alt:"recce-logo-white"}),(0,t.jsx)(W.default,{variant:"h4",sx:{fontFamily:'"Montserrat", sans-serif',color:"common.white",fontSize:"1.25rem"},children:"RECCE"})]})}),(0,t.jsx)(r2,{}),(0,t.jsx)(r8,{}),(i.mode??e)&&(0,t.jsx)(rB,{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"}),o&&c&&(0,t.jsx)(rB,{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:(0,t.jsxs)(eh.default,{direction:"row",spacing:1,alignItems:"center",children:[(0,t.jsx)(eu.default,{children:"cloud mode"}),(0,t.jsx)(eu.default,{sx:{borderLeft:"1px solid rgba(255,255,255,0.8)",pl:"8px"},children:(0,t.jsxs)(ed.default,{href:s,sx:{"&:hover":{textDecoration:"none"}},target:"_blank",children:[(0,t.jsx)(rG.VscGitPullRequest,{style:{color:"rgba(255,255,255,0.8)",width:12,height:12,marginRight:2,display:"inline",verticalAlign:"middle"}}),(0,t.jsx)(W.default,{component:"span",sx:{color:"rgba(255,255,255,0.8)",display:"inline"},children:`#${String(c)}`})]})})]})}),r&&s&&u&&(0,t.jsx)(rB,{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:(0,t.jsxs)(eh.default,{direction:"row",spacing:1,alignItems:"center",children:[(0,t.jsx)(eu.default,{children:"demo mode"}),(0,t.jsx)(eu.default,{sx:{borderLeft:"1px solid rgba(255,255,255,0.8)",pl:"8px"},children:(0,t.jsxs)(ed.default,{href:s,sx:{"&:hover":{textDecoration:"none"}},target:"_blank",children:[(0,t.jsx)(rG.VscGitPullRequest,{style:{color:"rgba(255,255,255,0.8)",width:12,height:12,marginRight:2,display:"inline",verticalAlign:"middle"}}),(0,t.jsx)(W.default,{component:"span",sx:{color:"rgba(255,255,255,0.8)",display:"inline"},children:`#${u}`})]})})]})}),(0,t.jsx)(eu.default,{sx:{flex:1}}),(r||"read only"===i.mode)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r3,{icon:tC.FaGithub,href:"https://github.com/DataRecce/recce"}),(0,t.jsx)(r3,{icon:tC.FaSlack,href:"https://getdbt.slack.com/archives/C05C28V7CPP"}),(0,t.jsx)(r3,{sx:{mr:2},icon:tC.FaQuestionCircle,href:"https://docs.datarecce.io"})]}),!r&&"read only"!==i.mode&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(rV,{}),l||o?(0,t.jsx)(eu.default,{sx:{mr:2},children:(0,t.jsx)(r5,{})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eu.default,{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:()=>{h(!0)},children:"Connect to Cloud"}),f&&(0,t.jsx)(t$.default,{parentOpen:f,handleParentClose:h,ignoreCookie:!0,variant:"user-profile"})]})]})]})};function r9(){return(0,t.jsx)(eu.default,{sx:{display:"flex",height:"100%",alignItems:"center",justifyContent:"center",contain:"size"},children:(0,t.jsx)(eu.default,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:(0,t.jsx)(tv.default,{size:48})})})}function ne({children:e,lineage:r}){let a=(0,el.usePathname)(),{isDemoSite:o,isLoading:i,isCodespace:l}=(0,ee.useLineageGraphContext)(),{featureToggles:s}=(0,P.useRecceInstanceContext)(),c=a.replace(/\/$/,"")||"/";return(0,n.useEffect)(()=>{(0,er.trackInit)()},[]),(0,t.jsxs)(eu.default,{sx:{display:"flex",flexDirection:"column",height:"100vh",overflow:"hidden"},children:[(0,t.jsx)(r7,{}),(0,t.jsx)(rz,{}),(0,t.jsx)(nt,{isLineageRoute:"/lineage"===c||"/"===c,lineage:r,children:e}),!i&&!o&&!l&&null===s.mode&&(0,t.jsx)(t$.default,{})]})}function nt({children:e,lineage:r,isLineageRoute:a,disableInternalHistory:o=!1}){let{isRunResultOpen:i,isHistoryOpen:l,closeRunResult:s}=(0,ex.useRecceActionContext)(),{basePath:c}=(0,ey.useRouteConfig)(),{data:u}=(0,et.useRecceServerFlag)(),d=(0,el.usePathname)(),f=(0,tj.useIsDark)(),h=i&&!d.startsWith(`${c}/checks`),p=!o&&l&&!d.startsWith(`${c}/checks`);return(0,t.jsxs)(tA.HSplit,{sizes:[0,100],minSize:300*!!p,gutterSize:5*!!p,style:{height:"100%"},children:[(0,t.jsx)(eu.default,{style:{contain:"size"},suppressHydrationWarning:!0,children:p&&(0,t.jsx)(tI,{})}),(0,t.jsxs)(tA.VSplit,{sizes:h?[50,50]:[100,0],minSize:100*!!h,gutterSize:5*!!h,style:{flex:"1",contain:"size"},children:[(0,t.jsx)(n.Suspense,{fallback:(0,t.jsx)(r9,{}),children:(0,t.jsxs)(eu.default,{sx:{p:0,contain:"content",height:"100%",position:"relative"},suppressHydrationWarning:!0,children:[(0,t.jsx)(eu.default,{sx:{display:a?"block":"none",height:"100%",position:a?"relative":"absolute",inset:0},children:r}),!a&&e]})}),(0,t.jsx)(eu.default,{sx:{height:"100%",bgcolor:f?"grey.900":"grey.50"},suppressHydrationWarning:!0,children:h?(0,t.jsx)(tP.RunResultPaneOss,{onClose:s,isSingleEnvironment:!!u?.single_env_onboarding}):null})]})]})}function nr({children:e,lineage:n}){return(0,t.jsx)(d,{attribute:"class",defaultTheme:"light",enableSystem:!1,children:(0,t.jsx)(tb,{enableCssBaseline:!0,children:(0,t.jsx)(r.QueryClientProvider,{client:ez,children:(0,t.jsx)(y.ApiProvider,{config:{baseUrl:en.PUBLIC_API_URL},children:(0,t.jsx)(R,{children:(0,t.jsxs)(eC,{children:[(0,t.jsx)(ne,{lineage:n,children:e}),(0,t.jsx)(Y.Toaster,{})]})})})})})})}e.s(["default",()=>nr],889276)},699694,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function({html:e,height:t=null,width:r=null,children:o,dataNtpc:i=""}){return(0,a.useEffect)(()=>{i&&performance.mark("mark_feature_usage",{detail:{feature:`next-third-parties-${i}`}})},[i]),(0,n.jsxs)(n.Fragment,{children:[o,e?(0,n.jsx)("div",{style:{height:null!=t?`${t}px`:"auto",width:null!=r?`${r}px`:"auto"},"data-ntpc":i,dangerouslySetInnerHTML:{__html:e}}):null]})};let n=e.r(991047),a=e.r(600943)},593496,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={cancelIdleCallback:function(){return i},requestIdleCallback:function(){return o}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o="u">typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},i="u">typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},171088,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return b},handleClientScriptLoad:function(){return g},initScriptLoader:function(){return x}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(481258),i=e.r(744066),l=e.r(991047),s=o._(e.r(631467)),c=i._(e.r(600943)),u=e.r(213286),d=e.r(434078),f=e.r(593496),h=new Map,p=new Set,m=e=>{let{src:t,id:r,onLoad:n=()=>{},onReady:a=null,dangerouslySetInnerHTML:o,children:i="",strategy:l="afterInteractive",onError:c,stylesheets:u}=e,f=r||t;if(f&&p.has(f))return;if(h.has(t)){p.add(f),h.get(t).then(n,c);return}let m=()=>{a&&a(),p.add(f)},g=document.createElement("script"),x=new Promise((e,t)=>{g.addEventListener("load",function(t){e(),n&&n.call(this,t),m()}),g.addEventListener("error",function(e){t(e)})}).catch(function(e){c&&c(e)});o?(g.innerHTML=o.__html||"",m()):i?(g.textContent="string"==typeof i?i:Array.isArray(i)?i.join(""):"",m()):t&&(g.src=t,h.set(t,x)),(0,d.setAttributesFromProps)(g,e),"worker"===l&&g.setAttribute("type","text/partytown"),g.setAttribute("data-nscript",l),u&&(e=>{if(s.default.preinit)return e.forEach(e=>{s.default.preinit(e,{as:"style"})});if("u">typeof window){let t=document.head;e.forEach(e=>{let r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,t.appendChild(r)})}})(u),document.body.appendChild(g)};function g(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,f.requestIdleCallback)(()=>m(e))}):m(e)}function x(e){e.forEach(g),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");p.add(t)})}function y(e){let{id:t,src:r="",onLoad:n=()=>{},onReady:a=null,strategy:o="afterInteractive",onError:i,stylesheets:d,...h}=e,{updateScripts:g,scripts:x,getIsSsr:y,appDir:b,nonce:v}=(0,c.useContext)(u.HeadManagerContext);v=h.nonce||v;let j=(0,c.useRef)(!1);(0,c.useEffect)(()=>{let e=t||r;j.current||(a&&e&&p.has(e)&&a(),j.current=!0)},[a,t,r]);let C=(0,c.useRef)(!1);if((0,c.useEffect)(()=>{if(!C.current){if("afterInteractive"===o)m(e);else"lazyOnload"===o&&("complete"===document.readyState?(0,f.requestIdleCallback)(()=>m(e)):window.addEventListener("load",()=>{(0,f.requestIdleCallback)(()=>m(e))}));C.current=!0}},[e,o]),("beforeInteractive"===o||"worker"===o)&&(g?(x[o]=(x[o]||[]).concat([{id:t,src:r,onLoad:n,onReady:a,onError:i,...h,nonce:v}]),g(x)):y&&y()?p.add(t||r):y&&!y()&&m({...e,nonce:v})),b){if(d&&d.forEach(e=>{s.default.preinit(e,{as:"style"})}),"beforeInteractive"===o)if(!r)return h.dangerouslySetInnerHTML&&(h.children=h.dangerouslySetInnerHTML.__html,delete h.dangerouslySetInnerHTML),(0,l.jsx)("script",{nonce:v,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${JSON.stringify([0,{...h,id:t}])})`}});else return s.default.preload(r,h.integrity?{as:"script",integrity:h.integrity,nonce:v,crossOrigin:h.crossOrigin}:{as:"script",nonce:v,crossOrigin:h.crossOrigin}),(0,l.jsx)("script",{nonce:v,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${JSON.stringify([r,{...h,id:t}])})`}});"afterInteractive"===o&&r&&s.default.preload(r,h.integrity?{as:"script",integrity:h.integrity,nonce:v,crossOrigin:h.crossOrigin}:{as:"script",nonce:v,crossOrigin:h.crossOrigin})}return null}Object.defineProperty(y,"__nextScript",{value:!0});let b=y;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},241152,(e,t,r)=>{t.exports=e.r(171088)},613710,(e,t,r)=>{"use strict";var n=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.sendGTMEvent=void 0,r.GoogleTagManager=function(e){let{gtmId:t,gtmScriptUrl:r,dataLayerName:n="dataLayer",auth:s,preview:c,dataLayer:u,nonce:d}=e;l=n;let f=new URL(r||"https://www.googletagmanager.com/gtm.js");return t&&f.searchParams.set("id",t),"dataLayer"!==n&&f.searchParams.set("l",n),s&&f.searchParams.set("gtm_auth",s),c&&(f.searchParams.set("gtm_preview",c),f.searchParams.set("gtm_cookies_win","x")),(0,o.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-gtm"}})},[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.default,{id:"_next-gtm-init",dangerouslySetInnerHTML:{__html:`
|
|
30
30
|
(function(w,l){
|
|
31
31
|
w[l]=w[l]||[];
|
|
32
32
|
w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});
|
|
33
33
|
${u?`w[l].push(${JSON.stringify(u)})`:""}
|
|
34
|
-
})(window,'${n}');`},nonce:d}),(0,a.jsx)(i.default,{id:"_next-gtm","data-ntpc":"GTM",src:f.href,nonce:d})]})};let a=e.r(991047),o=e.r(600943),i=n(e.r(241152)),
|
|
34
|
+
})(window,'${n}');`},nonce:d}),(0,a.jsx)(i.default,{id:"_next-gtm","data-ntpc":"GTM",src:f.href,nonce:d})]})};let a=e.r(991047),o=e.r(600943),i=n(e.r(241152)),l="dataLayer";r.sendGTMEvent=(e,t)=>{let r=t||l;window[r]=window[r]||[],window[r].push(e)}},244743,(e,t,r)=>{"use strict";let n;var a=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.GoogleAnalytics=function(e){let{gaId:t,debugMode:r,dataLayerName:a="dataLayer",nonce:s}=e;return void 0===n&&(n=a),(0,i.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-ga"}})},[]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(l.default,{id:"_next-ga-init",dangerouslySetInnerHTML:{__html:`
|
|
35
35
|
window['${a}'] = window['${a}'] || [];
|
|
36
36
|
function gtag(){window['${a}'].push(arguments);}
|
|
37
37
|
gtag('js', new Date());
|
|
38
38
|
|
|
39
|
-
gtag('config', '${t}' ${r?",{ 'debug_mode': true }":""});`},nonce:
|
|
39
|
+
gtag('config', '${t}' ${r?",{ 'debug_mode': true }":""});`},nonce:s}),(0,o.jsx)(l.default,{id:"_next-ga",src:`https://www.googletagmanager.com/gtag/js?id=${t}`,nonce:s})]})},r.sendGAEvent=function(){void 0===n?console.warn("@next/third-parties: GA has not been initialized"):window[n]?window[n].push(arguments):console.warn(`@next/third-parties: GA dataLayer ${n} does not exist`)};let o=e.r(991047),i=e.r(600943),l=a(e.r(241152))}]);
|