sqlmesh 0.181.2.dev7__py3-none-any.whl → 0.181.2.dev9__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.
Files changed (52) hide show
  1. sqlmesh/_version.py +2 -2
  2. sqlmesh/lsp/api.py +61 -0
  3. sqlmesh/lsp/main.py +25 -0
  4. {sqlmesh-0.181.2.dev7.dist-info → sqlmesh-0.181.2.dev9.dist-info}/METADATA +1 -1
  5. {sqlmesh-0.181.2.dev7.dist-info → sqlmesh-0.181.2.dev9.dist-info}/RECORD +51 -50
  6. web/client/dist/assets/{Audits-4U9LnWyN.js → Audits-DRkR6sg0.js} +1 -1
  7. web/client/dist/assets/{Banner-DfF4HK9_.js → Banner-BXisqtMu.js} +1 -1
  8. web/client/dist/assets/{ChevronDownIcon-DhkdL7W7.js → ChevronDownIcon-D8CFPQ96.js} +1 -1
  9. web/client/dist/assets/{ChevronRightIcon-CknBR_Ye.js → ChevronRightIcon-BpRv8ZN4.js} +1 -1
  10. web/client/dist/assets/{Content-T59G6CRd.js → Content-KG4KSDDO.js} +1 -1
  11. web/client/dist/assets/{Content-DfnWzoRW.js → Content-pMJLtxGr.js} +1 -1
  12. web/client/dist/assets/{Data-Dvs4EVTS.js → Data-D-rZnh8x.js} +1 -1
  13. web/client/dist/assets/{DataCatalog-CsA-vDbc.js → DataCatalog-BJTDeU-_.js} +1 -1
  14. web/client/dist/assets/{Editor-DsU0OwIl.js → Editor-C8-1rqZ2.js} +1 -1
  15. web/client/dist/assets/{Editor-DgIo0RbF.js → Editor-Cpn7iBcm.js} +1 -1
  16. web/client/dist/assets/{Errors-BOLt2obm.js → Errors-DyDRdQyq.js} +1 -1
  17. web/client/dist/assets/{FileExplorer-CIj2pM9u.js → FileExplorer-CmdsG4yG.js} +3 -3
  18. web/client/dist/assets/{Footer--bTxQCKB.js → Footer-D4ok48Gm.js} +1 -1
  19. web/client/dist/assets/{Header-DmcDkHFL.js → Header-BVwdhMQQ.js} +1 -1
  20. web/client/dist/assets/{Input-CJirBrKe.js → Input-CxOCLTNw.js} +1 -1
  21. web/client/dist/assets/Lineage-ZXdxdqzl.js +1 -0
  22. web/client/dist/assets/{ListboxShow-C0DBUX71.js → ListboxShow-YBO3HIHQ.js} +1 -1
  23. web/client/dist/assets/{ModelLineage-B8hv0xJ-.js → ModelLineage-BFuK5Bgk.js} +1 -1
  24. web/client/dist/assets/{Models-CCm5MLTD.js → Models-Dn2xoUA7.js} +1 -1
  25. web/client/dist/assets/{Page-WrN3RYDT.js → Page-kOwPk8A6.js} +1 -1
  26. web/client/dist/assets/{Plan-CFJZVnkR.js → Plan-BQe3-3RL.js} +1 -1
  27. web/client/dist/assets/{PlusCircleIcon-CcC2lSkc.js → PlusCircleIcon-CXYicjof.js} +1 -1
  28. web/client/dist/assets/{ReportErrors-BK8N5y1z.js → ReportErrors-DaAC3YF4.js} +1 -1
  29. web/client/dist/assets/{Root-DSGcTlxk.js → Root-BIGZcS_U.js} +1 -1
  30. web/client/dist/assets/{SearchList-B9NnvRod.js → SearchList-Lag39srv.js} +1 -1
  31. web/client/dist/assets/{SelectEnvironment-CJsiOTlU.js → SelectEnvironment-0MCV04NI.js} +1 -1
  32. web/client/dist/assets/{SourceList-FVjgH2xJ.js → SourceList-CTL41Fia.js} +1 -1
  33. web/client/dist/assets/{SourceListItem-BDqqo5jo.js → SourceListItem-6mIYlySR.js} +1 -1
  34. web/client/dist/assets/{SplitPane-BSlIdmc8.js → SplitPane-7_khUxNG.js} +1 -1
  35. web/client/dist/assets/{Tests-DAbOEH7t.js → Tests-DSsKelgd.js} +1 -1
  36. web/client/dist/assets/{Welcome-c37SRGFq.js → Welcome-C0F3fb3h.js} +1 -1
  37. web/client/dist/assets/{context-APidk_GA.js → context-B0V9EzWJ.js} +13 -13
  38. web/client/dist/assets/{context-DmjvuTWz.js → context-pytQSsK4.js} +1 -1
  39. web/client/dist/assets/{editor-B2GioI_r.js → editor-CmeEFdEz.js} +1 -1
  40. web/client/dist/assets/{file-C7afm_LM.js → file-DY5SRTK1.js} +1 -1
  41. web/client/dist/assets/{help-C_umCstj.js → help-Bm8ph9oI.js} +1 -1
  42. web/client/dist/assets/{index-CK4fdw8q.js → index-BWibl-Ee.js} +1 -1
  43. web/client/dist/assets/{index-COnjINWU.js → index-C22hdM_h.js} +2 -2
  44. web/client/dist/assets/{plan-BwAtu9hd.js → plan-BUTy2uM-.js} +1 -1
  45. web/client/dist/assets/{project-CWUUCZWT.js → project-CtAE3tsj.js} +1 -1
  46. web/client/dist/assets/{transition-DjPYSO2n.js → transition-CiMBgn_Y.js} +1 -1
  47. web/client/dist/index.html +1 -1
  48. web/client/dist/assets/Lineage-BbLp8RL_.js +0 -1
  49. {sqlmesh-0.181.2.dev7.dist-info → sqlmesh-0.181.2.dev9.dist-info}/WHEEL +0 -0
  50. {sqlmesh-0.181.2.dev7.dist-info → sqlmesh-0.181.2.dev9.dist-info}/entry_points.txt +0 -0
  51. {sqlmesh-0.181.2.dev7.dist-info → sqlmesh-0.181.2.dev9.dist-info}/licenses/LICENSE +0 -0
  52. {sqlmesh-0.181.2.dev7.dist-info → sqlmesh-0.181.2.dev9.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
1
- var N=Object.defineProperty;var D=(u,r,t)=>r in u?N(u,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[r]=t;var a=(u,r,t)=>D(u,typeof r!="symbol"?r+"":r,t);import{a0 as F,s as I,b as f,w as l,g as R,C as w,D as v,i as p,h as V,a1 as x}from"./index-COnjINWU.js";const s={Done:"done",Run:"run",Running:"running",RunningTask:"running-task",ApplyVirtual:"apply-virtual",ApplyBackfill:"apply-backfill",ApplyChangesAndBackfill:"apply-changes-and-backfill",ApplyMetadata:"apply-metadata",Applying:"applying",Cancelling:"cancelling"};class O extends F{constructor(t){super(t!=null&&t.isModel?t.initial:{...t,value:(t==null?void 0:t.value)??s.Run});a(this,"_value");this._value=(t==null?void 0:t.value)??this.initial.value}get value(){return this._value}get isRun(){return this.value===s.Run}get isDone(){return this.value===s.Done}get isApplyVirtual(){return this.value===s.ApplyVirtual}get isApplyBackfill(){return this.value===s.ApplyBackfill}get isApplyChangesAndBackfill(){return this.value===s.ApplyChangesAndBackfill}get isApplyMetadata(){return this.value===s.ApplyMetadata}get isApply(){return this.isApplyVirtual||this.isApplyBackfill||this.isApplyChangesAndBackfill||this.isApplyMetadata}get isCancelling(){return this.value===s.Cancelling}get isApplying(){return this.value===s.Applying}get isRunning(){return I([s.Running,s.RunningTask],this.value)}get isRunningTask(){return this.value===s.RunningTask}get isProcessing(){return this.isRunning||this.isApplying||this.isCancelling}get isIdle(){return f(this.isProcessing)}displayStatus(t){return this.isCancelling?"Cancelling Plan...":this.isApplying?"Applying Plan...":this.isRunning&&l(t.hasChanges)?"Getting Changes...":this.isRunning&&l(t.hasBackfills)?"Getting Backfills...":this.isRunning?"Checking Plan...":this.isRunningTask?"Running Task...":"Plan"}static getActionDisplayName(t,e=[],i="Plan"){if(!e.includes(t.value))return i;let n;switch(t.value){case s.Done:n="Done";break;case s.Running:n="Running...";break;case s.RunningTask:n="Running Task...";break;case s.Applying:n="Applying...";break;case s.Cancelling:n="Cancelling...";break;case s.Run:n="Plan";break;case s.ApplyChangesAndBackfill:n="Apply Changes And Backfill";break;case s.ApplyVirtual:n="Apply Virtual Update";break;case s.ApplyBackfill:n="Apply And Backfill";break;case s.ApplyMetadata:n="Apply Metadata";break;default:n=i;break}return n}static getPlanAction({planOverview:t,planApply:e,planCancel:i}){const n=t.isRunning,c=e.isRunning,h=i.isRunning,d=e.isFinished&&t.isFinished||i.isFinished;return i.isEmpty&&e.isEmpty&&t.isEmpty?s.Run:h?s.Cancelling:c?s.Applying:n?s.Running:d?s.Done:t.isVirtualUpdate?s.ApplyVirtual:t.isMetadataUpdate?s.ApplyMetadata:t.isBackfillUpdate?s.ApplyBackfill:t.isChangesAndBackfillUpdate?s.ApplyChangesAndBackfill:s.Done}}class U extends F{constructor(t){super(t==null?void 0:t.initial);a(this,"_current");a(this,"_isFetching",!1);this._current=t==null?void 0:t._current,this._isFetching=(t==null?void 0:t._isFetching)??!1}get current(){return this._current}get environment(){var t;return(t=this.current)==null?void 0:t.environment}get meta(){var t;return(t=this.current)==null?void 0:t.meta}get plan_options(){var t;return(t=this.current)==null?void 0:t.plan_options}get start(){var t;return(t=this.current)==null?void 0:t.start}get end(){var t;return(t=this.current)==null?void 0:t.end}get duration(){var t;return((t=this==null?void 0:this.meta)==null?void 0:t.duration)??-1}get isFinished(){var t,e,i,n;return R((e=(t=this.current)==null?void 0:t.meta)==null?void 0:e.done)&&((n=(i=this.current)==null?void 0:i.meta)==null?void 0:n.status)!==w.init&&f(this.isFetching)}get isRunning(){var t,e,i,n;return v((e=(t=this.current)==null?void 0:t.meta)==null?void 0:e.done)&&((n=(i=this.current)==null?void 0:i.meta)==null?void 0:n.status)===w.init||this.isFetching}get isSuccessful(){var t,e;return this.isFinished&&((e=(t=this.current)==null?void 0:t.meta)==null?void 0:e.status)===w.success}get isFailed(){var t,e,i;return this.isFinished&&(l((t=this.current)==null?void 0:t.meta)||((i=(e=this.current)==null?void 0:e.meta)==null?void 0:i.status)===w.fail)}get isEmpty(){return l(this.current)}get isFetching(){return this._isFetching}set isFetching(t){this._isFetching=t}reset(){this._current=void 0}}class o extends F{constructor(t){var e,i;super(t);a(this,"name");a(this,"view_name");a(this,"node_type");a(this,"change_category");a(this,"diff");a(this,"indirect");a(this,"batches");a(this,"direct");a(this,"completed");a(this,"end");a(this,"interval");a(this,"start");a(this,"total");this.name=encodeURI(this.initial.name),this.view_name=encodeURI(this.initial.view_name),this.node_type=this.initial.node_type,this.change_category=this.initial.change_category,this.diff=this.initial.diff,this.batches=this.initial.batches,this.interval=this.initial.interval,this.start=this.initial.start,this.total=this.initial.total,this.completed=this.initial.completed,this.end=this.initial.end,this.indirect=(e=this.initial.indirect)==null?void 0:e.map(n=>new o(n)),this.direct=(i=this.initial.direct)==null?void 0:i.map(n=>new o(n))}get nodeType(){return this.node_type}get viewName(){return this.view_name}get displayName(){return decodeURI(this.name)}get displayViewName(){return decodeURI(this.view_name)}get changeCategory(){return this.change_category}}class k extends U{constructor(t){super(t);a(this,"_last");a(this,"_planOverview");a(this,"_lastPlanOverview");p(t)&&t.isModel&&(this._current=t._current,this._last=t._last,this._planOverview=t._planOverview,this._lastPlanOverview=t._lastPlanOverview)}get current(){return this._current??this._last}get environment(){var t,e;return((t=this._last)==null?void 0:t.environment)??((e=this._current)==null?void 0:e.environment)}get meta(){var t,e;return((t=this._last)==null?void 0:t.meta)??((e=this._current)==null?void 0:e.meta)}get plan_options(){var t,e;return((t=this._last)==null?void 0:t.plan_options)??((e=this._current)==null?void 0:e.plan_options)}get start(){var t,e;return((t=this._last)==null?void 0:t.start)??((e=this._current)==null?void 0:e.start)}get end(){var t,e;return((t=this._last)==null?void 0:t.end)??((e=this._current)==null?void 0:e.end)}get overview(){return this._lastPlanOverview??this._planOverview}get backfills(){var t;return((t=this.overview)==null?void 0:t.backfills)??[]}get added(){var t;return((t=this.overview)==null?void 0:t.added)??[]}get removed(){var t;return((t=this.overview)==null?void 0:t.removed)??[]}get direct(){var t;return((t=this.overview)==null?void 0:t.direct)??[]}get indirect(){var t;return((t=this.overview)==null?void 0:t.indirect)??[]}get metadata(){var t;return((t=this.overview)==null?void 0:t.metadata)??[]}get tasks(){var e,i,n,c;const t=((i=(e=this._last)==null?void 0:e.backfill)==null?void 0:i.tasks)??((c=(n=this._current)==null?void 0:n.backfill)==null?void 0:c.tasks)??{};return Object.entries(t??{}).reduce((h,[d,_])=>(h[encodeURI(d)]=new o(_),h),{})}get queue(){var t,e;return((e=(t=this.stageBackfill)==null?void 0:t.queue)==null?void 0:e.map(i=>this.tasks[encodeURI(i)]).filter(Boolean))??[]}get stageValidation(){var t;return(t=this.overview)==null?void 0:t.stageValidation}get stageChanges(){var t;return(t=this.overview)==null?void 0:t.stageChanges}get stageBackfills(){var t;return(t=this.overview)==null?void 0:t.stageBackfills}get stageCreation(){var t,e;return((t=this._last)==null?void 0:t.creation)??((e=this._current)==null?void 0:e.creation)}get stageRestate(){var t,e;return((t=this._last)==null?void 0:t.restate)??((e=this._current)==null?void 0:e.restate)}get stageBackfill(){var t,e;return((t=this._last)==null?void 0:t.backfill)??((e=this._current)==null?void 0:e.backfill)}get stagePromote(){var t,e;return((t=this._last)==null?void 0:t.promote)??((e=this._current)==null?void 0:e.promote)}get shouldShowEvaluation(){return this.isFailed||p(this.stageCreation)||p(this.stageBackfill)||p(this.stagePromote)}get evaluationStart(){var t,e,i,n,c,h;return((e=(t=this.stageCreation)==null?void 0:t.meta)==null?void 0:e.start)??((n=(i=this.stageBackfill)==null?void 0:i.meta)==null?void 0:n.start)??((h=(c=this.stagePromote)==null?void 0:c.meta)==null?void 0:h.start)}get evaluationEnd(){var t,e,i,n,c,h;return((e=(t=this.stagePromote)==null?void 0:t.meta)==null?void 0:e.end)??((n=(i=this.stageBackfill)==null?void 0:i.meta)==null?void 0:n.end)??((h=(c=this.stageCreation)==null?void 0:c.meta)==null?void 0:h.end)}update(t,e){var m,y,A,g,M,T,E;const{creation:i,restate:n,backfill:c,promote:h,meta:d,environment:_}=t,B=l(d)||l(_)?void 0:t;if(l(B)){this._current=void 0;return}l(this._current)&&(this._current=t),this._current.start=t.start,this._current.end=t.end,this._current.meta=t.meta,this._current.environment=t.environment,this._current.plan_options=t.plan_options,p(i)&&(l(this._current.creation)||v((m=this._current.creation.meta)==null?void 0:m.done))&&(this._current.creation=i),p(n)&&(l(this._current.restate)||v((y=this._current.restate.meta)==null?void 0:y.done))&&(this._current.restate=n),p(c)&&(l(this._current.backfill)||v((A=this._current.backfill.meta)==null?void 0:A.done))&&(this._current.backfill=c),p(h)&&(l(this._current.promote)||v((g=this._current.promote.meta)==null?void 0:g.done))&&(this._current.promote=h),R((T=(M=this.current)==null?void 0:M.meta)==null?void 0:T.done)&&l(this._last)?(this._last=this._current,this._lastPlanOverview=this._planOverview,this._current=void 0,this._planOverview=void 0):this._planOverview=p(d)&&p(_)?e==null?void 0:e.clone():void 0,this.isFetching=f((E=t.meta)==null?void 0:E.done)}reset(){this._current=void 0,this._planOverview=void 0}clear(){this._current=void 0,this._last=void 0,this._planOverview=void 0,this._lastPlanOverview=void 0}clone(){var e;const t=new k;return p(this.current)&&t.update(structuredClone(this.current),(e=this.overview)==null?void 0:e.clone()),t}}class b extends U{get cancel(){var r;return(r=this._current)==null?void 0:r.cancel}get isCancelling(){var r,t,e,i;return v((t=(r=this.current)==null?void 0:r.meta)==null?void 0:t.done)&&((i=(e=this.current)==null?void 0:e.meta)==null?void 0:i.status)===w.init||this.isFetching}update(r){var t;this._current=r,this.isFetching=f((t=r.meta)==null?void 0:t.done)}}class C extends U{constructor(t){super(t);a(this,"_added",[]);a(this,"_removed",[]);a(this,"_direct",[]);a(this,"_indirect",[]);a(this,"_metadata",[]);a(this,"_backfills",[]);p(t)&&t.isModel&&(this._added=t.added,this._removed=t.removed,this._direct=t.direct,this._indirect=t.indirect,this._metadata=t.metadata,this._backfills=t.backfills)}get stageValidation(){var t;return(t=this._current)==null?void 0:t.validation}get stageChanges(){var t;return(t=this._current)==null?void 0:t.changes}get stageBackfills(){var t;return(t=this._current)==null?void 0:t.backfills}get validation(){var t;return(t=this._current)==null?void 0:t.validation}get hasChanges(){var d;if(l((d=this._current)==null?void 0:d.changes))return;const{added:t,removed:e,modified:i}=this._current.changes??{};if([t,e,i].every(l))return;const{direct:n,indirect:c,metadata:h}=i??{};return[t,e,n,c,h].some(V)}get changes(){var t;return(t=this._current)==null?void 0:t.changes}get hasBackfills(){var t,e,i;return l((e=(t=this._current)==null?void 0:t.backfills)==null?void 0:e.models)?void 0:V((i=this._current.backfills)==null?void 0:i.models)}get hasUpdates(){return R(this.hasChanges)||R(this.hasBackfills)}get backfills(){return this._backfills}get added(){return this._added}get removed(){return this._removed}get direct(){return this._direct}get indirect(){return this._indirect}get metadata(){return this._metadata}get isVirtualUpdate(){return p(this.hasChanges)&&l(this.hasBackfills)||!!this.hasChanges&&this.skipBackfill}get isMetadataUpdate(){var t;return!!((t=this.metadata)!=null&&t.length)&&l(this.hasBackfills)}get isBackfillUpdate(){return v(this.hasChanges)&&!!this.hasBackfills&&f(this.skipBackfill)}get isChangesAndBackfillUpdate(){return!!this.hasChanges&&!!this.hasBackfills&&f(this.skipBackfill)}get isLatest(){return this.isFinished&&l(this.hasChanges)&&(l(this.hasBackfills)||this.skipBackfill)}get skipTests(){var t,e;return((e=(t=this._current)==null?void 0:t.plan_options)==null?void 0:e.skip_tests)??!1}get skipBackfill(){var t,e;return((e=(t=this._current)==null?void 0:t.plan_options)==null?void 0:e.skip_backfill)??!1}update(t){var c,h,d,_,P,B,m,y,A;this._current=t,this.isFetching=f((c=t.meta)==null?void 0:c.done);const e=((h=this._current)==null?void 0:h.changes)??{},i=(e==null?void 0:e.modified)??{},n=((d=this._current)==null?void 0:d.backfills)??{};this._added=((_=e.added)==null?void 0:_.map(g=>new o(g)))??[],this._removed=((P=e.removed)==null?void 0:P.map(g=>new o(g)))??[],this._direct=((B=i.direct)==null?void 0:B.map(g=>new o(g)))??[],this._indirect=((m=i.indirect)==null?void 0:m.map(g=>new o(g)))??[],this._metadata=((y=i.metadata)==null?void 0:y.map(g=>new o(g)))??[],this._backfills=((A=n.models)==null?void 0:A.map(g=>new o(g)))??[]}clone(){const t=new C;return p(this.current)&&t.update(structuredClone(this.current)),t}}const G=x((u,r)=>({planAction:new O,planOverview:new C,planApply:new k,planCancel:new b,setPlanAction:t=>{u(()=>({planAction:new O(t)}))},setPlanApply:t=>{u(()=>({planApply:new k(t)}))},setPlanOverview:t=>{u(()=>({planOverview:new C(t)}))},setPlanCancel:t=>{u(()=>({planCancel:new b(t)}))},resetPlanTrackers:()=>{const t=r();t.planApply.reset(),t.planCancel.reset(),t.planOverview.reset(),u(()=>({planApply:new k(t.planApply),planCancel:new b(t.planCancel),planOverview:new C(t.planOverview)}))},resetPlanCancel:()=>{const t=r();t.planCancel.reset(),u(()=>({planCancel:new b(t.planCancel)}))},clearPlanApply:()=>{const t=r();t.planApply.clear(),u(()=>({planApply:new k(t.planApply)}))}}));export{s as E,C as M,O as a,G as u};
1
+ var N=Object.defineProperty;var D=(u,r,t)=>r in u?N(u,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[r]=t;var a=(u,r,t)=>D(u,typeof r!="symbol"?r+"":r,t);import{a0 as F,s as I,b as f,w as l,g as R,C as w,D as v,i as p,h as V,a1 as x}from"./index-C22hdM_h.js";const s={Done:"done",Run:"run",Running:"running",RunningTask:"running-task",ApplyVirtual:"apply-virtual",ApplyBackfill:"apply-backfill",ApplyChangesAndBackfill:"apply-changes-and-backfill",ApplyMetadata:"apply-metadata",Applying:"applying",Cancelling:"cancelling"};class O extends F{constructor(t){super(t!=null&&t.isModel?t.initial:{...t,value:(t==null?void 0:t.value)??s.Run});a(this,"_value");this._value=(t==null?void 0:t.value)??this.initial.value}get value(){return this._value}get isRun(){return this.value===s.Run}get isDone(){return this.value===s.Done}get isApplyVirtual(){return this.value===s.ApplyVirtual}get isApplyBackfill(){return this.value===s.ApplyBackfill}get isApplyChangesAndBackfill(){return this.value===s.ApplyChangesAndBackfill}get isApplyMetadata(){return this.value===s.ApplyMetadata}get isApply(){return this.isApplyVirtual||this.isApplyBackfill||this.isApplyChangesAndBackfill||this.isApplyMetadata}get isCancelling(){return this.value===s.Cancelling}get isApplying(){return this.value===s.Applying}get isRunning(){return I([s.Running,s.RunningTask],this.value)}get isRunningTask(){return this.value===s.RunningTask}get isProcessing(){return this.isRunning||this.isApplying||this.isCancelling}get isIdle(){return f(this.isProcessing)}displayStatus(t){return this.isCancelling?"Cancelling Plan...":this.isApplying?"Applying Plan...":this.isRunning&&l(t.hasChanges)?"Getting Changes...":this.isRunning&&l(t.hasBackfills)?"Getting Backfills...":this.isRunning?"Checking Plan...":this.isRunningTask?"Running Task...":"Plan"}static getActionDisplayName(t,e=[],i="Plan"){if(!e.includes(t.value))return i;let n;switch(t.value){case s.Done:n="Done";break;case s.Running:n="Running...";break;case s.RunningTask:n="Running Task...";break;case s.Applying:n="Applying...";break;case s.Cancelling:n="Cancelling...";break;case s.Run:n="Plan";break;case s.ApplyChangesAndBackfill:n="Apply Changes And Backfill";break;case s.ApplyVirtual:n="Apply Virtual Update";break;case s.ApplyBackfill:n="Apply And Backfill";break;case s.ApplyMetadata:n="Apply Metadata";break;default:n=i;break}return n}static getPlanAction({planOverview:t,planApply:e,planCancel:i}){const n=t.isRunning,c=e.isRunning,h=i.isRunning,d=e.isFinished&&t.isFinished||i.isFinished;return i.isEmpty&&e.isEmpty&&t.isEmpty?s.Run:h?s.Cancelling:c?s.Applying:n?s.Running:d?s.Done:t.isVirtualUpdate?s.ApplyVirtual:t.isMetadataUpdate?s.ApplyMetadata:t.isBackfillUpdate?s.ApplyBackfill:t.isChangesAndBackfillUpdate?s.ApplyChangesAndBackfill:s.Done}}class U extends F{constructor(t){super(t==null?void 0:t.initial);a(this,"_current");a(this,"_isFetching",!1);this._current=t==null?void 0:t._current,this._isFetching=(t==null?void 0:t._isFetching)??!1}get current(){return this._current}get environment(){var t;return(t=this.current)==null?void 0:t.environment}get meta(){var t;return(t=this.current)==null?void 0:t.meta}get plan_options(){var t;return(t=this.current)==null?void 0:t.plan_options}get start(){var t;return(t=this.current)==null?void 0:t.start}get end(){var t;return(t=this.current)==null?void 0:t.end}get duration(){var t;return((t=this==null?void 0:this.meta)==null?void 0:t.duration)??-1}get isFinished(){var t,e,i,n;return R((e=(t=this.current)==null?void 0:t.meta)==null?void 0:e.done)&&((n=(i=this.current)==null?void 0:i.meta)==null?void 0:n.status)!==w.init&&f(this.isFetching)}get isRunning(){var t,e,i,n;return v((e=(t=this.current)==null?void 0:t.meta)==null?void 0:e.done)&&((n=(i=this.current)==null?void 0:i.meta)==null?void 0:n.status)===w.init||this.isFetching}get isSuccessful(){var t,e;return this.isFinished&&((e=(t=this.current)==null?void 0:t.meta)==null?void 0:e.status)===w.success}get isFailed(){var t,e,i;return this.isFinished&&(l((t=this.current)==null?void 0:t.meta)||((i=(e=this.current)==null?void 0:e.meta)==null?void 0:i.status)===w.fail)}get isEmpty(){return l(this.current)}get isFetching(){return this._isFetching}set isFetching(t){this._isFetching=t}reset(){this._current=void 0}}class o extends F{constructor(t){var e,i;super(t);a(this,"name");a(this,"view_name");a(this,"node_type");a(this,"change_category");a(this,"diff");a(this,"indirect");a(this,"batches");a(this,"direct");a(this,"completed");a(this,"end");a(this,"interval");a(this,"start");a(this,"total");this.name=encodeURI(this.initial.name),this.view_name=encodeURI(this.initial.view_name),this.node_type=this.initial.node_type,this.change_category=this.initial.change_category,this.diff=this.initial.diff,this.batches=this.initial.batches,this.interval=this.initial.interval,this.start=this.initial.start,this.total=this.initial.total,this.completed=this.initial.completed,this.end=this.initial.end,this.indirect=(e=this.initial.indirect)==null?void 0:e.map(n=>new o(n)),this.direct=(i=this.initial.direct)==null?void 0:i.map(n=>new o(n))}get nodeType(){return this.node_type}get viewName(){return this.view_name}get displayName(){return decodeURI(this.name)}get displayViewName(){return decodeURI(this.view_name)}get changeCategory(){return this.change_category}}class k extends U{constructor(t){super(t);a(this,"_last");a(this,"_planOverview");a(this,"_lastPlanOverview");p(t)&&t.isModel&&(this._current=t._current,this._last=t._last,this._planOverview=t._planOverview,this._lastPlanOverview=t._lastPlanOverview)}get current(){return this._current??this._last}get environment(){var t,e;return((t=this._last)==null?void 0:t.environment)??((e=this._current)==null?void 0:e.environment)}get meta(){var t,e;return((t=this._last)==null?void 0:t.meta)??((e=this._current)==null?void 0:e.meta)}get plan_options(){var t,e;return((t=this._last)==null?void 0:t.plan_options)??((e=this._current)==null?void 0:e.plan_options)}get start(){var t,e;return((t=this._last)==null?void 0:t.start)??((e=this._current)==null?void 0:e.start)}get end(){var t,e;return((t=this._last)==null?void 0:t.end)??((e=this._current)==null?void 0:e.end)}get overview(){return this._lastPlanOverview??this._planOverview}get backfills(){var t;return((t=this.overview)==null?void 0:t.backfills)??[]}get added(){var t;return((t=this.overview)==null?void 0:t.added)??[]}get removed(){var t;return((t=this.overview)==null?void 0:t.removed)??[]}get direct(){var t;return((t=this.overview)==null?void 0:t.direct)??[]}get indirect(){var t;return((t=this.overview)==null?void 0:t.indirect)??[]}get metadata(){var t;return((t=this.overview)==null?void 0:t.metadata)??[]}get tasks(){var e,i,n,c;const t=((i=(e=this._last)==null?void 0:e.backfill)==null?void 0:i.tasks)??((c=(n=this._current)==null?void 0:n.backfill)==null?void 0:c.tasks)??{};return Object.entries(t??{}).reduce((h,[d,_])=>(h[encodeURI(d)]=new o(_),h),{})}get queue(){var t,e;return((e=(t=this.stageBackfill)==null?void 0:t.queue)==null?void 0:e.map(i=>this.tasks[encodeURI(i)]).filter(Boolean))??[]}get stageValidation(){var t;return(t=this.overview)==null?void 0:t.stageValidation}get stageChanges(){var t;return(t=this.overview)==null?void 0:t.stageChanges}get stageBackfills(){var t;return(t=this.overview)==null?void 0:t.stageBackfills}get stageCreation(){var t,e;return((t=this._last)==null?void 0:t.creation)??((e=this._current)==null?void 0:e.creation)}get stageRestate(){var t,e;return((t=this._last)==null?void 0:t.restate)??((e=this._current)==null?void 0:e.restate)}get stageBackfill(){var t,e;return((t=this._last)==null?void 0:t.backfill)??((e=this._current)==null?void 0:e.backfill)}get stagePromote(){var t,e;return((t=this._last)==null?void 0:t.promote)??((e=this._current)==null?void 0:e.promote)}get shouldShowEvaluation(){return this.isFailed||p(this.stageCreation)||p(this.stageBackfill)||p(this.stagePromote)}get evaluationStart(){var t,e,i,n,c,h;return((e=(t=this.stageCreation)==null?void 0:t.meta)==null?void 0:e.start)??((n=(i=this.stageBackfill)==null?void 0:i.meta)==null?void 0:n.start)??((h=(c=this.stagePromote)==null?void 0:c.meta)==null?void 0:h.start)}get evaluationEnd(){var t,e,i,n,c,h;return((e=(t=this.stagePromote)==null?void 0:t.meta)==null?void 0:e.end)??((n=(i=this.stageBackfill)==null?void 0:i.meta)==null?void 0:n.end)??((h=(c=this.stageCreation)==null?void 0:c.meta)==null?void 0:h.end)}update(t,e){var m,y,A,g,M,T,E;const{creation:i,restate:n,backfill:c,promote:h,meta:d,environment:_}=t,B=l(d)||l(_)?void 0:t;if(l(B)){this._current=void 0;return}l(this._current)&&(this._current=t),this._current.start=t.start,this._current.end=t.end,this._current.meta=t.meta,this._current.environment=t.environment,this._current.plan_options=t.plan_options,p(i)&&(l(this._current.creation)||v((m=this._current.creation.meta)==null?void 0:m.done))&&(this._current.creation=i),p(n)&&(l(this._current.restate)||v((y=this._current.restate.meta)==null?void 0:y.done))&&(this._current.restate=n),p(c)&&(l(this._current.backfill)||v((A=this._current.backfill.meta)==null?void 0:A.done))&&(this._current.backfill=c),p(h)&&(l(this._current.promote)||v((g=this._current.promote.meta)==null?void 0:g.done))&&(this._current.promote=h),R((T=(M=this.current)==null?void 0:M.meta)==null?void 0:T.done)&&l(this._last)?(this._last=this._current,this._lastPlanOverview=this._planOverview,this._current=void 0,this._planOverview=void 0):this._planOverview=p(d)&&p(_)?e==null?void 0:e.clone():void 0,this.isFetching=f((E=t.meta)==null?void 0:E.done)}reset(){this._current=void 0,this._planOverview=void 0}clear(){this._current=void 0,this._last=void 0,this._planOverview=void 0,this._lastPlanOverview=void 0}clone(){var e;const t=new k;return p(this.current)&&t.update(structuredClone(this.current),(e=this.overview)==null?void 0:e.clone()),t}}class b extends U{get cancel(){var r;return(r=this._current)==null?void 0:r.cancel}get isCancelling(){var r,t,e,i;return v((t=(r=this.current)==null?void 0:r.meta)==null?void 0:t.done)&&((i=(e=this.current)==null?void 0:e.meta)==null?void 0:i.status)===w.init||this.isFetching}update(r){var t;this._current=r,this.isFetching=f((t=r.meta)==null?void 0:t.done)}}class C extends U{constructor(t){super(t);a(this,"_added",[]);a(this,"_removed",[]);a(this,"_direct",[]);a(this,"_indirect",[]);a(this,"_metadata",[]);a(this,"_backfills",[]);p(t)&&t.isModel&&(this._added=t.added,this._removed=t.removed,this._direct=t.direct,this._indirect=t.indirect,this._metadata=t.metadata,this._backfills=t.backfills)}get stageValidation(){var t;return(t=this._current)==null?void 0:t.validation}get stageChanges(){var t;return(t=this._current)==null?void 0:t.changes}get stageBackfills(){var t;return(t=this._current)==null?void 0:t.backfills}get validation(){var t;return(t=this._current)==null?void 0:t.validation}get hasChanges(){var d;if(l((d=this._current)==null?void 0:d.changes))return;const{added:t,removed:e,modified:i}=this._current.changes??{};if([t,e,i].every(l))return;const{direct:n,indirect:c,metadata:h}=i??{};return[t,e,n,c,h].some(V)}get changes(){var t;return(t=this._current)==null?void 0:t.changes}get hasBackfills(){var t,e,i;return l((e=(t=this._current)==null?void 0:t.backfills)==null?void 0:e.models)?void 0:V((i=this._current.backfills)==null?void 0:i.models)}get hasUpdates(){return R(this.hasChanges)||R(this.hasBackfills)}get backfills(){return this._backfills}get added(){return this._added}get removed(){return this._removed}get direct(){return this._direct}get indirect(){return this._indirect}get metadata(){return this._metadata}get isVirtualUpdate(){return p(this.hasChanges)&&l(this.hasBackfills)||!!this.hasChanges&&this.skipBackfill}get isMetadataUpdate(){var t;return!!((t=this.metadata)!=null&&t.length)&&l(this.hasBackfills)}get isBackfillUpdate(){return v(this.hasChanges)&&!!this.hasBackfills&&f(this.skipBackfill)}get isChangesAndBackfillUpdate(){return!!this.hasChanges&&!!this.hasBackfills&&f(this.skipBackfill)}get isLatest(){return this.isFinished&&l(this.hasChanges)&&(l(this.hasBackfills)||this.skipBackfill)}get skipTests(){var t,e;return((e=(t=this._current)==null?void 0:t.plan_options)==null?void 0:e.skip_tests)??!1}get skipBackfill(){var t,e;return((e=(t=this._current)==null?void 0:t.plan_options)==null?void 0:e.skip_backfill)??!1}update(t){var c,h,d,_,P,B,m,y,A;this._current=t,this.isFetching=f((c=t.meta)==null?void 0:c.done);const e=((h=this._current)==null?void 0:h.changes)??{},i=(e==null?void 0:e.modified)??{},n=((d=this._current)==null?void 0:d.backfills)??{};this._added=((_=e.added)==null?void 0:_.map(g=>new o(g)))??[],this._removed=((P=e.removed)==null?void 0:P.map(g=>new o(g)))??[],this._direct=((B=i.direct)==null?void 0:B.map(g=>new o(g)))??[],this._indirect=((m=i.indirect)==null?void 0:m.map(g=>new o(g)))??[],this._metadata=((y=i.metadata)==null?void 0:y.map(g=>new o(g)))??[],this._backfills=((A=n.models)==null?void 0:A.map(g=>new o(g)))??[]}clone(){const t=new C;return p(this.current)&&t.update(structuredClone(this.current)),t}}const G=x((u,r)=>({planAction:new O,planOverview:new C,planApply:new k,planCancel:new b,setPlanAction:t=>{u(()=>({planAction:new O(t)}))},setPlanApply:t=>{u(()=>({planApply:new k(t)}))},setPlanOverview:t=>{u(()=>({planOverview:new C(t)}))},setPlanCancel:t=>{u(()=>({planCancel:new b(t)}))},resetPlanTrackers:()=>{const t=r();t.planApply.reset(),t.planCancel.reset(),t.planOverview.reset(),u(()=>({planApply:new k(t.planApply),planCancel:new b(t.planCancel),planOverview:new C(t.planOverview)}))},resetPlanCancel:()=>{const t=r();t.planCancel.reset(),u(()=>({planCancel:new b(t.planCancel)}))},clearPlanApply:()=>{const t=r();t.planApply.clear(),u(()=>({planApply:new k(t.planApply)}))}}));export{s as E,C as M,O as a,G as u};
@@ -1 +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{b as f,a1 as p}from"./index-COnjINWU.js";import{a,M as u}from"./file-C7afm_LM.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 f(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 u(r,this))})}}const O=p((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};
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{b as f,a1 as p}from"./index-C22hdM_h.js";import{a,M as u}from"./file-DY5SRTK1.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 f(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 u(r,this))})}}const O=p((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};
@@ -1,4 +1,4 @@
1
- import{r as l,R as E,f as De,ac as ot}from"./index-COnjINWU.js";var lt=Object.defineProperty,ut=(e,t,n)=>t in e?lt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Se=(e,t,n)=>(ut(e,typeof t!="symbol"?t+"":t,n),n);let at=class{constructor(){Se(this,"current",this.detect()),Se(this,"handoffState","pending"),Se(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},W=new at,B=(e,t)=>{W.isServer?l.useEffect(e,t):l.useLayoutEffect(e,t)};function j(e){let t=l.useRef(e);return B(()=>{t.current=e},[e]),t}let P=function(e){let t=j(e);return E.useCallback((...n)=>t.current(...n),[t])};function Ue(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function le(){let e=[],t={addEventListener(n,r,u,a){return n.addEventListener(r,u,a),t.add(()=>n.removeEventListener(r,u,a))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Ue(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,u){let a=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:u}),this.add(()=>{Object.assign(n.style,{[r]:a})})},group(n){let r=le();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let u of e.splice(r,1))u()}},dispose(){for(let n of e.splice(0))n()}};return t}function qe(){let[e]=l.useState(le);return l.useEffect(()=>()=>e.dispose(),[e]),e}function it(){let e=typeof document>"u";return"useSyncExternalStore"in De?(t=>t.useSyncExternalStore)(De)(()=>()=>{},()=>!1,()=>!e):!1}function ve(){let e=it(),[t,n]=l.useState(W.isHandoffComplete);return t&&W.isHandoffComplete===!1&&n(!1),l.useEffect(()=>{t!==!0&&n(!0)},[t]),l.useEffect(()=>W.handoff(),[]),e?!1:t}var He;let ne=(He=E.useId)!=null?He:function(){let e=ve(),[t,n]=E.useState(e?()=>W.nextId():null);return B(()=>{t===null&&n(W.nextId())},[t]),t!=null?""+t:void 0};function I(e,t,...n){if(e in t){let u=t[e];return typeof u=="function"?u(...n):u}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(u=>`"${u}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,I),r}function me(e){return W.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let Fe=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var K=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(K||{}),fe=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(fe||{}),st=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(st||{});function se(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Fe)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Ce=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Ce||{});function Oe(e,t=0){var n;return e===((n=me(e))==null?void 0:n.body)?!1:I(t,{0(){return e.matches(Fe)},1(){let r=e;for(;r!==null;){if(r.matches(Fe))return!0;r=r.parentElement}return!1}})}function $n(e){let t=me(e);le().nextFrame(()=>{t&&!Oe(t.activeElement,0)&&dt(e)})}var ct=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(ct||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function dt(e){e==null||e.focus({preventScroll:!0})}let ft=["textarea","input"].join(",");function pt(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,ft))!=null?n:!1}function vt(e,t=n=>n){return e.slice().sort((n,r)=>{let u=t(n),a=t(r);if(u===null||a===null)return 0;let o=u.compareDocumentPosition(a);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Fn(e,t){return J(se(),t,{relativeTo:e})}function J(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:u=[]}={}){let a=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,o=Array.isArray(e)?n?vt(e):e:se(e);u.length>0&&o.length>1&&(o=o.filter(b=>!u.includes(b))),r=r??a.activeElement;let c=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),i=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,o.indexOf(r))-1;if(t&4)return Math.max(0,o.indexOf(r))+1;if(t&8)return o.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),p=t&32?{preventScroll:!0}:{},s=0,d=o.length,f;do{if(s>=d||s+d<=0)return 0;let b=i+s;if(t&16)b=(b+d)%d;else{if(b<0)return 3;if(b>=d)return 1}f=o[b],f==null||f.focus(p),s+=c}while(f!==a.activeElement);return t&6&&pt(f)&&f.select(),2}function mt(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function ht(){return/Android/gi.test(window.navigator.userAgent)}function gt(){return mt()||ht()}function ce(e,t,n){let r=j(t);l.useEffect(()=>{function u(a){r.current(a)}return document.addEventListener(e,u,n),()=>document.removeEventListener(e,u,n)},[e,n])}function Ge(e,t,n){let r=j(t);l.useEffect(()=>{function u(a){r.current(a)}return window.addEventListener(e,u,n),()=>window.removeEventListener(e,u,n)},[e,n])}function bt(e,t,n=!0){let r=l.useRef(!1);l.useEffect(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function u(o,c){if(!r.current||o.defaultPrevented)return;let i=c(o);if(i===null||!i.getRootNode().contains(i)||!i.isConnected)return;let p=function s(d){return typeof d=="function"?s(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(let s of p){if(s===null)continue;let d=s instanceof HTMLElement?s:s.current;if(d!=null&&d.contains(i)||o.composed&&o.composedPath().includes(d))return}return!Oe(i,Ce.Loose)&&i.tabIndex!==-1&&o.preventDefault(),t(o,i)}let a=l.useRef(null);ce("pointerdown",o=>{var c,i;r.current&&(a.current=((i=(c=o.composedPath)==null?void 0:c.call(o))==null?void 0:i[0])||o.target)},!0),ce("mousedown",o=>{var c,i;r.current&&(a.current=((i=(c=o.composedPath)==null?void 0:c.call(o))==null?void 0:i[0])||o.target)},!0),ce("click",o=>{gt()||a.current&&(u(o,()=>a.current),a.current=null)},!0),ce("touchend",o=>u(o,()=>o.target instanceof HTMLElement?o.target:null),!0),Ge("blur",o=>u(o,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function ue(...e){return l.useMemo(()=>me(...e),[...e])}function je(e){var t;if(e.type)return e.type;let n=(t=e.as)!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function Et(e,t){let[n,r]=l.useState(()=>je(e));return B(()=>{r(je(e))},[e.type,e.as]),B(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}let Ke=Symbol();function Ve(e,t=!0){return Object.assign(e,{[Ke]:t})}function U(...e){let t=l.useRef(e);l.useEffect(()=>{t.current=e},[e]);let n=P(r=>{for(let u of t.current)u!=null&&(typeof u=="function"?u(r):u.current=r)});return e.every(r=>r==null||(r==null?void 0:r[Ke]))?void 0:n}function pe(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var re=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(re||{}),Z=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Z||{});function q({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:u,visible:a=!0,name:o,mergeRefs:c}){c=c??Pt;let i=We(t,e);if(a)return de(i,n,r,o,c);let p=u??0;if(p&2){let{static:s=!1,...d}=i;if(s)return de(d,n,r,o,c)}if(p&1){let{unmount:s=!0,...d}=i;return I(s?0:1,{0(){return null},1(){return de({...d,hidden:!0,style:{display:"none"}},n,r,o,c)}})}return de(i,n,r,o,c)}function de(e,t={},n,r,u){let{as:a=n,children:o,refName:c="ref",...i}=we(e,["unmount","static"]),p=e.ref!==void 0?{[c]:e.ref}:{},s=typeof o=="function"?o(t):o;"className"in i&&i.className&&typeof i.className=="function"&&(i.className=i.className(t));let d={};if(t){let f=!1,b=[];for(let[g,m]of Object.entries(t))typeof m=="boolean"&&(f=!0),m===!0&&b.push(g);f&&(d["data-headlessui-state"]=b.join(" "))}if(a===l.Fragment&&Object.keys(Be(i)).length>0){if(!l.isValidElement(s)||Array.isArray(s)&&s.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(i).map(m=>` - ${m}`).join(`
1
+ import{r as l,R as E,f as De,ac as ot}from"./index-C22hdM_h.js";var lt=Object.defineProperty,ut=(e,t,n)=>t in e?lt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Se=(e,t,n)=>(ut(e,typeof t!="symbol"?t+"":t,n),n);let at=class{constructor(){Se(this,"current",this.detect()),Se(this,"handoffState","pending"),Se(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},W=new at,B=(e,t)=>{W.isServer?l.useEffect(e,t):l.useLayoutEffect(e,t)};function j(e){let t=l.useRef(e);return B(()=>{t.current=e},[e]),t}let P=function(e){let t=j(e);return E.useCallback((...n)=>t.current(...n),[t])};function Ue(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function le(){let e=[],t={addEventListener(n,r,u,a){return n.addEventListener(r,u,a),t.add(()=>n.removeEventListener(r,u,a))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Ue(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,u){let a=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:u}),this.add(()=>{Object.assign(n.style,{[r]:a})})},group(n){let r=le();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let u of e.splice(r,1))u()}},dispose(){for(let n of e.splice(0))n()}};return t}function qe(){let[e]=l.useState(le);return l.useEffect(()=>()=>e.dispose(),[e]),e}function it(){let e=typeof document>"u";return"useSyncExternalStore"in De?(t=>t.useSyncExternalStore)(De)(()=>()=>{},()=>!1,()=>!e):!1}function ve(){let e=it(),[t,n]=l.useState(W.isHandoffComplete);return t&&W.isHandoffComplete===!1&&n(!1),l.useEffect(()=>{t!==!0&&n(!0)},[t]),l.useEffect(()=>W.handoff(),[]),e?!1:t}var He;let ne=(He=E.useId)!=null?He:function(){let e=ve(),[t,n]=E.useState(e?()=>W.nextId():null);return B(()=>{t===null&&n(W.nextId())},[t]),t!=null?""+t:void 0};function I(e,t,...n){if(e in t){let u=t[e];return typeof u=="function"?u(...n):u}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(u=>`"${u}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,I),r}function me(e){return W.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let Fe=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var K=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(K||{}),fe=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(fe||{}),st=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(st||{});function se(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Fe)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Ce=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Ce||{});function Oe(e,t=0){var n;return e===((n=me(e))==null?void 0:n.body)?!1:I(t,{0(){return e.matches(Fe)},1(){let r=e;for(;r!==null;){if(r.matches(Fe))return!0;r=r.parentElement}return!1}})}function $n(e){let t=me(e);le().nextFrame(()=>{t&&!Oe(t.activeElement,0)&&dt(e)})}var ct=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(ct||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function dt(e){e==null||e.focus({preventScroll:!0})}let ft=["textarea","input"].join(",");function pt(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,ft))!=null?n:!1}function vt(e,t=n=>n){return e.slice().sort((n,r)=>{let u=t(n),a=t(r);if(u===null||a===null)return 0;let o=u.compareDocumentPosition(a);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Fn(e,t){return J(se(),t,{relativeTo:e})}function J(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:u=[]}={}){let a=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,o=Array.isArray(e)?n?vt(e):e:se(e);u.length>0&&o.length>1&&(o=o.filter(b=>!u.includes(b))),r=r??a.activeElement;let c=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),i=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,o.indexOf(r))-1;if(t&4)return Math.max(0,o.indexOf(r))+1;if(t&8)return o.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),p=t&32?{preventScroll:!0}:{},s=0,d=o.length,f;do{if(s>=d||s+d<=0)return 0;let b=i+s;if(t&16)b=(b+d)%d;else{if(b<0)return 3;if(b>=d)return 1}f=o[b],f==null||f.focus(p),s+=c}while(f!==a.activeElement);return t&6&&pt(f)&&f.select(),2}function mt(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function ht(){return/Android/gi.test(window.navigator.userAgent)}function gt(){return mt()||ht()}function ce(e,t,n){let r=j(t);l.useEffect(()=>{function u(a){r.current(a)}return document.addEventListener(e,u,n),()=>document.removeEventListener(e,u,n)},[e,n])}function Ge(e,t,n){let r=j(t);l.useEffect(()=>{function u(a){r.current(a)}return window.addEventListener(e,u,n),()=>window.removeEventListener(e,u,n)},[e,n])}function bt(e,t,n=!0){let r=l.useRef(!1);l.useEffect(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function u(o,c){if(!r.current||o.defaultPrevented)return;let i=c(o);if(i===null||!i.getRootNode().contains(i)||!i.isConnected)return;let p=function s(d){return typeof d=="function"?s(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(let s of p){if(s===null)continue;let d=s instanceof HTMLElement?s:s.current;if(d!=null&&d.contains(i)||o.composed&&o.composedPath().includes(d))return}return!Oe(i,Ce.Loose)&&i.tabIndex!==-1&&o.preventDefault(),t(o,i)}let a=l.useRef(null);ce("pointerdown",o=>{var c,i;r.current&&(a.current=((i=(c=o.composedPath)==null?void 0:c.call(o))==null?void 0:i[0])||o.target)},!0),ce("mousedown",o=>{var c,i;r.current&&(a.current=((i=(c=o.composedPath)==null?void 0:c.call(o))==null?void 0:i[0])||o.target)},!0),ce("click",o=>{gt()||a.current&&(u(o,()=>a.current),a.current=null)},!0),ce("touchend",o=>u(o,()=>o.target instanceof HTMLElement?o.target:null),!0),Ge("blur",o=>u(o,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function ue(...e){return l.useMemo(()=>me(...e),[...e])}function je(e){var t;if(e.type)return e.type;let n=(t=e.as)!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function Et(e,t){let[n,r]=l.useState(()=>je(e));return B(()=>{r(je(e))},[e.type,e.as]),B(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}let Ke=Symbol();function Ve(e,t=!0){return Object.assign(e,{[Ke]:t})}function U(...e){let t=l.useRef(e);l.useEffect(()=>{t.current=e},[e]);let n=P(r=>{for(let u of t.current)u!=null&&(typeof u=="function"?u(r):u.current=r)});return e.every(r=>r==null||(r==null?void 0:r[Ke]))?void 0:n}function pe(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var re=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(re||{}),Z=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Z||{});function q({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:u,visible:a=!0,name:o,mergeRefs:c}){c=c??Pt;let i=We(t,e);if(a)return de(i,n,r,o,c);let p=u??0;if(p&2){let{static:s=!1,...d}=i;if(s)return de(d,n,r,o,c)}if(p&1){let{unmount:s=!0,...d}=i;return I(s?0:1,{0(){return null},1(){return de({...d,hidden:!0,style:{display:"none"}},n,r,o,c)}})}return de(i,n,r,o,c)}function de(e,t={},n,r,u){let{as:a=n,children:o,refName:c="ref",...i}=we(e,["unmount","static"]),p=e.ref!==void 0?{[c]:e.ref}:{},s=typeof o=="function"?o(t):o;"className"in i&&i.className&&typeof i.className=="function"&&(i.className=i.className(t));let d={};if(t){let f=!1,b=[];for(let[g,m]of Object.entries(t))typeof m=="boolean"&&(f=!0),m===!0&&b.push(g);f&&(d["data-headlessui-state"]=b.join(" "))}if(a===l.Fragment&&Object.keys(Be(i)).length>0){if(!l.isValidElement(s)||Array.isArray(s)&&s.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(i).map(m=>` - ${m}`).join(`
2
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
  `));let f=s.props,b=typeof(f==null?void 0:f.className)=="function"?(...m)=>pe(f==null?void 0:f.className(...m),i.className):pe(f==null?void 0:f.className,i.className),g=b?{className:b}:{};return l.cloneElement(s,Object.assign({},We(s.props,Be(we(i,["ref"]))),d,p,{ref:u(s.ref,p.ref)},g))}return l.createElement(a,Object.assign({},we(i,["ref"]),a!==l.Fragment&&p,a!==l.Fragment&&d),s)}function yt(){let e=l.useRef([]),t=l.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function Pt(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function We(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let u in r)u.startsWith("on")&&typeof r[u]=="function"?(n[u]!=null||(n[u]=[]),n[u].push(r[u])):t[u]=r[u];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](u,...a){let o=n[r];for(let c of o){if((u instanceof Event||(u==null?void 0:u.nativeEvent)instanceof Event)&&u.defaultPrevented)return;c(u,...a)}}});return t}function _(e){var t;return Object.assign(l.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Be(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function we(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let St="div";var oe=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(oe||{});function wt(e,t){var n;let{features:r=1,...u}=e,a={ref:t,"aria-hidden":(r&2)===2?!0:(n=u["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return q({ourProps:a,theirProps:u,slot:{},defaultTag:St,name:"Hidden"})}let ie=_(wt),Ie=l.createContext(null);Ie.displayName="OpenClosedContext";var k=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(k||{});function he(){return l.useContext(Ie)}function ze({value:e,children:t}){return E.createElement(Ie.Provider,{value:e},t)}function Ye(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&Tt(n)?!1:r}function Tt(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}var X=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(X||{});function $t(e,t,n,r){let u=j(n);l.useEffect(()=>{e=e??window;function a(o){u.current(o)}return e.addEventListener(t,a,r),()=>e.removeEventListener(t,a,r)},[e,t,r])}function Re(){let e=l.useRef(!1);return B(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Ft(e){let t=P(e),n=l.useRef(!1);l.useEffect(()=>(n.current=!1,()=>{n.current=!0,Ue(()=>{n.current&&t()})}),[t])}var V=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(V||{});function Qe(){let e=l.useRef(0);return Ge("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}let Xe=l.createContext(!1);function xt(){return l.useContext(Xe)}function xn(e){return E.createElement(Xe.Provider,{value:e.force},e.children)}function Nt(e){let t=xt(),n=l.useContext(Je),r=ue(e),[u,a]=l.useState(()=>{if(!t&&n!==null||W.isServer)return null;let o=r==null?void 0:r.getElementById("headlessui-portal-root");if(o)return o;if(r===null)return null;let c=r.createElement("div");return c.setAttribute("id","headlessui-portal-root"),r.body.appendChild(c)});return l.useEffect(()=>{u!==null&&(r!=null&&r.body.contains(u)||r==null||r.body.appendChild(u))},[u,r]),l.useEffect(()=>{t||n!==null&&a(n.current)},[n,a,t]),u}let Ct=l.Fragment;function Ot(e,t){let n=e,r=l.useRef(null),u=U(Ve(s=>{r.current=s}),t),a=ue(r),o=Nt(r),[c]=l.useState(()=>{var s;return W.isServer?null:(s=a==null?void 0:a.createElement("div"))!=null?s:null}),i=l.useContext(xe),p=ve();return B(()=>{!o||!c||o.contains(c)||(c.setAttribute("data-headlessui-portal",""),o.appendChild(c))},[o,c]),B(()=>{if(c&&i)return i.register(c)},[i,c]),Ft(()=>{var s;!o||!c||(c instanceof Node&&o.contains(c)&&o.removeChild(c),o.childNodes.length<=0&&((s=o.parentElement)==null||s.removeChild(o)))}),p?!o||!c?null:ot.createPortal(q({ourProps:{ref:u},theirProps:n,defaultTag:Ct,name:"Portal"}),c):null}let It=l.Fragment,Je=l.createContext(null);function Rt(e,t){let{target:n,...r}=e,u={ref:U(t)};return E.createElement(Je.Provider,{value:n},q({ourProps:u,theirProps:r,defaultTag:It,name:"Popover.Group"}))}let xe=l.createContext(null);function Mt(){let e=l.useContext(xe),t=l.useRef([]),n=P(a=>(t.current.push(a),e&&e.register(a),()=>r(a))),r=P(a=>{let o=t.current.indexOf(a);o!==-1&&t.current.splice(o,1),e&&e.unregister(a)}),u=l.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,l.useMemo(()=>function({children:a}){return E.createElement(xe.Provider,{value:u},a)},[u])]}let Lt=_(Ot),kt=_(Rt),Nn=Object.assign(Lt,{Group:kt});function At({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){var r;let u=l.useRef((r=n==null?void 0:n.current)!=null?r:null),a=ue(u),o=P(()=>{var c,i,p;let s=[];for(let d of e)d!==null&&(d instanceof HTMLElement?s.push(d):"current"in d&&d.current instanceof HTMLElement&&s.push(d.current));if(t!=null&&t.current)for(let d of t.current)s.push(d);for(let d of(c=a==null?void 0:a.querySelectorAll("html > *, body > *"))!=null?c:[])d!==document.body&&d!==document.head&&d instanceof HTMLElement&&d.id!=="headlessui-portal-root"&&(d.contains(u.current)||d.contains((p=(i=u.current)==null?void 0:i.getRootNode())==null?void 0:p.host)||s.some(f=>d.contains(f))||s.push(d));return s});return{resolveContainers:o,contains:P(c=>o().some(i=>i.contains(c))),mainTreeNodeRef:u,MainTreeNode:l.useMemo(()=>function(){return n!=null?null:E.createElement(ie,{features:oe.Hidden,ref:u})},[u,n])}}function Dt(){let e=l.useRef(null);return{mainTreeNodeRef:e,MainTreeNode:l.useMemo(()=>function(){return E.createElement(ie,{features:oe.Hidden,ref:e})},[e])}}var Ht=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ht||{}),jt=(e=>(e[e.TogglePopover=0]="TogglePopover",e[e.ClosePopover=1]="ClosePopover",e[e.SetButton=2]="SetButton",e[e.SetButtonId=3]="SetButtonId",e[e.SetPanel=4]="SetPanel",e[e.SetPanelId=5]="SetPanelId",e))(jt||{});let Bt={0:e=>{let t={...e,popoverState:I(e.popoverState,{0:1,1:0})};return t.popoverState===0&&(t.__demoMode=!1),t},1(e){return e.popoverState===1?e:{...e,popoverState:1}},2(e,t){return e.button===t.button?e:{...e,button:t.button}},3(e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},4(e,t){return e.panel===t.panel?e:{...e,panel:t.panel}},5(e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}}},Me=l.createContext(null);Me.displayName="PopoverContext";function ge(e){let t=l.useContext(Me);if(t===null){let n=new Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ge),n}return t}let Le=l.createContext(null);Le.displayName="PopoverAPIContext";function ke(e){let t=l.useContext(Le);if(t===null){let n=new Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ke),n}return t}let Ae=l.createContext(null);Ae.displayName="PopoverGroupContext";function Ze(){return l.useContext(Ae)}let be=l.createContext(null);be.displayName="PopoverPanelContext";function _t(){return l.useContext(be)}function Ut(e,t){return I(t.type,Bt,e,t)}let qt="div";function Gt(e,t){var n;let{__demoMode:r=!1,...u}=e,a=l.useRef(null),o=U(t,Ve(y=>{a.current=y})),c=l.useRef([]),i=l.useReducer(Ut,{__demoMode:r,popoverState:r?0:1,buttons:c,button:null,buttonId:null,panel:null,panelId:null,beforePanelSentinel:l.createRef(),afterPanelSentinel:l.createRef()}),[{popoverState:p,button:s,buttonId:d,panel:f,panelId:b,beforePanelSentinel:g,afterPanelSentinel:m},v]=i,S=ue((n=a.current)!=null?n:s),x=l.useMemo(()=>{if(!s||!f)return!1;for(let H of document.querySelectorAll("body > *"))if(Number(H==null?void 0:H.contains(s))^Number(H==null?void 0:H.contains(f)))return!0;let y=se(),L=y.indexOf(s),te=(L+y.length-1)%y.length,ee=(L+1)%y.length,G=y[te],ae=y[ee];return!f.contains(G)&&!f.contains(ae)},[s,f]),T=j(d),R=j(b),A=l.useMemo(()=>({buttonId:T,panelId:R,close:()=>v({type:1})}),[T,R,v]),C=Ze(),D=C==null?void 0:C.registerPopover,$=P(()=>{var y;return(y=C==null?void 0:C.isFocusWithinPopoverGroup())!=null?y:(S==null?void 0:S.activeElement)&&((s==null?void 0:s.contains(S.activeElement))||(f==null?void 0:f.contains(S.activeElement)))});l.useEffect(()=>D==null?void 0:D(A),[D,A]);let[N,F]=Mt(),h=At({mainTreeNodeRef:C==null?void 0:C.mainTreeNodeRef,portals:N,defaultContainers:[s,f]});$t(S==null?void 0:S.defaultView,"focus",y=>{var L,te,ee,G;y.target!==window&&y.target instanceof HTMLElement&&p===0&&($()||s&&f&&(h.contains(y.target)||(te=(L=g.current)==null?void 0:L.contains)!=null&&te.call(L,y.target)||(G=(ee=m.current)==null?void 0:ee.contains)!=null&&G.call(ee,y.target)||v({type:1})))},!0),bt(h.resolveContainers,(y,L)=>{v({type:1}),Oe(L,Ce.Loose)||(y.preventDefault(),s==null||s.focus())},p===0);let w=P(y=>{v({type:1});let L=y?y instanceof HTMLElement?y:"current"in y&&y.current instanceof HTMLElement?y.current:s:s;L==null||L.focus()}),O=l.useMemo(()=>({close:w,isPortalled:x}),[w,x]),M=l.useMemo(()=>({open:p===0,close:w}),[p,w]),z={ref:o};return E.createElement(be.Provider,{value:null},E.createElement(Me.Provider,{value:i},E.createElement(Le.Provider,{value:O},E.createElement(ze,{value:I(p,{0:k.Open,1:k.Closed})},E.createElement(F,null,q({ourProps:z,theirProps:u,slot:M,defaultTag:qt,name:"Popover"}),E.createElement(h.MainTreeNode,null))))))}let Kt="button";function Vt(e,t){let n=ne(),{id:r=`headlessui-popover-button-${n}`,...u}=e,[a,o]=ge("Popover.Button"),{isPortalled:c}=ke("Popover.Button"),i=l.useRef(null),p=`headlessui-focus-sentinel-${ne()}`,s=Ze(),d=s==null?void 0:s.closeOthers,f=_t()!==null;l.useEffect(()=>{if(!f)return o({type:3,buttonId:r}),()=>{o({type:3,buttonId:null})}},[f,r,o]);let[b]=l.useState(()=>Symbol()),g=U(i,t,f?null:h=>{if(h)a.buttons.current.push(b);else{let w=a.buttons.current.indexOf(b);w!==-1&&a.buttons.current.splice(w,1)}a.buttons.current.length>1&&console.warn("You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported."),h&&o({type:2,button:h})}),m=U(i,t),v=ue(i),S=P(h=>{var w,O,M;if(f){if(a.popoverState===1)return;switch(h.key){case X.Space:case X.Enter:h.preventDefault(),(O=(w=h.target).click)==null||O.call(w),o({type:1}),(M=a.button)==null||M.focus();break}}else switch(h.key){case X.Space:case X.Enter:h.preventDefault(),h.stopPropagation(),a.popoverState===1&&(d==null||d(a.buttonId)),o({type:0});break;case X.Escape:if(a.popoverState!==0)return d==null?void 0:d(a.buttonId);if(!i.current||v!=null&&v.activeElement&&!i.current.contains(v.activeElement))return;h.preventDefault(),h.stopPropagation(),o({type:1});break}}),x=P(h=>{f||h.key===X.Space&&h.preventDefault()}),T=P(h=>{var w,O;Ye(h.currentTarget)||e.disabled||(f?(o({type:1}),(w=a.button)==null||w.focus()):(h.preventDefault(),h.stopPropagation(),a.popoverState===1&&(d==null||d(a.buttonId)),o({type:0}),(O=a.button)==null||O.focus()))}),R=P(h=>{h.preventDefault(),h.stopPropagation()}),A=a.popoverState===0,C=l.useMemo(()=>({open:A}),[A]),D=Et(e,i),$=f?{ref:m,type:D,onKeyDown:S,onClick:T}:{ref:g,id:a.buttonId,type:D,"aria-expanded":a.popoverState===0,"aria-controls":a.panel?a.panelId:void 0,onKeyDown:S,onKeyUp:x,onClick:T,onMouseDown:R},N=Qe(),F=P(()=>{let h=a.panel;if(!h)return;function w(){I(N.current,{[V.Forwards]:()=>J(h,K.First),[V.Backwards]:()=>J(h,K.Last)})===fe.Error&&J(se().filter(O=>O.dataset.headlessuiFocusGuard!=="true"),I(N.current,{[V.Forwards]:K.Next,[V.Backwards]:K.Previous}),{relativeTo:a.button})}w()});return E.createElement(E.Fragment,null,q({ourProps:$,theirProps:u,slot:C,defaultTag:Kt,name:"Popover.Button"}),A&&!f&&c&&E.createElement(ie,{id:p,features:oe.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:F}))}let Wt="div",zt=re.RenderStrategy|re.Static;function Yt(e,t){let n=ne(),{id:r=`headlessui-popover-overlay-${n}`,...u}=e,[{popoverState:a},o]=ge("Popover.Overlay"),c=U(t),i=he(),p=i!==null?(i&k.Open)===k.Open:a===0,s=P(f=>{if(Ye(f.currentTarget))return f.preventDefault();o({type:1})}),d=l.useMemo(()=>({open:a===0}),[a]);return q({ourProps:{ref:c,id:r,"aria-hidden":!0,onClick:s},theirProps:u,slot:d,defaultTag:Wt,features:zt,visible:p,name:"Popover.Overlay"})}let Qt="div",Xt=re.RenderStrategy|re.Static;function Jt(e,t){let n=ne(),{id:r=`headlessui-popover-panel-${n}`,focus:u=!1,...a}=e,[o,c]=ge("Popover.Panel"),{close:i,isPortalled:p}=ke("Popover.Panel"),s=`headlessui-focus-sentinel-before-${ne()}`,d=`headlessui-focus-sentinel-after-${ne()}`,f=l.useRef(null),b=U(f,t,$=>{c({type:4,panel:$})}),g=ue(f),m=yt();B(()=>(c({type:5,panelId:r}),()=>{c({type:5,panelId:null})}),[r,c]);let v=he(),S=v!==null?(v&k.Open)===k.Open:o.popoverState===0,x=P($=>{var N;switch($.key){case X.Escape:if(o.popoverState!==0||!f.current||g!=null&&g.activeElement&&!f.current.contains(g.activeElement))return;$.preventDefault(),$.stopPropagation(),c({type:1}),(N=o.button)==null||N.focus();break}});l.useEffect(()=>{var $;e.static||o.popoverState===1&&(($=e.unmount)==null||$)&&c({type:4,panel:null})},[o.popoverState,e.unmount,e.static,c]),l.useEffect(()=>{if(o.__demoMode||!u||o.popoverState!==0||!f.current)return;let $=g==null?void 0:g.activeElement;f.current.contains($)||J(f.current,K.First)},[o.__demoMode,u,f,o.popoverState]);let T=l.useMemo(()=>({open:o.popoverState===0,close:i}),[o,i]),R={ref:b,id:r,onKeyDown:x,onBlur:u&&o.popoverState===0?$=>{var N,F,h,w,O;let M=$.relatedTarget;M&&f.current&&((N=f.current)!=null&&N.contains(M)||(c({type:1}),((h=(F=o.beforePanelSentinel.current)==null?void 0:F.contains)!=null&&h.call(F,M)||(O=(w=o.afterPanelSentinel.current)==null?void 0:w.contains)!=null&&O.call(w,M))&&M.focus({preventScroll:!0})))}:void 0,tabIndex:-1},A=Qe(),C=P(()=>{let $=f.current;if(!$)return;function N(){I(A.current,{[V.Forwards]:()=>{var F;J($,K.First)===fe.Error&&((F=o.afterPanelSentinel.current)==null||F.focus())},[V.Backwards]:()=>{var F;(F=o.button)==null||F.focus({preventScroll:!0})}})}N()}),D=P(()=>{let $=f.current;if(!$)return;function N(){I(A.current,{[V.Forwards]:()=>{var F;if(!o.button)return;let h=se(),w=h.indexOf(o.button),O=h.slice(0,w+1),M=[...h.slice(w+1),...O];for(let z of M.slice())if(z.dataset.headlessuiFocusGuard==="true"||(F=o.panel)!=null&&F.contains(z)){let y=M.indexOf(z);y!==-1&&M.splice(y,1)}J(M,K.First,{sorted:!1})},[V.Backwards]:()=>{var F;J($,K.Previous)===fe.Error&&((F=o.button)==null||F.focus())}})}N()});return E.createElement(be.Provider,{value:r},S&&p&&E.createElement(ie,{id:s,ref:o.beforePanelSentinel,features:oe.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:C}),q({mergeRefs:m,ourProps:R,theirProps:a,slot:T,defaultTag:Qt,features:Xt,visible:S,name:"Popover.Panel"}),S&&p&&E.createElement(ie,{id:d,ref:o.afterPanelSentinel,features:oe.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:D}))}let Zt="div";function en(e,t){let n=l.useRef(null),r=U(n,t),[u,a]=l.useState([]),o=Dt(),c=P(m=>{a(v=>{let S=v.indexOf(m);if(S!==-1){let x=v.slice();return x.splice(S,1),x}return v})}),i=P(m=>(a(v=>[...v,m]),()=>c(m))),p=P(()=>{var m;let v=me(n);if(!v)return!1;let S=v.activeElement;return(m=n.current)!=null&&m.contains(S)?!0:u.some(x=>{var T,R;return((T=v.getElementById(x.buttonId.current))==null?void 0:T.contains(S))||((R=v.getElementById(x.panelId.current))==null?void 0:R.contains(S))})}),s=P(m=>{for(let v of u)v.buttonId.current!==m&&v.close()}),d=l.useMemo(()=>({registerPopover:i,unregisterPopover:c,isFocusWithinPopoverGroup:p,closeOthers:s,mainTreeNodeRef:o.mainTreeNodeRef}),[i,c,p,s,o.mainTreeNodeRef]),f=l.useMemo(()=>({}),[]),b=e,g={ref:r};return E.createElement(Ae.Provider,{value:d},q({ourProps:g,theirProps:b,slot:f,defaultTag:Zt,name:"Popover.Group"}),E.createElement(o.MainTreeNode,null))}let tn=_(Gt),nn=_(Vt),rn=_(Yt),on=_(Jt),ln=_(en),Cn=Object.assign(tn,{Button:nn,Overlay:rn,Panel:on,Group:ln});function un(e=0){let[t,n]=l.useState(e),r=Re(),u=l.useCallback(i=>{r.current&&n(p=>p|i)},[t,r]),a=l.useCallback(i=>!!(t&i),[t]),o=l.useCallback(i=>{r.current&&n(p=>p&~i)},[n,r]),c=l.useCallback(i=>{r.current&&n(p=>p^i)},[n]);return{flags:t,addFlag:u,hasFlag:a,removeFlag:o,toggleFlag:c}}function an(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Te(e,...t){e&&t.length>0&&e.classList.add(...t)}function $e(e,...t){e&&t.length>0&&e.classList.remove(...t)}function sn(e,t){let n=le();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:u}=getComputedStyle(e),[a,o]=[r,u].map(i=>{let[p=0]=i.split(",").filter(Boolean).map(s=>s.includes("ms")?parseFloat(s):parseFloat(s)*1e3).sort((s,d)=>d-s);return p}),c=a+o;if(c!==0){n.group(p=>{p.setTimeout(()=>{t(),p.dispose()},c),p.addEventListener(e,"transitionrun",s=>{s.target===s.currentTarget&&p.dispose()})});let i=n.addEventListener(e,"transitionend",p=>{p.target===p.currentTarget&&(t(),i())})}else t();return n.add(()=>t()),n.dispose}function cn(e,t,n,r){let u=n?"enter":"leave",a=le(),o=r!==void 0?an(r):()=>{};u==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let c=I(u,{enter:()=>t.enter,leave:()=>t.leave}),i=I(u,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),p=I(u,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return $e(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Te(e,...t.base,...c,...p),a.nextFrame(()=>{$e(e,...t.base,...c,...p),Te(e,...t.base,...c,...i),sn(e,()=>($e(e,...t.base,...c),Te(e,...t.base,...t.entered),o()))}),a.dispose}function dn({immediate:e,container:t,direction:n,classes:r,onStart:u,onStop:a}){let o=Re(),c=qe(),i=j(n);B(()=>{e&&(i.current="enter")},[e]),B(()=>{let p=le();c.add(p.dispose);let s=t.current;if(s&&i.current!=="idle"&&o.current)return p.dispose(),u.current(i.current),p.add(cn(s,r.current,i.current==="enter",()=>{p.dispose(),a.current(i.current)})),p.dispose},[n])}function Q(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let Ee=l.createContext(null);Ee.displayName="TransitionContext";var fn=(e=>(e.Visible="visible",e.Hidden="hidden",e))(fn||{});function pn(){let e=l.useContext(Ee);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function vn(){let e=l.useContext(ye);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let ye=l.createContext(null);ye.displayName="NestingContext";function Pe(e){return"children"in e?Pe(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function et(e,t){let n=j(e),r=l.useRef([]),u=Re(),a=qe(),o=P((b,g=Z.Hidden)=>{let m=r.current.findIndex(({el:v})=>v===b);m!==-1&&(I(g,{[Z.Unmount](){r.current.splice(m,1)},[Z.Hidden](){r.current[m].state="hidden"}}),a.microTask(()=>{var v;!Pe(r)&&u.current&&((v=n.current)==null||v.call(n))}))}),c=P(b=>{let g=r.current.find(({el:m})=>m===b);return g?g.state!=="visible"&&(g.state="visible"):r.current.push({el:b,state:"visible"}),()=>o(b,Z.Unmount)}),i=l.useRef([]),p=l.useRef(Promise.resolve()),s=l.useRef({enter:[],leave:[],idle:[]}),d=P((b,g,m)=>{i.current.splice(0),t&&(t.chains.current[g]=t.chains.current[g].filter(([v])=>v!==b)),t==null||t.chains.current[g].push([b,new Promise(v=>{i.current.push(v)})]),t==null||t.chains.current[g].push([b,new Promise(v=>{Promise.all(s.current[g].map(([S,x])=>x)).then(()=>v())})]),g==="enter"?p.current=p.current.then(()=>t==null?void 0:t.wait.current).then(()=>m(g)):m(g)}),f=P((b,g,m)=>{Promise.all(s.current[g].splice(0).map(([v,S])=>S)).then(()=>{var v;(v=i.current.shift())==null||v()}).then(()=>m(g))});return l.useMemo(()=>({children:r,register:c,unregister:o,onStart:d,onStop:f,wait:p,chains:s}),[c,o,r,d,f,s,p])}function mn(){}let hn=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function _e(e){var t;let n={};for(let r of hn)n[r]=(t=e[r])!=null?t:mn;return n}function gn(e){let t=l.useRef(_e(e));return l.useEffect(()=>{t.current=_e(e)},[e]),t}let bn="div",tt=re.RenderStrategy;function En(e,t){var n,r;let{beforeEnter:u,afterEnter:a,beforeLeave:o,afterLeave:c,enter:i,enterFrom:p,enterTo:s,entered:d,leave:f,leaveFrom:b,leaveTo:g,...m}=e,v=l.useRef(null),S=U(v,t),x=(n=m.unmount)==null||n?Z.Unmount:Z.Hidden,{show:T,appear:R,initial:A}=pn(),[C,D]=l.useState(T?"visible":"hidden"),$=vn(),{register:N,unregister:F}=$;l.useEffect(()=>N(v),[N,v]),l.useEffect(()=>{if(x===Z.Hidden&&v.current){if(T&&C!=="visible"){D("visible");return}return I(C,{hidden:()=>F(v),visible:()=>N(v)})}},[C,v,N,F,T,x]);let h=j({base:Q(m.className),enter:Q(i),enterFrom:Q(p),enterTo:Q(s),entered:Q(d),leave:Q(f),leaveFrom:Q(b),leaveTo:Q(g)}),w=gn({beforeEnter:u,afterEnter:a,beforeLeave:o,afterLeave:c}),O=ve();l.useEffect(()=>{if(O&&C==="visible"&&v.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[v,C,O]);let M=A&&!R,z=R&&T&&A,y=!O||M?"idle":T?"enter":"leave",L=un(0),te=P(Y=>I(Y,{enter:()=>{L.addFlag(k.Opening),w.current.beforeEnter()},leave:()=>{L.addFlag(k.Closing),w.current.beforeLeave()},idle:()=>{}})),ee=P(Y=>I(Y,{enter:()=>{L.removeFlag(k.Opening),w.current.afterEnter()},leave:()=>{L.removeFlag(k.Closing),w.current.afterLeave()},idle:()=>{}})),G=et(()=>{D("hidden"),F(v)},$),ae=l.useRef(!1);dn({immediate:z,container:v,classes:h,direction:y,onStart:j(Y=>{ae.current=!0,G.onStart(v,Y,te)}),onStop:j(Y=>{ae.current=!1,G.onStop(v,Y,ee),Y==="leave"&&!Pe(G)&&(D("hidden"),F(v))})});let H=m,rt={ref:S};return z?H={...H,className:pe(m.className,...h.current.enter,...h.current.enterFrom)}:ae.current&&(H.className=pe(m.className,(r=v.current)==null?void 0:r.className),H.className===""&&delete H.className),E.createElement(ye.Provider,{value:G},E.createElement(ze,{value:I(C,{visible:k.Open,hidden:k.Closed})|L.flags},q({ourProps:rt,theirProps:H,defaultTag:bn,features:tt,visible:C==="visible",name:"Transition.Child"})))}function yn(e,t){let{show:n,appear:r=!1,unmount:u=!0,...a}=e,o=l.useRef(null),c=U(o,t);ve();let i=he();if(n===void 0&&i!==null&&(n=(i&k.Open)===k.Open),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[p,s]=l.useState(n?"visible":"hidden"),d=et(()=>{s("hidden")}),[f,b]=l.useState(!0),g=l.useRef([n]);B(()=>{f!==!1&&g.current[g.current.length-1]!==n&&(g.current.push(n),b(!1))},[g,n]);let m=l.useMemo(()=>({show:n,appear:r,initial:f}),[n,r,f]);l.useEffect(()=>{if(n)s("visible");else if(!Pe(d))s("hidden");else{let T=o.current;if(!T)return;let R=T.getBoundingClientRect();R.x===0&&R.y===0&&R.width===0&&R.height===0&&s("hidden")}},[n,d]);let v={unmount:u},S=P(()=>{var T;f&&b(!1),(T=e.beforeEnter)==null||T.call(e)}),x=P(()=>{var T;f&&b(!1),(T=e.beforeLeave)==null||T.call(e)});return E.createElement(ye.Provider,{value:d},E.createElement(Ee.Provider,{value:m},q({ourProps:{...v,as:l.Fragment,children:E.createElement(nt,{ref:c,...v,...a,beforeEnter:S,beforeLeave:x})},theirProps:{},defaultTag:l.Fragment,features:tt,visible:p==="visible",name:"Transition"})))}function Pn(e,t){let n=l.useContext(Ee)!==null,r=he()!==null;return E.createElement(E.Fragment,null,!n&&r?E.createElement(Ne,{ref:t,...e}):E.createElement(nt,{ref:t,...e}))}let Ne=_(yn),nt=_(En),Sn=_(Pn),On=Object.assign(Ne,{Child:Sn,Root:Ne});export{Ye as A,Cn as B,q as C,On as D,$t as E,Be as F,me as G,ze as H,ne as I,Oe as J,Ce as K,$n as L,K as M,fe as N,J as O,vt as P,un as Q,j as R,Ve as S,Et as T,_ as U,yt as V,Fn as _,Qe as a,ie as b,oe as c,Ft as d,dt as e,Re as f,mt as g,le as h,B as i,he as j,k,ve as l,Mt as m,ue as n,P as o,qe as p,At as q,bt as r,V as s,Ue as t,I as u,xn as v,Nn as w,re as x,U as y,X as z};
@@ -231,7 +231,7 @@
231
231
  type="font/woff2"
232
232
  crossorigin="anonymous"
233
233
  />
234
- <script type="module" crossorigin src="/assets/index-COnjINWU.js"></script>
234
+ <script type="module" crossorigin src="/assets/index-C22hdM_h.js"></script>
235
235
 
236
236
  </head>
237
237
 
@@ -1 +0,0 @@
1
- import{t as u,U as c,a as m,w as a,j as s,e as f}from"./index-COnjINWU.js";import{L as g}from"./context-APidk_GA.js";import x from"./ModelLineage-B8hv0xJ-.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./Input-CJirBrKe.js";import"./editor-B2GioI_r.js";import"./file-C7afm_LM.js";import"./project-CWUUCZWT.js";import"./help-6Q7f7fjd.js";import"./SourceList-FVjgH2xJ.js";import"./index-CK4fdw8q.js";import"./transition-DjPYSO2n.js";import"./ListboxShow-C0DBUX71.js";import"./SearchList-B9NnvRod.js";function I(){const l=u(),{modelName:t}=c(),i=m(e=>e.models),o=m(e=>e.lastSelectedModel),r=a(t)||t===(o==null?void 0:o.name)?o:i.get(encodeURI(t));function d(e){const n=i.get(e);a(n)||l(f.LineageModels+"/"+n.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{I as default};