ryugi-artifacts 1.108.0 → 1.108.2

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 (105) hide show
  1. package/dist/cli.cjs +159 -159
  2. package/dist/document-engine.cjs +1 -1
  3. package/dist/server.cjs +13 -13
  4. package/dist/viewer/{AgentDock---hZRdMk.js → AgentDock-aN5OSJ-J.js} +1 -1
  5. package/dist/viewer/{ArtboardLayout-aA3schgm.js → ArtboardLayout-C0AyDlVu.js} +12 -12
  6. package/dist/viewer/{ArtifactList-DGwth5Uo.js → ArtifactList-D1k1uD-4.js} +2 -2
  7. package/dist/viewer/{ArtifactModal-BoshLJw7.js → ArtifactModal-CwdBghvc.js} +1 -1
  8. package/dist/viewer/{BottomSheet-De0wDQnP.js → BottomSheet-BOQ2E7Z6.js} +1 -1
  9. package/dist/viewer/{Canvas-CI2wd8RY.js → Canvas-C_S0HAGE.js} +1 -1
  10. package/dist/viewer/{CommentPopover-BopMRDEk.js → CommentPopover-CTad_ci3.js} +1 -1
  11. package/dist/viewer/{DocumentExportMenu-BAtsd4zW.js → DocumentExportMenu-BMtNLMCd.js} +1 -1
  12. package/dist/viewer/DocumentLayout-VFaDqBeR.js +2 -0
  13. package/dist/viewer/{DocumentPage-CgI1Ybrt.js → DocumentPage-CIYTHtMj.js} +1 -1
  14. package/dist/viewer/{DraggablePanel-CpccFkyu.js → DraggablePanel-C-j_BdLX.js} +1 -1
  15. package/dist/viewer/{DropdownMenu-Bx-bya6r.js → DropdownMenu-CIz6C4Vl.js} +1 -1
  16. package/dist/viewer/{GroupVerdict--XHPt5t2.js → GroupVerdict-Bo6-N2fF.js} +1 -1
  17. package/dist/viewer/{HtmlLayout-BT1Grbqi.js → HtmlLayout-B29gXfBU.js} +1 -1
  18. package/dist/viewer/{Input-Cm37HmyQ.js → Input-fQLk-PNT.js} +1 -1
  19. package/dist/viewer/{MenuSubmenuTrigger-DhC8wnON.js → MenuSubmenuTrigger-4JoqfaRi.js} +1 -1
  20. package/dist/viewer/{PhoneArtboardBar-Met1alXG.js → PhoneArtboardBar-CTMvi2kP.js} +1 -1
  21. package/dist/viewer/{Popover-BDqi62Lz.js → Popover-uYLZtM5h.js} +1 -1
  22. package/dist/viewer/{PreviewArtifactLayout-Cbu5Tl4o.js → PreviewArtifactLayout-D8RO9K8h.js} +1 -1
  23. package/dist/viewer/{PreviewLayout-Dam8DKBw.js → PreviewLayout-Dw-jMatP.js} +2 -2
  24. package/dist/viewer/ReportLayout-D7ZkedGf.js +5 -0
  25. package/dist/viewer/{RyugiMark-C2Kv7bq7.js → RyugiMark-BEV-beO7.js} +1 -1
  26. package/dist/viewer/{Segmented-BzBNnF8h.js → Segmented-icH7CFHs.js} +1 -1
  27. package/dist/viewer/{SelectScrollUpArrow-BvZjk1l3.js → SelectScrollUpArrow-DsiQm9o6.js} +1 -1
  28. package/dist/viewer/{SlidesLayout-T6pVArYg.js → SlidesLayout-XsjPfYDW.js} +3 -3
  29. package/dist/viewer/{SnapshotDocument-dfVksXw6.js → SnapshotDocument-CgB9HR7O.js} +1 -1
  30. package/dist/viewer/{SplitFrame-Cuz0Fd60.js → SplitFrame-DUnzPWJZ.js} +1 -1
  31. package/dist/viewer/{StoryboardLayout-DiV_Z5pK.js → StoryboardLayout-F5kZZPXd.js} +1 -1
  32. package/dist/viewer/{StoryboardRender-BJWBZ1MT.js → StoryboardRender-m7Gb9PIh.js} +1 -1
  33. package/dist/viewer/{ThreadView-Bk1VGlvk.js → ThreadView-B7amgGB8.js} +1 -1
  34. package/dist/viewer/{Tooltip-cTz_1zF8.js → Tooltip-B7lRhfz2.js} +1 -1
  35. package/dist/viewer/{VerifyLayout-DhHeBlGD.js → VerifyLayout-DKPuSiGF.js} +1 -1
  36. package/dist/viewer/{VirtualizedEditor-uWe43zaI-WjQs3HGC.js → VirtualizedEditor-uWe43zaI-C0hkH_Vs.js} +1 -1
  37. package/dist/viewer/{VirtualizedRenderer-C_d95FXi-BMnqHwCM.js → VirtualizedRenderer-C_d95FXi-gefGj2Da.js} +1 -1
  38. package/dist/viewer/{WarningsBadge-CQKODxdo.js → WarningsBadge-B7sbLji4.js} +1 -1
  39. package/dist/viewer/{WhiteboardEditor-cZ32fLqJ-tuDJ14dh.js → WhiteboardEditor-cZ32fLqJ-BK6P1wgf.js} +1 -1
  40. package/dist/viewer/{WhiteboardLayout-SRtQwnI2.js → WhiteboardLayout-BhENYvui.js} +1 -1
  41. package/dist/viewer/{WritingCursor-DWvn5-Fo.js → WritingCursor-XIWPcNuO.js} +1 -1
  42. package/dist/viewer/{agentLook-Bm5_0Zap.js → agentLook-eVhGFE_V.js} +1 -1
  43. package/dist/viewer/{artifact-list-DMKifPNo.js → artifact-list-7mtsXERr.js} +1 -1
  44. package/dist/viewer/{auto-publish-DCFcz2OJ.js → auto-publish-DNFjfgdJ.js} +1 -1
  45. package/dist/viewer/{channel-CVARMxQO.js → channel-bUfc1jGv.js} +3 -3
  46. package/dist/viewer/code-xml-c9QCqmhY.js +1 -0
  47. package/dist/viewer/{crop-encode-BXX3T9IW.js → crop-encode-Dfe-R9aR.js} +1 -1
  48. package/dist/viewer/{dist-zN4xV1Ll.js → dist-B0Sc2yJQ.js} +1 -1
  49. package/dist/viewer/{dist-BNmtZYK5.js → dist-B2M7jGJZ.js} +1 -1
  50. package/dist/viewer/{dist-D-XGYlaQ.js → dist-B2XV5VPA.js} +1 -1
  51. package/dist/viewer/{dist-C6gUa2QU.js → dist-B89BzNuP.js} +1 -1
  52. package/dist/viewer/{dist-CdldntRN.js → dist-BJJscYLO.js} +1 -1
  53. package/dist/viewer/{dist-Cpr6Sb7Z.js → dist-BKz23I-8.js} +1 -1
  54. package/dist/viewer/{dist-CLXrvvgx.js → dist-BNvefBkB.js} +1 -1
  55. package/dist/viewer/{dist-BJroqkUZ.js → dist-BVqUX7rA.js} +1 -1
  56. package/dist/viewer/{dist-CtKjkMwc.js → dist-BWq0Pr1u.js} +1 -1
  57. package/dist/viewer/{dist-Djkh2eBk.js → dist-BYSSiKNz.js} +1 -1
  58. package/dist/viewer/{dist-DOnpps63.js → dist-BqdzTy1C.js} +1 -1
  59. package/dist/viewer/{dist-B9V2FAkC.js → dist-BvImtfDV.js} +1 -1
  60. package/dist/viewer/{dist-D40weUHE.js → dist-C2Jl700e.js} +1 -1
  61. package/dist/viewer/{dist-Dqfo0cw3.js → dist-CVhsAd6y.js} +1 -1
  62. package/dist/viewer/{dist-DmZmhQm2.js → dist-CgppnzAt.js} +1 -1
  63. package/dist/viewer/{dist-jZTRyto4.js → dist-CtXl0XeV.js} +1 -1
  64. package/dist/viewer/{dist-Die3Xx5u.js → dist-D0TN3YBW.js} +1 -1
  65. package/dist/viewer/dist-D4kW54Jp.js +1 -0
  66. package/dist/viewer/{dist-CEHzg3yB.js → dist-DBvfIpp4.js} +1 -1
  67. package/dist/viewer/{dist-D-7wA2MO.js → dist-DKqD7UWs.js} +1 -1
  68. package/dist/viewer/{dist-xG9z0UsN.js → dist-DT4JxPbl.js} +1 -1
  69. package/dist/viewer/{dist-DUtBlcgm.js → dist-Didrao11.js} +1 -1
  70. package/dist/viewer/{dist-DxikGSNx.js → dist-jnQufM_D.js} +1 -1
  71. package/dist/viewer/{dist-CoIOKz9E.js → dist-v2KllcT6.js} +1 -1
  72. package/dist/viewer/{editor-Ch2V6IBq.js → editor-OGz_Tz-t.js} +256 -256
  73. package/dist/viewer/icons-CKXqWGqz.js +1 -0
  74. package/dist/viewer/{imperative-IdZ6nWPs.js → imperative-Bl7KanbO.js} +1 -1
  75. package/dist/viewer/index.html +12 -12
  76. package/dist/viewer/index.js +2 -2
  77. package/dist/viewer/index5.css +60 -0
  78. package/dist/viewer/{local-BRAi41mw.js → local-QOxEcmpr.js} +1 -1
  79. package/dist/viewer/{local-split-host-B9-b1nF-.js → local-split-host-aaVovEJX.js} +1 -1
  80. package/dist/viewer/plugin-_bGVeqI0-CV5Uc3JT.js +2 -0
  81. package/dist/viewer/preview.html +3 -3
  82. package/dist/viewer/preview.js +1 -1
  83. package/dist/viewer/{printDocument-7ROMuLDi.js → printDocument-Cs6x3IRK.js} +1 -1
  84. package/dist/viewer/{ref-18fHdbqG.js → ref-Cg8zYSdM.js} +1 -1
  85. package/dist/viewer/{route-Cto1M-9M.js → route-Xg8P5ghY.js} +2 -2
  86. package/dist/viewer/{route-messages-CVepLEKq.js → route-messages-BmAJn0Qh.js} +1 -1
  87. package/dist/viewer/{settings-DYL-Smbx.js → settings-5y0Q6PnT.js} +1 -1
  88. package/dist/viewer/{snap-BZbvh5gx.js → snap-DZtFeas3.js} +1 -1
  89. package/dist/viewer/{split-x3wbj4VY.js → split-DFCHm5IV.js} +2 -2
  90. package/dist/viewer/{stable-DNuXvw1O.js → stable-CVHOj_kY.js} +1 -1
  91. package/dist/viewer/{file-code-CIc73fLV.js → table-2-D90vZ04E.js} +1 -1
  92. package/dist/viewer/{transport-BtSXpIYp.js → transport-Fu5iCiYX.js} +1 -1
  93. package/dist/viewer/{url-B7tM0rBE.js → url-BoN37oN0.js} +1 -1
  94. package/dist/viewer/{useArtifactFeed-AM_L_IQ_.js → useArtifactFeed-CuvRk10D.js} +1 -1
  95. package/dist/viewer/{useArtifactSocket-CQZyCoRM.js → useArtifactSocket-tWHs_pnv.js} +1 -1
  96. package/dist/viewer/{useLayerZIndex-BLBrH3-s.js → useLayerZIndex-lrIeP3uV.js} +1 -1
  97. package/dist/viewer/{useStoryboardData-CqAZAp1S.js → useStoryboardData-BKxFqsGP.js} +1 -1
  98. package/dist/viewer/{view-lIJZzThl.js → view-DdfN3DGp.js} +1 -1
  99. package/dist/viewer/{viewport-CFJHn_Y6-CAYJm7Gz.js → viewport-CFJHn_Y6-D2-cw3Yw.js} +1 -1
  100. package/package.json +1 -1
  101. package/dist/viewer/DocumentLayout-RL2r3iAU.js +0 -2
  102. package/dist/viewer/ReportLayout-BHrbaaAL.js +0 -6
  103. package/dist/viewer/dist-By-fjsc_.js +0 -1
  104. package/dist/viewer/icons-CpcexkdF.js +0 -1
  105. package/dist/viewer/plugin-_bGVeqI0-DdcZpvs8.js +0 -2
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./AgentDock---hZRdMk.js","./rolldown-runtime-XKyaHtl9.js","./route-Cto1M-9M.js","./bem-vbke-3KC.js","./react-DlmbjZJV.js","./jsx-runtime-LKYXHABd.js","./types-DAs-xbqr.js","./index2.css","./BottomSheet-De0wDQnP.js","./motion-Cy65kd7X.js","./useMedia-CFebB4XU.js","./agentLook-Bm5_0Zap.js","./icons-CpcexkdF.js","./MotionConfigContext-HC2vqcJO.js","./arrow-up-right-0KreI6kY.js","./chevron-left-C5itNrp5.js","./url-B7tM0rBE.js","./useLayerZIndex-BLBrH3-s.js","./chevron-right-xNdXLJg6.js","./ArtboardLayout-aA3schgm.js","./imperative-IdZ6nWPs.js","./Popover-BDqi62Lz.js","./view-lIJZzThl.js","./rounds-BLj-tfMG.js","./sliders-horizontal-CuS3-UwA.js","./Canvas-CI2wd8RY.js","./cssVar.stylex-CGbpAC1Y.js","./WritingCursor-DWvn5-Fo.js","./maximize-2-Bc0lXBg6.js","./PlaybackIcon-D-vfZnSv.js","./elements-CmGVWYag.js","./snap-BZbvh5gx.js","./local-BRAi41mw.js","./SelectScrollUpArrow-BvZjk1l3.js","./stringifyLocale-pkrPwFqm.js","./stable-DNuXvw1O.js","./Tooltip-cTz_1zF8.js","./Input-Cm37HmyQ.js","./PhoneArtboardBar-Met1alXG.js","./DropdownMenu-Bx-bya6r.js","./MenuSubmenuTrigger-DhC8wnON.js","./index5.css","./crop-encode-BXX3T9IW.js","./trash-DByBaz9Z.js","./ThreadView-Bk1VGlvk.js","./folder-BViSPo7g.js","./ruler-CYb0HZGT.js","./mouse-pointer-2-B-OF_fcG.js","./play-6FAfeM1L.js","./Segmented-BzBNnF8h.js","./useTypeFavicon-yXOsFZBx.js","./type-icons-CxYXZlMj.js","./CommentPopover-BopMRDEk.js","./GroupVerdict--XHPt5t2.js","./artifact-list-DMKifPNo.js","./film-A6SU1RGC.js","./store-D3ROW536.js","./selection-BWCQd_Fn.js","./useArtifactFeed-AM_L_IQ_.js","./transport-BtSXpIYp.js","./useArtifactSocket-CQZyCoRM.js","./ArtboardLayout-DLyi-yDq.css","./DocumentLayout-RL2r3iAU.js","./HtmlLayout-BT1Grbqi.js","./WarningsBadge-CQKODxdo.js","./useSandboxFrame-CJmSnwgG.js","./WhiteboardLayout-SRtQwnI2.js","./shims-s-YVfIlz.js","./WhiteboardEditor-cZ32fLqJ-tuDJ14dh.js","./code-DnmQyGiF.js","./text-align-start-CRhecbJR.js","./zoom-out-N_0LUBru.js","./plus-DZJ2BVkK.js","./index3.css","./pages-DWkRbog-.js","./preference-oNdcNeml.js","./message-square-Yl8PoPy_.js","./backlinks-C_k8-LL2.js","./WhiteboardLayout-BXSq3hNU.css","./VerifyLayout-DhHeBlGD.js","./useAssetBase-4Ut9QhBI.js","./editor-Ch2V6IBq.js","./pen-tool-BfwjhXQW.js","./underline-CT_nGhA9.js","./external-link-D382oEvK.js","./file-code-CIc73fLV.js","./presentation-DXrcAbwM.js","./search-DTrfkTpJ.js","./upload-DffL3XsM.js","./video-DKoRqEZW.js","./ref-18fHdbqG.js","./index4.css","./fit-BLbHgoq2.js","./VerifyLayout-B9e4RHAZ.css","./SlidesLayout-T6pVArYg.js","./local-split-host-B9-b1nF-.js","./monitor-DRrnx_H5.js","./DocumentExportMenu-BAtsd4zW.js","./DraggablePanel-CpccFkyu.js","./embed-src-CmyqZplg.js","./SlidesLayout-Bjds2UXz.css","./ReportLayout-BHrbaaAL.js","./StoryboardLayout-DiV_Z5pK.js","./useStoryboardData-CqAZAp1S.js","./clapperboard-BfpJ7tpa.js","./auto-publish-DCFcz2OJ.js","./cloud-upload-D8TpApTr.js","./settings-DYL-Smbx.js","./ArtifactList-DGwth5Uo.js","./RyugiMark-C2Kv7bq7.js","./StoryboardRender-BJWBZ1MT.js","./PreviewArtifactLayout-Cbu5Tl4o.js","./split-x3wbj4VY.js","./SplitFrame-Cuz0Fd60.js","./route-messages-CVepLEKq.js","./split-C1umM5Fz.css","./PreviewLayout-Dam8DKBw.js"])))=>i.map(i=>d[i]);
2
- import{n as e,r as t}from"./rolldown-runtime-XKyaHtl9.js";import{_ as n,b as r,c as i,d as a,f as o,g as s,h as c,i as l,l as u,m as d,n as f,p,r as m,t as h,v as g,x as _,y as v}from"./route-Cto1M-9M.js";/* empty css */import{An as y,Ar as b,At as x,Bt as S,Cn as C,Cr as w,Ct as T,Dn as E,Dt as D,Et as O,Ft as k,Gt as ee,Ht as te,Jt as ne,K as A,Kt as re,Lt as ie,Mt as j,Nt as ae,Or as oe,Ot as se,Pt as ce,Rt as M,S as le,Sr as ue,St as N,Tr as de,Tt as P,Ut as fe,Vt as F,Wt as pe,Xt as me,Yt as he,Zt as ge,_r as _e,_t as ve,bt as ye,cr as be,ct as xe,dt as Se,en as Ce,fr as we,ft as Te,g as Ee,gt as De,h as Oe,hr as ke,ht as Ae,it as je,j as Me,jr as Ne,jt as Pe,k as Fe,kn as Ie,kr as Le,kt as Re,l as ze,lr as Be,lt as Ve,mr as He,mt as Ue,nt as I,or as L,pr as We,pt as Ge,q as Ke,r as qe,rn as Je,rt as R,tt as Ye,ut as Xe,v as Ze,vr as Qe,vt as $e,wr as et,wt as tt,x as nt,xr as rt,xt as it,y as at,yt as ot,zt as st}from"./url-B7tM0rBE.js";import{$r as ct,C as lt,Dn as ut,En as dt,Fn as ft,Ft as pt,Gr as mt,Hr as ht,It as gt,Kr as _t,Pn as vt,Sn as yt,Tn as bt,Vr as xt,Xr as St,Yr as Ct,Zr as wt,ii as z,kr as Tt,oi as Et,or as Dt,qn as Ot,ri as B,rr as kt,t as At,zr as jt}from"./useLayerZIndex-BLBrH3-s.js";import{n as Mt,r as V,t as Nt}from"./bem-vbke-3KC.js";import{t as Pt}from"./react-DlmbjZJV.js";import{a as Ft,i as It,l as Lt,n as Rt,o as zt,r as Bt,s as Vt,t as Ht}from"./DropdownMenu-Bx-bya6r.js";import{A as Ut,f as Wt,t as Gt}from"./Popover-BDqi62Lz.js";import{t as Kt}from"./jsx-runtime-LKYXHABd.js";import{a as qt,i as Jt,n as Yt,o as Xt,r as Zt,s as Qt,t as $t}from"./store-D3ROW536.js";import{n as en,t as tn}from"./imperative-IdZ6nWPs.js";import{$ as nn,B as rn,Ct as an,Dt as on,Et as sn,G as cn,I as ln,J as un,M as dn,N as fn,P as pn,St as mn,Tt as hn,U as gn,W as H,_t as _n,a as vn,bt as yn,c as bn,ct as xn,d as Sn,dt as Cn,et as wn,gt as Tn,h as En,ht as Dn,i as On,l as kn,m as An,mt as jn,o as Mn,p as Nn,r as Pn,s as Fn,st as In,t as Ln,u as Rn,ut as zn,wt as Bn,xt as Vn}from"./MotionConfigContext-HC2vqcJO.js";import{$ as Hn,$n as Un,$t as Wn,A as Gn,An as Kn,At as qn,B as Jn,Bn as Yn,Bt as Xn,C as Zn,Cn as Qn,Cr as $n,Ct as er,D as tr,Dn as nr,Dt as rr,E as ir,En as ar,Et as or,F as sr,Fn as cr,Ft as lr,G as ur,Gn as dr,Gt as fr,H as pr,Hn as mr,Ht as hr,I as gr,In as _r,It as vr,J as yr,Jn as br,Jt as xr,K as Sr,Kn as Cr,Kt as wr,L as Tr,Ln as Er,Lt as Dr,M as Or,Mn as kr,Mt as Ar,N as jr,Nn as Mr,Nt as Nr,O as Pr,On as Fr,Ot as Ir,P as Lr,Pn as Rr,Pt as zr,Q as Br,Qn as Vr,Qt as Hr,R as Ur,Rn as Wr,Rt as Gr,S as Kr,Sn as qr,Sr as Jr,St as Yr,T as Xr,Tn as Zr,Tr as Qr,Tt as $r,U as ei,Un as ti,Ut as ni,V as ri,Vn as ii,Vt as ai,W as oi,Wn as si,Wt as ci,X as li,Xn as ui,Xt as di,Y as fi,Yn as pi,Yt as mi,Z as hi,Zn as gi,Zt as _i,_ as vi,_n as yi,_r as bi,_t as xi,a as Si,an as Ci,ar as wi,at as Ti,b as Ei,bn as Di,br as U,bt as Oi,c as ki,cn as Ai,cr as ji,ct as Mi,d as Ni,dn as Pi,dr as Fi,dt as Ii,en as Li,er as Ri,et as zi,f as Bi,fn as Vi,fr as Hi,ft as Ui,g as Wi,gn as Gi,gr as Ki,gt as qi,h as Ji,hn as Yi,hr as Xi,ht as Zi,i as Qi,in as $i,ir as ea,it as ta,j as na,jn as ra,jt as ia,k as aa,kn as oa,kt as sa,l as ca,ln as la,lr as ua,lt as da,m as fa,mn as pa,mr as ma,mt as ha,n as ga,nn as _a,nr as va,nt as ya,o as ba,on as xa,or as Sa,ot as Ca,p as wa,pn as Ta,pr as Ea,pt as Da,q as Oa,qn as ka,qt as Aa,r as ja,rn as Ma,rr as Na,rt as Pa,s as Fa,sn as Ia,sr as La,st as Ra,t as za,tn as Ba,tr as Va,tt as Ha,u as Ua,un as Wa,ur as Ga,ut as Ka,v as qa,vn as Ja,vr as Ya,vt as Xa,w as Za,wn as Qa,wr as $a,wt as eo,x as to,xn as no,xr as ro,xt as io,y as ao,yn as oo,yr as so,yt as co,z as lo,zn as uo,zt as fo}from"./elements-CmGVWYag.js";import{m as po,p as mo,t as ho}from"./local-BRAi41mw.js";import{r as go,t as _o}from"./useArtifactSocket-CQZyCoRM.js";import{t as vo}from"./DocumentExportMenu-BAtsd4zW.js";import{t as yo}from"./arrow-up-right-0KreI6kY.js";import{F as bo,P as xo}from"./SelectScrollUpArrow-BvZjk1l3.js";import{t as So}from"./cloud-upload-D8TpApTr.js";import{t as Co}from"./Tooltip-cTz_1zF8.js";import{S as wo,a as To,c as Eo,d as Do,f as Oo,h as ko,i as Ao,l as jo,m as Mo,n as No,s as Po,t as Fo,u as Io,x as Lo}from"./MenuSubmenuTrigger-DhC8wnON.js";var Ro={name:`clock-3`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]};Ro.node;var zo=on(Ro),Bo={name:`cloud`,size:24,node:[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]};Bo.node;var Vo=on(Bo),Ho={name:`columns-2`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M12 3v18`,key:`108xh3`}]],aliases:[`columns`]};Ho.node;var Uo=on(Ho),Wo={name:`credit-card`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`,key:`ynyp8z`}],[`line`,{x1:`2`,x2:`22`,y1:`10`,y2:`10`,key:`1b3vmo`}],[`path`,{d:`M6 14h2`,key:`mk7k0u`}]]};Wo.node;var Go=on(Wo),Ko={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};Ko.node;var qo=on(Ko),Jo={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};Jo.node;var Yo=on(Jo),Xo={name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]};Xo.node;var Zo=on(Xo),Qo={name:`rotate-cw`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]};Qo.node;var $o=on(Qo),es={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};es.node;var ts=on(es),ns={name:`smartphone`,size:24,node:[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]};ns.node;var rs=on(ns);function is(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}function as(e,t,n){return Qr(e.getProps(),t,n,e)}var os=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,ss=e=>Array.isArray(e);function cs(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,An(n))}function ls(e){return ss(e)?e[e.length-1]||0:e}function us(e,t){let{transitionEnd:n={},transition:r={},...i}=as(e,t)||{};i={...i,...n};for(let t in i)cs(e,t,ls(i[t]))}function ds(e){return!!(Sn(e)&&e.add)}function fs(e,t){let n=e.getValue(`willChange`);if(ds(n))return n.add(t);if(!n&&yn.WillChange){let n=new yn.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function ps(e){return e.props[$a]}var ms=typeof window<`u`;function hs({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function gs(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?k(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState?.getState()[i],p=a?.path;p&&(p.animateValues?p.animateValues(t=>e.getValue(t,e.latestValues[t]??0),s,a,n,d):p.animateVisualElement?.(e,s,a,n,d));for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&hs(f,t))continue;let o={delay:n,...ce(f?.out[t]||a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){H.update(()=>r.set(i));continue}let p=!1;if(ms&&window.MotionHandoffAnimation){let n=ps(e);if(n){let e=window.MotionHandoffAnimation(n,t,H);e!==null&&(o.startTime=e,p=!0)}}fs(e,t);let m=l??e.shouldReduceMotion;r.run(ae(t,r,i,m&&Pe.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>H.update(()=>{o&&us(e,o)});d.length?Promise.all(d).then(t):t()}return d}function _s(e,t,n={}){let r=as(e,t,os(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?gs(e,r,n):[]),o=(r=0)=>{let{variantChildren:a}=e,{delayChildren:o=0,staggerChildren:s,staggerDirection:c}=i,l=[];return a?.forEach(e=>{e.notify(`AnimationStart`,t),l.push(_s(e,t,{...n,delay:r+(typeof o==`function`?0:o)+is(a,e,o,s,c)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(l)},{when:s}=i;return s?s===`beforeChildren`?a().then(()=>o()):o().then(a):Promise.all([a(),o(n.delay)])}function vs(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>_s(e,t,n))):typeof t==`string`?_s(e,t,n):Promise.all(gs(e,as(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var ys=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`],bs={value:null,addProjectionMetrics:null,countProjection:void 0};function xs(e,t){let n=zn.now();e=D(e);let r=({timestamp:i})=>{let a=i-n;a>=t&&(gn(r),e(a-t))};return H.setup(r,!0),O(()=>gn(r))}function Ss(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Cs(e){return se(e)&&e.tagName===`svg`}var ws=e=>typeof e==`number`?e:parseFloat(e),Ts=ys.length,Es=e=>typeof e==`number`||wn.test(e);function Ds(e,t,n,r,i,a){i?(e.opacity=F(0,n.opacity??1,ks(r)),e.opacityExit=F(t.opacity??1,0,As(r))):a&&(e.opacity=F(t.opacity??1,n.opacity??1,r));for(let i=0;i<Ts;i++){let a=ys[i],o=Os(t,a),s=Os(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||Es(o)===Es(s)?(e[a]=Math.max(F(ws(o),ws(s),r),0),(nn.test(s)||nn.test(o))&&(e[a]+=`%`)):e[a]=s)}for(let i=0;i<ve.length;i++){let a=ve[i];(t[a]||n[a])&&(e[a]=F(t[a]||0,n[a]||0,r))}}function Os(e,t){return e[t]===void 0?e.borderRadius:e[t]}var ks=js(0,.5,te),As=js(.5,.95,_n);function js(e,t,n){return r=>r<e?0:r>t?1:n(fe(e,t,r))}var Ms=(e,t,{x:n,y:r})=>{let i=e*e+t*t;return i<1?0:-1e3*(n*e+r*t)/i},Ns=(e,t=300)=>{let n=Vn(.25,2,t/300),{stiffness:r,damping:i}=M({...e,duration:e.duration&&Dn(e.duration)});return{...e,stiffness:r,damping:i*Math.sqrt(n),mass:n}};function Ps(e,t){e.min=t.min,e.max=t.max}function Fs(e,t){Ps(e.x,t.x),Ps(e.y,t.y)}function Is(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Ls=.9999,Rs=1.0001,zs=-.01,Bs=.01;function W(e){return e.max-e.min}function Vs(e,t,n){return Math.abs(e-t)<=n}function Hs(e,t,n,r=.5){e.origin=r,e.originPoint=F(t.min,t.max,e.origin),e.scale=W(n)/W(t),e.translate=F(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Ls&&e.scale<=Rs||isNaN(e.scale))&&(e.scale=1),(e.translate>=zs&&e.translate<=Bs||isNaN(e.translate))&&(e.translate=0)}function Us(e,t,n,r){Hs(e.x,t.x,n.x,r?.originX),Hs(e.y,t.y,n.y,r?.originY)}function Ws(e,t,n,r=0){e.min=(r?F(n.min,n.max,r):n.min)+t.min,e.max=e.min+W(t)}function Gs(e,t,n,r){Ws(e.x,t.x,n.x,r?.x),Ws(e.y,t.y,n.y,r?.y)}function Ks(e,t,n,r=0){let i=r?F(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+W(t)}function qs(e,t,n,r){Ks(e.x,t.x,n.x,r?.x),Ks(e.y,t.y,n.y,r?.y)}function Js(e,t,n,r,i){return e-=t,e=Ue(e,1/n,r),i!==void 0&&(e=Ue(e,1/i,r)),e}function Ys(e,t=0,n=1,r=.5,i,a=e,o=e){if(nn.test(t)&&(t=parseFloat(t),t=F(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=F(a.min,a.max,r);e===a&&(s-=t),e.min=Js(e.min,t,n,s,i),e.max=Js(e.max,t,n,s,i)}function Xs(e,t,[n,r,i],a,o){Ys(e,t[n],t[r],t[i],t.scale,a,o)}var Zs=[`x`,`scaleX`,`originX`],Qs=[`y`,`scaleY`,`originY`];function $s(e,t,n,r){Xs(e.x,t,Zs,n?.x,r?.x),Xs(e.y,t,Qs,n?.y,r?.y)}var ec=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),tc=ec(`applewebkit/`)&&!ec(`chrome/`)?Math.round:_n;function nc(e){e.min=tc(e.min),e.max=tc(e.max)}function rc(e){nc(e.x),nc(e.y)}function ic(e){return e.translate===0&&e.scale===1}function ac(e){return ic(e.x)&&ic(e.y)}function oc(e,t){return e.min===t.min&&e.max===t.max}function sc(e,t){return oc(e.x,t.x)&&oc(e.y,t.y)}function cc(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function lc(e,t){return cc(e.x,t.x)&&cc(e.y,t.y)}function uc(e){return W(e.x)/W(e.y)}function dc(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var fc=class{constructor(){this.members=[]}add(e){mn(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;r&&r.isConnected!==!1||n.snapshot||(Bn(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(Bn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}};function pc(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var mc={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(wn.test(e))e=parseFloat(e);else return e}return`${pc(e,t.target.x)}% ${pc(e,t.target.y)}%`}},hc={borderRadius:Object.assign({},mc,{applyTo:ys.slice()}),borderTopLeftRadius:mc,borderTopRightRadius:mc,borderBottomLeftRadius:mc,borderBottomRightRadius:mc,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=un.parse(e);if(i.length>5)return r;let a=un.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=F(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}}};function gc(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;(i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `);let s=``;if(n){let{transformPerspective:e}=n;e&&(r=`perspective(${e}px) ${r}`);for(let e=0;e<ve.length;e++){let t=ve[e],r=n[t];r&&(s+=`${t}(${r}deg) `),!e&&n.pathRotation&&(s+=`rotate(${n.pathRotation}deg) `)}}if(s){(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),r+=s;let n=e.x.scale*t.x,i=e.y.scale*t.y;(n!==1||i!==1)&&(r+=`scale(${n}, ${i})`)}else e.x.scale!==1||e.y.scale!==1?r+=`scale(${e.x.scale}, ${e.y.scale})`:r||t.x===1&&t.y===1||(r=`scale(1, 1)`);return r||`none`}function _c(e){return[e(`x`),e(`y`)]}var vc=(e,t)=>e.depth-t.depth,yc=class{constructor(){this.children=[],this.isDirty=!1}add(e){mn(this.children,e),this.isDirty=!0}remove(e){Bn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(vc),this.isDirty=!1,this.children.forEach(e)}},bc={hasAnimatedSinceResize:!0,hasEverUpdated:!1},xc=[`z`,`skew`,`skewZ`],Sc=1e3,Cc=0;function wc(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}var Tc=e=>e.instance&&En.get(e.instance)?.demote()&&e.resetSkewAndRotation();function Ec(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=ps(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,H,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ec(r)}function Dc(e){if(e)return e.options.allowProjection===!1?Dc(e.parent):e.projection}function Oc({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return Object.assign($n,{...hc,...$n}),class{static create(e,t,n){let{layoutId:r,layout:i,drag:a,dragConstraints:o,layoutScroll:s,layoutRoot:c,layoutAnchor:l,layoutCrossfade:u}=t,d=e.projection=new this(e.latestValues,t[`data-framer-portal-id`]?void 0:Dc(e.parent));d.setOptions({layoutId:r,layout:i,alwaysMeasureLayout:!!a||o&&Ss(o),visualElement:e,animationType:typeof i==`string`?i:`both`,initialPromotionConfig:n,crossfade:u,layoutScroll:s,layoutRoot:c,layoutAnchor:l});let f=d.getStack()?.lead;f&&!d.root.isUpdateBlocked()&&(f.willUpdate(),f.scheduleCheckAfterUnmount())}constructor(e={},n=t?.()){this.id=Cc++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(jc),this.nodes.forEach(Hc),this.nodes.forEach(Uc),this.nodes.forEach(Mc),bs.countProjection?.()},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new yc)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Tn),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){this.eventHandlers.get(e)?.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=se(t)&&!Cs(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent?.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;H.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n?.(),n=xs(i,250),bc.hasAnimatedSinceResize&&(bc.hasAnimatedSinceResize=!1,this.nodes.forEach(Vc)))})}n&&this.root.registerSharedNode(n,this),this.addLayoutListener()}addLayoutListener(){let{layoutId:e,layout:t,visualElement:n,animate:r}=this.options;this.instance&&!this.hasLayoutListener&&r!==!1&&n&&(e||t)&&(this.hasLayoutListener=!0,this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:r,layout:i})=>{if(this.isAnimationBlocked){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||n.getDefaultTransition()||Xc,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=n.getProps(),c=!this.targetLayout||!lc(this.targetLayout,i),l=!t&&r;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...ce(a,`layout`),onPlay:o,onComplete:s};(n.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||Vc(this),this.isLead()&&this.options.onExitComplete?.();this.targetLayout=i}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),this.getStack()?.remove(this),this.parent?.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,gn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes?.forEach(Wc),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete?.();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ec(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;Tc(this),this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,Tc(t),(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1),t.isAnimationBlocked&&(t.dragSnapshot||=t.measure(),this.dragAncestor=t)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(Fc),this.nodes.forEach(Pc);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ic);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Rc),this.nodes.forEach(zc),this.nodes.forEach(Bc),this.nodes.forEach(kc),this.nodes.forEach(Ac)):this.nodes.forEach(Ic),this.clearAllSnapshots();let e=zn.now();Cn.delta=Vn(0,1e3/60,e-Cn.timestamp),Cn.timestamp=e,Cn.isProcessing=!0,cn.update.process(Cn),cn.preRender.process(Cn),cn.render.process(Cn),Cn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Fn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Nc),this.sharedNodes.forEach((e,t)=>e.members.length?e.removeLeadSnapshot():this.sharedNodes.delete(t))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,H.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){H.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!W(this.snapshot.measuredBox.x)&&!W(this.snapshot.measuredBox.y)&&(this.snapshot=void 0),this.snapshot)){let{visualElement:e}=this.options,t=this.currentAnimation?.state===`running`,n=t&&this.animationEdges;t&&this.relativeTarget&&(this.snapshot.relativeVelocity=this.relativeVelocity?.slice()||[]);let r=n&&this.motionValue?.getVelocity()||0,i=[0,1,2,3,4,5].map(t=>(t<4?n&&(this.edgeValues?this.edgeVelocity(t):-n[t]*r/1e3):e?.getValue(t<5?`x`:`y`)?.getVelocity())||0);i.some(Boolean)&&(this.snapshot.velocity=i)}}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected||=U(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t?.notify(`LayoutMeasure`,this.layout.layoutBox,e?.layoutBox)}updateScroll(e=`measure`){let{scroll:t,instance:i}=this,{animationId:a}=this.root;if(this.options.layoutScroll&&i&&!(t&&t.animationId===a&&t.phase===e)){let o=r(i);this.scroll={animationId:a,phase:e,isRoot:o,offset:n(i),wasRoot:t?t.isRoot:o}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;e&&Tc(this);let t=this.projectionDelta&&!ac(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||it(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),rc(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return U();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some($c))){let{scroll:e}=this.root;e&&(De(t.x,e.offset.x),De(t.y,e.offset.y))}return t}removeElementScroll(e){let t=U();if(Fs(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&Fs(t,e),De(t.x,i.offset.x),De(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n,r,i=0){let a=n||U();Fs(a,e);for(let e=i;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(De(a.x,-n.scroll.offset.x),De(a.y,-n.scroll.offset.y)),it(n.latestValues)&&Ae(a,n.latestValues,n.layout?.layoutBox)}return!r&&it(this.latestValues)&&Ae(a,this.latestValues,this.layout?.layoutBox),a}removeTransform(e){let t=U();Fs(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!it(n.latestValues))continue;let r;n.instance&&(ye(n.latestValues)&&n.updateSnapshot(),r=U(),Fs(r,n.measurePageBox())),$s(t,n.latestValues,n.snapshot?.layoutBox,r)}return it(this.latestValues)&&$s(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade},this.addLayoutListener()}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Cn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=Cn.timestamp;let a=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=U(),this.targetWithTransforms=U()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Gs(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target,!0):Fs(this.target,this.layout.layoutBox),Te(this.target,this.targetDelta)):Fs(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&(!a.resumingFrom==!this.resumingFrom||a.options.layoutRoot&&!a.resumingFrom)&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),bs.countProjection?.(1))}getClosestProjectingParent(){if(!(!this.parent||ye(this.parent.latestValues)||$e(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=U(),this.relativeTargetOrigin=U(),qs(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),Fs(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Cn.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent?.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;Fs(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Ge(this.layoutCorrected,this.treeScale,this.path,t&&(e.relativeTarget&&!e.relativeParent.resumingFrom?e.relativeParent:!0)),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=U());let{target:s}=e;s?(!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Is(this.prevProjectionDelta.x,this.projectionDelta.x),Is(this.prevProjectionDelta.y,this.projectionDelta.y)),Us(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&dc(this.projectionDelta.x,this.prevProjectionDelta.x)&&dc(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),bs.countProjection?.(2)):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){this.options.visualElement?.scheduleRender(),e&&this.getStack()?.scheduleRender(),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ro(),this.projectionDelta=ro(),this.projectionDeltaWithTransform=ro()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=ro();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=U(),c=r?.source!==this.layout?.source,l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some(Yc));this.animationProgress=0;let f,p=n?.interpolateProjection(e),m=this.layout?.layoutBox,h=m&&[m.x.min,m.x.max,m.y.min,m.y.max].map((t,n)=>{let{translate:r,scale:i,originPoint:a}=e[n<2?`x`:`y`];return(t-a)*(i-1)+r});h?.every(isFinite)||(h=void 0),this.animationEdges=h,this.edgeValues=this.startVelocity=this.impulse=this.relativeVelocity=this.relativeStart=void 0;let g=r?.velocity,_=r?.relativeVelocity||g;if(_?.slice(0,4).some(Boolean)&&this.getClosestProjectingParent()&&(this.relativeStart=_),g&&h){let t=g.slice(0,4).map((e,t)=>e+(c?g[4+(t>>1)]:0));t.some(Boolean)&&(this.startVelocity=p?Ms(e.x.translate,e.y.translate,{x:(t[0]+t[1])/2,y:(t[2]+t[3])/2}):t)}this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n),l=this.edgeValues;for(let t=0;t<2;t++){let r=t?`y`:`x`;l?Gc(o[r],e[r],this.layout.layoutBox[r],l[t*2],l[t*2+1]):Kc(o[r],e[r],n)}if(r&&(o.x.translate=r.x,o.y.translate=r.y),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){qs(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0);let e=this.relativeTargetOrigin,t=s;if(Jc(this.relativeTarget,e,t,n),this.isSpringLayout){let e=this.relativeTarget,t=this.impulse||0,n=this.relativeStart,r=zn.now(),i=(r-this.relativeTime)/1e3;this.relativeTime=r;let a=this.relativeVelocity||=[0,0,0,0];for(let r=0;r<4;r++){let o=r<2?`x`:`y`,s=r&1?`max`:`min`;n&&(e[o][s]+=n[r]*t),f&&i>0&&(a[r]=(e[o][s]-f[o][s])/i)}}f&&sc(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=U(),Fs(f,this.relativeTarget)}c&&(this.animationValues=a,Ds(a,i,this.latestValues,n,d,u)),r?.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`);let t=this.isSpringLayout=e.type===`spring`;this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.resumingFrom&&(this.resumingFrom.edgeValues=void 0),this.pendingAnimation&&=(gn(this.pendingAnimation),void 0),this.pendingAnimation=H.update(()=>{bc.hasAnimatedSinceResize=!0,this.motionValue||=An(0),this.motionValue.jump(0,!1);let n=this.startVelocity;this.startVelocity=void 0;let r=e,i=0;if(t){if(e.mass===`auto`){let t=this.layout?.layoutBox;r=Ns(e,t&&Math.sqrt(W(t.x)*W(t.y)))}let t=this.relativeStart;if((n||t)&&!e.repeat){if(typeof n==`number`)i=n;else{let e=n&&this.animationEdges;r={...r,type:r=>{let i=[r.velocity,...n||[]].map((t,n)=>st({...r,keyframes:n?[e[n-1],0]:r.keyframes,velocity:t})),a=i.length;t&&i.push(st({...r,keyframes:[0,0],velocity:1e3,restDelta:.5,restSpeed:5}));let o=0,s=[],c={calculatedDuration:null,next:t=>{o=t;let n=i[0].next(t),r=n.done;for(let e=1;e<i.length;e++){let{value:n,done:o}=i[e].next(t);e<a?s[e-1]=n:this.impulse=n/1e3,r&&=o}return e&&(this.edgeValues=s),n.done=r,n}};return c.calculatedDuration=S(c),c.next(0),this.edgeVelocity=e=>i[e+1].velocity(o),c}}}}}let a=xe(this.motionValue,[0,1e3],{...r,velocity:i,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}});this.currentAnimation=a,rn(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=this.edgeValues=this.edgeVelocity=this.impulse=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.edgeValues=this.impulse=void 0,this.mixTargetDelta?.(Sc),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,layout:n,latestValues:r}=e,{target:i}=e;if(t&&i&&n){if(this!==e&&this.layout&&n&&Qc(this.options.animationType,this.layout.layoutBox,n.layoutBox)){let{layoutBox:e}=this.layout,t=i;i=this.target||U(),Zc(i.x,t.x,e.x),Zc(i.y,t.y,e.y)}Fs(t,i),Ae(t,r),Us(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new fc),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?.transition,preserveFollowOpacity:n?.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){this.getStack()?.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){return this.getStack()?.relegate(this)||!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let{latestValues:t}=e;if(!ot(t))return;let n={};for(let t=0;t<xc.length;t++)wc(xc[t],e,n,this.animationValues);for(let t=0;t<ve.length;t++)wc(ve[t],e,n,this.animationValues);e.render();for(let t in n)e.setStaticValue(t,n[t]),this.animationValues&&(this.animationValues[t]=n[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;let n=this.getLead();if(!this.isVisible&&n!==this){e.visibility=`hidden`;return}let r=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=Jr(t?.pointerEvents)||``,e.transform=r?r(this.latestValues,``):`none`;return}if(!this.projectionDelta||!this.layout||!n.target){(this.options.layoutId||this.needsShow)&&(this.needsShow=!1,e.visibility=``,e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=Jr(t?.pointerEvents)||``),this.hasProjected&&!it(this.latestValues)&&(e.transform=r?r({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=n.animationValues||n.latestValues;this.applyTransformsToTarget();let a=gc(this.projectionDeltaWithTransform,this.treeScale,i);r&&(a=r(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=n.animationValues?n===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:n===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in $n){if(i[t]===void 0)continue;let{correct:r,applyTo:o,isCSSVariable:s}=$n[t],c=a===`none`?i[t]:r(i[t],n);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=n===this?Jr(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=this.dragSnapshot=this.dragAncestor=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Pc),this.root.sharedNodes.clear()}}}function kc(e){e.updateLayout(),Lc(e)}function Ac(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source,o=(r,a)=>{if(i===`size`)_c(e=>{let t=W(r[e]);r[e].min=a[e].min,r[e].max=r[e].min+t});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;Ps(r[e],a[e])}else Qc(i,t.layoutBox,n)&&_c(t=>{let n=W(a[t]);r[t].max=r[t].min+n,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[t].max=e.relativeTarget[t].min+n)})},s=a?t.measuredBox:t.layoutBox;o(s,n);let c=ro();Us(c,n,t.layoutBox);let l=ro();Us(l,a?e.applyTransform(r,!0):n,s);let u=!ac(c),d=!1,f=e.getClosestProjectingParent();if((!a||f?.options.layoutRoot&&e.resumeFrom?.path.includes(f))&&f&&!f.resumeFrom){let{snapshot:r,layout:i}=f;if(r&&i){let s=e.options.layoutAnchor||void 0,c=U();qs(c,a?e.resumeFrom.applyTransform(t.layoutBox,!0,void 0,!0,f.depth+1):t.layoutBox,r.layoutBox,s);let l=U();qs(l,n,i.layoutBox,s),a&&o(c,l),lc(c,l)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=c,e.relativeParent=f)}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:l,layoutDelta:c,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else e.isLead()&&e.options.onExitComplete?.();e.options.transition=void 0}function jc(e){bs.countProjection?.(0),e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function Mc(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Nc(e){e.clearSnapshot()}function Pc(e){e.clearMeasurements()}function Fc(e){e.isLayoutDirty=!0,e.updateLayout()}function Ic(e){e.isLayoutDirty=!1}function Lc(e){let{snapshot:t,dragAncestor:n}=e,r=n?.isAnimationBlocked&&n.layout;if(!t||!r||e.resumeFrom||e.isAnimationBlocked)return;let i=n.dragSnapshot;_c(e=>De(t.layoutBox[e],r.layoutBox[e].min-i.layoutBox[e].min))}function Rc(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.dragSnapshot||e.layout,e.isLayoutDirty=!0)}function zc(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function Bc(e){let{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Vc(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Hc(e){e.resolveTargetDelta()}function Uc(e){e.calcProjection()}function Wc(e){e.resetSkewAndRotation()}function Gc(e,t,n,r,i){let a=n.max-n.min,o=a?Math.max(0,(a+i-r)/a):1,s=e.originPoint=t.originPoint;e.origin=t.origin,e.scale=o,e.translate=n.min+r-(s+(n.min-s)*o)}function Kc(e,t,n){e.translate=F(t.translate,0,n),e.scale=F(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function qc(e,t,n,r){e.min=F(t.min,n.min,r),e.max=F(t.max,n.max,r)}function Jc(e,t,n,r){qc(e.x,t.x,n.x,r),qc(e.y,t.y,n.y,r)}function Yc(e){return e.animationValues?.opacityExit!==void 0}var Xc={duration:.45,ease:[.4,0,.1,1]};function Zc(e,t,n){e.max=W(n)+(e.min=t.min)}function Qc(e,t,n){return e===`position`||e===`preserve-aspect`&&!Vs(uc(t),uc(n),.2)}function $c(e){return e!==e.root&&e.scroll?.wasRoot}function el(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var tl=Oc({attachResizeListener:(e,t)=>el(e,`resize`,t),measureScroll:Ve,checkIsScrollRoot:()=>!0}),nl=Oc({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!so.current){let e=new tl({});e.mount(window),e.setOptions({layoutScroll:!0}),so.current=e}return so.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),rl=class extends Hi{constructor(){super(...arguments),this.KeyframeResolver=x}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;Sn(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function il(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function al(e){return window.getComputedStyle(e)}var ol=class extends rl{constructor(){super(...arguments),this.type=`html`,this.renderInstance=il}mount(e){super.mount(e)}readValueFromInstance(e,t){if(dn.has(t))return this.projection?.isProjecting?fn(t):pn(e,t);{let n=al(e),r=(In(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Se(e,t)}build(e,t,n){Rn(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Fi(e,t,n)}},sl=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1;function cl(e){return{point:{x:e.pageX,y:e.pageY}}}var ll=e=>t=>sl(t)&&e(t,cl(t));function ul(e,t,n,r){return el(e,t,ll(n),r)}var dl=new WeakMap,fl,pl=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:se(r)&&`getBBox`in r?r.getBBox()[t]:r[n],ml=pl(`inline`,`width`,`offsetWidth`),hl=pl(`block`,`height`,`offsetHeight`);function gl({target:e,borderBoxSize:t}){dl.get(e)?.forEach(n=>{n(e,{get width(){return ml(e,t)},get height(){return hl(e,t)}})})}function _l(e){e.forEach(gl)}function vl(){typeof ResizeObserver<`u`&&(fl=new ResizeObserver(_l))}function yl(e,t){fl||vl();let n=P(e);return n.forEach(e=>{let n=dl.get(e);n||(n=new Set,dl.set(e,n)),n.add(t),fl?.observe(e)}),()=>{n.forEach(e=>{let n=dl.get(e);n?.delete(t),n?.size||fl?.unobserve(e)})}}var bl=new Set,xl;function Sl(){xl=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};bl.forEach(t=>t(e))},window.addEventListener(`resize`,xl)}function Cl(e){return bl.add(e),xl||Sl(),()=>{bl.delete(e),!bl.size&&typeof xl==`function`&&(window.removeEventListener(`resize`,xl),xl=void 0)}}function wl(e,t){return O(typeof e==`function`?Cl(e):yl(e,t))}var Tl=(e,t)=>Math.abs(e-t);function El(e,t){let n=Tl(e.x,t.x),r=Tl(e.y,t.y);return Math.sqrt(n**2+r**2)}var Dl=new Set([`auto`,`scroll`]),Ol=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o,immediate:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Al(this.lastRawMoveEventInfo,this.transformPagePoint));let e=Ml(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=El(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:zn.now()});let{onStart:i,onMove:a}=this.handlers;t||(i?.(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a?.(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.handleScroll(window),this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=Al(t,this.transformPagePoint),this.hasPendingMove=!0,H.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i?.(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=Ml(e.type===`pointercancel`?this.lastMoveEventInfo:Al(t,this.transformPagePoint),this.history);this.startEvent&&n?.(e,a),r?.(e,a)},!sl(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=s?0:a,this.contextWindow=r||window;let c=cl(e),l=Al(c,this.transformPagePoint),{point:u}=l;this.history=[{...u,timestamp:zn.now()}];let{onSessionStart:d}=t;d&&d(e,Ml(l,this.history));let f={passive:!0,capture:!0};this.removeListeners=pe(ul(this.contextWindow,`pointermove`,this.handlePointerMove,f),ul(this.contextWindow,`pointerup`,this.handlePointerUp,f),ul(this.contextWindow,`pointercancel`,this.handlePointerUp,f)),o&&this.startScrollTracking(o),s&&(this.handlePointerMove(e,c),this.updatePoint())}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(Dl.has(e.overflowX)||Dl.has(e.overflowY))&&this.scrollPositions.set(t,kl(t)),t=t.parentElement}this.scrollPositions.set(window,kl(window)),this.removeScrollListeners=pe(el(window,`scroll`,this.onElementScroll,{capture:!0}),el(window,`scroll`,this.onWindowScroll,{}))}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=kl(e),i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),H.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),gn(this.updatePoint)}},kl=e=>e===window?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop};function Al(e,t){return t?{point:t(e.point)}:e}function jl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ml({point:e},t){return{point:e,delta:jl(e,Pl(t)),offset:jl(e,Nl(t)),velocity:Fl(t,.1)}}function Nl(e){return e[0]}function Pl(e){return e[e.length-1]}function Fl(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Pl(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Dn(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Dn(t)*2&&(r=e[1]);let a=jn(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}var Il=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Ll(e){return Il.has(e.tagName)||e.isContentEditable===!0}var Rl=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function zl(e){return Rl.has(e.tagName)||e.isContentEditable===!0}var Bl={x:!1,y:!1};function Vl(){return Bl.x||Bl.y}function Hl(e){return e===`x`||e===`y`?Bl[e]?null:(Bl[e]=!0,()=>{Bl[e]=!1}):Bl.x||Bl.y?null:(Bl.x=Bl.y=!0,()=>{Bl.x=Bl.y=!1})}function Ul(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?F(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?F(n,e,r.max):Math.min(e,n)),e}function Wl(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Gl(e,{top:t,left:n,bottom:r,right:i}){return{x:Wl(e.x,n,i),y:Wl(e.y,t,r)}}function Kl(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function ql(e,t){return{x:Kl(e.x,t.x),y:Kl(e.y,t.y)}}function Jl(e,t){let n=.5,r=W(e),i=W(t);return i>r?n=fe(t.min,t.max-r,e.min):r>i&&(n=fe(e.min,e.max-i,t.min)),Vn(0,1,n)}function Yl(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Xl=.35;function Zl(e=Xl){return e===!1?e=0:e===!0&&(e=Xl),{x:Ql(e,`left`,`right`),y:Ql(e,`top`,`bottom`)}}function Ql(e,t,n){return{min:$l(e,t),max:$l(e,n)}}function $l(e,t){return typeof e==`number`?e:e[t]||0}function eu(e){let t=``;for(let n of e.path){n.scroll=void 0,n.updateScroll();let{scroll:r}=n;n!==e.root&&r&&(t+=r.offset.x+`,`+r.offset.y+`,`)}return t}var tu=new WeakMap,nu=class{constructor(e,t=()=>e.getProps()){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=U(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e,this.readProps=t}start(e,t={}){if(this.visualElement.presenceContext?.isPresent===!1)return;let n=e=>{t.snapToCursor&&this.snapToCursor(e),this.stopAnimation()},r=(e,t)=>{let{drag:n,dragConstraints:r,dragPropagation:i,onDragStart:a}=this.getProps();if(n&&!i&&(this.openDragLock?.(),this.openDragLock=Hl(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints();let{projection:o}=this.visualElement;o&&(o.isAnimationBlocked=!0,o.target=void 0),_c(e=>{let t=this.getAxisMotionValue(e).get()||0;if(xn(t)&&(t=j(t,this.visualElement.current)||0),wn.test(t))t=parseFloat(t);else if(nn.test(t)){let n=o?.layout?.layoutBox[e];n&&(t=W(n)*(parseFloat(t)/100))}this.originPoint[e]=t}),this.point=typeof r==`function`&&r(this),a&&H.update(()=>a(e,t),!1,!0),fs(this.visualElement,`transform`),this.visualElement.animationState?.setActive(`whileDrag`,!0)},i=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){if(this.currentDirection=cu(o),this.currentDirection===null)return;i&&i(this.currentDirection)}this.updateAxis(`x`,o),this.updateAxis(`y`,o),this.point&&this.point.move(),this.visualElement.render(),a&&H.update(()=>a(e,t),!1,!0)},a=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},o=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints||this.point)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:s}=this.getProps();this.panSession=new Ol(e,{onSessionStart:n,onStart:r,onMove:i,onSessionEnd:a,resumeAnimation:o},{...t,transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,contextWindow:this.visualElement.current?.ownerDocument.defaultView,element:this.visualElement.current})}stop(e,t,n){let r=e||this.latestPointerEvent,i=t||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!r)return;let{velocity:o}=i;this.startAnimation(o,n);let{onDragEnd:s}=this.getProps();s&&H.postRender(()=>s(r,i))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession(),!this.getProps().dragPropagation&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t?.setActive(`whileDrag`,!1)}endPanSession(){this.panSession?.end(),this.panSession=void 0}updateAxis(e,t){let{drag:n}=this.readProps();if(!t||!su(e,n,this.currentDirection))return;let r=this.getAxisMotionValue(e),i=this.originPoint[e]+t[e],a=this.constraints&&this.constraints[e];a&&(i=Ul(i,a,this.elastic[e])),this.point?this.point[e]=i:r.set(i)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),{projection:n}=this.visualElement,r=n&&(n.layout||n.measure(!1)),i=this.constraints;ru(e)?this.constraints&&this.scroll===eu(n)||(this.constraints=this.resolveRefConstraints()):this.constraints=e&&r&&typeof e==`object`?Gl(r.layoutBox,e):!1,this.elastic=Zl(t),i!==this.constraints&&!ru(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&_c(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Yl(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!ru(e))return!1;let n=iu(e),{projection:r}=this.visualElement;if(!r||!r.layout)return!1;this.scroll=eu(r);let i=Xe(n,r.root,this.visualElement.getTransformPagePoint()),a=ql(r.layout.layoutBox,r.removeElementScroll(i));if(t){let e=t(T(a));this.hasMutatedConstraints=!!e,e&&(a=N(e))}return a}startAnimation(e,t){let{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),c={bounceStiffness:i?200:1e6,bounceDamping:i?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...a},l=i=>r&&!(this.point&&o)&&su(i,t||n,this.currentDirection)?e[i]:0;if(this.point&&!o)return this.point.release({x:l(`x`),y:l(`y`)},c).then(s);let u=this.constraints||{},d=_c(e=>{if(!su(e,t||n,this.currentDirection))return;let r=u[e]||{};(o===!0||o===e)&&(r={min:0,max:0});let i={type:`inertia`,velocity:l(e),...c,...r};return this.startAxisValueAnimation(e,i)});return Promise.all(d).then(s)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return fs(this.visualElement,e),n.start(ae(e,n,0,t,this.visualElement,!1))}stopAnimation(){_c(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.readProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor({clientX:e,clientY:t}){let{drag:n}=this.getProps(),r={x:e,y:t},i=this.visualElement.getTransformPagePoint()?.(r)||r,a=this.visualElement.measureViewportBox();_c(e=>{if(!su(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-F(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!ru(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};_c(e=>{let t=this.getAxisMotionValue(e).get();i[e]=Jl({min:t,max:t},r[e])});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},``):`none`,n.root?.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),_c(t=>{let n=this.getAxisMotionValue(t);if(!su(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(F(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;tu.set(this.visualElement,this);let e=this.visualElement.current,t=ul(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&zl(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps(),r=ru(t)&&iu(t);r&&(this.constraints=this.resolveRefConstraints(),n||=ou(e,r,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i.layout||(i.root?.updateScroll(),i.updateLayout()),H.read(r);let o=el(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(_c(t=>{if(!su(t,this.getProps().drag,this.currentDirection))return;let n=this.getAxisMotionValue(t);this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate)}),this.visualElement.render())}));return()=>{o(),t(),a(),s(),n?.()}}getProps(){let e=this.readProps(),{dragElastic:t=Xl,dragMomentum:n=!0}=e;return{...e,dragElastic:t,dragMomentum:n}}};function ru(e){return!!e&&typeof e==`object`&&(`current`in e||`nodeType`in e)}var iu=e=>`current`in e?e.current:e;function au(e){let t=!0;return()=>{t?t=!1:e()}}function ou(e,t,n){let r=wl(e,au(n)),i=wl(t,au(n));return()=>{r(),i()}}function su(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function cu(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}function lu(e,t){let n=P(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},O(()=>r.abort())]}function uu(e){return!(e.pointerType===`touch`||Vl())}function du(e,t,n={}){t=D(t);let[r,i,a]=lu(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{e.pointerType!==`touch`&&(n?r=!0:s(e))};e.addEventListener(`pointerenter`,n=>{if(!uu(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var fu=(e,t)=>t?e===t||fu(e,t.parentElement):!1,pu=new WeakSet;function mu(e){return t=>{t.key===`Enter`&&e(t)}}function hu(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var gu=(e,t)=>{let n=!1,r=mu(()=>{n||pu.has(e)||(n=!0,hu(e,`down`))}),i=mu(()=>{n&&(n=!1,hu(e,`up`))});e.addEventListener(`keydown`,r,t),e.addEventListener(`keyup`,i,t),e.addEventListener(`blur`,()=>{e.removeEventListener(`keydown`,r),e.removeEventListener(`keyup`,i),n&&hu(e,`cancel`)},{...t,once:!0})};function _u(e){return sl(e)&&!Vl()}var vu=new WeakSet,yu=100,bu=8,xu=(e,t,n)=>Math.hypot(e.clientX-t.clientX,e.clientY-t.clientY)>n,Su=e=>e.preventDefault();function Cu(e,t,n={}){t=D(t);let[r,i,a]=lu(e,n),o=new WeakMap,s=e=>{let r=e.currentTarget;if(!_u(e)||vu.has(e))return;n.stopPropagation&&vu.add(e);let{count:a=1,countTimeout:s=.3,hold:c=0,repeat:l}=n,u=zn.now(),d=Dn(c),f=Dn(s),p=o.get(r);p?.expire(xu(p.event,e,yu))?p=void 0:p&&(gn(p.expire),o.delete(r));let m=p?p.count+1:1,h=m>=a,g=h&&(c||l),_=!c,v=0,y;if(pu.add(r),p)y=p.handlers;else{let n=t(r,e);y=typeof n==`function`?{onComplete:n}:n||{}}h&&_&&y.onActive?.();let b=Dn(l),x=d||b,S=u+x,C=!0,w=()=>{if(i.signal.aborted)return gn(w);let e=Math.min(1-(S-zn.now())/x,1);C&&e<1&&(e=0),C=!1,y.onHold?.(e),e<1||(_?y.onRepeat?.(++v):(_=!0,y.onActive?.()),l?(C=!0,S+=x=b):gn(w))},T={...i,capture:!0},E=(t,n)=>{if(sl(t)){if(window.removeEventListener(`pointerup`,D,T),window.removeEventListener(`pointercancel`,O,T),window.removeEventListener(`pointermove`,k,T),r.removeEventListener(`contextmenu`,Su),gn(w),pu.delete(r),Vl()&&(n=!1),n&&!h){let n=zn.now(),a=e=>{let s=i.signal.aborted;if(s||e===!0||zn.now()-n>f)return gn(a),o.delete(r),s||y.onComplete?.(t,{success:!1}),!0};o.set(r,{count:m,event:e,handlers:y,expire:a}),H.update(a,!0)}else y.onComplete?.(t,{success:n&&_})}},D=e=>{E(e,r===window||r===document||n.useGlobalTarget||fu(r,e.target))},O=e=>{E(e,!1)},k=t=>{sl(t)&&((l||!_)&&xu(e,t,bu)||a>1&&Vl())&&O(t)};window.addEventListener(`pointerup`,D,T),window.addEventListener(`pointercancel`,O,T),(g||a>1)&&window.addEventListener(`pointermove`,k,T),g&&(H.update(w,!0),r.addEventListener(`contextmenu`,Su,{...i,passive:!1}))};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,s,i),Re(e)&&(e.addEventListener(`focus`,()=>gu(e,i),i),!Ll(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function wu(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],a=e[2+n],o=e[3+n],s=ie(i,a,o);return t?s(r):s}var Tu=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},Eu=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]);function Du(e,t,n,r){il(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(Eu.has(n)?n:tt(n),t.attrs[n])}var Ou=class extends rl{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=U}getBaseTargetFromProps(e,t){return dn.has(t)?super.getBaseTargetFromProps(e,t)??fn(t):e[t]}getDefaultValue(e){return dn.has(e)?this.latestValues[e]??fn(e):void 0}readValueFromInstance(e,t){if(dn.has(t)){let e=ln(t);return e&&e.default||0}if(kn.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=Eu.has(t)?t:tt(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return ua(e,t,n)}build(e,t,n){bn(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Du(e,t,n,r)}mount(e){this.isSVGTag=Ga(e.tagName),super.mount(e)}};function ku(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var Au=[...Ki].reverse(),ju=e=>e?.out===!0?e:e?.out;function Mu(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>vs(e,t,n))),n=Pu(),r=!0,i=!1;function a(a){let{props:o,parent:s,manuallyAnimateOnMount:c}=e,{initial:l}=o,u=r||i,d=[],f=(t=l)=>typeof t!=`boolean`&&as(e,Array.isArray(t)?t[0]:t,e.presenceContext?.custom)||void 0,p=new Map,m={},h=1/0,g=e;do g=g.props.inherit!==!1&&g.parent;while(g&&!g.isControllingVariants);let _=u&&ju(f(l??(g&&g.props.initial))?.transition);if(Au.forEach((t,r)=>{let i=n[t],l=o[t],f=g&&g.props[t],v=l===void 0?bi(f)||f===!1?f:void 0:l,y=bi(v),b=t===a?i.isActive:null,x=y&&l===void 0&&!(u&&c);if(i.protectedKeys={...m},!i.isActive&&b===null||!v&&!i.prevProp||Ya(v)||typeof v==`boolean`)return;if(b===!1&&(h=r),t===`exit`&&i.isActive&&b!==!0){m={...m,...i.prevResolvedValues};return}let S=Nu(i.prevProp,v),C=S||y&&(b&&!x||r>h),w=!1,T=Array.isArray(v)?v:[v],E={},D;if(b!==!1)for(let n of T){let{transition:r,transitionEnd:i,...a}=as(e,n,os(e,t))||{};E={...E,...a,...i},D=ju(r)||D}let{prevResolvedValues:O}=i;for(let t in{...O,...E}){if(t in m)continue;let n=E[t],r=O[t],a=Array.isArray(n)&&Array.isArray(r)?!ku(n,r)||S:n!==r,o;if(a&&n==null)p.has(t)||p.set(t,i.prevOut);else if(a||n!==void 0&&p.has(t)){C=!0,o=p.get(t)||_,p.delete(t)&&(w=!0),i.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)}else i.protectedKeys[t]=!0;i.out[t]=o}if(i.prevProp=v,i.prevResolvedValues=E,i.prevOut=D,i.isActive&&(m={...m,...E}),C&&(!(x&&S)||w))for(let n of T){let r={type:t};if(typeof n==`string`&&u&&c&&s?.enteringChildren){let t=as(s,n)?.transition?.delayChildren;r.delay=is(s.enteringChildren,e,t)}d.push({animation:n,options:r})}}),p.size){let t={},n=f(),r=n?.transition;p.forEach((i,a)=>{i&&(r={...r||e.getDefaultTransition(),[a]:i});let s=e.getValue(a);s&&(s.liveStyle=!0);let c=n&&!Array.isArray(l)?n[a]:void 0,u=e.getBaseTargetFromProps(o,a);t[a]=(c===void 0?u!==void 0&&!Sn(u)?u:e.initialValues[a]===void 0?e.baseTarget[a]:void 0:c)??null}),r&&(t.transition=r),d.push({animation:t})}let v=u&&e.blockInitialAnimation||r&&!c&&(o.initial===!1||o.initial===o.animate);return r=i=!1,!v&&d.length?t(d):Promise.resolve()}function o(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=a(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:a,setActive:o,setAnimateFunction:n=>{t=n(e)},getState:()=>n,reset:()=>{n=Pu(),i=!0}}}function Nu(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!ku(t,e):!1}function Pu(){let e={};for(let t of Ki)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return e}var Fu=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,Iu=e=>{let t=Fu();return e.match(t)?.[0]},G=Kt(),K=t(Pt(),1),Lu=e=>{let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return Math.abs(t)},Ru=(e,t)=>Math.floor(e/10**t%10),zu=(e,t)=>!(Ru(e,t)%2),q=(e,t,n)=>{let r=e%t;return n&&Ru(e,n)%2==0?-r:r},Bu=(e,t,n)=>t[e%n],Vu=e=>{e.slice(0,1)===`#`&&(e=e.slice(1));let t=parseInt(e.substr(0,2),16),n=parseInt(e.substr(2,2),16),r=parseInt(e.substr(4,2),16);return(t*299+n*587+r*114)/1e3>=128?`#000000`:`#FFFFFF`},Hu=4,J=80;function Uu(e,t){let n=Lu(e),r=t&&t.length;return Array.from({length:Hu},(e,i)=>({color:Bu(n+i,t,r),translateX:q(n*(i+1),J/2-(i+17),1),translateY:q(n*(i+1),J/2-(i+17),2),rotate:q(n*(i+1),360),isSquare:zu(n,2)}))}var Wu=({name:e,colors:t,title:n,square:r,size:i,...a})=>{let o=Uu(e,t),s=K.useId();return(0,G.jsxs)(`svg`,{viewBox:`0 0 80 80`,fill:`none`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,width:i,height:i,...a,children:[n&&(0,G.jsx)(`title`,{children:e}),(0,G.jsx)(`mask`,{id:s,maskUnits:`userSpaceOnUse`,x:0,y:0,width:J,height:J,children:(0,G.jsx)(`rect`,{width:J,height:J,rx:r?void 0:160,fill:`#FFFFFF`})}),(0,G.jsxs)(`g`,{mask:`url(#${s})`,children:[(0,G.jsx)(`rect`,{width:J,height:J,fill:o[0].color}),(0,G.jsx)(`rect`,{x:10,y:30,width:J,height:o[1].isSquare?J:J/8,fill:o[1].color,transform:`translate(`+o[1].translateX+` `+o[1].translateY+`) rotate(`+o[1].rotate+` 40 40)`}),(0,G.jsx)(`circle`,{cx:J/2,cy:J/2,fill:o[2].color,r:J/5,transform:`translate(`+o[2].translateX+` `+o[2].translateY+`)`}),(0,G.jsx)(`line`,{x1:0,y1:J/2,x2:J,y2:J/2,strokeWidth:2,stroke:o[3].color,transform:`translate(`+o[3].translateX+` `+o[3].translateY+`) rotate(`+o[3].rotate+` 40 40)`})]})]})},Gu=90,Ku=5;function qu(e,t){let n=Lu(e),r=t&&t.length,i=Array.from({length:Ku},(e,i)=>Bu(n+i,t,r)),a=[];return a[0]=i[0],a[1]=i[1],a[2]=i[1],a[3]=i[2],a[4]=i[2],a[5]=i[3],a[6]=i[3],a[7]=i[0],a[8]=i[4],a}var Ju=({name:e,colors:t,title:n,square:r,size:i,...a})=>{let o=qu(e,t),s=K.useId();return(0,G.jsxs)(`svg`,{viewBox:`0 0 90 90`,fill:`none`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,width:i,height:i,...a,children:[n&&(0,G.jsx)(`title`,{children:e}),(0,G.jsx)(`mask`,{id:s,maskUnits:`userSpaceOnUse`,x:0,y:0,width:Gu,height:Gu,children:(0,G.jsx)(`rect`,{width:Gu,height:Gu,rx:r?void 0:180,fill:`#FFFFFF`})}),(0,G.jsxs)(`g`,{mask:`url(#${s})`,children:[(0,G.jsx)(`path`,{d:`M0 0h90v45H0z`,fill:o[0]}),(0,G.jsx)(`path`,{d:`M0 45h90v45H0z`,fill:o[1]}),(0,G.jsx)(`path`,{d:`M83 45a38 38 0 00-76 0h76z`,fill:o[2]}),(0,G.jsx)(`path`,{d:`M83 45a38 38 0 01-76 0h76z`,fill:o[3]}),(0,G.jsx)(`path`,{d:`M77 45a32 32 0 10-64 0h64z`,fill:o[4]}),(0,G.jsx)(`path`,{d:`M77 45a32 32 0 11-64 0h64z`,fill:o[5]}),(0,G.jsx)(`path`,{d:`M71 45a26 26 0 00-52 0h52z`,fill:o[6]}),(0,G.jsx)(`path`,{d:`M71 45a26 26 0 01-52 0h52z`,fill:o[7]}),(0,G.jsx)(`circle`,{cx:45,cy:45,r:23,fill:o[8]})]})]})},Yu=64,Xu=80;function Zu(e,t){let n=Lu(e),r=t&&t.length;return Array.from({length:Yu},(e,i)=>Bu(n%(i+1),t,r))}var Qu=({name:e,colors:t,title:n,square:r,size:i,...a})=>{let o=Zu(e,t),s=K.useId();return(0,G.jsxs)(`svg`,{viewBox:`0 0 80 80`,fill:`none`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,width:i,height:i,...a,children:[n&&(0,G.jsx)(`title`,{children:e}),(0,G.jsx)(`mask`,{id:s,"mask-type":`alpha`,maskUnits:`userSpaceOnUse`,x:0,y:0,width:Xu,height:Xu,children:(0,G.jsx)(`rect`,{width:Xu,height:Xu,rx:r?void 0:160,fill:`#FFFFFF`})}),(0,G.jsxs)(`g`,{mask:`url(#${s})`,children:[(0,G.jsx)(`rect`,{width:10,height:10,fill:o[0]}),(0,G.jsx)(`rect`,{x:20,width:10,height:10,fill:o[1]}),(0,G.jsx)(`rect`,{x:40,width:10,height:10,fill:o[2]}),(0,G.jsx)(`rect`,{x:60,width:10,height:10,fill:o[3]}),(0,G.jsx)(`rect`,{x:10,width:10,height:10,fill:o[4]}),(0,G.jsx)(`rect`,{x:30,width:10,height:10,fill:o[5]}),(0,G.jsx)(`rect`,{x:50,width:10,height:10,fill:o[6]}),(0,G.jsx)(`rect`,{x:70,width:10,height:10,fill:o[7]}),(0,G.jsx)(`rect`,{y:10,width:10,height:10,fill:o[8]}),(0,G.jsx)(`rect`,{y:20,width:10,height:10,fill:o[9]}),(0,G.jsx)(`rect`,{y:30,width:10,height:10,fill:o[10]}),(0,G.jsx)(`rect`,{y:40,width:10,height:10,fill:o[11]}),(0,G.jsx)(`rect`,{y:50,width:10,height:10,fill:o[12]}),(0,G.jsx)(`rect`,{y:60,width:10,height:10,fill:o[13]}),(0,G.jsx)(`rect`,{y:70,width:10,height:10,fill:o[14]}),(0,G.jsx)(`rect`,{x:20,y:10,width:10,height:10,fill:o[15]}),(0,G.jsx)(`rect`,{x:20,y:20,width:10,height:10,fill:o[16]}),(0,G.jsx)(`rect`,{x:20,y:30,width:10,height:10,fill:o[17]}),(0,G.jsx)(`rect`,{x:20,y:40,width:10,height:10,fill:o[18]}),(0,G.jsx)(`rect`,{x:20,y:50,width:10,height:10,fill:o[19]}),(0,G.jsx)(`rect`,{x:20,y:60,width:10,height:10,fill:o[20]}),(0,G.jsx)(`rect`,{x:20,y:70,width:10,height:10,fill:o[21]}),(0,G.jsx)(`rect`,{x:40,y:10,width:10,height:10,fill:o[22]}),(0,G.jsx)(`rect`,{x:40,y:20,width:10,height:10,fill:o[23]}),(0,G.jsx)(`rect`,{x:40,y:30,width:10,height:10,fill:o[24]}),(0,G.jsx)(`rect`,{x:40,y:40,width:10,height:10,fill:o[25]}),(0,G.jsx)(`rect`,{x:40,y:50,width:10,height:10,fill:o[26]}),(0,G.jsx)(`rect`,{x:40,y:60,width:10,height:10,fill:o[27]}),(0,G.jsx)(`rect`,{x:40,y:70,width:10,height:10,fill:o[28]}),(0,G.jsx)(`rect`,{x:60,y:10,width:10,height:10,fill:o[29]}),(0,G.jsx)(`rect`,{x:60,y:20,width:10,height:10,fill:o[30]}),(0,G.jsx)(`rect`,{x:60,y:30,width:10,height:10,fill:o[31]}),(0,G.jsx)(`rect`,{x:60,y:40,width:10,height:10,fill:o[32]}),(0,G.jsx)(`rect`,{x:60,y:50,width:10,height:10,fill:o[33]}),(0,G.jsx)(`rect`,{x:60,y:60,width:10,height:10,fill:o[34]}),(0,G.jsx)(`rect`,{x:60,y:70,width:10,height:10,fill:o[35]}),(0,G.jsx)(`rect`,{x:10,y:10,width:10,height:10,fill:o[36]}),(0,G.jsx)(`rect`,{x:10,y:20,width:10,height:10,fill:o[37]}),(0,G.jsx)(`rect`,{x:10,y:30,width:10,height:10,fill:o[38]}),(0,G.jsx)(`rect`,{x:10,y:40,width:10,height:10,fill:o[39]}),(0,G.jsx)(`rect`,{x:10,y:50,width:10,height:10,fill:o[40]}),(0,G.jsx)(`rect`,{x:10,y:60,width:10,height:10,fill:o[41]}),(0,G.jsx)(`rect`,{x:10,y:70,width:10,height:10,fill:o[42]}),(0,G.jsx)(`rect`,{x:30,y:10,width:10,height:10,fill:o[43]}),(0,G.jsx)(`rect`,{x:30,y:20,width:10,height:10,fill:o[44]}),(0,G.jsx)(`rect`,{x:30,y:30,width:10,height:10,fill:o[45]}),(0,G.jsx)(`rect`,{x:30,y:40,width:10,height:10,fill:o[46]}),(0,G.jsx)(`rect`,{x:30,y:50,width:10,height:10,fill:o[47]}),(0,G.jsx)(`rect`,{x:30,y:60,width:10,height:10,fill:o[48]}),(0,G.jsx)(`rect`,{x:30,y:70,width:10,height:10,fill:o[49]}),(0,G.jsx)(`rect`,{x:50,y:10,width:10,height:10,fill:o[50]}),(0,G.jsx)(`rect`,{x:50,y:20,width:10,height:10,fill:o[51]}),(0,G.jsx)(`rect`,{x:50,y:30,width:10,height:10,fill:o[52]}),(0,G.jsx)(`rect`,{x:50,y:40,width:10,height:10,fill:o[53]}),(0,G.jsx)(`rect`,{x:50,y:50,width:10,height:10,fill:o[54]}),(0,G.jsx)(`rect`,{x:50,y:60,width:10,height:10,fill:o[55]}),(0,G.jsx)(`rect`,{x:50,y:70,width:10,height:10,fill:o[56]}),(0,G.jsx)(`rect`,{x:70,y:10,width:10,height:10,fill:o[57]}),(0,G.jsx)(`rect`,{x:70,y:20,width:10,height:10,fill:o[58]}),(0,G.jsx)(`rect`,{x:70,y:30,width:10,height:10,fill:o[59]}),(0,G.jsx)(`rect`,{x:70,y:40,width:10,height:10,fill:o[60]}),(0,G.jsx)(`rect`,{x:70,y:50,width:10,height:10,fill:o[61]}),(0,G.jsx)(`rect`,{x:70,y:60,width:10,height:10,fill:o[62]}),(0,G.jsx)(`rect`,{x:70,y:70,width:10,height:10,fill:o[63]})]})]})},$u=36;function ed(e,t){let n=Lu(e),r=t&&t.length,i=Bu(n,t,r),a=q(n,10,1),o=a<5?a+$u/9:a,s=q(n,10,2),c=s<5?s+$u/9:s;return{wrapperColor:i,faceColor:Vu(i),backgroundColor:Bu(n+13,t,r),wrapperTranslateX:o,wrapperTranslateY:c,wrapperRotate:q(n,360),wrapperScale:1+q(n,$u/12)/10,isMouthOpen:zu(n,2),isCircle:zu(n,1),eyeSpread:q(n,5),mouthSpread:q(n,3),faceRotate:q(n,10,3),faceTranslateX:o>$u/6?o/2:q(n,8,1),faceTranslateY:c>$u/6?c/2:q(n,7,2)}}var td=({name:e,colors:t,title:n,square:r,size:i,...a})=>{let o=ed(e,t),s=K.useId();return(0,G.jsxs)(`svg`,{viewBox:`0 0 36 36`,fill:`none`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,width:i,height:i,...a,children:[n&&(0,G.jsx)(`title`,{children:e}),(0,G.jsx)(`mask`,{id:s,maskUnits:`userSpaceOnUse`,x:0,y:0,width:$u,height:$u,children:(0,G.jsx)(`rect`,{width:$u,height:$u,rx:r?void 0:72,fill:`#FFFFFF`})}),(0,G.jsxs)(`g`,{mask:`url(#${s})`,children:[(0,G.jsx)(`rect`,{width:$u,height:$u,fill:o.backgroundColor}),(0,G.jsx)(`rect`,{x:`0`,y:`0`,width:$u,height:$u,transform:`translate(`+o.wrapperTranslateX+` `+o.wrapperTranslateY+`) rotate(`+o.wrapperRotate+` 18 18) scale(`+o.wrapperScale+`)`,fill:o.wrapperColor,rx:o.isCircle?$u:$u/6}),(0,G.jsxs)(`g`,{transform:`translate(`+o.faceTranslateX+` `+o.faceTranslateY+`) rotate(`+o.faceRotate+` 18 18)`,children:[o.isMouthOpen?(0,G.jsx)(`path`,{d:`M15 `+(19+o.mouthSpread)+`c2 1 4 1 6 0`,stroke:o.faceColor,fill:`none`,strokeLinecap:`round`}):(0,G.jsx)(`path`,{d:`M13,`+(19+o.mouthSpread)+` a1,0.75 0 0,0 10,0`,fill:o.faceColor}),(0,G.jsx)(`rect`,{x:14-o.eyeSpread,y:14,width:1.5,height:2,rx:1,stroke:`none`,fill:o.faceColor}),(0,G.jsx)(`rect`,{x:20+o.eyeSpread,y:14,width:1.5,height:2,rx:1,stroke:`none`,fill:o.faceColor})]})]})]})},nd=4,rd=80;function id(e,t){let n=Lu(e),r=t&&t.length;return Array.from({length:nd},(e,i)=>Bu(n+i,t,r))}var ad=({name:e,colors:t,title:n,square:r,size:i,...a})=>{let o=id(e,t),s=e.replace(/\s/g,``),c=K.useId();return(0,G.jsxs)(`svg`,{viewBox:`0 0 80 80`,fill:`none`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,width:i,height:i,...a,children:[n&&(0,G.jsx)(`title`,{children:e}),(0,G.jsx)(`mask`,{id:c,maskUnits:`userSpaceOnUse`,x:0,y:0,width:rd,height:rd,children:(0,G.jsx)(`rect`,{width:rd,height:rd,rx:r?void 0:160,fill:`#FFFFFF`})}),(0,G.jsxs)(`g`,{mask:`url(#${c})`,children:[(0,G.jsx)(`path`,{fill:`url(#gradient_paint0_linear_`+s+`)`,d:`M0 0h80v40H0z`}),(0,G.jsx)(`path`,{fill:`url(#gradient_paint1_linear_`+s+`)`,d:`M0 40h80v40H0z`})]}),(0,G.jsxs)(`defs`,{children:[(0,G.jsxs)(`linearGradient`,{id:`gradient_paint0_linear_`+s,x1:rd/2,y1:0,x2:rd/2,y2:rd/2,gradientUnits:`userSpaceOnUse`,children:[(0,G.jsx)(`stop`,{stopColor:o[0]}),(0,G.jsx)(`stop`,{offset:1,stopColor:o[1]})]}),(0,G.jsxs)(`linearGradient`,{id:`gradient_paint1_linear_`+s,x1:rd/2,y1:rd/2,x2:rd/2,y2:rd,gradientUnits:`userSpaceOnUse`,children:[(0,G.jsx)(`stop`,{stopColor:o[2]}),(0,G.jsx)(`stop`,{offset:1,stopColor:o[3]})]})]})]})},od=3,sd=80;function cd(e,t){let n=Lu(e),r=t&&t.length;return Array.from({length:od},(e,i)=>({color:Bu(n+i,t,r),translateX:q(n*(i+1),sd/10,1),translateY:q(n*(i+1),sd/10,2),scale:1.2+q(n*(i+1),sd/20)/10,rotate:q(n*(i+1),360,1)}))}var ld=({name:e,colors:t,title:n,square:r,size:i,...a})=>{let o=cd(e,t),s=K.useId();return(0,G.jsxs)(`svg`,{viewBox:`0 0 80 80`,fill:`none`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,width:i,height:i,...a,children:[n&&(0,G.jsx)(`title`,{children:e}),(0,G.jsx)(`mask`,{id:s,maskUnits:`userSpaceOnUse`,x:0,y:0,width:sd,height:sd,children:(0,G.jsx)(`rect`,{width:sd,height:sd,rx:r?void 0:160,fill:`#FFFFFF`})}),(0,G.jsxs)(`g`,{mask:`url(#${s})`,children:[(0,G.jsx)(`rect`,{width:sd,height:sd,fill:o[0].color}),(0,G.jsx)(`path`,{filter:`url(#filter_${s})`,d:`M32.414 59.35L50.376 70.5H72.5v-71H33.728L26.5 13.381l19.057 27.08L32.414 59.35z`,fill:o[1].color,transform:`translate(`+o[1].translateX+` `+o[1].translateY+`) rotate(`+o[1].rotate+` 40 40) scale(`+o[2].scale+`)`}),(0,G.jsx)(`path`,{filter:`url(#filter_${s})`,style:{mixBlendMode:`overlay`},d:`M22.216 24L0 46.75l14.108 38.129L78 86l-3.081-59.276-22.378 4.005 12.972 20.186-23.35 27.395L22.215 24z`,fill:o[2].color,transform:`translate(`+o[2].translateX+` `+o[2].translateY+`) rotate(`+o[2].rotate+` 40 40) scale(`+o[2].scale+`)`})]}),(0,G.jsx)(`defs`,{children:(0,G.jsxs)(`filter`,{id:`filter_${s}`,filterUnits:`userSpaceOnUse`,colorInterpolationFilters:`sRGB`,children:[(0,G.jsx)(`feFlood`,{floodOpacity:0,result:`BackgroundImageFix`}),(0,G.jsx)(`feBlend`,{in:`SourceGraphic`,in2:`BackgroundImageFix`,result:`shape`}),(0,G.jsx)(`feGaussianBlur`,{stdDeviation:7,result:`effect1_foregroundBlur`})]})})]})},ud={pixel:Qu,bauhaus:Wu,ring:Ju,beam:td,sunset:ad,marble:ld,geometric:td,abstract:Wu},dd=({variant:e=`marble`,colors:t=[`#92A1C6`,`#146A7C`,`#F0AB3D`,`#C271B4`,`#C20D90`],name:n=`Clara Barton`,title:r=!1,size:i=`40px`,square:a=!1,...o})=>{let s=ud[e]||ld;return(0,G.jsx)(s,{colors:t,name:n,title:r,size:i,square:a,...o})},fd=Nt({block:`img`,elements:[]}),pd=e=>(0,K.memo)(t=>(0,K.createElement)(e,t)),md=({unoptimized:e,...t})=>{let n=(0,K.use)(Le),r=n?.imgAs||`img`,i=(0,K.useMemo)(()=>pd(r),[r]);return(0,G.jsx)(i,{unoptimized:e===void 0?n?.imgUnoptimized:e,...t,className:V(fd(),t.className)})};md.displayName=`Img`;var hd=Nt({block:`fluent-emoji`,elements:[]}),gd={container:{kLWn49:`lbo5v014`,kVAEAm:`lb1n2onr6`,k9WMMc:`lb2b8uid`,$$css:!0}};function _d(e){return[...e].map(e=>e?.codePointAt(0)?.toString(16)).join(`-`)}function vd(e){let t=_d(e).split(`-`)[0];return t<`1f469`?`@lobehub/fluent-emoji-anim-1`:t>=`1f469`&&t<`1f620`?`@lobehub/fluent-emoji-anim-2`:t>=`1f620`&&t<`1f9a0`?`@lobehub/fluent-emoji-anim-3`:`@lobehub/fluent-emoji-anim-4`}var yd=(e,t)=>{let n=[`anim`,`3d`].includes(t)?`webp`:`svg`;switch(t){case`raw`:return null;case`anim`:return{path:`assets/${_d(e)}.${n}`,pkg:vd(e),version:`latest`};case`3d`:return{path:`assets/${_d(e)}.${n}`,pkg:`@lobehub/fluent-emoji-3d`,version:`latest`};case`flat`:return{path:`assets/${_d(e)}.${n}`,pkg:`@lobehub/fluent-emoji-flat`,version:`latest`};case`modern`:return{path:`assets/${_d(e)}.${n}`,pkg:`@lobehub/fluent-emoji-modern`,version:`latest`};case`mono`:return{path:`assets/${_d(e)}.${n}`,pkg:`@lobehub/fluent-emoji-mono`,version:`latest`}}},bd=({emoji:e,className:t,style:n,type:r=`3d`,size:i=40,unoptimized:a,ref:o,...s})=>{let[c,l]=(0,K.useState)(!1),u=Ne(),d=(0,K.useMemo)(()=>yd(e,r),[r,e]);return r===`raw`||!d||c?(0,G.jsx)(hn,{flex:`none`,height:i,ref:o,role:`img`,width:i,...s,...B(gd.container,V(hd(),t),{fontSize:i*.9,...n}),children:e}):(0,G.jsx)(md,{alt:e,className:V(hd(),t),height:i,loading:`lazy`,ref:o,src:u(d),style:{flex:`none`,...n},unoptimized:a,width:i,onError:()=>l(!0),...s})};bd.displayName=`FluentEmoji`;var xd=e=>`oklch(from ${e} clamp(0, (l - 0.62) * -1000, 1) 0 h / 1)`,Sd=Nt({block:`avatar`,dataAttributes:[`shape`,`variant`,`shadow`],elements:[`loading`,`img`,`content`,`fallback`]}),Cd=Nt({block:`avatar-group`,elements:[`avatar`,`count`,`item`,`badge`]}),wd={circle:{kaIpWk:`lb16rqkct`,$$css:!0},clickable:{kkrTdU:`lb1ypdohk`,$$css:!0},defaultBackground:{kWkggS:`lb1yqcoyj`,$$css:!0},defaultColor:{kMwMTN:`lb6dwly7`,$$css:!0},defaultEmojiFont:{kGuDYH:`lbh7pmyk`,$$css:!0},defaultSize:{kGuDYH:`lb1pvqxga`,kZKoxP:`lbsdox4t`,kzqmXN:`lb1useyqa`,$$css:!0},defaultSquare:{kaIpWk:`lbur7f20`,$$css:!0},content:{kmVPX3:`lb1717udv`,kVQacm:`lbb3r6kr`,kGNEyG:`lb6s0dn4`,kMwMTN:`lb1heor9g`,k1xSpc:`lb78zum5`,kGuDYH:`lb1qlqyl8`,k63SB2:`lbjs9k72`,kjj79g:`lbl56j7k`,kLWn49:`lbo5v014`,kZKoxP:`lb5yr21d`,kzqmXN:`lbh8yej3`,$$css:!0},fallback:{kUk6DE:`lb1okw0bk`,k1xSpc:`lb1lliihq`,kZKoxP:`lb5yr21d`,kzqmXN:`lbh8yej3`,$$css:!0},img:{kUk6DE:`lb1okw0bk`,kVIFPx:`lbl1xv1r`,kZKoxP:`lb5yr21d`,kzqmXN:`lbh8yej3`,$$css:!0},loading:{kpwlN0:`lb10a8y8t`,kWkggS:`lb1a3x57l`,kMwMTN:`lbfungia`,kVAEAm:`lb10l6tqk`,$$css:!0},root:{kUk6DE:`lb1okw0bk`,kVQacm:`lbb3r6kr`,kGNEyG:`lb6s0dn4`,kWkggS:`lbjbqb8w`,k1xSpc:`lb78zum5`,kjj79g:`lbl56j7k`,kVAEAm:`lb1n2onr6`,kfSwDN:`lb87ps6o`,$$css:!0},shadow:{kGVxlE:`lbpjwdtl`,$$css:!0}},Td=e=>e?!!(typeof e==`string`&&[`/`,`http`,`data:`].some(t=>e.startsWith(t))||(0,K.isValidElement)(e)):!1,Ed=e=>!!(e&&e!==`transparent`&&e!==`rgba(0,0,0,0)`&&e!==null),Dd=(e,t)=>{if(!e)return``;let n=e.toUpperCase();return t?n.slice(0,2):n},Od=(e,t,n)=>n?t?e*.85:e:e*.85,kd=[`#383838`,`#7858f9`,`#f8f7bf`,`#ffdd1f`,`#f88c13`],Ad=(e,t,n)=>(t||n||typeof e==`string`&&e||void 0)?.trim().replaceAll(/[\s"'()#\\]+/g,`_`)||void 0,jd={borderless:E.variantBorderlessWithoutHover,filled:E.variantFilledWithoutHover,outlined:E.variantOutlinedWithoutHover},Md=(0,K.memo)(({alt:e,animation:t,avatar:n,background:r,bordered:i,borderedColor:a,className:o,classNames:s,crossOrigin:c,draggable:l=!1,emojiScaleWithBackground:u=!0,fallbackColors:d,fallbackVariant:f=`marble`,loading:p,ref:m,shadow:h,shape:g=`square`,size:_,sliceText:v=!0,style:y,styles:b,title:x,tooltipProps:S,unoptimized:C,variant:w=`borderless`,xstyle:T,contentXstyle:E,nativeTitle:D,...O})=>{let k=_??48,ee=typeof n==`string`,[te,ne]=(0,K.useState)(!1),A=(0,K.useMemo)(()=>Td(n),[n]),re=(0,K.useMemo)(()=>n&&ee&&!A?Iu(n):void 0,[n,ee,A]),ie=A?x:typeof n==`string`?n:void 0,j=e||x||`avatar`,ae=Ed(r),oe=A&&ee&&!te,se=A&&!ee&&!te,ce=Ad(n,x,e),M=f!==`text`&&!!ce&&!re&&!oe&&!se,le=d?.length?d:kd,ue=(0,K.useMemo)(()=>re?(0,G.jsx)(bd,{emoji:re,size:Od(k,ae,u),type:t?`anim`:`3d`,unoptimized:C}):Dd(ie||x,v),[t,re,ae,k,v,ie,x,C,u]),N=_!==void 0,de=!r&&!M&&!(A&&!te||re);return(0,G.jsxs)(`div`,{...Mt({shadow:h,shape:g,variant:w}),...O,ref:m,title:D,className:B([wd.root,jd[w],h&&wd.shadow,!N&&wd.defaultSize,!N&&!!re&&wd.defaultEmojiFont,g===`circle`?wd.circle:!N&&wd.defaultSquare,de&&wd.defaultBackground,!r&&wd.defaultColor,!!O?.onClick&&wd.clickable,T],V(Sd(),o,s?.root)).className,style:{...r&&{backgroundColor:r,color:xd(r)},...N&&{fontSize:k*(re?.7:.5),height:k,width:k,...g!==`circle`&&{borderRadius:k<24?`33%`:Math.max(k/6,2)}},...i&&{boxShadow:`${be.colorBgLayout} 0 0 0 2px, ${a||be.colorTextTertiary} 0 0 0 4px`},...y,...b?.root},children:[p&&(0,G.jsx)(hn,{flex:`none`,height:`100%`,width:`100%`,...B(wd.loading,V(Sd(`loading`),s?.loading),b?.loading),children:(0,G.jsx)(yt,{spin:!0,icon:We})}),typeof n==`string`&&oe&&(0,G.jsx)(`img`,{alt:j,crossOrigin:c,draggable:l,height:k,loading:`lazy`,src:n,width:k,...B(wd.img,V(Sd(`img`),s?.img),b?.img),onError:()=>ne(!0)}),M&&(0,G.jsx)(dd,{square:!0,"aria-label":j,colors:le,name:ce,size:`100%`,variant:f,...B(wd.fallback,V(Sd(`fallback`),s?.fallback),b?.fallback)}),!oe&&!M&&(0,G.jsx)(`span`,{...B([wd.content,E],V(Sd(`content`),s?.content),b?.content),children:se?n:ue})]})});Md.displayName=`Avatar`;var Nd=Md,Pd={avatar:{kVAM5u:`lbfbyuaw`,ksu8eU:`lb1y0btm7`,kMzoRj:`lbdh2fpr`,$$css:!0},root:{kVAEAm:`lb1n2onr6`,$$css:!0},count:{kMwMTN:`lb15g0kca`,kGuDYH:`lbsfzzmd`,$$css:!0},item:{kUk6DE:`lb1okw0bk`,k1xSpc:`lb3nfvp2`,kVAEAm:`lb1n2onr6`,$$css:!0},badge:{k1xSpc:`lb78zum5`,kt4wiu:`lbtijo5x`,kfzvcC:`lb47corl`,kVAEAm:`lb10l6tqk`,k3aq6I:`lbdu4413`,krVfgx:`lb1ey2m1c`,$$css:!0}},Fd=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.currentTarget.click())},Id=(0,K.memo)(({items:e,max:t,gap:n,variant:r=`borderless`,bordered:i,shadow:a,size:o,background:s,animation:c,draggable:l,fallbackColors:u,fallbackVariant:d,classNames:f,shape:p,styles:m,onClick:h,ref:g,zIndexReverse:_,className:v,...y})=>{let b=o??48,x=t?e.slice(0,t):e,S=e.slice(t,e.length),C=n??Math.floor(-b/4),w=S.map(e=>e.title??e.label??e.alt).filter(Boolean).join(`, `),T={animation:c,background:s,bordered:i,draggable:l,fallbackColors:u,fallbackVariant:d,shadow:a,shape:p,size:o,variant:r};return(0,G.jsxs)(sn,{horizontal:!0,gap:n,ref:g,...B(Pd.root,V(Cd(),v)),...y,children:[x.map((t,n)=>{let{key:r,style:i,className:a,ringColor:o,label:s,pressed:c,disabled:l,badge:u,onClick:d,...p}=t,g=!l&&(!!h||!!d),v={marginLeft:n===0?0:C,zIndex:u?e.length+1:_?e.length-n:n},y=(0,G.jsx)(Md,{"aria-disabled":l||void 0,"aria-label":s,"aria-pressed":g?!!c:void 0,className:V(Cd(`avatar`),f?.avatar,a),nativeTitle:s,role:g?`button`:void 0,tabIndex:g?0:void 0,xstyle:Pd.avatar,style:{...!u&&v,...o&&{boxShadow:`0 0 0 2px ${o}`},...m?.avatar,...i},onKeyDown:g?Fd:void 0,onClick:g?d??(()=>h?.({item:t,key:r})):void 0,...T,...p},u?void 0:r);if(!u)return y;let b=B(Pd.item,Cd(`item`));return(0,G.jsxs)(`span`,{className:b.className,style:{...b.style,...v},children:[y,(0,G.jsx)(`span`,{...B(Pd.badge,Cd(`badge`)),children:u})]},r)}),t&&S.length>0&&(0,G.jsx)(Md,{...T,"aria-label":w||void 0,avatar:`+${S.length}`,background:be.colorText,className:V(Cd(`count`),f?.count),contentXstyle:Pd.count,fallbackVariant:`text`,nativeTitle:w||void 0,sliceText:!1,xstyle:Pd.avatar,style:{marginLeft:C,zIndex:_?0:x.length,...m?.count}})]})});Id.displayName=`AvatarGroup`;var Ld=Nd;Ld.Group=Id;function Rd({children:e,features:t,strict:n=!1}){let[,r]=(0,K.useState)(!zd(t)),i=(0,K.useRef)(void 0);if(!zd(t)){let{renderer:e,...n}=t;i.current=e,La(n)}return(0,K.useEffect)(()=>{zd(t)&&t().then(({renderer:e,...t})=>{La(t),i.current=e,r(!0)})},[]),(0,G.jsx)(ji.Provider,{value:{renderer:i.current,strict:n},children:e})}function zd(e){return typeof e==`function`}function Bd(e,t){if(typeof Proxy>`u`)return ea;let n=new Map,r=(n,r)=>ea(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,ea(a,void 0,e,t)),n.get(a))})}var Vd=Bd(),Hd=(e,t)=>t.isSVG??Sa(e)?new Ou(t):new ol(t,{allowProjection:e!==K.Fragment}),Ud=class extends Tu{constructor(e){super(e),e.animationState||=Mu(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Ya(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){this.node.getProps().animate!==this.node.prevProps?.animate&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Wd=0,Gd={animation:{Feature:Ud},exit:{Feature:class extends Tu{constructor(){super(...arguments),this.id=Wd++}update(){let{presenceContext:e,animationState:t}=this.node;if(!e||!t)return;let{isPresent:n,onExitComplete:r}=e;if(n===!this.exit)return;if(n){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=as(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,t.reset(),t.animateChanges()}else t.setActive(`exit`,!1);this.exit=void 0;return}let i=this.exit=t.setActive(`exit`,!0);r&&i.then(()=>{this.exit===i&&(this.exit=!0,r(this.id))})}mount(){let{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id,this.node)),this.update()}unmount(){}}}},Kd=class extends Tu{constructor(e){super(e),this.removeGroupControls=_n,this.removeListeners=_n,this.controls=new nu(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||_n}update(){let{dragControls:e,drag:t}=this.node.getProps(),{dragControls:n,drag:r}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls))),r&&!t&&this.controls.stop(void 0,void 0,r)}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},qd=e=>(t,n)=>{e&&H.update(()=>e(t,n),!1,!0)},Jd=class extends Tu{constructor(){super(...arguments),this.removePointerDownListener=_n}onPointerDown(e){this.session=new Ol(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:this.node.current?.ownerDocument.defaultView})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:qd(e),onStart:qd(t),onMove:qd(n),onEnd:(e,t)=>{delete this.session,r&&H.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=ul(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session?.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session?.end()}},Yd=!1,Xd=({layout:e,layoutDependency:t,layoutAnchor:n})=>({layout:e,layoutDependency:t,layoutAnchor:n,animationType:typeof e==`string`?e:`both`}),Zd=(e,t)=>{let{snapshot:n}=e,r=e.getStack();r?.remove(e);let i=r?.lead;if(r?.prevLead===e&&i.resumeFrom===e&&(i.resumeFrom=i.currentAnimation=e.resumingFrom=void 0),e.options.layoutId=t,!t)e.needsShow=!0;else return e.root.registerSharedNode(t,e),()=>{let{resumeFrom:t}=e;t?.isPresent!==!1&&e.getStack().members.includes(t)&&(t.hide(),e.resumeFrom=void 0,e.snapshot=n)}},Qd=class extends K.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group?.add(i),r&&n?.register?.(i),Yd&&i.root.didUpdate(),i.options.layoutId!==r&&Zd(i,r)?.(),i.addEventListener(`animationComplete`,()=>this.safeToRemove()),i.setOptions({...i.options,...Xd(this.props),onExitComplete:()=>this.safeToRemove()})),bc.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,layoutId:n,visualElement:r,drag:i,isPresent:a}=this.props,{projection:o}=r;return o&&(o.isPresent=a,this.takeOver=e.layoutId===n?void 0:(o.willUpdate(),Zd(o,n)),o.setOptions({...o.options,...Xd(this.props)}),Yd=!0,i||e.layoutDependency!==t||t===void 0||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||H.postRender(()=>{o.getStack()?.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(this.takeOver?.(),e.root.didUpdate(),Fn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Yd=!0,r&&(r.scheduleCheckAfterUnmount(),t.group?.remove(r),n?.deregister?.(r))}safeToRemove(){this.props.safeToRemove?.()}render(){return null}};function $d(e){let[t,n]=Ke(),r=(0,K.useContext)(vn);return(0,G.jsx)(Qd,{...e,layoutGroup:r,switchLayoutGroup:(0,K.useContext)(wi),isPresent:t,safeToRemove:n})}var ef={pan:{Feature:Jd},drag:{Feature:Kd,ProjectionNode:nl,MeasureLayout:$d}};function tf(e,t,n,r,i){let{props:a}=e,o=`while`+n;!i&&e.animationState&&a[o]&&e.animationState.setActive(o,r===`Start`);let s=a[`on`+n+r];s&&H.postRender(()=>s(t,cl(t)))}var nf=class extends Tu{mount(){let{current:e}=this.node;e&&(this.unmount=du(e,(e,t)=>(tf(this.node,t,`Hover`,`Start`),e=>tf(this.node,e,`Hover`,`End`))))}unmount(){}},rf=class extends Tu{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}e&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=pe(el(this.node.current,`focus`,()=>this.onFocus()),el(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function af(e,t,n,r){e.current instanceof HTMLButtonElement&&e.current.disabled||tf(e,t,`Tap`,n,r)}var of=class extends Tu{constructor(){super(...arguments),this.options={}}mount(){let{current:e}=this.node;e&&(this.update(),this.unmount=Cu(e,(e,t)=>(af(this.node,t,`Start`),{onComplete:(e,{success:t})=>af(this.node,e,t?``:`Cancel`),onRepeat:()=>af(this.node,t,``,!0)}),this.options))}update(){let{options:e,node:t}=this,{globalTapTarget:n,propagate:r,tap:i}=t.props;for(let t in e)delete e[t];Object.assign(e,i,{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}},sf=new WeakMap,cf=new WeakMap,lf=e=>{let t=sf.get(e.target);t&&t(e)},uf=e=>{e.forEach(lf)};function df({root:e,...t}){let n=e||document;cf.has(n)||cf.set(n,{});let r=cf.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(uf,{root:e,...t})),r[i]}function ff(e,t,n){let r=df(t);return sf.set(e,n),r.observe(e),()=>{sf.delete(e),r.unobserve(e)}}var pf={some:0,all:1},mf=class extends Tu{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:pf[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=ff(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(hf(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function hf({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var gf=Object.assign({},Object.assign({renderer:Hd},Gd,{inView:{Feature:mf},tap:{Feature:of},focus:{Feature:rf},hover:{Feature:nf}}),ef,{layout:{ProjectionNode:nl,MeasureLayout:$d}});function _f(e){let t=On(()=>An(e)),{isStatic:n}=(0,K.useContext)(Ln);if(n){let[,n]=(0,K.useState)(e);(0,K.useEffect)(()=>t.on(`change`,n),[])}return t}function vf(e,t){let n=_f(t()),r=()=>n.set(t());return r(),Pn(()=>{let t=()=>H.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return r(),()=>{n.forEach(e=>e()),gn(r)}}),n}function yf(e){Nn.current=[],e();let t=vf(Nn.current,e);return Nn.current=void 0,t}function bf(e,t,n,r){if(typeof e==`function`)return yf(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return Sf(e,t,n,r);let i=typeof t==`function`?t:wu(t,n,r),a=Array.isArray(e)?xf(e,i):xf([e],([e])=>i(e)),o=Array.isArray(e)?void 0:e.accelerate;if(o&&!o.isTransformed&&typeof t!=`function`&&Array.isArray(n)&&r?.clamp!==!1&&!r?.mixer){let e=r?.ease;a.accelerate={...o,times:[0,...t,1],keyframes:[n[0],...n,n[n.length-1]],isTransformed:!0,...e?{ease:Array.isArray(e)?[e[0],...e]:e}:{}}}return a}function xf(e,t){let n=On(()=>[]);return vf(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}function Sf(e,t,n,r){let i=On(()=>Object.keys(n)),a=On(()=>({}));for(let o of i)a[o]=bf(e,t,n[o],r);return a}function Cf(){!ma.current&&Ea();let[e]=(0,K.useState)(Xi.current);return e}var wf=(0,K.createContext)(null),Tf=(0,K.createContext)(null);function Ef(e,t,n,r,i,a=`ltr`){let o=e.findIndex(e=>e.value===t);if(o===-1)return e;if(i===`xy`){let{layout:t}=e[o],r={x:Of(t.x)+n.x,y:Of(t.y)+n.y},i=kf(e),s=i.find(t=>t.items.includes(e[o])),c=i.reduce((e,t)=>Af(r.y,t)<Af(r.y,e)?t:e);if(c!==s)return jf(e,o,r.x,c,a);let l=Mf(r,t),u=-1,d=l;return e.forEach((e,t)=>{if(t===o)return;let n=Mf(r,e.layout);n<d&&(u=t,d=n)}),u===-1?e:an(e,o,o+Math.sign(u-o))}if(!r[i])return e;let s=r[i]>0?1:-1,c=e[o+s];if(!c)return e;let l=e[o].layout[i],u=c.layout[i],d=Of(u);return s===1&&l.max+n[i]>d||s===-1&&l.min+n[i]<d?an(e,o,o+s):e}function Df(e,t,n,r,i){let a=n>1==!!(n%2&&i)?-1:1,o=n>3?(n-4)*(e.length-1):t+a;if(r===`xy`&&n<4&&!(n%2)&&t>-1){let n=kf(e).sort((e,t)=>e.min-t.min),r=n[n.findIndex(({items:n})=>n.includes(e[t]))+a],i=n=>Math.abs(Of(n.layout.x)-Of(e[t].layout.x));o=r?e.indexOf(r.items.reduce((e,t)=>i(t)<i(e)?t:e)):-1}return t>-1&&o!==t&&e[o]?o:-1}var Of=({min:e,max:t})=>F(e,t,.5);function kf(e){let t=[];return e.forEach(e=>{let{min:n,max:r}=e.layout.y,i=t[t.length-1];!i||n>=i.max||r<=i.min?t.push({items:[e],min:n,max:r}):(i.items.push(e),i.min=Math.min(i.min,n),i.max=Math.max(i.max,r))}),t}function Af(e,t){return e<t.min?t.min-e:e>t.max?e-t.max:0}function jf(e,t,n,r,i){let a=e.filter((e,n)=>n!==t),o=r.items.find(e=>{let t=Of(e.layout.x);return i===`ltr`?n<t:n>t}),s=o?a.indexOf(o):a.indexOf(r.items[r.items.length-1])+1,c=[...a];return c.splice(s,0,e[t]),c.every((t,n)=>t===e[n])?e:c}function Mf(e,t){let n=Math.max(t.x.min-e.x,0,e.x-t.x.max),r=Math.max(t.y.min-e.y,0,e.y-t.y.max);return n*n+r*r}var Nf=(e,t)=>e.max<=t.min||t.max<=e.min;function Pf(e){let t=!1,n=!1;for(let r=0;r<e.length;r++)for(let i=r+1;i<e.length;i++)if(t||=Nf(e[r].x,e[i].x),n||=Nf(e[r].y,e[i].y),t&&n)return`xy`;return t?`x`:`y`}var Ff=(e,t)=>n=>{e.current=n;let r=typeof t==`function`?t(n):t&&(t.current=n);if(typeof r==`function`)return()=>{e.current=null,r()}};function If({children:e,as:t=`ul`,axis:n,onReorder:r,values:i,onPointerDownCapture:a,onClickCapture:o,...s},c,l){let u=On(()=>l[t]),d=(0,K.useContext)(wf),f=(0,K.useRef)(new Map),p=(0,K.useRef)(new Map),[m,h]=(0,K.useState)(),[g,_]=(0,K.useState)(`y`),v=(0,K.useRef)(!1),y=(0,K.useRef)(!1),b=(0,K.useRef)(null),x=n||g,S=new Set(i);for(let e of[f.current,p.current])e.forEach((t,n)=>S.has(n)||e.delete(n));let C=S.has(m)?m:i[0],w=e=>p.current.get(e)?.current?.isConnected,T=e=>S.has(e)&&h(e),E=()=>{w(C)||T(i.find(w))};(0,K.useEffect)(E);let D=()=>i.flatMap(e=>f.current.get(e)||[]),O=()=>b.current?.ownerDocument.defaultView?.getComputedStyle(b.current).direction===`rtl`,k=(e,t)=>{let n=0,a=i.map(t=>f.current.has(t)?e[n++].value:t);a.some((e,t)=>e!==i[t])&&r(a,t)},ee={axis:x,proxy:l,groupRef:b,hasReordered:y,values:i,onReorder:r,getOrder:D,isTabStop:e=>e===C||!S.has(e),setActive:T,checkTabStop:E,elements:p.current,onKeyDown:(e,t,n,r)=>{let{key:a,currentTarget:o}=e;if(e.defaultPrevented||e.target!==o||e.altKey||e.ctrlKey||e.metaKey)return;let s=D(),c=[`ArrowUp`,`ArrowLeft`,`ArrowDown`,`ArrowRight`,`Home`,`End`].indexOf(a),l=c%2;if(a===` `)e.repeat||r(o,n?void 0:i);else if(c<0&&!(a===`Escape`&&n))return;else if(!d?.isMoving(o)){if(a===`Escape`&&n){if(r(o),!d?.restore(ee,t,o,n)){let e=n.flatMap(e=>s.filter(t=>t.value===e));k(s.map(t=>n.includes(t.value)?e.shift():t),t)}}else{let e=c>3||x===`xy`||x===(l?`x`:`y`),r=n?s:s.filter(({value:e})=>w(e)),i=r.findIndex(({value:e})=>e===t),a=e?Df(r,i,c,x,!!l&&O()):-1;if(a>-1)n?k(an(s,i,a),t):p.current.get(r[a].value)?.current?.focus();else if(!(n&&c<4&&d?.key(ee,t,c,o,n))&&!e)return}}e.preventDefault()},registerItem:(e,t,r)=>{if(f.current.set(e,{value:e,layout:t,ref:r}),!n){let e=Pf(D().map(e=>e.layout));e!==g&&_(e)}},updateOrder:(e,t,n)=>{if(v.current)return;let r=D(),i=Ef(r,e,t,n,x,O()?`rtl`:`ltr`);r!==i&&(v.current=!0,y.current=!0,k(i,e))}};(0,K.useEffect)(()=>{v.current=!1},[i]),Pn(()=>d?.add(ee));let te={overflowAnchor:`none`,...s.style};return(0,G.jsx)(u,{...s,style:te,ref:Ff(b,c),onPointerDownCapture:e=>{y.current=!1,a?.(e)},onClickCapture:e=>{y.current&&e.detail&&(y.current=!1,e.stopPropagation(),e.preventDefault()),o?.(e)},ignoreStrict:!0,children:(0,G.jsx)(Tf.Provider,{value:ee,children:e})})}var Lf=e=>(0,K.forwardRef)((t,n)=>If(t,n,e)),Rf=50,zf=1.5,Bf=new Set([`auto`,`scroll`]),Vf={x:new Map,y:new Map};function Hf(){Vf.x.clear(),Vf.y.clear()}function Uf(e,t){let n=getComputedStyle(e),r=t===`x`?n.overflowX:n.overflowY;return e===document.body||e===document.documentElement||Bf.has(r)&&(t===`x`?e.scrollWidth>e.clientWidth:e.scrollHeight>e.clientHeight)}function Wf(e,t){let n=e?.parentElement;for(;n;){if(Uf(n,t))return n;n=n.parentElement}return null}function Gf(e){let t=Math.min(1,1-e/Rf);return zf*t*t*Cn.delta}function Kf(e,t,n){let r=t.getBoundingClientRect(),i=n===`x`?Math.max(0,r.left):Math.max(0,r.top),a=n===`x`?Math.min(window.innerWidth,r.right):Math.min(window.innerHeight,r.bottom),o=e-i,s=a-e;return o<Rf?{amount:-Gf(o),edge:`start`}:s<Rf?{amount:Gf(s),edge:`end`}:{amount:0,edge:null}}function qf(e,t,n,r){if(!e)return;let i=Wf(e,n);if(!i)return;let{amount:a,edge:o}=Kf(t-(n===`x`?window.scrollX:window.scrollY),i,n),s=Vf[n];if(o===null){s.delete(i);return}let c=s.get(i),l=i===document.body||i===document.documentElement;if(c?.edge!==o){if(!(o===`start`&&r<0||o===`end`&&r>0))return;c={edge:o,limit:n===`x`?i.scrollWidth-(l?window.innerWidth:i.clientWidth):i.scrollHeight-(l?window.innerHeight:i.clientHeight)},s.set(i,c)}a>0&&(n===`x`?l?window.scrollX:i.scrollLeft:l?window.scrollY:i.scrollTop)>=c.limit||(n===`x`?l?window.scrollBy({left:a}):i.scrollLeft+=a:l?window.scrollBy({top:a}):i.scrollTop+=a)}function Jf(e,t=0){return Sn(e)?e:_f(t)}function Yf({children:e,style:t={},value:n,as:r=`li`,onDragStart:i,onDrag:a,onDragEnd:o,onKeyDown:s,onFocus:c,onBlur:l,layout:u=!0,...d},f){let p=(0,K.useContext)(Tf),m=(0,K.useContext)(wf),h=(0,K.useRef)(null),g=On(()=>p.proxy[r]),_=(0,K.useRef)(),v={x:Jf(t.x),y:Jf(t.y)},y=bf([v.x,v.y],([e,t])=>e||t?1:`unset`),{axis:b,registerItem:x,updateOrder:S,groupRef:C,hasReordered:w,isTabStop:T,setActive:E,checkTabStop:D,elements:O,onKeyDown:k}=p,ee=b===`xy`||m?!0:b;O.set(n,h),(0,K.useEffect)(()=>D);let te=(e,t)=>{_.current=t,t||m?.end(n),Mn.get(e)?.animationState?.setActive(`whileDrag`,!!t)},ne=(0,K.useRef)(!1);return Pn(()=>{m?.receive(p,n,h.current,te)&&(ne.current=!0)},[]),(0,G.jsx)(g,{drag:ee,tabIndex:T(n)?0:-1,...d,dragSnapToOrigin:!0,style:{...t,x:v.x,y:v.y,zIndex:y},layout:u,onDragStart:(e,t)=>{ne.current?ne.current=!1:i?.(e,t)},onDrag:(e,t)=>{let{velocity:r,point:i}=t,o={x:v.x.get(),y:v.y.get()};m?.drag(p,n,h.current,e)||S(n,o,r);let s=m?[`x`,`y`]:[b===`xy`?Math.abs(r.x)>Math.abs(r.y)?`x`:`y`:b];for(let e of s)qf(m&&!b.includes(e)?m.column(p):C.current,i[e],e,r[e]);a&&a(e,t)},onDragEnd:(e,t)=>{w.current=!1,Hf(),m?.end(n),o&&o(e,t)},onKeyDown:e=>{s?.(e),k(e,n,_.current,te)},onFocus:e=>{c?.(e),E(n)},onBlur:e=>{l?.(e),_.current&&te(e.currentTarget)},onLayoutMeasure:e=>{x(n,e,h)},ref:Ff(h,f),ignoreStrict:!0,children:e})}var Xf=(0,K.forwardRef)(Yf),Zf=e=>{let{left:t,top:n,width:r,height:i}=e.getBoundingClientRect();return{x:t+r/2,y:n+i/2}},Qf=e=>{let{x:t,y:n}=Zf(e),{scrollX:r,scrollY:i}=e.ownerDocument.defaultView;return{x:t+r,y:n+i}};function $f(e,t,n,r){let{left:i,right:a,top:o,bottom:s}=t.getBoundingClientRect(),c=r?e.x>(i+a)/2:e.x<=(i+a)/2,l=e.y<=(o+s)/2;return n===`x`?c:n===`y`?l:e.y<o||e.y<s&&c}var ep=(e,t)=>{let n=e.groupRef.current,r=t.groupRef.current;return n.contains(r)||r.contains(n)};function tp(e){let t=new Set,n,r=(t,n,r)=>!ep(t,n)&&e.current.canMove?.(r,t.values,n.values)!==!1,i,a=(e,t,r,i,a,o)=>{let s=Zf(i),{values:c}=t;if(o===void 0){let e=t.getOrder().filter(e=>e.ref?.current?.isConnected),n=getComputedStyle(t.groupRef.current).direction===`rtl`,r=e.find(e=>$f(s,e.ref.current,t.axis,n)),i=e[e.length-1];o=r?c.indexOf(r.value):i?c.indexOf(i.value)+1:c.length}n={value:r,to:t.groupRef,element:i,centre:Qf(i),...a},t.hasReordered.current=!0,e.onReorder(e.values.filter(e=>e!==r),r),t.onReorder([...c.slice(0,o),r,...c.slice(o)],r)};return{add:e=>(t.add(e),()=>t.delete(e)),drag:(e,i,o,s)=>{if(!o?.isConnected)return!1;if(n?.controls?.isDragging)return n.value===i&&(n.centre=Qf(o),n.event=s),!0;let c=Zf(o),l;for(let e of o.ownerDocument.elementsFromPoint(c.x,c.y))if(!o.contains(e)){for(let n of t)n.groupRef.current===e&&(l=n);if(l)break}if(!l||!r(e,l,i))return!1;let u=Mn.get(o);return a(e,l,i,o,{controls:u&&tu.get(u),event:s}),!0},key:(e,n,o,s,c)=>{let l=Zf(s),u=o%2?`x`:`y`,d=o>1?1:-1,f,p=1/0;for(let i of t){let t=i.groupRef.current;if(!t)continue;let{left:a,right:s,top:c,bottom:m,width:h,height:g}=t.getBoundingClientRect();if(!h&&!g||([m,s,c,a][o]-l[u])*d<=0)continue;let _=Math.max(a-l.x,0,l.x-s),v=Math.max(c-l.y,0,l.y-m);_*_+v*v<p&&r(e,i,n)&&(p=_*_+v*v,f=i)}return f?(i?.from!==c&&(i={group:e.groupRef,from:c}),a(e,f,n,s,{keys:!0,from:c}),!0):!1},restore:(e,n,r,o)=>{let s=i?.from===o&&[...t].find(e=>e.groupRef===i.group);if(!s||s.groupRef===e.groupRef)return!1;let c=o.slice(o.indexOf(n)+1),l=s.values.findIndex(e=>c.includes(e));return i=void 0,a(e,s,n,r,{keys:!0},l<0?s.values.length:l),!0},end:e=>{n?.value===e&&(n=void 0)},isMoving:e=>n?.element===e,receive:(e,t,r,i)=>{let a=Mn.get(r),o=a&&tu.get(a);o?.isDragging&&a.animationState?.setActive(`whileDrag`,!0);let s=n;if(!s||s.value!==t||s.to!==e.groupRef)return!1;let{keys:c,from:l,controls:u}=s,d=!s.element.isConnected;if(c){n=void 0;let{activeElement:e,body:t}=r.ownerDocument;return d&&(!e||e===t)&&(r.focus(),i(r,l)),!1}return!o||!u?.isDragging?!1:(Fn.read(()=>{if(n!==s)return;n=void 0,Mn.get(s.element)?.values.forEach((e,t)=>{let n=e.get();a.getValue(t,a.readValue(t,n))?.set(n)});let e=a.getTransformPagePoint()||(e=>e),t=e(s.centre),i=e(Qf(r));a.getValue(`x`).set(t.x-i.x),a.getValue(`y`).set(t.y-i.y),a.render(),d?u.cancel():u.stop(),o.start(s.event,{immediate:!0})}),d)},column:({groupRef:e})=>{let n=e.current,r=n=>[...t].some(t=>t.groupRef!==e&&n.contains(t.groupRef.current));for(;n?.parentElement?.parentElement&&!r(n.parentElement);)n=n.parentElement;return n}}}function np({children:e,...t}){let n=(0,K.useRef)(t);return Pn(()=>{n.current=t}),(0,G.jsx)(wf.Provider,{value:On(()=>tp(n)),children:e})}var rp=(e,t,n)=>{let[r,i]=(0,K.useState)(!1),a=typeof t==`object`&&t.tooltipWhenOverflow;return(0,K.useEffect)(()=>{if(!a)return;let n=()=>{let n=e.current;if(!n)return;let r=typeof t==`object`?t.rows:void 0;i(r&&r>1?n.scrollHeight>n.clientHeight:n.scrollWidth>n.clientWidth)};n();let r=new ResizeObserver(n);return e.current&&r.observe(e.current),()=>r.disconnect()},[a,t,n,e]),r},ip=Nt({block:`text`,dataAttributes:[`type`],elements:[]}),ap={code:{kMv6JI:`lb2xbw48`,$$css:!0},danger:{kMwMTN:`lb12ap7uz`,$$css:!0},delete:{kybGjl:`lbmqliwb`,$$css:!0},disabled:{kMwMTN:`lbv7q1j6`,kkrTdU:`lb1h6gzvc`,$$css:!0},ellipsis:{kVQacm:`lbb3r6kr`,kg5iWk:`lblyipyv`,khDVqt:`lbuxw1ft`,$$css:!0},ellipsisMulti:{kVQacm:`lbb3r6kr`,kgKLqz:`lb1ua5tub`,k1xSpc:`lb104kibb`,kg5iWk:`lblyipyv`,$$css:!0},h1:{kGuDYH:`lb1xiv2dn`,k63SB2:`lb117nqv4`,kLWn49:`lb132q4wb`,$$css:!0},h2:{kGuDYH:`lb2ziyne`,k63SB2:`lb117nqv4`,kLWn49:`lb132q4wb`,$$css:!0},h3:{kGuDYH:`lbowuowh`,k63SB2:`lb117nqv4`,kLWn49:`lb132q4wb`,$$css:!0},h4:{kGuDYH:`lbkf6u7v`,k63SB2:`lb117nqv4`,kLWn49:`lb132q4wb`,$$css:!0},h5:{kGuDYH:`lb1pzwcx8`,k63SB2:`lb117nqv4`,kLWn49:`lb132q4wb`,$$css:!0},info:{kMwMTN:`lbapv1it`,$$css:!0},italic:{kKX8nH:`lb1k4tb9n`,$$css:!0},mark:{kWkggS:`lb10l2l1g`,kMwMTN:`lbod0wng`,$$css:!0},p:{kqGvvJ:`lb10im51j`,$$css:!0},secondary:{kMwMTN:`lb19ppog9`,$$css:!0},shiny:{"--shiny-color":`lb1yqjya6`,"--shiny-duration":`lb13qpc1j`,k44tkh:`lbpzn028`,ko0y90:`lba4qsjk`,kKVMdj:`lbj1bqtc`,kyAemX:`lb1esw782`,kHypHr:`lb1ta4xzc`,kKwaWg:`lb1k0woq6`,kgSjnq:`lbakli9p`,kMwMTN:`lb1g83pbf`,kfSwDN:`lb87ps6o`,$$css:!0},strong:{k63SB2:`lb117nqv4`,$$css:!0},success:{kMwMTN:`lbs9y9h1`,$$css:!0},text:{kMwMTN:`lb66ogz0`,$$css:!0},underline:{kybGjl:`lb1bvjpef`,$$css:!0},warning:{kMwMTN:`lbgyvj36`,$$css:!0}};({className:`lb2xbw48`}).className,{className:`lb12ap7uz`}.className,{className:`lbmqliwb`}.className,{className:`lbv7q1j6 lb1h6gzvc`}.className,{className:`lbb3r6kr lblyipyv lbuxw1ft`}.className,{className:`lbb3r6kr lb1ua5tub lb104kibb lblyipyv`}.className,{className:`lb1xiv2dn lb117nqv4 lb132q4wb`}.className,{className:`lb2ziyne lb117nqv4 lb132q4wb`}.className,{className:`lbowuowh lb117nqv4 lb132q4wb`}.className,{className:`lbkf6u7v lb117nqv4 lb132q4wb`}.className,{className:`lb1pzwcx8 lb117nqv4 lb132q4wb`}.className,{className:`lbapv1it`}.className,{className:`lb1k4tb9n`}.className,{className:`lb10l2l1g lbod0wng`}.className,{className:`lb10im51j`}.className,{className:`lb19ppog9`}.className,{className:`lb117nqv4`}.className,{className:`lbs9y9h1`}.className,{className:`lb66ogz0`}.className,{className:`lb1bvjpef`}.className,{className:`lbgyvj36`}.className,V((e=>B(e).className)(ap.shiny),`lobe-text-shiny`);var op=(e={})=>[ap.text,e.as&&ap[e.as],e.code&&ap.code,e.delete&&ap.delete,e.disabled&&ap.disabled,e.ellipsis===`multi`&&ap.ellipsisMulti,e.ellipsis===!0&&ap.ellipsis,e.italic&&ap.italic,e.mark&&ap.mark,e.shiny&&ap.shiny,e.strong&&ap.strong,e.type&&ap[e.type],e.underline&&ap.underline],sp=(0,K.memo)(({align:e,as:t=`div`,children:n,className:r,classNames:i,code:a,color:o,delete:s,disabled:c,ellipsis:l,fontSize:u,italic:d,lineClamp:f,lineHeight:p,mark:m,noWrap:h,ref:g,shiny:_,shinyDuration:v,strong:y,style:b,styles:x,textDecoration:S,textTransform:C,type:w,underline:T,weight:E,whiteSpace:D,wordBreak:O,...k})=>{let ee=(0,K.useRef)(null),te=rp(ee,l,n),ne=typeof l==`object`&&!!l.rows&&l.rows>1,A=typeof l==`object`&&l.tooltipWhenOverflow,re=e=>{ee.current=e,typeof g==`function`?g(e):g&&(g.current=e)},ie={...o&&{color:o},...E&&{fontWeight:E},...p&&{lineHeight:p},...C&&{textTransform:C},...S&&{textDecoration:S},...O&&{wordBreak:O},...typeof l==`object`&&l.rows&&{WebkitLineClamp:l.rows},...!l&&!!f&&{WebkitBoxOrient:`vertical`,WebkitLineClamp:f,display:`-webkit-box`,overflow:`hidden`,textOverflow:`ellipsis`},..._&&v&&{"--shiny-duration":v},...u&&{fontSize:u},...e&&{textAlign:e},...!ne&&h&&{whiteSpace:`nowrap`},...D&&{whiteSpace:D},...b,...x?.root},j=(0,G.jsx)(t,{...Mt({type:w}),...k,ref:re,style:ie,className:B(op({as:[`h1`,`h2`,`h3`,`h4`,`h5`,`p`].includes(t)?t:void 0,code:a,delete:s,disabled:c,ellipsis:l?typeof l==`object`&&l.rows?`multi`:!0:void 0,italic:d,mark:m,shiny:_,strong:y,type:w,underline:T}),V(ip(),_&&`lobe-text-shiny`,r,i?.root)).className,children:n});if(l&&typeof l==`object`&&(l.tooltip||l.tooltipWhenOverflow)){if(A&&!te)return j;let e=typeof l.tooltip==`string`?l.tooltip:n;return l.tooltip&&typeof l.tooltip==`object`?(0,G.jsx)(Co,{...l.tooltip,title:l.tooltip?.title||e,children:j}):(0,G.jsx)(Co,{title:e,children:j})}return j});sp.displayName=`Text`;var cp=sp,lp=e=>{e.stopPropagation()},up=e=>{e.preventDefault(),e.stopPropagation(),e.preventBaseUIHandler?.()},dp=K.createContext({disabled:!1});function fp(){return K.useContext(dp)}function pp(e){let[t,n]=K.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),r=K.useRef(null),i=K.useRef(null),a=K.useRef(null),o=K.useRef(null),s=K.useRef(!0),c=K.useRef(null),l=ht(),u=K.useMemo(()=>({anchor:t,setAnchor:n,actionsRef:a,backdropRef:r,internalBackdropRef:i,positionerRef:o,allowMouseUpTriggerRef:s,initialCursorPointRef:c,rootId:l}),[t,l]);return(0,G.jsx)(Lo.Provider,{value:u,children:(0,G.jsx)(wo.Provider,{value:void 0,children:(0,G.jsx)(To,{...e})})})}var mp=Po,Y=Nt({block:`context-menu`,elements:[`trigger`,`positioner`,`header`,`viewport`,`footer`,`item`,`item-content`,`icon`,`label-group`,`label`,`desc`,`extra`,`submenu-arrow`,`checkbox-indicator`,`switch`,`separator`,`group`,`group-label`]}),hp=(0,K.memo)(({collisionPadding:e,style:t,...n})=>{let r=typeof t!=`function`&&t?.zIndex!=null&&typeof t.zIndex==`number`?t.zIndex:void 0,{zIndex:i,ref:a}=At(`floating`,r),o=typeof t==`function`?e=>({zIndex:i,...t(e)}):{zIndex:i,...t};return(0,G.jsx)(mp,{...n,className:V(I.positioner,Y(`positioner`)),collisionPadding:e??Ie(),ref:a,style:o})});hp.displayName=`ContextMenuSubmenuPositioner`;var gp=(0,K.memo)(()=>{let{t:e}=Wt(A);return(0,G.jsx)(Io,{disabled:!0,className:V(z(R.item,R.empty).className,Y(`item`)),children:(0,G.jsx)(`div`,{className:V(I.itemContent,Y(`item-content`)),children:(0,G.jsx)(`span`,{className:V(I.label,Y(`label`)),children:e(`common.empty`)})})})});gp.displayName=`EmptyMenuItem`;var _p=({checked:e,children:t,closeOnClick:n=!1,danger:r,defaultChecked:i,disabled:a,label:o,onCheckedChange:s})=>{let[c,l]=(0,K.useState)(i??!1),u=e!==void 0,d=u?e:c,f=(0,K.useCallback)(e=>{u||l(e),s?.(e)},[u,s]);return(0,G.jsxs)(Io,{closeOnClick:n,disabled:a,label:o,className:V(z(R.item,r&&R.danger).className,Y(`item`)),onClick:e=>{e.preventDefault(),a||f(!d)},children:[t,(0,G.jsx)(`span`,{className:V(I.switchWrap,Y(`switch`)),onFocus:e=>e.stopPropagation(),children:(0,G.jsx)(je,{checked:d,disabled:a,size:`small`,tabIndex:-1,onChange:f,onClick:(e,t)=>t.stopPropagation()})})]})},vp=(e,t,n)=>{let r=It(e),i=`desc`in e?e.desc:void 0,a=`extra`in e?e.extra:void 0,o=t?.indicatorOnRight,s=!!i&&t?.iconAlign===`start`,c=n!==void 0&&!o,l=c?!!n:!!e.icon,u=c?!!(t?.reserveIconSpace||n):!!(l||t?.reserveIconSpace),d=i?(0,G.jsxs)(`div`,{className:V(I.labelGroup,Y(`label-group`)),children:[(0,G.jsx)(`span`,{className:V(I.label,Y(`label`)),children:r}),(0,G.jsx)(`span`,{className:V(I.desc,Y(`desc`)),children:i})]}):(0,G.jsx)(`span`,{className:V(I.label,Y(`label`)),children:r});return(0,G.jsxs)(`div`,{className:V(z(R.itemContent,s&&R.itemContentAlignStart).className,Y(`item-content`)),children:[u?(0,G.jsx)(`span`,{"aria-hidden":!l,className:V(z(R.icon,s&&R.iconAlignStart).className,Ye.icon,Y(`icon`)),children:c?n:l?Vt(e.icon,`small`):null}):null,d,a?(0,G.jsx)(`span`,{className:V(I.extra,Y(`extra`)),children:a}):null,o&&n?n:null,t?.submenu?(0,G.jsx)(`span`,{className:V(I.submenuArrow,Y(`submenu-arrow`)),children:(0,G.jsx)(Rt,{})}):null]})},yp=(e,t,n)=>{if(!e.onClick)return;let r=e.key??t.at(-1)??``,i={domEvent:n,item:n.currentTarget,key:String(r),keyPath:t};e.onClick(i)},bp=(e,t=[],n)=>{let r=n?.iconAlign,i=n?.iconSpaceMode??`global`,a=n?.reserveIconSpace??Ft(e,i===`global`),o=n?.indicatorOnRight??zt(e);return e.map((e,n)=>{if(!e)return null;let s=`${t.join(`-`)||`root`}-${n}`,c=Bt(e,s),l=[...t,String(c)];if(e.type===`checkbox`){let t=e,n=It(t),i=typeof n==`string`?n:void 0,s=!!t.danger,l=(0,G.jsx)(Mo,{className:Y(`checkbox-indicator`),children:(0,G.jsx)(yt,{icon:de,size:`small`})});return(0,G.jsx)(ko,{checked:t.checked,closeOnClick:t.closeOnClick,defaultChecked:t.defaultChecked,disabled:t.disabled,label:i,className:V(z(R.item,s&&R.danger).className,Y(`item`)),onCheckedChange:e=>t.onCheckedChange?.(e),children:vp(t,{iconAlign:r,indicatorOnRight:o,reserveIconSpace:a},l)},c)}if(e.type===`switch`){let t=e,n=It(t),i=typeof n==`string`?n:void 0,o=!!t.danger;return(0,G.jsx)(_p,{checked:t.checked,closeOnClick:t.closeOnClick,danger:o,defaultChecked:t.defaultChecked,disabled:t.disabled,label:i,onCheckedChange:t.onCheckedChange,children:vp(t,{iconAlign:r,reserveIconSpace:a})},c)}if(e.type===`divider`)return(0,G.jsx)(No,{className:V(I.separator,Y(`separator`))},c);if(e.type===`group`){let t=e,n=i===`group`?t.children?Ft(t.children):!1:a,o=t.children?zt(t.children):!1;return(0,G.jsxs)(Oo,{className:Y(`group`),children:[t.label?(0,G.jsx)(Do,{className:V(I.groupLabel,Y(`group-label`)),children:t.label}):null,t.children?bp(t.children,l,{iconAlign:r,iconSpaceMode:i,indicatorOnRight:o,reserveIconSpace:n}):null]},c)}if(e.type===`submenu`||`children`in e&&e.children){let t=e,n=It(t),o=typeof n==`string`?n:void 0,s=`danger`in t&&!!t.danger,u=t.header!=null||t.footer!=null,d=t.children&&t.children.length>0?bp(t.children,l,{iconAlign:r,iconSpaceMode:i}):(0,G.jsx)(gp,{});return(0,G.jsxs)(Ao,{defaultOpen:t.defaultOpen,open:t.open,onOpenChange:t.onOpenChange,children:[(0,G.jsx)(Fo,{...t.triggerProps,closeDelay:t.closeDelay,delay:t.delay,disabled:t.disabled,label:o,openOnHover:t.openOnHover,className:V(z(R.item,s&&R.danger).className,Y(`item`)),onClick:t.onClick,children:vp(t,{iconAlign:r,reserveIconSpace:a,submenu:!0})}),(0,G.jsx)(Eo,{children:(0,G.jsx)(hp,{alignOffset:-4,"data-submenu":``,sideOffset:-1,onContextMenu:up,children:(0,G.jsxs)(jo,{className:V(z(R.popup,u&&R.popupWithSlots).className,Ye.popup,Y()),children:[t.header==null?null:(0,G.jsx)(`div`,{className:V(I.header,Y(`header`)),children:t.header}),u?(0,G.jsx)(`div`,{className:V(I.slotViewport,Y(`viewport`)),children:d}):d,t.footer==null?null:(0,G.jsx)(`div`,{className:V(I.footer,Y(`footer`)),children:t.footer})]})})})]},c)}let u=e,d=It(u),f=typeof d==`string`?d:void 0,p=`danger`in u&&!!u.danger;return(0,G.jsx)(Io,{closeOnClick:u.closeOnClick,disabled:u.disabled,label:f,className:V(z(R.item,p&&R.danger).className,Y(`item`)),onClick:e=>yp(u,l,e),children:vp(u,{iconAlign:r,reserveIconSpace:a})},c)})},xp={"--lobe-dropdown-animation-duration":`0ms`},Sp=(0,K.memo)(()=>{let e=y(),t=Et(),n=(0,K.useSyncExternalStore)(Xt,Zt,Yt);(0,K.useEffect)(()=>{},[e]),(0,K.useEffect)(()=>{let e=e=>Qt(e);return window.addEventListener(`pointerdown`,e,!0),window.addEventListener(`contextmenu`,e,!0),()=>{window.removeEventListener(`pointerdown`,e,!0),window.removeEventListener(`contextmenu`,e,!0)}},[]);let r=(0,K.useMemo)(()=>bp(n.items,[],{iconAlign:n.iconAlign,iconSpaceMode:n.iconSpaceMode}),[n.items,n.iconAlign,n.iconSpaceMode]),{zIndex:i,ref:a}=At(`floating`),o=n.header!=null||n.footer!=null;return!e||!n.open&&n.items.length===0?null:(0,G.jsx)(pp,{open:n.open,onOpenChange:e=>{e?Jt({open:e}):$t()},children:(0,G.jsx)(Eo,{container:t,children:(0,G.jsx)(mp,{anchor:n.anchor??void 0,className:V(I.positioner,Y(`positioner`)),collisionPadding:Ie(),ref:a,sideOffset:6,style:{...xp,zIndex:i},children:(0,G.jsxs)(jo,{"data-has-footer":n.footer==null?void 0:``,"data-has-header":n.header==null?void 0:``,className:V(z(R.popup,o&&R.popupWithSlots).className,Ye.popup,Y()),onContextMenu:up,children:[n.header==null?null:(0,G.jsx)(`div`,{className:V(I.header,Y(`header`)),children:n.header}),n.virtual?(0,G.jsx)(Lt,{className:Y(`viewport`),itemSize:n.listItemHeight,children:r}):o?(0,G.jsx)(`div`,{className:V(I.slotViewport,Y(`viewport`)),children:r}):r,n.footer==null?null:(0,G.jsx)(`div`,{className:V(I.footer,Y(`footer`)),children:n.footer})]})})})})});Sp.displayName=`ContextMenuHost`;var Cp={circle:{kaIpWk:`lb16rqkct`,$$css:!0},defaultSize:{kZKoxP:`lblup9mm`,kzqmXN:`lb1kky2od`,$$css:!0},defaultSquare:{kaIpWk:`lb12oqio5`,$$css:!0},group:{kOIVth:`lb1v2ro7d`,k1xSpc:`lb78zum5`,kXwgrk:`lb1q0g3np`,kwnvtZ:`lb1a02dak`,$$css:!0},groupVertical:{kXwgrk:`lbdt5ytf`,$$css:!0},iconCircle:{k3aq6I:`lb10078c2`,$$css:!0},iconSquare:{k3aq6I:`lb1nrvvgt`,$$css:!0},indicator:{kGNEyG:`lb6s0dn4`,k1xSpc:`lb78zum5`,kjj79g:`lbl56j7k`,$$css:!0},label:{kOIVth:`lb167g77z`,kGNEyG:`lb6s0dn4`,kkrTdU:`lb1ypdohk lb1r4mgf1`,k1xSpc:`lb3nfvp2`,kfSwDN:`lb87ps6o`,$$css:!0},root:{kogj98:`lb1ghz6dp`,kmVPX3:`lb1717udv`,kVAM5u:`lb1ri2ox9 lb10cypdb lb18hgaxl lb14dg99k`,ksu8eU:`lb1y0btm7`,kMzoRj:`lbmkeg23`,kUk6DE:`lb1okw0bk`,kI3sdo:`lb1a2a7pz`,kmkexE:`lb1mlet35`,kGNEyG:`lb6s0dn4`,kWkggS:`lbpbwnwz lb6yijhg lb1ppu4m2`,kMwMTN:`lb15g0kca lbcdmxi5`,kkrTdU:`lb1ypdohk lb5ezrf1`,k1xSpc:`lb3nfvp2`,kjj79g:`lbl56j7k`,kSiTet:`lb12zwbr1`,$$css:!0}};({className:`lb16rqkct`}).className,{className:`lblup9mm lb1kky2od`}.className,{className:`lb12oqio5`}.className,{className:`lb1v2ro7d lb78zum5 lb1q0g3np lb1a02dak`}.className,{className:`lbdt5ytf`}.className,{className:`lb10078c2`}.className,{className:`lb1nrvvgt`}.className,{className:`lb6s0dn4 lb78zum5 lbl56j7k`}.className,{className:`lb167g77z lb6s0dn4 lb1ypdohk lb1r4mgf1 lb3nfvp2 lb87ps6o`}.className,{className:`lb1ghz6dp lb1717udv lb1ri2ox9 lb10cypdb lb18hgaxl lb14dg99k lb1y0btm7 lbmkeg23 lb1okw0bk lb1a2a7pz lb1mlet35 lb6s0dn4 lbpbwnwz lb6yijhg lb1ppu4m2 lb15g0kca lbcdmxi5 lb1ypdohk lb5ezrf1 lb3nfvp2 lbl56j7k lb12zwbr1`}.className;function wp(e){if(!e)return null;for(let t of e.elements){let e=t.tagName;if(e===`BUTTON`||e===`INPUT`){let e=t;if(e.type===`submit`)return e}}return null}var Tp=`data-checked`,Ep=`data-unchecked`;function Dp(e){return{checked(t){return e.indeterminate?{}:t?{[Tp]:``}:{[Ep]:``}},...Je}}var Op=K.createContext(void 0);function kp(){return K.useContext(Op)}var Ap=K.createContext(void 0);function jp(){let e=K.useContext(Ap);if(e===void 0)throw Error(St(14));return e}var Mp=`data-parent`,Np=K.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i=!1,"aria-labelledby":a,disabled:o=!1,form:s,id:c,indeterminate:l=!1,inputRef:u,name:d,onCheckedChange:f,parent:p=!1,readOnly:m=!1,render:h,required:g=!1,uncheckedValue:_,value:v,nativeButton:y=!1,style:b,...x}=e,{clearErrors:S}=he(),{disabled:w,name:T,setDirty:E,setFilled:D,setTouched:O,state:k,validationMode:te,validityData:A,validation:ie}=Ce(),j=fp(),{labelId:ae,registerControlId:se,getDescriptionProps:ce}=ne(),M=kp(),le=M?.allValues===void 0?void 0:M.parent,ue=le!==void 0,N=w||j.disabled||M?.disabled||o,de=T??d,P=v??de,fe=xt(),F=M?.registerControlId!==se,pe=ee({id:c||void 0,enabled:F}),_e=y?pe:fe,ve={};ue&&(p?ve=le.getParentProps():P!==void 0&&(ve=le.getChildProps(P)));let{checked:ye=n,indeterminate:be=l,onCheckedChange:xe,...Se}=ve,we=M?.value,Te=K.useRef(null),Ee=ge(N,Te),{getButtonProps:De,buttonRef:Oe}=vt({disabled:N,native:y}),ke=M?.validation??ie,[Ae,je]=oe({controlled:P!==void 0&&we!==void 0&&!p?we.includes(P):ye,default:i,name:`Checkbox`,state:`checked`}),Me=ue?!!ye:Ae,Ne=ue&&be||l;me(Te,fe,Ae,void 0,!M&&!N,d);let Pe=le?.registerChildId,Fe=K.useRef(null),Ie=ke.registerInput,Le=M?P:void 0,Re=K.useCallback(e=>Ie(e,{controlRef:Te,value:Le}),[Ie,Le]),ze=Ct(u,Fe,p?void 0:Re),Be=re(a,ae,Fe,!y,pe,x[`aria-label`]);wt(()=>{Fe.current&&(Fe.current.indeterminate=Ne),M||D(Ae)},[Ae,Ne,M,D]),C(Ae,()=>{M||(S(de),E(Ae!==A.initialValue),ke.change(Ae))});let Ve=_t({checked:Ae,disabled:N,form:s,name:p?void 0:de,id:y?void 0:pe,required:g,ref:ze,style:de?gt:pt,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(m){e.preventDefault();return}let t=e.currentTarget.checked,n=jt(Tt,e.nativeEvent);if(f?.(t,n),!n.isCanceled&&(xe?.(t,n),!n.isCanceled&&(je(t),P!==void 0&&M!==void 0&&!p&&!ue))){let e=t?[...M.value,P]:M.value.filter(e=>e!==P);M.setValue(e,n)}},onClick(e){e.stopPropagation()},onFocus(){Te.current?.focus()}},v===void 0?ct:{value:(M?Ae&&v:v)||``},ce,e=>ke.getValidationProps(N,e));K.useEffect(()=>{if(!le||P===void 0)return;let e=le.disabledStatesRef.current;return e.set(P,N),()=>{e.delete(P)}},[le,N,P]);let He=K.useMemo(()=>({...k,checked:Me,disabled:N,readOnly:m,required:g,indeterminate:Ne}),[k,Me,N,m,g,Ne]),Ue=Dp(He),I=mt(`span`,e,{state:He,ref:[Oe,Te,t],props:[{id:_e,role:`checkbox`,"aria-checked":Ne?`mixed`:Me,"aria-readonly":m||void 0,"aria-required":g||void 0,"aria-labelledby":Be,[Mp]:p?``:void 0,onFocus(){Ee(!0)},onBlur(){let e=Fe.current;e&&(O(!0),Ee(!1),te===`onBlur`&&ke.commit(M?we:e.checked))},onKeyDown(e){if(e.key!==`Enter`||(e.preventBaseUIHandler(),e.defaultPrevented))return;let t=Fe.current?.form??null,n=e.currentTarget,r=e.nativeEvent,i=e.preventDefault,a=r.preventDefault,o=!1;e.preventDefault=()=>{o=!0,i.call(e)},r.preventDefault=()=>{o=!0,a.call(r)},a.call(r),Ot(n).queueMicrotask(()=>{e.preventDefault=i,r.preventDefault=a,o||wp(t)?.click()})},onClick(e){if(m||N)return;e.preventDefault();let t=Fe.current;t&&ft(t,e)}},x,Se,De,ce,e=>ke.getValidationProps(N,e)],stateAttributesMapping:Ue}),L=I.props.id;return wt(()=>{if(Pe&&!p&&P!==void 0&&L!==void 0)return Pe(P,L)},[Pe,p,P,L]),(0,G.jsxs)(Ap.Provider,{value:He,children:[I,!Ae&&!M&&de&&!p&&_!==void 0&&(0,G.jsx)(`input`,{type:`hidden`,form:s,name:de,value:_,disabled:N}),(0,G.jsx)(`input`,{...Ve,suppressHydrationWarning:!0})]})}),Pp=K.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=jp(),c=s.checked||s.indeterminate,{mounted:l,transitionStatus:u,setMounted:d}=Dt(c),f=K.useRef(null),p={...s,transitionStatus:u};ut({batch:!0,enabled:!c,open:c,ref:f,onComplete(){c||d(!1)}});let m={...Dp(s),...kt},h=a||l,g=mt(`span`,e,{ref:[t,f],state:p,stateAttributesMapping:m,props:o});return h?g:null}),Fp=Nt({block:`checkbox`,dataAttributes:[`shape`],elements:[`checkbox`,`indicator`,`text`]});Nt({block:`checkbox-group`,dataAttributes:[`horizontal`],elements:[`item`]});var Ip=(0,K.memo)(({size:e,shape:t=`square`,backgroundColor:n,children:r,className:i,classNames:a,styles:o,style:s,textProps:c,onChange:l,disabled:u,indeterminate:d,...f})=>{let p=e??16,m=e!==void 0,h={...m&&{height:p,width:p},...m&&t===`square`&&{borderRadius:`max(4px, ${Math.round(p/4)}px)`},...n?{"--lobe-checkbox-bg":n}:{},...r?{}:s,...o?.checkbox},g=t===`square`?Cp.iconSquare:Cp.iconCircle,_=(0,G.jsx)(Np,{disabled:u,indeterminate:d,onCheckedChange:l,...r?void 0:Mt({shape:t}),...f,...B([Cp.root,bt.info,!m&&Cp.defaultSize,t===`square`?!m&&Cp.defaultSquare:Cp.circle],V(!r&&Fp(),Fp(`checkbox`),r?a?.checkbox:i,a?.checkbox),h),children:(0,G.jsx)(Pp,{...B(Cp.indicator,Fp(`indicator`)),children:d?(0,G.jsx)(we,{size:p,strokeWidth:3,...z(g)}):(0,G.jsx)(de,{size:p,strokeWidth:3,...z(g)})})});return r?(0,G.jsxs)(`label`,{...Mt({shape:t}),...B(Cp.label,V(Fp(),i,a?.wrapper),{...m&&{gap:Math.floor(p/2)},...s,...o?.wrapper}),children:[_,(0,G.jsx)(cp,{as:`span`,className:V(Fp(`text`),a?.text),style:o?.text,...c,type:u?`secondary`:c?.type,children:r})]}):_});Ip.displayName=`Checkbox`;var Lp=Object.assign(Ip,{formBinding:{valueProp:`checked`}}),X={glyph:{k1xSpc:`lb3nfvp2`,$$css:!0},glyphBox:{k1xSpc:`lb3nfvp2`,$$css:!0},network:{k1xSpc:`lb1rg5ohu`,kVAEAm:`lb1n2onr6`,$$css:!0},networkBox:{k87sOh:`lb13vifvy`,kLqNvP:`lb1o0tod`,kVAEAm:`lb10l6tqk`,k3nNDw:`lb1hj3fc7`,kZKoxP:`lbpyat2d`,kzqmXN:`lb1exxlbk`,$$css:!0},networkCore:{k44tkh:`lb1c74tu6 lb1u6grsq`,ko0y90:`lba4qsjk lbg0664w`,kKVMdj:`lb1ygz6qe lb1aquc0h`,kyAemX:`lb1debuo4 lb1uea3p4`,kWkggS:`lb1h45990`,k87sOh:`lbyszfof`,kLqNvP:`lb4500kp`,kVAEAm:`lb10l6tqk`,kZKoxP:`lbols6we`,kzqmXN:`lb1v4s8kt`,$$css:!0},networkLine:{kjVXCG:`lb68wf4t`,kfJifR:`lbpmuf5a`,kSiTet:`lbuzhngd`,$$css:!0},networkLines:{kpwlN0:`lb10a8y8t`,kVAEAm:`lb10l6tqk`,kZKoxP:`lbpyat2d`,kzqmXN:`lb1exxlbk`,$$css:!0},networkNode:{k44tkh:`lb1c74tu6 lb1u6grsq`,ko0y90:`lba4qsjk lbg0664w`,kKVMdj:`lb1mw1q8i lb1aquc0h`,kyAemX:`lb1debuo4 lb1uea3p4`,kogj98:`lbzvvh78`,kaIpWk:`lb16rqkct`,kWkggS:`lb1h45990`,kVAEAm:`lb10l6tqk`,kZKoxP:`lbxdy7cf`,kzqmXN:`lb165gwbr`,$$css:!0},networkParticle:{k44tkh:`lb1c74tu6 lb1u6grsq`,ko0y90:`lba4qsjk lbg0664w`,kKVMdj:`lb15d5rfv lb1aquc0h`,kyAemX:`lb1debuo4 lb1uea3p4`,kogj98:`lb1rmkima`,kaIpWk:`lb16rqkct`,kWkggS:`lb1h45990`,k87sOh:`lbbssg55`,kLqNvP:`lbemjqv4`,kVAEAm:`lb10l6tqk`,kZKoxP:`lb11vverv`,kzqmXN:`lbsblaa2`,$$css:!0},networkRing:{k44tkh:`lb6q96wx lb1u6grsq`,ko0y90:`lba4qsjk lbg0664w`,kKVMdj:`lb1v0ides lb1aquc0h`,kyAemX:`lb1esw782 lb1uea3p4`,kpwlN0:`lb1vdmwfg`,kVAM5u:`lb181nr7w`,kaIpWk:`lb16rqkct`,ksu8eU:`lbbsl7fq`,kMzoRj:`lbmkeg23`,kSiTet:`lbti2d7y`,kVAEAm:`lb10l6tqk`,$$css:!0},overlay:{kpwlN0:`lb10a8y8t`,kOIVth:`lb167g77z`,kGNEyG:`lb6s0dn4`,kWkggS:`lb1c0b5dz`,kMwMTN:`lbc77et8`,k1xSpc:`lb78zum5`,kXwgrk:`lbdt5ytf`,kjj79g:`lbl56j7k`,kVAEAm:`lb10l6tqk`,$$css:!0},ring:{k4XH5M:`lbwsa1kb`,$$css:!0},ringProgress:{kjVXCG:`lb1q6ff6i`,$$css:!0},ringTrack:{kjVXCG:`lb12pnydc`,$$css:!0},root:{kGNEyG:`lb6s0dn4`,kMwMTN:`lbc77et8`,k1xSpc:`lb3nfvp2`,$$css:!0},tip:{kMwMTN:`lbc77et8`,kGuDYH:`lbxobqjj`,$$css:!0},wrapper:{kVAEAm:`lb1n2onr6`,$$css:!0}},Rp=[0,1,2],zp=25,Bp=Rp.flatMap(e=>Rp.map(t=>({x:zp+e*zp,y:zp+t*zp}))),Vp=Rp.slice(0,-1).flatMap(e=>Rp.flatMap(t=>Rp.map(n=>({x1:zp+e*zp,x2:zp+(e+1)*zp,y1:zp+t*zp,y2:zp+n*zp})))),Hp=[0,1,2],Up=(e,t,n)=>Math.max(e,n*100/t),Wp=(0,K.memo)(({px:e})=>{let t={"--spin-node-size":`${Up(6,e,2)}px`,"--spin-particle-size":`${Up(3,e,1.5)}px`,transform:`scale(${e/100})`};return(0,G.jsx)(`span`,{...z(X.network),style:{height:e,width:e},children:(0,G.jsxs)(`span`,{...z(X.networkBox),style:t,children:[(0,G.jsx)(`svg`,{...z(X.networkLines),viewBox:`0 0 100 100`,children:Vp.map(e=>(0,G.jsx)(`line`,{...e,...z(X.networkLine)},`${e.x1}-${e.y1}-${e.y2}`))}),Bp.map(({x:e,y:t},n)=>(0,G.jsx)(`i`,{...z(X.networkNode),style:{animationDelay:`${n*.2}s`,left:e,top:t}},`${e}-${t}`)),Hp.map(e=>(0,G.jsx)(`i`,{...z(X.networkParticle),style:{animationDelay:`${e*.6}s`}},e)),(0,G.jsx)(`b`,{...z(X.networkCore)}),(0,G.jsx)(`u`,{...z(X.networkRing)})]})})});Wp.displayName=`NetworkGlyph`;var Gp=Nt({block:`spin`,dataAttributes:[`size`,`variant`],elements:[`indicator`,`overlay`,`tip`]}),Kp={large:32,middle:20,small:14},qp=e=>typeof e==`number`?e:Kp[e],Jp=(0,K.memo)(({children:e,className:t,indicator:n,percent:r,ref:i,size:a=`middle`,spinning:o=!0,style:s,tip:c,variant:l=`default`,...u})=>{let d=(0,K.useMemo)(()=>qp(a),[a]),f=(0,K.useMemo)(()=>{if(n)return n;if(l===`network`)return(0,G.jsx)(Wp,{px:d});if(typeof r==`number`){let e=Math.min(100,Math.max(0,r)),t=2*Math.PI*9,n=t*(1-e/100);return(0,G.jsxs)(`svg`,{...z(X.glyph,X.ring),height:d,viewBox:`0 0 24 24`,width:d,children:[(0,G.jsx)(`circle`,{...z(X.ringTrack),cx:12,cy:12,fill:`none`,r:9,strokeWidth:2.5}),(0,G.jsx)(`circle`,{...z(X.ringProgress),cx:12,cy:12,fill:`none`,r:9,strokeDasharray:t,strokeDashoffset:n,strokeLinecap:`round`,strokeWidth:2.5})]})}return(0,G.jsx)(yt,{spin:!0,...z(X.glyph),icon:We,size:d})},[n,l,r,d]);if(!o)return e??null;let p=Mt({size:typeof a==`string`?a:void 0,variant:l});return e?(0,G.jsxs)(`div`,{ref:i,...B(X.wrapper,V(Gp(),t),s),...p,...u,children:[e,(0,G.jsxs)(`div`,{"aria-busy":!0,"aria-live":`polite`,...B(X.overlay,Gp(`overlay`)),role:`status`,children:[(0,G.jsx)(`span`,{"aria-hidden":!0,...B(X.glyphBox,Gp(`indicator`)),children:f}),c&&(0,G.jsx)(`span`,{...B(X.tip,Gp(`tip`)),children:c})]})]}):(0,G.jsx)(`div`,{"aria-busy":!0,"aria-live":`polite`,ref:i,role:`status`,...B(X.root,V(Gp(),t),s),...p,...u,children:(0,G.jsx)(`span`,{"aria-hidden":!0,...B(X.glyphBox,Gp(`indicator`)),children:f})})});Jp.displayName=`Spin`;var Yp=(e=>(e[e.Border=-1]=`Border`,e[e.Data=0]=`Data`,e[e.Function=1]=`Function`,e[e.Position=2]=`Position`,e[e.Timing=3]=`Timing`,e[e.Alignment=4]=`Alignment`,e))(Yp||{}),Xp=[0,1],Zp=[1,0],Qp=[2,3],$p=[3,2],em={L:Xp,M:Zp,Q:Qp,H:$p},tm=/^\d*$/,nm=/^[A-Z0-9 $%*+./:-]*$/,rm=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`,im=1,am=40,om=3,sm=3,cm=40,lm=10,um=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],dm=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],fm=class{constructor(e,t,n,r){if(this.version=e,this.ecc=t,e<im||e>am)throw RangeError(`Version value out of range`);if(r<-1||r>7)throw RangeError(`Mask value out of range`);this.size=e*4+17;let i=Array.from({length:this.size}).fill(!1);for(let e=0;e<this.size;e++)this.modules.push(i.slice()),this.types.push(i.map(()=>0));this.drawFunctionPatterns();let a=this.addEccAndInterleave(n);if(this.drawCodewords(a),r===-1){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);let n=this.getPenaltyScore();n<e&&(r=t,e=n),this.applyMask(t)}}this.mask=r,this.applyMask(r),this.drawFormatBits(r)}size;mask;modules=[];types=[];getModule(e,t){return e>=0&&e<this.size&&t>=0&&t<this.size&&this.modules[t][e]}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0,Yp.Timing),this.setFunctionModule(e,6,e%2==0,Yp.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let r=0;r<t;r++)n===0&&r===0||n===0&&r===t-1||n===t-1&&r===0||this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let t=this.ecc[1]<<3|e,n=t;for(let e=0;e<10;e++)n=n<<1^(n>>>9)*1335;let r=(t<<10|n)^21522;for(let e=0;e<=5;e++)this.setFunctionModule(8,e,mm(r,e));this.setFunctionModule(8,7,mm(r,6)),this.setFunctionModule(8,8,mm(r,7)),this.setFunctionModule(7,8,mm(r,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,mm(r,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,mm(r,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,mm(r,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;let t=this.version<<12|e;for(let e=0;e<18;e++){let n=mm(t,e),r=this.size-11+e%3,i=Math.floor(e/3);this.setFunctionModule(r,i,n),this.setFunctionModule(i,r,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){let i=Math.max(Math.abs(r),Math.abs(n)),a=e+r,o=t+n;a>=0&&a<this.size&&o>=0&&o<this.size&&this.setFunctionModule(a,o,i!==2&&i!==4,Yp.Position)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,t+n,Math.max(Math.abs(r),Math.abs(n))!==1,Yp.Alignment)}setFunctionModule(e,t,n,r=Yp.Function){this.modules[t][e]=n,this.types[t][e]=r}addEccAndInterleave(e){let t=this.version,n=this.ecc;if(e.length!==km(t,n))throw RangeError(`Invalid argument`);let r=dm[n[0]][t],i=um[n[0]][t],a=Math.floor(Om(t)/8),o=r-a%r,s=Math.floor(a/r),c=[],l=Am(i);for(let t=0,n=0;t<r;t++){let r=e.slice(n,n+s-i+(t<o?0:1));n+=r.length;let a=jm(r,l);t<o&&r.push(0),c.push(r.concat(a))}let u=[];for(let e=0;e<c[0].length;e++)c.forEach((t,n)=>{(e!==s-i||n>=o)&&u.push(t[e])});return u}drawCodewords(e){if(e.length!==Math.floor(Om(this.version)/8))throw RangeError(`Invalid argument`);let t=0;for(let n=this.size-1;n>=1;n-=2){n===6&&(n=5);for(let r=0;r<this.size;r++)for(let i=0;i<2;i++){let a=n-i,o=n+1&2?r:this.size-1-r;!this.types[o][a]&&t<e.length*8&&(this.modules[o][a]=mm(e[t>>>3],7-(t&7)),t++)}}}applyMask(e){if(e<0||e>7)throw RangeError(`Mask value out of range`);for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let r;switch(e){case 0:r=(n+t)%2==0;break;case 1:r=t%2==0;break;case 2:r=n%3==0;break;case 3:r=(n+t)%3==0;break;case 4:r=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:r=n*t%2+n*t%3==0;break;case 6:r=(n*t%2+n*t%3)%2==0;break;case 7:r=((n+t)%2+n*t%3)%2==0;break;default:throw Error(`Unreachable`)}!this.types[t][n]&&r&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let t=0;t<this.size;t++){let n=!1,r=0,i=[0,0,0,0,0,0,0];for(let a=0;a<this.size;a++)this.modules[t][a]===n?(r++,r===5?e+=om:r>5&&e++):(this.finderPenaltyAddHistory(r,i),n||(e+=this.finderPenaltyCountPatterns(i)*cm),n=this.modules[t][a],r=1);e+=this.finderPenaltyTerminateAndCount(n,r,i)*cm}for(let t=0;t<this.size;t++){let n=!1,r=0,i=[0,0,0,0,0,0,0];for(let a=0;a<this.size;a++)this.modules[a][t]===n?(r++,r===5?e+=om:r>5&&e++):(this.finderPenaltyAddHistory(r,i),n||(e+=this.finderPenaltyCountPatterns(i)*cm),n=this.modules[a][t],r=1);e+=this.finderPenaltyTerminateAndCount(n,r,i)*cm}for(let t=0;t<this.size-1;t++)for(let n=0;n<this.size-1;n++){let r=this.modules[t][n];r===this.modules[t][n+1]&&r===this.modules[t+1][n]&&r===this.modules[t+1][n+1]&&(e+=sm)}let t=0;for(let e of this.modules)t=e.reduce((e,t)=>e+ +!!t,t);let n=this.size*this.size,r=Math.ceil(Math.abs(t*20-n*10)/n)-1;return e+=r*lm,e}getAlignmentPatternPositions(){if(this.version===1)return[];{let e=Math.floor(this.version/7)+2,t=this.version===32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,n=[6];for(let r=this.size-7;n.length<e;r-=t)n.splice(1,0,r);return n}}finderPenaltyCountPatterns(e){let t=e[1],n=t>0&&e[2]===t&&e[3]===t*3&&e[4]===t&&e[5]===t;return(n&&e[0]>=t*4&&e[6]>=t?1:0)+(n&&e[6]>=t*4&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){t[0]===0&&(e+=this.size),t.pop(),t.unshift(e)}};function pm(e,t,n){if(t<0||t>31||e>>>t)throw RangeError(`Value out of range`);for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function mm(e,t){return!!(e>>>t&1)}var hm=class{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw RangeError(`Invalid argument`);this.bitData=n.slice()}getData(){return this.bitData.slice()}},gm=[1,10,12,14],_m=[2,9,11,13],vm=[4,8,16,16];function ym(e,t){return e[Math.floor((t+7)/17)+1]}function bm(e){let t=[];for(let n of e)pm(n,8,t);return new hm(vm,e.length,t)}function xm(e){if(!wm(e))throw RangeError(`String contains non-numeric characters`);let t=[];for(let n=0;n<e.length;){let r=Math.min(e.length-n,3);pm(Number.parseInt(e.substring(n,n+r),10),r*3+1,t),n+=r}return new hm(gm,e.length,t)}function Sm(e){if(!Tm(e))throw RangeError(`String contains unencodable characters in alphanumeric mode`);let t=[],n=0;for(;n+2<=e.length;n+=2){let r=rm.indexOf(e.charAt(n))*45;r+=rm.indexOf(e.charAt(n+1)),pm(r,11,t)}return n<e.length&&pm(rm.indexOf(e.charAt(n)),6,t),new hm(_m,e.length,t)}function Cm(e){return e===``?[]:wm(e)?[xm(e)]:Tm(e)?[Sm(e)]:[bm(Dm(e))]}function wm(e){return tm.test(e)}function Tm(e){return nm.test(e)}function Em(e,t){let n=0;for(let r of e){let e=ym(r.mode,t);if(r.numChars>=1<<e)return 1/0;n+=4+e+r.bitData.length}return n}function Dm(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)e.charAt(n)===`%`?(t.push(Number.parseInt(e.substring(n+1,n+3),16)),n+=2):t.push(e.charCodeAt(n));return t}function Om(e){if(e<im||e>am)throw RangeError(`Version number out of range`);let t=(16*e+128)*e+64;if(e>=2){let n=Math.floor(e/7)+2;t-=(25*n-10)*n-55,e>=7&&(t-=36)}return t}function km(e,t){return Math.floor(Om(e)/8)-um[t[0]][e]*dm[t[0]][e]}function Am(e){if(e<1||e>255)throw RangeError(`Degree out of range`);let t=[];for(let n=0;n<e-1;n++)t.push(0);t.push(1);let n=1;for(let r=0;r<e;r++){for(let e=0;e<t.length;e++)t[e]=Mm(t[e],n),e+1<t.length&&(t[e]^=t[e+1]);n=Mm(n,2)}return t}function jm(e,t){let n=t.map(e=>0);for(let r of e){let e=r^n.shift();n.push(0),t.forEach((t,r)=>n[r]^=Mm(t,e))}return n}function Mm(e,t){if(e>>>8||t>>>8)throw RangeError(`Byte out of range`);let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(t>>>r&1)*e;return n}function Nm(e,t,n=1,r=40,i=-1,a=!0){if(!(im<=n&&n<=r&&r<=am)||i<-1||i>7)throw RangeError(`Invalid value`);let o,s;for(o=n;;o++){let n=km(o,t)*8,i=Em(e,o);if(i<=n){s=i;break}if(o>=r)throw RangeError(`Data too long`)}for(let e of[Zp,Qp,$p])a&&s<=km(o,e)*8&&(t=e);let c=[];for(let t of e){pm(t.mode[0],4,c),pm(t.numChars,ym(t.mode,o),c);for(let e of t.getData())c.push(e)}let l=km(o,t)*8;pm(0,Math.min(4,l-c.length),c),pm(0,(8-c.length%8)%8,c);for(let e=236;c.length<l;e^=253)pm(e,8,c);let u=Array.from({length:Math.ceil(c.length/8)},()=>0);return c.forEach((e,t)=>u[t>>>3]|=e<<7-(t&7)),new fm(o,t,u,i)}function Pm(e,t){let{ecc:n=`L`,boostEcc:r=!1,minVersion:i=1,maxVersion:a=40,maskPattern:o=-1,border:s=1}=t||{},c=typeof e==`string`?Cm(e):Array.isArray(e)?[bm(e)]:void 0;if(!c)throw Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);let l=Nm(c,em[n],i,a,o,r),u=Fm({version:l.version,maskPattern:l.mask,size:l.size,data:l.modules,types:l.types},s);return t?.invert&&(u.data=u.data.map(e=>e.map(e=>!e))),t?.onEncoded?.(u),u}function Fm(e,t=1){if(!t)return e;let{size:n}=e,r=n+t*2;e.size=r,e.data.forEach(e=>{for(let n=0;n<t;n++)e.unshift(!1),e.push(!1)});for(let n=0;n<t;n++)e.data.unshift(Array.from({length:r},e=>!1)),e.data.push(Array.from({length:r},e=>!1));let i=Yp.Border;e.types.forEach(e=>{for(let n=0;n<t;n++)e.unshift(i),e.push(i)});for(let n=0;n<t;n++)e.types.unshift(Array.from({length:r},e=>i)),e.types.push(Array.from({length:r},e=>i));return e}var Im={"qrCode.expired":`Expired`,"qrCode.loading":`Loading`,"qrCode.refresh":`Refresh`},Lm=(e,t)=>{let n=e.length,r=Math.floor((n-t)/2),i=r+t,a=``;for(let o=0;o<n;o++)for(let s=0;s<n;s++)t>0&&s>=r&&s<i&&o>=r&&o<i||e[o][s]&&(a+=`M${s} ${o}h1v1h-1z`);return a},Rm=Nt({block:`qr-code`,dataAttributes:[`status`,`bordered`],elements:[`code`,`icon`,`overlay`,`title`,`refresh`]}),zm={bordered:{kGVxlE:`lbnug1en`,$$css:!0},icon:{kaIpWk:`lb16rqkct`,kVQacm:`lbb3r6kr`,kGNEyG:`lb6s0dn4`,kGVxlE:`lbgffery`,k1xSpc:`lb78zum5`,k87sOh:`lbwa60dl`,kLqNvP:`lbbudbmw`,kjj79g:`lbl56j7k`,kVAEAm:`lb10l6tqk`,k3aq6I:`lb11lhmoz`,$$css:!0},iconDefaultSize:{kZKoxP:`lb1iafx81`,kzqmXN:`lb1tzk97j`,$$css:!0},overlay:{kpwlN0:`lb10a8y8t`,kaIpWk:`lbgqmno8`,kOIVth:`lb1v2ro7d`,kGNEyG:`lb6s0dn4`,kWkggS:`lbsuhtdx`,kMwMTN:`lb1a94cpc`,k1xSpc:`lb78zum5`,kXwgrk:`lbdt5ytf`,kjj79g:`lbl56j7k`,kVAEAm:`lb10l6tqk`,$$css:!0},overlayTitle:{kGuDYH:`lb19d36u7`,k63SB2:`lb1s688f`,$$css:!0},refresh:{kaIpWk:`lb1e6avla`,ksu8eU:`lbng3xce`,kMzoRj:`lbc342km`,kjAs5C:`lb1aazh3f`,kOIVth:`lb17d4w8g`,kg3NbH:`lbqin4a2`,kGNEyG:`lb6s0dn4`,kWkggS:`lb1qtvmyh`,kMwMTN:`lbfungia`,kkrTdU:`lb1ypdohk`,k1xSpc:`lb3nfvp2`,kMv6JI:`lbjb2p0i`,kGuDYH:`lb4z9k3i`,kQqvRs:`lb1xh6y1q`,kKX8nH:`lb1t35e8`,k63SB2:`lbk50ysn`,kjj79g:`lbl56j7k`,kLWn49:`lb15bjb6t`,kZKoxP:`lb10w6t97`,$$css:!0},root:{kmVPX3:`lb1tamke2`,kaIpWk:`lbgqmno8`,kWkggS:`lb83z2og`,k1xSpc:`lb3nfvp2`,kVAEAm:`lb1n2onr6`,$$css:!0},spin:{kMwMTN:`lb33gn0b`,$$css:!0}},Bm=.22,Vm=(0,K.memo)(({bgColor:e,bordered:t=!0,className:n,color:r=`#000`,errorLevel:i=`M`,icon:a,onRefresh:o,ref:s,size:c,status:l=`active`,style:u,value:d,...f})=>{let{t:p}=Wt(Im),m=c??160,{count:h,path:g}=(0,K.useMemo)(()=>{try{let{data:e}=Pm(d,{border:0,ecc:a?`H`:i}),t=a?Math.ceil(e.length*Bm)|1:0;return{count:e.length,path:Lm(e,t)}}catch{return{count:0,path:``}}},[d,a,i]);return(0,G.jsxs)(`div`,{ref:s,...B([zm.root,t&&zm.bordered],V(Rm(),n),e===void 0?u:{background:e,...u}),...Mt({bordered:t,status:l}),...f,children:[(0,G.jsxs)(`svg`,{"aria-label":d,className:Rm(`code`),height:m,role:`img`,shapeRendering:`crispEdges`,viewBox:`0 0 ${h} ${h}`,width:m,children:[(0,G.jsx)(`rect`,{fill:e??`#fff`,height:h,width:h}),(0,G.jsx)(`path`,{d:g,fill:r})]}),a&&(0,G.jsx)(`span`,{...B([zm.icon,c===void 0&&zm.iconDefaultSize],Rm(`icon`),c===void 0?void 0:{height:m*Bm,width:m*Bm}),children:a}),l===`loading`&&(0,G.jsx)(`span`,{"aria-label":p(`qrCode.loading`),...B(zm.overlay,Rm(`overlay`)),role:`status`,children:(0,G.jsx)(Jp,{className:B(zm.spin).className})}),l===`expired`&&(0,G.jsxs)(`span`,{...B(zm.overlay,Rm(`overlay`)),children:[(0,G.jsx)(`span`,{...B(zm.overlayTitle,Rm(`title`)),children:p(`qrCode.expired`)}),o&&(0,G.jsxs)(`button`,{...B([bt.info,zm.refresh],Rm(`refresh`)),type:`button`,onClick:o,children:[(0,G.jsx)(yt,{icon:$o,size:14}),p(`qrCode.refresh`)]})]})]})});Vm.displayName=`QRCode`;var Hm=e({Board:()=>np,Group:()=>Um,Item:()=>Xf}),Um=Lf(Vd),Wm=e({Reorder:()=>Hm,a:()=>za,abbr:()=>ga,address:()=>ja,animate:()=>Qi,area:()=>Si,article:()=>ba,aside:()=>Fa,audio:()=>ki,b:()=>ca,base:()=>Ua,bdi:()=>Ni,bdo:()=>Bi,big:()=>wa,blockquote:()=>fa,body:()=>Ji,button:()=>Wi,canvas:()=>vi,caption:()=>qa,circle:()=>ao,cite:()=>Ei,clipPath:()=>to,code:()=>Kr,col:()=>Zn,colgroup:()=>Za,create:()=>Na,data:()=>Xr,datalist:()=>ir,dd:()=>tr,defs:()=>Pr,del:()=>aa,desc:()=>Gn,details:()=>na,dfn:()=>Or,dialog:()=>jr,div:()=>Lr,dl:()=>sr,dt:()=>gr,ellipse:()=>Tr,em:()=>Ur,embed:()=>lo,feBlend:()=>Jn,feColorMatrix:()=>ri,feComponentTransfer:()=>pr,feComposite:()=>ei,feConvolveMatrix:()=>oi,feDiffuseLighting:()=>ur,feDisplacementMap:()=>Sr,feDistantLight:()=>Oa,feDropShadow:()=>yr,feFlood:()=>fi,feFuncA:()=>li,feFuncB:()=>hi,feFuncG:()=>Br,feFuncR:()=>Hn,feGaussianBlur:()=>zi,feImage:()=>Ha,feMerge:()=>ya,feMergeNode:()=>Pa,feMorphology:()=>ta,feOffset:()=>Ti,fePointLight:()=>Ca,feSpecularLighting:()=>Ra,feSpotLight:()=>Mi,feTile:()=>da,feTurbulence:()=>Ka,fieldset:()=>Ii,figcaption:()=>Ui,figure:()=>Da,filter:()=>ha,footer:()=>Zi,foreignObject:()=>qi,form:()=>xi,g:()=>Xa,h1:()=>co,h2:()=>Oi,h3:()=>io,h4:()=>Yr,h5:()=>er,h6:()=>eo,head:()=>$r,header:()=>or,hgroup:()=>rr,hr:()=>Ir,html:()=>sa,i:()=>qn,iframe:()=>ia,image:()=>Ar,img:()=>Nr,input:()=>zr,ins:()=>lr,kbd:()=>vr,keygen:()=>Dr,label:()=>Gr,legend:()=>fo,li:()=>Xn,line:()=>ai,linearGradient:()=>hr,link:()=>ni,main:()=>ci,map:()=>fr,mark:()=>wr,marker:()=>Aa,mask:()=>xr,menu:()=>mi,menuitem:()=>di,metadata:()=>_i,meter:()=>Hr,nav:()=>Wn,object:()=>Li,ol:()=>Ba,optgroup:()=>_a,option:()=>Ma,output:()=>$i,p:()=>Ci,param:()=>xa,path:()=>Ia,pattern:()=>Ai,picture:()=>la,polygon:()=>Wa,polyline:()=>Pi,pre:()=>Vi,progress:()=>Ta,q:()=>pa,radialGradient:()=>Yi,rect:()=>Gi,rp:()=>yi,rt:()=>Ja,ruby:()=>oo,s:()=>Di,samp:()=>no,script:()=>qr,section:()=>Qn,select:()=>Qa,small:()=>Zr,source:()=>ar,span:()=>nr,stop:()=>Fr,strong:()=>oa,style:()=>Kn,sub:()=>ra,summary:()=>kr,sup:()=>Mr,svg:()=>Rr,symbol:()=>cr,table:()=>_r,tbody:()=>Er,td:()=>Wr,text:()=>uo,textPath:()=>Yn,textarea:()=>ii,tfoot:()=>mr,th:()=>ti,thead:()=>si,time:()=>dr,title:()=>Cr,tr:()=>ka,track:()=>br,tspan:()=>pi,u:()=>ui,ul:()=>gi,use:()=>Vr,video:()=>Un,view:()=>Ri,wbr:()=>Va,webview:()=>va}),Gm=v();function Km(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var n,r,i,a,o=[],s=``,c=e.split(`/`);for(c[0]||c.shift();i=c.shift();)n=i[0],n===`*`?(o.push(n),s+=i[1]===`?`?`(?:/(.*))?`:`/(.*)`):n===`:`?(r=i.indexOf(`?`,1),a=i.indexOf(`.`,1),o.push(i.substring(1,~r?r:~a?a:i.length)),s+=~r&&!~a?`(?:/([^/]+?))?`:`/([^/]+?)`,~a&&(s+=(~r?`?`:``)+`\\`+i.substring(a))):s+=`/`+i;return{keys:o,pattern:RegExp(`^`+s+(t?`(?=$|/)`:`/?$`),`i`)}}var qm=lt(),Jm=K.useInsertionEffect,Ym=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0?K.useLayoutEffect:K.useEffect,Xm=Jm||Ym,Zm=e=>{let t=K.useRef([e,(...e)=>t[0](...e)]).current;return Xm(()=>{t[0]=e}),t[1]},Qm=[`popstate`,`pushState`,`replaceState`,`hashchange`],$m=[],eh=()=>$m.forEach(e=>e()),th=e=>($m.push(e)===1&&Qm.forEach(e=>addEventListener(e,eh)),()=>{$m=$m.filter(t=>t!==e),$m.length||Qm.forEach(e=>removeEventListener(e,eh))}),nh=(e,t)=>(0,qm.useSyncExternalStore)(th,e,t),rh=()=>location.search,ih=({ssrSearch:e}={})=>nh(rh,e==null?rh:()=>e),ah=()=>location.pathname,oh=({ssrPath:e}={})=>nh(ah,e==null?ah:()=>e),sh=(e,{replace:t=!1,state:n=null}={})=>history[t?`replaceState`:`pushState`](n,``,e),ch=e=>[oh(e),sh],lh=Symbol.for(`wouter_v3`);if(typeof history<`u`&&window[lh]===void 0){for(let e of[`pushState`,`replaceState`]){let t=history[e];history[e]=function(){let n=t.apply(this,arguments),r=new Event(e);return r.arguments=arguments,dispatchEvent(r),n}}Object.defineProperty(window,lh,{value:!0})}var uh=(e=``)=>e===`/`?``:e,dh=(e,t)=>e[0]===`~`?e.slice(1):uh(t)+e,fh=(e,t)=>(e=ph(uh(e)),t=ph(t),!e||(t.toLowerCase()+`/`).startsWith(e.toLowerCase()+`/`)?t.slice(e.length)||`/`:`~`+t),ph=e=>{try{return e.includes(`%`)?decodeURI(e):e}catch{return e}},mh={hook:ch,searchHook:ih,parser:Km,base:``,ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:e=>e,aroundNav:(e,t,n)=>e(t,n)},hh=(0,K.createContext)(mh),gh=()=>(0,K.useContext)(hh);(0,K.createContext)({});var _h=e=>{let[t,n]=e.hook(e);return[fh(e.base,t),Zm((t,r)=>e.aroundNav(n,dh(t,e.base),r))]},vh=()=>_h(gh());(0,K.forwardRef)((e,t)=>{let n=gh(),[r,i]=_h(n),{to:a=``,href:o=a,onClick:s,asChild:c,children:l,className:u,replace:d,state:f,transition:p,...m}=e;return m.onClick=Zm(t=>{t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||t.button!==0||(s?.(t),t.defaultPrevented||(t.preventDefault(),i(o,e)))}),m.href=n.hrefs(o[0]===`~`?o.slice(1):n.base+o,n),u!==void 0&&(m.className=u?.call?u(r===o):u),t&&(m.ref=t),c&&(0,K.isValidElement)(l)?(0,K.cloneElement)(l,m):(0,K.createElement)(`a`,m,l)});var yh=0,bh=0,xh=new Set;function Sh(){bh||yh>0||xh.size===0||(bh=requestAnimationFrame(()=>{if(bh=0,yh>0)return;let e=[...xh];xh.clear();for(let t of e)t()}))}function Ch(){return yh+=1,()=>{--yh,Sh()}}function wh({label:e}){return(0,K.useEffect)(Ch,[]),(0,G.jsx)(i,{stack:!0,label:e,size:32})}var Th={claude:`Claude Code`,codex:`Codex`,antigravity:`Antigravity`};function Eh(e,t){return e.harness===`claude`?t.find(t=>t.host===`claude`&&t.id===e.sessionId)?.id??null:t.filter(t=>t.host===e.harness).sort((e,t)=>t.since-e.since)[0]?.id??null}var Dh=e=>e.kind!==`none`&&e.kind!==`login`,Oh=e=>e.kind===`quiet`||e.kind===`command`&&e.stuck===!0,kh=e=>e.kind===`menu`||e.kind===`login`||e.kind===`error`?`amber`:e.kind===`quiet`||e.kind===`command`&&e.stuck?`grey`:null,Ah=(e,t)=>Math.max(1,Math.floor((t-e)/6e4));function jh(e,t,n,r){let i=Ah(e.since,t);switch(e.kind){case`menu`:return n(`daemon.waiting`);case`login`:return n(`daemon.login`);case`error`:return n(`daemon.error`);case`quiet`:return n(`daemon.quiet`,{minutes:i});case`command`:return e.stuck?n(`daemon.commandStuck`,{minutes:i}):n(`daemon.command`,{command:e.line??``,minutes:i});default:return r}}var Mh=new Set([`thinking`,`running`,`your-turn`,`needs-approval`]),Nh=new Set([`starting`,`queued`]),Ph=e=>e.daemon!==null&&kh(e.daemon.attention)===`amber`;function Fh(e){return(e.daemon?kh(e.daemon.attention)??(Nh.has(e.daemon.state)?`grey`:null):null)??(e.state===`needs-approval`?`amber`:null)}var Ih={"needs-approval":1,running:2,thinking:3,"your-turn":5};function Lh(e){if(Ph(e))return 0;let t=Fh(e);return e.state?t===`grey`&&e.state!==`needs-approval`?4:Ih[e.state]:t===`grey`?4:e.daemon?.state===`running`?2:5}function Rh(e,t){let n=e.filter(e=>Mh.has(e.state)),r=t&&t.state!==`ended`?t:null,i=r?Eh(r,n):null,a=n.map((e,t)=>({key:e.host&&e.id?`${e.host}:${e.id}`:`hook:${t}`,agent:e.agent,state:e.state,since:e.since,turn:e.turn??null,daemon:r&&i!==null&&e.id===i?r:null}));return r&&i===null&&a.push({key:`daemon:${r.taskId}`,agent:Th[r.harness]??r.harness,state:null,since:r.attention.since,turn:null,daemon:r}),a.sort((e,t)=>Lh(e)-Lh(t))}async function zh(e){let t=await fetch(`/api/agent/daemon`,{method:`POST`,credentials:`same-origin`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)}),n=await t.json().catch(()=>null);if(!t.ok||!n?.ok)throw Error(n?.error??`HTTP ${t.status}`);return n.data}function Bh(e){return{screen:async()=>{let t=await zh({artifact:e,op:`agent-screen`});return Array.isArray(t?.lines)?t.lines.filter(e=>typeof e==`string`):[]},input:async t=>{await zh({artifact:e,op:`agent-input`,...t})}}}var Vh=e=>new URLSearchParams(e).get(`agent`)===`1`;function Hh(){let[e,t]=(0,K.useState)([]),[n,r]=(0,K.useState)([]);return(0,K.useEffect)(()=>{let e=null,n,i=!1,a=()=>{e=new WebSocket(_o(location)),e.onmessage=e=>{let n=JSON.parse(String(e.data));n.type===`agent-status`&&(t(n.sessions),r(n.daemon??[]))},e.onclose=()=>{t([]),r([]),i||(n=setTimeout(a,1e3))}};return a(),()=>{i=!0,clearTimeout(n),e?.close()}},[]),{sessions:e,daemon:n}}var Uh=(0,K.lazy)(()=>_(async()=>{let{AgentDock:e}=await import(`./AgentDock---hZRdMk.js`);return{AgentDock:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]),import.meta.url).then(({AgentDock:e})=>({default:e})));function Wh({artifact:e}){let{sessions:t,daemon:n}=Hh(),r=n.find(t=>t.artifact===e)??null,i=(0,K.useMemo)(()=>Bh(e),[e]),a=Rh(t.filter(t=>t.artifacts.includes(e)),r);return a.length===0?null:(0,G.jsx)(K.Suspense,{fallback:null,children:(0,G.jsx)(Uh,{trusted:!0,rows:a,transport:r?i:null})})}var Gh=[`private`,`public`,`total`,`publishes`,`storage`,`objects`],Kh=e=>e===`preparing`||e===`uploading`||e===`publishing`;function qh(e){if(!e||typeof e!=`object`)return null;let t=e;return typeof t.phase!=`string`||![`waiting`,`preparing`,`uploading`,`publishing`,`not-ready`,`failed`,`published`].includes(t.phase)||t.publishedAt!==null&&(typeof t.publishedAt!=`string`||!Number.isFinite(Date.parse(t.publishedAt)))||typeof t.autoPublish!=`boolean`||t.message!==void 0&&typeof t.message!=`string`||t.reasons!==void 0&&(!Array.isArray(t.reasons)||!t.reasons.every(e=>typeof e==`string`))?null:t}var Jh=[`1d`,`7d`,`30d`,`never`],Yh=(e,t)=>!!e?.expiresAt&&Date.parse(e.expiresAt)<=t;function Xh(e){let t=e?.visibility??`private`,n=e?.cloud,r=!!n?.publishedAt;return{published:r,visibility:t,access:t===`private`&&n?.keyed?`key`:t,onProfile:n?.onProfile===!0,url:r?n.url:null,synced:!r||n.visibility===t}}function Zh(e,t){return e===null?null:e?`upToDate`:t?`localChangesAuto`:`localChanges`}var Qh=2e3,$h=3e5;async function Z(e,t,n){try{let r=await fetch(l(`/api/cloud/${t}`),{method:e,cache:`no-store`,headers:n===void 0?{}:{"Content-Type":`application/json`},body:n===void 0?void 0:JSON.stringify(n)}),i=await r.json().catch(()=>({}));return{ok:r.ok,status:r.status,json:i}}catch(e){return{ok:!1,status:0,json:{error:e.message}}}}function eg(){let[e,t]=(0,K.useState)(null),[n,r]=(0,K.useState)(!1),i=(0,K.useRef)(null),a=(0,K.useCallback)(async()=>{let e=await Z(`GET`,`status`);return e.ok&&t(e.json),e.ok?e.json:null},[]),o=(0,K.useCallback)(()=>{i.current!==null&&window.clearInterval(i.current),i.current=null,r(!1)},[]),s=(0,K.useCallback)(async e=>{let t=e??(await Z(`POST`,`login`,{source:`viewer`})).json.url;if(!t)return;window.open(t,`_blank`,`noopener`),o(),r(!0);let n=Date.now();i.current=window.setInterval(async()=>{((await a())?.signedIn||Date.now()-n>$h)&&o()},Qh)},[a,o]);return(0,K.useEffect)(()=>{a();let e=go(e=>{(e.type===`cloud-publication`||e.type===`cloud-published`)&&a()});return()=>{e(),o()}},[a,o]),{status:e,refresh:a,login:s,waitingForLogin:n}}var tg=(0,K.createContext)(null);function ng({pageWindow:e,children:t}){return(0,G.jsx)(tg.Provider,{value:e??null,children:t})}var rg=()=>(0,K.useContext)(tg)??window;function ig(e,t){if(t===null)return e;let n=new URL(e);return n.searchParams.set(`page`,t),n.href}function ag(){let e=rg(),t=(0,K.useCallback)(t=>(e.addEventListener(`popstate`,t),e.addEventListener(`ryugi:pagechange`,t),()=>{e.removeEventListener(`popstate`,t),e.removeEventListener(`ryugi:pagechange`,t)}),[e]);return[(0,K.useSyncExternalStore)(t,()=>new URLSearchParams(e.location.search).get(`page`)),(0,K.useCallback)((t,n)=>{let r=new URL(e.location.href);r.searchParams.get(`page`)!==t&&(t===null?r.searchParams.delete(`page`):r.searchParams.set(`page`,t),e.history[n?`replaceState`:`pushState`](e.history.state,``,r),e.dispatchEvent(new Event(`ryugi:pagechange`)))},[e])]}var og=[`B`,`KB`,`MB`,`GB`];function sg(e){let t=e,n=0;for(;t>=1024&&n<og.length-1;)t/=1024,n++;return`${n===0?t:Number(t.toFixed(1))} ${og[n]}`}function cg(e,t){return typeof e==`string`&&c.exists(`errors.${e}`)?c.t(`errors.${e}`):t}var lg=e=>typeof e==`object`&&!!e&&Gh.includes(e.kind)&&typeof e.max==`number`;function ug({kind:e,max:t}){return c.t(`planLimit.${e}`,{max:e===`storage`?sg(t):t})}function dg(e,t){return e.code===`plan_limit`&&lg(e.limit)?ug(e.limit):cg(e.code,typeof e.error==`string`?e.error:t)}var fg=!1,pg=new Set,mg=e=>{if(fg!==e){fg=e;for(let e of pg)e()}},hg=()=>mg(!0),gg=()=>mg(!1),_g=()=>fg,vg=e=>(pg.add(e),()=>pg.delete(e)),yg=()=>(0,K.useSyncExternalStore)(vg,_g,_g),bg=e=>e?e.replace(/\/+$/,``):null,xg=(e,t)=>{let n=bg(e);return n?`${n}${t?.toLowerCase().startsWith(`zh`)?`/zh`:``}`:null},Sg=e=>{let t=bg(e);return t?`${t}/`:null},Cg=(e,t)=>{let n=bg(e);return n?`${n}/u/${encodeURIComponent(t)}`:null},wg=e=>{let t=bg(e);return t?`${t}/billing`:null},Tg={summary:{k1xSpc:`x3nfvp2`,kGNEyG:`x6s0dn4`,kOIVth:`x17d4w8g`,kGuDYH:`xfifm61`,khDVqt:`xuxw1ft`,kMwMTN:`x7zghnd`,$$css:!0},card:{k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kOIVth:`x167g77z`,kmVPX3:`xc7ga6q`,k1K539:`xod5an3`,kaIpWk:`xu4hgxq`,kWkggS:`xqdcvd7`,kMwMTN:`x7zghnd`,$$css:!0},success:{kWkggS:`xsf6uxt`,kMwMTN:`xh0clw4`,$$css:!0},failed:{kWkggS:`x8yy6z1`,kMwMTN:`xpt3syw`,$$css:!0}};function Eg({publication:e,published:t,publishedAt:r,online:i,onPublish:a,compact:o=!1,busy:s=!1}){let{t:c,i18n:l}=n(),u=Cf(),f=e?.phase??(t?`published`:`waiting`),p=t&&f!==`published`,m=Kh(f),h=c(`publication.${p?`update_${f}`:f}`),g=m?We:f===`failed`?rt:f===`published`?ue:zo,_=f===`failed`?Tg.failed:f===`published`?Tg.success:void 0,v=(0,G.jsx)(yt,{"aria-hidden":`true`,icon:g,size:o?14:16,spin:m&&!u});if(o)return(0,G.jsxs)(`span`,{role:`status`,...d(Tg.summary,_),children:[v,h]});let y=e?.publishedAt??r,b=a&&!m&&f!==`published`&&f!==`not-ready`;return(0,G.jsxs)(`section`,{"aria-label":c(`publication.label`),...d(Tg.card,_),children:[(0,G.jsxs)(`div`,{role:`status`,className:`x78zum5 x6s0dn4 x167g77z xfifm61 x1s688f`,children:[v,h]}),(0,G.jsx)(`p`,{className:`x1ghz6dp x1bo0w0s x1qt5hsa x4q1cud`,children:c(p&&f===`waiting`?`publication.updateWaitingDescription`:p&&f===`failed`?`publication.updateFailedDescription`:`publication.${f}Description`)}),e?.message?(0,G.jsx)(`p`,{role:`alert`,className:`x1ghz6dp x1bo0w0s x1qt5hsa x4q1cud`,children:e.message}):null,e?.reasons?.length?(0,G.jsx)(`ul`,{className:`x1ghz6dp xwn43p0 x1j6dyjg x4q1cud`,children:e.reasons.map((e,t)=>(0,G.jsx)(`li`,{children:e},t))}):null,b?(0,G.jsxs)(`button`,{disabled:s,type:`button`,onClick:a,className:`x78zum5 x6s0dn4 xl56j7k x17d4w8g x1rz828m x36usyh xc342km x1sxf85j x19ckca5 xs0jrwl xln7xf2 xfifm61 x1ypdohk`,children:[(0,G.jsx)(So,{"aria-hidden":`true`,size:14}),c(f===`failed`?`publication.retry`:`publication.publishNow`)]}):null,!m&&f!==`published`?(0,G.jsx)(`p`,{className:`x1ghz6dp x1bo0w0s x1qt5hsa x4q1cud`,children:c(i===!1?`publication.offline`:!a&&i===!0?`publication.updateLocal`:e?.autoPublish?`publication.autoPublish`:`publication.manualPublish`)}):null,p?(0,G.jsxs)(`p`,{className:`x1ghz6dp x1bo0w0s x1qt5hsa x4q1cud x1y1aw1k x178xt8z x13fuv20 xxu5053`,children:[c(`publication.previousVersion`),y?(0,G.jsxs)(G.Fragment,{children:[` `,(0,G.jsx)(`time`,{dateTime:y,children:new Date(y).toLocaleString(l.language)})]}):null]}):null]})}var Dg=(e,t)=>e===`public`&&(t===`private`||t===`unpublished`),Q={root:{k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kOIVth:`x195vfkc`,keoZOQ:`x1xmf6yo`,kLKAdn:`x1y1aw1k`,kEafiO:`x178xt8z`,kPef9Z:`x13fuv20`,kLZC3w:`xxu5053`,$$css:!0},summary:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x167g77z`,kzqmXN:`xh8yej3`,kmVPX3:`x14zjhkh`,kMzoRj:`xc342km`,kaIpWk:`xu4hgxq`,kWkggS:`xjbqb8w x9jwiqo`,kMwMTN:`xo2rkog`,kMv6JI:`xqfszdh`,kGuDYH:`xfifm61`,k9WMMc:`x1yc453h`,kkrTdU:`x1ypdohk`,$$css:!0},icon:{k1xSpc:`xrvj5dj`,kgQiWS:`x1ku5rj1`,kUk6DE:`x1okw0bk`,kzqmXN:`xvy4d1p`,kZKoxP:`xxk0z11`,kaIpWk:`x1kogg8i`,kWkggS:`xahzvm9`,kMwMTN:`x1bo0w0s`,$$css:!0},text:{kUk6DE:`x98rzlu`,k7Eaqz:`xeuugli`,kLWn49:`x1xfvgam`,$$css:!0},lead:{k1xSpc:`x1lliihq`,k63SB2:`x1s688f`,$$css:!0},sub:{k1xSpc:`x1lliihq`,kMwMTN:`xddlp02`,kGuDYH:`x1j6dyjg`,$$css:!0},chevron:{kMwMTN:`xddlp02`,$$css:!0},group:{k1xSpc:`x78zum5`,kjj79g:`x1qughib`,kogj98:`x12dmwbt`,kMwMTN:`xddlp02`,kGuDYH:`x1j6dyjg`,k63SB2:`xk50ysn`,$$css:!0},item:{k1xSpc:`x78zum5`,kGNEyG:`x1cy8zhl`,kOIVth:`x167g77z`,kmVPX3:`x14zjhkh`,$$css:!0},check:{kUk6DE:`x1okw0bk`,keoZOQ:`xvijh9v`,$$css:!0},body:{kUk6DE:`x98rzlu`,k7Eaqz:`xeuugli`,$$css:!0},name:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x17d4w8g`,k63SB2:`xk50ysn`,kLWn49:`x1xfvgam`,$$css:!0},title:{k7Eaqz:`xeuugli`,kVQacm:`xb3r6kr`,kg5iWk:`xlyipyv`,khDVqt:`xuxw1ft`,$$css:!0},type:{kUk6DE:`x1okw0bk`,kg3NbH:`xm9j1uf`,kaIpWk:`x12oqio5`,kWkggS:`xahzvm9`,kMwMTN:`x1bo0w0s`,kMv6JI:`x1fao0z8`,kGuDYH:`x1k6wstc`,$$css:!0},tag:{kUk6DE:`x1okw0bk`,kg3NbH:`xm9j1uf`,kaIpWk:`x12oqio5`,kMzoRj:`xmkeg23`,ksu8eU:`x1y0btm7`,kVAM5u:`x12xov25`,kMwMTN:`x1bo0w0s`,kGuDYH:`x1k6wstc`,$$css:!0},warnTag:{kVAM5u:`x9r1u3d`,kMwMTN:`x7zghnd`,$$css:!0},meta:{keoZOQ:`xvijh9v`,kMwMTN:`xddlp02`,kGuDYH:`x1j6dyjg`,kLWn49:`x37zpob`,$$css:!0},warn:{kMwMTN:`x7zghnd`,$$css:!0},error:{kMwMTN:`x12vcgws`,$$css:!0},action:{keoZOQ:`x1k70j0n`,$$css:!0}},Og={pad:{kg3NbH:`x5k8d2m`,$$css:!0}},kg=[{value:`private`,label:`share.onlyMe`,Icon:xo},{value:`public`,label:`share.anyone`,Icon:Qe}];function Ag({busy:e,error:t,onCopyFailed:r,onPublish:i,onVisibility:a,readOnly:o,rootVisibility:s,state:c,title:l,type:u,url:f,uses:p}){let{t:m}=n(),h=Dg(s,c),g=m(c===`public`?`cascade.tag.public`:c===`private`?`cascade.tag.private`:c===`unpublished`?`beside.unpublished`:`beside.unsupported`),_=async()=>{if(f)try{await navigator.clipboard.writeText(f)}catch{r?.()}},v=!o&&c!==`unsupported`,y=Q;return(0,G.jsxs)(`div`,{"data-beside-card":``,className:`x78zum5 xdt5ytf x195vfkc x1xmf6yo xe8ttls xmkeg23 x1y0btm7 x12xov25 xhpnuu7`,children:[(0,G.jsxs)(`span`,{className:`x78zum5 x6s0dn4 x1nejdyq xdd8z9q xddlp02 x1j6dyjg xk50ysn`,children:[(0,G.jsx)(Uo,{size:12}),m(`beside.title`)]}),(0,G.jsxs)(`span`,{...d(y.name,Og.pad),children:[(0,G.jsx)(`span`,{...d(y.type),children:u}),(0,G.jsx)(`span`,{...d(y.title),children:l}),(0,G.jsx)(`span`,{...d(y.tag,h&&y.warnTag),children:g})]}),p||h?(0,G.jsxs)(`span`,{...d(y.meta,h&&y.warn,Og.pad),children:[p?m(`referrers.uses`,{count:p}):null,p&&h?` · `:null,h?(0,G.jsx)(`span`,{"data-beside-hidden":``,children:m(`beside.hidden`)}):null]}):null,v||c!==`unsupported`?(0,G.jsxs)(`span`,{className:`x78zum5 x6s0dn4 x17d4w8g x1k70j0n x5k8d2m`,children:[v&&c===`unpublished`?(0,G.jsx)(L,{"data-beside-publish":``,disabled:e,size:`small`,onClick:()=>i?.(),children:m(`beside.publish`)}):null,v&&c!==`unpublished`?(0,G.jsx)(`span`,{role:`radiogroup`,className:`x3nfvp2 x1i3ajwb x1kogg8i xahzvm9`,children:kg.map(({value:t,label:n,Icon:r})=>(0,G.jsxs)(`button`,{"aria-checked":t===c,"data-beside-visibility":t,disabled:e,role:`radio`,type:`button`,onClick:()=>t!==c&&a?.(t),...{0:{className:`x3nfvp2 x6s0dn4 x1jnr06f xf4egzd xdqyycr xc342km x1sxf85j xjbqb8w x1bo0w0s xqfszdh x1j6dyjg x1ypdohk`},1:{className:`x3nfvp2 x6s0dn4 x1jnr06f xf4egzd xdqyycr xc342km x1sxf85j xqfszdh x1j6dyjg x1ypdohk x1rozbrz xo2rkog`}}[t===c|0],children:[(0,G.jsx)(r,{size:11}),m(n)]},t))}):null,(0,G.jsx)(`span`,{className:`x98rzlu`}),(0,G.jsx)(L,{"aria-label":m(`beside.copyLink`),"data-beside-copy":``,disabled:!f,icon:He,size:`small`,onClick:()=>void _()})]}):null,t?(0,G.jsx)(`span`,{"data-beside-error":``,...d(y.meta,y.error,Og.pad),children:t}):null]})}var jg=[`unpublished`,`stale`,`private`,`withdrawn`],Mg=[`unpublished`,`stale`];function Ng(e,t,n){let r=new Map(e.map(e=>[e.artifact,e])),i=e=>jg.includes(e.state)&&(t[e.artifact]??Mg.includes(e.state)),a=e=>n?e===n:!r.has(e),o=new Set,s=e=>{if(a(e))return!0;let t=r.get(e);return!!t&&o.has(e)&&(t.open||i(t))};for(let t=!0;t;){t=!1;for(let n of e)!o.has(n.artifact)&&n.parents.some(s)&&(o.add(n.artifact),t=!0)}return e.map(e=>{let{reason:t,upstream:n,...r}=e,a=e.state===`blocked`?e.blocked:void 0;return o.has(e.artifact)?{...r,checked:i(e),selectable:jg.includes(e.state),...a?{reason:a}:{}}:{...r,checked:!1,selectable:!1,reason:`upstream`,upstream:e.via??e.parents[0]}})}var Pg=e=>e.selectable?e.state===`private`?`private`:e.state===`withdrawn`?`skipped`:`publish`:e.state===`ready`?`ready`:`skipped`;function Fg({busy:e,error:t,includeRoot:r,items:i,offline:a,onPublish:o,results:s,rootVisibility:c}){let{t:l}=n(),[u,f]=(0,K.useState)(!1),[p,m]=(0,K.useState)({}),h=(0,K.useMemo)(()=>{let e=Ng(i,p);return a?e.map(e=>e.state===`private`?e:{...e,checked:!1,selectable:!1,reason:e.reason??`offline`}):e},[i,p,a]);if(!i.length)return null;let g=e=>i.find(t=>t.artifact===e)?.title??e,_=h.filter(e=>e.state!==`ready`&&e.state!==`private`).length,v=h.filter(e=>e.state===`private`&&!e.checked).length,y=h.filter(e=>e.checked),b=new Map((s??[]).filter(e=>e.status!==`published`).map(e=>[e.artifact,e])),x=h.some(e=>e.state!==`ready`),S=()=>o(y.filter(e=>e.state!==`private`).map(e=>e.artifact),y.filter(e=>e.state===`private`).map(e=>e.artifact)),C=e=>{let t=b.get(e.artifact);return t?.error?{text:t.error.error,tone:Q.error}:e.reason===`offline`?{text:l(`cascade.offline`),tone:null}:e.reason===`upstream`?{text:l(`cascade.upstream`,{via:g(e.upstream??``)}),tone:null}:{text:[e.state===`blocked`?e.reason??``:e.state===`private`?l(`cascade.private`):e.state===`ready`?``:l(`cascade.${e.state}`),e.via?l(`cascade.via`,{via:g(e.via)}):``].filter(Boolean).join(` · `),tone:e.state===`private`?Q.warn:null}},T=[`publish`,`private`,`skipped`,`ready`],E=x?(0,G.jsx)(L,{block:!0,"data-cascade-publish":``,disabled:!y.length||e,loading:e,type:r?`primary`:`default`,onClick:S,...d(Q.action),children:l(r?`cascade.publishWithRoot`:`cascade.publish`,{count:y.length})}):null;return(0,G.jsxs)(`div`,{...d(Q.root),children:[(0,G.jsxs)(`button`,{"aria-expanded":u,"data-cascade-summary":``,type:`button`,onClick:()=>f(e=>!e),...d(Q.summary),children:[(0,G.jsx)(`span`,{...d(Q.icon),children:(0,G.jsx)(ke,{size:13})}),(0,G.jsxs)(`span`,{...d(Q.text),children:[(0,G.jsx)(`span`,{...d(Q.lead),children:_?l(`cascade.summaryPending`,{total:i.length,pending:_}):l(`cascade.summaryReady`,{total:i.length})}),v?(0,G.jsx)(`span`,{...d(Q.sub),children:l(`cascade.summaryLocked`,{count:v})}):null,a?(0,G.jsx)(`span`,{...d(Q.sub),children:l(`cascade.offlineHint`)}):null]}),u?(0,G.jsx)(w,{size:14,...d(Q.chevron)}):(0,G.jsx)(et,{size:14,...d(Q.chevron)})]}),u?T.map(t=>{let n=h.filter(e=>Pg(e)===t);if(!n.length)return null;let r=l(t===`publish`?`cascade.group.publish.${c}`:`cascade.group.${t}`);return(0,G.jsxs)(`div`,{"data-cascade-group":t,children:[(0,G.jsxs)(`div`,{...d(Q.group),children:[(0,G.jsx)(`span`,{children:r}),(0,G.jsx)(`span`,{children:n.length})]}),n.map(t=>{let n=C(t);return(0,G.jsxs)(`label`,{"data-cascade-item":t.artifact,...d(Q.item),children:[(0,G.jsx)(`span`,{...d(Q.check),children:(0,G.jsx)(Lp,{checked:t.checked,disabled:!t.selectable||e,onChange:e=>m(n=>({...n,[t.artifact]:e}))})}),(0,G.jsxs)(`span`,{...d(Q.body),children:[(0,G.jsxs)(`span`,{...d(Q.name),children:[(0,G.jsx)(`span`,{...d(Q.type),children:t.artifact.split(`/`)[0]}),(0,G.jsx)(`span`,{...d(Q.title),children:t.title}),t.state===`private`?(0,G.jsx)(`span`,{...d(Q.tag,Q.warnTag),children:l(`cascade.tag.private`)}):t.state===`ready`?(0,G.jsx)(`span`,{...d(Q.tag),children:l(`cascade.tag.${c}`)}):null]}),n.text?(0,G.jsx)(`span`,{...d(Q.meta,n.tone),children:n.text}):null]})]},t.artifact)})]},t)}):null,t?(0,G.jsx)(`span`,{...d(Q.meta,Q.error),children:t}):null,E]})}function Ig(e,t,n){let r=n?e.filter(e=>e.artifact!==n&&e.cloudId!==n):e,i=r.filter(e=>e.state!==`ready`);return{shown:r,hidden:i.length,allPrivate:i.length>0&&i.every(e=>e.state===`private`),visible:t===`public`&&i.length>0}}var Lg=[`private`,`unpublished`,`unlinked`,`ready`,`skipped`],Rg=e=>e===`withdrawn`||e===`blocked`?`skipped`:e;function zg({busy:e,cloudUnavailable:t,error:r,exclude:i,items:a,onPublish:o,results:s,rootVisibility:c}){let{t:l}=n(),[u,f]=(0,K.useState)(!1),[p,m]=(0,K.useState)({}),{shown:h,hidden:g,allPrivate:_,visible:v}=Ig(a,c,i);if(!v)return null;let y=e=>e.selectable&&(p[e.artifact]??e.checked),b=h.filter(y),x=new Map((s??[]).filter(e=>e.status!==`published`).map(e=>[e.artifact,e])),S=e=>{let t=x.get(e.artifact)?.error?.error;if(t)return{text:t,tone:Q.error};let n=e.state===`blocked`?e.reason:e.state===`withdrawn`?l(`referrers.withdrawn`):``;return{text:[l(`referrers.uses`,{count:e.uses}),n].filter(Boolean).join(` · `),tone:null}},C=()=>o(b.filter(e=>e.state!==`private`).map(e=>e.artifact),b.filter(e=>e.state===`private`).map(e=>e.artifact));return(0,G.jsxs)(`div`,{...d(Q.root),children:[(0,G.jsxs)(`button`,{"aria-expanded":u,"data-referrer-summary":``,type:`button`,onClick:()=>f(e=>!e),...d(Q.summary),children:[(0,G.jsx)(`span`,{...d(Q.icon),children:(0,G.jsx)(Ut,{size:13})}),(0,G.jsxs)(`span`,{...d(Q.text),children:[(0,G.jsx)(`span`,{...d(Q.lead),children:l(`referrers.summary`,{total:h.length})}),(0,G.jsx)(`span`,{...d(Q.sub,Q.warn),children:l(_?`referrers.hiddenPrivate`:`referrers.hidden`,{count:g})}),t?(0,G.jsx)(`span`,{...d(Q.sub),children:l(`referrers.cloudUnavailable`)}):null]}),u?(0,G.jsx)(w,{size:14,...d(Q.chevron)}):(0,G.jsx)(et,{size:14,...d(Q.chevron)})]}),u?Lg.map(t=>{let n=h.filter(e=>Rg(e.state)===t);return n.length?(0,G.jsxs)(`div`,{"data-referrer-group":t,children:[(0,G.jsxs)(`div`,{...d(Q.group),children:[(0,G.jsx)(`span`,{children:l(`referrers.group.${t}`)}),(0,G.jsx)(`span`,{children:n.length})]}),n.map(t=>{let n=S(t);return(0,G.jsxs)(`label`,{"data-referrer-item":t.artifact,...d(Q.item),children:[(0,G.jsx)(`span`,{...d(Q.check),children:(0,G.jsx)(Lp,{checked:y(t),disabled:!t.selectable||e,onChange:e=>m(n=>({...n,[t.artifact]:e}))})}),(0,G.jsxs)(`span`,{...d(Q.body),children:[(0,G.jsxs)(`span`,{...d(Q.name),children:[(0,G.jsx)(`span`,{...d(Q.type),children:`document`}),(0,G.jsx)(`span`,{...d(Q.title),children:t.title}),t.state===`private`?(0,G.jsx)(`span`,{...d(Q.tag,Q.warnTag),children:l(`cascade.tag.private`)}):t.state===`ready`?(0,G.jsx)(`span`,{...d(Q.tag),children:l(`cascade.tag.public`)}):null]}),(0,G.jsx)(`span`,{...d(Q.meta,n.tone),children:n.text})]})]},t.artifact)})]},t):null}):null,r?(0,G.jsx)(`span`,{...d(Q.meta,Q.error),children:r}):null,u?(0,G.jsx)(L,{block:!0,"data-referrer-publish":``,disabled:!b.length||e,loading:e,onClick:C,...d(Q.action),children:l(`referrers.publish`,{count:b.length})}):null]})}var Bg=864e5;function Vg({text:e,action:t,onConfirm:r,onCancel:i}){let{t:a}=n();return(0,G.jsxs)(`div`,{"data-share-confirm":``,className:`x1k70j0n xe8ttls xmkeg23 x1y0btm7 x12xov25 xu4hgxq x2fo67v`,children:[(0,G.jsx)(`p`,{className:`x1q6ys4k x1j6dyjg x37zpob`,children:e}),(0,G.jsxs)(`div`,{className:`x78zum5 x13a6bvl x17d4w8g`,children:[(0,G.jsx)(L,{"data-confirm":`no`,size:`small`,onClick:i,children:a(`common.cancel`)}),(0,G.jsx)(L,{"data-confirm":`yes`,size:`small`,type:`primary`,onClick:r,children:t})]})]})}function Hg({value:e,disabled:t,onExpiry:r,onRegenerate:i}){let{t:a,i18n:o}=n(),[s]=(0,K.useState)(()=>Date.now()),c=Yh(e,s),l=e.expiresAt?new Date(e.expiresAt).toLocaleDateString(o.language,{month:`short`,day:`numeric`}):null,u=e.expiresAt?c?a(`share.expired`,{date:l}):a(`share.expiresIn`,{count:Math.max(1,Math.ceil((Date.parse(e.expiresAt)-s)/Bg)),date:l}):a(`share.neverExpires`),d=Jh.map(e=>({value:e,label:a(`share.expiry.${e}`)}));return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{className:`x78zum5 x1a02dak x6s0dn4 x1qughib x167g77z xwkmoec x1bo0w0s xfifm61`,children:[(0,G.jsxs)(`label`,{"data-key-expired":c?``:void 0,"data-key-expiry":``,className:`x1n2onr6 x3nfvp2 xeuugli xss6m8b`,children:[(0,G.jsx)(`span`,{className:`x10l6tqk x1i1rx1s xjm9jq1 xb3r6kr xuxw1ft x1hyvwdk`,children:a(`share.expiryLabel`)}),(0,G.jsx)(ho,{disabled:t,options:d,placeholder:(0,G.jsx)(`span`,{...{0:{},1:{className:`x12vcgws`}}[!!c|0],children:u}),prefix:po,size:`small`,style:{width:`auto`,minWidth:0,fontSize:11},value:null,onSelect:e=>r(e)})]}),(0,G.jsx)(L,{"data-key-regenerate":``,disabled:t,icon:Zo,outdent:`end`,size:`small`,style:{fontSize:11},type:`text`,onClick:i,children:a(`share.regenerate`)})]}),c?(0,G.jsx)(`p`,{className:`x8k27cj x1bo0w0s x1j6dyjg x37zpob`,children:a(`share.expiredNote`)}):null]})}var Ug=[{value:`private`,label:`share.onlyMe`,hint:`share.onlyMeHint`,Icon:xo},{value:`key`,label:`share.keyHolders`,hint:`share.keyHint`,Icon:qo},{value:`public`,label:`share.anyone`,hint:`share.anyoneHint`,Icon:Qe}],Wg={private:{text:`share.removeKeyConfirm`,action:`share.removeKey`},public:{text:`share.makePublicConfirm`,action:`share.makePublic`},regenerate:{text:`share.regenerateConfirm`,action:`share.regenerate`}};function Gg({beside:e,cascade:t,children:r,foot:i,onCopyFailed:a,onVisibility:o,profile:s,referrers:c,saving:l=!1,shareKey:u,status:d,url:f,visibility:p}){let{t:m}=n(),[h,g]=(0,K.useState)(!1),[_,v]=(0,K.useState)(null),[y]=(0,K.useState)(()=>Date.now());(0,K.useEffect)(()=>{if(!h)return;let e=setTimeout(()=>g(!1),2e3);return()=>clearTimeout(e)},[h]);let b=u?.active?`key`:p,x=b===`key`?u?.value?.url??null:f,S=async()=>{if(x)try{await navigator.clipboard.writeText(x),g(!0)}catch{a?.()}},C=e=>{e!==b&&(e===`key`?u?.onSelect():b===`key`?v(e):o(e))},w=()=>{_===`private`?u?.onRemove():_===`public`?o(`public`):_===`regenerate`&&u?.onRegenerate(),v(null)},T=b===`key`?u?.value??null:null,E=Yh(T,y);return(0,G.jsxs)(`div`,{className:`x78zum5 xdt5ytf x195vfkc x58rd6w xqfszdh xfifm61`,children:[d,(0,G.jsx)(`p`,{className:`x1coi2bq xfifm61 x1s688f`,children:m(`share.whoCanSee`)}),(0,G.jsx)(`div`,{"aria-label":m(`share.whoCanSee`),role:`radiogroup`,className:`x78zum5 xdt5ytf x195vfkc`,children:Ug.filter(({value:e})=>e!==`key`||u).map(({value:e,label:t,hint:n,Icon:r})=>(0,G.jsxs)(`button`,{"aria-checked":e===b,"data-visibility":e,disabled:l,role:`radio`,type:`button`,onClick:()=>C(e),...{0:{className:`x78zum5 xh8yej3 x6s0dn4 x167g77z x1ruevkc xmkeg23 x1y0btm7 x9r1u3d xu4hgxq xjbqb8w x9jwiqo xo2rkog xqfszdh x1yc453h x1ypdohk`},1:{className:`x78zum5 xh8yej3 x6s0dn4 x167g77z x1ruevkc xmkeg23 x1y0btm7 xu4hgxq xo2rkog xqfszdh x1yc453h x1ypdohk xgcsv5v x15dg6x3`}}[e===b|0],children:[(0,G.jsx)(`span`,{...{0:{className:`xrvj5dj x1ku5rj1 x1okw0bk xvy4d1p xxk0z11 x1kogg8i xahzvm9`},1:{className:`xrvj5dj x1ku5rj1 x1okw0bk xvy4d1p xxk0z11 x1kogg8i x19ckca5 xs0jrwl`}}[e===b|0],children:(0,G.jsx)(r,{size:12})}),(0,G.jsxs)(`span`,{children:[(0,G.jsxs)(`span`,{className:`x1lliihq xfifm61 x1s688f xwn7fz2`,children:[m(t),e===`key`&&u?.locked?(0,G.jsx)(`span`,{"data-pro-badge":``,className:`xdzw4kq xm9j1uf xmkeg23 x1y0btm7 xgcsv5v x12oqio5 x1bo0w0s x1k6wstc x1s688f x1xxsxie`,children:m(`share.proBadge`)}):null]}),(0,G.jsx)(`span`,{className:`x1lliihq xddlp02 x1j6dyjg xwn7fz2`,children:m(n)})]})]},e))}),b===`public`&&s?(0,G.jsxs)(`div`,{className:`x78zum5 x6s0dn4 x1qughib x167g77z x16ngw23 x12ulsxz x1icxu4v x1bo0w0s x1j6dyjg xwn7fz2`,children:[(0,G.jsxs)(`span`,{children:[m(`share.showOnProfile`),s.path?(0,G.jsx)(`span`,{className:`x1lliihq xddlp02 x1j6dyjg xwn7fz2`,children:s.path}):null]}),(0,G.jsx)(`button`,{"aria-checked":s.shown,"aria-label":m(`share.showOnProfile`),"data-profile-switch":``,disabled:l,role:`switch`,type:`button`,onClick:()=>s.onChange(!s.shown),...{0:{className:`x1n2onr6 x1okw0bk xvy4d1p x1v9usgg x1717udv xc342km x1e6avla x15dg6x3 x1ypdohk`},1:{className:`x1n2onr6 x1okw0bk xvy4d1p x1v9usgg x1717udv xc342km x1e6avla x1ypdohk x19ckca5`}}[!!s.shown|0],children:(0,G.jsx)(`span`,{...{0:{className:`x10l6tqk xs7f9wi xaoy8p5 x1fsd2vl x170jfvy x16rqkct x1rozbrz x2hifos xgdialr`},1:{className:`x10l6tqk xs7f9wi x1fsd2vl x170jfvy x16rqkct x1rozbrz x2hifos xgdialr x1r4y97`}}[!!s.shown|0]})})]}):null,(0,G.jsxs)(`div`,{className:`x78zum5 x6s0dn4 x17d4w8g x1k70j0n`,children:[(0,G.jsx)(`input`,{readOnly:!0,"aria-label":m(`share.linkLabel`),"data-share-url":``,"data-struck":E?``:void 0,placeholder:m(b===`key`?`share.keyPending`:`share.linkPending`),value:x??``,onFocus:e=>e.currentTarget.select(),...{0:{className:`x98rzlu xeuugli xc342km x1a2a7pz xifx94n xdqyycr x1sxf85j x2fo67v x1bo0w0s x1fao0z8 x1j6dyjg xb3r6kr xlyipyv xuxw1ft`},1:{className:`x98rzlu xeuugli xc342km x1a2a7pz xifx94n xdqyycr x1sxf85j x2fo67v x1fao0z8 x1j6dyjg xb3r6kr xlyipyv xuxw1ft xc7n51q x5lhwog`}}[!!E|0]}),(0,G.jsx)(L,{disabled:!x,icon:bo,size:`small`,type:`primary`,onClick:()=>void S(),children:m(h?`share.copied`:`share.copy`)})]}),_?(0,G.jsx)(Vg,{action:m(Wg[_].action),text:m(Wg[_].text),onCancel:()=>v(null),onConfirm:w}):T&&u?(0,G.jsx)(Hg,{disabled:l,value:T,onExpiry:u.onExpiry,onRegenerate:()=>v(`regenerate`)}):null,i&&b!==`key`?(0,G.jsx)(`div`,{className:`x8k27cj xddlp02 x1j6dyjg`,children:i}):null,e?(0,G.jsx)(Ag,{...e}):null,t?(0,G.jsx)(Fg,{...t}):null,c?(0,G.jsx)(zg,{...c}):null,r]})}var Kg=`ryugi.pendingCloudIntent`,qg=6e5;function Jg(e,t){try{let n={artifact:e,intent:t,at:Date.now()};window.sessionStorage.setItem(Kg,JSON.stringify(n))}catch{}}function Yg(e){try{let t=window.sessionStorage.getItem(Kg);if(!t)return null;let n=JSON.parse(t);return n.artifact!==e||n.intent!==`share`&&n.intent!==`phone`&&n.intent!==`sync`||typeof n.at!=`number`||Date.now()-n.at>qg?(typeof n.at==`number`&&Date.now()-n.at>qg&&window.sessionStorage.removeItem(Kg),null):(window.sessionStorage.removeItem(Kg),n.intent)}catch{return null}}function Xg({origin:e}){let{t,i18n:r}=n(),i=e.replace(/\/+$/,``),a=r.language?.toLowerCase().startsWith(`zh`)?`/zh`:``;return(0,G.jsxs)(`p`,{className:`x1ghz6dp x1j6dyjg x1evy7pa xddlp02`,children:[t(`common.authLegalPrefix`),(0,G.jsx)(`a`,{href:`${i}${a}/terms`,rel:`noopener noreferrer`,target:`_blank`,className:`x1bo0w0s x1bvjpef xrys4gj`,children:t(`common.terms`)}),t(`common.authLegalAnd`),(0,G.jsx)(`a`,{href:`${i}${a}/privacy`,rel:`noopener noreferrer`,target:`_blank`,className:`x1bo0w0s x1bvjpef xrys4gj`,children:t(`common.privacy`)}),t(`common.authLegalSuffix`)]})}var Zg=[{id:`share`,icon:ke,titleKey:`cloudIntent.shareTitle`,descKey:`cloudIntent.shareDesc`},{id:`phone`,icon:rs,titleKey:`cloudIntent.phoneTitle`,descKey:`cloudIntent.phoneDesc`},{id:`sync`,icon:So,titleKey:`cloudIntent.syncTitle`,descKey:`cloudIntent.syncDesc`}],Qg={share:`cloudIntent.shareCta`,phone:`cloudIntent.phoneCta`,sync:`cloudIntent.syncCta`},$g={share:`cloudIntent.sharePrivacy`,phone:`cloudIntent.phonePrivacy`,sync:`cloudIntent.syncPrivacy`};function e_({origin:e,landingUrl:t,waitingForLogin:r,onStartIntent:i}){let{t:a}=n(),[o,s]=(0,K.useState)(`share`);return(0,G.jsxs)(`div`,{"data-intent-login-panel":``,className:`x78zum5 xdt5ytf x1v2ro7d x168biu4 xw7nakj xqfszdh xfifm61 xo2rkog`,children:[(0,G.jsxs)(`div`,{className:`x78zum5 x1cy8zhl x1qughib x167g77z`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`x1lliihq x2ouz8m x1s688f xo2rkog`,children:a(`cloudIntent.heading`)}),(0,G.jsx)(`span`,{className:`x1lliihq x1qt5hsa x1bo0w0s xr9ek0c`,children:a(`cloudIntent.subheading`)})]}),(0,G.jsx)(`span`,{className:`x1s31vzs x1s688f x1o8fvuk x6z2zk2 xj8oexa xlkn9b3 x1e6avla xuxw1ft x2lah0s`,children:a(`cloudIntent.badge`)})]}),(0,G.jsx)(`div`,{"aria-label":a(`cloudIntent.heading`),role:`radiogroup`,className:`x78zum5 xdt5ytf x1j9xkj6`,children:Zg.map(({id:e,icon:t,titleKey:n,descKey:r})=>{let i=o===e;return(0,G.jsxs)(`button`,{"aria-checked":i,"data-cloud-intent":e,role:`radio`,type:`button`,...{0:{className:`xh8yej3 x1yc453h x78zum5 x1cy8zhl x883omv x1m7iz9m xfoe8qy xmkeg23 x1y0btm7 x12xov25 x1qj25k6 x1q4ynmn x1rozbrz x9jwiqo x1ypdohk xqfszdh x1mimgl9`},1:{className:`xh8yej3 x1yc453h x78zum5 x1cy8zhl x883omv x1m7iz9m xfoe8qy xmkeg23 x1y0btm7 x1q4ynmn x1ypdohk xqfszdh x1mimgl9 x1ektstd x1xrkum6`}}[!!i|0],onClick:()=>s(e),children:[(0,G.jsx)(`span`,{"aria-hidden":`true`,...{0:{className:`x23j0i4 xd7y6wv xu4hgxq xahzvm9 xo2rkog xrvj5dj x1ku5rj1 x2lah0s xvijh9v`},1:{className:`x23j0i4 xd7y6wv xu4hgxq xrvj5dj x1ku5rj1 x2lah0s xvijh9v x1teopom x1cge3fn`}}[!!i|0],children:(0,G.jsx)(t,{size:14})}),(0,G.jsxs)(`span`,{className:`x98rzlu xeuugli`,children:[(0,G.jsx)(`span`,{className:`x1lliihq x1ct8sxb x1s688f xo2rkog`,children:a(n)}),(0,G.jsx)(`span`,{className:`x1lliihq x1j6dyjg x1bo0w0s xfrs9s4 xvijh9v`,children:a(r)})]}),(0,G.jsx)(`span`,{"aria-hidden":`true`,...{0:{className:`x1a00udw xx3o462 x16rqkct xvndefy x1y0btm7 xgcsv5v x2lah0s x1gslohp xrvj5dj x1ku5rj1 x9f619`},1:{className:`x1a00udw xx3o462 x16rqkct xvndefy x1y0btm7 x2lah0s x1gslohp xrvj5dj x1ku5rj1 x9f619 x1ektstd x15az74h`}}[!!i|0],children:i?(0,G.jsx)(`span`,{className:`x1ftt334 x1ycjhwn x16rqkct x1vi11w0`}):null})]},e)})}),(0,G.jsx)(L,{className:{className:`xh8yej3 x90ne7k x15az74h x12s0oaj x1ektstd x1w8fas2 xt9vybz xh88oxj`}.className,"data-cloud-intent-submit":``,icon:mo,loading:r,type:`primary`,onClick:()=>i(o),children:a(r?`publish.waitingLogin`:Qg[o])}),(0,G.jsxs)(`div`,{className:`x78zum5 x6s0dn4 x17d4w8g xknfcqp x1q4txso xur7f20 x2fo67v x1j6dyjg x1bo0w0s xfrs9s4`,children:[(0,G.jsx)(xo,{"aria-hidden":`true`,size:12,style:{flexShrink:0}}),(0,G.jsx)(`span`,{children:a($g[o])})]}),(0,G.jsxs)(`div`,{className:`x78zum5 x6s0dn4 x1qughib x167g77z`,children:[(0,G.jsx)(Xg,{origin:e}),t?(0,G.jsxs)(`a`,{href:t,rel:`noopener noreferrer`,target:`_blank`,className:`x3nfvp2 x6s0dn4 x1ed6fcf x1j6dyjg xddlp02 xytdrwj x1hl2dhg xuxw1ft`,children:[a(`cloudEntry.learnShort`),(0,G.jsx)(yo,{"aria-hidden":`true`,size:11})]}):null]})]})}var t_={bar:{kbCHJM:`x1nrll8i`,krVfgx:`xjnlgov`,k3aq6I:`xuuh30`,k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x1v2ro7d`,ks0D6T:`x4d2062`,kZKoxP:`xn3w4p2`,kB7OPa:`x9f619`,kZCmMZ:`x106a9eq`,kwRFfy:`x1icxu4v`,kMzoRj:`xmkeg23`,ksu8eU:`x1y0btm7`,kVAM5u:`x12xov25`,kaIpWk:`x1e6avla`,kWkggS:`x12ilycc`,kMwMTN:`xo2rkog`,kGVxlE:`x1gxogt1`,kGuDYH:`x4z9k3i`,kLWn49:`xo5v014`,khDVqt:`xuxw1ft`,$$css:!0},absolute:{kVAEAm:`x10l6tqk`,kY2c9j:`x1n327nk`,$$css:!0},fixed:{kVAEAm:`xixxii4`,kY2c9j:`x68pp3s`,$$css:!0},text:{k7Eaqz:`xeuugli`,kVQacm:`xb3r6kr`,kg5iWk:`xlyipyv`,$$css:!0},muted:{kMwMTN:`x1bo0w0s`,$$css:!0},changed:{kMwMTN:`xr46axq`,$$css:!0},agent:{kMwMTN:`x1yz8712`,$$css:!0},success:{kMwMTN:`xcqng5w`,$$css:!0},rule:{kzqmXN:`x1i1rx1s`,kZKoxP:`xlup9mm`,kmuXW:`x2lah0s`,kWkggS:`xh6qj2i`,$$css:!0},button:{k1xSpc:`x3nfvp2`,kGNEyG:`x6s0dn4`,kOIVth:`x17d4w8g`,kmuXW:`x2lah0s`,kZKoxP:`x10w6t97`,kMzoRj:`xc342km`,kaIpWk:`x1e6avla`,kMv6JI:`xjb2p0i`,kGuDYH:`x4z9k3i`,kkrTdU:`x1ypdohk`,$$css:!0},anchor:{kMnn75:`xkrqix3`,$$css:!0},primary:{kg3NbH:`xqin4a2`,kWkggS:`x19ckca5`,kMwMTN:`xs0jrwl`,k63SB2:`xk50ysn`,kSiTet:`x1hc1fzr x1k29llp`,$$css:!0},quiet:{kg3NbH:`xaope02`,kWkggS:`xjbqb8w xj0l527`,kMwMTN:`x1bo0w0s`,$$css:!0},link:{k1xSpc:`x3nfvp2`,kGNEyG:`x6s0dn4`,kOIVth:`x1jnr06f`,kmuXW:`x2lah0s`,kmVPX3:`x1717udv`,kMzoRj:`xc342km`,kWkggS:`xjbqb8w`,kMwMTN:`x1bo0w0s xytdrwj`,kMv6JI:`xjb2p0i`,kGuDYH:`x4z9k3i`,kMnn75:`xujl8zx`,k1TLXF:`x1tdp7nx`,kcSHmL:`xda060z`,kkrTdU:`x1ypdohk`,$$css:!0}};function n_({position:e,children:t,style:n,...r}){return(0,G.jsx)(`div`,{"data-action-bar":!0,...r,...d(t_.bar,t_[e]),style:n,children:t})}function r_({children:e,tone:t=`default`,limit:n}){return(0,G.jsx)(`span`,{...d(t_.text,t!=="default"&&t_[t]),style:n?{maxWidth:n}:void 0,children:e})}function i_(){return(0,G.jsx)(`span`,{className:`x1i1rx1s xlup9mm x2lah0s xh6qj2i`})}function a_({variant:e,children:t,...n}){return(0,G.jsx)(`a`,{...n,...d(t_.button,t_.anchor,t_[e]),children:t})}function o_({variant:e,children:t,...n}){return(0,G.jsx)(`button`,{type:`button`,...n,...d(e===`link`?t_.link:[t_.button,t_[e]]),children:t})}function s_({result:e,onDismiss:t,onOpenSharePanel:r}){let{t:i}=n(),[a,o]=(0,K.useState)(!1),[s,c]=(0,K.useState)(!!e.copied),l=async()=>{if(e.url)try{await navigator.clipboard.writeText(e.url),c(!0)}catch{}};return e.error?(0,G.jsxs)(n_,{"data-intent-toast":``,position:`fixed`,role:`status`,children:[(0,G.jsx)(r_,{limit:380,tone:`muted`,children:e.error}),(0,G.jsx)(o_,{variant:`primary`,onClick:r,children:i(`cloudIntent.viewDetails`)}),(0,G.jsx)(`button`,{"aria-label":i(`artboard.close`),type:`button`,className:`xgd8bvy x1fgtraw x1717udv xc342km x1e6avla xjbqb8w xj0l527 x1bo0w0s xrvj5dj x1ku5rj1 x1ypdohk x2lah0s`,onClick:t,children:(0,G.jsx)(dt,{size:13})})]}):(0,G.jsxs)(G.Fragment,{children:[a&&e.url?(0,G.jsxs)(`aside`,{"aria-label":i(`cloudIntent.qrTitle`),"data-intent-qr-popover":``,role:`dialog`,className:`xixxii4 x1nrll8i xhjxwu4 xuuh30 x12tvco5 x149cmgi xw7nakj x1tamke2 xmkeg23 x1y0btm7 x12xov25 xixl9f9 x12ilycc x1ytezby xo2rkog xqfszdh xfifm61 x78zum5 xdt5ytf x1v2ro7d`,children:[(0,G.jsxs)(`div`,{className:`x78zum5 x6s0dn4 x1qughib x167g77z`,children:[(0,G.jsx)(`span`,{className:`x4z9k3i x1s688f`,children:i(`cloudIntent.qrTitle`)}),(0,G.jsx)(`button`,{"aria-label":i(`artboard.close`),type:`button`,className:`xvy4d1p xxk0z11 x1717udv xc342km x1kogg8i xjbqb8w xj0l527 x1bo0w0s xrvj5dj x1ku5rj1 x1ypdohk`,onClick:()=>o(!1),children:(0,G.jsx)(dt,{size:13})})]}),(0,G.jsxs)(`div`,{className:`x78zum5 x6s0dn4 x1af02g3`,children:[(0,G.jsx)(`div`,{className:`x1ruevkc xmkeg23 x1y0btm7 x12xov25 x1q4ynmn xqm9i1m x2lah0s xrvj5dj x1ku5rj1`,children:(0,G.jsx)(Vm,{bgColor:`#ffffff`,bordered:!1,color:`#141416`,size:108,value:e.url})}),(0,G.jsxs)(`div`,{className:`x78zum5 xdt5ytf x167g77z xeuugli x98rzlu`,children:[(0,G.jsx)(`p`,{className:`x1ghz6dp x1qt5hsa x1jjo3f5 x1bo0w0s`,children:i(`cloudIntent.qrDesc`)}),(0,G.jsx)(`div`,{children:(0,G.jsx)(L,{icon:(0,G.jsx)(bo,{size:12}),size:`small`,onClick:()=>void l(),children:i(s?`cloudIntent.copied`:`cloudIntent.copyPhoneLink`)})})]})]}),e.billingUrl?(0,G.jsxs)(`div`,{className:`x78zum5 x6s0dn4 x1qughib x883omv x1m7iz9m xfoe8qy xmkeg23 x1y0btm7 x1jw0pk6 xhpnuu7 x1xrkum6 x1qt5hsa`,children:[(0,G.jsx)(`span`,{className:`x1bo0w0s xfrs9s4`,children:i(`cloudIntent.proRelayHint`)}),(0,G.jsxs)(`a`,{href:e.billingUrl,rel:`noopener noreferrer`,target:`_blank`,className:`x3nfvp2 x6s0dn4 xd7y6wv x1awh872 x1kogg8i x15az74h x12s0oaj xt9vybz x1qt5hsa xh88oxj x1hl2dhg xuxw1ft x2lah0s`,children:[i(`cloudIntent.proRelayCta`),` ↗`]})]}):null]}):null,(0,G.jsxs)(n_,{"data-intent-toast":``,position:`fixed`,role:`status`,children:[e.intent===`share`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(r_,{limit:380,tone:`success`,children:e.copied?i(`cloudIntent.toastShareCopied`,{login:e.login}):i(`cloudIntent.toastShare`,{login:e.login})}),(0,G.jsx)(o_,{variant:`quiet`,onClick:r,children:i(`cloudIntent.changeAccess`)}),e.url?(0,G.jsxs)(a_,{href:e.url,rel:`noopener noreferrer`,target:`_blank`,variant:`primary`,children:[i(`cloudIntent.openLink`),` ↗`]}):null]}):e.intent===`phone`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(r_,{limit:360,tone:`success`,children:i(`cloudIntent.toastPhone`)}),e.billingUrl?(0,G.jsx)(a_,{href:e.billingUrl,rel:`noopener noreferrer`,target:`_blank`,variant:`quiet`,children:i(`cloudIntent.learnRelay`)}):null,e.url?(0,G.jsx)(o_,{variant:`primary`,onClick:()=>o(e=>!e),children:i(a?`cloudIntent.hideQr`:`cloudIntent.showQr`)}):null]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(r_,{limit:380,tone:`success`,children:i(`cloudIntent.toastSync`,{login:e.login})}),(0,G.jsx)(o_,{variant:`quiet`,onClick:hg,children:i(`cloudIntent.projectConfig`)}),e.dashboardUrl?(0,G.jsxs)(a_,{href:e.dashboardUrl,rel:`noopener noreferrer`,target:`_blank`,variant:`primary`,children:[i(`cloudEntry.openShort`),` ↗`]}):null]}),(0,G.jsx)(`button`,{"aria-label":i(`artboard.close`),type:`button`,className:`xgd8bvy x1fgtraw x1717udv xc342km x1e6avla xjbqb8w xj0l527 x1bo0w0s xrvj5dj x1ku5rj1 x1ypdohk x2lah0s`,onClick:()=>{o(!1),t()},children:(0,G.jsx)(dt,{size:13})})]})]})}var $={trigger:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x17d4w8g`,kZKoxP:`x1gnnpzl`,kg3NbH:`x1awh872`,kMzoRj:`xmkeg23`,ksu8eU:`x1y0btm7`,kVAM5u:`x12xov25`,kaIpWk:`xur7f20`,kWkggS:`x12ilycc xj0l527`,kMwMTN:`xo2rkog`,kMv6JI:`xqfszdh`,kGuDYH:`xfifm61`,kkrTdU:`x1ypdohk`,khDVqt:`xuxw1ft`,$$css:!0},shellCta:{kZKoxP:`x1fgtraw`,kZCmMZ:`xe2zdcy`,kwRFfy:`xpdmqnj`,kaIpWk:`x1e6avla`,kVAM5u:`x1rqon0r`,kWkggS:`x19ckca5 x1et1poy`,kMwMTN:`xs0jrwl`,k63SB2:`xk50ysn`,$$css:!0},brandDot:{kzqmXN:`x1v4s8kt`,kZKoxP:`xols6we`,kaIpWk:`x16rqkct`,kWkggS:`x1iug7pk`,kmuXW:`x2lah0s`,$$css:!0},floating:{kVAEAm:`xixxii4`,k87sOh:`x1tk7jg1`,kCIrl2:`xlftelb`,kY2c9j:`x1n327nk`,kGVxlE:`x1cqdj14`,$$css:!0},dot:{kzqmXN:`x1v4s8kt`,kZKoxP:`xols6we`,kaIpWk:`x16rqkct`,kWkggS:`xzkukvh`,$$css:!0},panel:{k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kOIVth:`x1v2ro7d`,kzqmXN:`x1m258z3`,kMv6JI:`xqfszdh`,kGuDYH:`xfifm61`,$$css:!0},row:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kjj79g:`x1qughib`,kOIVth:`x167g77z`,$$css:!0},muted:{kMwMTN:`x1bo0w0s`,kLWn49:`x1dbl2gt`,$$css:!0},link:{kUk6DE:`x98rzlu`,k7Eaqz:`xeuugli`,kVQacm:`xb3r6kr`,kg5iWk:`xlyipyv`,khDVqt:`xuxw1ft`,kMv6JI:`x1fao0z8`,kGuDYH:`x1j6dyjg`,kMwMTN:`x9f21nr`,$$css:!0},textButton:{kmVPX3:`x1717udv`,kMzoRj:`xc342km`,kWkggS:`xjbqb8w`,kMwMTN:`xddlp02`,kGuDYH:`x1j6dyjg`,kkrTdU:`x1ypdohk`,$$css:!0},danger:{kMwMTN:`x12vcgws`,$$css:!0},error:{kogj98:`x1ghz6dp`,kZCmMZ:`xwn43p0`,kMwMTN:`x12vcgws`,kLWn49:`x1dbl2gt`,$$css:!0},warning:{kMwMTN:`x7zghnd`,$$css:!0}};async function c_(e,t){let n=await fetch(`/api/artifacts`,{cache:`no-store`}).catch(()=>null);return n?.ok?(await n.json().catch(()=>null))?.artifacts?.find(n=>n.type===e&&n.id===t)?.title??null:null}function l_(e,t,n,r){let i=e?.id?`${e.type}/${e.id}`:null,[a,o]=(0,K.useState)(null);if((0,K.useEffect)(()=>{if(!e?.id||!i)return;let t=!1;return c_(e.type,e.id).then(e=>{!t&&e&&o({key:i,text:e})}),()=>{t=!0}},[i]),!e||!i)return null;let s=Xh(t?.artifacts[i]),c=s.published?s.visibility:`unpublished`;return{key:i,card:{type:e.type,title:a?.key===i?a.text:e.id,state:c,rootVisibility:n,url:s.published?s.url:null,uses:r.find(e=>e.artifact===i)?.uses??null},hidden:Dg(n,c)}}var u_=800;function d_(e,t){let[n,r]=(0,K.useState)(null),i=(0,K.useCallback)(async()=>{if(!t)return;let n=await Z(`GET`,`sync/${e}`);n.ok&&r(typeof n.json.upToDate==`boolean`?n.json.upToDate:null)},[e,t]);return(0,K.useEffect)(()=>{if(!t){r(null);return}i();let n,a=go(t=>{t.artifact!==e||t.type!==`change`&&t.type!==`cloud-published`||(clearTimeout(n),n=setTimeout(()=>void i(),u_))});return()=>{clearTimeout(n),a()}},[e,t,i]),{upToDate:n,refresh:i}}function f_(e,t){let[n,r]=(0,K.useState)(null);return(0,K.useEffect)(()=>{if(!t){r(null);return}let n=!1,i=0,a=async()=>{let t=++i,a=await Z(`GET`,`publication/${e}`),o=a.ok&&qh(a.json);!n&&t===i&&o&&r(o)};a();let o=go(t=>{t.artifact===e&&(t.type===`cloud-publication`&&(i++,r(t.publication)),(t.type===`change`||t.type===`cloud-published`)&&a())});return()=>{n=!0,o()}},[e,t]),n}var p_=e=>e.json.results??null;function m_(e){let[t,n]=(0,K.useState)([]),[r,i]=(0,K.useState)(null),[a,o]=(0,K.useState)([]),[s,c]=(0,K.useState)(null),[l,u]=(0,K.useState)(!1);return{refs:t,results:r,referrers:a,referrerResults:s,cloudUnavailable:l,load:(0,K.useCallback)(async()=>{let t=await Z(`GET`,`refs/${e}`);t.ok&&(Array.isArray(t.json.items)&&n(t.json.items),o(Array.isArray(t.json.referrers)?t.json.referrers:[]),u(t.json.cloudUnavailable===!0))},[e]),publishRefs:async(t,n,r,a)=>{if(!t){let t=await Z(`POST`,`publish/${e}`);if(!t.ok)return t}let o=await Z(`POST`,`publish-refs/${e}`,{visibility:n,refs:r,makePublic:a});return o.ok&&i(p_(o)),o},publishReferrers:async(t,n)=>{let r=await Z(`POST`,`publish-referrers/${e}`,{publish:t,makePublic:n});return r.ok&&c(p_(r)),r}}}function h_(){let[e,t]=(0,K.useState)({role:null,other:null});return(0,K.useEffect)(()=>{if(!Ze())return;let e=at(e=>{e.kind===`split-role`&&t({role:e.role,other:e.other})});return nt({kind:`want-role`}),e},[]),e}var g_={private:`publish.hintPrivate`,public:`publish.hintPublic`};function __({artifact:e,floating:t=!1,shell:r=!1}){let{t:i,i18n:a}=n(),{status:o,refresh:s,login:c,waitingForLogin:l}=eg(),u=h_(),[f,p]=(0,K.useState)(!1),[m,h]=(0,K.useState)(!1),[g,_]=(0,K.useState)([]),[v,y]=(0,K.useState)(null),[b,x]=(0,K.useState)(null),[S,C]=(0,K.useState)(null),w=(0,K.useRef)(!1),T=o?.artifacts?.[e],E=Xh(T),D=f_(e,!!o?.signedIn),O=D&&Kh(D.phase),[k]=ag(),ee=E.url?ig(E.url,k):null,te=d_(e,!!o?.signedIn&&E.published),ne=Zh(te.upToDate,!!o?.autoPublish?.enabled&&T?.autoPublish!==!1),A=m_(e),{refs:re,referrers:ie}=A,j=async e=>{h(!0),_([]),y(null);let t=await e();if(`shareKey`in t.json&&x(t.ok?t.json.shareKey:null),t.status===401)c(t.json.loginUrl);else if(!t.ok){t.json.code===`plan_required`&&typeof t.json.upgradeUrl==`string`&&y(t.json.upgradeUrl);let e=Array.isArray(t.json.reasons)?t.json.reasons:[];_([dg(t.json,i(`common.requestFailed`,{status:t.status})),...e])}await Promise.all([s(),te.refresh(),A.load()]),h(!1)},ae=!E.published&&re.some(e=>e.checked),oe=E.published?E.visibility:null,se=l_(u.role===`primary`?u.other:null,o,oe,ie),ce=t=>j(()=>Z(`POST`,`visibility/${e}`,{visibility:t})),M=(t={})=>j(()=>Z(`PUT`,`share-key/${e}`,t)),ue=async t=>{if(p(t),t&&o?.signedIn&&A.load(),t&&o?.signedIn&&E.published){if(te.refresh(),E.access===`key`){let t=await Z(`GET`,`share-key/${e}`);t.ok&&x(t.json.shareKey)}(await Z(`GET`,`artifacts`)).ok&&await s()}},N=t=>{Jg(e,t),c()};(0,K.useEffect)(()=>{if(!o?.signedIn||!o.login||w.current)return;let t=Yg(e);if(!t)return;w.current=!0;let n=o.login,r=o.origin;(async()=>{p(!1),h(!0),_([]),y(null);try{if(t===`sync`){let a=await Z(`POST`,`auto-publish`,{scope:`global`,value:!0});if(!a.ok){C({intent:t,login:n,url:null,dashboardUrl:Sg(r),billingUrl:wg(r),error:dg(a.json,i(`common.requestFailed`,{status:a.status}))});return}Z(`POST`,`publish/${e}`),await s(),C({intent:t,login:n,url:null,dashboardUrl:Sg(r),billingUrl:wg(r)});return}let a=await Z(`POST`,`publish/${e}`),o=await s();if(await Promise.all([te.refresh(),A.load()]),!a.ok){a.json.code===`plan_required`&&typeof a.json.upgradeUrl==`string`&&y(a.json.upgradeUrl);let e=Array.isArray(a.json.reasons)?a.json.reasons:[],o=dg(a.json,i(`common.requestFailed`,{status:a.status}));_([o,...e]),C({intent:t,login:n,url:null,dashboardUrl:Sg(r),billingUrl:wg(r),error:o});return}let c=Xh(o?.artifacts?.[e]).url??(typeof a.json.url==`string`?a.json.url:null),l=c?ig(c,k):null,u=!1;if(t===`share`&&l)try{await navigator.clipboard.writeText(l),u=!0}catch{u=!1}C({intent:t,login:n,url:l,copied:u,dashboardUrl:Sg(r),billingUrl:wg(r)})}finally{h(!1),w.current=!1}})()},[e,o?.signedIn,o?.login,o?.origin,k,s]);let de=xg(o?.origin,a.language),P=Sg(o?.origin),fe=o?o.signedIn?(0,G.jsxs)(`div`,{...d($.panel),children:[(0,G.jsxs)(`div`,{...d($.row),children:[(0,G.jsx)(`span`,{...d($.muted),children:i(`publish.signedInAs`,{login:o.login})}),(0,G.jsx)(`button`,{type:`button`,...d($.textButton),onClick:()=>void j(()=>Z(`POST`,`logout`)),children:i(`publish.signOut`)})]}),(0,G.jsx)(Gg,{foot:i(g_[E.visibility]),saving:m,url:ee,visibility:E.visibility,beside:se?{...se.card,busy:m,onVisibility:e=>void j(()=>Z(`POST`,`visibility/${se.key}`,{visibility:e})),onPublish:()=>void j(()=>Z(`POST`,`publish/${se.key}`,{visibility:E.visibility}))}:null,cascade:{items:re,rootVisibility:E.visibility,busy:m,results:A.results,includeRoot:!E.published,onPublish:(e,t)=>void j(()=>A.publishRefs(E.published,E.visibility,e,t))},profile:E.published?{shown:E.onProfile,path:o.login?`/u/${o.login}`:null,onChange:t=>void j(()=>Z(`POST`,`profile/${e}`,{shown:t}))}:null,referrers:{items:ie,exclude:se?.key,rootVisibility:oe,busy:m,cloudUnavailable:A.cloudUnavailable,results:A.referrerResults,onPublish:(e,t)=>void j(()=>A.publishReferrers(e,t))},shareKey:{active:E.access===`key`,value:b,onSelect:()=>void M(),onExpiry:e=>void M({expires:e}),onRegenerate:()=>void M({regenerate:!0}),onRemove:()=>void j(()=>Z(`DELETE`,`share-key/${e}`))},status:(0,G.jsx)(Eg,{online:!0,busy:m,publication:D,published:E.published,publishedAt:T?.cloud?.publishedAt,onPublish:ae?void 0:()=>void j(()=>Z(`POST`,`publish/${e}`))}),onVisibility:e=>void ce(e)}),ne?(0,G.jsx)(`span`,{...d(te.upToDate?$.muted:$.warning),children:i(`publish.${ne}`)}):null,E.synced?null:(0,G.jsxs)(`div`,{...d($.row,$.warning),children:[(0,G.jsx)(`span`,{children:i(`publish.visibilityNotSynced`)}),(0,G.jsx)(L,{disabled:m,size:`small`,onClick:()=>void ce(E.visibility),children:i(`publish.sync`)})]}),g.length>0?(0,G.jsx)(`ul`,{...d($.error),children:g.map(e=>(0,G.jsx)(`li`,{children:e},e))}):null,v?(0,G.jsx)(`a`,{"data-upgrade":``,href:v,rel:`noreferrer`,target:`_blank`,...d($.textButton),children:i(`share.seePlans`)}):null,E.published&&(!D||D.phase===`published`)?(0,G.jsx)(L,{loading:m||!!O,type:`primary`,onClick:()=>void j(()=>Z(`POST`,`publish/${e}`)),children:i(`publish.update`)}):null,E.published?(0,G.jsx)(`button`,{disabled:m,type:`button`,...d($.textButton,$.danger),onClick:()=>void j(()=>Z(`DELETE`,`publish/${e}`)),children:i(`publish.unpublish`)}):null,E.published&&o.autoPublish?.enabled?(0,G.jsx)(`span`,{...d($.muted),children:i(`publish.autoPublishNote`)}):null,(0,G.jsxs)(`div`,{...d($.row,$.muted),children:[(0,G.jsx)(`span`,{children:i(`settings.menuStatus`,{state:o.autoPublish?.enabled?i(`settings.on`):i(`settings.off`)})}),(0,G.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:10},children:[P?(0,G.jsxs)(`a`,{href:P,rel:`noopener noreferrer`,target:`_blank`,...d($.textButton),children:[i(`cloudEntry.openShort`),` `,(0,G.jsx)(yo,{"aria-hidden":`true`,size:11})]}):null,(0,G.jsx)(`button`,{type:`button`,...d($.textButton),onClick:hg,children:i(`publish.openSettings`)})]})]})]}):(0,G.jsx)(e_,{landingUrl:de,origin:o.origin,waitingForLogin:l,onStartIntent:N}):(0,G.jsx)(`div`,{...d($.panel,$.muted),children:i(`publish.readingStatus`)});if(u.role===`beside`||le())return null;let F=r&&!!o&&!o.signedIn;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Gt,{content:fe,open:f,placement:`bottomRight`,popupProps:{"aria-label":i(`common.share`)},trigger:`click`,onOpenChange:e=>void ue(e),children:(0,G.jsxs)(`button`,{"aria-label":`Share`,"data-cloud-shell-cta":F?``:void 0,type:`button`,...d($.trigger,t&&$.floating,F&&$.shellCta),children:[F?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{"aria-hidden":`true`,...d($.brandDot)}),i(`cloudEntry.shellCta`)]}):(0,G.jsxs)(G.Fragment,{children:[E.published&&E.visibility===`public`?(0,G.jsx)(Qe,{size:14}):(0,G.jsx)(xo,{size:14}),E.published?i(`publish.published`):i(`common.share`)]}),D&&D.phase!==`published`?(0,G.jsx)(Eg,{compact:!0,publication:D,published:E.published}):null,te.upToDate===!1?(0,G.jsx)(`span`,{"aria-label":i(`publish.unpublishedChanges`),...d($.dot)}):null,se?.hidden?(0,G.jsx)(`span`,{"aria-label":i(`beside.hidden`),"data-beside-dot":``,...d($.dot)}):null]})}),S?(0,G.jsx)(s_,{result:S,onDismiss:()=>C(null),onOpenSharePanel:()=>{C(null),ue(!0)}}):null]})}function v_(e,t){let n=e.parentElement?.closest(`a, button`)??e,r=window.matchMedia(`(prefers-reduced-motion: reduce)`),i=null,o=()=>{if(r.matches||i)return;let{from:e,to:n,duration:o,easing:s}=a.sweep,c=t.animate([{transform:e},{transform:n}],{duration:o,easing:s});i=c,c.onfinish=c.oncancel=()=>{i=null}},s=()=>{n.matches(`:focus-visible`)&&o()};return n.addEventListener(`pointerenter`,o),n.addEventListener(`focus`,s),()=>{n.removeEventListener(`pointerenter`,o),n.removeEventListener(`focus`,s),i?.cancel()}}function y_({ink:e,clip:t,seal:n}){return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`g`,{dangerouslySetInnerHTML:{__html:u},fill:e,transform:a.markTransform}),(0,G.jsxs)(`g`,{fill:`none`,stroke:e,strokeLinejoin:`round`,strokeWidth:a.strokeWidth,transform:a.wordTransform,children:[a.butt.map(e=>(0,G.jsx)(`path`,{d:e,strokeLinecap:`butt`},e)),a.round.map(e=>(0,G.jsx)(`path`,{d:e,strokeLinecap:`round`},e)),(0,G.jsx)(`g`,{clipPath:`url(#${t})`,children:a.clipped.map(e=>(0,G.jsx)(`path`,{d:e,strokeLinecap:`butt`},e))}),(0,G.jsx)(`rect`,{height:a.seal.size,rx:a.seal.rx,stroke:`none`,width:a.seal.size,x:a.seal.x,y:a.seal.y,...n})]})]})}function b_({height:e=22,title:t,contextMenu:r=!0}){let{t:i}=n(),s=p((0,K.useId)()),c=(0,K.useRef)(null),l=(0,K.useRef)(null);(0,K.useEffect)(()=>v_(c.current,l.current),[]);let u=async(e,t)=>{try{await navigator.clipboard.writeText(o(e)),en.success(i(t))}catch{en.error(i(`brand.copyFailed`))}},d=e=>{r&&(e.preventDefault(),e.stopPropagation(),qt([{key:`copy-svg`,label:i(`brand.copySvg`),icon:bo,onClick:()=>void u(`lockup`,`brand.copiedSvg`)},{key:`copy-logo-svg`,label:i(`brand.copyLogoSvg`),icon:_e,onClick:()=>void u(`mark`,`brand.copiedLogoSvg`)},{key:`copy-text-svg`,label:i(`brand.copyTextSvg`),icon:Be,onClick:()=>void u(`wordmark`,`brand.copiedTextSvg`)}]))},f=`${s}-clip`,m=`${s}-mask`,h=`${s}-ember`;return(0,G.jsxs)(`svg`,{ref:c,...t?{role:`img`,"aria-label":t}:{"aria-hidden":!0},height:e,viewBox:a.viewBox,width:Math.round(e*a.width/a.height*100)/100,onContextMenu:r?d:void 0,className:`x1lliihq x2lah0s`,children:[(0,G.jsxs)(`defs`,{children:[(0,G.jsx)(`clipPath`,{id:f,children:(0,G.jsx)(`rect`,{...a.clipRect})}),(0,G.jsx)(`linearGradient`,{id:h,children:a.bandStops.map(e=>(0,G.jsx)(`stop`,{offset:e.offset,stopColor:e.color,stopOpacity:e.opacity},e.offset))}),(0,G.jsx)(`mask`,{id:m,maskUnits:`userSpaceOnUse`,...a.mask,children:(0,G.jsx)(y_,{clip:f,ink:`#fff`,seal:{fill:`#fff`}})})]}),(0,G.jsx)(y_,{clip:f,ink:`currentColor`,seal:{className:`xe8yr7n x1tl3b4t`}}),(0,G.jsx)(`g`,{mask:`url(#${m})`,children:(0,G.jsx)(`rect`,{fill:`url(#${h})`,ref:l,...a.band})})]})}var x_=e=>{e&&window.open(e,`_blank`,`noopener,noreferrer`)};function S_({compact:e=!1,status:t,waitingForLogin:r,onSignIn:i,onSignOut:a}){let{t:o,i18n:s}=n();if(!t)return null;if(!t.signedIn||!t.login){let e=xg(t.origin,s.language),n=(0,G.jsxs)(`div`,{"data-cloud-connect-panel":``,className:`x78zum5 xdt5ytf x1v2ro7d x1m258z3 xqfszdh xfifm61 xo2rkog`,children:[(0,G.jsxs)(`div`,{className:`x78zum5 x6s0dn4 x1qughib x167g77z`,children:[(0,G.jsxs)(`span`,{className:`x3nfvp2 x6s0dn4 x1j9xkj6 x4z9k3i x1s688f`,children:[(0,G.jsx)(`span`,{"aria-hidden":`true`,className:`x17z2i9w x17rw0jw x1kogg8i x6z2zk2 x1cge3fn xrvj5dj x1ku5rj1 x2lah0s`,children:(0,G.jsx)(Vo,{size:13})}),o(`cloudEntry.connectTitle`)]}),(0,G.jsx)(`span`,{className:`x1j6dyjg xddlp02`,children:o(`cloudEntry.freeStart`)})]}),(0,G.jsxs)(`div`,{className:`x78zum5 xdt5ytf x17d4w8g`,children:[(0,G.jsxs)(`div`,{className:`x78zum5 x1cy8zhl xmmi0ta x1vvogim x1awh872 xur7f20 xmkeg23 x1y0btm7 x12xov25 x2fo67v`,children:[(0,G.jsx)(ke,{"aria-hidden":`true`,size:14,className:`x1cge3fn x2lah0s xr9ek0c`}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`x1lliihq xfifm61 xh88oxj xo2rkog`,children:o(`cloudEntry.benefitShareTitle`)}),(0,G.jsx)(`span`,{className:`x1lliihq x1j6dyjg x1bo0w0s xfrs9s4`,children:o(`cloudEntry.benefitShareBody`)})]})]}),(0,G.jsxs)(`div`,{className:`x78zum5 x1cy8zhl xmmi0ta x1vvogim x1awh872 xur7f20 xmkeg23 x1y0btm7 x12xov25 x2fo67v`,children:[(0,G.jsx)(rs,{"aria-hidden":`true`,size:14,className:`x1cge3fn x2lah0s xr9ek0c`}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`x1lliihq xfifm61 xh88oxj xo2rkog`,children:o(`cloudEntry.benefitPhoneTitle`)}),(0,G.jsx)(`span`,{className:`x1lliihq x1j6dyjg x1bo0w0s xfrs9s4`,children:o(`cloudEntry.benefitPhoneBody`)})]})]}),(0,G.jsxs)(`div`,{className:`x78zum5 x1cy8zhl xmmi0ta x1vvogim x1awh872 xur7f20 xmkeg23 x1y0btm7 x12xov25 x2fo67v`,children:[(0,G.jsx)(So,{"aria-hidden":`true`,size:14,className:`x1cge3fn x2lah0s xr9ek0c`}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`x1lliihq xfifm61 xh88oxj xo2rkog`,children:o(`cloudEntry.benefitSyncTitle`)}),(0,G.jsx)(`span`,{className:`x1lliihq x1j6dyjg x1bo0w0s xfrs9s4`,children:o(`cloudEntry.benefitSyncBody`)})]})]})]}),(0,G.jsx)(L,{className:{className:`xh8yej3 x90ne7k x3nfvp2 x6s0dn4 xl56j7k x1j9xkj6 xc342km xur7f20 x15az74h x12s0oaj xt9vybz xqfszdh x1ct8sxb xh88oxj x1ypdohk`}.className,icon:mo,loading:r,type:`primary`,onClick:i,children:o(r?`settings.waitingLogin`:`common.signInGithub`)}),(0,G.jsxs)(`div`,{className:`x78zum5 x6s0dn4 x1nejdyq x1j6dyjg xddlp02 xfrs9s4`,children:[(0,G.jsx)(xo,{"aria-hidden":`true`,size:11}),(0,G.jsx)(`span`,{children:o(`cloudEntry.privateByDefault`)})]}),(0,G.jsxs)(`div`,{className:`x78zum5 x6s0dn4 x1qughib x167g77z`,children:[(0,G.jsx)(Xg,{origin:t.origin}),e?(0,G.jsxs)(`a`,{href:e,rel:`noopener noreferrer`,target:`_blank`,className:`x3nfvp2 x6s0dn4 x1ed6fcf x1j6dyjg xddlp02 xytdrwj x1hl2dhg xuxw1ft`,children:[o(`cloudEntry.learnShort`),(0,G.jsx)(yo,{"aria-hidden":`true`,size:11})]}):null]})]});return(0,G.jsx)(Gt,{content:n,placement:`bottomRight`,popupProps:{"aria-label":o(`cloudEntry.connectTitle`)},trigger:`click`,children:(0,G.jsxs)(`button`,{"data-cloud-connect-cta":``,type:`button`,className:`x3nfvp2 x6s0dn4 x1j9xkj6 x1gnnpzl xe2zdcy xpdmqnj xmkeg23 x1y0btm7 x1rqon0r x1e6avla x19ckca5 x1et1poy xs0jrwl xqfszdh xfifm61 xk50ysn xuxw1ft x1ypdohk xlee54d x784prv x9v5kkp xv8siiq x7s97pk`,children:[(0,G.jsx)(`span`,{"aria-hidden":`true`,className:`x1v4s8kt xols6we x16rqkct x1iug7pk x2lah0s`}),(0,G.jsx)(`span`,{children:o(`cloudEntry.connectCta`)}),(0,G.jsx)(`span`,{className:`x1pixwil xpilrb4 x1t7ytsu x13ft1s6 x1j6dyjg xo1l8bm xf9vgkq xy0uqqd`,children:o(`cloudEntry.connectHint`)})]})})}let c=t.login,l=Sg(t.origin);return(0,G.jsxs)(G.Fragment,{children:[!e&&l?(0,G.jsxs)(`a`,{"data-cloud-header-link":``,href:l,rel:`noopener noreferrer`,target:`_blank`,className:`x3nfvp2 x6s0dn4 x1nejdyq x1fgtraw xdqyycr x1kogg8i xjbqb8w xj0l527 x1bo0w0s xytdrwj xfifm61 xk50ysn x1hl2dhg xuxw1ft x1gz44f`,children:[(0,G.jsx)(Vo,{"aria-hidden":`true`,size:13}),(0,G.jsx)(`span`,{children:`Cloud`}),(0,G.jsx)(yo,{"aria-hidden":`true`,size:12})]}):null,(0,G.jsx)(Ht,{items:[{key:`status`,disabled:!0,label:`${c} · ${o(`settings.menuStatus`,{state:t.autoPublish?.enabled?o(`settings.on`):o(`settings.off`)})}`},{type:`divider`,key:`cloud-divider`},{key:`open-cloud`,icon:Vo,label:o(`cloudEntry.openCloud`),extra:`↗`,onClick:()=>x_(l)},{key:`public-profile`,icon:Qe,label:o(`cloudEntry.publicProfile`),extra:`/u/${c} ↗`,onClick:()=>x_(Cg(t.origin,c))},{key:`plans`,icon:Go,label:o(`cloudEntry.plans`),extra:`↗`,onClick:()=>x_(wg(t.origin))},{type:`divider`,key:`settings-divider`},{key:`settings`,icon:ts,label:o(`settings.open`),onClick:hg},{key:`sign-out`,icon:Yo,label:o(`settings.signOut`),onClick:()=>void a?.()}],children:(0,G.jsx)(`button`,{"aria-label":o(`settings.accountMenu`,{login:c}),type:`button`,className:`x78zum5 x1717udv xc342km x16rqkct xjbqb8w x1ypdohk x1hl8ikr`,children:(0,G.jsx)(Ld,{alt:``,avatar:`/api/avatar/github/${c}`,shape:`circle`,size:28,className:`xs625wh`})})})]})}var C_=(0,K.createContext)(!1),w_=(0,K.createContext)(null),T_=C_.Provider,E_=w_.Provider,D_=()=>typeof window<`u`&&window.parent!==window&&Ze()&&!le();function O_(){return(0,K.useContext)(C_)||D_()}function k_(){return(0,K.useContext)(w_)}function A_({type:e,id:t,docHeader:r,children:i}){let{t:a}=n(),o=eg(),[s,c]=(0,K.useState)(t),[l,u]=(0,K.useState)(null),d=`${e}/${t}`;(0,K.useEffect)(()=>{c(t);let e=()=>{let e=document.title?.trim();e&&e!==`Ryugi`&&e!==`Artifacts · Ryugi`&&c(e)};e();let n=document.querySelector(`title`);if(!n||typeof MutationObserver>`u`)return;let r=new MutationObserver(e);return r.observe(n,{childList:!0,characterData:!0,subtree:!0}),()=>r.disconnect()},[t,e]);let f=!!o.status?.signedIn&&!!o.status.login;return(0,G.jsxs)(`div`,{"data-local-shell":``,className:`xixxii4 x10a8y8t x78zum5 xdt5ytf x184qs1t`,children:[(0,G.jsxs)(`header`,{"data-local-shell-bar":``,className:`x1okw0bk x78zum5 x6s0dn4 x1qughib xou54vl x1otypdl xn3w4p2 xqin4a2 xwbbzrz xso031l x1q0q8m5 xtrfj0v x1rozbrz xo2rkog xqfszdh x1ct8sxb x1n2onr6 x1355qak`,children:[(0,G.jsxs)(`div`,{className:`x78zum5 x6s0dn4 x883omv xeuugli x98rzlu`,children:[(0,G.jsx)(`a`,{"aria-label":a(`localShell.backToList`),href:`/`,className:`x3nfvp2 x6s0dn4 x2lah0s xo2rkog x12rs2w1 x1hl2dhg x1sxf85j`,children:(0,G.jsx)(b_,{height:19})}),(0,G.jsxs)(`nav`,{"aria-label":a(`localShell.breadcrumb`),className:`x78zum5 x6s0dn4 x167g77z xeuugli x1ct8sxb xuxw1ft`,children:[(0,G.jsx)(`span`,{"aria-hidden":`true`,className:`xddlp02 x2lah0s`,children:`/`}),(0,G.jsx)(`span`,{className:`x1bo0w0s x2lah0s xt0psk2 xkaaz9w`,children:a(`type.${e}`)}),(0,G.jsx)(`span`,{"aria-hidden":`true`,className:`xddlp02 x2lah0s xt0psk2 xkaaz9w`,children:`/`}),(0,G.jsx)(`span`,{title:s,className:`xeuugli xb3r6kr xlyipyv x1s688f xo2rkog`,children:s})]})]}),(0,G.jsxs)(`div`,{className:`x78zum5 x6s0dn4 x167g77z x2lah0s`,children:[(0,G.jsx)(`div`,{ref:u,className:`xjp7ctv`}),e===`document`&&r?.header?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Oe,{available:r.header.history,comments:r.header.comments,open:r.header.historyOpen,onComments:()=>r.history(`close`),onHistory:()=>r.history(`toggle`)}),(0,G.jsx)(vo,{state:r.header.documentExport,onExport:r.exportPdf}),(0,G.jsx)(`span`,{"aria-hidden":`true`,className:`x1i1rx1s xlup9mm x2lah0s xh6qj2i`})]}):null,o.status&&!f?(0,G.jsxs)(`span`,{"data-local-only-badge":``,className:`x3nfvp2 xkaaz9w x6s0dn4 x1nejdyq x1qt5hsa xddlp02 xuxw1ft`,children:[(0,G.jsx)(`span`,{"aria-hidden":`true`,className:`x1v4s8kt xols6we x16rqkct xvndefy x1y0btm7 xhgr6co x9f619 x2lah0s`}),a(`server.localOnly`)]}):null,(0,G.jsx)(__,{shell:!0,artifact:d}),f?(0,G.jsx)(S_,{compact:!0,status:o.status,waitingForLogin:o.waitingForLogin,onSignIn:()=>void o.login(),onSignOut:async()=>{await Z(`POST`,`logout`),await o.refresh()}}):(0,G.jsx)(`button`,{"aria-label":a(`settings.title`),title:a(`settings.title`),type:`button`,className:`xrvj5dj x1ku5rj1 xgd8bvy x1fgtraw x1717udv xc342km x1kogg8i xjbqb8w xj0l527 x1bo0w0s xytdrwj x1ypdohk x2lah0s`,onClick:hg,children:(0,G.jsx)(ts,{"aria-hidden":`true`,size:14})})]})]}),(0,G.jsx)(`div`,{className:`x1n2onr6 x98rzlu x2lwn1j x78zum5 xdt5ytf xb3r6kr`,children:(0,G.jsx)(T_,{value:!0,children:(0,G.jsx)(E_,{value:l,children:i})})})]})}var j_=1e3,M_=`ryugi:embed:hello`,N_=`ryugi:embed:heartbeat`,P_=`ryugi:embed:painted`,F_=`ryugi:embed:position`,I_=`ryugi:embed:positioned`;function L_({parentOrigin:e,onPosition:t,win:n=window}){let r=(t,r)=>n.parent.postMessage({type:t,...r},e),i=i=>{if(i.origin!==e||i.source!==n.parent)return;let a=i.data;a?.type===F_&&a.anchor&&t&&t(a.anchor).then(()=>r(I_))};n.addEventListener(`message`,i),r(M_,t?{position:!0}:void 0);let a=setInterval(()=>r(N_),j_),o=!1;return{painted(){o||(o=!0,r(P_))},close(){clearInterval(a),n.removeEventListener(`message`,i)}}}function R_(e=document,t=window,n){let r=e.documentElement.dataset.ryugiEmbedParent;return r?L_({parentOrigin:r,onPosition:n,win:t}):null}var z_=()=>new Promise(e=>requestAnimationFrame(()=>requestAnimationFrame(()=>e()))),B_=e=>(ze(e),z_()),V_=(0,K.createContext)(()=>{});function H_(){let e=(0,K.useRef)(null),t=(0,K.useRef)(!1);return(0,K.useEffect)(()=>{let n=R_(document,window,B_);return e.current=n,t.current&&n?.painted(),()=>{n?.close(),e.current=null}},[]),(0,K.useCallback)(()=>{t.current=!0,e.current?.painted()},[])}function U_(e){let t=(0,K.useContext)(V_);(0,K.useEffect)(()=>{if(!e)return;let n=0,r=requestAnimationFrame(()=>{n=requestAnimationFrame(()=>{t(),Ee()&&nt({kind:`painted`})})});return()=>{cancelAnimationFrame(r),cancelAnimationFrame(n)}},[e,t])}function W_(e=window){try{let t=e.parent,n=new URLSearchParams(e.location.search).get(`at`);if(t!==e&&t.location.origin===e.location.origin&&/^\/whiteboard\/[^/]+\/?$/.test(t.location.pathname)&&t.location.pathname===n)return t}catch{}return e}var G_={artboard:{Layout:(0,K.lazy)(()=>_(async()=>{let{ArtboardLayout:e}=await import(`./ArtboardLayout-aA3schgm.js`);return{ArtboardLayout:e}},__vite__mapDeps([19,1,16,2,3,4,5,6,7,17,13,20,21,22,23,24,25,26,11,12,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,18,45,46,47,48,49,10,50,51,52,53,54,55,15,8,9,56,57,58,59,60,61]),import.meta.url).then(({ArtboardLayout:e})=>({default:e})))},document:{Layout:(0,K.lazy)(()=>_(async()=>{let{DocumentLayout:e}=await import(`./DocumentLayout-RL2r3iAU.js`);return{DocumentLayout:e}},__vite__mapDeps([62,1,4,5,2,3,6,7]),import.meta.url).then(({DocumentLayout:e})=>({default:e})))},html:{Layout:(0,K.lazy)(()=>_(async()=>{let{HtmlLayout:e}=await import(`./HtmlLayout-BT1Grbqi.js`);return{HtmlLayout:e}},__vite__mapDeps([63,1,4,64,21,2,3,5,6,7,16,17,13,41,65,50,51,58,59,60]),import.meta.url).then(({HtmlLayout:e})=>({default:e})))},whiteboard:{Layout:(0,K.lazy)(()=>_(async()=>{let{WhiteboardLayout:e}=await import(`./WhiteboardLayout-SRtQwnI2.js`);return{WhiteboardLayout:e}},__vite__mapDeps([66,1,59,4,60,16,2,3,5,6,7,17,13,67,68,21,18,43,69,33,70,46,71,28,47,34,72,40,73,74,10,27,11,12,44,35,36,41,52,75,56,38,39,76,77,78]),import.meta.url).then(({WhiteboardLayout:e})=>({default:e}))),embedIn:e=>(0,G.jsx)(ng,{pageWindow:W_(),children:e})},verify:{Layout:(0,K.lazy)(()=>_(async()=>{let{VerifyLayout:e}=await import(`./VerifyLayout-DhHeBlGD.js`);return{VerifyLayout:e}},__vite__mapDeps([79,1,16,2,3,4,5,6,7,17,13,59,60,80,81,68,21,18,43,69,33,70,46,71,28,47,34,72,40,73,36,82,83,84,85,76,86,44,35,12,41,87,24,88,89,11,23,10,8,9,65,75,90,91,53,54,26,92,93]),import.meta.url).then(({VerifyLayout:e})=>({default:e})))},slides:{Layout:(0,K.lazy)(()=>_(async()=>{let{SlidesLayout:e}=await import(`./SlidesLayout-T6pVArYg.js`);return{SlidesLayout:e}},__vite__mapDeps([94,1,58,59,4,60,16,2,3,5,6,7,17,13,95,90,74,65,50,51,26,64,21,41,10,44,35,36,12,31,32,33,34,37,70,76,43,83,39,40,49,72,28,56,9,15,18,96,47,48,86,24,97,8,52,89,98,99,20,100]),import.meta.url).then(({SlidesLayout:e})=>({default:e}))),bare:e=>new URLSearchParams(e).has(`live`)},report:{Layout:(0,K.lazy)(()=>_(async()=>{let{ReportLayout:e}=await import(`./ReportLayout-BHrbaaAL.js`);return{ReportLayout:e}},__vite__mapDeps([101,1,58,59,4,60,16,2,3,5,6,7,17,13,64,21,41,65,50,51,26,76,10,32,33,44,35,36,12,85,48]),import.meta.url).then(({ReportLayout:e})=>({default:e})))},storyboard:{Layout:(0,K.lazy)(()=>_(async()=>{let{StoryboardLayout:e}=await import(`./StoryboardLayout-DiV_Z5pK.js`);return{StoryboardLayout:e}},__vite__mapDeps([102,1,4,58,59,60,16,2,3,5,6,7,17,13,103,26,65,64,21,41,50,51,104,55,48,89,20,44,35,36,12,76,88,98,15,24,28,29,30,72,33,43,47,71]),import.meta.url).then(({StoryboardLayout:e})=>({default:e})))}},K_=(0,K.lazy)(()=>_(async()=>{let{AutoPublishBar:e}=await import(`./auto-publish-DCFcz2OJ.js`);return{AutoPublishBar:e}},__vite__mapDeps([105,1,106,13,3,4,5,2,6,7]),import.meta.url).then(({AutoPublishBar:e})=>({default:e}))),q_=(0,K.lazy)(()=>_(async()=>{let{SettingsDialog:e}=await import(`./settings-DYL-Smbx.js`);return{SettingsDialog:e}},__vite__mapDeps([107,1,16,2,3,4,5,6,7,17,13,28,49,14,75,41]),import.meta.url).then(({SettingsDialog:e})=>({default:e}))),J_=(0,K.lazy)(()=>_(async()=>{let{ArtifactList:e}=await import(`./ArtifactList-DGwth5Uo.js`);return{ArtifactList:e}},__vite__mapDeps([108,1,32,2,3,4,5,6,7,16,17,13,33,21,37,35,36,49,20,87,72,109,64,41,14,45,51,54,39,40,56,18,60]),import.meta.url).then(({ArtifactList:e})=>({default:e}))),Y_=(0,K.lazy)(()=>_(async()=>{let{StoryboardRenderLayout:e}=await import(`./StoryboardRender-BJWBZ1MT.js`);return{StoryboardRenderLayout:e}},__vite__mapDeps([110,1,103,2,3,4,5,6,7,26,65,58,59,60,16,17,13]),import.meta.url).then(({StoryboardRenderLayout:e})=>({default:e}))),X_=(0,K.lazy)(()=>_(async()=>{let{PreviewArtifactLayout:e}=await import(`./PreviewArtifactLayout-Cbu5Tl4o.js`);return{PreviewArtifactLayout:e}},__vite__mapDeps([111,1,4,16,2,3,5,6,7,17,13,60,98,15,35,36,21,10,64,41,42,49,44,12,96,39,40,11,37,47,109]),import.meta.url).then(({PreviewArtifactLayout:e})=>({default:e}))),Z_=(0,K.lazy)(()=>Promise.all([_(()=>import(`./split-x3wbj4VY.js`),__vite__mapDeps([112,1,90,16,2,3,4,5,6,7,17,13,51,15,84,97,39,40,41,113,82,104,69,86,10,9,99,92,114,77,115]),import.meta.url),_(()=>import(`./local-split-host-B9-b1nF-.js`).then(e=>e.n),__vite__mapDeps([95,1,90,16,2,3,4,5,6,7,17,13,60]),import.meta.url)]).then(([{SplitShell:e},{localSplitHost:t}])=>({default:n=>(0,G.jsx)(e,{...n,host:t})}))),Q_=(0,K.lazy)(()=>_(async()=>{let{PreviewLayout:e}=await import(`./PreviewLayout-Dam8DKBw.js`).then(e=>e.n);return{PreviewLayout:e}},__vite__mapDeps([116,1,4,2,3,5,6,7,22]),import.meta.url).then(({PreviewLayout:e})=>({default:e}))),$_=(e,t)=>(0,G.jsxs)(G.Fragment,{children:[e,(0,G.jsx)(K_,{}),(0,G.jsx)(q_,{}),t&&(0,G.jsx)(Wh,{artifact:t})]}),ev=(e,t,n)=>$_((0,G.jsx)(A_,{id:t,type:e,children:n}),`${e}/${t}`);function tv({type:e,id:t,split:n}){let[r,i]=(0,K.useState)({type:e,id:t}),[a,o]=(0,K.useState)(null);(0,K.useEffect)(()=>{i({type:e,id:t})},[e,t]);let s=(0,K.useCallback)(e=>{i(t=>t.type===e.primary.type&&t.id===e.primary.id?t:e.primary)},[]),c=(0,K.useCallback)(e=>{o(e)},[]);return $_((0,G.jsx)(A_,{docHeader:a,id:r.id,type:r.type,children:(0,G.jsx)(Z_,{fill:!0,hostPrimaryDocument:!0,id:t,split:n,type:e,onDocumentHeader:c,onPanes:s})}),`${r.type}/${r.id}`)}function nv({id:e,type:t}){let n=H_(),{Layout:r,embedIn:i}=G_[t],a=(0,G.jsx)(r,{id:e});return(0,G.jsxs)(V_,{value:n,children:[Vh(location.search)&&(0,G.jsx)(Wh,{artifact:`${t}/${e}`}),i?i(a):a]})}function rv(){let[e]=vh(),t=f(e);if((0,K.useEffect)(()=>{if(!document.documentElement.dataset.ryugiArtifactId)return;let e=document.querySelector(`link[rel="canonical"]`);if(!e)return;let t=new URL(location.href);t.pathname=h(t.pathname,new URL(e.href).pathname),t.href!==location.href&&history.replaceState(history.state,``,t)},[]),(0,K.useEffect)(()=>{window.scrollTo(0,0)},[e]),t.kind===`list`)return $_((0,G.jsx)(J_,{}));if(t.kind===`unknown`)return(0,G.jsx)(`div`,{className:`x78zum5 x6s0dn4 xl56j7k x5yr21d xggk2y7 x1bo0w0s xqfszdh xif65rj`,children:`No artifact lives at this address.`});let n=document.documentElement.dataset.ryugiArtifactId??t.id;if(t.kind===`preview`)return(0,G.jsx)(Q_,{id:n,type:t.type});if(t.kind===`dev-preview`)return $_((0,G.jsx)(X_,{id:n}),`preview/${n}`);if(t.kind===`embed`)return(0,G.jsx)(nv,{id:n,type:t.type});if(t.kind===`render`)return(0,G.jsx)(Y_,{id:n});if(m(t.type).standalone){let{Layout:e,bare:r}=G_[t.type],i=(0,G.jsx)(e,{id:n});return r?.(location.search)?$_(i,`${t.type}/${n}`):ev(t.type,n,i)}return(0,G.jsx)(tv,{id:n,split:qe(t,location.search)?.split??null,type:t.type})}function iv(){return(0,G.jsx)(K.Suspense,{fallback:(0,G.jsx)(`div`,{className:`x78zum5 x6s0dn4 xl56j7k x5yr21d xggk2y7 x1bo0w0s xqfszdh xif65rj`,children:(0,G.jsx)(wh,{label:s(`common.loading`)})}),children:(0,G.jsx)(rv,{})})}Fe(),document.documentElement.lang=r[c.language];function av(){return g(),(0,G.jsx)(Rd,{features:gf,children:(0,G.jsxs)(b,{enableCustomFonts:!1,motion:Wm,children:[(0,G.jsx)(iv,{}),(0,G.jsx)(Me,{}),(0,G.jsx)(tn,{}),(0,G.jsx)(Sp,{})]})})}(0,Gm.createRoot)(document.getElementById(`root`)).render((0,G.jsx)(K.StrictMode,{children:(0,G.jsx)(av,{})}));export{Y as A,zo as B,Xh as C,Dh as D,Oh as E,rs as F,ts as I,$o as L,lp as M,bf as N,wh as O,Ld as P,Zo as R,eg as S,jh as T,hg as _,b_ as a,ag as b,o_ as c,Xg as d,wg as f,gg as g,Cg as h,S_ as i,fp as j,Lp as k,i_ as l,xg as m,O_ as n,__ as o,Sg as p,k_ as r,n_ as s,U_ as t,r_ as u,yg as v,Fh as w,Z as x,ig as y,Uo as z};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./AgentDock-aN5OSJ-J.js","./rolldown-runtime-XKyaHtl9.js","./route-Xg8P5ghY.js","./bem-vbke-3KC.js","./react-DlmbjZJV.js","./jsx-runtime-LKYXHABd.js","./types-DAs-xbqr.js","./index2.css","./BottomSheet-BOQ2E7Z6.js","./motion-Cy65kd7X.js","./useMedia-CFebB4XU.js","./agentLook-eVhGFE_V.js","./icons-CKXqWGqz.js","./MotionConfigContext-HC2vqcJO.js","./arrow-up-right-0KreI6kY.js","./chevron-left-C5itNrp5.js","./url-BoN37oN0.js","./useLayerZIndex-lrIeP3uV.js","./chevron-right-xNdXLJg6.js","./ArtboardLayout-C0AyDlVu.js","./imperative-Bl7KanbO.js","./Popover-uYLZtM5h.js","./view-DdfN3DGp.js","./rounds-BLj-tfMG.js","./sliders-horizontal-CuS3-UwA.js","./Canvas-C_S0HAGE.js","./cssVar.stylex-CGbpAC1Y.js","./WritingCursor-XIWPcNuO.js","./maximize-2-Bc0lXBg6.js","./PlaybackIcon-D-vfZnSv.js","./elements-CmGVWYag.js","./snap-DZtFeas3.js","./local-QOxEcmpr.js","./SelectScrollUpArrow-DsiQm9o6.js","./stringifyLocale-pkrPwFqm.js","./stable-CVHOj_kY.js","./Tooltip-B7lRhfz2.js","./Input-fQLk-PNT.js","./PhoneArtboardBar-CTMvi2kP.js","./DropdownMenu-CIz6C4Vl.js","./MenuSubmenuTrigger-4JoqfaRi.js","./index5.css","./crop-encode-Dfe-R9aR.js","./trash-DByBaz9Z.js","./ThreadView-B7amgGB8.js","./folder-BViSPo7g.js","./ruler-CYb0HZGT.js","./mouse-pointer-2-B-OF_fcG.js","./play-6FAfeM1L.js","./Segmented-icH7CFHs.js","./useTypeFavicon-yXOsFZBx.js","./type-icons-CxYXZlMj.js","./CommentPopover-CTad_ci3.js","./GroupVerdict-Bo6-N2fF.js","./artifact-list-7mtsXERr.js","./film-A6SU1RGC.js","./code-xml-c9QCqmhY.js","./store-D3ROW536.js","./selection-BWCQd_Fn.js","./useArtifactFeed-CuvRk10D.js","./transport-Fu5iCiYX.js","./useArtifactSocket-tWHs_pnv.js","./ArtboardLayout-DLyi-yDq.css","./DocumentLayout-VFaDqBeR.js","./HtmlLayout-B29gXfBU.js","./WarningsBadge-B7sbLji4.js","./useSandboxFrame-CJmSnwgG.js","./WhiteboardLayout-BhENYvui.js","./shims-s-YVfIlz.js","./WhiteboardEditor-cZ32fLqJ-BK6P1wgf.js","./code-DnmQyGiF.js","./text-align-start-CRhecbJR.js","./zoom-out-N_0LUBru.js","./plus-DZJ2BVkK.js","./index3.css","./pages-DWkRbog-.js","./preference-oNdcNeml.js","./message-square-Yl8PoPy_.js","./backlinks-C_k8-LL2.js","./WhiteboardLayout-BXSq3hNU.css","./VerifyLayout-DKPuSiGF.js","./useAssetBase-4Ut9QhBI.js","./editor-OGz_Tz-t.js","./pen-tool-BfwjhXQW.js","./underline-CT_nGhA9.js","./external-link-D382oEvK.js","./table-2-D90vZ04E.js","./presentation-DXrcAbwM.js","./search-DTrfkTpJ.js","./upload-DffL3XsM.js","./video-DKoRqEZW.js","./ref-Cg8zYSdM.js","./index4.css","./fit-BLbHgoq2.js","./VerifyLayout-B9e4RHAZ.css","./SlidesLayout-XsjPfYDW.js","./local-split-host-aaVovEJX.js","./monitor-DRrnx_H5.js","./DocumentExportMenu-BMtNLMCd.js","./DraggablePanel-C-j_BdLX.js","./embed-src-CmyqZplg.js","./SlidesLayout-Bjds2UXz.css","./ReportLayout-D7ZkedGf.js","./StoryboardLayout-F5kZZPXd.js","./useStoryboardData-BKxFqsGP.js","./clapperboard-BfpJ7tpa.js","./auto-publish-DNFjfgdJ.js","./cloud-upload-D8TpApTr.js","./settings-5y0Q6PnT.js","./ArtifactList-D1k1uD-4.js","./RyugiMark-BEV-beO7.js","./StoryboardRender-m7Gb9PIh.js","./PreviewArtifactLayout-D8RO9K8h.js","./split-DFCHm5IV.js","./SplitFrame-DUnzPWJZ.js","./route-messages-BmAJn0Qh.js","./split-C1umM5Fz.css","./PreviewLayout-Dw-jMatP.js"])))=>i.map(i=>d[i]);
2
+ import{n as e,r as t}from"./rolldown-runtime-XKyaHtl9.js";import{_ as n,b as r,c as i,d as a,f as o,g as s,h as c,i as l,l as u,m as d,n as f,p,r as m,t as h,v as g,x as _,y as v}from"./route-Xg8P5ghY.js";/* empty css */import{An as y,Ar as b,At as x,Bt as S,Cn as C,Cr as w,Ct as T,Dn as E,Dt as D,Et as O,Ft as k,Gt as ee,Ht as A,Jt as te,K as j,Kt as ne,Lt as re,Mt as M,Nt as ie,Or as ae,Ot as oe,Pt as se,Rt as N,S as ce,Sr as le,St as P,Tr as ue,Tt as F,Ut as de,Vt as I,Wt as fe,Xt as pe,Yt as me,Zt as he,_r as ge,_t as _e,bt as ve,cr as ye,ct as be,dt as xe,en as Se,fr as Ce,ft as we,g as Te,gt as Ee,h as De,hr as Oe,ht as ke,it as Ae,j as je,jr as Me,jt as Ne,k as Pe,kn as Fe,kr as Ie,kt as Le,l as Re,lr as ze,lt as Be,mr as Ve,mt as He,nt as L,or as R,pr as Ue,pt as We,q as Ge,r as Ke,rn as qe,rt as z,tt as Je,ut as Ye,v as Xe,vr as Ze,vt as Qe,wr as $e,wt as et,x as tt,xr as nt,xt as rt,y as it,yt as at,zt as ot}from"./url-BoN37oN0.js";import{$r as st,C as ct,Dn as lt,En as ut,Fn as dt,Ft as ft,Gr as pt,Hr as mt,It as ht,Kr as gt,Pn as _t,Sn as vt,Tn as yt,Vr as bt,Xr as xt,Yr as St,Zr as Ct,ii as B,kr as wt,oi as Tt,or as Et,qn as Dt,ri as V,rr as Ot,t as kt,zr as At}from"./useLayerZIndex-lrIeP3uV.js";import{n as jt,r as H,t as Mt}from"./bem-vbke-3KC.js";import{t as Nt}from"./react-DlmbjZJV.js";import{a as Pt,i as Ft,l as It,n as Lt,o as Rt,r as zt,s as Bt,t as Vt}from"./DropdownMenu-CIz6C4Vl.js";import{A as Ht,f as Ut,t as Wt}from"./Popover-uYLZtM5h.js";import{t as Gt}from"./jsx-runtime-LKYXHABd.js";import{a as Kt,i as qt,n as Jt,o as Yt,r as Xt,s as Zt,t as Qt}from"./store-D3ROW536.js";import{n as $t,t as en}from"./imperative-Bl7KanbO.js";import{$ as tn,B as nn,Ct as rn,Dt as an,Et as on,G as sn,I as cn,J as ln,M as un,N as dn,P as fn,St as pn,Tt as mn,U as hn,W as U,_t as gn,a as _n,bt as vn,c as yn,ct as bn,d as xn,dt as Sn,et as Cn,gt as wn,h as Tn,ht as En,i as Dn,l as On,m as kn,mt as An,o as jn,p as Mn,r as Nn,s as Pn,st as Fn,t as In,u as Ln,ut as Rn,wt as zn,xt as Bn}from"./MotionConfigContext-HC2vqcJO.js";import{$ as Vn,$n as Hn,$t as Un,A as Wn,An as Gn,At as Kn,B as qn,Bn as Jn,Bt as Yn,C as Xn,Cn as Zn,Cr as Qn,Ct as $n,D as er,Dn as tr,Dt as nr,E as rr,En as ir,Et as ar,F as or,Fn as sr,Ft as cr,G as lr,Gn as ur,Gt as dr,H as fr,Hn as pr,Ht as mr,I as hr,In as gr,It as _r,J as vr,Jn as yr,Jt as br,K as xr,Kn as Sr,Kt as Cr,L as wr,Ln as Tr,Lt as Er,M as Dr,Mn as Or,Mt as kr,N as Ar,Nn as jr,Nt as Mr,O as Nr,On as Pr,Ot as Fr,P as Ir,Pn as Lr,Pt as Rr,Q as zr,Qn as Br,Qt as Vr,R as Hr,Rn as Ur,Rt as Wr,S as Gr,Sn as Kr,Sr as qr,St as Jr,T as Yr,Tn as Xr,Tr as Zr,Tt as Qr,U as $r,Un as ei,Ut as ti,V as ni,Vn as ri,Vt as ii,W as ai,Wn as oi,Wt as si,X as ci,Xn as li,Xt as ui,Y as di,Yn as fi,Yt as pi,Z as mi,Zn as hi,Zt as gi,_ as _i,_n as vi,_r as yi,_t as bi,a as xi,an as Si,ar as Ci,at as wi,b as Ti,bn as Ei,br as W,bt as Di,c as Oi,cn as ki,cr as Ai,ct as ji,d as Mi,dn as Ni,dr as Pi,dt as Fi,en as Ii,er as Li,et as Ri,f as zi,fn as Bi,fr as Vi,ft as Hi,g as Ui,gn as Wi,gr as Gi,gt as Ki,h as qi,hn as Ji,hr as Yi,ht as Xi,i as Zi,in as Qi,ir as $i,it as ea,j as ta,jn as na,jt as ra,k as ia,kn as aa,kt as oa,l as sa,ln as ca,lr as la,lt as ua,m as da,mn as fa,mr as pa,mt as ma,n as ha,nn as ga,nr as _a,nt as va,o as ya,on as ba,or as xa,ot as Sa,p as Ca,pn as wa,pr as Ta,pt as Ea,q as Da,qn as Oa,qt as ka,r as Aa,rn as ja,rr as Ma,rt as Na,s as Pa,sn as Fa,sr as Ia,st as La,t as Ra,tn as za,tr as Ba,tt as Va,u as Ha,un as Ua,ur as Wa,ut as Ga,v as Ka,vn as qa,vr as Ja,vt as Ya,w as Xa,wn as Za,wr as Qa,wt as $a,x as eo,xn as to,xr as no,xt as ro,y as io,yn as ao,yr as oo,yt as so,z as co,zn as lo,zt as uo}from"./elements-CmGVWYag.js";import{m as fo,p as po,t as mo}from"./local-QOxEcmpr.js";import{r as ho,t as go}from"./useArtifactSocket-tWHs_pnv.js";import{t as _o}from"./DocumentExportMenu-BMtNLMCd.js";import{t as vo}from"./arrow-up-right-0KreI6kY.js";import{F as yo,P as bo}from"./SelectScrollUpArrow-DsiQm9o6.js";import{t as xo}from"./cloud-upload-D8TpApTr.js";import{t as So}from"./Tooltip-B7lRhfz2.js";import{S as Co,a as wo,c as To,d as Eo,f as Do,h as Oo,i as ko,l as Ao,m as jo,n as Mo,s as No,t as Po,u as Fo,x as Io}from"./MenuSubmenuTrigger-4JoqfaRi.js";var Lo={name:`clock-3`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]};Lo.node;var Ro=an(Lo),zo={name:`cloud`,size:24,node:[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]};zo.node;var Bo=an(zo),Vo={name:`columns-2`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M12 3v18`,key:`108xh3`}]],aliases:[`columns`]};Vo.node;var Ho=an(Vo),Uo={name:`credit-card`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`,key:`ynyp8z`}],[`line`,{x1:`2`,x2:`22`,y1:`10`,y2:`10`,key:`1b3vmo`}],[`path`,{d:`M6 14h2`,key:`mk7k0u`}]]};Uo.node;var Wo=an(Uo),Go={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};Go.node;var Ko=an(Go),qo={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};qo.node;var Jo=an(qo),Yo={name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]};Yo.node;var Xo=an(Yo),Zo={name:`rotate-cw`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]};Zo.node;var Qo=an(Zo),$o={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};$o.node;var es=an($o),ts={name:`smartphone`,size:24,node:[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]};ts.node;var ns=an(ts);function rs(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}function is(e,t,n){return Zr(e.getProps(),t,n,e)}var as=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,os=e=>Array.isArray(e);function ss(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,kn(n))}function cs(e){return os(e)?e[e.length-1]||0:e}function ls(e,t){let{transitionEnd:n={},transition:r={},...i}=is(e,t)||{};i={...i,...n};for(let t in i)ss(e,t,cs(i[t]))}function us(e){return!!(xn(e)&&e.add)}function ds(e,t){let n=e.getValue(`willChange`);if(us(n))return n.add(t);if(!n&&vn.WillChange){let n=new vn.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function fs(e){return e.props[Qa]}var ps=typeof window<`u`;function ms({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function hs(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?k(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState?.getState()[i],p=a?.path;p&&(p.animateValues?p.animateValues(t=>e.getValue(t,e.latestValues[t]??0),s,a,n,d):p.animateVisualElement?.(e,s,a,n,d));for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&ms(f,t))continue;let o={delay:n,...se(f?.out[t]||a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){U.update(()=>r.set(i));continue}let p=!1;if(ps&&window.MotionHandoffAnimation){let n=fs(e);if(n){let e=window.MotionHandoffAnimation(n,t,U);e!==null&&(o.startTime=e,p=!0)}}ds(e,t);let m=l??e.shouldReduceMotion;r.run(ie(t,r,i,m&&Ne.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>U.update(()=>{o&&ls(e,o)});d.length?Promise.all(d).then(t):t()}return d}function gs(e,t,n={}){let r=is(e,t,as(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?hs(e,r,n):[]),o=(r=0)=>{let{variantChildren:a}=e,{delayChildren:o=0,staggerChildren:s,staggerDirection:c}=i,l=[];return a?.forEach(e=>{e.notify(`AnimationStart`,t),l.push(gs(e,t,{...n,delay:r+(typeof o==`function`?0:o)+rs(a,e,o,s,c)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(l)},{when:s}=i;return s?s===`beforeChildren`?a().then(()=>o()):o().then(a):Promise.all([a(),o(n.delay)])}function _s(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>gs(e,t,n))):typeof t==`string`?gs(e,t,n):Promise.all(hs(e,is(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var vs=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`],ys={value:null,addProjectionMetrics:null,countProjection:void 0};function bs(e,t){let n=Rn.now();e=D(e);let r=({timestamp:i})=>{let a=i-n;a>=t&&(hn(r),e(a-t))};return U.setup(r,!0),O(()=>hn(r))}function xs(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Ss(e){return oe(e)&&e.tagName===`svg`}var Cs=e=>typeof e==`number`?e:parseFloat(e),ws=vs.length,Ts=e=>typeof e==`number`||Cn.test(e);function Es(e,t,n,r,i,a){i?(e.opacity=I(0,n.opacity??1,Os(r)),e.opacityExit=I(t.opacity??1,0,ks(r))):a&&(e.opacity=I(t.opacity??1,n.opacity??1,r));for(let i=0;i<ws;i++){let a=vs[i],o=Ds(t,a),s=Ds(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||Ts(o)===Ts(s)?(e[a]=Math.max(I(Cs(o),Cs(s),r),0),(tn.test(s)||tn.test(o))&&(e[a]+=`%`)):e[a]=s)}for(let i=0;i<_e.length;i++){let a=_e[i];(t[a]||n[a])&&(e[a]=I(t[a]||0,n[a]||0,r))}}function Ds(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Os=As(0,.5,A),ks=As(.5,.95,gn);function As(e,t,n){return r=>r<e?0:r>t?1:n(de(e,t,r))}var js=(e,t,{x:n,y:r})=>{let i=e*e+t*t;return i<1?0:-1e3*(n*e+r*t)/i},Ms=(e,t=300)=>{let n=Bn(.25,2,t/300),{stiffness:r,damping:i}=N({...e,duration:e.duration&&En(e.duration)});return{...e,stiffness:r,damping:i*Math.sqrt(n),mass:n}};function Ns(e,t){e.min=t.min,e.max=t.max}function Ps(e,t){Ns(e.x,t.x),Ns(e.y,t.y)}function Fs(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Is=.9999,Ls=1.0001,Rs=-.01,zs=.01;function G(e){return e.max-e.min}function Bs(e,t,n){return Math.abs(e-t)<=n}function Vs(e,t,n,r=.5){e.origin=r,e.originPoint=I(t.min,t.max,e.origin),e.scale=G(n)/G(t),e.translate=I(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Is&&e.scale<=Ls||isNaN(e.scale))&&(e.scale=1),(e.translate>=Rs&&e.translate<=zs||isNaN(e.translate))&&(e.translate=0)}function Hs(e,t,n,r){Vs(e.x,t.x,n.x,r?.originX),Vs(e.y,t.y,n.y,r?.originY)}function Us(e,t,n,r=0){e.min=(r?I(n.min,n.max,r):n.min)+t.min,e.max=e.min+G(t)}function Ws(e,t,n,r){Us(e.x,t.x,n.x,r?.x),Us(e.y,t.y,n.y,r?.y)}function Gs(e,t,n,r=0){let i=r?I(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+G(t)}function Ks(e,t,n,r){Gs(e.x,t.x,n.x,r?.x),Gs(e.y,t.y,n.y,r?.y)}function qs(e,t,n,r,i){return e-=t,e=He(e,1/n,r),i!==void 0&&(e=He(e,1/i,r)),e}function Js(e,t=0,n=1,r=.5,i,a=e,o=e){if(tn.test(t)&&(t=parseFloat(t),t=I(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=I(a.min,a.max,r);e===a&&(s-=t),e.min=qs(e.min,t,n,s,i),e.max=qs(e.max,t,n,s,i)}function Ys(e,t,[n,r,i],a,o){Js(e,t[n],t[r],t[i],t.scale,a,o)}var Xs=[`x`,`scaleX`,`originX`],Zs=[`y`,`scaleY`,`originY`];function Qs(e,t,n,r){Ys(e.x,t,Xs,n?.x,r?.x),Ys(e.y,t,Zs,n?.y,r?.y)}var $s=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ec=$s(`applewebkit/`)&&!$s(`chrome/`)?Math.round:gn;function tc(e){e.min=ec(e.min),e.max=ec(e.max)}function nc(e){tc(e.x),tc(e.y)}function rc(e){return e.translate===0&&e.scale===1}function ic(e){return rc(e.x)&&rc(e.y)}function ac(e,t){return e.min===t.min&&e.max===t.max}function oc(e,t){return ac(e.x,t.x)&&ac(e.y,t.y)}function sc(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function cc(e,t){return sc(e.x,t.x)&&sc(e.y,t.y)}function lc(e){return G(e.x)/G(e.y)}function uc(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var dc=class{constructor(){this.members=[]}add(e){pn(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;r&&r.isConnected!==!1||n.snapshot||(zn(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(zn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}};function fc(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var pc={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(Cn.test(e))e=parseFloat(e);else return e}return`${fc(e,t.target.x)}% ${fc(e,t.target.y)}%`}},mc={borderRadius:Object.assign({},pc,{applyTo:vs.slice()}),borderTopLeftRadius:pc,borderTopRightRadius:pc,borderBottomLeftRadius:pc,borderBottomRightRadius:pc,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=ln.parse(e);if(i.length>5)return r;let a=ln.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=I(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}}};function hc(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;(i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `);let s=``;if(n){let{transformPerspective:e}=n;e&&(r=`perspective(${e}px) ${r}`);for(let e=0;e<_e.length;e++){let t=_e[e],r=n[t];r&&(s+=`${t}(${r}deg) `),!e&&n.pathRotation&&(s+=`rotate(${n.pathRotation}deg) `)}}if(s){(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),r+=s;let n=e.x.scale*t.x,i=e.y.scale*t.y;(n!==1||i!==1)&&(r+=`scale(${n}, ${i})`)}else e.x.scale!==1||e.y.scale!==1?r+=`scale(${e.x.scale}, ${e.y.scale})`:r||t.x===1&&t.y===1||(r=`scale(1, 1)`);return r||`none`}function gc(e){return[e(`x`),e(`y`)]}var _c=(e,t)=>e.depth-t.depth,vc=class{constructor(){this.children=[],this.isDirty=!1}add(e){pn(this.children,e),this.isDirty=!0}remove(e){zn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(_c),this.isDirty=!1,this.children.forEach(e)}},yc={hasAnimatedSinceResize:!0,hasEverUpdated:!1},bc=[`z`,`skew`,`skewZ`],xc=1e3,Sc=0;function Cc(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}var wc=e=>e.instance&&Tn.get(e.instance)?.demote()&&e.resetSkewAndRotation();function Tc(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=fs(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,U,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Tc(r)}function Ec(e){if(e)return e.options.allowProjection===!1?Ec(e.parent):e.projection}function Dc({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return Object.assign(Qn,{...mc,...Qn}),class{static create(e,t,n){let{layoutId:r,layout:i,drag:a,dragConstraints:o,layoutScroll:s,layoutRoot:c,layoutAnchor:l,layoutCrossfade:u}=t,d=e.projection=new this(e.latestValues,t[`data-framer-portal-id`]?void 0:Ec(e.parent));d.setOptions({layoutId:r,layout:i,alwaysMeasureLayout:!!a||o&&xs(o),visualElement:e,animationType:typeof i==`string`?i:`both`,initialPromotionConfig:n,crossfade:u,layoutScroll:s,layoutRoot:c,layoutAnchor:l});let f=d.getStack()?.lead;f&&!d.root.isUpdateBlocked()&&(f.willUpdate(),f.scheduleCheckAfterUnmount())}constructor(e={},n=t?.()){this.id=Sc++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Ac),this.nodes.forEach(Vc),this.nodes.forEach(Hc),this.nodes.forEach(jc),ys.countProjection?.()},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new vc)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new wn),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){this.eventHandlers.get(e)?.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=oe(t)&&!Ss(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent?.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;U.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n?.(),n=bs(i,250),yc.hasAnimatedSinceResize&&(yc.hasAnimatedSinceResize=!1,this.nodes.forEach(Bc)))})}n&&this.root.registerSharedNode(n,this),this.addLayoutListener()}addLayoutListener(){let{layoutId:e,layout:t,visualElement:n,animate:r}=this.options;this.instance&&!this.hasLayoutListener&&r!==!1&&n&&(e||t)&&(this.hasLayoutListener=!0,this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:r,layout:i})=>{if(this.isAnimationBlocked){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||n.getDefaultTransition()||Yc,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=n.getProps(),c=!this.targetLayout||!cc(this.targetLayout,i),l=!t&&r;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...se(a,`layout`),onPlay:o,onComplete:s};(n.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||Bc(this),this.isLead()&&this.options.onExitComplete?.();this.targetLayout=i}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),this.getStack()?.remove(this),this.parent?.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,hn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes?.forEach(Uc),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete?.();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Tc(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;wc(this),this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,wc(t),(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1),t.isAnimationBlocked&&(t.dragSnapshot||=t.measure(),this.dragAncestor=t)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(Pc),this.nodes.forEach(Nc);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Fc);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Lc),this.nodes.forEach(Rc),this.nodes.forEach(zc),this.nodes.forEach(Oc),this.nodes.forEach(kc)):this.nodes.forEach(Fc),this.clearAllSnapshots();let e=Rn.now();Sn.delta=Bn(0,1e3/60,e-Sn.timestamp),Sn.timestamp=e,Sn.isProcessing=!0,sn.update.process(Sn),sn.preRender.process(Sn),sn.render.process(Sn),Sn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Pn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Mc),this.sharedNodes.forEach((e,t)=>e.members.length?e.removeLeadSnapshot():this.sharedNodes.delete(t))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,U.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){U.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!G(this.snapshot.measuredBox.x)&&!G(this.snapshot.measuredBox.y)&&(this.snapshot=void 0),this.snapshot)){let{visualElement:e}=this.options,t=this.currentAnimation?.state===`running`,n=t&&this.animationEdges;t&&this.relativeTarget&&(this.snapshot.relativeVelocity=this.relativeVelocity?.slice()||[]);let r=n&&this.motionValue?.getVelocity()||0,i=[0,1,2,3,4,5].map(t=>(t<4?n&&(this.edgeValues?this.edgeVelocity(t):-n[t]*r/1e3):e?.getValue(t<5?`x`:`y`)?.getVelocity())||0);i.some(Boolean)&&(this.snapshot.velocity=i)}}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected||=W(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t?.notify(`LayoutMeasure`,this.layout.layoutBox,e?.layoutBox)}updateScroll(e=`measure`){let{scroll:t,instance:i}=this,{animationId:a}=this.root;if(this.options.layoutScroll&&i&&!(t&&t.animationId===a&&t.phase===e)){let o=r(i);this.scroll={animationId:a,phase:e,isRoot:o,offset:n(i),wasRoot:t?t.isRoot:o}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;e&&wc(this);let t=this.projectionDelta&&!ic(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||rt(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),nc(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return W();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Qc))){let{scroll:e}=this.root;e&&(Ee(t.x,e.offset.x),Ee(t.y,e.offset.y))}return t}removeElementScroll(e){let t=W();if(Ps(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&Ps(t,e),Ee(t.x,i.offset.x),Ee(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n,r,i=0){let a=n||W();Ps(a,e);for(let e=i;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(Ee(a.x,-n.scroll.offset.x),Ee(a.y,-n.scroll.offset.y)),rt(n.latestValues)&&ke(a,n.latestValues,n.layout?.layoutBox)}return!r&&rt(this.latestValues)&&ke(a,this.latestValues,this.layout?.layoutBox),a}removeTransform(e){let t=W();Ps(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!rt(n.latestValues))continue;let r;n.instance&&(ve(n.latestValues)&&n.updateSnapshot(),r=W(),Ps(r,n.measurePageBox())),Qs(t,n.latestValues,n.snapshot?.layoutBox,r)}return rt(this.latestValues)&&Qs(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade},this.addLayoutListener()}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Sn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=Sn.timestamp;let a=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=W(),this.targetWithTransforms=W()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ws(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target,!0):Ps(this.target,this.layout.layoutBox),we(this.target,this.targetDelta)):Ps(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&(!a.resumingFrom==!this.resumingFrom||a.options.layoutRoot&&!a.resumingFrom)&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),ys.countProjection?.(1))}getClosestProjectingParent(){if(!(!this.parent||ve(this.parent.latestValues)||Qe(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=W(),this.relativeTargetOrigin=W(),Ks(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),Ps(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Sn.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent?.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;Ps(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;We(this.layoutCorrected,this.treeScale,this.path,t&&(e.relativeTarget&&!e.relativeParent.resumingFrom?e.relativeParent:!0)),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=W());let{target:s}=e;s?(!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Fs(this.prevProjectionDelta.x,this.projectionDelta.x),Fs(this.prevProjectionDelta.y,this.projectionDelta.y)),Hs(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&uc(this.projectionDelta.x,this.prevProjectionDelta.x)&&uc(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),ys.countProjection?.(2)):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){this.options.visualElement?.scheduleRender(),e&&this.getStack()?.scheduleRender(),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=no(),this.projectionDelta=no(),this.projectionDeltaWithTransform=no()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=no();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=W(),c=r?.source!==this.layout?.source,l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some(Jc));this.animationProgress=0;let f,p=n?.interpolateProjection(e),m=this.layout?.layoutBox,h=m&&[m.x.min,m.x.max,m.y.min,m.y.max].map((t,n)=>{let{translate:r,scale:i,originPoint:a}=e[n<2?`x`:`y`];return(t-a)*(i-1)+r});h?.every(isFinite)||(h=void 0),this.animationEdges=h,this.edgeValues=this.startVelocity=this.impulse=this.relativeVelocity=this.relativeStart=void 0;let g=r?.velocity,_=r?.relativeVelocity||g;if(_?.slice(0,4).some(Boolean)&&this.getClosestProjectingParent()&&(this.relativeStart=_),g&&h){let t=g.slice(0,4).map((e,t)=>e+(c?g[4+(t>>1)]:0));t.some(Boolean)&&(this.startVelocity=p?js(e.x.translate,e.y.translate,{x:(t[0]+t[1])/2,y:(t[2]+t[3])/2}):t)}this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n),l=this.edgeValues;for(let t=0;t<2;t++){let r=t?`y`:`x`;l?Wc(o[r],e[r],this.layout.layoutBox[r],l[t*2],l[t*2+1]):Gc(o[r],e[r],n)}if(r&&(o.x.translate=r.x,o.y.translate=r.y),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){Ks(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0);let e=this.relativeTargetOrigin,t=s;if(qc(this.relativeTarget,e,t,n),this.isSpringLayout){let e=this.relativeTarget,t=this.impulse||0,n=this.relativeStart,r=Rn.now(),i=(r-this.relativeTime)/1e3;this.relativeTime=r;let a=this.relativeVelocity||=[0,0,0,0];for(let r=0;r<4;r++){let o=r<2?`x`:`y`,s=r&1?`max`:`min`;n&&(e[o][s]+=n[r]*t),f&&i>0&&(a[r]=(e[o][s]-f[o][s])/i)}}f&&oc(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=W(),Ps(f,this.relativeTarget)}c&&(this.animationValues=a,Es(a,i,this.latestValues,n,d,u)),r?.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`);let t=this.isSpringLayout=e.type===`spring`;this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.resumingFrom&&(this.resumingFrom.edgeValues=void 0),this.pendingAnimation&&=(hn(this.pendingAnimation),void 0),this.pendingAnimation=U.update(()=>{yc.hasAnimatedSinceResize=!0,this.motionValue||=kn(0),this.motionValue.jump(0,!1);let n=this.startVelocity;this.startVelocity=void 0;let r=e,i=0;if(t){if(e.mass===`auto`){let t=this.layout?.layoutBox;r=Ms(e,t&&Math.sqrt(G(t.x)*G(t.y)))}let t=this.relativeStart;if((n||t)&&!e.repeat){if(typeof n==`number`)i=n;else{let e=n&&this.animationEdges;r={...r,type:r=>{let i=[r.velocity,...n||[]].map((t,n)=>ot({...r,keyframes:n?[e[n-1],0]:r.keyframes,velocity:t})),a=i.length;t&&i.push(ot({...r,keyframes:[0,0],velocity:1e3,restDelta:.5,restSpeed:5}));let o=0,s=[],c={calculatedDuration:null,next:t=>{o=t;let n=i[0].next(t),r=n.done;for(let e=1;e<i.length;e++){let{value:n,done:o}=i[e].next(t);e<a?s[e-1]=n:this.impulse=n/1e3,r&&=o}return e&&(this.edgeValues=s),n.done=r,n}};return c.calculatedDuration=S(c),c.next(0),this.edgeVelocity=e=>i[e+1].velocity(o),c}}}}}let a=be(this.motionValue,[0,1e3],{...r,velocity:i,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}});this.currentAnimation=a,nn(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=this.edgeValues=this.edgeVelocity=this.impulse=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.edgeValues=this.impulse=void 0,this.mixTargetDelta?.(xc),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,layout:n,latestValues:r}=e,{target:i}=e;if(t&&i&&n){if(this!==e&&this.layout&&n&&Zc(this.options.animationType,this.layout.layoutBox,n.layoutBox)){let{layoutBox:e}=this.layout,t=i;i=this.target||W(),Xc(i.x,t.x,e.x),Xc(i.y,t.y,e.y)}Ps(t,i),ke(t,r),Hs(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new dc),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?.transition,preserveFollowOpacity:n?.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){this.getStack()?.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){return this.getStack()?.relegate(this)||!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let{latestValues:t}=e;if(!at(t))return;let n={};for(let t=0;t<bc.length;t++)Cc(bc[t],e,n,this.animationValues);for(let t=0;t<_e.length;t++)Cc(_e[t],e,n,this.animationValues);e.render();for(let t in n)e.setStaticValue(t,n[t]),this.animationValues&&(this.animationValues[t]=n[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;let n=this.getLead();if(!this.isVisible&&n!==this){e.visibility=`hidden`;return}let r=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=qr(t?.pointerEvents)||``,e.transform=r?r(this.latestValues,``):`none`;return}if(!this.projectionDelta||!this.layout||!n.target){(this.options.layoutId||this.needsShow)&&(this.needsShow=!1,e.visibility=``,e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=qr(t?.pointerEvents)||``),this.hasProjected&&!rt(this.latestValues)&&(e.transform=r?r({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=n.animationValues||n.latestValues;this.applyTransformsToTarget();let a=hc(this.projectionDeltaWithTransform,this.treeScale,i);r&&(a=r(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=n.animationValues?n===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:n===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in Qn){if(i[t]===void 0)continue;let{correct:r,applyTo:o,isCSSVariable:s}=Qn[t],c=a===`none`?i[t]:r(i[t],n);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=n===this?qr(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=this.dragSnapshot=this.dragAncestor=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Nc),this.root.sharedNodes.clear()}}}function Oc(e){e.updateLayout(),Ic(e)}function kc(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source,o=(r,a)=>{if(i===`size`)gc(e=>{let t=G(r[e]);r[e].min=a[e].min,r[e].max=r[e].min+t});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;Ns(r[e],a[e])}else Zc(i,t.layoutBox,n)&&gc(t=>{let n=G(a[t]);r[t].max=r[t].min+n,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[t].max=e.relativeTarget[t].min+n)})},s=a?t.measuredBox:t.layoutBox;o(s,n);let c=no();Hs(c,n,t.layoutBox);let l=no();Hs(l,a?e.applyTransform(r,!0):n,s);let u=!ic(c),d=!1,f=e.getClosestProjectingParent();if((!a||f?.options.layoutRoot&&e.resumeFrom?.path.includes(f))&&f&&!f.resumeFrom){let{snapshot:r,layout:i}=f;if(r&&i){let s=e.options.layoutAnchor||void 0,c=W();Ks(c,a?e.resumeFrom.applyTransform(t.layoutBox,!0,void 0,!0,f.depth+1):t.layoutBox,r.layoutBox,s);let l=W();Ks(l,n,i.layoutBox,s),a&&o(c,l),cc(c,l)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=c,e.relativeParent=f)}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:l,layoutDelta:c,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else e.isLead()&&e.options.onExitComplete?.();e.options.transition=void 0}function Ac(e){ys.countProjection?.(0),e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function jc(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Mc(e){e.clearSnapshot()}function Nc(e){e.clearMeasurements()}function Pc(e){e.isLayoutDirty=!0,e.updateLayout()}function Fc(e){e.isLayoutDirty=!1}function Ic(e){let{snapshot:t,dragAncestor:n}=e,r=n?.isAnimationBlocked&&n.layout;if(!t||!r||e.resumeFrom||e.isAnimationBlocked)return;let i=n.dragSnapshot;gc(e=>Ee(t.layoutBox[e],r.layoutBox[e].min-i.layoutBox[e].min))}function Lc(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.dragSnapshot||e.layout,e.isLayoutDirty=!0)}function Rc(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function zc(e){let{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Bc(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Vc(e){e.resolveTargetDelta()}function Hc(e){e.calcProjection()}function Uc(e){e.resetSkewAndRotation()}function Wc(e,t,n,r,i){let a=n.max-n.min,o=a?Math.max(0,(a+i-r)/a):1,s=e.originPoint=t.originPoint;e.origin=t.origin,e.scale=o,e.translate=n.min+r-(s+(n.min-s)*o)}function Gc(e,t,n){e.translate=I(t.translate,0,n),e.scale=I(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Kc(e,t,n,r){e.min=I(t.min,n.min,r),e.max=I(t.max,n.max,r)}function qc(e,t,n,r){Kc(e.x,t.x,n.x,r),Kc(e.y,t.y,n.y,r)}function Jc(e){return e.animationValues?.opacityExit!==void 0}var Yc={duration:.45,ease:[.4,0,.1,1]};function Xc(e,t,n){e.max=G(n)+(e.min=t.min)}function Zc(e,t,n){return e===`position`||e===`preserve-aspect`&&!Bs(lc(t),lc(n),.2)}function Qc(e){return e!==e.root&&e.scroll?.wasRoot}function $c(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var el=Dc({attachResizeListener:(e,t)=>$c(e,`resize`,t),measureScroll:Be,checkIsScrollRoot:()=>!0}),tl=Dc({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!oo.current){let e=new el({});e.mount(window),e.setOptions({layoutScroll:!0}),oo.current=e}return oo.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),nl=class extends Vi{constructor(){super(...arguments),this.KeyframeResolver=x}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;xn(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function rl(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function il(e){return window.getComputedStyle(e)}var al=class extends nl{constructor(){super(...arguments),this.type=`html`,this.renderInstance=rl}mount(e){super.mount(e)}readValueFromInstance(e,t){if(un.has(t))return this.projection?.isProjecting?dn(t):fn(e,t);{let n=il(e),r=(Fn(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return xe(e,t)}build(e,t,n){Ln(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Pi(e,t,n)}},ol=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1;function sl(e){return{point:{x:e.pageX,y:e.pageY}}}var cl=e=>t=>ol(t)&&e(t,sl(t));function ll(e,t,n,r){return $c(e,t,cl(n),r)}var ul=new WeakMap,dl,fl=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:oe(r)&&`getBBox`in r?r.getBBox()[t]:r[n],pl=fl(`inline`,`width`,`offsetWidth`),ml=fl(`block`,`height`,`offsetHeight`);function hl({target:e,borderBoxSize:t}){ul.get(e)?.forEach(n=>{n(e,{get width(){return pl(e,t)},get height(){return ml(e,t)}})})}function gl(e){e.forEach(hl)}function _l(){typeof ResizeObserver<`u`&&(dl=new ResizeObserver(gl))}function vl(e,t){dl||_l();let n=F(e);return n.forEach(e=>{let n=ul.get(e);n||(n=new Set,ul.set(e,n)),n.add(t),dl?.observe(e)}),()=>{n.forEach(e=>{let n=ul.get(e);n?.delete(t),n?.size||dl?.unobserve(e)})}}var yl=new Set,bl;function xl(){bl=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};yl.forEach(t=>t(e))},window.addEventListener(`resize`,bl)}function Sl(e){return yl.add(e),bl||xl(),()=>{yl.delete(e),!yl.size&&typeof bl==`function`&&(window.removeEventListener(`resize`,bl),bl=void 0)}}function Cl(e,t){return O(typeof e==`function`?Sl(e):vl(e,t))}var wl=(e,t)=>Math.abs(e-t);function Tl(e,t){let n=wl(e.x,t.x),r=wl(e.y,t.y);return Math.sqrt(n**2+r**2)}var El=new Set([`auto`,`scroll`]),Dl=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o,immediate:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=kl(this.lastRawMoveEventInfo,this.transformPagePoint));let e=jl(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=Tl(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:Rn.now()});let{onStart:i,onMove:a}=this.handlers;t||(i?.(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a?.(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.handleScroll(window),this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=kl(t,this.transformPagePoint),this.hasPendingMove=!0,U.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i?.(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=jl(e.type===`pointercancel`?this.lastMoveEventInfo:kl(t,this.transformPagePoint),this.history);this.startEvent&&n?.(e,a),r?.(e,a)},!ol(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=s?0:a,this.contextWindow=r||window;let c=sl(e),l=kl(c,this.transformPagePoint),{point:u}=l;this.history=[{...u,timestamp:Rn.now()}];let{onSessionStart:d}=t;d&&d(e,jl(l,this.history));let f={passive:!0,capture:!0};this.removeListeners=fe(ll(this.contextWindow,`pointermove`,this.handlePointerMove,f),ll(this.contextWindow,`pointerup`,this.handlePointerUp,f),ll(this.contextWindow,`pointercancel`,this.handlePointerUp,f)),o&&this.startScrollTracking(o),s&&(this.handlePointerMove(e,c),this.updatePoint())}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(El.has(e.overflowX)||El.has(e.overflowY))&&this.scrollPositions.set(t,Ol(t)),t=t.parentElement}this.scrollPositions.set(window,Ol(window)),this.removeScrollListeners=fe($c(window,`scroll`,this.onElementScroll,{capture:!0}),$c(window,`scroll`,this.onWindowScroll,{}))}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=Ol(e),i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),U.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),hn(this.updatePoint)}},Ol=e=>e===window?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop};function kl(e,t){return t?{point:t(e.point)}:e}function Al(e,t){return{x:e.x-t.x,y:e.y-t.y}}function jl({point:e},t){return{point:e,delta:Al(e,Nl(t)),offset:Al(e,Ml(t)),velocity:Pl(t,.1)}}function Ml(e){return e[0]}function Nl(e){return e[e.length-1]}function Pl(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Nl(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>En(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>En(t)*2&&(r=e[1]);let a=An(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}var Fl=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Il(e){return Fl.has(e.tagName)||e.isContentEditable===!0}var Ll=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function Rl(e){return Ll.has(e.tagName)||e.isContentEditable===!0}var zl={x:!1,y:!1};function Bl(){return zl.x||zl.y}function Vl(e){return e===`x`||e===`y`?zl[e]?null:(zl[e]=!0,()=>{zl[e]=!1}):zl.x||zl.y?null:(zl.x=zl.y=!0,()=>{zl.x=zl.y=!1})}function Hl(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?I(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?I(n,e,r.max):Math.min(e,n)),e}function Ul(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Wl(e,{top:t,left:n,bottom:r,right:i}){return{x:Ul(e.x,n,i),y:Ul(e.y,t,r)}}function Gl(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Kl(e,t){return{x:Gl(e.x,t.x),y:Gl(e.y,t.y)}}function ql(e,t){let n=.5,r=G(e),i=G(t);return i>r?n=de(t.min,t.max-r,e.min):r>i&&(n=de(e.min,e.max-i,t.min)),Bn(0,1,n)}function Jl(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Yl=.35;function Xl(e=Yl){return e===!1?e=0:e===!0&&(e=Yl),{x:Zl(e,`left`,`right`),y:Zl(e,`top`,`bottom`)}}function Zl(e,t,n){return{min:Ql(e,t),max:Ql(e,n)}}function Ql(e,t){return typeof e==`number`?e:e[t]||0}function $l(e){let t=``;for(let n of e.path){n.scroll=void 0,n.updateScroll();let{scroll:r}=n;n!==e.root&&r&&(t+=r.offset.x+`,`+r.offset.y+`,`)}return t}var eu=new WeakMap,tu=class{constructor(e,t=()=>e.getProps()){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=W(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e,this.readProps=t}start(e,t={}){if(this.visualElement.presenceContext?.isPresent===!1)return;let n=e=>{t.snapToCursor&&this.snapToCursor(e),this.stopAnimation()},r=(e,t)=>{let{drag:n,dragConstraints:r,dragPropagation:i,onDragStart:a}=this.getProps();if(n&&!i&&(this.openDragLock?.(),this.openDragLock=Vl(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints();let{projection:o}=this.visualElement;o&&(o.isAnimationBlocked=!0,o.target=void 0),gc(e=>{let t=this.getAxisMotionValue(e).get()||0;if(bn(t)&&(t=M(t,this.visualElement.current)||0),Cn.test(t))t=parseFloat(t);else if(tn.test(t)){let n=o?.layout?.layoutBox[e];n&&(t=G(n)*(parseFloat(t)/100))}this.originPoint[e]=t}),this.point=typeof r==`function`&&r(this),a&&U.update(()=>a(e,t),!1,!0),ds(this.visualElement,`transform`),this.visualElement.animationState?.setActive(`whileDrag`,!0)},i=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){if(this.currentDirection=su(o),this.currentDirection===null)return;i&&i(this.currentDirection)}this.updateAxis(`x`,o),this.updateAxis(`y`,o),this.point&&this.point.move(),this.visualElement.render(),a&&U.update(()=>a(e,t),!1,!0)},a=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},o=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints||this.point)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:s}=this.getProps();this.panSession=new Dl(e,{onSessionStart:n,onStart:r,onMove:i,onSessionEnd:a,resumeAnimation:o},{...t,transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,contextWindow:this.visualElement.current?.ownerDocument.defaultView,element:this.visualElement.current})}stop(e,t,n){let r=e||this.latestPointerEvent,i=t||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!r)return;let{velocity:o}=i;this.startAnimation(o,n);let{onDragEnd:s}=this.getProps();s&&U.postRender(()=>s(r,i))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession(),!this.getProps().dragPropagation&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t?.setActive(`whileDrag`,!1)}endPanSession(){this.panSession?.end(),this.panSession=void 0}updateAxis(e,t){let{drag:n}=this.readProps();if(!t||!ou(e,n,this.currentDirection))return;let r=this.getAxisMotionValue(e),i=this.originPoint[e]+t[e],a=this.constraints&&this.constraints[e];a&&(i=Hl(i,a,this.elastic[e])),this.point?this.point[e]=i:r.set(i)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),{projection:n}=this.visualElement,r=n&&(n.layout||n.measure(!1)),i=this.constraints;nu(e)?this.constraints&&this.scroll===$l(n)||(this.constraints=this.resolveRefConstraints()):this.constraints=e&&r&&typeof e==`object`?Wl(r.layoutBox,e):!1,this.elastic=Xl(t),i!==this.constraints&&!nu(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&gc(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Jl(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!nu(e))return!1;let n=ru(e),{projection:r}=this.visualElement;if(!r||!r.layout)return!1;this.scroll=$l(r);let i=Ye(n,r.root,this.visualElement.getTransformPagePoint()),a=Kl(r.layout.layoutBox,r.removeElementScroll(i));if(t){let e=t(T(a));this.hasMutatedConstraints=!!e,e&&(a=P(e))}return a}startAnimation(e,t){let{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),c={bounceStiffness:i?200:1e6,bounceDamping:i?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...a},l=i=>r&&!(this.point&&o)&&ou(i,t||n,this.currentDirection)?e[i]:0;if(this.point&&!o)return this.point.release({x:l(`x`),y:l(`y`)},c).then(s);let u=this.constraints||{},d=gc(e=>{if(!ou(e,t||n,this.currentDirection))return;let r=u[e]||{};(o===!0||o===e)&&(r={min:0,max:0});let i={type:`inertia`,velocity:l(e),...c,...r};return this.startAxisValueAnimation(e,i)});return Promise.all(d).then(s)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return ds(this.visualElement,e),n.start(ie(e,n,0,t,this.visualElement,!1))}stopAnimation(){gc(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.readProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor({clientX:e,clientY:t}){let{drag:n}=this.getProps(),r={x:e,y:t},i=this.visualElement.getTransformPagePoint()?.(r)||r,a=this.visualElement.measureViewportBox();gc(e=>{if(!ou(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-I(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!nu(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};gc(e=>{let t=this.getAxisMotionValue(e).get();i[e]=ql({min:t,max:t},r[e])});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},``):`none`,n.root?.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),gc(t=>{let n=this.getAxisMotionValue(t);if(!ou(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(I(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;eu.set(this.visualElement,this);let e=this.visualElement.current,t=ll(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Rl(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps(),r=nu(t)&&ru(t);r&&(this.constraints=this.resolveRefConstraints(),n||=au(e,r,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i.layout||(i.root?.updateScroll(),i.updateLayout()),U.read(r);let o=$c(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(gc(t=>{if(!ou(t,this.getProps().drag,this.currentDirection))return;let n=this.getAxisMotionValue(t);this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate)}),this.visualElement.render())}));return()=>{o(),t(),a(),s(),n?.()}}getProps(){let e=this.readProps(),{dragElastic:t=Yl,dragMomentum:n=!0}=e;return{...e,dragElastic:t,dragMomentum:n}}};function nu(e){return!!e&&typeof e==`object`&&(`current`in e||`nodeType`in e)}var ru=e=>`current`in e?e.current:e;function iu(e){let t=!0;return()=>{t?t=!1:e()}}function au(e,t,n){let r=Cl(e,iu(n)),i=Cl(t,iu(n));return()=>{r(),i()}}function ou(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function su(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}function cu(e,t){let n=F(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},O(()=>r.abort())]}function lu(e){return!(e.pointerType===`touch`||Bl())}function uu(e,t,n={}){t=D(t);let[r,i,a]=cu(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{e.pointerType!==`touch`&&(n?r=!0:s(e))};e.addEventListener(`pointerenter`,n=>{if(!lu(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var du=(e,t)=>t?e===t||du(e,t.parentElement):!1,fu=new WeakSet;function pu(e){return t=>{t.key===`Enter`&&e(t)}}function mu(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var hu=(e,t)=>{let n=!1,r=pu(()=>{n||fu.has(e)||(n=!0,mu(e,`down`))}),i=pu(()=>{n&&(n=!1,mu(e,`up`))});e.addEventListener(`keydown`,r,t),e.addEventListener(`keyup`,i,t),e.addEventListener(`blur`,()=>{e.removeEventListener(`keydown`,r),e.removeEventListener(`keyup`,i),n&&mu(e,`cancel`)},{...t,once:!0})};function gu(e){return ol(e)&&!Bl()}var _u=new WeakSet,vu=100,yu=8,bu=(e,t,n)=>Math.hypot(e.clientX-t.clientX,e.clientY-t.clientY)>n,xu=e=>e.preventDefault();function Su(e,t,n={}){t=D(t);let[r,i,a]=cu(e,n),o=new WeakMap,s=e=>{let r=e.currentTarget;if(!gu(e)||_u.has(e))return;n.stopPropagation&&_u.add(e);let{count:a=1,countTimeout:s=.3,hold:c=0,repeat:l}=n,u=Rn.now(),d=En(c),f=En(s),p=o.get(r);p?.expire(bu(p.event,e,vu))?p=void 0:p&&(hn(p.expire),o.delete(r));let m=p?p.count+1:1,h=m>=a,g=h&&(c||l),_=!c,v=0,y;if(fu.add(r),p)y=p.handlers;else{let n=t(r,e);y=typeof n==`function`?{onComplete:n}:n||{}}h&&_&&y.onActive?.();let b=En(l),x=d||b,S=u+x,C=!0,w=()=>{if(i.signal.aborted)return hn(w);let e=Math.min(1-(S-Rn.now())/x,1);C&&e<1&&(e=0),C=!1,y.onHold?.(e),e<1||(_?y.onRepeat?.(++v):(_=!0,y.onActive?.()),l?(C=!0,S+=x=b):hn(w))},T={...i,capture:!0},E=(t,n)=>{if(ol(t)){if(window.removeEventListener(`pointerup`,D,T),window.removeEventListener(`pointercancel`,O,T),window.removeEventListener(`pointermove`,k,T),r.removeEventListener(`contextmenu`,xu),hn(w),fu.delete(r),Bl()&&(n=!1),n&&!h){let n=Rn.now(),a=e=>{let s=i.signal.aborted;if(s||e===!0||Rn.now()-n>f)return hn(a),o.delete(r),s||y.onComplete?.(t,{success:!1}),!0};o.set(r,{count:m,event:e,handlers:y,expire:a}),U.update(a,!0)}else y.onComplete?.(t,{success:n&&_})}},D=e=>{E(e,r===window||r===document||n.useGlobalTarget||du(r,e.target))},O=e=>{E(e,!1)},k=t=>{ol(t)&&((l||!_)&&bu(e,t,yu)||a>1&&Bl())&&O(t)};window.addEventListener(`pointerup`,D,T),window.addEventListener(`pointercancel`,O,T),(g||a>1)&&window.addEventListener(`pointermove`,k,T),g&&(U.update(w,!0),r.addEventListener(`contextmenu`,xu,{...i,passive:!1}))};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,s,i),Le(e)&&(e.addEventListener(`focus`,()=>hu(e,i),i),!Il(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function Cu(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],a=e[2+n],o=e[3+n],s=re(i,a,o);return t?s(r):s}var wu=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},Tu=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]);function Eu(e,t,n,r){rl(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(Tu.has(n)?n:et(n),t.attrs[n])}var Du=class extends nl{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=W}getBaseTargetFromProps(e,t){return un.has(t)?super.getBaseTargetFromProps(e,t)??dn(t):e[t]}getDefaultValue(e){return un.has(e)?this.latestValues[e]??dn(e):void 0}readValueFromInstance(e,t){if(un.has(t)){let e=cn(t);return e&&e.default||0}if(On.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=Tu.has(t)?t:et(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return la(e,t,n)}build(e,t,n){yn(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Eu(e,t,n,r)}mount(e){this.isSVGTag=Wa(e.tagName),super.mount(e)}};function Ou(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var ku=[...Gi].reverse(),Au=e=>e?.out===!0?e:e?.out;function ju(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>_s(e,t,n))),n=Nu(),r=!0,i=!1;function a(a){let{props:o,parent:s,manuallyAnimateOnMount:c}=e,{initial:l}=o,u=r||i,d=[],f=(t=l)=>typeof t!=`boolean`&&is(e,Array.isArray(t)?t[0]:t,e.presenceContext?.custom)||void 0,p=new Map,m={},h=1/0,g=e;do g=g.props.inherit!==!1&&g.parent;while(g&&!g.isControllingVariants);let _=u&&Au(f(l??(g&&g.props.initial))?.transition);if(ku.forEach((t,r)=>{let i=n[t],l=o[t],f=g&&g.props[t],v=l===void 0?yi(f)||f===!1?f:void 0:l,y=yi(v),b=t===a?i.isActive:null,x=y&&l===void 0&&!(u&&c);if(i.protectedKeys={...m},!i.isActive&&b===null||!v&&!i.prevProp||Ja(v)||typeof v==`boolean`)return;if(b===!1&&(h=r),t===`exit`&&i.isActive&&b!==!0){m={...m,...i.prevResolvedValues};return}let S=Mu(i.prevProp,v),C=S||y&&(b&&!x||r>h),w=!1,T=Array.isArray(v)?v:[v],E={},D;if(b!==!1)for(let n of T){let{transition:r,transitionEnd:i,...a}=is(e,n,as(e,t))||{};E={...E,...a,...i},D=Au(r)||D}let{prevResolvedValues:O}=i;for(let t in{...O,...E}){if(t in m)continue;let n=E[t],r=O[t],a=Array.isArray(n)&&Array.isArray(r)?!Ou(n,r)||S:n!==r,o;if(a&&n==null)p.has(t)||p.set(t,i.prevOut);else if(a||n!==void 0&&p.has(t)){C=!0,o=p.get(t)||_,p.delete(t)&&(w=!0),i.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)}else i.protectedKeys[t]=!0;i.out[t]=o}if(i.prevProp=v,i.prevResolvedValues=E,i.prevOut=D,i.isActive&&(m={...m,...E}),C&&(!(x&&S)||w))for(let n of T){let r={type:t};if(typeof n==`string`&&u&&c&&s?.enteringChildren){let t=is(s,n)?.transition?.delayChildren;r.delay=rs(s.enteringChildren,e,t)}d.push({animation:n,options:r})}}),p.size){let t={},n=f(),r=n?.transition;p.forEach((i,a)=>{i&&(r={...r||e.getDefaultTransition(),[a]:i});let s=e.getValue(a);s&&(s.liveStyle=!0);let c=n&&!Array.isArray(l)?n[a]:void 0,u=e.getBaseTargetFromProps(o,a);t[a]=(c===void 0?u!==void 0&&!xn(u)?u:e.initialValues[a]===void 0?e.baseTarget[a]:void 0:c)??null}),r&&(t.transition=r),d.push({animation:t})}let v=u&&e.blockInitialAnimation||r&&!c&&(o.initial===!1||o.initial===o.animate);return r=i=!1,!v&&d.length?t(d):Promise.resolve()}function o(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=a(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:a,setActive:o,setAnimateFunction:n=>{t=n(e)},getState:()=>n,reset:()=>{n=Nu(),i=!0}}}function Mu(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Ou(t,e):!1}function Nu(){let e={};for(let t of Gi)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return e}var Pu=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,Fu=e=>{let t=Pu();return e.match(t)?.[0]},K=Gt(),q=t(Nt(),1),Iu=e=>{let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return Math.abs(t)},Lu=(e,t)=>Math.floor(e/10**t%10),Ru=(e,t)=>!(Lu(e,t)%2),zu=(e,t,n)=>{let r=e%t;return n&&Lu(e,n)%2==0?-r:r},Bu=(e,t,n)=>t[e%n],Vu=e=>{e.slice(0,1)===`#`&&(e=e.slice(1));let t=parseInt(e.substr(0,2),16),n=parseInt(e.substr(2,2),16),r=parseInt(e.substr(4,2),16);return(t*299+n*587+r*114)/1e3>=128?`#000000`:`#FFFFFF`},Hu=4,J=80;function Uu(e,t){let n=Iu(e),r=t&&t.length;return Array.from({length:Hu},(e,i)=>({color:Bu(n+i,t,r),translateX:zu(n*(i+1),J/2-(i+17),1),translateY:zu(n*(i+1),J/2-(i+17),2),rotate:zu(n*(i+1),360),isSquare:Ru(n,2)}))}var Wu=({name:e,colors:t,title:n,square:r,size:i,...a})=>{let o=Uu(e,t),s=q.useId();return(0,K.jsxs)(`svg`,{viewBox:`0 0 80 80`,fill:`none`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,width:i,height:i,...a,children:[n&&(0,K.jsx)(`title`,{children:e}),(0,K.jsx)(`mask`,{id:s,maskUnits:`userSpaceOnUse`,x:0,y:0,width:J,height:J,children:(0,K.jsx)(`rect`,{width:J,height:J,rx:r?void 0:160,fill:`#FFFFFF`})}),(0,K.jsxs)(`g`,{mask:`url(#${s})`,children:[(0,K.jsx)(`rect`,{width:J,height:J,fill:o[0].color}),(0,K.jsx)(`rect`,{x:10,y:30,width:J,height:o[1].isSquare?J:J/8,fill:o[1].color,transform:`translate(`+o[1].translateX+` `+o[1].translateY+`) rotate(`+o[1].rotate+` 40 40)`}),(0,K.jsx)(`circle`,{cx:J/2,cy:J/2,fill:o[2].color,r:J/5,transform:`translate(`+o[2].translateX+` `+o[2].translateY+`)`}),(0,K.jsx)(`line`,{x1:0,y1:J/2,x2:J,y2:J/2,strokeWidth:2,stroke:o[3].color,transform:`translate(`+o[3].translateX+` `+o[3].translateY+`) rotate(`+o[3].rotate+` 40 40)`})]})]})},Gu=90,Ku=5;function qu(e,t){let n=Iu(e),r=t&&t.length,i=Array.from({length:Ku},(e,i)=>Bu(n+i,t,r)),a=[];return a[0]=i[0],a[1]=i[1],a[2]=i[1],a[3]=i[2],a[4]=i[2],a[5]=i[3],a[6]=i[3],a[7]=i[0],a[8]=i[4],a}var Ju=({name:e,colors:t,title:n,square:r,size:i,...a})=>{let o=qu(e,t),s=q.useId();return(0,K.jsxs)(`svg`,{viewBox:`0 0 90 90`,fill:`none`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,width:i,height:i,...a,children:[n&&(0,K.jsx)(`title`,{children:e}),(0,K.jsx)(`mask`,{id:s,maskUnits:`userSpaceOnUse`,x:0,y:0,width:Gu,height:Gu,children:(0,K.jsx)(`rect`,{width:Gu,height:Gu,rx:r?void 0:180,fill:`#FFFFFF`})}),(0,K.jsxs)(`g`,{mask:`url(#${s})`,children:[(0,K.jsx)(`path`,{d:`M0 0h90v45H0z`,fill:o[0]}),(0,K.jsx)(`path`,{d:`M0 45h90v45H0z`,fill:o[1]}),(0,K.jsx)(`path`,{d:`M83 45a38 38 0 00-76 0h76z`,fill:o[2]}),(0,K.jsx)(`path`,{d:`M83 45a38 38 0 01-76 0h76z`,fill:o[3]}),(0,K.jsx)(`path`,{d:`M77 45a32 32 0 10-64 0h64z`,fill:o[4]}),(0,K.jsx)(`path`,{d:`M77 45a32 32 0 11-64 0h64z`,fill:o[5]}),(0,K.jsx)(`path`,{d:`M71 45a26 26 0 00-52 0h52z`,fill:o[6]}),(0,K.jsx)(`path`,{d:`M71 45a26 26 0 01-52 0h52z`,fill:o[7]}),(0,K.jsx)(`circle`,{cx:45,cy:45,r:23,fill:o[8]})]})]})},Yu=64,Xu=80;function Zu(e,t){let n=Iu(e),r=t&&t.length;return Array.from({length:Yu},(e,i)=>Bu(n%(i+1),t,r))}var Qu=({name:e,colors:t,title:n,square:r,size:i,...a})=>{let o=Zu(e,t),s=q.useId();return(0,K.jsxs)(`svg`,{viewBox:`0 0 80 80`,fill:`none`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,width:i,height:i,...a,children:[n&&(0,K.jsx)(`title`,{children:e}),(0,K.jsx)(`mask`,{id:s,"mask-type":`alpha`,maskUnits:`userSpaceOnUse`,x:0,y:0,width:Xu,height:Xu,children:(0,K.jsx)(`rect`,{width:Xu,height:Xu,rx:r?void 0:160,fill:`#FFFFFF`})}),(0,K.jsxs)(`g`,{mask:`url(#${s})`,children:[(0,K.jsx)(`rect`,{width:10,height:10,fill:o[0]}),(0,K.jsx)(`rect`,{x:20,width:10,height:10,fill:o[1]}),(0,K.jsx)(`rect`,{x:40,width:10,height:10,fill:o[2]}),(0,K.jsx)(`rect`,{x:60,width:10,height:10,fill:o[3]}),(0,K.jsx)(`rect`,{x:10,width:10,height:10,fill:o[4]}),(0,K.jsx)(`rect`,{x:30,width:10,height:10,fill:o[5]}),(0,K.jsx)(`rect`,{x:50,width:10,height:10,fill:o[6]}),(0,K.jsx)(`rect`,{x:70,width:10,height:10,fill:o[7]}),(0,K.jsx)(`rect`,{y:10,width:10,height:10,fill:o[8]}),(0,K.jsx)(`rect`,{y:20,width:10,height:10,fill:o[9]}),(0,K.jsx)(`rect`,{y:30,width:10,height:10,fill:o[10]}),(0,K.jsx)(`rect`,{y:40,width:10,height:10,fill:o[11]}),(0,K.jsx)(`rect`,{y:50,width:10,height:10,fill:o[12]}),(0,K.jsx)(`rect`,{y:60,width:10,height:10,fill:o[13]}),(0,K.jsx)(`rect`,{y:70,width:10,height:10,fill:o[14]}),(0,K.jsx)(`rect`,{x:20,y:10,width:10,height:10,fill:o[15]}),(0,K.jsx)(`rect`,{x:20,y:20,width:10,height:10,fill:o[16]}),(0,K.jsx)(`rect`,{x:20,y:30,width:10,height:10,fill:o[17]}),(0,K.jsx)(`rect`,{x:20,y:40,width:10,height:10,fill:o[18]}),(0,K.jsx)(`rect`,{x:20,y:50,width:10,height:10,fill:o[19]}),(0,K.jsx)(`rect`,{x:20,y:60,width:10,height:10,fill:o[20]}),(0,K.jsx)(`rect`,{x:20,y:70,width:10,height:10,fill:o[21]}),(0,K.jsx)(`rect`,{x:40,y:10,width:10,height:10,fill:o[22]}),(0,K.jsx)(`rect`,{x:40,y:20,width:10,height:10,fill:o[23]}),(0,K.jsx)(`rect`,{x:40,y:30,width:10,height:10,fill:o[24]}),(0,K.jsx)(`rect`,{x:40,y:40,width:10,height:10,fill:o[25]}),(0,K.jsx)(`rect`,{x:40,y:50,width:10,height:10,fill:o[26]}),(0,K.jsx)(`rect`,{x:40,y:60,width:10,height:10,fill:o[27]}),(0,K.jsx)(`rect`,{x:40,y:70,width:10,height:10,fill:o[28]}),(0,K.jsx)(`rect`,{x:60,y:10,width:10,height:10,fill:o[29]}),(0,K.jsx)(`rect`,{x:60,y:20,width:10,height:10,fill:o[30]}),(0,K.jsx)(`rect`,{x:60,y:30,width:10,height:10,fill:o[31]}),(0,K.jsx)(`rect`,{x:60,y:40,width:10,height:10,fill:o[32]}),(0,K.jsx)(`rect`,{x:60,y:50,width:10,height:10,fill:o[33]}),(0,K.jsx)(`rect`,{x:60,y:60,width:10,height:10,fill:o[34]}),(0,K.jsx)(`rect`,{x:60,y:70,width:10,height:10,fill:o[35]}),(0,K.jsx)(`rect`,{x:10,y:10,width:10,height:10,fill:o[36]}),(0,K.jsx)(`rect`,{x:10,y:20,width:10,height:10,fill:o[37]}),(0,K.jsx)(`rect`,{x:10,y:30,width:10,height:10,fill:o[38]}),(0,K.jsx)(`rect`,{x:10,y:40,width:10,height:10,fill:o[39]}),(0,K.jsx)(`rect`,{x:10,y:50,width:10,height:10,fill:o[40]}),(0,K.jsx)(`rect`,{x:10,y:60,width:10,height:10,fill:o[41]}),(0,K.jsx)(`rect`,{x:10,y:70,width:10,height:10,fill:o[42]}),(0,K.jsx)(`rect`,{x:30,y:10,width:10,height:10,fill:o[43]}),(0,K.jsx)(`rect`,{x:30,y:20,width:10,height:10,fill:o[44]}),(0,K.jsx)(`rect`,{x:30,y:30,width:10,height:10,fill:o[45]}),(0,K.jsx)(`rect`,{x:30,y:40,width:10,height:10,fill:o[46]}),(0,K.jsx)(`rect`,{x:30,y:50,width:10,height:10,fill:o[47]}),(0,K.jsx)(`rect`,{x:30,y:60,width:10,height:10,fill:o[48]}),(0,K.jsx)(`rect`,{x:30,y:70,width:10,height:10,fill:o[49]}),(0,K.jsx)(`rect`,{x:50,y:10,width:10,height:10,fill:o[50]}),(0,K.jsx)(`rect`,{x:50,y:20,width:10,height:10,fill:o[51]}),(0,K.jsx)(`rect`,{x:50,y:30,width:10,height:10,fill:o[52]}),(0,K.jsx)(`rect`,{x:50,y:40,width:10,height:10,fill:o[53]}),(0,K.jsx)(`rect`,{x:50,y:50,width:10,height:10,fill:o[54]}),(0,K.jsx)(`rect`,{x:50,y:60,width:10,height:10,fill:o[55]}),(0,K.jsx)(`rect`,{x:50,y:70,width:10,height:10,fill:o[56]}),(0,K.jsx)(`rect`,{x:70,y:10,width:10,height:10,fill:o[57]}),(0,K.jsx)(`rect`,{x:70,y:20,width:10,height:10,fill:o[58]}),(0,K.jsx)(`rect`,{x:70,y:30,width:10,height:10,fill:o[59]}),(0,K.jsx)(`rect`,{x:70,y:40,width:10,height:10,fill:o[60]}),(0,K.jsx)(`rect`,{x:70,y:50,width:10,height:10,fill:o[61]}),(0,K.jsx)(`rect`,{x:70,y:60,width:10,height:10,fill:o[62]}),(0,K.jsx)(`rect`,{x:70,y:70,width:10,height:10,fill:o[63]})]})]})},$u=36;function ed(e,t){let n=Iu(e),r=t&&t.length,i=Bu(n,t,r),a=zu(n,10,1),o=a<5?a+$u/9:a,s=zu(n,10,2),c=s<5?s+$u/9:s;return{wrapperColor:i,faceColor:Vu(i),backgroundColor:Bu(n+13,t,r),wrapperTranslateX:o,wrapperTranslateY:c,wrapperRotate:zu(n,360),wrapperScale:1+zu(n,$u/12)/10,isMouthOpen:Ru(n,2),isCircle:Ru(n,1),eyeSpread:zu(n,5),mouthSpread:zu(n,3),faceRotate:zu(n,10,3),faceTranslateX:o>$u/6?o/2:zu(n,8,1),faceTranslateY:c>$u/6?c/2:zu(n,7,2)}}var td=({name:e,colors:t,title:n,square:r,size:i,...a})=>{let o=ed(e,t),s=q.useId();return(0,K.jsxs)(`svg`,{viewBox:`0 0 36 36`,fill:`none`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,width:i,height:i,...a,children:[n&&(0,K.jsx)(`title`,{children:e}),(0,K.jsx)(`mask`,{id:s,maskUnits:`userSpaceOnUse`,x:0,y:0,width:$u,height:$u,children:(0,K.jsx)(`rect`,{width:$u,height:$u,rx:r?void 0:72,fill:`#FFFFFF`})}),(0,K.jsxs)(`g`,{mask:`url(#${s})`,children:[(0,K.jsx)(`rect`,{width:$u,height:$u,fill:o.backgroundColor}),(0,K.jsx)(`rect`,{x:`0`,y:`0`,width:$u,height:$u,transform:`translate(`+o.wrapperTranslateX+` `+o.wrapperTranslateY+`) rotate(`+o.wrapperRotate+` 18 18) scale(`+o.wrapperScale+`)`,fill:o.wrapperColor,rx:o.isCircle?$u:$u/6}),(0,K.jsxs)(`g`,{transform:`translate(`+o.faceTranslateX+` `+o.faceTranslateY+`) rotate(`+o.faceRotate+` 18 18)`,children:[o.isMouthOpen?(0,K.jsx)(`path`,{d:`M15 `+(19+o.mouthSpread)+`c2 1 4 1 6 0`,stroke:o.faceColor,fill:`none`,strokeLinecap:`round`}):(0,K.jsx)(`path`,{d:`M13,`+(19+o.mouthSpread)+` a1,0.75 0 0,0 10,0`,fill:o.faceColor}),(0,K.jsx)(`rect`,{x:14-o.eyeSpread,y:14,width:1.5,height:2,rx:1,stroke:`none`,fill:o.faceColor}),(0,K.jsx)(`rect`,{x:20+o.eyeSpread,y:14,width:1.5,height:2,rx:1,stroke:`none`,fill:o.faceColor})]})]})]})},nd=4,rd=80;function id(e,t){let n=Iu(e),r=t&&t.length;return Array.from({length:nd},(e,i)=>Bu(n+i,t,r))}var ad=({name:e,colors:t,title:n,square:r,size:i,...a})=>{let o=id(e,t),s=e.replace(/\s/g,``),c=q.useId();return(0,K.jsxs)(`svg`,{viewBox:`0 0 80 80`,fill:`none`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,width:i,height:i,...a,children:[n&&(0,K.jsx)(`title`,{children:e}),(0,K.jsx)(`mask`,{id:c,maskUnits:`userSpaceOnUse`,x:0,y:0,width:rd,height:rd,children:(0,K.jsx)(`rect`,{width:rd,height:rd,rx:r?void 0:160,fill:`#FFFFFF`})}),(0,K.jsxs)(`g`,{mask:`url(#${c})`,children:[(0,K.jsx)(`path`,{fill:`url(#gradient_paint0_linear_`+s+`)`,d:`M0 0h80v40H0z`}),(0,K.jsx)(`path`,{fill:`url(#gradient_paint1_linear_`+s+`)`,d:`M0 40h80v40H0z`})]}),(0,K.jsxs)(`defs`,{children:[(0,K.jsxs)(`linearGradient`,{id:`gradient_paint0_linear_`+s,x1:rd/2,y1:0,x2:rd/2,y2:rd/2,gradientUnits:`userSpaceOnUse`,children:[(0,K.jsx)(`stop`,{stopColor:o[0]}),(0,K.jsx)(`stop`,{offset:1,stopColor:o[1]})]}),(0,K.jsxs)(`linearGradient`,{id:`gradient_paint1_linear_`+s,x1:rd/2,y1:rd/2,x2:rd/2,y2:rd,gradientUnits:`userSpaceOnUse`,children:[(0,K.jsx)(`stop`,{stopColor:o[2]}),(0,K.jsx)(`stop`,{offset:1,stopColor:o[3]})]})]})]})},od=3,sd=80;function cd(e,t){let n=Iu(e),r=t&&t.length;return Array.from({length:od},(e,i)=>({color:Bu(n+i,t,r),translateX:zu(n*(i+1),sd/10,1),translateY:zu(n*(i+1),sd/10,2),scale:1.2+zu(n*(i+1),sd/20)/10,rotate:zu(n*(i+1),360,1)}))}var ld=({name:e,colors:t,title:n,square:r,size:i,...a})=>{let o=cd(e,t),s=q.useId();return(0,K.jsxs)(`svg`,{viewBox:`0 0 80 80`,fill:`none`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,width:i,height:i,...a,children:[n&&(0,K.jsx)(`title`,{children:e}),(0,K.jsx)(`mask`,{id:s,maskUnits:`userSpaceOnUse`,x:0,y:0,width:sd,height:sd,children:(0,K.jsx)(`rect`,{width:sd,height:sd,rx:r?void 0:160,fill:`#FFFFFF`})}),(0,K.jsxs)(`g`,{mask:`url(#${s})`,children:[(0,K.jsx)(`rect`,{width:sd,height:sd,fill:o[0].color}),(0,K.jsx)(`path`,{filter:`url(#filter_${s})`,d:`M32.414 59.35L50.376 70.5H72.5v-71H33.728L26.5 13.381l19.057 27.08L32.414 59.35z`,fill:o[1].color,transform:`translate(`+o[1].translateX+` `+o[1].translateY+`) rotate(`+o[1].rotate+` 40 40) scale(`+o[2].scale+`)`}),(0,K.jsx)(`path`,{filter:`url(#filter_${s})`,style:{mixBlendMode:`overlay`},d:`M22.216 24L0 46.75l14.108 38.129L78 86l-3.081-59.276-22.378 4.005 12.972 20.186-23.35 27.395L22.215 24z`,fill:o[2].color,transform:`translate(`+o[2].translateX+` `+o[2].translateY+`) rotate(`+o[2].rotate+` 40 40) scale(`+o[2].scale+`)`})]}),(0,K.jsx)(`defs`,{children:(0,K.jsxs)(`filter`,{id:`filter_${s}`,filterUnits:`userSpaceOnUse`,colorInterpolationFilters:`sRGB`,children:[(0,K.jsx)(`feFlood`,{floodOpacity:0,result:`BackgroundImageFix`}),(0,K.jsx)(`feBlend`,{in:`SourceGraphic`,in2:`BackgroundImageFix`,result:`shape`}),(0,K.jsx)(`feGaussianBlur`,{stdDeviation:7,result:`effect1_foregroundBlur`})]})})]})},ud={pixel:Qu,bauhaus:Wu,ring:Ju,beam:td,sunset:ad,marble:ld,geometric:td,abstract:Wu},dd=({variant:e=`marble`,colors:t=[`#92A1C6`,`#146A7C`,`#F0AB3D`,`#C271B4`,`#C20D90`],name:n=`Clara Barton`,title:r=!1,size:i=`40px`,square:a=!1,...o})=>{let s=ud[e]||ld;return(0,K.jsx)(s,{colors:t,name:n,title:r,size:i,square:a,...o})},fd=Mt({block:`img`,elements:[]}),pd=e=>(0,q.memo)(t=>(0,q.createElement)(e,t)),md=({unoptimized:e,...t})=>{let n=(0,q.use)(Ie),r=n?.imgAs||`img`,i=(0,q.useMemo)(()=>pd(r),[r]);return(0,K.jsx)(i,{unoptimized:e===void 0?n?.imgUnoptimized:e,...t,className:H(fd(),t.className)})};md.displayName=`Img`;var hd=Mt({block:`fluent-emoji`,elements:[]}),gd={container:{kLWn49:`lbo5v014`,kVAEAm:`lb1n2onr6`,k9WMMc:`lb2b8uid`,$$css:!0}};function _d(e){return[...e].map(e=>e?.codePointAt(0)?.toString(16)).join(`-`)}function vd(e){let t=_d(e).split(`-`)[0];return t<`1f469`?`@lobehub/fluent-emoji-anim-1`:t>=`1f469`&&t<`1f620`?`@lobehub/fluent-emoji-anim-2`:t>=`1f620`&&t<`1f9a0`?`@lobehub/fluent-emoji-anim-3`:`@lobehub/fluent-emoji-anim-4`}var yd=(e,t)=>{let n=[`anim`,`3d`].includes(t)?`webp`:`svg`;switch(t){case`raw`:return null;case`anim`:return{path:`assets/${_d(e)}.${n}`,pkg:vd(e),version:`latest`};case`3d`:return{path:`assets/${_d(e)}.${n}`,pkg:`@lobehub/fluent-emoji-3d`,version:`latest`};case`flat`:return{path:`assets/${_d(e)}.${n}`,pkg:`@lobehub/fluent-emoji-flat`,version:`latest`};case`modern`:return{path:`assets/${_d(e)}.${n}`,pkg:`@lobehub/fluent-emoji-modern`,version:`latest`};case`mono`:return{path:`assets/${_d(e)}.${n}`,pkg:`@lobehub/fluent-emoji-mono`,version:`latest`}}},bd=({emoji:e,className:t,style:n,type:r=`3d`,size:i=40,unoptimized:a,ref:o,...s})=>{let[c,l]=(0,q.useState)(!1),u=Me(),d=(0,q.useMemo)(()=>yd(e,r),[r,e]);return r===`raw`||!d||c?(0,K.jsx)(mn,{flex:`none`,height:i,ref:o,role:`img`,width:i,...s,...V(gd.container,H(hd(),t),{fontSize:i*.9,...n}),children:e}):(0,K.jsx)(md,{alt:e,className:H(hd(),t),height:i,loading:`lazy`,ref:o,src:u(d),style:{flex:`none`,...n},unoptimized:a,width:i,onError:()=>l(!0),...s})};bd.displayName=`FluentEmoji`;var xd=e=>`oklch(from ${e} clamp(0, (l - 0.62) * -1000, 1) 0 h / 1)`,Sd=Mt({block:`avatar`,dataAttributes:[`shape`,`variant`,`shadow`],elements:[`loading`,`img`,`content`,`fallback`]}),Cd=Mt({block:`avatar-group`,elements:[`avatar`,`count`,`item`,`badge`]}),wd={circle:{kaIpWk:`lb16rqkct`,$$css:!0},clickable:{kkrTdU:`lb1ypdohk`,$$css:!0},defaultBackground:{kWkggS:`lb1yqcoyj`,$$css:!0},defaultColor:{kMwMTN:`lb6dwly7`,$$css:!0},defaultEmojiFont:{kGuDYH:`lbh7pmyk`,$$css:!0},defaultSize:{kGuDYH:`lb1pvqxga`,kZKoxP:`lbsdox4t`,kzqmXN:`lb1useyqa`,$$css:!0},defaultSquare:{kaIpWk:`lbur7f20`,$$css:!0},content:{kmVPX3:`lb1717udv`,kVQacm:`lbb3r6kr`,kGNEyG:`lb6s0dn4`,kMwMTN:`lb1heor9g`,k1xSpc:`lb78zum5`,kGuDYH:`lb1qlqyl8`,k63SB2:`lbjs9k72`,kjj79g:`lbl56j7k`,kLWn49:`lbo5v014`,kZKoxP:`lb5yr21d`,kzqmXN:`lbh8yej3`,$$css:!0},fallback:{kUk6DE:`lb1okw0bk`,k1xSpc:`lb1lliihq`,kZKoxP:`lb5yr21d`,kzqmXN:`lbh8yej3`,$$css:!0},img:{kUk6DE:`lb1okw0bk`,kVIFPx:`lbl1xv1r`,kZKoxP:`lb5yr21d`,kzqmXN:`lbh8yej3`,$$css:!0},loading:{kpwlN0:`lb10a8y8t`,kWkggS:`lb1a3x57l`,kMwMTN:`lbfungia`,kVAEAm:`lb10l6tqk`,$$css:!0},root:{kUk6DE:`lb1okw0bk`,kVQacm:`lbb3r6kr`,kGNEyG:`lb6s0dn4`,kWkggS:`lbjbqb8w`,k1xSpc:`lb78zum5`,kjj79g:`lbl56j7k`,kVAEAm:`lb1n2onr6`,kfSwDN:`lb87ps6o`,$$css:!0},shadow:{kGVxlE:`lbpjwdtl`,$$css:!0}},Td=e=>e?!!(typeof e==`string`&&[`/`,`http`,`data:`].some(t=>e.startsWith(t))||(0,q.isValidElement)(e)):!1,Ed=e=>!!(e&&e!==`transparent`&&e!==`rgba(0,0,0,0)`&&e!==null),Dd=(e,t)=>{if(!e)return``;let n=e.toUpperCase();return t?n.slice(0,2):n},Od=(e,t,n)=>n?t?e*.85:e:e*.85,kd=[`#383838`,`#7858f9`,`#f8f7bf`,`#ffdd1f`,`#f88c13`],Ad=(e,t,n)=>(t||n||typeof e==`string`&&e||void 0)?.trim().replaceAll(/[\s"'()#\\]+/g,`_`)||void 0,jd={borderless:E.variantBorderlessWithoutHover,filled:E.variantFilledWithoutHover,outlined:E.variantOutlinedWithoutHover},Md=(0,q.memo)(({alt:e,animation:t,avatar:n,background:r,bordered:i,borderedColor:a,className:o,classNames:s,crossOrigin:c,draggable:l=!1,emojiScaleWithBackground:u=!0,fallbackColors:d,fallbackVariant:f=`marble`,loading:p,ref:m,shadow:h,shape:g=`square`,size:_,sliceText:v=!0,style:y,styles:b,title:x,tooltipProps:S,unoptimized:C,variant:w=`borderless`,xstyle:T,contentXstyle:E,nativeTitle:D,...O})=>{let k=_??48,ee=typeof n==`string`,[A,te]=(0,q.useState)(!1),j=(0,q.useMemo)(()=>Td(n),[n]),ne=(0,q.useMemo)(()=>n&&ee&&!j?Fu(n):void 0,[n,ee,j]),re=j?x:typeof n==`string`?n:void 0,M=e||x||`avatar`,ie=Ed(r),ae=j&&ee&&!A,oe=j&&!ee&&!A,se=Ad(n,x,e),N=f!==`text`&&!!se&&!ne&&!ae&&!oe,ce=d?.length?d:kd,le=(0,q.useMemo)(()=>ne?(0,K.jsx)(bd,{emoji:ne,size:Od(k,ie,u),type:t?`anim`:`3d`,unoptimized:C}):Dd(re||x,v),[t,ne,ie,k,v,re,x,C,u]),P=_!==void 0,ue=!r&&!N&&!(j&&!A||ne);return(0,K.jsxs)(`div`,{...jt({shadow:h,shape:g,variant:w}),...O,ref:m,title:D,className:V([wd.root,jd[w],h&&wd.shadow,!P&&wd.defaultSize,!P&&!!ne&&wd.defaultEmojiFont,g===`circle`?wd.circle:!P&&wd.defaultSquare,ue&&wd.defaultBackground,!r&&wd.defaultColor,!!O?.onClick&&wd.clickable,T],H(Sd(),o,s?.root)).className,style:{...r&&{backgroundColor:r,color:xd(r)},...P&&{fontSize:k*(ne?.7:.5),height:k,width:k,...g!==`circle`&&{borderRadius:k<24?`33%`:Math.max(k/6,2)}},...i&&{boxShadow:`${ye.colorBgLayout} 0 0 0 2px, ${a||ye.colorTextTertiary} 0 0 0 4px`},...y,...b?.root},children:[p&&(0,K.jsx)(mn,{flex:`none`,height:`100%`,width:`100%`,...V(wd.loading,H(Sd(`loading`),s?.loading),b?.loading),children:(0,K.jsx)(vt,{spin:!0,icon:Ue})}),typeof n==`string`&&ae&&(0,K.jsx)(`img`,{alt:M,crossOrigin:c,draggable:l,height:k,loading:`lazy`,src:n,width:k,...V(wd.img,H(Sd(`img`),s?.img),b?.img),onError:()=>te(!0)}),N&&(0,K.jsx)(dd,{square:!0,"aria-label":M,colors:ce,name:se,size:`100%`,variant:f,...V(wd.fallback,H(Sd(`fallback`),s?.fallback),b?.fallback)}),!ae&&!N&&(0,K.jsx)(`span`,{...V([wd.content,E],H(Sd(`content`),s?.content),b?.content),children:oe?n:le})]})});Md.displayName=`Avatar`;var Nd=Md,Pd={avatar:{kVAM5u:`lbfbyuaw`,ksu8eU:`lb1y0btm7`,kMzoRj:`lbdh2fpr`,$$css:!0},root:{kVAEAm:`lb1n2onr6`,$$css:!0},count:{kMwMTN:`lb15g0kca`,kGuDYH:`lbsfzzmd`,$$css:!0},item:{kUk6DE:`lb1okw0bk`,k1xSpc:`lb3nfvp2`,kVAEAm:`lb1n2onr6`,$$css:!0},badge:{k1xSpc:`lb78zum5`,kt4wiu:`lbtijo5x`,kfzvcC:`lb47corl`,kVAEAm:`lb10l6tqk`,k3aq6I:`lbdu4413`,krVfgx:`lb1ey2m1c`,$$css:!0}},Fd=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.currentTarget.click())},Id=(0,q.memo)(({items:e,max:t,gap:n,variant:r=`borderless`,bordered:i,shadow:a,size:o,background:s,animation:c,draggable:l,fallbackColors:u,fallbackVariant:d,classNames:f,shape:p,styles:m,onClick:h,ref:g,zIndexReverse:_,className:v,...y})=>{let b=o??48,x=t?e.slice(0,t):e,S=e.slice(t,e.length),C=n??Math.floor(-b/4),w=S.map(e=>e.title??e.label??e.alt).filter(Boolean).join(`, `),T={animation:c,background:s,bordered:i,draggable:l,fallbackColors:u,fallbackVariant:d,shadow:a,shape:p,size:o,variant:r};return(0,K.jsxs)(on,{horizontal:!0,gap:n,ref:g,...V(Pd.root,H(Cd(),v)),...y,children:[x.map((t,n)=>{let{key:r,style:i,className:a,ringColor:o,label:s,pressed:c,disabled:l,badge:u,onClick:d,...p}=t,g=!l&&(!!h||!!d),v={marginLeft:n===0?0:C,zIndex:u?e.length+1:_?e.length-n:n},y=(0,K.jsx)(Md,{"aria-disabled":l||void 0,"aria-label":s,"aria-pressed":g?!!c:void 0,className:H(Cd(`avatar`),f?.avatar,a),nativeTitle:s,role:g?`button`:void 0,tabIndex:g?0:void 0,xstyle:Pd.avatar,style:{...!u&&v,...o&&{boxShadow:`0 0 0 2px ${o}`},...m?.avatar,...i},onKeyDown:g?Fd:void 0,onClick:g?d??(()=>h?.({item:t,key:r})):void 0,...T,...p},u?void 0:r);if(!u)return y;let b=V(Pd.item,Cd(`item`));return(0,K.jsxs)(`span`,{className:b.className,style:{...b.style,...v},children:[y,(0,K.jsx)(`span`,{...V(Pd.badge,Cd(`badge`)),children:u})]},r)}),t&&S.length>0&&(0,K.jsx)(Md,{...T,"aria-label":w||void 0,avatar:`+${S.length}`,background:ye.colorText,className:H(Cd(`count`),f?.count),contentXstyle:Pd.count,fallbackVariant:`text`,nativeTitle:w||void 0,sliceText:!1,xstyle:Pd.avatar,style:{marginLeft:C,zIndex:_?0:x.length,...m?.count}})]})});Id.displayName=`AvatarGroup`;var Ld=Nd;Ld.Group=Id;function Rd({children:e,features:t,strict:n=!1}){let[,r]=(0,q.useState)(!zd(t)),i=(0,q.useRef)(void 0);if(!zd(t)){let{renderer:e,...n}=t;i.current=e,Ia(n)}return(0,q.useEffect)(()=>{zd(t)&&t().then(({renderer:e,...t})=>{Ia(t),i.current=e,r(!0)})},[]),(0,K.jsx)(Ai.Provider,{value:{renderer:i.current,strict:n},children:e})}function zd(e){return typeof e==`function`}function Bd(e,t){if(typeof Proxy>`u`)return $i;let n=new Map,r=(n,r)=>$i(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,$i(a,void 0,e,t)),n.get(a))})}var Vd=Bd(),Hd=(e,t)=>t.isSVG??xa(e)?new Du(t):new al(t,{allowProjection:e!==q.Fragment}),Ud=class extends wu{constructor(e){super(e),e.animationState||=ju(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Ja(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){this.node.getProps().animate!==this.node.prevProps?.animate&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Wd=0,Gd={animation:{Feature:Ud},exit:{Feature:class extends wu{constructor(){super(...arguments),this.id=Wd++}update(){let{presenceContext:e,animationState:t}=this.node;if(!e||!t)return;let{isPresent:n,onExitComplete:r}=e;if(n===!this.exit)return;if(n){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=is(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,t.reset(),t.animateChanges()}else t.setActive(`exit`,!1);this.exit=void 0;return}let i=this.exit=t.setActive(`exit`,!0);r&&i.then(()=>{this.exit===i&&(this.exit=!0,r(this.id))})}mount(){let{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id,this.node)),this.update()}unmount(){}}}},Kd=class extends wu{constructor(e){super(e),this.removeGroupControls=gn,this.removeListeners=gn,this.controls=new tu(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||gn}update(){let{dragControls:e,drag:t}=this.node.getProps(),{dragControls:n,drag:r}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls))),r&&!t&&this.controls.stop(void 0,void 0,r)}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},qd=e=>(t,n)=>{e&&U.update(()=>e(t,n),!1,!0)},Jd=class extends wu{constructor(){super(...arguments),this.removePointerDownListener=gn}onPointerDown(e){this.session=new Dl(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:this.node.current?.ownerDocument.defaultView})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:qd(e),onStart:qd(t),onMove:qd(n),onEnd:(e,t)=>{delete this.session,r&&U.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=ll(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session?.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session?.end()}},Yd=!1,Xd=({layout:e,layoutDependency:t,layoutAnchor:n})=>({layout:e,layoutDependency:t,layoutAnchor:n,animationType:typeof e==`string`?e:`both`}),Zd=(e,t)=>{let{snapshot:n}=e,r=e.getStack();r?.remove(e);let i=r?.lead;if(r?.prevLead===e&&i.resumeFrom===e&&(i.resumeFrom=i.currentAnimation=e.resumingFrom=void 0),e.options.layoutId=t,!t)e.needsShow=!0;else return e.root.registerSharedNode(t,e),()=>{let{resumeFrom:t}=e;t?.isPresent!==!1&&e.getStack().members.includes(t)&&(t.hide(),e.resumeFrom=void 0,e.snapshot=n)}},Qd=class extends q.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group?.add(i),r&&n?.register?.(i),Yd&&i.root.didUpdate(),i.options.layoutId!==r&&Zd(i,r)?.(),i.addEventListener(`animationComplete`,()=>this.safeToRemove()),i.setOptions({...i.options,...Xd(this.props),onExitComplete:()=>this.safeToRemove()})),yc.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,layoutId:n,visualElement:r,drag:i,isPresent:a}=this.props,{projection:o}=r;return o&&(o.isPresent=a,this.takeOver=e.layoutId===n?void 0:(o.willUpdate(),Zd(o,n)),o.setOptions({...o.options,...Xd(this.props)}),Yd=!0,i||e.layoutDependency!==t||t===void 0||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||U.postRender(()=>{o.getStack()?.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(this.takeOver?.(),e.root.didUpdate(),Pn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Yd=!0,r&&(r.scheduleCheckAfterUnmount(),t.group?.remove(r),n?.deregister?.(r))}safeToRemove(){this.props.safeToRemove?.()}render(){return null}};function $d(e){let[t,n]=Ge(),r=(0,q.useContext)(_n);return(0,K.jsx)(Qd,{...e,layoutGroup:r,switchLayoutGroup:(0,q.useContext)(Ci),isPresent:t,safeToRemove:n})}var ef={pan:{Feature:Jd},drag:{Feature:Kd,ProjectionNode:tl,MeasureLayout:$d}};function tf(e,t,n,r,i){let{props:a}=e,o=`while`+n;!i&&e.animationState&&a[o]&&e.animationState.setActive(o,r===`Start`);let s=a[`on`+n+r];s&&U.postRender(()=>s(t,sl(t)))}var nf=class extends wu{mount(){let{current:e}=this.node;e&&(this.unmount=uu(e,(e,t)=>(tf(this.node,t,`Hover`,`Start`),e=>tf(this.node,e,`Hover`,`End`))))}unmount(){}},rf=class extends wu{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}e&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=fe($c(this.node.current,`focus`,()=>this.onFocus()),$c(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function af(e,t,n,r){e.current instanceof HTMLButtonElement&&e.current.disabled||tf(e,t,`Tap`,n,r)}var of=class extends wu{constructor(){super(...arguments),this.options={}}mount(){let{current:e}=this.node;e&&(this.update(),this.unmount=Su(e,(e,t)=>(af(this.node,t,`Start`),{onComplete:(e,{success:t})=>af(this.node,e,t?``:`Cancel`),onRepeat:()=>af(this.node,t,``,!0)}),this.options))}update(){let{options:e,node:t}=this,{globalTapTarget:n,propagate:r,tap:i}=t.props;for(let t in e)delete e[t];Object.assign(e,i,{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}},sf=new WeakMap,cf=new WeakMap,lf=e=>{let t=sf.get(e.target);t&&t(e)},uf=e=>{e.forEach(lf)};function df({root:e,...t}){let n=e||document;cf.has(n)||cf.set(n,{});let r=cf.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(uf,{root:e,...t})),r[i]}function ff(e,t,n){let r=df(t);return sf.set(e,n),r.observe(e),()=>{sf.delete(e),r.unobserve(e)}}var pf={some:0,all:1},mf=class extends wu{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:pf[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=ff(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(hf(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function hf({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var gf=Object.assign({},Object.assign({renderer:Hd},Gd,{inView:{Feature:mf},tap:{Feature:of},focus:{Feature:rf},hover:{Feature:nf}}),ef,{layout:{ProjectionNode:tl,MeasureLayout:$d}});function _f(e){let t=Dn(()=>kn(e)),{isStatic:n}=(0,q.useContext)(In);if(n){let[,n]=(0,q.useState)(e);(0,q.useEffect)(()=>t.on(`change`,n),[])}return t}function vf(e,t){let n=_f(t()),r=()=>n.set(t());return r(),Nn(()=>{let t=()=>U.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return r(),()=>{n.forEach(e=>e()),hn(r)}}),n}function yf(e){Mn.current=[],e();let t=vf(Mn.current,e);return Mn.current=void 0,t}function bf(e,t,n,r){if(typeof e==`function`)return yf(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return Sf(e,t,n,r);let i=typeof t==`function`?t:Cu(t,n,r),a=Array.isArray(e)?xf(e,i):xf([e],([e])=>i(e)),o=Array.isArray(e)?void 0:e.accelerate;if(o&&!o.isTransformed&&typeof t!=`function`&&Array.isArray(n)&&r?.clamp!==!1&&!r?.mixer){let e=r?.ease;a.accelerate={...o,times:[0,...t,1],keyframes:[n[0],...n,n[n.length-1]],isTransformed:!0,...e?{ease:Array.isArray(e)?[e[0],...e]:e}:{}}}return a}function xf(e,t){let n=Dn(()=>[]);return vf(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}function Sf(e,t,n,r){let i=Dn(()=>Object.keys(n)),a=Dn(()=>({}));for(let o of i)a[o]=bf(e,t,n[o],r);return a}function Cf(){!pa.current&&Ta();let[e]=(0,q.useState)(Yi.current);return e}var wf=(0,q.createContext)(null),Tf=(0,q.createContext)(null);function Ef(e,t,n,r,i,a=`ltr`){let o=e.findIndex(e=>e.value===t);if(o===-1)return e;if(i===`xy`){let{layout:t}=e[o],r={x:Of(t.x)+n.x,y:Of(t.y)+n.y},i=kf(e),s=i.find(t=>t.items.includes(e[o])),c=i.reduce((e,t)=>Af(r.y,t)<Af(r.y,e)?t:e);if(c!==s)return jf(e,o,r.x,c,a);let l=Mf(r,t),u=-1,d=l;return e.forEach((e,t)=>{if(t===o)return;let n=Mf(r,e.layout);n<d&&(u=t,d=n)}),u===-1?e:rn(e,o,o+Math.sign(u-o))}if(!r[i])return e;let s=r[i]>0?1:-1,c=e[o+s];if(!c)return e;let l=e[o].layout[i],u=c.layout[i],d=Of(u);return s===1&&l.max+n[i]>d||s===-1&&l.min+n[i]<d?rn(e,o,o+s):e}function Df(e,t,n,r,i){let a=n>1==!!(n%2&&i)?-1:1,o=n>3?(n-4)*(e.length-1):t+a;if(r===`xy`&&n<4&&!(n%2)&&t>-1){let n=kf(e).sort((e,t)=>e.min-t.min),r=n[n.findIndex(({items:n})=>n.includes(e[t]))+a],i=n=>Math.abs(Of(n.layout.x)-Of(e[t].layout.x));o=r?e.indexOf(r.items.reduce((e,t)=>i(t)<i(e)?t:e)):-1}return t>-1&&o!==t&&e[o]?o:-1}var Of=({min:e,max:t})=>I(e,t,.5);function kf(e){let t=[];return e.forEach(e=>{let{min:n,max:r}=e.layout.y,i=t[t.length-1];!i||n>=i.max||r<=i.min?t.push({items:[e],min:n,max:r}):(i.items.push(e),i.min=Math.min(i.min,n),i.max=Math.max(i.max,r))}),t}function Af(e,t){return e<t.min?t.min-e:e>t.max?e-t.max:0}function jf(e,t,n,r,i){let a=e.filter((e,n)=>n!==t),o=r.items.find(e=>{let t=Of(e.layout.x);return i===`ltr`?n<t:n>t}),s=o?a.indexOf(o):a.indexOf(r.items[r.items.length-1])+1,c=[...a];return c.splice(s,0,e[t]),c.every((t,n)=>t===e[n])?e:c}function Mf(e,t){let n=Math.max(t.x.min-e.x,0,e.x-t.x.max),r=Math.max(t.y.min-e.y,0,e.y-t.y.max);return n*n+r*r}var Nf=(e,t)=>e.max<=t.min||t.max<=e.min;function Pf(e){let t=!1,n=!1;for(let r=0;r<e.length;r++)for(let i=r+1;i<e.length;i++)if(t||=Nf(e[r].x,e[i].x),n||=Nf(e[r].y,e[i].y),t&&n)return`xy`;return t?`x`:`y`}var Ff=(e,t)=>n=>{e.current=n;let r=typeof t==`function`?t(n):t&&(t.current=n);if(typeof r==`function`)return()=>{e.current=null,r()}};function If({children:e,as:t=`ul`,axis:n,onReorder:r,values:i,onPointerDownCapture:a,onClickCapture:o,...s},c,l){let u=Dn(()=>l[t]),d=(0,q.useContext)(wf),f=(0,q.useRef)(new Map),p=(0,q.useRef)(new Map),[m,h]=(0,q.useState)(),[g,_]=(0,q.useState)(`y`),v=(0,q.useRef)(!1),y=(0,q.useRef)(!1),b=(0,q.useRef)(null),x=n||g,S=new Set(i);for(let e of[f.current,p.current])e.forEach((t,n)=>S.has(n)||e.delete(n));let C=S.has(m)?m:i[0],w=e=>p.current.get(e)?.current?.isConnected,T=e=>S.has(e)&&h(e),E=()=>{w(C)||T(i.find(w))};(0,q.useEffect)(E);let D=()=>i.flatMap(e=>f.current.get(e)||[]),O=()=>b.current?.ownerDocument.defaultView?.getComputedStyle(b.current).direction===`rtl`,k=(e,t)=>{let n=0,a=i.map(t=>f.current.has(t)?e[n++].value:t);a.some((e,t)=>e!==i[t])&&r(a,t)},ee={axis:x,proxy:l,groupRef:b,hasReordered:y,values:i,onReorder:r,getOrder:D,isTabStop:e=>e===C||!S.has(e),setActive:T,checkTabStop:E,elements:p.current,onKeyDown:(e,t,n,r)=>{let{key:a,currentTarget:o}=e;if(e.defaultPrevented||e.target!==o||e.altKey||e.ctrlKey||e.metaKey)return;let s=D(),c=[`ArrowUp`,`ArrowLeft`,`ArrowDown`,`ArrowRight`,`Home`,`End`].indexOf(a),l=c%2;if(a===` `)e.repeat||r(o,n?void 0:i);else if(c<0&&!(a===`Escape`&&n))return;else if(!d?.isMoving(o)){if(a===`Escape`&&n){if(r(o),!d?.restore(ee,t,o,n)){let e=n.flatMap(e=>s.filter(t=>t.value===e));k(s.map(t=>n.includes(t.value)?e.shift():t),t)}}else{let e=c>3||x===`xy`||x===(l?`x`:`y`),r=n?s:s.filter(({value:e})=>w(e)),i=r.findIndex(({value:e})=>e===t),a=e?Df(r,i,c,x,!!l&&O()):-1;if(a>-1)n?k(rn(s,i,a),t):p.current.get(r[a].value)?.current?.focus();else if(!(n&&c<4&&d?.key(ee,t,c,o,n))&&!e)return}}e.preventDefault()},registerItem:(e,t,r)=>{if(f.current.set(e,{value:e,layout:t,ref:r}),!n){let e=Pf(D().map(e=>e.layout));e!==g&&_(e)}},updateOrder:(e,t,n)=>{if(v.current)return;let r=D(),i=Ef(r,e,t,n,x,O()?`rtl`:`ltr`);r!==i&&(v.current=!0,y.current=!0,k(i,e))}};(0,q.useEffect)(()=>{v.current=!1},[i]),Nn(()=>d?.add(ee));let A={overflowAnchor:`none`,...s.style};return(0,K.jsx)(u,{...s,style:A,ref:Ff(b,c),onPointerDownCapture:e=>{y.current=!1,a?.(e)},onClickCapture:e=>{y.current&&e.detail&&(y.current=!1,e.stopPropagation(),e.preventDefault()),o?.(e)},ignoreStrict:!0,children:(0,K.jsx)(Tf.Provider,{value:ee,children:e})})}var Lf=e=>(0,q.forwardRef)((t,n)=>If(t,n,e)),Rf=50,zf=1.5,Bf=new Set([`auto`,`scroll`]),Vf={x:new Map,y:new Map};function Hf(){Vf.x.clear(),Vf.y.clear()}function Uf(e,t){let n=getComputedStyle(e),r=t===`x`?n.overflowX:n.overflowY;return e===document.body||e===document.documentElement||Bf.has(r)&&(t===`x`?e.scrollWidth>e.clientWidth:e.scrollHeight>e.clientHeight)}function Wf(e,t){let n=e?.parentElement;for(;n;){if(Uf(n,t))return n;n=n.parentElement}return null}function Gf(e){let t=Math.min(1,1-e/Rf);return zf*t*t*Sn.delta}function Kf(e,t,n){let r=t.getBoundingClientRect(),i=n===`x`?Math.max(0,r.left):Math.max(0,r.top),a=n===`x`?Math.min(window.innerWidth,r.right):Math.min(window.innerHeight,r.bottom),o=e-i,s=a-e;return o<Rf?{amount:-Gf(o),edge:`start`}:s<Rf?{amount:Gf(s),edge:`end`}:{amount:0,edge:null}}function qf(e,t,n,r){if(!e)return;let i=Wf(e,n);if(!i)return;let{amount:a,edge:o}=Kf(t-(n===`x`?window.scrollX:window.scrollY),i,n),s=Vf[n];if(o===null){s.delete(i);return}let c=s.get(i),l=i===document.body||i===document.documentElement;if(c?.edge!==o){if(!(o===`start`&&r<0||o===`end`&&r>0))return;c={edge:o,limit:n===`x`?i.scrollWidth-(l?window.innerWidth:i.clientWidth):i.scrollHeight-(l?window.innerHeight:i.clientHeight)},s.set(i,c)}a>0&&(n===`x`?l?window.scrollX:i.scrollLeft:l?window.scrollY:i.scrollTop)>=c.limit||(n===`x`?l?window.scrollBy({left:a}):i.scrollLeft+=a:l?window.scrollBy({top:a}):i.scrollTop+=a)}function Jf(e,t=0){return xn(e)?e:_f(t)}function Yf({children:e,style:t={},value:n,as:r=`li`,onDragStart:i,onDrag:a,onDragEnd:o,onKeyDown:s,onFocus:c,onBlur:l,layout:u=!0,...d},f){let p=(0,q.useContext)(Tf),m=(0,q.useContext)(wf),h=(0,q.useRef)(null),g=Dn(()=>p.proxy[r]),_=(0,q.useRef)(),v={x:Jf(t.x),y:Jf(t.y)},y=bf([v.x,v.y],([e,t])=>e||t?1:`unset`),{axis:b,registerItem:x,updateOrder:S,groupRef:C,hasReordered:w,isTabStop:T,setActive:E,checkTabStop:D,elements:O,onKeyDown:k}=p,ee=b===`xy`||m?!0:b;O.set(n,h),(0,q.useEffect)(()=>D);let A=(e,t)=>{_.current=t,t||m?.end(n),jn.get(e)?.animationState?.setActive(`whileDrag`,!!t)},te=(0,q.useRef)(!1);return Nn(()=>{m?.receive(p,n,h.current,A)&&(te.current=!0)},[]),(0,K.jsx)(g,{drag:ee,tabIndex:T(n)?0:-1,...d,dragSnapToOrigin:!0,style:{...t,x:v.x,y:v.y,zIndex:y},layout:u,onDragStart:(e,t)=>{te.current?te.current=!1:i?.(e,t)},onDrag:(e,t)=>{let{velocity:r,point:i}=t,o={x:v.x.get(),y:v.y.get()};m?.drag(p,n,h.current,e)||S(n,o,r);let s=m?[`x`,`y`]:[b===`xy`?Math.abs(r.x)>Math.abs(r.y)?`x`:`y`:b];for(let e of s)qf(m&&!b.includes(e)?m.column(p):C.current,i[e],e,r[e]);a&&a(e,t)},onDragEnd:(e,t)=>{w.current=!1,Hf(),m?.end(n),o&&o(e,t)},onKeyDown:e=>{s?.(e),k(e,n,_.current,A)},onFocus:e=>{c?.(e),E(n)},onBlur:e=>{l?.(e),_.current&&A(e.currentTarget)},onLayoutMeasure:e=>{x(n,e,h)},ref:Ff(h,f),ignoreStrict:!0,children:e})}var Xf=(0,q.forwardRef)(Yf),Zf=e=>{let{left:t,top:n,width:r,height:i}=e.getBoundingClientRect();return{x:t+r/2,y:n+i/2}},Qf=e=>{let{x:t,y:n}=Zf(e),{scrollX:r,scrollY:i}=e.ownerDocument.defaultView;return{x:t+r,y:n+i}};function $f(e,t,n,r){let{left:i,right:a,top:o,bottom:s}=t.getBoundingClientRect(),c=r?e.x>(i+a)/2:e.x<=(i+a)/2,l=e.y<=(o+s)/2;return n===`x`?c:n===`y`?l:e.y<o||e.y<s&&c}var ep=(e,t)=>{let n=e.groupRef.current,r=t.groupRef.current;return n.contains(r)||r.contains(n)};function tp(e){let t=new Set,n,r=(t,n,r)=>!ep(t,n)&&e.current.canMove?.(r,t.values,n.values)!==!1,i,a=(e,t,r,i,a,o)=>{let s=Zf(i),{values:c}=t;if(o===void 0){let e=t.getOrder().filter(e=>e.ref?.current?.isConnected),n=getComputedStyle(t.groupRef.current).direction===`rtl`,r=e.find(e=>$f(s,e.ref.current,t.axis,n)),i=e[e.length-1];o=r?c.indexOf(r.value):i?c.indexOf(i.value)+1:c.length}n={value:r,to:t.groupRef,element:i,centre:Qf(i),...a},t.hasReordered.current=!0,e.onReorder(e.values.filter(e=>e!==r),r),t.onReorder([...c.slice(0,o),r,...c.slice(o)],r)};return{add:e=>(t.add(e),()=>t.delete(e)),drag:(e,i,o,s)=>{if(!o?.isConnected)return!1;if(n?.controls?.isDragging)return n.value===i&&(n.centre=Qf(o),n.event=s),!0;let c=Zf(o),l;for(let e of o.ownerDocument.elementsFromPoint(c.x,c.y))if(!o.contains(e)){for(let n of t)n.groupRef.current===e&&(l=n);if(l)break}if(!l||!r(e,l,i))return!1;let u=jn.get(o);return a(e,l,i,o,{controls:u&&eu.get(u),event:s}),!0},key:(e,n,o,s,c)=>{let l=Zf(s),u=o%2?`x`:`y`,d=o>1?1:-1,f,p=1/0;for(let i of t){let t=i.groupRef.current;if(!t)continue;let{left:a,right:s,top:c,bottom:m,width:h,height:g}=t.getBoundingClientRect();if(!h&&!g||([m,s,c,a][o]-l[u])*d<=0)continue;let _=Math.max(a-l.x,0,l.x-s),v=Math.max(c-l.y,0,l.y-m);_*_+v*v<p&&r(e,i,n)&&(p=_*_+v*v,f=i)}return f?(i?.from!==c&&(i={group:e.groupRef,from:c}),a(e,f,n,s,{keys:!0,from:c}),!0):!1},restore:(e,n,r,o)=>{let s=i?.from===o&&[...t].find(e=>e.groupRef===i.group);if(!s||s.groupRef===e.groupRef)return!1;let c=o.slice(o.indexOf(n)+1),l=s.values.findIndex(e=>c.includes(e));return i=void 0,a(e,s,n,r,{keys:!0},l<0?s.values.length:l),!0},end:e=>{n?.value===e&&(n=void 0)},isMoving:e=>n?.element===e,receive:(e,t,r,i)=>{let a=jn.get(r),o=a&&eu.get(a);o?.isDragging&&a.animationState?.setActive(`whileDrag`,!0);let s=n;if(!s||s.value!==t||s.to!==e.groupRef)return!1;let{keys:c,from:l,controls:u}=s,d=!s.element.isConnected;if(c){n=void 0;let{activeElement:e,body:t}=r.ownerDocument;return d&&(!e||e===t)&&(r.focus(),i(r,l)),!1}return!o||!u?.isDragging?!1:(Pn.read(()=>{if(n!==s)return;n=void 0,jn.get(s.element)?.values.forEach((e,t)=>{let n=e.get();a.getValue(t,a.readValue(t,n))?.set(n)});let e=a.getTransformPagePoint()||(e=>e),t=e(s.centre),i=e(Qf(r));a.getValue(`x`).set(t.x-i.x),a.getValue(`y`).set(t.y-i.y),a.render(),d?u.cancel():u.stop(),o.start(s.event,{immediate:!0})}),d)},column:({groupRef:e})=>{let n=e.current,r=n=>[...t].some(t=>t.groupRef!==e&&n.contains(t.groupRef.current));for(;n?.parentElement?.parentElement&&!r(n.parentElement);)n=n.parentElement;return n}}}function np({children:e,...t}){let n=(0,q.useRef)(t);return Nn(()=>{n.current=t}),(0,K.jsx)(wf.Provider,{value:Dn(()=>tp(n)),children:e})}var rp=(e,t,n)=>{let[r,i]=(0,q.useState)(!1),a=typeof t==`object`&&t.tooltipWhenOverflow;return(0,q.useEffect)(()=>{if(!a)return;let n=()=>{let n=e.current;if(!n)return;let r=typeof t==`object`?t.rows:void 0;i(r&&r>1?n.scrollHeight>n.clientHeight:n.scrollWidth>n.clientWidth)};n();let r=new ResizeObserver(n);return e.current&&r.observe(e.current),()=>r.disconnect()},[a,t,n,e]),r},ip=Mt({block:`text`,dataAttributes:[`type`],elements:[]}),ap={code:{kMv6JI:`lb2xbw48`,$$css:!0},danger:{kMwMTN:`lb12ap7uz`,$$css:!0},delete:{kybGjl:`lbmqliwb`,$$css:!0},disabled:{kMwMTN:`lbv7q1j6`,kkrTdU:`lb1h6gzvc`,$$css:!0},ellipsis:{kVQacm:`lbb3r6kr`,kg5iWk:`lblyipyv`,khDVqt:`lbuxw1ft`,$$css:!0},ellipsisMulti:{kVQacm:`lbb3r6kr`,kgKLqz:`lb1ua5tub`,k1xSpc:`lb104kibb`,kg5iWk:`lblyipyv`,$$css:!0},h1:{kGuDYH:`lb1xiv2dn`,k63SB2:`lb117nqv4`,kLWn49:`lb132q4wb`,$$css:!0},h2:{kGuDYH:`lb2ziyne`,k63SB2:`lb117nqv4`,kLWn49:`lb132q4wb`,$$css:!0},h3:{kGuDYH:`lbowuowh`,k63SB2:`lb117nqv4`,kLWn49:`lb132q4wb`,$$css:!0},h4:{kGuDYH:`lbkf6u7v`,k63SB2:`lb117nqv4`,kLWn49:`lb132q4wb`,$$css:!0},h5:{kGuDYH:`lb1pzwcx8`,k63SB2:`lb117nqv4`,kLWn49:`lb132q4wb`,$$css:!0},info:{kMwMTN:`lbapv1it`,$$css:!0},italic:{kKX8nH:`lb1k4tb9n`,$$css:!0},mark:{kWkggS:`lb10l2l1g`,kMwMTN:`lbod0wng`,$$css:!0},p:{kqGvvJ:`lb10im51j`,$$css:!0},secondary:{kMwMTN:`lb19ppog9`,$$css:!0},shiny:{"--shiny-color":`lb1yqjya6`,"--shiny-duration":`lb13qpc1j`,k44tkh:`lbpzn028`,ko0y90:`lba4qsjk`,kKVMdj:`lbj1bqtc`,kyAemX:`lb1esw782`,kHypHr:`lb1ta4xzc`,kKwaWg:`lb1k0woq6`,kgSjnq:`lbakli9p`,kMwMTN:`lb1g83pbf`,kfSwDN:`lb87ps6o`,$$css:!0},strong:{k63SB2:`lb117nqv4`,$$css:!0},success:{kMwMTN:`lbs9y9h1`,$$css:!0},text:{kMwMTN:`lb66ogz0`,$$css:!0},underline:{kybGjl:`lb1bvjpef`,$$css:!0},warning:{kMwMTN:`lbgyvj36`,$$css:!0}};({className:`lb2xbw48`}).className,{className:`lb12ap7uz`}.className,{className:`lbmqliwb`}.className,{className:`lbv7q1j6 lb1h6gzvc`}.className,{className:`lbb3r6kr lblyipyv lbuxw1ft`}.className,{className:`lbb3r6kr lb1ua5tub lb104kibb lblyipyv`}.className,{className:`lb1xiv2dn lb117nqv4 lb132q4wb`}.className,{className:`lb2ziyne lb117nqv4 lb132q4wb`}.className,{className:`lbowuowh lb117nqv4 lb132q4wb`}.className,{className:`lbkf6u7v lb117nqv4 lb132q4wb`}.className,{className:`lb1pzwcx8 lb117nqv4 lb132q4wb`}.className,{className:`lbapv1it`}.className,{className:`lb1k4tb9n`}.className,{className:`lb10l2l1g lbod0wng`}.className,{className:`lb10im51j`}.className,{className:`lb19ppog9`}.className,{className:`lb117nqv4`}.className,{className:`lbs9y9h1`}.className,{className:`lb66ogz0`}.className,{className:`lb1bvjpef`}.className,{className:`lbgyvj36`}.className,H((e=>V(e).className)(ap.shiny),`lobe-text-shiny`);var op=(e={})=>[ap.text,e.as&&ap[e.as],e.code&&ap.code,e.delete&&ap.delete,e.disabled&&ap.disabled,e.ellipsis===`multi`&&ap.ellipsisMulti,e.ellipsis===!0&&ap.ellipsis,e.italic&&ap.italic,e.mark&&ap.mark,e.shiny&&ap.shiny,e.strong&&ap.strong,e.type&&ap[e.type],e.underline&&ap.underline],sp=(0,q.memo)(({align:e,as:t=`div`,children:n,className:r,classNames:i,code:a,color:o,delete:s,disabled:c,ellipsis:l,fontSize:u,italic:d,lineClamp:f,lineHeight:p,mark:m,noWrap:h,ref:g,shiny:_,shinyDuration:v,strong:y,style:b,styles:x,textDecoration:S,textTransform:C,type:w,underline:T,weight:E,whiteSpace:D,wordBreak:O,...k})=>{let ee=(0,q.useRef)(null),A=rp(ee,l,n),te=typeof l==`object`&&!!l.rows&&l.rows>1,j=typeof l==`object`&&l.tooltipWhenOverflow,ne=e=>{ee.current=e,typeof g==`function`?g(e):g&&(g.current=e)},re={...o&&{color:o},...E&&{fontWeight:E},...p&&{lineHeight:p},...C&&{textTransform:C},...S&&{textDecoration:S},...O&&{wordBreak:O},...typeof l==`object`&&l.rows&&{WebkitLineClamp:l.rows},...!l&&!!f&&{WebkitBoxOrient:`vertical`,WebkitLineClamp:f,display:`-webkit-box`,overflow:`hidden`,textOverflow:`ellipsis`},..._&&v&&{"--shiny-duration":v},...u&&{fontSize:u},...e&&{textAlign:e},...!te&&h&&{whiteSpace:`nowrap`},...D&&{whiteSpace:D},...b,...x?.root},M=(0,K.jsx)(t,{...jt({type:w}),...k,ref:ne,style:re,className:V(op({as:[`h1`,`h2`,`h3`,`h4`,`h5`,`p`].includes(t)?t:void 0,code:a,delete:s,disabled:c,ellipsis:l?typeof l==`object`&&l.rows?`multi`:!0:void 0,italic:d,mark:m,shiny:_,strong:y,type:w,underline:T}),H(ip(),_&&`lobe-text-shiny`,r,i?.root)).className,children:n});if(l&&typeof l==`object`&&(l.tooltip||l.tooltipWhenOverflow)){if(j&&!A)return M;let e=typeof l.tooltip==`string`?l.tooltip:n;return l.tooltip&&typeof l.tooltip==`object`?(0,K.jsx)(So,{...l.tooltip,title:l.tooltip?.title||e,children:M}):(0,K.jsx)(So,{title:e,children:M})}return M});sp.displayName=`Text`;var cp=sp,lp=e=>{e.stopPropagation()},up=e=>{e.preventDefault(),e.stopPropagation(),e.preventBaseUIHandler?.()},dp=q.createContext({disabled:!1});function fp(){return q.useContext(dp)}function pp(e){let[t,n]=q.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),r=q.useRef(null),i=q.useRef(null),a=q.useRef(null),o=q.useRef(null),s=q.useRef(!0),c=q.useRef(null),l=mt(),u=q.useMemo(()=>({anchor:t,setAnchor:n,actionsRef:a,backdropRef:r,internalBackdropRef:i,positionerRef:o,allowMouseUpTriggerRef:s,initialCursorPointRef:c,rootId:l}),[t,l]);return(0,K.jsx)(Io.Provider,{value:u,children:(0,K.jsx)(Co.Provider,{value:void 0,children:(0,K.jsx)(wo,{...e})})})}var mp=No,Y=Mt({block:`context-menu`,elements:[`trigger`,`positioner`,`header`,`viewport`,`footer`,`item`,`item-content`,`icon`,`label-group`,`label`,`desc`,`extra`,`submenu-arrow`,`checkbox-indicator`,`switch`,`separator`,`group`,`group-label`]}),hp=(0,q.memo)(({collisionPadding:e,style:t,...n})=>{let r=typeof t!=`function`&&t?.zIndex!=null&&typeof t.zIndex==`number`?t.zIndex:void 0,{zIndex:i,ref:a}=kt(`floating`,r),o=typeof t==`function`?e=>({zIndex:i,...t(e)}):{zIndex:i,...t};return(0,K.jsx)(mp,{...n,className:H(L.positioner,Y(`positioner`)),collisionPadding:e??Fe(),ref:a,style:o})});hp.displayName=`ContextMenuSubmenuPositioner`;var gp=(0,q.memo)(()=>{let{t:e}=Ut(j);return(0,K.jsx)(Fo,{disabled:!0,className:H(B(z.item,z.empty).className,Y(`item`)),children:(0,K.jsx)(`div`,{className:H(L.itemContent,Y(`item-content`)),children:(0,K.jsx)(`span`,{className:H(L.label,Y(`label`)),children:e(`common.empty`)})})})});gp.displayName=`EmptyMenuItem`;var _p=({checked:e,children:t,closeOnClick:n=!1,danger:r,defaultChecked:i,disabled:a,label:o,onCheckedChange:s})=>{let[c,l]=(0,q.useState)(i??!1),u=e!==void 0,d=u?e:c,f=(0,q.useCallback)(e=>{u||l(e),s?.(e)},[u,s]);return(0,K.jsxs)(Fo,{closeOnClick:n,disabled:a,label:o,className:H(B(z.item,r&&z.danger).className,Y(`item`)),onClick:e=>{e.preventDefault(),a||f(!d)},children:[t,(0,K.jsx)(`span`,{className:H(L.switchWrap,Y(`switch`)),onFocus:e=>e.stopPropagation(),children:(0,K.jsx)(Ae,{checked:d,disabled:a,size:`small`,tabIndex:-1,onChange:f,onClick:(e,t)=>t.stopPropagation()})})]})},vp=(e,t,n)=>{let r=Ft(e),i=`desc`in e?e.desc:void 0,a=`extra`in e?e.extra:void 0,o=t?.indicatorOnRight,s=!!i&&t?.iconAlign===`start`,c=n!==void 0&&!o,l=c?!!n:!!e.icon,u=c?!!(t?.reserveIconSpace||n):!!(l||t?.reserveIconSpace),d=i?(0,K.jsxs)(`div`,{className:H(L.labelGroup,Y(`label-group`)),children:[(0,K.jsx)(`span`,{className:H(L.label,Y(`label`)),children:r}),(0,K.jsx)(`span`,{className:H(L.desc,Y(`desc`)),children:i})]}):(0,K.jsx)(`span`,{className:H(L.label,Y(`label`)),children:r});return(0,K.jsxs)(`div`,{className:H(B(z.itemContent,s&&z.itemContentAlignStart).className,Y(`item-content`)),children:[u?(0,K.jsx)(`span`,{"aria-hidden":!l,className:H(B(z.icon,s&&z.iconAlignStart).className,Je.icon,Y(`icon`)),children:c?n:l?Bt(e.icon,`small`):null}):null,d,a?(0,K.jsx)(`span`,{className:H(L.extra,Y(`extra`)),children:a}):null,o&&n?n:null,t?.submenu?(0,K.jsx)(`span`,{className:H(L.submenuArrow,Y(`submenu-arrow`)),children:(0,K.jsx)(Lt,{})}):null]})},yp=(e,t,n)=>{if(!e.onClick)return;let r=e.key??t.at(-1)??``,i={domEvent:n,item:n.currentTarget,key:String(r),keyPath:t};e.onClick(i)},bp=(e,t=[],n)=>{let r=n?.iconAlign,i=n?.iconSpaceMode??`global`,a=n?.reserveIconSpace??Pt(e,i===`global`),o=n?.indicatorOnRight??Rt(e);return e.map((e,n)=>{if(!e)return null;let s=`${t.join(`-`)||`root`}-${n}`,c=zt(e,s),l=[...t,String(c)];if(e.type===`checkbox`){let t=e,n=Ft(t),i=typeof n==`string`?n:void 0,s=!!t.danger,l=(0,K.jsx)(jo,{className:Y(`checkbox-indicator`),children:(0,K.jsx)(vt,{icon:ue,size:`small`})});return(0,K.jsx)(Oo,{checked:t.checked,closeOnClick:t.closeOnClick,defaultChecked:t.defaultChecked,disabled:t.disabled,label:i,className:H(B(z.item,s&&z.danger).className,Y(`item`)),onCheckedChange:e=>t.onCheckedChange?.(e),children:vp(t,{iconAlign:r,indicatorOnRight:o,reserveIconSpace:a},l)},c)}if(e.type===`switch`){let t=e,n=Ft(t),i=typeof n==`string`?n:void 0,o=!!t.danger;return(0,K.jsx)(_p,{checked:t.checked,closeOnClick:t.closeOnClick,danger:o,defaultChecked:t.defaultChecked,disabled:t.disabled,label:i,onCheckedChange:t.onCheckedChange,children:vp(t,{iconAlign:r,reserveIconSpace:a})},c)}if(e.type===`divider`)return(0,K.jsx)(Mo,{className:H(L.separator,Y(`separator`))},c);if(e.type===`group`){let t=e,n=i===`group`?t.children?Pt(t.children):!1:a,o=t.children?Rt(t.children):!1;return(0,K.jsxs)(Do,{className:Y(`group`),children:[t.label?(0,K.jsx)(Eo,{className:H(L.groupLabel,Y(`group-label`)),children:t.label}):null,t.children?bp(t.children,l,{iconAlign:r,iconSpaceMode:i,indicatorOnRight:o,reserveIconSpace:n}):null]},c)}if(e.type===`submenu`||`children`in e&&e.children){let t=e,n=Ft(t),o=typeof n==`string`?n:void 0,s=`danger`in t&&!!t.danger,u=t.header!=null||t.footer!=null,d=t.children&&t.children.length>0?bp(t.children,l,{iconAlign:r,iconSpaceMode:i}):(0,K.jsx)(gp,{});return(0,K.jsxs)(ko,{defaultOpen:t.defaultOpen,open:t.open,onOpenChange:t.onOpenChange,children:[(0,K.jsx)(Po,{...t.triggerProps,closeDelay:t.closeDelay,delay:t.delay,disabled:t.disabled,label:o,openOnHover:t.openOnHover,className:H(B(z.item,s&&z.danger).className,Y(`item`)),onClick:t.onClick,children:vp(t,{iconAlign:r,reserveIconSpace:a,submenu:!0})}),(0,K.jsx)(To,{children:(0,K.jsx)(hp,{alignOffset:-4,"data-submenu":``,sideOffset:-1,onContextMenu:up,children:(0,K.jsxs)(Ao,{className:H(B(z.popup,u&&z.popupWithSlots).className,Je.popup,Y()),children:[t.header==null?null:(0,K.jsx)(`div`,{className:H(L.header,Y(`header`)),children:t.header}),u?(0,K.jsx)(`div`,{className:H(L.slotViewport,Y(`viewport`)),children:d}):d,t.footer==null?null:(0,K.jsx)(`div`,{className:H(L.footer,Y(`footer`)),children:t.footer})]})})})]},c)}let u=e,d=Ft(u),f=typeof d==`string`?d:void 0,p=`danger`in u&&!!u.danger;return(0,K.jsx)(Fo,{closeOnClick:u.closeOnClick,disabled:u.disabled,label:f,className:H(B(z.item,p&&z.danger).className,Y(`item`)),onClick:e=>yp(u,l,e),children:vp(u,{iconAlign:r,reserveIconSpace:a})},c)})},xp={"--lobe-dropdown-animation-duration":`0ms`},Sp=(0,q.memo)(()=>{let e=y(),t=Tt(),n=(0,q.useSyncExternalStore)(Yt,Xt,Jt);(0,q.useEffect)(()=>{},[e]),(0,q.useEffect)(()=>{let e=e=>Zt(e);return window.addEventListener(`pointerdown`,e,!0),window.addEventListener(`contextmenu`,e,!0),()=>{window.removeEventListener(`pointerdown`,e,!0),window.removeEventListener(`contextmenu`,e,!0)}},[]);let r=(0,q.useMemo)(()=>bp(n.items,[],{iconAlign:n.iconAlign,iconSpaceMode:n.iconSpaceMode}),[n.items,n.iconAlign,n.iconSpaceMode]),{zIndex:i,ref:a}=kt(`floating`),o=n.header!=null||n.footer!=null;return!e||!n.open&&n.items.length===0?null:(0,K.jsx)(pp,{open:n.open,onOpenChange:e=>{e?qt({open:e}):Qt()},children:(0,K.jsx)(To,{container:t,children:(0,K.jsx)(mp,{anchor:n.anchor??void 0,className:H(L.positioner,Y(`positioner`)),collisionPadding:Fe(),ref:a,sideOffset:6,style:{...xp,zIndex:i},children:(0,K.jsxs)(Ao,{"data-has-footer":n.footer==null?void 0:``,"data-has-header":n.header==null?void 0:``,className:H(B(z.popup,o&&z.popupWithSlots).className,Je.popup,Y()),onContextMenu:up,children:[n.header==null?null:(0,K.jsx)(`div`,{className:H(L.header,Y(`header`)),children:n.header}),n.virtual?(0,K.jsx)(It,{className:Y(`viewport`),itemSize:n.listItemHeight,children:r}):o?(0,K.jsx)(`div`,{className:H(L.slotViewport,Y(`viewport`)),children:r}):r,n.footer==null?null:(0,K.jsx)(`div`,{className:H(L.footer,Y(`footer`)),children:n.footer})]})})})})});Sp.displayName=`ContextMenuHost`;var Cp={circle:{kaIpWk:`lb16rqkct`,$$css:!0},defaultSize:{kZKoxP:`lblup9mm`,kzqmXN:`lb1kky2od`,$$css:!0},defaultSquare:{kaIpWk:`lb12oqio5`,$$css:!0},group:{kOIVth:`lb1v2ro7d`,k1xSpc:`lb78zum5`,kXwgrk:`lb1q0g3np`,kwnvtZ:`lb1a02dak`,$$css:!0},groupVertical:{kXwgrk:`lbdt5ytf`,$$css:!0},iconCircle:{k3aq6I:`lb10078c2`,$$css:!0},iconSquare:{k3aq6I:`lb1nrvvgt`,$$css:!0},indicator:{kGNEyG:`lb6s0dn4`,k1xSpc:`lb78zum5`,kjj79g:`lbl56j7k`,$$css:!0},label:{kOIVth:`lb167g77z`,kGNEyG:`lb6s0dn4`,kkrTdU:`lb1ypdohk lb1r4mgf1`,k1xSpc:`lb3nfvp2`,kfSwDN:`lb87ps6o`,$$css:!0},root:{kogj98:`lb1ghz6dp`,kmVPX3:`lb1717udv`,kVAM5u:`lb1ri2ox9 lb10cypdb lb18hgaxl lb14dg99k`,ksu8eU:`lb1y0btm7`,kMzoRj:`lbmkeg23`,kUk6DE:`lb1okw0bk`,kI3sdo:`lb1a2a7pz`,kmkexE:`lb1mlet35`,kGNEyG:`lb6s0dn4`,kWkggS:`lbpbwnwz lb6yijhg lb1ppu4m2`,kMwMTN:`lb15g0kca lbcdmxi5`,kkrTdU:`lb1ypdohk lb5ezrf1`,k1xSpc:`lb3nfvp2`,kjj79g:`lbl56j7k`,kSiTet:`lb12zwbr1`,$$css:!0}};({className:`lb16rqkct`}).className,{className:`lblup9mm lb1kky2od`}.className,{className:`lb12oqio5`}.className,{className:`lb1v2ro7d lb78zum5 lb1q0g3np lb1a02dak`}.className,{className:`lbdt5ytf`}.className,{className:`lb10078c2`}.className,{className:`lb1nrvvgt`}.className,{className:`lb6s0dn4 lb78zum5 lbl56j7k`}.className,{className:`lb167g77z lb6s0dn4 lb1ypdohk lb1r4mgf1 lb3nfvp2 lb87ps6o`}.className,{className:`lb1ghz6dp lb1717udv lb1ri2ox9 lb10cypdb lb18hgaxl lb14dg99k lb1y0btm7 lbmkeg23 lb1okw0bk lb1a2a7pz lb1mlet35 lb6s0dn4 lbpbwnwz lb6yijhg lb1ppu4m2 lb15g0kca lbcdmxi5 lb1ypdohk lb5ezrf1 lb3nfvp2 lbl56j7k lb12zwbr1`}.className;function wp(e){if(!e)return null;for(let t of e.elements){let e=t.tagName;if(e===`BUTTON`||e===`INPUT`){let e=t;if(e.type===`submit`)return e}}return null}var Tp=`data-checked`,Ep=`data-unchecked`;function Dp(e){return{checked(t){return e.indeterminate?{}:t?{[Tp]:``}:{[Ep]:``}},...qe}}var Op=q.createContext(void 0);function kp(){return q.useContext(Op)}var Ap=q.createContext(void 0);function jp(){let e=q.useContext(Ap);if(e===void 0)throw Error(xt(14));return e}var Mp=`data-parent`,Np=q.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i=!1,"aria-labelledby":a,disabled:o=!1,form:s,id:c,indeterminate:l=!1,inputRef:u,name:d,onCheckedChange:f,parent:p=!1,readOnly:m=!1,render:h,required:g=!1,uncheckedValue:_,value:v,nativeButton:y=!1,style:b,...x}=e,{clearErrors:S}=me(),{disabled:w,name:T,setDirty:E,setFilled:D,setTouched:O,state:k,validationMode:A,validityData:j,validation:re}=Se(),M=fp(),{labelId:ie,registerControlId:oe,getDescriptionProps:se}=te(),N=kp(),ce=N?.allValues===void 0?void 0:N.parent,le=ce!==void 0,P=w||M.disabled||N?.disabled||o,ue=T??d,F=v??ue,de=bt(),I=N?.registerControlId!==oe,fe=ee({id:c||void 0,enabled:I}),ge=y?fe:de,_e={};le&&(p?_e=ce.getParentProps():F!==void 0&&(_e=ce.getChildProps(F)));let{checked:ve=n,indeterminate:ye=l,onCheckedChange:be,...xe}=_e,Ce=N?.value,we=q.useRef(null),Te=he(P,we),{getButtonProps:Ee,buttonRef:De}=_t({disabled:P,native:y}),Oe=N?.validation??re,[ke,Ae]=ae({controlled:F!==void 0&&Ce!==void 0&&!p?Ce.includes(F):ve,default:i,name:`Checkbox`,state:`checked`}),je=le?!!ve:ke,Me=le&&ye||l;pe(we,de,ke,void 0,!N&&!P,d);let Ne=ce?.registerChildId,Pe=q.useRef(null),Fe=Oe.registerInput,Ie=N?F:void 0,Le=q.useCallback(e=>Fe(e,{controlRef:we,value:Ie}),[Fe,Ie]),Re=St(u,Pe,p?void 0:Le),ze=ne(a,ie,Pe,!y,fe,x[`aria-label`]);Ct(()=>{Pe.current&&(Pe.current.indeterminate=Me),N||D(ke)},[ke,Me,N,D]),C(ke,()=>{N||(S(ue),E(ke!==j.initialValue),Oe.change(ke))});let Be=gt({checked:ke,disabled:P,form:s,name:p?void 0:ue,id:y?void 0:fe,required:g,ref:Re,style:ue?ht:ft,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(m){e.preventDefault();return}let t=e.currentTarget.checked,n=At(wt,e.nativeEvent);if(f?.(t,n),!n.isCanceled&&(be?.(t,n),!n.isCanceled&&(Ae(t),F!==void 0&&N!==void 0&&!p&&!le))){let e=t?[...N.value,F]:N.value.filter(e=>e!==F);N.setValue(e,n)}},onClick(e){e.stopPropagation()},onFocus(){we.current?.focus()}},v===void 0?st:{value:(N?ke&&v:v)||``},se,e=>Oe.getValidationProps(P,e));q.useEffect(()=>{if(!ce||F===void 0)return;let e=ce.disabledStatesRef.current;return e.set(F,P),()=>{e.delete(F)}},[ce,P,F]);let Ve=q.useMemo(()=>({...k,checked:je,disabled:P,readOnly:m,required:g,indeterminate:Me}),[k,je,P,m,g,Me]),He=Dp(Ve),L=pt(`span`,e,{state:Ve,ref:[De,we,t],props:[{id:ge,role:`checkbox`,"aria-checked":Me?`mixed`:je,"aria-readonly":m||void 0,"aria-required":g||void 0,"aria-labelledby":ze,[Mp]:p?``:void 0,onFocus(){Te(!0)},onBlur(){let e=Pe.current;e&&(O(!0),Te(!1),A===`onBlur`&&Oe.commit(N?Ce:e.checked))},onKeyDown(e){if(e.key!==`Enter`||(e.preventBaseUIHandler(),e.defaultPrevented))return;let t=Pe.current?.form??null,n=e.currentTarget,r=e.nativeEvent,i=e.preventDefault,a=r.preventDefault,o=!1;e.preventDefault=()=>{o=!0,i.call(e)},r.preventDefault=()=>{o=!0,a.call(r)},a.call(r),Dt(n).queueMicrotask(()=>{e.preventDefault=i,r.preventDefault=a,o||wp(t)?.click()})},onClick(e){if(m||P)return;e.preventDefault();let t=Pe.current;t&&dt(t,e)}},x,xe,Ee,se,e=>Oe.getValidationProps(P,e)],stateAttributesMapping:He}),R=L.props.id;return Ct(()=>{if(Ne&&!p&&F!==void 0&&R!==void 0)return Ne(F,R)},[Ne,p,F,R]),(0,K.jsxs)(Ap.Provider,{value:Ve,children:[L,!ke&&!N&&ue&&!p&&_!==void 0&&(0,K.jsx)(`input`,{type:`hidden`,form:s,name:ue,value:_,disabled:P}),(0,K.jsx)(`input`,{...Be,suppressHydrationWarning:!0})]})}),Pp=q.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=jp(),c=s.checked||s.indeterminate,{mounted:l,transitionStatus:u,setMounted:d}=Et(c),f=q.useRef(null),p={...s,transitionStatus:u};lt({batch:!0,enabled:!c,open:c,ref:f,onComplete(){c||d(!1)}});let m={...Dp(s),...Ot},h=a||l,g=pt(`span`,e,{ref:[t,f],state:p,stateAttributesMapping:m,props:o});return h?g:null}),Fp=Mt({block:`checkbox`,dataAttributes:[`shape`],elements:[`checkbox`,`indicator`,`text`]});Mt({block:`checkbox-group`,dataAttributes:[`horizontal`],elements:[`item`]});var Ip=(0,q.memo)(({size:e,shape:t=`square`,backgroundColor:n,children:r,className:i,classNames:a,styles:o,style:s,textProps:c,onChange:l,disabled:u,indeterminate:d,...f})=>{let p=e??16,m=e!==void 0,h={...m&&{height:p,width:p},...m&&t===`square`&&{borderRadius:`max(4px, ${Math.round(p/4)}px)`},...n?{"--lobe-checkbox-bg":n}:{},...r?{}:s,...o?.checkbox},g=t===`square`?Cp.iconSquare:Cp.iconCircle,_=(0,K.jsx)(Np,{disabled:u,indeterminate:d,onCheckedChange:l,...r?void 0:jt({shape:t}),...f,...V([Cp.root,yt.info,!m&&Cp.defaultSize,t===`square`?!m&&Cp.defaultSquare:Cp.circle],H(!r&&Fp(),Fp(`checkbox`),r?a?.checkbox:i,a?.checkbox),h),children:(0,K.jsx)(Pp,{...V(Cp.indicator,Fp(`indicator`)),children:d?(0,K.jsx)(Ce,{size:p,strokeWidth:3,...B(g)}):(0,K.jsx)(ue,{size:p,strokeWidth:3,...B(g)})})});return r?(0,K.jsxs)(`label`,{...jt({shape:t}),...V(Cp.label,H(Fp(),i,a?.wrapper),{...m&&{gap:Math.floor(p/2)},...s,...o?.wrapper}),children:[_,(0,K.jsx)(cp,{as:`span`,className:H(Fp(`text`),a?.text),style:o?.text,...c,type:u?`secondary`:c?.type,children:r})]}):_});Ip.displayName=`Checkbox`;var Lp=Object.assign(Ip,{formBinding:{valueProp:`checked`}}),X={glyph:{k1xSpc:`lb3nfvp2`,$$css:!0},glyphBox:{k1xSpc:`lb3nfvp2`,$$css:!0},network:{k1xSpc:`lb1rg5ohu`,kVAEAm:`lb1n2onr6`,$$css:!0},networkBox:{k87sOh:`lb13vifvy`,kLqNvP:`lb1o0tod`,kVAEAm:`lb10l6tqk`,k3nNDw:`lb1hj3fc7`,kZKoxP:`lbpyat2d`,kzqmXN:`lb1exxlbk`,$$css:!0},networkCore:{k44tkh:`lb1c74tu6 lb1u6grsq`,ko0y90:`lba4qsjk lbg0664w`,kKVMdj:`lb1ygz6qe lb1aquc0h`,kyAemX:`lb1debuo4 lb1uea3p4`,kWkggS:`lb1h45990`,k87sOh:`lbyszfof`,kLqNvP:`lb4500kp`,kVAEAm:`lb10l6tqk`,kZKoxP:`lbols6we`,kzqmXN:`lb1v4s8kt`,$$css:!0},networkLine:{kjVXCG:`lb68wf4t`,kfJifR:`lbpmuf5a`,kSiTet:`lbuzhngd`,$$css:!0},networkLines:{kpwlN0:`lb10a8y8t`,kVAEAm:`lb10l6tqk`,kZKoxP:`lbpyat2d`,kzqmXN:`lb1exxlbk`,$$css:!0},networkNode:{k44tkh:`lb1c74tu6 lb1u6grsq`,ko0y90:`lba4qsjk lbg0664w`,kKVMdj:`lb1mw1q8i lb1aquc0h`,kyAemX:`lb1debuo4 lb1uea3p4`,kogj98:`lbzvvh78`,kaIpWk:`lb16rqkct`,kWkggS:`lb1h45990`,kVAEAm:`lb10l6tqk`,kZKoxP:`lbxdy7cf`,kzqmXN:`lb165gwbr`,$$css:!0},networkParticle:{k44tkh:`lb1c74tu6 lb1u6grsq`,ko0y90:`lba4qsjk lbg0664w`,kKVMdj:`lb15d5rfv lb1aquc0h`,kyAemX:`lb1debuo4 lb1uea3p4`,kogj98:`lb1rmkima`,kaIpWk:`lb16rqkct`,kWkggS:`lb1h45990`,k87sOh:`lbbssg55`,kLqNvP:`lbemjqv4`,kVAEAm:`lb10l6tqk`,kZKoxP:`lb11vverv`,kzqmXN:`lbsblaa2`,$$css:!0},networkRing:{k44tkh:`lb6q96wx lb1u6grsq`,ko0y90:`lba4qsjk lbg0664w`,kKVMdj:`lb1v0ides lb1aquc0h`,kyAemX:`lb1esw782 lb1uea3p4`,kpwlN0:`lb1vdmwfg`,kVAM5u:`lb181nr7w`,kaIpWk:`lb16rqkct`,ksu8eU:`lbbsl7fq`,kMzoRj:`lbmkeg23`,kSiTet:`lbti2d7y`,kVAEAm:`lb10l6tqk`,$$css:!0},overlay:{kpwlN0:`lb10a8y8t`,kOIVth:`lb167g77z`,kGNEyG:`lb6s0dn4`,kWkggS:`lb1c0b5dz`,kMwMTN:`lbc77et8`,k1xSpc:`lb78zum5`,kXwgrk:`lbdt5ytf`,kjj79g:`lbl56j7k`,kVAEAm:`lb10l6tqk`,$$css:!0},ring:{k4XH5M:`lbwsa1kb`,$$css:!0},ringProgress:{kjVXCG:`lb1q6ff6i`,$$css:!0},ringTrack:{kjVXCG:`lb12pnydc`,$$css:!0},root:{kGNEyG:`lb6s0dn4`,kMwMTN:`lbc77et8`,k1xSpc:`lb3nfvp2`,$$css:!0},tip:{kMwMTN:`lbc77et8`,kGuDYH:`lbxobqjj`,$$css:!0},wrapper:{kVAEAm:`lb1n2onr6`,$$css:!0}},Rp=[0,1,2],zp=25,Bp=Rp.flatMap(e=>Rp.map(t=>({x:zp+e*zp,y:zp+t*zp}))),Vp=Rp.slice(0,-1).flatMap(e=>Rp.flatMap(t=>Rp.map(n=>({x1:zp+e*zp,x2:zp+(e+1)*zp,y1:zp+t*zp,y2:zp+n*zp})))),Hp=[0,1,2],Up=(e,t,n)=>Math.max(e,n*100/t),Wp=(0,q.memo)(({px:e})=>{let t={"--spin-node-size":`${Up(6,e,2)}px`,"--spin-particle-size":`${Up(3,e,1.5)}px`,transform:`scale(${e/100})`};return(0,K.jsx)(`span`,{...B(X.network),style:{height:e,width:e},children:(0,K.jsxs)(`span`,{...B(X.networkBox),style:t,children:[(0,K.jsx)(`svg`,{...B(X.networkLines),viewBox:`0 0 100 100`,children:Vp.map(e=>(0,K.jsx)(`line`,{...e,...B(X.networkLine)},`${e.x1}-${e.y1}-${e.y2}`))}),Bp.map(({x:e,y:t},n)=>(0,K.jsx)(`i`,{...B(X.networkNode),style:{animationDelay:`${n*.2}s`,left:e,top:t}},`${e}-${t}`)),Hp.map(e=>(0,K.jsx)(`i`,{...B(X.networkParticle),style:{animationDelay:`${e*.6}s`}},e)),(0,K.jsx)(`b`,{...B(X.networkCore)}),(0,K.jsx)(`u`,{...B(X.networkRing)})]})})});Wp.displayName=`NetworkGlyph`;var Gp=Mt({block:`spin`,dataAttributes:[`size`,`variant`],elements:[`indicator`,`overlay`,`tip`]}),Kp={large:32,middle:20,small:14},qp=e=>typeof e==`number`?e:Kp[e],Jp=(0,q.memo)(({children:e,className:t,indicator:n,percent:r,ref:i,size:a=`middle`,spinning:o=!0,style:s,tip:c,variant:l=`default`,...u})=>{let d=(0,q.useMemo)(()=>qp(a),[a]),f=(0,q.useMemo)(()=>{if(n)return n;if(l===`network`)return(0,K.jsx)(Wp,{px:d});if(typeof r==`number`){let e=Math.min(100,Math.max(0,r)),t=2*Math.PI*9,n=t*(1-e/100);return(0,K.jsxs)(`svg`,{...B(X.glyph,X.ring),height:d,viewBox:`0 0 24 24`,width:d,children:[(0,K.jsx)(`circle`,{...B(X.ringTrack),cx:12,cy:12,fill:`none`,r:9,strokeWidth:2.5}),(0,K.jsx)(`circle`,{...B(X.ringProgress),cx:12,cy:12,fill:`none`,r:9,strokeDasharray:t,strokeDashoffset:n,strokeLinecap:`round`,strokeWidth:2.5})]})}return(0,K.jsx)(vt,{spin:!0,...B(X.glyph),icon:Ue,size:d})},[n,l,r,d]);if(!o)return e??null;let p=jt({size:typeof a==`string`?a:void 0,variant:l});return e?(0,K.jsxs)(`div`,{ref:i,...V(X.wrapper,H(Gp(),t),s),...p,...u,children:[e,(0,K.jsxs)(`div`,{"aria-busy":!0,"aria-live":`polite`,...V(X.overlay,Gp(`overlay`)),role:`status`,children:[(0,K.jsx)(`span`,{"aria-hidden":!0,...V(X.glyphBox,Gp(`indicator`)),children:f}),c&&(0,K.jsx)(`span`,{...V(X.tip,Gp(`tip`)),children:c})]})]}):(0,K.jsx)(`div`,{"aria-busy":!0,"aria-live":`polite`,ref:i,role:`status`,...V(X.root,H(Gp(),t),s),...p,...u,children:(0,K.jsx)(`span`,{"aria-hidden":!0,...V(X.glyphBox,Gp(`indicator`)),children:f})})});Jp.displayName=`Spin`;var Yp=(e=>(e[e.Border=-1]=`Border`,e[e.Data=0]=`Data`,e[e.Function=1]=`Function`,e[e.Position=2]=`Position`,e[e.Timing=3]=`Timing`,e[e.Alignment=4]=`Alignment`,e))(Yp||{}),Xp=[0,1],Zp=[1,0],Qp=[2,3],$p=[3,2],em={L:Xp,M:Zp,Q:Qp,H:$p},tm=/^\d*$/,nm=/^[A-Z0-9 $%*+./:-]*$/,rm=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`,im=1,am=40,om=3,sm=3,cm=40,lm=10,um=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],dm=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],fm=class{constructor(e,t,n,r){if(this.version=e,this.ecc=t,e<im||e>am)throw RangeError(`Version value out of range`);if(r<-1||r>7)throw RangeError(`Mask value out of range`);this.size=e*4+17;let i=Array.from({length:this.size}).fill(!1);for(let e=0;e<this.size;e++)this.modules.push(i.slice()),this.types.push(i.map(()=>0));this.drawFunctionPatterns();let a=this.addEccAndInterleave(n);if(this.drawCodewords(a),r===-1){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);let n=this.getPenaltyScore();n<e&&(r=t,e=n),this.applyMask(t)}}this.mask=r,this.applyMask(r),this.drawFormatBits(r)}size;mask;modules=[];types=[];getModule(e,t){return e>=0&&e<this.size&&t>=0&&t<this.size&&this.modules[t][e]}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0,Yp.Timing),this.setFunctionModule(e,6,e%2==0,Yp.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let r=0;r<t;r++)n===0&&r===0||n===0&&r===t-1||n===t-1&&r===0||this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let t=this.ecc[1]<<3|e,n=t;for(let e=0;e<10;e++)n=n<<1^(n>>>9)*1335;let r=(t<<10|n)^21522;for(let e=0;e<=5;e++)this.setFunctionModule(8,e,mm(r,e));this.setFunctionModule(8,7,mm(r,6)),this.setFunctionModule(8,8,mm(r,7)),this.setFunctionModule(7,8,mm(r,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,mm(r,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,mm(r,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,mm(r,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;let t=this.version<<12|e;for(let e=0;e<18;e++){let n=mm(t,e),r=this.size-11+e%3,i=Math.floor(e/3);this.setFunctionModule(r,i,n),this.setFunctionModule(i,r,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){let i=Math.max(Math.abs(r),Math.abs(n)),a=e+r,o=t+n;a>=0&&a<this.size&&o>=0&&o<this.size&&this.setFunctionModule(a,o,i!==2&&i!==4,Yp.Position)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,t+n,Math.max(Math.abs(r),Math.abs(n))!==1,Yp.Alignment)}setFunctionModule(e,t,n,r=Yp.Function){this.modules[t][e]=n,this.types[t][e]=r}addEccAndInterleave(e){let t=this.version,n=this.ecc;if(e.length!==km(t,n))throw RangeError(`Invalid argument`);let r=dm[n[0]][t],i=um[n[0]][t],a=Math.floor(Om(t)/8),o=r-a%r,s=Math.floor(a/r),c=[],l=Am(i);for(let t=0,n=0;t<r;t++){let r=e.slice(n,n+s-i+(t<o?0:1));n+=r.length;let a=jm(r,l);t<o&&r.push(0),c.push(r.concat(a))}let u=[];for(let e=0;e<c[0].length;e++)c.forEach((t,n)=>{(e!==s-i||n>=o)&&u.push(t[e])});return u}drawCodewords(e){if(e.length!==Math.floor(Om(this.version)/8))throw RangeError(`Invalid argument`);let t=0;for(let n=this.size-1;n>=1;n-=2){n===6&&(n=5);for(let r=0;r<this.size;r++)for(let i=0;i<2;i++){let a=n-i,o=n+1&2?r:this.size-1-r;!this.types[o][a]&&t<e.length*8&&(this.modules[o][a]=mm(e[t>>>3],7-(t&7)),t++)}}}applyMask(e){if(e<0||e>7)throw RangeError(`Mask value out of range`);for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let r;switch(e){case 0:r=(n+t)%2==0;break;case 1:r=t%2==0;break;case 2:r=n%3==0;break;case 3:r=(n+t)%3==0;break;case 4:r=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:r=n*t%2+n*t%3==0;break;case 6:r=(n*t%2+n*t%3)%2==0;break;case 7:r=((n+t)%2+n*t%3)%2==0;break;default:throw Error(`Unreachable`)}!this.types[t][n]&&r&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let t=0;t<this.size;t++){let n=!1,r=0,i=[0,0,0,0,0,0,0];for(let a=0;a<this.size;a++)this.modules[t][a]===n?(r++,r===5?e+=om:r>5&&e++):(this.finderPenaltyAddHistory(r,i),n||(e+=this.finderPenaltyCountPatterns(i)*cm),n=this.modules[t][a],r=1);e+=this.finderPenaltyTerminateAndCount(n,r,i)*cm}for(let t=0;t<this.size;t++){let n=!1,r=0,i=[0,0,0,0,0,0,0];for(let a=0;a<this.size;a++)this.modules[a][t]===n?(r++,r===5?e+=om:r>5&&e++):(this.finderPenaltyAddHistory(r,i),n||(e+=this.finderPenaltyCountPatterns(i)*cm),n=this.modules[a][t],r=1);e+=this.finderPenaltyTerminateAndCount(n,r,i)*cm}for(let t=0;t<this.size-1;t++)for(let n=0;n<this.size-1;n++){let r=this.modules[t][n];r===this.modules[t][n+1]&&r===this.modules[t+1][n]&&r===this.modules[t+1][n+1]&&(e+=sm)}let t=0;for(let e of this.modules)t=e.reduce((e,t)=>e+ +!!t,t);let n=this.size*this.size,r=Math.ceil(Math.abs(t*20-n*10)/n)-1;return e+=r*lm,e}getAlignmentPatternPositions(){if(this.version===1)return[];{let e=Math.floor(this.version/7)+2,t=this.version===32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,n=[6];for(let r=this.size-7;n.length<e;r-=t)n.splice(1,0,r);return n}}finderPenaltyCountPatterns(e){let t=e[1],n=t>0&&e[2]===t&&e[3]===t*3&&e[4]===t&&e[5]===t;return(n&&e[0]>=t*4&&e[6]>=t?1:0)+(n&&e[6]>=t*4&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){t[0]===0&&(e+=this.size),t.pop(),t.unshift(e)}};function pm(e,t,n){if(t<0||t>31||e>>>t)throw RangeError(`Value out of range`);for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function mm(e,t){return!!(e>>>t&1)}var hm=class{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw RangeError(`Invalid argument`);this.bitData=n.slice()}getData(){return this.bitData.slice()}},gm=[1,10,12,14],_m=[2,9,11,13],vm=[4,8,16,16];function ym(e,t){return e[Math.floor((t+7)/17)+1]}function bm(e){let t=[];for(let n of e)pm(n,8,t);return new hm(vm,e.length,t)}function xm(e){if(!wm(e))throw RangeError(`String contains non-numeric characters`);let t=[];for(let n=0;n<e.length;){let r=Math.min(e.length-n,3);pm(Number.parseInt(e.substring(n,n+r),10),r*3+1,t),n+=r}return new hm(gm,e.length,t)}function Sm(e){if(!Tm(e))throw RangeError(`String contains unencodable characters in alphanumeric mode`);let t=[],n=0;for(;n+2<=e.length;n+=2){let r=rm.indexOf(e.charAt(n))*45;r+=rm.indexOf(e.charAt(n+1)),pm(r,11,t)}return n<e.length&&pm(rm.indexOf(e.charAt(n)),6,t),new hm(_m,e.length,t)}function Cm(e){return e===``?[]:wm(e)?[xm(e)]:Tm(e)?[Sm(e)]:[bm(Dm(e))]}function wm(e){return tm.test(e)}function Tm(e){return nm.test(e)}function Em(e,t){let n=0;for(let r of e){let e=ym(r.mode,t);if(r.numChars>=1<<e)return 1/0;n+=4+e+r.bitData.length}return n}function Dm(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)e.charAt(n)===`%`?(t.push(Number.parseInt(e.substring(n+1,n+3),16)),n+=2):t.push(e.charCodeAt(n));return t}function Om(e){if(e<im||e>am)throw RangeError(`Version number out of range`);let t=(16*e+128)*e+64;if(e>=2){let n=Math.floor(e/7)+2;t-=(25*n-10)*n-55,e>=7&&(t-=36)}return t}function km(e,t){return Math.floor(Om(e)/8)-um[t[0]][e]*dm[t[0]][e]}function Am(e){if(e<1||e>255)throw RangeError(`Degree out of range`);let t=[];for(let n=0;n<e-1;n++)t.push(0);t.push(1);let n=1;for(let r=0;r<e;r++){for(let e=0;e<t.length;e++)t[e]=Mm(t[e],n),e+1<t.length&&(t[e]^=t[e+1]);n=Mm(n,2)}return t}function jm(e,t){let n=t.map(e=>0);for(let r of e){let e=r^n.shift();n.push(0),t.forEach((t,r)=>n[r]^=Mm(t,e))}return n}function Mm(e,t){if(e>>>8||t>>>8)throw RangeError(`Byte out of range`);let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(t>>>r&1)*e;return n}function Nm(e,t,n=1,r=40,i=-1,a=!0){if(!(im<=n&&n<=r&&r<=am)||i<-1||i>7)throw RangeError(`Invalid value`);let o,s;for(o=n;;o++){let n=km(o,t)*8,i=Em(e,o);if(i<=n){s=i;break}if(o>=r)throw RangeError(`Data too long`)}for(let e of[Zp,Qp,$p])a&&s<=km(o,e)*8&&(t=e);let c=[];for(let t of e){pm(t.mode[0],4,c),pm(t.numChars,ym(t.mode,o),c);for(let e of t.getData())c.push(e)}let l=km(o,t)*8;pm(0,Math.min(4,l-c.length),c),pm(0,(8-c.length%8)%8,c);for(let e=236;c.length<l;e^=253)pm(e,8,c);let u=Array.from({length:Math.ceil(c.length/8)},()=>0);return c.forEach((e,t)=>u[t>>>3]|=e<<7-(t&7)),new fm(o,t,u,i)}function Pm(e,t){let{ecc:n=`L`,boostEcc:r=!1,minVersion:i=1,maxVersion:a=40,maskPattern:o=-1,border:s=1}=t||{},c=typeof e==`string`?Cm(e):Array.isArray(e)?[bm(e)]:void 0;if(!c)throw Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);let l=Nm(c,em[n],i,a,o,r),u=Fm({version:l.version,maskPattern:l.mask,size:l.size,data:l.modules,types:l.types},s);return t?.invert&&(u.data=u.data.map(e=>e.map(e=>!e))),t?.onEncoded?.(u),u}function Fm(e,t=1){if(!t)return e;let{size:n}=e,r=n+t*2;e.size=r,e.data.forEach(e=>{for(let n=0;n<t;n++)e.unshift(!1),e.push(!1)});for(let n=0;n<t;n++)e.data.unshift(Array.from({length:r},e=>!1)),e.data.push(Array.from({length:r},e=>!1));let i=Yp.Border;e.types.forEach(e=>{for(let n=0;n<t;n++)e.unshift(i),e.push(i)});for(let n=0;n<t;n++)e.types.unshift(Array.from({length:r},e=>i)),e.types.push(Array.from({length:r},e=>i));return e}var Im={"qrCode.expired":`Expired`,"qrCode.loading":`Loading`,"qrCode.refresh":`Refresh`},Lm=(e,t)=>{let n=e.length,r=Math.floor((n-t)/2),i=r+t,a=``;for(let o=0;o<n;o++)for(let s=0;s<n;s++)t>0&&s>=r&&s<i&&o>=r&&o<i||e[o][s]&&(a+=`M${s} ${o}h1v1h-1z`);return a},Rm=Mt({block:`qr-code`,dataAttributes:[`status`,`bordered`],elements:[`code`,`icon`,`overlay`,`title`,`refresh`]}),zm={bordered:{kGVxlE:`lbnug1en`,$$css:!0},icon:{kaIpWk:`lb16rqkct`,kVQacm:`lbb3r6kr`,kGNEyG:`lb6s0dn4`,kGVxlE:`lbgffery`,k1xSpc:`lb78zum5`,k87sOh:`lbwa60dl`,kLqNvP:`lbbudbmw`,kjj79g:`lbl56j7k`,kVAEAm:`lb10l6tqk`,k3aq6I:`lb11lhmoz`,$$css:!0},iconDefaultSize:{kZKoxP:`lb1iafx81`,kzqmXN:`lb1tzk97j`,$$css:!0},overlay:{kpwlN0:`lb10a8y8t`,kaIpWk:`lbgqmno8`,kOIVth:`lb1v2ro7d`,kGNEyG:`lb6s0dn4`,kWkggS:`lbsuhtdx`,kMwMTN:`lb1a94cpc`,k1xSpc:`lb78zum5`,kXwgrk:`lbdt5ytf`,kjj79g:`lbl56j7k`,kVAEAm:`lb10l6tqk`,$$css:!0},overlayTitle:{kGuDYH:`lb19d36u7`,k63SB2:`lb1s688f`,$$css:!0},refresh:{kaIpWk:`lb1e6avla`,ksu8eU:`lbng3xce`,kMzoRj:`lbc342km`,kjAs5C:`lb1aazh3f`,kOIVth:`lb17d4w8g`,kg3NbH:`lbqin4a2`,kGNEyG:`lb6s0dn4`,kWkggS:`lb1qtvmyh`,kMwMTN:`lbfungia`,kkrTdU:`lb1ypdohk`,k1xSpc:`lb3nfvp2`,kMv6JI:`lbjb2p0i`,kGuDYH:`lb4z9k3i`,kQqvRs:`lb1xh6y1q`,kKX8nH:`lb1t35e8`,k63SB2:`lbk50ysn`,kjj79g:`lbl56j7k`,kLWn49:`lb15bjb6t`,kZKoxP:`lb10w6t97`,$$css:!0},root:{kmVPX3:`lb1tamke2`,kaIpWk:`lbgqmno8`,kWkggS:`lb83z2og`,k1xSpc:`lb3nfvp2`,kVAEAm:`lb1n2onr6`,$$css:!0},spin:{kMwMTN:`lb33gn0b`,$$css:!0}},Bm=.22,Vm=(0,q.memo)(({bgColor:e,bordered:t=!0,className:n,color:r=`#000`,errorLevel:i=`M`,icon:a,onRefresh:o,ref:s,size:c,status:l=`active`,style:u,value:d,...f})=>{let{t:p}=Ut(Im),m=c??160,{count:h,path:g}=(0,q.useMemo)(()=>{try{let{data:e}=Pm(d,{border:0,ecc:a?`H`:i}),t=a?Math.ceil(e.length*Bm)|1:0;return{count:e.length,path:Lm(e,t)}}catch{return{count:0,path:``}}},[d,a,i]);return(0,K.jsxs)(`div`,{ref:s,...V([zm.root,t&&zm.bordered],H(Rm(),n),e===void 0?u:{background:e,...u}),...jt({bordered:t,status:l}),...f,children:[(0,K.jsxs)(`svg`,{"aria-label":d,className:Rm(`code`),height:m,role:`img`,shapeRendering:`crispEdges`,viewBox:`0 0 ${h} ${h}`,width:m,children:[(0,K.jsx)(`rect`,{fill:e??`#fff`,height:h,width:h}),(0,K.jsx)(`path`,{d:g,fill:r})]}),a&&(0,K.jsx)(`span`,{...V([zm.icon,c===void 0&&zm.iconDefaultSize],Rm(`icon`),c===void 0?void 0:{height:m*Bm,width:m*Bm}),children:a}),l===`loading`&&(0,K.jsx)(`span`,{"aria-label":p(`qrCode.loading`),...V(zm.overlay,Rm(`overlay`)),role:`status`,children:(0,K.jsx)(Jp,{className:V(zm.spin).className})}),l===`expired`&&(0,K.jsxs)(`span`,{...V(zm.overlay,Rm(`overlay`)),children:[(0,K.jsx)(`span`,{...V(zm.overlayTitle,Rm(`title`)),children:p(`qrCode.expired`)}),o&&(0,K.jsxs)(`button`,{...V([yt.info,zm.refresh],Rm(`refresh`)),type:`button`,onClick:o,children:[(0,K.jsx)(vt,{icon:Qo,size:14}),p(`qrCode.refresh`)]})]})]})});Vm.displayName=`QRCode`;var Hm=e({Board:()=>np,Group:()=>Um,Item:()=>Xf}),Um=Lf(Vd),Wm=e({Reorder:()=>Hm,a:()=>Ra,abbr:()=>ha,address:()=>Aa,animate:()=>Zi,area:()=>xi,article:()=>ya,aside:()=>Pa,audio:()=>Oi,b:()=>sa,base:()=>Ha,bdi:()=>Mi,bdo:()=>zi,big:()=>Ca,blockquote:()=>da,body:()=>qi,button:()=>Ui,canvas:()=>_i,caption:()=>Ka,circle:()=>io,cite:()=>Ti,clipPath:()=>eo,code:()=>Gr,col:()=>Xn,colgroup:()=>Xa,create:()=>Ma,data:()=>Yr,datalist:()=>rr,dd:()=>er,defs:()=>Nr,del:()=>ia,desc:()=>Wn,details:()=>ta,dfn:()=>Dr,dialog:()=>Ar,div:()=>Ir,dl:()=>or,dt:()=>hr,ellipse:()=>wr,em:()=>Hr,embed:()=>co,feBlend:()=>qn,feColorMatrix:()=>ni,feComponentTransfer:()=>fr,feComposite:()=>$r,feConvolveMatrix:()=>ai,feDiffuseLighting:()=>lr,feDisplacementMap:()=>xr,feDistantLight:()=>Da,feDropShadow:()=>vr,feFlood:()=>di,feFuncA:()=>ci,feFuncB:()=>mi,feFuncG:()=>zr,feFuncR:()=>Vn,feGaussianBlur:()=>Ri,feImage:()=>Va,feMerge:()=>va,feMergeNode:()=>Na,feMorphology:()=>ea,feOffset:()=>wi,fePointLight:()=>Sa,feSpecularLighting:()=>La,feSpotLight:()=>ji,feTile:()=>ua,feTurbulence:()=>Ga,fieldset:()=>Fi,figcaption:()=>Hi,figure:()=>Ea,filter:()=>ma,footer:()=>Xi,foreignObject:()=>Ki,form:()=>bi,g:()=>Ya,h1:()=>so,h2:()=>Di,h3:()=>ro,h4:()=>Jr,h5:()=>$n,h6:()=>$a,head:()=>Qr,header:()=>ar,hgroup:()=>nr,hr:()=>Fr,html:()=>oa,i:()=>Kn,iframe:()=>ra,image:()=>kr,img:()=>Mr,input:()=>Rr,ins:()=>cr,kbd:()=>_r,keygen:()=>Er,label:()=>Wr,legend:()=>uo,li:()=>Yn,line:()=>ii,linearGradient:()=>mr,link:()=>ti,main:()=>si,map:()=>dr,mark:()=>Cr,marker:()=>ka,mask:()=>br,menu:()=>pi,menuitem:()=>ui,metadata:()=>gi,meter:()=>Vr,nav:()=>Un,object:()=>Ii,ol:()=>za,optgroup:()=>ga,option:()=>ja,output:()=>Qi,p:()=>Si,param:()=>ba,path:()=>Fa,pattern:()=>ki,picture:()=>ca,polygon:()=>Ua,polyline:()=>Ni,pre:()=>Bi,progress:()=>wa,q:()=>fa,radialGradient:()=>Ji,rect:()=>Wi,rp:()=>vi,rt:()=>qa,ruby:()=>ao,s:()=>Ei,samp:()=>to,script:()=>Kr,section:()=>Zn,select:()=>Za,small:()=>Xr,source:()=>ir,span:()=>tr,stop:()=>Pr,strong:()=>aa,style:()=>Gn,sub:()=>na,summary:()=>Or,sup:()=>jr,svg:()=>Lr,symbol:()=>sr,table:()=>gr,tbody:()=>Tr,td:()=>Ur,text:()=>lo,textPath:()=>Jn,textarea:()=>ri,tfoot:()=>pr,th:()=>ei,thead:()=>oi,time:()=>ur,title:()=>Sr,tr:()=>Oa,track:()=>yr,tspan:()=>fi,u:()=>li,ul:()=>hi,use:()=>Br,video:()=>Hn,view:()=>Li,wbr:()=>Ba,webview:()=>_a}),Gm=v();function Km(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var n,r,i,a,o=[],s=``,c=e.split(`/`);for(c[0]||c.shift();i=c.shift();)n=i[0],n===`*`?(o.push(n),s+=i[1]===`?`?`(?:/(.*))?`:`/(.*)`):n===`:`?(r=i.indexOf(`?`,1),a=i.indexOf(`.`,1),o.push(i.substring(1,~r?r:~a?a:i.length)),s+=~r&&!~a?`(?:/([^/]+?))?`:`/([^/]+?)`,~a&&(s+=(~r?`?`:``)+`\\`+i.substring(a))):s+=`/`+i;return{keys:o,pattern:RegExp(`^`+s+(t?`(?=$|/)`:`/?$`),`i`)}}var qm=ct(),Jm=q.useInsertionEffect,Ym=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0?q.useLayoutEffect:q.useEffect,Xm=Jm||Ym,Zm=e=>{let t=q.useRef([e,(...e)=>t[0](...e)]).current;return Xm(()=>{t[0]=e}),t[1]},Qm=[`popstate`,`pushState`,`replaceState`,`hashchange`],$m=[],eh=()=>$m.forEach(e=>e()),th=e=>($m.push(e)===1&&Qm.forEach(e=>addEventListener(e,eh)),()=>{$m=$m.filter(t=>t!==e),$m.length||Qm.forEach(e=>removeEventListener(e,eh))}),nh=(e,t)=>(0,qm.useSyncExternalStore)(th,e,t),rh=()=>location.search,ih=({ssrSearch:e}={})=>nh(rh,e==null?rh:()=>e),ah=()=>location.pathname,oh=({ssrPath:e}={})=>nh(ah,e==null?ah:()=>e),sh=(e,{replace:t=!1,state:n=null}={})=>history[t?`replaceState`:`pushState`](n,``,e),ch=e=>[oh(e),sh],lh=Symbol.for(`wouter_v3`);if(typeof history<`u`&&window[lh]===void 0){for(let e of[`pushState`,`replaceState`]){let t=history[e];history[e]=function(){let n=t.apply(this,arguments),r=new Event(e);return r.arguments=arguments,dispatchEvent(r),n}}Object.defineProperty(window,lh,{value:!0})}var uh=(e=``)=>e===`/`?``:e,dh=(e,t)=>e[0]===`~`?e.slice(1):uh(t)+e,fh=(e,t)=>(e=ph(uh(e)),t=ph(t),!e||(t.toLowerCase()+`/`).startsWith(e.toLowerCase()+`/`)?t.slice(e.length)||`/`:`~`+t),ph=e=>{try{return e.includes(`%`)?decodeURI(e):e}catch{return e}},mh={hook:ch,searchHook:ih,parser:Km,base:``,ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:e=>e,aroundNav:(e,t,n)=>e(t,n)},hh=(0,q.createContext)(mh),gh=()=>(0,q.useContext)(hh);(0,q.createContext)({});var _h=e=>{let[t,n]=e.hook(e);return[fh(e.base,t),Zm((t,r)=>e.aroundNav(n,dh(t,e.base),r))]},vh=()=>_h(gh());(0,q.forwardRef)((e,t)=>{let n=gh(),[r,i]=_h(n),{to:a=``,href:o=a,onClick:s,asChild:c,children:l,className:u,replace:d,state:f,transition:p,...m}=e;return m.onClick=Zm(t=>{t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||t.button!==0||(s?.(t),t.defaultPrevented||(t.preventDefault(),i(o,e)))}),m.href=n.hrefs(o[0]===`~`?o.slice(1):n.base+o,n),u!==void 0&&(m.className=u?.call?u(r===o):u),t&&(m.ref=t),c&&(0,q.isValidElement)(l)?(0,q.cloneElement)(l,m):(0,q.createElement)(`a`,m,l)});var yh=0,bh=0,xh=new Set;function Sh(){bh||yh>0||xh.size===0||(bh=requestAnimationFrame(()=>{if(bh=0,yh>0)return;let e=[...xh];xh.clear();for(let t of e)t()}))}function Ch(){return yh+=1,()=>{--yh,Sh()}}function wh({label:e}){return(0,q.useEffect)(Ch,[]),(0,K.jsx)(i,{stack:!0,label:e,size:32})}var Th={claude:`Claude Code`,codex:`Codex`,antigravity:`Antigravity`};function Eh(e,t){return e.harness===`claude`?t.find(t=>t.host===`claude`&&t.id===e.sessionId)?.id??null:t.filter(t=>t.host===e.harness).sort((e,t)=>t.since-e.since)[0]?.id??null}var Dh=e=>e.kind!==`none`&&e.kind!==`login`,Oh=e=>e.kind===`quiet`||e.kind===`command`&&e.stuck===!0,kh=e=>e.kind===`menu`||e.kind===`login`||e.kind===`error`?`amber`:e.kind===`quiet`||e.kind===`command`&&e.stuck?`grey`:null,Ah=(e,t)=>Math.max(1,Math.floor((t-e)/6e4));function jh(e,t,n,r){let i=Ah(e.since,t);switch(e.kind){case`menu`:return n(`daemon.waiting`);case`login`:return n(`daemon.login`);case`error`:return n(`daemon.error`);case`quiet`:return n(`daemon.quiet`,{minutes:i});case`command`:return e.stuck?n(`daemon.commandStuck`,{minutes:i}):n(`daemon.command`,{command:e.line??``,minutes:i});default:return r}}var Mh=new Set([`thinking`,`running`,`your-turn`,`needs-approval`]),Nh=new Set([`starting`,`queued`]),Ph=e=>e.daemon!==null&&kh(e.daemon.attention)===`amber`;function Fh(e){return(e.daemon?kh(e.daemon.attention)??(Nh.has(e.daemon.state)?`grey`:null):null)??(e.state===`needs-approval`?`amber`:null)}var Ih={"needs-approval":1,running:2,thinking:3,"your-turn":5};function Lh(e){if(Ph(e))return 0;let t=Fh(e);return e.state?t===`grey`&&e.state!==`needs-approval`?4:Ih[e.state]:t===`grey`?4:e.daemon?.state===`running`?2:5}function Rh(e,t){let n=e.filter(e=>Mh.has(e.state)),r=t&&t.state!==`ended`?t:null,i=r?Eh(r,n):null,a=n.map((e,t)=>({key:e.host&&e.id?`${e.host}:${e.id}`:`hook:${t}`,agent:e.agent,state:e.state,since:e.since,turn:e.turn??null,daemon:r&&i!==null&&e.id===i?r:null}));return r&&i===null&&a.push({key:`daemon:${r.taskId}`,agent:Th[r.harness]??r.harness,state:null,since:r.attention.since,turn:null,daemon:r}),a.sort((e,t)=>Lh(e)-Lh(t))}async function zh(e){let t=await fetch(`/api/agent/daemon`,{method:`POST`,credentials:`same-origin`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)}),n=await t.json().catch(()=>null);if(!t.ok||!n?.ok)throw Error(n?.error??`HTTP ${t.status}`);return n.data}function Bh(e){return{screen:async()=>{let t=await zh({artifact:e,op:`agent-screen`});return Array.isArray(t?.lines)?t.lines.filter(e=>typeof e==`string`):[]},input:async t=>{await zh({artifact:e,op:`agent-input`,...t})}}}var Vh=e=>new URLSearchParams(e).get(`agent`)===`1`;function Hh(){let[e,t]=(0,q.useState)([]),[n,r]=(0,q.useState)([]);return(0,q.useEffect)(()=>{let e=null,n,i=!1,a=()=>{e=new WebSocket(go(location)),e.onmessage=e=>{let n=JSON.parse(String(e.data));n.type===`agent-status`&&(t(n.sessions),r(n.daemon??[]))},e.onclose=()=>{t([]),r([]),i||(n=setTimeout(a,1e3))}};return a(),()=>{i=!0,clearTimeout(n),e?.close()}},[]),{sessions:e,daemon:n}}var Uh=(0,q.lazy)(()=>_(async()=>{let{AgentDock:e}=await import(`./AgentDock-aN5OSJ-J.js`);return{AgentDock:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]),import.meta.url).then(({AgentDock:e})=>({default:e})));function Wh({artifact:e}){let{sessions:t,daemon:n}=Hh(),r=n.find(t=>t.artifact===e)??null,i=(0,q.useMemo)(()=>Bh(e),[e]),a=Rh(t.filter(t=>t.artifacts.includes(e)),r);return a.length===0?null:(0,K.jsx)(q.Suspense,{fallback:null,children:(0,K.jsx)(Uh,{trusted:!0,rows:a,transport:r?i:null})})}var Gh=[`private`,`public`,`total`,`publishes`,`storage`,`objects`],Kh=e=>e===`preparing`||e===`uploading`||e===`publishing`;function qh(e){if(!e||typeof e!=`object`)return null;let t=e;return typeof t.phase!=`string`||![`waiting`,`preparing`,`uploading`,`publishing`,`not-ready`,`failed`,`published`].includes(t.phase)||t.publishedAt!==null&&(typeof t.publishedAt!=`string`||!Number.isFinite(Date.parse(t.publishedAt)))||typeof t.autoPublish!=`boolean`||t.message!==void 0&&typeof t.message!=`string`||t.reasons!==void 0&&(!Array.isArray(t.reasons)||!t.reasons.every(e=>typeof e==`string`))?null:t}var Jh=[`1d`,`7d`,`30d`,`never`],Yh=(e,t)=>!!e?.expiresAt&&Date.parse(e.expiresAt)<=t;function Xh(e){let t=e?.visibility??`private`,n=e?.cloud,r=!!n?.publishedAt;return{published:r,visibility:t,access:t===`private`&&n?.keyed?`key`:t,onProfile:n?.onProfile===!0,url:r?n.url:null,synced:!r||n.visibility===t}}function Zh(e,t){return e===null?null:e?`upToDate`:t?`localChangesAuto`:`localChanges`}var Qh=2e3,$h=1e3,eg=3e5;async function Z(e,t,n){try{let r=await fetch(l(`/api/cloud/${t}`),{method:e,cache:`no-store`,headers:n===void 0?{}:{"Content-Type":`application/json`},body:n===void 0?void 0:JSON.stringify(n)}),i=await r.json().catch(()=>({}));return{ok:r.ok,status:r.status,json:i}}catch(e){return{ok:!1,status:0,json:{error:e.message}}}}var tg=null,ng=null,rg,ig=null,ag=new Set;function og(){return ng??=Z(`GET`,`status`).then(e=>{if(ng=null,!e.ok)return null;tg=e.json;for(let e of ag)e(tg);return tg}),ng}function sg(e){return ag.add(e),ig??=ho(e=>{(e.type===`cloud-publication`||e.type===`cloud-published`)&&(clearTimeout(rg),rg=setTimeout(()=>void og(),$h))}),()=>{ag.delete(e),ag.size>0||(ig?.(),ig=null,clearTimeout(rg))}}function cg(){let[e,t]=(0,q.useState)(tg),[n,r]=(0,q.useState)(!1),i=(0,q.useRef)(null),a=(0,q.useCallback)(()=>og(),[]),o=(0,q.useCallback)(()=>{i.current!==null&&window.clearInterval(i.current),i.current=null,r(!1)},[]),s=(0,q.useCallback)(async e=>{let t=e??(await Z(`POST`,`login`,{source:`viewer`})).json.url;if(!t)return;window.open(t,`_blank`,`noopener`),o(),r(!0);let n=Date.now();i.current=window.setInterval(async()=>{((await a())?.signedIn||Date.now()-n>eg)&&o()},Qh)},[a,o]);return(0,q.useEffect)(()=>{let e=sg(t);return a(),()=>{e(),o()}},[a,o]),{status:e,refresh:a,login:s,waitingForLogin:n}}var lg=(0,q.createContext)(null);function ug({pageWindow:e,children:t}){return(0,K.jsx)(lg.Provider,{value:e??null,children:t})}var dg=()=>(0,q.useContext)(lg)??window;function fg(e,t){if(t===null)return e;let n=new URL(e);return n.searchParams.set(`page`,t),n.href}function pg(){let e=dg(),t=(0,q.useCallback)(t=>(e.addEventListener(`popstate`,t),e.addEventListener(`ryugi:pagechange`,t),()=>{e.removeEventListener(`popstate`,t),e.removeEventListener(`ryugi:pagechange`,t)}),[e]);return[(0,q.useSyncExternalStore)(t,()=>new URLSearchParams(e.location.search).get(`page`)),(0,q.useCallback)((t,n)=>{let r=new URL(e.location.href);r.searchParams.get(`page`)!==t&&(t===null?r.searchParams.delete(`page`):r.searchParams.set(`page`,t),e.history[n?`replaceState`:`pushState`](e.history.state,``,r),e.dispatchEvent(new Event(`ryugi:pagechange`)))},[e])]}var mg=[`B`,`KB`,`MB`,`GB`];function hg(e){let t=e,n=0;for(;t>=1024&&n<mg.length-1;)t/=1024,n++;return`${n===0?t:Number(t.toFixed(1))} ${mg[n]}`}function gg(e,t){return typeof e==`string`&&c.exists(`errors.${e}`)?c.t(`errors.${e}`):t}var _g=e=>typeof e==`object`&&!!e&&Gh.includes(e.kind)&&typeof e.max==`number`;function vg({kind:e,max:t}){return c.t(`planLimit.${e}`,{max:e===`storage`?hg(t):t})}function yg(e,t){return e.code===`plan_limit`&&_g(e.limit)?vg(e.limit):gg(e.code,typeof e.error==`string`?e.error:t)}var bg=!1,xg=new Set,Sg=e=>{if(bg!==e){bg=e;for(let e of xg)e()}},Cg=()=>Sg(!0),wg=()=>Sg(!1),Tg=()=>bg,Eg=e=>(xg.add(e),()=>xg.delete(e)),Dg=()=>(0,q.useSyncExternalStore)(Eg,Tg,Tg),Og=e=>e?e.replace(/\/+$/,``):null,kg=(e,t)=>{let n=Og(e);return n?`${n}${t?.toLowerCase().startsWith(`zh`)?`/zh`:``}`:null},Ag=e=>{let t=Og(e);return t?`${t}/`:null},jg=(e,t)=>{let n=Og(e);return n?`${n}/u/${encodeURIComponent(t)}`:null},Mg=e=>{let t=Og(e);return t?`${t}/billing`:null},Ng={summary:{k1xSpc:`x3nfvp2`,kGNEyG:`x6s0dn4`,kOIVth:`x17d4w8g`,kGuDYH:`xfifm61`,khDVqt:`xuxw1ft`,kMwMTN:`x7zghnd`,$$css:!0},card:{k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kOIVth:`x167g77z`,kmVPX3:`xc7ga6q`,k1K539:`xod5an3`,kaIpWk:`xu4hgxq`,kWkggS:`xqdcvd7`,kMwMTN:`x7zghnd`,$$css:!0},success:{kWkggS:`xsf6uxt`,kMwMTN:`xh0clw4`,$$css:!0},failed:{kWkggS:`x8yy6z1`,kMwMTN:`xpt3syw`,$$css:!0}};function Pg({publication:e,published:t,publishedAt:r,online:i,onPublish:a,compact:o=!1,busy:s=!1}){let{t:c,i18n:l}=n(),u=Cf(),f=e?.phase??(t?`published`:`waiting`),p=t&&f!==`published`,m=Kh(f),h=c(`publication.${p?`update_${f}`:f}`),g=m?Ue:f===`failed`?nt:f===`published`?le:Ro,_=f===`failed`?Ng.failed:f===`published`?Ng.success:void 0,v=(0,K.jsx)(vt,{"aria-hidden":`true`,icon:g,size:o?14:16,spin:m&&!u});if(o)return(0,K.jsxs)(`span`,{role:`status`,...d(Ng.summary,_),children:[v,h]});let y=e?.publishedAt??r,b=a&&!m&&f!==`published`&&f!==`not-ready`;return(0,K.jsxs)(`section`,{"aria-label":c(`publication.label`),...d(Ng.card,_),children:[(0,K.jsxs)(`div`,{role:`status`,className:`x78zum5 x6s0dn4 x167g77z xfifm61 x1s688f`,children:[v,h]}),(0,K.jsx)(`p`,{className:`x1ghz6dp x1bo0w0s x1qt5hsa x4q1cud`,children:c(p&&f===`waiting`?`publication.updateWaitingDescription`:p&&f===`failed`?`publication.updateFailedDescription`:`publication.${f}Description`)}),e?.message?(0,K.jsx)(`p`,{role:`alert`,className:`x1ghz6dp x1bo0w0s x1qt5hsa x4q1cud`,children:e.message}):null,e?.reasons?.length?(0,K.jsx)(`ul`,{className:`x1ghz6dp xwn43p0 x1j6dyjg x4q1cud`,children:e.reasons.map((e,t)=>(0,K.jsx)(`li`,{children:e},t))}):null,b?(0,K.jsxs)(`button`,{disabled:s,type:`button`,onClick:a,className:`x78zum5 x6s0dn4 xl56j7k x17d4w8g x1rz828m x36usyh xc342km x1sxf85j x19ckca5 xs0jrwl xln7xf2 xfifm61 x1ypdohk`,children:[(0,K.jsx)(xo,{"aria-hidden":`true`,size:14}),c(f===`failed`?`publication.retry`:`publication.publishNow`)]}):null,!m&&f!==`published`?(0,K.jsx)(`p`,{className:`x1ghz6dp x1bo0w0s x1qt5hsa x4q1cud`,children:c(i===!1?`publication.offline`:!a&&i===!0?`publication.updateLocal`:e?.autoPublish?`publication.autoPublish`:`publication.manualPublish`)}):null,p?(0,K.jsxs)(`p`,{className:`x1ghz6dp x1bo0w0s x1qt5hsa x4q1cud x1y1aw1k x178xt8z x13fuv20 xxu5053`,children:[c(`publication.previousVersion`),y?(0,K.jsxs)(K.Fragment,{children:[` `,(0,K.jsx)(`time`,{dateTime:y,children:new Date(y).toLocaleString(l.language)})]}):null]}):null]})}var Fg=(e,t)=>e===`public`&&(t===`private`||t===`unpublished`),Q={root:{k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kOIVth:`x195vfkc`,keoZOQ:`x1xmf6yo`,kLKAdn:`x1y1aw1k`,kEafiO:`x178xt8z`,kPef9Z:`x13fuv20`,kLZC3w:`xxu5053`,$$css:!0},summary:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x167g77z`,kzqmXN:`xh8yej3`,kmVPX3:`x14zjhkh`,kMzoRj:`xc342km`,kaIpWk:`xu4hgxq`,kWkggS:`xjbqb8w x9jwiqo`,kMwMTN:`xo2rkog`,kMv6JI:`xqfszdh`,kGuDYH:`xfifm61`,k9WMMc:`x1yc453h`,kkrTdU:`x1ypdohk`,$$css:!0},icon:{k1xSpc:`xrvj5dj`,kgQiWS:`x1ku5rj1`,kUk6DE:`x1okw0bk`,kzqmXN:`xvy4d1p`,kZKoxP:`xxk0z11`,kaIpWk:`x1kogg8i`,kWkggS:`xahzvm9`,kMwMTN:`x1bo0w0s`,$$css:!0},text:{kUk6DE:`x98rzlu`,k7Eaqz:`xeuugli`,kLWn49:`x1xfvgam`,$$css:!0},lead:{k1xSpc:`x1lliihq`,k63SB2:`x1s688f`,$$css:!0},sub:{k1xSpc:`x1lliihq`,kMwMTN:`xddlp02`,kGuDYH:`x1j6dyjg`,$$css:!0},chevron:{kMwMTN:`xddlp02`,$$css:!0},group:{k1xSpc:`x78zum5`,kjj79g:`x1qughib`,kogj98:`x12dmwbt`,kMwMTN:`xddlp02`,kGuDYH:`x1j6dyjg`,k63SB2:`xk50ysn`,$$css:!0},item:{k1xSpc:`x78zum5`,kGNEyG:`x1cy8zhl`,kOIVth:`x167g77z`,kmVPX3:`x14zjhkh`,$$css:!0},check:{kUk6DE:`x1okw0bk`,keoZOQ:`xvijh9v`,$$css:!0},body:{kUk6DE:`x98rzlu`,k7Eaqz:`xeuugli`,$$css:!0},name:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x17d4w8g`,k63SB2:`xk50ysn`,kLWn49:`x1xfvgam`,$$css:!0},title:{k7Eaqz:`xeuugli`,kVQacm:`xb3r6kr`,kg5iWk:`xlyipyv`,khDVqt:`xuxw1ft`,$$css:!0},type:{kUk6DE:`x1okw0bk`,kg3NbH:`xm9j1uf`,kaIpWk:`x12oqio5`,kWkggS:`xahzvm9`,kMwMTN:`x1bo0w0s`,kMv6JI:`x1fao0z8`,kGuDYH:`x1k6wstc`,$$css:!0},tag:{kUk6DE:`x1okw0bk`,kg3NbH:`xm9j1uf`,kaIpWk:`x12oqio5`,kMzoRj:`xmkeg23`,ksu8eU:`x1y0btm7`,kVAM5u:`x12xov25`,kMwMTN:`x1bo0w0s`,kGuDYH:`x1k6wstc`,$$css:!0},warnTag:{kVAM5u:`x9r1u3d`,kMwMTN:`x7zghnd`,$$css:!0},meta:{keoZOQ:`xvijh9v`,kMwMTN:`xddlp02`,kGuDYH:`x1j6dyjg`,kLWn49:`x37zpob`,$$css:!0},warn:{kMwMTN:`x7zghnd`,$$css:!0},error:{kMwMTN:`x12vcgws`,$$css:!0},action:{keoZOQ:`x1k70j0n`,$$css:!0}},Ig={pad:{kg3NbH:`x5k8d2m`,$$css:!0}},Lg=[{value:`private`,label:`share.onlyMe`,Icon:bo},{value:`public`,label:`share.anyone`,Icon:Ze}];function Rg({busy:e,error:t,onCopyFailed:r,onPublish:i,onVisibility:a,readOnly:o,rootVisibility:s,state:c,title:l,type:u,url:f,uses:p}){let{t:m}=n(),h=Fg(s,c),g=m(c===`public`?`cascade.tag.public`:c===`private`?`cascade.tag.private`:c===`unpublished`?`beside.unpublished`:`beside.unsupported`),_=async()=>{if(f)try{await navigator.clipboard.writeText(f)}catch{r?.()}},v=!o&&c!==`unsupported`,y=Q;return(0,K.jsxs)(`div`,{"data-beside-card":``,className:`x78zum5 xdt5ytf x195vfkc x1xmf6yo xe8ttls xmkeg23 x1y0btm7 x12xov25 xhpnuu7`,children:[(0,K.jsxs)(`span`,{className:`x78zum5 x6s0dn4 x1nejdyq xdd8z9q xddlp02 x1j6dyjg xk50ysn`,children:[(0,K.jsx)(Ho,{size:12}),m(`beside.title`)]}),(0,K.jsxs)(`span`,{...d(y.name,Ig.pad),children:[(0,K.jsx)(`span`,{...d(y.type),children:u}),(0,K.jsx)(`span`,{...d(y.title),children:l}),(0,K.jsx)(`span`,{...d(y.tag,h&&y.warnTag),children:g})]}),p||h?(0,K.jsxs)(`span`,{...d(y.meta,h&&y.warn,Ig.pad),children:[p?m(`referrers.uses`,{count:p}):null,p&&h?` · `:null,h?(0,K.jsx)(`span`,{"data-beside-hidden":``,children:m(`beside.hidden`)}):null]}):null,v||c!==`unsupported`?(0,K.jsxs)(`span`,{className:`x78zum5 x6s0dn4 x17d4w8g x1k70j0n x5k8d2m`,children:[v&&c===`unpublished`?(0,K.jsx)(R,{"data-beside-publish":``,disabled:e,size:`small`,onClick:()=>i?.(),children:m(`beside.publish`)}):null,v&&c!==`unpublished`?(0,K.jsx)(`span`,{role:`radiogroup`,className:`x3nfvp2 x1i3ajwb x1kogg8i xahzvm9`,children:Lg.map(({value:t,label:n,Icon:r})=>(0,K.jsxs)(`button`,{"aria-checked":t===c,"data-beside-visibility":t,disabled:e,role:`radio`,type:`button`,onClick:()=>t!==c&&a?.(t),...{0:{className:`x3nfvp2 x6s0dn4 x1jnr06f xf4egzd xdqyycr xc342km x1sxf85j xjbqb8w x1bo0w0s xqfszdh x1j6dyjg x1ypdohk`},1:{className:`x3nfvp2 x6s0dn4 x1jnr06f xf4egzd xdqyycr xc342km x1sxf85j xqfszdh x1j6dyjg x1ypdohk x1rozbrz xo2rkog`}}[t===c|0],children:[(0,K.jsx)(r,{size:11}),m(n)]},t))}):null,(0,K.jsx)(`span`,{className:`x98rzlu`}),(0,K.jsx)(R,{"aria-label":m(`beside.copyLink`),"data-beside-copy":``,disabled:!f,icon:Ve,size:`small`,onClick:()=>void _()})]}):null,t?(0,K.jsx)(`span`,{"data-beside-error":``,...d(y.meta,y.error,Ig.pad),children:t}):null]})}var zg=[`unpublished`,`stale`,`private`,`withdrawn`],Bg=[`unpublished`,`stale`];function Vg(e,t,n){let r=new Map(e.map(e=>[e.artifact,e])),i=e=>zg.includes(e.state)&&(t[e.artifact]??Bg.includes(e.state)),a=e=>n?e===n:!r.has(e),o=new Set,s=e=>{if(a(e))return!0;let t=r.get(e);return!!t&&o.has(e)&&(t.open||i(t))};for(let t=!0;t;){t=!1;for(let n of e)!o.has(n.artifact)&&n.parents.some(s)&&(o.add(n.artifact),t=!0)}return e.map(e=>{let{reason:t,upstream:n,...r}=e,a=e.state===`blocked`?e.blocked:void 0;return o.has(e.artifact)?{...r,checked:i(e),selectable:zg.includes(e.state),...a?{reason:a}:{}}:{...r,checked:!1,selectable:!1,reason:`upstream`,upstream:e.via??e.parents[0]}})}var Hg=e=>e.selectable?e.state===`private`?`private`:e.state===`withdrawn`?`skipped`:`publish`:e.state===`ready`?`ready`:`skipped`;function Ug({busy:e,error:t,includeRoot:r,items:i,offline:a,onPublish:o,results:s,rootVisibility:c}){let{t:l}=n(),[u,f]=(0,q.useState)(!1),[p,m]=(0,q.useState)({}),h=(0,q.useMemo)(()=>{let e=Vg(i,p);return a?e.map(e=>e.state===`private`?e:{...e,checked:!1,selectable:!1,reason:e.reason??`offline`}):e},[i,p,a]);if(!i.length)return null;let g=e=>i.find(t=>t.artifact===e)?.title??e,_=h.filter(e=>e.state!==`ready`&&e.state!==`private`).length,v=h.filter(e=>e.state===`private`&&!e.checked).length,y=h.filter(e=>e.checked),b=new Map((s??[]).filter(e=>e.status!==`published`).map(e=>[e.artifact,e])),x=h.some(e=>e.state!==`ready`),S=()=>o(y.filter(e=>e.state!==`private`).map(e=>e.artifact),y.filter(e=>e.state===`private`).map(e=>e.artifact)),C=e=>{let t=b.get(e.artifact);return t?.error?{text:t.error.error,tone:Q.error}:e.reason===`offline`?{text:l(`cascade.offline`),tone:null}:e.reason===`upstream`?{text:l(`cascade.upstream`,{via:g(e.upstream??``)}),tone:null}:{text:[e.state===`blocked`?e.reason??``:e.state===`private`?l(`cascade.private`):e.state===`ready`?``:l(`cascade.${e.state}`),e.via?l(`cascade.via`,{via:g(e.via)}):``].filter(Boolean).join(` · `),tone:e.state===`private`?Q.warn:null}},T=[`publish`,`private`,`skipped`,`ready`],E=x?(0,K.jsx)(R,{block:!0,"data-cascade-publish":``,disabled:!y.length||e,loading:e,type:r?`primary`:`default`,onClick:S,...d(Q.action),children:l(r?`cascade.publishWithRoot`:`cascade.publish`,{count:y.length})}):null;return(0,K.jsxs)(`div`,{...d(Q.root),children:[(0,K.jsxs)(`button`,{"aria-expanded":u,"data-cascade-summary":``,type:`button`,onClick:()=>f(e=>!e),...d(Q.summary),children:[(0,K.jsx)(`span`,{...d(Q.icon),children:(0,K.jsx)(Oe,{size:13})}),(0,K.jsxs)(`span`,{...d(Q.text),children:[(0,K.jsx)(`span`,{...d(Q.lead),children:_?l(`cascade.summaryPending`,{total:i.length,pending:_}):l(`cascade.summaryReady`,{total:i.length})}),v?(0,K.jsx)(`span`,{...d(Q.sub),children:l(`cascade.summaryLocked`,{count:v})}):null,a?(0,K.jsx)(`span`,{...d(Q.sub),children:l(`cascade.offlineHint`)}):null]}),u?(0,K.jsx)(w,{size:14,...d(Q.chevron)}):(0,K.jsx)($e,{size:14,...d(Q.chevron)})]}),u?T.map(t=>{let n=h.filter(e=>Hg(e)===t);if(!n.length)return null;let r=l(t===`publish`?`cascade.group.publish.${c}`:`cascade.group.${t}`);return(0,K.jsxs)(`div`,{"data-cascade-group":t,children:[(0,K.jsxs)(`div`,{...d(Q.group),children:[(0,K.jsx)(`span`,{children:r}),(0,K.jsx)(`span`,{children:n.length})]}),n.map(t=>{let n=C(t);return(0,K.jsxs)(`label`,{"data-cascade-item":t.artifact,...d(Q.item),children:[(0,K.jsx)(`span`,{...d(Q.check),children:(0,K.jsx)(Lp,{checked:t.checked,disabled:!t.selectable||e,onChange:e=>m(n=>({...n,[t.artifact]:e}))})}),(0,K.jsxs)(`span`,{...d(Q.body),children:[(0,K.jsxs)(`span`,{...d(Q.name),children:[(0,K.jsx)(`span`,{...d(Q.type),children:t.artifact.split(`/`)[0]}),(0,K.jsx)(`span`,{...d(Q.title),children:t.title}),t.state===`private`?(0,K.jsx)(`span`,{...d(Q.tag,Q.warnTag),children:l(`cascade.tag.private`)}):t.state===`ready`?(0,K.jsx)(`span`,{...d(Q.tag),children:l(`cascade.tag.${c}`)}):null]}),n.text?(0,K.jsx)(`span`,{...d(Q.meta,n.tone),children:n.text}):null]})]},t.artifact)})]},t)}):null,t?(0,K.jsx)(`span`,{...d(Q.meta,Q.error),children:t}):null,E]})}function Wg(e,t,n){let r=n?e.filter(e=>e.artifact!==n&&e.cloudId!==n):e,i=r.filter(e=>e.state!==`ready`);return{shown:r,hidden:i.length,allPrivate:i.length>0&&i.every(e=>e.state===`private`),visible:t===`public`&&i.length>0}}var Gg=[`private`,`unpublished`,`unlinked`,`ready`,`skipped`],Kg=e=>e===`withdrawn`||e===`blocked`?`skipped`:e;function qg({busy:e,cloudUnavailable:t,error:r,exclude:i,items:a,onPublish:o,results:s,rootVisibility:c}){let{t:l}=n(),[u,f]=(0,q.useState)(!1),[p,m]=(0,q.useState)({}),{shown:h,hidden:g,allPrivate:_,visible:v}=Wg(a,c,i);if(!v)return null;let y=e=>e.selectable&&(p[e.artifact]??e.checked),b=h.filter(y),x=new Map((s??[]).filter(e=>e.status!==`published`).map(e=>[e.artifact,e])),S=e=>{let t=x.get(e.artifact)?.error?.error;if(t)return{text:t,tone:Q.error};let n=e.state===`blocked`?e.reason:e.state===`withdrawn`?l(`referrers.withdrawn`):``;return{text:[l(`referrers.uses`,{count:e.uses}),n].filter(Boolean).join(` · `),tone:null}},C=()=>o(b.filter(e=>e.state!==`private`).map(e=>e.artifact),b.filter(e=>e.state===`private`).map(e=>e.artifact));return(0,K.jsxs)(`div`,{...d(Q.root),children:[(0,K.jsxs)(`button`,{"aria-expanded":u,"data-referrer-summary":``,type:`button`,onClick:()=>f(e=>!e),...d(Q.summary),children:[(0,K.jsx)(`span`,{...d(Q.icon),children:(0,K.jsx)(Ht,{size:13})}),(0,K.jsxs)(`span`,{...d(Q.text),children:[(0,K.jsx)(`span`,{...d(Q.lead),children:l(`referrers.summary`,{total:h.length})}),(0,K.jsx)(`span`,{...d(Q.sub,Q.warn),children:l(_?`referrers.hiddenPrivate`:`referrers.hidden`,{count:g})}),t?(0,K.jsx)(`span`,{...d(Q.sub),children:l(`referrers.cloudUnavailable`)}):null]}),u?(0,K.jsx)(w,{size:14,...d(Q.chevron)}):(0,K.jsx)($e,{size:14,...d(Q.chevron)})]}),u?Gg.map(t=>{let n=h.filter(e=>Kg(e.state)===t);return n.length?(0,K.jsxs)(`div`,{"data-referrer-group":t,children:[(0,K.jsxs)(`div`,{...d(Q.group),children:[(0,K.jsx)(`span`,{children:l(`referrers.group.${t}`)}),(0,K.jsx)(`span`,{children:n.length})]}),n.map(t=>{let n=S(t);return(0,K.jsxs)(`label`,{"data-referrer-item":t.artifact,...d(Q.item),children:[(0,K.jsx)(`span`,{...d(Q.check),children:(0,K.jsx)(Lp,{checked:y(t),disabled:!t.selectable||e,onChange:e=>m(n=>({...n,[t.artifact]:e}))})}),(0,K.jsxs)(`span`,{...d(Q.body),children:[(0,K.jsxs)(`span`,{...d(Q.name),children:[(0,K.jsx)(`span`,{...d(Q.type),children:`document`}),(0,K.jsx)(`span`,{...d(Q.title),children:t.title}),t.state===`private`?(0,K.jsx)(`span`,{...d(Q.tag,Q.warnTag),children:l(`cascade.tag.private`)}):t.state===`ready`?(0,K.jsx)(`span`,{...d(Q.tag),children:l(`cascade.tag.public`)}):null]}),(0,K.jsx)(`span`,{...d(Q.meta,n.tone),children:n.text})]})]},t.artifact)})]},t):null}):null,r?(0,K.jsx)(`span`,{...d(Q.meta,Q.error),children:r}):null,u?(0,K.jsx)(R,{block:!0,"data-referrer-publish":``,disabled:!b.length||e,loading:e,onClick:C,...d(Q.action),children:l(`referrers.publish`,{count:b.length})}):null]})}var Jg=864e5;function Yg({text:e,action:t,onConfirm:r,onCancel:i}){let{t:a}=n();return(0,K.jsxs)(`div`,{"data-share-confirm":``,className:`x1k70j0n xe8ttls xmkeg23 x1y0btm7 x12xov25 xu4hgxq x2fo67v`,children:[(0,K.jsx)(`p`,{className:`x1q6ys4k x1j6dyjg x37zpob`,children:e}),(0,K.jsxs)(`div`,{className:`x78zum5 x13a6bvl x17d4w8g`,children:[(0,K.jsx)(R,{"data-confirm":`no`,size:`small`,onClick:i,children:a(`common.cancel`)}),(0,K.jsx)(R,{"data-confirm":`yes`,size:`small`,type:`primary`,onClick:r,children:t})]})]})}function Xg({value:e,disabled:t,onExpiry:r,onRegenerate:i}){let{t:a,i18n:o}=n(),[s]=(0,q.useState)(()=>Date.now()),c=Yh(e,s),l=e.expiresAt?new Date(e.expiresAt).toLocaleDateString(o.language,{month:`short`,day:`numeric`}):null,u=e.expiresAt?c?a(`share.expired`,{date:l}):a(`share.expiresIn`,{count:Math.max(1,Math.ceil((Date.parse(e.expiresAt)-s)/Jg)),date:l}):a(`share.neverExpires`),d=Jh.map(e=>({value:e,label:a(`share.expiry.${e}`)}));return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`x78zum5 x1a02dak x6s0dn4 x1qughib x167g77z xwkmoec x1bo0w0s xfifm61`,children:[(0,K.jsxs)(`label`,{"data-key-expired":c?``:void 0,"data-key-expiry":``,className:`x1n2onr6 x3nfvp2 xeuugli xss6m8b`,children:[(0,K.jsx)(`span`,{className:`x10l6tqk x1i1rx1s xjm9jq1 xb3r6kr xuxw1ft x1hyvwdk`,children:a(`share.expiryLabel`)}),(0,K.jsx)(mo,{disabled:t,options:d,placeholder:(0,K.jsx)(`span`,{...{0:{},1:{className:`x12vcgws`}}[!!c|0],children:u}),prefix:fo,size:`small`,style:{width:`auto`,minWidth:0,fontSize:11},value:null,onSelect:e=>r(e)})]}),(0,K.jsx)(R,{"data-key-regenerate":``,disabled:t,icon:Xo,outdent:`end`,size:`small`,style:{fontSize:11},type:`text`,onClick:i,children:a(`share.regenerate`)})]}),c?(0,K.jsx)(`p`,{className:`x8k27cj x1bo0w0s x1j6dyjg x37zpob`,children:a(`share.expiredNote`)}):null]})}var Zg=[{value:`private`,label:`share.onlyMe`,hint:`share.onlyMeHint`,Icon:bo},{value:`key`,label:`share.keyHolders`,hint:`share.keyHint`,Icon:Ko},{value:`public`,label:`share.anyone`,hint:`share.anyoneHint`,Icon:Ze}],Qg={private:{text:`share.removeKeyConfirm`,action:`share.removeKey`},public:{text:`share.makePublicConfirm`,action:`share.makePublic`},regenerate:{text:`share.regenerateConfirm`,action:`share.regenerate`}};function $g({beside:e,cascade:t,children:r,foot:i,onCopyFailed:a,onVisibility:o,profile:s,referrers:c,saving:l=!1,shareKey:u,status:d,url:f,visibility:p}){let{t:m}=n(),[h,g]=(0,q.useState)(!1),[_,v]=(0,q.useState)(null),[y]=(0,q.useState)(()=>Date.now());(0,q.useEffect)(()=>{if(!h)return;let e=setTimeout(()=>g(!1),2e3);return()=>clearTimeout(e)},[h]);let b=u?.active?`key`:p,x=b===`key`?u?.value?.url??null:f,S=async()=>{if(x)try{await navigator.clipboard.writeText(x),g(!0)}catch{a?.()}},C=e=>{e!==b&&(e===`key`?u?.onSelect():b===`key`?v(e):o(e))},w=()=>{_===`private`?u?.onRemove():_===`public`?o(`public`):_===`regenerate`&&u?.onRegenerate(),v(null)},T=b===`key`?u?.value??null:null,E=Yh(T,y);return(0,K.jsxs)(`div`,{className:`x78zum5 xdt5ytf x195vfkc x58rd6w xqfszdh xfifm61`,children:[d,(0,K.jsx)(`p`,{className:`x1coi2bq xfifm61 x1s688f`,children:m(`share.whoCanSee`)}),(0,K.jsx)(`div`,{"aria-label":m(`share.whoCanSee`),role:`radiogroup`,className:`x78zum5 xdt5ytf x195vfkc`,children:Zg.filter(({value:e})=>e!==`key`||u).map(({value:e,label:t,hint:n,Icon:r})=>(0,K.jsxs)(`button`,{"aria-checked":e===b,"data-visibility":e,disabled:l,role:`radio`,type:`button`,onClick:()=>C(e),...{0:{className:`x78zum5 xh8yej3 x6s0dn4 x167g77z x1ruevkc xmkeg23 x1y0btm7 x9r1u3d xu4hgxq xjbqb8w x9jwiqo xo2rkog xqfszdh x1yc453h x1ypdohk`},1:{className:`x78zum5 xh8yej3 x6s0dn4 x167g77z x1ruevkc xmkeg23 x1y0btm7 xu4hgxq xo2rkog xqfszdh x1yc453h x1ypdohk xgcsv5v x15dg6x3`}}[e===b|0],children:[(0,K.jsx)(`span`,{...{0:{className:`xrvj5dj x1ku5rj1 x1okw0bk xvy4d1p xxk0z11 x1kogg8i xahzvm9`},1:{className:`xrvj5dj x1ku5rj1 x1okw0bk xvy4d1p xxk0z11 x1kogg8i x19ckca5 xs0jrwl`}}[e===b|0],children:(0,K.jsx)(r,{size:12})}),(0,K.jsxs)(`span`,{children:[(0,K.jsxs)(`span`,{className:`x1lliihq xfifm61 x1s688f xwn7fz2`,children:[m(t),e===`key`&&u?.locked?(0,K.jsx)(`span`,{"data-pro-badge":``,className:`xdzw4kq xm9j1uf xmkeg23 x1y0btm7 xgcsv5v x12oqio5 x1bo0w0s x1k6wstc x1s688f x1xxsxie`,children:m(`share.proBadge`)}):null]}),(0,K.jsx)(`span`,{className:`x1lliihq xddlp02 x1j6dyjg xwn7fz2`,children:m(n)})]})]},e))}),b===`public`&&s?(0,K.jsxs)(`div`,{className:`x78zum5 x6s0dn4 x1qughib x167g77z x16ngw23 x12ulsxz x1icxu4v x1bo0w0s x1j6dyjg xwn7fz2`,children:[(0,K.jsxs)(`span`,{children:[m(`share.showOnProfile`),s.path?(0,K.jsx)(`span`,{className:`x1lliihq xddlp02 x1j6dyjg xwn7fz2`,children:s.path}):null]}),(0,K.jsx)(`button`,{"aria-checked":s.shown,"aria-label":m(`share.showOnProfile`),"data-profile-switch":``,disabled:l,role:`switch`,type:`button`,onClick:()=>s.onChange(!s.shown),...{0:{className:`x1n2onr6 x1okw0bk xvy4d1p x1v9usgg x1717udv xc342km x1e6avla x15dg6x3 x1ypdohk`},1:{className:`x1n2onr6 x1okw0bk xvy4d1p x1v9usgg x1717udv xc342km x1e6avla x1ypdohk x19ckca5`}}[!!s.shown|0],children:(0,K.jsx)(`span`,{...{0:{className:`x10l6tqk xs7f9wi xaoy8p5 x1fsd2vl x170jfvy x16rqkct x1rozbrz x2hifos xgdialr`},1:{className:`x10l6tqk xs7f9wi x1fsd2vl x170jfvy x16rqkct x1rozbrz x2hifos xgdialr x1r4y97`}}[!!s.shown|0]})})]}):null,(0,K.jsxs)(`div`,{className:`x78zum5 x6s0dn4 x17d4w8g x1k70j0n`,children:[(0,K.jsx)(`input`,{readOnly:!0,"aria-label":m(`share.linkLabel`),"data-share-url":``,"data-struck":E?``:void 0,placeholder:m(b===`key`?`share.keyPending`:`share.linkPending`),value:x??``,onFocus:e=>e.currentTarget.select(),...{0:{className:`x98rzlu xeuugli xc342km x1a2a7pz xifx94n xdqyycr x1sxf85j x2fo67v x1bo0w0s x1fao0z8 x1j6dyjg xb3r6kr xlyipyv xuxw1ft`},1:{className:`x98rzlu xeuugli xc342km x1a2a7pz xifx94n xdqyycr x1sxf85j x2fo67v x1fao0z8 x1j6dyjg xb3r6kr xlyipyv xuxw1ft xc7n51q x5lhwog`}}[!!E|0]}),(0,K.jsx)(R,{disabled:!x,icon:yo,size:`small`,type:`primary`,onClick:()=>void S(),children:m(h?`share.copied`:`share.copy`)})]}),_?(0,K.jsx)(Yg,{action:m(Qg[_].action),text:m(Qg[_].text),onCancel:()=>v(null),onConfirm:w}):T&&u?(0,K.jsx)(Xg,{disabled:l,value:T,onExpiry:u.onExpiry,onRegenerate:()=>v(`regenerate`)}):null,i&&b!==`key`?(0,K.jsx)(`div`,{className:`x8k27cj xddlp02 x1j6dyjg`,children:i}):null,e?(0,K.jsx)(Rg,{...e}):null,t?(0,K.jsx)(Ug,{...t}):null,c?(0,K.jsx)(qg,{...c}):null,r]})}var e_=`ryugi.pendingCloudIntent`,t_=6e5;function n_(e,t){try{let n={artifact:e,intent:t,at:Date.now()};window.sessionStorage.setItem(e_,JSON.stringify(n))}catch{}}function r_(e){try{let t=window.sessionStorage.getItem(e_);if(!t)return null;let n=JSON.parse(t);return n.artifact!==e||n.intent!==`share`&&n.intent!==`phone`&&n.intent!==`sync`||typeof n.at!=`number`||Date.now()-n.at>t_?(typeof n.at==`number`&&Date.now()-n.at>t_&&window.sessionStorage.removeItem(e_),null):(window.sessionStorage.removeItem(e_),n.intent)}catch{return null}}function i_({origin:e}){let{t,i18n:r}=n(),i=e.replace(/\/+$/,``),a=r.language?.toLowerCase().startsWith(`zh`)?`/zh`:``;return(0,K.jsxs)(`p`,{className:`x1ghz6dp x1j6dyjg x1evy7pa xddlp02`,children:[t(`common.authLegalPrefix`),(0,K.jsx)(`a`,{href:`${i}${a}/terms`,rel:`noopener noreferrer`,target:`_blank`,className:`x1bo0w0s x1bvjpef xrys4gj`,children:t(`common.terms`)}),t(`common.authLegalAnd`),(0,K.jsx)(`a`,{href:`${i}${a}/privacy`,rel:`noopener noreferrer`,target:`_blank`,className:`x1bo0w0s x1bvjpef xrys4gj`,children:t(`common.privacy`)}),t(`common.authLegalSuffix`)]})}var a_=[{id:`share`,icon:Oe,titleKey:`cloudIntent.shareTitle`,descKey:`cloudIntent.shareDesc`},{id:`phone`,icon:ns,titleKey:`cloudIntent.phoneTitle`,descKey:`cloudIntent.phoneDesc`},{id:`sync`,icon:xo,titleKey:`cloudIntent.syncTitle`,descKey:`cloudIntent.syncDesc`}],o_={share:`cloudIntent.shareCta`,phone:`cloudIntent.phoneCta`,sync:`cloudIntent.syncCta`},s_={share:`cloudIntent.sharePrivacy`,phone:`cloudIntent.phonePrivacy`,sync:`cloudIntent.syncPrivacy`};function c_({origin:e,landingUrl:t,waitingForLogin:r,onStartIntent:i}){let{t:a}=n(),[o,s]=(0,q.useState)(`share`);return(0,K.jsxs)(`div`,{"data-intent-login-panel":``,className:`x78zum5 xdt5ytf x1v2ro7d x168biu4 xw7nakj xqfszdh xfifm61 xo2rkog`,children:[(0,K.jsxs)(`div`,{className:`x78zum5 x1cy8zhl x1qughib x167g77z`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`span`,{className:`x1lliihq x2ouz8m x1s688f xo2rkog`,children:a(`cloudIntent.heading`)}),(0,K.jsx)(`span`,{className:`x1lliihq x1qt5hsa x1bo0w0s xr9ek0c`,children:a(`cloudIntent.subheading`)})]}),(0,K.jsx)(`span`,{className:`x1s31vzs x1s688f x1o8fvuk x6z2zk2 xj8oexa xlkn9b3 x1e6avla xuxw1ft x2lah0s`,children:a(`cloudIntent.badge`)})]}),(0,K.jsx)(`div`,{"aria-label":a(`cloudIntent.heading`),role:`radiogroup`,className:`x78zum5 xdt5ytf x1j9xkj6`,children:a_.map(({id:e,icon:t,titleKey:n,descKey:r})=>{let i=o===e;return(0,K.jsxs)(`button`,{"aria-checked":i,"data-cloud-intent":e,role:`radio`,type:`button`,...{0:{className:`xh8yej3 x1yc453h x78zum5 x1cy8zhl x883omv x1m7iz9m xfoe8qy xmkeg23 x1y0btm7 x12xov25 x1qj25k6 x1q4ynmn x1rozbrz x9jwiqo x1ypdohk xqfszdh x1mimgl9`},1:{className:`xh8yej3 x1yc453h x78zum5 x1cy8zhl x883omv x1m7iz9m xfoe8qy xmkeg23 x1y0btm7 x1q4ynmn x1ypdohk xqfszdh x1mimgl9 x1ektstd x1xrkum6`}}[!!i|0],onClick:()=>s(e),children:[(0,K.jsx)(`span`,{"aria-hidden":`true`,...{0:{className:`x23j0i4 xd7y6wv xu4hgxq xahzvm9 xo2rkog xrvj5dj x1ku5rj1 x2lah0s xvijh9v`},1:{className:`x23j0i4 xd7y6wv xu4hgxq xrvj5dj x1ku5rj1 x2lah0s xvijh9v x1teopom x1cge3fn`}}[!!i|0],children:(0,K.jsx)(t,{size:14})}),(0,K.jsxs)(`span`,{className:`x98rzlu xeuugli`,children:[(0,K.jsx)(`span`,{className:`x1lliihq x1ct8sxb x1s688f xo2rkog`,children:a(n)}),(0,K.jsx)(`span`,{className:`x1lliihq x1j6dyjg x1bo0w0s xfrs9s4 xvijh9v`,children:a(r)})]}),(0,K.jsx)(`span`,{"aria-hidden":`true`,...{0:{className:`x1a00udw xx3o462 x16rqkct xvndefy x1y0btm7 xgcsv5v x2lah0s x1gslohp xrvj5dj x1ku5rj1 x9f619`},1:{className:`x1a00udw xx3o462 x16rqkct xvndefy x1y0btm7 x2lah0s x1gslohp xrvj5dj x1ku5rj1 x9f619 x1ektstd x15az74h`}}[!!i|0],children:i?(0,K.jsx)(`span`,{className:`x1ftt334 x1ycjhwn x16rqkct x1vi11w0`}):null})]},e)})}),(0,K.jsx)(R,{className:{className:`xh8yej3 x90ne7k x15az74h x12s0oaj x1ektstd x1w8fas2 xt9vybz xh88oxj`}.className,"data-cloud-intent-submit":``,icon:po,loading:r,type:`primary`,onClick:()=>i(o),children:a(r?`publish.waitingLogin`:o_[o])}),(0,K.jsxs)(`div`,{className:`x78zum5 x6s0dn4 x17d4w8g xknfcqp x1q4txso xur7f20 x2fo67v x1j6dyjg x1bo0w0s xfrs9s4`,children:[(0,K.jsx)(bo,{"aria-hidden":`true`,size:12,style:{flexShrink:0}}),(0,K.jsx)(`span`,{children:a(s_[o])})]}),(0,K.jsxs)(`div`,{className:`x78zum5 x6s0dn4 x1qughib x167g77z`,children:[(0,K.jsx)(i_,{origin:e}),t?(0,K.jsxs)(`a`,{href:t,rel:`noopener noreferrer`,target:`_blank`,className:`x3nfvp2 x6s0dn4 x1ed6fcf x1j6dyjg xddlp02 xytdrwj x1hl2dhg xuxw1ft`,children:[a(`cloudEntry.learnShort`),(0,K.jsx)(vo,{"aria-hidden":`true`,size:11})]}):null]})]})}var l_={bar:{kbCHJM:`x1nrll8i`,krVfgx:`xjnlgov`,k3aq6I:`xuuh30`,k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x1v2ro7d`,ks0D6T:`x4d2062`,kZKoxP:`xn3w4p2`,kB7OPa:`x9f619`,kZCmMZ:`x106a9eq`,kwRFfy:`x1icxu4v`,kMzoRj:`xmkeg23`,ksu8eU:`x1y0btm7`,kVAM5u:`x12xov25`,kaIpWk:`x1e6avla`,kWkggS:`x12ilycc`,kMwMTN:`xo2rkog`,kGVxlE:`x1gxogt1`,kGuDYH:`x4z9k3i`,kLWn49:`xo5v014`,khDVqt:`xuxw1ft`,$$css:!0},absolute:{kVAEAm:`x10l6tqk`,kY2c9j:`x1n327nk`,$$css:!0},fixed:{kVAEAm:`xixxii4`,kY2c9j:`x68pp3s`,$$css:!0},text:{k7Eaqz:`xeuugli`,kVQacm:`xb3r6kr`,kg5iWk:`xlyipyv`,$$css:!0},muted:{kMwMTN:`x1bo0w0s`,$$css:!0},changed:{kMwMTN:`xr46axq`,$$css:!0},agent:{kMwMTN:`x1yz8712`,$$css:!0},success:{kMwMTN:`xcqng5w`,$$css:!0},rule:{kzqmXN:`x1i1rx1s`,kZKoxP:`xlup9mm`,kmuXW:`x2lah0s`,kWkggS:`xh6qj2i`,$$css:!0},button:{k1xSpc:`x3nfvp2`,kGNEyG:`x6s0dn4`,kOIVth:`x17d4w8g`,kmuXW:`x2lah0s`,kZKoxP:`x10w6t97`,kMzoRj:`xc342km`,kaIpWk:`x1e6avla`,kMv6JI:`xjb2p0i`,kGuDYH:`x4z9k3i`,kkrTdU:`x1ypdohk`,$$css:!0},anchor:{kMnn75:`xkrqix3`,$$css:!0},primary:{kg3NbH:`xqin4a2`,kWkggS:`x19ckca5`,kMwMTN:`xs0jrwl`,k63SB2:`xk50ysn`,kSiTet:`x1hc1fzr x1k29llp`,$$css:!0},quiet:{kg3NbH:`xaope02`,kWkggS:`xjbqb8w xj0l527`,kMwMTN:`x1bo0w0s`,$$css:!0},link:{k1xSpc:`x3nfvp2`,kGNEyG:`x6s0dn4`,kOIVth:`x1jnr06f`,kmuXW:`x2lah0s`,kmVPX3:`x1717udv`,kMzoRj:`xc342km`,kWkggS:`xjbqb8w`,kMwMTN:`x1bo0w0s xytdrwj`,kMv6JI:`xjb2p0i`,kGuDYH:`x4z9k3i`,kMnn75:`xujl8zx`,k1TLXF:`x1tdp7nx`,kcSHmL:`xda060z`,kkrTdU:`x1ypdohk`,$$css:!0}};function u_({position:e,children:t,style:n,...r}){return(0,K.jsx)(`div`,{"data-action-bar":!0,...r,...d(l_.bar,l_[e]),style:n,children:t})}function d_({children:e,tone:t=`default`,limit:n}){return(0,K.jsx)(`span`,{...d(l_.text,t!=="default"&&l_[t]),style:n?{maxWidth:n}:void 0,children:e})}function f_(){return(0,K.jsx)(`span`,{className:`x1i1rx1s xlup9mm x2lah0s xh6qj2i`})}function p_({variant:e,children:t,...n}){return(0,K.jsx)(`a`,{...n,...d(l_.button,l_.anchor,l_[e]),children:t})}function m_({variant:e,children:t,...n}){return(0,K.jsx)(`button`,{type:`button`,...n,...d(e===`link`?l_.link:[l_.button,l_[e]]),children:t})}function h_({result:e,onDismiss:t,onOpenSharePanel:r}){let{t:i}=n(),[a,o]=(0,q.useState)(!1),[s,c]=(0,q.useState)(!!e.copied),l=async()=>{if(e.url)try{await navigator.clipboard.writeText(e.url),c(!0)}catch{}};return e.error?(0,K.jsxs)(u_,{"data-intent-toast":``,position:`fixed`,role:`status`,children:[(0,K.jsx)(d_,{limit:380,tone:`muted`,children:e.error}),(0,K.jsx)(m_,{variant:`primary`,onClick:r,children:i(`cloudIntent.viewDetails`)}),(0,K.jsx)(`button`,{"aria-label":i(`artboard.close`),type:`button`,className:`xgd8bvy x1fgtraw x1717udv xc342km x1e6avla xjbqb8w xj0l527 x1bo0w0s xrvj5dj x1ku5rj1 x1ypdohk x2lah0s`,onClick:t,children:(0,K.jsx)(ut,{size:13})})]}):(0,K.jsxs)(K.Fragment,{children:[a&&e.url?(0,K.jsxs)(`aside`,{"aria-label":i(`cloudIntent.qrTitle`),"data-intent-qr-popover":``,role:`dialog`,className:`xixxii4 x1nrll8i xhjxwu4 xuuh30 x12tvco5 x149cmgi xw7nakj x1tamke2 xmkeg23 x1y0btm7 x12xov25 xixl9f9 x12ilycc x1ytezby xo2rkog xqfszdh xfifm61 x78zum5 xdt5ytf x1v2ro7d`,children:[(0,K.jsxs)(`div`,{className:`x78zum5 x6s0dn4 x1qughib x167g77z`,children:[(0,K.jsx)(`span`,{className:`x4z9k3i x1s688f`,children:i(`cloudIntent.qrTitle`)}),(0,K.jsx)(`button`,{"aria-label":i(`artboard.close`),type:`button`,className:`xvy4d1p xxk0z11 x1717udv xc342km x1kogg8i xjbqb8w xj0l527 x1bo0w0s xrvj5dj x1ku5rj1 x1ypdohk`,onClick:()=>o(!1),children:(0,K.jsx)(ut,{size:13})})]}),(0,K.jsxs)(`div`,{className:`x78zum5 x6s0dn4 x1af02g3`,children:[(0,K.jsx)(`div`,{className:`x1ruevkc xmkeg23 x1y0btm7 x12xov25 x1q4ynmn xqm9i1m x2lah0s xrvj5dj x1ku5rj1`,children:(0,K.jsx)(Vm,{bgColor:`#ffffff`,bordered:!1,color:`#141416`,size:108,value:e.url})}),(0,K.jsxs)(`div`,{className:`x78zum5 xdt5ytf x167g77z xeuugli x98rzlu`,children:[(0,K.jsx)(`p`,{className:`x1ghz6dp x1qt5hsa x1jjo3f5 x1bo0w0s`,children:i(`cloudIntent.qrDesc`)}),(0,K.jsx)(`div`,{children:(0,K.jsx)(R,{icon:(0,K.jsx)(yo,{size:12}),size:`small`,onClick:()=>void l(),children:i(s?`cloudIntent.copied`:`cloudIntent.copyPhoneLink`)})})]})]}),e.billingUrl?(0,K.jsxs)(`div`,{className:`x78zum5 x6s0dn4 x1qughib x883omv x1m7iz9m xfoe8qy xmkeg23 x1y0btm7 x1jw0pk6 xhpnuu7 x1xrkum6 x1qt5hsa`,children:[(0,K.jsx)(`span`,{className:`x1bo0w0s xfrs9s4`,children:i(`cloudIntent.proRelayHint`)}),(0,K.jsxs)(`a`,{href:e.billingUrl,rel:`noopener noreferrer`,target:`_blank`,className:`x3nfvp2 x6s0dn4 xd7y6wv x1awh872 x1kogg8i x15az74h x12s0oaj xt9vybz x1qt5hsa xh88oxj x1hl2dhg xuxw1ft x2lah0s`,children:[i(`cloudIntent.proRelayCta`),` ↗`]})]}):null]}):null,(0,K.jsxs)(u_,{"data-intent-toast":``,position:`fixed`,role:`status`,children:[e.intent===`share`?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(d_,{limit:380,tone:`success`,children:e.copied?i(`cloudIntent.toastShareCopied`,{login:e.login}):i(`cloudIntent.toastShare`,{login:e.login})}),(0,K.jsx)(m_,{variant:`quiet`,onClick:r,children:i(`cloudIntent.changeAccess`)}),e.url?(0,K.jsxs)(p_,{href:e.url,rel:`noopener noreferrer`,target:`_blank`,variant:`primary`,children:[i(`cloudIntent.openLink`),` ↗`]}):null]}):e.intent===`phone`?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(d_,{limit:360,tone:`success`,children:i(`cloudIntent.toastPhone`)}),e.billingUrl?(0,K.jsx)(p_,{href:e.billingUrl,rel:`noopener noreferrer`,target:`_blank`,variant:`quiet`,children:i(`cloudIntent.learnRelay`)}):null,e.url?(0,K.jsx)(m_,{variant:`primary`,onClick:()=>o(e=>!e),children:i(a?`cloudIntent.hideQr`:`cloudIntent.showQr`)}):null]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(d_,{limit:380,tone:`success`,children:i(`cloudIntent.toastSync`,{login:e.login})}),(0,K.jsx)(m_,{variant:`quiet`,onClick:Cg,children:i(`cloudIntent.projectConfig`)}),e.dashboardUrl?(0,K.jsxs)(p_,{href:e.dashboardUrl,rel:`noopener noreferrer`,target:`_blank`,variant:`primary`,children:[i(`cloudEntry.openShort`),` ↗`]}):null]}),(0,K.jsx)(`button`,{"aria-label":i(`artboard.close`),type:`button`,className:`xgd8bvy x1fgtraw x1717udv xc342km x1e6avla xjbqb8w xj0l527 x1bo0w0s xrvj5dj x1ku5rj1 x1ypdohk x2lah0s`,onClick:()=>{o(!1),t()},children:(0,K.jsx)(ut,{size:13})})]})]})}var $={trigger:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x17d4w8g`,kZKoxP:`x1gnnpzl`,kg3NbH:`x1awh872`,kMzoRj:`xmkeg23`,ksu8eU:`x1y0btm7`,kVAM5u:`x12xov25`,kaIpWk:`xur7f20`,kWkggS:`x12ilycc xj0l527`,kMwMTN:`xo2rkog`,kMv6JI:`xqfszdh`,kGuDYH:`xfifm61`,kkrTdU:`x1ypdohk`,khDVqt:`xuxw1ft`,$$css:!0},shellCta:{kZKoxP:`x1fgtraw`,kZCmMZ:`xe2zdcy`,kwRFfy:`xpdmqnj`,kaIpWk:`x1e6avla`,kVAM5u:`x1rqon0r`,kWkggS:`x19ckca5 x1et1poy`,kMwMTN:`xs0jrwl`,k63SB2:`xk50ysn`,$$css:!0},brandDot:{kzqmXN:`x1v4s8kt`,kZKoxP:`xols6we`,kaIpWk:`x16rqkct`,kWkggS:`x1iug7pk`,kmuXW:`x2lah0s`,$$css:!0},floating:{kVAEAm:`xixxii4`,k87sOh:`x1tk7jg1`,kCIrl2:`xlftelb`,kY2c9j:`x1n327nk`,kGVxlE:`x1cqdj14`,$$css:!0},dot:{kzqmXN:`x1v4s8kt`,kZKoxP:`xols6we`,kaIpWk:`x16rqkct`,kWkggS:`xzkukvh`,$$css:!0},panel:{k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kOIVth:`x1v2ro7d`,kzqmXN:`x1m258z3`,kMv6JI:`xqfszdh`,kGuDYH:`xfifm61`,$$css:!0},row:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kjj79g:`x1qughib`,kOIVth:`x167g77z`,$$css:!0},muted:{kMwMTN:`x1bo0w0s`,kLWn49:`x1dbl2gt`,$$css:!0},link:{kUk6DE:`x98rzlu`,k7Eaqz:`xeuugli`,kVQacm:`xb3r6kr`,kg5iWk:`xlyipyv`,khDVqt:`xuxw1ft`,kMv6JI:`x1fao0z8`,kGuDYH:`x1j6dyjg`,kMwMTN:`x9f21nr`,$$css:!0},textButton:{kmVPX3:`x1717udv`,kMzoRj:`xc342km`,kWkggS:`xjbqb8w`,kMwMTN:`xddlp02`,kGuDYH:`x1j6dyjg`,kkrTdU:`x1ypdohk`,$$css:!0},danger:{kMwMTN:`x12vcgws`,$$css:!0},error:{kogj98:`x1ghz6dp`,kZCmMZ:`xwn43p0`,kMwMTN:`x12vcgws`,kLWn49:`x1dbl2gt`,$$css:!0},warning:{kMwMTN:`x7zghnd`,$$css:!0}};async function g_(e,t){let n=await fetch(`/api/artifacts`,{cache:`no-store`}).catch(()=>null);return n?.ok?(await n.json().catch(()=>null))?.artifacts?.find(n=>n.type===e&&n.id===t)?.title??null:null}function __(e,t,n,r){let i=e?.id?`${e.type}/${e.id}`:null,[a,o]=(0,q.useState)(null);if((0,q.useEffect)(()=>{if(!e?.id||!i)return;let t=!1;return g_(e.type,e.id).then(e=>{!t&&e&&o({key:i,text:e})}),()=>{t=!0}},[i]),!e||!i)return null;let s=Xh(t?.artifacts[i]),c=s.published?s.visibility:`unpublished`;return{key:i,card:{type:e.type,title:a?.key===i?a.text:e.id,state:c,rootVisibility:n,url:s.published?s.url:null,uses:r.find(e=>e.artifact===i)?.uses??null},hidden:Fg(n,c)}}var v_=800;function y_(e,t){let[n,r]=(0,q.useState)(null),i=(0,q.useCallback)(async()=>{if(!t)return;let n=await Z(`GET`,`sync/${e}`);n.ok&&r(typeof n.json.upToDate==`boolean`?n.json.upToDate:null)},[e,t]);return(0,q.useEffect)(()=>{if(!t){r(null);return}i();let n,a=ho(t=>{t.artifact!==e||t.type!==`change`&&t.type!==`cloud-published`||(clearTimeout(n),n=setTimeout(()=>void i(),v_))});return()=>{clearTimeout(n),a()}},[e,t,i]),{upToDate:n,refresh:i}}function b_(e,t){let[n,r]=(0,q.useState)(null);return(0,q.useEffect)(()=>{if(!t){r(null);return}let n=!1,i=0,a=async()=>{let t=++i,a=await Z(`GET`,`publication/${e}`),o=a.ok&&qh(a.json);!n&&t===i&&o&&r(o)};a();let o=ho(t=>{t.artifact===e&&(t.type===`cloud-publication`&&(i++,r(t.publication)),(t.type===`change`||t.type===`cloud-published`)&&a())});return()=>{n=!0,o()}},[e,t]),n}var x_=e=>e.json.results??null;function S_(e){let[t,n]=(0,q.useState)([]),[r,i]=(0,q.useState)(null),[a,o]=(0,q.useState)([]),[s,c]=(0,q.useState)(null),[l,u]=(0,q.useState)(!1);return{refs:t,results:r,referrers:a,referrerResults:s,cloudUnavailable:l,load:(0,q.useCallback)(async()=>{let t=await Z(`GET`,`refs/${e}`);t.ok&&(Array.isArray(t.json.items)&&n(t.json.items),o(Array.isArray(t.json.referrers)?t.json.referrers:[]),u(t.json.cloudUnavailable===!0))},[e]),publishRefs:async(t,n,r,a)=>{if(!t){let t=await Z(`POST`,`publish/${e}`);if(!t.ok)return t}let o=await Z(`POST`,`publish-refs/${e}`,{visibility:n,refs:r,makePublic:a});return o.ok&&i(x_(o)),o},publishReferrers:async(t,n)=>{let r=await Z(`POST`,`publish-referrers/${e}`,{publish:t,makePublic:n});return r.ok&&c(x_(r)),r}}}function C_(){let[e,t]=(0,q.useState)({role:null,other:null});return(0,q.useEffect)(()=>{if(!Xe())return;let e=it(e=>{e.kind===`split-role`&&t({role:e.role,other:e.other})});return tt({kind:`want-role`}),e},[]),e}var w_={private:`publish.hintPrivate`,public:`publish.hintPublic`};function T_({artifact:e,floating:t=!1,shell:r=!1}){let{t:i,i18n:a}=n(),{status:o,refresh:s,login:c,waitingForLogin:l}=cg(),u=C_(),[f,p]=(0,q.useState)(!1),[m,h]=(0,q.useState)(!1),[g,_]=(0,q.useState)([]),[v,y]=(0,q.useState)(null),[b,x]=(0,q.useState)(null),[S,C]=(0,q.useState)(null),w=(0,q.useRef)(!1),T=o?.artifacts?.[e],E=Xh(T),D=b_(e,!!o?.signedIn),O=D&&Kh(D.phase),[k]=pg(),ee=E.url?fg(E.url,k):null,A=y_(e,!!o?.signedIn&&E.published),te=Zh(A.upToDate,!!o?.autoPublish?.enabled&&T?.autoPublish!==!1),j=S_(e),{refs:ne,referrers:re}=j,M=async e=>{h(!0),_([]),y(null);let t=await e();if(`shareKey`in t.json&&x(t.ok?t.json.shareKey:null),t.status===401)c(t.json.loginUrl);else if(!t.ok){t.json.code===`plan_required`&&typeof t.json.upgradeUrl==`string`&&y(t.json.upgradeUrl);let e=Array.isArray(t.json.reasons)?t.json.reasons:[];_([yg(t.json,i(`common.requestFailed`,{status:t.status})),...e])}await Promise.all([s(),A.refresh(),j.load()]),h(!1)},ie=!E.published&&ne.some(e=>e.checked),ae=E.published?E.visibility:null,oe=__(u.role===`primary`?u.other:null,o,ae,re),se=t=>M(()=>Z(`POST`,`visibility/${e}`,{visibility:t})),N=(t={})=>M(()=>Z(`PUT`,`share-key/${e}`,t)),le=async t=>{if(p(t),t&&o?.signedIn&&j.load(),t&&o?.signedIn&&E.published){if(A.refresh(),E.access===`key`){let t=await Z(`GET`,`share-key/${e}`);t.ok&&x(t.json.shareKey)}(await Z(`GET`,`artifacts`)).ok&&await s()}},P=t=>{n_(e,t),c()};(0,q.useEffect)(()=>{if(!o?.signedIn||!o.login||w.current)return;let t=r_(e);if(!t)return;w.current=!0;let n=o.login,r=o.origin;(async()=>{p(!1),h(!0),_([]),y(null);try{if(t===`sync`){let a=await Z(`POST`,`auto-publish`,{scope:`global`,value:!0});if(!a.ok){C({intent:t,login:n,url:null,dashboardUrl:Ag(r),billingUrl:Mg(r),error:yg(a.json,i(`common.requestFailed`,{status:a.status}))});return}Z(`POST`,`publish/${e}`),await s(),C({intent:t,login:n,url:null,dashboardUrl:Ag(r),billingUrl:Mg(r)});return}let a=await Z(`POST`,`publish/${e}`),o=await s();if(await Promise.all([A.refresh(),j.load()]),!a.ok){a.json.code===`plan_required`&&typeof a.json.upgradeUrl==`string`&&y(a.json.upgradeUrl);let e=Array.isArray(a.json.reasons)?a.json.reasons:[],o=yg(a.json,i(`common.requestFailed`,{status:a.status}));_([o,...e]),C({intent:t,login:n,url:null,dashboardUrl:Ag(r),billingUrl:Mg(r),error:o});return}let c=Xh(o?.artifacts?.[e]).url??(typeof a.json.url==`string`?a.json.url:null),l=c?fg(c,k):null,u=!1;if(t===`share`&&l)try{await navigator.clipboard.writeText(l),u=!0}catch{u=!1}C({intent:t,login:n,url:l,copied:u,dashboardUrl:Ag(r),billingUrl:Mg(r)})}finally{h(!1),w.current=!1}})()},[e,o?.signedIn,o?.login,o?.origin,k,s]);let ue=kg(o?.origin,a.language),F=Ag(o?.origin),de=o?o.signedIn?(0,K.jsxs)(`div`,{...d($.panel),children:[(0,K.jsxs)(`div`,{...d($.row),children:[(0,K.jsx)(`span`,{...d($.muted),children:i(`publish.signedInAs`,{login:o.login})}),(0,K.jsx)(`button`,{type:`button`,...d($.textButton),onClick:()=>void M(()=>Z(`POST`,`logout`)),children:i(`publish.signOut`)})]}),(0,K.jsx)($g,{foot:i(w_[E.visibility]),saving:m,url:ee,visibility:E.visibility,beside:oe?{...oe.card,busy:m,onVisibility:e=>void M(()=>Z(`POST`,`visibility/${oe.key}`,{visibility:e})),onPublish:()=>void M(()=>Z(`POST`,`publish/${oe.key}`,{visibility:E.visibility}))}:null,cascade:{items:ne,rootVisibility:E.visibility,busy:m,results:j.results,includeRoot:!E.published,onPublish:(e,t)=>void M(()=>j.publishRefs(E.published,E.visibility,e,t))},profile:E.published?{shown:E.onProfile,path:o.login?`/u/${o.login}`:null,onChange:t=>void M(()=>Z(`POST`,`profile/${e}`,{shown:t}))}:null,referrers:{items:re,exclude:oe?.key,rootVisibility:ae,busy:m,cloudUnavailable:j.cloudUnavailable,results:j.referrerResults,onPublish:(e,t)=>void M(()=>j.publishReferrers(e,t))},shareKey:{active:E.access===`key`,value:b,onSelect:()=>void N(),onExpiry:e=>void N({expires:e}),onRegenerate:()=>void N({regenerate:!0}),onRemove:()=>void M(()=>Z(`DELETE`,`share-key/${e}`))},status:(0,K.jsx)(Pg,{online:!0,busy:m,publication:D,published:E.published,publishedAt:T?.cloud?.publishedAt,onPublish:ie?void 0:()=>void M(()=>Z(`POST`,`publish/${e}`))}),onVisibility:e=>void se(e)}),te?(0,K.jsx)(`span`,{...d(A.upToDate?$.muted:$.warning),children:i(`publish.${te}`)}):null,E.synced?null:(0,K.jsxs)(`div`,{...d($.row,$.warning),children:[(0,K.jsx)(`span`,{children:i(`publish.visibilityNotSynced`)}),(0,K.jsx)(R,{disabled:m,size:`small`,onClick:()=>void se(E.visibility),children:i(`publish.sync`)})]}),g.length>0?(0,K.jsx)(`ul`,{...d($.error),children:g.map(e=>(0,K.jsx)(`li`,{children:e},e))}):null,v?(0,K.jsx)(`a`,{"data-upgrade":``,href:v,rel:`noreferrer`,target:`_blank`,...d($.textButton),children:i(`share.seePlans`)}):null,E.published&&(!D||D.phase===`published`)?(0,K.jsx)(R,{loading:m||!!O,type:`primary`,onClick:()=>void M(()=>Z(`POST`,`publish/${e}`)),children:i(`publish.update`)}):null,E.published?(0,K.jsx)(`button`,{disabled:m,type:`button`,...d($.textButton,$.danger),onClick:()=>void M(()=>Z(`DELETE`,`publish/${e}`)),children:i(`publish.unpublish`)}):null,E.published&&o.autoPublish?.enabled?(0,K.jsx)(`span`,{...d($.muted),children:i(`publish.autoPublishNote`)}):null,(0,K.jsxs)(`div`,{...d($.row,$.muted),children:[(0,K.jsx)(`span`,{children:i(`settings.menuStatus`,{state:o.autoPublish?.enabled?i(`settings.on`):i(`settings.off`)})}),(0,K.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:10},children:[F?(0,K.jsxs)(`a`,{href:F,rel:`noopener noreferrer`,target:`_blank`,...d($.textButton),children:[i(`cloudEntry.openShort`),` `,(0,K.jsx)(vo,{"aria-hidden":`true`,size:11})]}):null,(0,K.jsx)(`button`,{type:`button`,...d($.textButton),onClick:Cg,children:i(`publish.openSettings`)})]})]})]}):(0,K.jsx)(c_,{landingUrl:ue,origin:o.origin,waitingForLogin:l,onStartIntent:P}):(0,K.jsx)(`div`,{...d($.panel,$.muted),children:i(`publish.readingStatus`)});if(u.role===`beside`||ce())return null;let I=r&&!!o&&!o.signedIn;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Wt,{content:de,open:f,placement:`bottomRight`,popupProps:{"aria-label":i(`common.share`)},trigger:`click`,onOpenChange:e=>void le(e),children:(0,K.jsxs)(`button`,{"aria-label":`Share`,"data-cloud-shell-cta":I?``:void 0,type:`button`,...d($.trigger,t&&$.floating,I&&$.shellCta),children:[I?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{"aria-hidden":`true`,...d($.brandDot)}),i(`cloudEntry.shellCta`)]}):(0,K.jsxs)(K.Fragment,{children:[E.published&&E.visibility===`public`?(0,K.jsx)(Ze,{size:14}):(0,K.jsx)(bo,{size:14}),E.published?i(`publish.published`):i(`common.share`)]}),D&&D.phase!==`published`?(0,K.jsx)(Pg,{compact:!0,publication:D,published:E.published}):null,A.upToDate===!1?(0,K.jsx)(`span`,{"aria-label":i(`publish.unpublishedChanges`),...d($.dot)}):null,oe?.hidden?(0,K.jsx)(`span`,{"aria-label":i(`beside.hidden`),"data-beside-dot":``,...d($.dot)}):null]})}),S?(0,K.jsx)(h_,{result:S,onDismiss:()=>C(null),onOpenSharePanel:()=>{C(null),le(!0)}}):null]})}function E_(e,t){let n=e.parentElement?.closest(`a, button`)??e,r=window.matchMedia(`(prefers-reduced-motion: reduce)`),i=null,o=()=>{if(r.matches||i)return;let{from:e,to:n,duration:o,easing:s}=a.sweep,c=t.animate([{transform:e},{transform:n}],{duration:o,easing:s});i=c,c.onfinish=c.oncancel=()=>{i=null}},s=()=>{n.matches(`:focus-visible`)&&o()};return n.addEventListener(`pointerenter`,o),n.addEventListener(`focus`,s),()=>{n.removeEventListener(`pointerenter`,o),n.removeEventListener(`focus`,s),i?.cancel()}}function D_({ink:e,clip:t,seal:n}){return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`g`,{dangerouslySetInnerHTML:{__html:u},fill:e,transform:a.markTransform}),(0,K.jsxs)(`g`,{fill:`none`,stroke:e,strokeLinejoin:`round`,strokeWidth:a.strokeWidth,transform:a.wordTransform,children:[a.butt.map(e=>(0,K.jsx)(`path`,{d:e,strokeLinecap:`butt`},e)),a.round.map(e=>(0,K.jsx)(`path`,{d:e,strokeLinecap:`round`},e)),(0,K.jsx)(`g`,{clipPath:`url(#${t})`,children:a.clipped.map(e=>(0,K.jsx)(`path`,{d:e,strokeLinecap:`butt`},e))}),(0,K.jsx)(`rect`,{height:a.seal.size,rx:a.seal.rx,stroke:`none`,width:a.seal.size,x:a.seal.x,y:a.seal.y,...n})]})]})}function O_({height:e=22,title:t,contextMenu:r=!0}){let{t:i}=n(),s=p((0,q.useId)()),c=(0,q.useRef)(null),l=(0,q.useRef)(null);(0,q.useEffect)(()=>E_(c.current,l.current),[]);let u=async(e,t)=>{try{await navigator.clipboard.writeText(o(e)),$t.success(i(t))}catch{$t.error(i(`brand.copyFailed`))}},d=e=>{r&&(e.preventDefault(),e.stopPropagation(),Kt([{key:`copy-svg`,label:i(`brand.copySvg`),icon:yo,onClick:()=>void u(`lockup`,`brand.copiedSvg`)},{key:`copy-logo-svg`,label:i(`brand.copyLogoSvg`),icon:ge,onClick:()=>void u(`mark`,`brand.copiedLogoSvg`)},{key:`copy-text-svg`,label:i(`brand.copyTextSvg`),icon:ze,onClick:()=>void u(`wordmark`,`brand.copiedTextSvg`)}]))},f=`${s}-clip`,m=`${s}-mask`,h=`${s}-ember`;return(0,K.jsxs)(`svg`,{ref:c,...t?{role:`img`,"aria-label":t}:{"aria-hidden":!0},height:e,viewBox:a.viewBox,width:Math.round(e*a.width/a.height*100)/100,onContextMenu:r?d:void 0,className:`x1lliihq x2lah0s`,children:[(0,K.jsxs)(`defs`,{children:[(0,K.jsx)(`clipPath`,{id:f,children:(0,K.jsx)(`rect`,{...a.clipRect})}),(0,K.jsx)(`linearGradient`,{id:h,children:a.bandStops.map(e=>(0,K.jsx)(`stop`,{offset:e.offset,stopColor:e.color,stopOpacity:e.opacity},e.offset))}),(0,K.jsx)(`mask`,{id:m,maskUnits:`userSpaceOnUse`,...a.mask,children:(0,K.jsx)(D_,{clip:f,ink:`#fff`,seal:{fill:`#fff`}})})]}),(0,K.jsx)(D_,{clip:f,ink:`currentColor`,seal:{className:`xe8yr7n x1tl3b4t`}}),(0,K.jsx)(`g`,{mask:`url(#${m})`,children:(0,K.jsx)(`rect`,{fill:`url(#${h})`,ref:l,...a.band})})]})}var k_=e=>{e&&window.open(e,`_blank`,`noopener,noreferrer`)};function A_({compact:e=!1,status:t,waitingForLogin:r,onSignIn:i,onSignOut:a}){let{t:o,i18n:s}=n();if(!t)return null;if(!t.signedIn||!t.login){let e=kg(t.origin,s.language),n=(0,K.jsxs)(`div`,{"data-cloud-connect-panel":``,className:`x78zum5 xdt5ytf x1v2ro7d x1m258z3 xqfszdh xfifm61 xo2rkog`,children:[(0,K.jsxs)(`div`,{className:`x78zum5 x6s0dn4 x1qughib x167g77z`,children:[(0,K.jsxs)(`span`,{className:`x3nfvp2 x6s0dn4 x1j9xkj6 x4z9k3i x1s688f`,children:[(0,K.jsx)(`span`,{"aria-hidden":`true`,className:`x17z2i9w x17rw0jw x1kogg8i x6z2zk2 x1cge3fn xrvj5dj x1ku5rj1 x2lah0s`,children:(0,K.jsx)(Bo,{size:13})}),o(`cloudEntry.connectTitle`)]}),(0,K.jsx)(`span`,{className:`x1j6dyjg xddlp02`,children:o(`cloudEntry.freeStart`)})]}),(0,K.jsxs)(`div`,{className:`x78zum5 xdt5ytf x17d4w8g`,children:[(0,K.jsxs)(`div`,{className:`x78zum5 x1cy8zhl xmmi0ta x1vvogim x1awh872 xur7f20 xmkeg23 x1y0btm7 x12xov25 x2fo67v`,children:[(0,K.jsx)(Oe,{"aria-hidden":`true`,size:14,className:`x1cge3fn x2lah0s xr9ek0c`}),(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`span`,{className:`x1lliihq xfifm61 xh88oxj xo2rkog`,children:o(`cloudEntry.benefitShareTitle`)}),(0,K.jsx)(`span`,{className:`x1lliihq x1j6dyjg x1bo0w0s xfrs9s4`,children:o(`cloudEntry.benefitShareBody`)})]})]}),(0,K.jsxs)(`div`,{className:`x78zum5 x1cy8zhl xmmi0ta x1vvogim x1awh872 xur7f20 xmkeg23 x1y0btm7 x12xov25 x2fo67v`,children:[(0,K.jsx)(ns,{"aria-hidden":`true`,size:14,className:`x1cge3fn x2lah0s xr9ek0c`}),(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`span`,{className:`x1lliihq xfifm61 xh88oxj xo2rkog`,children:o(`cloudEntry.benefitPhoneTitle`)}),(0,K.jsx)(`span`,{className:`x1lliihq x1j6dyjg x1bo0w0s xfrs9s4`,children:o(`cloudEntry.benefitPhoneBody`)})]})]}),(0,K.jsxs)(`div`,{className:`x78zum5 x1cy8zhl xmmi0ta x1vvogim x1awh872 xur7f20 xmkeg23 x1y0btm7 x12xov25 x2fo67v`,children:[(0,K.jsx)(xo,{"aria-hidden":`true`,size:14,className:`x1cge3fn x2lah0s xr9ek0c`}),(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`span`,{className:`x1lliihq xfifm61 xh88oxj xo2rkog`,children:o(`cloudEntry.benefitSyncTitle`)}),(0,K.jsx)(`span`,{className:`x1lliihq x1j6dyjg x1bo0w0s xfrs9s4`,children:o(`cloudEntry.benefitSyncBody`)})]})]})]}),(0,K.jsx)(R,{className:{className:`xh8yej3 x90ne7k x3nfvp2 x6s0dn4 xl56j7k x1j9xkj6 xc342km xur7f20 x15az74h x12s0oaj xt9vybz xqfszdh x1ct8sxb xh88oxj x1ypdohk`}.className,icon:po,loading:r,type:`primary`,onClick:i,children:o(r?`settings.waitingLogin`:`common.signInGithub`)}),(0,K.jsxs)(`div`,{className:`x78zum5 x6s0dn4 x1nejdyq x1j6dyjg xddlp02 xfrs9s4`,children:[(0,K.jsx)(bo,{"aria-hidden":`true`,size:11}),(0,K.jsx)(`span`,{children:o(`cloudEntry.privateByDefault`)})]}),(0,K.jsxs)(`div`,{className:`x78zum5 x6s0dn4 x1qughib x167g77z`,children:[(0,K.jsx)(i_,{origin:t.origin}),e?(0,K.jsxs)(`a`,{href:e,rel:`noopener noreferrer`,target:`_blank`,className:`x3nfvp2 x6s0dn4 x1ed6fcf x1j6dyjg xddlp02 xytdrwj x1hl2dhg xuxw1ft`,children:[o(`cloudEntry.learnShort`),(0,K.jsx)(vo,{"aria-hidden":`true`,size:11})]}):null]})]});return(0,K.jsx)(Wt,{content:n,placement:`bottomRight`,popupProps:{"aria-label":o(`cloudEntry.connectTitle`)},trigger:`click`,children:(0,K.jsxs)(`button`,{"data-cloud-connect-cta":``,type:`button`,className:`x3nfvp2 x6s0dn4 x1j9xkj6 x1gnnpzl xe2zdcy xpdmqnj xmkeg23 x1y0btm7 x1rqon0r x1e6avla x19ckca5 x1et1poy xs0jrwl xqfszdh xfifm61 xk50ysn xuxw1ft x1ypdohk xlee54d x784prv x9v5kkp xv8siiq x7s97pk`,children:[(0,K.jsx)(`span`,{"aria-hidden":`true`,className:`x1v4s8kt xols6we x16rqkct x1iug7pk x2lah0s`}),(0,K.jsx)(`span`,{children:o(`cloudEntry.connectCta`)}),(0,K.jsx)(`span`,{className:`x1pixwil xpilrb4 x1t7ytsu x13ft1s6 x1j6dyjg xo1l8bm xf9vgkq xy0uqqd`,children:o(`cloudEntry.connectHint`)})]})})}let c=t.login,l=Ag(t.origin);return(0,K.jsxs)(K.Fragment,{children:[!e&&l?(0,K.jsxs)(`a`,{"data-cloud-header-link":``,href:l,rel:`noopener noreferrer`,target:`_blank`,className:`x3nfvp2 x6s0dn4 x1nejdyq x1fgtraw xdqyycr x1kogg8i xjbqb8w xj0l527 x1bo0w0s xytdrwj xfifm61 xk50ysn x1hl2dhg xuxw1ft x1gz44f`,children:[(0,K.jsx)(Bo,{"aria-hidden":`true`,size:13}),(0,K.jsx)(`span`,{children:`Cloud`}),(0,K.jsx)(vo,{"aria-hidden":`true`,size:12})]}):null,(0,K.jsx)(Vt,{items:[{key:`status`,disabled:!0,label:`${c} · ${o(`settings.menuStatus`,{state:t.autoPublish?.enabled?o(`settings.on`):o(`settings.off`)})}`},{type:`divider`,key:`cloud-divider`},{key:`open-cloud`,icon:Bo,label:o(`cloudEntry.openCloud`),extra:`↗`,onClick:()=>k_(l)},{key:`public-profile`,icon:Ze,label:o(`cloudEntry.publicProfile`),extra:`/u/${c} ↗`,onClick:()=>k_(jg(t.origin,c))},{key:`plans`,icon:Wo,label:o(`cloudEntry.plans`),extra:`↗`,onClick:()=>k_(Mg(t.origin))},{type:`divider`,key:`settings-divider`},{key:`settings`,icon:es,label:o(`settings.open`),onClick:Cg},{key:`sign-out`,icon:Jo,label:o(`settings.signOut`),onClick:()=>void a?.()}],children:(0,K.jsx)(`button`,{"aria-label":o(`settings.accountMenu`,{login:c}),type:`button`,className:`x78zum5 x1717udv xc342km x16rqkct xjbqb8w x1ypdohk x1hl8ikr`,children:(0,K.jsx)(Ld,{alt:``,avatar:`/api/avatar/github/${c}`,shape:`circle`,size:28,className:`xs625wh`})})})]})}var j_=(0,q.createContext)(!1),M_=(0,q.createContext)(null),N_=j_.Provider,P_=M_.Provider,F_=()=>typeof window<`u`&&window.parent!==window&&Xe()&&!ce();function I_(){return(0,q.useContext)(j_)||F_()}function L_(){return(0,q.useContext)(M_)}function R_({type:e,id:t,docHeader:r,children:i}){let{t:a}=n(),o=cg(),[s,c]=(0,q.useState)(t),[l,u]=(0,q.useState)(null),d=`${e}/${t}`;(0,q.useEffect)(()=>{c(t);let e=()=>{let e=document.title?.trim();e&&e!==`Ryugi`&&e!==`Artifacts · Ryugi`&&c(e)};e();let n=document.querySelector(`title`);if(!n||typeof MutationObserver>`u`)return;let r=new MutationObserver(e);return r.observe(n,{childList:!0,characterData:!0,subtree:!0}),()=>r.disconnect()},[t,e]);let f=!!o.status?.signedIn&&!!o.status.login;return(0,K.jsxs)(`div`,{"data-local-shell":``,className:`xixxii4 x10a8y8t x78zum5 xdt5ytf x184qs1t`,children:[(0,K.jsxs)(`header`,{"data-local-shell-bar":``,className:`x1okw0bk x78zum5 x6s0dn4 x1qughib xou54vl x1otypdl xn3w4p2 xqin4a2 xwbbzrz xso031l x1q0q8m5 xtrfj0v x1rozbrz xo2rkog xqfszdh x1ct8sxb x1n2onr6 x1355qak`,children:[(0,K.jsxs)(`div`,{className:`x78zum5 x6s0dn4 x883omv xeuugli x98rzlu`,children:[(0,K.jsx)(`a`,{"aria-label":a(`localShell.backToList`),href:`/`,className:`x3nfvp2 x6s0dn4 x2lah0s xo2rkog x12rs2w1 x1hl2dhg x1sxf85j`,children:(0,K.jsx)(O_,{height:19})}),(0,K.jsxs)(`nav`,{"aria-label":a(`localShell.breadcrumb`),className:`x78zum5 x6s0dn4 x167g77z xeuugli x1ct8sxb xuxw1ft`,children:[(0,K.jsx)(`span`,{"aria-hidden":`true`,className:`xddlp02 x2lah0s`,children:`/`}),(0,K.jsx)(`span`,{className:`x1bo0w0s x2lah0s xt0psk2 xkaaz9w`,children:a(`type.${e}`)}),(0,K.jsx)(`span`,{"aria-hidden":`true`,className:`xddlp02 x2lah0s xt0psk2 xkaaz9w`,children:`/`}),(0,K.jsx)(`span`,{title:s,className:`xeuugli xb3r6kr xlyipyv x1s688f xo2rkog`,children:s})]})]}),(0,K.jsxs)(`div`,{className:`x78zum5 x6s0dn4 x167g77z x2lah0s`,children:[(0,K.jsx)(`div`,{ref:u,className:`xjp7ctv`}),e===`document`&&r?.header?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(De,{available:r.header.history,comments:r.header.comments,open:r.header.historyOpen,onComments:()=>r.history(`close`),onHistory:()=>r.history(`toggle`)}),(0,K.jsx)(_o,{state:r.header.documentExport,onExport:r.exportPdf}),(0,K.jsx)(`span`,{"aria-hidden":`true`,className:`x1i1rx1s xlup9mm x2lah0s xh6qj2i`})]}):null,o.status&&!f?(0,K.jsxs)(`span`,{"data-local-only-badge":``,className:`x3nfvp2 xkaaz9w x6s0dn4 x1nejdyq x1qt5hsa xddlp02 xuxw1ft`,children:[(0,K.jsx)(`span`,{"aria-hidden":`true`,className:`x1v4s8kt xols6we x16rqkct xvndefy x1y0btm7 xhgr6co x9f619 x2lah0s`}),a(`server.localOnly`)]}):null,(0,K.jsx)(T_,{shell:!0,artifact:d}),f?(0,K.jsx)(A_,{compact:!0,status:o.status,waitingForLogin:o.waitingForLogin,onSignIn:()=>void o.login(),onSignOut:async()=>{await Z(`POST`,`logout`),await o.refresh()}}):(0,K.jsx)(`button`,{"aria-label":a(`settings.title`),title:a(`settings.title`),type:`button`,className:`xrvj5dj x1ku5rj1 xgd8bvy x1fgtraw x1717udv xc342km x1kogg8i xjbqb8w xj0l527 x1bo0w0s xytdrwj x1ypdohk x2lah0s`,onClick:Cg,children:(0,K.jsx)(es,{"aria-hidden":`true`,size:14})})]})]}),(0,K.jsx)(`div`,{className:`x1n2onr6 x98rzlu x2lwn1j x78zum5 xdt5ytf xb3r6kr`,children:(0,K.jsx)(N_,{value:!0,children:(0,K.jsx)(P_,{value:l,children:i})})})]})}var z_=1e3,B_=`ryugi:embed:hello`,V_=`ryugi:embed:heartbeat`,H_=`ryugi:embed:painted`,U_=`ryugi:embed:position`,W_=`ryugi:embed:positioned`;function G_({parentOrigin:e,onPosition:t,win:n=window}){let r=(t,r)=>n.parent.postMessage({type:t,...r},e),i=i=>{if(i.origin!==e||i.source!==n.parent)return;let a=i.data;a?.type===U_&&a.anchor&&t&&t(a.anchor).then(()=>r(W_))};n.addEventListener(`message`,i),r(B_,t?{position:!0}:void 0);let a=setInterval(()=>r(V_),z_),o=!1;return{painted(){o||(o=!0,r(H_))},close(){clearInterval(a),n.removeEventListener(`message`,i)}}}function K_(e=document,t=window,n){let r=e.documentElement.dataset.ryugiEmbedParent;return r?G_({parentOrigin:r,onPosition:n,win:t}):null}var q_=()=>new Promise(e=>requestAnimationFrame(()=>requestAnimationFrame(()=>e()))),J_=e=>(Re(e),q_()),Y_=(0,q.createContext)(()=>{});function X_(){let e=(0,q.useRef)(null),t=(0,q.useRef)(!1);return(0,q.useEffect)(()=>{let n=K_(document,window,J_);return e.current=n,t.current&&n?.painted(),()=>{n?.close(),e.current=null}},[]),(0,q.useCallback)(()=>{t.current=!0,e.current?.painted()},[])}function Z_(e){let t=(0,q.useContext)(Y_);(0,q.useEffect)(()=>{if(!e)return;let n=0,r=requestAnimationFrame(()=>{n=requestAnimationFrame(()=>{t(),Te()&&tt({kind:`painted`})})});return()=>{cancelAnimationFrame(r),cancelAnimationFrame(n)}},[e,t])}function Q_(e=window){try{let t=e.parent,n=new URLSearchParams(e.location.search).get(`at`);if(t!==e&&t.location.origin===e.location.origin&&/^\/whiteboard\/[^/]+\/?$/.test(t.location.pathname)&&t.location.pathname===n)return t}catch{}return e}var $_={artboard:{Layout:(0,q.lazy)(()=>_(async()=>{let{ArtboardLayout:e}=await import(`./ArtboardLayout-C0AyDlVu.js`);return{ArtboardLayout:e}},__vite__mapDeps([19,1,16,2,3,4,5,6,7,17,13,20,21,22,23,24,25,26,11,12,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,18,45,46,47,48,49,10,50,51,52,53,54,55,15,8,9,56,57,58,59,60,61,62]),import.meta.url).then(({ArtboardLayout:e})=>({default:e})))},document:{Layout:(0,q.lazy)(()=>_(async()=>{let{DocumentLayout:e}=await import(`./DocumentLayout-VFaDqBeR.js`);return{DocumentLayout:e}},__vite__mapDeps([63,1,4,5,2,3,6,7]),import.meta.url).then(({DocumentLayout:e})=>({default:e})))},html:{Layout:(0,q.lazy)(()=>_(async()=>{let{HtmlLayout:e}=await import(`./HtmlLayout-B29gXfBU.js`);return{HtmlLayout:e}},__vite__mapDeps([64,1,4,65,21,2,3,5,6,7,16,17,13,41,66,50,51,59,60,61]),import.meta.url).then(({HtmlLayout:e})=>({default:e})))},whiteboard:{Layout:(0,q.lazy)(()=>_(async()=>{let{WhiteboardLayout:e}=await import(`./WhiteboardLayout-BhENYvui.js`);return{WhiteboardLayout:e}},__vite__mapDeps([67,1,60,4,61,16,2,3,5,6,7,17,13,68,69,21,18,43,70,33,71,46,72,28,47,34,73,40,74,75,10,27,11,12,44,35,36,41,52,76,57,38,39,77,78,79]),import.meta.url).then(({WhiteboardLayout:e})=>({default:e}))),embedIn:e=>(0,K.jsx)(ug,{pageWindow:Q_(),children:e})},verify:{Layout:(0,q.lazy)(()=>_(async()=>{let{VerifyLayout:e}=await import(`./VerifyLayout-DKPuSiGF.js`);return{VerifyLayout:e}},__vite__mapDeps([80,1,16,2,3,4,5,6,7,17,13,60,61,81,82,69,21,18,43,70,33,71,46,72,28,47,34,73,40,74,36,83,84,85,86,77,87,44,35,12,41,88,24,89,90,11,23,10,8,9,66,76,91,92,53,54,26,93,94]),import.meta.url).then(({VerifyLayout:e})=>({default:e})))},slides:{Layout:(0,q.lazy)(()=>_(async()=>{let{SlidesLayout:e}=await import(`./SlidesLayout-XsjPfYDW.js`);return{SlidesLayout:e}},__vite__mapDeps([95,1,59,60,4,61,16,2,3,5,6,7,17,13,96,91,75,66,50,51,26,65,21,41,10,44,35,36,12,31,32,33,34,37,71,77,43,84,39,40,49,73,28,57,9,15,18,97,47,48,87,24,98,8,52,90,99,100,20,101]),import.meta.url).then(({SlidesLayout:e})=>({default:e}))),bare:e=>new URLSearchParams(e).has(`live`)},report:{Layout:(0,q.lazy)(()=>_(async()=>{let{ReportLayout:e}=await import(`./ReportLayout-D7ZkedGf.js`);return{ReportLayout:e}},__vite__mapDeps([102,1,59,60,4,61,16,2,3,5,6,7,17,13,65,21,41,66,50,51,26,77,10,32,33,44,35,36,12,56,86,48,88]),import.meta.url).then(({ReportLayout:e})=>({default:e})))},storyboard:{Layout:(0,q.lazy)(()=>_(async()=>{let{StoryboardLayout:e}=await import(`./StoryboardLayout-F5kZZPXd.js`);return{StoryboardLayout:e}},__vite__mapDeps([103,1,4,59,60,61,16,2,3,5,6,7,17,13,104,26,66,65,21,41,50,51,105,55,48,90,20,44,35,36,12,77,89,99,15,24,28,29,30,73,33,43,47,72]),import.meta.url).then(({StoryboardLayout:e})=>({default:e})))}},ev=(0,q.lazy)(()=>_(async()=>{let{AutoPublishBar:e}=await import(`./auto-publish-DNFjfgdJ.js`);return{AutoPublishBar:e}},__vite__mapDeps([106,1,107,13,3,4,5,2,6,7]),import.meta.url).then(({AutoPublishBar:e})=>({default:e}))),tv=(0,q.lazy)(()=>_(async()=>{let{SettingsDialog:e}=await import(`./settings-5y0Q6PnT.js`);return{SettingsDialog:e}},__vite__mapDeps([108,1,16,2,3,4,5,6,7,17,13,28,49,14,76,41]),import.meta.url).then(({SettingsDialog:e})=>({default:e}))),nv=(0,q.lazy)(()=>_(async()=>{let{ArtifactList:e}=await import(`./ArtifactList-D1k1uD-4.js`);return{ArtifactList:e}},__vite__mapDeps([109,1,32,2,3,4,5,6,7,16,17,13,33,21,37,35,36,49,20,88,73,110,65,41,14,45,51,54,39,40,57,18,61]),import.meta.url).then(({ArtifactList:e})=>({default:e}))),rv=(0,q.lazy)(()=>_(async()=>{let{StoryboardRenderLayout:e}=await import(`./StoryboardRender-m7Gb9PIh.js`);return{StoryboardRenderLayout:e}},__vite__mapDeps([111,1,104,2,3,4,5,6,7,26,66,59,60,61,16,17,13]),import.meta.url).then(({StoryboardRenderLayout:e})=>({default:e}))),iv=(0,q.lazy)(()=>_(async()=>{let{PreviewArtifactLayout:e}=await import(`./PreviewArtifactLayout-D8RO9K8h.js`);return{PreviewArtifactLayout:e}},__vite__mapDeps([112,1,4,16,2,3,5,6,7,17,13,61,99,15,35,36,21,10,65,41,42,49,44,12,97,39,40,11,37,47,110]),import.meta.url).then(({PreviewArtifactLayout:e})=>({default:e}))),av=(0,q.lazy)(()=>Promise.all([_(()=>import(`./split-DFCHm5IV.js`),__vite__mapDeps([113,1,91,16,2,3,4,5,6,7,17,13,51,15,85,98,39,40,41,114,83,105,70,87,10,9,100,93,115,78,116]),import.meta.url),_(()=>import(`./local-split-host-aaVovEJX.js`).then(e=>e.n),__vite__mapDeps([96,1,91,16,2,3,4,5,6,7,17,13,61]),import.meta.url)]).then(([{SplitShell:e},{localSplitHost:t}])=>({default:n=>(0,K.jsx)(e,{...n,host:t})}))),ov=(0,q.lazy)(()=>_(async()=>{let{PreviewLayout:e}=await import(`./PreviewLayout-Dw-jMatP.js`).then(e=>e.n);return{PreviewLayout:e}},__vite__mapDeps([117,1,4,2,3,5,6,7,22]),import.meta.url).then(({PreviewLayout:e})=>({default:e}))),sv=(e,t)=>(0,K.jsxs)(K.Fragment,{children:[e,(0,K.jsx)(ev,{}),(0,K.jsx)(tv,{}),t&&(0,K.jsx)(Wh,{artifact:t})]}),cv=(e,t,n)=>sv((0,K.jsx)(R_,{id:t,type:e,children:n}),`${e}/${t}`);function lv({type:e,id:t,split:n}){let[r,i]=(0,q.useState)({type:e,id:t}),[a,o]=(0,q.useState)(null);(0,q.useEffect)(()=>{i({type:e,id:t})},[e,t]);let s=(0,q.useCallback)(e=>{i(t=>t.type===e.primary.type&&t.id===e.primary.id?t:e.primary)},[]),c=(0,q.useCallback)(e=>{o(e)},[]);return sv((0,K.jsx)(R_,{docHeader:a,id:r.id,type:r.type,children:(0,K.jsx)(av,{fill:!0,hostPrimaryDocument:!0,id:t,split:n,type:e,onDocumentHeader:c,onPanes:s})}),`${r.type}/${r.id}`)}function uv({id:e,type:t}){let n=X_(),{Layout:r,embedIn:i}=$_[t],a=(0,K.jsx)(r,{id:e});return(0,K.jsxs)(Y_,{value:n,children:[Vh(location.search)&&(0,K.jsx)(Wh,{artifact:`${t}/${e}`}),i?i(a):a]})}function dv(){let[e]=vh(),t=f(e);if((0,q.useEffect)(()=>{if(!document.documentElement.dataset.ryugiArtifactId)return;let e=document.querySelector(`link[rel="canonical"]`);if(!e)return;let t=new URL(location.href);t.pathname=h(t.pathname,new URL(e.href).pathname),t.href!==location.href&&history.replaceState(history.state,``,t)},[]),(0,q.useEffect)(()=>{window.scrollTo(0,0)},[e]),t.kind===`list`)return sv((0,K.jsx)(nv,{}));if(t.kind===`unknown`)return(0,K.jsx)(`div`,{className:`x78zum5 x6s0dn4 xl56j7k x5yr21d xggk2y7 x1bo0w0s xqfszdh xif65rj`,children:`No artifact lives at this address.`});let n=document.documentElement.dataset.ryugiArtifactId??t.id;if(t.kind===`preview`)return(0,K.jsx)(ov,{id:n,type:t.type});if(t.kind===`dev-preview`)return sv((0,K.jsx)(iv,{id:n}),`preview/${n}`);if(t.kind===`embed`)return(0,K.jsx)(uv,{id:n,type:t.type});if(t.kind===`render`)return(0,K.jsx)(rv,{id:n});if(m(t.type).standalone){let{Layout:e,bare:r}=$_[t.type],i=(0,K.jsx)(e,{id:n});return r?.(location.search)?sv(i,`${t.type}/${n}`):cv(t.type,n,i)}return(0,K.jsx)(lv,{id:n,split:Ke(t,location.search)?.split??null,type:t.type})}function fv(){return(0,K.jsx)(q.Suspense,{fallback:(0,K.jsx)(`div`,{className:`x78zum5 x6s0dn4 xl56j7k x5yr21d xggk2y7 x1bo0w0s xqfszdh xif65rj`,children:(0,K.jsx)(wh,{label:s(`common.loading`)})}),children:(0,K.jsx)(dv,{})})}Pe(),document.documentElement.lang=r[c.language];function pv(){return g(),(0,K.jsx)(Rd,{features:gf,children:(0,K.jsxs)(b,{enableCustomFonts:!1,motion:Wm,children:[(0,K.jsx)(fv,{}),(0,K.jsx)(je,{}),(0,K.jsx)(en,{}),(0,K.jsx)(Sp,{})]})})}(0,Gm.createRoot)(document.getElementById(`root`)).render((0,K.jsx)(q.StrictMode,{children:(0,K.jsx)(pv,{})}));export{Y as A,Ro as B,Xh as C,Dh as D,Oh as E,ns as F,es as I,Qo as L,lp as M,bf as N,wh as O,Ld as P,Xo as R,cg as S,jh as T,Cg as _,O_ as a,pg as b,m_ as c,i_ as d,Mg as f,wg as g,jg as h,A_ as i,fp as j,Lp as k,f_ as l,kg as m,I_ as n,T_ as o,Ag as p,L_ as r,u_ as s,Z_ as t,d_ as u,Dg as v,Fh as w,Z as x,fg as y,Ho as z};