sqlmesh 0.181.2.dev25__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.dev25.dist-info → sqlmesh-0.181.2.dev26.dist-info}/METADATA +1 -1
- {sqlmesh-0.181.2.dev25.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-Clb0EegJ.js → ChevronDownIcon-BCSgClK9.js} +1 -1
- web/client/dist/assets/{ChevronRightIcon-dJMaxBt0.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-DOMFDv-k.js → DataCatalog-HXtPC12m.js} +1 -1
- web/client/dist/assets/{Editor-BcrLy189.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-CrjZJkj4.js → Footer-CpMoFxgd.js} +1 -1
- web/client/dist/assets/{Header-DE3bKMcG.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-KC6UG65M.js → Page-DrM7FMiZ.js} +1 -1
- web/client/dist/assets/{Plan-xbMFAnVh.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-BShQn9jm.js → SearchList-CJR2axiJ.js} +1 -1
- web/client/dist/assets/SelectEnvironment-BhhJ4ZjZ.js +2 -0
- web/client/dist/assets/{SourceList-DQ72TcK1.js → SourceList-CXyYEJjr.js} +1 -1
- web/client/dist/assets/{SourceListItem-CncMnWed.js → SourceListItem-DVQwSGMy.js} +1 -1
- web/client/dist/assets/{SplitPane-BY85POxQ.js → SplitPane-B5WJSZPo.js} +1 -1
- web/client/dist/assets/Tests-BjGO6Jnt.js +1 -0
- web/client/dist/assets/{Welcome-Blok6Zy8.js → Welcome-DMIPcEFX.js} +1 -1
- web/client/dist/assets/{context-Dx2o1ZRq.js → context-DeHggMKx.js} +1 -1
- web/client/dist/assets/context-Dwh4I8fp.js +1 -0
- web/client/dist/assets/{editor-Dj_6cws7.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-Bolb6haG.js → help-BzkjAMMJ.js} +1 -1
- web/client/dist/assets/{index-DQbKL5-Q.js → index-BObtdpsN.js} +1 -1
- web/client/dist/assets/{index-CkIQhGgw.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-XFpF0AcJ.js → project-BX-rNI7d.js} +1 -1
- web/client/dist/index.html +1 -1
- web/client/dist/assets/Audits-9LEBiRIZ.js +0 -1
- web/client/dist/assets/Banner-Cd1C5Udq.js +0 -1
- web/client/dist/assets/Content-BR4S-QHM.js +0 -1
- web/client/dist/assets/Content-poZFtj-2.js +0 -10
- web/client/dist/assets/Data-DaQiUe8h.js +0 -1
- web/client/dist/assets/Editor-BmDyTaeT.js +0 -1
- web/client/dist/assets/Errors-Cjh1BMUt.js +0 -1
- web/client/dist/assets/FileExplorer-Cdh0DRgS.js +0 -2
- web/client/dist/assets/Input-BY5Rc3go.js +0 -41
- web/client/dist/assets/Lineage-CLoHrLAT.js +0 -1
- web/client/dist/assets/ListboxShow-TFvq9fMB.js +0 -1
- web/client/dist/assets/ModelLineage-CB8Rie_r.js +0 -1
- web/client/dist/assets/Models-DXUrmUm_.js +0 -1
- web/client/dist/assets/PlusCircleIcon-CoFMRFQI.js +0 -1
- web/client/dist/assets/ReportErrors-mVM8O5iE.js +0 -1
- web/client/dist/assets/Root-BuQJ2VAg.js +0 -1
- web/client/dist/assets/SelectEnvironment-8p6ZQ-QH.js +0 -2
- web/client/dist/assets/Tests-DeaITzzp.js +0 -1
- web/client/dist/assets/context-B3nwRpP1.js +0 -1
- web/client/dist/assets/file-Bs2Eq56_.js +0 -1
- web/client/dist/assets/index-COQuzlwN.js +0 -1
- web/client/dist/assets/plan-BZyi7OFv.js +0 -1
- web/client/dist/assets/transition-B5aHgz_j.js +0 -4
- {sqlmesh-0.181.2.dev25.dist-info → sqlmesh-0.181.2.dev26.dist-info}/WHEEL +0 -0
- {sqlmesh-0.181.2.dev25.dist-info → sqlmesh-0.181.2.dev26.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.181.2.dev25.dist-info → sqlmesh-0.181.2.dev26.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.181.2.dev25.dist-info → sqlmesh-0.181.2.dev26.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import{r as o,R as J,j as f,b as Cn,c as re,at as yt,au as ne,av as St,aw as En,l as Y,i as rt}from"./index-EyUZDtV7.js";import{r as qe,u as Pn,o as Rn,s as In,f as Tn,a as Nn,b as An,h as On,l as Mn,c as _n,R as Ln}from"./floating-ui.react-dom-dR28niet.js";function Dn({title:e,titleId:t,...n},r){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:r,"aria-labelledby":t},n),e?o.createElement("title",{id:t},e):null,o.createElement("path",{fillRule:"evenodd",d:"M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z",clipRule:"evenodd"}))}const jn=o.forwardRef(Dn);function kn({title:e,titleId:t,...n},r){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:r,"aria-labelledby":t},n),e?o.createElement("title",{id:t},e):null,o.createElement("path",{fillRule:"evenodd",d:"M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",clipRule:"evenodd"}))}const Bn=o.forwardRef(kn);function Fn({title:e,titleId:t,...n},r){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:r,"aria-labelledby":t},n),e?o.createElement("title",{id:t},e):null,o.createElement("path",{fillRule:"evenodd",d:"M11.47 4.72a.75.75 0 0 1 1.06 0l3.75 3.75a.75.75 0 0 1-1.06 1.06L12 6.31 8.78 9.53a.75.75 0 0 1-1.06-1.06l3.75-3.75Zm-3.75 9.75a.75.75 0 0 1 1.06 0L12 17.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-3.75 3.75a.75.75 0 0 1-1.06 0l-3.75-3.75a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const Wn=o.forwardRef(Fn);function Vn({title:e,titleId:t,...n},r){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:r,"aria-labelledby":t},n),e?o.createElement("title",{id:t},e):null,o.createElement("path",{fillRule:"evenodd",d:"M11.47 7.72a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 1 1-1.06 1.06L12 9.31l-6.97 6.97a.75.75 0 0 1-1.06-1.06l7.5-7.5Z",clipRule:"evenodd"}))}const Hn=o.forwardRef(Vn),Un=J.forwardRef(function({type:t="text",value:n,placeholder:r,className:a,disabled:i=!1,autoFocus:c=!1,onInput:s,onKeyDown:u},d){return n=n??"",f.jsx("input",{ref:d,className:re("placeholder:text-neutral-300 dark:placeholder:text-neutral-700",i&&"opacity-50 cursor-not-allowed",a),type:t,value:n,placeholder:r,disabled:i,autoFocus:c,readOnly:Cn(!!s),onInput:s,onKeyDown:u})});function ot(e,[t,n]){return Math.min(n,Math.max(t,e))}function _(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function Qe(e,t=[]){let n=[];function r(i,c){const s=o.createContext(c),u=n.length;n=[...n,c];const d=h=>{var y;const{scope:g,children:S,...x}=h,l=((y=g==null?void 0:g[e])==null?void 0:y[u])||s,v=o.useMemo(()=>x,Object.values(x));return f.jsx(l.Provider,{value:v,children:S})};d.displayName=i+"Provider";function p(h,g){var l;const S=((l=g==null?void 0:g[e])==null?void 0:l[u])||s,x=o.useContext(S);if(x)return x;if(c!==void 0)return c;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[d,p]}const a=()=>{const i=n.map(c=>o.createContext(c));return function(s){const u=(s==null?void 0:s[e])||i;return o.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return a.scopeName=e,[r,$n(a,...t)]}function $n(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const c=r.reduce((s,{useScope:u,scopeName:d})=>{const h=u(i)[`__scope${d}`];return{...s,...h}},{});return o.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function at(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Kn(...e){return t=>{let n=!1;const r=e.map(a=>{const i=at(a,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let a=0;a<r.length;a++){const i=r[a];typeof i=="function"?i():at(e[a],null)}}}}function L(...e){return o.useCallback(Kn(...e),e)}function Ae(e){const t=Yn(e),n=o.forwardRef((r,a)=>{const{children:i,...c}=r,s=o.Children.toArray(i),u=s.find(Xn);if(u){const d=u.props.children,p=s.map(h=>h===u?o.Children.count(d)>1?o.Children.only(null):o.isValidElement(d)?d.props.children:null:h);return f.jsx(t,{...c,ref:a,children:o.isValidElement(d)?o.cloneElement(d,void 0,p):null})}return f.jsx(t,{...c,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}function Yn(e){const t=o.forwardRef((n,r)=>{const{children:a,...i}=n,c=o.isValidElement(a)?Gn(a):void 0,s=L(c,r);if(o.isValidElement(a)){const u=Zn(i,a.props);return a.type!==o.Fragment&&(u.ref=s),o.cloneElement(a,u)}return o.Children.count(a)>1?o.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var zn=Symbol("radix.slottable");function Xn(e){return o.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===zn}function Zn(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...s)=>{const u=i(...s);return a(...s),u}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function Gn(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function qn(e){const t=e+"CollectionProvider",[n,r]=Qe(t),[a,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=l=>{const{scope:v,children:y}=l,m=J.useRef(null),w=J.useRef(new Map).current;return f.jsx(a,{scope:v,itemMap:w,collectionRef:m,children:y})};c.displayName=t;const s=e+"CollectionSlot",u=Ae(s),d=J.forwardRef((l,v)=>{const{scope:y,children:m}=l,w=i(s,y),b=L(v,w.collectionRef);return f.jsx(u,{ref:b,children:m})});d.displayName=s;const p=e+"CollectionItemSlot",h="data-radix-collection-item",g=Ae(p),S=J.forwardRef((l,v)=>{const{scope:y,children:m,...w}=l,b=J.useRef(null),P=L(v,b),T=i(p,y);return J.useEffect(()=>(T.itemMap.set(b,{ref:b,...w}),()=>void T.itemMap.delete(b))),f.jsx(g,{[h]:"",ref:P,children:m})});S.displayName=p;function x(l){const v=i(e+"CollectionConsumer",l);return J.useCallback(()=>{const m=v.collectionRef.current;if(!m)return[];const w=Array.from(m.querySelectorAll(`[${h}]`));return Array.from(v.itemMap.values()).sort((T,E)=>w.indexOf(T.ref.current)-w.indexOf(E.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:c,Slot:d,ItemSlot:S},x,r]}var Qn=o.createContext(void 0);function Jn(e){const t=o.useContext(Qn);return e||t||"ltr"}var er=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],M=er.reduce((e,t)=>{const n=Ae(`Primitive.${t}`),r=o.forwardRef((a,i)=>{const{asChild:c,...s}=a,u=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(u,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function tr(e,t){e&&qe.flushSync(()=>e.dispatchEvent(t))}function ie(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function nr(e,t=globalThis==null?void 0:globalThis.document){const n=ie(e);o.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var rr="DismissableLayer",$e="dismissableLayer.update",or="dismissableLayer.pointerDownOutside",ar="dismissableLayer.focusOutside",st,xt=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),bt=o.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:c,onDismiss:s,...u}=e,d=o.useContext(xt),[p,h]=o.useState(null),g=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,S]=o.useState({}),x=L(t,E=>h(E)),l=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=l.indexOf(v),m=p?l.indexOf(p):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,b=m>=y,P=cr(E=>{const O=E.target,D=[...d.branches].some(V=>V.contains(O));!b||D||(a==null||a(E),c==null||c(E),E.defaultPrevented||s==null||s())},g),T=lr(E=>{const O=E.target;[...d.branches].some(V=>V.contains(O))||(i==null||i(E),c==null||c(E),E.defaultPrevented||s==null||s())},g);return nr(E=>{m===d.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&s&&(E.preventDefault(),s()))},g),o.useEffect(()=>{if(p)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(st=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),it(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=st)}},[p,g,n,d]),o.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),it())},[p,d]),o.useEffect(()=>{const E=()=>S({});return document.addEventListener($e,E),()=>document.removeEventListener($e,E)},[]),f.jsx(M.div,{...u,ref:x,style:{pointerEvents:w?b?"auto":"none":void 0,...e.style},onFocusCapture:_(e.onFocusCapture,T.onFocusCapture),onBlurCapture:_(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:_(e.onPointerDownCapture,P.onPointerDownCapture)})});bt.displayName=rr;var sr="DismissableLayerBranch",ir=o.forwardRef((e,t)=>{const n=o.useContext(xt),r=o.useRef(null),a=L(t,r);return o.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),f.jsx(M.div,{...e,ref:a})});ir.displayName=sr;function cr(e,t=globalThis==null?void 0:globalThis.document){const n=ie(e),r=o.useRef(!1),a=o.useRef(()=>{});return o.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let u=function(){Ct(or,n,d,{discrete:!0})};const d={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=u,t.addEventListener("click",a.current,{once:!0})):u()}else t.removeEventListener("click",a.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function lr(e,t=globalThis==null?void 0:globalThis.document){const n=ie(e),r=o.useRef(!1);return o.useEffect(()=>{const a=i=>{i.target&&!r.current&&Ct(ar,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function it(){const e=new CustomEvent($e);document.dispatchEvent(e)}function Ct(e,t,n,{discrete:r}){const a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?tr(a,i):a.dispatchEvent(i)}var ke=0;function ur(){o.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ct()),document.body.insertAdjacentElement("beforeend",e[1]??ct()),ke++,()=>{ke===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ke--}},[])}function ct(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Be="focusScope.autoFocusOnMount",Fe="focusScope.autoFocusOnUnmount",lt={bubbles:!1,cancelable:!0},dr="FocusScope",Et=o.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...c}=e,[s,u]=o.useState(null),d=ie(a),p=ie(i),h=o.useRef(null),g=L(t,l=>u(l)),S=o.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;o.useEffect(()=>{if(r){let l=function(w){if(S.paused||!s)return;const b=w.target;s.contains(b)?h.current=b:te(h.current,{select:!0})},v=function(w){if(S.paused||!s)return;const b=w.relatedTarget;b!==null&&(s.contains(b)||te(h.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const P of w)P.removedNodes.length>0&&te(s)};document.addEventListener("focusin",l),document.addEventListener("focusout",v);const m=new MutationObserver(y);return s&&m.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",l),document.removeEventListener("focusout",v),m.disconnect()}}},[r,s,S.paused]),o.useEffect(()=>{if(s){dt.add(S);const l=document.activeElement;if(!s.contains(l)){const y=new CustomEvent(Be,lt);s.addEventListener(Be,d),s.dispatchEvent(y),y.defaultPrevented||(fr(gr(Pt(s)),{select:!0}),document.activeElement===l&&te(s))}return()=>{s.removeEventListener(Be,d),setTimeout(()=>{const y=new CustomEvent(Fe,lt);s.addEventListener(Fe,p),s.dispatchEvent(y),y.defaultPrevented||te(l??document.body,{select:!0}),s.removeEventListener(Fe,p),dt.remove(S)},0)}}},[s,d,p,S]);const x=o.useCallback(l=>{if(!n&&!r||S.paused)return;const v=l.key==="Tab"&&!l.altKey&&!l.ctrlKey&&!l.metaKey,y=document.activeElement;if(v&&y){const m=l.currentTarget,[w,b]=pr(m);w&&b?!l.shiftKey&&y===b?(l.preventDefault(),n&&te(w,{select:!0})):l.shiftKey&&y===w&&(l.preventDefault(),n&&te(b,{select:!0})):y===m&&l.preventDefault()}},[n,r,S.paused]);return f.jsx(M.div,{tabIndex:-1,...c,ref:g,onKeyDown:x})});Et.displayName=dr;function fr(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(te(r,{select:t}),document.activeElement!==n)return}function pr(e){const t=Pt(e),n=ut(t,e),r=ut(t.reverse(),e);return[n,r]}function Pt(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ut(e,t){for(const n of e)if(!vr(n,{upTo:t}))return n}function vr(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function hr(e){return e instanceof HTMLInputElement&&"select"in e}function te(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&hr(e)&&t&&e.select()}}var dt=mr();function mr(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ft(e,t),e.unshift(t)},remove(t){var n;e=ft(e,t),(n=e[0])==null||n.resume()}}}function ft(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function gr(e){return e.filter(t=>t.tagName!=="A")}var W=globalThis!=null&&globalThis.document?o.useLayoutEffect:()=>{},wr=yt[" useId ".trim().toString()]||(()=>{}),yr=0;function Je(e){const[t,n]=o.useState(wr());return W(()=>{n(r=>r??String(yr++))},[e]),t?`radix-${t}`:""}var Sr="Arrow",Rt=o.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...i}=e;return f.jsx(M.svg,{...i,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});Rt.displayName=Sr;var xr=Rt;function br(e){const[t,n]=o.useState(void 0);return W(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const i=a[0];let c,s;if("borderBoxSize"in i){const u=i.borderBoxSize,d=Array.isArray(u)?u[0]:u;c=d.inlineSize,s=d.blockSize}else c=e.offsetWidth,s=e.offsetHeight;n({width:c,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var et="Popper",[It,Tt]=Qe(et),[Cr,Nt]=It(et),At=e=>{const{__scopePopper:t,children:n}=e,[r,a]=o.useState(null);return f.jsx(Cr,{scope:t,anchor:r,onAnchorChange:a,children:n})};At.displayName=et;var Ot="PopperAnchor",Mt=o.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,i=Nt(Ot,n),c=o.useRef(null),s=L(t,c);return o.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||c.current)}),r?null:f.jsx(M.div,{...a,ref:s})});Mt.displayName=Ot;var tt="PopperContent",[Er,Pr]=It(tt),_t=o.forwardRef((e,t)=>{var C,A,B,N,R,I;const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:i="center",alignOffset:c=0,arrowPadding:s=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:p=0,sticky:h="partial",hideWhenDetached:g=!1,updatePositionStrategy:S="optimized",onPlaced:x,...l}=e,v=Nt(tt,n),[y,m]=o.useState(null),w=L(t,U=>m(U)),[b,P]=o.useState(null),T=br(b),E=(T==null?void 0:T.width)??0,O=(T==null?void 0:T.height)??0,D=r+(i!=="center"?"-"+i:""),V=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},$=Array.isArray(d)?d:[d],z=$.length>0,H={padding:V,boundary:$.filter(Ir),altBoundary:z},{refs:X,floatingStyles:K,placement:j,isPositioned:F,middlewareData:k}=Pn({strategy:"fixed",placement:D,whileElementsMounted:(...U)=>_n(...U,{animationFrame:S==="always"}),elements:{reference:v.anchor},middleware:[Rn({mainAxis:a+O,alignmentAxis:c}),u&&In({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?Mn():void 0,...H}),u&&Tn({...H}),Nn({...H,apply:({elements:U,rects:q,availableWidth:ye,availableHeight:Se})=>{const{width:xe,height:bn}=q.reference,Ce=U.floating.style;Ce.setProperty("--radix-popper-available-width",`${ye}px`),Ce.setProperty("--radix-popper-available-height",`${Se}px`),Ce.setProperty("--radix-popper-anchor-width",`${xe}px`),Ce.setProperty("--radix-popper-anchor-height",`${bn}px`)}}),b&&An({element:b,padding:s}),Tr({arrowWidth:E,arrowHeight:O}),g&&On({strategy:"referenceHidden",...H})]}),[Z,me]=jt(j),Q=ie(x);W(()=>{F&&(Q==null||Q())},[F,Q]);const ge=(C=k.arrow)==null?void 0:C.x,we=(A=k.arrow)==null?void 0:A.y,ee=((B=k.arrow)==null?void 0:B.centerOffset)!==0,[ue,se]=o.useState();return W(()=>{y&&se(window.getComputedStyle(y).zIndex)},[y]),f.jsx("div",{ref:X.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:F?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ue,"--radix-popper-transform-origin":[(N=k.transformOrigin)==null?void 0:N.x,(R=k.transformOrigin)==null?void 0:R.y].join(" "),...((I=k.hide)==null?void 0:I.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(Er,{scope:n,placedSide:Z,onArrowChange:P,arrowX:ge,arrowY:we,shouldHideArrow:ee,children:f.jsx(M.div,{"data-side":Z,"data-align":me,...l,ref:w,style:{...l.style,animation:F?void 0:"none"}})})})});_t.displayName=tt;var Lt="PopperArrow",Rr={top:"bottom",right:"left",bottom:"top",left:"right"},Dt=o.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,i=Pr(Lt,r),c=Rr[i.placedSide];return f.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:f.jsx(xr,{...a,ref:n,style:{...a.style,display:"block"}})})});Dt.displayName=Lt;function Ir(e){return e!==null}var Tr=e=>({name:"transformOrigin",options:e,fn(t){var v,y,m;const{placement:n,rects:r,middlewareData:a}=t,c=((v=a.arrow)==null?void 0:v.centerOffset)!==0,s=c?0:e.arrowWidth,u=c?0:e.arrowHeight,[d,p]=jt(n),h={start:"0%",center:"50%",end:"100%"}[p],g=(((y=a.arrow)==null?void 0:y.x)??0)+s/2,S=(((m=a.arrow)==null?void 0:m.y)??0)+u/2;let x="",l="";return d==="bottom"?(x=c?h:`${g}px`,l=`${-u}px`):d==="top"?(x=c?h:`${g}px`,l=`${r.floating.height+u}px`):d==="right"?(x=`${-u}px`,l=c?h:`${S}px`):d==="left"&&(x=`${r.floating.width+u}px`,l=c?h:`${S}px`),{data:{x,y:l}}}});function jt(e){const[t,n="center"]=e.split("-");return[t,n]}var Nr=At,Ar=Mt,Or=_t,Mr=Dt,_r="Portal",kt=o.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[a,i]=o.useState(!1);W(()=>i(!0),[]);const c=n||a&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return c?Ln.createPortal(f.jsx(M.div,{...r,ref:t}),c):null});kt.displayName=_r;var Lr=yt[" useInsertionEffect ".trim().toString()]||W;function pt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,i,c]=Dr({defaultProp:t,onChange:n}),s=e!==void 0,u=s?e:a;{const p=o.useRef(e!==void 0);o.useEffect(()=>{const h=p.current;h!==s&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=s},[s,r])}const d=o.useCallback(p=>{var h;if(s){const g=jr(p)?p(e):p;g!==e&&((h=c.current)==null||h.call(c,g))}else i(p)},[s,e,i,c]);return[u,d]}function Dr({defaultProp:e,onChange:t}){const[n,r]=o.useState(e),a=o.useRef(n),i=o.useRef(t);return Lr(()=>{i.current=t},[t]),o.useEffect(()=>{var c;a.current!==n&&((c=i.current)==null||c.call(i,n),a.current=n)},[n,a]),[n,r,i]}function jr(e){return typeof e=="function"}function kr(e){const t=o.useRef({value:e,previous:e});return o.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Bt=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Br="VisuallyHidden",Fr=o.forwardRef((e,t)=>f.jsx(M.span,{...e,ref:t,style:{...Bt,...e.style}}));Fr.displayName=Br;var Wr=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},de=new WeakMap,Ee=new WeakMap,Pe={},We=0,Ft=function(e){return e&&(e.host||Ft(e.parentNode))},Vr=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Ft(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Hr=function(e,t,n,r){var a=Vr(t,Array.isArray(e)?e:[e]);Pe[n]||(Pe[n]=new WeakMap);var i=Pe[n],c=[],s=new Set,u=new Set(a),d=function(h){!h||s.has(h)||(s.add(h),d(h.parentNode))};a.forEach(d);var p=function(h){!h||u.has(h)||Array.prototype.forEach.call(h.children,function(g){if(s.has(g))p(g);else try{var S=g.getAttribute(r),x=S!==null&&S!=="false",l=(de.get(g)||0)+1,v=(i.get(g)||0)+1;de.set(g,l),i.set(g,v),c.push(g),l===1&&x&&Ee.set(g,!0),v===1&&g.setAttribute(n,"true"),x||g.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",g,y)}})};return p(t),s.clear(),We++,function(){c.forEach(function(h){var g=de.get(h)-1,S=i.get(h)-1;de.set(h,g),i.set(h,S),g||(Ee.has(h)||h.removeAttribute(r),Ee.delete(h)),S||h.removeAttribute(n)}),We--,We||(de=new WeakMap,de=new WeakMap,Ee=new WeakMap,Pe={})}},Ur=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=Wr(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live]"))),Hr(r,a,n,"aria-hidden")):function(){return null}},Te="right-scroll-bar-position",Ne="width-before-scroll-bar",$r="with-scroll-bars-hidden",Kr="--removed-body-scroll-bar-size";function Ve(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Yr(e,t){var n=o.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var zr=typeof window<"u"?o.useLayoutEffect:o.useEffect,vt=new WeakMap;function Xr(e,t){var n=Yr(null,function(r){return e.forEach(function(a){return Ve(a,r)})});return zr(function(){var r=vt.get(n);if(r){var a=new Set(r),i=new Set(e),c=n.current;a.forEach(function(s){i.has(s)||Ve(s,null)}),i.forEach(function(s){a.has(s)||Ve(s,c)})}vt.set(n,e)},[e]),n}function Zr(e){return e}function Gr(e,t){t===void 0&&(t=Zr);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var c=t(i,r);return n.push(c),function(){n=n.filter(function(s){return s!==c})}},assignSyncMedium:function(i){for(r=!0;n.length;){var c=n;n=[],c.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var c=[];if(n.length){var s=n;n=[],s.forEach(i),c=n}var u=function(){var p=c;c=[],p.forEach(i)},d=function(){return Promise.resolve().then(u)};d(),n={push:function(p){c.push(p),d()},filter:function(p){return c=c.filter(p),n}}}};return a}function qr(e){e===void 0&&(e={});var t=Gr(null);return t.options=ne({async:!0,ssr:!1},e),t}var Wt=function(e){var t=e.sideCar,n=St(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return o.createElement(r,ne({},n))};Wt.isSideCarExport=!0;function Qr(e,t){return e.useMedium(t),Wt}var Vt=qr(),He=function(){},Me=o.forwardRef(function(e,t){var n=o.useRef(null),r=o.useState({onScrollCapture:He,onWheelCapture:He,onTouchMoveCapture:He}),a=r[0],i=r[1],c=e.forwardProps,s=e.children,u=e.className,d=e.removeScrollBar,p=e.enabled,h=e.shards,g=e.sideCar,S=e.noIsolation,x=e.inert,l=e.allowPinchZoom,v=e.as,y=v===void 0?"div":v,m=e.gapMode,w=St(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),b=g,P=Xr([n,t]),T=ne(ne({},w),a);return o.createElement(o.Fragment,null,p&&o.createElement(b,{sideCar:Vt,removeScrollBar:d,shards:h,noIsolation:S,inert:x,setCallbacks:i,allowPinchZoom:!!l,lockRef:n,gapMode:m}),c?o.cloneElement(o.Children.only(s),ne(ne({},T),{ref:P})):o.createElement(y,ne({},T,{className:u,ref:P}),s))});Me.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Me.classNames={fullWidth:Ne,zeroRight:Te};var Jr=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function eo(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Jr();return t&&e.setAttribute("nonce",t),e}function to(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function no(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ro=function(){var e=0,t=null;return{add:function(n){e==0&&(t=eo())&&(to(t,n),no(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},oo=function(){var e=ro();return function(t,n){o.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ht=function(){var e=oo(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},ao={left:0,top:0,right:0,gap:0},Ue=function(e){return parseInt(e||"",10)||0},so=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Ue(n),Ue(r),Ue(a)]},io=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ao;var t=so(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},co=Ht(),ve="data-scroll-locked",lo=function(e,t,n,r){var a=e.left,i=e.top,c=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat($r,` {
|
|
3
|
+
overflow: hidden `).concat(r,`;
|
|
4
|
+
padding-right: `).concat(s,"px ").concat(r,`;
|
|
5
|
+
}
|
|
6
|
+
body[`).concat(ve,`] {
|
|
7
|
+
overflow: hidden `).concat(r,`;
|
|
8
|
+
overscroll-behavior: contain;
|
|
9
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
10
|
+
padding-left: `.concat(a,`px;
|
|
11
|
+
padding-top: `).concat(i,`px;
|
|
12
|
+
padding-right: `).concat(c,`px;
|
|
13
|
+
margin-left:0;
|
|
14
|
+
margin-top:0;
|
|
15
|
+
margin-right: `).concat(s,"px ").concat(r,`;
|
|
16
|
+
`),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.`).concat(Te,` {
|
|
20
|
+
right: `).concat(s,"px ").concat(r,`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.`).concat(Ne,` {
|
|
24
|
+
margin-right: `).concat(s,"px ").concat(r,`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.`).concat(Te," .").concat(Te,` {
|
|
28
|
+
right: 0 `).concat(r,`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.`).concat(Ne," .").concat(Ne,` {
|
|
32
|
+
margin-right: 0 `).concat(r,`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body[`).concat(ve,`] {
|
|
36
|
+
`).concat(Kr,": ").concat(s,`px;
|
|
37
|
+
}
|
|
38
|
+
`)},ht=function(){var e=parseInt(document.body.getAttribute(ve)||"0",10);return isFinite(e)?e:0},uo=function(){o.useEffect(function(){return document.body.setAttribute(ve,(ht()+1).toString()),function(){var e=ht()-1;e<=0?document.body.removeAttribute(ve):document.body.setAttribute(ve,e.toString())}},[])},fo=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;uo();var i=o.useMemo(function(){return io(a)},[a]);return o.createElement(co,{styles:lo(i,!t,a,n?"":"!important")})},Ke=!1;if(typeof window<"u")try{var Re=Object.defineProperty({},"passive",{get:function(){return Ke=!0,!0}});window.addEventListener("test",Re,Re),window.removeEventListener("test",Re,Re)}catch{Ke=!1}var fe=Ke?{passive:!1}:!1,po=function(e){return e.tagName==="TEXTAREA"},Ut=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!po(e)&&n[t]==="visible")},vo=function(e){return Ut(e,"overflowY")},ho=function(e){return Ut(e,"overflowX")},mt=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=$t(e,r);if(a){var i=Kt(e,r),c=i[1],s=i[2];if(c>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},mo=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},go=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},$t=function(e,t){return e==="v"?vo(t):ho(t)},Kt=function(e,t){return e==="v"?mo(t):go(t)},wo=function(e,t){return e==="h"&&t==="rtl"?-1:1},yo=function(e,t,n,r,a){var i=wo(e,window.getComputedStyle(t).direction),c=i*r,s=n.target,u=t.contains(s),d=!1,p=c>0,h=0,g=0;do{var S=Kt(e,s),x=S[0],l=S[1],v=S[2],y=l-v-i*x;(x||y)&&$t(e,s)&&(h+=y,g+=x),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(p&&Math.abs(h)<1||!p&&Math.abs(g)<1)&&(d=!0),d},Ie=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},gt=function(e){return[e.deltaX,e.deltaY]},wt=function(e){return e&&"current"in e?e.current:e},So=function(e,t){return e[0]===t[0]&&e[1]===t[1]},xo=function(e){return`
|
|
39
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
+
`)},bo=0,pe=[];function Co(e){var t=o.useRef([]),n=o.useRef([0,0]),r=o.useRef(),a=o.useState(bo++)[0],i=o.useState(Ht)[0],c=o.useRef(e);o.useEffect(function(){c.current=e},[e]),o.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var l=En([e.lockRef.current],(e.shards||[]).map(wt),!0).filter(Boolean);return l.forEach(function(v){return v.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),l.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var s=o.useCallback(function(l,v){if("touches"in l&&l.touches.length===2||l.type==="wheel"&&l.ctrlKey)return!c.current.allowPinchZoom;var y=Ie(l),m=n.current,w="deltaX"in l?l.deltaX:m[0]-y[0],b="deltaY"in l?l.deltaY:m[1]-y[1],P,T=l.target,E=Math.abs(w)>Math.abs(b)?"h":"v";if("touches"in l&&E==="h"&&T.type==="range")return!1;var O=mt(E,T);if(!O)return!0;if(O?P=E:(P=E==="v"?"h":"v",O=mt(E,T)),!O)return!1;if(!r.current&&"changedTouches"in l&&(w||b)&&(r.current=P),!P)return!0;var D=r.current||P;return yo(D,v,l,D==="h"?w:b)},[]),u=o.useCallback(function(l){var v=l;if(!(!pe.length||pe[pe.length-1]!==i)){var y="deltaY"in v?gt(v):Ie(v),m=t.current.filter(function(P){return P.name===v.type&&(P.target===v.target||v.target===P.shadowParent)&&So(P.delta,y)})[0];if(m&&m.should){v.cancelable&&v.preventDefault();return}if(!m){var w=(c.current.shards||[]).map(wt).filter(Boolean).filter(function(P){return P.contains(v.target)}),b=w.length>0?s(v,w[0]):!c.current.noIsolation;b&&v.cancelable&&v.preventDefault()}}},[]),d=o.useCallback(function(l,v,y,m){var w={name:l,delta:v,target:y,should:m,shadowParent:Eo(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(b){return b!==w})},1)},[]),p=o.useCallback(function(l){n.current=Ie(l),r.current=void 0},[]),h=o.useCallback(function(l){d(l.type,gt(l),l.target,s(l,e.lockRef.current))},[]),g=o.useCallback(function(l){d(l.type,Ie(l),l.target,s(l,e.lockRef.current))},[]);o.useEffect(function(){return pe.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:g}),document.addEventListener("wheel",u,fe),document.addEventListener("touchmove",u,fe),document.addEventListener("touchstart",p,fe),function(){pe=pe.filter(function(l){return l!==i}),document.removeEventListener("wheel",u,fe),document.removeEventListener("touchmove",u,fe),document.removeEventListener("touchstart",p,fe)}},[]);var S=e.removeScrollBar,x=e.inert;return o.createElement(o.Fragment,null,x?o.createElement(i,{styles:xo(a)}):null,S?o.createElement(fo,{gapMode:e.gapMode}):null)}function Eo(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Po=Qr(Vt,Co);var Yt=o.forwardRef(function(e,t){return o.createElement(Me,ne({},e,{ref:t,sideCar:Po}))});Yt.classNames=Me.classNames;var Ro=[" ","Enter","ArrowUp","ArrowDown"],Io=[" ","Enter"],ce="Select",[_e,Le,To]=qn(ce),[he,da]=Qe(ce,[To,Tt]),De=Tt(),[No,oe]=he(ce),[Ao,Oo]=he(ce),zt=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:i,value:c,defaultValue:s,onValueChange:u,dir:d,name:p,autoComplete:h,disabled:g,required:S,form:x}=e,l=De(t),[v,y]=o.useState(null),[m,w]=o.useState(null),[b,P]=o.useState(!1),T=Jn(d),[E,O]=pt({prop:r,defaultProp:a??!1,onChange:i,caller:ce}),[D,V]=pt({prop:c,defaultProp:s,onChange:u,caller:ce}),$=o.useRef(null),z=v?x||!!v.closest("form"):!0,[H,X]=o.useState(new Set),K=Array.from(H).map(j=>j.props.value).join(";");return f.jsx(Nr,{...l,children:f.jsxs(No,{required:S,scope:t,trigger:v,onTriggerChange:y,valueNode:m,onValueNodeChange:w,valueNodeHasChildren:b,onValueNodeHasChildrenChange:P,contentId:Je(),value:D,onValueChange:V,open:E,onOpenChange:O,dir:T,triggerPointerDownPosRef:$,disabled:g,children:[f.jsx(_e.Provider,{scope:t,children:f.jsx(Ao,{scope:e.__scopeSelect,onNativeOptionAdd:o.useCallback(j=>{X(F=>new Set(F).add(j))},[]),onNativeOptionRemove:o.useCallback(j=>{X(F=>{const k=new Set(F);return k.delete(j),k})},[]),children:n})}),z?f.jsxs(mn,{"aria-hidden":!0,required:S,tabIndex:-1,name:p,autoComplete:h,value:D,onChange:j=>V(j.target.value),disabled:g,form:x,children:[D===void 0?f.jsx("option",{value:""}):null,Array.from(H)]},K):null]})})};zt.displayName=ce;var Xt="SelectTrigger",Zt=o.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,i=De(n),c=oe(Xt,n),s=c.disabled||r,u=L(t,c.onTriggerChange),d=Le(n),p=o.useRef("touch"),[h,g,S]=wn(l=>{const v=d().filter(w=>!w.disabled),y=v.find(w=>w.value===c.value),m=yn(v,l,y);m!==void 0&&c.onValueChange(m.value)}),x=l=>{s||(c.onOpenChange(!0),S()),l&&(c.triggerPointerDownPosRef.current={x:Math.round(l.pageX),y:Math.round(l.pageY)})};return f.jsx(Ar,{asChild:!0,...i,children:f.jsx(M.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":gn(c.value)?"":void 0,...a,ref:u,onClick:_(a.onClick,l=>{l.currentTarget.focus(),p.current!=="mouse"&&x(l)}),onPointerDown:_(a.onPointerDown,l=>{p.current=l.pointerType;const v=l.target;v.hasPointerCapture(l.pointerId)&&v.releasePointerCapture(l.pointerId),l.button===0&&l.ctrlKey===!1&&l.pointerType==="mouse"&&(x(l),l.preventDefault())}),onKeyDown:_(a.onKeyDown,l=>{const v=h.current!=="";!(l.ctrlKey||l.altKey||l.metaKey)&&l.key.length===1&&g(l.key),!(v&&l.key===" ")&&Ro.includes(l.key)&&(x(),l.preventDefault())})})})});Zt.displayName=Xt;var Gt="SelectValue",qt=o.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:i,placeholder:c="",...s}=e,u=oe(Gt,n),{onValueNodeHasChildrenChange:d}=u,p=i!==void 0,h=L(t,u.onValueNodeChange);return W(()=>{d(p)},[d,p]),f.jsx(M.span,{...s,ref:h,style:{pointerEvents:"none"},children:gn(u.value)?f.jsx(f.Fragment,{children:c}):i})});qt.displayName=Gt;var Mo="SelectIcon",Qt=o.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return f.jsx(M.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})});Qt.displayName=Mo;var _o="SelectPortal",Jt=e=>f.jsx(kt,{asChild:!0,...e});Jt.displayName=_o;var le="SelectContent",en=o.forwardRef((e,t)=>{const n=oe(le,e.__scopeSelect),[r,a]=o.useState();if(W(()=>{a(new DocumentFragment)},[]),!n.open){const i=r;return i?qe.createPortal(f.jsx(tn,{scope:e.__scopeSelect,children:f.jsx(_e.Slot,{scope:e.__scopeSelect,children:f.jsx("div",{children:e.children})})}),i):null}return f.jsx(nn,{...e,ref:t})});en.displayName=le;var G=10,[tn,ae]=he(le),Lo="SelectContentImpl",Do=Ae("SelectContent.RemoveScroll"),nn=o.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:i,onPointerDownOutside:c,side:s,sideOffset:u,align:d,alignOffset:p,arrowPadding:h,collisionBoundary:g,collisionPadding:S,sticky:x,hideWhenDetached:l,avoidCollisions:v,...y}=e,m=oe(le,n),[w,b]=o.useState(null),[P,T]=o.useState(null),E=L(t,C=>b(C)),[O,D]=o.useState(null),[V,$]=o.useState(null),z=Le(n),[H,X]=o.useState(!1),K=o.useRef(!1);o.useEffect(()=>{if(w)return Ur(w)},[w]),ur();const j=o.useCallback(C=>{const[A,...B]=z().map(I=>I.ref.current),[N]=B.slice(-1),R=document.activeElement;for(const I of C)if(I===R||(I==null||I.scrollIntoView({block:"nearest"}),I===A&&P&&(P.scrollTop=0),I===N&&P&&(P.scrollTop=P.scrollHeight),I==null||I.focus(),document.activeElement!==R))return},[z,P]),F=o.useCallback(()=>j([O,w]),[j,O,w]);o.useEffect(()=>{H&&F()},[H,F]);const{onOpenChange:k,triggerPointerDownPosRef:Z}=m;o.useEffect(()=>{if(w){let C={x:0,y:0};const A=N=>{var R,I;C={x:Math.abs(Math.round(N.pageX)-(((R=Z.current)==null?void 0:R.x)??0)),y:Math.abs(Math.round(N.pageY)-(((I=Z.current)==null?void 0:I.y)??0))}},B=N=>{C.x<=10&&C.y<=10?N.preventDefault():w.contains(N.target)||k(!1),document.removeEventListener("pointermove",A),Z.current=null};return Z.current!==null&&(document.addEventListener("pointermove",A),document.addEventListener("pointerup",B,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",A),document.removeEventListener("pointerup",B,{capture:!0})}}},[w,k,Z]),o.useEffect(()=>{const C=()=>k(!1);return window.addEventListener("blur",C),window.addEventListener("resize",C),()=>{window.removeEventListener("blur",C),window.removeEventListener("resize",C)}},[k]);const[me,Q]=wn(C=>{const A=z().filter(R=>!R.disabled),B=A.find(R=>R.ref.current===document.activeElement),N=yn(A,C,B);N&&setTimeout(()=>N.ref.current.focus())}),ge=o.useCallback((C,A,B)=>{const N=!K.current&&!B;(m.value!==void 0&&m.value===A||N)&&(D(C),N&&(K.current=!0))},[m.value]),we=o.useCallback(()=>w==null?void 0:w.focus(),[w]),ee=o.useCallback((C,A,B)=>{const N=!K.current&&!B;(m.value!==void 0&&m.value===A||N)&&$(C)},[m.value]),ue=r==="popper"?Ye:rn,se=ue===Ye?{side:s,sideOffset:u,align:d,alignOffset:p,arrowPadding:h,collisionBoundary:g,collisionPadding:S,sticky:x,hideWhenDetached:l,avoidCollisions:v}:{};return f.jsx(tn,{scope:n,content:w,viewport:P,onViewportChange:T,itemRefCallback:ge,selectedItem:O,onItemLeave:we,itemTextRefCallback:ee,focusSelectedItem:F,selectedItemText:V,position:r,isPositioned:H,searchRef:me,children:f.jsx(Yt,{as:Do,allowPinchZoom:!0,children:f.jsx(Et,{asChild:!0,trapped:m.open,onMountAutoFocus:C=>{C.preventDefault()},onUnmountAutoFocus:_(a,C=>{var A;(A=m.trigger)==null||A.focus({preventScroll:!0}),C.preventDefault()}),children:f.jsx(bt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:C=>C.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:f.jsx(ue,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:C=>C.preventDefault(),...y,...se,onPlaced:()=>X(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:_(y.onKeyDown,C=>{const A=C.ctrlKey||C.altKey||C.metaKey;if(C.key==="Tab"&&C.preventDefault(),!A&&C.key.length===1&&Q(C.key),["ArrowUp","ArrowDown","Home","End"].includes(C.key)){let N=z().filter(R=>!R.disabled).map(R=>R.ref.current);if(["ArrowUp","End"].includes(C.key)&&(N=N.slice().reverse()),["ArrowUp","ArrowDown"].includes(C.key)){const R=C.target,I=N.indexOf(R);N=N.slice(I+1)}setTimeout(()=>j(N)),C.preventDefault()}})})})})})})});nn.displayName=Lo;var jo="SelectItemAlignedPosition",rn=o.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,i=oe(le,n),c=ae(le,n),[s,u]=o.useState(null),[d,p]=o.useState(null),h=L(t,E=>p(E)),g=Le(n),S=o.useRef(!1),x=o.useRef(!0),{viewport:l,selectedItem:v,selectedItemText:y,focusSelectedItem:m}=c,w=o.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&d&&l&&v&&y){const E=i.trigger.getBoundingClientRect(),O=d.getBoundingClientRect(),D=i.valueNode.getBoundingClientRect(),V=y.getBoundingClientRect();if(i.dir!=="rtl"){const R=V.left-O.left,I=D.left-R,U=E.left-I,q=E.width+U,ye=Math.max(q,O.width),Se=window.innerWidth-G,xe=ot(I,[G,Math.max(G,Se-ye)]);s.style.minWidth=q+"px",s.style.left=xe+"px"}else{const R=O.right-V.right,I=window.innerWidth-D.right-R,U=window.innerWidth-E.right-I,q=E.width+U,ye=Math.max(q,O.width),Se=window.innerWidth-G,xe=ot(I,[G,Math.max(G,Se-ye)]);s.style.minWidth=q+"px",s.style.right=xe+"px"}const $=g(),z=window.innerHeight-G*2,H=l.scrollHeight,X=window.getComputedStyle(d),K=parseInt(X.borderTopWidth,10),j=parseInt(X.paddingTop,10),F=parseInt(X.borderBottomWidth,10),k=parseInt(X.paddingBottom,10),Z=K+j+H+k+F,me=Math.min(v.offsetHeight*5,Z),Q=window.getComputedStyle(l),ge=parseInt(Q.paddingTop,10),we=parseInt(Q.paddingBottom,10),ee=E.top+E.height/2-G,ue=z-ee,se=v.offsetHeight/2,C=v.offsetTop+se,A=K+j+C,B=Z-A;if(A<=ee){const R=$.length>0&&v===$[$.length-1].ref.current;s.style.bottom="0px";const I=d.clientHeight-l.offsetTop-l.offsetHeight,U=Math.max(ue,se+(R?we:0)+I+F),q=A+U;s.style.height=q+"px"}else{const R=$.length>0&&v===$[0].ref.current;s.style.top="0px";const U=Math.max(ee,K+l.offsetTop+(R?ge:0)+se)+B;s.style.height=U+"px",l.scrollTop=A-ee+l.offsetTop}s.style.margin=`${G}px 0`,s.style.minHeight=me+"px",s.style.maxHeight=z+"px",r==null||r(),requestAnimationFrame(()=>S.current=!0)}},[g,i.trigger,i.valueNode,s,d,l,v,y,i.dir,r]);W(()=>w(),[w]);const[b,P]=o.useState();W(()=>{d&&P(window.getComputedStyle(d).zIndex)},[d]);const T=o.useCallback(E=>{E&&x.current===!0&&(w(),m==null||m(),x.current=!1)},[w,m]);return f.jsx(Bo,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:S,onScrollButtonChange:T,children:f.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:f.jsx(M.div,{...a,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});rn.displayName=jo;var ko="SelectPopperPosition",Ye=o.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=G,...i}=e,c=De(n);return f.jsx(Or,{...c,...i,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Ye.displayName=ko;var[Bo,nt]=he(le,{}),ze="SelectViewport",on=o.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,i=ae(ze,n),c=nt(ze,n),s=L(t,i.onViewportChange),u=o.useRef(0);return f.jsxs(f.Fragment,{children:[f.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),f.jsx(_e.Slot,{scope:n,children:f.jsx(M.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:_(a.onScroll,d=>{const p=d.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:g}=c;if(g!=null&&g.current&&h){const S=Math.abs(u.current-p.scrollTop);if(S>0){const x=window.innerHeight-G*2,l=parseFloat(h.style.minHeight),v=parseFloat(h.style.height),y=Math.max(l,v);if(y<x){const m=y+S,w=Math.min(x,m),b=m-w;h.style.height=w+"px",h.style.bottom==="0px"&&(p.scrollTop=b>0?b:0,h.style.justifyContent="flex-end")}}}u.current=p.scrollTop})})})]})});on.displayName=ze;var an="SelectGroup",[Fo,Wo]=he(an),Vo=o.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Je();return f.jsx(Fo,{scope:n,id:a,children:f.jsx(M.div,{role:"group","aria-labelledby":a,...r,ref:t})})});Vo.displayName=an;var sn="SelectLabel",Ho=o.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Wo(sn,n);return f.jsx(M.div,{id:a.id,...r,ref:t})});Ho.displayName=sn;var Oe="SelectItem",[Uo,cn]=he(Oe),ln=o.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:i,...c}=e,s=oe(Oe,n),u=ae(Oe,n),d=s.value===r,[p,h]=o.useState(i??""),[g,S]=o.useState(!1),x=L(t,m=>{var w;return(w=u.itemRefCallback)==null?void 0:w.call(u,m,r,a)}),l=Je(),v=o.useRef("touch"),y=()=>{a||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return f.jsx(Uo,{scope:n,value:r,disabled:a,textId:l,isSelected:d,onItemTextChange:o.useCallback(m=>{h(w=>w||((m==null?void 0:m.textContent)??"").trim())},[]),children:f.jsx(_e.ItemSlot,{scope:n,value:r,disabled:a,textValue:p,children:f.jsx(M.div,{role:"option","aria-labelledby":l,"data-highlighted":g?"":void 0,"aria-selected":d&&g,"data-state":d?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...c,ref:x,onFocus:_(c.onFocus,()=>S(!0)),onBlur:_(c.onBlur,()=>S(!1)),onClick:_(c.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:_(c.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:_(c.onPointerDown,m=>{v.current=m.pointerType}),onPointerMove:_(c.onPointerMove,m=>{var w;v.current=m.pointerType,a?(w=u.onItemLeave)==null||w.call(u):v.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:_(c.onPointerLeave,m=>{var w;m.currentTarget===document.activeElement&&((w=u.onItemLeave)==null||w.call(u))}),onKeyDown:_(c.onKeyDown,m=>{var b;((b=u.searchRef)==null?void 0:b.current)!==""&&m.key===" "||(Io.includes(m.key)&&y(),m.key===" "&&m.preventDefault())})})})})});ln.displayName=Oe;var be="SelectItemText",un=o.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,...i}=e,c=oe(be,n),s=ae(be,n),u=cn(be,n),d=Oo(be,n),[p,h]=o.useState(null),g=L(t,y=>h(y),u.onItemTextChange,y=>{var m;return(m=s.itemTextRefCallback)==null?void 0:m.call(s,y,u.value,u.disabled)}),S=p==null?void 0:p.textContent,x=o.useMemo(()=>f.jsx("option",{value:u.value,disabled:u.disabled,children:S},u.value),[u.disabled,u.value,S]),{onNativeOptionAdd:l,onNativeOptionRemove:v}=d;return W(()=>(l(x),()=>v(x)),[l,v,x]),f.jsxs(f.Fragment,{children:[f.jsx(M.span,{id:u.textId,...i,ref:g}),u.isSelected&&c.valueNode&&!c.valueNodeHasChildren?qe.createPortal(i.children,c.valueNode):null]})});un.displayName=be;var dn="SelectItemIndicator",fn=o.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return cn(dn,n).isSelected?f.jsx(M.span,{"aria-hidden":!0,...r,ref:t}):null});fn.displayName=dn;var Xe="SelectScrollUpButton",pn=o.forwardRef((e,t)=>{const n=ae(Xe,e.__scopeSelect),r=nt(Xe,e.__scopeSelect),[a,i]=o.useState(!1),c=L(t,r.onScrollButtonChange);return W(()=>{if(n.viewport&&n.isPositioned){let s=function(){const d=u.scrollTop>0;i(d)};const u=n.viewport;return s(),u.addEventListener("scroll",s),()=>u.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),a?f.jsx(hn,{...e,ref:c,onAutoScroll:()=>{const{viewport:s,selectedItem:u}=n;s&&u&&(s.scrollTop=s.scrollTop-u.offsetHeight)}}):null});pn.displayName=Xe;var Ze="SelectScrollDownButton",vn=o.forwardRef((e,t)=>{const n=ae(Ze,e.__scopeSelect),r=nt(Ze,e.__scopeSelect),[a,i]=o.useState(!1),c=L(t,r.onScrollButtonChange);return W(()=>{if(n.viewport&&n.isPositioned){let s=function(){const d=u.scrollHeight-u.clientHeight,p=Math.ceil(u.scrollTop)<d;i(p)};const u=n.viewport;return s(),u.addEventListener("scroll",s),()=>u.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),a?f.jsx(hn,{...e,ref:c,onAutoScroll:()=>{const{viewport:s,selectedItem:u}=n;s&&u&&(s.scrollTop=s.scrollTop+u.offsetHeight)}}):null});vn.displayName=Ze;var hn=o.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,i=ae("SelectScrollButton",n),c=o.useRef(null),s=Le(n),u=o.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return o.useEffect(()=>()=>u(),[u]),W(()=>{var p;const d=s().find(h=>h.ref.current===document.activeElement);(p=d==null?void 0:d.ref.current)==null||p.scrollIntoView({block:"nearest"})},[s]),f.jsx(M.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:_(a.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(r,50))}),onPointerMove:_(a.onPointerMove,()=>{var d;(d=i.onItemLeave)==null||d.call(i),c.current===null&&(c.current=window.setInterval(r,50))}),onPointerLeave:_(a.onPointerLeave,()=>{u()})})}),$o="SelectSeparator",Ko=o.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return f.jsx(M.div,{"aria-hidden":!0,...r,ref:t})});Ko.displayName=$o;var Ge="SelectArrow",Yo=o.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=De(n),i=oe(Ge,n),c=ae(Ge,n);return i.open&&c.position==="popper"?f.jsx(Mr,{...a,...r,ref:t}):null});Yo.displayName=Ge;var zo="SelectBubbleInput",mn=o.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const a=o.useRef(null),i=L(r,a),c=kr(t);return o.useEffect(()=>{const s=a.current;if(!s)return;const u=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(u,"value").set;if(c!==t&&p){const h=new Event("change",{bubbles:!0});p.call(s,t),s.dispatchEvent(h)}},[c,t]),f.jsx(M.select,{...n,style:{...Bt,...n.style},ref:i,defaultValue:t})});mn.displayName=zo;function gn(e){return e===""||e===void 0}function wn(e){const t=ie(e),n=o.useRef(""),r=o.useRef(0),a=o.useCallback(c=>{const s=n.current+c;t(s),function u(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>u(""),1e3))}(s)},[t]),i=o.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return o.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,i]}function yn(e,t,n){const a=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let c=Xo(e,Math.max(i,0));a.length===1&&(c=c.filter(d=>d!==n));const u=c.find(d=>d.textValue.toLowerCase().startsWith(a.toLowerCase()));return u!==n?u:void 0}function Xo(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Zo=zt,Go=Zt,qo=qt,Qo=Qt,Jo=Jt,ea=en,ta=on,na=ln,ra=un,oa=fn,aa=pn,sa=vn;const ia=J.forwardRef(function({list:t=[],required:n=!1,disabled:r=!1,autoFocus:a=!1,size:i=Y.md,name:c,value:s="default",className:u,onChange:d},p){const h=t.find(g=>g.value===s)??t[0]??{value:s};return r=r||t.length<2,f.jsxs(Zo,{name:c,value:h.value,disabled:r,required:n,onValueChange:d,children:[f.jsxs(Go,{ref:p,className:re(u,r&&"opacity-50 cursor-not-allowed"),autoFocus:a,children:[f.jsx(qo,{}),f.jsx(Qo,{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-1",children:f.jsx(Wn,{className:"w-4","aria-hidden":"true"})})]}),f.jsx(Jo,{children:f.jsxs(ea,{className:re("overflow-auto rounded-md bg-theme p-1 shadow-2xl border-2 border-neutral-200 dark:border-neutral-700 ring-opacity-5 focus:outline-none",i===Y.sm&&"text-xs",i===Y.md&&"text-sm",i===Y.lg&&"text-sm"),children:[f.jsx(aa,{className:"flex items-center justify-center h-3 cursor-default",children:f.jsx(Hn,{className:"w-4","aria-hidden":"true"})}),f.jsx(ta,{className:"p-1",children:t.map(({text:g,value:S})=>f.jsx(ca,{value:S,children:g},S))}),f.jsx(sa,{className:"flex items-center justify-center h-3 cursor-default",children:f.jsx(Bn,{className:"w-4","aria-hidden":"true"})})]})})]})});function ca({disabled:e=!1,value:t,children:n,className:r}){return f.jsxs(na,{value:t,className:re("leading-none rounded-md flex items-center h-[25px] pr-[35px] pl-[25px] relative select-none data-[disabled]:pointer-events-none data-[highlighted]:outline-none data-[highlighted]:bg-brand-500 data-[highlighted]:text-brand-100",e&&"opacity-50 cursor-not-allowed",r),children:[f.jsx(ra,{children:n}),f.jsx(oa,{className:"absolute left-0 w-4 inline-flex items-center justify-center",children:f.jsx(jn,{})})]})}function je({label:e,info:t,size:n=Y.md,className:r,children:a,disabled:i=!1,required:c=!1,autoFocus:s=!1}){const u=re("text-left relative block bg-theme-lighter border-neutral-200 dark:border-neutral-700","focus:outline-none focus:border-secondary-500","ring-secondary-300 ring-opacity-60 ring-offset ring-offset-secondary-100",n===Y.sm&&"px-2 py-0.5 text-xs leading-4 border-2 focus:ring-2 rounded-[0.25rem] min-w-[7rem]",n===Y.md&&"px-3 py-2 text-sm leading-4 border-2 focus:ring-4 rounded-md min-w-[10rem]",n===Y.lg&&"px-3 py-2 text-sm leading-6 border-2 focus:ring-4 rounded-md min-w-[10rem]");return f.jsxs("div",{className:re("inline-block relative m-1 text-left",i&&"opacity-50 cursor-not-allowed",r),children:[rt(e)&&f.jsx(Sn,{size:n,children:e}),typeof a=="function"?a({disabled:i,required:c,autoFocus:s,size:n,className:u}):a,rt(t)&&f.jsx(xn,{children:t})]})}function Sn({htmlFor:e,className:t,children:n,size:r=Y.md}){return f.jsx("label",{htmlFor:e,className:re("block mb-1 px-2 text-sm whitespace-nowrap",r===Y.sm&&"text-xs",r===Y.md&&"text-sm",r===Y.lg&&"text-md",t),children:n})}function xn({className:e,children:t}){return f.jsx("small",{className:re("block text-xs mt-1 px-3 text-neutral-400 dark:text-neutral-600",e),children:t})}je.Label=Sn;je.Info=xn;je.Textfield=Un;je.Selector=ia;export{Ar as A,Or as C,bt as D,Et as F,je as I,M as P,Yt as R,W as a,qn as b,Qe as c,Je as d,_ as e,Jn as f,pt as g,ie as h,Tt as i,Ur as j,ur as k,Ae as l,Mr as m,Kn as n,tr as o,Nr as p,kt as q,Wn as r,Hn as s,Bn as t,L as u,jn as v};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as u,Q as c,a as n,v as a,j as s,e as f}from"./index-EyUZDtV7.js";import{L as g}from"./context-DeHggMKx.js";import x from"./ModelLineage-DxdKn0Xe.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./floating-ui.react-dom-dR28niet.js";import"./editor-intN6ort.js";import"./file-ZamfLSgo.js";import"./project-BX-rNI7d.js";import"./help-6Q7f7fjd.js";import"./SourceList-CXyYEJjr.js";import"./Input-BmfZ-VnW.js";import"./index-BObtdpsN.js";import"./popover-CA0_-cE5.js";import"./ListboxShow-CVN-1wre.js";import"./SearchList-CJR2axiJ.js";function S(){const l=u(),{modelName:t}=c(),i=n(e=>e.models),o=n(e=>e.lastSelectedModel),r=a(t)||t===(o==null?void 0:o.name)?o:i.get(encodeURI(t));function d(e){const m=i.get(e);a(m)||l(f.LineageModels+"/"+m.name)}function p(e){console.log(e==null?void 0:e.message)}return s.jsx("div",{className:"flex overflow-hidden w-full h-full",children:s.jsx(g,{showColumns:!0,handleClickModel:d,handleError:p,children:s.jsx(x,{model:r})})})}export{S as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,R as S,j as k,b as tt,c as Oe}from"./index-EyUZDtV7.js";import{o as C,p as Te,h as Pe,al as nt,s as Me,K,y as G,n as H,L as Z,am as rt,V as Se,an as ot,I as lt,aj as Ae,a0 as Ne,ao as ye,ap as it,i as at,c as je,a1 as st,a2 as ve,d as q,B as _e,a3 as ut,a4 as ct,j as dt,S as A,C as pt,a5 as ft,a6 as vt,w as le,ak as mt,a7 as bt,b as $e,v as ht,aa as gt,G as xt,D as Ot,a8 as St,a9 as yt,a as I,af as $t,T as Ee,_ as Be,ab as Et,ac as wt,N as It,ae as Rt,ad as Ct,Z as Lt,$ as kt,W as Dt,X as Ft,Y as Tt,R as we,ah as Pt,ai as Mt,z as At}from"./popover-CA0_-cE5.js";import{r as Y}from"./floating-ui.react-dom-dR28niet.js";import{t as Nt,v as jt}from"./Input-BmfZ-VnW.js";function _t({title:e,titleId:n,...t},r){return i.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":n},t),e?i.createElement("title",{id:n},e):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z"}))}const Bt=i.forwardRef(_t);let Ut=i.createContext(void 0);function he(){return i.useContext(Ut)}function zt(e,n,t){let[r,o]=i.useState(t),l=e!==void 0,a=i.useRef(l),s=i.useRef(!1),c=i.useRef(!1);return l&&!a.current&&!s.current?(s.current=!0,a.current=l,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!l&&a.current&&!c.current&&(c.current=!0,a.current=l,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[l?e:r,C(d=>(l||o(d),n==null?void 0:n(d)))]}function Qt(e){let[n]=i.useState(e);return n}function Ue(e={},n=null,t=[]){for(let[r,o]of Object.entries(e))Qe(t,ze(n,r),o);return t}function ze(e,n){return e?e+"["+n+"]":n}function Qe(e,n,t){if(Array.isArray(t))for(let[r,o]of t.entries())Qe(e,ze(n,r.toString()),o);else t instanceof Date?e.push([n,t.toISOString()]):typeof t=="boolean"?e.push([n,t?"1":"0"]):typeof t=="string"?e.push([n,t]):typeof t=="number"?e.push([n,`${t}`]):t==null?e.push([n,""]):Ue(t,n,e)}function Vt(e){var n,t;let r=(n=e==null?void 0:e.form)!=null?n:e.closest("form");if(r){for(let o of r.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(t=r.requestSubmit)==null||t.call(r)}}let Ht=i.createContext(null);function Kt({children:e}){let n=i.useContext(Ht);if(!n)return S.createElement(S.Fragment,null,e);let{target:t}=n;return t?Y.createPortal(S.createElement(S.Fragment,null,e),t):null}function Gt({data:e,form:n,disabled:t,onReset:r,overrides:o}){let[l,a]=i.useState(null),s=Te();return i.useEffect(()=>{if(r&&l)return s.addEventListener(l,"reset",r)},[l,n,r]),S.createElement(Kt,null,S.createElement(Zt,{setForm:a,formId:n}),Ue(e).map(([c,d])=>S.createElement(Pe,{features:Me.Hidden,...nt({key:c,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:n,disabled:t,name:c,value:d,...o})})))}function Zt({setForm:e,formId:n}){return i.useEffect(()=>{if(n){let t=document.getElementById(n);t&&e(t)}},[e,n]),n?null:S.createElement(Pe,{features:Me.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let r=t.closest("form");r&&e(r)}})}let Xt=i.createContext(void 0);function Ve(){return i.useContext(Xt)}let ie=i.createContext(null);ie.displayName="DescriptionContext";function He(){let e=i.useContext(ie);if(e===null){let n=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(n,He),n}return e}function Yt(){var e,n;return(n=(e=i.useContext(ie))==null?void 0:e.value)!=null?n:void 0}function Qn(){let[e,n]=i.useState([]);return[e.length>0?e.join(" "):void 0,i.useMemo(()=>function(t){let r=C(l=>(n(a=>[...a,l]),()=>n(a=>{let s=a.slice(),c=s.indexOf(l);return c!==-1&&s.splice(c,1),s}))),o=i.useMemo(()=>({register:r,slot:t.slot,name:t.name,props:t.props,value:t.value}),[r,t.slot,t.name,t.props,t.value]);return S.createElement(ie.Provider,{value:o},t.children)},[n])]}let qt="p";function Wt(e,n){let t=i.useId(),r=he(),{id:o=`headlessui-description-${t}`,...l}=e,a=He(),s=G(n);H(()=>a.register(o),[o,a.register]);let c=r||!1,d=i.useMemo(()=>({...a.slot,disabled:c}),[a.slot,c]),p={ref:s,...a.props,id:o};return Z()({ourProps:p,theirProps:l,slot:d,defaultTag:qt,name:a.name||"Description"})}let Jt=K(Wt),Vn=Object.assign(Jt,{}),ae=i.createContext(null);ae.displayName="LabelContext";function Ke(){let e=i.useContext(ae);if(e===null){let n=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Ke),n}return e}function Ge(e){var n,t,r;let o=(t=(n=i.useContext(ae))==null?void 0:n.value)!=null?t:void 0;return((r=e==null?void 0:e.length)!=null?r:0)>0?[o,...e].filter(Boolean).join(" "):o}function en({inherit:e=!1}={}){let n=Ge(),[t,r]=i.useState([]),o=e?[n,...t].filter(Boolean):t;return[o.length>0?o.join(" "):void 0,i.useMemo(()=>function(l){let a=C(c=>(r(d=>[...d,c]),()=>r(d=>{let p=d.slice(),m=p.indexOf(c);return m!==-1&&p.splice(m,1),p}))),s=i.useMemo(()=>({register:a,slot:l.slot,name:l.name,props:l.props,value:l.value}),[a,l.slot,l.name,l.props,l.value]);return S.createElement(ae.Provider,{value:s},l.children)},[r])]}let tn="label";function nn(e,n){var t;let r=i.useId(),o=Ke(),l=Ve(),a=he(),{id:s=`headlessui-label-${r}`,htmlFor:c=l??((t=o.props)==null?void 0:t.htmlFor),passive:d=!1,...p}=e,m=G(n);H(()=>o.register(s),[s,o.register]);let f=C(y=>{let P=y.currentTarget;if(!(y.target!==y.currentTarget&&rt(y.target))&&(Se(P)&&y.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(y),Se(P))){let O=document.getElementById(P.htmlFor);if(O){let $=O.getAttribute("disabled");if($==="true"||$==="")return;let R=O.getAttribute("aria-disabled");if(R==="true"||R==="")return;(ot(O)&&(O.type==="file"||O.type==="radio"||O.type==="checkbox")||O.role==="radio"||O.role==="checkbox"||O.role==="switch")&&O.click(),O.focus({preventScroll:!0})}}}),u=a||!1,x=i.useMemo(()=>({...o.slot,disabled:u}),[o.slot,u]),w={ref:m,...o.props,id:s,htmlFor:c,onClick:f};return d&&("onClick"in w&&(delete w.htmlFor,delete w.onClick),"onClick"in p&&delete p.onClick),Z()({ourProps:w,theirProps:p,slot:x,defaultTag:c?tn:"div",name:o.name||"Label"})}let rn=K(nn),on=Object.assign(rn,{});function ln(e,n){return e!==null&&n!==null&&typeof e=="object"&&typeof n=="object"&&"id"in e&&"id"in n?e.id===n.id:e===n}function an(e=ln){return i.useCallback((n,t)=>{if(typeof e=="string"){let r=e;return(n==null?void 0:n[r])===(t==null?void 0:t[r])}return e(n,t)},[e])}let me=new Map,J=new Map;function Ie(e){var n;let t=(n=J.get(e))!=null?n:0;return J.set(e,t+1),t!==0?()=>Re(e):(me.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>Re(e))}function Re(e){var n;let t=(n=J.get(e))!=null?n:1;if(t===1?J.delete(e):J.set(e,t-1),t!==1)return;let r=me.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,me.delete(e))}function sn(e,{allowed:n,disallowed:t}={}){let r=lt(e,"inert-others");H(()=>{var o,l;if(!r)return;let a=Ae();for(let c of(o=t==null?void 0:t())!=null?o:[])c&&a.add(Ie(c));let s=(l=n==null?void 0:n())!=null?l:[];for(let c of s){if(!c)continue;let d=Ne(c);if(!d)continue;let p=c.parentElement;for(;p&&p!==d.body;){for(let m of p.children)s.some(f=>m.contains(f))||a.add(Ie(m));p=p.parentElement}}return a.dispose},[r,n,t])}var un=(e=>(e[e.Ignore=0]="Ignore",e[e.Select=1]="Select",e[e.Close=2]="Close",e))(un||{});const ne={Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}},cn=200;function dn(e,{trigger:n,action:t,close:r,select:o}){let l=i.useRef(null);ye(e&&n!==null,"pointerdown",a=>{it(a==null?void 0:a.target)&&n!=null&&n.contains(a.target)&&(l.current=new Date)}),ye(e&&n!==null,"pointerup",a=>{if(l.current===null||!at(a.target))return;let s=t(a),c=new Date().getTime()-l.current.getTime();switch(l.current=null,s.kind){case 0:return;case 1:{c>cn&&(o(s.target),r());break}case 2:{r();break}}},{capture:!0})}function Ce(e){return[e.screenX,e.screenY]}function pn(){let e=i.useRef([-1,-1]);return{wasMoved(n){let t=Ce(n);return e.current[0]===t[0]&&e.current[1]===t[1]?!1:(e.current=t,!0)},update(n){e.current=Ce(n)}}}function fn(e,n){let[t,r]=i.useState(n);return!e&&t!==n&&r(n),e?t:n}function vn(e){throw new Error("Unexpected object: "+e)}var g=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(g||{});function re(e,n){let t=n.resolveItems();if(t.length<=0)return null;let r=n.resolveActiveIndex(),o=r??-1;switch(e.focus){case 0:{for(let l=0;l<t.length;++l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 1:{o===-1&&(o=t.length);for(let l=o-1;l>=0;--l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 2:{for(let l=o+1;l<t.length;++l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 3:{for(let l=t.length-1;l>=0;--l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 4:{for(let l=0;l<t.length;++l)if(n.resolveId(t[l],l,t)===e.id)return l;return r}case 5:return null;default:vn(e)}}function mn(e,n){let t=i.useRef({left:0,top:0});if(H(()=>{if(!n)return;let o=n.getBoundingClientRect();o&&(t.current=o)},[e,n]),n==null||!e||n===document.activeElement)return!1;let r=n.getBoundingClientRect();return r.top!==t.current.top||r.left!==t.current.left}let Le=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function ke(e){var n,t;let r=(n=e.innerText)!=null?n:"",o=e.cloneNode(!0);if(!je(o))return r;let l=!1;for(let s of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),l=!0;let a=l?(t=o.innerText)!=null?t:"":r;return Le.test(a)&&(a=a.replace(Le,"")),a}function bn(e){let n=e.getAttribute("aria-label");if(typeof n=="string")return n.trim();let t=e.getAttribute("aria-labelledby");if(t){let r=t.split(" ").map(o=>{let l=document.getElementById(o);if(l){let a=l.getAttribute("aria-label");return typeof a=="string"?a.trim():ke(l).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return ke(e).trim()}function hn(e){let n=i.useRef(""),t=i.useRef("");return C(()=>{let r=e.current;if(!r)return"";let o=r.innerText;if(n.current===o)return t.current;let l=bn(r).trim().toLowerCase();return n.current=o,t.current=l,l})}var gn=Object.defineProperty,xn=(e,n,t)=>n in e?gn(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,De=(e,n,t)=>(xn(e,typeof n!="symbol"?n+"":n,t),t),E=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(E||{}),_=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(_||{}),be=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(be||{}),Ze=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOptions=5]="RegisterOptions",e[e.UnregisterOptions=6]="UnregisterOptions",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetOptionsElement=8]="SetOptionsElement",e[e.SortOptions=9]="SortOptions",e))(Ze||{});function Fe(e,n=t=>t){let t=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=ct(n(e.options.slice()),l=>l.dataRef.current.domRef.current),o=t?r.indexOf(t):null;return o===-1&&(o=null),{options:r,activeOptionIndex:o}}let On={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,pendingFocus:{focus:g.Nothing},listboxState:1,__demoMode:!1}},0(e,n){if(e.dataRef.current.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{isSelected:r}=e.dataRef.current,o=e.options.findIndex(l=>r(l.dataRef.current.value));return o!==-1&&(t=o),{...e,pendingFocus:n.focus,listboxState:0,activeOptionIndex:t,__demoMode:!1}},2(e,n){var t,r,o,l,a;if(e.dataRef.current.disabled||e.listboxState===1)return e;let s={...e,searchQuery:"",activationTrigger:(t=n.trigger)!=null?t:1,__demoMode:!1};if(n.focus===g.Nothing)return{...s,activeOptionIndex:null};if(n.focus===g.Specific)return{...s,activeOptionIndex:e.options.findIndex(p=>p.id===n.id)};if(n.focus===g.Previous){let p=e.activeOptionIndex;if(p!==null){let m=e.options[p].dataRef.current.domRef,f=re(n,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:u=>u.id,resolveDisabled:u=>u.dataRef.current.disabled});if(f!==null){let u=e.options[f].dataRef.current.domRef;if(((r=m.current)==null?void 0:r.previousElementSibling)===u.current||((o=u.current)==null?void 0:o.previousElementSibling)===null)return{...s,activeOptionIndex:f}}}}else if(n.focus===g.Next){let p=e.activeOptionIndex;if(p!==null){let m=e.options[p].dataRef.current.domRef,f=re(n,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:u=>u.id,resolveDisabled:u=>u.dataRef.current.disabled});if(f!==null){let u=e.options[f].dataRef.current.domRef;if(((l=m.current)==null?void 0:l.nextElementSibling)===u.current||((a=u.current)==null?void 0:a.nextElementSibling)===null)return{...s,activeOptionIndex:f}}}}let c=Fe(e),d=re(n,{resolveItems:()=>c.options,resolveActiveIndex:()=>c.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});return{...s,...c,activeOptionIndex:d}},3:(e,n)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let t=e.searchQuery!==""?0:1,r=e.searchQuery+n.value.toLowerCase(),o=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+t).concat(e.options.slice(0,e.activeOptionIndex+t)):e.options).find(a=>{var s;return!a.dataRef.current.disabled&&((s=a.dataRef.current.textValue)==null?void 0:s.startsWith(r))}),l=o?e.options.indexOf(o):-1;return l===-1||l===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:l,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,n)=>{let t=e.options.concat(n.options),r=e.activeOptionIndex;if(e.pendingFocus.focus!==g.Nothing&&(r=re(e.pendingFocus,{resolveItems:()=>t,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:o=>o.id,resolveDisabled:o=>o.dataRef.current.disabled})),e.activeOptionIndex===null){let{isSelected:o}=e.dataRef.current;if(o){let l=t.findIndex(a=>o==null?void 0:o(a.dataRef.current.value));l!==-1&&(r=l)}}return{...e,options:t,activeOptionIndex:r,pendingFocus:{focus:g.Nothing},pendingShouldSort:!0}},6:(e,n)=>{let t=e.options,r=[],o=new Set(n.options);for(let[l,a]of t.entries())if(o.has(a.id)&&(r.push(l),o.delete(a.id),o.size===0))break;if(r.length>0){t=t.slice();for(let l of r.reverse())t.splice(l,1)}return{...e,options:t,activationTrigger:1}},7:(e,n)=>e.buttonElement===n.element?e:{...e,buttonElement:n.element},8:(e,n)=>e.optionsElement===n.element?e:{...e,optionsElement:n.element},9:e=>e.pendingShouldSort?{...e,...Fe(e),pendingShouldSort:!1}:e};class ge extends st{constructor(n){super(n),De(this,"actions",{onChange:t=>{let{onChange:r,compare:o,mode:l,value:a}=this.state.dataRef.current;return q(l,{0:()=>r==null?void 0:r(t),1:()=>{let s=a.slice(),c=s.findIndex(d=>o(d,t));return c===-1?s.push(t):s.splice(c,1),r==null?void 0:r(s)}})},registerOption:ve(()=>{let t=[],r=new Set;return[(o,l)=>{r.has(l)||(r.add(l),t.push({id:o,dataRef:l}))},()=>(r.clear(),this.send({type:5,options:t.splice(0)}))]}),unregisterOption:ve(()=>{let t=[];return[r=>t.push(r),()=>{this.send({type:6,options:t.splice(0)})}]}),goToOption:ve(()=>{let t=null;return[(r,o)=>{t={type:2,...r,trigger:o}},()=>t&&this.send(t)]}),closeListbox:()=>{this.send({type:1})},openListbox:t=>{this.send({type:0,focus:t})},selectActiveOption:()=>{if(this.state.activeOptionIndex!==null){let{dataRef:t,id:r}=this.state.options[this.state.activeOptionIndex];this.actions.onChange(t.current.value),this.send({type:2,focus:g.Specific,id:r})}},selectOption:t=>{let r=this.state.options.find(o=>o.id===t);r&&this.actions.onChange(r.dataRef.current.value)},search:t=>{this.send({type:3,value:t})},clearSearch:()=>{this.send({type:4})},setButtonElement:t=>{this.send({type:7,element:t})},setOptionsElement:t=>{this.send({type:8,element:t})}}),De(this,"selectors",{activeDescendantId(t){var r;let o=t.activeOptionIndex,l=t.options;return o===null||(r=l[o])==null?void 0:r.id},isActive(t,r){var o;let l=t.activeOptionIndex,a=t.options;return l!==null?((o=a[l])==null?void 0:o.id)===r:!1},shouldScrollIntoView(t,r){return t.__demoMode||t.listboxState!==0||t.activationTrigger===0?!1:this.isActive(t,r)}}),this.on(5,()=>{requestAnimationFrame(()=>{this.send({type:9})})});{let t=this.state.id,r=_e.get(null);this.disposables.add(r.on(ut.Push,o=>{!r.selectors.isTop(o,t)&&this.state.listboxState===0&&this.actions.closeListbox()})),this.on(0,()=>r.actions.push(t)),this.on(1,()=>r.actions.pop(t))}}static new({id:n,__demoMode:t=!1}){return new ge({id:n,dataRef:{current:{}},listboxState:t?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:g.Nothing},__demoMode:t})}reduce(n,t){return q(t.type,On,n,t)}}const Xe=i.createContext(null);function xe(e){let n=i.useContext(Xe);if(n===null){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Ye),t}return n}function Ye({id:e,__demoMode:n=!1}){let t=i.useMemo(()=>ge.new({id:e,__demoMode:n}),[]);return dt(()=>t.dispose()),t}let se=i.createContext(null);se.displayName="ListboxDataContext";function ee(e){let n=i.useContext(se);if(n===null){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ee),t}return n}let Sn=i.Fragment;function yn(e,n){let t=i.useId(),r=he(),{value:o,defaultValue:l,form:a,name:s,onChange:c,by:d,invalid:p=!1,disabled:m=r||!1,horizontal:f=!1,multiple:u=!1,__demoMode:x=!1,...w}=e;const y=f?"horizontal":"vertical";let P=G(n),O=Qt(l),[$=u?[]:void 0,R]=zt(o,c,O),L=Ye({id:t,__demoMode:x}),N=i.useRef({static:!1,hold:!1}),U=i.useRef(new Map),M=an(d),z=i.useCallback(T=>q(b.mode,{[_.Multi]:()=>$.some(W=>M(W,T)),[_.Single]:()=>M($,T)}),[$]),b=i.useMemo(()=>({value:$,disabled:m,invalid:p,mode:u?_.Multi:_.Single,orientation:y,onChange:R,compare:M,isSelected:z,optionsPropsRef:N,listRef:U}),[$,m,p,u,y,R,M,z,N,U]);H(()=>{L.state.dataRef.current=b},[b]);let D=A(L,T=>T.listboxState),Q=_e.get(null),V=A(Q,i.useCallback(T=>Q.selectors.isTop(T,t),[Q,t])),[j,h]=A(L,T=>[T.buttonElement,T.optionsElement]);pt(V,[j,h],(T,W)=>{L.send({type:Ze.CloseListbox}),Pt(W,Mt.Loose)||(T.preventDefault(),j==null||j.focus())});let B=i.useMemo(()=>({open:D===E.Open,disabled:m,invalid:p,value:$}),[D,m,p,$]),[ue,ce]=en({inherit:!0}),de={ref:P},te=i.useCallback(()=>{if(O!==void 0)return R==null?void 0:R(O)},[R,O]),pe=Z();return S.createElement(ce,{value:ue,props:{htmlFor:j==null?void 0:j.id},slot:{open:D===E.Open,disabled:m}},S.createElement(ft,null,S.createElement(Xe.Provider,{value:L},S.createElement(se.Provider,{value:b},S.createElement(vt,{value:q(D,{[E.Open]:le.Open,[E.Closed]:le.Closed})},s!=null&&$!=null&&S.createElement(Gt,{disabled:m,data:{[s]:$},form:a,onReset:te}),pe({ourProps:de,theirProps:w,slot:B,defaultTag:Sn,name:"Listbox"}))))))}let $n="button";function En(e,n){let t=i.useId(),r=Ve(),o=ee("Listbox.Button"),l=xe("Listbox.Button"),{id:a=r||`headlessui-listbox-button-${t}`,disabled:s=o.disabled||!1,autoFocus:c=!1,...d}=e,p=G(n,Rt(),l.actions.setButtonElement),m=Ct(),[f,u,x]=A(l,h=>[h.listboxState,h.buttonElement,h.optionsElement]),w=f===E.Open;dn(w,{trigger:u,action:i.useCallback(h=>{if(u!=null&&u.contains(h.target))return ne.Ignore;let B=h.target.closest('[role="option"]:not([data-disabled])');return je(B)?ne.Select(B):x!=null&&x.contains(h.target)?ne.Ignore:ne.Close},[u,x]),close:l.actions.closeListbox,select:l.actions.selectActiveOption});let y=C(h=>{switch(h.key){case I.Enter:Vt(h.currentTarget);break;case I.Space:case I.ArrowDown:h.preventDefault(),l.actions.openListbox({focus:o.value?g.Nothing:g.First});break;case I.ArrowUp:h.preventDefault(),l.actions.openListbox({focus:o.value?g.Nothing:g.Last});break}}),P=C(h=>{switch(h.key){case I.Space:h.preventDefault();break}}),O=C(h=>{var B;if(h.button===0){if(Lt(h.currentTarget))return h.preventDefault();l.state.listboxState===E.Open?(Y.flushSync(()=>l.actions.closeListbox()),(B=l.state.buttonElement)==null||B.focus({preventScroll:!0})):(h.preventDefault(),l.actions.openListbox({focus:g.Nothing}))}}),$=C(h=>h.preventDefault()),R=Ge([a]),L=Yt(),{isFocusVisible:N,focusProps:U}=kt({autoFocus:c}),{isHovered:M,hoverProps:z}=Dt({isDisabled:s}),{pressed:b,pressProps:D}=Ft({disabled:s}),Q=i.useMemo(()=>({open:f===E.Open,active:b||f===E.Open,disabled:s,invalid:o.invalid,value:o.value,hover:M,focus:N,autofocus:c}),[f,o.value,s,M,N,b,o.invalid,c]),V=A(l,h=>h.listboxState===E.Open),j=Be(m(),{ref:p,id:a,type:Tt(e,u),"aria-haspopup":"listbox","aria-controls":x==null?void 0:x.id,"aria-expanded":V,"aria-labelledby":R,"aria-describedby":L,disabled:s||void 0,autoFocus:c,onKeyDown:y,onKeyUp:P,onKeyPress:$,onPointerDown:O},U,z,D);return Z()({ourProps:j,theirProps:d,slot:Q,defaultTag:$n,name:"Listbox.Button"})}let qe=i.createContext(!1),wn="div",In=we.RenderStrategy|we.Static;function Rn(e,n){let t=i.useId(),{id:r=`headlessui-listbox-options-${t}`,anchor:o,portal:l=!1,modal:a=!0,transition:s=!1,...c}=e,d=bt(o),[p,m]=i.useState(null);d&&(l=!0);let f=ee("Listbox.Options"),u=xe("Listbox.Options"),[x,w,y,P]=A(u,v=>[v.listboxState,v.buttonElement,v.optionsElement,v.__demoMode]),O=$e(w),$=$e(y),R=ht(),[L,N]=gt(s,p,R!==null?(R&le.Open)===le.Open:x===E.Open);xt(L,w,u.actions.closeListbox);let U=P?!1:a&&x===E.Open;Ot(U,$);let M=P?!1:a&&x===E.Open;sn(M,{allowed:i.useCallback(()=>[w,y],[w,y])});let z=x!==E.Open,b=mn(z,w)?!1:L,D=L&&x===E.Closed,Q=fn(D,f.value),V=C(v=>f.compare(Q,v)),j=A(u,v=>{var F;if(d==null||!((F=d==null?void 0:d.to)!=null&&F.includes("selection")))return null;let X=v.options.findIndex(fe=>V(fe.dataRef.current.value));return X===-1&&(X=0),X}),h=(()=>{if(d==null)return;if(j===null)return{...d,inner:void 0};let v=Array.from(f.listRef.current.values());return{...d,inner:{listRef:{current:v},index:j}}})(),[B,ue]=St(h),ce=yt(),de=G(n,d?B:null,u.actions.setOptionsElement,m),te=Te();i.useEffect(()=>{var v;let F=y;F&&x===E.Open&&F!==((v=Ne(F))==null?void 0:v.activeElement)&&(F==null||F.focus({preventScroll:!0}))},[x,y]);let pe=C(v=>{var F,X;switch(te.dispose(),v.key){case I.Space:if(u.state.searchQuery!=="")return v.preventDefault(),v.stopPropagation(),u.actions.search(v.key);case I.Enter:if(v.preventDefault(),v.stopPropagation(),u.state.activeOptionIndex!==null){let{dataRef:fe}=u.state.options[u.state.activeOptionIndex];u.actions.onChange(fe.current.value)}f.mode===_.Single&&(Y.flushSync(()=>u.actions.closeListbox()),(F=u.state.buttonElement)==null||F.focus({preventScroll:!0}));break;case q(f.orientation,{vertical:I.ArrowDown,horizontal:I.ArrowRight}):return v.preventDefault(),v.stopPropagation(),u.actions.goToOption({focus:g.Next});case q(f.orientation,{vertical:I.ArrowUp,horizontal:I.ArrowLeft}):return v.preventDefault(),v.stopPropagation(),u.actions.goToOption({focus:g.Previous});case I.Home:case I.PageUp:return v.preventDefault(),v.stopPropagation(),u.actions.goToOption({focus:g.First});case I.End:case I.PageDown:return v.preventDefault(),v.stopPropagation(),u.actions.goToOption({focus:g.Last});case I.Escape:v.preventDefault(),v.stopPropagation(),Y.flushSync(()=>u.actions.closeListbox()),(X=u.state.buttonElement)==null||X.focus({preventScroll:!0});return;case I.Tab:v.preventDefault(),v.stopPropagation(),Y.flushSync(()=>u.actions.closeListbox()),$t(u.state.buttonElement,v.shiftKey?Ee.Previous:Ee.Next);break;default:v.key.length===1&&(u.actions.search(v.key),te.setTimeout(()=>u.actions.clearSearch(),350));break}}),T=A(u,v=>{var F;return(F=v.buttonElement)==null?void 0:F.id}),W=i.useMemo(()=>({open:x===E.Open}),[x]),We=Be(d?ce():{},{id:r,ref:de,"aria-activedescendant":A(u,u.selectors.activeDescendantId),"aria-multiselectable":f.mode===_.Multi?!0:void 0,"aria-labelledby":T,"aria-orientation":f.orientation,onKeyDown:pe,role:"listbox",tabIndex:x===E.Open?0:void 0,style:{...c.style,...ue,"--button-width":wt(w,!0).width},...Et(N)}),Je=Z(),et=i.useMemo(()=>f.mode===_.Multi?f:{...f,isSelected:V},[f,V]);return S.createElement(It,{enabled:l?e.static||L:!1,ownerDocument:O},S.createElement(se.Provider,{value:et},Je({ourProps:We,theirProps:c,slot:W,defaultTag:wn,features:In,visible:b,name:"Listbox.Options"})))}let Cn="div";function Ln(e,n){let t=i.useId(),{id:r=`headlessui-listbox-option-${t}`,disabled:o=!1,value:l,...a}=e,s=i.useContext(qe)===!0,c=ee("Listbox.Option"),d=xe("Listbox.Option"),p=A(d,b=>d.selectors.isActive(b,r)),m=c.isSelected(l),f=i.useRef(null),u=hn(f),x=mt({disabled:o,value:l,domRef:f,get textValue(){return u()}}),w=G(n,f,b=>{b?c.listRef.current.set(r,b):c.listRef.current.delete(r)}),y=A(d,b=>d.selectors.shouldScrollIntoView(b,r));H(()=>{if(y)return Ae().requestAnimationFrame(()=>{var b,D;(D=(b=f.current)==null?void 0:b.scrollIntoView)==null||D.call(b,{block:"nearest"})})},[y,f]),H(()=>{if(!s)return d.actions.registerOption(r,x),()=>d.actions.unregisterOption(r)},[x,r,s]);let P=C(b=>{var D;if(o)return b.preventDefault();d.actions.onChange(l),c.mode===_.Single&&(Y.flushSync(()=>d.actions.closeListbox()),(D=d.state.buttonElement)==null||D.focus({preventScroll:!0}))}),O=C(()=>{if(o)return d.actions.goToOption({focus:g.Nothing});d.actions.goToOption({focus:g.Specific,id:r})}),$=pn(),R=C(b=>{$.update(b),!o&&(p||d.actions.goToOption({focus:g.Specific,id:r},be.Pointer))}),L=C(b=>{$.wasMoved(b)&&(o||p||d.actions.goToOption({focus:g.Specific,id:r},be.Pointer))}),N=C(b=>{$.wasMoved(b)&&(o||p&&d.actions.goToOption({focus:g.Nothing}))}),U=i.useMemo(()=>({active:p,focus:p,selected:m,disabled:o,selectedOption:m&&s}),[p,m,o,s]),M=s?{}:{id:r,ref:w,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":m,disabled:void 0,onClick:P,onFocus:O,onPointerEnter:R,onMouseEnter:R,onPointerMove:L,onMouseMove:L,onPointerLeave:N,onMouseLeave:N},z=Z();return!m&&s?null:z({ourProps:M,theirProps:a,slot:U,defaultTag:Cn,name:"Listbox.Option"})}let kn=i.Fragment;function Dn(e,n){let{options:t,placeholder:r,...o}=e,l={ref:G(n)},a=ee("ListboxSelectedOption"),s=i.useMemo(()=>({}),[]),c=a.value===void 0||a.value===null||a.mode===_.Multi&&Array.isArray(a.value)&&a.value.length===0,d=Z();return S.createElement(qe.Provider,{value:!0},d({ourProps:l,theirProps:{...o,children:S.createElement(S.Fragment,null,r&&c?r:t)},slot:s,defaultTag:kn,name:"ListboxSelectedOption"}))}let Fn=K(yn),Tn=K(En),Pn=on,Mn=K(Rn),An=K(Ln),Nn=K(Dn),oe=Object.assign(Fn,{Button:Tn,Label:Pn,Options:Mn,Option:An,SelectedOption:Nn});function jn({title:e,titleId:n,...t},r){return i.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:r,"aria-labelledby":n},t),e?i.createElement("title",{id:n},e):null,i.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.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z",clipRule:"evenodd"}))}const Hn=i.forwardRef(jn);function Kn({options:e,value:n=[]}){const[t,r]=i.useState([]);return i.useEffect(()=>{r(n)},[n]),k.jsx(oe,{value:t,onChange:o=>{var l;r(o);for(const a in e)(l=e[a])==null||l.call(e,o.includes(a))},multiple:!0,children:k.jsxs("div",{className:"relative flex",children:[k.jsxs(oe.Button,{className:"flex items-center relative w-full bg-primary-10 text-xs rounded-full text-primary-500 py-1 px-2 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 cursor-pointer",children:[k.jsxs("span",{className:"flex truncate items-center",children:[k.jsx(Bt,{className:"h-3 w-3 mr-0 sm:mr-1"})," ",k.jsx("span",{className:"sr-only sm:not-sr-only",children:"Show"})]}),k.jsx(Nt,{className:"ml-2 h-4 w-4","aria-hidden":"true"})]}),k.jsx(At,{as:i.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:k.jsx(oe.Options,{className:"absolute top-8 right-0 z-50 max-h-60 min-w-16 overflow-auto rounded-md bg-theme py-2 shadow-lg ring-2 ring-primary-10 ring-opacity-5 focus:outline-none sm:text-sm",children:Object.keys(e).filter(o=>e[o]).map(o=>k.jsx(oe.Option,{className:({active:l,disabled:a})=>Oe("relative cursor-default select-none py-1 pl-10 pr-4",a?"opacity-50 cursor-not-allowed":"",l?"bg-primary-10 text-primary-500":"text-neutral-700 dark:text-neutral-300"),value:o,disabled:tt(!!e[o]),children:({selected:l})=>k.jsxs(k.Fragment,{children:[k.jsx("span",{children:o}),k.jsx("span",{className:Oe("absolute inset-y-0 left-0 flex items-center pl-3 text-primary-500",l?"block":"hidden"),children:k.jsx(jt,{className:"h-4 w-4","aria-hidden":"true"})})]})},o))})})]})})}export{Ke as C,Hn as F,Vn as H,Kn as L,Ge as N,en as Q,zt as T,Yt as U,on as V,he as a,pn as b,g as c,mn as d,an as e,re as f,ne as g,Gt as j,dn as k,Qt as l,Vt as p,hn as s,Ve as u,Qn as w,sn as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,R as r,j as s,c as D,B as Q,l as P,m as ee,aA as ie,g as le,v as H,b as F,i as U,V as ce,Y as de,aB as ue,t as me,L as te,S as se,D as q,H as fe}from"./index-EyUZDtV7.js";import{d as he,e as ne,f as G,P as ae,h as B,b as $,i as pe,E as W,R as ge,j as we,k as xe,l as ve,m as Y,n as X,o as J,p as ye,q as Ne,r as be,s as Ee}from"./context-DeHggMKx.js";import{W as ke}from"./editor-intN6ort.js";import{F as ze,L as Ce}from"./ListboxShow-CVN-1wre.js";import{S as Me}from"./SearchList-CJR2axiJ.js";import{t as Se}from"./Input-BmfZ-VnW.js";import{U as T}from"./popover-CA0_-cE5.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./floating-ui.react-dom-dR28niet.js";import"./file-ZamfLSgo.js";import"./project-BX-rNI7d.js";import"./help-6Q7f7fjd.js";import"./SourceList-CXyYEJjr.js";import"./index-BObtdpsN.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 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 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 _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 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 _=({children:e,className:t,...n})=>r.createElement("button",{type:"button",className:B(["react-flow__controls-button",t]),...n},e);_.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(),[C,k]=o.useState(!1),{isInteractive:w,minZoomReached:x,maxZoomReached:u}=ne(Fe,Ie),{zoomIn:v,zoomOut:E,fitView:m}=G();if(o.useEffect(()=>{k(!0)},[]),!C)return null;const j=()=>{v(),i==null||i()},z=()=>{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:B(["react-flow__controls",p]),position:N,style:e,"data-testid":"rf__controls"},t&&r.createElement(r.Fragment,null,r.createElement(_,{onClick:j,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:u},r.createElement(He,null)),r.createElement(_,{onClick:z,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:x},r.createElement(Oe,null))),n&&r.createElement(_,{className:"react-flow__controls-fitview",onClick:S,title:"fit view","aria-label":"fit view"},r.createElement(Re,null)),a&&r.createElement(_,{className:"react-flow__controls-interactive",onClick:y,title:"toggle interactivity","aria-label":"toggle interactivity"},w?r.createElement(_e,null):r.createElement(De,null)),c)};re.displayName="Controls";var $e=o.memo(re);function Ue(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 Ve({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 Ae({color:e,radius:t}){return r.createElement("circle",{cx:t,cy:t,r:t,fill:e})}const We={[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,Ue),g=l||We[t],C=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=C*c[2],E=w?[v,v]:u,m=k?[v/i,v/i]:[E[0]/i,E[1]/i];return r.createElement("svg",{className:B(["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(Ae,{color:g,radius:v/i}):r.createElement(Ve,{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 Ge=o.memo(oe);function Be({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 C(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:D("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:D("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:D("w-full @sm:min-w-[12rem] @[40rem]:flex",i?"flex max-w-none":"hidden max-w-[20rem]"),isFullWidth:!0,onInput:C}),s.jsx("button",{className:D("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(ze,{className:"w-6 h-6 text-primary-500"})})]})}function K({nodes:e=[]}){const{setCenter:t}=G(),{activeNodes:n,models:a,mainNode:d,nodesMap:i,selectedNodes:l,setSelectedNodes:f,withImpacted:h,connectedNodes:p,lineageCache:c,setActiveEdges:N,setConnections:g,setLineage:C,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===W.external||y.data.type===W.seed)).length,j=e.filter(y=>F(y.hidden)&&y.data.type===W.cte).length,z=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:[U(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]}),z&&s.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[s.jsx("b",{children:"Active:"})," ",x]}),(z||u>0||U(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),U(c)&&(C(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(z)&&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:C,models:k,unknownModels:w}=$(),{refetch:x,isFetching:u,cancel:v}=ue(e.name),{isFetching:E}=me(),[m,j]=o.useState(!1),[z,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(z??{}).forEach(b=>{b=encodeURI(b),F(k.has(b))&&F(w.has(b))&&w.add(b)}),C(new Set(w))},[z,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:C,handleError:k,setActiveNodes:w}=$(),{setCenter:x}=G(),[u,v]=o.useState(!1),E=o.useMemo(()=>({model:we}),[]),m=o.useMemo(()=>xe(t),[t]),j=o.useMemo(()=>ve(t),[t]),[z,S]=o.useState([]),[y,O]=o.useState([]);o.useEffect(()=>{if(q(m)||H(n))return;v(!0);const I=Y(m,p,a,g),V=X(Object.values(g),I,n,c,d,N,i,l,f),A=J(m,N,p,I,a,d,c,i,l,f),Z=ye({nodesMap:g,nodes:V,edges:A});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];U(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(z))return;const I=Y(m,p,a,g),V=X(z,I,n,c,d,N,i,l,f),A=J(m,N,p,I,a,d,c,i,l,f);O(A),S(V),w(I)},[N,g,m,p,d,a,c,i,l,f,e,n]);function b(I){S(Ee(I,z))}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:z,edges:y,nodeTypes:E,onNodesChange:b,onEdgesChange:L,nodeOrigin:[.5,.5],minZoom:.05,maxZoom:1.5,snapGrid:[16,16],snapToGrid:!0,children:[C&&s.jsxs(ae,{position:"top-right",className:"bg-theme !m-0 w-full !z-10",children:[s.jsx(Ye,{nodes:z}),s.jsx(fe,{})]}),s.jsx($e,{className:"bg-light p-1 rounded-md !border-none !shadow-lg"}),s.jsx(Ge,{variant:M.Cross,gap:32,size:4,className:D(h?"opacity-100 stroke-neutral-200 dark:stroke-neutral-800":"opacity-0")})]})]})}function Ye({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:C,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,{as:"div",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(Be,{handleSelect:v}),s.jsx(Ce,{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:C,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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{x as B,Q as M,s as $,a as d,r as x,t as L,v as m,i as h,e as b,j as s,G as F,g as T,l as E,H as z,U as K,a7 as P,O as A,D as O,b as R}from"./index-EyUZDtV7.js";import{S as k,b as w,m as C,n as D,o as G,p as H,f as I,g as U}from"./SearchList-CJR2axiJ.js";import{P as Q}from"./Page-DrM7FMiZ.js";import{g as W}from"./context-DeHggMKx.js";import{u as f}from"./project-BX-rNI7d.js";import"./Input-BmfZ-VnW.js";import"./floating-ui.react-dom-dR28niet.js";import"./help-6Q7f7fjd.js";import"./popover-CA0_-cE5.js";import"./SplitPane-B5WJSZPo.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./editor-intN6ort.js";import"./file-ZamfLSgo.js";import"./SourceList-CXyYEJjr.js";import"./index-BObtdpsN.js";function ne({route:g=b.Home}){const{pathname:j}=B(),{modelName:i}=M(),u=$(),n=d(e=>e.models),r=d(e=>e.lastSelectedModel),N=d(e=>e.setLastSelectedModel),p=f(e=>e.files),S=f(e=>e.setSelectedFile),l=x.useMemo(()=>Array.from(new Set(n.values())),[n]),{isFetching:c}=L(),t=`${g}/models`,a=m(i)||i===(r==null?void 0:r.name)?r:n.get(encodeURI(i));x.useEffect(()=>{if(m(a))return;const e=p.get(a.path);h(e)&&S(e),N(a),u(`${t}/${a.name}`,{replace:!0})},[p,a,t]);const v=m(a)&&h(i)&&R(c);return s.jsx(Q,{sidebar:O(l)?void 0:s.jsx(w,{"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(D.categorize(l)).map(([e,y])=>s.jsx(G,{headline:e,open:!0,children:y.map(o=>s.jsx(H,{size:"xs","hide-icon":!0,active:j===`${t}/${o.name}`,value:`${t}/${o.name}`,"search-value":o.displayName,compact:!0,children:s.jsx(I,{"hide-schema":!0,"hide-catalog":!0,"hide-tooltip":!0,text:o.displayName,children:s.jsx(U,{size:"2xs",slot:"after",children:W(o.type)})})},o.name))},e))})}),content:s.jsx(F.Page,{children:s.jsxs("div",{className:"flex flex-col w-full h-full overflow-hidden",children:[T(l)&&s.jsx(k,{list:l,size:E.lg,searchBy:"index",displayBy:"displayName",to:e=>`${t}/${e.name}`,direction:"top",className:"p-2",isFullWidth:!0,disabled:c}),s.jsx(z,{}),v?s.jsx(K,{link:t,message:"Go Back",description:`Model "${i}" not found.`}):c?s.jsx(P,{children:"Loading Model page..."}):s.jsx(A,{})]})})})}export{ne as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n,j as e,
|
|
1
|
+
import{a as n,j as e,v as f}from"./index-EyUZDtV7.js";import{S as r}from"./SplitPane-B5WJSZPo.js";function h({sidebar:s,content:i}){const a=n(l=>l.splitPaneSizes),t=n(l=>l.setSplitPaneSizes);return e.jsx(e.Fragment,{children:f(s)?e.jsx("div",{className:"flex w-full h-full overflow-hidden justify-center",children:i}):e.jsxs(r,{sizes:a,minSize:[0,0],snapOffset:0,className:"flex w-full h-full overflow-hidden",onDragEnd:t,children:[e.jsx("div",{className:"w-full h-full overflow-hidden",children:s}),e.jsx("div",{className:"w-full h-full overflow-hidden",children:i})]})})}export{h as P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{s as m,x as p,a as l,r,i as u,e,j as i,O as c}from"./index-EyUZDtV7.js";import{P as f}from"./Page-DrM7FMiZ.js";import{u as v}from"./plan-gWbTulhw.js";import"./SplitPane-B5WJSZPo.js";function E(){const s=m(),t=p(),o=l(n=>n.environment),a=v(n=>n.planApply);return r.useEffect(()=>{if(a.isRunning&&u(a.environment)){const n=`${e.Plan}/environments/${a.environment}`;t.pathname!==n&&s(n,{replace:!0})}else(t.pathname===e.Plan||t.pathname===`${e.Plan}/environments`)&&s(`${e.Plan}/environments/${o.name}`,{replace:!0})},[t,a.isRunning]),r.useEffect(()=>{s(`${e.Plan}/environments/${o.name}`,{replace:!0})},[o]),i.jsx(f,{content:i.jsx(c,{})})}export{E as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{K as D,y as k,aq as A,o as S,L as z,Q as _,a6 as J,d as T,w as I,v as X,aa as G,ab as Q,J as Y,$ as ee,W as te,X as ae,Y as re,_ as M,a0 as se,i as U,R as H,Z as ne,a as C}from"./popover-CA0_-cE5.js";import{R as x,r as s,a1 as oe}from"./index-EyUZDtV7.js";import{c as ie}from"./_commonjs-dynamic-modules-TDtrdbi3.js";var V;let le=(V=x.startTransition)!=null?V:function(e){e()};var ue=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(ue||{}),ce=(e=>(e[e.ToggleDisclosure=0]="ToggleDisclosure",e[e.CloseDisclosure=1]="CloseDisclosure",e[e.SetButtonId=2]="SetButtonId",e[e.SetPanelId=3]="SetPanelId",e[e.SetButtonElement=4]="SetButtonElement",e[e.SetPanelElement=5]="SetPanelElement",e))(ce||{});let de={0:e=>({...e,disclosureState:T(e.disclosureState,{0:1,1:0})}),1:e=>e.disclosureState===1?e:{...e,disclosureState:1},2(e,r){return e.buttonId===r.buttonId?e:{...e,buttonId:r.buttonId}},3(e,r){return e.panelId===r.panelId?e:{...e,panelId:r.panelId}},4(e,r){return e.buttonElement===r.element?e:{...e,buttonElement:r.element}},5(e,r){return e.panelElement===r.element?e:{...e,panelElement:r.element}}},O=s.createContext(null);O.displayName="DisclosureContext";function j(e){let r=s.useContext(O);if(r===null){let i=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,j),i}return r}let F=s.createContext(null);F.displayName="DisclosureAPIContext";function K(e){let r=s.useContext(F);if(r===null){let i=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,K),i}return r}let q=s.createContext(null);q.displayName="DisclosurePanelContext";function pe(){return s.useContext(q)}function me(e,r){return T(r.type,de,e,r)}let fe=s.Fragment;function he(e,r){let{defaultOpen:i=!1,...l}=e,f=s.useRef(null),h=k(r,A(t=>{f.current=t},e.as===void 0||e.as===s.Fragment)),$=s.useReducer(me,{disclosureState:i?0:1,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:o,buttonId:u},y]=$,p=S(t=>{y({type:1});let a=se(f);if(!a||!u)return;let c=t?U(t)?t:"current"in t&&U(t.current)?t.current:a.getElementById(u):a.getElementById(u);c==null||c.focus()}),E=s.useMemo(()=>({close:p}),[p]),v=s.useMemo(()=>({open:o===0,close:p}),[o,p]),b={ref:h},n=z();return x.createElement(O.Provider,{value:$},x.createElement(F.Provider,{value:E},x.createElement(_,{value:p},x.createElement(J,{value:T(o,{0:I.Open,1:I.Closed})},n({ourProps:b,theirProps:l,slot:v,defaultTag:fe,name:"Disclosure"})))))}let $e="button";function ge(e,r){let i=s.useId(),{id:l=`headlessui-disclosure-button-${i}`,disabled:f=!1,autoFocus:h=!1,...$}=e,[o,u]=j("Disclosure.Button"),y=pe(),p=y===null?!1:y===o.panelId,E=s.useRef(null),v=k(E,r,S(g=>{if(!p)return u({type:4,element:g})}));s.useEffect(()=>{if(!p)return u({type:2,buttonId:l}),()=>{u({type:2,buttonId:null})}},[l,u,p]);let b=S(g=>{var P;if(p){if(o.disclosureState===1)return;switch(g.key){case C.Space:case C.Enter:g.preventDefault(),g.stopPropagation(),u({type:0}),(P=o.buttonElement)==null||P.focus();break}}else switch(g.key){case C.Space:case C.Enter:g.preventDefault(),g.stopPropagation(),u({type:0});break}}),n=S(g=>{switch(g.key){case C.Space:g.preventDefault();break}}),t=S(g=>{var P;ne(g.currentTarget)||f||(p?(u({type:0}),(P=o.buttonElement)==null||P.focus()):u({type:0}))}),{isFocusVisible:a,focusProps:c}=ee({autoFocus:h}),{isHovered:d,hoverProps:m}=te({isDisabled:f}),{pressed:w,pressProps:B}=ae({disabled:f}),N=s.useMemo(()=>({open:o.disclosureState===0,hover:d,active:w,disabled:f,focus:a,autofocus:h}),[o,d,w,a,f,h]),L=re(e,o.buttonElement),W=p?M({ref:v,type:L,disabled:f||void 0,autoFocus:h,onKeyDown:b,onClick:t},c,m,B):M({ref:v,id:l,type:L,"aria-expanded":o.disclosureState===0,"aria-controls":o.panelElement?o.panelId:void 0,disabled:f||void 0,autoFocus:h,onKeyDown:b,onKeyUp:n,onClick:t},c,m,B);return z()({ourProps:W,theirProps:$,slot:N,defaultTag:$e,name:"Disclosure.Button"})}let ve="div",be=H.RenderStrategy|H.Static;function ye(e,r){let i=s.useId(),{id:l=`headlessui-disclosure-panel-${i}`,transition:f=!1,...h}=e,[$,o]=j("Disclosure.Panel"),{close:u}=K("Disclosure.Panel"),[y,p]=s.useState(null),E=k(r,S(d=>{le(()=>o({type:5,element:d}))}),p);s.useEffect(()=>(o({type:3,panelId:l}),()=>{o({type:3,panelId:null})}),[l,o]);let v=X(),[b,n]=G(f,y,v!==null?(v&I.Open)===I.Open:$.disclosureState===0),t=s.useMemo(()=>({open:$.disclosureState===0,close:u}),[$.disclosureState,u]),a={ref:E,id:l,...Q(n)},c=z();return x.createElement(Y,null,x.createElement(q.Provider,{value:$.panelId},c({ourProps:a,theirProps:h,slot:t,defaultTag:ve,features:be,visible:b,name:"Disclosure.Panel"})))}let Ee=D(he),we=D(ge),xe=D(ye),Te=Object.assign(Ee,{Button:we,Panel:xe});var R={exports:{}},Se=R.exports,Z;function Pe(){return Z||(Z=1,function(e,r){(function(i,l){typeof ie=="function"?e.exports=l():i.pluralize=l()})(Se,function(){var i=[],l=[],f={},h={},$={};function o(t){return typeof t=="string"?new RegExp("^"+t+"$","i"):t}function u(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 y(t,a){return t.replace(/\$(\d{1,2})/g,function(c,d){return a[d]||""})}function p(t,a){return t.replace(a[0],function(c,d){var m=y(a[1],arguments);return u(c===""?t[d-1]:c,m)})}function E(t,a,c){if(!t.length||f.hasOwnProperty(t))return a;for(var d=c.length;d--;){var m=c[d];if(m[0].test(a))return p(a,m)}return a}function v(t,a,c){return function(d){var m=d.toLowerCase();return a.hasOwnProperty(m)?u(d,m):t.hasOwnProperty(m)?u(d,t[m]):E(m,d,c)}}function b(t,a,c,d){return function(m){var w=m.toLowerCase();return a.hasOwnProperty(w)?!0:t.hasOwnProperty(w)?!1:E(w,w,c)===w}}function n(t,a,c){var d=a===1?n.singular(t):n.plural(t);return(c?a+" ":"")+d}return n.plural=v($,h,i),n.isPlural=b($,h,i),n.singular=v(h,$,l),n.isSingular=b(h,$,l),n.addPluralRule=function(t,a){i.push([o(t),a])},n.addSingularRule=function(t,a){l.push([o(t),a])},n.addUncountableRule=function(t){if(typeof t=="string"){f[t.toLowerCase()]=!0;return}n.addPluralRule(t,"$0"),n.addSingularRule(t,"$0")},n.addIrregularRule=function(t,a){a=a.toLowerCase(),t=t.toLowerCase(),$[t]=a,h[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 n.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 n.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 n.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(n.addUncountableRule),n})}(R)),R.exports}var Ce=Pe();const Oe=oe(Ce);function Re({title:e,titleId:r,...i},l){return s.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:l,"aria-labelledby":r},i),e?s.createElement("title",{id:r},e):null,s.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 je=s.forwardRef(Re);function Ie({title:e,titleId:r,...i},l){return s.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:l,"aria-labelledby":r},i),e?s.createElement("title",{id:r},e):null,s.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 Fe=s.forwardRef(Ie);export{je as F,Te as V,Fe as a,Oe as p};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as f,r as c,j as e,c as u,B as j,m as p,l as b,a as g,v,i as d,P as w,a4 as N,H as y}from"./index-EyUZDtV7.js";import{p as k,V as n,F as x,a as m}from"./PlusCircleIcon-DPJ5E9WX.js";import{S as z}from"./SplitPane-B5WJSZPo.js";import{U as h,z as E}from"./popover-CA0_-cE5.js";function C(){const{errors:l,clearErrors:a}=f(),[t,i]=c.useState(!1);c.useEffect(()=>{l.size<1&&i(!1)},[l]);const r=l.size>0;return e.jsx(h,{onMouseEnter:()=>{i(r)},onMouseLeave:()=>{i(!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:c.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(F,{scope:s.key,error:s})},s.id))})]})})]})})}function F({error:l,scope:a,withSplitPane:t=!1}){const{removeError:i}=f(),r=g(s=>s.version);return e.jsxs("div",{className:"flex flex-col w-full h-full overflow-hidden",children:[v(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(),i(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:w(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{F as D,C as R};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var Kt=Object.defineProperty;var Jt=(t,e,r)=>e in t?Kt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var se=(t,e,r)=>Jt(t,typeof e!="symbol"?e+"":e,r);import{r as s,j as o,N as Qt,c as B,b as z,d as yt,a as E,e as q,R as b,f as je,g as oe,h as Ye,k as Ue,B as Be,l as jt,m as ze,n as kt,L as Xt,S as _e,o as en,p as tn,q as nn,s as Ct,t as Ft,v as $,w as rn,i as D,x as an,y as sn,z as on,A as Oe,C as ln,D as cn,F as lt,G as un,H as it,O as dn}from"./index-EyUZDtV7.js";import{R as mn}from"./ReportErrors-DXdPHMbP.js";import{u as j,M as fn,a as Ve,E as ie}from"./plan-gWbTulhw.js";import{E as Z,P as ct,S as pn}from"./SelectEnvironment-BhhJ4ZjZ.js";import{o as ee,i as qe,f as vn,I as Ge,E as Nt,a as hn,n as At,K as ce,y as Fe,l as Rt,b as Pt,u as gn,c as ke,d as We,e as Ee,g as ve,T as Q,p as xn,L as he,h as ut,s as dt,j as wn,k as Y,m as Tt,t as bn,q as Mt,r as mt,v as $t,P as ft,z as Ce,F as Dt,w as ye,x as En,A as yn,H as jn,B as kn,S as Cn,C as Fn,D as Nn,G as An,J as Rn,M as pt,N as Pn,O as Tn,Q as Mn,R as vt,U as ht}from"./popover-CA0_-cE5.js";import{F as $n}from"./ChevronRightIcon-Bcz9goZS.js";import{u as J,M as Ze}from"./project-BX-rNI7d.js";import{H as Dn,y as Ln,w as Sn}from"./ListboxShow-CVN-1wre.js";import{M as gt}from"./file-ZamfLSgo.js";import{u as ne,c as On}from"./editor-intN6ort.js";import{EnumFileExplorerChange as He}from"./context-Dwh4I8fp.js";import"./PlusCircleIcon-DPJ5E9WX.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./SplitPane-B5WJSZPo.js";import"./context-DeHggMKx.js";import"./floating-ui.react-dom-dR28niet.js";import"./help-6Q7f7fjd.js";import"./SourceList-CXyYEJjr.js";import"./Input-BmfZ-VnW.js";import"./index-BObtdpsN.js";import"./ModelLineage-DxdKn0Xe.js";import"./SearchList-CJR2axiJ.js";import"./ChevronDownIcon-BCSgClK9.js";function Zn({title:t,titleId:e,...r},a){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:a,"aria-labelledby":e},r),t?s.createElement("title",{id:e},t):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 Hn=s.forwardRef(Zn);function In({title:t,titleId:e,...r},a){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:a,"aria-labelledby":e},r),t?s.createElement("title",{id:e},t):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 Bn=s.forwardRef(In);function zn({title:t,titleId:e,...r},a){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:a,"aria-labelledby":e},r),t?s.createElement("title",{id:e},t):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 _n=s.forwardRef(zn);function Vn({title:t,titleId:e,...r},a){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:a,"aria-labelledby":e},r),t?s.createElement("title",{id:e},t):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 qn=s.forwardRef(Vn);function Wn({title:t,titleId:e,...r},a){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:a,"aria-labelledby":e},r),t?s.createElement("title",{id:e},t):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 Yn=s.forwardRef(Wn);function Un({title:t,titleId:e,...r},a){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:a,"aria-labelledby":e},r),t?s.createElement("title",{id:e},t):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 Gn=s.forwardRef(Un);function Kn({title:t,titleId:e,...r},a){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:a,"aria-labelledby":e},r),t?s.createElement("title",{id:e},t):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 Lt=s.forwardRef(Kn);function Jn({title:t,titleId:e,...r},a){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:a,"aria-labelledby":e},r),t?s.createElement("title",{id:e},t):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 Qn=s.forwardRef(Jn);function Xn({title:t,titleId:e,...r},a){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:a,"aria-labelledby":e},r),t?s.createElement("title",{id:e},t):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 xt=s.forwardRef(Xn);function er({title:t,titleId:e,...r},a){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:a,"aria-labelledby":e},r),t?s.createElement("title",{id:e},t):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 wt=s.forwardRef(er);function tr({title:t,titleId:e,...r},a){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:a,"aria-labelledby":e},r),t?s.createElement("title",{id:e},t):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 nr=s.forwardRef(tr);function rr({title:t,titleId:e,...r},a){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:a,"aria-labelledby":e},r),t?s.createElement("title",{id:e},t):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 ar=s.forwardRef(rr);function sr({title:t,titleId:e,...r},a){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:a,"aria-labelledby":e},r),t?s.createElement("title",{id:e},t):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 or=s.forwardRef(sr);function lr({title:t,titleId:e,...r},a){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:a,"aria-labelledby":e},r),t?s.createElement("title",{id:e},t):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 ir=s.forwardRef(lr);function cr({title:t,titleId:e,...r},a){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:a,"aria-labelledby":e},r),t?s.createElement("title",{id:e},t):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 St=s.forwardRef(cr);function ur({title:t,titleId:e,...r},a){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:a,"aria-labelledby":e},r),t?s.createElement("title",{id:e},t):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 dr=s.forwardRef(ur);function W({title:t,to:e,icon:r,iconActive:a,classActive:i="px-2 bg-neutral-10",disabled:l=!1,children:m,before:p,className:h}){return o.jsx(Qt,{title:t,to:e,className:({isActive:f})=>B("flex items-center",l&&"opacity-50 cursor-not-allowed",f&&z(l)&&i,h),style:({isActive:f})=>f||l?{pointerEvents:"none"}:{},children:({isActive:f})=>o.jsxs("span",{className:B("flex items-center",f?"font-bold":"font-normal"),children:[p,f?a:r,m]})})}function mr({className:t}){const{errors:e}=yt(),r=E(l=>l.models),a=E(l=>l.modules),i=Array.from(new Set(r.values())).length;return o.jsxs("div",{className:t,children:[a.hasEditor&&o.jsx(W,{title:"File Explorer",to:q.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(ir,{className:"min-w-6 w-6"}),iconActive:o.jsx(Gn,{className:"min-w-6 w-6"})}),a.hasDataCatalog&&o.jsx(W,{title:"Data Catalog",to:q.DataCatalog,icon:o.jsx(ar,{className:"min-w-6 w-6"}),iconActive:o.jsx(qn,{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})}),a.hasErrors&&o.jsx(W,{title:"Errors",to:q.Errors,className:B("relative px-2 py-1 rounded-xl my-1 h-10 hover:bg-neutral-5 dark:hover:bg-neutral-10",e.size>0?"text-danger-500":"text-neutral-600"),classActive:"px-2 bg-danger-10 text-danger-500",icon:o.jsx(or,{className:"w-6"}),iconActive:o.jsx(Yn,{className:"w-6"}),disabled:e.size===0,children:e.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:e.size})}),a.hasPlans&&o.jsx(W,{title:"Plan",to:q.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(St,{className:"w-6"}),iconActive:o.jsx(Lt,{className:"w-6"})}),a.hasTests&&o.jsx(W,{title:"Tests",to:q.Tests,icon:o.jsx(nr,{className:"w-6"}),iconActive:o.jsx(_n,{className:"w-6"}),className:"rounded-xl my-1 px-2 py-1 h-10 hover:bg-neutral-5 dark:hover:bg-neutral-10"}),a.hasAudits&&o.jsx(W,{title:"Audits",to:q.Audits,icon:o.jsx(dr,{className:"w-6"}),iconActive:o.jsx(Qn,{className:"w-6"}),className:"rounded-xl my-1 px-2 py-1 h-10 hover:bg-neutral-5 dark:hover:bg-neutral-10"}),a.hasData&&o.jsx(W,{title:"Data",to:q.Data,icon:o.jsx(wt,{className:"w-6"}),iconActive:o.jsx(wt,{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"}),a.hasLineage&&o.jsx(W,{title:"Lineage",to:q.Lineage,icon:o.jsx(xt,{className:"w-6"}),iconActive:o.jsx(xt,{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 Ke(t,e){let r=s.useRef([]),a=ee(t);s.useEffect(()=>{let i=[...r.current];for(let[l,m]of e.entries())if(r.current[l]!==m){let p=a(e,i);return r.current=e,p}},[a,...e])}function fr(t){function e(){document.readyState!=="loading"&&(t(),document.removeEventListener("DOMContentLoaded",e))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",e),e())}let X=[];fr(()=>{function t(e){if(!qe(e.target)||e.target===document.body||X[0]===e.target)return;let r=e.target;r=r.closest(vn),X.unshift(r??e.target),X=X.filter(a=>a!=null&&a.isConnected),X.splice(10)}window.addEventListener("click",t,{capture:!0}),window.addEventListener("mousedown",t,{capture:!0}),window.addEventListener("focus",t,{capture:!0}),document.body.addEventListener("click",t,{capture:!0}),document.body.addEventListener("mousedown",t,{capture:!0}),document.body.addEventListener("focus",t,{capture:!0})});function pr(t,e=typeof document<"u"?document.defaultView:null,r){let a=Ge(t,"escape");Nt(e,"keydown",i=>{a&&(i.defaultPrevented||i.key===hn.Escape&&r(i))})}function vr(){var t;let[e]=s.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[r,a]=s.useState((t=e==null?void 0:e.matches)!=null?t:!1);return At(()=>{if(!e)return;function i(l){a(l.matches)}return e.addEventListener("change",i),()=>e.removeEventListener("change",i)},[e]),r}function Ot(t){if(!t)return new Set;if(typeof t=="function")return new Set(t());let e=new Set;for(let r of t.current)bn(r.current)&&e.add(r.current);return e}let hr="div";var re=(t=>(t[t.None=0]="None",t[t.InitialFocus=1]="InitialFocus",t[t.TabLock=2]="TabLock",t[t.FocusLock=4]="FocusLock",t[t.RestoreFocus=8]="RestoreFocus",t[t.AutoFocus=16]="AutoFocus",t))(re||{});function gr(t,e){let r=s.useRef(null),a=Fe(r,e),{initialFocus:i,initialFocusFallback:l,containers:m,features:p=15,...h}=t;Rt()||(p=0);let f=Pt(r);Er(p,{ownerDocument:f});let w=yr(p,{ownerDocument:f,container:r,initialFocus:i,initialFocusFallback:l});jr(p,{ownerDocument:f,container:r,containers:m,previousActiveElement:w});let S=gn(),H=ee(c=>{if(!ke(r.current))return;let T=r.current;(A=>A())(()=>{We(S.current,{[Ee.Forwards]:()=>{ve(T,Q.First,{skipElements:[c.relatedTarget,l]})},[Ee.Backwards]:()=>{ve(T,Q.Last,{skipElements:[c.relatedTarget,l]})}})})}),N=Ge(!!(p&2),"focus-trap#tab-lock"),k=xn(),I=s.useRef(!1),v={ref:a,onKeyDown(c){c.key=="Tab"&&(I.current=!0,k.requestAnimationFrame(()=>{I.current=!1}))},onBlur(c){if(!(p&4))return;let T=Ot(m);ke(r.current)&&T.add(r.current);let A=c.relatedTarget;qe(A)&&A.dataset.headlessuiFocusGuard!=="true"&&(Zt(T,A)||(I.current?ve(r.current,We(S.current,{[Ee.Forwards]:()=>Q.Next,[Ee.Backwards]:()=>Q.Previous})|Q.WrapAround,{relativeTo:c.target}):qe(c.target)&&Y(c.target)))}},C=he();return b.createElement(b.Fragment,null,N&&b.createElement(ut,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:H,features:dt.Focusable}),C({ourProps:v,theirProps:h,defaultTag:hr,name:"FocusTrap"}),N&&b.createElement(ut,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:H,features:dt.Focusable}))}let xr=ce(gr),wr=Object.assign(xr,{features:re});function br(t=!0){let e=s.useRef(X.slice());return Ke(([r],[a])=>{a===!0&&r===!1&&Mt(()=>{e.current.splice(0)}),a===!1&&r===!0&&(e.current=X.slice())},[t,X,e]),ee(()=>{var r;return(r=e.current.find(a=>a!=null&&a.isConnected))!=null?r:null})}function Er(t,{ownerDocument:e}){let r=!!(t&8),a=br(r);Ke(()=>{r||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&Y(a())},[r]),wn(()=>{r&&Y(a())})}function yr(t,{ownerDocument:e,container:r,initialFocus:a,initialFocusFallback:i}){let l=s.useRef(null),m=Ge(!!(t&1),"focus-trap#initial-focus"),p=Tt();return Ke(()=>{if(t===0)return;if(!m){i!=null&&i.current&&Y(i.current);return}let h=r.current;h&&Mt(()=>{if(!p.current)return;let f=e==null?void 0:e.activeElement;if(a!=null&&a.current){if((a==null?void 0:a.current)===f){l.current=f;return}}else if(h.contains(f)){l.current=f;return}if(a!=null&&a.current)Y(a.current);else{if(t&16){if(ve(h,Q.First|Q.AutoFocus)!==mt.Error)return}else if(ve(h,Q.First)!==mt.Error)return;if(i!=null&&i.current&&(Y(i.current),(e==null?void 0:e.activeElement)===i.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}l.current=e==null?void 0:e.activeElement})},[i,m,t]),l}function jr(t,{ownerDocument:e,container:r,containers:a,previousActiveElement:i}){let l=Tt(),m=!!(t&4);Nt(e==null?void 0:e.defaultView,"focus",p=>{if(!m||!l.current)return;let h=Ot(a);ke(r.current)&&h.add(r.current);let f=i.current;if(!f)return;let w=p.target;ke(w)?Zt(h,w)?(i.current=w,Y(w)):(p.preventDefault(),p.stopPropagation(),Y(f)):Y(i.current)},!0)}function Zt(t,e){for(let r of t)if(r.contains(e))return!0;return!1}var kr=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(kr||{}),Cr=(t=>(t[t.SetTitleId=0]="SetTitleId",t))(Cr||{});let Fr={0(t,e){return t.titleId===e.id?t:{...t,titleId:e.id}}},Je=s.createContext(null);Je.displayName="DialogContext";function Ne(t){let e=s.useContext(Je);if(e===null){let r=new Error(`<${t} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ne),r}return e}function Nr(t,e){return We(e.type,Fr,t,e)}let bt=ce(function(t,e){let r=s.useId(),{id:a=`headlessui-dialog-${r}`,open:i,onClose:l,initialFocus:m,role:p="dialog",autoFocus:h=!0,__demoMode:f=!1,unmount:w=!1,...S}=t,H=s.useRef(!1);p=function(){return p==="dialog"||p==="alertdialog"?p:(H.current||(H.current=!0,console.warn(`Invalid role [${p}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let N=$t();i===void 0&&N!==null&&(i=(N&ye.Open)===ye.Open);let k=s.useRef(null),I=Fe(k,e),v=Pt(k),C=i?0:1,[c,T]=s.useReducer(Nr,{titleId:null,descriptionId:null,panelRef:s.createRef()}),A=ee(()=>l(!1)),ge=ee(y=>T({type:0,id:y})),U=Rt()?C===0:!1,[Ae,G]=En(),Re={get current(){var y;return(y=c.panelRef.current)!=null?y:k.current}},ue=yn(),{resolveContainers:de}=jn({mainTreeNode:ue,portals:Ae,defaultContainers:[Re]}),me=N!==null?(N&ye.Closing)===ye.Closing:!1;Ln(f||me?!1:U,{allowed:ee(()=>{var y,be;return[(be=(y=k.current)==null?void 0:y.closest("[data-headlessui-portal]"))!=null?be:null]}),disallowed:ee(()=>{var y;return[(y=ue==null?void 0:ue.closest("body > *:not(#headlessui-portal-root)"))!=null?y:null]})});let _=kn.get(null);At(()=>{if(U)return _.actions.push(a),()=>_.actions.pop(a)},[_,a,U]);let xe=Cn(_,s.useCallback(y=>_.selectors.isTop(y,a),[_,a]));Fn(xe,de,y=>{y.preventDefault(),A()}),pr(xe,v==null?void 0:v.defaultView,y=>{y.preventDefault(),y.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),A()}),Nn(f||me?!1:U,v,de),An(U,k,A);let[Pe,we]=Sn(),Te=s.useMemo(()=>[{dialogState:C,close:A,setTitleId:ge,unmount:w},c],[C,c,A,ge,w]),fe=s.useMemo(()=>({open:C===0}),[C]),Me={ref:I,id:a,role:p,tabIndex:-1,"aria-modal":f?void 0:C===0?!0:void 0,"aria-labelledby":c.titleId,"aria-describedby":Pe,unmount:w},$e=!vr(),te=re.None;U&&!f&&(te|=re.RestoreFocus,te|=re.TabLock,h&&(te|=re.AutoFocus),$e&&(te|=re.InitialFocus));let De=he();return b.createElement(Rn,null,b.createElement(pt,{force:!0},b.createElement(Pn,null,b.createElement(Je.Provider,{value:Te},b.createElement(Tn,{target:k},b.createElement(pt,{force:!1},b.createElement(we,{slot:fe},b.createElement(G,null,b.createElement(wr,{initialFocus:m,initialFocusFallback:k,containers:de,features:te},b.createElement(Mn,{value:A},De({ourProps:Me,theirProps:S,slot:fe,defaultTag:Ar,features:Rr,visible:C===0,name:"Dialog"})))))))))))}),Ar="div",Rr=vt.RenderStrategy|vt.Static;function Pr(t,e){let{transition:r=!1,open:a,...i}=t,l=$t(),m=t.hasOwnProperty("open")||l!==null,p=t.hasOwnProperty("onClose");if(!m&&!p)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!m)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(!l&&typeof t.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${t.open}`);if(typeof t.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${t.onClose}`);return(a!==void 0||r)&&!i.static?b.createElement(ft,null,b.createElement(Ce,{show:a,transition:r,unmount:i.unmount},b.createElement(bt,{ref:e,...i}))):b.createElement(ft,null,b.createElement(bt,{ref:e,open:a,...i}))}let Tr="div";function Mr(t,e){let r=s.useId(),{id:a=`headlessui-dialog-panel-${r}`,transition:i=!1,...l}=t,[{dialogState:m,unmount:p},h]=Ne("Dialog.Panel"),f=Fe(e,h.panelRef),w=s.useMemo(()=>({open:m===0}),[m]),S=ee(v=>{v.stopPropagation()}),H={ref:f,id:a,onClick:S},N=i?Dt:s.Fragment,k=i?{unmount:p}:{},I=he();return b.createElement(N,{...k},I({ourProps:H,theirProps:l,slot:w,defaultTag:Tr,name:"Dialog.Panel"}))}let $r="div";function Dr(t,e){let{transition:r=!1,...a}=t,[{dialogState:i,unmount:l}]=Ne("Dialog.Backdrop"),m=s.useMemo(()=>({open:i===0}),[i]),p={ref:e,"aria-hidden":!0},h=r?Dt:s.Fragment,f=r?{unmount:l}:{},w=he();return b.createElement(h,{...f},w({ourProps:p,theirProps:a,slot:m,defaultTag:$r,name:"Dialog.Backdrop"}))}let Lr="h2";function Sr(t,e){let r=s.useId(),{id:a=`headlessui-dialog-title-${r}`,...i}=t,[{dialogState:l,setTitleId:m}]=Ne("Dialog.Title"),p=Fe(e);s.useEffect(()=>(m(a),()=>m(null)),[a,m]);let h=s.useMemo(()=>({open:l===0}),[l]),f={ref:p,id:a};return he()({ourProps:f,theirProps:i,slot:h,defaultTag:Lr,name:"Dialog.Title"})}let Or=ce(Pr),Zr=ce(Mr);ce(Dr);let Hr=ce(Sr),Ht=Object.assign(Or,{Panel:Zr,Title:Hr,Description:Dn});function le({headline:t,type:e,changes:r,className:a}){const[i,l]=s.useState(!1);return o.jsx(ht,{onMouseEnter:()=>{l(!0)},onMouseLeave:()=>{l(!1)},className:"relative flex",children:()=>o.jsxs(o.Fragment,{children:[o.jsx("span",{className:B("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",e===Z.Add&&"bg-success-500 border-success-500",e===Z.Remove&&"bg-danger-500 border-danger-500",e===Z.Direct&&"bg-secondary-500 border-secondary-500",e===Z.Indirect&&"bg-warning-500 border-warning-500",e===Z.Metadata&&"bg-neutral-400 border-neutral-400",e===Z.Default&&"bg-neutral-600 border-neutral-600",a),children:r.length}),o.jsx(Ce,{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(ht.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(ct,{headline:t,type:e,className:"w-full h-full max-w-[50vw] max-h-[40vh] overflow-hidden overflow-y-auto hover:scrollbar scrollbar--vertical",children:o.jsx(ct.Default,{type:e,changes:r})})})})]})})}function Ir(){const t=j(i=>i.planOverview),[e,r]=s.useState(t);return s.useEffect(()=>{z(t.isEmpty)&&t.isFinished&&r(new fn(t))},[t]),(z(t.isLatest)||t.isFetching)&&e.hasUpdates?o.jsxs("span",{className:"flex group items-center bg-neutral-5 dark:bg-neutral-20 px-1 py-1 rounded-full",children:[(je(e.hasChanges)||je(e.hasBackfills))&&o.jsx(Et,{className:"mr-2",children:"Changes"}),oe(e.added)&&o.jsx(le,{headline:"Added",type:Z.Add,changes:e.added,className:"-mr-2 group-hover:mr-0 z-[5]"}),oe(e.direct)&&o.jsx(le,{headline:"Directly Modified",type:Z.Direct,changes:e.direct,className:"-mr-2 group-hover:mr-0 z-[4]"}),oe(e.indirect)&&o.jsx(le,{headline:"Indirectly Modified",type:Z.Indirect,changes:e.indirect,className:"-mr-2 group-hover:mr-0 z-[3]"}),oe(e.metadata)&&o.jsx(le,{headline:"Metadata",type:Z.Metadata,changes:e.metadata,className:"-mr-2 group-hover:mr-0 z-[2]"}),oe(e.removed)&&o.jsx(le,{headline:"Removed",type:Z.Remove,changes:e.removed,className:"-mr-2 group-hover:mr-0 z-[1]"}),oe(e.backfills)?o.jsx(le,{headline:"Backfills",type:Z.Default,changes:e.backfills,className:"ml-4 group-hover:ml-2 z-[6]"}):o.jsx("div",{className:"ml-2 group-hover:ml-2 z-[6]"})]}):o.jsx(Et,{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 Et({className:t,children:e}){const r=E(h=>h.environment),a=E(h=>h.addRemoteEnvironments),i=j(h=>h.planAction),{refetch:l}=Ye(),{refetch:m}=Ue(r.name,{planOptions:{skip_tests:!0,include_unmodified:!0}});function p(h){const{environments:f,default_target_environment:w,pinned_environments:S}=h??{};kt(f)&&a(Object.values(f),w,S)}return o.jsxs("p",{className:B("flex items-center text-xs text-neutral-600 dark:text-neutral-300 font-bold text-center whitespace-nowrap",t),children:[o.jsx(Be,{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:ze.Info,size:jt.sm,disabled:i.isProcessing,onClick:h=>{h.stopPropagation(),l().then(({data:f})=>{m(),p(f)})},children:o.jsx(Hn,{className:"text-neutral-500 dark:text-neutral-300 w-4 h-4"})}),e]})}function It({children:t}){return o.jsxs(Xt,{className:"inline-block",children:[o.jsx(_e,{className:"w-3 h-3 border border-neutral-10 mr-2"}),o.jsx("span",{className:"inline-block text-xs whitespace-nowrap",children:t})]})}let Ie;function Br(){const t=E(c=>c.modules),e=E(c=>c.environment),r=E(c=>c.models),a=j(c=>c.planAction),i=j(c=>c.planApply),l=j(c=>c.planOverview),m=j(c=>c.planCancel),p=j(c=>c.setPlanApply),h=j(c=>c.setPlanOverview),f=j(c=>c.setPlanCancel),w=j(c=>c.setPlanAction),S=j(c=>c.resetPlanTrackers),H=j(c=>c.clearPlanApply),{isFetching:N}=en(e.name),{isFetching:k}=tn(),{isFetching:I}=Ye(),{refetch:v,isFetching:C}=Ue(e.name,{planOptions:{skip_tests:!0,include_unmodified:!0}});return s.useEffect(()=>{r.size>0&&z(a.isProcessing)&&z(a.isRunningTask)&&(S(),H(),v())},[r,e]),s.useEffect(()=>{C&&(l.isFetching=!0,h(l)),N&&(i.isFetching=!0,p(i)),k&&(m.isFetching=!0,f(m))},[C,N,k]),s.useEffect(()=>{clearTimeout(Ie);const c=Ve.getPlanAction({planOverview:l,planApply:i,planCancel:m});c===ie.Done&&a.isRunningTask||c===a.value||(Ie=setTimeout(()=>{w(new Ve({value:c})),Ie=void 0},nn([ie.Running,ie.RunningTask,ie.Cancelling,ie.Applying],c)?0:500))},[l,i,m]),o.jsx("div",{className:"min-h-8 max-h-8 flex w-full items-center justify-end text-neutral-500",children:I?o.jsx(It,{children:"Loading Environments..."}):o.jsxs(o.Fragment,{children:[z(t.hasOnlyPlans)&&z(t.hasOnlyPlansAndErrors)&&o.jsx(W,{title:a.isProcessing?a.displayStatus(l):"Plan",to:q.Plan,icon:a.isProcessing?o.jsx(_e,{variant:ze.Success,className:"w-3 py-1"}):o.jsx(St,{className:B("w-5",l.isFailed?"text-danger-500 dark:text-danger-100":"text-success-100")}),iconActive:a.isProcessing?o.jsx(_e,{variant:ze.Success,className:"w-3 py-1"}):o.jsx(Lt,{className:B("w-5",l.isFailed?"text-danger-500 dark:text-danger-100":"text-success-100")}),before:o.jsx("p",{className:B("block mx-1 text-xs font-bold whitespace-nowrap",l.isFailed?"text-danger-500 dark:text-danger-100":"text-success-100"),children:a.isProcessing?a.displayStatus(l):"Plan"}),className:B("px-2 rounded-full py-0.5 mr-1",l.isFailed?"bg-danger-10 dark:bg-danger-500":"bg-success-500"),classActive:B(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(pn,{className:"border-none mx-2 w-full",size:jt.sm,showAddEnvironment:!0,disabled:C||a.isProcessing||e.isInitialProd})}),o.jsx(Ir,{})]})})}function zr(){const t=Ct();return o.jsxs("div",{className:"flex",children:[o.jsx("button",{onClick:()=>t(-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(Bn,{className:"min-w-4 h-4"})}),o.jsx("button",{onClick:()=>t(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($n,{className:"min-w-4 h-4"})})]})}function _r(){const t=E(r=>r.modules),{isFetching:e}=Ft();return o.jsxs("div",{className:B("relative min-w-[10rem] px-2 min-h-[2rem] max-h-[2rem] w-full flex items-center",t.showHistoryNavigation?"justify-between":"justify-end",e&&"overflow-hidden"),children:[t.showHistoryNavigation&&o.jsx(zr,{}),e&&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(It,{children:"Loading Models..."})}),t.hasPlans&&o.jsx(Br,{}),t.hasErrors&&o.jsx(mn,{})]})}function Vr({show:t,children:e,afterLeave:r,onClose:a=()=>{}}){return o.jsx(Ce,{appear:!0,show:t,as:s.Fragment,afterLeave:r,children:o.jsxs(Ht,{as:"div",className:"relative z-50",onClose:a,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(Ce.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:e})})})]})})}function L({show:t,children:e,onClose:r,afterLeave:a}){return o.jsx(Vr,{show:t,onClose:r,afterLeave:a,children:o.jsx(Ht.Panel,{className:"min-w-[20rem] max-w-[50rem] transform rounded-xl bg-theme text-left align-middle shadow-xl transition-all overflow-hidden",children:e})})}function qr({children:t}){return o.jsx("div",{className:"py-4 px-5 m-2",children:t})}function Wr({children:t}){return o.jsx("h2",{className:"font-bold text-xl mb-2",children:t})}function Yr({children:t}){return o.jsx("h4",{className:"font-bold",children:t})}function Ur({children:t}){return o.jsx("p",{className:"text-sm",children:t})}function Gr({children:t}){return o.jsx("div",{className:"flex justify-end items-center py-3 px-3",children:t})}function Kr({details:t}){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:t.map(e=>o.jsx("li",{className:"text-sm",children:e},e))})}L.Headline=Wr;L.Tagline=Yr;L.Description=Ur;L.Actions=Gr;L.Main=qr;L.Details=Kr;const Jr=2e4,Qr=3e3;class Xr{constructor(e,r){se(this,"channels",new Map);se(this,"eventSource");se(this,"timerId");se(this,"source");se(this,"delay",Jr);this.source=e,this.delay=r??this.delay,this.setEventSource()}listen(e){e.addEventListener("error",r=>{this.reconnect(Qr)}),e.addEventListener("ping",r=>{this.reconnect(this.delay)})}cleanup(){var e;this.channels.forEach((r,a)=>{var i;D(r)&&((i=this.eventSource)==null||i.removeEventListener(a,r))}),(e=this.eventSource)==null||e.close(),this.eventSource=void 0}resubscribe(){this.channels.forEach((e,r)=>{var a;D(e)&&((a=this.eventSource)==null||a.addEventListener(r,e))})}reconnect(e){clearTimeout(this.timerId),this.timerId=setTimeout(()=>{console.log(`Reconnecting Event Source ${this.source}`),this.cleanup(),this.setEventSource(),this.resubscribe()},e)}getEventSource(){return new EventSource(this.source,{withCredentials:!0})}setEventSource(){this.eventSource=this.getEventSource(),this.listen(this.eventSource)}addChannel(e,r){var i;const a=this.getChannelHandler(e,r);(i=this.eventSource)==null||i.addEventListener(e,a),this.channels.set(e,a)}removeChannel(e){var a;const r=this.getChannel(e);D(r)&&((a=this.eventSource)==null||a.removeEventListener(e,r),this.channels.delete(e))}hasChannel(e){return D(this.getChannel(e))}getChannel(e){return this.channels.get(e)}getChannelHandler(e,r){return a=>{if(this.reconnect(this.delay),!($(e)||$(r)||$(a.data)))try{r(JSON.parse(a.data))}catch(i){console.warn(i)}}}}let pe;function ea(){return $(pe)&&(pe=new Xr(rn("/api/events"))),(t,e)=>({subscribe(){D(t)&&D(e)&&z(pe.hasChannel(t))&&pe.addChannel(t,e)},unsubscribe(){pe.removeChannel(t)}})}function Ca({content:t}){const e=an(),r=Ct(),{removeError:a,addError:i}=yt(),l=E(n=>n.modules),m=E(n=>n.environment),p=E(n=>n.environments),h=E(n=>n.showConfirmation),f=E(n=>n.confirmations),w=E(n=>n.setShowConfirmation),S=E(n=>n.removeConfirmation),H=E(n=>n.setModels),N=E(n=>n.addRemoteEnvironments),k=E(n=>n.addLocalEnvironment),I=E(n=>n.setEnvironment);let v;z(l.hasOnlyDataCatalog)&&(v=ea());const C=j(n=>n.planApply),c=j(n=>n.planOverview),T=j(n=>n.planCancel),A=j(n=>n.setPlanApply),ge=j(n=>n.setPlanOverview),U=j(n=>n.setPlanCancel),Ae=j(n=>n.setPlanAction),G=J(n=>n.files),Re=J(n=>n.selectedFile),ue=J(n=>n.setProject),de=J(n=>n.setFiles),me=J(n=>n.refreshFiles),_=J(n=>n.findArtifactByPath),xe=J(n=>n.setTests),Pe=J(n=>n.setActiveRange),we=ne(n=>n.storedTabs),Te=ne(n=>n.storedTabId),fe=ne(n=>n.selectTab),Me=ne(n=>n.createTab),$e=ne(n=>n.addTabs),te=ne(n=>n.closeTab),De=ne(n=>n.inTabs),y=E(n=>n.setVersion),{refetch:be,cancel:Bt}=sn(),{refetch:Qe,cancel:zt}=Ft(),{refetch:_t,cancel:Vt}=on(),{refetch:Xe,cancel:qt}=Ye(),{refetch:et,cancel:Wt}=Ue(m.name,{planOptions:{skip_tests:!0,include_unmodified:!0}}),ae=s.useCallback(function(u){const x=Array.from(p).find(g=>g.name===u);$(x)?k(u):I(x)},[p]),tt=s.useCallback(function(u){c.update(u),u.environment!==m.name&&ae(u.environment),ge(c)},[ae,m]),nt=s.useCallback(function(u){var g,M;C.update(u,c),u.environment!==m.name&&ae(u.environment),A(C);const x=je((g=u.meta)==null?void 0:g.done)&&((M=u.meta)==null?void 0:M.status)!==Oe.init;T.isFinished||T.isRunning||z(x)||Xe().then(({data:F})=>{et(),ot(F)})},[T,c,ae,m]),rt=s.useCallback(function(u){var x,g;T.update(u),u.environment!==m.name&&ae(u.environment),U(T),!(ln((x=u.meta)==null?void 0:x.done)||((g=u.meta)==null?void 0:g.status)===Oe.init)&&et()},[ae,m]),at=s.useCallback(function({changes:u,directories:x}){var g,M;u.sort(F=>F.change===He.Deleted?-1:1),u.forEach(({change:F,path:K,file:R})=>{var P,V;if(F===He.Modified){const O=G.get(K);if($(O)||$(R))return;O.update(R)}if(F===He.Deleted){const O=_(K)??G.get(K);if($(O))return;O instanceof Ze&&((P=O.parent)==null||P.removeDirectory(O)),O instanceof gt&&((V=O.parent)==null||V.removeFile(O),De(O)&&te(O))}});for(const F in x){const K=x[F],R=_(F);$(R)||((g=K.directories)==null||g.forEach(P=>{const V=_(P.path);$(V)&&R.addDirectory(new Ze(P,R))}),(M=K.files)==null||M.forEach(P=>{const V=G.get(P.path);$(V)&&R.addFile(new gt(P,R))}),R.directories.sort((P,V)=>P.name>V.name?1:-1),R.files.sort((P,V)=>P.name>V.name?1:-1))}me(),Pe(),Qe().then(({data:F})=>Le(F))},[G]),st=s.useCallback(function(u){const x=G.get(u.path);D(x)&&(x.isFormatted=u.status===Oe.success,me())},[G]),Yt=s.useCallback(function(u){if(cn(we))return;const x=we.map(({id:M,content:F})=>{const K=u.find(P=>P.id===M)??On(M),R=Me(K);return R.file.content=F??R.file.content??"",R}),g=x.find(M=>M.file.id===Te);$e(x),D(g)&&$(Re)&&fe(g)},[fe]);s.useEffect(()=>{be().then(({data:g})=>{y(g==null?void 0:g.version),je(g==null?void 0:g.has_running_task)&&Ae(new Ve({value:ie.RunningTask}))}),Qe().then(({data:g})=>Le(g));const n=v==null?void 0:v("errors",Ut),u=v==null?void 0:v("tests",Gt),x=v==null?void 0:v("models",Le);return x==null||x.subscribe(),l.hasPlans&&(u==null||u.subscribe(),Xe().then(({data:g})=>ot(g))),l.hasErrors&&(n==null||n.subscribe()),l.hasFiles&&_t().then(({data:g})=>{if($(g))return;const M=new Ze(g),F=M.allFiles;Yt(F),de(F),ue(M)}),()=>{Bt(),zt(),x==null||x.unsubscribe(),l.hasPlans&&(qt(),Wt()),l.hasErrors&&(n==null||n.unsubscribe()),l.hasTests&&(u==null||u.unsubscribe()),l.hasFiles&&Vt()}},[l]),s.useEffect(()=>{const n=v==null?void 0:v("plan-apply",nt);return l.hasPlans&&(n==null||n.subscribe()),()=>{l.hasPlans&&(n==null||n.unsubscribe())}},[nt,l]),s.useEffect(()=>{const n=v==null?void 0:v("plan-overview",tt);return l.hasPlans&&(n==null||n.subscribe()),()=>{l.hasPlans&&(n==null||n.unsubscribe())}},[tt,l]),s.useEffect(()=>{const n=v==null?void 0:v("plan-cancel",rt);return l.hasPlans&&(n==null||n.subscribe()),()=>{l.hasPlans&&(n==null||n.unsubscribe())}},[rt,l]),s.useEffect(()=>{const n=v==null?void 0:v("file",at);return n==null||n.subscribe(),()=>{n==null||n.unsubscribe()}},[at]),s.useEffect(()=>{const n=v==null?void 0:v("format-file",st);return n==null||n.subscribe(),()=>{n==null||n.unsubscribe()}},[st]),s.useEffect(()=>{(z(l.isEmpty)&&e.pathname===q.Home||e.pathname==="")&&r(l.defaultNavigationRoute(),{replace:!0})},[e,l]),s.useEffect(()=>{w(f.length>0)},[f]);function Le(n){D(n)&&(a(lt.Models),H(n))}function Ut(n){i(lt.General,n)}function Gt(n){xe(n)}function ot(n){const{environments:u,default_target_environment:x,pinned_environments:g}=n??{};kt(u)&&N(Object.values(u),x,g)}function Se(n){var u;(u=n==null?void 0:n.cancel)==null||u.call(n),w(!1)}const d=f[0];return o.jsxs(un.Page,{layout:"horizontal",children:[l.showModuleNavigation&&o.jsxs(o.Fragment,{children:[o.jsx(mr,{className:"overflow-hidden py-1 px-2 flex flex-col items-center"}),o.jsx(it,{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(_r,{}),o.jsx(it,{})]}),t??o.jsx(dn,{}),o.jsxs(L,{show:h,onClose:()=>{Se(d)},afterLeave:()=>{S()},onKeyDown:n=>{n.key==="Escape"&&Se(d)},children:[o.jsxs(L.Main,{children:[D(d==null?void 0:d.headline)&&o.jsx(L.Headline,{children:d==null?void 0:d.headline}),D(d==null?void 0:d.tagline)&&o.jsx(L.Tagline,{children:d==null?void 0:d.tagline}),D(d==null?void 0:d.details)&&o.jsx(L.Details,{details:d==null?void 0:d.details}),D(d==null?void 0:d.description)&&o.jsx(L.Description,{children:d==null?void 0:d.description}),d==null?void 0:d.children]}),o.jsxs(L.Actions,{children:[o.jsx(Be,{className:"font-bold",size:"md",variant:"danger",onClick:n=>{var u;n.stopPropagation(),(u=d==null?void 0:d.action)==null||u.call(d),w(!1)},children:(d==null?void 0:d.yesText)??"Confirm"}),o.jsx(Be,{size:"md",variant:"alternative",onClick:n=>{n.stopPropagation(),Se(d)},children:(d==null?void 0:d.noText)??"Cancel"})]})]})]})]})}export{Ca as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as ue,R as Rt,
|
|
1
|
+
import{r as ue,R as Rt,s as ty,j as Ht,c as Xr,l as Ze,D as ey,v as ks,i as ry,V as ny,C as iy}from"./index-EyUZDtV7.js";import{I as Pu}from"./Input-BmfZ-VnW.js";import{E as co,f as oy,h as Mu}from"./help-6Q7f7fjd.js";import{U as Ss,z as ay}from"./popover-CA0_-cE5.js";function Ou({nativeEvent:r}){return window.TouchEvent?r instanceof TouchEvent:"touches"in r}function Ru(r){return r.nativeEvent instanceof MouseEvent}function sy(r){const n=ue.useRef(null),i=ue.useRef(r);return ue.useLayoutEffect(()=>{i.current=r}),ue.useEffect(()=>{const s=c=>{const u=n.current;u&&!u.contains(c.target)&&i.current(c)};return document.addEventListener("mousedown",s),document.addEventListener("touchstart",s),()=>{document.removeEventListener("mousedown",s),document.removeEventListener("touchstart",s)}},[]),n}function nk(r,n={}){const{threshold:i=400,onStart:s,onFinish:c,onCancel:u}=n,f=ue.useRef(!1),m=ue.useRef(!1),g=ue.useRef();return ue.useMemo(()=>{if(typeof r!="function")return{};const w=x=>{!Ru(x)&&!Ou(x)||(s&&s(x),m.current=!0,g.current=setTimeout(()=>{r(x),f.current=!0},i))},S=x=>{!Ru(x)&&!Ou(x)||(f.current?c&&c(x):m.current&&u&&u(x),f.current=!1,m.current=!1,g.current&&window.clearTimeout(g.current))};return{...{onMouseDown:w,onMouseUp:S,onMouseLeave:S},...{onTouchStart:w,onTouchEnd:S}}},[r,i,u,c,s])}/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2018 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|