sqlmesh 0.186.2.dev1__py3-none-any.whl → 0.186.2.dev2__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 (51) hide show
  1. sqlmesh/_version.py +2 -2
  2. {sqlmesh-0.186.2.dev1.dist-info → sqlmesh-0.186.2.dev2.dist-info}/METADATA +2 -2
  3. {sqlmesh-0.186.2.dev1.dist-info → sqlmesh-0.186.2.dev2.dist-info}/RECORD +50 -50
  4. web/client/dist/assets/{Audits-Dcl7Y5yf.js → Audits-BPlxzqeG.js} +1 -1
  5. web/client/dist/assets/{Banner-DG7PdTuX.js → Banner-BnIDM-p-.js} +1 -1
  6. web/client/dist/assets/{ChevronDownIcon-nX-b0oJg.js → ChevronDownIcon-v5uzV5KS.js} +1 -1
  7. web/client/dist/assets/{ChevronRightIcon-DlYx_Tkq.js → ChevronRightIcon-lNBkq9fQ.js} +1 -1
  8. web/client/dist/assets/{Content-ByNNFCNq.js → Content-Dvky48vX.js} +1 -1
  9. web/client/dist/assets/{Content-Xx6vpXsx.js → Content-wP7OzMQ9.js} +1 -1
  10. web/client/dist/assets/{Data-Clt99kac.js → Data-D2tj5W3z.js} +1 -1
  11. web/client/dist/assets/{DataCatalog-BM0G-3ql.js → DataCatalog-H5ANpnSz.js} +1 -1
  12. web/client/dist/assets/{Editor-Dthvn0tJ.js → Editor-BpeAbLta.js} +1 -1
  13. web/client/dist/assets/{Editor-B-X-dpzh.js → Editor-Dq1m6nff.js} +1 -1
  14. web/client/dist/assets/{Errors-BxtH1Ijw.js → Errors-BDlLsOz8.js} +1 -1
  15. web/client/dist/assets/{FileExplorer-Ct6AjiCz.js → FileExplorer-BLOsvw4r.js} +1 -1
  16. web/client/dist/assets/{Footer-oOysi0Rj.js → Footer-B4UOL2Zx.js} +1 -1
  17. web/client/dist/assets/{Header-BgdWOSlW.js → Header-KC58-CQw.js} +1 -1
  18. web/client/dist/assets/{Input-dVgdocrC.js → Input-DQ3H5Jf5.js} +1 -1
  19. web/client/dist/assets/Lineage-COIwTlx7.js +1 -0
  20. web/client/dist/assets/{ListboxShow-DE9VWrnX.js → ListboxShow-Bp0ARqZ0.js} +1 -1
  21. web/client/dist/assets/{ModelLineage-qjIPMnaE.js → ModelLineage-Du6fUL20.js} +1 -1
  22. web/client/dist/assets/{Models-Bdj4i9jf.js → Models-BqQSh5xi.js} +1 -1
  23. web/client/dist/assets/{Page-nRV3-lCQ.js → Page-C9v-mVEC.js} +1 -1
  24. web/client/dist/assets/{Plan-DE_TjJxE.js → Plan-zagXv_gS.js} +1 -1
  25. web/client/dist/assets/{PlusCircleIcon-MX372cgb.js → PlusCircleIcon-DgugPkXr.js} +1 -1
  26. web/client/dist/assets/{ReportErrors-CWlh9ZI6.js → ReportErrors-ClY5ezEU.js} +1 -1
  27. web/client/dist/assets/{Root-DxOCwaxq.js → Root-BnlPjbrk.js} +1 -1
  28. web/client/dist/assets/{SearchList-Bkn1Hq0k.js → SearchList-B1ophTod.js} +1 -1
  29. web/client/dist/assets/{SelectEnvironment-BwMCf7m1.js → SelectEnvironment-CheqF0wg.js} +1 -1
  30. web/client/dist/assets/{SourceList-CfwYQ7a7.js → SourceList-C_z4JbJU.js} +1 -1
  31. web/client/dist/assets/{SourceListItem-Dw_XLCwD.js → SourceListItem-Be4vNQZL.js} +1 -1
  32. web/client/dist/assets/{SplitPane-Cy9J8wln.js → SplitPane-C8CPNQrK.js} +1 -1
  33. web/client/dist/assets/{Tests-BInfdlGW.js → Tests-DuGqAE7Q.js} +1 -1
  34. web/client/dist/assets/{Welcome-Cq7bKz0E.js → Welcome-BovgrYsq.js} +1 -1
  35. web/client/dist/assets/{context-eAMA5CGc.js → context-BJbxiwu1.js} +1 -1
  36. web/client/dist/assets/{context-DwZmsJ4J.js → context-C7kvMRgQ.js} +1 -1
  37. web/client/dist/assets/{editor-BWylDs4F.js → editor-C3xrJUHo.js} +1 -1
  38. web/client/dist/assets/{file-BxzTdZ94.js → file-Cn8UMGdB.js} +1 -1
  39. web/client/dist/assets/{floating-ui.react-dom-CRENXhNN.js → floating-ui.react-dom-njuatPE_.js} +1 -1
  40. web/client/dist/assets/{help-BzfMEAUL.js → help-B9pKFCi-.js} +1 -1
  41. web/client/dist/assets/{index-uNgE_frb.js → index-0HTVGXbP.js} +1 -1
  42. web/client/dist/assets/{index-5Y4x4i40.js → index-D0B238GC.js} +14 -14
  43. web/client/dist/assets/{plan-CHhLxN5c.js → plan-BT_YMvAu.js} +1 -1
  44. web/client/dist/assets/{popover-aPEvy0EQ.js → popover-zR5tE2ci.js} +1 -1
  45. web/client/dist/assets/{project-xs0wjmu5.js → project-8LRoNrpG.js} +1 -1
  46. web/client/dist/index.html +1 -1
  47. web/client/dist/assets/Lineage-DxZry1e9.js +0 -1
  48. {sqlmesh-0.186.2.dev1.dist-info → sqlmesh-0.186.2.dev2.dist-info}/WHEEL +0 -0
  49. {sqlmesh-0.186.2.dev1.dist-info → sqlmesh-0.186.2.dev2.dist-info}/entry_points.txt +0 -0
  50. {sqlmesh-0.186.2.dev1.dist-info → sqlmesh-0.186.2.dev2.dist-info}/licenses/LICENSE +0 -0
  51. {sqlmesh-0.186.2.dev1.dist-info → sqlmesh-0.186.2.dev2.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
1
- import{a0 as W,ay as y,v as l,b as m,az as A}from"./index-5Y4x4i40.js";import{M as Z}from"./file-BxzTdZ94.js";const I=`(function(){"use strict";function l(n){return n===!1}function w(n){return n===""}function y(n){return a(n)||w(n)}function a(n){return n==null}function D(...n){return n.filter(Boolean).join("__")}const r={Upstream:"upstream",Downstream:"downstream"},m=self;m.onmessage=async n=>{if(n.data.topic==="lineage")try{const{currentLineage:t,newLineage:s,mainNode:o}=n.data.payload,e=await g(t,s),c=await N(o,e);m.postMessage({topic:"lineage",payload:{lineage:e,nodesConnections:c}})}catch(t){m.postMessage({topic:"error",error:t})}};async function g(n={},t={}){return Object.entries(t).reduce((s,[o,e=[]])=>{var c;return o=encodeURI(o),s[o]={models:e.map(encodeURI),columns:((c=n==null?void 0:n[o])==null?void 0:c.columns)??void 0},s},{})}async function N(n,t={}){return new Promise((s,o)=>{if(a(t)||a(n))return{};const e={};try{f(r.Upstream,n,t,e),f(r.Downstream,n,t,e)}catch(c){o(c)}s(e)})}function f(n=r.Downstream,t,s={},o={}){var u;const e=n===r.Downstream;let c=[];e?c=Object.keys(s).filter(i=>s[i].models.includes(t)):c=((u=s[t])==null?void 0:u.models)??[],l(t in o)&&(o[t]=d());for(const i of c){const p=e?d(t,i,[o[t]]):d(i,t,[o[t]]);i in o?o[i].edges.push(p):(o[i]=p,f(n,i,s,o))}}function d(n,t,s=[]){const o=D(n,t);return{id:y(o)?void 0:o,edges:s}}})();
1
+ import{a0 as W,ay as y,v as l,b as m,az as A}from"./index-D0B238GC.js";import{M as Z}from"./file-Cn8UMGdB.js";const I=`(function(){"use strict";function l(n){return n===!1}function w(n){return n===""}function y(n){return a(n)||w(n)}function a(n){return n==null}function D(...n){return n.filter(Boolean).join("__")}const r={Upstream:"upstream",Downstream:"downstream"},m=self;m.onmessage=async n=>{if(n.data.topic==="lineage")try{const{currentLineage:t,newLineage:s,mainNode:o}=n.data.payload,e=await g(t,s),c=await N(o,e);m.postMessage({topic:"lineage",payload:{lineage:e,nodesConnections:c}})}catch(t){m.postMessage({topic:"error",error:t})}};async function g(n={},t={}){return Object.entries(t).reduce((s,[o,e=[]])=>{var c;return o=encodeURI(o),s[o]={models:e.map(encodeURI),columns:((c=n==null?void 0:n[o])==null?void 0:c.columns)??void 0},s},{})}async function N(n,t={}){return new Promise((s,o)=>{if(a(t)||a(n))return{};const e={};try{f(r.Upstream,n,t,e),f(r.Downstream,n,t,e)}catch(c){o(c)}s(e)})}function f(n=r.Downstream,t,s={},o={}){var u;const e=n===r.Downstream;let c=[];e?c=Object.keys(s).filter(i=>s[i].models.includes(t)):c=((u=s[t])==null?void 0:u.models)??[],l(t in o)&&(o[t]=d());for(const i of c){const p=e?d(t,i,[o[t]]):d(i,t,[o[t]]);i in o?o[i].edges.push(p):(o[i]=p,f(n,i,s,o))}}function d(n,t,s=[]){const o=D(n,t);return{id:y(o)?void 0:o,edges:s}}})();
2
2
  `,r=typeof self<"u"&&self.Blob&&new Blob([I],{type:"text/javascript;charset=utf-8"});function F(t){let s;try{if(s=r&&(self.URL||self.webkitURL).createObjectURL(r),!s)throw"";const e=new Worker(s,{name:t==null?void 0:t.name});return e.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(s)}),e}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(I),{name:t==null?void 0:t.name})}finally{s&&(self.URL||self.webkitURL).revokeObjectURL(s)}}const b=`(function(){"use strict";const g=self;import("https://cdn.jsdelivr.net/pyodide/v0.23.2/full/pyodide.js").then(()=>{const c=s();g.onmessage=async a=>{var i,l,t;const{sqlglot:C}=await c;if(a.data.topic==="validate"){let I;try{I=JSON.parse((i=C.get("validate"))==null?void 0:i(a.data.payload))}catch{I=!1}g.postMessage({topic:"validate",payload:I})}if(a.data.topic==="dialect"){let I;try{I=JSON.parse((l=C.get("get_dialect"))==null?void 0:l(a.data.payload))}catch{I={keywords:"",types:""}}g.postMessage({topic:"dialect",payload:I})}if(a.data.topic==="dialects"){let I;try{I=JSON.parse(C.get("dialects"))}catch{I=[]}g.postMessage({topic:"dialects",payload:I})}a.data.topic==="format"&&g.postMessage({topic:"format",payload:((t=C.get("format"))==null?void 0:t(a.data.payload.sql,a.data.payload.dialect))??""}),a.data.topic==="init"&&g.postMessage({topic:"init"})}}).catch(console.error);async function s(){g.pyodide=await g.loadPyodide(),await g.pyodide.loadPackage("micropip");const c=g.pyodide.pyimport("micropip");await c.install("sqlglot"),await c.install("typing-extensions");const a=await(await fetch(new URL("data:application/octet-stream;base64,aW1wb3J0IGpzb24KCmltcG9ydCBzcWxnbG90CmZyb20gc3FsZ2xvdCBpbXBvcnQgZXhwCmZyb20gc3FsZ2xvdC5kaWFsZWN0cy5kaWFsZWN0IGltcG9ydCBEaWFsZWN0LCBEaWFsZWN0VHlwZQoKZGlhbGVjdHMgPSBqc29uLmR1bXBzKAogICAgWwogICAgICAgIHsKICAgICAgICAgICAgImRpYWxlY3RfdGl0bGUiOiAiU1FMR2xvdCIgaWYgZGlhbGVjdCA9PSAiIiBlbHNlIGRpYWxlY3RfY2xhc3MuX19uYW1lX18sCiAgICAgICAgICAgICJkaWFsZWN0X25hbWUiOiBkaWFsZWN0LAogICAgICAgIH0KICAgICAgICBmb3IgZGlhbGVjdCwgZGlhbGVjdF9jbGFzcyBpbiBEaWFsZWN0LmNsYXNzZXMuaXRlbXMoKQogICAgXQopCgoKZGVmIHBhcnNlX3RvX2pzb24oc3FsOiBzdHIsIHJlYWQ6IERpYWxlY3RUeXBlID0gTm9uZSkgLT4gc3RyOgogICAgcmV0dXJuIGpzb24uZHVtcHMoCiAgICAgICAgW2V4cC5kdW1wKCkgaWYgZXhwIGVsc2Uge30gZm9yIGV4cCBpbiBzcWxnbG90LnBhcnNlKHNxbCwgcmVhZD1yZWFkLCBlcnJvcl9sZXZlbD0iaWdub3JlIildCiAgICApCgoKZGVmIGdldF9kaWFsZWN0KG5hbWU6IHN0ciA9ICIiKSAtPiBzdHI6CiAgICBkaWFsZWN0ID0gRGlhbGVjdC5jbGFzc2VzLmdldChuYW1lLCBEaWFsZWN0KQogICAga2V5d29yZHMgPSBkaWFsZWN0LnRva2VuaXplcl9jbGFzcy5LRVlXT1JEUwogICAgdHlwZV9tYXBwaW5nID0gZGlhbGVjdC5nZW5lcmF0b3JfY2xhc3MuVFlQRV9NQVBQSU5HCgogICAgcmV0dXJuIGpzb24uZHVtcHMoCiAgICAgICAgewogICAgICAgICAgICAia2V5d29yZHMiOiAiICIuam9pbihrZXl3b3JkcyksCiAgICAgICAgICAgICJ0eXBlcyI6ICIgIi5qb2luKHR5cGVfbWFwcGluZy5nZXQodCwgdC52YWx1ZSkgZm9yIHQgaW4gZXhwLkRhdGFUeXBlLlR5cGUpLAogICAgICAgIH0KICAgICkKCgpkZWYgZm9ybWF0KHNxbDogc3RyID0gIiIsIHJlYWQ6IERpYWxlY3RUeXBlID0gTm9uZSkgLT4gc3RyOgogICAgcmV0dXJuICJcbiIuam9pbigKICAgICAgICBzcWxnbG90LnRyYW5zcGlsZShzcWwsIHJlYWQ9cmVhZCwgZXJyb3JfbGV2ZWw9c3FsZ2xvdC5lcnJvcnMuRXJyb3JMZXZlbC5JR05PUkUsIHByZXR0eT1UcnVlKQogICAgKQoKCmRlZiB2YWxpZGF0ZShzcWw6IHN0ciA9ICIiLCByZWFkOiBEaWFsZWN0VHlwZSA9IE5vbmUpIC0+IHN0cjoKICAgIHRyeToKICAgICAgICBzcWxnbG90LnRyYW5zcGlsZSgKICAgICAgICAgICAgc3FsLCByZWFkPXJlYWQsIHByZXR0eT1GYWxzZSwgdW5zdXBwb3J0ZWRfbGV2ZWw9c3FsZ2xvdC5lcnJvcnMuRXJyb3JMZXZlbC5JTU1FRElBVEUKICAgICAgICApCiAgICBleGNlcHQgc3FsZ2xvdC5lcnJvcnMuUGFyc2VFcnJvcjoKICAgICAgICByZXR1cm4ganNvbi5kdW1wcyhGYWxzZSkKCiAgICByZXR1cm4ganNvbi5kdW1wcyhUcnVlKQoKCnsKICAgICJkaWFsZWN0cyI6IGRpYWxlY3RzLAogICAgImdldF9kaWFsZWN0IjogZ2V0X2RpYWxlY3QsCiAgICAicGFyc2VfdG9fanNvbiI6IHBhcnNlX3RvX2pzb24sCiAgICAidmFsaWRhdGUiOiB2YWxpZGF0ZSwKICAgICJmb3JtYXQiOiBmb3JtYXQsCn0K",self.location.href))).text();return g.postMessage({topic:"init"}),{sqlglot:g.pyodide.runPython(a)}}})();
3
3
  `,d=typeof self<"u"&&self.Blob&&new Blob([b],{type:"text/javascript;charset=utf-8"});function w(t){let s;try{if(s=d&&(self.URL||self.webkitURL).createObjectURL(d),!s)throw"";const e=new Worker(s,{name:t==null?void 0:t.name});return e.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(s)}),e}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(b),{name:t==null?void 0:t.name})}finally{s&&(self.URL||self.webkitURL).revokeObjectURL(s)}}const R=w(),[v,g]=y("tabs"),{tabs:h=[],id:G}=v()??{},C=p(),f=u(C),B=new Map([[C,f]]),U=W((t,s)=>({storedTabs:h,storedTabId:G,tab:f,tabs:B,engine:R,dialects:[],previewQuery:void 0,previewTable:void 0,previewDiff:void 0,direction:"vertical",inTabs(e){return s().tabs.has(e)},replaceTab(e,a){const n=s(),i=Array.from(n.tabs.entries()),o=i.findIndex(([c])=>c===e.file);i[o]=[a.file,a],t(()=>({tabs:new Map(i)})),n.updateStoredTabsIds()},updateStoredTabsIds(){const e=s();if(l(e.tab)){g({id:void 0,tabs:[]}),t(()=>({storedTabId:void 0,storedTabs:[]}));return}const a=[];for(const i of e.tabs.values())m(i.file.isChanged)&&i.file.isLocal||a.push({id:i.file.id,content:i.file.content});const n=e.tab.file.isChanged||e.tab.file.isRemote?e.tab.file.id:void 0;g({id:n,tabs:a}),t(()=>({storedTabId:n,storedTabs:a}))},refreshTab(e){l(e)||s().selectTab({...e})},setDialects(e){t(()=>({dialects:e}))},selectTab(e){const a=s();t(()=>({tab:e})),a.updateStoredTabsIds()},addTabs(e){const a=s();for(const n of e)a.tabs.set(n.file,n);t(()=>({tabs:new Map(a.tabs)}))},addTab(e){const a=s();if(a.tabs.has(e.file))a.tabs.set(e.file,e),t(()=>({tabs:new Map(a.tabs)}));else{const n=Array.from(a.tabs.entries()),i=n.findIndex(([o])=>{var c;return o===((c=a.tab)==null?void 0:c.file)});n.splice(i<0?n.length:i+1,0,[e.file,e]),t(()=>({tabs:new Map(n)}))}a.updateStoredTabsIds()},closeTab(e){var n;const a=s();if(e.removeChanges(),a.tabs.delete(e),a.tabs.size===0)a.selectTab(void 0);else if(a.tabs.size===1){const i=Array.from(a.tabs.values());a.selectTab(i.at(0))}else if(e.id===((n=a.tab)==null?void 0:n.file.id)){const i=Array.from(a.tabs.values()),o=i.findIndex(c=>c.file===e);a.selectTab(i.at(o-1))}t(()=>({tabs:new Map(a.tabs)})),a.updateStoredTabsIds()},createTab:u,setPreviewQuery(e){t(()=>({previewQuery:e}))},setPreviewTable(e){t(()=>({previewTable:e}))},setPreviewDiff(e){t(()=>({previewDiff:e}))},setDirection(e){t(()=>({direction:e}))}}));function u(t=p()){return{id:A(),file:t,isValid:!0}}function p(t){return new Z({id:t,name:"",path:"",content:`-- Create arbitrary SQL queries
4
4
  -- and execute them against different environments
@@ -1 +1 @@
1
- var u=Object.defineProperty;var g=(r,e,t)=>e in r?u(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var h=(r,e,t)=>g(r,typeof e!="symbol"?e+"":e,t);import{$ as _,I as x,a8 as m,a9 as n,aa as c,W as d,b as f}from"./index-5Y4x4i40.js";class y extends _{constructor(t,s){super(t!=null&&t.isModel?t.initial:{...t,name:(t==null?void 0:t.name)??"",path:(t==null?void 0:t.path)??""});h(this,"_path");h(this,"_name");h(this,"parent");h(this,"remove",!1);this._path=(t==null?void 0:t.path)??this.initial.path,this._name=(t==null?void 0:t.name)??this.initial.name,this.parent=s}get id(){return x(this.path)?this.initial.id:this.path}get name(){return this._name}get path(){return this._path}get isUntitled(){return this.name===""}get isLocal(){return this.path===""}get isRemote(){return this.path!==""}get withParent(){var t;return!!((t=this.parent)!=null&&t.isModel)}copyName(){return`Copy of ${this.name}__${m()}`}rename(t){this.isRemote&&(this._path=this._path.replace(this.name,t)),this._name=t}static findArtifactByPath(t,s){return t.path===s?t:t.allArtifacts.find(a=>a.path===s)}}const p={SQL:".sql",PY:".py",YAML:".yaml",YML:".yml"};class o extends y{constructor(t,s){super(o.getInitialArtifact(t),s);h(this,"_content","");h(this,"content");h(this,"extension");h(this,"isFormatted");this.content=this._content=n((t==null?void 0:t.content)??this.initial.content),this.extension=n((t==null?void 0:t.extension)??this.initial.extension),this.isFormatted=t==null?void 0:t.isFormatted}get basename(){return this.name.replace(this.extension,"")}get isEmpty(){return c(this.content)}get isChanged(){return d(this._content)&&this.content!==this._content}get isSQL(){return this.extension===p.SQL}get fingerprint(){return`${this._content}${this.name}${this.path}`}removeChanges(){this.content=this._content}copyName(){return`Copy of ${n(this.name.split(this.extension)[0])}__${m()}${this.extension}`}update(t){const s=n(t==null?void 0:t.content);(c(this._content)||f(this.isChanged))&&(this.content=s),this._content=s,this.extension=n(t==null?void 0:t.extension)}static getInitialArtifact(t){return o.isModelFile(t)?t.initial:{name:n(t==null?void 0:t.name),path:n(t==null?void 0:t.path),extension:(t==null?void 0:t.extension)??p.SQL,content:n(t==null?void 0:t.content)}}static isModelFile(t){return t instanceof o}}export{p as E,o as M,y as a};
1
+ var u=Object.defineProperty;var g=(r,e,t)=>e in r?u(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var h=(r,e,t)=>g(r,typeof e!="symbol"?e+"":e,t);import{$ as _,I as x,a8 as m,a9 as n,aa as c,W as d,b as f}from"./index-D0B238GC.js";class y extends _{constructor(t,s){super(t!=null&&t.isModel?t.initial:{...t,name:(t==null?void 0:t.name)??"",path:(t==null?void 0:t.path)??""});h(this,"_path");h(this,"_name");h(this,"parent");h(this,"remove",!1);this._path=(t==null?void 0:t.path)??this.initial.path,this._name=(t==null?void 0:t.name)??this.initial.name,this.parent=s}get id(){return x(this.path)?this.initial.id:this.path}get name(){return this._name}get path(){return this._path}get isUntitled(){return this.name===""}get isLocal(){return this.path===""}get isRemote(){return this.path!==""}get withParent(){var t;return!!((t=this.parent)!=null&&t.isModel)}copyName(){return`Copy of ${this.name}__${m()}`}rename(t){this.isRemote&&(this._path=this._path.replace(this.name,t)),this._name=t}static findArtifactByPath(t,s){return t.path===s?t:t.allArtifacts.find(a=>a.path===s)}}const p={SQL:".sql",PY:".py",YAML:".yaml",YML:".yml"};class o extends y{constructor(t,s){super(o.getInitialArtifact(t),s);h(this,"_content","");h(this,"content");h(this,"extension");h(this,"isFormatted");this.content=this._content=n((t==null?void 0:t.content)??this.initial.content),this.extension=n((t==null?void 0:t.extension)??this.initial.extension),this.isFormatted=t==null?void 0:t.isFormatted}get basename(){return this.name.replace(this.extension,"")}get isEmpty(){return c(this.content)}get isChanged(){return d(this._content)&&this.content!==this._content}get isSQL(){return this.extension===p.SQL}get fingerprint(){return`${this._content}${this.name}${this.path}`}removeChanges(){this.content=this._content}copyName(){return`Copy of ${n(this.name.split(this.extension)[0])}__${m()}${this.extension}`}update(t){const s=n(t==null?void 0:t.content);(c(this._content)||f(this.isChanged))&&(this.content=s),this._content=s,this.extension=n(t==null?void 0:t.extension)}static getInitialArtifact(t){return o.isModelFile(t)?t.initial:{name:n(t==null?void 0:t.name),path:n(t==null?void 0:t.path),extension:(t==null?void 0:t.extension)??p.SQL,content:n(t==null?void 0:t.content)}}static isModelFile(t){return t instanceof o}}export{p as E,o as M,y as a};
@@ -1 +1 @@
1
- import{ax as Yt,a1 as qt,r as C}from"./index-5Y4x4i40.js";var kt=Yt();const We=qt(kt);function at(){return typeof window<"u"}function tt(t){return Ft(t)?(t.nodeName||"").toLowerCase():"#document"}function W(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function I(t){var e;return(e=(Ft(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ft(t){return at()?t instanceof Node||t instanceof W(t).Node:!1}function V(t){return at()?t instanceof Element||t instanceof W(t).Element:!1}function j(t){return at()?t instanceof HTMLElement||t instanceof W(t).HTMLElement:!1}function Ct(t){return!at()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof W(t).ShadowRoot}function ot(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=_(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function Xt(t){return["table","td","th"].includes(tt(t))}function ut(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function xt(t){const e=yt(),n=V(t)?_(t):t;return["transform","translate","scale","rotate","perspective"].some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Ut(t){let e=U(t);for(;j(e)&&!Q(e);){if(xt(e))return e;if(ut(e))return null;e=U(e)}return null}function yt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Q(t){return["html","body","#document"].includes(tt(t))}function _(t){return W(t).getComputedStyle(t)}function dt(t){return V(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function U(t){if(tt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Ct(t)&&t.host||I(t);return Ct(e)?e.host:e}function $t(t){const e=U(t);return Q(e)?t.ownerDocument?t.ownerDocument.body:t.body:j(e)&&ot(e)?e:$t(e)}function nt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=$t(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=W(i);if(r){const c=gt(s);return e.concat(s,s.visualViewport||[],ot(i)?i:[],c&&n?nt(c):[])}return e.concat(i,nt(i,[],n))}function gt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const Kt=["top","right","bottom","left"],K=Math.min,$=Math.max,st=Math.round,it=Math.floor,z=t=>({x:t,y:t}),Gt={left:"right",right:"left",bottom:"top",top:"bottom"},Jt={start:"end",end:"start"};function pt(t,e,n){return $(t,K(e,n))}function q(t,e){return typeof t=="function"?t(e):t}function X(t){return t.split("-")[0]}function et(t){return t.split("-")[1]}function vt(t){return t==="x"?"y":"x"}function bt(t){return t==="y"?"height":"width"}function Y(t){return["top","bottom"].includes(X(t))?"y":"x"}function At(t){return vt(Y(t))}function Qt(t,e,n){n===void 0&&(n=!1);const o=et(t),i=At(t),r=bt(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=ct(s)),[s,ct(s)]}function Zt(t){const e=ct(t);return[wt(t),e,wt(e)]}function wt(t){return t.replace(/start|end/g,e=>Jt[e])}function te(t,e,n){const o=["left","right"],i=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?r:s;default:return[]}}function ee(t,e,n,o){const i=et(t);let r=te(X(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(wt)))),r}function ct(t){return t.replace(/left|right|bottom|top/g,e=>Gt[e])}function ne(t){return{top:0,right:0,bottom:0,left:0,...t}}function Wt(t){return typeof t!="number"?ne(t):{top:t,right:t,bottom:t,left:t}}function lt(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Et(t,e,n){let{reference:o,floating:i}=t;const r=Y(e),s=At(e),c=bt(s),f=X(e),l=r==="y",a=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2;let u;switch(f){case"top":u={x:a,y:o.y-i.height};break;case"bottom":u={x:a,y:o.y+o.height};break;case"right":u={x:o.x+o.width,y:d};break;case"left":u={x:o.x-i.width,y:d};break;default:u={x:o.x,y:o.y}}switch(et(e)){case"start":u[s]-=m*(n&&l?-1:1);break;case"end":u[s]+=m*(n&&l?-1:1);break}return u}const oe=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,c=r.filter(Boolean),f=await(s.isRTL==null?void 0:s.isRTL(e));let l=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:a,y:d}=Et(l,o,f),m=o,u={},h=0;for(let g=0;g<c.length;g++){const{name:p,fn:w}=c[g],{x:y,y:v,data:b,reset:x}=await w({x:a,y:d,initialPlacement:o,placement:m,strategy:i,middlewareData:u,rects:l,platform:s,elements:{reference:t,floating:e}});a=y??a,d=v??d,u={...u,[p]:{...u[p],...b}},x&&h<=50&&(h++,typeof x=="object"&&(x.placement&&(m=x.placement),x.rects&&(l=x.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):x.rects),{x:a,y:d}=Et(l,m,f)),g=-1)}return{x:a,y:d,placement:m,strategy:i,middlewareData:u}};async function Z(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:r,rects:s,elements:c,strategy:f}=t,{boundary:l="clippingAncestors",rootBoundary:a="viewport",elementContext:d="floating",altBoundary:m=!1,padding:u=0}=q(e,t),h=Wt(u),p=c[m?d==="floating"?"reference":"floating":d],w=lt(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(p)))==null||n?p:p.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:l,rootBoundary:a,strategy:f})),y=d==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,v=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),b=await(r.isElement==null?void 0:r.isElement(v))?await(r.getScale==null?void 0:r.getScale(v))||{x:1,y:1}:{x:1,y:1},x=lt(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:v,strategy:f}):y);return{top:(w.top-x.top+h.top)/b.y,bottom:(x.bottom-w.bottom+h.bottom)/b.y,left:(w.left-x.left+h.left)/b.x,right:(x.right-w.right+h.right)/b.x}}const ie=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:r,platform:s,elements:c,middlewareData:f}=e,{element:l,padding:a=0}=q(t,e)||{};if(l==null)return{};const d=Wt(a),m={x:n,y:o},u=At(i),h=bt(u),g=await s.getDimensions(l),p=u==="y",w=p?"top":"left",y=p?"bottom":"right",v=p?"clientHeight":"clientWidth",b=r.reference[h]+r.reference[u]-m[u]-r.floating[h],x=m[u]-r.reference[u],O=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let R=O?O[v]:0;(!R||!await(s.isElement==null?void 0:s.isElement(O)))&&(R=c.floating[v]||r.floating[h]);const T=b/2-x/2,B=R/2-g[h]/2-1,E=K(d[w],B),H=K(d[y],B),F=E,P=R-g[h]-H,M=R/2-g[h]/2+T,k=pt(F,M,P),S=!f.arrow&&et(i)!=null&&M!==k&&r.reference[h]/2-(M<F?E:H)-g[h]/2<0,N=S?M<F?M-F:M-P:0;return{[u]:m[u]+N,data:{[u]:k,centerOffset:M-k-N,...S&&{alignmentOffset:N}},reset:S}}}),re=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:f,elements:l}=e,{mainAxis:a=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...p}=q(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const w=X(i),y=Y(c),v=X(c)===c,b=await(f.isRTL==null?void 0:f.isRTL(l.floating)),x=m||(v||!g?[ct(c)]:Zt(c)),O=h!=="none";!m&&O&&x.push(...ee(c,g,h,b));const R=[c,...x],T=await Z(e,p),B=[];let E=((o=r.flip)==null?void 0:o.overflows)||[];if(a&&B.push(T[w]),d){const k=Qt(i,s,b);B.push(T[k[0]],T[k[1]])}if(E=[...E,{placement:i,overflows:B}],!B.every(k=>k<=0)){var H,F;const k=(((H=r.flip)==null?void 0:H.index)||0)+1,S=R[k];if(S){var P;const A=d==="alignment"?y!==Y(S):!1,D=((P=E[0])==null?void 0:P.overflows[0])>0;if(!A||D)return{data:{index:k,overflows:E},reset:{placement:S}}}let N=(F=E.filter(A=>A.overflows[0]<=0).sort((A,D)=>A.overflows[1]-D.overflows[1])[0])==null?void 0:F.placement;if(!N)switch(u){case"bestFit":{var M;const A=(M=E.filter(D=>{if(O){const L=Y(D.placement);return L===y||L==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(L=>L>0).reduce((L,It)=>L+It,0)]).sort((D,L)=>D[1]-L[1])[0])==null?void 0:M[0];A&&(N=A);break}case"initialPlacement":N=c;break}if(i!==N)return{reset:{placement:N}}}return{}}}};function St(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Dt(t){return Kt.some(e=>t[e]>=0)}const se=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:o="referenceHidden",...i}=q(t,e);switch(o){case"referenceHidden":{const r=await Z(e,{...i,elementContext:"reference"}),s=St(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Dt(s)}}}case"escaped":{const r=await Z(e,{...i,altBoundary:!0}),s=St(r,n.floating);return{data:{escapedOffsets:s,escaped:Dt(s)}}}default:return{}}}}};async function ce(t,e){const{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=X(n),c=et(n),f=Y(n)==="y",l=["left","top"].includes(s)?-1:1,a=r&&f?-1:1,d=q(e,t);let{mainAxis:m,crossAxis:u,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&typeof h=="number"&&(u=c==="end"?h*-1:h),f?{x:u*a,y:m*l}:{x:m*l,y:u*a}}const le=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:s,middlewareData:c}=e,f=await ce(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+f.x,y:r+f.y,data:{...f,placement:s}}}}},fe=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:c={fn:p=>{let{x:w,y}=p;return{x:w,y}}},...f}=q(t,e),l={x:n,y:o},a=await Z(e,f),d=Y(X(i)),m=vt(d);let u=l[m],h=l[d];if(r){const p=m==="y"?"top":"left",w=m==="y"?"bottom":"right",y=u+a[p],v=u-a[w];u=pt(y,u,v)}if(s){const p=d==="y"?"top":"left",w=d==="y"?"bottom":"right",y=h+a[p],v=h-a[w];h=pt(y,h,v)}const g=c.fn({...e,[m]:u,[d]:h});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[m]:r,[d]:s}}}}}},ae=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:i,rects:r,middlewareData:s}=e,{offset:c=0,mainAxis:f=!0,crossAxis:l=!0}=q(t,e),a={x:n,y:o},d=Y(i),m=vt(d);let u=a[m],h=a[d];const g=q(c,e),p=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(f){const v=m==="y"?"height":"width",b=r.reference[m]-r.floating[v]+p.mainAxis,x=r.reference[m]+r.reference[v]-p.mainAxis;u<b?u=b:u>x&&(u=x)}if(l){var w,y;const v=m==="y"?"width":"height",b=["top","left"].includes(X(i)),x=r.reference[d]-r.floating[v]+(b&&((w=s.offset)==null?void 0:w[d])||0)+(b?0:p.crossAxis),O=r.reference[d]+r.reference[v]+(b?0:((y=s.offset)==null?void 0:y[d])||0)-(b?p.crossAxis:0);h<x?h=x:h>O&&(h=O)}return{[m]:u,[d]:h}}}},ue=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:r,platform:s,elements:c}=e,{apply:f=()=>{},...l}=q(t,e),a=await Z(e,l),d=X(i),m=et(i),u=Y(i)==="y",{width:h,height:g}=r.floating;let p,w;d==="top"||d==="bottom"?(p=d,w=m===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(w=d,p=m==="end"?"top":"bottom");const y=g-a.top-a.bottom,v=h-a.left-a.right,b=K(g-a[p],y),x=K(h-a[w],v),O=!e.middlewareData.shift;let R=b,T=x;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(T=v),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(R=y),O&&!m){const E=$(a.left,0),H=$(a.right,0),F=$(a.top,0),P=$(a.bottom,0);u?T=h-2*(E!==0||H!==0?E+H:$(a.left,a.right)):R=g-2*(F!==0||P!==0?F+P:$(a.top,a.bottom))}await f({...e,availableWidth:T,availableHeight:R});const B=await s.getDimensions(c.floating);return h!==B.width||g!==B.height?{reset:{rects:!0}}:{}}}};function Bt(t){const e=_(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=j(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,c=st(n)!==r||st(o)!==s;return c&&(n=r,o=s),{width:n,height:o,$:c}}function Rt(t){return V(t)?t:t.contextElement}function J(t){const e=Rt(t);if(!j(e))return z(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=Bt(e);let s=(r?st(n.width):n.width)/o,c=(r?st(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const de=z(0);function Ht(t){const e=W(t);return!yt()||!e.visualViewport?de:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function me(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==W(t)?!1:e}function G(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=Rt(t);let s=z(1);e&&(o?V(o)&&(s=J(o)):s=J(t));const c=me(r,n,o)?Ht(r):z(0);let f=(i.left+c.x)/s.x,l=(i.top+c.y)/s.y,a=i.width/s.x,d=i.height/s.y;if(r){const m=W(r),u=o&&V(o)?W(o):o;let h=m,g=gt(h);for(;g&&o&&u!==h;){const p=J(g),w=g.getBoundingClientRect(),y=_(g),v=w.left+(g.clientLeft+parseFloat(y.paddingLeft))*p.x,b=w.top+(g.clientTop+parseFloat(y.paddingTop))*p.y;f*=p.x,l*=p.y,a*=p.x,d*=p.y,f+=v,l+=b,h=W(g),g=gt(h)}}return lt({width:a,height:d,x:f,y:l})}function Ot(t,e){const n=dt(t).scrollLeft;return e?e.left+n:G(I(t)).left+n}function Nt(t,e,n){n===void 0&&(n=!1);const o=t.getBoundingClientRect(),i=o.left+e.scrollLeft-(n?0:Ot(t,o)),r=o.top+e.scrollTop;return{x:i,y:r}}function he(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i==="fixed",s=I(o),c=e?ut(e.floating):!1;if(o===s||c&&r)return n;let f={scrollLeft:0,scrollTop:0},l=z(1);const a=z(0),d=j(o);if((d||!d&&!r)&&((tt(o)!=="body"||ot(s))&&(f=dt(o)),j(o))){const u=G(o);l=J(o),a.x=u.x+o.clientLeft,a.y=u.y+o.clientTop}const m=s&&!d&&!r?Nt(s,f,!0):z(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-f.scrollLeft*l.x+a.x+m.x,y:n.y*l.y-f.scrollTop*l.y+a.y+m.y}}function ge(t){return Array.from(t.getClientRects())}function pe(t){const e=I(t),n=dt(t),o=t.ownerDocument.body,i=$(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=$(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Ot(t);const c=-n.scrollTop;return _(o).direction==="rtl"&&(s+=$(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:c}}function we(t,e){const n=W(t),o=I(t),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,c=0,f=0;if(i){r=i.width,s=i.height;const l=yt();(!l||l&&e==="fixed")&&(c=i.offsetLeft,f=i.offsetTop)}return{width:r,height:s,x:c,y:f}}function xe(t,e){const n=G(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=j(t)?J(t):z(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,f=i*r.x,l=o*r.y;return{width:s,height:c,x:f,y:l}}function Lt(t,e,n){let o;if(e==="viewport")o=we(t,n);else if(e==="document")o=pe(I(t));else if(V(e))o=xe(e,n);else{const i=Ht(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return lt(o)}function Vt(t,e){const n=U(t);return n===e||!V(n)||Q(n)?!1:_(n).position==="fixed"||Vt(n,e)}function ye(t,e){const n=e.get(t);if(n)return n;let o=nt(t,[],!1).filter(c=>V(c)&&tt(c)!=="body"),i=null;const r=_(t).position==="fixed";let s=r?U(t):t;for(;V(s)&&!Q(s);){const c=_(s),f=xt(s);!f&&c.position==="fixed"&&(i=null),(r?!f&&!i:!f&&c.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||ot(s)&&!f&&Vt(t,s))?o=o.filter(a=>a!==s):i=c,s=U(s)}return e.set(t,o),o}function ve(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const s=[...n==="clippingAncestors"?ut(e)?[]:ye(e,this._c):[].concat(n),o],c=s[0],f=s.reduce((l,a)=>{const d=Lt(e,a,i);return l.top=$(d.top,l.top),l.right=K(d.right,l.right),l.bottom=K(d.bottom,l.bottom),l.left=$(d.left,l.left),l},Lt(e,c,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function be(t){const{width:e,height:n}=Bt(t);return{width:e,height:n}}function Ae(t,e,n){const o=j(e),i=I(e),r=n==="fixed",s=G(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const f=z(0);function l(){f.x=Ot(i)}if(o||!o&&!r)if((tt(e)!=="body"||ot(i))&&(c=dt(e)),o){const u=G(e,!0,r,e);f.x=u.x+e.clientLeft,f.y=u.y+e.clientTop}else i&&l();r&&!o&&i&&l();const a=i&&!o&&!r?Nt(i,c):z(0),d=s.left+c.scrollLeft-f.x-a.x,m=s.top+c.scrollTop-f.y-a.y;return{x:d,y:m,width:s.width,height:s.height}}function mt(t){return _(t).position==="static"}function Tt(t,e){if(!j(t)||_(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return I(t)===n&&(n=n.ownerDocument.body),n}function _t(t,e){const n=W(t);if(ut(t))return n;if(!j(t)){let i=U(t);for(;i&&!Q(i);){if(V(i)&&!mt(i))return i;i=U(i)}return n}let o=Tt(t,e);for(;o&&Xt(o)&&mt(o);)o=Tt(o,e);return o&&Q(o)&&mt(o)&&!xt(o)?n:o||Ut(t)||n}const Re=async function(t){const e=this.getOffsetParent||_t,n=this.getDimensions,o=await n(t.floating);return{reference:Ae(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Oe(t){return _(t).direction==="rtl"}const Ce={convertOffsetParentRelativeRectToViewportRelativeRect:he,getDocumentElement:I,getClippingRect:ve,getOffsetParent:_t,getElementRects:Re,getClientRects:ge,getDimensions:be,getScale:J,isElement:V,isRTL:Oe};function zt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Ee(t,e){let n=null,o;const i=I(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),r();const l=t.getBoundingClientRect(),{left:a,top:d,width:m,height:u}=l;if(c||e(),!m||!u)return;const h=it(d),g=it(i.clientWidth-(a+m)),p=it(i.clientHeight-(d+u)),w=it(a),v={rootMargin:-h+"px "+-g+"px "+-p+"px "+-w+"px",threshold:$(0,K(1,f))||1};let b=!0;function x(O){const R=O[0].intersectionRatio;if(R!==f){if(!b)return s();R?s(!1,R):o=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!zt(l,t.getBoundingClientRect())&&s(),b=!1}try{n=new IntersectionObserver(x,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,v)}n.observe(t)}return s(!0),r}function Be(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=o,l=Rt(t),a=i||r?[...l?nt(l):[],...nt(e)]:[];a.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),r&&w.addEventListener("resize",n)});const d=l&&c?Ee(l,n):null;let m=-1,u=null;s&&(u=new ResizeObserver(w=>{let[y]=w;y&&y.target===l&&u&&(u.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var v;(v=u)==null||v.observe(e)})),n()}),l&&!f&&u.observe(l),u.observe(e));let h,g=f?G(t):null;f&&p();function p(){const w=G(t);g&&!zt(g,w)&&n(),g=w,h=requestAnimationFrame(p)}return n(),()=>{var w;a.forEach(y=>{i&&y.removeEventListener("scroll",n),r&&y.removeEventListener("resize",n)}),d==null||d(),(w=u)==null||w.disconnect(),u=null,f&&cancelAnimationFrame(h)}}const He=Z,Se=le,De=fe,Le=re,Te=ue,Pe=se,Pt=ie,Me=ae,ke=(t,e,n)=>{const o=new Map,i={platform:Ce,...n},r={...i.platform,_c:o};return oe(t,e,{...i,platform:r})};var rt=typeof document<"u"?C.useLayoutEffect:C.useEffect;function ft(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!ft(t[o],e[o]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,i[o]))return!1;for(o=n;o--!==0;){const r=i[o];if(!(r==="_owner"&&t.$$typeof)&&!ft(t[r],e[r]))return!1}return!0}return t!==t&&e!==e}function jt(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Mt(t,e){const n=jt(t);return Math.round(e*n)/n}function ht(t){const e=C.useRef(t);return rt(()=>{e.current=t}),e}function Ne(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:r,floating:s}={},transform:c=!0,whileElementsMounted:f,open:l}=t,[a,d]=C.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,u]=C.useState(o);ft(m,o)||u(o);const[h,g]=C.useState(null),[p,w]=C.useState(null),y=C.useCallback(A=>{A!==O.current&&(O.current=A,g(A))},[]),v=C.useCallback(A=>{A!==R.current&&(R.current=A,w(A))},[]),b=r||h,x=s||p,O=C.useRef(null),R=C.useRef(null),T=C.useRef(a),B=f!=null,E=ht(f),H=ht(i),F=ht(l),P=C.useCallback(()=>{if(!O.current||!R.current)return;const A={placement:e,strategy:n,middleware:m};H.current&&(A.platform=H.current),ke(O.current,R.current,A).then(D=>{const L={...D,isPositioned:F.current!==!1};M.current&&!ft(T.current,L)&&(T.current=L,kt.flushSync(()=>{d(L)}))})},[m,e,n,H,F]);rt(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(A=>({...A,isPositioned:!1})))},[l]);const M=C.useRef(!1);rt(()=>(M.current=!0,()=>{M.current=!1}),[]),rt(()=>{if(b&&(O.current=b),x&&(R.current=x),b&&x){if(E.current)return E.current(b,x,P);P()}},[b,x,P,E,B]);const k=C.useMemo(()=>({reference:O,floating:R,setReference:y,setFloating:v}),[y,v]),S=C.useMemo(()=>({reference:b,floating:x}),[b,x]),N=C.useMemo(()=>{const A={position:n,left:0,top:0};if(!S.floating)return A;const D=Mt(S.floating,a.x),L=Mt(S.floating,a.y);return c?{...A,transform:"translate("+D+"px, "+L+"px)",...jt(S.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:D,top:L}},[n,c,S.floating,a.x,a.y]);return C.useMemo(()=>({...a,update:P,refs:k,elements:S,floatingStyles:N}),[a,P,k,S,N])}const Fe=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:o,padding:i}=typeof t=="function"?t(n):t;return o&&e(o)?o.current!=null?Pt({element:o.current,padding:i}).fn(n):{}:o?Pt({element:o,padding:i}).fn(n):{}}}},Ve=(t,e)=>({...Se(t),options:[t,e]}),_e=(t,e)=>({...De(t),options:[t,e]}),ze=(t,e)=>({...Me(t),options:[t,e]}),je=(t,e)=>({...Le(t),options:[t,e]}),Ie=(t,e)=>({...Te(t),options:[t,e]}),Ye=(t,e)=>({...Pe(t),options:[t,e]}),qe=(t,e)=>({...Fe(t),options:[t,e]});export{We as R,Ie as a,qe as b,Be as c,He as d,q as e,je as f,st as g,Ye as h,V as i,K as j,ze as l,$ as m,Ve as o,kt as r,_e as s,Ne as u};
1
+ import{ax as Yt,a1 as qt,r as C}from"./index-D0B238GC.js";var kt=Yt();const We=qt(kt);function at(){return typeof window<"u"}function tt(t){return Ft(t)?(t.nodeName||"").toLowerCase():"#document"}function W(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function I(t){var e;return(e=(Ft(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ft(t){return at()?t instanceof Node||t instanceof W(t).Node:!1}function V(t){return at()?t instanceof Element||t instanceof W(t).Element:!1}function j(t){return at()?t instanceof HTMLElement||t instanceof W(t).HTMLElement:!1}function Ct(t){return!at()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof W(t).ShadowRoot}function ot(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=_(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function Xt(t){return["table","td","th"].includes(tt(t))}function ut(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function xt(t){const e=yt(),n=V(t)?_(t):t;return["transform","translate","scale","rotate","perspective"].some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Ut(t){let e=U(t);for(;j(e)&&!Q(e);){if(xt(e))return e;if(ut(e))return null;e=U(e)}return null}function yt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Q(t){return["html","body","#document"].includes(tt(t))}function _(t){return W(t).getComputedStyle(t)}function dt(t){return V(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function U(t){if(tt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Ct(t)&&t.host||I(t);return Ct(e)?e.host:e}function $t(t){const e=U(t);return Q(e)?t.ownerDocument?t.ownerDocument.body:t.body:j(e)&&ot(e)?e:$t(e)}function nt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=$t(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=W(i);if(r){const c=gt(s);return e.concat(s,s.visualViewport||[],ot(i)?i:[],c&&n?nt(c):[])}return e.concat(i,nt(i,[],n))}function gt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const Kt=["top","right","bottom","left"],K=Math.min,$=Math.max,st=Math.round,it=Math.floor,z=t=>({x:t,y:t}),Gt={left:"right",right:"left",bottom:"top",top:"bottom"},Jt={start:"end",end:"start"};function pt(t,e,n){return $(t,K(e,n))}function q(t,e){return typeof t=="function"?t(e):t}function X(t){return t.split("-")[0]}function et(t){return t.split("-")[1]}function vt(t){return t==="x"?"y":"x"}function bt(t){return t==="y"?"height":"width"}function Y(t){return["top","bottom"].includes(X(t))?"y":"x"}function At(t){return vt(Y(t))}function Qt(t,e,n){n===void 0&&(n=!1);const o=et(t),i=At(t),r=bt(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=ct(s)),[s,ct(s)]}function Zt(t){const e=ct(t);return[wt(t),e,wt(e)]}function wt(t){return t.replace(/start|end/g,e=>Jt[e])}function te(t,e,n){const o=["left","right"],i=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?r:s;default:return[]}}function ee(t,e,n,o){const i=et(t);let r=te(X(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(wt)))),r}function ct(t){return t.replace(/left|right|bottom|top/g,e=>Gt[e])}function ne(t){return{top:0,right:0,bottom:0,left:0,...t}}function Wt(t){return typeof t!="number"?ne(t):{top:t,right:t,bottom:t,left:t}}function lt(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Et(t,e,n){let{reference:o,floating:i}=t;const r=Y(e),s=At(e),c=bt(s),f=X(e),l=r==="y",a=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2;let u;switch(f){case"top":u={x:a,y:o.y-i.height};break;case"bottom":u={x:a,y:o.y+o.height};break;case"right":u={x:o.x+o.width,y:d};break;case"left":u={x:o.x-i.width,y:d};break;default:u={x:o.x,y:o.y}}switch(et(e)){case"start":u[s]-=m*(n&&l?-1:1);break;case"end":u[s]+=m*(n&&l?-1:1);break}return u}const oe=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,c=r.filter(Boolean),f=await(s.isRTL==null?void 0:s.isRTL(e));let l=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:a,y:d}=Et(l,o,f),m=o,u={},h=0;for(let g=0;g<c.length;g++){const{name:p,fn:w}=c[g],{x:y,y:v,data:b,reset:x}=await w({x:a,y:d,initialPlacement:o,placement:m,strategy:i,middlewareData:u,rects:l,platform:s,elements:{reference:t,floating:e}});a=y??a,d=v??d,u={...u,[p]:{...u[p],...b}},x&&h<=50&&(h++,typeof x=="object"&&(x.placement&&(m=x.placement),x.rects&&(l=x.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):x.rects),{x:a,y:d}=Et(l,m,f)),g=-1)}return{x:a,y:d,placement:m,strategy:i,middlewareData:u}};async function Z(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:r,rects:s,elements:c,strategy:f}=t,{boundary:l="clippingAncestors",rootBoundary:a="viewport",elementContext:d="floating",altBoundary:m=!1,padding:u=0}=q(e,t),h=Wt(u),p=c[m?d==="floating"?"reference":"floating":d],w=lt(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(p)))==null||n?p:p.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:l,rootBoundary:a,strategy:f})),y=d==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,v=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),b=await(r.isElement==null?void 0:r.isElement(v))?await(r.getScale==null?void 0:r.getScale(v))||{x:1,y:1}:{x:1,y:1},x=lt(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:v,strategy:f}):y);return{top:(w.top-x.top+h.top)/b.y,bottom:(x.bottom-w.bottom+h.bottom)/b.y,left:(w.left-x.left+h.left)/b.x,right:(x.right-w.right+h.right)/b.x}}const ie=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:r,platform:s,elements:c,middlewareData:f}=e,{element:l,padding:a=0}=q(t,e)||{};if(l==null)return{};const d=Wt(a),m={x:n,y:o},u=At(i),h=bt(u),g=await s.getDimensions(l),p=u==="y",w=p?"top":"left",y=p?"bottom":"right",v=p?"clientHeight":"clientWidth",b=r.reference[h]+r.reference[u]-m[u]-r.floating[h],x=m[u]-r.reference[u],O=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let R=O?O[v]:0;(!R||!await(s.isElement==null?void 0:s.isElement(O)))&&(R=c.floating[v]||r.floating[h]);const T=b/2-x/2,B=R/2-g[h]/2-1,E=K(d[w],B),H=K(d[y],B),F=E,P=R-g[h]-H,M=R/2-g[h]/2+T,k=pt(F,M,P),S=!f.arrow&&et(i)!=null&&M!==k&&r.reference[h]/2-(M<F?E:H)-g[h]/2<0,N=S?M<F?M-F:M-P:0;return{[u]:m[u]+N,data:{[u]:k,centerOffset:M-k-N,...S&&{alignmentOffset:N}},reset:S}}}),re=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:f,elements:l}=e,{mainAxis:a=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...p}=q(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const w=X(i),y=Y(c),v=X(c)===c,b=await(f.isRTL==null?void 0:f.isRTL(l.floating)),x=m||(v||!g?[ct(c)]:Zt(c)),O=h!=="none";!m&&O&&x.push(...ee(c,g,h,b));const R=[c,...x],T=await Z(e,p),B=[];let E=((o=r.flip)==null?void 0:o.overflows)||[];if(a&&B.push(T[w]),d){const k=Qt(i,s,b);B.push(T[k[0]],T[k[1]])}if(E=[...E,{placement:i,overflows:B}],!B.every(k=>k<=0)){var H,F;const k=(((H=r.flip)==null?void 0:H.index)||0)+1,S=R[k];if(S){var P;const A=d==="alignment"?y!==Y(S):!1,D=((P=E[0])==null?void 0:P.overflows[0])>0;if(!A||D)return{data:{index:k,overflows:E},reset:{placement:S}}}let N=(F=E.filter(A=>A.overflows[0]<=0).sort((A,D)=>A.overflows[1]-D.overflows[1])[0])==null?void 0:F.placement;if(!N)switch(u){case"bestFit":{var M;const A=(M=E.filter(D=>{if(O){const L=Y(D.placement);return L===y||L==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(L=>L>0).reduce((L,It)=>L+It,0)]).sort((D,L)=>D[1]-L[1])[0])==null?void 0:M[0];A&&(N=A);break}case"initialPlacement":N=c;break}if(i!==N)return{reset:{placement:N}}}return{}}}};function St(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Dt(t){return Kt.some(e=>t[e]>=0)}const se=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:o="referenceHidden",...i}=q(t,e);switch(o){case"referenceHidden":{const r=await Z(e,{...i,elementContext:"reference"}),s=St(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Dt(s)}}}case"escaped":{const r=await Z(e,{...i,altBoundary:!0}),s=St(r,n.floating);return{data:{escapedOffsets:s,escaped:Dt(s)}}}default:return{}}}}};async function ce(t,e){const{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=X(n),c=et(n),f=Y(n)==="y",l=["left","top"].includes(s)?-1:1,a=r&&f?-1:1,d=q(e,t);let{mainAxis:m,crossAxis:u,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&typeof h=="number"&&(u=c==="end"?h*-1:h),f?{x:u*a,y:m*l}:{x:m*l,y:u*a}}const le=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:s,middlewareData:c}=e,f=await ce(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+f.x,y:r+f.y,data:{...f,placement:s}}}}},fe=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:c={fn:p=>{let{x:w,y}=p;return{x:w,y}}},...f}=q(t,e),l={x:n,y:o},a=await Z(e,f),d=Y(X(i)),m=vt(d);let u=l[m],h=l[d];if(r){const p=m==="y"?"top":"left",w=m==="y"?"bottom":"right",y=u+a[p],v=u-a[w];u=pt(y,u,v)}if(s){const p=d==="y"?"top":"left",w=d==="y"?"bottom":"right",y=h+a[p],v=h-a[w];h=pt(y,h,v)}const g=c.fn({...e,[m]:u,[d]:h});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[m]:r,[d]:s}}}}}},ae=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:i,rects:r,middlewareData:s}=e,{offset:c=0,mainAxis:f=!0,crossAxis:l=!0}=q(t,e),a={x:n,y:o},d=Y(i),m=vt(d);let u=a[m],h=a[d];const g=q(c,e),p=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(f){const v=m==="y"?"height":"width",b=r.reference[m]-r.floating[v]+p.mainAxis,x=r.reference[m]+r.reference[v]-p.mainAxis;u<b?u=b:u>x&&(u=x)}if(l){var w,y;const v=m==="y"?"width":"height",b=["top","left"].includes(X(i)),x=r.reference[d]-r.floating[v]+(b&&((w=s.offset)==null?void 0:w[d])||0)+(b?0:p.crossAxis),O=r.reference[d]+r.reference[v]+(b?0:((y=s.offset)==null?void 0:y[d])||0)-(b?p.crossAxis:0);h<x?h=x:h>O&&(h=O)}return{[m]:u,[d]:h}}}},ue=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:r,platform:s,elements:c}=e,{apply:f=()=>{},...l}=q(t,e),a=await Z(e,l),d=X(i),m=et(i),u=Y(i)==="y",{width:h,height:g}=r.floating;let p,w;d==="top"||d==="bottom"?(p=d,w=m===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(w=d,p=m==="end"?"top":"bottom");const y=g-a.top-a.bottom,v=h-a.left-a.right,b=K(g-a[p],y),x=K(h-a[w],v),O=!e.middlewareData.shift;let R=b,T=x;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(T=v),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(R=y),O&&!m){const E=$(a.left,0),H=$(a.right,0),F=$(a.top,0),P=$(a.bottom,0);u?T=h-2*(E!==0||H!==0?E+H:$(a.left,a.right)):R=g-2*(F!==0||P!==0?F+P:$(a.top,a.bottom))}await f({...e,availableWidth:T,availableHeight:R});const B=await s.getDimensions(c.floating);return h!==B.width||g!==B.height?{reset:{rects:!0}}:{}}}};function Bt(t){const e=_(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=j(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,c=st(n)!==r||st(o)!==s;return c&&(n=r,o=s),{width:n,height:o,$:c}}function Rt(t){return V(t)?t:t.contextElement}function J(t){const e=Rt(t);if(!j(e))return z(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=Bt(e);let s=(r?st(n.width):n.width)/o,c=(r?st(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const de=z(0);function Ht(t){const e=W(t);return!yt()||!e.visualViewport?de:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function me(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==W(t)?!1:e}function G(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=Rt(t);let s=z(1);e&&(o?V(o)&&(s=J(o)):s=J(t));const c=me(r,n,o)?Ht(r):z(0);let f=(i.left+c.x)/s.x,l=(i.top+c.y)/s.y,a=i.width/s.x,d=i.height/s.y;if(r){const m=W(r),u=o&&V(o)?W(o):o;let h=m,g=gt(h);for(;g&&o&&u!==h;){const p=J(g),w=g.getBoundingClientRect(),y=_(g),v=w.left+(g.clientLeft+parseFloat(y.paddingLeft))*p.x,b=w.top+(g.clientTop+parseFloat(y.paddingTop))*p.y;f*=p.x,l*=p.y,a*=p.x,d*=p.y,f+=v,l+=b,h=W(g),g=gt(h)}}return lt({width:a,height:d,x:f,y:l})}function Ot(t,e){const n=dt(t).scrollLeft;return e?e.left+n:G(I(t)).left+n}function Nt(t,e,n){n===void 0&&(n=!1);const o=t.getBoundingClientRect(),i=o.left+e.scrollLeft-(n?0:Ot(t,o)),r=o.top+e.scrollTop;return{x:i,y:r}}function he(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i==="fixed",s=I(o),c=e?ut(e.floating):!1;if(o===s||c&&r)return n;let f={scrollLeft:0,scrollTop:0},l=z(1);const a=z(0),d=j(o);if((d||!d&&!r)&&((tt(o)!=="body"||ot(s))&&(f=dt(o)),j(o))){const u=G(o);l=J(o),a.x=u.x+o.clientLeft,a.y=u.y+o.clientTop}const m=s&&!d&&!r?Nt(s,f,!0):z(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-f.scrollLeft*l.x+a.x+m.x,y:n.y*l.y-f.scrollTop*l.y+a.y+m.y}}function ge(t){return Array.from(t.getClientRects())}function pe(t){const e=I(t),n=dt(t),o=t.ownerDocument.body,i=$(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=$(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Ot(t);const c=-n.scrollTop;return _(o).direction==="rtl"&&(s+=$(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:c}}function we(t,e){const n=W(t),o=I(t),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,c=0,f=0;if(i){r=i.width,s=i.height;const l=yt();(!l||l&&e==="fixed")&&(c=i.offsetLeft,f=i.offsetTop)}return{width:r,height:s,x:c,y:f}}function xe(t,e){const n=G(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=j(t)?J(t):z(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,f=i*r.x,l=o*r.y;return{width:s,height:c,x:f,y:l}}function Lt(t,e,n){let o;if(e==="viewport")o=we(t,n);else if(e==="document")o=pe(I(t));else if(V(e))o=xe(e,n);else{const i=Ht(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return lt(o)}function Vt(t,e){const n=U(t);return n===e||!V(n)||Q(n)?!1:_(n).position==="fixed"||Vt(n,e)}function ye(t,e){const n=e.get(t);if(n)return n;let o=nt(t,[],!1).filter(c=>V(c)&&tt(c)!=="body"),i=null;const r=_(t).position==="fixed";let s=r?U(t):t;for(;V(s)&&!Q(s);){const c=_(s),f=xt(s);!f&&c.position==="fixed"&&(i=null),(r?!f&&!i:!f&&c.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||ot(s)&&!f&&Vt(t,s))?o=o.filter(a=>a!==s):i=c,s=U(s)}return e.set(t,o),o}function ve(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const s=[...n==="clippingAncestors"?ut(e)?[]:ye(e,this._c):[].concat(n),o],c=s[0],f=s.reduce((l,a)=>{const d=Lt(e,a,i);return l.top=$(d.top,l.top),l.right=K(d.right,l.right),l.bottom=K(d.bottom,l.bottom),l.left=$(d.left,l.left),l},Lt(e,c,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function be(t){const{width:e,height:n}=Bt(t);return{width:e,height:n}}function Ae(t,e,n){const o=j(e),i=I(e),r=n==="fixed",s=G(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const f=z(0);function l(){f.x=Ot(i)}if(o||!o&&!r)if((tt(e)!=="body"||ot(i))&&(c=dt(e)),o){const u=G(e,!0,r,e);f.x=u.x+e.clientLeft,f.y=u.y+e.clientTop}else i&&l();r&&!o&&i&&l();const a=i&&!o&&!r?Nt(i,c):z(0),d=s.left+c.scrollLeft-f.x-a.x,m=s.top+c.scrollTop-f.y-a.y;return{x:d,y:m,width:s.width,height:s.height}}function mt(t){return _(t).position==="static"}function Tt(t,e){if(!j(t)||_(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return I(t)===n&&(n=n.ownerDocument.body),n}function _t(t,e){const n=W(t);if(ut(t))return n;if(!j(t)){let i=U(t);for(;i&&!Q(i);){if(V(i)&&!mt(i))return i;i=U(i)}return n}let o=Tt(t,e);for(;o&&Xt(o)&&mt(o);)o=Tt(o,e);return o&&Q(o)&&mt(o)&&!xt(o)?n:o||Ut(t)||n}const Re=async function(t){const e=this.getOffsetParent||_t,n=this.getDimensions,o=await n(t.floating);return{reference:Ae(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Oe(t){return _(t).direction==="rtl"}const Ce={convertOffsetParentRelativeRectToViewportRelativeRect:he,getDocumentElement:I,getClippingRect:ve,getOffsetParent:_t,getElementRects:Re,getClientRects:ge,getDimensions:be,getScale:J,isElement:V,isRTL:Oe};function zt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Ee(t,e){let n=null,o;const i=I(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),r();const l=t.getBoundingClientRect(),{left:a,top:d,width:m,height:u}=l;if(c||e(),!m||!u)return;const h=it(d),g=it(i.clientWidth-(a+m)),p=it(i.clientHeight-(d+u)),w=it(a),v={rootMargin:-h+"px "+-g+"px "+-p+"px "+-w+"px",threshold:$(0,K(1,f))||1};let b=!0;function x(O){const R=O[0].intersectionRatio;if(R!==f){if(!b)return s();R?s(!1,R):o=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!zt(l,t.getBoundingClientRect())&&s(),b=!1}try{n=new IntersectionObserver(x,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,v)}n.observe(t)}return s(!0),r}function Be(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=o,l=Rt(t),a=i||r?[...l?nt(l):[],...nt(e)]:[];a.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),r&&w.addEventListener("resize",n)});const d=l&&c?Ee(l,n):null;let m=-1,u=null;s&&(u=new ResizeObserver(w=>{let[y]=w;y&&y.target===l&&u&&(u.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var v;(v=u)==null||v.observe(e)})),n()}),l&&!f&&u.observe(l),u.observe(e));let h,g=f?G(t):null;f&&p();function p(){const w=G(t);g&&!zt(g,w)&&n(),g=w,h=requestAnimationFrame(p)}return n(),()=>{var w;a.forEach(y=>{i&&y.removeEventListener("scroll",n),r&&y.removeEventListener("resize",n)}),d==null||d(),(w=u)==null||w.disconnect(),u=null,f&&cancelAnimationFrame(h)}}const He=Z,Se=le,De=fe,Le=re,Te=ue,Pe=se,Pt=ie,Me=ae,ke=(t,e,n)=>{const o=new Map,i={platform:Ce,...n},r={...i.platform,_c:o};return oe(t,e,{...i,platform:r})};var rt=typeof document<"u"?C.useLayoutEffect:C.useEffect;function ft(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!ft(t[o],e[o]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,i[o]))return!1;for(o=n;o--!==0;){const r=i[o];if(!(r==="_owner"&&t.$$typeof)&&!ft(t[r],e[r]))return!1}return!0}return t!==t&&e!==e}function jt(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Mt(t,e){const n=jt(t);return Math.round(e*n)/n}function ht(t){const e=C.useRef(t);return rt(()=>{e.current=t}),e}function Ne(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:r,floating:s}={},transform:c=!0,whileElementsMounted:f,open:l}=t,[a,d]=C.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,u]=C.useState(o);ft(m,o)||u(o);const[h,g]=C.useState(null),[p,w]=C.useState(null),y=C.useCallback(A=>{A!==O.current&&(O.current=A,g(A))},[]),v=C.useCallback(A=>{A!==R.current&&(R.current=A,w(A))},[]),b=r||h,x=s||p,O=C.useRef(null),R=C.useRef(null),T=C.useRef(a),B=f!=null,E=ht(f),H=ht(i),F=ht(l),P=C.useCallback(()=>{if(!O.current||!R.current)return;const A={placement:e,strategy:n,middleware:m};H.current&&(A.platform=H.current),ke(O.current,R.current,A).then(D=>{const L={...D,isPositioned:F.current!==!1};M.current&&!ft(T.current,L)&&(T.current=L,kt.flushSync(()=>{d(L)}))})},[m,e,n,H,F]);rt(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(A=>({...A,isPositioned:!1})))},[l]);const M=C.useRef(!1);rt(()=>(M.current=!0,()=>{M.current=!1}),[]),rt(()=>{if(b&&(O.current=b),x&&(R.current=x),b&&x){if(E.current)return E.current(b,x,P);P()}},[b,x,P,E,B]);const k=C.useMemo(()=>({reference:O,floating:R,setReference:y,setFloating:v}),[y,v]),S=C.useMemo(()=>({reference:b,floating:x}),[b,x]),N=C.useMemo(()=>{const A={position:n,left:0,top:0};if(!S.floating)return A;const D=Mt(S.floating,a.x),L=Mt(S.floating,a.y);return c?{...A,transform:"translate("+D+"px, "+L+"px)",...jt(S.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:D,top:L}},[n,c,S.floating,a.x,a.y]);return C.useMemo(()=>({...a,update:P,refs:k,elements:S,floatingStyles:N}),[a,P,k,S,N])}const Fe=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:o,padding:i}=typeof t=="function"?t(n):t;return o&&e(o)?o.current!=null?Pt({element:o.current,padding:i}).fn(n):{}:o?Pt({element:o,padding:i}).fn(n):{}}}},Ve=(t,e)=>({...Se(t),options:[t,e]}),_e=(t,e)=>({...De(t),options:[t,e]}),ze=(t,e)=>({...Me(t),options:[t,e]}),je=(t,e)=>({...Le(t),options:[t,e]}),Ie=(t,e)=>({...Te(t),options:[t,e]}),Ye=(t,e)=>({...Pe(t),options:[t,e]}),qe=(t,e)=>({...Fe(t),options:[t,e]});export{We as R,Ie as a,qe as b,Be as c,He as d,q as e,je as f,st as g,Ye as h,V as i,K as j,ze as l,$ as m,Ve as o,kt as r,_e as s,Ne as u};
@@ -1,4 +1,4 @@
1
- import{r as I,j as w,g as le,c as X,i as Fe,l as xe,v as de}from"./index-5Y4x4i40.js";import{u as $e}from"./index-uNgE_frb.js";import{r as Ve,s as Me,t as Pe,I as se}from"./Input-dVgdocrC.js";/**
1
+ import{r as I,j as w,g as le,c as X,i as Fe,l as xe,v as de}from"./index-D0B238GC.js";import{u as $e}from"./index-0HTVGXbP.js";import{r as Ve,s as Me,t as Pe,I as se}from"./Input-DQ3H5Jf5.js";/**
2
2
  * table-core
3
3
  *
4
4
  * Copyright (c) TanStack
@@ -1,4 +1,4 @@
1
- import{r as x}from"./index-5Y4x4i40.js";import{r as C}from"./floating-ui.react-dom-CRENXhNN.js";function p(r,l,e){let s=e.initialDeps??[],t;function n(){var i,o,a,c;let h;e.key&&((i=e.debug)!=null&&i.call(e))&&(h=Date.now());const u=r();if(!(u.length!==s.length||u.some((m,f)=>s[f]!==m)))return t;s=u;let v;if(e.key&&((o=e.debug)!=null&&o.call(e))&&(v=Date.now()),t=l(...u),e.key&&((a=e.debug)!=null&&a.call(e))){const m=Math.round((Date.now()-h)*100)/100,f=Math.round((Date.now()-v)*100)/100,S=f/16,b=(g,O)=>{for(g=String(g);g.length<O;)g=" "+g;return g};console.info(`%c⏱ ${b(f,5)} /${b(m,5)} ms`,`
1
+ import{r as x}from"./index-D0B238GC.js";import{r as C}from"./floating-ui.react-dom-njuatPE_.js";function p(r,l,e){let s=e.initialDeps??[],t;function n(){var i,o,a,c;let h;e.key&&((i=e.debug)!=null&&i.call(e))&&(h=Date.now());const u=r();if(!(u.length!==s.length||u.some((m,f)=>s[f]!==m)))return t;s=u;let v;if(e.key&&((o=e.debug)!=null&&o.call(e))&&(v=Date.now()),t=l(...u),e.key&&((a=e.debug)!=null&&a.call(e))){const m=Math.round((Date.now()-h)*100)/100,f=Math.round((Date.now()-v)*100)/100,S=f/16,b=(g,O)=>{for(g=String(g);g.length<O;)g=" "+g;return g};console.info(`%c⏱ ${b(f,5)} /${b(m,5)} ms`,`
2
2
  font-size: .6rem;
3
3
  font-weight: bold;
4
4
  color: hsl(${Math.max(0,Math.min(120-120*S,120))}deg 100% 31%);`,e==null?void 0:e.key)}return(c=e==null?void 0:e.onChange)==null||c.call(e,t),t}return n.updateDeps=i=>{s=i},n}function M(r,l){if(r===void 0)throw new Error("Unexpected undefined");return r}const T=(r,l)=>Math.abs(r-l)<=1,R=(r,l,e)=>{let s;return function(...t){r.clearTimeout(s),s=r.setTimeout(()=>l.apply(this,t),e)}},y=r=>{const{offsetWidth:l,offsetHeight:e}=r;return{width:l,height:e}},_=r=>r,A=r=>{const l=Math.max(r.startIndex-r.overscan,0),e=Math.min(r.endIndex+r.overscan,r.count-1),s=[];for(let t=l;t<=e;t++)s.push(t);return s},D=(r,l)=>{const e=r.scrollElement;if(!e)return;const s=r.targetWindow;if(!s)return;const t=i=>{const{width:o,height:a}=i;l({width:Math.round(o),height:Math.round(a)})};if(t(y(e)),!s.ResizeObserver)return()=>{};const n=new s.ResizeObserver(i=>{const o=()=>{const a=i[0];if(a!=null&&a.borderBoxSize){const c=a.borderBoxSize[0];if(c){t({width:c.inlineSize,height:c.blockSize});return}}t(y(e))};r.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return n.observe(e,{box:"border-box"}),()=>{n.unobserve(e)}},w={passive:!0},I=typeof window>"u"?!0:"onscrollend"in window,k=(r,l)=>{const e=r.scrollElement;if(!e)return;const s=r.targetWindow;if(!s)return;let t=0;const n=r.options.useScrollendEvent&&I?()=>{}:R(s,()=>{l(t,!1)},r.options.isScrollingResetDelay),i=h=>()=>{const{horizontal:u,isRtl:d}=r.options;t=u?e.scrollLeft*(d&&-1||1):e.scrollTop,n(),l(t,h)},o=i(!0),a=i(!1);a(),e.addEventListener("scroll",o,w);const c=r.options.useScrollendEvent&&I;return c&&e.addEventListener("scrollend",a,w),()=>{e.removeEventListener("scroll",o),c&&e.removeEventListener("scrollend",a)}},F=(r,l,e)=>{if(l!=null&&l.borderBoxSize){const s=l.borderBoxSize[0];if(s)return Math.round(s[e.options.horizontal?"inlineSize":"blockSize"])}return r[e.options.horizontal?"offsetWidth":"offsetHeight"]},W=(r,{adjustments:l=0,behavior:e},s)=>{var t,n;const i=r+l;(n=(t=s.scrollElement)==null?void 0:t.scrollTo)==null||n.call(t,{[s.options.horizontal?"left":"top"]:i,behavior:e})};class j{constructor(l){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const s=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(t=>{t.forEach(n=>{const i=()=>{this._measureElement(n.target,n)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()})}));return{disconnect:()=>{var t;(t=s())==null||t.disconnect(),e=null},observe:t=>{var n;return(n=s())==null?void 0:n.observe(t,{box:"border-box"})},unobserve:t=>{var n;return(n=s())==null?void 0:n.unobserve(t)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([s,t])=>{typeof t>"u"&&delete e[s]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:_,rangeExtractor:A,onChange:()=>{},measureElement:F,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var s,t;(t=(s=this.options).onChange)==null||t.call(s,this,e)},this.maybeNotify=p(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const s=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==s){if(this.cleanup(),!s){this.maybeNotify();return}this.scrollElement=s,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((e=this.scrollElement)==null?void 0:e.window)??null,this.elementsCache.forEach(t=>{this.observer.observe(t)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,t=>{this.scrollRect=t,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(t,n)=>{this.scrollAdjustments=0,this.scrollDirection=n?this.getScrollOffset()<t?"forward":"backward":null,this.scrollOffset=t,this.isScrolling=n,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,s)=>{const t=new Map,n=new Map;for(let i=s-1;i>=0;i--){const o=e[i];if(t.has(o.lane))continue;const a=n.get(o.lane);if(a==null||o.end>a.end?n.set(o.lane,o):o.end<a.end&&t.set(o.lane,!0),t.size===this.options.lanes)break}return n.size===this.options.lanes?Array.from(n.values()).sort((i,o)=>i.end===o.end?i.index-o.index:i.end-o.end)[0]:void 0},this.getMeasurementOptions=p(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,s,t,n,i)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:s,scrollMargin:t,getItemKey:n,enabled:i}),{key:!1}),this.getMeasurements=p(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:s,scrollMargin:t,getItemKey:n,enabled:i},o)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));const a=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,a);for(let h=a;h<e;h++){const u=n(h),d=this.options.lanes===1?c[h-1]:this.getFurthestMeasurement(c,h),v=d?d.end+this.options.gap:s+t,m=o.get(u),f=typeof m=="number"?m:this.options.estimateSize(h),S=v+f,b=d?d.lane:h%this.options.lanes;c[h]={index:h,start:v,size:f,end:S,key:u,lane:b}}return this.measurementsCache=c,c},{key:!1,debug:()=>this.options.debug}),this.calculateRange=p(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,s,t,n)=>this.range=e.length>0&&s>0?L({measurements:e,outerSize:s,scrollOffset:t,lanes:n}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=p(()=>{let e=null,s=null;const t=this.calculateRange();return t&&(e=t.startIndex,s=t.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,s]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,s]},(e,s,t,n,i)=>n===null||i===null?[]:e({startIndex:n,endIndex:i,overscan:s,count:t}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const s=this.options.indexAttribute,t=e.getAttribute(s);return t?parseInt(t,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this._measureElement=(e,s)=>{const t=this.indexFromElement(e),n=this.measurementsCache[t];if(!n)return;const i=n.key,o=this.elementsCache.get(i);o!==e&&(o&&this.observer.unobserve(o),this.observer.observe(e),this.elementsCache.set(i,e)),e.isConnected&&this.resizeItem(t,this.options.measureElement(e,s,this))},this.resizeItem=(e,s)=>{const t=this.measurementsCache[e];if(!t)return;const n=this.itemSizeCache.get(t.key)??t.size,i=s-n;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(t,i,this):t.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(t.index),this.itemSizeCache=new Map(this.itemSizeCache.set(t.key,s)),this.notify(!1))},this.measureElement=e=>{if(!e){this.elementsCache.forEach((s,t)=>{s.isConnected||(this.observer.unobserve(s),this.elementsCache.delete(t))});return}this._measureElement(e,void 0)},this.getVirtualItems=p(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,s)=>{const t=[];for(let n=0,i=e.length;n<i;n++){const o=e[n],a=s[o];t.push(a)}return t},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const s=this.getMeasurements();if(s.length!==0)return M(s[z(0,s.length-1,t=>M(s[t]).start,e)])},this.getOffsetForAlignment=(e,s,t=0)=>{const n=this.getSize(),i=this.getScrollOffset();s==="auto"&&(s=e>=i+n?"end":"start"),s==="center"?e+=(t-n)/2:s==="end"&&(e-=n);const o=this.getTotalSize()-n;return Math.max(Math.min(o,e),0)},this.getOffsetForIndex=(e,s="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const t=this.measurementsCache[e];if(!t)return;const n=this.getSize(),i=this.getScrollOffset();if(s==="auto")if(t.end>=i+n-this.options.scrollPaddingEnd)s="end";else if(t.start<=i+this.options.scrollPaddingStart)s="start";else return[i,s];const o=s==="end"?t.end+this.options.scrollPaddingEnd:t.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(o,s,t.size),s]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:s="start",behavior:t}={})=>{this.cancelScrollToIndex(),t==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,s),{adjustments:void 0,behavior:t})},this.scrollToIndex=(e,{align:s="auto",behavior:t}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),t==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const n=this.getOffsetForIndex(e,s);if(!n)return;const[i,o]=n;this._scrollToOffset(i,{adjustments:void 0,behavior:t}),t!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(e))){const c=this.getOffsetForIndex(e,o);if(!c)return;const[h]=c,u=this.getScrollOffset();T(h,u)||this.scrollToIndex(e,{align:o,behavior:t})}else this.scrollToIndex(e,{align:o,behavior:t})}))},this.scrollBy=(e,{behavior:s}={})=>{this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:s})},this.getTotalSize=()=>{var e;const s=this.getMeasurements();let t;if(s.length===0)t=this.options.paddingStart;else if(this.options.lanes===1)t=((e=s[s.length-1])==null?void 0:e.end)??0;else{const n=Array(this.options.lanes).fill(null);let i=s.length-1;for(;i>=0&&n.some(o=>o===null);){const o=s[i];n[o.lane]===null&&(n[o.lane]=o.end),i--}t=Math.max(...n.filter(o=>o!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:s,behavior:t})=>{this.options.scrollToFn(e,{behavior:t,adjustments:s},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(l)}}const z=(r,l,e,s)=>{for(;r<=l;){const t=(r+l)/2|0,n=e(t);if(n<s)r=t+1;else if(n>s)l=t-1;else return t}return r>0?r-1:0};function L({measurements:r,outerSize:l,scrollOffset:e,lanes:s}){const t=r.length-1,n=a=>r[a].start;if(r.length<=s)return{startIndex:0,endIndex:t};let i=z(0,t,n,e),o=i;if(s===1)for(;o<t&&r[o].end<e+l;)o++;else if(s>1){const a=Array(s).fill(0);for(;o<t&&a.some(h=>h<e+l);){const h=r[o];a[h.lane]=h.end,o++}const c=Array(s).fill(e+l);for(;i>=0&&c.some(h=>h>=e);){const h=r[i];c[h.lane]=h.start,i--}i=Math.max(0,i-i%s),o=Math.min(t,o+(s-1-o%s))}return{startIndex:i,endIndex:o}}const E=typeof document<"u"?x.useLayoutEffect:x.useEffect;function P(r){const l=x.useReducer(()=>({}),{})[1],e={...r,onChange:(t,n)=>{var i;n?C.flushSync(l):l(),(i=r.onChange)==null||i.call(r,t,n)}},[s]=x.useState(()=>new j(e));return s.setOptions(e),E(()=>s._didMount(),[]),E(()=>s._willUpdate()),s}function N(r){return P({observeElementRect:D,observeElementOffset:k,scrollToFn:W,...r})}export{N as u};