sqlmesh 0.181.2.dev24__py3-none-any.whl → 0.181.2.dev26__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.
- sqlmesh/_version.py +2 -2
- {sqlmesh-0.181.2.dev24.dist-info → sqlmesh-0.181.2.dev26.dist-info}/METADATA +1 -1
- {sqlmesh-0.181.2.dev24.dist-info → sqlmesh-0.181.2.dev26.dist-info}/RECORD +50 -50
- web/client/dist/assets/Audits-CQSghR1z.js +1 -0
- web/client/dist/assets/Banner-B0bpqtD_.js +1 -0
- web/client/dist/assets/{ChevronDownIcon-BZk6URUK.js → ChevronDownIcon-BCSgClK9.js} +1 -1
- web/client/dist/assets/{ChevronRightIcon-Ctcbr61G.js → ChevronRightIcon-Bcz9goZS.js} +1 -1
- web/client/dist/assets/Content-BhpD1QIh.js +10 -0
- web/client/dist/assets/Content-DcS8joWy.js +1 -0
- web/client/dist/assets/Data-Cx_yMlp4.js +1 -0
- web/client/dist/assets/{DataCatalog-BRzSrlJL.js → DataCatalog-HXtPC12m.js} +1 -1
- web/client/dist/assets/{Editor-7muj9lbw.js → Editor-DOjTVzHs.js} +1 -1
- web/client/dist/assets/Editor-DlcCcxAF.js +1 -0
- web/client/dist/assets/Errors-RKQ2D8gd.js +1 -0
- web/client/dist/assets/FileExplorer-CstWOCnn.js +2 -0
- web/client/dist/assets/{Footer-Cnu_IoqE.js → Footer-CpMoFxgd.js} +1 -1
- web/client/dist/assets/{Header-NJkxh8bb.js → Header-mC2S0YQz.js} +1 -1
- web/client/dist/assets/Input-BmfZ-VnW.js +41 -0
- web/client/dist/assets/Lineage-VCDzvguV.js +1 -0
- web/client/dist/assets/ListboxShow-CVN-1wre.js +1 -0
- web/client/dist/assets/ModelLineage-DxdKn0Xe.js +1 -0
- web/client/dist/assets/Models-BMTG-GKX.js +1 -0
- web/client/dist/assets/{Page-DxTzPmYT.js → Page-DrM7FMiZ.js} +1 -1
- web/client/dist/assets/{Plan-B2b637kI.js → Plan-Cwr9Ts3u.js} +1 -1
- web/client/dist/assets/PlusCircleIcon-DPJ5E9WX.js +1 -0
- web/client/dist/assets/ReportErrors-DXdPHMbP.js +1 -0
- web/client/dist/assets/Root-DyEjo8XJ.js +1 -0
- web/client/dist/assets/{SearchList-9n_6_E0k.js → SearchList-CJR2axiJ.js} +1 -1
- web/client/dist/assets/SelectEnvironment-BhhJ4ZjZ.js +2 -0
- web/client/dist/assets/{SourceList-Chz492Ne.js → SourceList-CXyYEJjr.js} +1 -1
- web/client/dist/assets/{SourceListItem-DIieM0S_.js → SourceListItem-DVQwSGMy.js} +1 -1
- web/client/dist/assets/{SplitPane-CmzNrZQN.js → SplitPane-B5WJSZPo.js} +1 -1
- web/client/dist/assets/Tests-BjGO6Jnt.js +1 -0
- web/client/dist/assets/{Welcome-DxKW_LKA.js → Welcome-DMIPcEFX.js} +1 -1
- web/client/dist/assets/{context-DhymIb_N.js → context-DeHggMKx.js} +37 -37
- web/client/dist/assets/context-Dwh4I8fp.js +1 -0
- web/client/dist/assets/{editor-Bf9rhumO.js → editor-intN6ort.js} +1 -1
- web/client/dist/assets/file-ZamfLSgo.js +1 -0
- web/client/dist/assets/floating-ui.react-dom-dR28niet.js +1 -0
- web/client/dist/assets/{help-DtLmoC0U.js → help-BzkjAMMJ.js} +1 -1
- web/client/dist/assets/{index-CLuHMKlN.js → index-BObtdpsN.js} +1 -1
- web/client/dist/assets/{index-KZcJd7F1.js → index-EyUZDtV7.js} +1 -1
- web/client/dist/assets/plan-gWbTulhw.js +1 -0
- web/client/dist/assets/popover-CA0_-cE5.js +13 -0
- web/client/dist/assets/{project-CjyecwCx.js → project-BX-rNI7d.js} +1 -1
- web/client/dist/index.html +1 -1
- web/client/dist/assets/Audits-7rP8WdsD.js +0 -1
- web/client/dist/assets/Banner-jMPu9_jP.js +0 -1
- web/client/dist/assets/Content-C43kcRta.js +0 -10
- web/client/dist/assets/Content-DITnFT31.js +0 -1
- web/client/dist/assets/Data-B5q1KzIa.js +0 -1
- web/client/dist/assets/Editor-CAMzYH0x.js +0 -1
- web/client/dist/assets/Errors-Bbd2EOQg.js +0 -1
- web/client/dist/assets/FileExplorer-DMR02idl.js +0 -5
- web/client/dist/assets/Input-CYm3h-zG.js +0 -41
- web/client/dist/assets/Lineage-HZl7aUI5.js +0 -1
- web/client/dist/assets/ListboxShow-CwgOYGSe.js +0 -1
- web/client/dist/assets/ModelLineage-Bnes5PV4.js +0 -1
- web/client/dist/assets/Models-B_sukTY5.js +0 -1
- web/client/dist/assets/PlusCircleIcon-FgfUjgrM.js +0 -1
- web/client/dist/assets/ReportErrors-xnNgNULg.js +0 -1
- web/client/dist/assets/Root-BMcIwqdc.js +0 -1
- web/client/dist/assets/SelectEnvironment-DC6x26Ax.js +0 -2
- web/client/dist/assets/Tests-DbVFKqeG.js +0 -1
- web/client/dist/assets/context-CzM900aY.js +0 -1
- web/client/dist/assets/file-CcK5Oobc.js +0 -1
- web/client/dist/assets/index-BdXOfeCo.js +0 -1
- web/client/dist/assets/plan-e4fPD47J.js +0 -1
- web/client/dist/assets/transition-C8EjNcgL.js +0 -4
- {sqlmesh-0.181.2.dev24.dist-info → sqlmesh-0.181.2.dev26.dist-info}/WHEEL +0 -0
- {sqlmesh-0.181.2.dev24.dist-info → sqlmesh-0.181.2.dev26.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.181.2.dev24.dist-info → sqlmesh-0.181.2.dev26.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.181.2.dev24.dist-info → sqlmesh-0.181.2.dev26.dist-info}/top_level.txt +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,R as r,j as s,c as _,B as Q,m as P,n as ee,aA as ie,h as le,w as H,b as F,i as W,W as ce,Z as de,aB as ue,v as me,L as te,S as se,F as q,I as fe}from"./index-KZcJd7F1.js";import{d as he,e as ne,f as B,P as ae,h as G,b as $,i as pe,E as V,R as ge,j as we,k as xe,l as ve,m as X,n as Y,o as J,p as ye,q as Ne,r as be,s as Ee}from"./context-DhymIb_N.js";import{W as ke}from"./editor-Bf9rhumO.js";import{F as Ce,L as ze}from"./ListboxShow-CwgOYGSe.js";import{S as Me}from"./SearchList-9n_6_E0k.js";import{n as Se}from"./Input-CYm3h-zG.js";import{B as T}from"./transition-C8EjNcgL.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./index-BdXOfeCo.js";import"./file-CcK5Oobc.js";import"./project-CjyecwCx.js";import"./help-6Q7f7fjd.js";import"./SourceList-Chz492Ne.js";import"./index-CLuHMKlN.js";function je({title:e,titleId:t,...n},a){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?o.createElement("title",{id:t},e):null,o.createElement("path",{fillRule:"evenodd",d:"M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Z",clipRule:"evenodd"}))}const Le=o.forwardRef(je);function Ie(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[a,d]of e)if(!Object.is(d,t.get(a)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const a of e)if(!t.has(a))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const a of n)if(!Object.prototype.hasOwnProperty.call(t,a)||!Object.is(e[a],t[a]))return!1;return!0}function He(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},r.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function Oe(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},r.createElement("path",{d:"M0 0h32v4.2H0z"}))}function Re(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},r.createElement("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"}))}function _e(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},r.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"}))}function De(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},r.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"}))}const D=({children:e,className:t,...n})=>r.createElement("button",{type:"button",className:G(["react-flow__controls-button",t]),...n},e);D.displayName="ControlButton";const Fe=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom}),re=({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:a=!0,fitViewOptions:d,onZoomIn:i,onZoomOut:l,onFitView:f,onInteractiveChange:h,className:p,children:c,position:N="bottom-left"})=>{const g=he(),[z,k]=o.useState(!1),{isInteractive:w,minZoomReached:x,maxZoomReached:u}=ne(Fe,Ie),{zoomIn:v,zoomOut:E,fitView:m}=B();if(o.useEffect(()=>{k(!0)},[]),!z)return null;const j=()=>{v(),i==null||i()},C=()=>{E(),l==null||l()},S=()=>{m(d),f==null||f()},y=()=>{g.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),h==null||h(!w)};return r.createElement(ae,{className:G(["react-flow__controls",p]),position:N,style:e,"data-testid":"rf__controls"},t&&r.createElement(r.Fragment,null,r.createElement(D,{onClick:j,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:u},r.createElement(He,null)),r.createElement(D,{onClick:C,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:x},r.createElement(Oe,null))),n&&r.createElement(D,{className:"react-flow__controls-fitview",onClick:S,title:"fit view","aria-label":"fit view"},r.createElement(Re,null)),a&&r.createElement(D,{className:"react-flow__controls-interactive",onClick:y,title:"toggle interactivity","aria-label":"toggle interactivity"},w?r.createElement(De,null):r.createElement(_e,null)),c)};re.displayName="Controls";var $e=o.memo(re);function We(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[a,d]of e)if(!Object.is(d,t.get(a)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const a of e)if(!t.has(a))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const a of n)if(!Object.prototype.hasOwnProperty.call(t,a)||!Object.is(e[a],t[a]))return!1;return!0}var M;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(M||(M={}));function Ae({color:e,dimensions:t,lineWidth:n}){return r.createElement("path",{stroke:e,strokeWidth:n,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function Ue({color:e,radius:t}){return r.createElement("circle",{cx:t,cy:t,r:t,fill:e})}const Ve={[M.Dots]:"#91919a",[M.Lines]:"#eee",[M.Cross]:"#e2e2e2"},Te={[M.Dots]:1,[M.Lines]:1,[M.Cross]:6},Pe=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function oe({id:e,variant:t=M.Dots,gap:n=20,size:a,lineWidth:d=1,offset:i=2,color:l,style:f,className:h}){const p=o.useRef(null),{transform:c,patternId:N}=ne(Pe,We),g=l||Ve[t],z=a||Te[t],k=t===M.Dots,w=t===M.Cross,x=Array.isArray(n)?n:[n,n],u=[x[0]*c[2]||1,x[1]*c[2]||1],v=z*c[2],E=w?[v,v]:u,m=k?[v/i,v/i]:[E[0]/i,E[1]/i];return r.createElement("svg",{className:G(["react-flow__background",h]),style:{...f,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:p,"data-testid":"rf__background"},r.createElement("pattern",{id:N+e,x:c[0]%u[0],y:c[1]%u[1],width:u[0],height:u[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${m[0]},-${m[1]})`},k?r.createElement(Ue,{color:g,radius:v/i}):r.createElement(Ae,{dimensions:E,color:g,lineWidth:d})),r.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${N+e})`}))}oe.displayName="Background";var Be=o.memo(oe);function Ge({handleSelect:e}){const{models:t,lineage:n,mainNode:a,connectedNodes:d}=$(),[i,l]=o.useState(!1),[f,h]=o.useState([]),[p,c]=o.useState(!1);o.useEffect(()=>{h([])},[a,t,n]);function N(){l(!0)}function g(){l(!1)}function z(k){k.length<1||le(f)||H(a)||H(n)||(c(!0),setTimeout(()=>{const w=Array.from(pe(n,a));h(Object.keys(n).map(x=>{var u;return{name:x,displayName:((u=t.get(x))==null?void 0:u.displayName)??decodeURI(x),description:`${w.includes(x)?"Upstream":"Downstream"} | ${d.has(x)?"Directly":"Indirectly"} Connected`}})),c(!1)},300))}return s.jsxs("div",{className:_("w-full",i?"block absolute top-0 left-0 right-0 z-10 pr-10 bg-light dark:bg-dark @[40rem]:items-end @[40rem]:justify-end @[40rem]:flex @[40rem]:static @[40rem]:pr-0":"items-end justify-end flex"),children:[s.jsx(Q,{shape:ie.Circle,className:_("flex @[40rem]:hidden !py-1 border-transparent",i?"hidden":"flex"),variant:ee.Alternative,size:P.sm,"aria-label":"Show search",onClick:N,children:s.jsx(Le,{className:"w-3 h-3 text-primary-500"})}),s.jsx(Me,{list:f,placeholder:"Find",searchBy:"displayName",displayBy:"displayName",direction:"top",descriptionBy:"description",showIndex:!1,size:P.sm,onSelect:e,isLoading:p,className:_("w-full @sm:min-w-[12rem] @[40rem]:flex",i?"flex max-w-none":"hidden max-w-[20rem]"),isFullWidth:!0,onInput:z}),s.jsx("button",{className:_("flex @[40rem]:hidden bg-none border-none px-2 py-1 absolute right-0 top-0",i?"flex":"hidden"),"aria-label":"Hide search",onClick:g,children:s.jsx(Ce,{className:"w-6 h-6 text-primary-500"})})]})}function K({nodes:e=[]}){const{setCenter:t}=B(),{activeNodes:n,models:a,mainNode:d,nodesMap:i,selectedNodes:l,setSelectedNodes:f,withImpacted:h,connectedNodes:p,lineageCache:c,setActiveEdges:N,setConnections:g,setLineage:z,setLineageCache:k}=$(),w=H(d)?void 0:a.get(d),x=n.size>0?n.size:p.size,u=l.size,v=p.size-1,E=e.filter(y=>y.hidden).length,m=e.filter(y=>F(y.hidden)&&(y.data.type===V.external||y.data.type===V.seed)).length,j=e.filter(y=>F(y.hidden)&&y.data.type===V.cte).length,C=x>0&&x!==v+1;function S(){if(H(d))return;const y=i[d];H(y)||setTimeout(()=>{t(y.position.x,y.position.y,{zoom:.5,duration:0})},200)}return s.jsxs(s.Fragment,{children:[W(w)&&s.jsx("a",{className:"mr-2 w-full whitespace-nowrap text-ellipsis overflow-hidden @lg:block font-bold text-neutral-600 dark:text-neutral-400 cursor-pointer hover:underline",onClick:S,children:ce(w.displayName,50,25)}),s.jsxs("span",{className:"bg-neutral-5 px-2 py-0.5 flex rounded-full mr-2",children:[s.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[s.jsx("b",{children:"All:"})," ",e.length]}),E>0&&s.jsxs("span",{className:"whitespace-nowrap block mr-2",children:[s.jsx("b",{children:"Hidden:"})," ",E]}),u>0&&s.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[s.jsx("b",{children:"Selected:"})," ",u]}),C&&s.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[s.jsx("b",{children:"Active:"})," ",x]}),(C||u>0||W(c))&&s.jsx(Q,{size:P.xs,variant:ee.Neutral,format:de.Ghost,className:"!m-0 px-1",onClick:()=>{N(new Map),g(new Map),f(new Set),W(c)&&(z(c),k(void 0))},children:"Reset"})]}),m>0&&s.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[s.jsx("b",{children:"Sources"}),": ",m]}),F(C)&&h&&u===0&&v>0&&s.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[s.jsx("b",{children:"Upstream/Downstream:"})," ",v]}),j>0&&s.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[s.jsx("b",{children:"CTEs:"})," ",j]})]})}const Ze=30;function dt({model:e,highlightedNodes:t}){const{setActiveNodes:n,setActiveEdges:a,setConnections:d,setLineage:i,handleError:l,setSelectedNodes:f,setMainNode:h,setWithColumns:p,setHighlightedNodes:c,setNodeConnections:N,setLineageCache:g,setUnknownModels:z,models:k,unknownModels:w}=$(),{refetch:x,isFetching:u,cancel:v}=ue(e.name),{isFetching:E}=me(),[m,j]=o.useState(!1),[C,S]=o.useState(void 0);o.useEffect(()=>{const b=ke();return b.addEventListener("message",y),x().then(({data:L})=>{S(L),!H(L)&&(j(!0),b.postMessage({topic:"lineage",payload:{currentLineage:{},newLineage:L,mainNode:e.fqn}}))}).catch(L=>{l==null||l(L)}).finally(()=>{n(new Set),a(new Map),d(new Map),f(new Set),g(void 0),h(e.fqn)}),()=>{v==null||v(),b.removeEventListener("message",y),b.terminate(),i({}),N({}),h(void 0),c({})}},[e.name,e.hash]),o.useEffect(()=>{Object.keys(C??{}).forEach(b=>{b=encodeURI(b),F(k.has(b))&&F(w.has(b))&&w.add(b)}),z(new Set(w))},[C,k]),o.useEffect(()=>{c(t??{})},[t]);function y(b){var L;b.data.topic==="lineage"&&(j(!1),N(b.data.payload.nodesConnections),i(b.data.payload.lineage),Object.values(((L=b.data.payload)==null?void 0:L.lineage)??{}).length>Ze&&p(!1)),b.data.topic==="error"&&(l==null||l(b.data.error),j(!1))}const O=u||E||m;return s.jsxs("div",{className:"relative h-full w-full overflow-hidden",children:[O&&s.jsxs("div",{className:"absolute top-0 left-0 z-10 flex justify-center items-center w-full h-full",children:[s.jsx("span",{className:"absolute w-full h-full z-10 bg-transparent-20 backdrop-blur-lg"}),s.jsxs(te,{className:"inline-block z-10",children:[s.jsx(se,{className:"w-3 h-3 border border-neutral-10 mr-4"}),s.jsx("h3",{className:"text-md whitespace-nowrap",children:O?"Loading Model's Lineage...":"Merging Model's..."})]})]}),s.jsx(ge,{children:s.jsx(qe,{})})]})}function qe(){const{withColumns:e,lineage:t,mainNode:n,selectedEdges:a,selectedNodes:d,withConnected:i,withImpacted:l,withSecondary:f,hasBackground:h,activeEdges:p,connectedNodes:c,connections:N,nodesMap:g,showControls:z,handleError:k,setActiveNodes:w}=$(),{setCenter:x}=B(),[u,v]=o.useState(!1),E=o.useMemo(()=>({model:we}),[]),m=o.useMemo(()=>xe(t),[t]),j=o.useMemo(()=>ve(t),[t]),[C,S]=o.useState([]),[y,O]=o.useState([]);o.useEffect(()=>{if(q(m)||H(n))return;v(!0);const I=X(m,p,a,g),A=Y(Object.values(g),I,n,c,d,N,i,l,f),U=J(m,N,p,I,a,d,c,i,l,f),Z=ye({nodesMap:g,nodes:A,edges:U});return Z.create().then(R=>{O(R.edges),S(R.nodes)}).catch(R=>{k==null||k(R),O([]),S([])}).finally(()=>{const R=H(n)?void 0:g[n];W(R)&&x(R.position.x,R.position.y,{zoom:.5,duration:0}),setTimeout(()=>{v(!1)},100)}),()=>{Z.terminate(),O([]),S([])}},[p,g,j]),o.useEffect(()=>{if(H(n)||q(C))return;const I=X(m,p,a,g),A=Y(C,I,n,c,d,N,i,l,f),U=J(m,N,p,I,a,d,c,i,l,f);O(U),S(A),w(I)},[N,g,m,p,d,a,c,i,l,f,e,n]);function b(I){S(Ee(I,C))}function L(I){O(be(I,y))}return s.jsxs(s.Fragment,{children:[u&&s.jsxs("div",{className:"absolute top-0 left-0 z-10 flex justify-center items-center w-full h-full",children:[s.jsx("span",{className:"absolute w-full h-full z-10 bg-transparent-20 backdrop-blur-lg"}),s.jsxs(te,{className:"inline-block z-10",children:[s.jsx(se,{className:"w-3 h-3 border border-neutral-10 mr-4"}),s.jsx("h3",{className:"text-md whitespace-nowrap",children:"Building Lineage..."})]})]}),s.jsxs(Ne,{nodes:C,edges:y,nodeTypes:E,onNodesChange:b,onEdgesChange:L,nodeOrigin:[.5,.5],minZoom:.05,maxZoom:1.5,snapGrid:[16,16],snapToGrid:!0,children:[z&&s.jsxs(ae,{position:"top-right",className:"bg-theme !m-0 w-full !z-10",children:[s.jsx(Xe,{nodes:C}),s.jsx(fe,{})]}),s.jsx($e,{className:"bg-light p-1 rounded-md !border-none !shadow-lg"}),s.jsx(Be,{variant:M.Cross,gap:32,size:4,className:_(h?"opacity-100 stroke-neutral-200 dark:stroke-neutral-800":"opacity-0")})]})]})}function Xe({nodes:e=[]}){const{withColumns:t,mainNode:n,selectedNodes:a,withConnected:d,withImpacted:i,withSecondary:l,hasBackground:f,activeNodes:h,highlightedNodes:p,setSelectedNodes:c,setWithColumns:N,setWithConnected:g,setWithImpacted:z,setWithSecondary:k,setHasBackground:w}=$(),x=o.useRef(null),u=o.useMemo(()=>Object.values(p??{}).flat(),[p]);function v(E){u.includes(E.name)||n===E.name||c(m=>(m.has(E.name)?m.delete(E.name):m.add(E.name),new Set(m)))}return s.jsxs("div",{className:"px-2 flex items-center text-xs text-neutral-400 @container",children:[s.jsxs("div",{className:"contents",children:[s.jsxs(T,{className:"flex @lg:hidden bg-none border-none","aria-label":"Show lineage node details",children:[s.jsxs(T.Button,{ref:x,className:"flex items-center relative w-full cursor-pointer bg-primary-10 text-xs rounded-full text-primary-500 py-1 px-3 text-center focus:outline-none focus-visible:border-accent-500 focus-visible:ring-2 focus-visible:ring-light focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-brand-300 border-1 border-transparent",children:["Details",s.jsx(Se,{className:"ml-2 h-4 w-4","aria-hidden":"true"})]}),s.jsx(T.Panel,{className:"absolute left-2 right-2 flex-col z-50 mt-8 transform flex px-4 py-3 bg-theme-lighter shadow-xl focus:ring-2 ring-opacity-5 rounded-lg",children:s.jsx(K,{nodes:e})})]}),s.jsx("div",{className:"hidden @lg:contents w-full",children:s.jsx(K,{nodes:e})})]}),s.jsxs("div",{className:"flex w-full justify-end items-center",children:[s.jsx(Ge,{handleSelect:v}),s.jsx(ze,{options:{Background:w,Columns:h.size>0&&a.size===0?void 0:N,Connected:h.size>0?void 0:g,"Upstream/Downstream":h.size>0?void 0:z,All:h.size>0?void 0:k},value:[t&&"Columns",f&&"Background",d&&"Connected",i&&"Upstream/Downstream",l&&"All"].filter(Boolean)})]})]})}export{dt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{y as B,U as M,t as $,a as d,r as h,v as F,w as m,i as x,e as L,j as s,H as b,h as T,m as E,I as z,V as K,a8 as P,O as w,F as A,b as O}from"./index-KZcJd7F1.js";import{S as R,b as k,m as C,n as I,o as H,p as U,f as D,g as G}from"./SearchList-9n_6_E0k.js";import{P as V}from"./Page-DxTzPmYT.js";import{g as W}from"./context-DhymIb_N.js";import{u as f}from"./project-CjyecwCx.js";import"./Input-CYm3h-zG.js";import"./index-BdXOfeCo.js";import"./help-6Q7f7fjd.js";import"./transition-C8EjNcgL.js";import"./SplitPane-CmzNrZQN.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./editor-Bf9rhumO.js";import"./file-CcK5Oobc.js";import"./SourceList-Chz492Ne.js";import"./index-CLuHMKlN.js";function le({route:g=L.Home}){const{pathname:j}=B(),{modelName:i}=M(),u=$(),l=d(e=>e.models),r=d(e=>e.lastSelectedModel),N=d(e=>e.setLastSelectedModel),p=f(e=>e.files),S=f(e=>e.setSelectedFile),n=h.useMemo(()=>Array.from(new Set(l.values())),[l]),{isFetching:c}=F(),t=`${g}/models`,a=m(i)||i===(r==null?void 0:r.name)?r:l.get(encodeURI(i));h.useEffect(()=>{if(m(a))return;const e=p.get(a.path);x(e)&&S(e),N(a),u(`${t}/${a.name}`,{replace:!0})},[p,a,t]);const y=m(a)&&x(i)&&O(c);return s.jsx(V,{sidebar:A(n)?void 0:s.jsx(k,{"update-selector":"tbk-model-name",children:s.jsx(C,{selectable:!0,onChange:e=>u(e.detail.value),className:"pt-3 px-2",children:Object.entries(I.categorize(n)).map(([e,v])=>s.jsx(H,{headline:e,open:!0,children:v.map(o=>s.jsx(U,{size:"xs","hide-icon":!0,active:j===`${t}/${o.name}`,value:`${t}/${o.name}`,"search-value":o.displayName,compact:!0,children:s.jsx(D,{"hide-schema":!0,"hide-catalog":!0,"hide-tooltip":!0,text:o.displayName,children:s.jsx(G,{size:"2xs",slot:"after",children:W(o.type)})})},o.name))},e))})}),content:s.jsx(b.Page,{children:s.jsxs("div",{className:"flex flex-col w-full h-full overflow-hidden",children:[T(n)&&s.jsx(R,{list:n,size:E.lg,searchBy:"index",displayBy:"displayName",to:e=>`${t}/${e.name}`,direction:"top",className:"p-2",isFullWidth:!0,disabled:c}),s.jsx(z,{}),y?s.jsx(K,{link:t,message:"Go Back",description:`Model "${i}" not found.`}):c?s.jsx(P,{children:"Loading Model page..."}):s.jsx(w,{})]})})})}export{le as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{R as P,r as n,a2 as H}from"./index-KZcJd7F1.js";import{U as E,y as S,S as A,o as R,H as Z,u as I,k,C as D,I as U,V as B,j as K,T as V,G as N,x as L,z as x,A as W}from"./transition-C8EjNcgL.js";import{c as G}from"./_commonjs-dynamic-modules-TDtrdbi3.js";var q;let Q=(q=P.startTransition)!=null?q:function(e){e()};var Y=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Y||{}),_=(e=>(e[e.ToggleDisclosure=0]="ToggleDisclosure",e[e.CloseDisclosure=1]="CloseDisclosure",e[e.SetButtonId=2]="SetButtonId",e[e.SetPanelId=3]="SetPanelId",e[e.LinkPanel=4]="LinkPanel",e[e.UnlinkPanel=5]="UnlinkPanel",e))(_||{});let J={0:e=>({...e,disclosureState:I(e.disclosureState,{0:1,1:0})}),1:e=>e.disclosureState===1?e:{...e,disclosureState:1},4(e){return e.linkedPanel===!0?e:{...e,linkedPanel:!0}},5(e){return e.linkedPanel===!1?e:{...e,linkedPanel:!1}},2(e,s){return e.buttonId===s.buttonId?e:{...e,buttonId:s.buttonId}},3(e,s){return e.panelId===s.panelId?e:{...e,panelId:s.panelId}}},z=n.createContext(null);z.displayName="DisclosureContext";function T(e){let s=n.useContext(z);if(s===null){let l=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(l,T),l}return s}let O=n.createContext(null);O.displayName="DisclosureAPIContext";function F(e){let s=n.useContext(O);if(s===null){let l=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(l,F),l}return s}let j=n.createContext(null);j.displayName="DisclosurePanelContext";function X(){return n.useContext(j)}function ee(e,s){return I(s.type,J,e,s)}let te=n.Fragment;function ae(e,s){let{defaultOpen:l=!1,...u}=e,v=n.useRef(null),i=S(s,A(a=>{v.current=a},e.as===void 0||e.as===n.Fragment)),c=n.useRef(null),$=n.useRef(null),f=n.useReducer(ee,{disclosureState:l?0:1,linkedPanel:!1,buttonRef:$,panelRef:c,buttonId:null,panelId:null}),[{disclosureState:g,buttonId:h},y]=f,m=R(a=>{y({type:1});let d=N(v);if(!d||!h)return;let r=a?a instanceof HTMLElement?a:a.current instanceof HTMLElement?a.current:d.getElementById(h):d.getElementById(h);r==null||r.focus()}),b=n.useMemo(()=>({close:m}),[m]),o=n.useMemo(()=>({open:g===0,close:m}),[g,m]),t={ref:i};return P.createElement(z.Provider,{value:f},P.createElement(O.Provider,{value:b},P.createElement(Z,{value:I(g,{0:k.Open,1:k.Closed})},D({ourProps:t,theirProps:u,slot:o,defaultTag:te,name:"Disclosure"}))))}let re="button";function se(e,s){let l=U(),{id:u=`headlessui-disclosure-button-${l}`,...v}=e,[i,c]=T("Disclosure.Button"),$=X(),f=$===null?!1:$===i.panelId,g=n.useRef(null),h=S(g,s,f?null:i.buttonRef),y=B();n.useEffect(()=>{if(!f)return c({type:2,buttonId:u}),()=>{c({type:2,buttonId:null})}},[u,c,f]);let m=R(r=>{var p;if(f){if(i.disclosureState===1)return;switch(r.key){case x.Space:case x.Enter:r.preventDefault(),r.stopPropagation(),c({type:0}),(p=i.buttonRef.current)==null||p.focus();break}}else switch(r.key){case x.Space:case x.Enter:r.preventDefault(),r.stopPropagation(),c({type:0});break}}),b=R(r=>{switch(r.key){case x.Space:r.preventDefault();break}}),o=R(r=>{var p;W(r.currentTarget)||e.disabled||(f?(c({type:0}),(p=i.buttonRef.current)==null||p.focus()):c({type:0}))}),t=n.useMemo(()=>({open:i.disclosureState===0}),[i]),a=V(e,g),d=f?{ref:h,type:a,onKeyDown:m,onClick:o}:{ref:h,id:u,type:a,"aria-expanded":i.disclosureState===0,"aria-controls":i.linkedPanel?i.panelId:void 0,onKeyDown:m,onKeyUp:b,onClick:o};return D({mergeRefs:y,ourProps:d,theirProps:v,slot:t,defaultTag:re,name:"Disclosure.Button"})}let ne="div",ie=L.RenderStrategy|L.Static;function oe(e,s){let l=U(),{id:u=`headlessui-disclosure-panel-${l}`,...v}=e,[i,c]=T("Disclosure.Panel"),{close:$}=F("Disclosure.Panel"),f=B(),g=S(s,i.panelRef,o=>{Q(()=>c({type:o?4:5}))});n.useEffect(()=>(c({type:3,panelId:u}),()=>{c({type:3,panelId:null})}),[u,c]);let h=K(),y=h!==null?(h&k.Open)===k.Open:i.disclosureState===0,m=n.useMemo(()=>({open:i.disclosureState===0,close:$}),[i,$]),b={ref:g,id:u};return P.createElement(j.Provider,{value:i.panelId},D({mergeRefs:f,ourProps:b,theirProps:v,slot:m,defaultTag:ne,features:ie,visible:y,name:"Disclosure.Panel"}))}let le=E(ae),ue=E(se),ce=E(oe),ye=Object.assign(le,{Button:ue,Panel:ce});var C={exports:{}},pe=C.exports,M;function de(){return M||(M=1,function(e,s){(function(l,u){typeof G=="function"?e.exports=u():l.pluralize=u()})(pe,function(){var l=[],u=[],v={},i={},c={};function $(t){return typeof t=="string"?new RegExp("^"+t+"$","i"):t}function f(t,a){return t===a?a:t===t.toLowerCase()?a.toLowerCase():t===t.toUpperCase()?a.toUpperCase():t[0]===t[0].toUpperCase()?a.charAt(0).toUpperCase()+a.substr(1).toLowerCase():a.toLowerCase()}function g(t,a){return t.replace(/\$(\d{1,2})/g,function(d,r){return a[r]||""})}function h(t,a){return t.replace(a[0],function(d,r){var p=g(a[1],arguments);return f(d===""?t[r-1]:d,p)})}function y(t,a,d){if(!t.length||v.hasOwnProperty(t))return a;for(var r=d.length;r--;){var p=d[r];if(p[0].test(a))return h(a,p)}return a}function m(t,a,d){return function(r){var p=r.toLowerCase();return a.hasOwnProperty(p)?f(r,p):t.hasOwnProperty(p)?f(r,t[p]):y(p,r,d)}}function b(t,a,d,r){return function(p){var w=p.toLowerCase();return a.hasOwnProperty(w)?!0:t.hasOwnProperty(w)?!1:y(w,w,d)===w}}function o(t,a,d){var r=a===1?o.singular(t):o.plural(t);return(d?a+" ":"")+r}return o.plural=m(c,i,l),o.isPlural=b(c,i,l),o.singular=m(i,c,u),o.isSingular=b(i,c,u),o.addPluralRule=function(t,a){l.push([$(t),a])},o.addSingularRule=function(t,a){u.push([$(t),a])},o.addUncountableRule=function(t){if(typeof t=="string"){v[t.toLowerCase()]=!0;return}o.addPluralRule(t,"$0"),o.addSingularRule(t,"$0")},o.addIrregularRule=function(t,a){a=a.toLowerCase(),t=t.toLowerCase(),c[t]=a,i[a]=t},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(t){return o.addIrregularRule(t[0],t[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(t){return o.addPluralRule(t[0],t[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(t){return o.addSingularRule(t[0],t[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(o.addUncountableRule),o})}(C)),C.exports}var fe=de();const be=H(fe);function me({title:e,titleId:s,...l},u){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:u,"aria-labelledby":s},l),e?n.createElement("title",{id:s},e):null,n.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm3 10.5a.75.75 0 0 0 0-1.5H9a.75.75 0 0 0 0 1.5h6Z",clipRule:"evenodd"}))}const we=n.forwardRef(me);function he({title:e,titleId:s,...l},u){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:u,"aria-labelledby":s},l),e?n.createElement("title",{id:s},e):null,n.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25ZM12.75 9a.75.75 0 0 0-1.5 0v2.25H9a.75.75 0 0 0 0 1.5h2.25V15a.75.75 0 0 0 1.5 0v-2.25H15a.75.75 0 0 0 0-1.5h-2.25V9Z",clipRule:"evenodd"}))}const xe=n.forwardRef(he);export{ye as A,we as F,xe as a,be as p};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as f,r as i,j as e,c as u,B as j,n as p,m as b,a as g,w,i as d,Q as v,a5 as N,I as y}from"./index-KZcJd7F1.js";import{p as k,A as n,F as x,a as m}from"./PlusCircleIcon-FgfUjgrM.js";import{S as z}from"./SplitPane-CmzNrZQN.js";import{B as h,D as E}from"./transition-C8EjNcgL.js";function B(){const{errors:l,clearErrors:a}=f(),[t,c]=i.useState(!1);i.useEffect(()=>{l.size<1&&c(!1)},[l]);const r=l.size>0;return e.jsx(h,{onMouseEnter:()=>{c(r)},onMouseLeave:()=>{c(!1)},className:"flex",children:()=>e.jsxs(e.Fragment,{children:[e.jsx("span",{className:u("block ml-1 px-3 py-1 first-child:ml-0 rounded-full whitespace-nowrap font-bold text-xs text-center",r?"text-danger-500 bg-danger-10 dark:bg-danger-20 cursor-pointer":"bg-neutral-5 dark:bg-neutral-20 cursor-default text-neutral-500 dark:text-neutral-300"),children:r?e.jsxs("span",{children:[l.size," ",k("Error",l.size)]}):e.jsx("span",{children:"No Errors"})}),e.jsx(E,{show:t,as:i.Fragment,enter:"transition ease-out duration-200",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-100 translate-y-0",leave:"transition ease-in duration-150",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-1",children:e.jsxs(h.Panel,{className:"absolute top-10 right-2 z-[1000] flex flex-col rounded-md bg-light transform text-danger-700 shadow-2xl w-[90vw] max-h-[80vh]",children:[e.jsx("div",{className:"flex justify-end mx-1 mt-2",children:e.jsx(j,{size:b.sm,variant:p.Neutral,onClick:()=>a(),children:"Clear"})}),e.jsx("ul",{className:"w-full h-full p-2 overflow-auto hover:scrollbar scrollbar--vertical scrollbar--horizontal",children:Array.from(l).reverse().map(s=>e.jsx("li",{className:"bg-danger-10 mb-4 last:m-0 p-2 rounded-md",children:e.jsx(D,{scope:s.key,error:s})},s.id))})]})})]})})}function D({error:l,scope:a,withSplitPane:t=!1}){const{removeError:c}=f(),r=g(s=>s.version);return e.jsxs("div",{className:"flex flex-col w-full h-full overflow-hidden",children:[w(l.traceback)?e.jsx(o,{version:r,scope:a,error:l}):t?e.jsxs(z,{direction:"vertical",sizes:[50,50],minSize:100,snapOffset:0,className:"flex flex-col w-full h-full overflow-hidden",children:[e.jsx(o,{version:r,scope:a,error:l}),d(l.traceback)&&e.jsx(n,{defaultOpen:!0,children:({open:s})=>e.jsxs("div",{className:"flex flex-col w-full h-full overflow-hidden",children:[e.jsxs(n.Button,{className:"flex items-center justify-between rounded-lg text-left w-full bg-neutral-10 px-3 my-2",children:[e.jsx("div",{className:"text-lg font-bold whitespace-nowrap w-full",children:e.jsx("h3",{className:"py-2",children:"Traceback"})}),e.jsx("div",{children:s?e.jsx(x,{className:"h-6 w-6 text-danger-500"}):e.jsx(m,{className:"h-6 w-6 text-danger-500"})})]}),e.jsx(n.Panel,{className:"flex w-full h-full px-2 mb-2 overflow-hidden",children:e.jsx("pre",{className:"font-mono w-full h-full bg-dark-lighter text-danger-500 rounded-lg p-4 overflow-scroll hover:scrollbar scrollbar--vertical scrollbar--horizontal text-sm",children:e.jsx("code",{children:l.traceback??l.message})})})]})})]}):e.jsxs(e.Fragment,{children:[e.jsx(o,{version:r,scope:a,error:l}),d(l.traceback)&&e.jsx(n,{defaultOpen:!0,children:({open:s})=>e.jsxs("div",{className:"w-full h-full overflow-hidden",children:[e.jsxs(n.Button,{className:"flex items-center justify-between rounded-lg text-left w-full bg-neutral-10 px-3 my-2",children:[e.jsx("div",{className:"text-lg font-bold whitespace-nowrap w-full",children:e.jsx("h3",{className:"py-2",children:"Traceback"})}),e.jsx("div",{children:s?e.jsx(x,{className:"h-6 w-6 text-danger-500"}):e.jsx(m,{className:"h-6 w-6 text-danger-500"})})]}),e.jsx(n.Panel,{className:"flex w-full h-full px-2 mb-2 overflow-hidden",children:e.jsx("pre",{className:"font-mono w-full h-full bg-dark-lighter text-danger-500 rounded-lg p-4 overflow-scroll hover:scrollbar scrollbar--vertical scrollbar--horizontal text-sm",children:e.jsx("code",{children:l.traceback??l.message})})})]})})]}),e.jsx("div",{className:"flex justify-end mt-2",children:e.jsx(j,{variant:p.Neutral,size:b.sm,onClick:s=>{s.stopPropagation(),c(l)},children:"Dismiss"})})]})}function o({error:l,scope:a,version:t}){return e.jsxs("div",{className:"flex w-full overflow-hidden mb-2",children:[e.jsxs("div",{className:"w-[20rem] h-full",children:[e.jsxs("div",{className:"flex aline-center mb-2",children:[e.jsx("small",{className:"block mr-3",children:e.jsx("small",{className:"py-0.5 px-2 bg-danger-500 text-danger-100 rounded-md text-xs",children:l.status??"UI"})}),e.jsx("small",{className:"block",children:a})]}),e.jsxs("div",{className:u("text-sm px-2"),children:[e.jsx("small",{className:"block text-xs font-mono",children:v(N(l.timestamp),"yyyy-mm-dd hh-mm-ss",!1)}),e.jsx("p",{children:l.message})]})]}),e.jsxs("div",{className:"flex flex-col w-full px-4",children:[d(t)&&e.jsxs("small",{className:"block",children:[e.jsx("b",{children:"Version"}),": ",t]}),l.type!=null&&e.jsxs("small",{className:"block",children:[e.jsx("b",{children:"Type"}),": ",l.type]}),l.origin!=null&&e.jsxs("small",{className:"block mb-2",children:[e.jsx("b",{children:"Origin"}),": ",l.origin]}),l.trigger!=null&&e.jsxs("small",{className:"block mb-2",children:[e.jsx("b",{children:"Trigger"}),": ",l.trigger]}),e.jsx(y,{}),e.jsx("div",{className:"pt-4 h-full overflow-scroll hover:scrollbar scrollbar--vertical scrollbar--horizontal",children:e.jsx("p",{className:"flex text-sm ",children:l.description})})]})]})}export{D,B as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var en=Object.defineProperty;var tn=(e,t,n)=>t in e?en(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var oe=(e,t,n)=>tn(e,typeof t!="symbol"?t+"":t,n);import{r as s,j as o,N as nn,c as _,b as V,d as Lt,a as E,e as Y,R as C,f as Qe,g as Le,h as le,k as it,l as ct,B as et,m as St,n as tt,o as $t,L as rn,S as nt,p as an,q as sn,s as on,t as Dt,v as Ot,w as S,x as ln,i as $,y as cn,z as un,A as dn,C as qe,D as fn,F as mn,G as Et,H as hn,I as yt,O as pn}from"./index-KZcJd7F1.js";import{R as vn}from"./ReportErrors-xnNgNULg.js";import{u as y,M as gn,a as rt,E as ce}from"./plan-e4fPD47J.js";import{G as wn,w as xn,E as B,P as jt,S as bn}from"./SelectEnvironment-DC6x26Ax.js";import{o as U,U as de,y as fe,l as Ht,n as Bt,a as En,u as be,s as Te,O as Me,M as ue,p as yn,b as Ct,c as kt,C as me,d as jn,e as ne,f as Zt,E as It,t as zt,N as Cn,g as kn,h as _t,i as ut,I as Ee,j as Rn,k as Fe,m as An,q as Nn,r as Pn,v as at,w as st,x as Rt,z as Tn,A as Fn,B as At,D as ot}from"./transition-C8EjNcgL.js";import{F as Mn}from"./ChevronRightIcon-Ctcbr61G.js";import{u as X,M as Ue}from"./project-CjyecwCx.js";import{M as Nt}from"./file-CcK5Oobc.js";import{u as ee,c as Ln}from"./editor-Bf9rhumO.js";import{EnumFileExplorerChange as Ge}from"./context-CzM900aY.js";import"./PlusCircleIcon-FgfUjgrM.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./SplitPane-CmzNrZQN.js";import"./context-DhymIb_N.js";import"./index-BdXOfeCo.js";import"./Input-CYm3h-zG.js";import"./help-6Q7f7fjd.js";import"./SourceList-Chz492Ne.js";import"./index-CLuHMKlN.js";import"./ModelLineage-Bnes5PV4.js";import"./ListboxShow-CwgOYGSe.js";import"./SearchList-9n_6_E0k.js";import"./ChevronDownIcon-BZk6URUK.js";function Sn({title:e,titleId:t,...n},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M15.312 11.424a5.5 5.5 0 0 1-9.201 2.466l-.312-.311h2.433a.75.75 0 0 0 0-1.5H3.989a.75.75 0 0 0-.75.75v4.242a.75.75 0 0 0 1.5 0v-2.43l.31.31a7 7 0 0 0 11.712-3.138.75.75 0 0 0-1.449-.39Zm1.23-3.723a.75.75 0 0 0 .219-.53V2.929a.75.75 0 0 0-1.5 0V5.36l-.31-.31A7 7 0 0 0 3.239 8.188a.75.75 0 1 0 1.448.389A5.5 5.5 0 0 1 13.89 6.11l.311.31h-2.432a.75.75 0 0 0 0 1.5h4.243a.75.75 0 0 0 .53-.219Z",clipRule:"evenodd"}))}const $n=s.forwardRef(Sn);function Dn({title:e,titleId:t,...n},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M11.78 5.22a.75.75 0 0 1 0 1.06L8.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"}))}const On=s.forwardRef(Dn);function Hn({title:e,titleId:t,...n},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M3 3.5A1.5 1.5 0 0 1 4.5 2h6.879a1.5 1.5 0 0 1 1.06.44l4.122 4.12A1.5 1.5 0 0 1 17 7.622V16.5a1.5 1.5 0 0 1-1.5 1.5h-11A1.5 1.5 0 0 1 3 16.5v-13Zm10.857 5.691a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 0 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"}))}const Bn=s.forwardRef(Hn);function Zn({title:e,titleId:t,...n},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M4.5 2A1.5 1.5 0 0 0 3 3.5v13A1.5 1.5 0 0 0 4.5 18h11a1.5 1.5 0 0 0 1.5-1.5V7.621a1.5 1.5 0 0 0-.44-1.06l-4.12-4.122A1.5 1.5 0 0 0 11.378 2H4.5Zm2.25 8.5a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5h-6.5Zm0 3a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5h-6.5Z",clipRule:"evenodd"}))}const In=s.forwardRef(Zn);function zn({title:e,titleId:t,...n},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const _n=s.forwardRef(zn);function Vn({title:e,titleId:t,...n},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?s.createElement("title",{id:t},e):null,s.createElement("path",{d:"M3.75 3A1.75 1.75 0 0 0 2 4.75v3.26a3.235 3.235 0 0 1 1.75-.51h12.5c.644 0 1.245.188 1.75.51V6.75A1.75 1.75 0 0 0 16.25 5h-4.836a.25.25 0 0 1-.177-.073L9.823 3.513A1.75 1.75 0 0 0 8.586 3H3.75ZM3.75 9A1.75 1.75 0 0 0 2 10.75v4.5c0 .966.784 1.75 1.75 1.75h12.5A1.75 1.75 0 0 0 18 15.25v-4.5A1.75 1.75 0 0 0 16.25 9H3.75Z"}))}const Wn=s.forwardRef(Vn);function Yn({title:e,titleId:t,...n},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M2 10a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm6.39-2.908a.75.75 0 0 1 .766.027l3.5 2.25a.75.75 0 0 1 0 1.262l-3.5 2.25A.75.75 0 0 1 8 12.25v-4.5a.75.75 0 0 1 .39-.658Z",clipRule:"evenodd"}))}const Vt=s.forwardRef(Yn);function qn({title:e,titleId:t,...n},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M9.661 2.237a.531.531 0 0 1 .678 0 11.947 11.947 0 0 0 7.078 2.749.5.5 0 0 1 .479.425c.069.52.104 1.05.104 1.59 0 5.162-3.26 9.563-7.834 11.256a.48.48 0 0 1-.332 0C5.26 16.564 2 12.163 2 7c0-.538.035-1.069.104-1.589a.5.5 0 0 1 .48-.425 11.947 11.947 0 0 0 7.077-2.75Zm4.196 5.954a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"}))}const Un=s.forwardRef(qn);function Gn({title:e,titleId:t,...n},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?s.createElement("title",{id:t},e):null,s.createElement("path",{d:"M15.98 1.804a1 1 0 0 0-1.96 0l-.24 1.192a1 1 0 0 1-.784.785l-1.192.238a1 1 0 0 0 0 1.962l1.192.238a1 1 0 0 1 .785.785l.238 1.192a1 1 0 0 0 1.962 0l.238-1.192a1 1 0 0 1 .785-.785l1.192-.238a1 1 0 0 0 0-1.962l-1.192-.238a1 1 0 0 1-.785-.785l-.238-1.192ZM6.949 5.684a1 1 0 0 0-1.898 0l-.683 2.051a1 1 0 0 1-.633.633l-2.051.683a1 1 0 0 0 0 1.898l2.051.684a1 1 0 0 1 .633.632l.683 2.051a1 1 0 0 0 1.898 0l.683-2.051a1 1 0 0 1 .633-.633l2.051-.683a1 1 0 0 0 0-1.898l-2.051-.683a1 1 0 0 1-.633-.633L6.95 5.684ZM13.949 13.684a1 1 0 0 0-1.898 0l-.184.551a1 1 0 0 1-.632.633l-.551.183a1 1 0 0 0 0 1.898l.551.183a1 1 0 0 1 .633.633l.183.551a1 1 0 0 0 1.898 0l.184-.551a1 1 0 0 1 .632-.633l.551-.183a1 1 0 0 0 0-1.898l-.551-.184a1 1 0 0 1-.633-.632l-.183-.551Z"}))}const Pt=s.forwardRef(Gn);function Kn({title:e,titleId:t,...n},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M.99 5.24A2.25 2.25 0 0 1 3.25 3h13.5A2.25 2.25 0 0 1 19 5.25l.01 9.5A2.25 2.25 0 0 1 16.76 17H3.26A2.267 2.267 0 0 1 1 14.74l-.01-9.5Zm8.26 9.52v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75v.615c0 .414.336.75.75.75h5.373a.75.75 0 0 0 .627-.74Zm1.5 0a.75.75 0 0 0 .627.74h5.373a.75.75 0 0 0 .75-.75v-.615a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75v.625Zm6.75-3.63v-.625a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75v.625c0 .414.336.75.75.75h5.25a.75.75 0 0 0 .75-.75Zm-8.25 0v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75v.625c0 .414.336.75.75.75H8.5a.75.75 0 0 0 .75-.75ZM17.5 7.5v-.625a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75V7.5c0 .414.336.75.75.75h5.25a.75.75 0 0 0 .75-.75Zm-8.25 0v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75V7.5c0 .414.336.75.75.75H8.5a.75.75 0 0 0 .75-.75Z",clipRule:"evenodd"}))}const Tt=s.forwardRef(Kn);function Jn({title:e,titleId:t,...n},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.125 2.25h-4.5c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125v-9M10.125 2.25h.375a9 9 0 0 1 9 9v.375M10.125 2.25A3.375 3.375 0 0 1 13.5 5.625v1.5c0 .621.504 1.125 1.125 1.125h1.5a3.375 3.375 0 0 1 3.375 3.375M9 15l2.25 2.25L15 12"}))}const Xn=s.forwardRef(Jn);function Qn({title:e,titleId:t,...n},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))}const er=s.forwardRef(Qn);function tr({title:e,titleId:t,...n},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"}))}const nr=s.forwardRef(tr);function rr({title:e,titleId:t,...n},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"}))}const ar=s.forwardRef(rr);function sr({title:e,titleId:t,...n},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}),s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.91 11.672a.375.375 0 0 1 0 .656l-5.603 3.113a.375.375 0 0 1-.557-.328V8.887c0-.286.307-.466.557-.327l5.603 3.112Z"}))}const Wt=s.forwardRef(sr);function or({title:e,titleId:t,...n},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z"}))}const lr=s.forwardRef(or);function q({title:e,to:t,icon:n,iconActive:r,classActive:i="px-2 bg-neutral-10",disabled:l=!1,children:u,before:c,className:d}){return o.jsx(nn,{title:e,to:t,className:({isActive:v})=>_("flex items-center",l&&"opacity-50 cursor-not-allowed",v&&V(l)&&i,d),style:({isActive:v})=>v||l?{pointerEvents:"none"}:{},children:({isActive:v})=>o.jsxs("span",{className:_("flex items-center",v?"font-bold":"font-normal"),children:[c,v?r:n,u]})})}function ir({className:e}){const{errors:t}=Lt(),n=E(l=>l.models),r=E(l=>l.modules),i=Array.from(new Set(n.values())).length;return o.jsxs("div",{className:e,children:[r.hasEditor&&o.jsx(q,{title:"File Explorer",to:Y.Editor,className:"px-2 py-1 h-10 hover:bg-neutral-5 dark:hover:bg-neutral-10 text-primary-500 rounded-xl my-1",classActive:"bg-primary-10 text-primary-500",icon:o.jsx(ar,{className:"min-w-6 w-6"}),iconActive:o.jsx(Wn,{className:"min-w-6 w-6"})}),r.hasDataCatalog&&o.jsx(q,{title:"Data Catalog",to:Y.DataCatalog,icon:o.jsx(er,{className:"min-w-6 w-6"}),iconActive:o.jsx(In,{className:"min-w-6 w-6"}),className:"relative rounded-xl my-1 px-2 py-1 h-10 hover:bg-neutral-5 dark:hover:bg-neutral-10 text-neutral-600 dark:text-neutral-300",children:o.jsx("span",{className:"min-w-[1rem] px-1 h-4 py-0.5 text-center text-[9px] absolute bottom-0 right-0 font-black rounded-full bg-primary-500 text-primary-100",children:i})}),r.hasErrors&&o.jsx(q,{title:"Errors",to:Y.Errors,className:_("relative px-2 py-1 rounded-xl my-1 h-10 hover:bg-neutral-5 dark:hover:bg-neutral-10",t.size>0?"text-danger-500":"text-neutral-600"),classActive:"px-2 bg-danger-10 text-danger-500",icon:o.jsx(nr,{className:"w-6"}),iconActive:o.jsx(_n,{className:"w-6"}),disabled:t.size===0,children:t.size>0&&o.jsx("span",{className:"min-w-[1rem] px-1 h-4 py-0.5 text-center text-[9px] absolute bottom-0 right-0 font-black rounded-full bg-danger-500 text-danger-100",children:t.size})}),r.hasPlans&&o.jsx(q,{title:"Plan",to:Y.Plan,className:"px-2 py-1 h-10 hover:bg-neutral-5 dark:hover:bg-neutral-10 text-success-500 rounded-xl my-1",classActive:"bg-success-10 text-success-500",icon:o.jsx(Wt,{className:"w-6"}),iconActive:o.jsx(Vt,{className:"w-6"})}),r.hasTests&&o.jsx(q,{title:"Tests",to:Y.Tests,icon:o.jsx(Xn,{className:"w-6"}),iconActive:o.jsx(Bn,{className:"w-6"}),className:"rounded-xl my-1 px-2 py-1 h-10 hover:bg-neutral-5 dark:hover:bg-neutral-10"}),r.hasAudits&&o.jsx(q,{title:"Audits",to:Y.Audits,icon:o.jsx(lr,{className:"w-6"}),iconActive:o.jsx(Un,{className:"w-6"}),className:"rounded-xl my-1 px-2 py-1 h-10 hover:bg-neutral-5 dark:hover:bg-neutral-10"}),r.hasData&&o.jsx(q,{title:"Data",to:Y.Data,icon:o.jsx(Tt,{className:"w-6"}),iconActive:o.jsx(Tt,{className:"w-6"}),className:"rounded-xl my-1 px-2 py-1 h-10 hover:bg-neutral-5 dark:hover:bg-neutral-10 text-neutral-500 dark:text-neutral-300"}),r.hasLineage&&o.jsx(q,{title:"Lineage",to:Y.Lineage,icon:o.jsx(Pt,{className:"w-6"}),iconActive:o.jsx(Pt,{className:"w-6"}),className:"rounded-xl my-1 px-2 py-1 h-10 hover:bg-neutral-5 dark:hover:bg-neutral-10 text-neutral-500 dark:text-neutral-300"})]})}function dt(e,t){let n=s.useRef([]),r=U(e);s.useEffect(()=>{let i=[...n.current];for(let[l,u]of t.entries())if(n.current[l]!==u){let c=r(t,i);return n.current=t,c}},[r,...t])}function cr(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let Q=[];cr(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&Q[0]!==t.target&&(Q.unshift(t.target),Q=Q.filter(n=>n!=null&&n.isConnected),Q.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function Yt(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let ur="div";var qt=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(qt||{});function dr(e,t){let n=s.useRef(null),r=fe(n,t),{initialFocus:i,containers:l,features:u=30,...c}=e;Ht()||(u=1);let d=Bt(n);hr({ownerDocument:d},!!(u&16));let v=pr({ownerDocument:d,container:n,initialFocus:i},!!(u&2));vr({ownerDocument:d,container:n,containers:l,previousActiveElement:v},!!(u&8));let w=En(),Z=U(A=>{let f=n.current;f&&(N=>N())(()=>{be(w.current,{[Te.Forwards]:()=>{Me(f,ue.First,{skipElements:[A.relatedTarget]})},[Te.Backwards]:()=>{Me(f,ue.Last,{skipElements:[A.relatedTarget]})}})})}),G=yn(),P=s.useRef(!1),R={ref:r,onKeyDown(A){A.key=="Tab"&&(P.current=!0,G.requestAnimationFrame(()=>{P.current=!1}))},onBlur(A){let f=Yt(l);n.current instanceof HTMLElement&&f.add(n.current);let N=A.relatedTarget;N instanceof HTMLElement&&N.dataset.headlessuiFocusGuard!=="true"&&(Ut(f,N)||(P.current?Me(n.current,be(w.current,{[Te.Forwards]:()=>ue.Next,[Te.Backwards]:()=>ue.Previous})|ue.WrapAround,{relativeTo:A.target}):A.target instanceof HTMLElement&&ne(A.target)))}};return C.createElement(C.Fragment,null,!!(u&4)&&C.createElement(Ct,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:Z,features:kt.Focusable}),me({ourProps:R,theirProps:c,defaultTag:ur,name:"FocusTrap"}),!!(u&4)&&C.createElement(Ct,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:Z,features:kt.Focusable}))}let fr=de(dr),ge=Object.assign(fr,{features:qt});function mr(e=!0){let t=s.useRef(Q.slice());return dt(([n],[r])=>{r===!0&&n===!1&&zt(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=Q.slice())},[e,Q,t]),U(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function hr({ownerDocument:e},t){let n=mr(t);dt(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&ne(n())},[t]),jn(()=>{t&&ne(n())})}function pr({ownerDocument:e,container:t,initialFocus:n},r){let i=s.useRef(null),l=Zt();return dt(()=>{if(!r)return;let u=t.current;u&&zt(()=>{if(!l.current)return;let c=e==null?void 0:e.activeElement;if(n!=null&&n.current){if((n==null?void 0:n.current)===c){i.current=c;return}}else if(u.contains(c)){i.current=c;return}n!=null&&n.current?ne(n.current):Me(u,ue.First)===Cn.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),i.current=e==null?void 0:e.activeElement})},[r]),i}function vr({ownerDocument:e,container:t,containers:n,previousActiveElement:r},i){let l=Zt();It(e==null?void 0:e.defaultView,"focus",u=>{if(!i||!l.current)return;let c=Yt(n);t.current instanceof HTMLElement&&c.add(t.current);let d=r.current;if(!d)return;let v=u.target;v&&v instanceof HTMLElement?Ut(c,v)?(r.current=v,ne(v)):(u.preventDefault(),u.stopPropagation(),ne(d)):ne(r.current)},!0)}function Ut(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function gr(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const wr=typeof Object.is=="function"?Object.is:gr,{useState:xr,useEffect:br,useLayoutEffect:Er,useDebugValue:yr}=Qe;function jr(e,t,n){const r=t(),[{inst:i},l]=xr({inst:{value:r,getSnapshot:t}});return Er(()=>{i.value=r,i.getSnapshot=t,Ke(i)&&l({inst:i})},[e,r,t]),br(()=>(Ke(i)&&l({inst:i}),e(()=>{Ke(i)&&l({inst:i})})),[e]),yr(r),r}function Ke(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!wr(n,r)}catch{return!0}}function Cr(e,t,n){return t()}const kr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Rr=!kr,Ar=Rr?Cr:jr,Nr="useSyncExternalStore"in Qe?(e=>e.useSyncExternalStore)(Qe):Ar;function Pr(e){return Nr(e.subscribe,e.getSnapshot,e.getSnapshot)}function Tr(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(i){return r.add(i),()=>r.delete(i)},dispatch(i,...l){let u=t[i].call(n,...l);u&&(n=u,r.forEach(c=>c()))}}}function Fr(){let e;return{before({doc:t}){var n;let r=t.documentElement;e=((n=t.defaultView)!=null?n:window).innerWidth-r.clientWidth},after({doc:t,d:n}){let r=t.documentElement,i=r.clientWidth-r.offsetWidth,l=e-i;n.style(r,"paddingRight",`${l}px`)}}}function Mr(){return kn()?{before({doc:e,d:t,meta:n}){function r(i){return n.containers.flatMap(l=>l()).some(l=>l.contains(i))}t.microTask(()=>{var i;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let c=_t();c.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>c.dispose()))}let l=(i=window.scrollY)!=null?i:window.pageYOffset,u=null;t.addEventListener(e,"click",c=>{if(c.target instanceof HTMLElement)try{let d=c.target.closest("a");if(!d)return;let{hash:v}=new URL(d.href),w=e.querySelector(v);w&&!r(w)&&(u=w)}catch{}},!0),t.addEventListener(e,"touchstart",c=>{if(c.target instanceof HTMLElement)if(r(c.target)){let d=c.target;for(;d.parentElement&&r(d.parentElement);)d=d.parentElement;t.style(d,"overscrollBehavior","contain")}else t.style(c.target,"touchAction","none")}),t.addEventListener(e,"touchmove",c=>{if(c.target instanceof HTMLElement)if(r(c.target)){let d=c.target;for(;d.parentElement&&d.dataset.headlessuiPortal!==""&&!(d.scrollHeight>d.clientHeight||d.scrollWidth>d.clientWidth);)d=d.parentElement;d.dataset.headlessuiPortal===""&&c.preventDefault()}else c.preventDefault()},{passive:!1}),t.add(()=>{var c;let d=(c=window.scrollY)!=null?c:window.pageYOffset;l!==d&&window.scrollTo(0,l),u&&u.isConnected&&(u.scrollIntoView({block:"nearest"}),u=null)})})}}:{}}function Lr(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function Sr(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let te=Tr(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:_t(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:Sr(n)},i=[Mr(),Fr(),Lr()];i.forEach(({before:l})=>l==null?void 0:l(r)),i.forEach(({after:l})=>l==null?void 0:l(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});te.subscribe(()=>{let e=te.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",i=n.count!==0;(i&&!r||!i&&r)&&te.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&te.dispatch("TEARDOWN",n)}});function $r(e,t,n){let r=Pr(te),i=e?r.get(e):void 0,l=i?i.count>0:!1;return ut(()=>{if(!(!e||!t))return te.dispatch("PUSH",e,n),()=>te.dispatch("POP",e,n)},[t,e]),l}let Je=new Map,we=new Map;function Ft(e,t=!0){ut(()=>{var n;if(!t)return;let r=typeof e=="function"?e():e.current;if(!r)return;function i(){var u;if(!r)return;let c=(u=we.get(r))!=null?u:1;if(c===1?we.delete(r):we.set(r,c-1),c!==1)return;let d=Je.get(r);d&&(d["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",d["aria-hidden"]),r.inert=d.inert,Je.delete(r))}let l=(n=we.get(r))!=null?n:0;return we.set(r,l+1),l!==0||(Je.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),i},[e,t])}let ft=s.createContext(()=>{});ft.displayName="StackContext";var lt=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(lt||{});function Dr(){return s.useContext(ft)}function Or({children:e,onUpdate:t,type:n,element:r,enabled:i}){let l=Dr(),u=U((...c)=>{t==null||t(...c),l(...c)});return ut(()=>{let c=i===void 0||i===!0;return c&&u(0,n,r),()=>{c&&u(1,n,r)}},[u,n,r,i]),C.createElement(ft.Provider,{value:u},e)}var Hr=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Hr||{}),Br=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(Br||{});let Zr={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Se=s.createContext(null);Se.displayName="DialogContext";function ye(e){let t=s.useContext(Se);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ye),n}return t}function Ir(e,t,n=()=>[document.body]){$r(e,t,r=>{var i;return{containers:[...(i=r.containers)!=null?i:[],n]}})}function zr(e,t){return be(t.type,Zr,e,t)}let _r="div",Vr=Rt.RenderStrategy|Rt.Static;function Wr(e,t){let n=Ee(),{id:r=`headlessui-dialog-${n}`,open:i,onClose:l,initialFocus:u,role:c="dialog",__demoMode:d=!1,...v}=e,[w,Z]=s.useState(0),G=s.useRef(!1);c=function(){return c==="dialog"||c==="alertdialog"?c:(G.current||(G.current=!0,console.warn(`Invalid role [${c}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let P=Rn();i===void 0&&P!==null&&(i=(P&Fe.Open)===Fe.Open);let R=s.useRef(null),A=fe(R,t),f=Bt(R),N=e.hasOwnProperty("open")||P!==null,p=e.hasOwnProperty("onClose");if(!N&&!p)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!N)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!p)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof i!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${i}`);if(typeof l!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${l}`);let j=i?0:1,[re,$e]=s.useReducer(zr,{titleId:null,descriptionId:null,panelRef:s.createRef()}),K=U(()=>l(!1)),je=U(b=>$e({type:0,id:b})),I=Ht()?d?!1:j===0:!1,ae=w>1,Ce=s.useContext(Se)!==null,[De,ke]=An(),he={get current(){var b;return(b=re.panelRef.current)!=null?b:R.current}},{resolveContainers:pe,mainTreeNodeRef:se,MainTreeNode:Re}=Nn({portals:De,defaultContainers:[he]}),Oe=ae?"parent":"leaf",ve=P!==null?(P&Fe.Closing)===Fe.Closing:!1,He=Ce||ve?!1:I,Be=s.useCallback(()=>{var b,O;return(O=Array.from((b=f==null?void 0:f.querySelectorAll("body > *"))!=null?b:[]).find(T=>T.id==="headlessui-portal-root"?!1:T.contains(se.current)&&T instanceof HTMLElement))!=null?O:null},[se]);Ft(Be,He);let Ze=ae?!0:I,Ie=s.useCallback(()=>{var b,O;return(O=Array.from((b=f==null?void 0:f.querySelectorAll("[data-headlessui-portal]"))!=null?b:[]).find(T=>T.contains(se.current)&&T instanceof HTMLElement))!=null?O:null},[se]);Ft(Ie,Ze),Pn(pe,b=>{b.preventDefault(),K()},!(!I||ae));let ze=!(ae||j!==0);It(f==null?void 0:f.defaultView,"keydown",b=>{ze&&(b.defaultPrevented||b.key===Tn.Escape&&(b.preventDefault(),b.stopPropagation(),K()))}),Ir(f,!(ve||j!==0||Ce),pe),s.useEffect(()=>{if(j!==0||!R.current)return;let b=new ResizeObserver(O=>{for(let T of O){let z=T.target.getBoundingClientRect();z.x===0&&z.y===0&&z.width===0&&z.height===0&&K()}});return b.observe(R.current),()=>b.disconnect()},[j,R,K]);let[Ae,_e]=xn(),Ve=s.useMemo(()=>[{dialogState:j,close:K,setTitleId:je},re],[j,re,K,je]),Ne=s.useMemo(()=>({open:j===0}),[j]),Pe={ref:A,id:r,role:c,"aria-modal":j===0?!0:void 0,"aria-labelledby":re.titleId,"aria-describedby":Ae};return C.createElement(Or,{type:"Dialog",enabled:j===0,element:R,onUpdate:U((b,O)=>{O==="Dialog"&&be(b,{[lt.Add]:()=>Z(T=>T+1),[lt.Remove]:()=>Z(T=>T-1)})})},C.createElement(at,{force:!0},C.createElement(st,null,C.createElement(Se.Provider,{value:Ve},C.createElement(st.Group,{target:R},C.createElement(at,{force:!1},C.createElement(_e,{slot:Ne,name:"Dialog.Description"},C.createElement(ge,{initialFocus:u,containers:pe,features:I?be(Oe,{parent:ge.features.RestoreFocus,leaf:ge.features.All&~ge.features.FocusLock}):ge.features.None},C.createElement(ke,null,me({ourProps:Pe,theirProps:v,slot:Ne,defaultTag:_r,features:Vr,visible:j===0,name:"Dialog"}))))))))),C.createElement(Re,null))}let Yr="div";function qr(e,t){let n=Ee(),{id:r=`headlessui-dialog-overlay-${n}`,...i}=e,[{dialogState:l,close:u}]=ye("Dialog.Overlay"),c=fe(t),d=U(w=>{if(w.target===w.currentTarget){if(Fn(w.currentTarget))return w.preventDefault();w.preventDefault(),w.stopPropagation(),u()}}),v=s.useMemo(()=>({open:l===0}),[l]);return me({ourProps:{ref:c,id:r,"aria-hidden":!0,onClick:d},theirProps:i,slot:v,defaultTag:Yr,name:"Dialog.Overlay"})}let Ur="div";function Gr(e,t){let n=Ee(),{id:r=`headlessui-dialog-backdrop-${n}`,...i}=e,[{dialogState:l},u]=ye("Dialog.Backdrop"),c=fe(t);s.useEffect(()=>{if(u.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[u.panelRef]);let d=s.useMemo(()=>({open:l===0}),[l]);return C.createElement(at,{force:!0},C.createElement(st,null,me({ourProps:{ref:c,id:r,"aria-hidden":!0},theirProps:i,slot:d,defaultTag:Ur,name:"Dialog.Backdrop"})))}let Kr="div";function Jr(e,t){let n=Ee(),{id:r=`headlessui-dialog-panel-${n}`,...i}=e,[{dialogState:l},u]=ye("Dialog.Panel"),c=fe(t,u.panelRef),d=s.useMemo(()=>({open:l===0}),[l]),v=U(w=>{w.stopPropagation()});return me({ourProps:{ref:c,id:r,onClick:v},theirProps:i,slot:d,defaultTag:Kr,name:"Dialog.Panel"})}let Xr="h2";function Qr(e,t){let n=Ee(),{id:r=`headlessui-dialog-title-${n}`,...i}=e,[{dialogState:l,setTitleId:u}]=ye("Dialog.Title"),c=fe(t);s.useEffect(()=>(u(r),()=>u(null)),[r,u]);let d=s.useMemo(()=>({open:l===0}),[l]);return me({ourProps:{ref:c,id:r},theirProps:i,slot:d,defaultTag:Xr,name:"Dialog.Title"})}let ea=de(Wr),ta=de(Gr),na=de(Jr),ra=de(qr),aa=de(Qr),Gt=Object.assign(ea,{Backdrop:ta,Panel:na,Overlay:ra,Title:aa,Description:wn});function ie({headline:e,type:t,changes:n,className:r}){const[i,l]=s.useState(!1);return o.jsx(At,{onMouseEnter:()=>{l(!0)},onMouseLeave:()=>{l(!1)},className:"relative flex",children:()=>o.jsxs(o.Fragment,{children:[o.jsx("span",{className:_("transition-all flex min-w-[1rem] h-4 text-center mx-0.5 px-1 rounded-full text-[10px] font-black text-neutral-100 cursor-default border border-inherit",t===B.Add&&"bg-success-500 border-success-500",t===B.Remove&&"bg-danger-500 border-danger-500",t===B.Direct&&"bg-secondary-500 border-secondary-500",t===B.Indirect&&"bg-warning-500 border-warning-500",t===B.Metadata&&"bg-neutral-400 border-neutral-400",t===B.Default&&"bg-neutral-600 border-neutral-600",r),children:n.length}),o.jsx(ot,{show:i,as:s.Fragment,enter:"transition ease-out duration-200",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-100 translate-y-0",leave:"transition ease-in duration-150",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-1",children:o.jsx(At.Panel,{className:"absolute top-6 right-0 z-10 transform flex p-2 bg-theme-lighter shadow-xl focus:ring-2 ring-opacity-5 rounded-lg ",children:o.jsx(jt,{headline:e,type:t,className:"w-full h-full max-w-[50vw] max-h-[40vh] overflow-hidden overflow-y-auto hover:scrollbar scrollbar--vertical",children:o.jsx(jt.Default,{type:t,changes:n})})})})]})})}function sa(){const e=y(i=>i.planOverview),[t,n]=s.useState(e);return s.useEffect(()=>{V(e.isEmpty)&&e.isFinished&&n(new gn(e))},[e]),(V(e.isLatest)||e.isFetching)&&t.hasUpdates?o.jsxs("span",{className:"flex group items-center bg-neutral-5 dark:bg-neutral-20 px-1 py-1 rounded-full",children:[(Le(t.hasChanges)||Le(t.hasBackfills))&&o.jsx(Mt,{className:"mr-2",children:"Changes"}),le(t.added)&&o.jsx(ie,{headline:"Added",type:B.Add,changes:t.added,className:"-mr-2 group-hover:mr-0 z-[5]"}),le(t.direct)&&o.jsx(ie,{headline:"Directly Modified",type:B.Direct,changes:t.direct,className:"-mr-2 group-hover:mr-0 z-[4]"}),le(t.indirect)&&o.jsx(ie,{headline:"Indirectly Modified",type:B.Indirect,changes:t.indirect,className:"-mr-2 group-hover:mr-0 z-[3]"}),le(t.metadata)&&o.jsx(ie,{headline:"Metadata",type:B.Metadata,changes:t.metadata,className:"-mr-2 group-hover:mr-0 z-[2]"}),le(t.removed)&&o.jsx(ie,{headline:"Removed",type:B.Remove,changes:t.removed,className:"-mr-2 group-hover:mr-0 z-[1]"}),le(t.backfills)?o.jsx(ie,{headline:"Backfills",type:B.Default,changes:t.backfills,className:"ml-4 group-hover:ml-2 z-[6]"}):o.jsx("div",{className:"ml-2 group-hover:ml-2 z-[6]"})]}):o.jsx(Mt,{className:"pr-2 pl-0.5 py-1 rounded-full bg-neutral-5 dark:bg-neutral-20 text-neutral-500 dark:text-neutral-300",children:"No Changes"})}function Mt({className:e,children:t}){const n=E(d=>d.environment),r=E(d=>d.addRemoteEnvironments),i=y(d=>d.planAction),{refetch:l}=it(),{refetch:u}=ct(n.name,{planOptions:{skip_tests:!0,include_unmodified:!0}});function c(d){const{environments:v,default_target_environment:w,pinned_environments:Z}=d??{};$t(v)&&r(Object.values(v),w,Z)}return o.jsxs("p",{className:_("flex items-center text-xs text-neutral-600 dark:text-neutral-300 font-bold text-center whitespace-nowrap",e),children:[o.jsx(et,{className:"w-5 h-5 !p-0 !m-0 !ml-0.5 !mr-1 border-none !rounded-full bg-neutral-10 dark:bg-neutral-20",variant:tt.Info,size:St.sm,disabled:i.isProcessing,onClick:d=>{d.stopPropagation(),l().then(({data:v})=>{u(),c(v)})},children:o.jsx($n,{className:"text-neutral-500 dark:text-neutral-300 w-4 h-4"})}),t]})}function Kt({children:e}){return o.jsxs(rn,{className:"inline-block",children:[o.jsx(nt,{className:"w-3 h-3 border border-neutral-10 mr-2"}),o.jsx("span",{className:"inline-block text-xs whitespace-nowrap",children:e})]})}let Xe;function oa(){const e=E(p=>p.modules),t=E(p=>p.environment),n=E(p=>p.models),r=y(p=>p.planAction),i=y(p=>p.planApply),l=y(p=>p.planOverview),u=y(p=>p.planCancel),c=y(p=>p.setPlanApply),d=y(p=>p.setPlanOverview),v=y(p=>p.setPlanCancel),w=y(p=>p.setPlanAction),Z=y(p=>p.resetPlanTrackers),G=y(p=>p.clearPlanApply),{isFetching:P}=an(t.name),{isFetching:R}=sn(),{isFetching:A}=it(),{refetch:f,isFetching:N}=ct(t.name,{planOptions:{skip_tests:!0,include_unmodified:!0}});return s.useEffect(()=>{n.size>0&&V(r.isProcessing)&&V(r.isRunningTask)&&(Z(),G(),f())},[n,t]),s.useEffect(()=>{N&&(l.isFetching=!0,d(l)),P&&(i.isFetching=!0,c(i)),R&&(u.isFetching=!0,v(u))},[N,P,R]),s.useEffect(()=>{clearTimeout(Xe);const p=rt.getPlanAction({planOverview:l,planApply:i,planCancel:u});p===ce.Done&&r.isRunningTask||p===r.value||(Xe=setTimeout(()=>{w(new rt({value:p})),Xe=void 0},on([ce.Running,ce.RunningTask,ce.Cancelling,ce.Applying],p)?0:500))},[l,i,u]),o.jsx("div",{className:"min-h-8 max-h-8 flex w-full items-center justify-end text-neutral-500",children:A?o.jsx(Kt,{children:"Loading Environments..."}):o.jsxs(o.Fragment,{children:[V(e.hasOnlyPlans)&&V(e.hasOnlyPlansAndErrors)&&o.jsx(q,{title:r.isProcessing?r.displayStatus(l):"Plan",to:Y.Plan,icon:r.isProcessing?o.jsx(nt,{variant:tt.Success,className:"w-3 py-1"}):o.jsx(Wt,{className:_("w-5",l.isFailed?"text-danger-500 dark:text-danger-100":"text-success-100")}),iconActive:r.isProcessing?o.jsx(nt,{variant:tt.Success,className:"w-3 py-1"}):o.jsx(Vt,{className:_("w-5",l.isFailed?"text-danger-500 dark:text-danger-100":"text-success-100")}),before:o.jsx("p",{className:_("block mx-1 text-xs font-bold whitespace-nowrap",l.isFailed?"text-danger-500 dark:text-danger-100":"text-success-100"),children:r.isProcessing?r.displayStatus(l):"Plan"}),className:_("px-2 rounded-full py-0.5 mr-1",l.isFailed?"bg-danger-10 dark:bg-danger-500":"bg-success-500"),classActive:_(l.isFailed?"bg-danger-10 dark:bg-danger-500":"bg-success-500")}),o.jsx("div",{className:"flex justify-center items-center min-w-[6rem] max-w-full",children:o.jsx(bn,{className:"border-none mx-2 w-full",size:St.sm,showAddEnvironment:!0,disabled:N||r.isProcessing||t.isInitialProd})}),o.jsx(sa,{})]})})}function la(){const e=Dt();return o.jsxs("div",{className:"flex",children:[o.jsx("button",{onClick:()=>e(-1),className:"inline-block text-neutral-700 dark:text-neutral-300 text-xs hover:bg-neutral-5 dark:hover:bg-neutral-10 px-1 py-1 rounded-full",children:o.jsx(On,{className:"min-w-4 h-4"})}),o.jsx("button",{onClick:()=>e(1),className:"inline-block text-neutral-700 dark:text-neutral-300 text-xs hover:bg-neutral-5 dark:hover:bg-neutral-10 px-1 py-1 rounded-full",children:o.jsx(Mn,{className:"min-w-4 h-4"})})]})}function ia(){const e=E(n=>n.modules),{isFetching:t}=Ot();return o.jsxs("div",{className:_("relative min-w-[10rem] px-2 min-h-[2rem] max-h-[2rem] w-full flex items-center",e.showHistoryNavigation?"justify-between":"justify-end",t&&"overflow-hidden"),children:[e.showHistoryNavigation&&o.jsx(la,{}),t&&o.jsx("div",{className:"absolute w-full h-full flex justify-center items-center z-10 bg-transparent-20 backdrop-blur-lg",children:o.jsx(Kt,{children:"Loading Models..."})}),e.hasPlans&&o.jsx(oa,{}),e.hasErrors&&o.jsx(vn,{})]})}function ca({show:e,children:t,afterLeave:n,onClose:r=()=>{}}){return o.jsx(ot,{appear:!0,show:e,as:s.Fragment,afterLeave:n,children:o.jsxs(Gt,{as:"div",className:"relative z-50",onClose:r,children:[o.jsx("div",{className:"fixed inset-0 bg-overlay opacity-90"}),o.jsx("div",{className:"fixed inset-0 overflow-y-auto",children:o.jsx("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:o.jsx(ot.Child,{as:s.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:t})})})]})})}function D({show:e,children:t,onClose:n,afterLeave:r}){return o.jsx(ca,{show:e,onClose:n,afterLeave:r,children:o.jsx(Gt.Panel,{className:"min-w-[20rem] max-w-[50rem] transform rounded-xl bg-theme text-left align-middle shadow-xl transition-all overflow-hidden",children:t})})}function ua({children:e}){return o.jsx("div",{className:"py-4 px-5 m-2",children:e})}function da({children:e}){return o.jsx("h2",{className:"font-bold text-xl mb-2",children:e})}function fa({children:e}){return o.jsx("h4",{className:"font-bold",children:e})}function ma({children:e}){return o.jsx("p",{className:"text-sm",children:e})}function ha({children:e}){return o.jsx("div",{className:"flex justify-end items-center py-3 px-3",children:e})}function pa({details:e}){return o.jsx("ul",{className:"my-2 p-4 bg-warning-10 rounded-md max-h-[20vh] overflow-y-auto hover:scrollbar scrollbar--vertical",children:e.map(t=>o.jsx("li",{className:"text-sm",children:t},t))})}D.Headline=da;D.Tagline=fa;D.Description=ma;D.Actions=ha;D.Main=ua;D.Details=pa;const va=2e4,ga=3e3;class wa{constructor(t,n){oe(this,"channels",new Map);oe(this,"eventSource");oe(this,"timerId");oe(this,"source");oe(this,"delay",va);this.source=t,this.delay=n??this.delay,this.setEventSource()}listen(t){t.addEventListener("error",n=>{this.reconnect(ga)}),t.addEventListener("ping",n=>{this.reconnect(this.delay)})}cleanup(){var t;this.channels.forEach((n,r)=>{var i;$(n)&&((i=this.eventSource)==null||i.removeEventListener(r,n))}),(t=this.eventSource)==null||t.close(),this.eventSource=void 0}resubscribe(){this.channels.forEach((t,n)=>{var r;$(t)&&((r=this.eventSource)==null||r.addEventListener(n,t))})}reconnect(t){clearTimeout(this.timerId),this.timerId=setTimeout(()=>{console.log(`Reconnecting Event Source ${this.source}`),this.cleanup(),this.setEventSource(),this.resubscribe()},t)}getEventSource(){return new EventSource(this.source,{withCredentials:!0})}setEventSource(){this.eventSource=this.getEventSource(),this.listen(this.eventSource)}addChannel(t,n){var i;const r=this.getChannelHandler(t,n);(i=this.eventSource)==null||i.addEventListener(t,r),this.channels.set(t,r)}removeChannel(t){var r;const n=this.getChannel(t);$(n)&&((r=this.eventSource)==null||r.removeEventListener(t,n),this.channels.delete(t))}hasChannel(t){return $(this.getChannel(t))}getChannel(t){return this.channels.get(t)}getChannelHandler(t,n){return r=>{if(this.reconnect(this.delay),!(S(t)||S(n)||S(r.data)))try{n(JSON.parse(r.data))}catch(i){console.warn(i)}}}}let xe;function xa(){return S(xe)&&(xe=new wa(ln("/api/events"))),(e,t)=>({subscribe(){$(e)&&$(t)&&V(xe.hasChannel(e))&&xe.addChannel(e,t)},unsubscribe(){xe.removeChannel(e)}})}function Va({content:e}){const t=cn(),n=Dt(),{removeError:r,addError:i}=Lt(),l=E(a=>a.modules),u=E(a=>a.environment),c=E(a=>a.environments),d=E(a=>a.showConfirmation),v=E(a=>a.confirmations),w=E(a=>a.setShowConfirmation),Z=E(a=>a.removeConfirmation),G=E(a=>a.setModels),P=E(a=>a.addRemoteEnvironments),R=E(a=>a.addLocalEnvironment),A=E(a=>a.setEnvironment);let f;V(l.hasOnlyDataCatalog)&&(f=xa());const N=y(a=>a.planApply),p=y(a=>a.planOverview),j=y(a=>a.planCancel),re=y(a=>a.setPlanApply),$e=y(a=>a.setPlanOverview),K=y(a=>a.setPlanCancel),je=y(a=>a.setPlanAction),I=X(a=>a.files),ae=X(a=>a.selectedFile),Ce=X(a=>a.setProject),De=X(a=>a.setFiles),ke=X(a=>a.refreshFiles),he=X(a=>a.findArtifactByPath),pe=X(a=>a.setTests),se=X(a=>a.setActiveRange),Re=ee(a=>a.storedTabs),Oe=ee(a=>a.storedTabId),ve=ee(a=>a.selectTab),He=ee(a=>a.createTab),Be=ee(a=>a.addTabs),Ze=ee(a=>a.closeTab),Ie=ee(a=>a.inTabs),mt=E(a=>a.setVersion),{refetch:ze,cancel:ht}=un(),{refetch:Ae,cancel:_e}=Ot(),{refetch:Ve,cancel:Ne}=dn(),{refetch:Pe,cancel:b}=it(),{refetch:O,cancel:T}=ct(u.name,{planOptions:{skip_tests:!0,include_unmodified:!0}}),z=s.useCallback(function(m){const x=Array.from(c).find(g=>g.name===m);S(x)?R(m):A(x)},[c]),pt=s.useCallback(function(m){p.update(m),m.environment!==u.name&&z(m.environment),$e(p)},[z,u]),vt=s.useCallback(function(m){var g,L;N.update(m,p),m.environment!==u.name&&z(m.environment),re(N);const x=Le((g=m.meta)==null?void 0:g.done)&&((L=m.meta)==null?void 0:L.status)!==qe.init;j.isFinished||j.isRunning||V(x)||Pe().then(({data:k})=>{O(),bt(k)})},[j,p,z,u]),gt=s.useCallback(function(m){var x,g;j.update(m),m.environment!==u.name&&z(m.environment),K(j),!(fn((x=m.meta)==null?void 0:x.done)||((g=m.meta)==null?void 0:g.status)===qe.init)&&O()},[z,u]),wt=s.useCallback(function({changes:m,directories:x}){var g,L;m.sort(k=>k.change===Ge.Deleted?-1:1),m.forEach(({change:k,path:J,file:F})=>{var M,W;if(k===Ge.Modified){const H=I.get(J);if(S(H)||S(F))return;H.update(F)}if(k===Ge.Deleted){const H=he(J)??I.get(J);if(S(H))return;H instanceof Ue&&((M=H.parent)==null||M.removeDirectory(H)),H instanceof Nt&&((W=H.parent)==null||W.removeFile(H),Ie(H)&&Ze(H))}});for(const k in x){const J=x[k],F=he(k);S(F)||((g=J.directories)==null||g.forEach(M=>{const W=he(M.path);S(W)&&F.addDirectory(new Ue(M,F))}),(L=J.files)==null||L.forEach(M=>{const W=I.get(M.path);S(W)&&F.addFile(new Nt(M,F))}),F.directories.sort((M,W)=>M.name>W.name?1:-1),F.files.sort((M,W)=>M.name>W.name?1:-1))}ke(),se(),Ae().then(({data:k})=>We(k))},[I]),xt=s.useCallback(function(m){const x=I.get(m.path);$(x)&&(x.isFormatted=m.status===qe.success,ke())},[I]),Jt=s.useCallback(function(m){if(mn(Re))return;const x=Re.map(({id:L,content:k})=>{const J=m.find(M=>M.id===L)??Ln(L),F=He(J);return F.file.content=k??F.file.content??"",F}),g=x.find(L=>L.file.id===Oe);Be(x),$(g)&&S(ae)&&ve(g)},[ve]);s.useEffect(()=>{ze().then(({data:g})=>{mt(g==null?void 0:g.version),Le(g==null?void 0:g.has_running_task)&&je(new rt({value:ce.RunningTask}))}),Ae().then(({data:g})=>We(g));const a=f==null?void 0:f("errors",Xt),m=f==null?void 0:f("tests",Qt),x=f==null?void 0:f("models",We);return x==null||x.subscribe(),l.hasPlans&&(m==null||m.subscribe(),Pe().then(({data:g})=>bt(g))),l.hasErrors&&(a==null||a.subscribe()),l.hasFiles&&Ve().then(({data:g})=>{if(S(g))return;const L=new Ue(g),k=L.allFiles;Jt(k),De(k),Ce(L)}),()=>{ht(),_e(),x==null||x.unsubscribe(),l.hasPlans&&(b(),T()),l.hasErrors&&(a==null||a.unsubscribe()),l.hasTests&&(m==null||m.unsubscribe()),l.hasFiles&&Ne()}},[l]),s.useEffect(()=>{const a=f==null?void 0:f("plan-apply",vt);return l.hasPlans&&(a==null||a.subscribe()),()=>{l.hasPlans&&(a==null||a.unsubscribe())}},[vt,l]),s.useEffect(()=>{const a=f==null?void 0:f("plan-overview",pt);return l.hasPlans&&(a==null||a.subscribe()),()=>{l.hasPlans&&(a==null||a.unsubscribe())}},[pt,l]),s.useEffect(()=>{const a=f==null?void 0:f("plan-cancel",gt);return l.hasPlans&&(a==null||a.subscribe()),()=>{l.hasPlans&&(a==null||a.unsubscribe())}},[gt,l]),s.useEffect(()=>{const a=f==null?void 0:f("file",wt);return a==null||a.subscribe(),()=>{a==null||a.unsubscribe()}},[wt]),s.useEffect(()=>{const a=f==null?void 0:f("format-file",xt);return a==null||a.subscribe(),()=>{a==null||a.unsubscribe()}},[xt]),s.useEffect(()=>{(V(l.isEmpty)&&t.pathname===Y.Home||t.pathname==="")&&n(l.defaultNavigationRoute(),{replace:!0})},[t,l]),s.useEffect(()=>{w(v.length>0)},[v]);function We(a){$(a)&&(r(Et.Models),G(a))}function Xt(a){i(Et.General,a)}function Qt(a){pe(a)}function bt(a){const{environments:m,default_target_environment:x,pinned_environments:g}=a??{};$t(m)&&P(Object.values(m),x,g)}function Ye(a){var m;(m=a==null?void 0:a.cancel)==null||m.call(a),w(!1)}const h=v[0];return o.jsxs(hn.Page,{layout:"horizontal",children:[l.showModuleNavigation&&o.jsxs(o.Fragment,{children:[o.jsx(ir,{className:"overflow-hidden py-1 px-2 flex flex-col items-center"}),o.jsx(yt,{orientation:"vertical"})]}),o.jsxs("div",{className:"flex flex-col overflow-hidden w-full h-full",children:[l.showNavigation&&o.jsxs(o.Fragment,{children:[o.jsx(ia,{}),o.jsx(yt,{})]}),e??o.jsx(pn,{}),o.jsxs(D,{show:d,onClose:()=>{Ye(h)},afterLeave:()=>{Z()},onKeyDown:a=>{a.key==="Escape"&&Ye(h)},children:[o.jsxs(D.Main,{children:[$(h==null?void 0:h.headline)&&o.jsx(D.Headline,{children:h==null?void 0:h.headline}),$(h==null?void 0:h.tagline)&&o.jsx(D.Tagline,{children:h==null?void 0:h.tagline}),$(h==null?void 0:h.details)&&o.jsx(D.Details,{details:h==null?void 0:h.details}),$(h==null?void 0:h.description)&&o.jsx(D.Description,{children:h==null?void 0:h.description}),h==null?void 0:h.children]}),o.jsxs(D.Actions,{children:[o.jsx(et,{className:"font-bold",size:"md",variant:"danger",onClick:a=>{var m;a.stopPropagation(),(m=h==null?void 0:h.action)==null||m.call(h),w(!1)},children:(h==null?void 0:h.yesText)??"Confirm"}),o.jsx(et,{size:"md",variant:"alternative",onClick:a=>{a.stopPropagation(),Ye(h)},children:(h==null?void 0:h.noText)??"Cancel"})]})]})]})]})}export{Va as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as i,R as O,j as n,K as oe,i as ne,c as k,W as et,a as L,h as Ee,I as ue,X as tt,w as De,J as rt,m as te,B as me,n as re,d as at,Y as nt,b as je,Z as st,$ as it,G as ot}from"./index-KZcJd7F1.js";import{L as lt}from"./context-DhymIb_N.js";import ct from"./ModelLineage-Bnes5PV4.js";import{i as K,G as Me,U as B,o as b,I as W,y as G,C as U,r as dt,H as ut,u as xe,h as pe,n as mt,p as ve,j as pt,k as ae,T as ft,J as xt,K as vt,z as h,A as fe,x as ke,_ as gt,M as Q,L as $e,P as Oe,O as Ne,N as Pe,b as ht,F as bt,c as wt,Q as yt,R as Rt,D as Et}from"./transition-C8EjNcgL.js";import{s as jt,u as kt,c as S,f as Nt,T as Pt,p as It,e as Ct}from"./ListboxShow-CwgOYGSe.js";import{A as le}from"./PlusCircleIcon-FgfUjgrM.js";import{I as Ie}from"./Input-CYm3h-zG.js";import{F as Dt}from"./ChevronDownIcon-BZk6URUK.js";function Mt({title:e,titleId:t,...r},a){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},r),e?i.createElement("title",{id:t},e):null,i.createElement("path",{fillRule:"evenodd",d:"M10 4.5c1.215 0 2.417.055 3.604.162a.68.68 0 0 1 .615.597c.124 1.038.208 2.088.25 3.15l-1.689-1.69a.75.75 0 0 0-1.06 1.061l2.999 3a.75.75 0 0 0 1.06 0l3.001-3a.75.75 0 1 0-1.06-1.06l-1.748 1.747a41.31 41.31 0 0 0-.264-3.386 2.18 2.18 0 0 0-1.97-1.913 41.512 41.512 0 0 0-7.477 0 2.18 2.18 0 0 0-1.969 1.913 41.16 41.16 0 0 0-.16 1.61.75.75 0 1 0 1.495.12c.041-.52.093-1.038.154-1.552a.68.68 0 0 1 .615-.597A40.012 40.012 0 0 1 10 4.5ZM5.281 9.22a.75.75 0 0 0-1.06 0l-3.001 3a.75.75 0 1 0 1.06 1.06l1.748-1.747c.042 1.141.13 2.27.264 3.386a2.18 2.18 0 0 0 1.97 1.913 41.533 41.533 0 0 0 7.477 0 2.18 2.18 0 0 0 1.969-1.913c.064-.534.117-1.071.16-1.61a.75.75 0 1 0-1.495-.12c-.041.52-.093 1.037-.154 1.552a.68.68 0 0 1-.615.597 40.013 40.013 0 0 1-7.208 0 .68.68 0 0 1-.615-.597 39.785 39.785 0 0 1-.25-3.15l1.689 1.69a.75.75 0 0 0 1.06-1.061l-2.999-3Z",clipRule:"evenodd"}))}const Te=i.forwardRef(Mt);function $t({title:e,titleId:t,...r},a){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},r),e?i.createElement("title",{id:t},e):null,i.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"}))}const Ot=i.forwardRef($t);function Tt({title:e,titleId:t,...r},a){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},r),e?i.createElement("title",{id:t},e):null,i.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM6.75 9.25a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5h-6.5Z",clipRule:"evenodd"}))}const Fe=i.forwardRef(Tt);function Ft({title:e,titleId:t,...r},a){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},r),e?i.createElement("title",{id:t},e):null,i.createElement("path",{fillRule:"evenodd",d:"M4 10a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H4.75A.75.75 0 0 1 4 10Z",clipRule:"evenodd"}))}const St=i.forwardRef(Ft);function At({title:e,titleId:t,...r},a){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},r),e?i.createElement("title",{id:t},e):null,i.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm.75-11.25a.75.75 0 0 0-1.5 0v2.5h-2.5a.75.75 0 0 0 0 1.5h2.5v2.5a.75.75 0 0 0 1.5 0v-2.5h2.5a.75.75 0 0 0 0-1.5h-2.5v-2.5Z",clipRule:"evenodd"}))}const _t=i.forwardRef(At);function Lt({title:e,titleId:t,...r},a){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},r),e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M10.75 4.75a.75.75 0 0 0-1.5 0v4.5h-4.5a.75.75 0 0 0 0 1.5h4.5v4.5a.75.75 0 0 0 1.5 0v-4.5h4.5a.75.75 0 0 0 0-1.5h-4.5v-4.5Z"}))}const Bt=i.forwardRef(Lt);function Gt({title:e,titleId:t,...r},a){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},r),e?i.createElement("title",{id:t},e):null,i.createElement("path",{fillRule:"evenodd",d:"M10.868 2.884c-.321-.772-1.415-.772-1.736 0l-1.83 4.401-4.753.381c-.833.067-1.171 1.107-.536 1.651l3.62 3.102-1.106 4.637c-.194.813.691 1.456 1.405 1.02L10 15.591l4.069 2.485c.713.436 1.598-.207 1.404-1.02l-1.106-4.637 3.62-3.102c.635-.544.297-1.584-.536-1.65l-4.752-.382-1.831-4.401Z",clipRule:"evenodd"}))}const Ut=i.forwardRef(Gt);function Se({container:e,accept:t,walk:r,enabled:a=!0}){let c=i.useRef(t),o=i.useRef(r);i.useEffect(()=>{c.current=t,o.current=r},[t,r]),K(()=>{if(!e||!a)return;let l=Me(e);if(!l)return;let s=c.current,u=o.current,x=Object.assign(y=>s(y),{acceptNode:s}),v=l.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,x,!1);for(;v.nextNode();)u(v.currentNode)},[e,a,c,o])}let Ae=i.createContext(null);function _e(){let e=i.useContext(Ae);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,_e),t}return e}function Le(){let[e,t]=i.useState([]);return[e.length>0?e.join(" "):void 0,i.useMemo(()=>function(r){let a=b(o=>(t(l=>[...l,o]),()=>t(l=>{let s=l.slice(),u=s.indexOf(o);return u!==-1&&s.splice(u,1),s}))),c=i.useMemo(()=>({register:a,slot:r.slot,name:r.name,props:r.props}),[a,r.slot,r.name,r.props]);return O.createElement(Ae.Provider,{value:c},r.children)},[t])]}let zt="p";function Vt(e,t){let r=W(),{id:a=`headlessui-description-${r}`,...c}=e,o=_e(),l=G(t);K(()=>o.register(a),[a,o.register]);let s={ref:l,...o.props,id:a};return U({ourProps:s,theirProps:c,slot:o.slot||{},defaultTag:zt,name:o.name||"Description"})}let Zt=B(Vt),Kt=Object.assign(Zt,{});var Wt=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Wt||{}),Qt=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Qt||{}),Ht=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e))(Ht||{});function ce(e,t=r=>r){let r=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,a=Oe(t(e.items.slice()),o=>o.dataRef.current.domRef.current),c=r?a.indexOf(r):null;return c===-1&&(c=null),{items:a,activeItemIndex:c}}let qt={1(e){return e.menuState===1?e:{...e,activeItemIndex:null,menuState:1}},0(e){return e.menuState===0?e:{...e,__demoMode:!1,menuState:0}},2:(e,t)=>{var r;let a=ce(e),c=Nt(t,{resolveItems:()=>a.items,resolveActiveIndex:()=>a.activeItemIndex,resolveId:o=>o.id,resolveDisabled:o=>o.dataRef.current.disabled});return{...e,...a,searchQuery:"",activeItemIndex:c,activationTrigger:(r=t.trigger)!=null?r:1}},3:(e,t)=>{let r=e.searchQuery!==""?0:1,a=e.searchQuery+t.value.toLowerCase(),c=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+r).concat(e.items.slice(0,e.activeItemIndex+r)):e.items).find(l=>{var s;return((s=l.dataRef.current.textValue)==null?void 0:s.startsWith(a))&&!l.dataRef.current.disabled}),o=c?e.items.indexOf(c):-1;return o===-1||o===e.activeItemIndex?{...e,searchQuery:a}:{...e,searchQuery:a,activeItemIndex:o,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,t)=>{let r=ce(e,a=>[...a,{id:t.id,dataRef:t.dataRef}]);return{...e,...r}},6:(e,t)=>{let r=ce(e,a=>{let c=a.findIndex(o=>o.id===t.id);return c!==-1&&a.splice(c,1),a});return{...e,...r,activationTrigger:1}}},ge=i.createContext(null);ge.displayName="MenuContext";function se(e){let t=i.useContext(ge);if(t===null){let r=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,se),r}return t}function Jt(e,t){return xe(t.type,qt,e,t)}let Yt=i.Fragment;function Xt(e,t){let{__demoMode:r=!1,...a}=e,c=i.useReducer(Jt,{__demoMode:r,menuState:r?0:1,buttonRef:i.createRef(),itemsRef:i.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:o,itemsRef:l,buttonRef:s},u]=c,x=G(t);dt([s,l],(R,p)=>{var d;u({type:1}),xt(p,vt.Loose)||(R.preventDefault(),(d=s.current)==null||d.focus())},o===0);let v=b(()=>{u({type:1})}),y=i.useMemo(()=>({open:o===0,close:v}),[o,v]),g={ref:x};return O.createElement(ge.Provider,{value:c},O.createElement(ut,{value:xe(o,{0:ae.Open,1:ae.Closed})},U({ourProps:g,theirProps:a,slot:y,defaultTag:Yt,name:"Menu"})))}let er="button";function tr(e,t){var r;let a=W(),{id:c=`headlessui-menu-button-${a}`,...o}=e,[l,s]=se("Menu.Button"),u=G(l.buttonRef,t),x=ve(),v=b(d=>{switch(d.key){case h.Space:case h.Enter:case h.ArrowDown:d.preventDefault(),d.stopPropagation(),s({type:0}),x.nextFrame(()=>s({type:2,focus:S.First}));break;case h.ArrowUp:d.preventDefault(),d.stopPropagation(),s({type:0}),x.nextFrame(()=>s({type:2,focus:S.Last}));break}}),y=b(d=>{switch(d.key){case h.Space:d.preventDefault();break}}),g=b(d=>{if(fe(d.currentTarget))return d.preventDefault();e.disabled||(l.menuState===0?(s({type:1}),x.nextFrame(()=>{var E;return(E=l.buttonRef.current)==null?void 0:E.focus({preventScroll:!0})})):(d.preventDefault(),s({type:0})))}),R=i.useMemo(()=>({open:l.menuState===0}),[l]),p={ref:u,id:c,type:ft(e,l.buttonRef),"aria-haspopup":"menu","aria-controls":(r=l.itemsRef.current)==null?void 0:r.id,"aria-expanded":l.menuState===0,onKeyDown:v,onKeyUp:y,onClick:g};return U({ourProps:p,theirProps:o,slot:R,defaultTag:er,name:"Menu.Button"})}let rr="div",ar=ke.RenderStrategy|ke.Static;function nr(e,t){var r,a;let c=W(),{id:o=`headlessui-menu-items-${c}`,...l}=e,[s,u]=se("Menu.Items"),x=G(s.itemsRef,t),v=mt(s.itemsRef),y=ve(),g=pt(),R=g!==null?(g&ae.Open)===ae.Open:s.menuState===0;i.useEffect(()=>{let m=s.itemsRef.current;m&&s.menuState===0&&m!==(v==null?void 0:v.activeElement)&&m.focus({preventScroll:!0})},[s.menuState,s.itemsRef,v]),Se({container:s.itemsRef.current,enabled:s.menuState===0,accept(m){return m.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:m.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(m){m.setAttribute("role","none")}});let p=b(m=>{var $,T;switch(y.dispose(),m.key){case h.Space:if(s.searchQuery!=="")return m.preventDefault(),m.stopPropagation(),u({type:3,value:m.key});case h.Enter:if(m.preventDefault(),m.stopPropagation(),u({type:1}),s.activeItemIndex!==null){let{dataRef:w}=s.items[s.activeItemIndex];(T=($=w.current)==null?void 0:$.domRef.current)==null||T.click()}$e(s.buttonRef.current);break;case h.ArrowDown:return m.preventDefault(),m.stopPropagation(),u({type:2,focus:S.Next});case h.ArrowUp:return m.preventDefault(),m.stopPropagation(),u({type:2,focus:S.Previous});case h.Home:case h.PageUp:return m.preventDefault(),m.stopPropagation(),u({type:2,focus:S.First});case h.End:case h.PageDown:return m.preventDefault(),m.stopPropagation(),u({type:2,focus:S.Last});case h.Escape:m.preventDefault(),m.stopPropagation(),u({type:1}),pe().nextFrame(()=>{var w;return(w=s.buttonRef.current)==null?void 0:w.focus({preventScroll:!0})});break;case h.Tab:m.preventDefault(),m.stopPropagation(),u({type:1}),pe().nextFrame(()=>{gt(s.buttonRef.current,m.shiftKey?Q.Previous:Q.Next)});break;default:m.key.length===1&&(u({type:3,value:m.key}),y.setTimeout(()=>u({type:4}),350));break}}),d=b(m=>{switch(m.key){case h.Space:m.preventDefault();break}}),E=i.useMemo(()=>({open:s.menuState===0}),[s]),N={"aria-activedescendant":s.activeItemIndex===null||(r=s.items[s.activeItemIndex])==null?void 0:r.id,"aria-labelledby":(a=s.buttonRef.current)==null?void 0:a.id,id:o,onKeyDown:p,onKeyUp:d,role:"menu",tabIndex:0,ref:x};return U({ourProps:N,theirProps:l,slot:E,defaultTag:rr,features:ar,visible:R,name:"Menu.Items"})}let sr=i.Fragment;function ir(e,t){let r=W(),{id:a=`headlessui-menu-item-${r}`,disabled:c=!1,...o}=e,[l,s]=se("Menu.Item"),u=l.activeItemIndex!==null?l.items[l.activeItemIndex].id===a:!1,x=i.useRef(null),v=G(t,x);K(()=>{if(l.__demoMode||l.menuState!==0||!u||l.activationTrigger===0)return;let w=pe();return w.requestAnimationFrame(()=>{var P,z;(z=(P=x.current)==null?void 0:P.scrollIntoView)==null||z.call(P,{block:"nearest"})}),w.dispose},[l.__demoMode,x,u,l.menuState,l.activationTrigger,l.activeItemIndex]);let y=jt(x),g=i.useRef({disabled:c,domRef:x,get textValue(){return y()}});K(()=>{g.current.disabled=c},[g,c]),K(()=>(s({type:5,id:a,dataRef:g}),()=>s({type:6,id:a})),[g,a]);let R=b(()=>{s({type:1})}),p=b(w=>{if(c)return w.preventDefault();s({type:1}),$e(l.buttonRef.current)}),d=b(()=>{if(c)return s({type:2,focus:S.Nothing});s({type:2,focus:S.Specific,id:a})}),E=kt(),N=b(w=>E.update(w)),m=b(w=>{E.wasMoved(w)&&(c||u||s({type:2,focus:S.Specific,id:a,trigger:0}))}),$=b(w=>{E.wasMoved(w)&&(c||u&&s({type:2,focus:S.Nothing}))}),T=i.useMemo(()=>({active:u,disabled:c,close:R}),[u,c,R]);return U({ourProps:{id:a,ref:v,role:"menuitem",tabIndex:c===!0?void 0:-1,"aria-disabled":c===!0?!0:void 0,disabled:void 0,onClick:p,onFocus:d,onPointerEnter:N,onMouseEnter:N,onPointerMove:m,onMouseMove:m,onPointerLeave:$,onMouseLeave:$},theirProps:o,slot:T,defaultTag:sr,name:"Menu.Item"})}let or=B(Xt),lr=B(tr),cr=B(nr),dr=B(ir),X=Object.assign(or,{Button:lr,Items:cr,Item:dr}),Be=i.createContext(null);function Ge(){let e=i.useContext(Be);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Ge),t}return e}function Ue(){let[e,t]=i.useState([]);return[e.length>0?e.join(" "):void 0,i.useMemo(()=>function(r){let a=b(o=>(t(l=>[...l,o]),()=>t(l=>{let s=l.slice(),u=s.indexOf(o);return u!==-1&&s.splice(u,1),s}))),c=i.useMemo(()=>({register:a,slot:r.slot,name:r.name,props:r.props}),[a,r.slot,r.name,r.props]);return O.createElement(Be.Provider,{value:c},r.children)},[t])]}let ur="label";function mr(e,t){let r=W(),{id:a=`headlessui-label-${r}`,passive:c=!1,...o}=e,l=Ge(),s=G(t);K(()=>l.register(a),[a,l.register]);let u={ref:s,...l.props,id:a};return c&&("onClick"in u&&(delete u.htmlFor,delete u.onClick),"onClick"in o&&delete o.onClick),U({ourProps:u,theirProps:o,slot:l.slot||{},defaultTag:ur,name:l.name||"Label"})}let pr=B(mr),fr=Object.assign(pr,{});var xr=(e=>(e[e.RegisterOption=0]="RegisterOption",e[e.UnregisterOption=1]="UnregisterOption",e))(xr||{});let vr={0(e,t){let r=[...e.options,{id:t.id,element:t.element,propsRef:t.propsRef}];return{...e,options:Oe(r,a=>a.element.current)}},1(e,t){let r=e.options.slice(),a=e.options.findIndex(c=>c.id===t.id);return a===-1?e:(r.splice(a,1),{...e,options:r})}},he=i.createContext(null);he.displayName="RadioGroupDataContext";function ze(e){let t=i.useContext(he);if(t===null){let r=new Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ze),r}return t}let be=i.createContext(null);be.displayName="RadioGroupActionsContext";function Ve(e){let t=i.useContext(be);if(t===null){let r=new Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ve),r}return t}function gr(e,t){return xe(t.type,vr,e,t)}let hr="div";function br(e,t){let r=W(),{id:a=`headlessui-radiogroup-${r}`,value:c,defaultValue:o,form:l,name:s,onChange:u,by:x=(f,M)=>f===M,disabled:v=!1,...y}=e,g=b(typeof x=="string"?(f,M)=>{let C=x;return(f==null?void 0:f[C])===(M==null?void 0:M[C])}:x),[R,p]=i.useReducer(gr,{options:[]}),d=R.options,[E,N]=Ue(),[m,$]=Le(),T=i.useRef(null),w=G(T,t),[P,z]=Pt(c,u,o),F=i.useMemo(()=>d.find(f=>!f.propsRef.current.disabled),[d]),V=i.useMemo(()=>d.some(f=>g(f.propsRef.current.value,P)),[d,P]),A=b(f=>{var M;if(v||g(f,P))return!1;let C=(M=d.find(Z=>g(Z.propsRef.current.value,f)))==null?void 0:M.propsRef.current;return C!=null&&C.disabled?!1:(z==null||z(f),!0)});Se({container:T.current,accept(f){return f.getAttribute("role")==="radio"?NodeFilter.FILTER_REJECT:f.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(f){f.setAttribute("role","none")}});let ie=b(f=>{let M=T.current;if(!M)return;let C=Me(M),Z=d.filter(I=>I.propsRef.current.disabled===!1).map(I=>I.element.current);switch(f.key){case h.Enter:It(f.currentTarget);break;case h.ArrowLeft:case h.ArrowUp:if(f.preventDefault(),f.stopPropagation(),Ne(Z,Q.Previous|Q.WrapAround)===Pe.Success){let I=d.find(H=>H.element.current===(C==null?void 0:C.activeElement));I&&A(I.propsRef.current.value)}break;case h.ArrowRight:case h.ArrowDown:if(f.preventDefault(),f.stopPropagation(),Ne(Z,Q.Next|Q.WrapAround)===Pe.Success){let I=d.find(H=>H.element.current===(C==null?void 0:C.activeElement));I&&A(I.propsRef.current.value)}break;case h.Space:{f.preventDefault(),f.stopPropagation();let I=d.find(H=>H.element.current===(C==null?void 0:C.activeElement));I&&A(I.propsRef.current.value)}break}}),_=b(f=>(p({type:0,...f}),()=>p({type:1,id:f.id}))),J=i.useMemo(()=>({value:P,firstOption:F,containsCheckedOption:V,disabled:v,compare:g,...R}),[P,F,V,v,g,R]),qe=i.useMemo(()=>({registerOption:_,change:A}),[_,A]),Je={ref:w,id:a,role:"radiogroup","aria-labelledby":E,"aria-describedby":m,onKeyDown:ie},Ye=i.useMemo(()=>({value:P}),[P]),Y=i.useRef(null),Xe=ve();return i.useEffect(()=>{Y.current&&o!==void 0&&Xe.addEventListener(Y.current,"reset",()=>{A(o)})},[Y,A]),O.createElement($,{name:"RadioGroup.Description"},O.createElement(N,{name:"RadioGroup.Label"},O.createElement(be.Provider,{value:qe},O.createElement(he.Provider,{value:J},s!=null&&P!=null&&Ct({[s]:P}).map(([f,M],C)=>O.createElement(ht,{features:wt.Hidden,ref:C===0?Z=>{var I;Y.current=(I=Z==null?void 0:Z.closest("form"))!=null?I:null}:void 0,...bt({key:f,as:"input",type:"radio",checked:M!=null,hidden:!0,readOnly:!0,form:l,disabled:v,name:f,value:M})})),U({ourProps:Je,theirProps:y,slot:Ye,defaultTag:hr,name:"RadioGroup"})))))}var wr=(e=>(e[e.Empty=1]="Empty",e[e.Active=2]="Active",e))(wr||{});let yr="div";function Rr(e,t){var r;let a=W(),{id:c=`headlessui-radiogroup-option-${a}`,value:o,disabled:l=!1,...s}=e,u=i.useRef(null),x=G(u,t),[v,y]=Ue(),[g,R]=Le(),{addFlag:p,removeFlag:d,hasFlag:E}=yt(1),N=Rt({value:o,disabled:l}),m=ze("RadioGroup.Option"),$=Ve("RadioGroup.Option");K(()=>$.registerOption({id:c,element:u,propsRef:N}),[c,$,u,N]);let T=b(_=>{var J;if(fe(_.currentTarget))return _.preventDefault();$.change(o)&&(p(2),(J=u.current)==null||J.focus())}),w=b(_=>{if(fe(_.currentTarget))return _.preventDefault();p(2)}),P=b(()=>d(2)),z=((r=m.firstOption)==null?void 0:r.id)===c,F=m.disabled||l,V=m.compare(m.value,o),A={ref:x,id:c,role:"radio","aria-checked":V?"true":"false","aria-labelledby":v,"aria-describedby":g,"aria-disabled":F?!0:void 0,tabIndex:F?-1:V||!m.containsCheckedOption&&z?0:-1,onClick:F?void 0:T,onFocus:F?void 0:w,onBlur:F?void 0:P},ie=i.useMemo(()=>({checked:V,disabled:F,active:E(2)}),[V,F,E]);return O.createElement(R,{name:"RadioGroup.Description"},O.createElement(y,{name:"RadioGroup.Label"},U({ourProps:A,theirProps:s,slot:ie,defaultTag:yr,name:"RadioGroup.Option"})))}let Er=B(br),jr=B(Rr),ee=Object.assign(Er,{Option:jr,Label:fr,Description:Kt});const D={ResetPlanOptions:"reset-plan-options",ResetPlanDates:"reset-plan-dates",ResetCategories:"reset-categories",PlanOptions:"plan-options",Dates:"dates",DateStart:"date-start",DateEnd:"date-end",Category:"category",External:"external",ResetTestsReport:"reset-tests-report",TestsReportErrors:"tests-report-errors",TestsReportMessages:"tests-report-messages"},j={Add:"add",Remove:"remove",Direct:"direct",Indirect:"indirect",Metadata:"metadata",Default:"default"},de={Breaking:"breaking",NonBreaking:"non-breaking",ForwardOnly:"forward-only"},[kr,Nr]=Dr(),Ze={skip_tests:!1,no_gaps:!1,skip_backfill:!1,forward_only:!1,auto_apply:!1,no_auto_categorization:!1,include_unmodified:!0,restate_models:void 0,create_from:"prod"},Ke={start:void 0,end:void 0},we={...Ke,...Ze,categories:Nr,defaultCategory:kr,change_categorization:new Map,virtualUpdateDescription:"All changes and their downstream dependencies can be fully previewed before they get promoted. If during plan creation no data gaps have been detected and only references to new model versions need to be updated, then such an update is referred to as a Virtual Update. Virtual Updates impose no additional runtime overhead or cost.",isInitialPlanRun:!1,errors:[],testsReportErrors:void 0,testsReportMessages:void 0},We=i.createContext(we),Qe=i.createContext(()=>{});function Vr({children:e}){const[t,r]=i.useReducer(Ir,Object.assign(we));return n.jsx(We.Provider,{value:Object.assign(t),children:n.jsx(Qe.Provider,{value:r,children:e})})}function ye(){return i.useContext(We)}function Pr(){return i.useContext(Qe)}function Ir(e,t){return t=Array.isArray(t)?t:[t],t.reduce(Cr,e)}function Cr(e=we,{type:t,...r}){switch(t){case D.ResetCategories:return Object.assign({},e,{change_categorization:new Map});case D.ResetPlanDates:return Object.assign({},e,Ke);case D.ResetPlanOptions:return Object.assign({},e,Ze);case D.ResetTestsReport:return Object.assign({},e,{testsReportErrors:void 0,testsReportMessages:void 0});case D.PlanOptions:return Object.assign({},e,r);case D.Dates:return Object.assign({},e,{start:r.start,end:r.end});case D.External:return Object.assign({},e,{isInitialPlanRun:r.isInitialPlanRun??!1});case D.DateStart:return Object.assign({},e,{start:r.start});case D.DateEnd:return Object.assign({},e,{end:r.end});case D.TestsReportErrors:return Object.assign({},e,{testsReportErrors:r.testsReportErrors});case D.TestsReportMessages:return Object.assign({},e,{testsReportMessages:r.testsReportMessages});case D.Category:{const{change:a,category:c}=r;return ne(a==null?void 0:a.name)&&e.change_categorization.set(a.name,{category:c,change:a}),Object.assign({},e,{change_categorization:new Map(e.change_categorization)})}default:return Object.assign({},e)}}function Dr(){const e={id:de.Breaking,name:"Breaking Change",description:"It will rebuild all models",value:oe.NUMBER_1},t=[e,{id:de.NonBreaking,name:"Non-Breaking Change",description:"It will exclude all indirect models caused by this change",value:oe.NUMBER_2},{id:de.ForwardOnly,name:"Forward-Only Change",description:"The change requires no rebuilding",value:oe.NUMBER_3}];return[e,t]}function q({children:e,headline:t,type:r,className:a}){return n.jsxs("div",{className:k("flex flex-col rounded-md p-4 text-xs",r===j.Add&&"bg-success-5",r===j.Remove&&"bg-danger-5",r===j.Direct&&"bg-secondary-5",r===j.Indirect&&"bg-warning-5",r===j.Default&&"bg-neutral-5",a),children:[ne(t)&&n.jsx("h4",{className:k("mb-2 font-bold whitespace-nowrap",r===j.Add&&"text-success-600 dark:text-success-300",r===j.Remove&&"text-danger-600 dark:text-danger-300",r===j.Direct&&"text-secondary-600 dark:text-secondary-300",r===j.Indirect&&"text-warning-600 dark:text-warning-300",r===j.Default&&"text-neutral-600 dark:text-neutral-300"),children:t}),e]})}function Mr({changes:e=[],type:t}){return n.jsx("ul",{children:e.map(r=>n.jsxs("li",{className:k("flex items-center",t===j.Add&&"text-success-600 dark:text-success-300",t===j.Remove&&"text-danger-600 dark:text-danger-300",t===j.Direct&&"text-secondary-600 dark:text-secondary-300",t===j.Indirect&&"text-warning-600 dark:text-warning-300",t===j.Default&&"text-neutral-600 dark:text-neutral-300"),children:[t===j.Add?n.jsx(Bt,{className:"h-3 mr-2"}):t===j.Remove?n.jsx(St,{className:"h-3 mr-2"}):n.jsx(Te,{className:"h-4 mr-2"}),n.jsx("span",{title:r.displayViewName,className:"w-full whitespace-nowrap text-ellipsis overflow-hidden",children:et(r.displayViewName,50,25)})]},r.name))})}function $r({changes:e=[],disabled:t=!1}){const r=Pr(),{categories:a}=ye(),c=L(o=>o.models);return i.useEffect(()=>{r(e.map(o=>({type:D.Category,category:a.find(({value:l})=>l===o.change_category),change:o})))},[e]),n.jsx("ul",{children:e.map(o=>n.jsx("li",{className:"text-secondary-500 dark:text-primary-500 mt-1",children:n.jsx(le,{children:({open:l})=>n.jsxs(n.Fragment,{children:[n.jsxs(le.Button,{className:"flex items-center w-full justify-between rounded-lg text-left",children:[n.jsx(Re,{className:"w-full",change:o}),(()=>{const s=l?Fe:_t;return n.jsx(s,{className:"max-h-[1rem] min-w-[1rem] dark:text-primary-500"})})()]}),n.jsxs(le.Panel,{className:"px-4 mb-4 overflow-hidden",children:[Ee(o.direct)&&n.jsx(Ce,{type:"direct",models:o.direct,className:"mt-2 ml-4"}),Ee(o.indirect)&&n.jsx(Ce,{type:"indirect",models:o.indirect,className:"ml-4"}),n.jsx(ue,{className:"border-secondary-20 mt-2"}),n.jsx(Or,{change:o,disabled:t,onChange:s=>{r({type:D.Category,category:a.find(({value:u})=>u===s),change:o})}}),n.jsx(ue,{className:"border-secondary-20 mt-2"}),n.jsxs("div",{className:"flex flex-col w-full h-full overflow-hidden overflow-y-auto hover:scrollbar scrollbar--vertical scrollbar--horizontal",children:[ne(o)&&tt(o.diff)&&n.jsx(He,{diff:o.diff}),(()=>{var u,x;const s=c.get(o.name);return De(s)?n.jsx(n.Fragment,{}):n.jsx("div",{className:"h-[16rem] bg-theme-lighter rounded-2xl overflow-hidden my-4",children:n.jsx(lt,{showColumns:!1,showConnected:!1,showControls:!1,children:n.jsx(ct,{model:s,highlightedNodes:{"border-4 border-warning-500 bg-warning-500 text-warning-500":((u=o.indirect)==null?void 0:u.map(v=>v.name))??[],"border-4 border-secondary-500 dark:border-primary-500 bg-secondary-500 dark:bg-primary-500 text-bg-secondary-500 dark:bg-primary-500 ring-8 ring-brand-50":[o.name],"border-4 border-secondary-500 dark:border-primary-500 bg-secondary-500 dark:bg-primary-500 text-bg-secondary-500 dark:bg-primary-500":((x=o.direct)==null?void 0:x.map(v=>v.name))??[],"*":["border-4 border-neutral-500 bg-neutral-500 text-neutral-600 dark:text-light"]}})})})})()]})]})]})})},o.name))})}function Or({change:e,disabled:t=!1,onChange:r}){var o,l;const{change_categorization:a,categories:c}=ye();return n.jsx(ee,{className:k("flex flex-col mt-2",t&&"pointer-events-none opacity-50 cursor-not-allowed"),disabled:t,defaultValue:((l=(o=a.get(e.name))==null?void 0:o.category)==null?void 0:l.value)??e.change_category,onChange:r,children:c.map(s=>n.jsx(ee.Option,{value:s.value,className:()=>k("relative flex rounded-md"),children:({checked:u})=>n.jsxs("div",{className:k("text-sm flex items-center px-2 py-1 w-full rounded-lg",u?"text-secondary-500 dark:text-primary-300":"text-prose"),children:[n.jsx("div",{className:"mt-[0.125rem] mr-2 border-2 border-neutral-400 min-w-[1rem] h-4 rounded-full flex justify-center items-center",children:u&&n.jsx("span",{className:"inline-block w-2 h-2 bg-secondary-500 dark:bg-primary-300 rounded-full"})}),n.jsxs("div",{children:[n.jsx(ee.Label,{as:"p",children:s.name}),n.jsx(ee.Description,{as:"span",className:"text-xs text-neutral-500",children:s.description})]})]})},s.name))})}function Tr({changes:e=[]}){return n.jsx("ul",{children:e.map(t=>n.jsx("li",{className:"text-warning-700 dark:text-warning-500",children:n.jsx(Re,{change:t})},t.name))})}function Re({change:e,className:t}){var c;const{change_categorization:r}=ye(),a=(c=r.get(e.name))==null?void 0:c.category;return n.jsxs("div",{className:k("flex items-center font-bold",t),children:[n.jsxs("span",{className:"flex w-full whitespace-nowrap text-ellipsis overflow-hidden",children:[n.jsx(Te,{className:"h-4 mr-2"}),e.displayViewName]}),De(a)?ne(e.indirect)&&n.jsx("span",{className:"ml-2 px-1 bg-warning-500 text-warning-100 dark:bg-warning-400 dark:text-warning-800 rounded whitespace-nowrap mr-2",children:"Categorize Manually"}):n.jsx("span",{className:"ml-2 px-1 bg-neutral-400 text-neutral-100 dark:bg-neutral-400 dark:text-neutral-800 rounded whitespace-nowrap mr-2",children:a.name})]})}function Ce({type:e,models:t,className:r}){return n.jsx("ul",{className:k(e==="indirect"&&"text-warning-700 dark:text-warning-500",e==="direct"&&"text-secondary-500 dark:text-primary-500",r),children:t.map(a=>n.jsxs("li",{className:"flex",children:[n.jsx("span",{className:"h-3 w-3 border-l-2 border-b-2 inline-block mr-2"}),a.displayViewName]},a.name))})}function He({diff:e}){return n.jsx("div",{className:"my-4 bg-dark-lighter rounded-2xl overflow-hidden",children:n.jsx("pre",{className:"p-4 text-primary-100 max-h-[30vh] text-xs overflow-auto hover:scrollbar scrollbar--vertical scrollbar--horizontal",children:e.split(`
|
|
2
|
-
`).map((t,r)=>n.jsx("p",{className:k(t.startsWith("+")&&"text-success-500 bg-success-500/10 px-2",t.startsWith("-")&&"text-danger-500 bg-danger-500/10 px-2",t.startsWith("@@")&&"text-primary-300 my-5 px-2"),children:t},`${t}-${r}`))})})}q.Default=Mr;q.Direct=$r;q.Indirect=Tr;q.Diff=He;q.Title=Re;function Fr({onAdd:e,className:t,label:r="Add",size:a=te.sm}){const c=L(p=>p.getNextEnvironment),o=L(p=>p.isExistingEnvironment),l=L(p=>p.addLocalEnvironment),[s,u]=i.useState(""),[x,v]=i.useState(c().name);function y(p){p.stopPropagation(),l(s,x),u(""),v(c().name),e==null||e()}function g(p){p.stopPropagation(),u(p.target.value)}const R=rt(s)||o(s);return n.jsxs("div",{className:k("flex w-full items-center bg-secondary-5",t),children:[n.jsx(Ie,{className:"my-0 mx-0 mr-4 min-w-[10rem] w-full",size:a,children:({className:p})=>n.jsx(Ie.Textfield,{className:k(p,"w-full"),placeholder:"Environment",value:s,onInput:g})}),n.jsx(me,{className:"my-0 mx-0 font-bold",variant:re.Secondary,size:a,disabled:R,onClick:y,children:r})]})}function Zr({disabled:e=!1,className:t,showAddEnvironment:r=!0,size:a=te.sm,onSelect:c}){const{addError:o}=at(),l=L(p=>p.environment),s=L(p=>p.environments),u=L(p=>p.setEnvironment),x=L(p=>p.removeLocalEnvironment),v=nt(X.Button);function y(p,d){p.stopPropagation(),u(d),c==null||c()}function g(p,d){p.stopPropagation(),x(d)}function R(p,d){p.stopPropagation(),it(d.name).then(()=>{x(d)}).catch(E=>{o(ot.Environments,E)})}return n.jsx(X,{as:"div",className:k("flex relative",t),children:({close:p})=>n.jsxs(n.Fragment,{children:[n.jsxs(v,{variant:re.Info,size:a,disabled:e,className:"flex justify-between w-full mx-0 pr-1",children:[n.jsxs("span",{className:k("block overflow-hidden truncate",(l.isLocal||e)&&"text-neutral-500",l.isRemote?"text-primary-600 dark:text-primary-300":"text-neutral-600 dark:text-neutral-200"),children:[n.jsx("span",{className:"text-xs text-neutral-300 dark:text-neutral-500 mr-1",children:"Environment:"}),n.jsx("span",{children:l.name})]}),n.jsx("span",{className:"pointer-events-none inset-y-0 right-0 flex items-center pl-1",children:n.jsx(Dt,{className:k("w-4",e?"text-neutral-400 dark:text-neutral-200":"text-neutral-800 dark:text-neutral-200"),"aria-hidden":"true"})})]}),n.jsx(Et,{as:i.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:n.jsx("div",{className:"!mx-0 absolute top-10 right-0 min-w-[16rem] max-w-[100%] overflow-hidden shadow-2xl bg-theme border-0 border-neutral-100 dark:border-neutral-800 rounded-md flex flex-col z-50",children:n.jsxs(X.Items,{className:"mx-0 overflow-auto max-h-80 hover:scrollbar scrollbar--vertical",children:[Array.from(s).map(d=>n.jsx(X.Item,{disabled:d===l,children:({active:E})=>n.jsxs("div",{onClick:N=>y(N,d),className:k("flex justify-between items-center pl-2 pr-1 py-1 overflow-auto",E?"text-neutral-600 bg-neutral-10":"text-neutral-400",d===l?"cursor-default bg-neutral-5":"cursor-pointer"),children:[n.jsxs("div",{className:"flex items-start",children:[n.jsx(Ot,{className:k("w-4 h-4 mt-[6px]",d===l?"opacity-100 text-primary-500":"opacity-0")}),n.jsxs("span",{className:"block",children:[n.jsxs("span",{className:"flex items-baseline",children:[n.jsx("span",{className:k("block truncate ml-2",d.isRemote&&"text-primary-500"),children:d.name}),n.jsxs("small",{className:"block ml-2",children:["(",d.type,")"]})]}),d.isProd&&n.jsx("span",{className:"flex ml-2",children:n.jsx("small",{className:"text-xs text-neutral-500",children:"Production Environment"})}),d.isDefault&&n.jsx("span",{className:"flex ml-2",children:n.jsx("small",{className:"text-xs text-neutral-500",children:"Default Environment"})})]})]}),n.jsxs("div",{className:"flex items-center",children:[d.isPinned&&n.jsx(Ut,{title:"Pinned",className:"w-4 text-primary-500 dark:text-primary-100 mx-1"}),je(d.isPinned)&&d.isLocal&&d!==l&&n.jsx(me,{className:"!m-0 !px-1 bg-transparent hover:bg-transparent border-none",size:te.xs,format:st.Ghost,variant:re.Neutral,onClick:N=>g(N,d),children:n.jsx(Fe,{className:"w-4 text-neutral-500 dark:text-neutral-100"})}),je(d.isPinned)&&d.isRemote&&d!==l&&n.jsx(me,{className:"!px-2 !my-0",size:te.xs,variant:re.Danger,onClick:N=>R(N,d),children:"Delete"})]})]})},d.name)),r&&n.jsxs(n.Fragment,{children:[n.jsx(ue,{}),n.jsx(Fr,{onAdd:p,className:"p-2 pb-2"})]})]})})})]})})}export{Fr as A,fr as B,j as E,Ue as F,Kt as G,q as P,Zr as S,Pr as a,D as b,Vr as c,ye as u,Le as w};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{y as u,j as s,O as f,e as t,I as c,B as p,n as x,m as j}from"./index-KZcJd7F1.js";import{P as d}from"./Page-DxTzPmYT.js";import{u as h}from"./project-CjyecwCx.js";import{S as v}from"./SourceList-Chz492Ne.js";import{S as y}from"./SourceListItem-DIieM0S_.js";import"./SplitPane-CmzNrZQN.js";import"./file-CcK5Oobc.js";import"./Input-CYm3h-zG.js";import"./index-BdXOfeCo.js";import"./index-CLuHMKlN.js";function g(){const{pathname:a}=u(),i=h(e=>e.files),r=Array.from(i.values()).filter(e=>e.path.endsWith("tests"));return s.jsx(d,{sidebar:s.jsxs("div",{className:"flex flex-col w-full h-full",children:[s.jsx(v,{keyId:"basename",keyName:"basename",to:t.Tests,items:r,isActive:e=>`${t.Tests}/${e}`===a,listItem:({to:e,name:o,description:m,text:n,disabled:l=!1})=>s.jsx(y,{to:e,name:o,text:n,description:m,disabled:l})}),s.jsx(c,{}),s.jsx("div",{className:"py-1 px-1 flex justify-end",children:s.jsx(p,{size:j.sm,variant:x.Neutral,children:"Run All"})})]}),content:s.jsx(f,{})})}export{g as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as E,d as U,a as z,j as H,a9 as O,af as P,w as y,G as R,ag as C,J as Q,i as x,ah as Z,ai as k,b as V,h as ee}from"./index-KZcJd7F1.js";import{u as h,M as g}from"./project-CjyecwCx.js";import{M as b}from"./file-CcK5Oobc.js";import{u as te}from"./editor-Bf9rhumO.js";const le={Added:1,Modified:2,Deleted:3},G=E.createContext({artifactRename:void 0,setArtifactRename:()=>{},selectArtifactsInRange:()=>new Set,createDirectory:()=>{},createFile:()=>{},renameArtifact:()=>{},removeArtifacts:()=>{},removeArtifactWithConfirmation:()=>{},moveArtifacts:()=>{},isTopGroupInActiveRange:()=>!1,isBottomGroupInActiveRange:()=>!1,isMiddleGroupInActiveRange:()=>!1});function re({children:$}){const{addError:v}=U(),A=h(e=>e.activeRange),l=h(e=>e.project),_=h(e=>e.files),D=h(e=>e.setActiveRange),M=h(e=>e.setSelectedFile),I=h(e=>e.setFiles),c=h(e=>e.inActiveRange),S=z(e=>e.addConfirmation),p=te(e=>e.tab),[F,r]=E.useState(!1),[w,N]=E.useState();E.useEffect(()=>{M(p==null?void 0:p.file)},[p==null?void 0:p.id]);function L(e){const n=A.length-1,s=l.allVisibleArtifacts,u=A[0],a=A[n],i=s.indexOf(e),o=u==null?0:s.indexOf(u),m=a==null?n:s.indexOf(a),f=i>o?o:i,d=i>m||i>o&&i<m?i:m;D(s.slice(f,d+1))}function X(e){if(F)return;r(!0);const t=O("new_directory");P([e.path,t].join("/"),{}).then(n=>{y(n)||e.open()}).catch(n=>v(R.FileExplorer,n)).finally(()=>{r(!1)})}function W(e,t){if(F)return;y(t)&&(e.isModels?t=".sql":e.isTests?t=".yaml":t=".py"),r(!0);const n=O("new_file",t);C(`${e.path}/${n}`,{content:""}).then(s=>{y(s)||e.open()}).catch(s=>v(R.FileExplorer,s)).finally(()=>{r(!1)})}function Y(e,t){var i;t=t==null?void 0:t.replaceAll("/","").trim();const s=(((i=e.parent)==null?void 0:i.artifacts)??[]).some(o=>o.name===t);if(F||Q(t)||s)return;r(!0);const u=e.name,a=e.path;e.rename(t),e instanceof g&&P(a,{new_path:e.path}).catch(o=>{v(R.FileExplorer,o),e.rename(u)}).finally(()=>{r(!1),x(p)&&e.hasFile(p.file)&&M(p.file),I(l.allFiles)}),e instanceof b&&C(a,{new_path:e.path}).then(o=>{e.update(o),_.set(e.path,e),_.delete(a)}).catch(o=>{v(R.FileExplorer,o),e.rename(u)}).finally(()=>{r(!1),I(l.allFiles)})}function T(e){if(F)return;r(!0);const t=e.map(n=>n instanceof b?Z(n.path):k(n.path));Promise.all(t).then(()=>{D([])}).catch(n=>v(R.FileExplorer,n)).finally(()=>{r(!1)})}function q(e){c(e)?S({headline:"Removing Selected Files/Directories",description:`Are you sure you want to remove ${A.length} items?`,yesText:"Yes, Remove",noText:"No, Cancel",details:A.map(t=>t.path),action:()=>{T(A)}}):S({headline:`Removing ${e instanceof g?"Directory":"File"}`,description:`Are you sure you want to remove the ${e instanceof g?"directory":"file"} "${e.name}"?`,yesText:"Yes, Remove",noText:"No, Cancel",action:()=>{x(e.parent)&&T([e])}})}function j(e,t,n=!1){if(F)return;r(!0);const s=[],u=[],a=[];if(e.forEach(i=>{const o=t.containsName(i.name),m=i.path;if(o&&V(n))return a.push(i);n&&i.rename(i.copyName());let f=[t.path,i.name].join("/");for(;f.startsWith("/");)f=f.slice(1).trim();i instanceof g&&(s.push(()=>{var d;(d=i.parent)==null||d.removeDirectory(i),t.addDirectory(i)}),u.push(P(m,{new_path:f})),i.allVisibleArtifacts.forEach(d=>e.splice(e.indexOf(d),1))),i instanceof b&&(s.push(()=>{var d;(d=i.parent)==null||d.removeFile(i),t.addFile(i)}),u.push(C(m,{new_path:f})))}),ee(a)){S({headline:"Moving Duplicates",description:"All duplicated names will be renamed!",yesText:"Yes, Rename",noText:"No, Cancel",details:a.map(i=>i.path),action:()=>{j(e,t,!0)}});return}Promise.all(u).then(i=>{i.forEach((o,m)=>{var f;return(f=s[m])==null?void 0:f.call(s)})}).catch(i=>{console.log(i)}).finally(()=>{r(!1),D([]),I(l.allFiles)})}function B(e){const t=l.allVisibleArtifacts.indexOf(e),n=l.allVisibleArtifacts[t-1],s=l.allVisibleArtifacts[t+1];return c(e)&&(y(n)||V(c(n)))&&x(s)&&c(s)}function J(e){const t=l.allVisibleArtifacts.indexOf(e),n=l.allVisibleArtifacts[t-1],s=l.allVisibleArtifacts[t+1];return c(e)&&(y(s)||V(c(s)))&&x(n)&&c(n)}function K(e){const t=l.allVisibleArtifacts.indexOf(e),n=l.allVisibleArtifacts[t-1],s=l.allVisibleArtifacts[t+1];return c(e)&&x(s)&&c(s)&&x(n)&&c(n)}return H.jsx(G.Provider,{value:{artifactRename:w,setArtifactRename:N,createDirectory:X,createFile:W,renameArtifact:Y,removeArtifacts:T,removeArtifactWithConfirmation:q,moveArtifacts:j,selectArtifactsInRange:L,isTopGroupInActiveRange:B,isBottomGroupInActiveRange:J,isMiddleGroupInActiveRange:K},children:$})}function ce(){return E.useContext(G)}export{le as EnumFileExplorerChange,G as FileExplorerContext,re as default,ce as useFileExplorer};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var u=Object.defineProperty;var g=(r,e,t)=>e in r?u(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var h=(r,e,t)=>g(r,typeof e!="symbol"?e+"":e,t);import{a0 as _,J as x,a9 as m,aa as n,ab as c,X as d,b as f}from"./index-KZcJd7F1.js";class y extends _{constructor(t,s){super(t!=null&&t.isModel?t.initial:{...t,name:(t==null?void 0:t.name)??"",path:(t==null?void 0:t.path)??""});h(this,"_path");h(this,"_name");h(this,"parent");h(this,"remove",!1);this._path=(t==null?void 0:t.path)??this.initial.path,this._name=(t==null?void 0:t.name)??this.initial.name,this.parent=s}get id(){return x(this.path)?this.initial.id:this.path}get name(){return this._name}get path(){return this._path}get isUntitled(){return this.name===""}get isLocal(){return this.path===""}get isRemote(){return this.path!==""}get withParent(){var t;return!!((t=this.parent)!=null&&t.isModel)}copyName(){return`Copy of ${this.name}__${m()}`}rename(t){this.isRemote&&(this._path=this._path.replace(this.name,t)),this._name=t}static findArtifactByPath(t,s){return t.path===s?t:t.allArtifacts.find(a=>a.path===s)}}const p={SQL:".sql",PY:".py",YAML:".yaml",YML:".yml"};class o extends y{constructor(t,s){super(o.getInitialArtifact(t),s);h(this,"_content","");h(this,"content");h(this,"extension");h(this,"isFormatted");this.content=this._content=n((t==null?void 0:t.content)??this.initial.content),this.extension=n((t==null?void 0:t.extension)??this.initial.extension),this.isFormatted=t==null?void 0:t.isFormatted}get basename(){return this.name.replace(this.extension,"")}get isEmpty(){return c(this.content)}get isChanged(){return d(this._content)&&this.content!==this._content}get isSQL(){return this.extension===p.SQL}get fingerprint(){return`${this._content}${this.name}${this.path}`}removeChanges(){this.content=this._content}copyName(){return`Copy of ${n(this.name.split(this.extension)[0])}__${m()}${this.extension}`}update(t){const s=n(t==null?void 0:t.content);(c(this._content)||f(this.isChanged))&&(this.content=s),this._content=s,this.extension=n(t==null?void 0:t.extension)}static getInitialArtifact(t){return o.isModelFile(t)?t.initial:{name:n(t==null?void 0:t.name),path:n(t==null?void 0:t.path),extension:(t==null?void 0:t.extension)??p.SQL,content:n(t==null?void 0:t.content)}}static isModelFile(t){return t instanceof o}}export{p as E,o as M,y as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ax as a,a2 as r}from"./index-KZcJd7F1.js";var t=a();const e=r(t);export{e as R,t as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var N=Object.defineProperty;var D=(u,r,t)=>r in u?N(u,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[r]=t;var a=(u,r,t)=>D(u,typeof r!="symbol"?r+"":r,t);import{a0 as F,s as I,b as f,w as l,g as R,C as w,D as v,i as p,h as V,a1 as x}from"./index-KZcJd7F1.js";const s={Done:"done",Run:"run",Running:"running",RunningTask:"running-task",ApplyVirtual:"apply-virtual",ApplyBackfill:"apply-backfill",ApplyChangesAndBackfill:"apply-changes-and-backfill",ApplyMetadata:"apply-metadata",Applying:"applying",Cancelling:"cancelling"};class O extends F{constructor(t){super(t!=null&&t.isModel?t.initial:{...t,value:(t==null?void 0:t.value)??s.Run});a(this,"_value");this._value=(t==null?void 0:t.value)??this.initial.value}get value(){return this._value}get isRun(){return this.value===s.Run}get isDone(){return this.value===s.Done}get isApplyVirtual(){return this.value===s.ApplyVirtual}get isApplyBackfill(){return this.value===s.ApplyBackfill}get isApplyChangesAndBackfill(){return this.value===s.ApplyChangesAndBackfill}get isApplyMetadata(){return this.value===s.ApplyMetadata}get isApply(){return this.isApplyVirtual||this.isApplyBackfill||this.isApplyChangesAndBackfill||this.isApplyMetadata}get isCancelling(){return this.value===s.Cancelling}get isApplying(){return this.value===s.Applying}get isRunning(){return I([s.Running,s.RunningTask],this.value)}get isRunningTask(){return this.value===s.RunningTask}get isProcessing(){return this.isRunning||this.isApplying||this.isCancelling}get isIdle(){return f(this.isProcessing)}displayStatus(t){return this.isCancelling?"Cancelling Plan...":this.isApplying?"Applying Plan...":this.isRunning&&l(t.hasChanges)?"Getting Changes...":this.isRunning&&l(t.hasBackfills)?"Getting Backfills...":this.isRunning?"Checking Plan...":this.isRunningTask?"Running Task...":"Plan"}static getActionDisplayName(t,e=[],i="Plan"){if(!e.includes(t.value))return i;let n;switch(t.value){case s.Done:n="Done";break;case s.Running:n="Running...";break;case s.RunningTask:n="Running Task...";break;case s.Applying:n="Applying...";break;case s.Cancelling:n="Cancelling...";break;case s.Run:n="Plan";break;case s.ApplyChangesAndBackfill:n="Apply Changes And Backfill";break;case s.ApplyVirtual:n="Apply Virtual Update";break;case s.ApplyBackfill:n="Apply And Backfill";break;case s.ApplyMetadata:n="Apply Metadata";break;default:n=i;break}return n}static getPlanAction({planOverview:t,planApply:e,planCancel:i}){const n=t.isRunning,c=e.isRunning,h=i.isRunning,d=e.isFinished&&t.isFinished||i.isFinished;return i.isEmpty&&e.isEmpty&&t.isEmpty?s.Run:h?s.Cancelling:c?s.Applying:n?s.Running:d?s.Done:t.isVirtualUpdate?s.ApplyVirtual:t.isMetadataUpdate?s.ApplyMetadata:t.isBackfillUpdate?s.ApplyBackfill:t.isChangesAndBackfillUpdate?s.ApplyChangesAndBackfill:s.Done}}class U extends F{constructor(t){super(t==null?void 0:t.initial);a(this,"_current");a(this,"_isFetching",!1);this._current=t==null?void 0:t._current,this._isFetching=(t==null?void 0:t._isFetching)??!1}get current(){return this._current}get environment(){var t;return(t=this.current)==null?void 0:t.environment}get meta(){var t;return(t=this.current)==null?void 0:t.meta}get plan_options(){var t;return(t=this.current)==null?void 0:t.plan_options}get start(){var t;return(t=this.current)==null?void 0:t.start}get end(){var t;return(t=this.current)==null?void 0:t.end}get duration(){var t;return((t=this==null?void 0:this.meta)==null?void 0:t.duration)??-1}get isFinished(){var t,e,i,n;return R((e=(t=this.current)==null?void 0:t.meta)==null?void 0:e.done)&&((n=(i=this.current)==null?void 0:i.meta)==null?void 0:n.status)!==w.init&&f(this.isFetching)}get isRunning(){var t,e,i,n;return v((e=(t=this.current)==null?void 0:t.meta)==null?void 0:e.done)&&((n=(i=this.current)==null?void 0:i.meta)==null?void 0:n.status)===w.init||this.isFetching}get isSuccessful(){var t,e;return this.isFinished&&((e=(t=this.current)==null?void 0:t.meta)==null?void 0:e.status)===w.success}get isFailed(){var t,e,i;return this.isFinished&&(l((t=this.current)==null?void 0:t.meta)||((i=(e=this.current)==null?void 0:e.meta)==null?void 0:i.status)===w.fail)}get isEmpty(){return l(this.current)}get isFetching(){return this._isFetching}set isFetching(t){this._isFetching=t}reset(){this._current=void 0}}class o extends F{constructor(t){var e,i;super(t);a(this,"name");a(this,"view_name");a(this,"node_type");a(this,"change_category");a(this,"diff");a(this,"indirect");a(this,"batches");a(this,"direct");a(this,"completed");a(this,"end");a(this,"interval");a(this,"start");a(this,"total");this.name=encodeURI(this.initial.name),this.view_name=encodeURI(this.initial.view_name),this.node_type=this.initial.node_type,this.change_category=this.initial.change_category,this.diff=this.initial.diff,this.batches=this.initial.batches,this.interval=this.initial.interval,this.start=this.initial.start,this.total=this.initial.total,this.completed=this.initial.completed,this.end=this.initial.end,this.indirect=(e=this.initial.indirect)==null?void 0:e.map(n=>new o(n)),this.direct=(i=this.initial.direct)==null?void 0:i.map(n=>new o(n))}get nodeType(){return this.node_type}get viewName(){return this.view_name}get displayName(){return decodeURI(this.name)}get displayViewName(){return decodeURI(this.view_name)}get changeCategory(){return this.change_category}}class k extends U{constructor(t){super(t);a(this,"_last");a(this,"_planOverview");a(this,"_lastPlanOverview");p(t)&&t.isModel&&(this._current=t._current,this._last=t._last,this._planOverview=t._planOverview,this._lastPlanOverview=t._lastPlanOverview)}get current(){return this._current??this._last}get environment(){var t,e;return((t=this._last)==null?void 0:t.environment)??((e=this._current)==null?void 0:e.environment)}get meta(){var t,e;return((t=this._last)==null?void 0:t.meta)??((e=this._current)==null?void 0:e.meta)}get plan_options(){var t,e;return((t=this._last)==null?void 0:t.plan_options)??((e=this._current)==null?void 0:e.plan_options)}get start(){var t,e;return((t=this._last)==null?void 0:t.start)??((e=this._current)==null?void 0:e.start)}get end(){var t,e;return((t=this._last)==null?void 0:t.end)??((e=this._current)==null?void 0:e.end)}get overview(){return this._lastPlanOverview??this._planOverview}get backfills(){var t;return((t=this.overview)==null?void 0:t.backfills)??[]}get added(){var t;return((t=this.overview)==null?void 0:t.added)??[]}get removed(){var t;return((t=this.overview)==null?void 0:t.removed)??[]}get direct(){var t;return((t=this.overview)==null?void 0:t.direct)??[]}get indirect(){var t;return((t=this.overview)==null?void 0:t.indirect)??[]}get metadata(){var t;return((t=this.overview)==null?void 0:t.metadata)??[]}get tasks(){var e,i,n,c;const t=((i=(e=this._last)==null?void 0:e.backfill)==null?void 0:i.tasks)??((c=(n=this._current)==null?void 0:n.backfill)==null?void 0:c.tasks)??{};return Object.entries(t??{}).reduce((h,[d,_])=>(h[encodeURI(d)]=new o(_),h),{})}get queue(){var t,e;return((e=(t=this.stageBackfill)==null?void 0:t.queue)==null?void 0:e.map(i=>this.tasks[encodeURI(i)]).filter(Boolean))??[]}get stageValidation(){var t;return(t=this.overview)==null?void 0:t.stageValidation}get stageChanges(){var t;return(t=this.overview)==null?void 0:t.stageChanges}get stageBackfills(){var t;return(t=this.overview)==null?void 0:t.stageBackfills}get stageCreation(){var t,e;return((t=this._last)==null?void 0:t.creation)??((e=this._current)==null?void 0:e.creation)}get stageRestate(){var t,e;return((t=this._last)==null?void 0:t.restate)??((e=this._current)==null?void 0:e.restate)}get stageBackfill(){var t,e;return((t=this._last)==null?void 0:t.backfill)??((e=this._current)==null?void 0:e.backfill)}get stagePromote(){var t,e;return((t=this._last)==null?void 0:t.promote)??((e=this._current)==null?void 0:e.promote)}get shouldShowEvaluation(){return this.isFailed||p(this.stageCreation)||p(this.stageBackfill)||p(this.stagePromote)}get evaluationStart(){var t,e,i,n,c,h;return((e=(t=this.stageCreation)==null?void 0:t.meta)==null?void 0:e.start)??((n=(i=this.stageBackfill)==null?void 0:i.meta)==null?void 0:n.start)??((h=(c=this.stagePromote)==null?void 0:c.meta)==null?void 0:h.start)}get evaluationEnd(){var t,e,i,n,c,h;return((e=(t=this.stagePromote)==null?void 0:t.meta)==null?void 0:e.end)??((n=(i=this.stageBackfill)==null?void 0:i.meta)==null?void 0:n.end)??((h=(c=this.stageCreation)==null?void 0:c.meta)==null?void 0:h.end)}update(t,e){var m,y,A,g,M,T,E;const{creation:i,restate:n,backfill:c,promote:h,meta:d,environment:_}=t,B=l(d)||l(_)?void 0:t;if(l(B)){this._current=void 0;return}l(this._current)&&(this._current=t),this._current.start=t.start,this._current.end=t.end,this._current.meta=t.meta,this._current.environment=t.environment,this._current.plan_options=t.plan_options,p(i)&&(l(this._current.creation)||v((m=this._current.creation.meta)==null?void 0:m.done))&&(this._current.creation=i),p(n)&&(l(this._current.restate)||v((y=this._current.restate.meta)==null?void 0:y.done))&&(this._current.restate=n),p(c)&&(l(this._current.backfill)||v((A=this._current.backfill.meta)==null?void 0:A.done))&&(this._current.backfill=c),p(h)&&(l(this._current.promote)||v((g=this._current.promote.meta)==null?void 0:g.done))&&(this._current.promote=h),R((T=(M=this.current)==null?void 0:M.meta)==null?void 0:T.done)&&l(this._last)?(this._last=this._current,this._lastPlanOverview=this._planOverview,this._current=void 0,this._planOverview=void 0):this._planOverview=p(d)&&p(_)?e==null?void 0:e.clone():void 0,this.isFetching=f((E=t.meta)==null?void 0:E.done)}reset(){this._current=void 0,this._planOverview=void 0}clear(){this._current=void 0,this._last=void 0,this._planOverview=void 0,this._lastPlanOverview=void 0}clone(){var e;const t=new k;return p(this.current)&&t.update(structuredClone(this.current),(e=this.overview)==null?void 0:e.clone()),t}}class b extends U{get cancel(){var r;return(r=this._current)==null?void 0:r.cancel}get isCancelling(){var r,t,e,i;return v((t=(r=this.current)==null?void 0:r.meta)==null?void 0:t.done)&&((i=(e=this.current)==null?void 0:e.meta)==null?void 0:i.status)===w.init||this.isFetching}update(r){var t;this._current=r,this.isFetching=f((t=r.meta)==null?void 0:t.done)}}class C extends U{constructor(t){super(t);a(this,"_added",[]);a(this,"_removed",[]);a(this,"_direct",[]);a(this,"_indirect",[]);a(this,"_metadata",[]);a(this,"_backfills",[]);p(t)&&t.isModel&&(this._added=t.added,this._removed=t.removed,this._direct=t.direct,this._indirect=t.indirect,this._metadata=t.metadata,this._backfills=t.backfills)}get stageValidation(){var t;return(t=this._current)==null?void 0:t.validation}get stageChanges(){var t;return(t=this._current)==null?void 0:t.changes}get stageBackfills(){var t;return(t=this._current)==null?void 0:t.backfills}get validation(){var t;return(t=this._current)==null?void 0:t.validation}get hasChanges(){var d;if(l((d=this._current)==null?void 0:d.changes))return;const{added:t,removed:e,modified:i}=this._current.changes??{};if([t,e,i].every(l))return;const{direct:n,indirect:c,metadata:h}=i??{};return[t,e,n,c,h].some(V)}get changes(){var t;return(t=this._current)==null?void 0:t.changes}get hasBackfills(){var t,e,i;return l((e=(t=this._current)==null?void 0:t.backfills)==null?void 0:e.models)?void 0:V((i=this._current.backfills)==null?void 0:i.models)}get hasUpdates(){return R(this.hasChanges)||R(this.hasBackfills)}get backfills(){return this._backfills}get added(){return this._added}get removed(){return this._removed}get direct(){return this._direct}get indirect(){return this._indirect}get metadata(){return this._metadata}get isVirtualUpdate(){return p(this.hasChanges)&&l(this.hasBackfills)||!!this.hasChanges&&this.skipBackfill}get isMetadataUpdate(){var t;return!!((t=this.metadata)!=null&&t.length)&&l(this.hasBackfills)}get isBackfillUpdate(){return v(this.hasChanges)&&!!this.hasBackfills&&f(this.skipBackfill)}get isChangesAndBackfillUpdate(){return!!this.hasChanges&&!!this.hasBackfills&&f(this.skipBackfill)}get isLatest(){return this.isFinished&&l(this.hasChanges)&&(l(this.hasBackfills)||this.skipBackfill)}get skipTests(){var t,e;return((e=(t=this._current)==null?void 0:t.plan_options)==null?void 0:e.skip_tests)??!1}get skipBackfill(){var t,e;return((e=(t=this._current)==null?void 0:t.plan_options)==null?void 0:e.skip_backfill)??!1}update(t){var c,h,d,_,P,B,m,y,A;this._current=t,this.isFetching=f((c=t.meta)==null?void 0:c.done);const e=((h=this._current)==null?void 0:h.changes)??{},i=(e==null?void 0:e.modified)??{},n=((d=this._current)==null?void 0:d.backfills)??{};this._added=((_=e.added)==null?void 0:_.map(g=>new o(g)))??[],this._removed=((P=e.removed)==null?void 0:P.map(g=>new o(g)))??[],this._direct=((B=i.direct)==null?void 0:B.map(g=>new o(g)))??[],this._indirect=((m=i.indirect)==null?void 0:m.map(g=>new o(g)))??[],this._metadata=((y=i.metadata)==null?void 0:y.map(g=>new o(g)))??[],this._backfills=((A=n.models)==null?void 0:A.map(g=>new o(g)))??[]}clone(){const t=new C;return p(this.current)&&t.update(structuredClone(this.current)),t}}const G=x((u,r)=>({planAction:new O,planOverview:new C,planApply:new k,planCancel:new b,setPlanAction:t=>{u(()=>({planAction:new O(t)}))},setPlanApply:t=>{u(()=>({planApply:new k(t)}))},setPlanOverview:t=>{u(()=>({planOverview:new C(t)}))},setPlanCancel:t=>{u(()=>({planCancel:new b(t)}))},resetPlanTrackers:()=>{const t=r();t.planApply.reset(),t.planCancel.reset(),t.planOverview.reset(),u(()=>({planApply:new k(t.planApply),planCancel:new b(t.planCancel),planOverview:new C(t.planOverview)}))},resetPlanCancel:()=>{const t=r();t.planCancel.reset(),u(()=>({planCancel:new b(t.planCancel)}))},clearPlanApply:()=>{const t=r();t.planApply.clear(),u(()=>({planApply:new k(t.planApply)}))}}));export{s as E,C as M,O as a,G as u};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{r as l,R as E,f as De}from"./index-KZcJd7F1.js";import{r as ot}from"./index-BdXOfeCo.js";var lt=Object.defineProperty,ut=(e,t,n)=>t in e?lt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Se=(e,t,n)=>(ut(e,typeof t!="symbol"?t+"":t,n),n);let at=class{constructor(){Se(this,"current",this.detect()),Se(this,"handoffState","pending"),Se(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},W=new at,B=(e,t)=>{W.isServer?l.useEffect(e,t):l.useLayoutEffect(e,t)};function j(e){let t=l.useRef(e);return B(()=>{t.current=e},[e]),t}let P=function(e){let t=j(e);return E.useCallback((...n)=>t.current(...n),[t])};function Ue(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function le(){let e=[],t={addEventListener(n,r,u,a){return n.addEventListener(r,u,a),t.add(()=>n.removeEventListener(r,u,a))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Ue(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,u){let a=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:u}),this.add(()=>{Object.assign(n.style,{[r]:a})})},group(n){let r=le();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let u of e.splice(r,1))u()}},dispose(){for(let n of e.splice(0))n()}};return t}function qe(){let[e]=l.useState(le);return l.useEffect(()=>()=>e.dispose(),[e]),e}function it(){let e=typeof document>"u";return"useSyncExternalStore"in De?(t=>t.useSyncExternalStore)(De)(()=>()=>{},()=>!1,()=>!e):!1}function ve(){let e=it(),[t,n]=l.useState(W.isHandoffComplete);return t&&W.isHandoffComplete===!1&&n(!1),l.useEffect(()=>{t!==!0&&n(!0)},[t]),l.useEffect(()=>W.handoff(),[]),e?!1:t}var He;let ne=(He=E.useId)!=null?He:function(){let e=ve(),[t,n]=E.useState(e?()=>W.nextId():null);return B(()=>{t===null&&n(W.nextId())},[t]),t!=null?""+t:void 0};function I(e,t,...n){if(e in t){let u=t[e];return typeof u=="function"?u(...n):u}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(u=>`"${u}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,I),r}function me(e){return W.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let Fe=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var K=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(K||{}),fe=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(fe||{}),st=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(st||{});function se(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Fe)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Ce=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Ce||{});function Oe(e,t=0){var n;return e===((n=me(e))==null?void 0:n.body)?!1:I(t,{0(){return e.matches(Fe)},1(){let r=e;for(;r!==null;){if(r.matches(Fe))return!0;r=r.parentElement}return!1}})}function Fn(e){let t=me(e);le().nextFrame(()=>{t&&!Oe(t.activeElement,0)&&dt(e)})}var ct=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(ct||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function dt(e){e==null||e.focus({preventScroll:!0})}let ft=["textarea","input"].join(",");function pt(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,ft))!=null?n:!1}function vt(e,t=n=>n){return e.slice().sort((n,r)=>{let u=t(n),a=t(r);if(u===null||a===null)return 0;let o=u.compareDocumentPosition(a);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function xn(e,t){return J(se(),t,{relativeTo:e})}function J(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:u=[]}={}){let a=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,o=Array.isArray(e)?n?vt(e):e:se(e);u.length>0&&o.length>1&&(o=o.filter(b=>!u.includes(b))),r=r??a.activeElement;let c=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),i=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,o.indexOf(r))-1;if(t&4)return Math.max(0,o.indexOf(r))+1;if(t&8)return o.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),p=t&32?{preventScroll:!0}:{},s=0,d=o.length,f;do{if(s>=d||s+d<=0)return 0;let b=i+s;if(t&16)b=(b+d)%d;else{if(b<0)return 3;if(b>=d)return 1}f=o[b],f==null||f.focus(p),s+=c}while(f!==a.activeElement);return t&6&&pt(f)&&f.select(),2}function mt(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function ht(){return/Android/gi.test(window.navigator.userAgent)}function gt(){return mt()||ht()}function ce(e,t,n){let r=j(t);l.useEffect(()=>{function u(a){r.current(a)}return document.addEventListener(e,u,n),()=>document.removeEventListener(e,u,n)},[e,n])}function Ge(e,t,n){let r=j(t);l.useEffect(()=>{function u(a){r.current(a)}return window.addEventListener(e,u,n),()=>window.removeEventListener(e,u,n)},[e,n])}function bt(e,t,n=!0){let r=l.useRef(!1);l.useEffect(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function u(o,c){if(!r.current||o.defaultPrevented)return;let i=c(o);if(i===null||!i.getRootNode().contains(i)||!i.isConnected)return;let p=function s(d){return typeof d=="function"?s(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(let s of p){if(s===null)continue;let d=s instanceof HTMLElement?s:s.current;if(d!=null&&d.contains(i)||o.composed&&o.composedPath().includes(d))return}return!Oe(i,Ce.Loose)&&i.tabIndex!==-1&&o.preventDefault(),t(o,i)}let a=l.useRef(null);ce("pointerdown",o=>{var c,i;r.current&&(a.current=((i=(c=o.composedPath)==null?void 0:c.call(o))==null?void 0:i[0])||o.target)},!0),ce("mousedown",o=>{var c,i;r.current&&(a.current=((i=(c=o.composedPath)==null?void 0:c.call(o))==null?void 0:i[0])||o.target)},!0),ce("click",o=>{gt()||a.current&&(u(o,()=>a.current),a.current=null)},!0),ce("touchend",o=>u(o,()=>o.target instanceof HTMLElement?o.target:null),!0),Ge("blur",o=>u(o,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function ue(...e){return l.useMemo(()=>me(...e),[...e])}function je(e){var t;if(e.type)return e.type;let n=(t=e.as)!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function Et(e,t){let[n,r]=l.useState(()=>je(e));return B(()=>{r(je(e))},[e.type,e.as]),B(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}let Ke=Symbol();function Ve(e,t=!0){return Object.assign(e,{[Ke]:t})}function U(...e){let t=l.useRef(e);l.useEffect(()=>{t.current=e},[e]);let n=P(r=>{for(let u of t.current)u!=null&&(typeof u=="function"?u(r):u.current=r)});return e.every(r=>r==null||(r==null?void 0:r[Ke]))?void 0:n}function pe(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var re=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(re||{}),Z=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Z||{});function q({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:u,visible:a=!0,name:o,mergeRefs:c}){c=c??Pt;let i=We(t,e);if(a)return de(i,n,r,o,c);let p=u??0;if(p&2){let{static:s=!1,...d}=i;if(s)return de(d,n,r,o,c)}if(p&1){let{unmount:s=!0,...d}=i;return I(s?0:1,{0(){return null},1(){return de({...d,hidden:!0,style:{display:"none"}},n,r,o,c)}})}return de(i,n,r,o,c)}function de(e,t={},n,r,u){let{as:a=n,children:o,refName:c="ref",...i}=we(e,["unmount","static"]),p=e.ref!==void 0?{[c]:e.ref}:{},s=typeof o=="function"?o(t):o;"className"in i&&i.className&&typeof i.className=="function"&&(i.className=i.className(t));let d={};if(t){let f=!1,b=[];for(let[g,m]of Object.entries(t))typeof m=="boolean"&&(f=!0),m===!0&&b.push(g);f&&(d["data-headlessui-state"]=b.join(" "))}if(a===l.Fragment&&Object.keys(Be(i)).length>0){if(!l.isValidElement(s)||Array.isArray(s)&&s.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(i).map(m=>` - ${m}`).join(`
|
|
2
|
-
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(m=>` - ${m}`).join(`
|
|
3
|
-
`)].join(`
|
|
4
|
-
`));let f=s.props,b=typeof(f==null?void 0:f.className)=="function"?(...m)=>pe(f==null?void 0:f.className(...m),i.className):pe(f==null?void 0:f.className,i.className),g=b?{className:b}:{};return l.cloneElement(s,Object.assign({},We(s.props,Be(we(i,["ref"]))),d,p,{ref:u(s.ref,p.ref)},g))}return l.createElement(a,Object.assign({},we(i,["ref"]),a!==l.Fragment&&p,a!==l.Fragment&&d),s)}function yt(){let e=l.useRef([]),t=l.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function Pt(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function We(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let u in r)u.startsWith("on")&&typeof r[u]=="function"?(n[u]!=null||(n[u]=[]),n[u].push(r[u])):t[u]=r[u];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](u,...a){let o=n[r];for(let c of o){if((u instanceof Event||(u==null?void 0:u.nativeEvent)instanceof Event)&&u.defaultPrevented)return;c(u,...a)}}});return t}function _(e){var t;return Object.assign(l.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Be(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function we(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let St="div";var oe=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(oe||{});function wt(e,t){var n;let{features:r=1,...u}=e,a={ref:t,"aria-hidden":(r&2)===2?!0:(n=u["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return q({ourProps:a,theirProps:u,slot:{},defaultTag:St,name:"Hidden"})}let ie=_(wt),Ie=l.createContext(null);Ie.displayName="OpenClosedContext";var k=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(k||{});function he(){return l.useContext(Ie)}function ze({value:e,children:t}){return E.createElement(Ie.Provider,{value:e},t)}function Ye(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&Tt(n)?!1:r}function Tt(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}var X=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(X||{});function $t(e,t,n,r){let u=j(n);l.useEffect(()=>{e=e??window;function a(o){u.current(o)}return e.addEventListener(t,a,r),()=>e.removeEventListener(t,a,r)},[e,t,r])}function Re(){let e=l.useRef(!1);return B(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Ft(e){let t=P(e),n=l.useRef(!1);l.useEffect(()=>(n.current=!1,()=>{n.current=!0,Ue(()=>{n.current&&t()})}),[t])}var V=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(V||{});function Qe(){let e=l.useRef(0);return Ge("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}let Xe=l.createContext(!1);function xt(){return l.useContext(Xe)}function Nn(e){return E.createElement(Xe.Provider,{value:e.force},e.children)}function Nt(e){let t=xt(),n=l.useContext(Je),r=ue(e),[u,a]=l.useState(()=>{if(!t&&n!==null||W.isServer)return null;let o=r==null?void 0:r.getElementById("headlessui-portal-root");if(o)return o;if(r===null)return null;let c=r.createElement("div");return c.setAttribute("id","headlessui-portal-root"),r.body.appendChild(c)});return l.useEffect(()=>{u!==null&&(r!=null&&r.body.contains(u)||r==null||r.body.appendChild(u))},[u,r]),l.useEffect(()=>{t||n!==null&&a(n.current)},[n,a,t]),u}let Ct=l.Fragment;function Ot(e,t){let n=e,r=l.useRef(null),u=U(Ve(s=>{r.current=s}),t),a=ue(r),o=Nt(r),[c]=l.useState(()=>{var s;return W.isServer?null:(s=a==null?void 0:a.createElement("div"))!=null?s:null}),i=l.useContext(xe),p=ve();return B(()=>{!o||!c||o.contains(c)||(c.setAttribute("data-headlessui-portal",""),o.appendChild(c))},[o,c]),B(()=>{if(c&&i)return i.register(c)},[i,c]),Ft(()=>{var s;!o||!c||(c instanceof Node&&o.contains(c)&&o.removeChild(c),o.childNodes.length<=0&&((s=o.parentElement)==null||s.removeChild(o)))}),p?!o||!c?null:ot.createPortal(q({ourProps:{ref:u},theirProps:n,defaultTag:Ct,name:"Portal"}),c):null}let It=l.Fragment,Je=l.createContext(null);function Rt(e,t){let{target:n,...r}=e,u={ref:U(t)};return E.createElement(Je.Provider,{value:n},q({ourProps:u,theirProps:r,defaultTag:It,name:"Popover.Group"}))}let xe=l.createContext(null);function Mt(){let e=l.useContext(xe),t=l.useRef([]),n=P(a=>(t.current.push(a),e&&e.register(a),()=>r(a))),r=P(a=>{let o=t.current.indexOf(a);o!==-1&&t.current.splice(o,1),e&&e.unregister(a)}),u=l.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,l.useMemo(()=>function({children:a}){return E.createElement(xe.Provider,{value:u},a)},[u])]}let Lt=_(Ot),kt=_(Rt),Cn=Object.assign(Lt,{Group:kt});function At({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){var r;let u=l.useRef((r=n==null?void 0:n.current)!=null?r:null),a=ue(u),o=P(()=>{var c,i,p;let s=[];for(let d of e)d!==null&&(d instanceof HTMLElement?s.push(d):"current"in d&&d.current instanceof HTMLElement&&s.push(d.current));if(t!=null&&t.current)for(let d of t.current)s.push(d);for(let d of(c=a==null?void 0:a.querySelectorAll("html > *, body > *"))!=null?c:[])d!==document.body&&d!==document.head&&d instanceof HTMLElement&&d.id!=="headlessui-portal-root"&&(d.contains(u.current)||d.contains((p=(i=u.current)==null?void 0:i.getRootNode())==null?void 0:p.host)||s.some(f=>d.contains(f))||s.push(d));return s});return{resolveContainers:o,contains:P(c=>o().some(i=>i.contains(c))),mainTreeNodeRef:u,MainTreeNode:l.useMemo(()=>function(){return n!=null?null:E.createElement(ie,{features:oe.Hidden,ref:u})},[u,n])}}function Dt(){let e=l.useRef(null);return{mainTreeNodeRef:e,MainTreeNode:l.useMemo(()=>function(){return E.createElement(ie,{features:oe.Hidden,ref:e})},[e])}}var Ht=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ht||{}),jt=(e=>(e[e.TogglePopover=0]="TogglePopover",e[e.ClosePopover=1]="ClosePopover",e[e.SetButton=2]="SetButton",e[e.SetButtonId=3]="SetButtonId",e[e.SetPanel=4]="SetPanel",e[e.SetPanelId=5]="SetPanelId",e))(jt||{});let Bt={0:e=>{let t={...e,popoverState:I(e.popoverState,{0:1,1:0})};return t.popoverState===0&&(t.__demoMode=!1),t},1(e){return e.popoverState===1?e:{...e,popoverState:1}},2(e,t){return e.button===t.button?e:{...e,button:t.button}},3(e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},4(e,t){return e.panel===t.panel?e:{...e,panel:t.panel}},5(e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}}},Me=l.createContext(null);Me.displayName="PopoverContext";function ge(e){let t=l.useContext(Me);if(t===null){let n=new Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ge),n}return t}let Le=l.createContext(null);Le.displayName="PopoverAPIContext";function ke(e){let t=l.useContext(Le);if(t===null){let n=new Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ke),n}return t}let Ae=l.createContext(null);Ae.displayName="PopoverGroupContext";function Ze(){return l.useContext(Ae)}let be=l.createContext(null);be.displayName="PopoverPanelContext";function _t(){return l.useContext(be)}function Ut(e,t){return I(t.type,Bt,e,t)}let qt="div";function Gt(e,t){var n;let{__demoMode:r=!1,...u}=e,a=l.useRef(null),o=U(t,Ve(y=>{a.current=y})),c=l.useRef([]),i=l.useReducer(Ut,{__demoMode:r,popoverState:r?0:1,buttons:c,button:null,buttonId:null,panel:null,panelId:null,beforePanelSentinel:l.createRef(),afterPanelSentinel:l.createRef()}),[{popoverState:p,button:s,buttonId:d,panel:f,panelId:b,beforePanelSentinel:g,afterPanelSentinel:m},v]=i,S=ue((n=a.current)!=null?n:s),x=l.useMemo(()=>{if(!s||!f)return!1;for(let H of document.querySelectorAll("body > *"))if(Number(H==null?void 0:H.contains(s))^Number(H==null?void 0:H.contains(f)))return!0;let y=se(),L=y.indexOf(s),te=(L+y.length-1)%y.length,ee=(L+1)%y.length,G=y[te],ae=y[ee];return!f.contains(G)&&!f.contains(ae)},[s,f]),T=j(d),R=j(b),A=l.useMemo(()=>({buttonId:T,panelId:R,close:()=>v({type:1})}),[T,R,v]),C=Ze(),D=C==null?void 0:C.registerPopover,$=P(()=>{var y;return(y=C==null?void 0:C.isFocusWithinPopoverGroup())!=null?y:(S==null?void 0:S.activeElement)&&((s==null?void 0:s.contains(S.activeElement))||(f==null?void 0:f.contains(S.activeElement)))});l.useEffect(()=>D==null?void 0:D(A),[D,A]);let[N,F]=Mt(),h=At({mainTreeNodeRef:C==null?void 0:C.mainTreeNodeRef,portals:N,defaultContainers:[s,f]});$t(S==null?void 0:S.defaultView,"focus",y=>{var L,te,ee,G;y.target!==window&&y.target instanceof HTMLElement&&p===0&&($()||s&&f&&(h.contains(y.target)||(te=(L=g.current)==null?void 0:L.contains)!=null&&te.call(L,y.target)||(G=(ee=m.current)==null?void 0:ee.contains)!=null&&G.call(ee,y.target)||v({type:1})))},!0),bt(h.resolveContainers,(y,L)=>{v({type:1}),Oe(L,Ce.Loose)||(y.preventDefault(),s==null||s.focus())},p===0);let w=P(y=>{v({type:1});let L=y?y instanceof HTMLElement?y:"current"in y&&y.current instanceof HTMLElement?y.current:s:s;L==null||L.focus()}),O=l.useMemo(()=>({close:w,isPortalled:x}),[w,x]),M=l.useMemo(()=>({open:p===0,close:w}),[p,w]),z={ref:o};return E.createElement(be.Provider,{value:null},E.createElement(Me.Provider,{value:i},E.createElement(Le.Provider,{value:O},E.createElement(ze,{value:I(p,{0:k.Open,1:k.Closed})},E.createElement(F,null,q({ourProps:z,theirProps:u,slot:M,defaultTag:qt,name:"Popover"}),E.createElement(h.MainTreeNode,null))))))}let Kt="button";function Vt(e,t){let n=ne(),{id:r=`headlessui-popover-button-${n}`,...u}=e,[a,o]=ge("Popover.Button"),{isPortalled:c}=ke("Popover.Button"),i=l.useRef(null),p=`headlessui-focus-sentinel-${ne()}`,s=Ze(),d=s==null?void 0:s.closeOthers,f=_t()!==null;l.useEffect(()=>{if(!f)return o({type:3,buttonId:r}),()=>{o({type:3,buttonId:null})}},[f,r,o]);let[b]=l.useState(()=>Symbol()),g=U(i,t,f?null:h=>{if(h)a.buttons.current.push(b);else{let w=a.buttons.current.indexOf(b);w!==-1&&a.buttons.current.splice(w,1)}a.buttons.current.length>1&&console.warn("You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported."),h&&o({type:2,button:h})}),m=U(i,t),v=ue(i),S=P(h=>{var w,O,M;if(f){if(a.popoverState===1)return;switch(h.key){case X.Space:case X.Enter:h.preventDefault(),(O=(w=h.target).click)==null||O.call(w),o({type:1}),(M=a.button)==null||M.focus();break}}else switch(h.key){case X.Space:case X.Enter:h.preventDefault(),h.stopPropagation(),a.popoverState===1&&(d==null||d(a.buttonId)),o({type:0});break;case X.Escape:if(a.popoverState!==0)return d==null?void 0:d(a.buttonId);if(!i.current||v!=null&&v.activeElement&&!i.current.contains(v.activeElement))return;h.preventDefault(),h.stopPropagation(),o({type:1});break}}),x=P(h=>{f||h.key===X.Space&&h.preventDefault()}),T=P(h=>{var w,O;Ye(h.currentTarget)||e.disabled||(f?(o({type:1}),(w=a.button)==null||w.focus()):(h.preventDefault(),h.stopPropagation(),a.popoverState===1&&(d==null||d(a.buttonId)),o({type:0}),(O=a.button)==null||O.focus()))}),R=P(h=>{h.preventDefault(),h.stopPropagation()}),A=a.popoverState===0,C=l.useMemo(()=>({open:A}),[A]),D=Et(e,i),$=f?{ref:m,type:D,onKeyDown:S,onClick:T}:{ref:g,id:a.buttonId,type:D,"aria-expanded":a.popoverState===0,"aria-controls":a.panel?a.panelId:void 0,onKeyDown:S,onKeyUp:x,onClick:T,onMouseDown:R},N=Qe(),F=P(()=>{let h=a.panel;if(!h)return;function w(){I(N.current,{[V.Forwards]:()=>J(h,K.First),[V.Backwards]:()=>J(h,K.Last)})===fe.Error&&J(se().filter(O=>O.dataset.headlessuiFocusGuard!=="true"),I(N.current,{[V.Forwards]:K.Next,[V.Backwards]:K.Previous}),{relativeTo:a.button})}w()});return E.createElement(E.Fragment,null,q({ourProps:$,theirProps:u,slot:C,defaultTag:Kt,name:"Popover.Button"}),A&&!f&&c&&E.createElement(ie,{id:p,features:oe.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:F}))}let Wt="div",zt=re.RenderStrategy|re.Static;function Yt(e,t){let n=ne(),{id:r=`headlessui-popover-overlay-${n}`,...u}=e,[{popoverState:a},o]=ge("Popover.Overlay"),c=U(t),i=he(),p=i!==null?(i&k.Open)===k.Open:a===0,s=P(f=>{if(Ye(f.currentTarget))return f.preventDefault();o({type:1})}),d=l.useMemo(()=>({open:a===0}),[a]);return q({ourProps:{ref:c,id:r,"aria-hidden":!0,onClick:s},theirProps:u,slot:d,defaultTag:Wt,features:zt,visible:p,name:"Popover.Overlay"})}let Qt="div",Xt=re.RenderStrategy|re.Static;function Jt(e,t){let n=ne(),{id:r=`headlessui-popover-panel-${n}`,focus:u=!1,...a}=e,[o,c]=ge("Popover.Panel"),{close:i,isPortalled:p}=ke("Popover.Panel"),s=`headlessui-focus-sentinel-before-${ne()}`,d=`headlessui-focus-sentinel-after-${ne()}`,f=l.useRef(null),b=U(f,t,$=>{c({type:4,panel:$})}),g=ue(f),m=yt();B(()=>(c({type:5,panelId:r}),()=>{c({type:5,panelId:null})}),[r,c]);let v=he(),S=v!==null?(v&k.Open)===k.Open:o.popoverState===0,x=P($=>{var N;switch($.key){case X.Escape:if(o.popoverState!==0||!f.current||g!=null&&g.activeElement&&!f.current.contains(g.activeElement))return;$.preventDefault(),$.stopPropagation(),c({type:1}),(N=o.button)==null||N.focus();break}});l.useEffect(()=>{var $;e.static||o.popoverState===1&&(($=e.unmount)==null||$)&&c({type:4,panel:null})},[o.popoverState,e.unmount,e.static,c]),l.useEffect(()=>{if(o.__demoMode||!u||o.popoverState!==0||!f.current)return;let $=g==null?void 0:g.activeElement;f.current.contains($)||J(f.current,K.First)},[o.__demoMode,u,f,o.popoverState]);let T=l.useMemo(()=>({open:o.popoverState===0,close:i}),[o,i]),R={ref:b,id:r,onKeyDown:x,onBlur:u&&o.popoverState===0?$=>{var N,F,h,w,O;let M=$.relatedTarget;M&&f.current&&((N=f.current)!=null&&N.contains(M)||(c({type:1}),((h=(F=o.beforePanelSentinel.current)==null?void 0:F.contains)!=null&&h.call(F,M)||(O=(w=o.afterPanelSentinel.current)==null?void 0:w.contains)!=null&&O.call(w,M))&&M.focus({preventScroll:!0})))}:void 0,tabIndex:-1},A=Qe(),C=P(()=>{let $=f.current;if(!$)return;function N(){I(A.current,{[V.Forwards]:()=>{var F;J($,K.First)===fe.Error&&((F=o.afterPanelSentinel.current)==null||F.focus())},[V.Backwards]:()=>{var F;(F=o.button)==null||F.focus({preventScroll:!0})}})}N()}),D=P(()=>{let $=f.current;if(!$)return;function N(){I(A.current,{[V.Forwards]:()=>{var F;if(!o.button)return;let h=se(),w=h.indexOf(o.button),O=h.slice(0,w+1),M=[...h.slice(w+1),...O];for(let z of M.slice())if(z.dataset.headlessuiFocusGuard==="true"||(F=o.panel)!=null&&F.contains(z)){let y=M.indexOf(z);y!==-1&&M.splice(y,1)}J(M,K.First,{sorted:!1})},[V.Backwards]:()=>{var F;J($,K.Previous)===fe.Error&&((F=o.button)==null||F.focus())}})}N()});return E.createElement(be.Provider,{value:r},S&&p&&E.createElement(ie,{id:s,ref:o.beforePanelSentinel,features:oe.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:C}),q({mergeRefs:m,ourProps:R,theirProps:a,slot:T,defaultTag:Qt,features:Xt,visible:S,name:"Popover.Panel"}),S&&p&&E.createElement(ie,{id:d,ref:o.afterPanelSentinel,features:oe.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:D}))}let Zt="div";function en(e,t){let n=l.useRef(null),r=U(n,t),[u,a]=l.useState([]),o=Dt(),c=P(m=>{a(v=>{let S=v.indexOf(m);if(S!==-1){let x=v.slice();return x.splice(S,1),x}return v})}),i=P(m=>(a(v=>[...v,m]),()=>c(m))),p=P(()=>{var m;let v=me(n);if(!v)return!1;let S=v.activeElement;return(m=n.current)!=null&&m.contains(S)?!0:u.some(x=>{var T,R;return((T=v.getElementById(x.buttonId.current))==null?void 0:T.contains(S))||((R=v.getElementById(x.panelId.current))==null?void 0:R.contains(S))})}),s=P(m=>{for(let v of u)v.buttonId.current!==m&&v.close()}),d=l.useMemo(()=>({registerPopover:i,unregisterPopover:c,isFocusWithinPopoverGroup:p,closeOthers:s,mainTreeNodeRef:o.mainTreeNodeRef}),[i,c,p,s,o.mainTreeNodeRef]),f=l.useMemo(()=>({}),[]),b=e,g={ref:r};return E.createElement(Ae.Provider,{value:d},q({ourProps:g,theirProps:b,slot:f,defaultTag:Zt,name:"Popover.Group"}),E.createElement(o.MainTreeNode,null))}let tn=_(Gt),nn=_(Vt),rn=_(Yt),on=_(Jt),ln=_(en),On=Object.assign(tn,{Button:nn,Overlay:rn,Panel:on,Group:ln});function un(e=0){let[t,n]=l.useState(e),r=Re(),u=l.useCallback(i=>{r.current&&n(p=>p|i)},[t,r]),a=l.useCallback(i=>!!(t&i),[t]),o=l.useCallback(i=>{r.current&&n(p=>p&~i)},[n,r]),c=l.useCallback(i=>{r.current&&n(p=>p^i)},[n]);return{flags:t,addFlag:u,hasFlag:a,removeFlag:o,toggleFlag:c}}function an(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Te(e,...t){e&&t.length>0&&e.classList.add(...t)}function $e(e,...t){e&&t.length>0&&e.classList.remove(...t)}function sn(e,t){let n=le();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:u}=getComputedStyle(e),[a,o]=[r,u].map(i=>{let[p=0]=i.split(",").filter(Boolean).map(s=>s.includes("ms")?parseFloat(s):parseFloat(s)*1e3).sort((s,d)=>d-s);return p}),c=a+o;if(c!==0){n.group(p=>{p.setTimeout(()=>{t(),p.dispose()},c),p.addEventListener(e,"transitionrun",s=>{s.target===s.currentTarget&&p.dispose()})});let i=n.addEventListener(e,"transitionend",p=>{p.target===p.currentTarget&&(t(),i())})}else t();return n.add(()=>t()),n.dispose}function cn(e,t,n,r){let u=n?"enter":"leave",a=le(),o=r!==void 0?an(r):()=>{};u==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let c=I(u,{enter:()=>t.enter,leave:()=>t.leave}),i=I(u,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),p=I(u,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return $e(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Te(e,...t.base,...c,...p),a.nextFrame(()=>{$e(e,...t.base,...c,...p),Te(e,...t.base,...c,...i),sn(e,()=>($e(e,...t.base,...c),Te(e,...t.base,...t.entered),o()))}),a.dispose}function dn({immediate:e,container:t,direction:n,classes:r,onStart:u,onStop:a}){let o=Re(),c=qe(),i=j(n);B(()=>{e&&(i.current="enter")},[e]),B(()=>{let p=le();c.add(p.dispose);let s=t.current;if(s&&i.current!=="idle"&&o.current)return p.dispose(),u.current(i.current),p.add(cn(s,r.current,i.current==="enter",()=>{p.dispose(),a.current(i.current)})),p.dispose},[n])}function Q(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let Ee=l.createContext(null);Ee.displayName="TransitionContext";var fn=(e=>(e.Visible="visible",e.Hidden="hidden",e))(fn||{});function pn(){let e=l.useContext(Ee);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function vn(){let e=l.useContext(ye);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let ye=l.createContext(null);ye.displayName="NestingContext";function Pe(e){return"children"in e?Pe(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function et(e,t){let n=j(e),r=l.useRef([]),u=Re(),a=qe(),o=P((b,g=Z.Hidden)=>{let m=r.current.findIndex(({el:v})=>v===b);m!==-1&&(I(g,{[Z.Unmount](){r.current.splice(m,1)},[Z.Hidden](){r.current[m].state="hidden"}}),a.microTask(()=>{var v;!Pe(r)&&u.current&&((v=n.current)==null||v.call(n))}))}),c=P(b=>{let g=r.current.find(({el:m})=>m===b);return g?g.state!=="visible"&&(g.state="visible"):r.current.push({el:b,state:"visible"}),()=>o(b,Z.Unmount)}),i=l.useRef([]),p=l.useRef(Promise.resolve()),s=l.useRef({enter:[],leave:[],idle:[]}),d=P((b,g,m)=>{i.current.splice(0),t&&(t.chains.current[g]=t.chains.current[g].filter(([v])=>v!==b)),t==null||t.chains.current[g].push([b,new Promise(v=>{i.current.push(v)})]),t==null||t.chains.current[g].push([b,new Promise(v=>{Promise.all(s.current[g].map(([S,x])=>x)).then(()=>v())})]),g==="enter"?p.current=p.current.then(()=>t==null?void 0:t.wait.current).then(()=>m(g)):m(g)}),f=P((b,g,m)=>{Promise.all(s.current[g].splice(0).map(([v,S])=>S)).then(()=>{var v;(v=i.current.shift())==null||v()}).then(()=>m(g))});return l.useMemo(()=>({children:r,register:c,unregister:o,onStart:d,onStop:f,wait:p,chains:s}),[c,o,r,d,f,s,p])}function mn(){}let hn=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function _e(e){var t;let n={};for(let r of hn)n[r]=(t=e[r])!=null?t:mn;return n}function gn(e){let t=l.useRef(_e(e));return l.useEffect(()=>{t.current=_e(e)},[e]),t}let bn="div",tt=re.RenderStrategy;function En(e,t){var n,r;let{beforeEnter:u,afterEnter:a,beforeLeave:o,afterLeave:c,enter:i,enterFrom:p,enterTo:s,entered:d,leave:f,leaveFrom:b,leaveTo:g,...m}=e,v=l.useRef(null),S=U(v,t),x=(n=m.unmount)==null||n?Z.Unmount:Z.Hidden,{show:T,appear:R,initial:A}=pn(),[C,D]=l.useState(T?"visible":"hidden"),$=vn(),{register:N,unregister:F}=$;l.useEffect(()=>N(v),[N,v]),l.useEffect(()=>{if(x===Z.Hidden&&v.current){if(T&&C!=="visible"){D("visible");return}return I(C,{hidden:()=>F(v),visible:()=>N(v)})}},[C,v,N,F,T,x]);let h=j({base:Q(m.className),enter:Q(i),enterFrom:Q(p),enterTo:Q(s),entered:Q(d),leave:Q(f),leaveFrom:Q(b),leaveTo:Q(g)}),w=gn({beforeEnter:u,afterEnter:a,beforeLeave:o,afterLeave:c}),O=ve();l.useEffect(()=>{if(O&&C==="visible"&&v.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[v,C,O]);let M=A&&!R,z=R&&T&&A,y=!O||M?"idle":T?"enter":"leave",L=un(0),te=P(Y=>I(Y,{enter:()=>{L.addFlag(k.Opening),w.current.beforeEnter()},leave:()=>{L.addFlag(k.Closing),w.current.beforeLeave()},idle:()=>{}})),ee=P(Y=>I(Y,{enter:()=>{L.removeFlag(k.Opening),w.current.afterEnter()},leave:()=>{L.removeFlag(k.Closing),w.current.afterLeave()},idle:()=>{}})),G=et(()=>{D("hidden"),F(v)},$),ae=l.useRef(!1);dn({immediate:z,container:v,classes:h,direction:y,onStart:j(Y=>{ae.current=!0,G.onStart(v,Y,te)}),onStop:j(Y=>{ae.current=!1,G.onStop(v,Y,ee),Y==="leave"&&!Pe(G)&&(D("hidden"),F(v))})});let H=m,rt={ref:S};return z?H={...H,className:pe(m.className,...h.current.enter,...h.current.enterFrom)}:ae.current&&(H.className=pe(m.className,(r=v.current)==null?void 0:r.className),H.className===""&&delete H.className),E.createElement(ye.Provider,{value:G},E.createElement(ze,{value:I(C,{visible:k.Open,hidden:k.Closed})|L.flags},q({ourProps:rt,theirProps:H,defaultTag:bn,features:tt,visible:C==="visible",name:"Transition.Child"})))}function yn(e,t){let{show:n,appear:r=!1,unmount:u=!0,...a}=e,o=l.useRef(null),c=U(o,t);ve();let i=he();if(n===void 0&&i!==null&&(n=(i&k.Open)===k.Open),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[p,s]=l.useState(n?"visible":"hidden"),d=et(()=>{s("hidden")}),[f,b]=l.useState(!0),g=l.useRef([n]);B(()=>{f!==!1&&g.current[g.current.length-1]!==n&&(g.current.push(n),b(!1))},[g,n]);let m=l.useMemo(()=>({show:n,appear:r,initial:f}),[n,r,f]);l.useEffect(()=>{if(n)s("visible");else if(!Pe(d))s("hidden");else{let T=o.current;if(!T)return;let R=T.getBoundingClientRect();R.x===0&&R.y===0&&R.width===0&&R.height===0&&s("hidden")}},[n,d]);let v={unmount:u},S=P(()=>{var T;f&&b(!1),(T=e.beforeEnter)==null||T.call(e)}),x=P(()=>{var T;f&&b(!1),(T=e.beforeLeave)==null||T.call(e)});return E.createElement(ye.Provider,{value:d},E.createElement(Ee.Provider,{value:m},q({ourProps:{...v,as:l.Fragment,children:E.createElement(nt,{ref:c,...v,...a,beforeEnter:S,beforeLeave:x})},theirProps:{},defaultTag:l.Fragment,features:tt,visible:p==="visible",name:"Transition"})))}function Pn(e,t){let n=l.useContext(Ee)!==null,r=he()!==null;return E.createElement(E.Fragment,null,!n&&r?E.createElement(Ne,{ref:t,...e}):E.createElement(nt,{ref:t,...e}))}let Ne=_(yn),nt=_(En),Sn=_(Pn),In=Object.assign(Ne,{Child:Sn,Root:Ne});export{Ye as A,On as B,q as C,In as D,$t as E,Be as F,me as G,ze as H,ne as I,Oe as J,Ce as K,Fn as L,K as M,fe as N,J as O,vt as P,un as Q,j as R,Ve as S,Et as T,_ as U,yt as V,xn as _,Qe as a,ie as b,oe as c,Ft as d,dt as e,Re as f,mt as g,le as h,B as i,he as j,k,ve as l,Mt as m,ue as n,P as o,qe as p,At as q,bt as r,V as s,Ue as t,I as u,Nn as v,Cn as w,re as x,U as y,X as z};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|