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
- import{r as a,j as e,u as o,c as i,E as r}from"./index-COnjINWU.js";function n({title:l,titleId:t,...s},C){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:C,"aria-labelledby":t},s),l?a.createElement("title",{id:t},l):null,a.createElement("path",{fillRule:"evenodd",d:"M9.528 1.718a.75.75 0 0 1 .162.819A8.97 8.97 0 0 0 9 6a9 9 0 0 0 9 9 8.97 8.97 0 0 0 3.463-.69.75.75 0 0 1 .981.98 10.503 10.503 0 0 1-9.694 6.46c-5.799 0-10.5-4.7-10.5-10.5 0-4.368 2.667-8.112 6.46-9.694a.75.75 0 0 1 .818.162Z",clipRule:"evenodd"}))}const h=a.forwardRef(n);function d({title:l,titleId:t,...s},C){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:C,"aria-labelledby":t},s),l?a.createElement("title",{id:t},l):null,a.createElement("path",{d:"M12 2.25a.75.75 0 0 1 .75.75v2.25a.75.75 0 0 1-1.5 0V3a.75.75 0 0 1 .75-.75ZM7.5 12a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM18.894 6.166a.75.75 0 0 0-1.06-1.06l-1.591 1.59a.75.75 0 1 0 1.06 1.061l1.591-1.59ZM21.75 12a.75.75 0 0 1-.75.75h-2.25a.75.75 0 0 1 0-1.5H21a.75.75 0 0 1 .75.75ZM17.834 18.894a.75.75 0 0 0 1.06-1.06l-1.59-1.591a.75.75 0 1 0-1.061 1.06l1.59 1.591ZM12 18a.75.75 0 0 1 .75.75V21a.75.75 0 0 1-1.5 0v-2.25A.75.75 0 0 1 12 18ZM7.758 17.303a.75.75 0 0 0-1.061-1.06l-1.591 1.59a.75.75 0 0 0 1.06 1.061l1.591-1.59ZM6 12a.75.75 0 0 1-.75.75H3a.75.75 0 0 1 0-1.5h2.25A.75.75 0 0 1 6 12ZM6.697 7.757a.75.75 0 0 0 1.06-1.06l-1.59-1.591a.75.75 0 0 0-1.061 1.06l1.59 1.591Z"}))}const c=a.forwardRef(d);function x({style:l,className:t}){return e.jsxs("svg",{style:l,className:t,role:"img","aria-labelledby":"tobikoDataTitle",viewBox:"0 0 194 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("title",{id:"tobikoDataTitle",children:"Tobiko Data logo"}),e.jsx("path",{d:"M99.6773 18.8812H90.4835V43H85.3891V18.8812H76.1953V14.4236H99.6773V18.8812ZM116.433 32.5724C116.433 39.0598 112.254 43.4378 106.364 43.4378C100.473 43.4378 96.2943 39.0598 96.2943 32.5724C96.2943 26.085 100.473 21.707 106.364 21.707C112.254 21.707 116.433 26.085 116.433 32.5724ZM101.11 32.5724C101.11 36.831 103.14 39.418 106.364 39.418C109.587 39.418 111.617 36.831 111.617 32.5724C111.617 28.3138 109.587 25.7268 106.364 25.7268C103.14 25.7268 101.11 28.3138 101.11 32.5724ZM130.538 43.4378C127.832 43.4378 125.842 42.3632 124.529 40.811V43H119.753V14.4236H124.529V24.3338C125.842 22.7816 127.832 21.707 130.538 21.707C136.389 21.707 139.732 26.6422 139.732 32.5724C139.732 38.5026 136.389 43.4378 130.538 43.4378ZM124.409 31.9754V33.2092C124.409 37.0698 126.638 39.2588 129.583 39.2588C133.046 39.2588 134.916 36.5524 134.916 32.5724C134.916 28.5924 133.046 25.886 129.583 25.886C126.638 25.886 124.409 28.0352 124.409 31.9754ZM142.945 19.319V14.4236H147.88V19.319H142.945ZM147.801 22.105V43H143.025V22.105H147.801ZM157.197 14.4236V30.9008L165.237 22.105H171.088L163.207 30.2242L171.724 43H166.192L159.944 33.5674L157.197 36.3534V43H152.421V14.4236H157.197ZM191.565 32.5724C191.565 39.0598 187.386 43.4378 181.496 43.4378C175.605 43.4378 171.426 39.0598 171.426 32.5724C171.426 26.085 175.605 21.707 181.496 21.707C187.386 21.707 191.565 26.085 191.565 32.5724ZM176.242 32.5724C176.242 36.831 178.272 39.418 181.496 39.418C184.719 39.418 186.749 36.831 186.749 32.5724C186.749 28.3138 184.719 25.7268 181.496 25.7268C178.272 25.7268 176.242 28.3138 176.242 32.5724Z",fill:"#0D0D0D",className:"fill-prose"}),e.jsx("path",{d:"M7.59874 35.2C11.5752 35.2 14.7987 31.9765 14.7987 28C14.7987 24.0236 11.5752 20.8 7.59874 20.8C3.62229 20.8 0.398743 24.0236 0.398743 28C0.398743 31.9765 3.62229 35.2 7.59874 35.2Z",fill:"#F74808"}),e.jsx("path",{d:"M10.7992 15.2928C14.378 15.2928 17.2792 12.3916 17.2792 8.81276C17.2792 5.23397 14.378 2.33276 10.7992 2.33276C7.22041 2.33276 4.31921 5.23397 4.31921 8.81276C4.31921 12.3916 7.22041 15.2928 10.7992 15.2928Z",fill:"#F74808"}),e.jsx("path",{d:"M10.7992 53.6929C14.378 53.6929 17.2792 50.7917 17.2792 47.2129C17.2792 43.6341 14.378 40.7329 10.7992 40.7329C7.22041 40.7329 4.31921 43.6341 4.31921 47.2129C4.31921 50.7917 7.22041 53.6929 10.7992 53.6929Z",fill:"#F74808"}),e.jsx("path",{d:"M36.2016 28C36.2016 31.9765 32.978 35.2 29.0016 35.2C25.0251 35.2 21.8016 31.9765 21.8016 28C21.8016 24.0236 25.0251 20.8 29.0016 20.8C32.978 20.8 36.2016 24.0236 36.2016 28Z",fill:"#F74808"}),e.jsx("path",{d:"M36.2016 7.2C36.2016 11.1764 32.978 14.4 29.0016 14.4C25.0251 14.4 21.8016 11.1764 21.8016 7.2C21.8016 3.22356 25.0251 0 29.0016 0C32.978 0 36.2016 3.22356 36.2016 7.2Z",fill:"#F74808"}),e.jsx("path",{d:"M36.2016 48.7999C36.2016 52.7763 32.978 55.9999 29.0016 55.9999C25.0251 55.9999 21.8016 52.7763 21.8016 48.7999C21.8016 44.8234 25.0251 41.5999 29.0016 41.5999C32.978 41.5999 36.2016 44.8234 36.2016 48.7999Z",fill:"#F74808"}),e.jsx("path",{d:"M50.4054 35.2C54.3818 35.2 57.6054 31.9765 57.6054 28C57.6054 24.0236 54.3818 20.8 50.4054 20.8C46.4289 20.8 43.2054 24.0236 43.2054 28C43.2054 31.9765 46.4289 35.2 50.4054 35.2Z",fill:"#F74808"}),e.jsx("path",{d:"M47.2053 15.2928C50.7841 15.2928 53.6853 12.3916 53.6853 8.81276C53.6853 5.23397 50.7841 2.33276 47.2053 2.33276C43.6265 2.33276 40.7253 5.23397 40.7253 8.81276C40.7253 12.3916 43.6265 15.2928 47.2053 15.2928Z",fill:"#F74808"}),e.jsx("path",{d:"M47.2053 53.6929C50.7841 53.6929 53.6853 50.7917 53.6853 47.2129C53.6853 43.6341 50.7841 40.7329 47.2053 40.7329C43.6265 40.7329 40.7253 43.6341 40.7253 47.2129C40.7253 50.7917 43.6265 53.6929 47.2053 53.6929Z",fill:"#F74808"})]})}const m=a.memo(x);function M({style:l,className:t}){return e.jsxs("svg",{style:l,className:t,viewBox:"0 0 246 56",fill:"none",role:"img","aria-labelledby":"sqlmeshTitle",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("title",{id:"sqlmeshTitle",children:"SQLMesh logo"}),e.jsx("path",{d:"M75.6874 37.4246L79.5901 34.1988C81.5814 37.3051 84.5682 39.0972 87.8338 39.0972C91.0595 39.0972 93.4888 37.6237 93.4888 34.8758C93.4888 31.9687 90.502 31.5704 86.2408 30.535C81.9398 29.4996 77.3202 28.2252 77.3202 22.6498C77.3202 17.3531 81.8601 13.9681 87.6346 13.9681C92.533 13.9681 96.3562 16.2779 98.2677 19.2647L94.5243 22.4905C92.9313 20.0214 90.8206 18.3089 87.4754 18.3089C84.4089 18.3089 82.2982 19.8621 82.2982 22.1321C82.2982 24.641 84.4885 25.1587 88.3515 26.0348C92.9711 27.0703 98.5067 28.1455 98.5067 34.3581C98.5067 39.9734 93.5685 43.4381 87.6745 43.4381C82.7761 43.4381 77.9175 41.0884 75.6874 37.4246ZM100.213 28.7031C100.213 20.0214 105.788 13.9681 113.514 13.9681C121.24 13.9681 126.816 20.0214 126.816 28.7031C126.816 34.0395 124.705 38.3804 121.28 40.969C122.435 42.4823 124.386 43.6372 126.656 44.1947L123.709 47.8187C121.081 47.0621 118.413 45.1107 117.218 42.9204C116.063 43.2788 114.828 43.4381 113.514 43.4381C105.788 43.4381 100.213 37.3848 100.213 28.7031ZM121.718 28.7031C121.718 22.4905 118.333 18.4682 113.514 18.4682C108.695 18.4682 105.31 22.4905 105.31 28.7031C105.31 34.9157 108.695 38.9379 113.514 38.9379C118.333 38.9379 121.718 34.9157 121.718 28.7031ZM130.379 43V14.4061H135.476V38.5397H148.937V43H130.379ZM168.205 43H164.063L156.576 20.8975V43H151.837V14.4061H158.846L166.214 36.3095L173.581 14.4061H180.431V43H175.692V20.8975L168.205 43ZM194.071 43.4381C188.098 43.4381 183.916 39.0176 183.916 32.566C183.916 26.4331 188.058 21.694 193.872 21.694C199.926 21.694 203.151 26.2738 203.151 32.0085V33.6015H188.496C188.854 37.1856 191.005 39.376 194.071 39.376C196.421 39.376 198.293 38.1813 198.93 36.0307L203.032 37.5839C201.558 41.2477 198.253 43.4381 194.071 43.4381ZM193.832 25.7162C191.363 25.7162 189.452 27.1897 188.735 30.0173H198.333C198.293 27.7075 196.859 25.7162 193.832 25.7162ZM204.148 39.0176L207.733 36.1502C208.967 38.1813 211.357 39.5353 213.786 39.5353C215.817 39.5353 217.689 38.8184 217.689 36.9467C217.689 35.1546 215.936 34.9555 212.631 34.2785C209.326 33.6015 205.542 32.7652 205.542 28.3048C205.542 24.4817 208.888 21.694 213.706 21.694C217.37 21.694 220.636 23.3268 222.149 25.6366L218.923 28.5438C217.729 26.672 215.737 25.5968 213.428 25.5968C211.476 25.5968 210.202 26.4729 210.202 27.8668C210.202 29.3801 211.715 29.6589 214.343 30.2164C217.888 30.9731 222.348 31.7297 222.348 36.5086C222.348 40.73 218.485 43.4381 213.746 43.4381C209.883 43.4381 206.02 41.8849 204.148 39.0176ZM225.619 43V14.4061H230.398V24.3224C231.593 22.9285 233.465 21.694 236.173 21.694C240.553 21.694 243.182 24.7206 243.182 29.2208V43H238.403V30.6146C238.403 28.0261 237.368 26.1543 234.739 26.1543C232.589 26.1543 230.398 27.7473 230.398 30.7341V43H225.619Z",fill:"#0D0D0D",className:"fill-prose"}),e.jsx("path",{opacity:"0.2",d:"M29.1758 28.2007V15.7497C29.1758 9.83436 24.3135 5.03906 18.3983 5.03906V5.03906C12.483 5.03906 7.62072 9.83436 7.62072 15.7496V26.7064",stroke:"#0830F7",strokeWidth:"4.30769"}),e.jsx("path",{opacity:"0.4",d:"M50.5964 28.2007V15.7497C50.5964 9.83436 45.8011 5.03906 39.8858 5.03906H18.3308C12.4155 5.03906 7.6202 9.83436 7.6202 15.7496V26.7064",stroke:"#0830F7",strokeWidth:"4.30769"}),e.jsx("path",{d:"M29.0398 27.7988V40.2499C29.0398 46.1651 33.902 50.9604 39.8173 50.9604V50.9604C45.7326 50.9604 50.5949 46.1652 50.5949 40.2499V29.2931",stroke:"#0830F7",strokeWidth:"4.30769"}),e.jsx("path",{opacity:"0.2",d:"M7.61914 27.799V40.2501C7.61914 46.1654 12.4144 50.9607 18.3297 50.9607H39.8848C45.8001 50.9607 50.5954 46.1654 50.5954 40.2501V29.2933",stroke:"#0830F7",strokeWidth:"4.30769"}),e.jsx("path",{d:"M7.61972 35.1497C11.6126 35.1497 14.8496 31.9129 14.8496 27.9201C14.8496 23.9273 11.6126 20.6904 7.61972 20.6904C3.6268 20.6904 0.389893 23.9273 0.389893 27.9201C0.389893 31.9129 3.6268 35.1497 7.61972 35.1497Z",fill:"#0830F7"}),e.jsx("path",{d:"M36.3908 27.9201C36.3908 31.9129 33.1539 35.1497 29.161 35.1497C25.1681 35.1497 21.9312 31.9129 21.9312 27.9201C21.9312 23.9273 25.1681 20.6904 29.161 20.6904C33.1539 20.6904 36.3908 23.9273 36.3908 27.9201Z",fill:"#0830F7"}),e.jsx("path",{d:"M50.5958 35.1497C54.5887 35.1497 57.8256 31.9129 57.8256 27.9201C57.8256 23.9273 54.5887 20.6904 50.5958 20.6904C46.6029 20.6904 43.366 23.9273 43.366 27.9201C43.366 31.9129 46.6029 35.1497 50.5958 35.1497Z",fill:"#0830F7"})]})}const f=a.memo(M);function j(){const{mode:l,toggleColorScheme:t}=o(),s=l===r.Light?h:c;return e.jsxs("header",{className:"min-h-[2rem] px-2 flex justify-between items-center",children:[e.jsxs("div",{className:"flex h-full items-center",children:[e.jsx("a",{href:"/",title:"Home",children:e.jsx(f,{style:{height:"20px"},mode:l})}),e.jsx("span",{className:"inline-block mx-1.5 text-xs font-bold pt-[3px]",children:"by"}),e.jsx("a",{href:"https://tobikodata.com/",target:"_blank",rel:"noopener noreferrer",title:"Tobiko Data website",children:e.jsx(m,{style:{height:"20px"},mode:l})})]}),e.jsxs("div",{className:"flex items-center",children:[e.jsx("nav",{children:e.jsx("ul",{className:"flex items-center",children:e.jsx("li",{className:"px-2",children:e.jsx("a",{href:"http://sqlmesh.readthedocs.io/en/stable/",target:"_blank",rel:"noopener noreferrer",className:"hover:underline text-xs",children:"Documentation"})})})}),e.jsx("button",{className:i("p-1 cursor-pointer rounded-full hover:bg-theme-darker","dark:hover:bg-theme-lighter"),onClick:()=>{t==null||t()},"aria-label":l===r.Light?"Use Dark Theme":"Use Light Theme",children:e.jsx(s,{className:"h-4 w-4 text-primary-500"})})]})]})}export{j as default};
1
+ import{r as a,j as e,u as o,c as i,E as r}from"./index-C22hdM_h.js";function n({title:l,titleId:t,...s},C){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:C,"aria-labelledby":t},s),l?a.createElement("title",{id:t},l):null,a.createElement("path",{fillRule:"evenodd",d:"M9.528 1.718a.75.75 0 0 1 .162.819A8.97 8.97 0 0 0 9 6a9 9 0 0 0 9 9 8.97 8.97 0 0 0 3.463-.69.75.75 0 0 1 .981.98 10.503 10.503 0 0 1-9.694 6.46c-5.799 0-10.5-4.7-10.5-10.5 0-4.368 2.667-8.112 6.46-9.694a.75.75 0 0 1 .818.162Z",clipRule:"evenodd"}))}const h=a.forwardRef(n);function d({title:l,titleId:t,...s},C){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:C,"aria-labelledby":t},s),l?a.createElement("title",{id:t},l):null,a.createElement("path",{d:"M12 2.25a.75.75 0 0 1 .75.75v2.25a.75.75 0 0 1-1.5 0V3a.75.75 0 0 1 .75-.75ZM7.5 12a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM18.894 6.166a.75.75 0 0 0-1.06-1.06l-1.591 1.59a.75.75 0 1 0 1.06 1.061l1.591-1.59ZM21.75 12a.75.75 0 0 1-.75.75h-2.25a.75.75 0 0 1 0-1.5H21a.75.75 0 0 1 .75.75ZM17.834 18.894a.75.75 0 0 0 1.06-1.06l-1.59-1.591a.75.75 0 1 0-1.061 1.06l1.59 1.591ZM12 18a.75.75 0 0 1 .75.75V21a.75.75 0 0 1-1.5 0v-2.25A.75.75 0 0 1 12 18ZM7.758 17.303a.75.75 0 0 0-1.061-1.06l-1.591 1.59a.75.75 0 0 0 1.06 1.061l1.591-1.59ZM6 12a.75.75 0 0 1-.75.75H3a.75.75 0 0 1 0-1.5h2.25A.75.75 0 0 1 6 12ZM6.697 7.757a.75.75 0 0 0 1.06-1.06l-1.59-1.591a.75.75 0 0 0-1.061 1.06l1.59 1.591Z"}))}const c=a.forwardRef(d);function x({style:l,className:t}){return e.jsxs("svg",{style:l,className:t,role:"img","aria-labelledby":"tobikoDataTitle",viewBox:"0 0 194 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("title",{id:"tobikoDataTitle",children:"Tobiko Data logo"}),e.jsx("path",{d:"M99.6773 18.8812H90.4835V43H85.3891V18.8812H76.1953V14.4236H99.6773V18.8812ZM116.433 32.5724C116.433 39.0598 112.254 43.4378 106.364 43.4378C100.473 43.4378 96.2943 39.0598 96.2943 32.5724C96.2943 26.085 100.473 21.707 106.364 21.707C112.254 21.707 116.433 26.085 116.433 32.5724ZM101.11 32.5724C101.11 36.831 103.14 39.418 106.364 39.418C109.587 39.418 111.617 36.831 111.617 32.5724C111.617 28.3138 109.587 25.7268 106.364 25.7268C103.14 25.7268 101.11 28.3138 101.11 32.5724ZM130.538 43.4378C127.832 43.4378 125.842 42.3632 124.529 40.811V43H119.753V14.4236H124.529V24.3338C125.842 22.7816 127.832 21.707 130.538 21.707C136.389 21.707 139.732 26.6422 139.732 32.5724C139.732 38.5026 136.389 43.4378 130.538 43.4378ZM124.409 31.9754V33.2092C124.409 37.0698 126.638 39.2588 129.583 39.2588C133.046 39.2588 134.916 36.5524 134.916 32.5724C134.916 28.5924 133.046 25.886 129.583 25.886C126.638 25.886 124.409 28.0352 124.409 31.9754ZM142.945 19.319V14.4236H147.88V19.319H142.945ZM147.801 22.105V43H143.025V22.105H147.801ZM157.197 14.4236V30.9008L165.237 22.105H171.088L163.207 30.2242L171.724 43H166.192L159.944 33.5674L157.197 36.3534V43H152.421V14.4236H157.197ZM191.565 32.5724C191.565 39.0598 187.386 43.4378 181.496 43.4378C175.605 43.4378 171.426 39.0598 171.426 32.5724C171.426 26.085 175.605 21.707 181.496 21.707C187.386 21.707 191.565 26.085 191.565 32.5724ZM176.242 32.5724C176.242 36.831 178.272 39.418 181.496 39.418C184.719 39.418 186.749 36.831 186.749 32.5724C186.749 28.3138 184.719 25.7268 181.496 25.7268C178.272 25.7268 176.242 28.3138 176.242 32.5724Z",fill:"#0D0D0D",className:"fill-prose"}),e.jsx("path",{d:"M7.59874 35.2C11.5752 35.2 14.7987 31.9765 14.7987 28C14.7987 24.0236 11.5752 20.8 7.59874 20.8C3.62229 20.8 0.398743 24.0236 0.398743 28C0.398743 31.9765 3.62229 35.2 7.59874 35.2Z",fill:"#F74808"}),e.jsx("path",{d:"M10.7992 15.2928C14.378 15.2928 17.2792 12.3916 17.2792 8.81276C17.2792 5.23397 14.378 2.33276 10.7992 2.33276C7.22041 2.33276 4.31921 5.23397 4.31921 8.81276C4.31921 12.3916 7.22041 15.2928 10.7992 15.2928Z",fill:"#F74808"}),e.jsx("path",{d:"M10.7992 53.6929C14.378 53.6929 17.2792 50.7917 17.2792 47.2129C17.2792 43.6341 14.378 40.7329 10.7992 40.7329C7.22041 40.7329 4.31921 43.6341 4.31921 47.2129C4.31921 50.7917 7.22041 53.6929 10.7992 53.6929Z",fill:"#F74808"}),e.jsx("path",{d:"M36.2016 28C36.2016 31.9765 32.978 35.2 29.0016 35.2C25.0251 35.2 21.8016 31.9765 21.8016 28C21.8016 24.0236 25.0251 20.8 29.0016 20.8C32.978 20.8 36.2016 24.0236 36.2016 28Z",fill:"#F74808"}),e.jsx("path",{d:"M36.2016 7.2C36.2016 11.1764 32.978 14.4 29.0016 14.4C25.0251 14.4 21.8016 11.1764 21.8016 7.2C21.8016 3.22356 25.0251 0 29.0016 0C32.978 0 36.2016 3.22356 36.2016 7.2Z",fill:"#F74808"}),e.jsx("path",{d:"M36.2016 48.7999C36.2016 52.7763 32.978 55.9999 29.0016 55.9999C25.0251 55.9999 21.8016 52.7763 21.8016 48.7999C21.8016 44.8234 25.0251 41.5999 29.0016 41.5999C32.978 41.5999 36.2016 44.8234 36.2016 48.7999Z",fill:"#F74808"}),e.jsx("path",{d:"M50.4054 35.2C54.3818 35.2 57.6054 31.9765 57.6054 28C57.6054 24.0236 54.3818 20.8 50.4054 20.8C46.4289 20.8 43.2054 24.0236 43.2054 28C43.2054 31.9765 46.4289 35.2 50.4054 35.2Z",fill:"#F74808"}),e.jsx("path",{d:"M47.2053 15.2928C50.7841 15.2928 53.6853 12.3916 53.6853 8.81276C53.6853 5.23397 50.7841 2.33276 47.2053 2.33276C43.6265 2.33276 40.7253 5.23397 40.7253 8.81276C40.7253 12.3916 43.6265 15.2928 47.2053 15.2928Z",fill:"#F74808"}),e.jsx("path",{d:"M47.2053 53.6929C50.7841 53.6929 53.6853 50.7917 53.6853 47.2129C53.6853 43.6341 50.7841 40.7329 47.2053 40.7329C43.6265 40.7329 40.7253 43.6341 40.7253 47.2129C40.7253 50.7917 43.6265 53.6929 47.2053 53.6929Z",fill:"#F74808"})]})}const m=a.memo(x);function M({style:l,className:t}){return e.jsxs("svg",{style:l,className:t,viewBox:"0 0 246 56",fill:"none",role:"img","aria-labelledby":"sqlmeshTitle",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("title",{id:"sqlmeshTitle",children:"SQLMesh logo"}),e.jsx("path",{d:"M75.6874 37.4246L79.5901 34.1988C81.5814 37.3051 84.5682 39.0972 87.8338 39.0972C91.0595 39.0972 93.4888 37.6237 93.4888 34.8758C93.4888 31.9687 90.502 31.5704 86.2408 30.535C81.9398 29.4996 77.3202 28.2252 77.3202 22.6498C77.3202 17.3531 81.8601 13.9681 87.6346 13.9681C92.533 13.9681 96.3562 16.2779 98.2677 19.2647L94.5243 22.4905C92.9313 20.0214 90.8206 18.3089 87.4754 18.3089C84.4089 18.3089 82.2982 19.8621 82.2982 22.1321C82.2982 24.641 84.4885 25.1587 88.3515 26.0348C92.9711 27.0703 98.5067 28.1455 98.5067 34.3581C98.5067 39.9734 93.5685 43.4381 87.6745 43.4381C82.7761 43.4381 77.9175 41.0884 75.6874 37.4246ZM100.213 28.7031C100.213 20.0214 105.788 13.9681 113.514 13.9681C121.24 13.9681 126.816 20.0214 126.816 28.7031C126.816 34.0395 124.705 38.3804 121.28 40.969C122.435 42.4823 124.386 43.6372 126.656 44.1947L123.709 47.8187C121.081 47.0621 118.413 45.1107 117.218 42.9204C116.063 43.2788 114.828 43.4381 113.514 43.4381C105.788 43.4381 100.213 37.3848 100.213 28.7031ZM121.718 28.7031C121.718 22.4905 118.333 18.4682 113.514 18.4682C108.695 18.4682 105.31 22.4905 105.31 28.7031C105.31 34.9157 108.695 38.9379 113.514 38.9379C118.333 38.9379 121.718 34.9157 121.718 28.7031ZM130.379 43V14.4061H135.476V38.5397H148.937V43H130.379ZM168.205 43H164.063L156.576 20.8975V43H151.837V14.4061H158.846L166.214 36.3095L173.581 14.4061H180.431V43H175.692V20.8975L168.205 43ZM194.071 43.4381C188.098 43.4381 183.916 39.0176 183.916 32.566C183.916 26.4331 188.058 21.694 193.872 21.694C199.926 21.694 203.151 26.2738 203.151 32.0085V33.6015H188.496C188.854 37.1856 191.005 39.376 194.071 39.376C196.421 39.376 198.293 38.1813 198.93 36.0307L203.032 37.5839C201.558 41.2477 198.253 43.4381 194.071 43.4381ZM193.832 25.7162C191.363 25.7162 189.452 27.1897 188.735 30.0173H198.333C198.293 27.7075 196.859 25.7162 193.832 25.7162ZM204.148 39.0176L207.733 36.1502C208.967 38.1813 211.357 39.5353 213.786 39.5353C215.817 39.5353 217.689 38.8184 217.689 36.9467C217.689 35.1546 215.936 34.9555 212.631 34.2785C209.326 33.6015 205.542 32.7652 205.542 28.3048C205.542 24.4817 208.888 21.694 213.706 21.694C217.37 21.694 220.636 23.3268 222.149 25.6366L218.923 28.5438C217.729 26.672 215.737 25.5968 213.428 25.5968C211.476 25.5968 210.202 26.4729 210.202 27.8668C210.202 29.3801 211.715 29.6589 214.343 30.2164C217.888 30.9731 222.348 31.7297 222.348 36.5086C222.348 40.73 218.485 43.4381 213.746 43.4381C209.883 43.4381 206.02 41.8849 204.148 39.0176ZM225.619 43V14.4061H230.398V24.3224C231.593 22.9285 233.465 21.694 236.173 21.694C240.553 21.694 243.182 24.7206 243.182 29.2208V43H238.403V30.6146C238.403 28.0261 237.368 26.1543 234.739 26.1543C232.589 26.1543 230.398 27.7473 230.398 30.7341V43H225.619Z",fill:"#0D0D0D",className:"fill-prose"}),e.jsx("path",{opacity:"0.2",d:"M29.1758 28.2007V15.7497C29.1758 9.83436 24.3135 5.03906 18.3983 5.03906V5.03906C12.483 5.03906 7.62072 9.83436 7.62072 15.7496V26.7064",stroke:"#0830F7",strokeWidth:"4.30769"}),e.jsx("path",{opacity:"0.4",d:"M50.5964 28.2007V15.7497C50.5964 9.83436 45.8011 5.03906 39.8858 5.03906H18.3308C12.4155 5.03906 7.6202 9.83436 7.6202 15.7496V26.7064",stroke:"#0830F7",strokeWidth:"4.30769"}),e.jsx("path",{d:"M29.0398 27.7988V40.2499C29.0398 46.1651 33.902 50.9604 39.8173 50.9604V50.9604C45.7326 50.9604 50.5949 46.1652 50.5949 40.2499V29.2931",stroke:"#0830F7",strokeWidth:"4.30769"}),e.jsx("path",{opacity:"0.2",d:"M7.61914 27.799V40.2501C7.61914 46.1654 12.4144 50.9607 18.3297 50.9607H39.8848C45.8001 50.9607 50.5954 46.1654 50.5954 40.2501V29.2933",stroke:"#0830F7",strokeWidth:"4.30769"}),e.jsx("path",{d:"M7.61972 35.1497C11.6126 35.1497 14.8496 31.9129 14.8496 27.9201C14.8496 23.9273 11.6126 20.6904 7.61972 20.6904C3.6268 20.6904 0.389893 23.9273 0.389893 27.9201C0.389893 31.9129 3.6268 35.1497 7.61972 35.1497Z",fill:"#0830F7"}),e.jsx("path",{d:"M36.3908 27.9201C36.3908 31.9129 33.1539 35.1497 29.161 35.1497C25.1681 35.1497 21.9312 31.9129 21.9312 27.9201C21.9312 23.9273 25.1681 20.6904 29.161 20.6904C33.1539 20.6904 36.3908 23.9273 36.3908 27.9201Z",fill:"#0830F7"}),e.jsx("path",{d:"M50.5958 35.1497C54.5887 35.1497 57.8256 31.9129 57.8256 27.9201C57.8256 23.9273 54.5887 20.6904 50.5958 20.6904C46.6029 20.6904 43.366 23.9273 43.366 27.9201C43.366 31.9129 46.6029 35.1497 50.5958 35.1497Z",fill:"#0830F7"})]})}const f=a.memo(M);function j(){const{mode:l,toggleColorScheme:t}=o(),s=l===r.Light?h:c;return e.jsxs("header",{className:"min-h-[2rem] px-2 flex justify-between items-center",children:[e.jsxs("div",{className:"flex h-full items-center",children:[e.jsx("a",{href:"/",title:"Home",children:e.jsx(f,{style:{height:"20px"},mode:l})}),e.jsx("span",{className:"inline-block mx-1.5 text-xs font-bold pt-[3px]",children:"by"}),e.jsx("a",{href:"https://tobikodata.com/",target:"_blank",rel:"noopener noreferrer",title:"Tobiko Data website",children:e.jsx(m,{style:{height:"20px"},mode:l})})]}),e.jsxs("div",{className:"flex items-center",children:[e.jsx("nav",{children:e.jsx("ul",{className:"flex items-center",children:e.jsx("li",{className:"px-2",children:e.jsx("a",{href:"http://sqlmesh.readthedocs.io/en/stable/",target:"_blank",rel:"noopener noreferrer",className:"hover:underline text-xs",children:"Documentation"})})})}),e.jsx("button",{className:i("p-1 cursor-pointer rounded-full hover:bg-theme-darker","dark:hover:bg-theme-lighter"),onClick:()=>{t==null||t()},"aria-label":l===r.Light?"Use Dark Theme":"Use Light Theme",children:e.jsx(s,{className:"h-4 w-4 text-primary-500"})})]})]})}export{j as default};
@@ -1,4 +1,4 @@
1
- import{r as c,R as J,j,b as Jn,c as ve,ac as ot,f as eo,ad as to,af as he,ae as pn,ag as no,m as ee,i as Bt}from"./index-COnjINWU.js";function oo({title:e,titleId:t,...n},o){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?c.createElement("title",{id:t},e):null,c.createElement("path",{fillRule:"evenodd",d:"M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z",clipRule:"evenodd"}))}const ro=c.forwardRef(oo);function co({title:e,titleId:t,...n},o){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?c.createElement("title",{id:t},e):null,c.createElement("path",{fillRule:"evenodd",d:"M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",clipRule:"evenodd"}))}const io=c.forwardRef(co);function so({title:e,titleId:t,...n},o){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?c.createElement("title",{id:t},e):null,c.createElement("path",{fillRule:"evenodd",d:"M11.47 4.72a.75.75 0 0 1 1.06 0l3.75 3.75a.75.75 0 0 1-1.06 1.06L12 6.31 8.78 9.53a.75.75 0 0 1-1.06-1.06l3.75-3.75Zm-3.75 9.75a.75.75 0 0 1 1.06 0L12 17.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-3.75 3.75a.75.75 0 0 1-1.06 0l-3.75-3.75a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const ao=c.forwardRef(so);function lo({title:e,titleId:t,...n},o){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?c.createElement("title",{id:t},e):null,c.createElement("path",{fillRule:"evenodd",d:"M11.47 7.72a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 1 1-1.06 1.06L12 9.31l-6.97 6.97a.75.75 0 0 1-1.06-1.06l7.5-7.5Z",clipRule:"evenodd"}))}const uo=c.forwardRef(lo);function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},T.apply(null,arguments)}const fo=J.forwardRef(function({type:t="text",value:n,placeholder:o,className:r,disabled:i=!1,autoFocus:a=!1,onInput:s,onKeyDown:l},u){return n=n??"",j.jsx("input",{ref:u,className:ve("placeholder:text-neutral-300 dark:placeholder:text-neutral-700",i&&"opacity-50 cursor-not-allowed",r),type:t,value:n,placeholder:o,disabled:i,autoFocus:a,readOnly:Jn(!!s),onInput:s,onKeyDown:l})});function Wt(e,[t,n]){return Math.min(n,Math.max(t,e))}function U(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function Ot(e,t=[]){let n=[];function o(i,a){const s=c.createContext(a),l=n.length;n=[...n,a];function u(d){const{scope:w,children:m,...h}=d,f=(w==null?void 0:w[e][l])||s,v=c.useMemo(()=>h,Object.values(h));return c.createElement(f.Provider,{value:v},m)}function p(d,w){const m=(w==null?void 0:w[e][l])||s,h=c.useContext(m);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,p]}const r=()=>{const i=n.map(a=>c.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return r.scopeName=e,[o,po(r,...t)]}function po(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const a=o.reduce((s,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...s,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function mo(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function mn(...e){return t=>e.forEach(n=>mo(n,t))}function K(...e){return c.useCallback(mn(...e),e)}const Be=c.forwardRef((e,t)=>{const{children:n,...o}=e,r=c.Children.toArray(n),i=r.find(vo);if(i){const a=i.props.children,s=r.map(l=>l===i?c.Children.count(a)>1?c.Children.only(null):c.isValidElement(a)?a.props.children:null:l);return c.createElement(bt,T({},o,{ref:t}),c.isValidElement(a)?c.cloneElement(a,void 0,s):null)}return c.createElement(bt,T({},o,{ref:t}),n)});Be.displayName="Slot";const bt=c.forwardRef((e,t)=>{const{children:n,...o}=e;return c.isValidElement(n)?c.cloneElement(n,{...go(o,n.props),ref:t?mn(t,n.ref):n.ref}):c.Children.count(n)>1?c.Children.only(null):null});bt.displayName="SlotClone";const ho=({children:e})=>c.createElement(c.Fragment,null,e);function vo(e){return c.isValidElement(e)&&e.type===ho}function go(e,t){const n={...t};for(const o in t){const r=e[o],i=t[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...s)=>{i(...s),r(...s)}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function wo(e){const t=e+"CollectionProvider",[n,o]=Ot(t),[r,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:h,children:f}=m,v=J.useRef(null),g=J.useRef(new Map).current;return J.createElement(r,{scope:h,itemMap:g,collectionRef:v},f)},s=e+"CollectionSlot",l=J.forwardRef((m,h)=>{const{scope:f,children:v}=m,g=i(s,f),x=K(h,g.collectionRef);return J.createElement(Be,{ref:x},v)}),u=e+"CollectionItemSlot",p="data-radix-collection-item",d=J.forwardRef((m,h)=>{const{scope:f,children:v,...g}=m,x=J.useRef(null),$=K(h,x),b=i(u,f);return J.useEffect(()=>(b.itemMap.set(x,{ref:x,...g}),()=>void b.itemMap.delete(x))),J.createElement(Be,{[p]:"",ref:$},v)});function w(m){const h=i(e+"CollectionConsumer",m);return J.useCallback(()=>{const v=h.collectionRef.current;if(!v)return[];const g=Array.from(v.querySelectorAll(`[${p}]`));return Array.from(h.itemMap.values()).sort((b,y)=>g.indexOf(b.ref.current)-g.indexOf(y.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},w,o]}const xo=c.createContext(void 0);function $o(e){const t=c.useContext(xo);return e||t||"ltr"}const bo=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Z=bo.reduce((e,t)=>{const n=c.forwardRef((o,r)=>{const{asChild:i,...a}=o,s=i?Be:t;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(s,T({},a,{ref:r}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function yo(e,t){e&&ot.flushSync(()=>e.dispatchEvent(t))}function ue(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>{var o;return(o=t.current)===null||o===void 0?void 0:o.call(t,...n)},[])}function Eo(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e);c.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o),()=>t.removeEventListener("keydown",o)},[n,t])}const yt="dismissableLayer.update",So="dismissableLayer.pointerDownOutside",Co="dismissableLayer.focusOutside";let Ht;const Po=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ro=c.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,p=c.useContext(Po),[d,w]=c.useState(null),m=(n=d==null?void 0:d.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,h]=c.useState({}),f=K(t,E=>w(E)),v=Array.from(p.layers),[g]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),x=v.indexOf(g),$=d?v.indexOf(d):-1,b=p.layersWithOutsidePointerEventsDisabled.size>0,y=$>=x,P=To(E=>{const O=E.target,F=[...p.branches].some(I=>I.contains(O));!y||F||(i==null||i(E),s==null||s(E),E.defaultPrevented||l==null||l())},m),S=Oo(E=>{const O=E.target;[...p.branches].some(I=>I.contains(O))||(a==null||a(E),s==null||s(E),E.defaultPrevented||l==null||l())},m);return Eo(E=>{$===p.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&l&&(E.preventDefault(),l()))},m),c.useEffect(()=>{if(d)return o&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Ht=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(d)),p.layers.add(d),Vt(),()=>{o&&p.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Ht)}},[d,m,o,p]),c.useEffect(()=>()=>{d&&(p.layers.delete(d),p.layersWithOutsidePointerEventsDisabled.delete(d),Vt())},[d,p]),c.useEffect(()=>{const E=()=>h({});return document.addEventListener(yt,E),()=>document.removeEventListener(yt,E)},[]),c.createElement(Z.div,T({},u,{ref:f,style:{pointerEvents:b?y?"auto":"none":void 0,...e.style},onFocusCapture:U(e.onFocusCapture,S.onFocusCapture),onBlurCapture:U(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:U(e.onPointerDownCapture,P.onPointerDownCapture)}))});function To(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e),o=c.useRef(!1),r=c.useRef(()=>{});return c.useEffect(()=>{const i=s=>{if(s.target&&!o.current){let u=function(){hn(So,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}o.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Oo(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e),o=c.useRef(!1);return c.useEffect(()=>{const r=i=>{i.target&&!o.current&&hn(Co,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Vt(){const e=new CustomEvent(yt);document.dispatchEvent(e)}function hn(e,t,n,{discrete:o}){const r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?yo(r,i):r.dispatchEvent(i)}let ft=0;function Ao(){c.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:jt()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:jt()),ft++,()=>{ft===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(o=>o.remove()),ft--}},[])}function jt(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const pt="focusScope.autoFocusOnMount",mt="focusScope.autoFocusOnUnmount",Ut={bubbles:!1,cancelable:!0},Do=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:i,...a}=e,[s,l]=c.useState(null),u=ue(r),p=ue(i),d=c.useRef(null),w=K(t,f=>l(f)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(o){let f=function($){if(m.paused||!s)return;const b=$.target;s.contains(b)?d.current=b:me(d.current,{select:!0})},v=function($){if(m.paused||!s)return;const b=$.relatedTarget;b!==null&&(s.contains(b)||me(d.current,{select:!0}))},g=function($){const b=document.activeElement;for(const y of $)y.removedNodes.length>0&&(s!=null&&s.contains(b)||me(s))};document.addEventListener("focusin",f),document.addEventListener("focusout",v);const x=new MutationObserver(g);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",v),x.disconnect()}}},[o,s,m.paused]),c.useEffect(()=>{if(s){Kt.add(m);const f=document.activeElement;if(!s.contains(f)){const g=new CustomEvent(pt,Ut);s.addEventListener(pt,u),s.dispatchEvent(g),g.defaultPrevented||(_o(Lo(vn(s)),{select:!0}),document.activeElement===f&&me(s))}return()=>{s.removeEventListener(pt,u),setTimeout(()=>{const g=new CustomEvent(mt,Ut);s.addEventListener(mt,p),s.dispatchEvent(g),g.defaultPrevented||me(f??document.body,{select:!0}),s.removeEventListener(mt,p),Kt.remove(m)},0)}}},[s,u,p,m]);const h=c.useCallback(f=>{if(!n&&!o||m.paused)return;const v=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,g=document.activeElement;if(v&&g){const x=f.currentTarget,[$,b]=Io(x);$&&b?!f.shiftKey&&g===b?(f.preventDefault(),n&&me($,{select:!0})):f.shiftKey&&g===$&&(f.preventDefault(),n&&me(b,{select:!0})):g===x&&f.preventDefault()}},[n,o,m.paused]);return c.createElement(Z.div,T({tabIndex:-1},a,{ref:w,onKeyDown:h}))});function _o(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(me(o,{select:t}),document.activeElement!==n)return}function Io(e){const t=vn(e),n=zt(t,e),o=zt(t.reverse(),e);return[n,o]}function vn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function zt(e,t){for(const n of e)if(!No(n,{upTo:t}))return n}function No(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Mo(e){return e instanceof HTMLInputElement&&"select"in e}function me(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Mo(e)&&t&&e.select()}}const Kt=ko();function ko(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Yt(e,t),e.unshift(t)},remove(t){var n;e=Yt(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function Yt(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Lo(e){return e.filter(t=>t.tagName!=="A")}const te=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},Fo=eo.useId||(()=>{});let Bo=0;function gn(e){const[t,n]=c.useState(Fo());return te(()=>{n(o=>o??String(Bo++))},[e]),e||(t?`radix-${t}`:"")}const Wo=["top","right","bottom","left"],ge=Math.min,G=Math.max,Je=Math.round,Ue=Math.floor,ie=e=>({x:e,y:e}),Ho={left:"right",right:"left",bottom:"top",top:"bottom"},Vo={start:"end",end:"start"};function Et(e,t,n){return G(e,ge(t,n))}function de(e,t){return typeof e=="function"?e(t):e}function fe(e){return e.split("-")[0]}function _e(e){return e.split("-")[1]}function At(e){return e==="x"?"y":"x"}function Dt(e){return e==="y"?"height":"width"}function we(e){return["top","bottom"].includes(fe(e))?"y":"x"}function _t(e){return At(we(e))}function jo(e,t,n){n===void 0&&(n=!1);const o=_e(e),r=_t(e),i=Dt(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=et(a)),[a,et(a)]}function Uo(e){const t=et(e);return[St(e),t,St(t)]}function St(e){return e.replace(/start|end/g,t=>Vo[t])}function zo(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:a;default:return[]}}function Ko(e,t,n,o){const r=_e(e);let i=zo(fe(e),n==="start",o);return r&&(i=i.map(a=>a+"-"+r),t&&(i=i.concat(i.map(St)))),i}function et(e){return e.replace(/left|right|bottom|top/g,t=>Ho[t])}function Yo(e){return{top:0,right:0,bottom:0,left:0,...e}}function wn(e){return typeof e!="number"?Yo(e):{top:e,right:e,bottom:e,left:e}}function tt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function Xt(e,t,n){let{reference:o,floating:r}=e;const i=we(t),a=_t(t),s=Dt(a),l=fe(t),u=i==="y",p=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,w=o[s]/2-r[s]/2;let m;switch(l){case"top":m={x:p,y:o.y-r.height};break;case"bottom":m={x:p,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:d};break;case"left":m={x:o.x-r.width,y:d};break;default:m={x:o.x,y:o.y}}switch(_e(t)){case"start":m[a]-=w*(n&&u?-1:1);break;case"end":m[a]+=w*(n&&u?-1:1);break}return m}const Xo=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:p,y:d}=Xt(u,o,l),w=o,m={},h=0;for(let f=0;f<s.length;f++){const{name:v,fn:g}=s[f],{x,y:$,data:b,reset:y}=await g({x:p,y:d,initialPlacement:o,placement:w,strategy:r,middlewareData:m,rects:u,platform:a,elements:{reference:e,floating:t}});p=x??p,d=$??d,m={...m,[v]:{...m[v],...b}},y&&h<=50&&(h++,typeof y=="object"&&(y.placement&&(w=y.placement),y.rects&&(u=y.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):y.rects),{x:p,y:d}=Xt(u,w,l)),f=-1)}return{x:p,y:d,placement:w,strategy:r,middlewareData:m}};async function We(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:w=!1,padding:m=0}=de(t,e),h=wn(m),v=s[w?d==="floating"?"reference":"floating":d],g=tt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:p,strategy:l})),x=d==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,$=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),b=await(i.isElement==null?void 0:i.isElement($))?await(i.getScale==null?void 0:i.getScale($))||{x:1,y:1}:{x:1,y:1},y=tt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:$,strategy:l}):x);return{top:(g.top-y.top+h.top)/b.y,bottom:(y.bottom-g.bottom+h.bottom)/b.y,left:(g.left-y.left+h.left)/b.x,right:(y.right-g.right+h.right)/b.x}}const Zo=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:u,padding:p=0}=de(e,t)||{};if(u==null)return{};const d=wn(p),w={x:n,y:o},m=_t(r),h=Dt(m),f=await a.getDimensions(u),v=m==="y",g=v?"top":"left",x=v?"bottom":"right",$=v?"clientHeight":"clientWidth",b=i.reference[h]+i.reference[m]-w[m]-i.floating[h],y=w[m]-i.reference[m],P=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let S=P?P[$]:0;(!S||!await(a.isElement==null?void 0:a.isElement(P)))&&(S=s.floating[$]||i.floating[h]);const E=b/2-y/2,O=S/2-f[h]/2-1,F=ge(d[g],O),I=ge(d[x],O),B=F,A=S-f[h]-I,D=S/2-f[h]/2+E,N=Et(B,D,A),_=!l.arrow&&_e(r)!=null&&D!==N&&i.reference[h]/2-(D<B?F:I)-f[h]/2<0,W=_?D<B?D-B:D-A:0;return{[m]:w[m]+W,data:{[m]:N,centerOffset:D-N-W,..._&&{alignmentOffset:W}},reset:_}}}),qo=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:p=!0,crossAxis:d=!0,fallbackPlacements:w,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:f=!0,...v}=de(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const g=fe(r),x=we(s),$=fe(s)===s,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),y=w||($||!f?[et(s)]:Uo(s)),P=h!=="none";!w&&P&&y.push(...Ko(s,f,h,b));const S=[s,...y],E=await We(t,v),O=[];let F=((o=i.flip)==null?void 0:o.overflows)||[];if(p&&O.push(E[g]),d){const D=jo(r,a,b);O.push(E[D[0]],E[D[1]])}if(F=[...F,{placement:r,overflows:O}],!O.every(D=>D<=0)){var I,B;const D=(((I=i.flip)==null?void 0:I.index)||0)+1,N=S[D];if(N)return{data:{index:D,overflows:F},reset:{placement:N}};let _=(B=F.filter(W=>W.overflows[0]<=0).sort((W,R)=>W.overflows[1]-R.overflows[1])[0])==null?void 0:B.placement;if(!_)switch(m){case"bestFit":{var A;const W=(A=F.filter(R=>{if(P){const V=we(R.placement);return V===x||V==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(V=>V>0).reduce((V,z)=>V+z,0)]).sort((R,V)=>R[1]-V[1])[0])==null?void 0:A[0];W&&(_=W);break}case"initialPlacement":_=s;break}if(r!==_)return{reset:{placement:_}}}return{}}}};function Zt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function qt(e){return Wo.some(t=>e[t]>=0)}const Go=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=de(e,t);switch(o){case"referenceHidden":{const i=await We(t,{...r,elementContext:"reference"}),a=Zt(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:qt(a)}}}case"escaped":{const i=await We(t,{...r,altBoundary:!0}),a=Zt(i,n.floating);return{data:{escapedOffsets:a,escaped:qt(a)}}}default:return{}}}}};async function Qo(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=fe(n),s=_e(n),l=we(n)==="y",u=["left","top"].includes(a)?-1:1,p=i&&l?-1:1,d=de(t,e);let{mainAxis:w,crossAxis:m,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof h=="number"&&(m=s==="end"?h*-1:h),l?{x:m*p,y:w*u}:{x:w*u,y:m*p}}const Jo=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:a,middlewareData:s}=t,l=await Qo(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:a}}}}},er=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:v=>{let{x:g,y:x}=v;return{x:g,y:x}}},...l}=de(e,t),u={x:n,y:o},p=await We(t,l),d=we(fe(r)),w=At(d);let m=u[w],h=u[d];if(i){const v=w==="y"?"top":"left",g=w==="y"?"bottom":"right",x=m+p[v],$=m-p[g];m=Et(x,m,$)}if(a){const v=d==="y"?"top":"left",g=d==="y"?"bottom":"right",x=h+p[v],$=h-p[g];h=Et(x,h,$)}const f=s.fn({...t,[w]:m,[d]:h});return{...f,data:{x:f.x-n,y:f.y-o,enabled:{[w]:i,[d]:a}}}}}},tr=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=de(e,t),p={x:n,y:o},d=we(r),w=At(d);let m=p[w],h=p[d];const f=de(s,t),v=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(l){const $=w==="y"?"height":"width",b=i.reference[w]-i.floating[$]+v.mainAxis,y=i.reference[w]+i.reference[$]-v.mainAxis;m<b?m=b:m>y&&(m=y)}if(u){var g,x;const $=w==="y"?"width":"height",b=["top","left"].includes(fe(r)),y=i.reference[d]-i.floating[$]+(b&&((g=a.offset)==null?void 0:g[d])||0)+(b?0:v.crossAxis),P=i.reference[d]+i.reference[$]+(b?0:((x=a.offset)==null?void 0:x[d])||0)-(b?v.crossAxis:0);h<y?h=y:h>P&&(h=P)}return{[w]:m,[d]:h}}}},nr=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...u}=de(e,t),p=await We(t,u),d=fe(r),w=_e(r),m=we(r)==="y",{width:h,height:f}=i.floating;let v,g;d==="top"||d==="bottom"?(v=d,g=w===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(g=d,v=w==="end"?"top":"bottom");const x=f-p.top-p.bottom,$=h-p.left-p.right,b=ge(f-p[v],x),y=ge(h-p[g],$),P=!t.middlewareData.shift;let S=b,E=y;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=$),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(S=x),P&&!w){const F=G(p.left,0),I=G(p.right,0),B=G(p.top,0),A=G(p.bottom,0);m?E=h-2*(F!==0||I!==0?F+I:G(p.left,p.right)):S=f-2*(B!==0||A!==0?B+A:G(p.top,p.bottom))}await l({...t,availableWidth:E,availableHeight:S});const O=await a.getDimensions(s.floating);return h!==O.width||f!==O.height?{reset:{rects:!0}}:{}}}};function rt(){return typeof window<"u"}function Ie(e){return xn(e)?(e.nodeName||"").toLowerCase():"#document"}function Q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ae(e){var t;return(t=(xn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xn(e){return rt()?e instanceof Node||e instanceof Q(e).Node:!1}function re(e){return rt()?e instanceof Element||e instanceof Q(e).Element:!1}function se(e){return rt()?e instanceof HTMLElement||e instanceof Q(e).HTMLElement:!1}function Gt(e){return!rt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Q(e).ShadowRoot}function Ve(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ce(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function or(e){return["table","td","th"].includes(Ie(e))}function ct(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function It(e){const t=Nt(),n=re(e)?ce(e):e;return["transform","translate","scale","rotate","perspective"].some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(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 rr(e){let t=xe(e);for(;se(t)&&!Ae(t);){if(It(t))return t;if(ct(t))return null;t=xe(t)}return null}function Nt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ae(e){return["html","body","#document"].includes(Ie(e))}function ce(e){return Q(e).getComputedStyle(e)}function it(e){return re(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xe(e){if(Ie(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Gt(e)&&e.host||ae(e);return Gt(t)?t.host:t}function $n(e){const t=xe(e);return Ae(t)?e.ownerDocument?e.ownerDocument.body:e.body:se(t)&&Ve(t)?t:$n(t)}function He(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=$n(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),a=Q(r);if(i){const s=Ct(a);return t.concat(a,a.visualViewport||[],Ve(r)?r:[],s&&n?He(s):[])}return t.concat(r,He(r,[],n))}function Ct(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function bn(e){const t=ce(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=se(e),i=r?e.offsetWidth:n,a=r?e.offsetHeight:o,s=Je(n)!==i||Je(o)!==a;return s&&(n=i,o=a),{width:n,height:o,$:s}}function Mt(e){return re(e)?e:e.contextElement}function Te(e){const t=Mt(e);if(!se(t))return ie(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=bn(t);let a=(i?Je(n.width):n.width)/o,s=(i?Je(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const cr=ie(0);function yn(e){const t=Q(e);return!Nt()||!t.visualViewport?cr:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ir(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Q(e)?!1:t}function $e(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=Mt(e);let a=ie(1);t&&(o?re(o)&&(a=Te(o)):a=Te(e));const s=ir(i,n,o)?yn(i):ie(0);let l=(r.left+s.x)/a.x,u=(r.top+s.y)/a.y,p=r.width/a.x,d=r.height/a.y;if(i){const w=Q(i),m=o&&re(o)?Q(o):o;let h=w,f=Ct(h);for(;f&&o&&m!==h;){const v=Te(f),g=f.getBoundingClientRect(),x=ce(f),$=g.left+(f.clientLeft+parseFloat(x.paddingLeft))*v.x,b=g.top+(f.clientTop+parseFloat(x.paddingTop))*v.y;l*=v.x,u*=v.y,p*=v.x,d*=v.y,l+=$,u+=b,h=Q(f),f=Ct(h)}}return tt({width:p,height:d,x:l,y:u})}function kt(e,t){const n=it(e).scrollLeft;return t?t.left+n:$e(ae(e)).left+n}function En(e,t,n){n===void 0&&(n=!1);const o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-(n?0:kt(e,o)),i=o.top+t.scrollTop;return{x:r,y:i}}function sr(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",a=ae(o),s=t?ct(t.floating):!1;if(o===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},u=ie(1);const p=ie(0),d=se(o);if((d||!d&&!i)&&((Ie(o)!=="body"||Ve(a))&&(l=it(o)),se(o))){const m=$e(o);u=Te(o),p.x=m.x+o.clientLeft,p.y=m.y+o.clientTop}const w=a&&!d&&!i?En(a,l,!0):ie(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+p.x+w.x,y:n.y*u.y-l.scrollTop*u.y+p.y+w.y}}function ar(e){return Array.from(e.getClientRects())}function lr(e){const t=ae(e),n=it(e),o=e.ownerDocument.body,r=G(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=G(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+kt(e);const s=-n.scrollTop;return ce(o).direction==="rtl"&&(a+=G(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:a,y:s}}function ur(e,t){const n=Q(e),o=ae(e),r=n.visualViewport;let i=o.clientWidth,a=o.clientHeight,s=0,l=0;if(r){i=r.width,a=r.height;const u=Nt();(!u||u&&t==="fixed")&&(s=r.offsetLeft,l=r.offsetTop)}return{width:i,height:a,x:s,y:l}}function dr(e,t){const n=$e(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=se(e)?Te(e):ie(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=r*i.x,u=o*i.y;return{width:a,height:s,x:l,y:u}}function Qt(e,t,n){let o;if(t==="viewport")o=ur(e,n);else if(t==="document")o=lr(ae(e));else if(re(t))o=dr(t,n);else{const r=yn(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return tt(o)}function Sn(e,t){const n=xe(e);return n===t||!re(n)||Ae(n)?!1:ce(n).position==="fixed"||Sn(n,t)}function fr(e,t){const n=t.get(e);if(n)return n;let o=He(e,[],!1).filter(s=>re(s)&&Ie(s)!=="body"),r=null;const i=ce(e).position==="fixed";let a=i?xe(e):e;for(;re(a)&&!Ae(a);){const s=ce(a),l=It(a);!l&&s.position==="fixed"&&(r=null),(i?!l&&!r:!l&&s.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||Ve(a)&&!l&&Sn(e,a))?o=o.filter(p=>p!==a):r=s,a=xe(a)}return t.set(e,o),o}function pr(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[...n==="clippingAncestors"?ct(t)?[]:fr(t,this._c):[].concat(n),o],s=a[0],l=a.reduce((u,p)=>{const d=Qt(t,p,r);return u.top=G(d.top,u.top),u.right=ge(d.right,u.right),u.bottom=ge(d.bottom,u.bottom),u.left=G(d.left,u.left),u},Qt(t,s,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function mr(e){const{width:t,height:n}=bn(e);return{width:t,height:n}}function hr(e,t,n){const o=se(t),r=ae(t),i=n==="fixed",a=$e(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=ie(0);if(o||!o&&!i)if((Ie(t)!=="body"||Ve(r))&&(s=it(t)),o){const w=$e(t,!0,i,t);l.x=w.x+t.clientLeft,l.y=w.y+t.clientTop}else r&&(l.x=kt(r));const u=r&&!o&&!i?En(r,s):ie(0),p=a.left+s.scrollLeft-l.x-u.x,d=a.top+s.scrollTop-l.y-u.y;return{x:p,y:d,width:a.width,height:a.height}}function ht(e){return ce(e).position==="static"}function Jt(e,t){if(!se(e)||ce(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ae(e)===n&&(n=n.ownerDocument.body),n}function Cn(e,t){const n=Q(e);if(ct(e))return n;if(!se(e)){let r=xe(e);for(;r&&!Ae(r);){if(re(r)&&!ht(r))return r;r=xe(r)}return n}let o=Jt(e,t);for(;o&&or(o)&&ht(o);)o=Jt(o,t);return o&&Ae(o)&&ht(o)&&!It(o)?n:o||rr(e)||n}const vr=async function(e){const t=this.getOffsetParent||Cn,n=this.getDimensions,o=await n(e.floating);return{reference:hr(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function gr(e){return ce(e).direction==="rtl"}const wr={convertOffsetParentRelativeRectToViewportRelativeRect:sr,getDocumentElement:ae,getClippingRect:pr,getOffsetParent:Cn,getElementRects:vr,getClientRects:ar,getDimensions:mr,getScale:Te,isElement:re,isRTL:gr};function Pn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xr(e,t){let n=null,o;const r=ae(e);function i(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:p,top:d,width:w,height:m}=u;if(s||t(),!w||!m)return;const h=Ue(d),f=Ue(r.clientWidth-(p+w)),v=Ue(r.clientHeight-(d+m)),g=Ue(p),$={rootMargin:-h+"px "+-f+"px "+-v+"px "+-g+"px",threshold:G(0,ge(1,l))||1};let b=!0;function y(P){const S=P[0].intersectionRatio;if(S!==l){if(!b)return a();S?a(!1,S):o=setTimeout(()=>{a(!1,1e-7)},1e3)}S===1&&!Pn(u,e.getBoundingClientRect())&&a(),b=!1}try{n=new IntersectionObserver(y,{...$,root:r.ownerDocument})}catch{n=new IntersectionObserver(y,$)}n.observe(e)}return a(!0),i}function $r(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=Mt(e),p=r||i?[...u?He(u):[],...He(t)]:[];p.forEach(g=>{r&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const d=u&&s?xr(u,n):null;let w=-1,m=null;a&&(m=new ResizeObserver(g=>{let[x]=g;x&&x.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var $;($=m)==null||$.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let h,f=l?$e(e):null;l&&v();function v(){const g=$e(e);f&&!Pn(f,g)&&n(),f=g,h=requestAnimationFrame(v)}return n(),()=>{var g;p.forEach(x=>{r&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),d==null||d(),(g=m)==null||g.disconnect(),m=null,l&&cancelAnimationFrame(h)}}const br=Jo,yr=er,Er=qo,Sr=nr,Cr=Go,en=Zo,Pr=tr,Rr=(e,t,n)=>{const o=new Map,r={platform:wr,...n},i={...r.platform,_c:o};return Xo(e,t,{...r,platform:i})};var qe=typeof document<"u"?c.useLayoutEffect:c.useEffect;function nt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!nt(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&e.$$typeof)&&!nt(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Rn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tn(e,t){const n=Rn(e);return Math.round(t*n)/n}function vt(e){const t=c.useRef(e);return qe(()=>{t.current=e}),t}function Tr(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[p,d]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[w,m]=c.useState(o);nt(w,o)||m(o);const[h,f]=c.useState(null),[v,g]=c.useState(null),x=c.useCallback(R=>{R!==P.current&&(P.current=R,f(R))},[]),$=c.useCallback(R=>{R!==S.current&&(S.current=R,g(R))},[]),b=i||h,y=a||v,P=c.useRef(null),S=c.useRef(null),E=c.useRef(p),O=l!=null,F=vt(l),I=vt(r),B=vt(u),A=c.useCallback(()=>{if(!P.current||!S.current)return;const R={placement:t,strategy:n,middleware:w};I.current&&(R.platform=I.current),Rr(P.current,S.current,R).then(V=>{const z={...V,isPositioned:B.current!==!1};D.current&&!nt(E.current,z)&&(E.current=z,ot.flushSync(()=>{d(z)}))})},[w,t,n,I,B]);qe(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(R=>({...R,isPositioned:!1})))},[u]);const D=c.useRef(!1);qe(()=>(D.current=!0,()=>{D.current=!1}),[]),qe(()=>{if(b&&(P.current=b),y&&(S.current=y),b&&y){if(F.current)return F.current(b,y,A);A()}},[b,y,A,F,O]);const N=c.useMemo(()=>({reference:P,floating:S,setReference:x,setFloating:$}),[x,$]),_=c.useMemo(()=>({reference:b,floating:y}),[b,y]),W=c.useMemo(()=>{const R={position:n,left:0,top:0};if(!_.floating)return R;const V=tn(_.floating,p.x),z=tn(_.floating,p.y);return s?{...R,transform:"translate("+V+"px, "+z+"px)",...Rn(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:z}},[n,s,_.floating,p.x,p.y]);return c.useMemo(()=>({...p,update:A,refs:N,elements:_,floatingStyles:W}),[p,A,N,_,W])}const Or=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?en({element:o.current,padding:r}).fn(n):{}:o?en({element:o,padding:r}).fn(n):{}}}},Ar=(e,t)=>({...br(e),options:[e,t]}),Dr=(e,t)=>({...yr(e),options:[e,t]}),_r=(e,t)=>({...Pr(e),options:[e,t]}),Ir=(e,t)=>({...Er(e),options:[e,t]}),Nr=(e,t)=>({...Sr(e),options:[e,t]}),Mr=(e,t)=>({...Cr(e),options:[e,t]}),kr=(e,t)=>({...Or(e),options:[e,t]});function Lr(e){const[t,n]=c.useState(void 0);return te(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}const Tn="Popper",[On,An]=Ot(Tn),[Fr,Dn]=On(Tn),Br=e=>{const{__scopePopper:t,children:n}=e,[o,r]=c.useState(null);return c.createElement(Fr,{scope:t,anchor:o,onAnchorChange:r},n)},Wr="PopperAnchor",Hr=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,i=Dn(Wr,n),a=c.useRef(null),s=K(t,a);return c.useEffect(()=>{i.onAnchorChange((o==null?void 0:o.current)||a.current)}),o?null:c.createElement(Z.div,T({},r,{ref:s}))}),_n="PopperContent",[Vr,_i]=On(_n),jr=c.forwardRef((e,t)=>{var n,o,r,i,a,s,l,u;const{__scopePopper:p,side:d="bottom",sideOffset:w=0,align:m="center",alignOffset:h=0,arrowPadding:f=0,collisionBoundary:v=[],collisionPadding:g=0,sticky:x="partial",hideWhenDetached:$=!1,avoidCollisions:b=!0,onPlaced:y,...P}=e,S=Dn(_n,p),[E,O]=c.useState(null),F=K(t,X=>O(X)),[I,B]=c.useState(null),A=Lr(I),D=(n=A==null?void 0:A.width)!==null&&n!==void 0?n:0,N=(o=A==null?void 0:A.height)!==null&&o!==void 0?o:0,_=d+(m!=="center"?"-"+m:""),W=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},R=Array.isArray(v)?v:[v],V=R.length>0,z={padding:W,boundary:R.filter(Ur),altBoundary:V},{refs:Ee,floatingStyles:Se,placement:Me,isPositioned:ne,middlewareData:oe}=Tr({strategy:"fixed",placement:_,whileElementsMounted:$r,elements:{reference:S.anchor},middleware:[Ar({mainAxis:w+N,alignmentAxis:h}),b&&Dr({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?_r():void 0,...z}),b&&Ir({...z}),Nr({...z,apply:({elements:X,rects:ke,availableWidth:Le,availableHeight:Fe})=>{const{width:Gn,height:Qn}=ke.reference,je=X.floating.style;je.setProperty("--radix-popper-available-width",`${Le}px`),je.setProperty("--radix-popper-available-height",`${Fe}px`),je.setProperty("--radix-popper-anchor-width",`${Gn}px`),je.setProperty("--radix-popper-anchor-height",`${Qn}px`)}}),I&&kr({element:I,padding:f}),zr({arrowWidth:D,arrowHeight:N}),$&&Mr({strategy:"referenceHidden"})]}),[pe,C]=In(Me),M=ue(y);te(()=>{ne&&(M==null||M())},[ne,M]);const Y=(r=oe.arrow)===null||r===void 0?void 0:r.x,H=(i=oe.arrow)===null||i===void 0?void 0:i.y,k=((a=oe.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[L,q]=c.useState();return te(()=>{E&&q(window.getComputedStyle(E).zIndex)},[E]),c.createElement("div",{ref:Ee.setFloating,"data-radix-popper-content-wrapper":"",style:{...Se,transform:ne?Se.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:L,"--radix-popper-transform-origin":[(s=oe.transformOrigin)===null||s===void 0?void 0:s.x,(l=oe.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:e.dir},c.createElement(Vr,{scope:p,placedSide:pe,onArrowChange:B,arrowX:Y,arrowY:H,shouldHideArrow:k},c.createElement(Z.div,T({"data-side":pe,"data-align":C},P,{ref:F,style:{...P.style,animation:ne?void 0:"none",opacity:(u=oe.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))});function Ur(e){return e!==null}const zr=e=>({name:"transformOrigin",options:e,fn(t){var n,o,r,i,a;const{placement:s,rects:l,middlewareData:u}=t,d=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,w=d?0:e.arrowWidth,m=d?0:e.arrowHeight,[h,f]=In(s),v={start:"0%",center:"50%",end:"100%"}[f],g=((o=(r=u.arrow)===null||r===void 0?void 0:r.x)!==null&&o!==void 0?o:0)+w/2,x=((i=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+m/2;let $="",b="";return h==="bottom"?($=d?v:`${g}px`,b=`${-m}px`):h==="top"?($=d?v:`${g}px`,b=`${l.floating.height+m}px`):h==="right"?($=`${-m}px`,b=d?v:`${x}px`):h==="left"&&($=`${l.floating.width+m}px`,b=d?v:`${x}px`),{data:{x:$,y:b}}}});function In(e){const[t,n="center"]=e.split("-");return[t,n]}const Kr=Br,Yr=Hr,Xr=jr,Zr=c.forwardRef((e,t)=>{var n;const{container:o=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...r}=e;return o?to.createPortal(c.createElement(Z.div,T({},r,{ref:t})),o):null});function nn({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=qr({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:o,s=ue(n),l=c.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}else r(u)},[i,e,r,s]);return[a,l]}function qr({defaultProp:e,onChange:t}){const n=c.useState(e),[o]=n,r=c.useRef(o),i=ue(t);return c.useEffect(()=>{r.current!==o&&(i(o),r.current=o)},[o,r,i]),n}function Gr(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Qr(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Jr(...e){return t=>e.forEach(n=>Qr(n,t))}const Nn=c.forwardRef((e,t)=>{const{children:n,...o}=e,r=c.Children.toArray(n),i=r.find(tc);if(i){const a=i.props.children,s=r.map(l=>l===i?c.Children.count(a)>1?c.Children.only(null):c.isValidElement(a)?a.props.children:null:l);return c.createElement(Pt,T({},o,{ref:t}),c.isValidElement(a)?c.cloneElement(a,void 0,s):null)}return c.createElement(Pt,T({},o,{ref:t}),n)});Nn.displayName="Slot";const Pt=c.forwardRef((e,t)=>{const{children:n,...o}=e;return c.isValidElement(n)?c.cloneElement(n,{...nc(o,n.props),ref:t?Jr(t,n.ref):n.ref}):c.Children.count(n)>1?c.Children.only(null):null});Pt.displayName="SlotClone";const ec=({children:e})=>c.createElement(c.Fragment,null,e);function tc(e){return c.isValidElement(e)&&e.type===ec}function nc(e,t){const n={...t};for(const o in t){const r=e[o],i=t[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...s)=>{i(...s),r(...s)}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}const oc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],rc=oc.reduce((e,t)=>{const n=c.forwardRef((o,r)=>{const{asChild:i,...a}=o,s=i?Nn:t;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(s,T({},a,{ref:r}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),cc=c.forwardRef((e,t)=>c.createElement(rc.span,T({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));var ic=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ce=new WeakMap,ze=new WeakMap,Ke={},gt=0,Mn=function(e){return e&&(e.host||Mn(e.parentNode))},sc=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Mn(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ac=function(e,t,n,o){var r=sc(t,Array.isArray(e)?e:[e]);Ke[n]||(Ke[n]=new WeakMap);var i=Ke[n],a=[],s=new Set,l=new Set(r),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};r.forEach(u);var p=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(w){if(s.has(w))p(w);else try{var m=w.getAttribute(o),h=m!==null&&m!=="false",f=(Ce.get(w)||0)+1,v=(i.get(w)||0)+1;Ce.set(w,f),i.set(w,v),a.push(w),f===1&&h&&ze.set(w,!0),v===1&&w.setAttribute(n,"true"),h||w.setAttribute(o,"true")}catch(g){console.error("aria-hidden: cannot operate on ",w,g)}})};return p(t),s.clear(),gt++,function(){a.forEach(function(d){var w=Ce.get(d)-1,m=i.get(d)-1;Ce.set(d,w),i.set(d,m),w||(ze.has(d)||d.removeAttribute(o),ze.delete(d)),m||d.removeAttribute(n)}),gt--,gt||(Ce=new WeakMap,Ce=new WeakMap,ze=new WeakMap,Ke={})}},lc=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=ic(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live]"))),ac(o,r,n,"aria-hidden")):function(){return null}},Ge="right-scroll-bar-position",Qe="width-before-scroll-bar",uc="with-scroll-bars-hidden",dc="--removed-body-scroll-bar-size";function wt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function fc(e,t){var n=c.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var pc=typeof window<"u"?c.useLayoutEffect:c.useEffect,on=new WeakMap;function mc(e,t){var n=fc(null,function(o){return e.forEach(function(r){return wt(r,o)})});return pc(function(){var o=on.get(n);if(o){var r=new Set(o),i=new Set(e),a=n.current;r.forEach(function(s){i.has(s)||wt(s,null)}),i.forEach(function(s){r.has(s)||wt(s,a)})}on.set(n,e)},[e]),n}function hc(e){return e}function vc(e,t){t===void 0&&(t=hc);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,o);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(o=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){o=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var l=function(){var p=a;a=[],p.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(p){a.push(p),u()},filter:function(p){return a=a.filter(p),n}}}};return r}function gc(e){e===void 0&&(e={});var t=vc(null);return t.options=he({async:!0,ssr:!1},e),t}var kn=function(e){var t=e.sideCar,n=pn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return c.createElement(o,he({},n))};kn.isSideCarExport=!0;function wc(e,t){return e.useMedium(t),kn}var Ln=gc(),xt=function(){},st=c.forwardRef(function(e,t){var n=c.useRef(null),o=c.useState({onScrollCapture:xt,onWheelCapture:xt,onTouchMoveCapture:xt}),r=o[0],i=o[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,p=e.enabled,d=e.shards,w=e.sideCar,m=e.noIsolation,h=e.inert,f=e.allowPinchZoom,v=e.as,g=v===void 0?"div":v,x=pn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),$=w,b=mc([n,t]),y=he(he({},x),r);return c.createElement(c.Fragment,null,p&&c.createElement($,{sideCar:Ln,removeScrollBar:u,shards:d,noIsolation:m,inert:h,setCallbacks:i,allowPinchZoom:!!f,lockRef:n}),a?c.cloneElement(c.Children.only(s),he(he({},y),{ref:b})):c.createElement(g,he({},y,{className:l,ref:b}),s))});st.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};st.classNames={fullWidth:Qe,zeroRight:Ge};var xc=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $c(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=xc();return t&&e.setAttribute("nonce",t),e}function bc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function yc(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ec=function(){var e=0,t=null;return{add:function(n){e==0&&(t=$c())&&(bc(t,n),yc(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Sc=function(){var e=Ec();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Fn=function(){var e=Sc(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Cc={left:0,top:0,right:0,gap:0},$t=function(e){return parseInt(e||"",10)||0},Pc=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[$t(n),$t(o),$t(r)]},Rc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Cc;var t=Pc(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Tc=Fn(),Oe="data-scroll-locked",Oc=function(e,t,n,o){var r=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
1
+ import{r as c,R as J,j,b as Jn,c as ve,ac as ot,f as eo,ad as to,af as he,ae as pn,ag as no,m as ee,i as Bt}from"./index-C22hdM_h.js";function oo({title:e,titleId:t,...n},o){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?c.createElement("title",{id:t},e):null,c.createElement("path",{fillRule:"evenodd",d:"M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z",clipRule:"evenodd"}))}const ro=c.forwardRef(oo);function co({title:e,titleId:t,...n},o){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?c.createElement("title",{id:t},e):null,c.createElement("path",{fillRule:"evenodd",d:"M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",clipRule:"evenodd"}))}const io=c.forwardRef(co);function so({title:e,titleId:t,...n},o){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?c.createElement("title",{id:t},e):null,c.createElement("path",{fillRule:"evenodd",d:"M11.47 4.72a.75.75 0 0 1 1.06 0l3.75 3.75a.75.75 0 0 1-1.06 1.06L12 6.31 8.78 9.53a.75.75 0 0 1-1.06-1.06l3.75-3.75Zm-3.75 9.75a.75.75 0 0 1 1.06 0L12 17.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-3.75 3.75a.75.75 0 0 1-1.06 0l-3.75-3.75a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const ao=c.forwardRef(so);function lo({title:e,titleId:t,...n},o){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?c.createElement("title",{id:t},e):null,c.createElement("path",{fillRule:"evenodd",d:"M11.47 7.72a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 1 1-1.06 1.06L12 9.31l-6.97 6.97a.75.75 0 0 1-1.06-1.06l7.5-7.5Z",clipRule:"evenodd"}))}const uo=c.forwardRef(lo);function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},T.apply(null,arguments)}const fo=J.forwardRef(function({type:t="text",value:n,placeholder:o,className:r,disabled:i=!1,autoFocus:a=!1,onInput:s,onKeyDown:l},u){return n=n??"",j.jsx("input",{ref:u,className:ve("placeholder:text-neutral-300 dark:placeholder:text-neutral-700",i&&"opacity-50 cursor-not-allowed",r),type:t,value:n,placeholder:o,disabled:i,autoFocus:a,readOnly:Jn(!!s),onInput:s,onKeyDown:l})});function Wt(e,[t,n]){return Math.min(n,Math.max(t,e))}function U(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function Ot(e,t=[]){let n=[];function o(i,a){const s=c.createContext(a),l=n.length;n=[...n,a];function u(d){const{scope:w,children:m,...h}=d,f=(w==null?void 0:w[e][l])||s,v=c.useMemo(()=>h,Object.values(h));return c.createElement(f.Provider,{value:v},m)}function p(d,w){const m=(w==null?void 0:w[e][l])||s,h=c.useContext(m);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,p]}const r=()=>{const i=n.map(a=>c.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return r.scopeName=e,[o,po(r,...t)]}function po(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const a=o.reduce((s,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...s,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function mo(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function mn(...e){return t=>e.forEach(n=>mo(n,t))}function K(...e){return c.useCallback(mn(...e),e)}const Be=c.forwardRef((e,t)=>{const{children:n,...o}=e,r=c.Children.toArray(n),i=r.find(vo);if(i){const a=i.props.children,s=r.map(l=>l===i?c.Children.count(a)>1?c.Children.only(null):c.isValidElement(a)?a.props.children:null:l);return c.createElement(bt,T({},o,{ref:t}),c.isValidElement(a)?c.cloneElement(a,void 0,s):null)}return c.createElement(bt,T({},o,{ref:t}),n)});Be.displayName="Slot";const bt=c.forwardRef((e,t)=>{const{children:n,...o}=e;return c.isValidElement(n)?c.cloneElement(n,{...go(o,n.props),ref:t?mn(t,n.ref):n.ref}):c.Children.count(n)>1?c.Children.only(null):null});bt.displayName="SlotClone";const ho=({children:e})=>c.createElement(c.Fragment,null,e);function vo(e){return c.isValidElement(e)&&e.type===ho}function go(e,t){const n={...t};for(const o in t){const r=e[o],i=t[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...s)=>{i(...s),r(...s)}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function wo(e){const t=e+"CollectionProvider",[n,o]=Ot(t),[r,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:h,children:f}=m,v=J.useRef(null),g=J.useRef(new Map).current;return J.createElement(r,{scope:h,itemMap:g,collectionRef:v},f)},s=e+"CollectionSlot",l=J.forwardRef((m,h)=>{const{scope:f,children:v}=m,g=i(s,f),x=K(h,g.collectionRef);return J.createElement(Be,{ref:x},v)}),u=e+"CollectionItemSlot",p="data-radix-collection-item",d=J.forwardRef((m,h)=>{const{scope:f,children:v,...g}=m,x=J.useRef(null),$=K(h,x),b=i(u,f);return J.useEffect(()=>(b.itemMap.set(x,{ref:x,...g}),()=>void b.itemMap.delete(x))),J.createElement(Be,{[p]:"",ref:$},v)});function w(m){const h=i(e+"CollectionConsumer",m);return J.useCallback(()=>{const v=h.collectionRef.current;if(!v)return[];const g=Array.from(v.querySelectorAll(`[${p}]`));return Array.from(h.itemMap.values()).sort((b,y)=>g.indexOf(b.ref.current)-g.indexOf(y.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},w,o]}const xo=c.createContext(void 0);function $o(e){const t=c.useContext(xo);return e||t||"ltr"}const bo=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Z=bo.reduce((e,t)=>{const n=c.forwardRef((o,r)=>{const{asChild:i,...a}=o,s=i?Be:t;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(s,T({},a,{ref:r}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function yo(e,t){e&&ot.flushSync(()=>e.dispatchEvent(t))}function ue(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>{var o;return(o=t.current)===null||o===void 0?void 0:o.call(t,...n)},[])}function Eo(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e);c.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o),()=>t.removeEventListener("keydown",o)},[n,t])}const yt="dismissableLayer.update",So="dismissableLayer.pointerDownOutside",Co="dismissableLayer.focusOutside";let Ht;const Po=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ro=c.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,p=c.useContext(Po),[d,w]=c.useState(null),m=(n=d==null?void 0:d.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,h]=c.useState({}),f=K(t,E=>w(E)),v=Array.from(p.layers),[g]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),x=v.indexOf(g),$=d?v.indexOf(d):-1,b=p.layersWithOutsidePointerEventsDisabled.size>0,y=$>=x,P=To(E=>{const O=E.target,F=[...p.branches].some(I=>I.contains(O));!y||F||(i==null||i(E),s==null||s(E),E.defaultPrevented||l==null||l())},m),S=Oo(E=>{const O=E.target;[...p.branches].some(I=>I.contains(O))||(a==null||a(E),s==null||s(E),E.defaultPrevented||l==null||l())},m);return Eo(E=>{$===p.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&l&&(E.preventDefault(),l()))},m),c.useEffect(()=>{if(d)return o&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Ht=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(d)),p.layers.add(d),Vt(),()=>{o&&p.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Ht)}},[d,m,o,p]),c.useEffect(()=>()=>{d&&(p.layers.delete(d),p.layersWithOutsidePointerEventsDisabled.delete(d),Vt())},[d,p]),c.useEffect(()=>{const E=()=>h({});return document.addEventListener(yt,E),()=>document.removeEventListener(yt,E)},[]),c.createElement(Z.div,T({},u,{ref:f,style:{pointerEvents:b?y?"auto":"none":void 0,...e.style},onFocusCapture:U(e.onFocusCapture,S.onFocusCapture),onBlurCapture:U(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:U(e.onPointerDownCapture,P.onPointerDownCapture)}))});function To(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e),o=c.useRef(!1),r=c.useRef(()=>{});return c.useEffect(()=>{const i=s=>{if(s.target&&!o.current){let u=function(){hn(So,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}o.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Oo(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e),o=c.useRef(!1);return c.useEffect(()=>{const r=i=>{i.target&&!o.current&&hn(Co,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Vt(){const e=new CustomEvent(yt);document.dispatchEvent(e)}function hn(e,t,n,{discrete:o}){const r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?yo(r,i):r.dispatchEvent(i)}let ft=0;function Ao(){c.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:jt()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:jt()),ft++,()=>{ft===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(o=>o.remove()),ft--}},[])}function jt(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const pt="focusScope.autoFocusOnMount",mt="focusScope.autoFocusOnUnmount",Ut={bubbles:!1,cancelable:!0},Do=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:i,...a}=e,[s,l]=c.useState(null),u=ue(r),p=ue(i),d=c.useRef(null),w=K(t,f=>l(f)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(o){let f=function($){if(m.paused||!s)return;const b=$.target;s.contains(b)?d.current=b:me(d.current,{select:!0})},v=function($){if(m.paused||!s)return;const b=$.relatedTarget;b!==null&&(s.contains(b)||me(d.current,{select:!0}))},g=function($){const b=document.activeElement;for(const y of $)y.removedNodes.length>0&&(s!=null&&s.contains(b)||me(s))};document.addEventListener("focusin",f),document.addEventListener("focusout",v);const x=new MutationObserver(g);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",v),x.disconnect()}}},[o,s,m.paused]),c.useEffect(()=>{if(s){Kt.add(m);const f=document.activeElement;if(!s.contains(f)){const g=new CustomEvent(pt,Ut);s.addEventListener(pt,u),s.dispatchEvent(g),g.defaultPrevented||(_o(Lo(vn(s)),{select:!0}),document.activeElement===f&&me(s))}return()=>{s.removeEventListener(pt,u),setTimeout(()=>{const g=new CustomEvent(mt,Ut);s.addEventListener(mt,p),s.dispatchEvent(g),g.defaultPrevented||me(f??document.body,{select:!0}),s.removeEventListener(mt,p),Kt.remove(m)},0)}}},[s,u,p,m]);const h=c.useCallback(f=>{if(!n&&!o||m.paused)return;const v=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,g=document.activeElement;if(v&&g){const x=f.currentTarget,[$,b]=Io(x);$&&b?!f.shiftKey&&g===b?(f.preventDefault(),n&&me($,{select:!0})):f.shiftKey&&g===$&&(f.preventDefault(),n&&me(b,{select:!0})):g===x&&f.preventDefault()}},[n,o,m.paused]);return c.createElement(Z.div,T({tabIndex:-1},a,{ref:w,onKeyDown:h}))});function _o(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(me(o,{select:t}),document.activeElement!==n)return}function Io(e){const t=vn(e),n=zt(t,e),o=zt(t.reverse(),e);return[n,o]}function vn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function zt(e,t){for(const n of e)if(!No(n,{upTo:t}))return n}function No(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Mo(e){return e instanceof HTMLInputElement&&"select"in e}function me(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Mo(e)&&t&&e.select()}}const Kt=ko();function ko(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Yt(e,t),e.unshift(t)},remove(t){var n;e=Yt(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function Yt(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Lo(e){return e.filter(t=>t.tagName!=="A")}const te=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},Fo=eo.useId||(()=>{});let Bo=0;function gn(e){const[t,n]=c.useState(Fo());return te(()=>{n(o=>o??String(Bo++))},[e]),e||(t?`radix-${t}`:"")}const Wo=["top","right","bottom","left"],ge=Math.min,G=Math.max,Je=Math.round,Ue=Math.floor,ie=e=>({x:e,y:e}),Ho={left:"right",right:"left",bottom:"top",top:"bottom"},Vo={start:"end",end:"start"};function Et(e,t,n){return G(e,ge(t,n))}function de(e,t){return typeof e=="function"?e(t):e}function fe(e){return e.split("-")[0]}function _e(e){return e.split("-")[1]}function At(e){return e==="x"?"y":"x"}function Dt(e){return e==="y"?"height":"width"}function we(e){return["top","bottom"].includes(fe(e))?"y":"x"}function _t(e){return At(we(e))}function jo(e,t,n){n===void 0&&(n=!1);const o=_e(e),r=_t(e),i=Dt(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=et(a)),[a,et(a)]}function Uo(e){const t=et(e);return[St(e),t,St(t)]}function St(e){return e.replace(/start|end/g,t=>Vo[t])}function zo(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:a;default:return[]}}function Ko(e,t,n,o){const r=_e(e);let i=zo(fe(e),n==="start",o);return r&&(i=i.map(a=>a+"-"+r),t&&(i=i.concat(i.map(St)))),i}function et(e){return e.replace(/left|right|bottom|top/g,t=>Ho[t])}function Yo(e){return{top:0,right:0,bottom:0,left:0,...e}}function wn(e){return typeof e!="number"?Yo(e):{top:e,right:e,bottom:e,left:e}}function tt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function Xt(e,t,n){let{reference:o,floating:r}=e;const i=we(t),a=_t(t),s=Dt(a),l=fe(t),u=i==="y",p=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,w=o[s]/2-r[s]/2;let m;switch(l){case"top":m={x:p,y:o.y-r.height};break;case"bottom":m={x:p,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:d};break;case"left":m={x:o.x-r.width,y:d};break;default:m={x:o.x,y:o.y}}switch(_e(t)){case"start":m[a]-=w*(n&&u?-1:1);break;case"end":m[a]+=w*(n&&u?-1:1);break}return m}const Xo=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:p,y:d}=Xt(u,o,l),w=o,m={},h=0;for(let f=0;f<s.length;f++){const{name:v,fn:g}=s[f],{x,y:$,data:b,reset:y}=await g({x:p,y:d,initialPlacement:o,placement:w,strategy:r,middlewareData:m,rects:u,platform:a,elements:{reference:e,floating:t}});p=x??p,d=$??d,m={...m,[v]:{...m[v],...b}},y&&h<=50&&(h++,typeof y=="object"&&(y.placement&&(w=y.placement),y.rects&&(u=y.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):y.rects),{x:p,y:d}=Xt(u,w,l)),f=-1)}return{x:p,y:d,placement:w,strategy:r,middlewareData:m}};async function We(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:w=!1,padding:m=0}=de(t,e),h=wn(m),v=s[w?d==="floating"?"reference":"floating":d],g=tt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:p,strategy:l})),x=d==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,$=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),b=await(i.isElement==null?void 0:i.isElement($))?await(i.getScale==null?void 0:i.getScale($))||{x:1,y:1}:{x:1,y:1},y=tt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:$,strategy:l}):x);return{top:(g.top-y.top+h.top)/b.y,bottom:(y.bottom-g.bottom+h.bottom)/b.y,left:(g.left-y.left+h.left)/b.x,right:(y.right-g.right+h.right)/b.x}}const Zo=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:u,padding:p=0}=de(e,t)||{};if(u==null)return{};const d=wn(p),w={x:n,y:o},m=_t(r),h=Dt(m),f=await a.getDimensions(u),v=m==="y",g=v?"top":"left",x=v?"bottom":"right",$=v?"clientHeight":"clientWidth",b=i.reference[h]+i.reference[m]-w[m]-i.floating[h],y=w[m]-i.reference[m],P=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let S=P?P[$]:0;(!S||!await(a.isElement==null?void 0:a.isElement(P)))&&(S=s.floating[$]||i.floating[h]);const E=b/2-y/2,O=S/2-f[h]/2-1,F=ge(d[g],O),I=ge(d[x],O),B=F,A=S-f[h]-I,D=S/2-f[h]/2+E,N=Et(B,D,A),_=!l.arrow&&_e(r)!=null&&D!==N&&i.reference[h]/2-(D<B?F:I)-f[h]/2<0,W=_?D<B?D-B:D-A:0;return{[m]:w[m]+W,data:{[m]:N,centerOffset:D-N-W,..._&&{alignmentOffset:W}},reset:_}}}),qo=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:p=!0,crossAxis:d=!0,fallbackPlacements:w,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:f=!0,...v}=de(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const g=fe(r),x=we(s),$=fe(s)===s,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),y=w||($||!f?[et(s)]:Uo(s)),P=h!=="none";!w&&P&&y.push(...Ko(s,f,h,b));const S=[s,...y],E=await We(t,v),O=[];let F=((o=i.flip)==null?void 0:o.overflows)||[];if(p&&O.push(E[g]),d){const D=jo(r,a,b);O.push(E[D[0]],E[D[1]])}if(F=[...F,{placement:r,overflows:O}],!O.every(D=>D<=0)){var I,B;const D=(((I=i.flip)==null?void 0:I.index)||0)+1,N=S[D];if(N)return{data:{index:D,overflows:F},reset:{placement:N}};let _=(B=F.filter(W=>W.overflows[0]<=0).sort((W,R)=>W.overflows[1]-R.overflows[1])[0])==null?void 0:B.placement;if(!_)switch(m){case"bestFit":{var A;const W=(A=F.filter(R=>{if(P){const V=we(R.placement);return V===x||V==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(V=>V>0).reduce((V,z)=>V+z,0)]).sort((R,V)=>R[1]-V[1])[0])==null?void 0:A[0];W&&(_=W);break}case"initialPlacement":_=s;break}if(r!==_)return{reset:{placement:_}}}return{}}}};function Zt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function qt(e){return Wo.some(t=>e[t]>=0)}const Go=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=de(e,t);switch(o){case"referenceHidden":{const i=await We(t,{...r,elementContext:"reference"}),a=Zt(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:qt(a)}}}case"escaped":{const i=await We(t,{...r,altBoundary:!0}),a=Zt(i,n.floating);return{data:{escapedOffsets:a,escaped:qt(a)}}}default:return{}}}}};async function Qo(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=fe(n),s=_e(n),l=we(n)==="y",u=["left","top"].includes(a)?-1:1,p=i&&l?-1:1,d=de(t,e);let{mainAxis:w,crossAxis:m,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof h=="number"&&(m=s==="end"?h*-1:h),l?{x:m*p,y:w*u}:{x:w*u,y:m*p}}const Jo=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:a,middlewareData:s}=t,l=await Qo(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:a}}}}},er=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:v=>{let{x:g,y:x}=v;return{x:g,y:x}}},...l}=de(e,t),u={x:n,y:o},p=await We(t,l),d=we(fe(r)),w=At(d);let m=u[w],h=u[d];if(i){const v=w==="y"?"top":"left",g=w==="y"?"bottom":"right",x=m+p[v],$=m-p[g];m=Et(x,m,$)}if(a){const v=d==="y"?"top":"left",g=d==="y"?"bottom":"right",x=h+p[v],$=h-p[g];h=Et(x,h,$)}const f=s.fn({...t,[w]:m,[d]:h});return{...f,data:{x:f.x-n,y:f.y-o,enabled:{[w]:i,[d]:a}}}}}},tr=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=de(e,t),p={x:n,y:o},d=we(r),w=At(d);let m=p[w],h=p[d];const f=de(s,t),v=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(l){const $=w==="y"?"height":"width",b=i.reference[w]-i.floating[$]+v.mainAxis,y=i.reference[w]+i.reference[$]-v.mainAxis;m<b?m=b:m>y&&(m=y)}if(u){var g,x;const $=w==="y"?"width":"height",b=["top","left"].includes(fe(r)),y=i.reference[d]-i.floating[$]+(b&&((g=a.offset)==null?void 0:g[d])||0)+(b?0:v.crossAxis),P=i.reference[d]+i.reference[$]+(b?0:((x=a.offset)==null?void 0:x[d])||0)-(b?v.crossAxis:0);h<y?h=y:h>P&&(h=P)}return{[w]:m,[d]:h}}}},nr=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...u}=de(e,t),p=await We(t,u),d=fe(r),w=_e(r),m=we(r)==="y",{width:h,height:f}=i.floating;let v,g;d==="top"||d==="bottom"?(v=d,g=w===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(g=d,v=w==="end"?"top":"bottom");const x=f-p.top-p.bottom,$=h-p.left-p.right,b=ge(f-p[v],x),y=ge(h-p[g],$),P=!t.middlewareData.shift;let S=b,E=y;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=$),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(S=x),P&&!w){const F=G(p.left,0),I=G(p.right,0),B=G(p.top,0),A=G(p.bottom,0);m?E=h-2*(F!==0||I!==0?F+I:G(p.left,p.right)):S=f-2*(B!==0||A!==0?B+A:G(p.top,p.bottom))}await l({...t,availableWidth:E,availableHeight:S});const O=await a.getDimensions(s.floating);return h!==O.width||f!==O.height?{reset:{rects:!0}}:{}}}};function rt(){return typeof window<"u"}function Ie(e){return xn(e)?(e.nodeName||"").toLowerCase():"#document"}function Q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ae(e){var t;return(t=(xn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xn(e){return rt()?e instanceof Node||e instanceof Q(e).Node:!1}function re(e){return rt()?e instanceof Element||e instanceof Q(e).Element:!1}function se(e){return rt()?e instanceof HTMLElement||e instanceof Q(e).HTMLElement:!1}function Gt(e){return!rt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Q(e).ShadowRoot}function Ve(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ce(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function or(e){return["table","td","th"].includes(Ie(e))}function ct(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function It(e){const t=Nt(),n=re(e)?ce(e):e;return["transform","translate","scale","rotate","perspective"].some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(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 rr(e){let t=xe(e);for(;se(t)&&!Ae(t);){if(It(t))return t;if(ct(t))return null;t=xe(t)}return null}function Nt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ae(e){return["html","body","#document"].includes(Ie(e))}function ce(e){return Q(e).getComputedStyle(e)}function it(e){return re(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xe(e){if(Ie(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Gt(e)&&e.host||ae(e);return Gt(t)?t.host:t}function $n(e){const t=xe(e);return Ae(t)?e.ownerDocument?e.ownerDocument.body:e.body:se(t)&&Ve(t)?t:$n(t)}function He(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=$n(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),a=Q(r);if(i){const s=Ct(a);return t.concat(a,a.visualViewport||[],Ve(r)?r:[],s&&n?He(s):[])}return t.concat(r,He(r,[],n))}function Ct(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function bn(e){const t=ce(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=se(e),i=r?e.offsetWidth:n,a=r?e.offsetHeight:o,s=Je(n)!==i||Je(o)!==a;return s&&(n=i,o=a),{width:n,height:o,$:s}}function Mt(e){return re(e)?e:e.contextElement}function Te(e){const t=Mt(e);if(!se(t))return ie(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=bn(t);let a=(i?Je(n.width):n.width)/o,s=(i?Je(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const cr=ie(0);function yn(e){const t=Q(e);return!Nt()||!t.visualViewport?cr:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ir(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Q(e)?!1:t}function $e(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=Mt(e);let a=ie(1);t&&(o?re(o)&&(a=Te(o)):a=Te(e));const s=ir(i,n,o)?yn(i):ie(0);let l=(r.left+s.x)/a.x,u=(r.top+s.y)/a.y,p=r.width/a.x,d=r.height/a.y;if(i){const w=Q(i),m=o&&re(o)?Q(o):o;let h=w,f=Ct(h);for(;f&&o&&m!==h;){const v=Te(f),g=f.getBoundingClientRect(),x=ce(f),$=g.left+(f.clientLeft+parseFloat(x.paddingLeft))*v.x,b=g.top+(f.clientTop+parseFloat(x.paddingTop))*v.y;l*=v.x,u*=v.y,p*=v.x,d*=v.y,l+=$,u+=b,h=Q(f),f=Ct(h)}}return tt({width:p,height:d,x:l,y:u})}function kt(e,t){const n=it(e).scrollLeft;return t?t.left+n:$e(ae(e)).left+n}function En(e,t,n){n===void 0&&(n=!1);const o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-(n?0:kt(e,o)),i=o.top+t.scrollTop;return{x:r,y:i}}function sr(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",a=ae(o),s=t?ct(t.floating):!1;if(o===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},u=ie(1);const p=ie(0),d=se(o);if((d||!d&&!i)&&((Ie(o)!=="body"||Ve(a))&&(l=it(o)),se(o))){const m=$e(o);u=Te(o),p.x=m.x+o.clientLeft,p.y=m.y+o.clientTop}const w=a&&!d&&!i?En(a,l,!0):ie(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+p.x+w.x,y:n.y*u.y-l.scrollTop*u.y+p.y+w.y}}function ar(e){return Array.from(e.getClientRects())}function lr(e){const t=ae(e),n=it(e),o=e.ownerDocument.body,r=G(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=G(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+kt(e);const s=-n.scrollTop;return ce(o).direction==="rtl"&&(a+=G(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:a,y:s}}function ur(e,t){const n=Q(e),o=ae(e),r=n.visualViewport;let i=o.clientWidth,a=o.clientHeight,s=0,l=0;if(r){i=r.width,a=r.height;const u=Nt();(!u||u&&t==="fixed")&&(s=r.offsetLeft,l=r.offsetTop)}return{width:i,height:a,x:s,y:l}}function dr(e,t){const n=$e(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=se(e)?Te(e):ie(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=r*i.x,u=o*i.y;return{width:a,height:s,x:l,y:u}}function Qt(e,t,n){let o;if(t==="viewport")o=ur(e,n);else if(t==="document")o=lr(ae(e));else if(re(t))o=dr(t,n);else{const r=yn(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return tt(o)}function Sn(e,t){const n=xe(e);return n===t||!re(n)||Ae(n)?!1:ce(n).position==="fixed"||Sn(n,t)}function fr(e,t){const n=t.get(e);if(n)return n;let o=He(e,[],!1).filter(s=>re(s)&&Ie(s)!=="body"),r=null;const i=ce(e).position==="fixed";let a=i?xe(e):e;for(;re(a)&&!Ae(a);){const s=ce(a),l=It(a);!l&&s.position==="fixed"&&(r=null),(i?!l&&!r:!l&&s.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||Ve(a)&&!l&&Sn(e,a))?o=o.filter(p=>p!==a):r=s,a=xe(a)}return t.set(e,o),o}function pr(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[...n==="clippingAncestors"?ct(t)?[]:fr(t,this._c):[].concat(n),o],s=a[0],l=a.reduce((u,p)=>{const d=Qt(t,p,r);return u.top=G(d.top,u.top),u.right=ge(d.right,u.right),u.bottom=ge(d.bottom,u.bottom),u.left=G(d.left,u.left),u},Qt(t,s,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function mr(e){const{width:t,height:n}=bn(e);return{width:t,height:n}}function hr(e,t,n){const o=se(t),r=ae(t),i=n==="fixed",a=$e(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=ie(0);if(o||!o&&!i)if((Ie(t)!=="body"||Ve(r))&&(s=it(t)),o){const w=$e(t,!0,i,t);l.x=w.x+t.clientLeft,l.y=w.y+t.clientTop}else r&&(l.x=kt(r));const u=r&&!o&&!i?En(r,s):ie(0),p=a.left+s.scrollLeft-l.x-u.x,d=a.top+s.scrollTop-l.y-u.y;return{x:p,y:d,width:a.width,height:a.height}}function ht(e){return ce(e).position==="static"}function Jt(e,t){if(!se(e)||ce(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ae(e)===n&&(n=n.ownerDocument.body),n}function Cn(e,t){const n=Q(e);if(ct(e))return n;if(!se(e)){let r=xe(e);for(;r&&!Ae(r);){if(re(r)&&!ht(r))return r;r=xe(r)}return n}let o=Jt(e,t);for(;o&&or(o)&&ht(o);)o=Jt(o,t);return o&&Ae(o)&&ht(o)&&!It(o)?n:o||rr(e)||n}const vr=async function(e){const t=this.getOffsetParent||Cn,n=this.getDimensions,o=await n(e.floating);return{reference:hr(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function gr(e){return ce(e).direction==="rtl"}const wr={convertOffsetParentRelativeRectToViewportRelativeRect:sr,getDocumentElement:ae,getClippingRect:pr,getOffsetParent:Cn,getElementRects:vr,getClientRects:ar,getDimensions:mr,getScale:Te,isElement:re,isRTL:gr};function Pn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xr(e,t){let n=null,o;const r=ae(e);function i(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:p,top:d,width:w,height:m}=u;if(s||t(),!w||!m)return;const h=Ue(d),f=Ue(r.clientWidth-(p+w)),v=Ue(r.clientHeight-(d+m)),g=Ue(p),$={rootMargin:-h+"px "+-f+"px "+-v+"px "+-g+"px",threshold:G(0,ge(1,l))||1};let b=!0;function y(P){const S=P[0].intersectionRatio;if(S!==l){if(!b)return a();S?a(!1,S):o=setTimeout(()=>{a(!1,1e-7)},1e3)}S===1&&!Pn(u,e.getBoundingClientRect())&&a(),b=!1}try{n=new IntersectionObserver(y,{...$,root:r.ownerDocument})}catch{n=new IntersectionObserver(y,$)}n.observe(e)}return a(!0),i}function $r(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=Mt(e),p=r||i?[...u?He(u):[],...He(t)]:[];p.forEach(g=>{r&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const d=u&&s?xr(u,n):null;let w=-1,m=null;a&&(m=new ResizeObserver(g=>{let[x]=g;x&&x.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var $;($=m)==null||$.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let h,f=l?$e(e):null;l&&v();function v(){const g=$e(e);f&&!Pn(f,g)&&n(),f=g,h=requestAnimationFrame(v)}return n(),()=>{var g;p.forEach(x=>{r&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),d==null||d(),(g=m)==null||g.disconnect(),m=null,l&&cancelAnimationFrame(h)}}const br=Jo,yr=er,Er=qo,Sr=nr,Cr=Go,en=Zo,Pr=tr,Rr=(e,t,n)=>{const o=new Map,r={platform:wr,...n},i={...r.platform,_c:o};return Xo(e,t,{...r,platform:i})};var qe=typeof document<"u"?c.useLayoutEffect:c.useEffect;function nt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!nt(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&e.$$typeof)&&!nt(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Rn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tn(e,t){const n=Rn(e);return Math.round(t*n)/n}function vt(e){const t=c.useRef(e);return qe(()=>{t.current=e}),t}function Tr(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[p,d]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[w,m]=c.useState(o);nt(w,o)||m(o);const[h,f]=c.useState(null),[v,g]=c.useState(null),x=c.useCallback(R=>{R!==P.current&&(P.current=R,f(R))},[]),$=c.useCallback(R=>{R!==S.current&&(S.current=R,g(R))},[]),b=i||h,y=a||v,P=c.useRef(null),S=c.useRef(null),E=c.useRef(p),O=l!=null,F=vt(l),I=vt(r),B=vt(u),A=c.useCallback(()=>{if(!P.current||!S.current)return;const R={placement:t,strategy:n,middleware:w};I.current&&(R.platform=I.current),Rr(P.current,S.current,R).then(V=>{const z={...V,isPositioned:B.current!==!1};D.current&&!nt(E.current,z)&&(E.current=z,ot.flushSync(()=>{d(z)}))})},[w,t,n,I,B]);qe(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(R=>({...R,isPositioned:!1})))},[u]);const D=c.useRef(!1);qe(()=>(D.current=!0,()=>{D.current=!1}),[]),qe(()=>{if(b&&(P.current=b),y&&(S.current=y),b&&y){if(F.current)return F.current(b,y,A);A()}},[b,y,A,F,O]);const N=c.useMemo(()=>({reference:P,floating:S,setReference:x,setFloating:$}),[x,$]),_=c.useMemo(()=>({reference:b,floating:y}),[b,y]),W=c.useMemo(()=>{const R={position:n,left:0,top:0};if(!_.floating)return R;const V=tn(_.floating,p.x),z=tn(_.floating,p.y);return s?{...R,transform:"translate("+V+"px, "+z+"px)",...Rn(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:z}},[n,s,_.floating,p.x,p.y]);return c.useMemo(()=>({...p,update:A,refs:N,elements:_,floatingStyles:W}),[p,A,N,_,W])}const Or=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?en({element:o.current,padding:r}).fn(n):{}:o?en({element:o,padding:r}).fn(n):{}}}},Ar=(e,t)=>({...br(e),options:[e,t]}),Dr=(e,t)=>({...yr(e),options:[e,t]}),_r=(e,t)=>({...Pr(e),options:[e,t]}),Ir=(e,t)=>({...Er(e),options:[e,t]}),Nr=(e,t)=>({...Sr(e),options:[e,t]}),Mr=(e,t)=>({...Cr(e),options:[e,t]}),kr=(e,t)=>({...Or(e),options:[e,t]});function Lr(e){const[t,n]=c.useState(void 0);return te(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}const Tn="Popper",[On,An]=Ot(Tn),[Fr,Dn]=On(Tn),Br=e=>{const{__scopePopper:t,children:n}=e,[o,r]=c.useState(null);return c.createElement(Fr,{scope:t,anchor:o,onAnchorChange:r},n)},Wr="PopperAnchor",Hr=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,i=Dn(Wr,n),a=c.useRef(null),s=K(t,a);return c.useEffect(()=>{i.onAnchorChange((o==null?void 0:o.current)||a.current)}),o?null:c.createElement(Z.div,T({},r,{ref:s}))}),_n="PopperContent",[Vr,_i]=On(_n),jr=c.forwardRef((e,t)=>{var n,o,r,i,a,s,l,u;const{__scopePopper:p,side:d="bottom",sideOffset:w=0,align:m="center",alignOffset:h=0,arrowPadding:f=0,collisionBoundary:v=[],collisionPadding:g=0,sticky:x="partial",hideWhenDetached:$=!1,avoidCollisions:b=!0,onPlaced:y,...P}=e,S=Dn(_n,p),[E,O]=c.useState(null),F=K(t,X=>O(X)),[I,B]=c.useState(null),A=Lr(I),D=(n=A==null?void 0:A.width)!==null&&n!==void 0?n:0,N=(o=A==null?void 0:A.height)!==null&&o!==void 0?o:0,_=d+(m!=="center"?"-"+m:""),W=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},R=Array.isArray(v)?v:[v],V=R.length>0,z={padding:W,boundary:R.filter(Ur),altBoundary:V},{refs:Ee,floatingStyles:Se,placement:Me,isPositioned:ne,middlewareData:oe}=Tr({strategy:"fixed",placement:_,whileElementsMounted:$r,elements:{reference:S.anchor},middleware:[Ar({mainAxis:w+N,alignmentAxis:h}),b&&Dr({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?_r():void 0,...z}),b&&Ir({...z}),Nr({...z,apply:({elements:X,rects:ke,availableWidth:Le,availableHeight:Fe})=>{const{width:Gn,height:Qn}=ke.reference,je=X.floating.style;je.setProperty("--radix-popper-available-width",`${Le}px`),je.setProperty("--radix-popper-available-height",`${Fe}px`),je.setProperty("--radix-popper-anchor-width",`${Gn}px`),je.setProperty("--radix-popper-anchor-height",`${Qn}px`)}}),I&&kr({element:I,padding:f}),zr({arrowWidth:D,arrowHeight:N}),$&&Mr({strategy:"referenceHidden"})]}),[pe,C]=In(Me),M=ue(y);te(()=>{ne&&(M==null||M())},[ne,M]);const Y=(r=oe.arrow)===null||r===void 0?void 0:r.x,H=(i=oe.arrow)===null||i===void 0?void 0:i.y,k=((a=oe.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[L,q]=c.useState();return te(()=>{E&&q(window.getComputedStyle(E).zIndex)},[E]),c.createElement("div",{ref:Ee.setFloating,"data-radix-popper-content-wrapper":"",style:{...Se,transform:ne?Se.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:L,"--radix-popper-transform-origin":[(s=oe.transformOrigin)===null||s===void 0?void 0:s.x,(l=oe.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:e.dir},c.createElement(Vr,{scope:p,placedSide:pe,onArrowChange:B,arrowX:Y,arrowY:H,shouldHideArrow:k},c.createElement(Z.div,T({"data-side":pe,"data-align":C},P,{ref:F,style:{...P.style,animation:ne?void 0:"none",opacity:(u=oe.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))});function Ur(e){return e!==null}const zr=e=>({name:"transformOrigin",options:e,fn(t){var n,o,r,i,a;const{placement:s,rects:l,middlewareData:u}=t,d=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,w=d?0:e.arrowWidth,m=d?0:e.arrowHeight,[h,f]=In(s),v={start:"0%",center:"50%",end:"100%"}[f],g=((o=(r=u.arrow)===null||r===void 0?void 0:r.x)!==null&&o!==void 0?o:0)+w/2,x=((i=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+m/2;let $="",b="";return h==="bottom"?($=d?v:`${g}px`,b=`${-m}px`):h==="top"?($=d?v:`${g}px`,b=`${l.floating.height+m}px`):h==="right"?($=`${-m}px`,b=d?v:`${x}px`):h==="left"&&($=`${l.floating.width+m}px`,b=d?v:`${x}px`),{data:{x:$,y:b}}}});function In(e){const[t,n="center"]=e.split("-");return[t,n]}const Kr=Br,Yr=Hr,Xr=jr,Zr=c.forwardRef((e,t)=>{var n;const{container:o=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...r}=e;return o?to.createPortal(c.createElement(Z.div,T({},r,{ref:t})),o):null});function nn({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=qr({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:o,s=ue(n),l=c.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}else r(u)},[i,e,r,s]);return[a,l]}function qr({defaultProp:e,onChange:t}){const n=c.useState(e),[o]=n,r=c.useRef(o),i=ue(t);return c.useEffect(()=>{r.current!==o&&(i(o),r.current=o)},[o,r,i]),n}function Gr(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Qr(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Jr(...e){return t=>e.forEach(n=>Qr(n,t))}const Nn=c.forwardRef((e,t)=>{const{children:n,...o}=e,r=c.Children.toArray(n),i=r.find(tc);if(i){const a=i.props.children,s=r.map(l=>l===i?c.Children.count(a)>1?c.Children.only(null):c.isValidElement(a)?a.props.children:null:l);return c.createElement(Pt,T({},o,{ref:t}),c.isValidElement(a)?c.cloneElement(a,void 0,s):null)}return c.createElement(Pt,T({},o,{ref:t}),n)});Nn.displayName="Slot";const Pt=c.forwardRef((e,t)=>{const{children:n,...o}=e;return c.isValidElement(n)?c.cloneElement(n,{...nc(o,n.props),ref:t?Jr(t,n.ref):n.ref}):c.Children.count(n)>1?c.Children.only(null):null});Pt.displayName="SlotClone";const ec=({children:e})=>c.createElement(c.Fragment,null,e);function tc(e){return c.isValidElement(e)&&e.type===ec}function nc(e,t){const n={...t};for(const o in t){const r=e[o],i=t[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...s)=>{i(...s),r(...s)}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}const oc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],rc=oc.reduce((e,t)=>{const n=c.forwardRef((o,r)=>{const{asChild:i,...a}=o,s=i?Nn:t;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(s,T({},a,{ref:r}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),cc=c.forwardRef((e,t)=>c.createElement(rc.span,T({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));var ic=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ce=new WeakMap,ze=new WeakMap,Ke={},gt=0,Mn=function(e){return e&&(e.host||Mn(e.parentNode))},sc=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Mn(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ac=function(e,t,n,o){var r=sc(t,Array.isArray(e)?e:[e]);Ke[n]||(Ke[n]=new WeakMap);var i=Ke[n],a=[],s=new Set,l=new Set(r),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};r.forEach(u);var p=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(w){if(s.has(w))p(w);else try{var m=w.getAttribute(o),h=m!==null&&m!=="false",f=(Ce.get(w)||0)+1,v=(i.get(w)||0)+1;Ce.set(w,f),i.set(w,v),a.push(w),f===1&&h&&ze.set(w,!0),v===1&&w.setAttribute(n,"true"),h||w.setAttribute(o,"true")}catch(g){console.error("aria-hidden: cannot operate on ",w,g)}})};return p(t),s.clear(),gt++,function(){a.forEach(function(d){var w=Ce.get(d)-1,m=i.get(d)-1;Ce.set(d,w),i.set(d,m),w||(ze.has(d)||d.removeAttribute(o),ze.delete(d)),m||d.removeAttribute(n)}),gt--,gt||(Ce=new WeakMap,Ce=new WeakMap,ze=new WeakMap,Ke={})}},lc=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=ic(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live]"))),ac(o,r,n,"aria-hidden")):function(){return null}},Ge="right-scroll-bar-position",Qe="width-before-scroll-bar",uc="with-scroll-bars-hidden",dc="--removed-body-scroll-bar-size";function wt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function fc(e,t){var n=c.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var pc=typeof window<"u"?c.useLayoutEffect:c.useEffect,on=new WeakMap;function mc(e,t){var n=fc(null,function(o){return e.forEach(function(r){return wt(r,o)})});return pc(function(){var o=on.get(n);if(o){var r=new Set(o),i=new Set(e),a=n.current;r.forEach(function(s){i.has(s)||wt(s,null)}),i.forEach(function(s){r.has(s)||wt(s,a)})}on.set(n,e)},[e]),n}function hc(e){return e}function vc(e,t){t===void 0&&(t=hc);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,o);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(o=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){o=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var l=function(){var p=a;a=[],p.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(p){a.push(p),u()},filter:function(p){return a=a.filter(p),n}}}};return r}function gc(e){e===void 0&&(e={});var t=vc(null);return t.options=he({async:!0,ssr:!1},e),t}var kn=function(e){var t=e.sideCar,n=pn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return c.createElement(o,he({},n))};kn.isSideCarExport=!0;function wc(e,t){return e.useMedium(t),kn}var Ln=gc(),xt=function(){},st=c.forwardRef(function(e,t){var n=c.useRef(null),o=c.useState({onScrollCapture:xt,onWheelCapture:xt,onTouchMoveCapture:xt}),r=o[0],i=o[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,p=e.enabled,d=e.shards,w=e.sideCar,m=e.noIsolation,h=e.inert,f=e.allowPinchZoom,v=e.as,g=v===void 0?"div":v,x=pn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),$=w,b=mc([n,t]),y=he(he({},x),r);return c.createElement(c.Fragment,null,p&&c.createElement($,{sideCar:Ln,removeScrollBar:u,shards:d,noIsolation:m,inert:h,setCallbacks:i,allowPinchZoom:!!f,lockRef:n}),a?c.cloneElement(c.Children.only(s),he(he({},y),{ref:b})):c.createElement(g,he({},y,{className:l,ref:b}),s))});st.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};st.classNames={fullWidth:Qe,zeroRight:Ge};var xc=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $c(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=xc();return t&&e.setAttribute("nonce",t),e}function bc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function yc(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ec=function(){var e=0,t=null;return{add:function(n){e==0&&(t=$c())&&(bc(t,n),yc(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Sc=function(){var e=Ec();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Fn=function(){var e=Sc(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Cc={left:0,top:0,right:0,gap:0},$t=function(e){return parseInt(e||"",10)||0},Pc=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[$t(n),$t(o),$t(r)]},Rc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Cc;var t=Pc(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Tc=Fn(),Oe="data-scroll-locked",Oc=function(e,t,n,o){var r=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
2
2
  .`.concat(uc,` {
3
3
  overflow: hidden `).concat(o,`;
4
4
  padding-right: `).concat(s,"px ").concat(o,`;
@@ -0,0 +1 @@
1
+ import{t as u,U as c,a as m,w as a,j as s,e as f}from"./index-C22hdM_h.js";import{L as g}from"./context-B0V9EzWJ.js";import x from"./ModelLineage-BFuK5Bgk.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./Input-CxOCLTNw.js";import"./editor-CmeEFdEz.js";import"./file-DY5SRTK1.js";import"./project-CtAE3tsj.js";import"./help-6Q7f7fjd.js";import"./SourceList-CTL41Fia.js";import"./index-BWibl-Ee.js";import"./transition-CiMBgn_Y.js";import"./ListboxShow-YBO3HIHQ.js";import"./SearchList-Lag39srv.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};
@@ -1 +1 @@
1
- import{r as u,R as Q,j as S,b as Oe,c as _}from"./index-COnjINWU.js";import{R as oe,i as P,o as f,U as E,y as k,u as F,r as Se,J as Le,K as we,p as H,H as Ie,k as q,b as Te,F as De,c as $e,C,I as V,h as X,j as Fe,G as Pe,z as g,A as Ee,T as ke,x as ee,P as Ce,D as je}from"./transition-DjPYSO2n.js";import{n as Ne,p as Ae}from"./Input-CJirBrKe.js";function Me({title:e,titleId:r,...t},o){return u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":r},t),e?u.createElement("title",{id:r},e):null,u.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z"}))}const Be=u.forwardRef(Me);function ae(e,r){let[t,o]=u.useState(e),a=oe(e);return P(()=>o(a.current),[a,o,...r]),t}function Ue(e,r,t){let[o,a]=u.useState(t),n=e!==void 0,l=u.useRef(n),s=u.useRef(!1),p=u.useRef(!1);return n&&!l.current&&!s.current?(s.current=!0,l.current=n,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!n&&l.current&&!p.current&&(p.current=!0,l.current=n,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[n?e:o,f(v=>(n||a(v),r==null?void 0:r(v)))]}function te(e){return[e.screenX,e.screenY]}function Qe(){let e=u.useRef([-1,-1]);return{wasMoved(r){let t=te(r);return e.current[0]===t[0]&&e.current[1]===t[1]?!1:(e.current=t,!0)},update(r){e.current=te(r)}}}function ze(e){throw new Error("Unexpected object: "+e)}var L=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(L||{});function He(e,r){let t=r.resolveItems();if(t.length<=0)return null;let o=r.resolveActiveIndex(),a=o??-1;switch(e.focus){case 0:{for(let n=0;n<t.length;++n)if(!r.resolveDisabled(t[n],n,t))return n;return o}case 1:{for(let n=a-1;n>=0;--n)if(!r.resolveDisabled(t[n],n,t))return n;return o}case 2:{for(let n=a+1;n<t.length;++n)if(!r.resolveDisabled(t[n],n,t))return n;return o}case 3:{for(let n=t.length-1;n>=0;--n)if(!r.resolveDisabled(t[n],n,t))return n;return o}case 4:{for(let n=0;n<t.length;++n)if(r.resolveId(t[n],n,t)===e.id)return n;return o}case 5:return null;default:ze(e)}}function le(e={},r=null,t=[]){for(let[o,a]of Object.entries(e))se(t,ie(r,o),a);return t}function ie(e,r){return e?e+"["+r+"]":r}function se(e,r,t){if(Array.isArray(t))for(let[o,a]of t.entries())se(e,ie(r,o.toString()),a);else t instanceof Date?e.push([r,t.toISOString()]):typeof t=="boolean"?e.push([r,t?"1":"0"]):typeof t=="string"?e.push([r,t]):typeof t=="number"?e.push([r,`${t}`]):t==null?e.push([r,""]):le(t,r,e)}function gt(e){var r,t;let o=(r=e==null?void 0:e.form)!=null?r:e.closest("form");if(o){for(let a of o.elements)if(a!==e&&(a.tagName==="INPUT"&&a.type==="submit"||a.tagName==="BUTTON"&&a.type==="submit"||a.nodeName==="INPUT"&&a.type==="image")){a.click();return}(t=o.requestSubmit)==null||t.call(o)}}let re=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function ne(e){var r,t;let o=(r=e.innerText)!=null?r:"",a=e.cloneNode(!0);if(!(a instanceof HTMLElement))return o;let n=!1;for(let s of a.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),n=!0;let l=n?(t=a.innerText)!=null?t:"":o;return re.test(l)&&(l=l.replace(re,"")),l}function qe(e){let r=e.getAttribute("aria-label");if(typeof r=="string")return r.trim();let t=e.getAttribute("aria-labelledby");if(t){let o=t.split(" ").map(a=>{let n=document.getElementById(a);if(n){let l=n.getAttribute("aria-label");return typeof l=="string"?l.trim():ne(n).trim()}return null}).filter(Boolean);if(o.length>0)return o.join(", ")}return ne(e).trim()}function Ve(e){let r=u.useRef(""),t=u.useRef("");return f(()=>{let o=e.current;if(!o)return"";let a=o.innerText;if(r.current===a)return t.current;let n=qe(o).trim().toLowerCase();return r.current=a,t.current=n,n})}var Ge=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ge||{}),Ke=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Ke||{}),We=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(We||{}),Xe=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.RegisterLabel=7]="RegisterLabel",e))(Xe||{});function W(e,r=t=>t){let t=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,o=Ce(r(e.options.slice()),n=>n.dataRef.current.domRef.current),a=t?o.indexOf(t):null;return a===-1&&(a=null),{options:o,activeOptionIndex:a}}let Ze={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let r=e.activeOptionIndex,{isSelected:t}=e.dataRef.current,o=e.options.findIndex(a=>t(a.dataRef.current.value));return o!==-1&&(r=o),{...e,listboxState:0,activeOptionIndex:r}},2(e,r){var t;if(e.dataRef.current.disabled||e.listboxState===1)return e;let o=W(e),a=He(r,{resolveItems:()=>o.options,resolveActiveIndex:()=>o.activeOptionIndex,resolveId:n=>n.id,resolveDisabled:n=>n.dataRef.current.disabled});return{...e,...o,searchQuery:"",activeOptionIndex:a,activationTrigger:(t=r.trigger)!=null?t:1}},3:(e,r)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let t=e.searchQuery!==""?0:1,o=e.searchQuery+r.value.toLowerCase(),a=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+t).concat(e.options.slice(0,e.activeOptionIndex+t)):e.options).find(l=>{var s;return!l.dataRef.current.disabled&&((s=l.dataRef.current.textValue)==null?void 0:s.startsWith(o))}),n=a?e.options.indexOf(a):-1;return n===-1||n===e.activeOptionIndex?{...e,searchQuery:o}:{...e,searchQuery:o,activeOptionIndex:n,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,r)=>{let t={id:r.id,dataRef:r.dataRef},o=W(e,a=>[...a,t]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(r.dataRef.current.value)&&(o.activeOptionIndex=o.options.indexOf(t)),{...e,...o}},6:(e,r)=>{let t=W(e,o=>{let a=o.findIndex(n=>n.id===r.id);return a!==-1&&o.splice(a,1),o});return{...e,...t,activationTrigger:1}},7:(e,r)=>({...e,labelId:r.id})},Z=u.createContext(null);Z.displayName="ListboxActionsContext";function j(e){let r=u.useContext(Z);if(r===null){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,j),t}return r}let J=u.createContext(null);J.displayName="ListboxDataContext";function N(e){let r=u.useContext(J);if(r===null){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,N),t}return r}function Je(e,r){return F(r.type,Ze,e,r)}let Ye=u.Fragment;function _e(e,r){let{value:t,defaultValue:o,form:a,name:n,onChange:l,by:s=(c,d)=>c===d,disabled:p=!1,horizontal:v=!1,multiple:h=!1,...I}=e;const $=v?"horizontal":"vertical";let T=k(r),[R=h?[]:void 0,w]=Ue(t,l,o),[x,i]=u.useReducer(Je,{dataRef:u.createRef(),listboxState:1,options:[],searchQuery:"",labelId:null,activeOptionIndex:null,activationTrigger:1}),m=u.useRef({static:!1,hold:!1}),A=u.useRef(null),M=u.useRef(null),G=u.useRef(null),y=f(typeof s=="string"?(c,d)=>{let O=s;return(c==null?void 0:c[O])===(d==null?void 0:d[O])}:s),D=u.useCallback(c=>F(b.mode,{1:()=>R.some(d=>y(d,c)),0:()=>y(R,c)}),[R]),b=u.useMemo(()=>({...x,value:R,disabled:p,mode:h?1:0,orientation:$,compare:y,isSelected:D,optionsPropsRef:m,labelRef:A,buttonRef:M,optionsRef:G}),[R,p,h,x]);P(()=>{x.dataRef.current=b},[b]),Se([b.buttonRef,b.optionsRef],(c,d)=>{var O;i({type:1}),Le(d,we.Loose)||(c.preventDefault(),(O=b.buttonRef.current)==null||O.focus())},b.listboxState===0);let ue=u.useMemo(()=>({open:b.listboxState===0,disabled:p,value:R}),[b,p,R]),ce=f(c=>{let d=b.options.find(O=>O.id===c);d&&K(d.dataRef.current.value)}),de=f(()=>{if(b.activeOptionIndex!==null){let{dataRef:c,id:d}=b.options[b.activeOptionIndex];K(c.current.value),i({type:2,focus:L.Specific,id:d})}}),fe=f(()=>i({type:0})),pe=f(()=>i({type:1})),be=f((c,d,O)=>c===L.Specific?i({type:2,focus:L.Specific,id:d,trigger:O}):i({type:2,focus:c,trigger:O})),ve=f((c,d)=>(i({type:5,id:c,dataRef:d}),()=>i({type:6,id:c}))),xe=f(c=>(i({type:7,id:c}),()=>i({type:7,id:null}))),K=f(c=>F(b.mode,{0(){return w==null?void 0:w(c)},1(){let d=b.value.slice(),O=d.findIndex(U=>y(U,c));return O===-1?d.push(c):d.splice(O,1),w==null?void 0:w(d)}})),me=f(c=>i({type:3,value:c})),ge=f(()=>i({type:4})),he=u.useMemo(()=>({onChange:K,registerOption:ve,registerLabel:xe,goToOption:be,closeListbox:pe,openListbox:fe,selectActiveOption:de,selectOption:ce,search:me,clearSearch:ge}),[]),Re={ref:T},B=u.useRef(null),ye=H();return u.useEffect(()=>{B.current&&o!==void 0&&ye.addEventListener(B.current,"reset",()=>{w==null||w(o)})},[B,w]),Q.createElement(Z.Provider,{value:he},Q.createElement(J.Provider,{value:b},Q.createElement(Ie,{value:F(b.listboxState,{0:q.Open,1:q.Closed})},n!=null&&R!=null&&le({[n]:R}).map(([c,d],O)=>Q.createElement(Te,{features:$e.Hidden,ref:O===0?U=>{var Y;B.current=(Y=U==null?void 0:U.closest("form"))!=null?Y:null}:void 0,...De({key:c,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:a,disabled:p,name:c,value:d})})),C({ourProps:Re,theirProps:I,slot:ue,defaultTag:Ye,name:"Listbox"}))))}let et="button";function tt(e,r){var t;let o=V(),{id:a=`headlessui-listbox-button-${o}`,...n}=e,l=N("Listbox.Button"),s=j("Listbox.Button"),p=k(l.buttonRef,r),v=H(),h=f(x=>{switch(x.key){case g.Space:case g.Enter:case g.ArrowDown:x.preventDefault(),s.openListbox(),v.nextFrame(()=>{l.value||s.goToOption(L.First)});break;case g.ArrowUp:x.preventDefault(),s.openListbox(),v.nextFrame(()=>{l.value||s.goToOption(L.Last)});break}}),I=f(x=>{switch(x.key){case g.Space:x.preventDefault();break}}),$=f(x=>{if(Ee(x.currentTarget))return x.preventDefault();l.listboxState===0?(s.closeListbox(),v.nextFrame(()=>{var i;return(i=l.buttonRef.current)==null?void 0:i.focus({preventScroll:!0})})):(x.preventDefault(),s.openListbox())}),T=ae(()=>{if(l.labelId)return[l.labelId,a].join(" ")},[l.labelId,a]),R=u.useMemo(()=>({open:l.listboxState===0,disabled:l.disabled,value:l.value}),[l]),w={ref:p,id:a,type:ke(e,l.buttonRef),"aria-haspopup":"listbox","aria-controls":(t=l.optionsRef.current)==null?void 0:t.id,"aria-expanded":l.listboxState===0,"aria-labelledby":T,disabled:l.disabled,onKeyDown:h,onKeyUp:I,onClick:$};return C({ourProps:w,theirProps:n,slot:R,defaultTag:et,name:"Listbox.Button"})}let rt="label";function nt(e,r){let t=V(),{id:o=`headlessui-listbox-label-${t}`,...a}=e,n=N("Listbox.Label"),l=j("Listbox.Label"),s=k(n.labelRef,r);P(()=>l.registerLabel(o),[o]);let p=f(()=>{var h;return(h=n.buttonRef.current)==null?void 0:h.focus({preventScroll:!0})}),v=u.useMemo(()=>({open:n.listboxState===0,disabled:n.disabled}),[n]);return C({ourProps:{ref:s,id:o,onClick:p},theirProps:a,slot:v,defaultTag:rt,name:"Listbox.Label"})}let ot="ul",at=ee.RenderStrategy|ee.Static;function lt(e,r){var t;let o=V(),{id:a=`headlessui-listbox-options-${o}`,...n}=e,l=N("Listbox.Options"),s=j("Listbox.Options"),p=k(l.optionsRef,r),v=H(),h=H(),I=Fe(),$=I!==null?(I&q.Open)===q.Open:l.listboxState===0;u.useEffect(()=>{var i;let m=l.optionsRef.current;m&&l.listboxState===0&&m!==((i=Pe(m))==null?void 0:i.activeElement)&&m.focus({preventScroll:!0})},[l.listboxState,l.optionsRef]);let T=f(i=>{switch(h.dispose(),i.key){case g.Space:if(l.searchQuery!=="")return i.preventDefault(),i.stopPropagation(),s.search(i.key);case g.Enter:if(i.preventDefault(),i.stopPropagation(),l.activeOptionIndex!==null){let{dataRef:m}=l.options[l.activeOptionIndex];s.onChange(m.current.value)}l.mode===0&&(s.closeListbox(),X().nextFrame(()=>{var m;return(m=l.buttonRef.current)==null?void 0:m.focus({preventScroll:!0})}));break;case F(l.orientation,{vertical:g.ArrowDown,horizontal:g.ArrowRight}):return i.preventDefault(),i.stopPropagation(),s.goToOption(L.Next);case F(l.orientation,{vertical:g.ArrowUp,horizontal:g.ArrowLeft}):return i.preventDefault(),i.stopPropagation(),s.goToOption(L.Previous);case g.Home:case g.PageUp:return i.preventDefault(),i.stopPropagation(),s.goToOption(L.First);case g.End:case g.PageDown:return i.preventDefault(),i.stopPropagation(),s.goToOption(L.Last);case g.Escape:return i.preventDefault(),i.stopPropagation(),s.closeListbox(),v.nextFrame(()=>{var m;return(m=l.buttonRef.current)==null?void 0:m.focus({preventScroll:!0})});case g.Tab:i.preventDefault(),i.stopPropagation();break;default:i.key.length===1&&(s.search(i.key),h.setTimeout(()=>s.clearSearch(),350));break}}),R=ae(()=>{var i;return(i=l.buttonRef.current)==null?void 0:i.id},[l.buttonRef.current]),w=u.useMemo(()=>({open:l.listboxState===0}),[l]),x={"aria-activedescendant":l.activeOptionIndex===null||(t=l.options[l.activeOptionIndex])==null?void 0:t.id,"aria-multiselectable":l.mode===1?!0:void 0,"aria-labelledby":R,"aria-orientation":l.orientation,id:a,onKeyDown:T,role:"listbox",tabIndex:0,ref:p};return C({ourProps:x,theirProps:n,slot:w,defaultTag:ot,features:at,visible:$,name:"Listbox.Options"})}let it="li";function st(e,r){let t=V(),{id:o=`headlessui-listbox-option-${t}`,disabled:a=!1,value:n,...l}=e,s=N("Listbox.Option"),p=j("Listbox.Option"),v=s.activeOptionIndex!==null?s.options[s.activeOptionIndex].id===o:!1,h=s.isSelected(n),I=u.useRef(null),$=Ve(I),T=oe({disabled:a,value:n,domRef:I,get textValue(){return $()}}),R=k(r,I);P(()=>{if(s.listboxState!==0||!v||s.activationTrigger===0)return;let y=X();return y.requestAnimationFrame(()=>{var D,b;(b=(D=I.current)==null?void 0:D.scrollIntoView)==null||b.call(D,{block:"nearest"})}),y.dispose},[I,v,s.listboxState,s.activationTrigger,s.activeOptionIndex]),P(()=>p.registerOption(o,T),[T,o]);let w=f(y=>{if(a)return y.preventDefault();p.onChange(n),s.mode===0&&(p.closeListbox(),X().nextFrame(()=>{var D;return(D=s.buttonRef.current)==null?void 0:D.focus({preventScroll:!0})}))}),x=f(()=>{if(a)return p.goToOption(L.Nothing);p.goToOption(L.Specific,o)}),i=Qe(),m=f(y=>i.update(y)),A=f(y=>{i.wasMoved(y)&&(a||v||p.goToOption(L.Specific,o,0))}),M=f(y=>{i.wasMoved(y)&&(a||v&&p.goToOption(L.Nothing))}),G=u.useMemo(()=>({active:v,selected:h,disabled:a}),[v,h,a]);return C({ourProps:{id:o,ref:R,role:"option",tabIndex:a===!0?void 0:-1,"aria-disabled":a===!0?!0:void 0,"aria-selected":h,disabled:void 0,onClick:w,onFocus:x,onPointerEnter:m,onMouseEnter:m,onPointerMove:A,onMouseMove:A,onPointerLeave:M,onMouseLeave:M},theirProps:l,slot:G,defaultTag:it,name:"Listbox.Option"})}let ut=E(_e),ct=E(tt),dt=E(nt),ft=E(lt),pt=E(st),z=Object.assign(ut,{Button:ct,Label:dt,Options:ft,Option:pt});function bt({title:e,titleId:r,...t},o){return u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":r},t),e?u.createElement("title",{id:r},e):null,u.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z",clipRule:"evenodd"}))}const ht=u.forwardRef(bt);function Rt({options:e,value:r=[]}){const[t,o]=u.useState([]);return u.useEffect(()=>{o(r)},[r]),S.jsx(z,{value:t,onChange:a=>{var n;o(a);for(const l in e)(n=e[l])==null||n.call(e,a.includes(l))},multiple:!0,children:S.jsxs("div",{className:"relative flex",children:[S.jsxs(z.Button,{className:"flex items-center relative w-full bg-primary-10 text-xs rounded-full text-primary-500 py-1 px-2 text-center focus:outline-none focus-visible:border-accent-500 focus-visible:ring-2 focus-visible:ring-light focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-brand-300 cursor-pointer",children:[S.jsxs("span",{className:"flex truncate items-center",children:[S.jsx(Be,{className:"h-3 w-3 mr-0 sm:mr-1"})," ",S.jsx("span",{className:"sr-only sm:not-sr-only",children:"Show"})]}),S.jsx(Ne,{className:"ml-2 h-4 w-4","aria-hidden":"true"})]}),S.jsx(je,{as:u.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:S.jsx(z.Options,{className:"absolute top-8 right-0 z-50 max-h-60 min-w-16 overflow-auto rounded-md bg-theme py-2 shadow-lg ring-2 ring-primary-10 ring-opacity-5 focus:outline-none sm:text-sm",children:Object.keys(e).filter(a=>e[a]).map(a=>S.jsx(z.Option,{className:({active:n,disabled:l})=>_("relative cursor-default select-none py-1 pl-10 pr-4",l?"opacity-50 cursor-not-allowed":"",n?"bg-primary-10 text-primary-500":"text-neutral-700 dark:text-neutral-300"),value:a,disabled:Oe(!!e[a]),children:({selected:n})=>S.jsxs(S.Fragment,{children:[S.jsx("span",{children:a}),S.jsx("span",{className:_("absolute inset-y-0 left-0 flex items-center pl-3 text-primary-500",n?"block":"hidden"),children:S.jsx(Ae,{className:"h-4 w-4","aria-hidden":"true"})})]})},a))})})]})})}export{ht as F,Rt as L,Ue as T,L as c,le as e,He as f,gt as p,Ve as s,Qe as u};
1
+ import{r as u,R as Q,j as S,b as Oe,c as _}from"./index-C22hdM_h.js";import{R as oe,i as P,o as f,U as E,y as k,u as F,r as Se,J as Le,K as we,p as H,H as Ie,k as q,b as Te,F as De,c as $e,C,I as V,h as X,j as Fe,G as Pe,z as g,A as Ee,T as ke,x as ee,P as Ce,D as je}from"./transition-CiMBgn_Y.js";import{n as Ne,p as Ae}from"./Input-CxOCLTNw.js";function Me({title:e,titleId:r,...t},o){return u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":r},t),e?u.createElement("title",{id:r},e):null,u.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z"}))}const Be=u.forwardRef(Me);function ae(e,r){let[t,o]=u.useState(e),a=oe(e);return P(()=>o(a.current),[a,o,...r]),t}function Ue(e,r,t){let[o,a]=u.useState(t),n=e!==void 0,l=u.useRef(n),s=u.useRef(!1),p=u.useRef(!1);return n&&!l.current&&!s.current?(s.current=!0,l.current=n,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!n&&l.current&&!p.current&&(p.current=!0,l.current=n,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[n?e:o,f(v=>(n||a(v),r==null?void 0:r(v)))]}function te(e){return[e.screenX,e.screenY]}function Qe(){let e=u.useRef([-1,-1]);return{wasMoved(r){let t=te(r);return e.current[0]===t[0]&&e.current[1]===t[1]?!1:(e.current=t,!0)},update(r){e.current=te(r)}}}function ze(e){throw new Error("Unexpected object: "+e)}var L=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(L||{});function He(e,r){let t=r.resolveItems();if(t.length<=0)return null;let o=r.resolveActiveIndex(),a=o??-1;switch(e.focus){case 0:{for(let n=0;n<t.length;++n)if(!r.resolveDisabled(t[n],n,t))return n;return o}case 1:{for(let n=a-1;n>=0;--n)if(!r.resolveDisabled(t[n],n,t))return n;return o}case 2:{for(let n=a+1;n<t.length;++n)if(!r.resolveDisabled(t[n],n,t))return n;return o}case 3:{for(let n=t.length-1;n>=0;--n)if(!r.resolveDisabled(t[n],n,t))return n;return o}case 4:{for(let n=0;n<t.length;++n)if(r.resolveId(t[n],n,t)===e.id)return n;return o}case 5:return null;default:ze(e)}}function le(e={},r=null,t=[]){for(let[o,a]of Object.entries(e))se(t,ie(r,o),a);return t}function ie(e,r){return e?e+"["+r+"]":r}function se(e,r,t){if(Array.isArray(t))for(let[o,a]of t.entries())se(e,ie(r,o.toString()),a);else t instanceof Date?e.push([r,t.toISOString()]):typeof t=="boolean"?e.push([r,t?"1":"0"]):typeof t=="string"?e.push([r,t]):typeof t=="number"?e.push([r,`${t}`]):t==null?e.push([r,""]):le(t,r,e)}function gt(e){var r,t;let o=(r=e==null?void 0:e.form)!=null?r:e.closest("form");if(o){for(let a of o.elements)if(a!==e&&(a.tagName==="INPUT"&&a.type==="submit"||a.tagName==="BUTTON"&&a.type==="submit"||a.nodeName==="INPUT"&&a.type==="image")){a.click();return}(t=o.requestSubmit)==null||t.call(o)}}let re=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function ne(e){var r,t;let o=(r=e.innerText)!=null?r:"",a=e.cloneNode(!0);if(!(a instanceof HTMLElement))return o;let n=!1;for(let s of a.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),n=!0;let l=n?(t=a.innerText)!=null?t:"":o;return re.test(l)&&(l=l.replace(re,"")),l}function qe(e){let r=e.getAttribute("aria-label");if(typeof r=="string")return r.trim();let t=e.getAttribute("aria-labelledby");if(t){let o=t.split(" ").map(a=>{let n=document.getElementById(a);if(n){let l=n.getAttribute("aria-label");return typeof l=="string"?l.trim():ne(n).trim()}return null}).filter(Boolean);if(o.length>0)return o.join(", ")}return ne(e).trim()}function Ve(e){let r=u.useRef(""),t=u.useRef("");return f(()=>{let o=e.current;if(!o)return"";let a=o.innerText;if(r.current===a)return t.current;let n=qe(o).trim().toLowerCase();return r.current=a,t.current=n,n})}var Ge=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ge||{}),Ke=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Ke||{}),We=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(We||{}),Xe=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.RegisterLabel=7]="RegisterLabel",e))(Xe||{});function W(e,r=t=>t){let t=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,o=Ce(r(e.options.slice()),n=>n.dataRef.current.domRef.current),a=t?o.indexOf(t):null;return a===-1&&(a=null),{options:o,activeOptionIndex:a}}let Ze={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let r=e.activeOptionIndex,{isSelected:t}=e.dataRef.current,o=e.options.findIndex(a=>t(a.dataRef.current.value));return o!==-1&&(r=o),{...e,listboxState:0,activeOptionIndex:r}},2(e,r){var t;if(e.dataRef.current.disabled||e.listboxState===1)return e;let o=W(e),a=He(r,{resolveItems:()=>o.options,resolveActiveIndex:()=>o.activeOptionIndex,resolveId:n=>n.id,resolveDisabled:n=>n.dataRef.current.disabled});return{...e,...o,searchQuery:"",activeOptionIndex:a,activationTrigger:(t=r.trigger)!=null?t:1}},3:(e,r)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let t=e.searchQuery!==""?0:1,o=e.searchQuery+r.value.toLowerCase(),a=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+t).concat(e.options.slice(0,e.activeOptionIndex+t)):e.options).find(l=>{var s;return!l.dataRef.current.disabled&&((s=l.dataRef.current.textValue)==null?void 0:s.startsWith(o))}),n=a?e.options.indexOf(a):-1;return n===-1||n===e.activeOptionIndex?{...e,searchQuery:o}:{...e,searchQuery:o,activeOptionIndex:n,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,r)=>{let t={id:r.id,dataRef:r.dataRef},o=W(e,a=>[...a,t]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(r.dataRef.current.value)&&(o.activeOptionIndex=o.options.indexOf(t)),{...e,...o}},6:(e,r)=>{let t=W(e,o=>{let a=o.findIndex(n=>n.id===r.id);return a!==-1&&o.splice(a,1),o});return{...e,...t,activationTrigger:1}},7:(e,r)=>({...e,labelId:r.id})},Z=u.createContext(null);Z.displayName="ListboxActionsContext";function j(e){let r=u.useContext(Z);if(r===null){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,j),t}return r}let J=u.createContext(null);J.displayName="ListboxDataContext";function N(e){let r=u.useContext(J);if(r===null){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,N),t}return r}function Je(e,r){return F(r.type,Ze,e,r)}let Ye=u.Fragment;function _e(e,r){let{value:t,defaultValue:o,form:a,name:n,onChange:l,by:s=(c,d)=>c===d,disabled:p=!1,horizontal:v=!1,multiple:h=!1,...I}=e;const $=v?"horizontal":"vertical";let T=k(r),[R=h?[]:void 0,w]=Ue(t,l,o),[x,i]=u.useReducer(Je,{dataRef:u.createRef(),listboxState:1,options:[],searchQuery:"",labelId:null,activeOptionIndex:null,activationTrigger:1}),m=u.useRef({static:!1,hold:!1}),A=u.useRef(null),M=u.useRef(null),G=u.useRef(null),y=f(typeof s=="string"?(c,d)=>{let O=s;return(c==null?void 0:c[O])===(d==null?void 0:d[O])}:s),D=u.useCallback(c=>F(b.mode,{1:()=>R.some(d=>y(d,c)),0:()=>y(R,c)}),[R]),b=u.useMemo(()=>({...x,value:R,disabled:p,mode:h?1:0,orientation:$,compare:y,isSelected:D,optionsPropsRef:m,labelRef:A,buttonRef:M,optionsRef:G}),[R,p,h,x]);P(()=>{x.dataRef.current=b},[b]),Se([b.buttonRef,b.optionsRef],(c,d)=>{var O;i({type:1}),Le(d,we.Loose)||(c.preventDefault(),(O=b.buttonRef.current)==null||O.focus())},b.listboxState===0);let ue=u.useMemo(()=>({open:b.listboxState===0,disabled:p,value:R}),[b,p,R]),ce=f(c=>{let d=b.options.find(O=>O.id===c);d&&K(d.dataRef.current.value)}),de=f(()=>{if(b.activeOptionIndex!==null){let{dataRef:c,id:d}=b.options[b.activeOptionIndex];K(c.current.value),i({type:2,focus:L.Specific,id:d})}}),fe=f(()=>i({type:0})),pe=f(()=>i({type:1})),be=f((c,d,O)=>c===L.Specific?i({type:2,focus:L.Specific,id:d,trigger:O}):i({type:2,focus:c,trigger:O})),ve=f((c,d)=>(i({type:5,id:c,dataRef:d}),()=>i({type:6,id:c}))),xe=f(c=>(i({type:7,id:c}),()=>i({type:7,id:null}))),K=f(c=>F(b.mode,{0(){return w==null?void 0:w(c)},1(){let d=b.value.slice(),O=d.findIndex(U=>y(U,c));return O===-1?d.push(c):d.splice(O,1),w==null?void 0:w(d)}})),me=f(c=>i({type:3,value:c})),ge=f(()=>i({type:4})),he=u.useMemo(()=>({onChange:K,registerOption:ve,registerLabel:xe,goToOption:be,closeListbox:pe,openListbox:fe,selectActiveOption:de,selectOption:ce,search:me,clearSearch:ge}),[]),Re={ref:T},B=u.useRef(null),ye=H();return u.useEffect(()=>{B.current&&o!==void 0&&ye.addEventListener(B.current,"reset",()=>{w==null||w(o)})},[B,w]),Q.createElement(Z.Provider,{value:he},Q.createElement(J.Provider,{value:b},Q.createElement(Ie,{value:F(b.listboxState,{0:q.Open,1:q.Closed})},n!=null&&R!=null&&le({[n]:R}).map(([c,d],O)=>Q.createElement(Te,{features:$e.Hidden,ref:O===0?U=>{var Y;B.current=(Y=U==null?void 0:U.closest("form"))!=null?Y:null}:void 0,...De({key:c,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:a,disabled:p,name:c,value:d})})),C({ourProps:Re,theirProps:I,slot:ue,defaultTag:Ye,name:"Listbox"}))))}let et="button";function tt(e,r){var t;let o=V(),{id:a=`headlessui-listbox-button-${o}`,...n}=e,l=N("Listbox.Button"),s=j("Listbox.Button"),p=k(l.buttonRef,r),v=H(),h=f(x=>{switch(x.key){case g.Space:case g.Enter:case g.ArrowDown:x.preventDefault(),s.openListbox(),v.nextFrame(()=>{l.value||s.goToOption(L.First)});break;case g.ArrowUp:x.preventDefault(),s.openListbox(),v.nextFrame(()=>{l.value||s.goToOption(L.Last)});break}}),I=f(x=>{switch(x.key){case g.Space:x.preventDefault();break}}),$=f(x=>{if(Ee(x.currentTarget))return x.preventDefault();l.listboxState===0?(s.closeListbox(),v.nextFrame(()=>{var i;return(i=l.buttonRef.current)==null?void 0:i.focus({preventScroll:!0})})):(x.preventDefault(),s.openListbox())}),T=ae(()=>{if(l.labelId)return[l.labelId,a].join(" ")},[l.labelId,a]),R=u.useMemo(()=>({open:l.listboxState===0,disabled:l.disabled,value:l.value}),[l]),w={ref:p,id:a,type:ke(e,l.buttonRef),"aria-haspopup":"listbox","aria-controls":(t=l.optionsRef.current)==null?void 0:t.id,"aria-expanded":l.listboxState===0,"aria-labelledby":T,disabled:l.disabled,onKeyDown:h,onKeyUp:I,onClick:$};return C({ourProps:w,theirProps:n,slot:R,defaultTag:et,name:"Listbox.Button"})}let rt="label";function nt(e,r){let t=V(),{id:o=`headlessui-listbox-label-${t}`,...a}=e,n=N("Listbox.Label"),l=j("Listbox.Label"),s=k(n.labelRef,r);P(()=>l.registerLabel(o),[o]);let p=f(()=>{var h;return(h=n.buttonRef.current)==null?void 0:h.focus({preventScroll:!0})}),v=u.useMemo(()=>({open:n.listboxState===0,disabled:n.disabled}),[n]);return C({ourProps:{ref:s,id:o,onClick:p},theirProps:a,slot:v,defaultTag:rt,name:"Listbox.Label"})}let ot="ul",at=ee.RenderStrategy|ee.Static;function lt(e,r){var t;let o=V(),{id:a=`headlessui-listbox-options-${o}`,...n}=e,l=N("Listbox.Options"),s=j("Listbox.Options"),p=k(l.optionsRef,r),v=H(),h=H(),I=Fe(),$=I!==null?(I&q.Open)===q.Open:l.listboxState===0;u.useEffect(()=>{var i;let m=l.optionsRef.current;m&&l.listboxState===0&&m!==((i=Pe(m))==null?void 0:i.activeElement)&&m.focus({preventScroll:!0})},[l.listboxState,l.optionsRef]);let T=f(i=>{switch(h.dispose(),i.key){case g.Space:if(l.searchQuery!=="")return i.preventDefault(),i.stopPropagation(),s.search(i.key);case g.Enter:if(i.preventDefault(),i.stopPropagation(),l.activeOptionIndex!==null){let{dataRef:m}=l.options[l.activeOptionIndex];s.onChange(m.current.value)}l.mode===0&&(s.closeListbox(),X().nextFrame(()=>{var m;return(m=l.buttonRef.current)==null?void 0:m.focus({preventScroll:!0})}));break;case F(l.orientation,{vertical:g.ArrowDown,horizontal:g.ArrowRight}):return i.preventDefault(),i.stopPropagation(),s.goToOption(L.Next);case F(l.orientation,{vertical:g.ArrowUp,horizontal:g.ArrowLeft}):return i.preventDefault(),i.stopPropagation(),s.goToOption(L.Previous);case g.Home:case g.PageUp:return i.preventDefault(),i.stopPropagation(),s.goToOption(L.First);case g.End:case g.PageDown:return i.preventDefault(),i.stopPropagation(),s.goToOption(L.Last);case g.Escape:return i.preventDefault(),i.stopPropagation(),s.closeListbox(),v.nextFrame(()=>{var m;return(m=l.buttonRef.current)==null?void 0:m.focus({preventScroll:!0})});case g.Tab:i.preventDefault(),i.stopPropagation();break;default:i.key.length===1&&(s.search(i.key),h.setTimeout(()=>s.clearSearch(),350));break}}),R=ae(()=>{var i;return(i=l.buttonRef.current)==null?void 0:i.id},[l.buttonRef.current]),w=u.useMemo(()=>({open:l.listboxState===0}),[l]),x={"aria-activedescendant":l.activeOptionIndex===null||(t=l.options[l.activeOptionIndex])==null?void 0:t.id,"aria-multiselectable":l.mode===1?!0:void 0,"aria-labelledby":R,"aria-orientation":l.orientation,id:a,onKeyDown:T,role:"listbox",tabIndex:0,ref:p};return C({ourProps:x,theirProps:n,slot:w,defaultTag:ot,features:at,visible:$,name:"Listbox.Options"})}let it="li";function st(e,r){let t=V(),{id:o=`headlessui-listbox-option-${t}`,disabled:a=!1,value:n,...l}=e,s=N("Listbox.Option"),p=j("Listbox.Option"),v=s.activeOptionIndex!==null?s.options[s.activeOptionIndex].id===o:!1,h=s.isSelected(n),I=u.useRef(null),$=Ve(I),T=oe({disabled:a,value:n,domRef:I,get textValue(){return $()}}),R=k(r,I);P(()=>{if(s.listboxState!==0||!v||s.activationTrigger===0)return;let y=X();return y.requestAnimationFrame(()=>{var D,b;(b=(D=I.current)==null?void 0:D.scrollIntoView)==null||b.call(D,{block:"nearest"})}),y.dispose},[I,v,s.listboxState,s.activationTrigger,s.activeOptionIndex]),P(()=>p.registerOption(o,T),[T,o]);let w=f(y=>{if(a)return y.preventDefault();p.onChange(n),s.mode===0&&(p.closeListbox(),X().nextFrame(()=>{var D;return(D=s.buttonRef.current)==null?void 0:D.focus({preventScroll:!0})}))}),x=f(()=>{if(a)return p.goToOption(L.Nothing);p.goToOption(L.Specific,o)}),i=Qe(),m=f(y=>i.update(y)),A=f(y=>{i.wasMoved(y)&&(a||v||p.goToOption(L.Specific,o,0))}),M=f(y=>{i.wasMoved(y)&&(a||v&&p.goToOption(L.Nothing))}),G=u.useMemo(()=>({active:v,selected:h,disabled:a}),[v,h,a]);return C({ourProps:{id:o,ref:R,role:"option",tabIndex:a===!0?void 0:-1,"aria-disabled":a===!0?!0:void 0,"aria-selected":h,disabled:void 0,onClick:w,onFocus:x,onPointerEnter:m,onMouseEnter:m,onPointerMove:A,onMouseMove:A,onPointerLeave:M,onMouseLeave:M},theirProps:l,slot:G,defaultTag:it,name:"Listbox.Option"})}let ut=E(_e),ct=E(tt),dt=E(nt),ft=E(lt),pt=E(st),z=Object.assign(ut,{Button:ct,Label:dt,Options:ft,Option:pt});function bt({title:e,titleId:r,...t},o){return u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":r},t),e?u.createElement("title",{id:r},e):null,u.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z",clipRule:"evenodd"}))}const ht=u.forwardRef(bt);function Rt({options:e,value:r=[]}){const[t,o]=u.useState([]);return u.useEffect(()=>{o(r)},[r]),S.jsx(z,{value:t,onChange:a=>{var n;o(a);for(const l in e)(n=e[l])==null||n.call(e,a.includes(l))},multiple:!0,children:S.jsxs("div",{className:"relative flex",children:[S.jsxs(z.Button,{className:"flex items-center relative w-full bg-primary-10 text-xs rounded-full text-primary-500 py-1 px-2 text-center focus:outline-none focus-visible:border-accent-500 focus-visible:ring-2 focus-visible:ring-light focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-brand-300 cursor-pointer",children:[S.jsxs("span",{className:"flex truncate items-center",children:[S.jsx(Be,{className:"h-3 w-3 mr-0 sm:mr-1"})," ",S.jsx("span",{className:"sr-only sm:not-sr-only",children:"Show"})]}),S.jsx(Ne,{className:"ml-2 h-4 w-4","aria-hidden":"true"})]}),S.jsx(je,{as:u.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:S.jsx(z.Options,{className:"absolute top-8 right-0 z-50 max-h-60 min-w-16 overflow-auto rounded-md bg-theme py-2 shadow-lg ring-2 ring-primary-10 ring-opacity-5 focus:outline-none sm:text-sm",children:Object.keys(e).filter(a=>e[a]).map(a=>S.jsx(z.Option,{className:({active:n,disabled:l})=>_("relative cursor-default select-none py-1 pl-10 pr-4",l?"opacity-50 cursor-not-allowed":"",n?"bg-primary-10 text-primary-500":"text-neutral-700 dark:text-neutral-300"),value:a,disabled:Oe(!!e[a]),children:({selected:n})=>S.jsxs(S.Fragment,{children:[S.jsx("span",{children:a}),S.jsx("span",{className:_("absolute inset-y-0 left-0 flex items-center pl-3 text-primary-500",n?"block":"hidden"),children:S.jsx(Ae,{className:"h-4 w-4","aria-hidden":"true"})})]})},a))})})]})})}export{ht as F,Rt as L,Ue as T,L as c,le as e,He as f,gt as p,Ve as s,Qe as u};
@@ -1 +1 @@
1
- import{r as o,R as a,j as e,c as R,B as Q,m as O,n as ee,aC as ie,h as ce,w as B,b as _,i as $,W as de,Z as me,aD as ue,v as he,L as te,S as se,F as q,I as pe}from"./index-COnjINWU.js";import{d as fe,e as ne,s as ae,f as G,P as oe,h as P,b as F,i as ge,E as V,R as we,j as xe,k as ve,l as be,m as X,n as Y,o as J,p as Ne,q as ye,r as je,t as Ee}from"./context-APidk_GA.js";import{W as Ce}from"./editor-B2GioI_r.js";import{F as Me,L as Se}from"./ListboxShow-C0DBUX71.js";import{S as ke}from"./SearchList-B9NnvRod.js";import{n as ze}from"./Input-CJirBrKe.js";import{B as T}from"./transition-DjPYSO2n.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./file-C7afm_LM.js";import"./project-CWUUCZWT.js";import"./help-6Q7f7fjd.js";import"./SourceList-FVjgH2xJ.js";import"./index-CK4fdw8q.js";function Le({title:t,titleId:s,...n},c){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:c,"aria-labelledby":s},n),t?o.createElement("title",{id:s},t):null,o.createElement("path",{fillRule:"evenodd",d:"M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Z",clipRule:"evenodd"}))}const Ae=o.forwardRef(Le);function Be(){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},a.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function Ie(){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},a.createElement("path",{d:"M0 0h32v4.2H0z"}))}function He(){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},a.createElement("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"}))}function Re(){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},a.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"}))}function De(){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},a.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"}))}const D=({children:t,className:s,...n})=>a.createElement("button",{type:"button",className:P(["react-flow__controls-button",s]),...n},t);D.displayName="ControlButton";const _e=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom}),le=({style:t,showZoom:s=!0,showFitView:n=!0,showInteractive:c=!0,fitViewOptions:u,onZoomIn:l,onZoomOut:r,onFitView:h,onInteractiveChange:p,className:f,children:i,position:N="bottom-left"})=>{const g=fe(),[M,E]=o.useState(!1),{isInteractive:w,minZoomReached:x,maxZoomReached:d}=ne(_e,ae),{zoomIn:v,zoomOut:j,fitView:m}=G();if(o.useEffect(()=>{E(!0)},[]),!M)return null;const z=()=>{v(),l==null||l()},C=()=>{j(),r==null||r()},k=()=>{m(u),h==null||h()},b=()=>{g.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),p==null||p(!w)};return a.createElement(oe,{className:P(["react-flow__controls",f]),position:N,style:t,"data-testid":"rf__controls"},s&&a.createElement(a.Fragment,null,a.createElement(D,{onClick:z,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:d},a.createElement(Be,null)),a.createElement(D,{onClick:C,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:x},a.createElement(Ie,null))),n&&a.createElement(D,{className:"react-flow__controls-fitview",onClick:k,title:"fit view","aria-label":"fit view"},a.createElement(He,null)),c&&a.createElement(D,{className:"react-flow__controls-interactive",onClick:b,title:"toggle interactivity","aria-label":"toggle interactivity"},w?a.createElement(De,null):a.createElement(Re,null)),i)};le.displayName="Controls";var Fe=o.memo(le),S;(function(t){t.Lines="lines",t.Dots="dots",t.Cross="cross"})(S||(S={}));function $e({color:t,dimensions:s,lineWidth:n}){return a.createElement("path",{stroke:t,strokeWidth:n,d:`M${s[0]/2} 0 V${s[1]} M0 ${s[1]/2} H${s[0]}`})}function We({color:t,radius:s}){return a.createElement("circle",{cx:s,cy:s,r:s,fill:t})}const Ue={[S.Dots]:"#91919a",[S.Lines]:"#eee",[S.Cross]:"#e2e2e2"},Ve={[S.Dots]:1,[S.Lines]:1,[S.Cross]:6},Te=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function re({id:t,variant:s=S.Dots,gap:n=20,size:c,lineWidth:u=1,offset:l=2,color:r,style:h,className:p}){const f=o.useRef(null),{transform:i,patternId:N}=ne(Te,ae),g=r||Ue[s],M=c||Ve[s],E=s===S.Dots,w=s===S.Cross,x=Array.isArray(n)?n:[n,n],d=[x[0]*i[2]||1,x[1]*i[2]||1],v=M*i[2],j=w?[v,v]:d,m=E?[v/l,v/l]:[j[0]/l,j[1]/l];return a.createElement("svg",{className:P(["react-flow__background",p]),style:{...h,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:f,"data-testid":"rf__background"},a.createElement("pattern",{id:N+t,x:i[0]%d[0],y:i[1]%d[1],width:d[0],height:d[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${m[0]},-${m[1]})`},E?a.createElement(We,{color:g,radius:v/l}):a.createElement($e,{dimensions:j,color:g,lineWidth:u})),a.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${N+t})`}))}re.displayName="Background";var Oe=o.memo(re);function Ge({handleSelect:t}){const{models:s,lineage:n,mainNode:c,connectedNodes:u}=F(),[l,r]=o.useState(!1),[h,p]=o.useState([]),[f,i]=o.useState(!1);o.useEffect(()=>{p([])},[c,s,n]);function N(){r(!0)}function g(){r(!1)}function M(E){E.length<1||ce(h)||B(c)||B(n)||(i(!0),setTimeout(()=>{const w=Array.from(ge(n,c));p(Object.keys(n).map(x=>{var d;return{name:x,displayName:((d=s.get(x))==null?void 0:d.displayName)??decodeURI(x),description:`${w.includes(x)?"Upstream":"Downstream"} | ${u.has(x)?"Directly":"Indirectly"} Connected`}})),i(!1)},300))}return e.jsxs("div",{className:R("w-full",l?"block absolute top-0 left-0 right-0 z-10 pr-10 bg-light dark:bg-dark @[40rem]:items-end @[40rem]:justify-end @[40rem]:flex @[40rem]:static @[40rem]:pr-0":"items-end justify-end flex"),children:[e.jsx(Q,{shape:ie.Circle,className:R("flex @[40rem]:hidden !py-1 border-transparent",l?"hidden":"flex"),variant:ee.Alternative,size:O.sm,"aria-label":"Show search",onClick:N,children:e.jsx(Ae,{className:"w-3 h-3 text-primary-500"})}),e.jsx(ke,{list:h,placeholder:"Find",searchBy:"displayName",displayBy:"displayName",direction:"top",descriptionBy:"description",showIndex:!1,size:O.sm,onSelect:t,isLoading:f,className:R("w-full @sm:min-w-[12rem] @[40rem]:flex",l?"flex max-w-none":"hidden max-w-[20rem]"),isFullWidth:!0,onInput:M}),e.jsx("button",{className:R("flex @[40rem]:hidden bg-none border-none px-2 py-1 absolute right-0 top-0",l?"flex":"hidden"),"aria-label":"Hide search",onClick:g,children:e.jsx(Me,{className:"w-6 h-6 text-primary-500"})})]})}function K({nodes:t=[]}){const{setCenter:s}=G(),{activeNodes:n,models:c,mainNode:u,nodesMap:l,selectedNodes:r,setSelectedNodes:h,withImpacted:p,connectedNodes:f,lineageCache:i,setActiveEdges:N,setConnections:g,setLineage:M,setLineageCache:E}=F(),w=B(u)?void 0:c.get(u),x=n.size>0?n.size:f.size,d=r.size,v=f.size-1,j=t.filter(b=>b.hidden).length,m=t.filter(b=>_(b.hidden)&&(b.data.type===V.external||b.data.type===V.seed)).length,z=t.filter(b=>_(b.hidden)&&b.data.type===V.cte).length,C=x>0&&x!==v+1;function k(){if(B(u))return;const b=l[u];B(b)||setTimeout(()=>{s(b.position.x,b.position.y,{zoom:.5,duration:0})},200)}return e.jsxs(e.Fragment,{children:[$(w)&&e.jsx("a",{className:"mr-2 w-full whitespace-nowrap text-ellipsis overflow-hidden @lg:block font-bold text-neutral-600 dark:text-neutral-400 cursor-pointer hover:underline",onClick:k,children:de(w.displayName,50,25)}),e.jsxs("span",{className:"bg-neutral-5 px-2 py-0.5 flex rounded-full mr-2",children:[e.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[e.jsx("b",{children:"All:"})," ",t.length]}),j>0&&e.jsxs("span",{className:"whitespace-nowrap block mr-2",children:[e.jsx("b",{children:"Hidden:"})," ",j]}),d>0&&e.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[e.jsx("b",{children:"Selected:"})," ",d]}),C&&e.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[e.jsx("b",{children:"Active:"})," ",x]}),(C||d>0||$(i))&&e.jsx(Q,{size:O.xs,variant:ee.Neutral,format:me.Ghost,className:"!m-0 px-1",onClick:()=>{N(new Map),g(new Map),h(new Set),$(i)&&(M(i),E(void 0))},children:"Reset"})]}),m>0&&e.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[e.jsx("b",{children:"Sources"}),": ",m]}),_(C)&&p&&d===0&&v>0&&e.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[e.jsx("b",{children:"Upstream/Downstream:"})," ",v]}),z>0&&e.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[e.jsx("b",{children:"CTEs:"})," ",z]})]})}const Pe=30;function it({model:t,highlightedNodes:s}){const{setActiveNodes:n,setActiveEdges:c,setConnections:u,setLineage:l,handleError:r,setSelectedNodes:h,setMainNode:p,setWithColumns:f,setHighlightedNodes:i,setNodeConnections:N,setLineageCache:g,setUnknownModels:M,models:E,unknownModels:w}=F(),{refetch:x,isFetching:d,cancel:v}=ue(t.name),{isFetching:j}=he(),[m,z]=o.useState(!1),[C,k]=o.useState(void 0);o.useEffect(()=>{const y=Ce();return y.addEventListener("message",b),x().then(({data:L})=>{k(L),!B(L)&&(z(!0),y.postMessage({topic:"lineage",payload:{currentLineage:{},newLineage:L,mainNode:t.fqn}}))}).catch(L=>{r==null||r(L)}).finally(()=>{n(new Set),c(new Map),u(new Map),h(new Set),g(void 0),p(t.fqn)}),()=>{v==null||v(),y.removeEventListener("message",b),y.terminate(),l({}),N({}),p(void 0),i({})}},[t.name,t.hash]),o.useEffect(()=>{Object.keys(C??{}).forEach(y=>{y=encodeURI(y),_(E.has(y))&&_(w.has(y))&&w.add(y)}),M(new Set(w))},[C,E]),o.useEffect(()=>{i(s??{})},[s]);function b(y){var L;y.data.topic==="lineage"&&(z(!1),N(y.data.payload.nodesConnections),l(y.data.payload.lineage),Object.values(((L=y.data.payload)==null?void 0:L.lineage)??{}).length>Pe&&f(!1)),y.data.topic==="error"&&(r==null||r(y.data.error),z(!1))}const I=d||j||m;return e.jsxs("div",{className:"relative h-full w-full overflow-hidden",children:[I&&e.jsxs("div",{className:"absolute top-0 left-0 z-10 flex justify-center items-center w-full h-full",children:[e.jsx("span",{className:"absolute w-full h-full z-10 bg-transparent-20 backdrop-blur-lg"}),e.jsxs(te,{className:"inline-block z-10",children:[e.jsx(se,{className:"w-3 h-3 border border-neutral-10 mr-4"}),e.jsx("h3",{className:"text-md whitespace-nowrap",children:I?"Loading Model's Lineage...":"Merging Model's..."})]})]}),e.jsx(we,{children:e.jsx(Ze,{})})]})}function Ze(){const{withColumns:t,lineage:s,mainNode:n,selectedEdges:c,selectedNodes:u,withConnected:l,withImpacted:r,withSecondary:h,hasBackground:p,activeEdges:f,connectedNodes:i,connections:N,nodesMap:g,showControls:M,handleError:E,setActiveNodes:w}=F(),{setCenter:x}=G(),[d,v]=o.useState(!1),j=o.useMemo(()=>({model:xe}),[]),m=o.useMemo(()=>ve(s),[s]),z=o.useMemo(()=>be(s),[s]),[C,k]=o.useState([]),[b,I]=o.useState([]);o.useEffect(()=>{if(q(m)||B(n))return;v(!0);const A=X(m,f,c,g),W=Y(Object.values(g),A,n,i,u,N,l,r,h),U=J(m,N,f,A,c,u,i,l,r,h),Z=Ne({nodesMap:g,nodes:W,edges:U});return Z.create().then(H=>{I(H.edges),k(H.nodes)}).catch(H=>{E==null||E(H),I([]),k([])}).finally(()=>{const H=B(n)?void 0:g[n];$(H)&&x(H.position.x,H.position.y,{zoom:.5,duration:0}),setTimeout(()=>{v(!1)},100)}),()=>{Z.terminate(),I([]),k([])}},[f,g,z]),o.useEffect(()=>{if(B(n)||q(C))return;const A=X(m,f,c,g),W=Y(C,A,n,i,u,N,l,r,h),U=J(m,N,f,A,c,u,i,l,r,h);I(U),k(W),w(A)},[N,g,m,f,u,c,i,l,r,h,t,n]);function y(A){k(Ee(A,C))}function L(A){I(je(A,b))}return e.jsxs(e.Fragment,{children:[d&&e.jsxs("div",{className:"absolute top-0 left-0 z-10 flex justify-center items-center w-full h-full",children:[e.jsx("span",{className:"absolute w-full h-full z-10 bg-transparent-20 backdrop-blur-lg"}),e.jsxs(te,{className:"inline-block z-10",children:[e.jsx(se,{className:"w-3 h-3 border border-neutral-10 mr-4"}),e.jsx("h3",{className:"text-md whitespace-nowrap",children:"Building Lineage..."})]})]}),e.jsxs(ye,{nodes:C,edges:b,nodeTypes:j,onNodesChange:y,onEdgesChange:L,nodeOrigin:[.5,.5],minZoom:.05,maxZoom:1.5,snapGrid:[16,16],snapToGrid:!0,children:[M&&e.jsxs(oe,{position:"top-right",className:"bg-theme !m-0 w-full !z-10",children:[e.jsx(qe,{nodes:C}),e.jsx(pe,{})]}),e.jsx(Fe,{className:"bg-light p-1 rounded-md !border-none !shadow-lg"}),e.jsx(Oe,{variant:S.Cross,gap:32,size:4,className:R(p?"opacity-100 stroke-neutral-200 dark:stroke-neutral-800":"opacity-0")})]})]})}function qe({nodes:t=[]}){const{withColumns:s,mainNode:n,selectedNodes:c,withConnected:u,withImpacted:l,withSecondary:r,hasBackground:h,activeNodes:p,highlightedNodes:f,setSelectedNodes:i,setWithColumns:N,setWithConnected:g,setWithImpacted:M,setWithSecondary:E,setHasBackground:w}=F(),x=o.useRef(null),d=o.useMemo(()=>Object.values(f??{}).flat(),[f]);function v(j){d.includes(j.name)||n===j.name||i(m=>(m.has(j.name)?m.delete(j.name):m.add(j.name),new Set(m)))}return e.jsxs("div",{className:"px-2 flex items-center text-xs text-neutral-400 @container",children:[e.jsxs("div",{className:"contents",children:[e.jsxs(T,{className:"flex @lg:hidden bg-none border-none","aria-label":"Show lineage node details",children:[e.jsxs(T.Button,{ref:x,className:"flex items-center relative w-full cursor-pointer bg-primary-10 text-xs rounded-full text-primary-500 py-1 px-3 text-center focus:outline-none focus-visible:border-accent-500 focus-visible:ring-2 focus-visible:ring-light focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-brand-300 border-1 border-transparent",children:["Details",e.jsx(ze,{className:"ml-2 h-4 w-4","aria-hidden":"true"})]}),e.jsx(T.Panel,{className:"absolute left-2 right-2 flex-col z-50 mt-8 transform flex px-4 py-3 bg-theme-lighter shadow-xl focus:ring-2 ring-opacity-5 rounded-lg",children:e.jsx(K,{nodes:t})})]}),e.jsx("div",{className:"hidden @lg:contents w-full",children:e.jsx(K,{nodes:t})})]}),e.jsxs("div",{className:"flex w-full justify-end items-center",children:[e.jsx(Ge,{handleSelect:v}),e.jsx(Se,{options:{Background:w,Columns:p.size>0&&c.size===0?void 0:N,Connected:p.size>0?void 0:g,"Upstream/Downstream":p.size>0?void 0:M,All:p.size>0?void 0:E},value:[s&&"Columns",h&&"Background",u&&"Connected",l&&"Upstream/Downstream",r&&"All"].filter(Boolean)})]})]})}export{it as default};
1
+ import{r as o,R as a,j as e,c as R,B as Q,m as O,n as ee,aC as ie,h as ce,w as B,b as _,i as $,W as de,Z as me,aD as ue,v as he,L as te,S as se,F as q,I as pe}from"./index-C22hdM_h.js";import{d as fe,e as ne,s as ae,f as G,P as oe,h as P,b as F,i as ge,E as V,R as we,j as xe,k as ve,l as be,m as X,n as Y,o as J,p as Ne,q as ye,r as je,t as Ee}from"./context-B0V9EzWJ.js";import{W as Ce}from"./editor-CmeEFdEz.js";import{F as Me,L as Se}from"./ListboxShow-YBO3HIHQ.js";import{S as ke}from"./SearchList-Lag39srv.js";import{n as ze}from"./Input-CxOCLTNw.js";import{B as T}from"./transition-CiMBgn_Y.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./file-DY5SRTK1.js";import"./project-CtAE3tsj.js";import"./help-6Q7f7fjd.js";import"./SourceList-CTL41Fia.js";import"./index-BWibl-Ee.js";function Le({title:t,titleId:s,...n},c){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:c,"aria-labelledby":s},n),t?o.createElement("title",{id:s},t):null,o.createElement("path",{fillRule:"evenodd",d:"M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Z",clipRule:"evenodd"}))}const Ae=o.forwardRef(Le);function Be(){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},a.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function Ie(){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},a.createElement("path",{d:"M0 0h32v4.2H0z"}))}function He(){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},a.createElement("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"}))}function Re(){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},a.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"}))}function De(){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},a.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"}))}const D=({children:t,className:s,...n})=>a.createElement("button",{type:"button",className:P(["react-flow__controls-button",s]),...n},t);D.displayName="ControlButton";const _e=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom}),le=({style:t,showZoom:s=!0,showFitView:n=!0,showInteractive:c=!0,fitViewOptions:u,onZoomIn:l,onZoomOut:r,onFitView:h,onInteractiveChange:p,className:f,children:i,position:N="bottom-left"})=>{const g=fe(),[M,E]=o.useState(!1),{isInteractive:w,minZoomReached:x,maxZoomReached:d}=ne(_e,ae),{zoomIn:v,zoomOut:j,fitView:m}=G();if(o.useEffect(()=>{E(!0)},[]),!M)return null;const z=()=>{v(),l==null||l()},C=()=>{j(),r==null||r()},k=()=>{m(u),h==null||h()},b=()=>{g.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),p==null||p(!w)};return a.createElement(oe,{className:P(["react-flow__controls",f]),position:N,style:t,"data-testid":"rf__controls"},s&&a.createElement(a.Fragment,null,a.createElement(D,{onClick:z,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:d},a.createElement(Be,null)),a.createElement(D,{onClick:C,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:x},a.createElement(Ie,null))),n&&a.createElement(D,{className:"react-flow__controls-fitview",onClick:k,title:"fit view","aria-label":"fit view"},a.createElement(He,null)),c&&a.createElement(D,{className:"react-flow__controls-interactive",onClick:b,title:"toggle interactivity","aria-label":"toggle interactivity"},w?a.createElement(De,null):a.createElement(Re,null)),i)};le.displayName="Controls";var Fe=o.memo(le),S;(function(t){t.Lines="lines",t.Dots="dots",t.Cross="cross"})(S||(S={}));function $e({color:t,dimensions:s,lineWidth:n}){return a.createElement("path",{stroke:t,strokeWidth:n,d:`M${s[0]/2} 0 V${s[1]} M0 ${s[1]/2} H${s[0]}`})}function We({color:t,radius:s}){return a.createElement("circle",{cx:s,cy:s,r:s,fill:t})}const Ue={[S.Dots]:"#91919a",[S.Lines]:"#eee",[S.Cross]:"#e2e2e2"},Ve={[S.Dots]:1,[S.Lines]:1,[S.Cross]:6},Te=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function re({id:t,variant:s=S.Dots,gap:n=20,size:c,lineWidth:u=1,offset:l=2,color:r,style:h,className:p}){const f=o.useRef(null),{transform:i,patternId:N}=ne(Te,ae),g=r||Ue[s],M=c||Ve[s],E=s===S.Dots,w=s===S.Cross,x=Array.isArray(n)?n:[n,n],d=[x[0]*i[2]||1,x[1]*i[2]||1],v=M*i[2],j=w?[v,v]:d,m=E?[v/l,v/l]:[j[0]/l,j[1]/l];return a.createElement("svg",{className:P(["react-flow__background",p]),style:{...h,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:f,"data-testid":"rf__background"},a.createElement("pattern",{id:N+t,x:i[0]%d[0],y:i[1]%d[1],width:d[0],height:d[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${m[0]},-${m[1]})`},E?a.createElement(We,{color:g,radius:v/l}):a.createElement($e,{dimensions:j,color:g,lineWidth:u})),a.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${N+t})`}))}re.displayName="Background";var Oe=o.memo(re);function Ge({handleSelect:t}){const{models:s,lineage:n,mainNode:c,connectedNodes:u}=F(),[l,r]=o.useState(!1),[h,p]=o.useState([]),[f,i]=o.useState(!1);o.useEffect(()=>{p([])},[c,s,n]);function N(){r(!0)}function g(){r(!1)}function M(E){E.length<1||ce(h)||B(c)||B(n)||(i(!0),setTimeout(()=>{const w=Array.from(ge(n,c));p(Object.keys(n).map(x=>{var d;return{name:x,displayName:((d=s.get(x))==null?void 0:d.displayName)??decodeURI(x),description:`${w.includes(x)?"Upstream":"Downstream"} | ${u.has(x)?"Directly":"Indirectly"} Connected`}})),i(!1)},300))}return e.jsxs("div",{className:R("w-full",l?"block absolute top-0 left-0 right-0 z-10 pr-10 bg-light dark:bg-dark @[40rem]:items-end @[40rem]:justify-end @[40rem]:flex @[40rem]:static @[40rem]:pr-0":"items-end justify-end flex"),children:[e.jsx(Q,{shape:ie.Circle,className:R("flex @[40rem]:hidden !py-1 border-transparent",l?"hidden":"flex"),variant:ee.Alternative,size:O.sm,"aria-label":"Show search",onClick:N,children:e.jsx(Ae,{className:"w-3 h-3 text-primary-500"})}),e.jsx(ke,{list:h,placeholder:"Find",searchBy:"displayName",displayBy:"displayName",direction:"top",descriptionBy:"description",showIndex:!1,size:O.sm,onSelect:t,isLoading:f,className:R("w-full @sm:min-w-[12rem] @[40rem]:flex",l?"flex max-w-none":"hidden max-w-[20rem]"),isFullWidth:!0,onInput:M}),e.jsx("button",{className:R("flex @[40rem]:hidden bg-none border-none px-2 py-1 absolute right-0 top-0",l?"flex":"hidden"),"aria-label":"Hide search",onClick:g,children:e.jsx(Me,{className:"w-6 h-6 text-primary-500"})})]})}function K({nodes:t=[]}){const{setCenter:s}=G(),{activeNodes:n,models:c,mainNode:u,nodesMap:l,selectedNodes:r,setSelectedNodes:h,withImpacted:p,connectedNodes:f,lineageCache:i,setActiveEdges:N,setConnections:g,setLineage:M,setLineageCache:E}=F(),w=B(u)?void 0:c.get(u),x=n.size>0?n.size:f.size,d=r.size,v=f.size-1,j=t.filter(b=>b.hidden).length,m=t.filter(b=>_(b.hidden)&&(b.data.type===V.external||b.data.type===V.seed)).length,z=t.filter(b=>_(b.hidden)&&b.data.type===V.cte).length,C=x>0&&x!==v+1;function k(){if(B(u))return;const b=l[u];B(b)||setTimeout(()=>{s(b.position.x,b.position.y,{zoom:.5,duration:0})},200)}return e.jsxs(e.Fragment,{children:[$(w)&&e.jsx("a",{className:"mr-2 w-full whitespace-nowrap text-ellipsis overflow-hidden @lg:block font-bold text-neutral-600 dark:text-neutral-400 cursor-pointer hover:underline",onClick:k,children:de(w.displayName,50,25)}),e.jsxs("span",{className:"bg-neutral-5 px-2 py-0.5 flex rounded-full mr-2",children:[e.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[e.jsx("b",{children:"All:"})," ",t.length]}),j>0&&e.jsxs("span",{className:"whitespace-nowrap block mr-2",children:[e.jsx("b",{children:"Hidden:"})," ",j]}),d>0&&e.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[e.jsx("b",{children:"Selected:"})," ",d]}),C&&e.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[e.jsx("b",{children:"Active:"})," ",x]}),(C||d>0||$(i))&&e.jsx(Q,{size:O.xs,variant:ee.Neutral,format:me.Ghost,className:"!m-0 px-1",onClick:()=>{N(new Map),g(new Map),h(new Set),$(i)&&(M(i),E(void 0))},children:"Reset"})]}),m>0&&e.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[e.jsx("b",{children:"Sources"}),": ",m]}),_(C)&&p&&d===0&&v>0&&e.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[e.jsx("b",{children:"Upstream/Downstream:"})," ",v]}),z>0&&e.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[e.jsx("b",{children:"CTEs:"})," ",z]})]})}const Pe=30;function it({model:t,highlightedNodes:s}){const{setActiveNodes:n,setActiveEdges:c,setConnections:u,setLineage:l,handleError:r,setSelectedNodes:h,setMainNode:p,setWithColumns:f,setHighlightedNodes:i,setNodeConnections:N,setLineageCache:g,setUnknownModels:M,models:E,unknownModels:w}=F(),{refetch:x,isFetching:d,cancel:v}=ue(t.name),{isFetching:j}=he(),[m,z]=o.useState(!1),[C,k]=o.useState(void 0);o.useEffect(()=>{const y=Ce();return y.addEventListener("message",b),x().then(({data:L})=>{k(L),!B(L)&&(z(!0),y.postMessage({topic:"lineage",payload:{currentLineage:{},newLineage:L,mainNode:t.fqn}}))}).catch(L=>{r==null||r(L)}).finally(()=>{n(new Set),c(new Map),u(new Map),h(new Set),g(void 0),p(t.fqn)}),()=>{v==null||v(),y.removeEventListener("message",b),y.terminate(),l({}),N({}),p(void 0),i({})}},[t.name,t.hash]),o.useEffect(()=>{Object.keys(C??{}).forEach(y=>{y=encodeURI(y),_(E.has(y))&&_(w.has(y))&&w.add(y)}),M(new Set(w))},[C,E]),o.useEffect(()=>{i(s??{})},[s]);function b(y){var L;y.data.topic==="lineage"&&(z(!1),N(y.data.payload.nodesConnections),l(y.data.payload.lineage),Object.values(((L=y.data.payload)==null?void 0:L.lineage)??{}).length>Pe&&f(!1)),y.data.topic==="error"&&(r==null||r(y.data.error),z(!1))}const I=d||j||m;return e.jsxs("div",{className:"relative h-full w-full overflow-hidden",children:[I&&e.jsxs("div",{className:"absolute top-0 left-0 z-10 flex justify-center items-center w-full h-full",children:[e.jsx("span",{className:"absolute w-full h-full z-10 bg-transparent-20 backdrop-blur-lg"}),e.jsxs(te,{className:"inline-block z-10",children:[e.jsx(se,{className:"w-3 h-3 border border-neutral-10 mr-4"}),e.jsx("h3",{className:"text-md whitespace-nowrap",children:I?"Loading Model's Lineage...":"Merging Model's..."})]})]}),e.jsx(we,{children:e.jsx(Ze,{})})]})}function Ze(){const{withColumns:t,lineage:s,mainNode:n,selectedEdges:c,selectedNodes:u,withConnected:l,withImpacted:r,withSecondary:h,hasBackground:p,activeEdges:f,connectedNodes:i,connections:N,nodesMap:g,showControls:M,handleError:E,setActiveNodes:w}=F(),{setCenter:x}=G(),[d,v]=o.useState(!1),j=o.useMemo(()=>({model:xe}),[]),m=o.useMemo(()=>ve(s),[s]),z=o.useMemo(()=>be(s),[s]),[C,k]=o.useState([]),[b,I]=o.useState([]);o.useEffect(()=>{if(q(m)||B(n))return;v(!0);const A=X(m,f,c,g),W=Y(Object.values(g),A,n,i,u,N,l,r,h),U=J(m,N,f,A,c,u,i,l,r,h),Z=Ne({nodesMap:g,nodes:W,edges:U});return Z.create().then(H=>{I(H.edges),k(H.nodes)}).catch(H=>{E==null||E(H),I([]),k([])}).finally(()=>{const H=B(n)?void 0:g[n];$(H)&&x(H.position.x,H.position.y,{zoom:.5,duration:0}),setTimeout(()=>{v(!1)},100)}),()=>{Z.terminate(),I([]),k([])}},[f,g,z]),o.useEffect(()=>{if(B(n)||q(C))return;const A=X(m,f,c,g),W=Y(C,A,n,i,u,N,l,r,h),U=J(m,N,f,A,c,u,i,l,r,h);I(U),k(W),w(A)},[N,g,m,f,u,c,i,l,r,h,t,n]);function y(A){k(Ee(A,C))}function L(A){I(je(A,b))}return e.jsxs(e.Fragment,{children:[d&&e.jsxs("div",{className:"absolute top-0 left-0 z-10 flex justify-center items-center w-full h-full",children:[e.jsx("span",{className:"absolute w-full h-full z-10 bg-transparent-20 backdrop-blur-lg"}),e.jsxs(te,{className:"inline-block z-10",children:[e.jsx(se,{className:"w-3 h-3 border border-neutral-10 mr-4"}),e.jsx("h3",{className:"text-md whitespace-nowrap",children:"Building Lineage..."})]})]}),e.jsxs(ye,{nodes:C,edges:b,nodeTypes:j,onNodesChange:y,onEdgesChange:L,nodeOrigin:[.5,.5],minZoom:.05,maxZoom:1.5,snapGrid:[16,16],snapToGrid:!0,children:[M&&e.jsxs(oe,{position:"top-right",className:"bg-theme !m-0 w-full !z-10",children:[e.jsx(qe,{nodes:C}),e.jsx(pe,{})]}),e.jsx(Fe,{className:"bg-light p-1 rounded-md !border-none !shadow-lg"}),e.jsx(Oe,{variant:S.Cross,gap:32,size:4,className:R(p?"opacity-100 stroke-neutral-200 dark:stroke-neutral-800":"opacity-0")})]})]})}function qe({nodes:t=[]}){const{withColumns:s,mainNode:n,selectedNodes:c,withConnected:u,withImpacted:l,withSecondary:r,hasBackground:h,activeNodes:p,highlightedNodes:f,setSelectedNodes:i,setWithColumns:N,setWithConnected:g,setWithImpacted:M,setWithSecondary:E,setHasBackground:w}=F(),x=o.useRef(null),d=o.useMemo(()=>Object.values(f??{}).flat(),[f]);function v(j){d.includes(j.name)||n===j.name||i(m=>(m.has(j.name)?m.delete(j.name):m.add(j.name),new Set(m)))}return e.jsxs("div",{className:"px-2 flex items-center text-xs text-neutral-400 @container",children:[e.jsxs("div",{className:"contents",children:[e.jsxs(T,{className:"flex @lg:hidden bg-none border-none","aria-label":"Show lineage node details",children:[e.jsxs(T.Button,{ref:x,className:"flex items-center relative w-full cursor-pointer bg-primary-10 text-xs rounded-full text-primary-500 py-1 px-3 text-center focus:outline-none focus-visible:border-accent-500 focus-visible:ring-2 focus-visible:ring-light focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-brand-300 border-1 border-transparent",children:["Details",e.jsx(ze,{className:"ml-2 h-4 w-4","aria-hidden":"true"})]}),e.jsx(T.Panel,{className:"absolute left-2 right-2 flex-col z-50 mt-8 transform flex px-4 py-3 bg-theme-lighter shadow-xl focus:ring-2 ring-opacity-5 rounded-lg",children:e.jsx(K,{nodes:t})})]}),e.jsx("div",{className:"hidden @lg:contents w-full",children:e.jsx(K,{nodes:t})})]}),e.jsxs("div",{className:"flex w-full justify-end items-center",children:[e.jsx(Ge,{handleSelect:v}),e.jsx(Se,{options:{Background:w,Columns:p.size>0&&c.size===0?void 0:N,Connected:p.size>0?void 0:g,"Upstream/Downstream":p.size>0?void 0:M,All:p.size>0?void 0:E},value:[s&&"Columns",h&&"Background",u&&"Connected",l&&"Upstream/Downstream",r&&"All"].filter(Boolean)})]})]})}export{it as default};
@@ -1 +1 @@
1
- import{y as B,U as M,t as $,a as d,r as h,v as F,w as m,i as x,e as L,j as s,H as b,h as T,m as E,I as z,V as K,a8 as P,O as w,F as A,b as O}from"./index-COnjINWU.js";import{S as R,b as k,m as C,n as I,o as H,p as U,f as D,g as G}from"./SearchList-B9NnvRod.js";import{P as V}from"./Page-WrN3RYDT.js";import{g as W}from"./context-APidk_GA.js";import{u as f}from"./project-CWUUCZWT.js";import"./Input-CJirBrKe.js";import"./help-6Q7f7fjd.js";import"./transition-DjPYSO2n.js";import"./SplitPane-BSlIdmc8.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./editor-B2GioI_r.js";import"./file-C7afm_LM.js";import"./SourceList-FVjgH2xJ.js";import"./index-CK4fdw8q.js";function ne({route:g=L.Home}){const{pathname:j}=B(),{modelName:i}=M(),u=$(),l=d(e=>e.models),r=d(e=>e.lastSelectedModel),N=d(e=>e.setLastSelectedModel),p=f(e=>e.files),S=f(e=>e.setSelectedFile),n=h.useMemo(()=>Array.from(new Set(l.values())),[l]),{isFetching:c}=F(),t=`${g}/models`,a=m(i)||i===(r==null?void 0:r.name)?r:l.get(encodeURI(i));h.useEffect(()=>{if(m(a))return;const e=p.get(a.path);x(e)&&S(e),N(a),u(`${t}/${a.name}`,{replace:!0})},[p,a,t]);const y=m(a)&&x(i)&&O(c);return s.jsx(V,{sidebar:A(n)?void 0:s.jsx(k,{"update-selector":"tbk-model-name",children:s.jsx(C,{selectable:!0,onChange:e=>u(e.detail.value),className:"pt-3 px-2",children:Object.entries(I.categorize(n)).map(([e,v])=>s.jsx(H,{headline:e,open:!0,children:v.map(o=>s.jsx(U,{size:"xs","hide-icon":!0,active:j===`${t}/${o.name}`,value:`${t}/${o.name}`,"search-value":o.displayName,compact:!0,children:s.jsx(D,{"hide-schema":!0,"hide-catalog":!0,"hide-tooltip":!0,text:o.displayName,children:s.jsx(G,{size:"2xs",slot:"after",children:W(o.type)})})},o.name))},e))})}),content:s.jsx(b.Page,{children:s.jsxs("div",{className:"flex flex-col w-full h-full overflow-hidden",children:[T(n)&&s.jsx(R,{list:n,size:E.lg,searchBy:"index",displayBy:"displayName",to:e=>`${t}/${e.name}`,direction:"top",className:"p-2",isFullWidth:!0,disabled:c}),s.jsx(z,{}),y?s.jsx(K,{link:t,message:"Go Back",description:`Model "${i}" not found.`}):c?s.jsx(P,{children:"Loading Model page..."}):s.jsx(w,{})]})})})}export{ne as default};
1
+ import{y as B,U as M,t as $,a as d,r as h,v as F,w as m,i as x,e as L,j as s,H as b,h as T,m as E,I as z,V as K,a8 as P,O as w,F as A,b as O}from"./index-C22hdM_h.js";import{S as R,b as k,m as C,n as I,o as H,p as U,f as D,g as G}from"./SearchList-Lag39srv.js";import{P as V}from"./Page-kOwPk8A6.js";import{g as W}from"./context-B0V9EzWJ.js";import{u as f}from"./project-CtAE3tsj.js";import"./Input-CxOCLTNw.js";import"./help-6Q7f7fjd.js";import"./transition-CiMBgn_Y.js";import"./SplitPane-7_khUxNG.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./editor-CmeEFdEz.js";import"./file-DY5SRTK1.js";import"./SourceList-CTL41Fia.js";import"./index-BWibl-Ee.js";function ne({route:g=L.Home}){const{pathname:j}=B(),{modelName:i}=M(),u=$(),l=d(e=>e.models),r=d(e=>e.lastSelectedModel),N=d(e=>e.setLastSelectedModel),p=f(e=>e.files),S=f(e=>e.setSelectedFile),n=h.useMemo(()=>Array.from(new Set(l.values())),[l]),{isFetching:c}=F(),t=`${g}/models`,a=m(i)||i===(r==null?void 0:r.name)?r:l.get(encodeURI(i));h.useEffect(()=>{if(m(a))return;const e=p.get(a.path);x(e)&&S(e),N(a),u(`${t}/${a.name}`,{replace:!0})},[p,a,t]);const y=m(a)&&x(i)&&O(c);return s.jsx(V,{sidebar:A(n)?void 0:s.jsx(k,{"update-selector":"tbk-model-name",children:s.jsx(C,{selectable:!0,onChange:e=>u(e.detail.value),className:"pt-3 px-2",children:Object.entries(I.categorize(n)).map(([e,v])=>s.jsx(H,{headline:e,open:!0,children:v.map(o=>s.jsx(U,{size:"xs","hide-icon":!0,active:j===`${t}/${o.name}`,value:`${t}/${o.name}`,"search-value":o.displayName,compact:!0,children:s.jsx(D,{"hide-schema":!0,"hide-catalog":!0,"hide-tooltip":!0,text:o.displayName,children:s.jsx(G,{size:"2xs",slot:"after",children:W(o.type)})})},o.name))},e))})}),content:s.jsx(b.Page,{children:s.jsxs("div",{className:"flex flex-col w-full h-full overflow-hidden",children:[T(n)&&s.jsx(R,{list:n,size:E.lg,searchBy:"index",displayBy:"displayName",to:e=>`${t}/${e.name}`,direction:"top",className:"p-2",isFullWidth:!0,disabled:c}),s.jsx(z,{}),y?s.jsx(K,{link:t,message:"Go Back",description:`Model "${i}" not found.`}):c?s.jsx(P,{children:"Loading Model page..."}):s.jsx(w,{})]})})})}export{ne as default};
@@ -1 +1 @@
1
- import{a as n,j as e,w as f}from"./index-COnjINWU.js";import{S as r}from"./SplitPane-BSlIdmc8.js";function h({sidebar:s,content:i}){const a=n(l=>l.splitPaneSizes),t=n(l=>l.setSplitPaneSizes);return e.jsx(e.Fragment,{children:f(s)?e.jsx("div",{className:"flex w-full h-full overflow-hidden justify-center",children:i}):e.jsxs(r,{sizes:a,minSize:[0,0],snapOffset:0,className:"flex w-full h-full overflow-hidden",onDragEnd:t,children:[e.jsx("div",{className:"w-full h-full overflow-hidden",children:s}),e.jsx("div",{className:"w-full h-full overflow-hidden",children:i})]})})}export{h as P};
1
+ import{a as n,j as e,w as f}from"./index-C22hdM_h.js";import{S as r}from"./SplitPane-7_khUxNG.js";function h({sidebar:s,content:i}){const a=n(l=>l.splitPaneSizes),t=n(l=>l.setSplitPaneSizes);return e.jsx(e.Fragment,{children:f(s)?e.jsx("div",{className:"flex w-full h-full overflow-hidden justify-center",children:i}):e.jsxs(r,{sizes:a,minSize:[0,0],snapOffset:0,className:"flex w-full h-full overflow-hidden",onDragEnd:t,children:[e.jsx("div",{className:"w-full h-full overflow-hidden",children:s}),e.jsx("div",{className:"w-full h-full overflow-hidden",children:i})]})})}export{h as P};
@@ -1 +1 @@
1
- import{t as m,y as p,a as l,r,i as u,e,j as i,O as c}from"./index-COnjINWU.js";import{P as f}from"./Page-WrN3RYDT.js";import{u as v}from"./plan-BwAtu9hd.js";import"./SplitPane-BSlIdmc8.js";function E(){const s=m(),t=p(),o=l(n=>n.environment),a=v(n=>n.planApply);return r.useEffect(()=>{if(a.isRunning&&u(a.environment)){const n=`${e.Plan}/environments/${a.environment}`;t.pathname!==n&&s(n,{replace:!0})}else(t.pathname===e.Plan||t.pathname===`${e.Plan}/environments`)&&s(`${e.Plan}/environments/${o.name}`,{replace:!0})},[t,a.isRunning]),r.useEffect(()=>{s(`${e.Plan}/environments/${o.name}`,{replace:!0})},[o]),i.jsx(f,{content:i.jsx(c,{})})}export{E as default};
1
+ import{t as m,y as p,a as l,r,i as u,e,j as i,O as c}from"./index-C22hdM_h.js";import{P as f}from"./Page-kOwPk8A6.js";import{u as v}from"./plan-BUTy2uM-.js";import"./SplitPane-7_khUxNG.js";function E(){const s=m(),t=p(),o=l(n=>n.environment),a=v(n=>n.planApply);return r.useEffect(()=>{if(a.isRunning&&u(a.environment)){const n=`${e.Plan}/environments/${a.environment}`;t.pathname!==n&&s(n,{replace:!0})}else(t.pathname===e.Plan||t.pathname===`${e.Plan}/environments`)&&s(`${e.Plan}/environments/${o.name}`,{replace:!0})},[t,a.isRunning]),r.useEffect(()=>{s(`${e.Plan}/environments/${o.name}`,{replace:!0})},[o]),i.jsx(f,{content:i.jsx(c,{})})}export{E as default};