sqlmesh 0.188.2.dev6__py3-none-any.whl → 0.188.2.dev8__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/lsp/context.py +27 -1
- sqlmesh/lsp/custom.py +26 -0
- sqlmesh/lsp/main.py +60 -4
- {sqlmesh-0.188.2.dev6.dist-info → sqlmesh-0.188.2.dev8.dist-info}/METADATA +1 -1
- {sqlmesh-0.188.2.dev6.dist-info → sqlmesh-0.188.2.dev8.dist-info}/RECORD +53 -53
- web/client/dist/assets/{Audits-yd9300pl.js → Audits-CNkn30Bu.js} +1 -1
- web/client/dist/assets/{Banner-DQJLxQK4.js → Banner-BMu19thO.js} +1 -1
- web/client/dist/assets/{ChevronDownIcon-CglA7k4-.js → ChevronDownIcon-SI78_pgt.js} +1 -1
- web/client/dist/assets/{ChevronRightIcon-xw0l9rry.js → ChevronRightIcon-DvcjSEyM.js} +1 -1
- web/client/dist/assets/{Content-DdhorPW0.js → Content-BK6ZvWH8.js} +1 -1
- web/client/dist/assets/{Content-DQHjja2B.js → Content-BuovvkUB.js} +1 -1
- web/client/dist/assets/{Data-HtiT4UV2.js → Data-BdY6H-uU.js} +1 -1
- web/client/dist/assets/{DataCatalog-_7fRHUeM.js → DataCatalog-CVnpiGcp.js} +1 -1
- web/client/dist/assets/{Editor-BFYqqR17.js → Editor-ALoX4I6U.js} +1 -1
- web/client/dist/assets/{Editor-ncrD1ZO_.js → Editor-ttqMNvFU.js} +1 -1
- web/client/dist/assets/{Errors-BosrEbuf.js → Errors-1Z9mnHDd.js} +1 -1
- web/client/dist/assets/{FileExplorer-C6Imxadq.js → FileExplorer-N_rP1bCS.js} +1 -1
- web/client/dist/assets/{Footer-C9MHPzk1.js → Footer-C2z0sLXN.js} +1 -1
- web/client/dist/assets/{Header-DQF-wN9R.js → Header-BmTHO2La.js} +1 -1
- web/client/dist/assets/{Input-LXiA3uoO.js → Input-F4DL5_h8.js} +1 -1
- web/client/dist/assets/Lineage-B58aSBmy.js +1 -0
- web/client/dist/assets/{ListboxShow-BUIulc8M.js → ListboxShow-DlkxbLqo.js} +1 -1
- web/client/dist/assets/{ModelLineage-BbFqz62a.js → ModelLineage-DrZkk7za.js} +1 -1
- web/client/dist/assets/{Models-2zScbq9i.js → Models-BuOgiRPs.js} +1 -1
- web/client/dist/assets/{Page-Bf2QbngA.js → Page-BIRUe1KK.js} +1 -1
- web/client/dist/assets/{Plan-DIc3XAIr.js → Plan-CqEwcJdE.js} +1 -1
- web/client/dist/assets/{PlusCircleIcon-BIG5lKYN.js → PlusCircleIcon-DeWsoCUc.js} +1 -1
- web/client/dist/assets/{ReportErrors-DD5Tkzy2.js → ReportErrors-Dp7mrGQI.js} +1 -1
- web/client/dist/assets/{Root-B9zs-snk.js → Root-Cipvpumn.js} +1 -1
- web/client/dist/assets/{SearchList-DgKaZfJZ.js → SearchList-ISIumWZ3.js} +1 -1
- web/client/dist/assets/{SelectEnvironment-CP_GD64v.js → SelectEnvironment-CzaIoYWG.js} +1 -1
- web/client/dist/assets/{SourceList-DdN6hYD1.js → SourceList-DSwSywe1.js} +1 -1
- web/client/dist/assets/{SourceListItem-BynoG2tu.js → SourceListItem-DvsVB4rF.js} +1 -1
- web/client/dist/assets/{SplitPane-DrxVfnY9.js → SplitPane-orTCZ30m.js} +1 -1
- web/client/dist/assets/{Tests-A4Bnjxwk.js → Tests-DVP2w57x.js} +1 -1
- web/client/dist/assets/{Welcome-DbSZJpJE.js → Welcome-BU8aaKb1.js} +1 -1
- web/client/dist/assets/{context-Bxzp3TEa.js → context-BSTdE9fG.js} +1 -1
- web/client/dist/assets/{context-DUKxn1wN.js → context-CQWyuQhP.js} +1 -1
- web/client/dist/assets/{editor-CJ4oQlo_.js → editor-D2YqZoJd.js} +1 -1
- web/client/dist/assets/{file-CFuQwF_m.js → file-DgtoMe3u.js} +1 -1
- web/client/dist/assets/{floating-ui.react-dom-CN8_HaDW.js → floating-ui.react-dom-8hwAvuN1.js} +1 -1
- web/client/dist/assets/{help-BGO8vW5o.js → help-Dn6q7ttB.js} +1 -1
- web/client/dist/assets/{index-C_NFRX2g.js → index-DG6d5rM7.js} +1 -1
- web/client/dist/assets/{index-DGopuBhO.js → index-M-fcEAWc.js} +2 -2
- web/client/dist/assets/{plan-CN6Tq0vs.js → plan-0w1YtXVA.js} +1 -1
- web/client/dist/assets/{popover-DJJmvGdj.js → popover-BW7hkI4p.js} +1 -1
- web/client/dist/assets/{project-CmqDHjoE.js → project-st7AD14m.js} +1 -1
- web/client/dist/index.html +1 -1
- web/client/dist/assets/Lineage-BbURajUV.js +0 -1
- {sqlmesh-0.188.2.dev6.dist-info → sqlmesh-0.188.2.dev8.dist-info}/WHEEL +0 -0
- {sqlmesh-0.188.2.dev6.dist-info → sqlmesh-0.188.2.dev8.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.188.2.dev6.dist-info → sqlmesh-0.188.2.dev8.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.188.2.dev6.dist-info → sqlmesh-0.188.2.dev8.dist-info}/top_level.txt +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
var N=Object.defineProperty;var I=(u,r,t)=>r in u?N(u,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[r]=t;var a=(u,r,t)=>I(u,typeof r!="symbol"?r+"":r,t);import{$ as F,q as x,b as f,v as l,f as R,A as w,C as v,i as p,g as V,a0 as D}from"./index-DGopuBhO.js";const s={Done:"done",Run:"run",Running:"running",RunningTask:"running-task",ApplyVirtual:"apply-virtual",ApplyBackfill:"apply-backfill",ApplyChangesAndBackfill:"apply-changes-and-backfill",ApplyMetadata:"apply-metadata",Applying:"applying",Cancelling:"cancelling"};class O extends F{constructor(t){super(t!=null&&t.isModel?t.initial:{...t,value:(t==null?void 0:t.value)??s.Run});a(this,"_value");this._value=(t==null?void 0:t.value)??this.initial.value}get value(){return this._value}get isRun(){return this.value===s.Run}get isDone(){return this.value===s.Done}get isApplyVirtual(){return this.value===s.ApplyVirtual}get isApplyBackfill(){return this.value===s.ApplyBackfill}get isApplyChangesAndBackfill(){return this.value===s.ApplyChangesAndBackfill}get isApplyMetadata(){return this.value===s.ApplyMetadata}get isApply(){return this.isApplyVirtual||this.isApplyBackfill||this.isApplyChangesAndBackfill||this.isApplyMetadata}get isCancelling(){return this.value===s.Cancelling}get isApplying(){return this.value===s.Applying}get isRunning(){return x([s.Running,s.RunningTask],this.value)}get isRunningTask(){return this.value===s.RunningTask}get isProcessing(){return this.isRunning||this.isApplying||this.isCancelling}get isIdle(){return f(this.isProcessing)}displayStatus(t){return this.isCancelling?"Cancelling Plan...":this.isApplying?"Applying Plan...":this.isRunning&&l(t.hasChanges)?"Getting Changes...":this.isRunning&&l(t.hasBackfills)?"Getting Backfills...":this.isRunning?"Checking Plan...":this.isRunningTask?"Running Task...":"Plan"}static getActionDisplayName(t,e=[],i="Plan"){if(!e.includes(t.value))return i;let n;switch(t.value){case s.Done:n="Done";break;case s.Running:n="Running...";break;case s.RunningTask:n="Running Task...";break;case s.Applying:n="Applying...";break;case s.Cancelling:n="Cancelling...";break;case s.Run:n="Plan";break;case s.ApplyChangesAndBackfill:n="Apply Changes And Backfill";break;case s.ApplyVirtual:n="Apply Virtual Update";break;case s.ApplyBackfill:n="Apply And Backfill";break;case s.ApplyMetadata:n="Apply Metadata";break;default:n=i;break}return n}static getPlanAction({planOverview:t,planApply:e,planCancel:i}){const n=t.isRunning,c=e.isRunning,h=i.isRunning,d=e.isFinished&&t.isFinished||i.isFinished;return i.isEmpty&&e.isEmpty&&t.isEmpty?s.Run:h?s.Cancelling:c?s.Applying:n?s.Running:d?s.Done:t.isVirtualUpdate?s.ApplyVirtual:t.isMetadataUpdate?s.ApplyMetadata:t.isBackfillUpdate?s.ApplyBackfill:t.isChangesAndBackfillUpdate?s.ApplyChangesAndBackfill:s.Done}}class U extends F{constructor(t){super(t==null?void 0:t.initial);a(this,"_current");a(this,"_isFetching",!1);this._current=t==null?void 0:t._current,this._isFetching=(t==null?void 0:t._isFetching)??!1}get current(){return this._current}get environment(){var t;return(t=this.current)==null?void 0:t.environment}get meta(){var t;return(t=this.current)==null?void 0:t.meta}get plan_options(){var t;return(t=this.current)==null?void 0:t.plan_options}get start(){var t;return(t=this.current)==null?void 0:t.start}get end(){var t;return(t=this.current)==null?void 0:t.end}get duration(){var t;return((t=this==null?void 0:this.meta)==null?void 0:t.duration)??-1}get isFinished(){var t,e,i,n;return R((e=(t=this.current)==null?void 0:t.meta)==null?void 0:e.done)&&((n=(i=this.current)==null?void 0:i.meta)==null?void 0:n.status)!==w.init&&f(this.isFetching)}get isRunning(){var t,e,i,n;return v((e=(t=this.current)==null?void 0:t.meta)==null?void 0:e.done)&&((n=(i=this.current)==null?void 0:i.meta)==null?void 0:n.status)===w.init||this.isFetching}get isSuccessful(){var t,e;return this.isFinished&&((e=(t=this.current)==null?void 0:t.meta)==null?void 0:e.status)===w.success}get isFailed(){var t,e,i;return this.isFinished&&(l((t=this.current)==null?void 0:t.meta)||((i=(e=this.current)==null?void 0:e.meta)==null?void 0:i.status)===w.fail)}get isEmpty(){return l(this.current)}get isFetching(){return this._isFetching}set isFetching(t){this._isFetching=t}reset(){this._current=void 0}}class o extends F{constructor(t){var e,i;super(t);a(this,"name");a(this,"view_name");a(this,"node_type");a(this,"change_category");a(this,"diff");a(this,"indirect");a(this,"batches");a(this,"direct");a(this,"completed");a(this,"end");a(this,"interval");a(this,"start");a(this,"total");this.name=encodeURI(this.initial.name),this.view_name=encodeURI(this.initial.view_name),this.node_type=this.initial.node_type,this.change_category=this.initial.change_category,this.diff=this.initial.diff,this.batches=this.initial.batches,this.interval=this.initial.interval,this.start=this.initial.start,this.total=this.initial.total,this.completed=this.initial.completed,this.end=this.initial.end,this.indirect=(e=this.initial.indirect)==null?void 0:e.map(n=>new o(n)),this.direct=(i=this.initial.direct)==null?void 0:i.map(n=>new o(n))}get nodeType(){return this.node_type}get viewName(){return this.view_name}get displayName(){return decodeURI(this.name)}get displayViewName(){return decodeURI(this.view_name)}get changeCategory(){return this.change_category}}class k extends U{constructor(t){super(t);a(this,"_last");a(this,"_planOverview");a(this,"_lastPlanOverview");p(t)&&t.isModel&&(this._current=t._current,this._last=t._last,this._planOverview=t._planOverview,this._lastPlanOverview=t._lastPlanOverview)}get current(){return this._current??this._last}get environment(){var t,e;return((t=this._last)==null?void 0:t.environment)??((e=this._current)==null?void 0:e.environment)}get meta(){var t,e;return((t=this._last)==null?void 0:t.meta)??((e=this._current)==null?void 0:e.meta)}get plan_options(){var t,e;return((t=this._last)==null?void 0:t.plan_options)??((e=this._current)==null?void 0:e.plan_options)}get start(){var t,e;return((t=this._last)==null?void 0:t.start)??((e=this._current)==null?void 0:e.start)}get end(){var t,e;return((t=this._last)==null?void 0:t.end)??((e=this._current)==null?void 0:e.end)}get overview(){return this._lastPlanOverview??this._planOverview}get backfills(){var t;return((t=this.overview)==null?void 0:t.backfills)??[]}get added(){var t;return((t=this.overview)==null?void 0:t.added)??[]}get removed(){var t;return((t=this.overview)==null?void 0:t.removed)??[]}get direct(){var t;return((t=this.overview)==null?void 0:t.direct)??[]}get indirect(){var t;return((t=this.overview)==null?void 0:t.indirect)??[]}get metadata(){var t;return((t=this.overview)==null?void 0:t.metadata)??[]}get tasks(){var e,i,n,c;const t=((i=(e=this._last)==null?void 0:e.backfill)==null?void 0:i.tasks)??((c=(n=this._current)==null?void 0:n.backfill)==null?void 0:c.tasks)??{};return Object.entries(t??{}).reduce((h,[d,_])=>(h[encodeURI(d)]=new o(_),h),{})}get queue(){var t,e;return((e=(t=this.stageBackfill)==null?void 0:t.queue)==null?void 0:e.map(i=>this.tasks[encodeURI(i)]).filter(Boolean))??[]}get stageValidation(){var t;return(t=this.overview)==null?void 0:t.stageValidation}get stageChanges(){var t;return(t=this.overview)==null?void 0:t.stageChanges}get stageBackfills(){var t;return(t=this.overview)==null?void 0:t.stageBackfills}get stageCreation(){var t,e;return((t=this._last)==null?void 0:t.creation)??((e=this._current)==null?void 0:e.creation)}get stageRestate(){var t,e;return((t=this._last)==null?void 0:t.restate)??((e=this._current)==null?void 0:e.restate)}get stageBackfill(){var t,e;return((t=this._last)==null?void 0:t.backfill)??((e=this._current)==null?void 0:e.backfill)}get stagePromote(){var t,e;return((t=this._last)==null?void 0:t.promote)??((e=this._current)==null?void 0:e.promote)}get shouldShowEvaluation(){return this.isFailed||p(this.stageCreation)||p(this.stageBackfill)||p(this.stagePromote)}get evaluationStart(){var t,e,i,n,c,h;return((e=(t=this.stageCreation)==null?void 0:t.meta)==null?void 0:e.start)??((n=(i=this.stageBackfill)==null?void 0:i.meta)==null?void 0:n.start)??((h=(c=this.stagePromote)==null?void 0:c.meta)==null?void 0:h.start)}get evaluationEnd(){var t,e,i,n,c,h;return((e=(t=this.stagePromote)==null?void 0:t.meta)==null?void 0:e.end)??((n=(i=this.stageBackfill)==null?void 0:i.meta)==null?void 0:n.end)??((h=(c=this.stageCreation)==null?void 0:c.meta)==null?void 0:h.end)}update(t,e){var m,y,A,g,M,T,E;const{creation:i,restate:n,backfill:c,promote:h,meta:d,environment:_}=t,B=l(d)||l(_)?void 0:t;if(l(B)){this._current=void 0;return}l(this._current)&&(this._current=t),this._current.start=t.start,this._current.end=t.end,this._current.meta=t.meta,this._current.environment=t.environment,this._current.plan_options=t.plan_options,p(i)&&(l(this._current.creation)||v((m=this._current.creation.meta)==null?void 0:m.done))&&(this._current.creation=i),p(n)&&(l(this._current.restate)||v((y=this._current.restate.meta)==null?void 0:y.done))&&(this._current.restate=n),p(c)&&(l(this._current.backfill)||v((A=this._current.backfill.meta)==null?void 0:A.done))&&(this._current.backfill=c),p(h)&&(l(this._current.promote)||v((g=this._current.promote.meta)==null?void 0:g.done))&&(this._current.promote=h),R((T=(M=this.current)==null?void 0:M.meta)==null?void 0:T.done)&&l(this._last)?(this._last=this._current,this._lastPlanOverview=this._planOverview,this._current=void 0,this._planOverview=void 0):this._planOverview=p(d)&&p(_)?e==null?void 0:e.clone():void 0,this.isFetching=f((E=t.meta)==null?void 0:E.done)}reset(){this._current=void 0,this._planOverview=void 0}clear(){this._current=void 0,this._last=void 0,this._planOverview=void 0,this._lastPlanOverview=void 0}clone(){var e;const t=new k;return p(this.current)&&t.update(structuredClone(this.current),(e=this.overview)==null?void 0:e.clone()),t}}class b extends U{get cancel(){var r;return(r=this._current)==null?void 0:r.cancel}get isCancelling(){var r,t,e,i;return v((t=(r=this.current)==null?void 0:r.meta)==null?void 0:t.done)&&((i=(e=this.current)==null?void 0:e.meta)==null?void 0:i.status)===w.init||this.isFetching}update(r){var t;this._current=r,this.isFetching=f((t=r.meta)==null?void 0:t.done)}}class C extends U{constructor(t){super(t);a(this,"_added",[]);a(this,"_removed",[]);a(this,"_direct",[]);a(this,"_indirect",[]);a(this,"_metadata",[]);a(this,"_backfills",[]);p(t)&&t.isModel&&(this._added=t.added,this._removed=t.removed,this._direct=t.direct,this._indirect=t.indirect,this._metadata=t.metadata,this._backfills=t.backfills)}get stageValidation(){var t;return(t=this._current)==null?void 0:t.validation}get stageChanges(){var t;return(t=this._current)==null?void 0:t.changes}get stageBackfills(){var t;return(t=this._current)==null?void 0:t.backfills}get validation(){var t;return(t=this._current)==null?void 0:t.validation}get hasChanges(){var d;if(l((d=this._current)==null?void 0:d.changes))return;const{added:t,removed:e,modified:i}=this._current.changes??{};if([t,e,i].every(l))return;const{direct:n,indirect:c,metadata:h}=i??{};return[t,e,n,c,h].some(V)}get changes(){var t;return(t=this._current)==null?void 0:t.changes}get hasBackfills(){var t,e,i;return l((e=(t=this._current)==null?void 0:t.backfills)==null?void 0:e.models)?void 0:V((i=this._current.backfills)==null?void 0:i.models)}get hasUpdates(){return R(this.hasChanges)||R(this.hasBackfills)}get backfills(){return this._backfills}get added(){return this._added}get removed(){return this._removed}get direct(){return this._direct}get indirect(){return this._indirect}get metadata(){return this._metadata}get isVirtualUpdate(){return p(this.hasChanges)&&l(this.hasBackfills)||!!this.hasChanges&&this.skipBackfill}get isMetadataUpdate(){var t;return!!((t=this.metadata)!=null&&t.length)&&l(this.hasBackfills)}get isBackfillUpdate(){return v(this.hasChanges)&&!!this.hasBackfills&&f(this.skipBackfill)}get isChangesAndBackfillUpdate(){return!!this.hasChanges&&!!this.hasBackfills&&f(this.skipBackfill)}get isLatest(){return this.isFinished&&l(this.hasChanges)&&(l(this.hasBackfills)||this.skipBackfill)}get skipTests(){var t,e;return((e=(t=this._current)==null?void 0:t.plan_options)==null?void 0:e.skip_tests)??!1}get skipBackfill(){var t,e;return((e=(t=this._current)==null?void 0:t.plan_options)==null?void 0:e.skip_backfill)??!1}update(t){var c,h,d,_,P,B,m,y,A;this._current=t,this.isFetching=f((c=t.meta)==null?void 0:c.done);const e=((h=this._current)==null?void 0:h.changes)??{},i=(e==null?void 0:e.modified)??{},n=((d=this._current)==null?void 0:d.backfills)??{};this._added=((_=e.added)==null?void 0:_.map(g=>new o(g)))??[],this._removed=((P=e.removed)==null?void 0:P.map(g=>new o(g)))??[],this._direct=((B=i.direct)==null?void 0:B.map(g=>new o(g)))??[],this._indirect=((m=i.indirect)==null?void 0:m.map(g=>new o(g)))??[],this._metadata=((y=i.metadata)==null?void 0:y.map(g=>new o(g)))??[],this._backfills=((A=n.models)==null?void 0:A.map(g=>new o(g)))??[]}clone(){const t=new C;return p(this.current)&&t.update(structuredClone(this.current)),t}}const G=D((u,r)=>({planAction:new O,planOverview:new C,planApply:new k,planCancel:new b,setPlanAction:t=>{u(()=>({planAction:new O(t)}))},setPlanApply:t=>{u(()=>({planApply:new k(t)}))},setPlanOverview:t=>{u(()=>({planOverview:new C(t)}))},setPlanCancel:t=>{u(()=>({planCancel:new b(t)}))},resetPlanTrackers:()=>{const t=r();t.planApply.reset(),t.planCancel.reset(),t.planOverview.reset(),u(()=>({planApply:new k(t.planApply),planCancel:new b(t.planCancel),planOverview:new C(t.planOverview)}))},resetPlanCancel:()=>{const t=r();t.planCancel.reset(),u(()=>({planCancel:new b(t.planCancel)}))},clearPlanApply:()=>{const t=r();t.planApply.clear(),u(()=>({planApply:new k(t.planApply)}))}}));export{s as E,C as M,O as a,G as u};
|
|
1
|
+
var N=Object.defineProperty;var I=(u,r,t)=>r in u?N(u,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[r]=t;var a=(u,r,t)=>I(u,typeof r!="symbol"?r+"":r,t);import{$ as F,q as x,b as f,v as l,f as R,A as w,C as v,i as p,g as V,a0 as D}from"./index-M-fcEAWc.js";const s={Done:"done",Run:"run",Running:"running",RunningTask:"running-task",ApplyVirtual:"apply-virtual",ApplyBackfill:"apply-backfill",ApplyChangesAndBackfill:"apply-changes-and-backfill",ApplyMetadata:"apply-metadata",Applying:"applying",Cancelling:"cancelling"};class O extends F{constructor(t){super(t!=null&&t.isModel?t.initial:{...t,value:(t==null?void 0:t.value)??s.Run});a(this,"_value");this._value=(t==null?void 0:t.value)??this.initial.value}get value(){return this._value}get isRun(){return this.value===s.Run}get isDone(){return this.value===s.Done}get isApplyVirtual(){return this.value===s.ApplyVirtual}get isApplyBackfill(){return this.value===s.ApplyBackfill}get isApplyChangesAndBackfill(){return this.value===s.ApplyChangesAndBackfill}get isApplyMetadata(){return this.value===s.ApplyMetadata}get isApply(){return this.isApplyVirtual||this.isApplyBackfill||this.isApplyChangesAndBackfill||this.isApplyMetadata}get isCancelling(){return this.value===s.Cancelling}get isApplying(){return this.value===s.Applying}get isRunning(){return x([s.Running,s.RunningTask],this.value)}get isRunningTask(){return this.value===s.RunningTask}get isProcessing(){return this.isRunning||this.isApplying||this.isCancelling}get isIdle(){return f(this.isProcessing)}displayStatus(t){return this.isCancelling?"Cancelling Plan...":this.isApplying?"Applying Plan...":this.isRunning&&l(t.hasChanges)?"Getting Changes...":this.isRunning&&l(t.hasBackfills)?"Getting Backfills...":this.isRunning?"Checking Plan...":this.isRunningTask?"Running Task...":"Plan"}static getActionDisplayName(t,e=[],i="Plan"){if(!e.includes(t.value))return i;let n;switch(t.value){case s.Done:n="Done";break;case s.Running:n="Running...";break;case s.RunningTask:n="Running Task...";break;case s.Applying:n="Applying...";break;case s.Cancelling:n="Cancelling...";break;case s.Run:n="Plan";break;case s.ApplyChangesAndBackfill:n="Apply Changes And Backfill";break;case s.ApplyVirtual:n="Apply Virtual Update";break;case s.ApplyBackfill:n="Apply And Backfill";break;case s.ApplyMetadata:n="Apply Metadata";break;default:n=i;break}return n}static getPlanAction({planOverview:t,planApply:e,planCancel:i}){const n=t.isRunning,c=e.isRunning,h=i.isRunning,d=e.isFinished&&t.isFinished||i.isFinished;return i.isEmpty&&e.isEmpty&&t.isEmpty?s.Run:h?s.Cancelling:c?s.Applying:n?s.Running:d?s.Done:t.isVirtualUpdate?s.ApplyVirtual:t.isMetadataUpdate?s.ApplyMetadata:t.isBackfillUpdate?s.ApplyBackfill:t.isChangesAndBackfillUpdate?s.ApplyChangesAndBackfill:s.Done}}class U extends F{constructor(t){super(t==null?void 0:t.initial);a(this,"_current");a(this,"_isFetching",!1);this._current=t==null?void 0:t._current,this._isFetching=(t==null?void 0:t._isFetching)??!1}get current(){return this._current}get environment(){var t;return(t=this.current)==null?void 0:t.environment}get meta(){var t;return(t=this.current)==null?void 0:t.meta}get plan_options(){var t;return(t=this.current)==null?void 0:t.plan_options}get start(){var t;return(t=this.current)==null?void 0:t.start}get end(){var t;return(t=this.current)==null?void 0:t.end}get duration(){var t;return((t=this==null?void 0:this.meta)==null?void 0:t.duration)??-1}get isFinished(){var t,e,i,n;return R((e=(t=this.current)==null?void 0:t.meta)==null?void 0:e.done)&&((n=(i=this.current)==null?void 0:i.meta)==null?void 0:n.status)!==w.init&&f(this.isFetching)}get isRunning(){var t,e,i,n;return v((e=(t=this.current)==null?void 0:t.meta)==null?void 0:e.done)&&((n=(i=this.current)==null?void 0:i.meta)==null?void 0:n.status)===w.init||this.isFetching}get isSuccessful(){var t,e;return this.isFinished&&((e=(t=this.current)==null?void 0:t.meta)==null?void 0:e.status)===w.success}get isFailed(){var t,e,i;return this.isFinished&&(l((t=this.current)==null?void 0:t.meta)||((i=(e=this.current)==null?void 0:e.meta)==null?void 0:i.status)===w.fail)}get isEmpty(){return l(this.current)}get isFetching(){return this._isFetching}set isFetching(t){this._isFetching=t}reset(){this._current=void 0}}class o extends F{constructor(t){var e,i;super(t);a(this,"name");a(this,"view_name");a(this,"node_type");a(this,"change_category");a(this,"diff");a(this,"indirect");a(this,"batches");a(this,"direct");a(this,"completed");a(this,"end");a(this,"interval");a(this,"start");a(this,"total");this.name=encodeURI(this.initial.name),this.view_name=encodeURI(this.initial.view_name),this.node_type=this.initial.node_type,this.change_category=this.initial.change_category,this.diff=this.initial.diff,this.batches=this.initial.batches,this.interval=this.initial.interval,this.start=this.initial.start,this.total=this.initial.total,this.completed=this.initial.completed,this.end=this.initial.end,this.indirect=(e=this.initial.indirect)==null?void 0:e.map(n=>new o(n)),this.direct=(i=this.initial.direct)==null?void 0:i.map(n=>new o(n))}get nodeType(){return this.node_type}get viewName(){return this.view_name}get displayName(){return decodeURI(this.name)}get displayViewName(){return decodeURI(this.view_name)}get changeCategory(){return this.change_category}}class k extends U{constructor(t){super(t);a(this,"_last");a(this,"_planOverview");a(this,"_lastPlanOverview");p(t)&&t.isModel&&(this._current=t._current,this._last=t._last,this._planOverview=t._planOverview,this._lastPlanOverview=t._lastPlanOverview)}get current(){return this._current??this._last}get environment(){var t,e;return((t=this._last)==null?void 0:t.environment)??((e=this._current)==null?void 0:e.environment)}get meta(){var t,e;return((t=this._last)==null?void 0:t.meta)??((e=this._current)==null?void 0:e.meta)}get plan_options(){var t,e;return((t=this._last)==null?void 0:t.plan_options)??((e=this._current)==null?void 0:e.plan_options)}get start(){var t,e;return((t=this._last)==null?void 0:t.start)??((e=this._current)==null?void 0:e.start)}get end(){var t,e;return((t=this._last)==null?void 0:t.end)??((e=this._current)==null?void 0:e.end)}get overview(){return this._lastPlanOverview??this._planOverview}get backfills(){var t;return((t=this.overview)==null?void 0:t.backfills)??[]}get added(){var t;return((t=this.overview)==null?void 0:t.added)??[]}get removed(){var t;return((t=this.overview)==null?void 0:t.removed)??[]}get direct(){var t;return((t=this.overview)==null?void 0:t.direct)??[]}get indirect(){var t;return((t=this.overview)==null?void 0:t.indirect)??[]}get metadata(){var t;return((t=this.overview)==null?void 0:t.metadata)??[]}get tasks(){var e,i,n,c;const t=((i=(e=this._last)==null?void 0:e.backfill)==null?void 0:i.tasks)??((c=(n=this._current)==null?void 0:n.backfill)==null?void 0:c.tasks)??{};return Object.entries(t??{}).reduce((h,[d,_])=>(h[encodeURI(d)]=new o(_),h),{})}get queue(){var t,e;return((e=(t=this.stageBackfill)==null?void 0:t.queue)==null?void 0:e.map(i=>this.tasks[encodeURI(i)]).filter(Boolean))??[]}get stageValidation(){var t;return(t=this.overview)==null?void 0:t.stageValidation}get stageChanges(){var t;return(t=this.overview)==null?void 0:t.stageChanges}get stageBackfills(){var t;return(t=this.overview)==null?void 0:t.stageBackfills}get stageCreation(){var t,e;return((t=this._last)==null?void 0:t.creation)??((e=this._current)==null?void 0:e.creation)}get stageRestate(){var t,e;return((t=this._last)==null?void 0:t.restate)??((e=this._current)==null?void 0:e.restate)}get stageBackfill(){var t,e;return((t=this._last)==null?void 0:t.backfill)??((e=this._current)==null?void 0:e.backfill)}get stagePromote(){var t,e;return((t=this._last)==null?void 0:t.promote)??((e=this._current)==null?void 0:e.promote)}get shouldShowEvaluation(){return this.isFailed||p(this.stageCreation)||p(this.stageBackfill)||p(this.stagePromote)}get evaluationStart(){var t,e,i,n,c,h;return((e=(t=this.stageCreation)==null?void 0:t.meta)==null?void 0:e.start)??((n=(i=this.stageBackfill)==null?void 0:i.meta)==null?void 0:n.start)??((h=(c=this.stagePromote)==null?void 0:c.meta)==null?void 0:h.start)}get evaluationEnd(){var t,e,i,n,c,h;return((e=(t=this.stagePromote)==null?void 0:t.meta)==null?void 0:e.end)??((n=(i=this.stageBackfill)==null?void 0:i.meta)==null?void 0:n.end)??((h=(c=this.stageCreation)==null?void 0:c.meta)==null?void 0:h.end)}update(t,e){var m,y,A,g,M,T,E;const{creation:i,restate:n,backfill:c,promote:h,meta:d,environment:_}=t,B=l(d)||l(_)?void 0:t;if(l(B)){this._current=void 0;return}l(this._current)&&(this._current=t),this._current.start=t.start,this._current.end=t.end,this._current.meta=t.meta,this._current.environment=t.environment,this._current.plan_options=t.plan_options,p(i)&&(l(this._current.creation)||v((m=this._current.creation.meta)==null?void 0:m.done))&&(this._current.creation=i),p(n)&&(l(this._current.restate)||v((y=this._current.restate.meta)==null?void 0:y.done))&&(this._current.restate=n),p(c)&&(l(this._current.backfill)||v((A=this._current.backfill.meta)==null?void 0:A.done))&&(this._current.backfill=c),p(h)&&(l(this._current.promote)||v((g=this._current.promote.meta)==null?void 0:g.done))&&(this._current.promote=h),R((T=(M=this.current)==null?void 0:M.meta)==null?void 0:T.done)&&l(this._last)?(this._last=this._current,this._lastPlanOverview=this._planOverview,this._current=void 0,this._planOverview=void 0):this._planOverview=p(d)&&p(_)?e==null?void 0:e.clone():void 0,this.isFetching=f((E=t.meta)==null?void 0:E.done)}reset(){this._current=void 0,this._planOverview=void 0}clear(){this._current=void 0,this._last=void 0,this._planOverview=void 0,this._lastPlanOverview=void 0}clone(){var e;const t=new k;return p(this.current)&&t.update(structuredClone(this.current),(e=this.overview)==null?void 0:e.clone()),t}}class b extends U{get cancel(){var r;return(r=this._current)==null?void 0:r.cancel}get isCancelling(){var r,t,e,i;return v((t=(r=this.current)==null?void 0:r.meta)==null?void 0:t.done)&&((i=(e=this.current)==null?void 0:e.meta)==null?void 0:i.status)===w.init||this.isFetching}update(r){var t;this._current=r,this.isFetching=f((t=r.meta)==null?void 0:t.done)}}class C extends U{constructor(t){super(t);a(this,"_added",[]);a(this,"_removed",[]);a(this,"_direct",[]);a(this,"_indirect",[]);a(this,"_metadata",[]);a(this,"_backfills",[]);p(t)&&t.isModel&&(this._added=t.added,this._removed=t.removed,this._direct=t.direct,this._indirect=t.indirect,this._metadata=t.metadata,this._backfills=t.backfills)}get stageValidation(){var t;return(t=this._current)==null?void 0:t.validation}get stageChanges(){var t;return(t=this._current)==null?void 0:t.changes}get stageBackfills(){var t;return(t=this._current)==null?void 0:t.backfills}get validation(){var t;return(t=this._current)==null?void 0:t.validation}get hasChanges(){var d;if(l((d=this._current)==null?void 0:d.changes))return;const{added:t,removed:e,modified:i}=this._current.changes??{};if([t,e,i].every(l))return;const{direct:n,indirect:c,metadata:h}=i??{};return[t,e,n,c,h].some(V)}get changes(){var t;return(t=this._current)==null?void 0:t.changes}get hasBackfills(){var t,e,i;return l((e=(t=this._current)==null?void 0:t.backfills)==null?void 0:e.models)?void 0:V((i=this._current.backfills)==null?void 0:i.models)}get hasUpdates(){return R(this.hasChanges)||R(this.hasBackfills)}get backfills(){return this._backfills}get added(){return this._added}get removed(){return this._removed}get direct(){return this._direct}get indirect(){return this._indirect}get metadata(){return this._metadata}get isVirtualUpdate(){return p(this.hasChanges)&&l(this.hasBackfills)||!!this.hasChanges&&this.skipBackfill}get isMetadataUpdate(){var t;return!!((t=this.metadata)!=null&&t.length)&&l(this.hasBackfills)}get isBackfillUpdate(){return v(this.hasChanges)&&!!this.hasBackfills&&f(this.skipBackfill)}get isChangesAndBackfillUpdate(){return!!this.hasChanges&&!!this.hasBackfills&&f(this.skipBackfill)}get isLatest(){return this.isFinished&&l(this.hasChanges)&&(l(this.hasBackfills)||this.skipBackfill)}get skipTests(){var t,e;return((e=(t=this._current)==null?void 0:t.plan_options)==null?void 0:e.skip_tests)??!1}get skipBackfill(){var t,e;return((e=(t=this._current)==null?void 0:t.plan_options)==null?void 0:e.skip_backfill)??!1}update(t){var c,h,d,_,P,B,m,y,A;this._current=t,this.isFetching=f((c=t.meta)==null?void 0:c.done);const e=((h=this._current)==null?void 0:h.changes)??{},i=(e==null?void 0:e.modified)??{},n=((d=this._current)==null?void 0:d.backfills)??{};this._added=((_=e.added)==null?void 0:_.map(g=>new o(g)))??[],this._removed=((P=e.removed)==null?void 0:P.map(g=>new o(g)))??[],this._direct=((B=i.direct)==null?void 0:B.map(g=>new o(g)))??[],this._indirect=((m=i.indirect)==null?void 0:m.map(g=>new o(g)))??[],this._metadata=((y=i.metadata)==null?void 0:y.map(g=>new o(g)))??[],this._backfills=((A=n.models)==null?void 0:A.map(g=>new o(g)))??[]}clone(){const t=new C;return p(this.current)&&t.update(structuredClone(this.current)),t}}const G=D((u,r)=>({planAction:new O,planOverview:new C,planApply:new k,planCancel:new b,setPlanAction:t=>{u(()=>({planAction:new O(t)}))},setPlanApply:t=>{u(()=>({planApply:new k(t)}))},setPlanOverview:t=>{u(()=>({planOverview:new C(t)}))},setPlanCancel:t=>{u(()=>({planCancel:new b(t)}))},resetPlanTrackers:()=>{const t=r();t.planApply.reset(),t.planCancel.reset(),t.planOverview.reset(),u(()=>({planApply:new k(t.planApply),planCancel:new b(t.planCancel),planOverview:new C(t.planOverview)}))},resetPlanCancel:()=>{const t=r();t.planCancel.reset(),u(()=>({planCancel:new b(t.planCancel)}))},clearPlanApply:()=>{const t=r();t.planApply.clear(),u(()=>({planApply:new k(t.planApply)}))}}));export{s as E,C as M,O as a,G as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{R as S,r as u,aj as _n,at as ot}from"./index-DGopuBhO.js";import{u as Wn,i as Me,e as Gn,o as Vt,d as qe,m as Ye,g as Un,j as Vn,r as Ie,s as Kn,f as qn,a as Yn,c as zn}from"./floating-ui.react-dom-CN8_HaDW.js";const Kt=typeof document<"u"?S.useLayoutEffect:()=>{};function Xn(e){const t=u.useRef(null);return Kt(()=>{t.current=e},[e]),u.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const pe=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},me=e=>e&&"window"in e&&e.window===e?e:pe(e).defaultView||window;function Jn(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function Qn(e){return Jn(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let Zn=!1;function ht(){return Zn}function qt(e,t){if(!ht())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:Qn(n)?n=n.host:n=n.parentNode}return!1}const lt=(e=document)=>{var t;if(!ht())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function Yt(e){return ht()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function er(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function tr(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function zt(e){let t=null;return()=>(t==null&&(t=e()),t)}const nr=zt(function(){return tr(/^Mac/i)}),rr=zt(function(){return er(/Android/i)});function Xt(){let e=u.useRef(new Map),t=u.useCallback((o,a,i,l)=>{let s=l!=null&&l.once?(...c)=>{e.current.delete(i),i(...c)}:i;e.current.set(i,{type:a,eventTarget:o,fn:s,options:l}),o.addEventListener(a,s,l)},[]),n=u.useCallback((o,a,i,l)=>{var s;let c=((s=e.current.get(i))===null||s===void 0?void 0:s.fn)||i;o.removeEventListener(a,c,l),e.current.delete(i)},[]),r=u.useCallback(()=>{e.current.forEach((o,a)=>{n(o.eventTarget,o.type,a,o.options)})},[n]);return u.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function or(e){return e.mozInputSource===0&&e.isTrusted?!0:rr()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Jt(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function lr(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function Qt(e){let t=u.useRef({isFocused:!1,observer:null});Kt(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=Xn(r=>{e==null||e(r)});return u.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=r.target,a=i=>{if(t.current.isFocused=!1,o.disabled){let l=Jt(i);n(l)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",a,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){var i;(i=t.current.observer)===null||i===void 0||i.disconnect();let l=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:l})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:l}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let ar=!1,Re=null,at=new Set,Te=new Map,Ee=!1,ut=!1;const ur={Tab:!0,Escape:!0};function gt(e,t){for(let n of at)n(e,t)}function sr(e){return!(e.metaKey||!nr()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Ne(e){Ee=!0,sr(e)&&(Re="keyboard",gt("keyboard",e))}function ye(e){Re="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Ee=!0,gt("pointer",e))}function Zt(e){or(e)&&(Ee=!0,Re="virtual")}function en(e){e.target===window||e.target===document||ar||!e.isTrusted||(!Ee&&!ut&&(Re="virtual",gt("virtual",e)),Ee=!1,ut=!1)}function tn(){Ee=!1,ut=!0}function st(e){if(typeof window>"u"||typeof document>"u"||Te.get(me(e)))return;const t=me(e),n=pe(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Ee=!0,r.apply(this,arguments)},n.addEventListener("keydown",Ne,!0),n.addEventListener("keyup",Ne,!0),n.addEventListener("click",Zt,!0),t.addEventListener("focus",en,!0),t.addEventListener("blur",tn,!1),typeof PointerEvent<"u"&&(n.addEventListener("pointerdown",ye,!0),n.addEventListener("pointermove",ye,!0),n.addEventListener("pointerup",ye,!0)),t.addEventListener("beforeunload",()=>{nn(e)},{once:!0}),Te.set(t,{focus:r})}const nn=(e,t)=>{const n=me(e),r=pe(e);t&&r.removeEventListener("DOMContentLoaded",t),Te.has(n)&&(n.HTMLElement.prototype.focus=Te.get(n).focus,r.removeEventListener("keydown",Ne,!0),r.removeEventListener("keyup",Ne,!0),r.removeEventListener("click",Zt,!0),n.removeEventListener("focus",en,!0),n.removeEventListener("blur",tn,!1),typeof PointerEvent<"u"&&(r.removeEventListener("pointerdown",ye,!0),r.removeEventListener("pointermove",ye,!0),r.removeEventListener("pointerup",ye,!0)),Te.delete(n))};function ir(e){const t=pe(e);let n;return t.readyState!=="loading"?st(e):(n=()=>{st(e)},t.addEventListener("DOMContentLoaded",n)),()=>nn(e,n)}typeof document<"u"&&ir();function rn(){return Re!=="pointer"}const cr=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function fr(e,t,n){let r=pe(n==null?void 0:n.target);const o=typeof window<"u"?me(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,a=typeof window<"u"?me(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,i=typeof window<"u"?me(n==null?void 0:n.target).HTMLElement:HTMLElement,l=typeof window<"u"?me(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof o&&!cr.has(r.activeElement.type)||r.activeElement instanceof a||r.activeElement instanceof i&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof l&&!ur[n.key])}function dr(e,t,n){st(),u.useEffect(()=>{let r=(o,a)=>{fr(!!(n!=null&&n.isTextInput),o,a)&&e(rn())};return at.add(r),()=>{at.delete(r)}},t)}function pr(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const a=u.useCallback(s=>{if(s.target===s.currentTarget)return r&&r(s),o&&o(!1),!0},[r,o]),i=Qt(a),l=u.useCallback(s=>{const c=pe(s.target),f=c?lt(c):lt();s.target===s.currentTarget&&f===Yt(s.nativeEvent)&&(n&&n(s),o&&o(!0),i(s))},[o,n,i]);return{focusProps:{onFocus:!t&&(n||o||r)?l:void 0,onBlur:!t&&(r||o)?a:void 0}}}function vr(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,a=u.useRef({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:l}=Xt(),s=u.useCallback(h=>{h.currentTarget.contains(h.target)&&a.current.isFocusWithin&&!h.currentTarget.contains(h.relatedTarget)&&(a.current.isFocusWithin=!1,l(),n&&n(h),o&&o(!1))},[n,o,a,l]),c=Qt(s),f=u.useCallback(h=>{if(!h.currentTarget.contains(h.target))return;const m=pe(h.target),d=lt(m);if(!a.current.isFocusWithin&&d===Yt(h.nativeEvent)){r&&r(h),o&&o(!0),a.current.isFocusWithin=!0,c(h);let p=h.currentTarget;i(m,"focus",v=>{if(a.current.isFocusWithin&&!qt(p,v.target)){let g=new m.defaultView.FocusEvent("blur",{relatedTarget:v.target});lr(g,p);let E=Jt(g);s(E)}},{capture:!0})}},[r,o,c,i,s]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:f,onBlur:s}}}let it=!1,ze=0;function mr(){it=!0,setTimeout(()=>{it=!1},50)}function Ft(e){e.pointerType==="touch"&&mr()}function hr(){if(!(typeof document>"u"))return typeof PointerEvent<"u"&&document.addEventListener("pointerup",Ft),ze++,()=>{ze--,!(ze>0)&&typeof PointerEvent<"u"&&document.removeEventListener("pointerup",Ft)}}function gr(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[a,i]=u.useState(!1),l=u.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;u.useEffect(hr,[]);let{addGlobalListener:s,removeAllGlobalListeners:c}=Xt(),{hoverProps:f,triggerHoverEnd:h}=u.useMemo(()=>{let m=(v,g)=>{if(l.pointerType=g,o||g==="touch"||l.isHovered||!v.currentTarget.contains(v.target))return;l.isHovered=!0;let E=v.currentTarget;l.target=E,s(pe(v.target),"pointerover",y=>{l.isHovered&&l.target&&!qt(l.target,y.target)&&d(y,y.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:E,pointerType:g}),n&&n(!0),i(!0)},d=(v,g)=>{let E=l.target;l.pointerType="",l.target=null,!(g==="touch"||!l.isHovered||!E)&&(l.isHovered=!1,c(),r&&r({type:"hoverend",target:E,pointerType:g}),n&&n(!1),i(!1))},p={};return typeof PointerEvent<"u"&&(p.onPointerEnter=v=>{it&&v.pointerType==="mouse"||m(v,v.pointerType)},p.onPointerLeave=v=>{!o&&v.currentTarget.contains(v.target)&&d(v,v.pointerType)}),{hoverProps:p,triggerHoverEnd:d}},[t,n,r,o,l,s,c]);return u.useEffect(()=>{o&&h({currentTarget:l.target},l.pointerType)},[o]),{hoverProps:f,isHovered:a}}function br(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=u.useRef({isFocused:!1,isFocusVisible:t||rn()}),[a,i]=u.useState(!1),[l,s]=u.useState(()=>o.current.isFocused&&o.current.isFocusVisible),c=u.useCallback(()=>s(o.current.isFocused&&o.current.isFocusVisible),[]),f=u.useCallback(d=>{o.current.isFocused=d,i(d),c()},[c]);dr(d=>{o.current.isFocusVisible=d,c()},[],{isTextInput:n});let{focusProps:h}=pr({isDisabled:r,onFocusChange:f}),{focusWithinProps:m}=vr({isDisabled:!r,onFocusWithinChange:f});return{isFocused:a,isFocusVisible:l,focusProps:r?m:h}}var Er=Object.defineProperty,$r=(e,t,n)=>t in e?Er(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xe=(e,t,n)=>($r(e,typeof t!="symbol"?t+"":t,n),n);let yr=class{constructor(){Xe(this,"current",this.detect()),Xe(this,"handoffState","pending"),Xe(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},be=new yr;function Se(e){var t,n;return be.isServer?null:e?"ownerDocument"in e?e.ownerDocument:"current"in e?(n=(t=e.current)==null?void 0:t.ownerDocument)!=null?n:document:null:document}function on(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function oe(){let e=[],t={addEventListener(n,r,o,a){return n.addEventListener(r,o,a),t.add(()=>n.removeEventListener(r,o,a))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return on(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let a=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:a})})},group(n){let r=oe();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function je(){let[e]=u.useState(oe);return u.useEffect(()=>()=>e.dispose(),[e]),e}let N=(e,t)=>{be.isServer?u.useEffect(e,t):u.useLayoutEffect(e,t)};function se(e){let t=u.useRef(e);return N(()=>{t.current=e},[e]),t}let x=function(e){let t=se(e);return S.useCallback((...n)=>t.current(...n),[t])};function wr(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function Pr(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function Sr({disabled:e=!1}={}){let t=u.useRef(null),[n,r]=u.useState(!1),o=je(),a=x(()=>{t.current=null,r(!1),o.dispose()}),i=x(l=>{if(o.dispose(),t.current===null){t.current=l.currentTarget,r(!0);{let s=Se(l.currentTarget);o.addEventListener(s,"pointerup",a,!1),o.addEventListener(s,"pointermove",c=>{if(t.current){let f=wr(c);r(Pr(f,t.current.getBoundingClientRect()))}},!1),o.addEventListener(s,"pointercancel",a,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:i,onPointerUp:a,onClick:a}}}function ct(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function J(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,J),r}var we=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(we||{}),ce=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(ce||{});function ee(){let e=xr();return u.useCallback(t=>Cr({mergeRefs:e,...t}),[e])}function Cr({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:a=!0,name:i,mergeRefs:l}){l=l??Fr;let s=ln(t,e);if(a)return Le(s,n,r,i,l);let c=o??0;if(c&2){let{static:f=!1,...h}=s;if(f)return Le(h,n,r,i,l)}if(c&1){let{unmount:f=!0,...h}=s;return J(f?0:1,{0(){return null},1(){return Le({...h,hidden:!0,style:{display:"none"}},n,r,i,l)}})}return Le(s,n,r,i,l)}function Le(e,t={},n,r,o){let{as:a=n,children:i,refName:l="ref",...s}=Je(e,["unmount","static"]),c=e.ref!==void 0?{[l]:e.ref}:{},f=typeof i=="function"?i(t):i;"className"in s&&s.className&&typeof s.className=="function"&&(s.className=s.className(t)),s["aria-labelledby"]&&s["aria-labelledby"]===s.id&&(s["aria-labelledby"]=void 0);let h={};if(t){let m=!1,d=[];for(let[p,v]of Object.entries(t))typeof v=="boolean"&&(m=!0),v===!0&&d.push(p.replace(/([A-Z])/g,g=>`-${g.toLowerCase()}`));if(m){h["data-headlessui-state"]=d.join(" ");for(let p of d)h[`data-${p}`]=""}}if(a===u.Fragment&&(Object.keys(ve(s)).length>0||Object.keys(ve(h)).length>0))if(!u.isValidElement(f)||Array.isArray(f)&&f.length>1){if(Object.keys(ve(s)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(ve(s)).concat(Object.keys(ve(h))).map(m=>` - ${m}`).join(`
|
|
1
|
+
import{R as S,r as u,aj as _n,at as ot}from"./index-M-fcEAWc.js";import{u as Wn,i as Me,e as Gn,o as Vt,d as qe,m as Ye,g as Un,j as Vn,r as Ie,s as Kn,f as qn,a as Yn,c as zn}from"./floating-ui.react-dom-8hwAvuN1.js";const Kt=typeof document<"u"?S.useLayoutEffect:()=>{};function Xn(e){const t=u.useRef(null);return Kt(()=>{t.current=e},[e]),u.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const pe=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},me=e=>e&&"window"in e&&e.window===e?e:pe(e).defaultView||window;function Jn(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function Qn(e){return Jn(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let Zn=!1;function ht(){return Zn}function qt(e,t){if(!ht())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:Qn(n)?n=n.host:n=n.parentNode}return!1}const lt=(e=document)=>{var t;if(!ht())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function Yt(e){return ht()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function er(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function tr(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function zt(e){let t=null;return()=>(t==null&&(t=e()),t)}const nr=zt(function(){return tr(/^Mac/i)}),rr=zt(function(){return er(/Android/i)});function Xt(){let e=u.useRef(new Map),t=u.useCallback((o,a,i,l)=>{let s=l!=null&&l.once?(...c)=>{e.current.delete(i),i(...c)}:i;e.current.set(i,{type:a,eventTarget:o,fn:s,options:l}),o.addEventListener(a,s,l)},[]),n=u.useCallback((o,a,i,l)=>{var s;let c=((s=e.current.get(i))===null||s===void 0?void 0:s.fn)||i;o.removeEventListener(a,c,l),e.current.delete(i)},[]),r=u.useCallback(()=>{e.current.forEach((o,a)=>{n(o.eventTarget,o.type,a,o.options)})},[n]);return u.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function or(e){return e.mozInputSource===0&&e.isTrusted?!0:rr()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Jt(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function lr(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function Qt(e){let t=u.useRef({isFocused:!1,observer:null});Kt(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=Xn(r=>{e==null||e(r)});return u.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=r.target,a=i=>{if(t.current.isFocused=!1,o.disabled){let l=Jt(i);n(l)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",a,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){var i;(i=t.current.observer)===null||i===void 0||i.disconnect();let l=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:l})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:l}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let ar=!1,Re=null,at=new Set,Te=new Map,Ee=!1,ut=!1;const ur={Tab:!0,Escape:!0};function gt(e,t){for(let n of at)n(e,t)}function sr(e){return!(e.metaKey||!nr()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Ne(e){Ee=!0,sr(e)&&(Re="keyboard",gt("keyboard",e))}function ye(e){Re="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Ee=!0,gt("pointer",e))}function Zt(e){or(e)&&(Ee=!0,Re="virtual")}function en(e){e.target===window||e.target===document||ar||!e.isTrusted||(!Ee&&!ut&&(Re="virtual",gt("virtual",e)),Ee=!1,ut=!1)}function tn(){Ee=!1,ut=!0}function st(e){if(typeof window>"u"||typeof document>"u"||Te.get(me(e)))return;const t=me(e),n=pe(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Ee=!0,r.apply(this,arguments)},n.addEventListener("keydown",Ne,!0),n.addEventListener("keyup",Ne,!0),n.addEventListener("click",Zt,!0),t.addEventListener("focus",en,!0),t.addEventListener("blur",tn,!1),typeof PointerEvent<"u"&&(n.addEventListener("pointerdown",ye,!0),n.addEventListener("pointermove",ye,!0),n.addEventListener("pointerup",ye,!0)),t.addEventListener("beforeunload",()=>{nn(e)},{once:!0}),Te.set(t,{focus:r})}const nn=(e,t)=>{const n=me(e),r=pe(e);t&&r.removeEventListener("DOMContentLoaded",t),Te.has(n)&&(n.HTMLElement.prototype.focus=Te.get(n).focus,r.removeEventListener("keydown",Ne,!0),r.removeEventListener("keyup",Ne,!0),r.removeEventListener("click",Zt,!0),n.removeEventListener("focus",en,!0),n.removeEventListener("blur",tn,!1),typeof PointerEvent<"u"&&(r.removeEventListener("pointerdown",ye,!0),r.removeEventListener("pointermove",ye,!0),r.removeEventListener("pointerup",ye,!0)),Te.delete(n))};function ir(e){const t=pe(e);let n;return t.readyState!=="loading"?st(e):(n=()=>{st(e)},t.addEventListener("DOMContentLoaded",n)),()=>nn(e,n)}typeof document<"u"&&ir();function rn(){return Re!=="pointer"}const cr=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function fr(e,t,n){let r=pe(n==null?void 0:n.target);const o=typeof window<"u"?me(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,a=typeof window<"u"?me(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,i=typeof window<"u"?me(n==null?void 0:n.target).HTMLElement:HTMLElement,l=typeof window<"u"?me(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof o&&!cr.has(r.activeElement.type)||r.activeElement instanceof a||r.activeElement instanceof i&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof l&&!ur[n.key])}function dr(e,t,n){st(),u.useEffect(()=>{let r=(o,a)=>{fr(!!(n!=null&&n.isTextInput),o,a)&&e(rn())};return at.add(r),()=>{at.delete(r)}},t)}function pr(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const a=u.useCallback(s=>{if(s.target===s.currentTarget)return r&&r(s),o&&o(!1),!0},[r,o]),i=Qt(a),l=u.useCallback(s=>{const c=pe(s.target),f=c?lt(c):lt();s.target===s.currentTarget&&f===Yt(s.nativeEvent)&&(n&&n(s),o&&o(!0),i(s))},[o,n,i]);return{focusProps:{onFocus:!t&&(n||o||r)?l:void 0,onBlur:!t&&(r||o)?a:void 0}}}function vr(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,a=u.useRef({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:l}=Xt(),s=u.useCallback(h=>{h.currentTarget.contains(h.target)&&a.current.isFocusWithin&&!h.currentTarget.contains(h.relatedTarget)&&(a.current.isFocusWithin=!1,l(),n&&n(h),o&&o(!1))},[n,o,a,l]),c=Qt(s),f=u.useCallback(h=>{if(!h.currentTarget.contains(h.target))return;const m=pe(h.target),d=lt(m);if(!a.current.isFocusWithin&&d===Yt(h.nativeEvent)){r&&r(h),o&&o(!0),a.current.isFocusWithin=!0,c(h);let p=h.currentTarget;i(m,"focus",v=>{if(a.current.isFocusWithin&&!qt(p,v.target)){let g=new m.defaultView.FocusEvent("blur",{relatedTarget:v.target});lr(g,p);let E=Jt(g);s(E)}},{capture:!0})}},[r,o,c,i,s]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:f,onBlur:s}}}let it=!1,ze=0;function mr(){it=!0,setTimeout(()=>{it=!1},50)}function Ft(e){e.pointerType==="touch"&&mr()}function hr(){if(!(typeof document>"u"))return typeof PointerEvent<"u"&&document.addEventListener("pointerup",Ft),ze++,()=>{ze--,!(ze>0)&&typeof PointerEvent<"u"&&document.removeEventListener("pointerup",Ft)}}function gr(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[a,i]=u.useState(!1),l=u.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;u.useEffect(hr,[]);let{addGlobalListener:s,removeAllGlobalListeners:c}=Xt(),{hoverProps:f,triggerHoverEnd:h}=u.useMemo(()=>{let m=(v,g)=>{if(l.pointerType=g,o||g==="touch"||l.isHovered||!v.currentTarget.contains(v.target))return;l.isHovered=!0;let E=v.currentTarget;l.target=E,s(pe(v.target),"pointerover",y=>{l.isHovered&&l.target&&!qt(l.target,y.target)&&d(y,y.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:E,pointerType:g}),n&&n(!0),i(!0)},d=(v,g)=>{let E=l.target;l.pointerType="",l.target=null,!(g==="touch"||!l.isHovered||!E)&&(l.isHovered=!1,c(),r&&r({type:"hoverend",target:E,pointerType:g}),n&&n(!1),i(!1))},p={};return typeof PointerEvent<"u"&&(p.onPointerEnter=v=>{it&&v.pointerType==="mouse"||m(v,v.pointerType)},p.onPointerLeave=v=>{!o&&v.currentTarget.contains(v.target)&&d(v,v.pointerType)}),{hoverProps:p,triggerHoverEnd:d}},[t,n,r,o,l,s,c]);return u.useEffect(()=>{o&&h({currentTarget:l.target},l.pointerType)},[o]),{hoverProps:f,isHovered:a}}function br(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=u.useRef({isFocused:!1,isFocusVisible:t||rn()}),[a,i]=u.useState(!1),[l,s]=u.useState(()=>o.current.isFocused&&o.current.isFocusVisible),c=u.useCallback(()=>s(o.current.isFocused&&o.current.isFocusVisible),[]),f=u.useCallback(d=>{o.current.isFocused=d,i(d),c()},[c]);dr(d=>{o.current.isFocusVisible=d,c()},[],{isTextInput:n});let{focusProps:h}=pr({isDisabled:r,onFocusChange:f}),{focusWithinProps:m}=vr({isDisabled:!r,onFocusWithinChange:f});return{isFocused:a,isFocusVisible:l,focusProps:r?m:h}}var Er=Object.defineProperty,$r=(e,t,n)=>t in e?Er(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xe=(e,t,n)=>($r(e,typeof t!="symbol"?t+"":t,n),n);let yr=class{constructor(){Xe(this,"current",this.detect()),Xe(this,"handoffState","pending"),Xe(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},be=new yr;function Se(e){var t,n;return be.isServer?null:e?"ownerDocument"in e?e.ownerDocument:"current"in e?(n=(t=e.current)==null?void 0:t.ownerDocument)!=null?n:document:null:document}function on(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function oe(){let e=[],t={addEventListener(n,r,o,a){return n.addEventListener(r,o,a),t.add(()=>n.removeEventListener(r,o,a))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return on(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let a=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:a})})},group(n){let r=oe();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function je(){let[e]=u.useState(oe);return u.useEffect(()=>()=>e.dispose(),[e]),e}let N=(e,t)=>{be.isServer?u.useEffect(e,t):u.useLayoutEffect(e,t)};function se(e){let t=u.useRef(e);return N(()=>{t.current=e},[e]),t}let x=function(e){let t=se(e);return S.useCallback((...n)=>t.current(...n),[t])};function wr(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function Pr(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function Sr({disabled:e=!1}={}){let t=u.useRef(null),[n,r]=u.useState(!1),o=je(),a=x(()=>{t.current=null,r(!1),o.dispose()}),i=x(l=>{if(o.dispose(),t.current===null){t.current=l.currentTarget,r(!0);{let s=Se(l.currentTarget);o.addEventListener(s,"pointerup",a,!1),o.addEventListener(s,"pointermove",c=>{if(t.current){let f=wr(c);r(Pr(f,t.current.getBoundingClientRect()))}},!1),o.addEventListener(s,"pointercancel",a,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:i,onPointerUp:a,onClick:a}}}function ct(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function J(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,J),r}var we=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(we||{}),ce=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(ce||{});function ee(){let e=xr();return u.useCallback(t=>Cr({mergeRefs:e,...t}),[e])}function Cr({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:a=!0,name:i,mergeRefs:l}){l=l??Fr;let s=ln(t,e);if(a)return Le(s,n,r,i,l);let c=o??0;if(c&2){let{static:f=!1,...h}=s;if(f)return Le(h,n,r,i,l)}if(c&1){let{unmount:f=!0,...h}=s;return J(f?0:1,{0(){return null},1(){return Le({...h,hidden:!0,style:{display:"none"}},n,r,i,l)}})}return Le(s,n,r,i,l)}function Le(e,t={},n,r,o){let{as:a=n,children:i,refName:l="ref",...s}=Je(e,["unmount","static"]),c=e.ref!==void 0?{[l]:e.ref}:{},f=typeof i=="function"?i(t):i;"className"in s&&s.className&&typeof s.className=="function"&&(s.className=s.className(t)),s["aria-labelledby"]&&s["aria-labelledby"]===s.id&&(s["aria-labelledby"]=void 0);let h={};if(t){let m=!1,d=[];for(let[p,v]of Object.entries(t))typeof v=="boolean"&&(m=!0),v===!0&&d.push(p.replace(/([A-Z])/g,g=>`-${g.toLowerCase()}`));if(m){h["data-headlessui-state"]=d.join(" ");for(let p of d)h[`data-${p}`]=""}}if(a===u.Fragment&&(Object.keys(ve(s)).length>0||Object.keys(ve(h)).length>0))if(!u.isValidElement(f)||Array.isArray(f)&&f.length>1){if(Object.keys(ve(s)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(ve(s)).concat(Object.keys(ve(h))).map(m=>` - ${m}`).join(`
|
|
2
2
|
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(m=>` - ${m}`).join(`
|
|
3
3
|
`)].join(`
|
|
4
4
|
`))}else{let m=f.props,d=m==null?void 0:m.className,p=typeof d=="function"?(...E)=>ct(d(...E),s.className):ct(d,s.className),v=p?{className:p}:{},g=ln(f.props,ve(Je(s,["ref"])));for(let E in h)E in g&&delete h[E];return u.cloneElement(f,Object.assign({},g,h,c,{ref:o(Tr(f),c.ref)},v))}return u.createElement(a,Object.assign({},Je(s,["ref"]),a!==u.Fragment&&c,a!==u.Fragment&&h),f)}function xr(){let e=u.useRef([]),t=u.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function Fr(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function ln(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[o=>{var a;return(a=o==null?void 0:o.preventDefault)==null?void 0:a.call(o)}]);for(let r in n)Object.assign(t,{[r](o,...a){let i=n[r];for(let l of i){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;l(o,...a)}}});return t}function ft(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];for(let r in n)Object.assign(t,{[r](...o){let a=n[r];for(let i of a)i==null||i(...o)}});return t}function z(e){var t;return Object.assign(u.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function ve(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Je(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function Tr(e){return S.version.split(".")[0]>="19"?e.props.ref:e.ref}let Or="span";var Oe=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Oe||{});function Rr(e,t){var n;let{features:r=1,...o}=e,a={ref:t,"aria-hidden":(r&2)===2?!0:(n=o["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return ee()({ourProps:a,theirProps:o,slot:{},defaultTag:Or,name:"Hidden"})}let De=z(Rr);function an(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function de(e){return an(e)&&"tagName"in e}function re(e){return de(e)&&"accessKey"in e}function he(e){return de(e)&&"tabIndex"in e}function kr(e){return de(e)&&"style"in e}function Mr(e){return re(e)&&e.nodeName==="IFRAME"}function Lr(e){return re(e)&&e.nodeName==="INPUT"}function Ul(e){return re(e)&&e.nodeName==="LABEL"}function Ar(e){return re(e)&&e.nodeName==="FIELDSET"}function un(e){return re(e)&&e.nodeName==="LEGEND"}function Vl(e){return de(e)?e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}function sn(e){let t=e.parentElement,n=null;for(;t&&!Ar(t);)un(t)&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&Ir(n)?!1:r}function Ir(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(un(t))return!1;t=t.previousElementSibling}return!0}let cn=Symbol();function fn(e,t=!0){return Object.assign(e,{[cn]:t})}function Z(...e){let t=u.useRef(e);u.useEffect(()=>{t.current=e},[e]);let n=x(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[cn]))?void 0:n}var ie=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(ie||{});let Nr=u.createContext(()=>{});function dn({value:e,children:t}){return S.createElement(Nr.Provider,{value:e},t)}function Dr(e){if(e===null)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function Hr(e,t=!1){let[n,r]=u.useReducer(()=>({}),{}),o=u.useMemo(()=>Dr(e),[e,n]);return N(()=>{if(!e)return;let a=new ResizeObserver(r);return a.observe(e),()=>{a.disconnect()}},[e]),t?{width:`${o.width}px`,height:`${o.height}px`}:o}let pn=class extends Map{constructor(t){super(),this.factory=t}get(t){let n=super.get(t);return n===void 0&&(n=this.factory(t),this.set(t,n)),n}};var jr=Object.defineProperty,Br=(e,t,n)=>t in e?jr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_r=(e,t,n)=>(Br(e,t+"",n),n),vn=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},X=(e,t,n)=>(vn(e,t,"read from private field"),n?n.call(e):t.get(e)),Qe=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Tt=(e,t,n,r)=>(vn(e,t,"write to private field"),t.set(e,n),n),ne,xe,Fe;let mn=class{constructor(t){Qe(this,ne,{}),Qe(this,xe,new pn(()=>new Set)),Qe(this,Fe,new Set),_r(this,"disposables",oe()),Tt(this,ne,t)}dispose(){this.disposables.dispose()}get state(){return X(this,ne)}subscribe(t,n){let r={selector:t,callback:n,current:t(X(this,ne))};return X(this,Fe).add(r),this.disposables.add(()=>{X(this,Fe).delete(r)})}on(t,n){return X(this,xe).get(t).add(n),this.disposables.add(()=>{X(this,xe).get(t).delete(n)})}send(t){let n=this.reduce(X(this,ne),t);if(n!==X(this,ne)){Tt(this,ne,n);for(let r of X(this,Fe)){let o=r.selector(X(this,ne));hn(r.current,o)||(r.current=o,r.callback(o))}for(let r of X(this,xe).get(t.type))r(X(this,ne),t)}}};ne=new WeakMap,xe=new WeakMap,Fe=new WeakMap;function hn(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null?!1:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:Ze(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size!==t.size?!1:Ze(e.entries(),t.entries()):Ot(e)&&Ot(t)?Ze(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function Ze(e,t){do{let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}while(!0)}function Ot(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function Yl(e){let[t,n]=e(),r=oe();return(...o)=>{t(...o),r.dispose(),r.microTask(n)}}var Wr=Object.defineProperty,Gr=(e,t,n)=>t in e?Wr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rt=(e,t,n)=>(Gr(e,typeof t!="symbol"?t+"":t,n),n),Ur=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(Ur||{});let Vr={0(e,t){let n=t.id,r=e.stack,o=e.stack.indexOf(n);if(o!==-1){let a=e.stack.slice();return a.splice(o,1),a.push(n),r=a,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(r===-1)return e;let o=e.stack.slice();return o.splice(r,1),{...e,stack:o}}},Kr=class gn extends mn{constructor(){super(...arguments),Rt(this,"actions",{push:t=>this.send({type:0,id:t}),pop:t=>this.send({type:1,id:t})}),Rt(this,"selectors",{isTop:(t,n)=>t.stack[t.stack.length-1]===n,inStack:(t,n)=>t.stack.includes(n)})}static new(){return new gn({stack:[]})}reduce(t,n){return J(n.type,Vr,t,n)}};const bn=new pn(()=>Kr.new());var et={exports:{}},tt={};/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var n=Object.defineProperty;var d=(i,t,e)=>t in i?n(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var c=(i,t,e)=>d(i,typeof t!="symbol"?t+"":t,e);import{a,M as f}from"./file-
|
|
1
|
+
var n=Object.defineProperty;var d=(i,t,e)=>t in i?n(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var c=(i,t,e)=>d(i,typeof t!="symbol"?t+"":t,e);import{a,M as f}from"./file-DgtoMe3u.js";import{b as p,a0 as u}from"./index-M-fcEAWc.js";class h extends a{constructor(e,s){super(e!=null&&e.isModel?e.initial:{...e,directories:(e==null?void 0:e.directories)??[],files:(e==null?void 0:e.files)??[]},s);c(this,"_isOpen",!1);c(this,"directories",[]);c(this,"files",[]);c(this,"syncStateOpen");e!=null&&e.isModel?(this.directories=e.directories,this.files=e.files):this.update({files:this.initial.files,directories:this.initial.directories})}get level(){var e;return(((e=this.parent)==null?void 0:e.level)??-1)+1}get isChanged(){return this.name!==this.initial.name||this.files.some(e=>e.isChanged)||this.directories.some(e=>e.isChanged)}get isEmpty(){return this.directories.length===0&&this.files.length===0}get withFiles(){return this.files.length>0}get withDirectories(){return this.directories.length>0}get isNotEmpty(){return this.withFiles||this.withDirectories}get artifacts(){return this.directories.concat(this.files)}get allDirectories(){return this.directories.concat(this.directories.map(e=>e.allDirectories).flat(100))}get allFiles(){return this.files.concat(this.allDirectories.map(e=>e.files).flat(100))}get allVisibleArtifacts(){return this.directories.map(e=>e.isOpened?[e,e.allVisibleArtifacts]:[e]).flat(100).concat(this.isOpened?this.files:[])}get allArtifacts(){return this.directories.map(e=>[e,e.allArtifacts]).flat(100).concat(this.files)}get isOpened(){return this._isOpen}get isClosed(){return p(this._isOpen)}get isModels(){return this.path.startsWith("models")}get isTests(){return this.path.startsWith("tests")}open(){var e;this._isOpen=!0,(e=this.syncStateOpen)==null||e.call(this,this.isOpened)}close(){var e;this._isOpen=!1,(e=this.syncStateOpen)==null||e.call(this,this.isOpened)}toggle(){this.isOpened?this.close():this.open()}expand(){this.open(),this.directories.forEach(e=>{e.expand()})}collapse(){this.close(),this.directories.forEach(e=>{e.collapse()})}containsName(e){return this.artifacts.some(s=>s.name===e)}hasFile(e){return this.allFiles.includes(e)}hasDirectory(e){return this.allDirectories.includes(e)}addFile(e){this.files.push(e),e.parent=this}addDirectory(e){this.directories.push(e),e.parent=this}removeFile(e){this.files=this.files.filter(s=>s!==e)}removeDirectory(e){this.directories=this.directories.filter(s=>s!==e)}update({files:e=[],directories:s=[]}){this.files=[],this.directories=[],s.forEach(r=>{this.addDirectory(new h(r,this))}),e.forEach(r=>{this.addFile(new f(r,this))})}}const O=u((i,t)=>({tests:void 0,project:new h,selectedFile:void 0,files:new Map,activeRange:[],setTests(e){i(()=>({tests:e}))},setActiveRange(e){const s=t();i(()=>({activeRange:s.project.allVisibleArtifacts.filter(r=>o(r,e??s.activeRange))}))},inActiveRange(e){const s=t();return o(e,s.activeRange)},setProject(e){i(()=>({project:e}))},setFiles(e){const s=t();s.files.clear(),i(()=>({files:new Map(e.reduce((r,l)=>r.set(l.id,l),s.files))}))},setSelectedFile(e){i(()=>({selectedFile:e}))},findArtifactByPath(e){const s=t();return a.findArtifactByPath(s.project,e)},refreshFiles(e){const s=t();s.setFiles(e??s.project.allFiles)}}));function o(i,t){return t.includes(i)}export{h as M,O as u};
|
web/client/dist/index.html
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as u,Q as c,a as n,v as a,j as s,e as f}from"./index-DGopuBhO.js";import{L as g}from"./context-Bxzp3TEa.js";import x from"./ModelLineage-BbFqz62a.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./floating-ui.react-dom-CN8_HaDW.js";import"./editor-CJ4oQlo_.js";import"./file-CFuQwF_m.js";import"./project-CmqDHjoE.js";import"./help-6Q7f7fjd.js";import"./SourceList-DdN6hYD1.js";import"./Input-LXiA3uoO.js";import"./index-C_NFRX2g.js";import"./popover-DJJmvGdj.js";import"./ListboxShow-BUIulc8M.js";import"./SearchList-DgKaZfJZ.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};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|