zenml-nightly 0.83.0.dev20250623__py3-none-any.whl → 0.83.1.dev20250624__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 (130) hide show
  1. zenml/VERSION +1 -1
  2. zenml/zen_server/dashboard/assets/{404-DmJUgorp.js → 404-B5eko6XL.js} +1 -1
  3. zenml/zen_server/dashboard/assets/{@reactflow-8OCk19Fi.js → @reactflow-B_iCtR7X.js} +1 -1
  4. zenml/zen_server/dashboard/assets/{AlertDialogDropdownItem-CZW4QyWn.js → AlertDialogDropdownItem-DsOmO1FH.js} +1 -1
  5. zenml/zen_server/dashboard/assets/{ButtonGroup-DFWWFGUE.js → ButtonGroup-4sPZDv70.js} +1 -1
  6. zenml/zen_server/dashboard/assets/{CodeSnippet-D2HkkAGr.js → CodeSnippet-Ctplhzdc.js} +1 -1
  7. zenml/zen_server/dashboard/assets/{CollapsibleCard-CnS09ljw.js → CollapsibleCard-CBKenz9f.js} +1 -1
  8. zenml/zen_server/dashboard/assets/{ComponentBadge-CDgdd0Ks.js → ComponentBadge-Cnecw3qz.js} +1 -1
  9. zenml/zen_server/dashboard/assets/{ComponentIcon-CbbOc7lb.js → ComponentIcon-CMiVW-O6.js} +1 -1
  10. zenml/zen_server/dashboard/assets/{DeleteAlertDialog-VIOMDLmx.js → DeleteAlertDialog-DEI0YDzP.js} +1 -1
  11. zenml/zen_server/dashboard/assets/{DialogItem-ClFCqxEp.js → DialogItem-CRCDpYU6.js} +1 -1
  12. zenml/zen_server/dashboard/assets/{Error-CQzjbDcN.js → Error-BG6f_WRd.js} +1 -1
  13. zenml/zen_server/dashboard/assets/{ExecutionStatus-CWreILP0.js → ExecutionStatus-BuhNAE9w.js} +1 -1
  14. zenml/zen_server/dashboard/assets/{Helpbox-CiKxG5_X.js → Helpbox-DtUG2Bf_.js} +1 -1
  15. zenml/zen_server/dashboard/assets/{Infobox-CGxFvqzi.js → Infobox-CSBRrM6r.js} +1 -1
  16. zenml/zen_server/dashboard/assets/{LeftSideMenu-DCsKdIjC.js → LeftSideMenu-DPsCCK3z.js} +1 -1
  17. zenml/zen_server/dashboard/assets/{NestedCollapsible-3M4llYtH.js → NestedCollapsible-CMuDIJlp.js} +1 -1
  18. zenml/zen_server/dashboard/assets/{NumberBox-C0mQktmV.js → NumberBox-DtCv7jh3.js} +1 -1
  19. zenml/zen_server/dashboard/assets/Pagination-CWnEpSpN.js +1 -0
  20. zenml/zen_server/dashboard/assets/{Partials-DSjkttlz.js → Partials-CfHD6OH5.js} +1 -1
  21. zenml/zen_server/dashboard/assets/{ProCta-Dm5cWKpS.js → ProCta-CNyp04C8.js} +1 -1
  22. zenml/zen_server/dashboard/assets/{ProviderIcon-DPwMR6nF.js → ProviderIcon-DHejyg7C.js} +1 -1
  23. zenml/zen_server/dashboard/assets/{ProviderRadio-DEDNRgAb.js → ProviderRadio-tGtie8Gc.js} +1 -1
  24. zenml/zen_server/dashboard/assets/RunsBody-mYwMcWWj.js +1 -0
  25. zenml/zen_server/dashboard/assets/SearchField-BtUi6cYl.js +1 -0
  26. zenml/zen_server/dashboard/assets/{SecretTooltip-CZTRnaCV.js → SecretTooltip-B5u1UsQ9.js} +1 -1
  27. zenml/zen_server/dashboard/assets/{SetPassword-BjNGDC5e.js → SetPassword-BmbgL_ed.js} +1 -1
  28. zenml/zen_server/dashboard/assets/{SheetHeader-CASpN2Lz.js → SheetHeader-DkH7aG9K.js} +1 -1
  29. zenml/zen_server/dashboard/assets/StackComponentList-Bi8BKqCu.js +1 -0
  30. zenml/zen_server/dashboard/assets/StackList-Cvxapo0p.js +1 -0
  31. zenml/zen_server/dashboard/assets/{StackName-ojLC6xdl.js → StackName-CFSZL8ec.js} +1 -1
  32. zenml/zen_server/dashboard/assets/Tabs-D4dv48ry.js +1 -0
  33. zenml/zen_server/dashboard/assets/{Tick-BPrWnNlN.js → Tick-Qquvr4P3.js} +1 -1
  34. zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-CNfKDo2Q.js → UpdatePasswordSchemas-D_DCETSO.js} +1 -1
  35. zenml/zen_server/dashboard/assets/{UsageReason-Cb-mpV8M.js → UsageReason-DhiUV1bu.js} +1 -1
  36. zenml/zen_server/dashboard/assets/{Wizard-Dg8Pmn5A.js → Wizard-BHvY75u_.js} +1 -1
  37. zenml/zen_server/dashboard/assets/{WizardFooter-BcNDIvlQ.js → WizardFooter-FQm8y-jP.js} +1 -1
  38. zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-DCdax7I5.js → all-pipeline-runs-query-DpKw9WL9.js} +1 -1
  39. zenml/zen_server/dashboard/assets/{bulk-delete-C_kpIB9A.js → bulk-delete-CzYA--cC.js} +1 -1
  40. zenml/zen_server/dashboard/assets/{configuration-form-B2hmKGnF.js → configuration-form-DSoMMiPE.js} +1 -1
  41. zenml/zen_server/dashboard/assets/{constants-1EZZxtay.js → constants-DTfsIqHy.js} +1 -1
  42. zenml/zen_server/dashboard/assets/{create-stack-TKmMtrkQ.js → create-stack-BpZrmKDu.js} +1 -1
  43. zenml/zen_server/dashboard/assets/{delete-run-CCR9md_s.js → delete-run-BkyDsKQc.js} +1 -1
  44. zenml/zen_server/dashboard/assets/elk-worker.min-BdOC9sib.js +6263 -0
  45. zenml/zen_server/dashboard/assets/expand-full-BPiXpch2.js +1 -0
  46. zenml/zen_server/dashboard/assets/{form-DFJkaFDX.js → form-BgtamtJm.js} +1 -1
  47. zenml/zen_server/dashboard/assets/{form-schemas-CrznJVzA.js → form-schemas-dyDkAxXP.js} +1 -1
  48. zenml/zen_server/dashboard/assets/{index-BjUu1mP4.js → index-BBt0LDtR.js} +1 -1
  49. zenml/zen_server/dashboard/assets/index-BfNISy0X.css +1 -0
  50. zenml/zen_server/dashboard/assets/{index-BFqbGSck.js → index-BgEfQ3_G.js} +4 -4
  51. zenml/zen_server/dashboard/assets/{index-U992soPJ.js → index-eoDB_1XX.js} +1 -1
  52. zenml/zen_server/dashboard/assets/{layout-Do9YI4QX.js → layout-o1x87a3q.js} +1 -1
  53. zenml/zen_server/dashboard/assets/{login-mutation-D3tFP6Wm.js → login-mutation-C1hvP_cX.js} +1 -1
  54. zenml/zen_server/dashboard/assets/page-4xUZpMN0.js +31 -0
  55. zenml/zen_server/dashboard/assets/page-4zc4xPv2.js +2 -0
  56. zenml/zen_server/dashboard/assets/page-B0104V6C.js +1 -0
  57. zenml/zen_server/dashboard/assets/page-BNJsjvof.js +1 -0
  58. zenml/zen_server/dashboard/assets/{page-sJjNT9xA.js → page-BPQ66vR-.js} +1 -1
  59. zenml/zen_server/dashboard/assets/{page-CAJ8B0vb.js → page-BQgSZ2nH.js} +1 -1
  60. zenml/zen_server/dashboard/assets/page-BXl2ZX6J.js +1 -0
  61. zenml/zen_server/dashboard/assets/{page-CtiuMP_r.js → page-BxeZrG_t.js} +1 -1
  62. zenml/zen_server/dashboard/assets/{page-Cal6XQ4U.js → page-C2A-2Cj_.js} +1 -1
  63. zenml/zen_server/dashboard/assets/page-C2i-C7jv.js +1 -0
  64. zenml/zen_server/dashboard/assets/{page-DJIGaUQ9.js → page-C3JfJxuR.js} +1 -1
  65. zenml/zen_server/dashboard/assets/{page-ChGcZI_6.js → page-CESEqC2L.js} +1 -1
  66. zenml/zen_server/dashboard/assets/{page-DCcuPZ8P.js → page-CF8cTZ7l.js} +1 -1
  67. zenml/zen_server/dashboard/assets/page-CKjsimVu.js +1 -0
  68. zenml/zen_server/dashboard/assets/{page-DNjKHjnH.js → page-COLzBwff.js} +1 -1
  69. zenml/zen_server/dashboard/assets/page-COifg5fa.js +1 -0
  70. zenml/zen_server/dashboard/assets/{page-CnbIYE80.js → page-CQeJuA8T.js} +1 -1
  71. zenml/zen_server/dashboard/assets/{page-DKK6ulgy.js → page-CcjWEjre.js} +1 -1
  72. zenml/zen_server/dashboard/assets/{page-9RjCitFH.js → page-CefGLeWy.js} +1 -1
  73. zenml/zen_server/dashboard/assets/{page-DUKbOhaD.js → page-CfxpV3j4.js} +1 -1
  74. zenml/zen_server/dashboard/assets/{page-D9Hfx6GV.js → page-ClcUzawe.js} +1 -1
  75. zenml/zen_server/dashboard/assets/page-Ct_LB3zo.js +1 -0
  76. zenml/zen_server/dashboard/assets/page-D-ZWUMYY.js +1 -0
  77. zenml/zen_server/dashboard/assets/{page-CUaMMoPG.js → page-D-tJ_Y0a.js} +1 -1
  78. zenml/zen_server/dashboard/assets/{page-CdZCmszX.js → page-DHrvih9u.js} +1 -1
  79. zenml/zen_server/dashboard/assets/{page-DUK0Nd_1.js → page-DMhaHZDw.js} +1 -1
  80. zenml/zen_server/dashboard/assets/{page-CAUYrfui.js → page-DOCOmmKn.js} +1 -1
  81. zenml/zen_server/dashboard/assets/{page-akLcPcKw.js → page-DcQmxKLp.js} +1 -1
  82. zenml/zen_server/dashboard/assets/page-Dh4GRWw5.js +1 -0
  83. zenml/zen_server/dashboard/assets/{page-DwVPpCFg.js → page-DiHZK-1w.js} +1 -1
  84. zenml/zen_server/dashboard/assets/page-Dn7ZNapg.js +1 -0
  85. zenml/zen_server/dashboard/assets/page-Dy4vSQY7.js +1 -0
  86. zenml/zen_server/dashboard/assets/{page-CN7lkvXr.js → page-QrvWQwZb.js} +1 -1
  87. zenml/zen_server/dashboard/assets/{page-BrT0_zSJ.js → page-RF3Fup0q.js} +1 -1
  88. zenml/zen_server/dashboard/assets/page-WuvCrN47.js +1 -0
  89. zenml/zen_server/dashboard/assets/{page-Be3R2uYn.js → page-_WnHBI1F.js} +1 -1
  90. zenml/zen_server/dashboard/assets/{page-C210HcBA.js → page-ghjVNgVE.js} +1 -1
  91. zenml/zen_server/dashboard/assets/{page-BCrKmYIZ.js → page-iDsDiDXw.js} +1 -1
  92. zenml/zen_server/dashboard/assets/{page-ClvmVesa.js → page-rVhXI5ZO.js} +1 -1
  93. zenml/zen_server/dashboard/assets/{page-DEohTSz6.js → page-uxjMX8Iq.js} +1 -1
  94. zenml/zen_server/dashboard/assets/{persist-Dec_w7aB.js → persist-BsdEtCkd.js} +1 -1
  95. zenml/zen_server/dashboard/assets/{persist-DWMWVP-y.js → persist-CFPbMcJX.js} +1 -1
  96. zenml/zen_server/dashboard/assets/{resource-tyes-list-o2LXiMay.js → resource-tyes-list-79FqS3LY.js} +1 -1
  97. zenml/zen_server/dashboard/assets/{resource-type-tooltip-DwHrJstL.js → resource-type-tooltip-BL9ZTRKi.js} +1 -1
  98. zenml/zen_server/dashboard/assets/{service-connectors-DSEMwJ5A.js → service-connectors-Q8h7-_rG.js} +1 -1
  99. zenml/zen_server/dashboard/assets/{service-jxtvgks0.js → service-k-9Vsb30.js} +1 -1
  100. zenml/zen_server/dashboard/assets/{sharedSchema-BXzg0EZz.js → sharedSchema-C_HkejsG.js} +1 -1
  101. zenml/zen_server/dashboard/assets/{stack-detail-query-Cm0fsgo-.js → stack-detail-query-CNmVZ0Bo.js} +1 -1
  102. zenml/zen_server/dashboard/assets/{update-current-user-mutation-D5MjcQ6F.js → update-current-user-mutation-Ca-Lmwuj.js} +1 -1
  103. zenml/zen_server/dashboard/assets/{update-server-settings-mutation-CmnxdxiK.js → update-server-settings-mutation-Bwe3gUt4.js} +1 -1
  104. zenml/zen_server/dashboard/index.html +4 -4
  105. zenml/zen_stores/migrations/versions/0.83.1_release.py +23 -0
  106. {zenml_nightly-0.83.0.dev20250623.dist-info → zenml_nightly-0.83.1.dev20250624.dist-info}/METADATA +5 -9
  107. {zenml_nightly-0.83.0.dev20250623.dist-info → zenml_nightly-0.83.1.dev20250624.dist-info}/RECORD +110 -106
  108. zenml/zen_server/dashboard/assets/RunsBody-BRBn1e2O.js +0 -1
  109. zenml/zen_server/dashboard/assets/SearchField-DY6-UbRT.js +0 -1
  110. zenml/zen_server/dashboard/assets/StackComponentList-Be1pQt9m.js +0 -1
  111. zenml/zen_server/dashboard/assets/StackList-BdiR5DvR.js +0 -1
  112. zenml/zen_server/dashboard/assets/Tabs-DNSKblCM.js +0 -1
  113. zenml/zen_server/dashboard/assets/index-DuhuqTCI.css +0 -1
  114. zenml/zen_server/dashboard/assets/page-B0PsXWiT.js +0 -1
  115. zenml/zen_server/dashboard/assets/page-BcRI3-aR.js +0 -29
  116. zenml/zen_server/dashboard/assets/page-BgknnddT.js +0 -1
  117. zenml/zen_server/dashboard/assets/page-Bs3W2FDi.js +0 -1
  118. zenml/zen_server/dashboard/assets/page-C6KaiZ_W.js +0 -1
  119. zenml/zen_server/dashboard/assets/page-CHxVhF3x.js +0 -1
  120. zenml/zen_server/dashboard/assets/page-CktmtZ8Z.js +0 -1
  121. zenml/zen_server/dashboard/assets/page-CoXzjeEY.js +0 -1
  122. zenml/zen_server/dashboard/assets/page-D9iuB88h.js +0 -1
  123. zenml/zen_server/dashboard/assets/page-DYOucPtA.js +0 -1
  124. zenml/zen_server/dashboard/assets/page-DpqRelAy.js +0 -1
  125. zenml/zen_server/dashboard/assets/page-XURWnYZP.js +0 -1
  126. zenml/zen_server/dashboard/assets/page-abw-2oeW.js +0 -1
  127. zenml/zen_server/dashboard/assets/page-n9ejQ2V3.js +0 -2
  128. {zenml_nightly-0.83.0.dev20250623.dist-info → zenml_nightly-0.83.1.dev20250624.dist-info}/LICENSE +0 -0
  129. {zenml_nightly-0.83.0.dev20250623.dist-info → zenml_nightly-0.83.1.dev20250624.dist-info}/WHEEL +0 -0
  130. {zenml_nightly-0.83.0.dev20250623.dist-info → zenml_nightly-0.83.1.dev20250624.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,31 @@
1
+ import{r as P,j as i,g as Pn,c as li}from"./@radix-Cdvw4jJ8.js";import{H as Mt,f as ut,i as Ue,n as Nt,F as qe,j as $e,o as oi,a as An,B as fe,g as Q,T as _e,q as Te,s as Le,t as Ie,G as Rn,w as Oe,r as tt,J as Is,K as Os,L as ui,M as Ps,N as As,O as cr,Q as Rs,R as zs,U as Ds,S as mt,V as zn,W as Ms,X as Fs,Y as Bs,Z as Hs,_ as Vs,I as qs,$ as Us,a0 as $s,a1 as Zs,a2 as Ws,a3 as Wt,a4 as Dn,a5 as Mn,a6 as Ne,a7 as Se,a8 as ci,a9 as di,aa as hi,h as Ks,ab as Fn,ac as St,ad as Et,ae as _t,af as Tt,ag as Qs,v as Ve,ah as Gs,b as pi,ai as Js,aj as Ys,ak as Xs,al as Bn,am as ea,D as kn,l as fi,p as mi,an as xi,y as ta,E as na,ao as ra,A as ia,ap as sa,m as aa,P as la,z as dr,d as oa,aq as ua,ar as ca}from"./index-BgEfQ3_G.js";import{g as gi,a as yi,b as da}from"./code-snippets-CqONne41.js";import{S as ha,a as pa,C as fa}from"./ComponentIcon-CMiVW-O6.js";import{S as xt}from"./info-QkbQz4QU.js";import{b as Je,c as Ci,h as Yt,q as ma}from"./@tanstack-5gTMR7G2.js";import{E as bi}from"./react-error-boundary.esm-7_MuhCay.js";import{S as wi}from"./SheetHeader-DkH7aG9K.js";import{E as rt}from"./Error-BG6f_WRd.js";import{S as Hn}from"./pipeline-CSUlkd50.js";import{S as xa}from"./terminal-square-XFL_4QN-.js";import{D as zt}from"./DisplayDate-8RESqe5H.js";import{a as Xt,E as ct,b as ji,c as ga,S as ya,g as Ca}from"./ExecutionStatus-BuhNAE9w.js";import{K as le,N as He,a as Ke,V as Qe,b as ba}from"./NestedCollapsible-CMuDIJlp.js";import{L as gt,a as we,c as Vn,f as ki}from"./@react-router-DeDfXbUF.js";import{C as Ge}from"./CodeSnippet-Ctplhzdc.js";import{C as dt,a as wa}from"./CollapsibleCard-CBKenz9f.js";import{E as Me}from"./EmptyState-CjrgDtVk.js";import{i as vi,a as ot}from"./type-guards-CNgPYg8l.js";import{I as en,S as ja}from"./Infobox-CSBRrM6r.js";import{S as ka}from"./check-B9QMTa3f.js";import{S as ht}from"./chevron-down-jbbQh82s.js";import{H as hr,P as pr,u as qn,a as Ni,B as va,b as Na,c as Sa,d as Ea}from"./@reactflow-B_iCtR7X.js";import{S as _a}from"./plus-Cl0_rCVF.js";import{S as Si}from"./refresh-BcTM09NW.js";import{S as Ta}from"./code-browser-CiD8qkBx.js";import{S as tn}from"./logs-CQKlJjo0.js";import{c as Ei,s as La}from"./dates-Buh6SMo7.js";import{S as Ia}from"./expand-full-BPiXpch2.js";import{S as fr}from"./arrow-left-MRXv5pAH.js";import{S as Oa}from"./SearchField-BtUi6cYl.js";import{C as Pa}from"./ComponentBadge-Cnecw3qz.js";import{u as _i}from"./stack-detail-query-CNmVZ0Bo.js";import{S as Aa}from"./terminal-XFL_4QN-.js";import{S as Ra}from"./trash-DP6Tpp_E.js";import{D as za,a as Da}from"./DeleteAlertDialog-DEI0YDzP.js";import{u as Ma}from"./delete-run-BkyDsKQc.js";import"./layout-DBbfEFBe.js";import"./transform-CeZdrxDZ.js";import"./chevron-right-double-Dgp_gEsp.js";import"./check-circle-C4tYvbtw.js";import"./help-Co6aedki.js";import"./eye-CbVlAYty.js";import"./index-DWpiv-Ft.js";import"./zod-XdS2h1ws.js";import"./index.esm-DhJo3mA6.js";const Fa=e=>P.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 2C3.55228 2 4 2.44772 4 3V21C4 21.5523 3.55228 22 3 22C2.44772 22 2 21.5523 2 21V3C2 2.44772 2.44772 2 3 2ZM14.7071 4.29289C15.0976 4.68342 15.0976 5.31658 14.7071 5.70711L9.41421 11H21C21.5523 11 22 11.4477 22 12C22 12.5523 21.5523 13 21 13H9.41421L14.7071 18.2929C15.0976 18.6834 15.0976 19.3166 14.7071 19.7071C14.3166 20.0976 13.6834 20.0976 13.2929 19.7071L6.29289 12.7071C5.90237 12.3166 5.90237 11.6834 6.29289 11.2929L13.2929 4.29289C13.6834 3.90237 14.3166 3.90237 14.7071 4.29289Z"})),Ba=e=>P.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.5971 1.18505C11.8629 1.13038 12.1371 1.13038 12.4029 1.18505C12.7102 1.24824 12.9848 1.40207 13.2032 1.52436C13.2235 1.53575 13.2433 1.54687 13.2627 1.55761L12.7846 2.41823L13.2627 1.55761L20.6627 5.66872C20.6831 5.68009 20.7042 5.6917 20.7258 5.70359C20.9569 5.8309 21.2476 5.99097 21.4707 6.23315L21.1563 6.52296L21.4707 6.23315C21.6637 6.44253 21.8097 6.6907 21.899 6.96105C22.0024 7.27375 22.0011 7.60553 22.0002 7.8694C22.0001 7.89406 22 7.91813 22 7.94153V12.0001C22 12.5524 21.5523 13.0001 21 13.0001C20.4477 13.0001 20 12.5524 20 12.0001V8.69955L17.0029 10.3646C16.992 10.3709 16.9811 10.377 16.9701 10.3829L13 12.5885L13 20.4443C13.3511 20.4447 13.6916 20.6302 13.8742 20.9589C14.1424 21.4417 13.9684 22.0505 13.4856 22.3187L13.2627 22.4426C13.2433 22.4533 13.2235 22.4644 13.2032 22.4758C12.9848 22.5981 12.7102 22.7519 12.4029 22.8151C12.1371 22.8698 11.8629 22.8698 11.5971 22.8151C11.2898 22.7519 11.0152 22.5981 10.7968 22.4758C10.7765 22.4644 10.7567 22.4533 10.7373 22.4426L3.33733 18.3314C3.31688 18.3201 3.2958 18.3085 3.27421 18.2966C3.04308 18.1693 2.75245 18.0092 2.52927 17.767C2.33632 17.5576 2.1903 17.3095 2.10097 17.0391C1.99765 16.7264 1.99886 16.3946 1.99982 16.1308C1.99991 16.1061 2 16.082 2 16.0586V7.94153C2 7.91813 1.99991 7.89406 1.99982 7.8694C1.99886 7.60553 1.99765 7.27375 2.10097 6.96105C2.1903 6.69069 2.33632 6.44253 2.52927 6.23315C2.75244 5.99098 3.04306 5.8309 3.27419 5.7036C3.29579 5.6917 3.31687 5.68009 3.33733 5.66872L3.33733 5.66872L6.99904 3.63444C7.00862 3.62891 7.01828 3.62354 7.02802 3.61834L10.7373 1.55761C10.7567 1.54687 10.7765 1.53575 10.7968 1.52437C11.0152 1.40207 11.2898 1.24824 11.5971 1.18505ZM7.5 5.64404L5.05914 7.00008L12 10.8561L14.4408 9.50006L7.5 5.64404ZM16.5 8.3561L9.55913 4.50008L11.7086 3.30592C11.8602 3.22174 11.9375 3.1792 11.9952 3.15136C11.9969 3.15056 11.9985 3.1498 12 3.14907C12.0015 3.1498 12.0031 3.15056 12.0048 3.15136C12.0625 3.1792 12.1398 3.22173 12.2914 3.30592L18.9408 7.00006L16.5 8.3561ZM11 12.5885L4 8.69959V16.0586C4 16.2416 4.00042 16.3353 4.0045 16.4031C4.00462 16.4051 4.00475 16.407 4.00487 16.4088C4.0064 16.4098 4.00802 16.4108 4.00971 16.4119C4.067 16.4484 4.14867 16.4943 4.30862 16.5831L3.82297 17.4573L4.30862 16.5831L11 20.3006L11 12.5885ZM19 16.0001C17.8954 16.0001 17 16.8955 17 18.0001C17 19.1047 17.8954 20.0001 19 20.0001C20.1046 20.0001 21 19.1047 21 18.0001C21 16.8955 20.1046 16.0001 19 16.0001ZM15 18.0001C15 15.7909 16.7909 14.0001 19 14.0001C21.2091 14.0001 23 15.7909 23 18.0001C23 18.8713 22.7215 19.6775 22.2486 20.3344L22.7071 20.793C23.0976 21.1835 23.0976 21.8167 22.7071 22.2072C22.3166 22.5977 21.6834 22.5977 21.2929 22.2072L20.7052 21.6195C20.1879 21.8636 19.6099 22.0001 19 22.0001C16.7909 22.0001 15 20.2092 15 18.0001Z"})),Ha=e=>P.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.77687 1.00001C2.78469 1.00001 2.79241 1.00001 2.80001 1.00001H6.20001C6.20762 1.00001 6.21533 1.00001 6.22315 1.00001C6.34227 0.999961 6.48452 0.999906 6.60984 1.01015C6.75506 1.02201 6.96305 1.05245 7.181 1.1635C7.46324 1.30731 7.69271 1.53678 7.83652 1.81903C7.94757 2.03697 7.97801 2.24496 7.98988 2.39018C8.00012 2.5155 8.00006 2.65776 8.00002 2.77687C8.00001 2.78469 8.00001 2.79241 8.00001 2.80001V6.20001C8.00001 6.20762 8.00001 6.21533 8.00002 6.22315C8.00006 6.34227 8.00012 6.48452 7.98988 6.60984C7.97801 6.75506 7.94757 6.96305 7.83652 7.181C7.69271 7.46324 7.46324 7.69271 7.181 7.83652C6.96305 7.94757 6.75506 7.97801 6.60984 7.98988C6.48452 8.00012 6.34227 8.00006 6.22315 8.00002C6.21533 8.00001 6.20762 8.00001 6.20001 8.00001H2.80001C2.79241 8.00001 2.78469 8.00001 2.77687 8.00002C2.65776 8.00006 2.5155 8.00012 2.39018 7.98988C2.24496 7.97801 2.03697 7.94757 1.81903 7.83652C1.53678 7.69271 1.30731 7.46324 1.1635 7.181C1.05245 6.96305 1.02201 6.75506 1.01015 6.60984C0.999906 6.48452 0.999961 6.34227 1.00001 6.22315C1.00001 6.21533 1.00001 6.20762 1.00001 6.20001V2.80001C1.00001 2.79241 1.00001 2.78469 1.00001 2.77687C0.999961 2.65776 0.999906 2.5155 1.01015 2.39018C1.02201 2.24496 1.05245 2.03697 1.1635 1.81903C1.30731 1.53678 1.53678 1.30731 1.81903 1.1635C2.03697 1.05245 2.24496 1.02201 2.39018 1.01015C2.5155 0.999906 2.65776 0.999961 2.77687 1.00001ZM3.00001 3.00001V6.00001H6.00001V3.00001H3.00001ZM19.5322 5.52394C19.2488 5.50079 18.8766 5.50001 18.3 5.50001H11C10.4477 5.50001 10 5.0523 10 4.50001C10 3.94773 10.4477 3.50001 11 3.50001L18.3386 3.50001C18.8657 3.49999 19.3205 3.49998 19.695 3.53058C20.0904 3.56288 20.4836 3.6342 20.862 3.82699C21.4265 4.11461 21.8854 4.57356 22.173 5.13804C22.3658 5.51642 22.4371 5.90964 22.4694 6.30498C22.5 6.67955 22.5 7.13431 22.5 7.66145V9.032C22.5 9.47065 22.5 9.84914 22.4787 10.1624C22.4562 10.4922 22.4067 10.8221 22.2717 11.1481C21.9672 11.8832 21.3831 12.4672 20.6481 12.7717C20.3221 12.9067 19.9922 12.9562 19.6624 12.9787C19.3491 13 18.9706 13 18.532 13H18.5C17.9477 13 17.5 12.5523 17.5 12C17.5 11.4477 17.9477 11 18.5 11C18.9796 11 19.2893 10.9995 19.5263 10.9833C19.7542 10.9677 19.8411 10.9411 19.8827 10.9239C20.1277 10.8224 20.3224 10.6277 20.4239 10.3827C20.4411 10.3411 20.4677 10.2543 20.4833 10.0263C20.4995 9.78927 20.5 9.47964 20.5 9.00001V7.70001C20.5 7.12346 20.4992 6.75118 20.4761 6.46785C20.4539 6.19618 20.4162 6.09547 20.391 6.04602C20.2951 5.85786 20.1422 5.70488 19.954 5.60901C19.9046 5.58381 19.8038 5.54613 19.5322 5.52394ZM10.2769 8.50001C10.2847 8.50001 10.2924 8.50001 10.3 8.50001H13.7C13.7076 8.50001 13.7153 8.50001 13.7232 8.50001C13.8423 8.49996 13.9845 8.49991 14.1098 8.51015C14.2551 8.52201 14.4631 8.55245 14.681 8.6635C14.9632 8.80731 15.1927 9.03678 15.3365 9.31903C15.4476 9.53697 15.478 9.74496 15.4899 9.89018C15.5001 10.0155 15.5001 10.1578 15.5 10.2769C15.5 10.2847 15.5 10.2924 15.5 10.3V13.7C15.5 13.7076 15.5 13.7153 15.5 13.7231C15.5001 13.8423 15.5001 13.9845 15.4899 14.1098C15.478 14.2551 15.4476 14.4631 15.3365 14.681C15.1927 14.9632 14.9632 15.1927 14.681 15.3365C14.4631 15.4476 14.2551 15.478 14.1098 15.4899C13.9845 15.5001 13.8423 15.5001 13.7231 15.5C13.7153 15.5 13.7076 15.5 13.7 15.5H10.3C10.2924 15.5 10.2847 15.5 10.2769 15.5C10.1578 15.5001 10.0155 15.5001 9.89018 15.4899C9.74496 15.478 9.53697 15.4476 9.31903 15.3365C9.03678 15.1927 8.80731 14.9632 8.6635 14.681C8.55245 14.4631 8.52201 14.2551 8.51015 14.1098C8.49991 13.9845 8.49996 13.8423 8.50001 13.7232C8.50001 13.7153 8.50001 13.7076 8.50001 13.7V10.3C8.50001 10.2924 8.50001 10.2847 8.50001 10.2769C8.49996 10.1578 8.49991 10.0155 8.51015 9.89018C8.52201 9.74496 8.55245 9.53697 8.6635 9.31903C8.80731 9.03678 9.03678 8.80731 9.31903 8.6635C9.53697 8.55245 9.74496 8.52201 9.89018 8.51015C10.0155 8.49991 10.1578 8.49996 10.2769 8.50001ZM10.5 10.5V13.5H13.5V10.5H10.5ZM5.46802 11H5.50001C6.0523 11 6.50001 11.4477 6.50001 12C6.50001 12.5523 6.0523 13 5.50001 13C5.02039 13 4.71075 13.0006 4.47377 13.0167C4.24577 13.0323 4.15894 13.0589 4.11733 13.0761C3.8723 13.1776 3.67763 13.3723 3.57613 13.6173C3.5589 13.6589 3.53228 13.7458 3.51672 13.9738C3.50055 14.2108 3.50001 14.5204 3.50001 15V16.3C3.50001 16.8766 3.50079 17.2488 3.52394 17.5322C3.54614 17.8038 3.58381 17.9046 3.60901 17.954C3.70488 18.1422 3.85786 18.2951 4.04602 18.391C4.09547 18.4162 4.19618 18.4539 4.46785 18.4761C4.75119 18.4992 5.12346 18.5 5.70001 18.5H13C13.5523 18.5 14 18.9477 14 19.5C14 20.0523 13.5523 20.5 13 20.5H5.66145C5.13431 20.5 4.67955 20.5 4.30498 20.4694C3.90964 20.4371 3.51642 20.3658 3.13804 20.173C2.57356 19.8854 2.11461 19.4265 1.82699 18.862C1.6342 18.4836 1.56288 18.0904 1.53058 17.695C1.49998 17.3205 1.49999 16.8657 1.50001 16.3386L1.50001 14.968C1.5 14.5294 1.49999 14.1509 1.52136 13.8376C1.54387 13.5078 1.59337 13.1779 1.72837 12.852C2.03286 12.1169 2.61688 11.5329 3.35196 11.2284C3.67789 11.0934 4.0078 11.0439 4.33763 11.0214C4.65089 11 5.02937 11 5.46802 11ZM17.7769 16H21.2231C21.3423 16 21.4845 15.9999 21.6098 16.0101C21.7551 16.022 21.9631 16.0525 22.181 16.1635C22.4632 16.3073 22.6927 16.5368 22.8365 16.819C22.9476 17.037 22.978 17.245 22.9899 17.3902C23.0001 17.5155 23.0001 17.6577 23 17.7769C23 17.7847 23 17.7924 23 17.8V21.2C23 21.2076 23 21.2153 23 21.2232C23.0001 21.3423 23.0001 21.4845 22.9899 21.6098C22.978 21.7551 22.9476 21.9631 22.8365 22.181C22.6927 22.4632 22.4632 22.6927 22.181 22.8365C21.9631 22.9476 21.7551 22.978 21.6098 22.9899C21.4845 23.0001 21.3423 23.0001 21.2232 23C21.2153 23 21.2076 23 21.2 23H17.8C17.7924 23 17.7847 23 17.7769 23C17.6577 23.0001 17.5155 23.0001 17.3902 22.9899C17.245 22.978 17.037 22.9476 16.819 22.8365C16.5368 22.6927 16.3073 22.4632 16.1635 22.181C16.0525 21.9631 16.022 21.7551 16.0101 21.6098C15.9999 21.4845 16 21.3423 16 21.2231V17.7769C16 17.6578 15.9999 17.5155 16.0101 17.3902C16.022 17.245 16.0525 17.037 16.1635 16.819C16.3073 16.5368 16.5368 16.3073 16.819 16.1635C17.037 16.0525 17.245 16.022 17.3902 16.0101C17.5155 15.9999 17.6578 16 17.7769 16ZM18 18V21H21V18H18Z"})),mr=e=>P.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.16146 2H17.8385C18.3657 1.99998 18.8205 1.99997 19.195 2.03057C19.5904 2.06287 19.9836 2.13419 20.362 2.32698C20.9265 2.6146 21.3854 3.07354 21.673 3.63803C21.8658 4.01641 21.9371 4.40963 21.9694 4.80497C22 5.17954 22 5.6343 22 6.16144V17.8386C22 18.3657 22 18.8205 21.9694 19.195C21.9371 19.5904 21.8658 19.9836 21.673 20.362C21.3854 20.9265 20.9265 21.3854 20.362 21.673C19.9836 21.8658 19.5904 21.9371 19.195 21.9694C18.8205 22 18.3657 22 17.8386 22H6.16144C5.6343 22 5.17954 22 4.80497 21.9694C4.40963 21.9371 4.01641 21.8658 3.63803 21.673C3.07354 21.3854 2.6146 20.9265 2.32698 20.362C2.13419 19.9836 2.06287 19.5904 2.03057 19.195C1.99997 18.8205 1.99998 18.3657 2 17.8385V6.16146C1.99998 5.63431 1.99997 5.17955 2.03057 4.80497C2.06287 4.40963 2.13419 4.01641 2.32698 3.63803C2.6146 3.07354 3.07354 2.6146 3.63803 2.32698C4.01641 2.13419 4.40963 2.06287 4.80497 2.03057C5.17955 1.99997 5.63431 1.99998 6.16146 2ZM4 10.4649V17.8C4 18.3766 4.00078 18.7488 4.02393 19.0322C4.04612 19.3038 4.0838 19.4045 4.109 19.454C4.20487 19.6422 4.35785 19.7951 4.54601 19.891C4.59546 19.9162 4.69617 19.9539 4.96784 19.9761C5.25117 19.9992 5.62345 20 6.2 20H8L8 15.5681C7.99997 15.3157 7.99994 15.0699 8.01695 14.8618C8.03562 14.6332 8.07969 14.3634 8.21799 14.092C8.40974 13.7157 8.7157 13.4097 9.09202 13.218C9.36344 13.0797 9.63318 13.0356 9.86177 13.0169C10.0699 12.9999 10.3157 13 10.5681 13H13.4319C13.6843 13 13.9301 12.9999 14.1382 13.0169C14.3668 13.0356 14.6366 13.0797 14.908 13.218C15.2843 13.4097 15.5903 13.7157 15.782 14.092C15.9203 14.3634 15.9644 14.6332 15.9831 14.8618C16.0001 15.0699 16 15.3157 16 15.5681L16 20H17.8C18.3766 20 18.7488 19.9992 19.0322 19.9761C19.3038 19.9539 19.4045 19.9162 19.454 19.891C19.6422 19.7951 19.7951 19.6422 19.891 19.454C19.9162 19.4045 19.9539 19.3038 19.9761 19.0322C19.9992 18.7488 20 18.3766 20 17.8V10.4649C19.4117 10.8052 18.7286 11 18 11C16.8053 11 15.7329 10.4762 15 9.64583C14.2671 10.4762 13.1947 11 12 11C10.8053 11 9.73295 10.4762 9 9.64582C8.26706 10.4762 7.19469 11 6 11C5.27143 11 4.58835 10.8052 4 10.4649ZM10 7C10 8.10457 10.8954 9 12 9C13.1046 9 14 8.10457 14 7C14 6.44772 14.4477 6 15 6C15.5523 6 16 6.44772 16 7C16 8.10457 16.8954 9 18 9C19.1046 9 20 8.10457 20 7V6.2C20 5.62345 19.9992 5.25118 19.9761 4.96784C19.9539 4.69617 19.9162 4.59546 19.891 4.54601C19.7951 4.35785 19.6422 4.20487 19.454 4.109C19.4045 4.0838 19.3038 4.04612 19.0322 4.02393C18.7488 4.00078 18.3766 4 17.8 4H6.2C5.62345 4 5.25117 4.00078 4.96784 4.02393C4.69617 4.04612 4.59546 4.0838 4.54601 4.109C4.35785 4.20487 4.20487 4.35785 4.109 4.54601C4.0838 4.59546 4.04612 4.69617 4.02393 4.96784C4.00078 5.25117 4 5.62345 4 6.2V7C4 8.10457 4.89543 9 6 9C7.10457 9 8 8.10457 8 7C8 6.44772 8.44772 6 9 6C9.55229 6 10 6.44772 10 7ZM14 20V15.6C14 15.3035 13.9992 15.1412 13.9897 15.0246C13.9893 15.02 13.9889 15.0156 13.9886 15.0115C13.9844 15.0111 13.98 15.0107 13.9754 15.0103C13.8588 15.0008 13.6965 15 13.4 15H10.6C10.3035 15 10.1412 15.0008 10.0246 15.0103C10.02 15.0107 10.0156 15.0111 10.0114 15.0115C10.0111 15.0156 10.0107 15.02 10.0103 15.0246C10.0008 15.1412 10 15.3035 10 15.6V20H14Z"}));function Ti({artifactType:e,className:t}){switch(e){case"DataAnalysisArtifact":return i.jsx(Ba,{className:t});case"DataArtifact":return i.jsx(pa,{className:t});case"ModelArtifact":return i.jsx(Ha,{className:t});case"SchemaArtifact":return i.jsx(ha,{className:t});case"ServiceArtifact":return i.jsx(mr,{className:t});case"StatisticsArtifact":return i.jsx(mr,{className:t});default:return i.jsx(Mt,{className:t})}}const Kt=e=>P.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.7587 2H16.2413C17.0463 1.99999 17.7106 1.99998 18.2518 2.04419C18.8139 2.09012 19.3306 2.18868 19.816 2.43597C20.5686 2.81947 21.1805 3.43139 21.564 4.18404C21.8113 4.66937 21.9099 5.18608 21.9558 5.74817C22 6.28936 22 6.95372 22 7.75868V16.2413C22 17.0463 22 17.7106 21.9558 18.2518C21.9099 18.8139 21.8113 19.3306 21.564 19.816C21.1805 20.5686 20.5686 21.1805 19.816 21.564C19.3306 21.8113 18.8139 21.9099 18.2518 21.9558C17.7106 22 17.0463 22 16.2413 22H7.75868C6.95372 22 6.28936 22 5.74817 21.9558C5.18608 21.9099 4.66937 21.8113 4.18404 21.564C3.43139 21.1805 2.81947 20.5686 2.43597 19.816C2.18868 19.3306 2.09012 18.8139 2.04419 18.2518C1.99998 17.7106 1.99999 17.0463 2 16.2413V7.7587C1.99999 6.95373 1.99998 6.28937 2.04419 5.74817C2.09012 5.18608 2.18868 4.66937 2.43597 4.18404C2.81947 3.43139 3.43139 2.81947 4.18404 2.43597C4.66937 2.18868 5.18608 2.09012 5.74817 2.04419C6.28937 1.99998 6.95373 1.99999 7.7587 2ZM5.91104 4.03755C5.47262 4.07337 5.24842 4.1383 5.09202 4.21799C4.7157 4.40973 4.40973 4.7157 4.21799 5.09202C4.1383 5.24842 4.07337 5.47262 4.03755 5.91104C4.00078 6.36113 4 6.94342 4 7.8V16.2C4 17.0566 4.00078 17.6389 4.03755 18.089C4.07337 18.5274 4.1383 18.7516 4.21799 18.908C4.40973 19.2843 4.7157 19.5903 5.09202 19.782C5.24842 19.8617 5.47262 19.9266 5.91104 19.9624C6.36113 19.9992 6.94342 20 7.8 20H16.2C17.0566 20 17.6389 19.9992 18.089 19.9624C18.5274 19.9266 18.7516 19.8617 18.908 19.782C19.2843 19.5903 19.5903 19.2843 19.782 18.908C19.8617 18.7516 19.9266 18.5274 19.9624 18.089C19.9992 17.6389 20 17.0566 20 16.2V7.8C20 6.94342 19.9992 6.36113 19.9624 5.91104C19.9266 5.47262 19.8617 5.24842 19.782 5.09202C19.5903 4.7157 19.2843 4.40973 18.908 4.21799C18.7516 4.1383 18.5274 4.07337 18.089 4.03755C17.6389 4.00078 17.0566 4 16.2 4H7.8C6.94342 4 6.36113 4.00078 5.91104 4.03755ZM12 6C12.5523 6 13 6.44772 13 7V17C13 17.5523 12.5523 18 12 18C11.4477 18 11 17.5523 11 17V7C11 6.44772 11.4477 6 12 6ZM16 10C16.5523 10 17 10.4477 17 11V17C17 17.5523 16.5523 18 16 18C15.4477 18 15 17.5523 15 17V11C15 10.4477 15.4477 10 16 10ZM8 12C8.55229 12 9 12.4477 9 13V17C9 17.5523 8.55229 18 8 18C7.44772 18 7 17.5523 7 17V13C7 12.4477 7.44772 12 8 12Z"})),Un=e=>P.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.7587 2H16.2413C17.0463 1.99999 17.7106 1.99998 18.2518 2.04419C18.8139 2.09012 19.3306 2.18868 19.816 2.43597C20.5686 2.81947 21.1805 3.43139 21.564 4.18404C21.8113 4.66937 21.9099 5.18608 21.9558 5.74817C22 6.28936 22 6.95372 22 7.75868V16.2413C22 17.0463 22 17.7106 21.9558 18.2518C21.9099 18.8139 21.8113 19.3306 21.564 19.816C21.1805 20.5686 20.5686 21.1805 19.816 21.564C19.3306 21.8113 18.8139 21.9099 18.2518 21.9558C17.7106 22 17.0463 22 16.2413 22H7.75868C6.95372 22 6.28936 22 5.74817 21.9558C5.18608 21.9099 4.66937 21.8113 4.18404 21.564C3.43139 21.1805 2.81947 20.5686 2.43597 19.816C2.18868 19.3306 2.09012 18.8139 2.04419 18.2518C1.99998 17.7106 1.99999 17.0463 2 16.2413V7.7587C1.99999 6.95373 1.99998 6.28937 2.04419 5.74817C2.09012 5.18608 2.18868 4.66937 2.43597 4.18404C2.81947 3.43139 3.43139 2.81947 4.18404 2.43597C4.66937 2.18868 5.18608 2.09012 5.74817 2.04419C6.28937 1.99998 6.95373 1.99999 7.7587 2ZM5.91104 4.03755C5.47262 4.07337 5.24842 4.1383 5.09202 4.21799C4.7157 4.40973 4.40973 4.7157 4.21799 5.09202C4.1383 5.24842 4.07337 5.47262 4.03755 5.91104C4.00078 6.36113 4 6.94342 4 7.8V16.2C4 17.0566 4.00078 17.6389 4.03755 18.089C4.07337 18.5274 4.1383 18.7516 4.21799 18.908C4.40973 19.2843 4.7157 19.5903 5.09202 19.782C5.24842 19.8617 5.47262 19.9266 5.91104 19.9624C6.36113 19.9992 6.94342 20 7.8 20H16.2C17.0566 20 17.6389 19.9992 18.089 19.9624C18.5274 19.9266 18.7516 19.8617 18.908 19.782C19.2843 19.5903 19.5903 19.2843 19.782 18.908C19.8617 18.7516 19.9266 18.5274 19.9624 18.089C19.9992 17.6389 20 17.0566 20 16.2V7.8C20 6.94342 19.9992 6.36113 19.9624 5.91104C19.9266 5.47262 19.8617 5.24842 19.782 5.09202C19.5903 4.7157 19.2843 4.40973 18.908 4.21799C18.7516 4.1383 18.5274 4.07337 18.089 4.03755C17.6389 4.00078 17.0566 4 16.2 4H7.8C6.94342 4 6.36113 4.00078 5.91104 4.03755ZM10.2071 8.29289C10.5976 8.68342 10.5976 9.31658 10.2071 9.70711L7.91421 12L10.2071 14.2929C10.5976 14.6834 10.5976 15.3166 10.2071 15.7071C9.81658 16.0976 9.18342 16.0976 8.79289 15.7071L5.79289 12.7071C5.40237 12.3166 5.40237 11.6834 5.79289 11.2929L8.79289 8.29289C9.18342 7.90237 9.81658 7.90237 10.2071 8.29289ZM13.7929 8.29289C14.1834 7.90237 14.8166 7.90237 15.2071 8.29289L18.2071 11.2929C18.5976 11.6834 18.5976 12.3166 18.2071 12.7071L15.2071 15.7071C14.8166 16.0976 14.1834 16.0976 13.7929 15.7071C13.4024 15.3166 13.4024 14.6834 13.7929 14.2929L16.0858 12L13.7929 9.70711C13.4024 9.31658 13.4024 8.68342 13.7929 8.29289Z"})),Li=P.createContext(null);function Va({children:e}){const[t,n]=P.useState(new Set),r=a=>t.has(a),s=a=>{n(l=>{const o=new Set(l);return o.add(a),o})};return i.jsx(Li.Provider,{value:{confirmedVisualizations:t,isVisualizationConfirmed:r,confirmVisualization:s},children:e})}function Ii(){const e=P.useContext(Li);if(!e)throw new Error("useArtifactLoadConfirmationContext must be used within a VisualizationConfirmProvider");return e}function qa({versionId:e}){return["artifact_versions",e]}async function Ua({versionId:e}){const t=Ue($e.artifactVersions.detail(e)),n=await ut(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(n.status===404&&Nt(),!n.ok)throw new qe({message:`Error while fetching artifact version ${e}`,status:n.status,statusText:n.statusText});return n.json()}function Lt(e,t){return Je({queryKey:qa(e),queryFn:()=>Ua(e),...t})}function $a({runId:e,queryParams:t={}}){return["runs",e,t]}async function Oi({runId:e,queryParams:t={}}){const n=oi(t),r=Ue($e.runs.detail(e))+(n?`?${n}`:""),s=await ut(r,{method:"GET",headers:{"Content-Type":"application/json"}});if(s.status===404&&Nt(),!s.ok)throw new qe({message:`Error while fetching pipeline run ${e}`,status:s.status,statusText:s.statusText});return s.json()}function Pe(e,t){return Je({queryKey:$a(e),queryFn:()=>Oi(e),...t})}function Za({stepId:e}){return["steps",e]}async function Wa({stepId:e}){const t=Ue($e.steps.detail(e)),n=await ut(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(n.status===404&&Nt(),!n.ok)throw new qe({message:`Error while fetching step ${e}`,status:n.status,statusText:n.statusText});return n.json()}function yt(e,t){return Je({queryKey:Za(e),queryFn:()=>Wa(e),...t})}async function Ka({artifactVersionId:e}){const t=Ue($e.artifactVersions.downloadToken(e)),n=await ut(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!n.ok){const r=await n.json().then(s=>Array.isArray(s.detail)?s.detail[1]:s.detail).catch(()=>"Error while fetching artifact download token");throw new qe({status:n.status,statusText:n.statusText,message:r})}return n.json()}function Qa(e){return Ci({...e,mutationFn:async t=>Ka(t)})}function Ga({artifactVersionId:e}){const{toast:t}=An(),n=Ue($e.artifactVersions.data(e)),{mutate:r,isPending:s}=Qa({onSuccess:l=>{window.open(`${n}?${new URLSearchParams({token:l})}`,"_blank")},onError:l=>{t({status:"error",emphasis:"subtle",rounded:!0,description:l.message})}});function a(){r({artifactVersionId:e})}return i.jsx(fe,{onClick:a,disabled:s,type:"button",children:"Download"})}function Ja({artifactVersionId:e}){var s,a,l,o,c,u,d,p,m,h,C;const t=Lt({versionId:e}),n=(a=(s=t.data)==null?void 0:s.resources)==null?void 0:a.producer_pipeline_run_id,r=(o=(l=t.data)==null?void 0:l.resources)==null?void 0:o.producer_step_run_id;return t.isPending?i.jsx(Q,{className:"h-[500px] w-full"}):t.isError?i.jsx(rt,{err:t.error}):i.jsx(dt,{initialOpen:!0,title:"Details",children:i.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[n&&i.jsx(Xa,{producerRunId:n}),r&&i.jsx(Ya,{producerStepId:r}),i.jsx(le,{label:"Materializer",value:i.jsx(_e,{children:i.jsxs(Te,{children:[i.jsx(Le,{className:"cursor-default",children:(c=t.data.body)==null?void 0:c.materializer.attribute}),i.jsxs(Ie,{align:"start",children:[(u=t.data.body)==null?void 0:u.materializer.module,".",(d=t.data.body)==null?void 0:d.materializer.attribute]})]})})}),i.jsx(le,{label:"Type",value:(p=t.data.body)==null?void 0:p.type}),i.jsx(le,{label:"Author",value:i.jsx("div",{className:"inline-flex items-center gap-1",children:i.jsx(Rn,{username:((h=(m=t.data.resources)==null?void 0:m.user)==null?void 0:h.name)||""})})}),i.jsx(le,{label:"Updated",value:i.jsx(zt,{dateString:((C=t.data.body)==null?void 0:C.updated)||""})})]})})}function Ya({producerStepId:e}){const t=yt({stepId:e});return t.isPending?i.jsx(le,{label:"Producer Step",value:i.jsx(Q,{className:"h-5 w-full"})}):t.isError?null:i.jsx(le,{label:"Producer Step",value:i.jsx(i.Fragment,{children:t.data?i.jsxs(Oe,{color:Xt("completed"),className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[i.jsx(ct,{className:"mr-1 fill-current",status:"completed"}),t.data.name]}):i.jsx(Q,{className:"h-full w-[150px]"})})})}function Xa({producerRunId:e}){var n,r,s,a,l;const t=Pe({runId:e});return t.isPending?i.jsx(le,{label:i.jsx(Q,{className:"h-5 w-full"}),value:i.jsx(Q,{className:"h-5 w-full"})}):t.isError?null:i.jsxs(i.Fragment,{children:[i.jsx(le,{label:"Pipeline",value:i.jsx(gt,{to:tt.projects.pipelines.namespace(encodeURIComponent((r=(n=t.data.body)==null?void 0:n.pipeline)==null?void 0:r.name)),children:i.jsxs(Oe,{color:"purple",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[i.jsx(Hn,{className:"mr-1 h-4 w-4 fill-theme-text-brand"}),(a=(s=t.data.body)==null?void 0:s.pipeline)==null?void 0:a.name]})})}),i.jsx(le,{label:"Producer Run",value:e?i.jsx(gt,{to:tt.projects.runs.detail(e),children:i.jsxs(Oe,{emphasis:"subtle",rounded:!1,className:"inline-flex items-center gap-0.5",color:Xt((l=t.data.body)==null?void 0:l.status),children:[i.jsx(xa,{className:"mr-1 h-4 w-4 fill-current"}),e.split("-")[0]]})}):"Not available"})]})}function el({artifactVersionId:e}){var l,o,c,u;const{data:t,isPending:n,isError:r,error:s}=Lt({versionId:e}),a=(l=t==null?void 0:t.body)==null?void 0:l.artifact_store_id;return r?i.jsx(rt,{err:s}):n?i.jsx(Q,{className:"h-[500px] w-full"}):i.jsx(dt,{initialOpen:!0,title:"Data",children:i.jsxs("dl",{className:"grid w-full grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[i.jsxs("dt",{className:"col-span-3 flex items-center justify-between text-theme-text-secondary",children:["Uri",i.jsx(Ga,{artifactVersionId:e})]}),i.jsx("dd",{className:"col-span-3 w-full truncate text-neutral-700",children:i.jsx("div",{className:"pb-2",children:i.jsx(Ge,{fullWidth:!0,code:t.body.uri})})}),a&&i.jsx(le,{label:"Artifact Store",value:i.jsx(nl,{artifactStoreId:a})}),i.jsx(le,{label:"Data Type",value:i.jsx(Oe,{className:"flex w-fit items-center text-theme-text-primary",color:"grey",emphasis:"subtle",rounded:!1,children:i.jsx(_e,{children:i.jsxs(Te,{children:[i.jsx(Le,{className:"cursor-auto",children:(o=t.body)==null?void 0:o.data_type.attribute}),i.jsxs(Ie,{children:[(c=t.body)==null?void 0:c.data_type.module,".",(u=t.body)==null?void 0:u.data_type.attribute," "]})]})})})})]})})}function tl({artifactVersionId:e}){return i.jsx(dt,{initialOpen:!0,title:"Code",children:i.jsx(Ge,{fullWidth:!0,highlightCode:!0,wrap:!0,code:gi(e)})})}function nl({artifactStoreId:e}){var l,o;const t=Je({...Is.componentDetail(e)});if(t.isPending)return i.jsx(Q,{className:"h-6 w-12"});if(t.isError)return i.jsx("p",{children:"Error loading artifact store"});const n=t.data,r=tt.components.detail(e),s=((l=n.body)==null?void 0:l.type)||"orchestrator",a=(o=n.body)==null?void 0:o.logo_url;return i.jsx(gt,{to:r,children:i.jsxs(Oe,{emphasis:"subtle",rounded:!1,className:"flex w-fit items-center gap-0.5 text-theme-text-primary",color:"grey",children:[a?i.jsx("img",{alt:n.name,width:20,height:20,className:"shrink-0 object-contain",src:a}):i.jsx(fa,{className:"aspect-square h-4 w-4 fill-primary-400 object-contain",type:s}),n.name]})})}function rl({artifactVersionId:e}){const{data:t,isError:n,error:r}=Lt({versionId:e});return n?i.jsx(rt,{err:r}):i.jsxs("div",{className:"space-y-5",children:[t?i.jsx(Ja,{artifactVersionId:t.id}):i.jsx(Q,{className:"h-[500px] rounded-md lg:col-span-2"}),t?i.jsx(el,{artifactVersionId:t.id}):i.jsx(Q,{className:"h-[500px] rounded-md lg:col-span-2"}),t?i.jsx(tl,{artifactVersionId:t.id}):i.jsx(Q,{className:"h-[500px] rounded-md lg:col-span-2"})]})}function $n({metadata:e}){const t=Object.entries(e||{}).filter(([n,r])=>vi(r));return i.jsx(i.Fragment,{children:t.map(([n,r],s)=>i.jsx(He,{data:r,title:n},s))})}function Zn({metadata:e,title:t}){const n=/^<class\s+'.*'>$/,r=Object.entries(e).filter(([a,l])=>!vi(l));if(r.length===0)return null;r.sort((a,l)=>a[0].localeCompare(l[0]));const s=r.reduce((a,[l,o])=>(a[l]=o,a),{});return i.jsx("div",{children:i.jsx(dt,{headerClassName:"flex items-center gap-2",headerChildren:i.jsx(wa,{copyText:JSON.stringify(s)}),initialOpen:!0,title:t||"Uncategorized",children:i.jsx("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:r.map(([a,l],o)=>i.jsx(le,{label:i.jsx(_e,{children:i.jsxs(Te,{children:[i.jsx(Le,{className:"cursor-default truncate",children:a}),i.jsx(Ie,{className:"max-w-[480px]",children:a})]})}),value:i.jsx(i.Fragment,{children:ot(l)&&n.test(l)?i.jsx(Ge,{className:"py-1",highlightCode:!0,code:l}):ot(l)&&Os(l)?i.jsx("a",{className:"underline transition-all duration-200 hover:decoration-transparent",href:l,target:"_blank",rel:"noopener noreferrer",children:l}):i.jsx("div",{className:"whitespace-normal",children:ot(l)?l:JSON.stringify(l)})})},o))})})})}function il({artifactVersionId:e}){var s,a,l;const{data:t,isError:n,error:r}=Lt({versionId:e});return n?i.jsx(rt,{err:r}):!((s=t==null?void 0:t.metadata)!=null&&s.run_metadata)||Object.keys(t.metadata.run_metadata).length===0?i.jsx(Me,{icon:i.jsx(Mt,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:i.jsxs("div",{className:"text-center",children:[i.jsx("p",{className:"mb-2 text-display-xs font-semibold",children:"No metadata found"}),i.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There are no metadata available for this artifact."})]})}):i.jsxs("div",{className:"flex flex-col gap-5",children:[t?i.jsx(Zn,{metadata:(a=t.metadata)==null?void 0:a.run_metadata}):i.jsx(Q,{className:"h-9 w-full"}),t?i.jsx($n,{metadata:(l=t.metadata)==null?void 0:l.run_metadata}):i.jsx(Q,{className:"h-9 w-full"})]})}function Pi({versionId:e,params:t}){return["artifact_versions",e,"visualize",t]}async function sl({versionId:e,params:t={}},n){const r=oi(t).toString(),s=Ue($e.artifactVersions.visualize(e)+(r?`?${r}`:"")),a=await ut(s,{method:"GET",headers:{"Content-Type":"application/json"},signal:n});if(a.status===404){const l=await a.json().then(o=>o.detail).catch(()=>["","Failed to fetch artifact visualization"]);throw new qe({message:l[1]||"Failed to fetch artifact visualization",status:a.status,statusText:a.statusText})}if(!a.ok)throw new qe({message:`Error while fetching artifact visualization for version ${e}`,status:a.status,statusText:a.statusText});return a.json()}function Ai(e,t){return Je({queryKey:Pi(e),queryFn:({signal:n})=>sl(e,n),...t})}function al({content:e}){const t=P.useRef(null),n=()=>{var r;if(t.current){const s=(r=t.current.contentWindow)==null?void 0:r.document.documentElement.scrollHeight;t.current.height=s?`${s}px`:"100%"}};return P.useEffect(()=>(n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}),[]),i.jsx("div",{children:i.jsx("iframe",{className:"w-full",title:"Secure HTML Content",ref:t,srcDoc:e,onLoad:n})})}function ll({content:e}){return i.jsx("div",{className:"flex items-center justify-center",children:i.jsx("img",{src:ui("data:image/png;base64,"+e),alt:"Visualization for artifact"})})}function ol({content:e}){const t=ul(e);return i.jsx(Ge,{fullWidth:!0,highlightCode:!0,code:ot(t)?t:JSON.stringify(t,null,2)})}function ul(e){try{return JSON.parse(e)}catch{return e}}const Ri=e=>P.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C12.5523 2 13 2.44772 13 3V12.5858L16.2929 9.29289C16.6834 8.90237 17.3166 8.90237 17.7071 9.29289C18.0976 9.68342 18.0976 10.3166 17.7071 10.7071L12.7071 15.7071C12.3166 16.0976 11.6834 16.0976 11.2929 15.7071L6.29289 10.7071C5.90237 10.3166 5.90237 9.68342 6.29289 9.29289C6.68342 8.90237 7.31658 8.90237 7.70711 9.29289L11 12.5858V3C11 2.44772 11.4477 2 12 2ZM3 14C3.55229 14 4 14.4477 4 15V16.2C4 17.0566 4.00078 17.6389 4.03755 18.089C4.07337 18.5274 4.1383 18.7516 4.21799 18.908C4.40973 19.2843 4.7157 19.5903 5.09202 19.782C5.24842 19.8617 5.47262 19.9266 5.91104 19.9624C6.36113 19.9992 6.94342 20 7.8 20H16.2C17.0566 20 17.6389 19.9992 18.089 19.9624C18.5274 19.9266 18.7516 19.8617 18.908 19.782C19.2843 19.5903 19.5903 19.2843 19.782 18.908C19.8617 18.7516 19.9266 18.5274 19.9624 18.089C19.9992 17.6389 20 17.0566 20 16.2V15C20 14.4477 20.4477 14 21 14C21.5523 14 22 14.4477 22 15V16.2413C22 17.0463 22 17.7106 21.9558 18.2518C21.9099 18.8139 21.8113 19.3306 21.564 19.816C21.1805 20.5686 20.5686 21.1805 19.816 21.564C19.3306 21.8113 18.8139 21.9099 18.2518 21.9558C17.7106 22 17.0463 22 16.2413 22H7.75868C6.95372 22 6.28936 22 5.74817 21.9558C5.18608 21.9099 4.66937 21.8113 4.18404 21.564C3.43139 21.1805 2.81947 20.5686 2.43597 19.816C2.18868 19.3306 2.09012 18.8139 2.04419 18.2518C1.99998 17.7106 1.99999 17.0463 2 16.2413L2 15C2 14.4477 2.44772 14 3 14Z"})),cl={image:"png",html:"html",markdown:"md",csv:"csv",json:"json"},dl={image:"image/png",html:"text/html",markdown:"text/markdown",csv:"text/csv",json:"application/json"};function zi({artifactVersionId:e,visualizationIndex:t,artifactName:n}){const r={index:t},{data:s,isSuccess:a}=Ai({versionId:e,params:r},{retry:!1});if(!a)return null;const{type:l,value:o}=s;function c(){const d=atob(o),p=new Array(d.length);for(let h=0;h<d.length;h++)p[h]=d.charCodeAt(h);return new Uint8Array(p)}function u(){try{const d=new Blob([l==="image"?c():o],{type:dl[l]}),p=window.URL.createObjectURL(d),m=document.createElement("a");m.href=p,m.download=`${n}_${t}.`+cl[l],m.click()}catch(d){console.error(d)}}return i.jsxs(fe,{intent:"secondary",emphasis:"subtle",size:"md",className:"flex items-center gap-1 bg-theme-surface-primary",onClick:u,children:[i.jsx(Ri,{width:24,height:24,className:"shrink-0 fill-theme-text-primary"}),"Download"]})}function hl(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const pl=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fl=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ml={};function xr(e,t){return(ml.jsx?fl:pl).test(e)}const xl=/[ \t\n\f\r]/g;function gl(e){return typeof e=="object"?e.type==="text"?gr(e.value):!1:gr(e)}function gr(e){return e.replace(xl,"")===""}class Ft{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Ft.prototype.property={};Ft.prototype.normal={};Ft.prototype.space=null;function Di(e,t){const n={},r={};let s=-1;for(;++s<e.length;)Object.assign(n,e[s].property),Object.assign(r,e[s].normal);return new Ft(n,r,t)}function vn(e){return e.toLowerCase()}class Ze{constructor(t,n){this.property=t,this.attribute=n}}Ze.prototype.space=null;Ze.prototype.boolean=!1;Ze.prototype.booleanish=!1;Ze.prototype.overloadedBoolean=!1;Ze.prototype.number=!1;Ze.prototype.commaSeparated=!1;Ze.prototype.spaceSeparated=!1;Ze.prototype.commaOrSpaceSeparated=!1;Ze.prototype.mustUseProperty=!1;Ze.prototype.defined=!1;let yl=0;const G=Ct(),ge=Ct(),Mi=Ct(),O=Ct(),de=Ct(),kt=Ct(),ze=Ct();function Ct(){return 2**++yl}const Nn=Object.freeze(Object.defineProperty({__proto__:null,boolean:G,booleanish:ge,commaOrSpaceSeparated:ze,commaSeparated:kt,number:O,overloadedBoolean:Mi,spaceSeparated:de},Symbol.toStringTag,{value:"Module"})),on=Object.keys(Nn);class Wn extends Ze{constructor(t,n,r,s){let a=-1;if(super(t,n),yr(this,"space",s),typeof r=="number")for(;++a<on.length;){const l=on[a];yr(this,on[a],(r&Nn[l])===Nn[l])}}}Wn.prototype.defined=!0;function yr(e,t,n){n&&(e[t]=n)}const Cl={}.hasOwnProperty;function It(e){const t={},n={};let r;for(r in e.properties)if(Cl.call(e.properties,r)){const s=e.properties[r],a=new Wn(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[vn(r)]=r,n[vn(a.attribute)]=r}return new Ft(t,n,e.space)}const Fi=It({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Bi=It({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Hi(e,t){return t in e?e[t]:t}function Vi(e,t){return Hi(e,t.toLowerCase())}const qi=It({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Vi,properties:{xmlns:null,xmlnsXLink:null}}),Ui=It({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:ge,ariaAutoComplete:null,ariaBusy:ge,ariaChecked:ge,ariaColCount:O,ariaColIndex:O,ariaColSpan:O,ariaControls:de,ariaCurrent:null,ariaDescribedBy:de,ariaDetails:null,ariaDisabled:ge,ariaDropEffect:de,ariaErrorMessage:null,ariaExpanded:ge,ariaFlowTo:de,ariaGrabbed:ge,ariaHasPopup:null,ariaHidden:ge,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:de,ariaLevel:O,ariaLive:null,ariaModal:ge,ariaMultiLine:ge,ariaMultiSelectable:ge,ariaOrientation:null,ariaOwns:de,ariaPlaceholder:null,ariaPosInSet:O,ariaPressed:ge,ariaReadOnly:ge,ariaRelevant:null,ariaRequired:ge,ariaRoleDescription:de,ariaRowCount:O,ariaRowIndex:O,ariaRowSpan:O,ariaSelected:ge,ariaSetSize:O,ariaSort:null,ariaValueMax:O,ariaValueMin:O,ariaValueNow:O,ariaValueText:null,role:null}}),bl=It({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Vi,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:kt,acceptCharset:de,accessKey:de,action:null,allow:null,allowFullScreen:G,allowPaymentRequest:G,allowUserMedia:G,alt:null,as:null,async:G,autoCapitalize:null,autoComplete:de,autoFocus:G,autoPlay:G,blocking:de,capture:null,charSet:null,checked:G,cite:null,className:de,cols:O,colSpan:null,content:null,contentEditable:ge,controls:G,controlsList:de,coords:O|kt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:G,defer:G,dir:null,dirName:null,disabled:G,download:Mi,draggable:ge,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:G,formTarget:null,headers:de,height:O,hidden:G,high:O,href:null,hrefLang:null,htmlFor:de,httpEquiv:de,id:null,imageSizes:null,imageSrcSet:null,inert:G,inputMode:null,integrity:null,is:null,isMap:G,itemId:null,itemProp:de,itemRef:de,itemScope:G,itemType:de,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:G,low:O,manifest:null,max:null,maxLength:O,media:null,method:null,min:null,minLength:O,multiple:G,muted:G,name:null,nonce:null,noModule:G,noValidate:G,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:G,optimum:O,pattern:null,ping:de,placeholder:null,playsInline:G,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:G,referrerPolicy:null,rel:de,required:G,reversed:G,rows:O,rowSpan:O,sandbox:de,scope:null,scoped:G,seamless:G,selected:G,shadowRootClonable:G,shadowRootDelegatesFocus:G,shadowRootMode:null,shape:null,size:O,sizes:null,slot:null,span:O,spellCheck:ge,src:null,srcDoc:null,srcLang:null,srcSet:null,start:O,step:null,style:null,tabIndex:O,target:null,title:null,translate:null,type:null,typeMustMatch:G,useMap:null,value:ge,width:O,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:de,axis:null,background:null,bgColor:null,border:O,borderColor:null,bottomMargin:O,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:G,declare:G,event:null,face:null,frame:null,frameBorder:null,hSpace:O,leftMargin:O,link:null,longDesc:null,lowSrc:null,marginHeight:O,marginWidth:O,noResize:G,noHref:G,noShade:G,noWrap:G,object:null,profile:null,prompt:null,rev:null,rightMargin:O,rules:null,scheme:null,scrolling:ge,standby:null,summary:null,text:null,topMargin:O,valueType:null,version:null,vAlign:null,vLink:null,vSpace:O,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:G,disableRemotePlayback:G,prefix:null,property:null,results:O,security:null,unselectable:null}}),wl=It({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Hi,properties:{about:ze,accentHeight:O,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:O,amplitude:O,arabicForm:null,ascent:O,attributeName:null,attributeType:null,azimuth:O,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:O,by:null,calcMode:null,capHeight:O,className:de,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:O,diffuseConstant:O,direction:null,display:null,dur:null,divisor:O,dominantBaseline:null,download:G,dx:null,dy:null,edgeMode:null,editable:null,elevation:O,enableBackground:null,end:null,event:null,exponent:O,externalResourcesRequired:null,fill:null,fillOpacity:O,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:kt,g2:kt,glyphName:kt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:O,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:O,horizOriginX:O,horizOriginY:O,id:null,ideographic:O,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:O,k:O,k1:O,k2:O,k3:O,k4:O,kernelMatrix:ze,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:O,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:O,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:O,overlineThickness:O,paintOrder:null,panose1:null,path:null,pathLength:O,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:de,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:O,pointsAtY:O,pointsAtZ:O,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ze,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ze,rev:ze,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ze,requiredFeatures:ze,requiredFonts:ze,requiredFormats:ze,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:O,specularExponent:O,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:O,strikethroughThickness:O,string:null,stroke:null,strokeDashArray:ze,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:O,strokeOpacity:O,strokeWidth:null,style:null,surfaceScale:O,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ze,tabIndex:O,tableValues:null,target:null,targetX:O,targetY:O,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ze,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:O,underlineThickness:O,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:O,values:null,vAlphabetic:O,vMathematical:O,vectorEffect:null,vHanging:O,vIdeographic:O,version:null,vertAdvY:O,vertOriginX:O,vertOriginY:O,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:O,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),jl=/^data[-\w.:]+$/i,Cr=/-[a-z]/g,kl=/[A-Z]/g;function vl(e,t){const n=vn(t);let r=t,s=Ze;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&jl.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Cr,Sl);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Cr.test(a)){let l=a.replace(kl,Nl);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}s=Wn}return new s(r,t)}function Nl(e){return"-"+e.toLowerCase()}function Sl(e){return e.charAt(1).toUpperCase()}const El={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},_l=Di([Bi,Fi,qi,Ui,bl],"html"),Kn=Di([Bi,Fi,qi,Ui,wl],"svg");function Tl(e){return e.join(" ").trim()}var wt={},un,br;function Ll(){if(br)return un;br=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,o=/^\s+|\s+$/g,c=`
2
+ `,u="/",d="*",p="",m="comment",h="declaration";un=function(b,E){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];E=E||{};var j=1,I=1;function _(T){var A=T.match(t);A&&(j+=A.length);var M=T.lastIndexOf(c);I=~M?T.length-M:I+T.length}function D(){var T={line:j,column:I};return function(A){return A.position=new z(T),g(),A}}function z(T){this.start=T,this.end={line:j,column:I},this.source=E.source}z.prototype.content=b;function k(T){var A=new Error(E.source+":"+j+":"+I+": "+T);if(A.reason=T,A.filename=E.source,A.line=j,A.column=I,A.source=b,!E.silent)throw A}function R(T){var A=T.exec(b);if(A){var M=A[0];return _(M),b=b.slice(M.length),A}}function g(){R(n)}function y(T){var A;for(T=T||[];A=w();)A!==!1&&T.push(A);return T}function w(){var T=D();if(!(u!=b.charAt(0)||d!=b.charAt(1))){for(var A=2;p!=b.charAt(A)&&(d!=b.charAt(A)||u!=b.charAt(A+1));)++A;if(A+=2,p===b.charAt(A-1))return k("End of comment missing");var M=b.slice(2,A-2);return I+=2,_(M),b=b.slice(A),I+=2,T({type:m,comment:M})}}function N(){var T=D(),A=R(r);if(A){if(w(),!R(s))return k("property missing ':'");var M=R(a),ee=T({type:h,property:C(A[0].replace(e,p)),value:M?C(M[0].replace(e,p)):p});return R(l),ee}}function S(){var T=[];y(T);for(var A;A=N();)A!==!1&&(T.push(A),y(T));return T}return g(),S()};function C(b){return b?b.replace(o,p):p}return un}var wr;function Il(){if(wr)return wt;wr=1;var e=wt&&wt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wt,"__esModule",{value:!0});var t=e(Ll());function n(r,s){var a=null;if(!r||typeof r!="string")return a;var l=(0,t.default)(r),o=typeof s=="function";return l.forEach(function(c){if(c.type==="declaration"){var u=c.property,d=c.value;o?s(u,d,c):d&&(a=a||{},a[u]=d)}}),a}return wt.default=n,wt}var Ol=Il();const jr=Pn(Ol),Pl=jr.default||jr,$i=Zi("end"),Qn=Zi("start");function Zi(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Al(e){const t=Qn(e),n=$i(e);if(t&&n)return{start:t,end:n}}function At(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?kr(e.position):"start"in e||"end"in e?kr(e):"line"in e||"column"in e?Sn(e):""}function Sn(e){return vr(e&&e.line)+":"+vr(e&&e.column)}function kr(e){return Sn(e&&e.start)+"-"+Sn(e&&e.end)}function vr(e){return e&&typeof e=="number"?e:1}class be extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",a={},l=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?s=t:!a.cause&&t&&(l=!0,s=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?a.ruleId=r:(a.source=r.slice(0,c),a.ruleId=r.slice(c+1))}if(!a.place&&a.ancestors&&a.ancestors){const c=a.ancestors[a.ancestors.length-1];c&&(a.place=c.position)}const o=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file,this.message=s,this.line=o?o.line:void 0,this.name=At(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=l&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}be.prototype.file="";be.prototype.name="";be.prototype.reason="";be.prototype.message="";be.prototype.stack="";be.prototype.column=void 0;be.prototype.line=void 0;be.prototype.ancestors=void 0;be.prototype.cause=void 0;be.prototype.fatal=void 0;be.prototype.place=void 0;be.prototype.ruleId=void 0;be.prototype.source=void 0;const Gn={}.hasOwnProperty,Rl=new Map,zl=/[A-Z]/g,Dl=/-([a-z])/g,Ml=new Set(["table","tbody","thead","tfoot","tr"]),Fl=new Set(["td","th"]),Wi="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Bl(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Kl(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Wl(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Kn:_l,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Ki(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function Ki(e,t,n){if(t.type==="element")return Hl(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Vl(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Ul(e,t,n);if(t.type==="mdxjsEsm")return ql(e,t);if(t.type==="root")return $l(e,t,n);if(t.type==="text")return Zl(e,t)}function Hl(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=Kn,e.schema=s),e.ancestors.push(t);const a=Gi(e,t.tagName,!1),l=Ql(e,t);let o=Yn(e,t);return Ml.has(t.tagName)&&(o=o.filter(function(c){return typeof c=="string"?!gl(c):!0})),Qi(e,l,a,t),Jn(l,o),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function Vl(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Dt(e,t.position)}function ql(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Dt(e,t.position)}function Ul(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=Kn,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:Gi(e,t.name,!0),l=Gl(e,t),o=Yn(e,t);return Qi(e,l,a,t),Jn(l,o),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function $l(e,t,n){const r={};return Jn(r,Yn(e,t)),e.create(t,e.Fragment,r,n)}function Zl(e,t){return t.value}function Qi(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Jn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Wl(e,t,n){return r;function r(s,a,l,o){const u=Array.isArray(l.children)?n:t;return o?u(a,l,o):u(a,l)}}function Kl(e,t){return n;function n(r,s,a,l){const o=Array.isArray(a.children),c=Qn(r);return t(s,a,l,o,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function Ql(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&Gn.call(t.properties,s)){const a=Jl(e,s,t.properties[s]);if(a){const[l,o]=a;e.tableCellAlignToStyle&&l==="align"&&typeof o=="string"&&Fl.has(t.tagName)?r=o:n[l]=o}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Gl(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const l=a.expression;l.type;const o=l.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Dt(e,t.position);else{const s=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,a=e.evaluater.evaluateExpression(o.expression)}else Dt(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function Yn(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:Rl;for(;++r<t.children.length;){const a=t.children[r];let l;if(e.passKeys){const c=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(c){const u=s.get(c)||0;l=c+"-"+u,s.set(c,u+1)}}const o=Ki(e,a,l);o!==void 0&&n.push(o)}return n}function Jl(e,t,n){const r=vl(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?hl(n):Tl(n)),r.property==="style"){let s=typeof n=="object"?n:Yl(e,String(n));return e.stylePropertyNameCase==="css"&&(s=Xl(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?El[r.property]||r.property:r.attribute,n]}}function Yl(e,t){const n={};try{Pl(t,r)}catch(s){if(!e.ignoreInvalidStyle){const a=s,l=new be("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=Wi+"#cannot-parse-style-attribute",l}}return n;function r(s,a){let l=s;l.slice(0,2)!=="--"&&(l.slice(0,4)==="-ms-"&&(l="ms-"+l.slice(4)),l=l.replace(Dl,to)),n[l]=a}}function Gi(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let a=-1,l;for(;++a<s.length;){const o=xr(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};l=l?{type:"MemberExpression",object:l,property:o,computed:!!(a&&o.type==="Literal"),optional:!1}:o}r=l}else r=xr(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return Gn.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);Dt(e)}function Dt(e,t){const n=new be("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Wi+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Xl(e){const t={};let n;for(n in e)Gn.call(e,n)&&(t[eo(n)]=e[n]);return t}function eo(e){let t=e.replace(zl,no);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function to(e,t){return t.toUpperCase()}function no(e){return"-"+e.toLowerCase()}const cn={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},ro={};function io(e,t){const n=ro,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ji(e,r,s)}function Ji(e,t,n){if(so(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Nr(e.children,t,n)}return Array.isArray(e)?Nr(e,t,n):""}function Nr(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=Ji(e[s],t,n);return r.join("")}function so(e){return!!(e&&typeof e=="object")}const Sr=document.createElement("i");function Xn(e){const t="&"+e+";";Sr.innerHTML=t;const n=Sr.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function nt(e,t,n,r){const s=e.length;let a=0,l;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);a<r.length;)l=r.slice(a,a+1e4),l.unshift(t,0),e.splice(...l),a+=1e4,t+=1e4}function Be(e,t){return e.length>0?(nt(e,e.length,0,t),e):t}const Er={}.hasOwnProperty;function ao(e){const t={};let n=-1;for(;++n<e.length;)lo(t,e[n]);return t}function lo(e,t){let n;for(n in t){const s=(Er.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let l;if(a)for(l in a){Er.call(s,l)||(s[l]=[]);const o=a[l];oo(s[l],Array.isArray(o)?o:o?[o]:[])}}}function oo(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);nt(e,0,0,r)}function Yi(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function vt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const et=pt(/[A-Za-z]/),De=pt(/[\dA-Za-z]/),uo=pt(/[#-'*+\--9=?A-Z^-~]/);function En(e){return e!==null&&(e<32||e===127)}const _n=pt(/\d/),co=pt(/[\dA-Fa-f]/),ho=pt(/[!-/:-@[-`{-~]/);function $(e){return e!==null&&e<-2}function Ee(e){return e!==null&&(e<0||e===32)}function ie(e){return e===-2||e===-1||e===32}const po=pt(new RegExp("\\p{P}|\\p{S}","u")),fo=pt(/\s/);function pt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ot(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let l="";if(a===37&&De(e.charCodeAt(n+1))&&De(e.charCodeAt(n+2)))s=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(l=String.fromCharCode(a));else if(a>55295&&a<57344){const o=e.charCodeAt(n+1);a<56320&&o>56319&&o<57344?(l=String.fromCharCode(a,o),s=1):l="�"}else l=String.fromCharCode(a);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+s+1,l=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function he(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(c){return ie(c)?(e.enter(n),o(c)):t(c)}function o(c){return ie(c)&&a++<s?(e.consume(c),o):(e.exit(n),t(c))}}const mo={tokenize:xo};function xo(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),he(e,t,"linePrefix")}function s(o){return e.enter("paragraph"),a(o)}function a(o){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,l(o)}function l(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return $(o)?(e.consume(o),e.exit("chunkText"),a):(e.consume(o),l)}}const go={tokenize:yo},_r={tokenize:Co};function yo(e){const t=this,n=[];let r=0,s,a,l;return o;function o(_){if(r<n.length){const D=n[r];return t.containerState=D[1],e.attempt(D[0].continuation,c,u)(_)}return u(_)}function c(_){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&I();const D=t.events.length;let z=D,k;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){k=t.events[z][1].end;break}j(r);let R=D;for(;R<t.events.length;)t.events[R][1].end=Object.assign({},k),R++;return nt(t.events,z+1,0,t.events.slice(D)),t.events.length=R,u(_)}return o(_)}function u(_){if(r===n.length){if(!s)return m(_);if(s.currentConstruct&&s.currentConstruct.concrete)return C(_);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(_r,d,p)(_)}function d(_){return s&&I(),j(r),m(_)}function p(_){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,C(_)}function m(_){return t.containerState={},e.attempt(_r,h,C)(_)}function h(_){return r++,n.push([t.currentConstruct,t.containerState]),m(_)}function C(_){if(_===null){s&&I(),j(0),e.consume(_);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:s}),b(_)}function b(_){if(_===null){E(e.exit("chunkFlow"),!0),j(0),e.consume(_);return}return $(_)?(e.consume(_),E(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(_),b)}function E(_,D){const z=t.sliceStream(_);if(D&&z.push(null),_.previous=a,a&&(a.next=_),a=_,s.defineSkip(_.start),s.write(z),t.parser.lazy[_.start.line]){let k=s.events.length;for(;k--;)if(s.events[k][1].start.offset<l&&(!s.events[k][1].end||s.events[k][1].end.offset>l))return;const R=t.events.length;let g=R,y,w;for(;g--;)if(t.events[g][0]==="exit"&&t.events[g][1].type==="chunkFlow"){if(y){w=t.events[g][1].end;break}y=!0}for(j(r),k=R;k<t.events.length;)t.events[k][1].end=Object.assign({},w),k++;nt(t.events,g+1,0,t.events.slice(R)),t.events.length=k}}function j(_){let D=n.length;for(;D-- >_;){const z=n[D];t.containerState=z[1],z[0].exit.call(t,e)}n.length=_}function I(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function Co(e,t,n){return he(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Tr(e){if(e===null||Ee(e)||fo(e))return 1;if(po(e))return 2}function er(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const a=e[s].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Tn={name:"attention",tokenize:wo,resolveAll:bo};function bo(e,t){let n=-1,r,s,a,l,o,c,u,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p=Object.assign({},e[r][1].end),m=Object.assign({},e[n][1].start);Lr(p,-c),Lr(m,c),l={type:c>1?"strongSequence":"emphasisSequence",start:p,end:Object.assign({},e[r][1].end)},o={type:c>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:m},a={type:c>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},s={type:c>1?"strong":"emphasis",start:Object.assign({},l.start),end:Object.assign({},o.end)},e[r][1].end=Object.assign({},l.start),e[n][1].start=Object.assign({},o.end),u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Be(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Be(u,[["enter",s,t],["enter",l,t],["exit",l,t],["enter",a,t]]),u=Be(u,er(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Be(u,[["exit",a,t],["enter",o,t],["exit",o,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=Be(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,nt(e,r-1,n-r+3,u),n=r+u.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function wo(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=Tr(r);let a;return l;function l(c){return a=c,e.enter("attentionSequence"),o(c)}function o(c){if(c===a)return e.consume(c),o;const u=e.exit("attentionSequence"),d=Tr(c),p=!d||d===2&&s||n.includes(c),m=!s||s===2&&d||n.includes(r);return u._open=!!(a===42?p:p&&(s||!m)),u._close=!!(a===42?m:m&&(d||!p)),t(c)}}function Lr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const jo={name:"autolink",tokenize:ko};function ko(e,t,n){let r=0;return s;function s(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(h){return et(h)?(e.consume(h),l):u(h)}function l(h){return h===43||h===45||h===46||De(h)?(r=1,o(h)):u(h)}function o(h){return h===58?(e.consume(h),r=0,c):(h===43||h===45||h===46||De(h))&&r++<32?(e.consume(h),o):(r=0,u(h))}function c(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||En(h)?n(h):(e.consume(h),c)}function u(h){return h===64?(e.consume(h),d):uo(h)?(e.consume(h),u):n(h)}function d(h){return De(h)?p(h):n(h)}function p(h){return h===46?(e.consume(h),r=0,d):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):m(h)}function m(h){if((h===45||De(h))&&r++<63){const C=h===45?m:p;return e.consume(h),C}return n(h)}}const nn={tokenize:vo,partial:!0};function vo(e,t,n){return r;function r(a){return ie(a)?he(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||$(a)?t(a):n(a)}}const Xi={name:"blockQuote",tokenize:No,continuation:{tokenize:So},exit:Eo};function No(e,t,n){const r=this;return s;function s(l){if(l===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),a}return n(l)}function a(l){return ie(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function So(e,t,n){const r=this;return s;function s(l){return ie(l)?he(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt(Xi,t,n)(l)}}function Eo(e){e.exit("blockQuote")}const es={name:"characterEscape",tokenize:_o};function _o(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),s}function s(a){return ho(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const ts={name:"characterReference",tokenize:To};function To(e,t,n){const r=this;let s=0,a,l;return o;function o(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),c}function c(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),a=31,l=De,d(p))}function u(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=co,d):(e.enter("characterReferenceValue"),a=7,l=_n,d(p))}function d(p){if(p===59&&s){const m=e.exit("characterReferenceValue");return l===De&&!Xn(r.sliceSerialize(m))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(p)&&s++<a?(e.consume(p),d):n(p)}}const Ir={tokenize:Io,partial:!0},Or={name:"codeFenced",tokenize:Lo,concrete:!0};function Lo(e,t,n){const r=this,s={tokenize:z,partial:!0};let a=0,l=0,o;return c;function c(k){return u(k)}function u(k){const R=r.events[r.events.length-1];return a=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,o=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(k)}function d(k){return k===o?(l++,e.consume(k),d):l<3?n(k):(e.exit("codeFencedFenceSequence"),ie(k)?he(e,p,"whitespace")(k):p(k))}function p(k){return k===null||$(k)?(e.exit("codeFencedFence"),r.interrupt?t(k):e.check(Ir,b,D)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(k))}function m(k){return k===null||$(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(k)):ie(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),he(e,h,"whitespace")(k)):k===96&&k===o?n(k):(e.consume(k),m)}function h(k){return k===null||$(k)?p(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),C(k))}function C(k){return k===null||$(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(k)):k===96&&k===o?n(k):(e.consume(k),C)}function b(k){return e.attempt(s,D,E)(k)}function E(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),j}function j(k){return a>0&&ie(k)?he(e,I,"linePrefix",a+1)(k):I(k)}function I(k){return k===null||$(k)?e.check(Ir,b,D)(k):(e.enter("codeFlowValue"),_(k))}function _(k){return k===null||$(k)?(e.exit("codeFlowValue"),I(k)):(e.consume(k),_)}function D(k){return e.exit("codeFenced"),t(k)}function z(k,R,g){let y=0;return w;function w(M){return k.enter("lineEnding"),k.consume(M),k.exit("lineEnding"),N}function N(M){return k.enter("codeFencedFence"),ie(M)?he(k,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):S(M)}function S(M){return M===o?(k.enter("codeFencedFenceSequence"),T(M)):g(M)}function T(M){return M===o?(y++,k.consume(M),T):y>=l?(k.exit("codeFencedFenceSequence"),ie(M)?he(k,A,"whitespace")(M):A(M)):g(M)}function A(M){return M===null||$(M)?(k.exit("codeFencedFence"),R(M)):g(M)}}}function Io(e,t,n){const r=this;return s;function s(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const dn={name:"codeIndented",tokenize:Po},Oo={tokenize:Ao,partial:!0};function Po(e,t,n){const r=this;return s;function s(u){return e.enter("codeIndented"),he(e,a,"linePrefix",5)(u)}function a(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?l(u):n(u)}function l(u){return u===null?c(u):$(u)?e.attempt(Oo,l,c)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||$(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),o)}function c(u){return e.exit("codeIndented"),t(u)}}function Ao(e,t,n){const r=this;return s;function s(l){return r.parser.lazy[r.now().line]?n(l):$(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):he(e,a,"linePrefix",5)(l)}function a(l){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(l):$(l)?s(l):n(l)}}const Ro={name:"codeText",tokenize:Mo,resolve:zo,previous:Do};function zo(e){let t=e.length-4,n=3,r,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function Do(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Mo(e,t,n){let r=0,s,a;return l;function l(p){return e.enter("codeText"),e.enter("codeTextSequence"),o(p)}function o(p){return p===96?(e.consume(p),r++,o):(e.exit("codeTextSequence"),c(p))}function c(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),c):p===96?(a=e.enter("codeTextSequence"),s=0,d(p)):$(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(p))}function u(p){return p===null||p===32||p===96||$(p)?(e.exit("codeTextData"),c(p)):(e.consume(p),u)}function d(p){return p===96?(e.consume(p),s++,d):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(a.type="codeTextData",u(p))}}function ns(e){const t={};let n=-1,r,s,a,l,o,c,u;for(;++n<e.length;){for(;n in t;)n=t[n];if(r=e[n],n&&r[1].type==="chunkFlow"&&e[n-1][1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type==="lineEndingBlank"&&(a+=2),a<c.length&&c[a][1].type==="content"))for(;++a<c.length&&c[a][1].type!=="content";)c[a][1].type==="chunkText"&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Fo(e,n)),n=t[n],u=!0);else if(r[1]._container){for(a=n,s=void 0;a--&&(l=e[a],l[1].type==="lineEnding"||l[1].type==="lineEndingBlank");)l[0]==="enter"&&(s&&(e[s][1].type="lineEndingBlank"),l[1].type="lineEnding",s=a);s&&(r[1].end=Object.assign({},e[s][1].start),o=e.slice(s,n),o.unshift(r),nt(e,s,n-s+1,o))}}return!u}function Fo(e,t){const n=e[t][1],r=e[t][2];let s=t-1;const a=[],l=n._tokenizer||r.parser[n.contentType](n.start),o=l.events,c=[],u={};let d,p,m=-1,h=n,C=0,b=0;const E=[b];for(;h;){for(;e[++s][1]!==h;);a.push(s),h._tokenizer||(d=r.sliceStream(h),h.next||d.push(null),p&&l.defineSkip(h.start),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(d),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),p=h,h=h.next}for(h=n;++m<o.length;)o[m][0]==="exit"&&o[m-1][0]==="enter"&&o[m][1].type===o[m-1][1].type&&o[m][1].start.line!==o[m][1].end.line&&(b=m+1,E.push(b),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(l.events=[],h?(h._tokenizer=void 0,h.previous=void 0):E.pop(),m=E.length;m--;){const j=o.slice(E[m],E[m+1]),I=a.pop();c.unshift([I,I+j.length-1]),nt(e,I,2,j)}for(m=-1;++m<c.length;)u[C+c[m][0]]=C+c[m][1],C+=c[m][1]-c[m][0]-1;return u}const Bo={tokenize:qo,resolve:Vo},Ho={tokenize:Uo,partial:!0};function Vo(e){return ns(e),e}function qo(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(o)}function s(o){return o===null?a(o):$(o)?e.check(Ho,l,a)(o):(e.consume(o),s)}function a(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function l(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function Uo(e,t,n){const r=this;return s;function s(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),he(e,a,"linePrefix")}function a(l){if(l===null||$(l))return n(l);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function rs(e,t,n,r,s,a,l,o,c){const u=c||Number.POSITIVE_INFINITY;let d=0;return p;function p(j){return j===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(j),e.exit(a),m):j===null||j===32||j===41||En(j)?n(j):(e.enter(r),e.enter(l),e.enter(o),e.enter("chunkString",{contentType:"string"}),b(j))}function m(j){return j===62?(e.enter(a),e.consume(j),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),h(j))}function h(j){return j===62?(e.exit("chunkString"),e.exit(o),m(j)):j===null||j===60||$(j)?n(j):(e.consume(j),j===92?C:h)}function C(j){return j===60||j===62||j===92?(e.consume(j),h):h(j)}function b(j){return!d&&(j===null||j===41||Ee(j))?(e.exit("chunkString"),e.exit(o),e.exit(l),e.exit(r),t(j)):d<u&&j===40?(e.consume(j),d++,b):j===41?(e.consume(j),d--,b):j===null||j===32||j===40||En(j)?n(j):(e.consume(j),j===92?E:b)}function E(j){return j===40||j===41||j===92?(e.consume(j),b):b(j)}}function is(e,t,n,r,s,a){const l=this;let o=0,c;return u;function u(h){return e.enter(r),e.enter(s),e.consume(h),e.exit(s),e.enter(a),d}function d(h){return o>999||h===null||h===91||h===93&&!c||h===94&&!o&&"_hiddenFootnoteSupport"in l.parser.constructs?n(h):h===93?(e.exit(a),e.enter(s),e.consume(h),e.exit(s),e.exit(r),t):$(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),p(h))}function p(h){return h===null||h===91||h===93||$(h)||o++>999?(e.exit("chunkString"),d(h)):(e.consume(h),c||(c=!ie(h)),h===92?m:p)}function m(h){return h===91||h===92||h===93?(e.consume(h),o++,p):p(h)}}function ss(e,t,n,r,s,a){let l;return o;function o(m){return m===34||m===39||m===40?(e.enter(r),e.enter(s),e.consume(m),e.exit(s),l=m===40?41:m,c):n(m)}function c(m){return m===l?(e.enter(s),e.consume(m),e.exit(s),e.exit(r),t):(e.enter(a),u(m))}function u(m){return m===l?(e.exit(a),c(l)):m===null?n(m):$(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),he(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===l||m===null||$(m)?(e.exit("chunkString"),u(m)):(e.consume(m),m===92?p:d)}function p(m){return m===l||m===92?(e.consume(m),d):d(m)}}function Rt(e,t){let n;return r;function r(s){return $(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):ie(s)?he(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const $o={name:"definition",tokenize:Wo},Zo={tokenize:Ko,partial:!0};function Wo(e,t,n){const r=this;let s;return a;function a(h){return e.enter("definition"),l(h)}function l(h){return is.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function o(h){return s=vt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),c):n(h)}function c(h){return Ee(h)?Rt(e,u)(h):u(h)}function u(h){return rs(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function d(h){return e.attempt(Zo,p,p)(h)}function p(h){return ie(h)?he(e,m,"whitespace")(h):m(h)}function m(h){return h===null||$(h)?(e.exit("definition"),r.parser.defined.push(s),t(h)):n(h)}}function Ko(e,t,n){return r;function r(o){return Ee(o)?Rt(e,s)(o):n(o)}function s(o){return ss(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function a(o){return ie(o)?he(e,l,"whitespace")(o):l(o)}function l(o){return o===null||$(o)?t(o):n(o)}}const Qo={name:"hardBreakEscape",tokenize:Go};function Go(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return $(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const Jo={name:"headingAtx",tokenize:Xo,resolve:Yo};function Yo(e,t){let n=e.length-2,r=3,s,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},nt(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function Xo(e,t,n){let r=0;return s;function s(d){return e.enter("atxHeading"),a(d)}function a(d){return e.enter("atxHeadingSequence"),l(d)}function l(d){return d===35&&r++<6?(e.consume(d),l):d===null||Ee(d)?(e.exit("atxHeadingSequence"),o(d)):n(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),c(d)):d===null||$(d)?(e.exit("atxHeading"),t(d)):ie(d)?he(e,o,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function c(d){return d===35?(e.consume(d),c):(e.exit("atxHeadingSequence"),o(d))}function u(d){return d===null||d===35||Ee(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),u)}}const eu=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Pr=["pre","script","style","textarea"],tu={name:"htmlFlow",tokenize:su,resolveTo:iu,concrete:!0},nu={tokenize:lu,partial:!0},ru={tokenize:au,partial:!0};function iu(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function su(e,t,n){const r=this;let s,a,l,o,c;return u;function u(f){return d(f)}function d(f){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(f),p}function p(f){return f===33?(e.consume(f),m):f===47?(e.consume(f),a=!0,b):f===63?(e.consume(f),s=3,r.interrupt?t:x):et(f)?(e.consume(f),l=String.fromCharCode(f),E):n(f)}function m(f){return f===45?(e.consume(f),s=2,h):f===91?(e.consume(f),s=5,o=0,C):et(f)?(e.consume(f),s=4,r.interrupt?t:x):n(f)}function h(f){return f===45?(e.consume(f),r.interrupt?t:x):n(f)}function C(f){const re="CDATA[";return f===re.charCodeAt(o++)?(e.consume(f),o===re.length?r.interrupt?t:S:C):n(f)}function b(f){return et(f)?(e.consume(f),l=String.fromCharCode(f),E):n(f)}function E(f){if(f===null||f===47||f===62||Ee(f)){const re=f===47,ue=l.toLowerCase();return!re&&!a&&Pr.includes(ue)?(s=1,r.interrupt?t(f):S(f)):eu.includes(l.toLowerCase())?(s=6,re?(e.consume(f),j):r.interrupt?t(f):S(f)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(f):a?I(f):_(f))}return f===45||De(f)?(e.consume(f),l+=String.fromCharCode(f),E):n(f)}function j(f){return f===62?(e.consume(f),r.interrupt?t:S):n(f)}function I(f){return ie(f)?(e.consume(f),I):w(f)}function _(f){return f===47?(e.consume(f),w):f===58||f===95||et(f)?(e.consume(f),D):ie(f)?(e.consume(f),_):w(f)}function D(f){return f===45||f===46||f===58||f===95||De(f)?(e.consume(f),D):z(f)}function z(f){return f===61?(e.consume(f),k):ie(f)?(e.consume(f),z):_(f)}function k(f){return f===null||f===60||f===61||f===62||f===96?n(f):f===34||f===39?(e.consume(f),c=f,R):ie(f)?(e.consume(f),k):g(f)}function R(f){return f===c?(e.consume(f),c=null,y):f===null||$(f)?n(f):(e.consume(f),R)}function g(f){return f===null||f===34||f===39||f===47||f===60||f===61||f===62||f===96||Ee(f)?z(f):(e.consume(f),g)}function y(f){return f===47||f===62||ie(f)?_(f):n(f)}function w(f){return f===62?(e.consume(f),N):n(f)}function N(f){return f===null||$(f)?S(f):ie(f)?(e.consume(f),N):n(f)}function S(f){return f===45&&s===2?(e.consume(f),ee):f===60&&s===1?(e.consume(f),B):f===62&&s===4?(e.consume(f),V):f===63&&s===3?(e.consume(f),x):f===93&&s===5?(e.consume(f),F):$(f)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(nu,q,T)(f)):f===null||$(f)?(e.exit("htmlFlowData"),T(f)):(e.consume(f),S)}function T(f){return e.check(ru,A,q)(f)}function A(f){return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),M}function M(f){return f===null||$(f)?T(f):(e.enter("htmlFlowData"),S(f))}function ee(f){return f===45?(e.consume(f),x):S(f)}function B(f){return f===47?(e.consume(f),l="",J):S(f)}function J(f){if(f===62){const re=l.toLowerCase();return Pr.includes(re)?(e.consume(f),V):S(f)}return et(f)&&l.length<8?(e.consume(f),l+=String.fromCharCode(f),J):S(f)}function F(f){return f===93?(e.consume(f),x):S(f)}function x(f){return f===62?(e.consume(f),V):f===45&&s===2?(e.consume(f),x):S(f)}function V(f){return f===null||$(f)?(e.exit("htmlFlowData"),q(f)):(e.consume(f),V)}function q(f){return e.exit("htmlFlow"),t(f)}}function au(e,t,n){const r=this;return s;function s(l){return $(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):n(l)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function lu(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(nn,t,n)}}const ou={name:"htmlText",tokenize:uu};function uu(e,t,n){const r=this;let s,a,l;return o;function o(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),c}function c(x){return x===33?(e.consume(x),u):x===47?(e.consume(x),z):x===63?(e.consume(x),_):et(x)?(e.consume(x),g):n(x)}function u(x){return x===45?(e.consume(x),d):x===91?(e.consume(x),a=0,C):et(x)?(e.consume(x),I):n(x)}function d(x){return x===45?(e.consume(x),h):n(x)}function p(x){return x===null?n(x):x===45?(e.consume(x),m):$(x)?(l=p,B(x)):(e.consume(x),p)}function m(x){return x===45?(e.consume(x),h):p(x)}function h(x){return x===62?ee(x):x===45?m(x):p(x)}function C(x){const V="CDATA[";return x===V.charCodeAt(a++)?(e.consume(x),a===V.length?b:C):n(x)}function b(x){return x===null?n(x):x===93?(e.consume(x),E):$(x)?(l=b,B(x)):(e.consume(x),b)}function E(x){return x===93?(e.consume(x),j):b(x)}function j(x){return x===62?ee(x):x===93?(e.consume(x),j):b(x)}function I(x){return x===null||x===62?ee(x):$(x)?(l=I,B(x)):(e.consume(x),I)}function _(x){return x===null?n(x):x===63?(e.consume(x),D):$(x)?(l=_,B(x)):(e.consume(x),_)}function D(x){return x===62?ee(x):_(x)}function z(x){return et(x)?(e.consume(x),k):n(x)}function k(x){return x===45||De(x)?(e.consume(x),k):R(x)}function R(x){return $(x)?(l=R,B(x)):ie(x)?(e.consume(x),R):ee(x)}function g(x){return x===45||De(x)?(e.consume(x),g):x===47||x===62||Ee(x)?y(x):n(x)}function y(x){return x===47?(e.consume(x),ee):x===58||x===95||et(x)?(e.consume(x),w):$(x)?(l=y,B(x)):ie(x)?(e.consume(x),y):ee(x)}function w(x){return x===45||x===46||x===58||x===95||De(x)?(e.consume(x),w):N(x)}function N(x){return x===61?(e.consume(x),S):$(x)?(l=N,B(x)):ie(x)?(e.consume(x),N):y(x)}function S(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),s=x,T):$(x)?(l=S,B(x)):ie(x)?(e.consume(x),S):(e.consume(x),A)}function T(x){return x===s?(e.consume(x),s=void 0,M):x===null?n(x):$(x)?(l=T,B(x)):(e.consume(x),T)}function A(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||Ee(x)?y(x):(e.consume(x),A)}function M(x){return x===47||x===62||Ee(x)?y(x):n(x)}function ee(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function B(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),J}function J(x){return ie(x)?he(e,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):F(x)}function F(x){return e.enter("htmlTextData"),l(x)}}const tr={name:"labelEnd",tokenize:mu,resolveTo:fu,resolveAll:pu},cu={tokenize:xu},du={tokenize:gu},hu={tokenize:yu};function pu(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function fu(e,t){let n=e.length,r=0,s,a,l,o;for(;n--;)if(s=e[n][1],a){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(a=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(l=n);const c={type:e[a][1].type==="labelLink"?"link":"image",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"label",start:Object.assign({},e[a][1].start),end:Object.assign({},e[l][1].end)},d={type:"labelText",start:Object.assign({},e[a+r+2][1].end),end:Object.assign({},e[l-2][1].start)};return o=[["enter",c,t],["enter",u,t]],o=Be(o,e.slice(a+1,a+r+3)),o=Be(o,[["enter",d,t]]),o=Be(o,er(t.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),t)),o=Be(o,[["exit",d,t],e[l-2],e[l-1],["exit",u,t]]),o=Be(o,e.slice(l+1)),o=Be(o,[["exit",c,t]]),nt(e,a,e.length,o),e}function mu(e,t,n){const r=this;let s=r.events.length,a,l;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){a=r.events[s][1];break}return o;function o(m){return a?a._inactive?p(m):(l=r.parser.defined.includes(vt(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),c):n(m)}function c(m){return m===40?e.attempt(cu,d,l?d:p)(m):m===91?e.attempt(du,d,l?u:p)(m):l?d(m):p(m)}function u(m){return e.attempt(hu,d,p)(m)}function d(m){return t(m)}function p(m){return a._balanced=!0,n(m)}}function xu(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),s}function s(p){return Ee(p)?Rt(e,a)(p):a(p)}function a(p){return p===41?d(p):rs(e,l,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function l(p){return Ee(p)?Rt(e,c)(p):d(p)}function o(p){return n(p)}function c(p){return p===34||p===39||p===40?ss(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):d(p)}function u(p){return Ee(p)?Rt(e,d)(p):d(p)}function d(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function gu(e,t,n){const r=this;return s;function s(o){return is.call(r,e,a,l,"reference","referenceMarker","referenceString")(o)}function a(o){return r.parser.defined.includes(vt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function l(o){return n(o)}}function yu(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),s}function s(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const Cu={name:"labelStartImage",tokenize:bu,resolveAll:tr.resolveAll};function bu(e,t,n){const r=this;return s;function s(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),a}function a(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),l):n(o)}function l(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const wu={name:"labelStartLink",tokenize:ju,resolveAll:tr.resolveAll};function ju(e,t,n){const r=this;return s;function s(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),a}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const hn={name:"lineEnding",tokenize:ku};function ku(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),he(e,t,"linePrefix")}}const $t={name:"thematicBreak",tokenize:vu};function vu(e,t,n){let r=0,s;return a;function a(u){return e.enter("thematicBreak"),l(u)}function l(u){return s=u,o(u)}function o(u){return u===s?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||$(u))?(e.exit("thematicBreak"),t(u)):n(u)}function c(u){return u===s?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),ie(u)?he(e,o,"whitespace")(u):o(u))}}const ve={name:"list",tokenize:Eu,continuation:{tokenize:_u},exit:Lu},Nu={tokenize:Iu,partial:!0},Su={tokenize:Tu,partial:!0};function Eu(e,t,n){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,l=0;return o;function o(h){const C=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(C==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:_n(h)){if(r.containerState.type||(r.containerState.type=C,e.enter(C,{_container:!0})),C==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check($t,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(h)}return n(h)}function c(h){return _n(h)&&++l<10?(e.consume(h),c):(!r.interrupt||l<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(nn,r.interrupt?n:d,e.attempt(Nu,m,p))}function d(h){return r.containerState.initialBlankLine=!0,a++,m(h)}function p(h){return ie(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),m):n(h)}function m(h){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function _u(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(nn,s,a);function s(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,he(e,t,"listItemIndent",r.containerState.size+1)(o)}function a(o){return r.containerState.furtherBlankLines||!ie(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Su,t,l)(o))}function l(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,he(e,e.attempt(ve,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function Tu(e,t,n){const r=this;return he(e,s,"listItemIndent",r.containerState.size+1);function s(a){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(a):n(a)}}function Lu(e){e.exit(this.containerState.type)}function Iu(e,t,n){const r=this;return he(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const l=r.events[r.events.length-1];return!ie(a)&&l&&l[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Ar={name:"setextUnderline",tokenize:Pu,resolveTo:Ou};function Ou(e,t){let n=e.length,r,s,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const l={type:"setextHeading",start:Object.assign({},e[s][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",l,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[a][1].end)):e[r][1]=l,e.push(["exit",l,t]),e}function Pu(e,t,n){const r=this;let s;return a;function a(u){let d=r.events.length,p;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){p=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),s=u,l(u)):n(u)}function l(u){return e.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===s?(e.consume(u),o):(e.exit("setextHeadingLineSequence"),ie(u)?he(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||$(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const Au={tokenize:Ru};function Ru(e){const t=this,n=e.attempt(nn,r,e.attempt(this.parser.constructs.flowInitial,s,he(e,e.attempt(this.parser.constructs.flow,s,e.attempt(Bo,s)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const zu={resolveAll:ls()},Du=as("string"),Mu=as("text");function as(e){return{tokenize:t,resolveAll:ls(e==="text"?Fu:void 0)};function t(n){const r=this,s=this.parser.constructs[e],a=n.attempt(s,l,o);return l;function l(d){return u(d)?a(d):o(d)}function o(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),c}function c(d){return u(d)?(n.exit("data"),a(d)):(n.consume(d),c)}function u(d){if(d===null)return!0;const p=s[d];let m=-1;if(p)for(;++m<p.length;){const h=p[m];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function ls(e){return t;function t(n,r){let s=-1,a;for(;++s<=n.length;)a===void 0?n[s]&&n[s][1].type==="data"&&(a=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==a+2&&(n[a][1].end=n[s-1][1].end,n.splice(a+2,s-a-2),s=a+2),a=void 0);return e?e(n,r):n}}function Fu(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],s=t.sliceStream(r);let a=s.length,l=-1,o=0,c;for(;a--;){const u=s[a];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)o++,l--;if(l)break;l=-1}else if(u===-2)c=!0,o++;else if(u!==-1){a++;break}}if(o){const u={type:n===e.length||c||o<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-o,offset:r.end.offset-o,_index:r.start._index+a,_bufferIndex:a?l:r.start._bufferIndex+l},end:Object.assign({},r.end)};r.end=Object.assign({},u.start),r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}function Bu(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const s={},a=[];let l=[],o=[];const c={consume:I,enter:_,exit:D,attempt:R(z),check:R(k),interrupt:R(k,{interrupt:!0})},u={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:h,sliceSerialize:m,now:C,defineSkip:b,write:p};let d=t.tokenize.call(u,c);return t.resolveAll&&a.push(t),u;function p(N){return l=Be(l,N),E(),l[l.length-1]!==null?[]:(g(t,0),u.events=er(a,u.events,u),u.events)}function m(N,S){return Vu(h(N),S)}function h(N){return Hu(l,N)}function C(){const{line:N,column:S,offset:T,_index:A,_bufferIndex:M}=r;return{line:N,column:S,offset:T,_index:A,_bufferIndex:M}}function b(N){s[N.line]=N.column,w()}function E(){let N;for(;r._index<l.length;){const S=l[r._index];if(typeof S=="string")for(N=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===N&&r._bufferIndex<S.length;)j(S.charCodeAt(r._bufferIndex));else j(S)}}function j(N){d=d(N)}function I(N){$(N)?(r.line++,r.column=1,r.offset+=N===-3?2:1,w()):N!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=N}function _(N,S){const T=S||{};return T.type=N,T.start=C(),u.events.push(["enter",T,u]),o.push(T),T}function D(N){const S=o.pop();return S.end=C(),u.events.push(["exit",S,u]),S}function z(N,S){g(N,S.from)}function k(N,S){S.restore()}function R(N,S){return T;function T(A,M,ee){let B,J,F,x;return Array.isArray(A)?q(A):"tokenize"in A?q([A]):V(A);function V(te){return ye;function ye(W){const Y=W!==null&&te[W],se=W!==null&&te.null,U=[...Array.isArray(Y)?Y:Y?[Y]:[],...Array.isArray(se)?se:se?[se]:[]];return q(U)(W)}}function q(te){return B=te,J=0,te.length===0?ee:f(te[J])}function f(te){return ye;function ye(W){return x=y(),F=te,te.partial||(u.currentConstruct=te),te.name&&u.parser.constructs.disable.null.includes(te.name)?ue():te.tokenize.call(S?Object.assign(Object.create(u),S):u,c,re,ue)(W)}}function re(te){return N(F,x),M}function ue(te){return x.restore(),++J<B.length?f(B[J]):ee}}}function g(N,S){N.resolveAll&&!a.includes(N)&&a.push(N),N.resolve&&nt(u.events,S,u.events.length-S,N.resolve(u.events.slice(S),u)),N.resolveTo&&(u.events=N.resolveTo(u.events,u))}function y(){const N=C(),S=u.previous,T=u.currentConstruct,A=u.events.length,M=Array.from(o);return{restore:ee,from:A};function ee(){r=N,u.previous=S,u.currentConstruct=T,u.events.length=A,o=M,w()}}function w(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function Hu(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,a=t.end._bufferIndex;let l;if(n===s)l=[e[n].slice(r,a)];else{if(l=e.slice(n,s),r>-1){const o=l[0];typeof o=="string"?l[0]=o.slice(r):l.shift()}a>0&&l.push(e[s].slice(0,a))}return l}function Vu(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const a=e[n];let l;if(typeof a=="string")l=a;else switch(a){case-5:{l="\r";break}case-4:{l=`
3
+ `;break}case-3:{l=`\r
4
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&s)continue;l=" ";break}default:l=String.fromCharCode(a)}s=a===-2,r.push(l)}return r.join("")}const qu={42:ve,43:ve,45:ve,48:ve,49:ve,50:ve,51:ve,52:ve,53:ve,54:ve,55:ve,56:ve,57:ve,62:Xi},Uu={91:$o},$u={[-2]:dn,[-1]:dn,32:dn},Zu={35:Jo,42:$t,45:[Ar,$t],60:tu,61:Ar,95:$t,96:Or,126:Or},Wu={38:ts,92:es},Ku={[-5]:hn,[-4]:hn,[-3]:hn,33:Cu,38:ts,42:Tn,60:[jo,ou],91:wu,92:[Qo,es],93:tr,95:Tn,96:Ro},Qu={null:[Tn,zu]},Gu={null:[42,95]},Ju={null:[]},Yu=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Gu,contentInitial:Uu,disable:Ju,document:qu,flow:Zu,flowInitial:$u,insideSpan:Qu,string:Wu,text:Ku},Symbol.toStringTag,{value:"Module"}));function Xu(e){const n=ao([Yu,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:s(mo),document:s(go),flow:s(Au),string:s(Du),text:s(Mu)};return r;function s(a){return l;function l(o){return Bu(r,a,o)}}}function ec(e){for(;!ns(e););return e}const Rr=/[\0\t\n\r]/g;function tc(){let e=1,t="",n=!0,r;return s;function s(a,l,o){const c=[];let u,d,p,m,h;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(l||void 0).decode(a)),p=0,t="",n&&(a.charCodeAt(0)===65279&&p++,n=void 0);p<a.length;){if(Rr.lastIndex=p,u=Rr.exec(a),m=u&&u.index!==void 0?u.index:a.length,h=a.charCodeAt(m),!u){t=a.slice(p);break}if(h===10&&p===m&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),p<m&&(c.push(a.slice(p,m)),e+=m-p),h){case 0:{c.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,c.push(-2);e++<d;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}p=m+1}return o&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const nc=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function rc(e){return e.replace(nc,ic)}function ic(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return Yi(n.slice(a?2:1),a?16:10)}return Xn(n)||e}const os={}.hasOwnProperty;function sc(e,t,n){return typeof t!="string"&&(n=t,t=void 0),ac(n)(ec(Xu(n).document().write(tc()(e,t,!0))))}function ac(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(K),autolinkProtocol:y,autolinkEmail:y,atxHeading:a(ae),blockQuote:a(Y),characterEscape:y,characterReference:y,codeFenced:a(se),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(se,l),codeText:a(U,l),codeTextData:y,data:y,codeFlowValue:y,definition:a(pe),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(me),hardBreakEscape:a(oe),hardBreakTrailing:a(oe),htmlFlow:a(X,l),htmlFlowData:y,htmlText:a(X,l),htmlTextData:y,image:a(Ae),label:l,link:a(K),listItem:a(Ye),listItemValue:m,listOrdered:a(ce,p),listUnordered:a(ce),paragraph:a(st),reference:f,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(ae),strong:a(Fe),thematicBreak:a(Ce)},exit:{atxHeading:c(),atxHeadingSequence:z,autolink:c(),autolinkEmail:W,autolinkProtocol:ye,blockQuote:c(),characterEscapeValue:w,characterReferenceMarkerHexadecimal:ue,characterReferenceMarkerNumeric:ue,characterReferenceValue:te,codeFenced:c(E),codeFencedFence:b,codeFencedFenceInfo:h,codeFencedFenceMeta:C,codeFlowValue:w,codeIndented:c(j),codeText:c(M),codeTextData:w,data:w,definition:c(),definitionDestinationString:D,definitionLabelString:I,definitionTitleString:_,emphasis:c(),hardBreakEscape:c(S),hardBreakTrailing:c(S),htmlFlow:c(T),htmlFlowData:w,htmlText:c(A),htmlTextData:w,image:c(B),label:F,labelText:J,lineEnding:N,link:c(ee),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:re,resourceDestinationString:x,resourceTitleString:V,resource:q,setextHeading:c(g),setextHeadingLineSequence:R,setextHeadingText:k,strong:c(),thematicBreak:c()}};us(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(v){let L={type:"root",children:[]};const H={stack:[L],tokenStack:[],config:t,enter:o,exit:u,buffer:l,resume:d,data:n},Z=[];let ne=-1;for(;++ne<v.length;)if(v[ne][1].type==="listOrdered"||v[ne][1].type==="listUnordered")if(v[ne][0]==="enter")Z.push(ne);else{const je=Z.pop();ne=s(v,je,ne)}for(ne=-1;++ne<v.length;){const je=t[v[ne][0]];os.call(je,v[ne][1].type)&&je[v[ne][1].type].call(Object.assign({sliceSerialize:v[ne][2].sliceSerialize},H),v[ne][1])}if(H.tokenStack.length>0){const je=H.tokenStack[H.tokenStack.length-1];(je[1]||zr).call(H,void 0,je[0])}for(L.position={start:lt(v.length>0?v[0][1].start:{line:1,column:1,offset:0}),end:lt(v.length>0?v[v.length-2][1].end:{line:1,column:1,offset:0})},ne=-1;++ne<t.transforms.length;)L=t.transforms[ne](L)||L;return L}function s(v,L,H){let Z=L-1,ne=-1,je=!1,ke,xe,We,at;for(;++Z<=H;){const Re=v[Z];switch(Re[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Re[0]==="enter"?ne++:ne--,at=void 0;break}case"lineEndingBlank":{Re[0]==="enter"&&(ke&&!at&&!ne&&!We&&(We=Z),at=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:at=void 0}if(!ne&&Re[0]==="enter"&&Re[1].type==="listItemPrefix"||ne===-1&&Re[0]==="exit"&&(Re[1].type==="listUnordered"||Re[1].type==="listOrdered")){if(ke){let bt=Z;for(xe=void 0;bt--;){const it=v[bt];if(it[1].type==="lineEnding"||it[1].type==="lineEndingBlank"){if(it[0]==="exit")continue;xe&&(v[xe][1].type="lineEndingBlank",je=!0),it[1].type="lineEnding",xe=bt}else if(!(it[1].type==="linePrefix"||it[1].type==="blockQuotePrefix"||it[1].type==="blockQuotePrefixWhitespace"||it[1].type==="blockQuoteMarker"||it[1].type==="listItemIndent"))break}We&&(!xe||We<xe)&&(ke._spread=!0),ke.end=Object.assign({},xe?v[xe][1].start:Re[1].end),v.splice(xe||Z,0,["exit",ke,Re[2]]),Z++,H++}if(Re[1].type==="listItemPrefix"){const bt={type:"listItem",_spread:!1,start:Object.assign({},Re[1].start),end:void 0};ke=bt,v.splice(Z,0,["enter",bt,Re[2]]),Z++,H++,We=void 0,at=!0}}}return v[L][1]._spread=je,H}function a(v,L){return H;function H(Z){o.call(this,v(Z),Z),L&&L.call(this,Z)}}function l(){this.stack.push({type:"fragment",children:[]})}function o(v,L,H){this.stack[this.stack.length-1].children.push(v),this.stack.push(v),this.tokenStack.push([L,H]),v.position={start:lt(L.start),end:void 0}}function c(v){return L;function L(H){v&&v.call(this,H),u.call(this,H)}}function u(v,L){const H=this.stack.pop(),Z=this.tokenStack.pop();if(Z)Z[0].type!==v.type&&(L?L.call(this,v,Z[0]):(Z[1]||zr).call(this,v,Z[0]));else throw new Error("Cannot close `"+v.type+"` ("+At({start:v.start,end:v.end})+"): it’s not open");H.position.end=lt(v.end)}function d(){return io(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function m(v){if(this.data.expectingFirstListItemValue){const L=this.stack[this.stack.length-2];L.start=Number.parseInt(this.sliceSerialize(v),10),this.data.expectingFirstListItemValue=void 0}}function h(){const v=this.resume(),L=this.stack[this.stack.length-1];L.lang=v}function C(){const v=this.resume(),L=this.stack[this.stack.length-1];L.meta=v}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const v=this.resume(),L=this.stack[this.stack.length-1];L.value=v.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function j(){const v=this.resume(),L=this.stack[this.stack.length-1];L.value=v.replace(/(\r?\n|\r)$/g,"")}function I(v){const L=this.resume(),H=this.stack[this.stack.length-1];H.label=L,H.identifier=vt(this.sliceSerialize(v)).toLowerCase()}function _(){const v=this.resume(),L=this.stack[this.stack.length-1];L.title=v}function D(){const v=this.resume(),L=this.stack[this.stack.length-1];L.url=v}function z(v){const L=this.stack[this.stack.length-1];if(!L.depth){const H=this.sliceSerialize(v).length;L.depth=H}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function R(v){const L=this.stack[this.stack.length-1];L.depth=this.sliceSerialize(v).codePointAt(0)===61?1:2}function g(){this.data.setextHeadingSlurpLineEnding=void 0}function y(v){const H=this.stack[this.stack.length-1].children;let Z=H[H.length-1];(!Z||Z.type!=="text")&&(Z=ft(),Z.position={start:lt(v.start),end:void 0},H.push(Z)),this.stack.push(Z)}function w(v){const L=this.stack.pop();L.value+=this.sliceSerialize(v),L.position.end=lt(v.end)}function N(v){const L=this.stack[this.stack.length-1];if(this.data.atHardBreak){const H=L.children[L.children.length-1];H.position.end=lt(v.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(L.type)&&(y.call(this,v),w.call(this,v))}function S(){this.data.atHardBreak=!0}function T(){const v=this.resume(),L=this.stack[this.stack.length-1];L.value=v}function A(){const v=this.resume(),L=this.stack[this.stack.length-1];L.value=v}function M(){const v=this.resume(),L=this.stack[this.stack.length-1];L.value=v}function ee(){const v=this.stack[this.stack.length-1];if(this.data.inReference){const L=this.data.referenceType||"shortcut";v.type+="Reference",v.referenceType=L,delete v.url,delete v.title}else delete v.identifier,delete v.label;this.data.referenceType=void 0}function B(){const v=this.stack[this.stack.length-1];if(this.data.inReference){const L=this.data.referenceType||"shortcut";v.type+="Reference",v.referenceType=L,delete v.url,delete v.title}else delete v.identifier,delete v.label;this.data.referenceType=void 0}function J(v){const L=this.sliceSerialize(v),H=this.stack[this.stack.length-2];H.label=rc(L),H.identifier=vt(L).toLowerCase()}function F(){const v=this.stack[this.stack.length-1],L=this.resume(),H=this.stack[this.stack.length-1];if(this.data.inReference=!0,H.type==="link"){const Z=v.children;H.children=Z}else H.alt=L}function x(){const v=this.resume(),L=this.stack[this.stack.length-1];L.url=v}function V(){const v=this.resume(),L=this.stack[this.stack.length-1];L.title=v}function q(){this.data.inReference=void 0}function f(){this.data.referenceType="collapsed"}function re(v){const L=this.resume(),H=this.stack[this.stack.length-1];H.label=L,H.identifier=vt(this.sliceSerialize(v)).toLowerCase(),this.data.referenceType="full"}function ue(v){this.data.characterReferenceType=v.type}function te(v){const L=this.sliceSerialize(v),H=this.data.characterReferenceType;let Z;H?(Z=Yi(L,H==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Z=Xn(L);const ne=this.stack.pop();ne.value+=Z,ne.position.end=lt(v.end)}function ye(v){w.call(this,v);const L=this.stack[this.stack.length-1];L.url=this.sliceSerialize(v)}function W(v){w.call(this,v);const L=this.stack[this.stack.length-1];L.url="mailto:"+this.sliceSerialize(v)}function Y(){return{type:"blockquote",children:[]}}function se(){return{type:"code",lang:null,meta:null,value:""}}function U(){return{type:"inlineCode",value:""}}function pe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function me(){return{type:"emphasis",children:[]}}function ae(){return{type:"heading",depth:0,children:[]}}function oe(){return{type:"break"}}function X(){return{type:"html",value:""}}function Ae(){return{type:"image",title:null,url:"",alt:null}}function K(){return{type:"link",title:null,url:"",children:[]}}function ce(v){return{type:"list",ordered:v.type==="listOrdered",start:null,spread:v._spread,children:[]}}function Ye(v){return{type:"listItem",spread:v._spread,checked:null,children:[]}}function st(){return{type:"paragraph",children:[]}}function Fe(){return{type:"strong",children:[]}}function ft(){return{type:"text",value:""}}function Ce(){return{type:"thematicBreak"}}}function lt(e){return{line:e.line,column:e.column,offset:e.offset}}function us(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?us(e,r):lc(e,r)}}function lc(e,t){let n;for(n in t)if(os.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function zr(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+At({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+At({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+At({start:t.start,end:t.end})+") is still open")}function oc(e){const t=this;t.parser=n;function n(r){return sc(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function uc(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function cc(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
5
+ `}]}function dc(e,t){const n=t.value?t.value+`
6
+ `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function hc(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pc(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fc(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Ot(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let l,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=a+1,o+=1,e.footnoteCounts.set(r,o);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,u),e.applyData(t,u)}function mc(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xc(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function cs(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const s=e.all(t),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const l=s[s.length-1];return l&&l.type==="text"?l.value+=r:s.push({type:"text",value:r}),s}function gc(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return cs(e,t);const s={src:Ot(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,a),e.applyData(t,a)}function yc(e,t){const n={src:Ot(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Cc(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function bc(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return cs(e,t);const s={href:Ot(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function wc(e,t){const n={href:Ot(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function jc(e,t,n){const r=e.all(t),s=n?kc(n):ds(t),a={},l=[];if(typeof t.checked=="boolean"){const d=r[0];let p;d&&d.type==="element"&&d.tagName==="p"?p=d:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const d=r[o];(s||o!==0||d.type!=="element"||d.tagName!=="p")&&l.push({type:"text",value:`
7
+ `}),d.type==="element"&&d.tagName==="p"&&!s?l.push(...d.children):l.push(d)}const c=r[r.length-1];c&&(s||c.type!=="element"||c.tagName!=="p")&&l.push({type:"text",value:`
8
+ `});const u={type:"element",tagName:"li",properties:a,children:l};return e.patch(t,u),e.applyData(t,u)}function kc(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=ds(n[r])}return t}function ds(e){const t=e.spread;return t??e.children.length>1}function vc(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const l=r[s];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Nc(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Sc(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Ec(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _c(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),s.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=Qn(t.children[1]),c=$i(t.children[t.children.length-1]);o&&c&&(l.position={start:o,end:c}),s.push(l)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function Tc(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,o=l?l.length:t.children.length;let c=-1;const u=[];for(;++c<o;){const p=t.children[c],m={},h=l?l[c]:void 0;h&&(m.align=h);let C={type:"element",tagName:a,properties:m,children:[]};p&&(C.children=e.all(p),e.patch(p,C),C=e.applyData(p,C)),u.push(C)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,d),e.applyData(t,d)}function Lc(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Dr=9,Mr=32;function Ic(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(Fr(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(Fr(t.slice(s),s>0,!1)),a.join("")}function Fr(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===Dr||a===Mr;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===Dr||a===Mr;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function Oc(e,t){const n={type:"text",value:Ic(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Pc(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Ac={blockquote:uc,break:cc,code:dc,delete:hc,emphasis:pc,footnoteReference:fc,heading:mc,html:xc,imageReference:gc,image:yc,inlineCode:Cc,linkReference:bc,link:wc,listItem:jc,list:vc,paragraph:Nc,root:Sc,strong:Ec,table:_c,tableCell:Lc,tableRow:Tc,text:Oc,thematicBreak:Pc,toml:Ht,yaml:Ht,definition:Ht,footnoteDefinition:Ht};function Ht(){}const hs=-1,rn=0,Qt=1,Gt=2,nr=3,rr=4,ir=5,sr=6,ps=7,fs=8,Br=typeof self=="object"?self:globalThis,Rc=(e,t)=>{const n=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,l]=t[s];switch(a){case rn:case hs:return n(l,s);case Qt:{const o=n([],s);for(const c of l)o.push(r(c));return o}case Gt:{const o=n({},s);for(const[c,u]of l)o[r(c)]=r(u);return o}case nr:return n(new Date(l),s);case rr:{const{source:o,flags:c}=l;return n(new RegExp(o,c),s)}case ir:{const o=n(new Map,s);for(const[c,u]of l)o.set(r(c),r(u));return o}case sr:{const o=n(new Set,s);for(const c of l)o.add(r(c));return o}case ps:{const{name:o,message:c}=l;return n(new Br[o](c),s)}case fs:return n(BigInt(l),s);case"BigInt":return n(Object(BigInt(l)),s)}return n(new Br[a](l),s)};return r},Hr=e=>Rc(new Map,e)(0),jt="",{toString:zc}={},{keys:Dc}=Object,Pt=e=>{const t=typeof e;if(t!=="object"||!e)return[rn,t];const n=zc.call(e).slice(8,-1);switch(n){case"Array":return[Qt,jt];case"Object":return[Gt,jt];case"Date":return[nr,jt];case"RegExp":return[rr,jt];case"Map":return[ir,jt];case"Set":return[sr,jt]}return n.includes("Array")?[Qt,n]:n.includes("Error")?[ps,n]:[Gt,n]},Vt=([e,t])=>e===rn&&(t==="function"||t==="symbol"),Mc=(e,t,n,r)=>{const s=(l,o)=>{const c=r.push(l)-1;return n.set(o,c),c},a=l=>{if(n.has(l))return n.get(l);let[o,c]=Pt(l);switch(o){case rn:{let d=l;switch(c){case"bigint":o=fs,d=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);d=null;break;case"undefined":return s([hs],l)}return s([o,d],l)}case Qt:{if(c)return s([c,[...l]],l);const d=[],p=s([o,d],l);for(const m of l)d.push(a(m));return p}case Gt:{if(c)switch(c){case"BigInt":return s([c,l.toString()],l);case"Boolean":case"Number":case"String":return s([c,l.valueOf()],l)}if(t&&"toJSON"in l)return a(l.toJSON());const d=[],p=s([o,d],l);for(const m of Dc(l))(e||!Vt(Pt(l[m])))&&d.push([a(m),a(l[m])]);return p}case nr:return s([o,l.toISOString()],l);case rr:{const{source:d,flags:p}=l;return s([o,{source:d,flags:p}],l)}case ir:{const d=[],p=s([o,d],l);for(const[m,h]of l)(e||!(Vt(Pt(m))||Vt(Pt(h))))&&d.push([a(m),a(h)]);return p}case sr:{const d=[],p=s([o,d],l);for(const m of l)(e||!Vt(Pt(m)))&&d.push(a(m));return p}}const{message:u}=l;return s([o,{name:c,message:u}],l)};return a},Vr=(e,{json:t,lossy:n}={})=>{const r=[];return Mc(!(t||n),!!t,new Map,r)(e),r},Jt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Hr(Vr(e,t)):structuredClone(e):(e,t)=>Hr(Vr(e,t));function Fc(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Bc(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Hc(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Fc,r=e.options.footnoteBackLabel||Bc,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let c=-1;for(;++c<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[c]);if(!u)continue;const d=e.all(u),p=String(u.identifier).toUpperCase(),m=Ot(p.toLowerCase());let h=0;const C=[],b=e.footnoteCounts.get(p);for(;b!==void 0&&++h<=b;){C.length>0&&C.push({type:"text",value:" "});let I=typeof n=="string"?n:n(c,h);typeof I=="string"&&(I={type:"text",value:I}),C.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,h),className:["data-footnote-backref"]},children:Array.isArray(I)?I:[I]})}const E=d[d.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const I=E.children[E.children.length-1];I&&I.type==="text"?I.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...C)}else d.push(...C);const j={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(d,!0)};e.patch(u,j),o.push(j)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Jt(l),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
9
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
10
+ `}]}}const ms=function(e){if(e==null)return $c;if(typeof e=="function")return sn(e);if(typeof e=="object")return Array.isArray(e)?Vc(e):qc(e);if(typeof e=="string")return Uc(e);throw new Error("Expected function, string, or object as test")};function Vc(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ms(e[n]);return sn(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function qc(e){const t=e;return sn(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function Uc(e){return sn(t);function t(n){return n&&n.type===e}}function sn(e){return t;function t(n,r,s){return!!(Zc(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function $c(){return!0}function Zc(e){return e!==null&&typeof e=="object"&&"type"in e}const xs=[],Wc=!0,qr=!1,Kc="skip";function Qc(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=ms(s),l=r?-1:1;o(e,void 0,[])();function o(c,u,d){const p=c&&typeof c=="object"?c:{};if(typeof p.type=="string"){const h=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(c.type+(h?"<"+h+">":""))+")"})}return m;function m(){let h=xs,C,b,E;if((!t||a(c,u,d[d.length-1]||void 0))&&(h=Gc(n(c,d)),h[0]===qr))return h;if("children"in c&&c.children){const j=c;if(j.children&&h[0]!==Kc)for(b=(r?j.children.length:-1)+l,E=d.concat(j);b>-1&&b<j.children.length;){const I=j.children[b];if(C=o(I,b,E)(),C[0]===qr)return C;b=typeof C[1]=="number"?C[1]:b+l}}return h}}}function Gc(e){return Array.isArray(e)?e:typeof e=="number"?[Wc,e]:e==null?xs:[e]}function gs(e,t,n,r){let s,a,l;typeof t=="function"?(a=void 0,l=t,s=n):(a=t,l=n,s=r),Qc(e,a,o,s);function o(c,u){const d=u[u.length-1],p=d?d.children.indexOf(c):void 0;return l(c,p,d)}}const Ln={}.hasOwnProperty,Jc={};function Yc(e,t){const n=t||Jc,r=new Map,s=new Map,a=new Map,l={...Ac,...n.handlers},o={all:u,applyData:e1,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:l,one:c,options:n,patch:Xc,wrap:n1};return gs(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const p=d.type==="definition"?r:s,m=String(d.identifier).toUpperCase();p.has(m)||p.set(m,d)}}),o;function c(d,p){const m=d.type,h=o.handlers[m];if(Ln.call(o.handlers,m)&&h)return h(o,d,p);if(o.options.passThrough&&o.options.passThrough.includes(m)){if("children"in d){const{children:b,...E}=d,j=Jt(E);return j.children=o.all(d),j}return Jt(d)}return(o.options.unknownHandler||t1)(o,d,p)}function u(d){const p=[];if("children"in d){const m=d.children;let h=-1;for(;++h<m.length;){const C=o.one(m[h],d);if(C){if(h&&m[h-1].type==="break"&&(!Array.isArray(C)&&C.type==="text"&&(C.value=Ur(C.value)),!Array.isArray(C)&&C.type==="element")){const b=C.children[0];b&&b.type==="text"&&(b.value=Ur(b.value))}Array.isArray(C)?p.push(...C):p.push(C)}}}return p}}function Xc(e,t){e.position&&(t.position=Al(e))}function e1(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&a&&Object.assign(n.properties,Jt(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function t1(e,t){const n=t.data||{},r="value"in t&&!(Ln.call(n,"hProperties")||Ln.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function n1(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
11
+ `});++r<e.length;)r&&n.push({type:"text",value:`
12
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
13
+ `}),n}function Ur(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function $r(e,t){const n=Yc(e,t),r=n.one(e,void 0),s=Hc(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
14
+ `},s),a}function r1(e,t){return e&&"run"in e?async function(n,r){const s=$r(n,{file:r,...t});await e.run(s,r)}:function(n,r){return $r(n,{file:r,...t||e})}}function Zr(e){if(e)throw e}var pn,Wr;function i1(){if(Wr)return pn;Wr=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},a=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var d=e.call(u,"constructor"),p=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!d&&!p)return!1;var m;for(m in u);return typeof m>"u"||e.call(u,m)},l=function(u,d){n&&d.name==="__proto__"?n(u,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):u[d.name]=d.newValue},o=function(u,d){if(d==="__proto__")if(e.call(u,d)){if(r)return r(u,d).value}else return;return u[d]};return pn=function c(){var u,d,p,m,h,C,b=arguments[0],E=1,j=arguments.length,I=!1;for(typeof b=="boolean"&&(I=b,b=arguments[1]||{},E=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});E<j;++E)if(u=arguments[E],u!=null)for(d in u)p=o(b,d),m=o(u,d),b!==m&&(I&&m&&(a(m)||(h=s(m)))?(h?(h=!1,C=p&&s(p)?p:[]):C=p&&a(p)?p:{},l(b,{name:d,newValue:c(I,C,m)})):typeof m<"u"&&l(b,{name:d,newValue:m}));return b},pn}var s1=i1();const fn=Pn(s1);function In(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function a1(){const e=[],t={run:n,use:r};return t;function n(...s){let a=-1;const l=s.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);o(null,...s);function o(c,...u){const d=e[++a];let p=-1;if(c){l(c);return}for(;++p<s.length;)(u[p]===null||u[p]===void 0)&&(u[p]=s[p]);s=u,d?l1(d,o)(...u):l(null,...u)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function l1(e,t){let n;return r;function r(...l){const o=e.length>l.length;let c;o&&l.push(s);try{c=e.apply(this,l)}catch(u){const d=u;if(o&&n)throw d;return s(d)}o||(c&&c.then&&typeof c.then=="function"?c.then(a,s):c instanceof Error?s(c):a(c))}function s(l,...o){n||(n=!0,t(l,...o))}function a(l){s(null,l)}}const Xe={basename:o1,dirname:u1,extname:c1,join:d1,sep:"/"};function o1(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Bt(e);let n=0,r=-1,s=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,o=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else l<0&&(a=!0,l=s+1),o>-1&&(e.codePointAt(s)===t.codePointAt(o--)?o<0&&(r=s):(o=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function u1(e){if(Bt(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function c1(e){Bt(e);let t=e.length,n=-1,r=0,s=-1,a=0,l;for(;t--;){const o=e.codePointAt(t);if(o===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),o===46?s<0?s=t:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||n<0||a===0||a===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function d1(...e){let t=-1,n;for(;++t<e.length;)Bt(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":h1(n)}function h1(e){Bt(e);const t=e.codePointAt(0)===47;let n=p1(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function p1(e,t){let n="",r=0,s=-1,a=0,l=-1,o,c;for(;++l<=e.length;){if(l<e.length)o=e.codePointAt(l);else{if(o===47)break;o=47}if(o===47){if(!(s===l-1||a===1))if(s!==l-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),s=l,a=0;continue}}else if(n.length>0){n="",r=0,s=l,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,l):n=e.slice(s+1,l),r=l-s-1;s=l,a=0}else o===46&&a>-1?a++:a=-1}return n}function Bt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const f1={cwd:m1};function m1(){return"/"}function On(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function x1(e){if(typeof e=="string")e=new URL(e);else if(!On(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return g1(e)}function g1(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const mn=["history","path","basename","stem","extname","dirname"];class ys{constructor(t){let n;t?On(t)?n={path:t}:typeof t=="string"||y1(t)?n={value:t}:n=t:n={},this.cwd=f1.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<mn.length;){const a=mn[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let s;for(s in n)mn.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Xe.basename(this.path):void 0}set basename(t){gn(t,"basename"),xn(t,"basename"),this.path=Xe.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Xe.dirname(this.path):void 0}set dirname(t){Kr(this.basename,"dirname"),this.path=Xe.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Xe.extname(this.path):void 0}set extname(t){if(xn(t,"extname"),Kr(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Xe.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){On(t)&&(t=x1(t)),gn(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Xe.basename(this.path,this.extname):void 0}set stem(t){gn(t,"stem"),xn(t,"stem"),this.path=Xe.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new be(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function xn(e,t){if(e&&e.includes(Xe.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Xe.sep+"`")}function gn(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Kr(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function y1(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const C1=function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};Object.setPrototypeOf(a,r);const l=Object.getOwnPropertyNames(s);for(const o of l){const c=Object.getOwnPropertyDescriptor(s,o);c&&Object.defineProperty(a,o,c)}return a},b1={}.hasOwnProperty;class ar extends C1{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=a1()}copy(){const t=new ar;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(fn(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(bn("data",this.frozen),this.namespace[t]=n,this):b1.call(this.namespace,t)&&this.namespace[t]||void 0:t?(bn("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=qt(t),r=this.parser||this.Parser;return yn("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),yn("process",this.parser||this.Parser),Cn("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,l){const o=qt(t),c=r.parse(o);r.run(c,o,function(d,p,m){if(d||!p||!m)return u(d);const h=p,C=r.stringify(h,m);k1(C)?m.value=C:m.result=C,u(d,m)});function u(d,p){d||!p?l(d):a?a(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),yn("processSync",this.parser||this.Parser),Cn("processSync",this.compiler||this.Compiler),this.process(t,s),Gr("processSync","process",n),r;function s(a,l){n=!0,Zr(a),r=l}}run(t,n,r){Qr(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(l,o){const c=qt(n);s.run(t,c,u);function u(d,p,m){const h=p||t;d?o(d):l?l(h):r(void 0,h,m)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),Gr("runSync","run",r),s;function a(l,o){Zr(l),s=o,r=!0}}stringify(t,n){this.freeze();const r=qt(n),s=this.compiler||this.Compiler;return Cn("stringify",s),Qr(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(bn("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...p]=u;c(d,p)}else l(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function l(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(u.plugins),u.settings&&(s.settings=fn(!0,s.settings,u.settings))}function o(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const p=u[d];a(p)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,d){let p=-1,m=-1;for(;++p<r.length;)if(r[p][0]===u){m=p;break}if(m===-1)r.push([u,...d]);else if(d.length>0){let[h,...C]=d;const b=r[m][1];In(b)&&In(h)&&(h=fn(!0,b,h)),r[m]=[u,h,...C]}}}}const w1=new ar().freeze();function yn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Cn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function bn(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Qr(e){if(!In(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Gr(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function qt(e){return j1(e)?e:new ys(e)}function j1(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function k1(e){return typeof e=="string"||v1(e)}function v1(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const N1="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Jr=[],Yr={allowDangerousHtml:!0},S1=/^(https?|ircs?|mailto|xmpp)$/i,E1=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function _1(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",s=e.className,a=e.components,l=e.disallowedElements,o=e.rehypePlugins||Jr,c=e.remarkPlugins||Jr,u=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Yr}:Yr,d=e.skipHtml,p=e.unwrapDisallowed,m=e.urlTransform||T1,h=w1().use(oc).use(c).use(r1,u).use(o),C=new ys;typeof r=="string"&&(C.value=r);for(const I of E1)Object.hasOwn(e,I.from)&&(""+I.from+(I.to?"use `"+I.to+"` instead":"remove it")+N1+I.id,void 0);const b=h.parse(C);let E=h.runSync(b,C);return s&&(E={type:"element",tagName:"div",properties:{className:s},children:E.type==="root"?E.children:[E]}),gs(E,j),Bl(E,{Fragment:i.Fragment,components:a,ignoreInvalidStyle:!0,jsx:i.jsx,jsxs:i.jsxs,passKeys:!0,passNode:!0});function j(I,_,D){if(I.type==="raw"&&D&&typeof _=="number")return d?D.children.splice(_,1):D.children[_]={type:"text",value:I.value},_;if(I.type==="element"){let z;for(z in cn)if(Object.hasOwn(cn,z)&&Object.hasOwn(I.properties,z)){const k=I.properties[z],R=cn[z];(R===null||R.includes(I.tagName))&&(I.properties[z]=m(String(k||""),z,I))}}if(I.type==="element"){let z=t?!t.includes(I.tagName):l?l.includes(I.tagName):!1;if(!z&&n&&typeof _=="number"&&(z=!n(I,_,D)),z&&D&&typeof _=="number")return p&&I.children?D.children.splice(_,1,...I.children):D.children.splice(_,1),_}}}function T1(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||S1.test(e.slice(0,t))?e:""}function L1({content:e}){return i.jsx(_1,{className:"!prose !max-w-none",children:e})}var Zt={exports:{}};/* @license
15
+ Papa Parse
16
+ v5.5.2
17
+ https://github.com/mholt/PapaParse
18
+ License: MIT
19
+ */var I1=Zt.exports,Xr;function O1(){return Xr||(Xr=1,function(e,t){((n,r)=>{e.exports=r()})(I1,function n(){var r=typeof self<"u"?self:typeof window<"u"?window:r!==void 0?r:{},s,a=!r.document&&!!r.postMessage,l=r.IS_PAPA_WORKER||!1,o={},c=0,u={};function d(g){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(y){var w=z(y);w.chunkSize=parseInt(w.chunkSize),y.step||y.chunk||(w.chunkSize=null),this._handle=new b(w),(this._handle.streamer=this)._config=w}).call(this,g),this.parseChunk=function(y,w){var N=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<N){let T=this._config.newline;T||(S=this._config.quoteChar||'"',T=this._handle.guessLineEndings(y,S)),y=[...y.split(T).slice(N)].join(T)}this.isFirstChunk&&R(this._config.beforeFirstChunk)&&(S=this._config.beforeFirstChunk(y))!==void 0&&(y=S),this.isFirstChunk=!1,this._halted=!1;var N=this._partialLine+y,S=(this._partialLine="",this._handle.parse(N,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(y=S.meta.cursor,N=(this._finished||(this._partialLine=N.substring(y-this._baseIndex),this._baseIndex=y),S&&S.data&&(this._rowCount+=S.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),l)r.postMessage({results:S,workerId:u.WORKER_ID,finished:N});else if(R(this._config.chunk)&&!w){if(this._config.chunk(S,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=S=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(S.data),this._completeResults.errors=this._completeResults.errors.concat(S.errors),this._completeResults.meta=S.meta),this._completed||!N||!R(this._config.complete)||S&&S.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),N||S&&S.meta.paused||this._nextChunk(),S}this._halted=!0},this._sendError=function(y){R(this._config.error)?this._config.error(y):l&&this._config.error&&r.postMessage({workerId:u.WORKER_ID,error:y,finished:!1})}}function p(g){var y;(g=g||{}).chunkSize||(g.chunkSize=u.RemoteChunkSize),d.call(this,g),this._nextChunk=a?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(w){this._input=w,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(y=new XMLHttpRequest,this._config.withCredentials&&(y.withCredentials=this._config.withCredentials),a||(y.onload=k(this._chunkLoaded,this),y.onerror=k(this._chunkError,this)),y.open(this._config.downloadRequestBody?"POST":"GET",this._input,!a),this._config.downloadRequestHeaders){var w,N=this._config.downloadRequestHeaders;for(w in N)y.setRequestHeader(w,N[w])}var S;this._config.chunkSize&&(S=this._start+this._config.chunkSize-1,y.setRequestHeader("Range","bytes="+this._start+"-"+S));try{y.send(this._config.downloadRequestBody)}catch(T){this._chunkError(T.message)}a&&y.status===0&&this._chunkError()}},this._chunkLoaded=function(){y.readyState===4&&(y.status<200||400<=y.status?this._chunkError():(this._start+=this._config.chunkSize||y.responseText.length,this._finished=!this._config.chunkSize||this._start>=(w=>(w=w.getResponseHeader("Content-Range"))!==null?parseInt(w.substring(w.lastIndexOf("/")+1)):-1)(y),this.parseChunk(y.responseText)))},this._chunkError=function(w){w=y.statusText||w,this._sendError(new Error(w))}}function m(g){(g=g||{}).chunkSize||(g.chunkSize=u.LocalChunkSize),d.call(this,g);var y,w,N=typeof FileReader<"u";this.stream=function(S){this._input=S,w=S.slice||S.webkitSlice||S.mozSlice,N?((y=new FileReader).onload=k(this._chunkLoaded,this),y.onerror=k(this._chunkError,this)):y=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var S=this._input,T=(this._config.chunkSize&&(T=Math.min(this._start+this._config.chunkSize,this._input.size),S=w.call(S,this._start,T)),y.readAsText(S,this._config.encoding));N||this._chunkLoaded({target:{result:T}})},this._chunkLoaded=function(S){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(S.target.result)},this._chunkError=function(){this._sendError(y.error)}}function h(g){var y;d.call(this,g=g||{}),this.stream=function(w){return y=w,this._nextChunk()},this._nextChunk=function(){var w,N;if(!this._finished)return w=this._config.chunkSize,y=w?(N=y.substring(0,w),y.substring(w)):(N=y,""),this._finished=!y,this.parseChunk(N)}}function C(g){d.call(this,g=g||{});var y=[],w=!0,N=!1;this.pause=function(){d.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){d.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(S){this._input=S,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){N&&y.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),y.length?this.parseChunk(y.shift()):w=!0},this._streamData=k(function(S){try{y.push(typeof S=="string"?S:S.toString(this._config.encoding)),w&&(w=!1,this._checkIsFinished(),this.parseChunk(y.shift()))}catch(T){this._streamError(T)}},this),this._streamError=k(function(S){this._streamCleanUp(),this._sendError(S)},this),this._streamEnd=k(function(){this._streamCleanUp(),N=!0,this._streamData("")},this),this._streamCleanUp=k(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function b(g){var y,w,N,S,T=Math.pow(2,53),A=-T,M=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,ee=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,B=this,J=0,F=0,x=!1,V=!1,q=[],f={data:[],errors:[],meta:{}};function re(W){return g.skipEmptyLines==="greedy"?W.join("").trim()==="":W.length===1&&W[0].length===0}function ue(){if(f&&N&&(ye("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+u.DefaultDelimiter+"'"),N=!1),g.skipEmptyLines&&(f.data=f.data.filter(function(U){return!re(U)})),te()){let U=function(pe,me){R(g.transformHeader)&&(pe=g.transformHeader(pe,me)),q.push(pe)};if(f)if(Array.isArray(f.data[0])){for(var W=0;te()&&W<f.data.length;W++)f.data[W].forEach(U);f.data.splice(0,1)}else f.data.forEach(U)}function Y(U,pe){for(var me=g.header?{}:[],ae=0;ae<U.length;ae++){var oe=ae,X=U[ae],X=((Ae,K)=>(ce=>(g.dynamicTypingFunction&&g.dynamicTyping[ce]===void 0&&(g.dynamicTyping[ce]=g.dynamicTypingFunction(ce)),(g.dynamicTyping[ce]||g.dynamicTyping)===!0))(Ae)?K==="true"||K==="TRUE"||K!=="false"&&K!=="FALSE"&&((ce=>{if(M.test(ce)&&(ce=parseFloat(ce),A<ce&&ce<T))return 1})(K)?parseFloat(K):ee.test(K)?new Date(K):K===""?null:K):K)(oe=g.header?ae>=q.length?"__parsed_extra":q[ae]:oe,X=g.transform?g.transform(X,oe):X);oe==="__parsed_extra"?(me[oe]=me[oe]||[],me[oe].push(X)):me[oe]=X}return g.header&&(ae>q.length?ye("FieldMismatch","TooManyFields","Too many fields: expected "+q.length+" fields but parsed "+ae,F+pe):ae<q.length&&ye("FieldMismatch","TooFewFields","Too few fields: expected "+q.length+" fields but parsed "+ae,F+pe)),me}var se;f&&(g.header||g.dynamicTyping||g.transform)&&(se=1,!f.data.length||Array.isArray(f.data[0])?(f.data=f.data.map(Y),se=f.data.length):f.data=Y(f.data,0),g.header&&f.meta&&(f.meta.fields=q),F+=se)}function te(){return g.header&&q.length===0}function ye(W,Y,se,U){W={type:W,code:Y,message:se},U!==void 0&&(W.row=U),f.errors.push(W)}R(g.step)&&(S=g.step,g.step=function(W){f=W,te()?ue():(ue(),f.data.length!==0&&(J+=W.data.length,g.preview&&J>g.preview?w.abort():(f.data=f.data[0],S(f,B))))}),this.parse=function(W,Y,se){var U=g.quoteChar||'"',U=(g.newline||(g.newline=this.guessLineEndings(W,U)),N=!1,g.delimiter?R(g.delimiter)&&(g.delimiter=g.delimiter(W),f.meta.delimiter=g.delimiter):((U=((pe,me,ae,oe,X)=>{var Ae,K,ce,Ye;X=X||[","," ","|",";",u.RECORD_SEP,u.UNIT_SEP];for(var st=0;st<X.length;st++){for(var Fe,ft=X[st],Ce=0,v=0,L=0,H=(ce=void 0,new j({comments:oe,delimiter:ft,newline:me,preview:10}).parse(pe)),Z=0;Z<H.data.length;Z++)ae&&re(H.data[Z])?L++:(Fe=H.data[Z].length,v+=Fe,ce===void 0?ce=Fe:0<Fe&&(Ce+=Math.abs(Fe-ce),ce=Fe));0<H.data.length&&(v/=H.data.length-L),(K===void 0||Ce<=K)&&(Ye===void 0||Ye<v)&&1.99<v&&(K=Ce,Ae=ft,Ye=v)}return{successful:!!(g.delimiter=Ae),bestDelimiter:Ae}})(W,g.newline,g.skipEmptyLines,g.comments,g.delimitersToGuess)).successful?g.delimiter=U.bestDelimiter:(N=!0,g.delimiter=u.DefaultDelimiter),f.meta.delimiter=g.delimiter),z(g));return g.preview&&g.header&&U.preview++,y=W,w=new j(U),f=w.parse(y,Y,se),ue(),x?{meta:{paused:!0}}:f||{meta:{paused:!1}}},this.paused=function(){return x},this.pause=function(){x=!0,w.abort(),y=R(g.chunk)?"":y.substring(w.getCharIndex())},this.resume=function(){B.streamer._halted?(x=!1,B.streamer.parseChunk(y,!0)):setTimeout(B.resume,3)},this.aborted=function(){return V},this.abort=function(){V=!0,w.abort(),f.meta.aborted=!0,R(g.complete)&&g.complete(f),y=""},this.guessLineEndings=function(pe,U){pe=pe.substring(0,1048576);var U=new RegExp(E(U)+"([^]*?)"+E(U),"gm"),se=(pe=pe.replace(U,"")).split("\r"),U=pe.split(`
20
+ `),pe=1<U.length&&U[0].length<se[0].length;if(se.length===1||pe)return`
21
+ `;for(var me=0,ae=0;ae<se.length;ae++)se[ae][0]===`
22
+ `&&me++;return me>=se.length/2?`\r
23
+ `:"\r"}}function E(g){return g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function j(g){var y=(g=g||{}).delimiter,w=g.newline,N=g.comments,S=g.step,T=g.preview,A=g.fastMode,M=null,ee=!1,B=g.quoteChar==null?'"':g.quoteChar,J=B;if(g.escapeChar!==void 0&&(J=g.escapeChar),(typeof y!="string"||-1<u.BAD_DELIMITERS.indexOf(y))&&(y=","),N===y)throw new Error("Comment character same as delimiter");N===!0?N="#":(typeof N!="string"||-1<u.BAD_DELIMITERS.indexOf(N))&&(N=!1),w!==`
24
+ `&&w!=="\r"&&w!==`\r
25
+ `&&(w=`
26
+ `);var F=0,x=!1;this.parse=function(V,q,f){if(typeof V!="string")throw new Error("Input must be a string");var re=V.length,ue=y.length,te=w.length,ye=N.length,W=R(S),Y=[],se=[],U=[],pe=F=0;if(!V)return Ce();if(A||A!==!1&&V.indexOf(B)===-1){for(var me=V.split(w),ae=0;ae<me.length;ae++){if(U=me[ae],F+=U.length,ae!==me.length-1)F+=w.length;else if(f)return Ce();if(!N||U.substring(0,ye)!==N){if(W){if(Y=[],Ye(U.split(y)),v(),x)return Ce()}else Ye(U.split(y));if(T&&T<=ae)return Y=Y.slice(0,T),Ce(!0)}}return Ce()}for(var oe=V.indexOf(y,F),X=V.indexOf(w,F),Ae=new RegExp(E(J)+E(B),"g"),K=V.indexOf(B,F);;)if(V[F]===B)for(K=F,F++;;){if((K=V.indexOf(B,K+1))===-1)return f||se.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:Y.length,index:F}),Fe();if(K===re-1)return Fe(V.substring(F,K).replace(Ae,B));if(B===J&&V[K+1]===J)K++;else if(B===J||K===0||V[K-1]!==J){oe!==-1&&oe<K+1&&(oe=V.indexOf(y,K+1));var ce=st((X=X!==-1&&X<K+1?V.indexOf(w,K+1):X)===-1?oe:Math.min(oe,X));if(V.substr(K+1+ce,ue)===y){U.push(V.substring(F,K).replace(Ae,B)),V[F=K+1+ce+ue]!==B&&(K=V.indexOf(B,F)),oe=V.indexOf(y,F),X=V.indexOf(w,F);break}if(ce=st(X),V.substring(K+1+ce,K+1+ce+te)===w){if(U.push(V.substring(F,K).replace(Ae,B)),ft(K+1+ce+te),oe=V.indexOf(y,F),K=V.indexOf(B,F),W&&(v(),x))return Ce();if(T&&Y.length>=T)return Ce(!0);break}se.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:Y.length,index:F}),K++}}else if(N&&U.length===0&&V.substring(F,F+ye)===N){if(X===-1)return Ce();F=X+te,X=V.indexOf(w,F),oe=V.indexOf(y,F)}else if(oe!==-1&&(oe<X||X===-1))U.push(V.substring(F,oe)),F=oe+ue,oe=V.indexOf(y,F);else{if(X===-1)break;if(U.push(V.substring(F,X)),ft(X+te),W&&(v(),x))return Ce();if(T&&Y.length>=T)return Ce(!0)}return Fe();function Ye(L){Y.push(L),pe=F}function st(L){var H=0;return H=L!==-1&&(L=V.substring(K+1,L))&&L.trim()===""?L.length:H}function Fe(L){return f||(L===void 0&&(L=V.substring(F)),U.push(L),F=re,Ye(U),W&&v()),Ce()}function ft(L){F=L,Ye(U),U=[],X=V.indexOf(w,F)}function Ce(L){if(g.header&&!q&&Y.length&&!ee){var H=Y[0],Z={},ne=new Set(H);let je=!1;for(let ke=0;ke<H.length;ke++){let xe=H[ke];if(Z[xe=R(g.transformHeader)?g.transformHeader(xe,ke):xe]){let We,at=Z[xe];for(;We=xe+"_"+at,at++,ne.has(We););ne.add(We),H[ke]=We,Z[xe]++,je=!0,(M=M===null?{}:M)[We]=xe}else Z[xe]=1,H[ke]=xe;ne.add(xe)}je&&console.warn("Duplicate headers found and renamed."),ee=!0}return{data:Y,errors:se,meta:{delimiter:y,linebreak:w,aborted:x,truncated:!!L,cursor:pe+(q||0),renamedHeaders:M}}}function v(){S(Ce()),Y=[],se=[]}},this.abort=function(){x=!0},this.getCharIndex=function(){return F}}function I(g){var y=g.data,w=o[y.workerId],N=!1;if(y.error)w.userError(y.error,y.file);else if(y.results&&y.results.data){var S={abort:function(){N=!0,_(y.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:D,resume:D};if(R(w.userStep)){for(var T=0;T<y.results.data.length&&(w.userStep({data:y.results.data[T],errors:y.results.errors,meta:y.results.meta},S),!N);T++);delete y.results}else R(w.userChunk)&&(w.userChunk(y.results,S,y.file),delete y.results)}y.finished&&!N&&_(y.workerId,y.results)}function _(g,y){var w=o[g];R(w.userComplete)&&w.userComplete(y),w.terminate(),delete o[g]}function D(){throw new Error("Not implemented.")}function z(g){if(typeof g!="object"||g===null)return g;var y,w=Array.isArray(g)?[]:{};for(y in g)w[y]=z(g[y]);return w}function k(g,y){return function(){g.apply(y,arguments)}}function R(g){return typeof g=="function"}return u.parse=function(g,y){var w=(y=y||{}).dynamicTyping||!1;if(R(w)&&(y.dynamicTypingFunction=w,w={}),y.dynamicTyping=w,y.transform=!!R(y.transform)&&y.transform,!y.worker||!u.WORKERS_SUPPORTED)return w=null,u.NODE_STREAM_INPUT,typeof g=="string"?(g=(N=>N.charCodeAt(0)!==65279?N:N.slice(1))(g),w=new(y.download?p:h)(y)):g.readable===!0&&R(g.read)&&R(g.on)?w=new C(y):(r.File&&g instanceof File||g instanceof Object)&&(w=new m(y)),w.stream(g);(w=(()=>{var N;return!!u.WORKERS_SUPPORTED&&(N=(()=>{var S=r.URL||r.webkitURL||null,T=n.toString();return u.BLOB_URL||(u.BLOB_URL=S.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",T,")();"],{type:"text/javascript"})))})(),(N=new r.Worker(N)).onmessage=I,N.id=c++,o[N.id]=N)})()).userStep=y.step,w.userChunk=y.chunk,w.userComplete=y.complete,w.userError=y.error,y.step=R(y.step),y.chunk=R(y.chunk),y.complete=R(y.complete),y.error=R(y.error),delete y.worker,w.postMessage({input:g,config:y,workerId:w.id})},u.unparse=function(g,y){var w=!1,N=!0,S=",",T=`\r
27
+ `,A='"',M=A+A,ee=!1,B=null,J=!1,F=((()=>{if(typeof y=="object"){if(typeof y.delimiter!="string"||u.BAD_DELIMITERS.filter(function(q){return y.delimiter.indexOf(q)!==-1}).length||(S=y.delimiter),typeof y.quotes!="boolean"&&typeof y.quotes!="function"&&!Array.isArray(y.quotes)||(w=y.quotes),typeof y.skipEmptyLines!="boolean"&&typeof y.skipEmptyLines!="string"||(ee=y.skipEmptyLines),typeof y.newline=="string"&&(T=y.newline),typeof y.quoteChar=="string"&&(A=y.quoteChar),typeof y.header=="boolean"&&(N=y.header),Array.isArray(y.columns)){if(y.columns.length===0)throw new Error("Option columns is empty");B=y.columns}y.escapeChar!==void 0&&(M=y.escapeChar+A),y.escapeFormulae instanceof RegExp?J=y.escapeFormulae:typeof y.escapeFormulae=="boolean"&&y.escapeFormulae&&(J=/^[=+\-@\t\r].*$/)}})(),new RegExp(E(A),"g"));if(typeof g=="string"&&(g=JSON.parse(g)),Array.isArray(g)){if(!g.length||Array.isArray(g[0]))return x(null,g,ee);if(typeof g[0]=="object")return x(B||Object.keys(g[0]),g,ee)}else if(typeof g=="object")return typeof g.data=="string"&&(g.data=JSON.parse(g.data)),Array.isArray(g.data)&&(g.fields||(g.fields=g.meta&&g.meta.fields||B),g.fields||(g.fields=Array.isArray(g.data[0])?g.fields:typeof g.data[0]=="object"?Object.keys(g.data[0]):[]),Array.isArray(g.data[0])||typeof g.data[0]=="object"||(g.data=[g.data])),x(g.fields||[],g.data||[],ee);throw new Error("Unable to serialize unrecognized input");function x(q,f,re){var ue="",te=(typeof q=="string"&&(q=JSON.parse(q)),typeof f=="string"&&(f=JSON.parse(f)),Array.isArray(q)&&0<q.length),ye=!Array.isArray(f[0]);if(te&&N){for(var W=0;W<q.length;W++)0<W&&(ue+=S),ue+=V(q[W],W);0<f.length&&(ue+=T)}for(var Y=0;Y<f.length;Y++){var se=(te?q:f[Y]).length,U=!1,pe=te?Object.keys(f[Y]).length===0:f[Y].length===0;if(re&&!te&&(U=re==="greedy"?f[Y].join("").trim()==="":f[Y].length===1&&f[Y][0].length===0),re==="greedy"&&te){for(var me=[],ae=0;ae<se;ae++){var oe=ye?q[ae]:ae;me.push(f[Y][oe])}U=me.join("").trim()===""}if(!U){for(var X=0;X<se;X++){0<X&&!pe&&(ue+=S);var Ae=te&&ye?q[X]:X;ue+=V(f[Y][Ae],X)}Y<f.length-1&&(!re||0<se&&!pe)&&(ue+=T)}}return ue}function V(q,f){var re,ue;return q==null?"":q.constructor===Date?JSON.stringify(q).slice(1,25):(ue=!1,J&&typeof q=="string"&&J.test(q)&&(q="'"+q,ue=!0),re=q.toString().replace(F,M),(ue=ue||w===!0||typeof w=="function"&&w(q,f)||Array.isArray(w)&&w[f]||((te,ye)=>{for(var W=0;W<ye.length;W++)if(-1<te.indexOf(ye[W]))return!0;return!1})(re,u.BAD_DELIMITERS)||-1<re.indexOf(S)||re.charAt(0)===" "||re.charAt(re.length-1)===" ")?A+re+A:re)}},u.RECORD_SEP="",u.UNIT_SEP="",u.BYTE_ORDER_MARK="\uFEFF",u.BAD_DELIMITERS=["\r",`
28
+ `,'"',u.BYTE_ORDER_MARK],u.WORKERS_SUPPORTED=!a&&!!r.Worker,u.NODE_STREAM_INPUT=1,u.LocalChunkSize=10485760,u.RemoteChunkSize=5242880,u.DefaultDelimiter=",",u.Parser=j,u.ParserHandle=b,u.NetworkStreamer=p,u.FileStreamer=m,u.StringStreamer=h,u.ReadableStreamStreamer=C,r.jQuery&&((s=r.jQuery).fn.parse=function(g){var y=g.config||{},w=[];return this.each(function(T){if(!(s(this).prop("tagName").toUpperCase()==="INPUT"&&s(this).attr("type").toLowerCase()==="file"&&r.FileReader)||!this.files||this.files.length===0)return!0;for(var A=0;A<this.files.length;A++)w.push({file:this.files[A],inputElem:this,instanceConfig:s.extend({},y)})}),N(),this;function N(){if(w.length===0)R(g.complete)&&g.complete();else{var T,A,M,ee,B=w[0];if(R(g.before)){var J=g.before(B.file,B.inputElem);if(typeof J=="object"){if(J.action==="abort")return T="AbortError",A=B.file,M=B.inputElem,ee=J.reason,void(R(g.error)&&g.error({name:T},A,M,ee));if(J.action==="skip")return void S();typeof J.config=="object"&&(B.instanceConfig=s.extend(B.instanceConfig,J.config))}else if(J==="skip")return void S()}var F=B.instanceConfig.complete;B.instanceConfig.complete=function(x){R(F)&&F(x,B.file,B.inputElem),S()},u.parse(B.file,B.instanceConfig)}}function S(){w.splice(0,1),N()}}),l&&(r.onmessage=function(g){g=g.data,u.WORKER_ID===void 0&&g&&(u.WORKER_ID=g.workerId),typeof g.input=="string"?r.postMessage({workerId:u.WORKER_ID,results:u.parse(g.input,g.config),finished:!0}):(r.File&&g.input instanceof File||g.input instanceof Object)&&(g=u.parse(g.input,g.config))&&r.postMessage({workerId:u.WORKER_ID,results:g,finished:!0})}),(p.prototype=Object.create(d.prototype)).constructor=p,(m.prototype=Object.create(d.prototype)).constructor=m,(h.prototype=Object.create(h.prototype)).constructor=h,(C.prototype=Object.create(d.prototype)).constructor=C,u})}(Zt)),Zt.exports}var P1=O1();function A1({content:e}){const[t,n]=P.useState([]),[r,s]=P.useState([]);return P.useEffect(()=>{P1.parse(e,{header:!0,skipEmptyLines:!0,complete:a=>{const l=[],o=[];a.data.forEach(c=>{l.push(Object.keys(c)),o.push(Object.values(c))}),n(l[0]),s(o)}})},[e]),i.jsx("div",{className:"overflow-hidden overflow-x-auto rounded-md border",children:i.jsxs(Ps,{children:[i.jsx(As,{className:"bg-theme-surface-tertiary",children:i.jsx(cr,{children:t.map((a,l)=>i.jsx(Rs,{className:"text-theme-text-secondary",children:a},l))})}),i.jsx(zs,{children:r.map((a,l)=>i.jsx(cr,{children:a.map((o,c)=>i.jsx(Ds,{className:"bg-theme-surface-primary",children:o},c))},l))})]})})}function R1({artifactVersionId:e,artifactName:t,visualizationIndex:n=0}){const[r,s]=P.useState(!1),a={index:n},{isVisualizationConfirmed:l,confirmVisualization:o}=Ii(),c=Yt(),{data:u,isError:d,error:p,isPending:m}=Ai({versionId:e,params:a},{retry:!1,enabled:!r});return r?i.jsx(Me,{icon:i.jsx(mt,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:i.jsxs("div",{className:"flex flex-col items-center text-center",children:[i.jsx("p",{className:"mb-5 text-text-lg text-theme-text-secondary",children:"Loading the visualization cancelled"}),i.jsx(fe,{size:"md",onClick:()=>s(!1),children:"Load Visualization"})]})}):d?p.status===501?i.jsxs(Me,{icon:i.jsx(mt,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:[i.jsx("p",{children:"This artifact cannot be visualized because it cannot be loaded from the artifact store. This might happen if your ZenML server does not have the artifact stores dependencies installed or if the server is not authenticated to access it. For more information, see our"}),i.jsx("a",{rel:"noopener noreferrer",target:"_blank",href:"https://docs.zenml.io/stack-components/artifact-stores/custom",children:"docs"})]}):i.jsx(Me,{icon:i.jsx(mt,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:i.jsx("div",{className:"text-center",children:i.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:p.message})})}):m?i.jsxs("div",{className:"flex flex-col items-center gap-7 py-12",children:[i.jsx(zn,{}),i.jsxs("div",{className:"flex flex-col items-center",children:[i.jsx("p",{className:"mb-5 text-display-xs",children:"Loading Visualization"}),i.jsx(fe,{onClick:()=>{c.cancelQueries({queryKey:Pi({versionId:e})}),s(!0)},intent:"secondary",size:"md",children:"Cancel"})]})]}):l(n)?i.jsxs("div",{children:[u.type==="image"&&i.jsx(ll,{content:u.value}),u.type==="html"&&i.jsx(al,{content:u.value}),u.type==="markdown"&&i.jsx(L1,{content:u.value}),u.type==="csv"&&i.jsx(A1,{content:u.value}),u.type==="json"&&i.jsx(ol,{content:u.value})]}):i.jsx(z1,{artifactVersionId:e,visualizationIndex:n,artifactName:t,confirmVisualization:()=>o(n),...u})}function z1({artifactName:e,confirmVisualization:t,artifactVersionId:n,visualizationIndex:r}){return i.jsxs("div",{className:"flex flex-col items-center justify-center gap-8",children:[i.jsx(en,{children:"This preview may contain harmful code. Only proceed if you trust the source. Loading content from untrusted sources can pose risks. If unsure, avoid loading."}),i.jsxs("div",{className:"flex justify-center gap-4",children:[i.jsx(fe,{size:"md",onClick:()=>t(),children:"Load Preview"}),i.jsx(zi,{artifactVersionId:n,visualizationIndex:r,artifactName:e})]})]})}function D1({setIndex:e,visualizations:t,index:n}){var a;const[r,s]=P.useState(!1);return i.jsxs(Ms,{open:r,onOpenChange:s,children:[i.jsx(Fs,{asChild:!0,children:i.jsxs(fe,{intent:"secondary",emphasis:"subtle",className:"flex items-center gap-0.5 bg-theme-surface-primary",size:"md",children:[(a=t[n].body)==null?void 0:a.uri.split("/").pop(),i.jsx(ht,{width:24,height:24,className:"fill-text-primary shrink-0"})]})}),i.jsx(Bs,{className:"px-0",align:"start",children:i.jsxs(Hs,{defaultValue:n.toString(),className:"rounded-sharp",children:[i.jsx(Vs,{className:"m-0",placeholder:"Search visualizations...",children:i.jsx(qs,{className:"w-full",inputSize:"sm"})}),i.jsxs(Us,{children:[i.jsx($s,{children:"No visualization found."}),i.jsx(Zs,{className:"max-h-[300px] overflow-y-auto",children:t.map((l,o)=>{var u;const c=(u=l.body)==null?void 0:u.uri.split("/").pop();return i.jsxs(Ws,{keywords:[c??""],className:"group data-[selected=true]:rounded-sharp",value:o.toString(),onSelect:()=>{e(o),s(!1)},children:[o===n?i.jsx(ka,{width:16,height:16,className:"shrink-0 fill-theme-text-tertiary group-data-[selected=true]:fill-theme-text-brand"}):i.jsx(Mt,{width:16,height:16,className:"shrink-0 fill-theme-text-tertiary group-data-[selected=true]:fill-theme-text-brand"}),c]},l.id)})})]})]})})]})}function M1({artifactVersionId:e}){var u,d,p;const[t,n]=P.useState(0),{isVisualizationConfirmed:r}=Ii(),{data:s,isPending:a,isError:l,error:o}=Lt({versionId:e});if(l)return i.jsx(Me,{icon:i.jsx(Kt,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:i.jsx("div",{className:"text-center",children:i.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:o.message})})});if(a)return i.jsx(Q,{className:"h-[300px] w-full"});const c=((u=s.metadata)==null?void 0:u.visualizations)||[];return c.length<1?i.jsx(Me,{icon:i.jsx(Kt,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:i.jsxs("div",{className:"text-center",children:[i.jsx("p",{className:"mb-2 text-display-xs font-semibold",children:"No visualizations found"}),i.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There are no visualizations available for this artifact version."})]})}):i.jsxs("div",{className:"space-y-5",children:[i.jsxs("div",{className:`flex ${c.length>1?"justify-between":"justify-end"}`,children:[c.length>1&&i.jsx(D1,{setIndex:n,visualizations:c,index:t}),r(t)&&i.jsx(zi,{artifactName:((d=s.body)==null?void 0:d.artifact.name)||"artifact",artifactVersionId:e,visualizationIndex:t})]}),i.jsx(R1,{artifactName:((p=s.body)==null?void 0:p.artifact.name)||"artifact",visualizationIndex:t,artifactVersionId:e})]})}function F1({error:e}){return i.jsx(Me,{icon:i.jsx(Kt,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:i.jsxs("div",{className:"text-center",children:[i.jsx("p",{className:"mb-2 text-display-xs font-semibold",children:"Something went wrong"}),i.jsx("p",{className:"text-lg text-theme-text-secondary",children:e.message})]})})}function B1({artifactVersionId:e}){var r,s,a;const{data:t}=Lt({versionId:e}),n=(r=t==null?void 0:t.body)==null?void 0:r.version;return i.jsxs("div",{children:[i.jsx(wi,{}),i.jsxs("div",{className:"border-b border-theme-border-moderate bg-theme-surface-primary p-5",children:[t?i.jsx("p",{className:"mb-0.5 text-text-sm text-theme-text-secondary",children:e}):i.jsx(Q,{className:"w-9"}),t?i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(Ti,{artifactType:((s=t.body)==null?void 0:s.type)||"BaseArtifact",className:"h-5 w-5 fill-theme-surface-strong"}),i.jsx("h2",{className:"text-display-xs font-semibold",children:(a=t.body)==null?void 0:a.artifact.name}),i.jsx(Wt,{color:n?"light-purple":"light-grey",rounded:!1,children:n||"None"})]}):i.jsx(Q,{className:"h-6 w-7"})]}),i.jsx("div",{className:"p-5",children:i.jsx(Va,{children:i.jsxs(Dn,{defaultValue:"overview",children:[i.jsxs(Mn,{children:[i.jsxs(Ne,{className:"flex items-center gap-2 text-text-md",value:"overview",children:[i.jsx(xt,{className:"h-5 w-5 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),i.jsx("span",{children:"Overview"})]}),i.jsxs(Ne,{className:"flex items-center gap-2 truncate text-text-md",value:"metadata",children:[i.jsx(Un,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),i.jsx("span",{children:"Metadata"})]}),i.jsxs(Ne,{className:"flex items-center gap-2 text-text-md",value:"visualization",children:[i.jsx(Kt,{className:"h-5 w-5 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),i.jsx("span",{children:"Visualization"})]})]}),i.jsx(Se,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"overview",children:i.jsx(rl,{artifactVersionId:e})}),i.jsx(Se,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"metadata",children:i.jsx(il,{artifactVersionId:e})}),i.jsx(Se,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"visualization",children:i.jsx(bi,{FallbackComponent:F1,children:i.jsx(M1,{artifactVersionId:e})})})]})})})]})}function H1({children:e,artifactVersionId:t,onOpenChange:n}){return i.jsxs(ci,{onOpenChange:n,children:[i.jsx(di,{asChild:!0,children:e}),i.jsx(hi,{className:"w-[1000px] overflow-y-auto",children:i.jsx(B1,{artifactVersionId:t})})]})}function an({children:e}){return i.jsxs(i.Fragment,{children:[i.jsx(hr,{style:{border:"transparent",top:0,background:"transparent",width:0,height:0},type:"target",position:pr.Top}),i.jsx("div",{className:"flex w-[300px] items-center justify-center",children:e}),i.jsx(hr,{isConnectable:!1,type:"source",style:{border:"transparent",bottom:0,background:"transparent",width:0,height:0},position:pr.Bottom})]})}function Cs({className:e,code:t,type:n,...r}){const[s,a]=P.useState(!1),[l,o]=P.useState(!1);function c(u){navigator.clipboard&&(navigator.clipboard.writeText(u),a(!0),o(!0),setTimeout(()=>{o(!1),a(!1)},2e3))}return i.jsx(_e,{children:i.jsxs(Te,{open:l,onOpenChange:o,children:[i.jsx(Le,{asChild:!0,children:i.jsx("div",{...r,className:Ks("hidden cursor-pointer items-center justify-center transition-all group-hover:flex",e),onClick:u=>{u.stopPropagation(),c(t)}})}),i.jsx(Ie,{className:"w-full max-w-md whitespace-normal transition-opacity",children:s?"Copied!":`Copy code to load ${n}`})]})})}function V1({data:e,selected:t}){const{unselectNodesAndEdges:n}=qn(a=>({unselectNodesAndEdges:a.unselectNodesAndEdges}));function r(a){a||setTimeout(()=>{n()},100)}function s(a){const l=a.split(".");return l[l.length-1]}return i.jsx(an,{children:i.jsx(H1,{onOpenChange:r,artifactVersionId:e.artifact_id,children:i.jsxs("button",{"data-selected":!!t,className:"group flex h-[50px] min-w-0 max-w-[300px] items-center justify-center gap-1 rounded-rounded border border-primary-100 bg-primary-25 py-1 pl-1 pr-2 transition-all duration-200 hover:border-primary-400 data-[selected=true]:border-primary-500 data-[selected=true]:bg-primary-500",children:[i.jsx("div",{className:"rounded-rounded bg-primary-50 p-0.5 group-data-[selected=true]:bg-white/20",children:i.jsx(Ti,{className:"h-4 w-4 fill-primary-400 group-data-[selected=true]:fill-theme-text-negative",artifactType:e.type})}),i.jsxs("div",{className:"min-w-0 text-left",children:[i.jsx("p",{className:"truncate text-text-sm font-semibold text-theme-text-brand group-data-[selected=true]:text-theme-text-negative",children:e.artifact_name}),i.jsx("p",{className:"truncate text-text-xs text-theme-text-secondary group-data-[selected=true]:text-white/70",children:s(e.data_type)})]}),i.jsxs(Cs,{className:"h-4 w-4 shrink-0 rounded-sm hover:bg-primary-100 active:bg-primary-200",code:gi(e.artifact_id),type:"artifact",children:[i.jsx(Fn,{className:"h-3 w-3 fill-primary-400"}),i.jsx("div",{className:"sr-only",children:"Copy code to load artifact"})]})]})})})}const q1=e=>P.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.7587 2L8 2C8.55229 2 9 2.44772 9 3C9 3.55229 8.55229 4 8 4H7.8C6.94342 4 6.36113 4.00078 5.91104 4.03755C5.47262 4.07337 5.24842 4.1383 5.09202 4.21799C4.7157 4.40973 4.40973 4.7157 4.21799 5.09202C4.1383 5.24842 4.07337 5.47262 4.03755 5.91104C4.00078 6.36113 4 6.94342 4 7.8V8C4 8.55229 3.55229 9 3 9C2.44772 9 2 8.55229 2 8L2 7.7587C1.99999 6.95373 1.99998 6.28937 2.04419 5.74817C2.09012 5.18608 2.18868 4.66937 2.43597 4.18404C2.81947 3.43139 3.43139 2.81947 4.18404 2.43597C4.66937 2.18868 5.18608 2.09012 5.74817 2.04419C6.28937 1.99998 6.95373 1.99999 7.7587 2ZM18.089 4.03755C17.6389 4.00078 17.0566 4 16.2 4H16C15.4477 4 15 3.55229 15 3C15 2.44772 15.4477 2 16 2L16.2413 2C17.0463 1.99999 17.7106 1.99998 18.2518 2.04419C18.8139 2.09012 19.3306 2.18868 19.816 2.43598C20.5686 2.81947 21.1805 3.43139 21.564 4.18404C21.8113 4.66937 21.9099 5.18608 21.9558 5.74817C22 6.28936 22 6.95372 22 7.75868V8C22 8.55229 21.5523 9 21 9C20.4477 9 20 8.55229 20 8V7.8C20 6.94342 19.9992 6.36113 19.9624 5.91104C19.9266 5.47262 19.8617 5.24842 19.782 5.09202C19.5903 4.7157 19.2843 4.40973 18.908 4.21799C18.7516 4.1383 18.5274 4.07337 18.089 4.03755ZM3 15C3.55229 15 4 15.4477 4 16V16.2C4 17.0566 4.00078 17.6389 4.03755 18.089C4.07337 18.5274 4.1383 18.7516 4.21799 18.908C4.40973 19.2843 4.7157 19.5903 5.09202 19.782C5.24842 19.8617 5.47262 19.9266 5.91104 19.9624C6.36113 19.9992 6.94342 20 7.8 20H8C8.55229 20 9 20.4477 9 21C9 21.5523 8.55229 22 8 22H7.75868C6.95372 22 6.28936 22 5.74817 21.9558C5.18608 21.9099 4.66937 21.8113 4.18404 21.564C3.43139 21.1805 2.81947 20.5686 2.43597 19.816C2.18868 19.3306 2.09012 18.8139 2.04419 18.2518C1.99998 17.7106 1.99999 17.0463 2 16.2413L2 16C2 15.4477 2.44772 15 3 15ZM21 15C21.5523 15 22 15.4477 22 16V16.2413C22 17.0463 22 17.7106 21.9558 18.2518C21.9099 18.8139 21.8113 19.3306 21.564 19.816C21.1805 20.5686 20.5686 21.1805 19.816 21.564C19.3306 21.8113 18.8139 21.9099 18.2518 21.9558C17.7106 22 17.0463 22 16.2413 22H16C15.4477 22 15 21.5523 15 21C15 20.4477 15.4477 20 16 20H16.2C17.0566 20 17.6389 19.9992 18.089 19.9624C18.5274 19.9266 18.7516 19.8617 18.908 19.782C19.2843 19.5903 19.5903 19.2843 19.782 18.908C19.8617 18.7516 19.9266 18.5274 19.9624 18.089C19.9992 17.6389 20 17.0566 20 16.2V16C20 15.4477 20.4477 15 21 15Z"})),lr=e=>P.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 12C4 11.4477 4.44772 11 5 11H19C19.5523 11 20 11.4477 20 12C20 12.5523 19.5523 13 19 13H5C4.44772 13 4 12.5523 4 12Z"}));function U1({refetch:e}){const{fitView:t,zoomIn:n,zoomOut:r}=Ni();return i.jsxs("div",{"aria-label":"Dag Controls",className:"absolute left-4 top-4 z-10 flex flex-col gap-1",children:[i.jsxs("div",{className:"divide-y divide-neutral-300 overflow-hidden rounded-md border border-neutral-300",children:[i.jsx("div",{children:i.jsx(fe,{onClick:()=>n(),emphasis:"subtle",className:"rounded-sharp border-none p-0.5",intent:"secondary",children:i.jsx(_a,{className:"h-5 w-5 bg-theme-surface-primary fill-theme-text-primary"})})}),i.jsx("div",{children:i.jsx(fe,{onClick:()=>r(),emphasis:"subtle",className:"rounded-sharp border-none bg-theme-surface-primary p-0.5",intent:"secondary",children:i.jsx(lr,{className:"h-5 w-5 fill-theme-text-primary"})})})]}),i.jsx(fe,{className:"h-6 w-6 bg-theme-surface-primary p-0.5",onClick:()=>t(),emphasis:"subtle",intent:"secondary",children:i.jsx(q1,{className:"h-5 w-5 fill-theme-text-primary"})}),i.jsxs(fe,{className:"h-6 w-6 bg-theme-surface-primary p-0.5",onClick:()=>{e()},emphasis:"subtle",intent:"secondary",children:[i.jsx("span",{className:"sr-only",children:"Refresh"}),i.jsx(Si,{className:"h-5 w-5 fill-theme-text-primary"})]})]})}function $1(e){var s;const t=((s=e.data)==null?void 0:s.points)??[];if(!t.length)return null;const n=4,r=t.reduce((a,l,o)=>{if(o===0)return`M ${l.x},${l.y}`;if(o===t.length-1)return`${a} L ${l.x},${l.y}`;{const c=t[o-1],u=t[o+1],d=l.x-c.x,p=l.y-c.y,m=u.x-l.x,h=u.y-l.y,C=Math.sqrt(d*d+p*p),b=Math.sqrt(m*m+h*h),E=Math.min(n,C/2,b/2),j=l.x-d/C*E,I=l.y-p/C*E,_=l.x+m/b*E,D=l.y+h/b*E;return`${a} L ${j},${I} Q ${l.x},${l.y} ${_},${D}`}},"");return i.jsx(va,{...e,path:r})}function Z1({data:e}){const t=e.runStatus==="failed",n=e.runStatus==="completed";return i.jsx(an,{children:i.jsx(_e,{children:i.jsxs(Te,{children:[i.jsx(Le,{children:i.jsxs("div",{className:"flex h-[50px] min-w-0 max-w-[300px] items-center justify-center gap-1 rounded-rounded border border-primary-100 bg-primary-25 p-1 opacity-50",children:[i.jsx("div",{className:"rounded-rounded bg-primary-50 p-0.5",children:t?i.jsx(lr,{className:"h-4 w-4 shrink-0 fill-primary-400"}):i.jsx(ct,{status:n?"completed":"running",className:"h-4 w-4 fill-primary-400"})}),i.jsx("p",{className:"truncate text-text-sm",children:e.node_name})]})}),i.jsx(Ie,{className:"z-20 max-w-xs text-center",children:t?i.jsx(i.Fragment,{children:"This artifact was not generated because of an upstream error"}):i.jsx(i.Fragment,{children:"This artifact is not generated yet. It will not be created if the are upstream errors."})})]})})})}function W1({data:e}){const t=e.runStatus==="failed",n=e.runStatus==="completed";return i.jsx(an,{children:i.jsx(_e,{children:i.jsxs(Te,{children:[i.jsx(Le,{children:i.jsxs("div",{className:"flex h-[50px] max-w-[300px] items-center gap-1 rounded-md border border-theme-border-moderate bg-theme-surface-primary p-1 pr-2 opacity-50",children:[i.jsx("div",{className:`rounded-sm ${t?"bg-blue-50":"bg-warning-50"} p-0.5`,children:t?i.jsx(lr,{className:"h-4 w-4 shrink-0 fill-blue-500"}):i.jsx(ct,{status:n?"completed":"running",className:"h-4 w-4 fill-theme-text-warning"})}),i.jsx("p",{className:"truncate",children:e.node_name})]})}),i.jsx(Ie,{className:"z-20 max-w-xs text-center",children:t?i.jsx(i.Fragment,{children:"This step will never start because of an upstream error"}):i.jsxs(i.Fragment,{children:["This is a future step with pending execution.",i.jsx("br",{}),"It may not run if there are upstream errors."]})})]})})})}const bs=e=>P.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.29292 1.29292C2.56075 1.02509 2.95692 0.931566 3.31625 1.05134L6.31626 2.05134C6.7246 2.18746 7.00003 2.5696 7.00003 3.00003V5.58581L10.11 8.69574C10.0377 8.30745 10 7.9077 10 7.50003C10 3.91018 12.9102 1.00003 16.5 1.00003C17.6867 1.00003 18.8019 1.31894 19.7614 1.87638C20.0298 2.03232 20.2105 2.30406 20.2506 2.61187C20.2907 2.91968 20.1856 3.22865 19.9661 3.44815L17.3385 6.07576C17.1288 6.28544 17.0146 6.40072 16.9389 6.48989C16.9359 6.49344 16.9331 6.49682 16.9304 6.50003C16.9331 6.50323 16.9359 6.50661 16.9389 6.51016C17.0146 6.59933 17.1288 6.71461 17.3385 6.92429L17.5758 7.16155C17.7854 7.37123 17.9007 7.48541 17.9899 7.56111C17.9934 7.56412 17.9968 7.56696 18 7.56962C18.0032 7.56696 18.0066 7.56412 18.0102 7.56111C18.0993 7.48541 18.2146 7.37123 18.4243 7.16155L20.8822 4.70364C21.1187 4.46713 21.4578 4.36452 21.7858 4.43023C22.1137 4.49594 22.3871 4.72126 22.5142 5.03063C22.8277 5.7933 23 6.62779 23 7.50003C23 10.5046 20.9614 13.0331 18.1919 13.7777L21.2071 16.7928C22.4261 18.0117 22.4261 19.9881 21.2071 21.207C19.9882 22.426 18.0119 22.426 16.7929 21.207L12.0001 16.4142L7.20713 21.2071C5.98818 22.4261 4.01187 22.4261 2.79292 21.2071C1.57397 19.9882 1.57397 18.0119 2.79292 16.7929L9.08581 10.5L5.58581 7.00003H3.00003C2.5696 7.00003 2.18746 6.7246 2.05134 6.31626L1.05134 3.31625C0.931566 2.95692 1.02509 2.56075 1.29292 2.29292L2.29292 1.29292ZM5.00003 5.00003V3.72079L3.27012 3.14415L3.14415 3.27012L3.72079 5.00003H5.00003ZM11.2062 11.2081L4.20714 18.2071C3.76923 18.645 3.76923 19.355 4.20714 19.7929C4.64504 20.2308 5.35502 20.2308 5.79292 19.7929L12.9499 12.6359C12.9689 12.617 12.9882 12.5975 13.0079 12.5776C13.0487 12.5366 13.0913 12.4937 13.1355 12.4504L13.2326 12.3533C13.3452 12.2406 13.4665 12.1456 13.5937 12.0668C13.6314 12.0423 13.6697 12.0194 13.7087 11.9985C13.8064 11.9462 13.9249 11.8887 14.0691 11.8448C14.2133 11.8009 14.3438 11.7827 14.4541 11.7718C14.4756 11.7696 14.497 11.768 14.5184 11.7668C14.7885 11.7445 15.0574 11.7719 15.3055 11.84C15.4095 11.8686 15.515 11.8935 15.622 11.9146C15.6224 11.9147 15.6228 11.9148 15.6233 11.9149C15.6427 11.9187 15.6621 11.9224 15.6816 11.926C15.8091 11.9493 15.9384 11.9674 16.0696 11.9798C16.211 11.9932 16.3546 12 16.5 12C18.9853 12 21 9.98531 21 7.50003C21 7.47163 20.9998 7.44329 20.9992 7.41502L19.816 8.5983C19.6375 8.77679 19.4637 8.95062 19.3045 9.08579C19.1297 9.23422 18.9078 9.39379 18.6181 9.48793C18.2164 9.61844 17.7837 9.61844 17.382 9.48793C17.0923 9.39379 16.8704 9.23422 16.6955 9.08579C16.5363 8.95062 16.3625 8.7768 16.1841 8.59832L15.9017 8.31596C15.7233 8.13751 15.5494 7.96373 15.4143 7.80452C15.2658 7.62967 15.1063 7.40778 15.0121 7.11806C14.8816 6.71637 14.8816 6.28368 15.0121 5.88199C15.1063 5.59228 15.2658 5.37038 15.4143 5.19554C15.5494 5.03633 15.7232 4.86255 15.9017 4.68412L17.4792 3.10665C17.1643 3.03685 16.8367 3.00003 16.5 3.00003C14.0147 3.00003 12 5.01475 12 7.50003C12 7.80093 12.0294 8.09398 12.0852 8.37677L12.0888 8.39527C12.1337 8.62253 12.1727 8.82052 12.1978 8.97939C12.2214 9.12834 12.2493 9.33506 12.2283 9.54599C12.2173 9.65623 12.1991 9.78675 12.1552 9.93093C12.1114 10.0751 12.0538 10.1937 12.0015 10.2913C11.8581 10.5594 11.6197 10.7962 11.4224 10.9921C11.4025 11.0119 11.3831 11.0312 11.3642 11.0501L11.2081 11.2062C11.2078 11.2065 11.2074 11.2068 11.2071 11.2071C11.2068 11.2074 11.2065 11.2078 11.2062 11.2081ZM13.4143 15L18.2071 19.7928C18.645 20.2307 19.355 20.2307 19.7929 19.7928C20.2308 19.3549 20.2308 18.6449 19.7929 18.207L15.5109 13.9251C15.4187 13.911 15.3272 13.895 15.2363 13.8771C14.9852 13.8275 14.825 13.7961 14.7082 13.7777C14.6855 13.7741 14.667 13.7714 14.652 13.7694C14.6484 13.7726 14.6444 13.7762 14.64 13.7802C14.5816 13.8331 14.5053 13.9089 14.3727 14.0416C14.3699 14.0444 14.367 14.0472 14.3642 14.0501L13.4143 15Z"}));function K1({stepId:e}){var a;const{data:t,isPending:n,isError:r,error:s}=yt({stepId:e});return r?i.jsx(rt,{err:s}):n?i.jsx(Q,{className:"h-[300px] w-full"}):i.jsx(dt,{initialOpen:!0,title:"Code",children:i.jsx(Ge,{fullWidth:!0,highlightCode:!0,wrap:!0,code:((a=t==null?void 0:t.metadata)==null?void 0:a.source_code)||""})})}const Q1=e=>P.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("path",{d:"M21.6613 9.95778C21.6071 9.9147 21.1007 9.53236 20.0329 9.53236C19.7509 9.53359 19.4695 9.55777 19.1914 9.60469C18.9848 8.18806 17.8136 7.49738 17.761 7.46639L17.4743 7.30103L17.2857 7.57317C17.0495 7.93875 16.8771 8.34175 16.7759 8.76504C16.5847 9.5737 16.7009 10.3332 17.1117 10.9826C16.6157 11.259 15.82 11.3271 15.6589 11.3331H2.48463C2.14053 11.3335 1.8613 11.6116 1.85942 11.9557C1.84406 13.1098 2.03959 14.2571 2.43641 15.341C2.89024 16.5311 3.56541 17.4078 4.44382 17.9443C5.42815 18.5472 7.02735 18.8916 8.84013 18.8916C9.65906 18.8942 10.4765 18.8201 11.2816 18.6703C12.4008 18.4648 13.4778 18.0736 14.4679 17.5129C15.2838 17.0404 16.0181 16.4393 16.6424 15.7328C17.6862 14.5513 18.308 13.2354 18.7704 12.0659C18.8324 12.0659 18.8944 12.0659 18.9547 12.0659C20.0975 12.0659 20.8002 11.6086 21.1877 11.2254C21.4453 10.981 21.6463 10.6833 21.7768 10.3531L21.8586 10.1137L21.6613 9.95778Z",fill:"#0091E2"}),P.createElement("path",{d:"M3.70578 10.9474H5.47119C5.55634 10.9474 5.62533 10.8783 5.62533 10.7932V9.22068C5.62581 9.13554 5.55717 9.06615 5.47206 9.06567C5.47178 9.06567 5.47147 9.06567 5.47119 9.06567H3.70578C3.62063 9.06567 3.55164 9.1347 3.55164 9.21981C3.55164 9.22009 3.55164 9.2204 3.55164 9.22068V10.7932C3.55164 10.8783 3.62063 10.9474 3.70578 10.9474Z",fill:"#0091E2"}),P.createElement("path",{d:"M6.13862 10.9474H7.90403C7.98918 10.9474 8.05817 10.8783 8.05817 10.7932V9.22068C8.05865 9.13554 7.99002 9.06615 7.90487 9.06567C7.90459 9.06567 7.90428 9.06567 7.904 9.06567H6.13859C6.05297 9.06567 5.98358 9.13506 5.98358 9.22068V10.7932C5.98409 10.8785 6.05333 10.9474 6.13862 10.9474Z",fill:"#0091E2"}),P.createElement("path",{d:"M8.60845 10.9474H10.3739C10.459 10.9474 10.528 10.8783 10.528 10.7932V9.22068C10.5285 9.13554 10.4599 9.06615 10.3747 9.06567C10.3744 9.06567 10.3741 9.06567 10.3738 9.06567H8.60843C8.52328 9.06567 8.45428 9.1347 8.45428 9.21981C8.45428 9.22009 8.45428 9.2204 8.45428 9.22068V10.7932C8.45431 10.8783 8.52334 10.9474 8.60845 10.9474Z",fill:"#0091E2"}),P.createElement("path",{d:"M11.049 10.9474H12.8145C12.8997 10.9474 12.969 10.8785 12.9695 10.7932V9.22068C12.9695 9.13506 12.9001 9.06567 12.8145 9.06567H11.049C10.9639 9.06567 10.8949 9.1347 10.8949 9.21981C10.8949 9.22009 10.8949 9.2204 10.8949 9.22068V10.7932C10.8949 10.8783 10.9639 10.9474 11.049 10.9474Z",fill:"#0091E2"}),P.createElement("path",{d:"M6.13859 8.685H7.904C7.98926 8.68452 8.05814 8.61525 8.05814 8.52999V6.95749C8.05814 6.87234 7.98912 6.80334 7.904 6.80334H6.13859C6.05333 6.80334 5.98406 6.8722 5.98358 6.95749V8.52999C5.98406 8.61542 6.05316 8.68452 6.13859 8.685Z",fill:"#0091E2"}),P.createElement("path",{d:"M8.60849 8.685H10.3739C10.4592 8.68452 10.528 8.61525 10.528 8.52999V6.95749C10.528 6.87234 10.459 6.80334 10.3739 6.80334H8.60849C8.52334 6.80334 8.45435 6.87237 8.45435 6.95749V8.52999C8.45435 8.61525 8.52323 8.68452 8.60849 8.685Z",fill:"#0091E2"}),P.createElement("path",{d:"M11.049 8.685H12.8145C12.8999 8.68452 12.969 8.61542 12.9695 8.52999V6.95749C12.969 6.8722 12.8997 6.80334 12.8145 6.80334H11.049C10.9639 6.80334 10.8949 6.87237 10.8949 6.95749V8.52999C10.8949 8.61525 10.9638 8.68452 11.049 8.685Z",fill:"#0091E2"}),P.createElement("path",{d:"M11.049 6.42184H12.8145C12.8997 6.42184 12.969 6.35296 12.9695 6.2677V4.6943C12.969 4.60902 12.8997 4.54016 12.8145 4.54016H11.049C10.9639 4.54016 10.8949 4.60916 10.8949 4.6943V6.26768C10.8949 6.35282 10.9639 6.42184 11.049 6.42184Z",fill:"#0091E2"}),P.createElement("path",{d:"M13.5111 10.9474H15.2765C15.3618 10.9474 15.4311 10.8785 15.4316 10.7932V9.22068C15.4316 9.13506 15.3622 9.06567 15.2765 9.06567H13.5111C13.426 9.06567 13.357 9.1347 13.357 9.21981C13.357 9.22009 13.357 9.2204 13.357 9.22068V10.7932C13.357 10.8783 13.426 10.9474 13.5111 10.9474Z",fill:"#0091E2"})),G1=e=>P.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.7587 4.31292e-07L8 9.08129e-07C8.55229 9.08129e-07 9 0.447716 9 1C9 1.55229 8.55229 2 8 2H5.8C4.94342 2 4.36113 2.00078 3.91104 2.03755C3.47262 2.07337 3.24842 2.1383 3.09202 2.21799C2.7157 2.40973 2.40973 2.7157 2.21799 3.09202C2.1383 3.24842 2.07337 3.47262 2.03755 3.91104C2.00078 4.36113 2 4.94342 2 5.8V14.2C2 15.0566 2.00078 15.6389 2.03755 16.089C2.07337 16.5274 2.1383 16.7516 2.21799 16.908C2.40973 17.2843 2.7157 17.5903 3.09202 17.782C3.24842 17.8617 3.47262 17.9266 3.91104 17.9624C4.36113 17.9992 4.94342 18 5.8 18H14.2C15.0566 18 15.6389 17.9992 16.089 17.9624C16.5274 17.9266 16.7516 17.8617 16.908 17.782C17.2843 17.5903 17.5903 17.2843 17.782 16.908C17.8617 16.7516 17.9266 16.5274 17.9624 16.089C17.9992 15.6389 18 15.0566 18 14.2V12C18 11.4477 18.4477 11 19 11C19.5523 11 20 11.4477 20 12V14.2413C20 15.0463 20 15.7106 19.9558 16.2518C19.9099 16.8139 19.8113 17.3306 19.564 17.816C19.1805 18.5686 18.5686 19.1805 17.816 19.564C17.3306 19.8113 16.8139 19.9099 16.2518 19.9558C15.7106 20 15.0463 20 14.2413 20H5.75868C4.95372 20 4.28936 20 3.74817 19.9558C3.18608 19.9099 2.66937 19.8113 2.18404 19.564C1.43139 19.1805 0.819468 18.5686 0.435975 17.816C0.188684 17.3306 0.0901197 16.8139 0.0441945 16.2518C-2.28137e-05 15.7106 -1.23241e-05 15.0463 4.31292e-07 14.2413V5.7587C-1.23241e-05 4.95373 -2.28137e-05 4.28937 0.0441945 3.74817C0.0901197 3.18608 0.188684 2.66937 0.435975 2.18404C0.819468 1.43139 1.43139 0.819468 2.18404 0.435975C2.66937 0.188684 3.18608 0.0901197 3.74817 0.0441945C4.28937 -2.28137e-05 4.95373 -1.23241e-05 5.7587 4.31292e-07ZM12 1.00001C12 0.447726 12.4477 1.04449e-05 13 1.04449e-05H19C19.5523 1.04449e-05 20 0.447725 20 1.00001L20 7.00001C20 7.55229 19.5523 8.00001 19 8.00001C18.4477 8.00001 18 7.5523 18 7.00001L18 3.41422L10.7071 10.7071C10.3166 11.0976 9.68342 11.0976 9.29289 10.7071C8.90237 10.3166 8.90237 9.68342 9.29289 9.29289L16.5858 2.00001H13C12.4477 2.00001 12 1.5523 12 1.00001Z"}));function ws({data:e}){const[t,n]=P.useState(!0);return i.jsxs(St,{open:t,onOpenChange:n,children:[i.jsx(Et,{intent:"primary",className:"flex items-center gap-[10px]",children:i.jsxs(_t,{className:"flex w-full items-center gap-[10px]",children:[i.jsx(ht,{className:` ${t?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),"Docker Image"]})}),i.jsxs(Tt,{className:"border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:[i.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[i.jsx(le,{label:"Docker Image",value:i.jsxs("div",{className:"flex justify-between",children:[i.jsxs(Oe,{className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[i.jsx(Q1,{className:"mr-1 h-4 w-4 fill-theme-text-brand"}),Qs(e.image)]}),i.jsxs("div",{className:"align-center mr-1 flex",children:[i.jsx("a",{className:"cursor-pointer",rel:"noopener noreferrer",target:"_blank",href:`https://${e.image}`,children:i.jsx(G1,{className:"mr-1 mt-0.5 h-5 w-5 fill-theme-text-tertiary"})}),i.jsx(Ve,{copyText:e.image,isVisible:!0,copyTitle:"Copy url"})]})]})}),i.jsx(le,{label:"Contains Code",value:i.jsx(Oe,{color:e.contains_code?"green":"grey",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:e.contains_code?"Available":"None"})})]}),e.dockerfile&&i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"mb-2 mt-5 text-theme-text-secondary",children:"Dockerfile"}),i.jsx(Ge,{fullWidth:!0,wrap:!0,code:e.dockerfile})]}),e.requirements&&i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"mb-2 mt-5 text-theme-text-secondary",children:"Requirements"}),i.jsx(Ge,{fullWidth:!0,wrap:!0,code:e.requirements})]})]})]})}function J1({buildId:e}){return["pipeline-builds",e]}async function Y1({buildId:e},t){const n=Ue($e.runs.detail(e)),r=await fetch(n,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json",...t}});if(!r.ok)throw new qe({message:`Error while fetching pipeline build ${e}`,status:r.status,statusText:r.statusText});return r.json()}function js(e,t){return Je({queryKey:J1(e),queryFn:()=>Y1(e),...t})}function X1({stepId:e}){var m,h,C,b,E,j,I,_,D,z,k,R;const{data:t,isPending:n,isError:r,error:s}=yt({stepId:e}),{runId:a}=we(),{data:l}=Pe({runId:a},{throwOnError:!0,enabled:!!a}),{data:o}=js({buildId:(h=(m=l==null?void 0:l.body)==null?void 0:m.build)==null?void 0:h.id},{enabled:!!((b=(C=l==null?void 0:l.body)==null?void 0:C.build)!=null&&b.id)}),c=t==null?void 0:t.name,d=(()=>{var y;const g=(y=o==null?void 0:o.metadata)==null?void 0:y.images;if(!g)return null;if(c){for(const w in g)if(w.startsWith(`${c}.`))return w;if(g[c])return c}return g.orchestrator?"orchestrator":null})(),p=d&&((j=(E=o==null?void 0:o.metadata)==null?void 0:E.images)==null?void 0:j[d]);return r?i.jsx(rt,{err:s}):n?i.jsxs("div",{className:"space-y-5",children:[i.jsx(Q,{className:"h-[200]"}),i.jsx(Q,{className:"h-[200px]"}),i.jsx(Q,{className:"h-[200px]"})]}):i.jsxs("div",{className:"space-y-5",children:[i.jsx(He,{isInitialOpen:!0,data:(_=(I=t.metadata)==null?void 0:I.config)==null?void 0:_.parameters,title:"Parameters"}),p?i.jsx(ws,{data:p}):null,i.jsx(ed,{id:t.id}),i.jsx(He,{isInitialOpen:!0,title:"Resources",data:((z=(D=t.metadata)==null?void 0:D.config.settings)==null?void 0:z.resources)||{}}),i.jsx(He,{isInitialOpen:!0,title:"Substitutions",data:(k=t.metadata)==null?void 0:k.config.substitutions}),i.jsx(He,{isInitialOpen:!0,title:"Extra",data:(R=t.metadata)==null?void 0:R.config.extra})]})}function ed({id:e}){return i.jsxs(dt,{initialOpen:!0,title:"Code",children:[i.jsx("h2",{className:"mb-2 text-text-md text-theme-text-secondary",children:"Get config programmatically"}),i.jsx(Ge,{fullWidth:!0,highlightCode:!0,wrap:!0,code:yi(e)})]})}function or(e,t){return["initializing","running"].includes(e)&&t==="failed"}const td=e=>P.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.0083 2C6.47396 2 2 6.58331 2 12.2535C2 16.786 4.86662 20.6226 8.84338 21.9805C9.34058 22.0826 9.5227 21.7599 9.5227 21.4885C9.5227 21.2508 9.50631 20.436 9.50631 19.587C6.72225 20.1983 6.14249 18.3647 6.14249 18.3647C5.69508 17.1764 5.03215 16.871 5.03215 16.871C4.12092 16.2429 5.09852 16.2429 5.09852 16.2429C6.1093 16.3108 6.63969 17.2954 6.63969 17.2954C7.53432 18.857 8.97592 18.4158 9.55588 18.1441C9.63865 17.482 9.90394 17.0237 10.1856 16.7691C7.96514 16.5314 5.62891 15.6487 5.62891 11.7102C5.62891 10.5898 6.02634 9.67309 6.65608 8.96018C6.55672 8.7056 6.20866 7.65289 6.75564 6.24394C6.75564 6.24394 7.60069 5.97228 9.5061 7.29644C10.3219 7.07199 11.1632 6.95782 12.0083 6.95685C12.8533 6.95685 13.7148 7.07581 14.5102 7.29644C16.4159 5.97228 17.2609 6.24394 17.2609 6.24394C17.8079 7.65289 17.4596 8.7056 17.3603 8.96018C18.0066 9.67309 18.3876 10.5898 18.3876 11.7102C18.3876 15.6487 16.0514 16.5143 13.8143 16.7691C14.179 17.0916 14.4936 17.7026 14.4936 18.6703C14.4936 20.0453 14.4773 21.1489 14.4773 21.4883C14.4773 21.7599 14.6596 22.0826 15.1566 21.9808C19.1333 20.6224 22 16.786 22 12.2535C22.0163 6.58331 17.526 2 12.0083 2Z",fill:"#0D061D"})),nd=e=>P.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("path",{d:"M11.9993 21.4496L15.6838 10.0985H8.32019L11.9993 21.4496Z",fill:"#E24329"}),P.createElement("path",{d:"M3.1594 10.0985L2.03738 13.5471C1.93585 13.8603 2.0455 14.2059 2.31349 14.4011L11.9993 21.4496L3.1594 10.0985Z",fill:"#FCA326"}),P.createElement("path",{d:"M3.15942 10.0985H8.32019L6.09914 3.26231C5.98547 2.91256 5.49006 2.91256 5.3723 3.26231L3.15942 10.0985Z",fill:"#E24329"}),P.createElement("path",{d:"M20.8446 10.0985L21.9626 13.5471C22.0641 13.8603 21.9545 14.2059 21.6865 14.4011L11.9993 21.4496L20.8446 10.0985Z",fill:"#FCA326"}),P.createElement("path",{d:"M20.8446 10.0985H15.6838L17.9008 3.26231C18.0145 2.91256 18.5099 2.91256 18.6276 3.26231L20.8446 10.0985Z",fill:"#E24329"}),P.createElement("path",{d:"M11.9993 21.4496L15.6838 10.0985H20.8446L11.9993 21.4496Z",fill:"#FC6D26"}),P.createElement("path",{d:"M11.9993 21.4496L3.15942 10.0985H8.32019L11.9993 21.4496Z",fill:"#FC6D26"}));function rd({repositoryId:e}){return["code_repositories",e]}async function id({repositoryId:e}){const t=Ue($e.code_repositories.detail(e)),n=await fetch(t,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(n.status===404&&Nt(),!n.ok)throw new qe({message:`Error while fetching code repository ${e}`,status:n.status,statusText:n.statusText});return n.json()}function sd(e,t){return Je({queryKey:rd(e),queryFn:()=>id(e),...t})}function ks({repositoryId:e,commit:t}){var o;const{data:n,isPending:r,isError:s}=sd({repositoryId:e},{enabled:!!e});if(!e||!t)return i.jsx("p",{children:"Not available"});if(r)return i.jsx(Q,{className:"h-6"});if(s)return null;const a=(o=n.metadata)==null?void 0:o.config,l=()=>{var p,m,h,C;let c=null,u=n==null?void 0:n.name,d;return((m=(p=n==null?void 0:n.body)==null?void 0:p.source)==null?void 0:m.attribute)==="GitHubCodeRepository"?(c=td,u=`${a==null?void 0:a.owner}/${a==null?void 0:a.repository}`,d=`https://www.${(typeof(a==null?void 0:a.host)=="string"?a.host:"github.com").replace(/\/$/,"")}/${u}`+(t?`/commit/${t}`:"")):((C=(h=n==null?void 0:n.body)==null?void 0:h.source)==null?void 0:C.attribute)==="GitLabCodeRepository"&&(c=nd,u=`${a==null?void 0:a.group}/${a==null?void 0:a.project}`,d=`https://www.${(typeof(a==null?void 0:a.host)=="string"?a.host:"gitlab.com").replace(/\/$/,"")}/${u}`+(t?`/commit/${t}`:"")),i.jsxs("a",{target:"_blank",rel:"noopener noreferrer",className:`flex items-center ${d?"":"pointer-events-none"}`,onClick:b=>b.stopPropagation(),href:d,children:[c&&i.jsx(c,{className:"mr-1 h-5 w-5 fill-theme-text-brand"}),u]})};return i.jsxs("div",{className:"group/copybutton mr-1",children:[i.jsxs(Oe,{color:"grey",className:"inline-flex items-center font-semibold text-neutral-900",rounded:!1,emphasis:"subtle",children:[l(),i.jsx("div",{className:"ml-1 rounded-sm bg-neutral-200 px-1 py-0.25",children:Gs(t,10)})]}),i.jsx(Ve,{copyText:t})]})}function vs(){return i.jsx(_e,{children:i.jsxs(Te,{children:[i.jsx(Le,{children:i.jsxs(Oe,{color:"yellow",className:"flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[i.jsx(ja,{className:"h-4 w-4 shrink-0 fill-current"}),"Login Required"]})}),i.jsx(Ie,{children:i.jsxs("p",{children:["You must be logged in for this link to work.",i.jsx("br",{}),"Please ensure you're signed in before accessing."]})})]})})}function ad({stepStatus:e,isStatusUnknown:t}){function n(){return i.jsxs(Oe,{color:Xt(t?"unknown":e),rounded:!0,emphasis:"subtle",className:"flex w-fit items-center gap-1 capitalize",children:[i.jsx(ct,{className:"fill-current",status:t?"unknown":e}),t?"Unknown - Last reported: "+e:e]})}return t?i.jsx(_e,{children:i.jsxs(Te,{children:[i.jsx(Le,{className:"z-10 cursor-default",children:i.jsx(n,{})}),i.jsxs(Ie,{className:"text-center",children:["Last reported as ",i.jsx("b",{children:e})," but current status unknown due to pipeline failure.",i.jsx("br",{}),"Communication may be lost."]})]})}):i.jsx(n,{})}function ld({stepId:e,runId:t}){var p,m,h,C,b,E,j,I,_,D,z,k,R,g,y,w,N,S,T,A,M,ee,B,J,F,x,V,q,f;const{data:n,isError:r,isPending:s,error:a}=yt({stepId:e}),{data:l}=Pe({runId:t}),o=(h=(m=(p=l==null?void 0:l.body)==null?void 0:p.code_reference)==null?void 0:m.body)==null?void 0:h.code_repository;if(r)return i.jsx(rt,{err:a});if(s)return i.jsx(Q,{className:"h-[300px] w-full"});const c=(b=(C=n.metadata)==null?void 0:C.config)==null?void 0:b.enable_artifact_metadata,u=(j=(E=n.metadata)==null?void 0:E.config)==null?void 0:j.enable_artifact_visualization,d=or(((I=n.body)==null?void 0:I.status)??"running",((_=l==null?void 0:l.body)==null?void 0:_.status)??"running");return i.jsx(dt,{initialOpen:!0,title:"Details",children:i.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[i.jsx(le,{label:"Id",value:i.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[n.id,i.jsx(Ve,{copyText:n.id})]})}),i.jsx(le,{label:"Status",value:i.jsx("div",{className:"flex items-center gap-0.5 overflow-x-auto",children:i.jsx(ad,{stepStatus:((D=n.body)==null?void 0:D.status)??"running",isStatusUnknown:d})})}),l?i.jsxs(i.Fragment,{children:[i.jsx(le,{label:"Pipeline",value:i.jsx(gt,{to:tt.projects.pipelines.namespace(encodeURIComponent((k=(z=l.body)==null?void 0:z.pipeline)==null?void 0:k.name)),children:i.jsxs(Oe,{color:"purple",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[i.jsx(Hn,{className:"mr-1 h-4 w-4 fill-theme-text-brand"}),(g=(R=l.body)==null?void 0:R.pipeline)==null?void 0:g.name]})})}),i.jsx(Ke,{children:i.jsxs("div",{className:"flex items-center space-x-0.5 truncate",children:[i.jsx("span",{className:"truncate",children:"Repository/Commit"}),i.jsx(_e,{children:i.jsxs(Te,{children:[i.jsxs(Le,{className:"cursor-default",children:[i.jsx(xt,{className:"h-3 w-3 fill-theme-text-secondary"}),i.jsx("span",{className:"sr-only",children:"Info"})]}),i.jsx(Ie,{className:"w-full max-w-md whitespace-normal",children:"Git hash of code repository. Only set if pipeline was run in a clean git repository connected to your ZenML server."})]})})]})}),i.jsx(Qe,{className:"h-auto",children:(y=l.body)!=null&&y.code_reference?i.jsx(ks,{repositoryId:o==null?void 0:o.id,commit:(w=l.body.code_reference.body)==null?void 0:w.commit}):"Not available"}),i.jsx(Ke,{className:(N=l.metadata)!=null&&N.code_path?"col-span-3":"",children:i.jsxs("div",{className:"flex items-center space-x-0.5 truncate",children:[i.jsx("span",{children:"Code Path"}),i.jsx(_e,{children:i.jsxs(Te,{children:[i.jsxs(Le,{className:"cursor-default",children:[i.jsx(xt,{className:"h-3 w-3 fill-theme-text-secondary"}),i.jsx("span",{className:"sr-only",children:"Info"})]}),i.jsx(Ie,{className:"w-full max-w-md whitespace-normal",children:"Path to where code was uploaded in the artifact store. Only set on a pipeline with a non-local orchestrator and if Repository/Commit is not set"})]})})]})}),i.jsx(Qe,{className:(S=l.metadata)!=null&&S.code_path?"col-span-3 h-auto":"",children:(T=l.metadata)!=null&&T.code_path?i.jsx(Ge,{code:l.metadata.code_path}):"Not available"})]}):i.jsx(Q,{className:"h-6 w-full"}),i.jsx(le,{label:"Cache key",value:i.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[(A=n.metadata)==null?void 0:A.cache_key,i.jsx(Ve,{copyText:(M=n.metadata)==null?void 0:M.cache_key})]})}),i.jsx(le,{label:"Author",value:i.jsx("div",{className:"inline-flex items-center gap-1",children:i.jsx(Rn,{username:(B=(ee=n.resources)==null?void 0:ee.user)==null?void 0:B.name})})}),i.jsx(le,{label:"Start Time",value:(J=n.body)!=null&&J.start_time?i.jsx(zt,{dateString:(F=n.body)==null?void 0:F.start_time}):"Not available"}),i.jsx(le,{label:"End Time",value:(x=n.body)!=null&&x.end_time?i.jsx(zt,{dateString:(V=n.body)==null?void 0:V.end_time}):"Not available"}),i.jsx(le,{label:"Duration",value:Ei(((q=n.body)==null?void 0:q.start_time)||"",((f=n.body)==null?void 0:f.end_time)||"")}),i.jsx(le,{label:"Artifact metadata",value:i.jsx(Wt,{size:"sm",color:c?"green":"grey",children:c?"Enable":"Disabled"})}),i.jsx(le,{label:"Artifact visualization",value:i.jsx(Wt,{size:"sm",color:u?"green":"grey",children:u?"Enable":"Disabled"})})]})})}function od({className:e}){var c,u,d,p,m;const{runId:t}=we(),{data:n,isPending:r,isError:s}=Pe({runId:t},{throwOnError:!0}),a=(u=(c=n==null?void 0:n.metadata)==null?void 0:c.run_metadata)==null?void 0:u.orchestrator_url,l=(p=(d=n==null?void 0:n.metadata)==null?void 0:d.run_metadata)==null?void 0:p.orchestrator_logs_url,o=(m=n==null?void 0:n.metadata)==null?void 0:m.orchestrator_run_id;return s?i.jsx("p",{children:"Failed to fetch Orchestrator Card"}):r?i.jsx(Q,{className:"h-[150px] w-full"}):i.jsx(dt,{className:e,initialOpen:!0,title:"Orchestrator",children:i.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[i.jsx(le,{label:"Orchestrator URL",value:a&&ot(a)?i.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[i.jsx("a",{className:"truncate underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:a,children:a}),i.jsx(Ve,{copyText:a})]}):"Not available"}),i.jsx(le,{label:"Orchestrator Logs",value:l&&ot(l)?i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(vs,{}),i.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[i.jsx("a",{className:"truncate text-theme-text-brand underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:l,children:l}),i.jsx(Ve,{copyText:l})]})]}):"Not available"}),i.jsx(le,{label:"Orchestrator Run ID",value:o?i.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[o,i.jsx(Ve,{copyText:o})]}):"Not available"})]})})}function ln({title:e,subtitle:t}){return i.jsx(Me,{icon:i.jsx(tn,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:i.jsxs("div",{className:"text-center",children:[i.jsx("div",{className:"mb-2 text-display-xs font-semibold",children:e}),i.jsx("p",{className:"text-lg text-theme-text-secondary",children:t})]})})}const ud=e=>P.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("path",{d:"M4 14H10M10 14V20M10 14L3 21M20 10H14M14 10V4M14 10L21 3",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),cd=e=>{switch(e){case"INFO":return"bg-blue-500";case"ERROR":return"bg-error-500";case"WARN":return"bg-warning-500";case"DEBUG":return"bg-neutral-400";case"CRITICAL":return"bg-error-700";default:return"bg-neutral-400"}},dd=e=>new Date(e).toISOString().replace("T"," ").slice(0,19);function hd({entry:e,searchTerm:t,isCurrentMatch:n,textWrapEnabled:r,highlightedMessage:s}){const{timestamp:a,level:l,message:o,originalEntry:c}=e,u=a?dd(a):"",d=cd(l),p=m=>{if(!t)return m;const h=new RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi");return m.split(h).map((b,E)=>b.toLowerCase()===t.toLowerCase()?i.jsx("span",{className:`${n?"bg-warning-200 text-warning-900":"bg-warning-100 text-warning-800"} inline-block rounded-sm px-1`,children:b},E):b)};return i.jsxs("div",{className:"group/copybutton flex w-full items-start space-x-3 border-b border-theme-border-minimal px-4 py-1 font-mono text-text-sm transition-colors hover:bg-theme-surface-secondary",children:[i.jsxs("div",{className:"flex max-h-6 w-8 flex-shrink-0 items-center",children:[i.jsx("div",{className:`h-4 w-[2px] rounded-sm ${d} mr-2`}),i.jsx("span",{className:"text-xs font-medium text-theme-text-tertiary",children:l})]}),i.jsx("div",{className:"w-[178px] flex-shrink-0 text-theme-text-secondary",children:u}),i.jsx("div",{className:`flex-1 text-theme-text-primary ${r?"min-w-0 whitespace-pre-wrap break-words":"whitespace-nowrap"}`,children:s||p(o)}),i.jsx("div",{className:"flex flex-shrink-0 items-center",children:i.jsx(Ve,{copyText:c,copyTitle:"Copy log line"})})]})}function ei({onSearchChange:e,onCopyAll:t,onDownload:n,searchQuery:r="",currentMatchIndex:s=0,totalMatches:a=0,onPreviousMatch:l,onNextMatch:o}){return i.jsx(i.Fragment,{children:i.jsx("div",{className:"bg-theme-surface-secondary",children:i.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Oa,{searchParams:{},inMemoryHandler:e,placeholder:"Search logs..."}),r&&i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx("span",{className:"text-sm text-theme-text-secondary",children:a>0?`${s+1} of ${a}`:"No matches"}),i.jsx(fe,{size:"sm",emphasis:"minimal",onClick:l,disabled:a===0,title:"Previous match",children:i.jsx(fr,{className:"h-4 w-4 shrink-0 rotate-90 fill-theme-text-tertiary"})}),i.jsx(fe,{size:"sm",emphasis:"minimal",onClick:o,disabled:a===0,title:"Next match",children:i.jsx(fr,{className:"h-4 w-4 shrink-0 -rotate-90 fill-theme-text-tertiary"})})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs(fe,{size:"md",emphasis:"subtle",intent:"secondary",onClick:t,title:"Copy all displayed logs",className:"bg-theme-surface-primary",children:[i.jsx(Fn,{className:"mr-1 h-4 w-4 fill-theme-text-secondary"}),"Copy All"]}),i.jsxs(fe,{size:"md",emphasis:"subtle",intent:"secondary",onClick:n,title:"Download logs as file",className:"bg-theme-surface-primary",children:[i.jsx(Ri,{className:"mr-1 h-5 w-5 fill-theme-text-tertiary"}),"Download"]})]})]})})})}function pd(e){const[t,n]=P.useState(""),[r,s]=P.useState(!1),[a,l]=P.useState(0),{filteredLogs:o,matches:c}=P.useMemo(()=>{if(!t.trim())return{filteredLogs:e,matches:[]};const C=r?t:t.toLowerCase(),b=[],E=[];return e.forEach(j=>{const I=r?j.message:j.message.toLowerCase(),_=[];let D=0;for(;D<I.length;){const z=I.indexOf(C,D);if(z===-1)break;_.push(z),D=z+1}_.length>0&&(b.push(j),_.forEach((z,k)=>{E.push({logIndex:b.length-1,matchIndex:k,startIndex:z,endIndex:z+C.length})}))}),{filteredLogs:b,matches:E}},[e,t,r]);P.useMemo(()=>{l(0)},[]);const u=c.length,d=P.useCallback(()=>{u>0&&l(C=>(C+1)%u)},[u]),p=P.useCallback(()=>{u>0&&l(C=>(C-1+u)%u)},[u]),m=P.useCallback(()=>{n(""),l(0)},[]),h=P.useCallback((C,b)=>{if(!t.trim())return C;const E=[];let j=0;return c.filter(_=>_.logIndex===b).forEach((_,D)=>{_.startIndex>j&&E.push(C.slice(j,_.startIndex));const k=c.findIndex(R=>R.logIndex===_.logIndex&&R.matchIndex===_.matchIndex)===a?"bg-warning-200 text-warning-900":"bg-warning-100 text-warning-800";E.push(li.createElement("span",{key:`match-${b}-${D}`,className:`${k} inline-block rounded-sm px-1`},C.slice(_.startIndex,_.endIndex))),j=_.endIndex}),j<C.length&&E.push(C.slice(j)),E.length>0?E:C},[t,c,a]);return{searchQuery:t,setSearchQuery:n,caseSensitive:r,setCaseSensitive:s,filteredLogs:o,matches:c,currentMatchIndex:a,totalMatches:u,goToNextMatch:d,goToPreviousMatch:p,clearSearch:m,highlightText:h}}const fd=100;function Ns({logs:e,itemsPerPage:t=fd}){const[n,r]=P.useState(1),[s,a]=P.useState(!0),{searchQuery:l,setSearchQuery:o,filteredLogs:c,currentMatchIndex:u,totalMatches:d,goToNextMatch:p,goToPreviousMatch:m,highlightText:h}=pd(e),C=c;li.useEffect(()=>{r(1)},[l]);const b=Math.ceil(C.length/t),E=(n-1)*t,j=E+t,I=C.slice(E,j),_=()=>{r(g=>Math.max(g-1,1))},D=()=>{r(g=>Math.min(g+1,b))},z=()=>{const g=ti(C);navigator.clipboard.writeText(g).catch(y=>{console.error("Failed to copy logs:",y)})},k=()=>{const g=ti(C),y=new Blob([g],{type:"text/plain"}),w=URL.createObjectURL(y),N=document.createElement("a");N.href=w,N.download=`logs-${new Date().toISOString().split("T")[0]}.txt`,document.body.appendChild(N),N.click(),document.body.removeChild(N),URL.revokeObjectURL(w)},R=()=>{a(g=>!g)};return e?i.jsxs("div",{className:"flex h-full flex-col space-y-5",children:[i.jsx(ei,{onSearchChange:o,onCopyAll:z,onDownload:k,searchQuery:l,currentMatchIndex:u,totalMatches:d,onPreviousMatch:m,onNextMatch:p}),i.jsxs("div",{className:"flex-1 overflow-hidden rounded-md border border-theme-border-moderate",children:[i.jsx("div",{className:"sticky top-0 z-10 bg-theme-surface-tertiary",children:i.jsxs("div",{className:"flex w-full min-w-[600px] space-x-3 bg-theme-surface-tertiary px-4 py-1 font-medium text-theme-text-secondary",children:[i.jsx("div",{className:"flex w-8 flex-shrink-0 items-center",children:i.jsx("span",{className:"text-text-sm font-semibold",children:"Type"})}),i.jsx("div",{className:"w-[178px] flex-shrink-0",children:i.jsx("span",{className:"text-text-sm font-semibold",children:"Time"})}),i.jsx("div",{className:"flex min-w-0 flex-1 items-center justify-between",children:i.jsx("span",{className:"text-text-sm font-semibold",children:"Event"})}),i.jsxs("div",{className:"flex flex-shrink-0 items-center",children:[" ",i.jsx(fe,{onClick:R,size:"sm",emphasis:"subtle",intent:"secondary",className:"ml-2 h-5 w-5 rounded-sm bg-theme-surface-primary p-0.25",title:s?"Collapse text":"Expand text",children:s?i.jsx(ud,{className:"h-4 w-4 shrink-0 text-theme-text-tertiary hover:text-theme-text-secondary"}):i.jsx(Ia,{className:"h-4 w-4 shrink-0 fill-theme-text-tertiary hover:fill-theme-text-secondary"})})]})]})}),i.jsx("div",{className:"flex-1 overflow-x-auto overflow-y-auto",children:i.jsx("div",{className:s?"min-w-full":"flex w-full min-w-full",children:i.jsx("div",{className:"flex-1 bg-theme-surface-primary",children:I.map((g,y)=>{const w=E+y;return i.jsx(hd,{entry:g,searchTerm:l,textWrapEnabled:s,highlightedMessage:h(g.message,w)},g.id)})})})}),b>1&&i.jsx("div",{className:"border-t border-theme-border-minimal bg-theme-surface-secondary px-4 py-3",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"text-sm text-theme-text-secondary",children:["Showing ",E+1," to"," ",Math.min(E+t,C.length)," of"," ",C.length," logs"]}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("button",{onClick:_,disabled:n===1,className:"text-sm rounded-md border border-theme-border-moderate bg-theme-surface-primary px-3 py-1 font-medium text-theme-text-secondary hover:bg-theme-surface-tertiary disabled:cursor-not-allowed disabled:opacity-50",children:"Previous"}),i.jsxs("span",{className:"text-sm text-theme-text-secondary",children:["Page ",n," of ",b]}),i.jsx("button",{onClick:D,disabled:n===b,className:"text-sm rounded-md border border-theme-border-moderate bg-theme-surface-primary px-3 py-1 font-medium text-theme-text-secondary hover:bg-theme-surface-tertiary disabled:cursor-not-allowed disabled:opacity-50",children:"Next"})]})]})})]})]}):i.jsxs("div",{className:"flex h-full flex-col space-y-5",children:[i.jsx(ei,{onSearchChange:o,onCopyAll:z,onDownload:k,searchQuery:l,currentMatchIndex:u,totalMatches:d,onPreviousMatch:m,onNextMatch:p}),i.jsx("div",{className:"flex-1 overflow-hidden",children:i.jsx(ln,{title:"No logs found",subtitle:"No logs available to display."})})]})}function ti(e){return e.map(t=>t.originalEntry).join(`
29
+ `)}function Ss(){return i.jsx("section",{className:"flex h-[calc(100vh_-_270px)] items-center justify-center",children:i.jsxs("div",{className:"flex flex-col items-center justify-center",children:[i.jsxs("div",{className:"relative mb-2 flex items-center justify-center",children:[i.jsx(zn,{className:"h-[120px] w-[120px]"}),i.jsx(md,{})]}),i.jsx("h2",{className:"my-3 text-center text-display-xs font-semibold",children:"Loading the Logs"}),i.jsxs("p",{className:"text-center text-text-lg text-theme-text-secondary",children:["It can take up to a few minutes. ",i.jsx("br",{})," Please wait while we fetch logs from the artifact store."]})]})})}function md(){return i.jsx("div",{className:"absolute rounded-rounded bg-primary-25 p-3",children:i.jsx(tn,{className:"h-7 w-7 fill-primary-400"})})}function xd({stepId:e}){return["logs",e]}async function gd({stepId:e}){const t=Ue($e.steps.logs(e)),n=await ut(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!n.ok){const r=await n.json().catch(()=>({}));throw new qe({message:r.detail[1].includes("File")&&r.detail[1]||`The logs for step ${e} cannot be fetched or this pipeline run ran locally and logs were not tracked`,status:n.status,statusText:n.statusText})}return n.json()}function yd(e,t){return Je({queryKey:xd(e),queryFn:()=>gd(e),...t})}function Es(e){if(!e||typeof e!="string")return[];const t=e.split(`
30
+ `).filter(r=>r.trim()!==""),n=[];return t.forEach((r,s)=>{const a=Cd(r,s);a&&a.message.trim()!==""&&n.push(a)}),n}function Cd(e,t){if(!e.trim())return null;const n=[/^\[(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})\s+UTC\]\s*(.*)$/,/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z?)\s*\[(\w+)\]\s*(.*)$/,/^(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2}(?:\.\d{3})?)\s+(\w+)\s+(.*)$/,/^(\w+)\s+(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z?)\s+(.*)$/,/^\[(\w+)\]\s+(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z?)\s+(.*)$/,/^(\w+):\s*(.*)$/,/^\[(\w+)\]\s*(.*)$/];let r=null,s="INFO",a=e;for(const o of n){const c=e.match(o);if(c){if(o.source.includes("UTC")){r=c[1].replace(" ","T")+"Z",s="INFO",a=c[2]||"";break}else o.source.includes("\\d{4}-\\d{2}-\\d{2}")?c[1]&&ni(c[1])?(r=c[1],s=wn(c[2]),a=c[3]||""):c[2]&&ni(c[2])&&(s=wn(c[1]),r=c[2],a=c[3]||""):(s=wn(c[1]),a=c[2]||c[1]||"");break}}const l=a.trim();return l?{originalEntry:e,id:`log-${t}-${Date.now()}`,timestamp:r,level:s,message:l}:null}function ni(e){return/^\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2}\s+UTC$/.test(e)||/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.test(e)||/^\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2}/.test(e)?!isNaN(Date.parse(e)):!1}function wn(e){if(!e)return"INFO";const t=e.toUpperCase().trim();switch(t){case"ERROR":case"ERR":return"ERROR";case"WARN":case"WARNING":return"WARN";case"INFO":case"INFORMATION":return"INFO";case"DEBUG":case"DBG":return"DEBUG";case"CRITICAL":case"CRIT":return"CRITICAL";default:return/^[A-Z]{3,8}$/.test(t),"INFO"}}function bd({stepId:e}){const{data:t,isPending:n,isError:r,error:s}=yd({stepId:e}),a=P.useMemo(()=>t?Es(t):[],[t]);return r?i.jsx(rt,{err:s}):n?i.jsx(Ss,{}):a.length===0?i.jsx(ln,{title:"This step has no logs",subtitle:"It looks like there are no logs associated with this step"}):i.jsx("div",{className:"space-y-5",children:i.jsx(Ns,{logs:a})})}function wd({stepId:e}){var a;const{data:t,isPending:n,isError:r,error:s}=yt({stepId:e});return n?i.jsxs("div",{className:"flex flex-col gap-5",children:[i.jsx(Q,{className:"h-9 w-full"}),i.jsx(Q,{className:"h-9 w-full"})]}):r?i.jsx(rt,{err:s}):!((a=t.metadata)!=null&&a.run_metadata)||Object.keys(t.metadata.run_metadata).length===0?i.jsx(Me,{icon:i.jsx(Mt,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:i.jsxs("div",{className:"text-center",children:[i.jsx("p",{className:"mb-2 text-display-xs font-semibold",children:"No metadata found"}),i.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There are no metadata available for this step."})]})}):i.jsxs("div",{className:"flex flex-col gap-5",children:[i.jsx(Zn,{metadata:t.metadata.run_metadata}),i.jsx($n,{metadata:t.metadata.run_metadata})]})}function jd({component:e,objectConfig:t}){var s,a;const n=`${(s=e.body)==null?void 0:s.type}.${(a=e.body)==null?void 0:a.flavor_name}`,r=(t==null?void 0:t[n])??void 0;return!r||Object.keys(r).length===0?i.jsx(gt,{to:tt.components.detail(e.id),children:i.jsx(pi,{className:"flex w-full items-center justify-between gap-3 px-5 py-3 text-left",children:i.jsx(ri,{component:e})})}):i.jsx(He,{intent:"primary",contentClassName:"pl-[60px]",className:"w-full",isInitialOpen:!1,title:i.jsx("div",{className:"flex w-full items-center justify-between gap-3 text-left",children:i.jsx(ri,{component:e})}),data:r,children:i.jsx(fe,{asChild:!0,intent:"secondary",emphasis:"subtle",className:"mx-auto flex w-fit justify-center text-text-sm text-theme-text-secondary",children:i.jsx(gt,{to:tt.components.detail(e.id),children:"See Component Details"})})})}function ri({component:e}){var t,n,r,s;return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("img",{width:32,height:32,alt:`${(t=e.body)==null?void 0:t.flavor_name} logo`,src:ui(((n=e.body)==null?void 0:n.logo_url)||"")}),i.jsxs("div",{children:[i.jsx("p",{className:"text-text-lg",children:e.name}),i.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.id.split("-")[0]})]})]}),i.jsx(Pa,{type:((r=e.body)==null?void 0:r.type)||"orchestrator",children:Js(((s=e.body)==null?void 0:s.type)||"")})]})}function kd({stack:e}){return i.jsxs(pi,{className:"flex items-center justify-between gap-3 px-5 py-3",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Ys,{type:"square",size:"md",children:i.jsx(Xs,{size:"md",children:e.name[0]})}),i.jsxs("div",{children:[i.jsx("p",{className:"text-text-lg",children:e.name}),i.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.id.split("-")[0]})]})]}),i.jsxs(Oe,{rounded:!1,className:"inline-flex shrink items-center gap-0.5 truncate",color:"turquoise",emphasis:"subtle",children:[i.jsx(Bn,{className:"h-4 w-4 shrink-0 fill-current"}),i.jsx("div",{className:"truncate",children:"Stack"})]})]})}function _s({stack:e,objectConfig:t}){var n;return i.jsxs("div",{className:"space-y-5",children:[i.jsx(vd,{}),i.jsx(kd,{stack:e}),i.jsx("ul",{className:"space-y-5",children:Object.values(((n=e.metadata)==null?void 0:n.components)||{}).map(r=>i.jsx("li",{className:"w-full",children:i.jsx(jd,{component:r[0],objectConfig:t})},r[0].id))})]})}function vd(){return i.jsx(en,{className:"truncate",children:i.jsx("p",{className:"truncate",children:"Current run-specific stack settings. Click on a component for full default settings."})})}function Nd({stepId:e}){var l,o,c,u;const{runId:t}=we(),n=Pe({runId:t}),r=yt({stepId:e});if(n.isPending||r.isPending)return i.jsx(Q,{className:"h-[250px] w-full"});if(n.isError||r.isError)return i.jsx("p",{children:"Something went wrong fetching the run"});const s=(c=(o=(l=n.data)==null?void 0:l.body)==null?void 0:o.stack)==null?void 0:c.id,a=((u=r.data.metadata)==null?void 0:u.config.settings)||{};return s?i.jsx(Sd,{objectConfig:a,stackId:s}):i.jsx(Me,{icon:i.jsx(mt,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:i.jsxs("div",{className:"text-center",children:[i.jsx("p",{className:"text-display-xs font-semibold",children:"No Stack"}),i.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There is no stack associated with this run."})]})})}function Sd({stackId:e,objectConfig:t}){const{data:n,isError:r,isPending:s}=_i({stackId:e});return s?i.jsx(Q,{className:"h-[250px] w-full"}):r?i.jsx("p",{children:"Failed to fetch Stack"}):i.jsx(_s,{stack:n,objectConfig:t})}function Ed({stepId:e}){var o,c;const{runId:t}=we(),n=yt({stepId:e}),r=Pe({runId:t});if(n.isPending||r.isPending)return i.jsx(Q,{className:"h-6 w-[200px]"});if(n.error||r.error)return null;const s=(o=n.data.body)==null?void 0:o.status,a=(c=r.data.body)==null?void 0:c.status,l=or(s??"running",a??"running");return i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx("div",{className:`rounded-sm p-0.5 ${l?"bg-blue-50":ji(s)}`,children:i.jsx(ct,{status:l?"unknown":s,className:"h-4 w-4 shrink-0"})}),i.jsx("h2",{className:"text-display-xs font-semibold",children:n.data.name}),i.jsx(Wt,{size:"sm",className:"capitalize",color:ga(l?"unknown":s),children:l?`Unknown - Last reported: ${s}`:s||"None"})]})}function _d({stepId:e}){const{runId:t}=we();return i.jsxs("div",{children:[i.jsx(wi,{}),i.jsx("div",{className:"flex justify-between border-b border-theme-border-moderate bg-theme-surface-primary p-5",children:i.jsx(Ed,{stepId:e})}),i.jsx("div",{className:"p-5",children:i.jsxs(Dn,{defaultValue:"overview",children:[i.jsxs(Mn,{children:[i.jsxs(Ne,{className:"flex items-center gap-2 truncate text-text-md",value:"overview",children:[i.jsx(xt,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),i.jsx("span",{children:"Overview"})]}),i.jsxs(Ne,{className:"flex items-center gap-2 truncate text-text-md",value:"stack",children:[i.jsx(Bn,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),i.jsx("span",{children:"Stack"})]}),i.jsxs(Ne,{className:"flex items-center gap-2 truncate text-text-md",value:"code",children:[i.jsx(Ta,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),i.jsx("span",{children:"Code"})]}),i.jsxs(Ne,{className:"flex items-center gap-2 truncate text-text-md",value:"logs",children:[i.jsx(tn,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),i.jsx("span",{children:"Logs"})]}),i.jsxs(Ne,{className:"flex items-center gap-2 truncate text-text-md",value:"config",children:[i.jsx(bs,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),i.jsx("span",{children:"Configuration"})]}),i.jsxs(Ne,{className:"flex items-center gap-2 text-text-md",value:"metadata",children:[i.jsx(Un,{className:"h-5 w-5 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),i.jsx("span",{children:"Metadata"})]})]}),i.jsxs(Se,{className:"m-0 mt-5 space-y-5 border-0 bg-transparent p-0",value:"overview",children:[i.jsx(ld,{runId:t,stepId:e}),i.jsx(od,{})]}),i.jsx(Se,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"stack",children:i.jsx(Nd,{stepId:e})}),i.jsx(Se,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"code",children:i.jsx(K1,{stepId:e})}),i.jsx(Se,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"logs",children:i.jsx(bd,{stepId:e})}),i.jsx(Se,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"config",children:i.jsx(X1,{stepId:e})}),i.jsx(Se,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"metadata",children:i.jsx(wd,{stepId:e})})]})})]})}function Td({children:e,stepId:t,onOpenChange:n}){return i.jsxs(ci,{onOpenChange:n,children:[i.jsx(di,{asChild:!0,children:e}),i.jsx(hi,{className:"w-[1000px] overflow-y-auto",children:i.jsx(_d,{stepId:t})})]})}const Ld=e=>({unselectAll:e.unselectNodesAndEdges});function Id({data:e,selected:t}){const{unselectAll:n}=qn(Ld),r=e.status==="failed";function s(l){l||setTimeout(()=>{n()},100)}const a=or(e.status,e.runStatus);return i.jsx(an,{children:i.jsx(Td,{onOpenChange:s,stepId:e.step_id,children:i.jsxs("button",{"data-failed":r,"data-selected":!!t,className:ea("group max-h-[80px] max-w-[300px] overflow-hidden rounded-md border bg-theme-surface-primary transition-all duration-200 hover:shadow-md data-[selected=true]:shadow-md",{"border-theme-border-moderate hover:border-neutral-400 data-[selected=true]:border-theme-border-bold":!r,"border-error-200":r}),children:[i.jsxs("div",{className:"flex flex-1 items-center gap-1 py-1 pl-1 pr-2",children:[i.jsx("div",{className:`rounded-sm p-0.5 ${ji(a?"unknown":e.status)}`,children:i.jsx(ct,{status:a?"unknown":e.status,className:"h-4 w-4 shrink-0"})}),i.jsx("p",{className:"truncate font-semibold",children:e.step_name}),i.jsxs(Cs,{className:"h-4 w-4 shrink-0 rounded-sm hover:bg-theme-surface-secondary active:bg-neutral-300",code:yi(e.step_id),type:"step",children:[i.jsx(Fn,{className:"h-3 w-3 fill-theme-text-tertiary"}),i.jsx("div",{className:"sr-only",children:"Copy code to load step"})]})]}),i.jsx("div",{"data-failed":r,className:"flex flex-1 justify-end border-t border-theme-border-moderate bg-theme-surface-tertiary px-2 py-0.5 text-text-xs data-[failed=true]:border-error-200 data-[failed=true]:bg-error-50 data-[failed=true]:text-theme-text-error",children:r?"Execution failed":e.duration===void 0||e.duration===null?"N/A":La(e.duration)})]})})})}function Ut(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var jn={exports:{}},ii;function Od(){return ii||(ii=1,function(e,t){(function(n){e.exports=n()})(function(){return function(){function n(r,s,a){function l(u,d){if(!s[u]){if(!r[u]){var p=typeof Ut=="function"&&Ut;if(!d&&p)return p(u,!0);if(o)return o(u,!0);var m=new Error("Cannot find module '"+u+"'");throw m.code="MODULE_NOT_FOUND",m}var h=s[u]={exports:{}};r[u][0].call(h.exports,function(C){var b=r[u][1][C];return l(b||C)},h,h.exports,n,r,s,a)}return s[u].exports}for(var o=typeof Ut=="function"&&Ut,c=0;c<a.length;c++)l(a[c]);return l}return n}()({1:[function(n,r,s){Object.defineProperty(s,"__esModule",{value:!0}),s.default=void 0;function a(m){"@babel/helpers - typeof";return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},a(m)}function l(m,h){if(!(m instanceof h))throw new TypeError("Cannot call a class as a function")}function o(m,h){for(var C=0;C<h.length;C++){var b=h[C];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(m,u(b.key),b)}}function c(m,h,C){return h&&o(m.prototype,h),Object.defineProperty(m,"prototype",{writable:!1}),m}function u(m){var h=d(m,"string");return a(h)=="symbol"?h:h+""}function d(m,h){if(a(m)!="object"||!m)return m;var C=m[Symbol.toPrimitive];if(C!==void 0){var b=C.call(m,h);if(a(b)!="object")return b;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(m)}s.default=function(){function m(){var h=this,C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},b=C.defaultLayoutOptions,E=b===void 0?{}:b,j=C.algorithms,I=j===void 0?["layered","stress","mrtree","radial","force","disco","sporeOverlap","sporeCompaction","rectpacking"]:j,_=C.workerFactory,D=C.workerUrl;if(l(this,m),this.defaultLayoutOptions=E,this.initialized=!1,typeof D>"u"&&typeof _>"u")throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.");var z=_;typeof D<"u"&&typeof _>"u"&&(z=function(g){return new Worker(g)});var k=z(D);if(typeof k.postMessage!="function")throw new TypeError("Created worker does not provide the required 'postMessage' function.");this.worker=new p(k),this.worker.postMessage({cmd:"register",algorithms:I}).then(function(R){return h.initialized=!0}).catch(console.err)}return c(m,[{key:"layout",value:function(C){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=b.layoutOptions,j=E===void 0?this.defaultLayoutOptions:E,I=b.logging,_=I===void 0?!1:I,D=b.measureExecutionTime,z=D===void 0?!1:D;return C?this.worker.postMessage({cmd:"layout",graph:C,layoutOptions:j,options:{logging:_,measureExecutionTime:z}}):Promise.reject(new Error("Missing mandatory parameter 'graph'."))}},{key:"knownLayoutAlgorithms",value:function(){return this.worker.postMessage({cmd:"algorithms"})}},{key:"knownLayoutOptions",value:function(){return this.worker.postMessage({cmd:"options"})}},{key:"knownLayoutCategories",value:function(){return this.worker.postMessage({cmd:"categories"})}},{key:"terminateWorker",value:function(){this.worker&&this.worker.terminate()}}])}();var p=function(){function m(h){var C=this;if(l(this,m),h===void 0)throw new Error("Missing mandatory parameter 'worker'.");this.resolvers={},this.worker=h,this.worker.onmessage=function(b){setTimeout(function(){C.receive(C,b)},0)}}return c(m,[{key:"postMessage",value:function(C){var b=this.id||0;this.id=b+1,C.id=b;var E=this;return new Promise(function(j,I){E.resolvers[b]=function(_,D){_?(E.convertGwtStyleError(_),I(_)):j(D)},E.worker.postMessage(C)})}},{key:"receive",value:function(C,b){var E=b.data,j=C.resolvers[E.id];j&&(delete C.resolvers[E.id],E.error?j(E.error):j(null,E.data))}},{key:"terminate",value:function(){this.worker&&this.worker.terminate()}},{key:"convertGwtStyleError",value:function(C){if(C){var b=C.__java$exception;b&&(b.cause&&b.cause.backingJsObject&&(C.cause=b.cause.backingJsObject,this.convertGwtStyleError(C.cause)),delete C.__java$exception)}}}])}()},{}],2:[function(n,r,s){var a=n("./elk-api.js").default;Object.defineProperty(r.exports,"__esModule",{value:!0}),r.exports=a,a.default=a},{"./elk-api.js":1}]},{},[2])(2)})}(jn)),jn.exports}var Pd=Od();const Ad=Pn(Pd),Rd="/assets/elk-worker.min-BdOC9sib.js",zd=300,Dd=50,Md=70,Fd=new Ad({workerUrl:Rd});async function Bd(e,t){if(!e||!t||e.length<1)return{nodes:[],edges:[]};const n=e.map(o=>({id:o.id,width:zd,height:o.type==="step"||o.type==="previewStep"?Md:Dd})).sort((o,c)=>o.id.localeCompare(c.id)),r=t.map(o=>({id:qd(o),sources:[o.source],targets:[o.target]})).sort((o,c)=>o.id.localeCompare(c.id)),s={id:"root",layoutOptions:{"elk.algorithm":"layered","elk.direction":"DOWN","elk.layered.alignSiblings":"true","elk.spacing.nodeNode":"25","elk.layered.spacing.nodeNodeBetweenLayers":"60","elk.layered.spacing.edgeNodeBetweenLayers":"40","elk.layered.spacing.edgeEdgeBetweenLayers":"20","elk.layered.nodePlacement.strategy":"BRANDES_KOEPF","elk.layered.crossingMinimization.strategy":"LAYER_SWEEP","elk.layered.edgeRouting":"POLYLINE","elk.layered.nodePlacement.bk.fixedAlignment":"BALANCED","elk.layered.mergeEdges":"true","elk.layered.considerModelOrder.strategy":"PREFER_INPUT","elk.edgeRouting":"ORTHOGONAL","elk.separateConnectedComponents":"false"},children:n,edges:r},a=await Fd.layout(s);return{nodes:e.map(o=>{var u;const c=(u=a.children)==null?void 0:u.find(d=>d.id===o.id);return{...o,position:{x:(c==null?void 0:c.x)??0,y:(c==null?void 0:c.y)??0}}}),edges:Hd(Vd(a.edges))}}function Hd(e){const t=new Map;for(const n of e){const r=n.id;t.has(r)||t.set(r,{...n,style:{strokeWidth:2}})}return Array.from(t.values())}function Vd(e){return e.map(t=>{const n={id:t.id,source:t.sources[0],target:t.targets[0],type:"smoothstep"};if(t.sections&&t.sections.length>0){const r=t.sections[0],s=[{x:r.startPoint.x,y:r.startPoint.y}];r.bendPoints&&r.bendPoints.forEach(a=>{s.push({x:a.x,y:a.y})}),s.push({x:r.endPoint.x,y:r.endPoint.y}),n.type="elk",n.data={points:s}}return n})}function qd(e){return`${e.source}-${e.target}`}function Ud(e,t){const n=$d(e,t),r=Zd(e,t),s=Wd(e,t);return[...n,...r,...s]}function $d(e,t){return e.filter(Ts).filter(r=>!ur(r)).map(r=>{const s=r.metadata;return{id:r.node_id,type:"step",data:{...s,step_id:r.id,step_name:r.name,runStatus:t}}})}function Zd(e,t){return e.filter(Kd).filter(r=>!ur(r)).map(r=>{const s=r.metadata;return{id:r.node_id,type:"artifact",data:{...s,artifact_id:r.id,artifact_name:r.name,runStatus:t}}})}function Wd(e,t){return e.filter(r=>ur(r)).map(r=>{const s=Ts(r);return{id:r.node_id,type:s?"previewStep":"previewArtifact",data:{node_name:r.name,runStatus:t}}})}function Ts(e){return e.type==="step"}function Kd(e){return e.type==="artifact"}function ur(e){return!e.id}function Qd({runId:e}){return["runs",e,"dag"]}async function Gd({runId:e}){const t=Ue($e.runs.dag(e)),n=await ut(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(n.status===404&&Nt(),!n.ok)throw new qe({message:`Error while fetching pipeline run ${e}`,status:n.status,statusText:n.statusText});return n.json()}function Jd(e,t){return Je({queryKey:Qd(e),queryFn:()=>Gd(e),...t})}function Yd(){const{runId:e}=we(),t=P.useRef(null),n=P.useMemo(()=>["runs",e],[e]),r=Yt(),s=Jd({runId:e},{refetchInterval:b=>{var E,j;return((E=b.state.data)==null?void 0:E.status)==="running"||((j=b.state.data)==null?void 0:j.status)==="initializing"?3e3:!1}});P.useEffect(()=>{if(s.data){const b=s.data.status;t.current!==null&&t.current!==b&&r.invalidateQueries({queryKey:n}),t.current=b}},[s.data,r,e,n]);const{fitView:a}=Ni(),{width:l,height:o}=qn(b=>({width:b.width,height:b.height})),[c,u,d]=Na([]),[p,m,h]=Sa([]),C=P.useCallback(()=>{if(!s.data)return;const b=Ud(s.data.nodes,s.data.status);Bd(b,s.data.edges).then(({nodes:E,edges:j})=>{u(E),m(j)})},[s.data,u,m]);return P.useEffect(()=>{a()},[l,o,a]),P.useLayoutEffect(()=>{C()},[C]),{dagQuery:s,nodes:c,edges:p,onNodesChange:d,onEdgesChange:h}}const Xd={elk:$1},eh={step:Id,artifact:V1,previewStep:W1,previewArtifact:Z1};function th(){const{dagQuery:e,nodes:t,edges:n,onNodesChange:r,onEdgesChange:s}=Yd();return e.isError?i.jsx(Me,{icon:i.jsx(mt,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:i.jsx("p",{className:"text-center",children:"There was an error loading the DAG visualization."})}):e.isPending?i.jsxs("div",{className:"flex h-full flex-col items-center justify-center",children:[i.jsx(zn,{}),i.jsx("div",{className:"mt-4 flex flex-col items-center",children:i.jsx("p",{className:"mb-5 text-display-xs",children:"Loading DAG Visualization"})})]}):i.jsx(Ea,{minZoom:-2,connectOnClick:!1,nodesDraggable:!1,nodesConnectable:!1,edgeTypes:Xd,nodeTypes:eh,nodes:t,edges:n,edgesFocusable:!1,multiSelectionKeyCode:null,onNodesChange:r,onEdgesChange:s,fitView:!0,children:i.jsx(U1,{refetch:()=>{e.refetch()}})})}function nh(e){return Ci({...e,mutationFn:async({runId:t})=>Oi({runId:t,queryParams:{refresh_status:!0}})})}function rh(e){const{toast:t}=An(),n=Yt();return nh({onSuccess:async()=>{await n.invalidateQueries({queryKey:["runs"]}),t({rounded:!0,status:"success",emphasis:"subtle",description:"The run has been refreshed successfully"}),e(!1)},onError:s=>{t({rounded:!0,status:"error",emphasis:"subtle",description:s.message}),e(!1)}})}function ih({runId:e}){const[t,n]=P.useState(!1),{isPending:r,mutate:s}=rh(n);return i.jsxs(kn,{open:t,onOpenChange:n,children:[i.jsx(fi,{asChild:!0,children:i.jsxs(fe,{intent:"primary",emphasis:"subtle",size:"md",className:"flex aspect-square items-center justify-center rounded-l-sharp border-l-0 p-0",children:[i.jsx(ht,{width:24,height:24,className:"size-5 shrink-0"}),i.jsx("span",{className:"sr-only",children:"Open run refresh menu"})]})}),i.jsx(mi,{align:"end",className:"max-w-[100px] lg:max-w-[320px]",children:i.jsx(xi,{className:"hover:cursor-pointer",icon:i.jsx(ya,{width:24,height:24,className:"size-5 shrink-0"}),onSelect:a=>{a.preventDefault(),s({runId:e})},disabled:r,children:i.jsxs("div",{className:"space-y-0.25",children:[i.jsx("p",{children:"Deep Refresh"}),i.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:"Queries the orchestrator directly. Takes longer but ensures most up-to-date data"})]})})})]})}function sh({runId:e}){const{refetch:t}=Pe({runId:e});return i.jsxs("div",{className:"flex",children:[i.jsxs(fe,{className:"rounded-r-sharp",intent:"primary",emphasis:"subtle",size:"md",onClick:()=>t(),children:[i.jsx(Si,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]}),i.jsx(ih,{runId:e})]})}function ah(e){const{setBreadcrumbs:t}=ta();P.useEffect(()=>{var n;e&&((n=e.body)!=null&&n.pipeline?t([na,{label:e.body.pipeline.name||"",href:tt.projects.pipelines.namespace(encodeURIComponent(e.body.pipeline.name))},{label:e.name||"",href:"#"}]):t([ra,{label:e.name||"",href:tt.projects.runs.detail(e.id)}]))},[t,e])}function lh({open:e,setOpen:t}){const{toast:n}=An(),r=Vn(),s=Yt(),{runId:a}=we(),{mutate:l}=Ma({onSuccess:async()=>{s.invalidateQueries({queryKey:["runs"]}),n({status:"success",emphasis:"subtle",icon:i.jsx(sa,{className:"h-5 w-5 shrink-0 fill-success-700"}),description:"Run deleted successfully",rounded:!0}),t(!1),r(tt.projects.pipelines.overview)},onError:c=>{n({status:"error",emphasis:"subtle",icon:i.jsx(mt,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:c.message,rounded:!0})}});async function o(){l({runId:a})}return i.jsx(ia,{open:e,onOpenChange:t,children:i.jsx(za,{title:"Delete Run",handleDelete:()=>o(),children:i.jsxs(Da,{children:[i.jsx("p",{children:"Are you sure?"}),i.jsx("p",{children:"This action cannot be undone."}),i.jsx("p",{children:"Deleting a run here does not guarantee that this run will get deleted in the underlying orchestrator."})]})})})}function oh(){const[e,t]=P.useState(!1),[n,r]=P.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsx(lh,{setOpen:t,open:e}),i.jsx(kn,{modal:n,open:n,onOpenChange:r,children:i.jsxs(kn,{children:[i.jsx(fi,{asChild:!0,children:i.jsxs(fe,{intent:"secondary",className:"flex aspect-square items-center justify-center p-0",emphasis:"minimal",size:"md",children:[i.jsx(aa,{className:"h-5 w-5 shrink-0 fill-theme-text-secondary"}),i.jsx("p",{className:"sr-only",children:"Run Actions"})]})}),i.jsx(mi,{className:"z-10",align:"end",sideOffset:1,children:i.jsxs(xi,{onClick:()=>t(!0),className:"space-x-2",children:[i.jsx(Ra,{className:"h-3 w-3 fill-neutral-400"}),i.jsx("p",{children:"Delete"})]})})]})})]})}function uh(){var r,s;const{runId:e}=we(),{data:t,isSuccess:n}=Pe({runId:e},{throwOnError:!0});return ah(t),i.jsxs(la,{className:"flex items-center justify-between",children:[i.jsx("div",{className:"flex items-center gap-1 truncate",children:n?i.jsxs(i.Fragment,{children:[i.jsx(Aa,{className:`h-5 w-5 shrink-0 ${Ca((r=t==null?void 0:t.body)==null?void 0:r.status)}`}),i.jsx("h1",{className:"min-w-0 truncate text-display-xs font-semibold",children:t==null?void 0:t.name}),i.jsx(ct,{className:"h-5 w-5 shrink-0",status:(s=t==null?void 0:t.body)==null?void 0:s.status})]}):i.jsxs(i.Fragment,{children:[i.jsx(Q,{className:"h-5 w-5"}),i.jsx(Q,{className:"h-6 w-[250px]"}),i.jsx(Q,{className:"h-5 w-5"})]})}),i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(sh,{runId:e}),i.jsx(oh,{})]})]})}const ch=e=>P.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 2C21.5523 2 22 2.44772 22 3V21C22 21.5523 21.5523 22 21 22C20.4477 22 20 21.5523 20 21V3C20 2.44772 20.4477 2 21 2ZM9.29289 4.29289C9.68342 3.90237 10.3166 3.90237 10.7071 4.29289L17.7071 11.2929C17.8946 11.4804 18 11.7348 18 12C18 12.2652 17.8946 12.5196 17.7071 12.7071L10.7071 19.7071C10.3166 20.0976 9.68342 20.0976 9.29289 19.7071C8.90237 19.3166 8.90237 18.6834 9.29289 18.2929L14.5858 13H3C2.44772 13 2 12.5523 2 12C2 11.4477 2.44772 11 3 11H14.5858L9.29289 5.70711C8.90237 5.31658 8.90237 4.68342 9.29289 4.29289Z"}));function dh({runId:e}){const[t,n]=P.useState(!0),r=da(e);return i.jsxs(St,{open:t,onOpenChange:n,children:[i.jsx(Et,{className:"flex items-center gap-[10px]",children:i.jsxs(_t,{className:"flex w-full items-center gap-[10px]",children:[i.jsx(ht,{className:` ${t?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),"Code"]})}),i.jsxs(Tt,{className:"border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:[i.jsx("p",{className:"mb-2 text-theme-text-secondary",children:"Get config programmatically"}),i.jsx(Ge,{fullWidth:!0,highlightCode:!0,wrap:!0,code:r})]})]})}const si="python_packages";function hh({run:e}){var o,c;const[t,n]=P.useState(!0),r=(o=e.metadata)==null?void 0:o.orchestrator_environment,s=(c=e.metadata)==null?void 0:c.client_environment,a=ai(r??{}),l=ai(s??{});return i.jsxs(St,{open:t,onOpenChange:n,children:[i.jsx(Et,{intent:"primary",className:"flex items-center gap-[10px]",children:i.jsxs(_t,{className:"flex w-full items-center gap-[10px]",children:[i.jsx(ht,{className:` ${t?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),"Environment"]})}),i.jsxs(Tt,{className:"space-y-3 border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:[i.jsx(He,{isInitialOpen:!0,intent:"secondary",title:i.jsx(_e,{children:i.jsxs(Te,{children:[i.jsx(Le,{asChild:!0,children:i.jsx("span",{children:"Client Environment"})}),i.jsxs(Ie,{className:"max-w-[200px] whitespace-normal xl:max-w-[300px]",children:["Environment where you start your pipeline run by calling the pipeline function."," ",i.jsx("a",{rel:"noopener noreferrer",className:"link",href:"https://docs.zenml.io/user-guides/best-practices/configure-python-environments#client-environment-or-the-runner-environment",target:"_blank",children:"Learn more about client environments"})]})]})}),data:l}),i.jsx(He,{isInitialOpen:!0,intent:"secondary",title:i.jsx(_e,{children:i.jsxs(Te,{children:[i.jsx(Le,{asChild:!0,children:i.jsx("span",{children:"Execution Environment"})}),i.jsxs(Ie,{className:"max-w-[200px] whitespace-normal xl:max-w-[300px]",children:["Environment where your ZenML steps get executed."," ",i.jsx("a",{rel:"noopener noreferrer",className:"link",href:"https://docs.zenml.io/user-guides/best-practices/configure-python-environments#execution-environments",target:"_blank",children:"Learn more about exectuion environments"})]})]})}),data:a})]})]})}function ai(e){const t=e[si];return typeof t=="string"?{...e,[si]:t.split(`
31
+ `).map(n=>n.trim())}:e}async function ph({deploymentId:e},t){const n=Ue($e.pipeline_deployments.detail(e)),r=await fetch(n,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json",...t}});if(!r.ok){const s=await r.json().then(a=>Array.isArray(a.detail)?a.detail[1]:a.detail).catch(()=>`Error while fetching pipeline deployment ${e}`);throw new qe({status:r.status,statusText:r.statusText,message:s})}return r.json()}const Ls={all:["pipeline_deployments"],detail:e=>ma({queryKey:[...Ls.all,e],queryFn:async()=>ph({deploymentId:e})})};function fh({deploymentId:e}){var l,o;const[t,n]=P.useState(!0),{isLoading:r,isError:s,data:a}=Je({...Ls.detail(e),enabled:!!e});return e?r?i.jsx(Q,{className:"h-[150px] w-full"}):s?null:i.jsx(He,{isInitialOpen:!0,title:"Pipeline Parameters",data:(o=(l=a==null?void 0:a.metadata)==null?void 0:l.pipeline_spec)==null?void 0:o.parameters}):i.jsxs(St,{open:t,onOpenChange:n,children:[i.jsxs(Et,{intent:"primary",className:"flex items-center gap-[10px]",children:[i.jsx(_t,{children:i.jsx(ht,{className:` ${t?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`})}),"Pipeline Parameters"]}),i.jsx(Tt,{className:"border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:i.jsx(ba,{})})]})}function mh(){var a,l,o,c,u,d,p,m,h,C,b,E,j;const{runId:e}=we(),{data:t,isError:n,isPending:r}=Pe({runId:e,queryParams:{include_python_packages:!0}},{throwOnError:!0}),{data:s}=js({buildId:(l=(a=t==null?void 0:t.body)==null?void 0:a.build)==null?void 0:l.id},{enabled:!!((c=(o=t==null?void 0:t.body)==null?void 0:o.build)!=null&&c.id)});return n?null:r?i.jsxs("div",{className:"space-y-5",children:[i.jsx(Q,{className:"h-[56px] w-full"}),i.jsx(Q,{className:"h-[56px] w-full"}),i.jsx(Q,{className:"h-[56px] w-full"}),i.jsx(Q,{className:"h-[56px] w-full"})]}):i.jsxs("div",{className:"grid grid-cols-1 gap-5",children:[i.jsx(fh,{deploymentId:((u=t.body)==null?void 0:u.deployment_id)??void 0}),((p=(d=s==null?void 0:s.metadata)==null?void 0:d.images)==null?void 0:p.orchestrator)&&i.jsx(ws,{data:(h=(m=s==null?void 0:s.metadata)==null?void 0:m.images)==null?void 0:h.orchestrator}),i.jsx(dh,{runId:e}),i.jsx(hh,{run:t}),i.jsx(He,{isInitialOpen:!0,title:"Resources",data:((b=(C=t.metadata)==null?void 0:C.config.settings)==null?void 0:b.resources)||{}}),i.jsx(He,{isInitialOpen:!0,title:"Substitutions",data:(E=t.metadata)==null?void 0:E.config.substitutions}),i.jsx(He,{isInitialOpen:!0,title:"Extra",data:(j=t.metadata)==null?void 0:j.config.extra})]})}function xh(){var r,s,a;const{runId:e}=we(),{data:t,isError:n}=Pe({runId:e},{throwOnError:!0});return n?i.jsx("p",{children:"Failed to fetch pipeline run"}):t&&Object.entries(((r=t.metadata)==null?void 0:r.run_metadata)||{}).length<1?i.jsx(Me,{icon:i.jsx(Mt,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:i.jsxs("div",{className:"text-center",children:[i.jsx("p",{className:"mb-2 text-display-xs font-semibold",children:"No metadata found"}),i.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There are no metadata available."})]})}):i.jsxs("section",{className:"flex flex-col gap-5",children:[t?i.jsx(Zn,{metadata:(s=t.metadata)==null?void 0:s.run_metadata}):i.jsx(Q,{className:"h-[200px] w-full"}),t?i.jsx($n,{metadata:(a=t.metadata)==null?void 0:a.run_metadata}):i.jsx(Q,{className:"h-[200px] w-full"})]})}function gh(){return i.jsx(en,{className:"truncate",intent:"error",children:i.jsxs("div",{className:"flex items-center justify-between space-x-2",children:[i.jsx("p",{className:"truncate",children:"Pipeline run failed. Check orchestrator logs for error details and troubleshooting steps."}),i.jsx(fe,{intent:"danger",asChild:!0,children:i.jsx("a",{href:"#orchestrator-collapsible",children:"Review"})})]})})}function yh(){return i.jsx(en,{className:"truncate",children:i.jsxs("div",{className:"flex items-center justify-between space-x-2",children:[i.jsx("p",{children:"Pipeline run initializing. Check orchestrator URL and logs for real-time status updates."}),i.jsx(fe,{asChild:!0,children:i.jsx("a",{href:"#orchestrator-collapsible",children:"Review"})})]})})}function Ch(){var o,c,u;const{runId:e}=we(),{data:t,isError:n,isPending:r}=Pe({runId:e}),s=(o=t==null?void 0:t.metadata)==null?void 0:o.run_metadata,a=s==null?void 0:s.orchestrator_url,l=s==null?void 0:s.orchestrator_logs_url;return n?null:r?i.jsx(Q,{className:"h-[100px]"}):((c=t.body)==null?void 0:c.status)==="initializing"&&(l||a)?i.jsx(yh,{}):((u=t.body)==null?void 0:u.status)==="failed"&&l?i.jsx(gh,{}):null}function bh(){var c,u,d,p,m,h,C,b,E,j,I,_,D,z,k,R,g,y,w,N,S,T,A,M,ee;const{runId:e}=we(),[t,n]=P.useState(!0),[r]=ki(),s=Vn(),{data:a,isError:l,isPending:o}=Pe({runId:e},{throwOnError:!0});return P.useEffect(()=>{if(!r.get("tab")){const J=new URL(window.location.href);J.searchParams.set("tab","overview");const F=`${J.pathname}${J.search}`;s(F,{replace:!0})}},[r,s]),l?null:o?i.jsx(Q,{className:"h-[200px] w-full"}):i.jsxs(St,{open:t,onOpenChange:n,children:[i.jsx(Et,{className:"flex items-center gap-[10px]",children:i.jsxs(_t,{className:"flex w-full items-center gap-[10px]",children:[i.jsx(ht,{className:` ${t?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),i.jsx("span",{children:"Details"})]})}),i.jsx(Tt,{className:"border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:i.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[i.jsx(Ke,{children:"Id"}),i.jsx(Qe,{children:i.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[a.id,i.jsx(Ve,{copyText:a.id})]})}),i.jsx(Ke,{children:"Status"}),i.jsx(Qe,{children:i.jsxs(Oe,{className:"inline-flex items-center gap-0.5",emphasis:"subtle",color:Xt((c=a.body)==null?void 0:c.status),children:[i.jsx(ct,{className:"fill-current",status:(u=a.body)==null?void 0:u.status}),(d=a.body)==null?void 0:d.status]})}),i.jsx(Ke,{children:"Pipeline"}),i.jsx(Qe,{children:(p=a.body)!=null&&p.pipeline?i.jsx(gt,{to:tt.projects.pipelines.namespace(encodeURIComponent((h=(m=a.body)==null?void 0:m.pipeline)==null?void 0:h.name)),children:i.jsxs(Oe,{color:"purple",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[i.jsx(Hn,{className:"h-4 w-4 fill-theme-text-brand"}),(b=(C=a.body)==null?void 0:C.pipeline)==null?void 0:b.name]})}):"Not available"}),i.jsx(Ke,{children:i.jsxs("div",{className:"flex items-center space-x-0.5 truncate",children:[i.jsx("span",{className:"truncate",children:"Repository/Commit"}),i.jsx(_e,{children:i.jsxs(Te,{children:[i.jsxs(Le,{className:"cursor-default",children:[i.jsx(xt,{className:"h-3 w-3 fill-theme-text-secondary"}),i.jsx("span",{className:"sr-only",children:"Info"})]}),i.jsx(Ie,{className:"w-full max-w-md whitespace-normal",children:"Git hash of code repository. Only set if pipeline was run in a clean git repository connected to your ZenML server."})]})})]})}),i.jsx(Qe,{className:"h-auto",children:(E=a.body)!=null&&E.code_reference?i.jsx(ks,{repositoryId:(I=(j=a.body)==null?void 0:j.code_reference.body)==null?void 0:I.code_repository.id,commit:(_=a.body.code_reference.body)==null?void 0:_.commit}):"Not available"}),i.jsx(Ke,{className:(D=a.metadata)!=null&&D.code_path?"col-span-3":"",children:i.jsxs("div",{className:"flex items-center space-x-0.5 truncate",children:[i.jsx("span",{children:"Code Path"}),i.jsx(_e,{children:i.jsxs(Te,{children:[i.jsxs(Le,{className:"cursor-default",children:[i.jsx(xt,{className:"h-3 w-3 fill-theme-text-secondary"}),i.jsx("span",{className:"sr-only",children:"Info"})]}),i.jsx(Ie,{className:"w-full max-w-md whitespace-normal",children:"Path to where code was uploaded in the artifact store. Only set on a pipeline with a non-local orchestrator and if Repository/Commit is not set"})]})})]})}),i.jsx(Qe,{className:(z=a.metadata)!=null&&z.code_path?"col-span-3 h-auto":"",children:(k=a.metadata)!=null&&k.code_path?i.jsx(Ge,{code:a.metadata.code_path}):"Not available"}),i.jsx(Ke,{children:"Author"}),i.jsx(Qe,{children:i.jsx("div",{className:"inline-flex items-center gap-1",children:i.jsx(Rn,{username:((g=(R=a.resources)==null?void 0:R.user)==null?void 0:g.name)||""})})}),i.jsx(Ke,{children:"Start Time"}),i.jsx(Qe,{children:(y=a.metadata)!=null&&y.start_time?i.jsx(zt,{dateString:(w=a.metadata)==null?void 0:w.start_time}):"Not available"}),i.jsx(Ke,{children:"End Time"}),i.jsx(Qe,{children:(N=a.metadata)!=null&&N.end_time?i.jsx(zt,{dateString:(S=a.metadata)==null?void 0:S.end_time}):"Not available"}),i.jsx(Ke,{children:"Duration"}),i.jsx(Qe,{children:(T=a.metadata)!=null&&T.start_time&&((A=a.metadata)!=null&&A.end_time)?Ei((M=a.metadata)==null?void 0:M.start_time,(ee=a.metadata)==null?void 0:ee.end_time):"Not available"})]})})]})}function wh(){var d,p;const{runId:e}=we(),[t,n]=P.useState(!0),{data:r,isError:s,isPending:a}=Pe({runId:e}),l=(d=r==null?void 0:r.metadata)==null?void 0:d.run_metadata,o=l==null?void 0:l.orchestrator_url,c=(p=r==null?void 0:r.metadata)==null?void 0:p.orchestrator_run_id,u=l==null?void 0:l.orchestrator_logs_url;return s?null:a?i.jsx(Q,{className:"h-[200px]"}):i.jsxs(St,{open:t,onOpenChange:n,children:[i.jsx(Et,{className:"flex items-center gap-[10px]",children:i.jsxs(_t,{className:"flex w-full",children:[i.jsx(ht,{className:` ${t?"":"-rotate-90"} mr-2 h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),i.jsx("p",{id:"orchestrator-collapsible",children:"Orchestrator"})]})}),i.jsx(Tt,{className:"space-y-3 border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:i.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[i.jsx(le,{label:"Orchestrator URL",value:o&&ot(o)?i.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[i.jsx("a",{className:"truncate text-theme-text-brand underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:o,children:o}),i.jsx(Ve,{copyText:o})]}):"Not available"}),i.jsx(le,{label:"Orchestrator Logs",value:u&&ot(u)?i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(vs,{}),i.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[i.jsx("a",{className:"truncate text-theme-text-brand underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:u,children:u}),i.jsx(Ve,{copyText:u})]})]}):"Not available"}),i.jsx(le,{label:"Orchestrator Run ID",value:c?i.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[c,i.jsx(Ve,{copyText:c})]}):"Not available"})]})})]})}function jh(){return i.jsxs("div",{className:"grid grid-cols-1 gap-5",children:[i.jsx(Ch,{}),i.jsx(bh,{}),i.jsx(wh,{})]})}const kh=dr.object({tab:dr.enum(["overview","configuration","metadata","stack","logs"]).optional().default("overview").catch("overview")});function vh(){const[e]=ki(),{tab:t}=kh.parse({tab:e.get("tab")||void 0});return t}function Nh(){var r,s,a;const{runId:e}=we(),t=Pe({runId:e},{throwOnError:!0});if(t.isPending)return i.jsx(Q,{className:"h-[250px] w-full"});if(t.isError)return i.jsx("p",{children:"Something went wrong fetching the run"});const n=(a=(s=(r=t.data)==null?void 0:r.body)==null?void 0:s.stack)==null?void 0:a.id;return n?i.jsx(Sh,{run:t.data,stackId:n}):i.jsx(Me,{icon:i.jsx(mt,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:i.jsxs("div",{className:"text-center",children:[i.jsx("p",{className:"text-display-xs font-semibold",children:"No Stack"}),i.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There is no stack associated with this run."})]})})}function Sh({stackId:e,run:t}){var l;const{data:n,isError:r,isPending:s}=_i({stackId:e});if(s)return i.jsx(Q,{className:"h-[250px] w-full"});if(r)return i.jsx("p",{children:"Failed to fetch Stack"});const a=((l=t.metadata)==null?void 0:l.config.settings)||{};return i.jsx(_s,{stack:n,objectConfig:a})}function Eh({runId:e}){return["runs",e,"logs"]}async function _h({runId:e}){const t=Ue($e.runs.logs(e)),n=await ut(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(n.status===404&&Nt(),!n.ok)throw new qe({message:`Error while fetching logs for run ${e}`,status:n.status,statusText:n.statusText});return n.json()}function Th(e,t){return Je({queryKey:Eh(e),queryFn:()=>_h(e),...t})}function Lh(){const{runId:e}=we(),t=Th({runId:e}),n=P.useMemo(()=>t.data?Es(t.data):[],[t.data]);return t.isPending?i.jsx(Ss,{}):t.isError?i.jsx(rt,{err:t.error}):t.data?i.jsx("div",{className:"h-full w-full",children:i.jsx(Ns,{logs:n})}):i.jsx(ln,{title:"This pipeline run has no logs",subtitle:"It looks like there are no logs associated with this pipeline run"})}function Ih({error:e}){if(!(e instanceof Error))throw e;return i.jsx(ln,{title:"Error displaying logs",subtitle:e.message})}function Oh({setIsPanelOpen:e}){return i.jsxs("div",{className:"flex items-center gap-4 border-b border-theme-border-moderate bg-theme-surface-primary px-5 py-4",children:[i.jsx(fe,{className:"flex h-6 w-6 items-center justify-center bg-transparent p-0.5",intent:"secondary",onClick:()=>e(!1),children:i.jsx(ch,{className:"h-5 w-5 fill-theme-text-secondary"})}),i.jsx("span",{className:"text-text-xl",children:"Run Insights"})]})}function Ph(){const e=vh(),t=Vn();function n(r){const s=new URLSearchParams;s.set("tab",r),t(`?${s.toString()}`)}return i.jsx("div",{className:"flex flex-col gap-5 p-5",children:i.jsxs(Dn,{value:e,onValueChange:n,children:[i.jsxs(Mn,{children:[i.jsxs(Ne,{className:"flex items-center gap-2 truncate text-text-md",value:"overview",children:[i.jsx(xt,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),i.jsx("span",{children:"Overview"})]}),i.jsxs(Ne,{className:"flex items-center gap-2 truncate text-text-md",value:"stack",children:[i.jsx(Bn,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),i.jsx("span",{children:"Stack"})]}),i.jsxs(Ne,{className:"flex items-center gap-2 truncate text-text-md",value:"logs",children:[i.jsx(tn,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),i.jsx("span",{children:"Logs"})]}),i.jsxs(Ne,{className:"flex items-center gap-2 truncate text-text-md",value:"configuration",children:[i.jsx(bs,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),i.jsx("span",{children:"Configuration"})]}),i.jsxs(Ne,{className:"flex items-center gap-2 text-text-md",value:"metadata",children:[i.jsx(Un,{className:"h-5 w-5 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),i.jsx("span",{children:"Metadata"})]})]}),i.jsx(Se,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"overview",children:i.jsx(jh,{})}),i.jsx(Se,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"stack",children:i.jsx(Nh,{})}),i.jsx(Se,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"logs",children:i.jsx(bi,{fallbackRender:Ih,children:i.jsx(Lh,{})})}),i.jsx(Se,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"configuration",children:i.jsx(mh,{})}),i.jsx(Se,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"metadata",children:i.jsx(xh,{})})]})})}function Ep(){var s;const e=oa(),t=ua(((s=e.data)==null?void 0:s.deployment_type)||"other"),[n,r]=P.useState(!0);return i.jsxs("div",{children:[i.jsx(uh,{}),i.jsxs("div",{className:`flex ${t?"h-[calc(100vh_-_4rem_-_4rem_-_4rem_-_2px)]":"h-[calc(100vh_-_4rem_-_4rem_-_2px)]"} w-full`,children:[i.jsxs("div",{className:`relative bg-white/40 transition-all duration-500 ${n?"w-1/2":"w-full"}`,children:[i.jsx(th,{}),i.jsx(Ah,{isPanelOpen:n,setIsPanelOpen:r})]}),i.jsx("div",{"aria-hidden":!n,className:`h-full min-w-0 overflow-x-hidden text-ellipsis whitespace-nowrap bg-theme-surface-secondary transition-all duration-500 ${n?"w-1/2 border-l border-theme-border-moderate":"w-0 border-transparent"}`,children:i.jsxs(ca,{viewportClassName:"[&>*]:!block",children:[i.jsx(Oh,{setIsPanelOpen:r}),i.jsx(Ph,{})]})})]})]})}function Ah({isPanelOpen:e,setIsPanelOpen:t}){return i.jsx(fe,{intent:"secondary",className:`absolute right-4 top-4 h-7 w-7 items-center justify-center border border-neutral-300 bg-transparent p-0.5 ${e?"hidden":"flex"}`,onClick:()=>t(!0),children:i.jsx(Fa,{className:"h-5 w-5 fill-theme-text-primary"})})}export{Ep as default};