@opentig/cli 0.2.1 → 0.2.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 (112) hide show
  1. package/dist/bin.mjs +2 -1
  2. package/dist/chunks/{cli-B6JTojx_.mjs → cli-DNzGBqmL.mjs} +1 -1
  3. package/dist/client/assets/App-BbT5H97Z.js +138 -0
  4. package/dist/client/assets/{CreatePullRequestDialog-CAeykZ72.js → CreatePullRequestDialog-DRLeMY4e.js} +2 -2
  5. package/dist/client/assets/{DiffWorkspace-BRicWHvw.js → DiffWorkspace-DJX00otP.js} +1 -1
  6. package/dist/client/assets/{EditableFileViewer-DWeSDnZn.js → EditableFileViewer-Cmbomx5y.js} +1 -1
  7. package/dist/client/assets/{File-D65shwRR.js → File-4o4egqlz.js} +1 -1
  8. package/dist/client/assets/FilesView-TmUF-VLr.js +1 -0
  9. package/dist/client/assets/{GitHubAvatar-C8R3iNoM.js → GitHubAvatar-azKPrTMv.js} +1 -1
  10. package/dist/client/assets/HistoryView-Go6rXO0P.js +1 -0
  11. package/dist/client/assets/{HtmlFileViewer-JXLHTNPm.js → HtmlFileViewer-WpYnLdMW.js} +1 -1
  12. package/dist/client/assets/{IconEdit-3fgBTCQ4.js → IconEdit-B8LZHB8l.js} +1 -1
  13. package/dist/client/assets/{IconFolderSymlink-C4ydD1eS.js → IconFolderSymlink-D29EhQPC.js} +1 -1
  14. package/dist/client/assets/{ImageFileViewer-YH2xhkkk.js → ImageFileViewer-1ObUacJu.js} +1 -1
  15. package/dist/client/assets/LocalRefsDialog-VcrlFgxR.js +1 -0
  16. package/dist/client/assets/{MarkdownFileViewer-BsB8WkIH.js → MarkdownFileViewer-CvsKPnvF.js} +2 -2
  17. package/dist/client/assets/{PairingPage-DXRyAYHn.js → PairingPage-cSoKZi8t.js} +1 -1
  18. package/dist/client/assets/{PierreDiffViewer-DoV3V0IW.js → PierreDiffViewer-DVTrOwX4.js} +1 -1
  19. package/dist/client/assets/{PierreEditBoundary-BnYZbHfi.js → PierreEditBoundary-DPtaTiUB.js} +1 -1
  20. package/dist/client/assets/{PierreWorkerPool-Cg9zdxiI.js → PierreWorkerPool-BxP-s6jD.js} +1 -1
  21. package/dist/client/assets/PullRequestDiff-DeQznd9n.js +1 -0
  22. package/dist/client/assets/PullRequestViewer-IhGZZs_A.js +2 -0
  23. package/dist/client/assets/{PullRequestsView-GStKxG7k.js → PullRequestsView-BG0xrok4.js} +1 -1
  24. package/dist/client/assets/QuickOpenDialog-DpmcAzTx.js +1 -0
  25. package/dist/client/assets/RepositoryProjectsDialog-DAzbUB3X.js +1 -0
  26. package/dist/client/assets/{SearchView-D5XB6wdu.js → SearchView-HoiWKG8z.js} +1 -1
  27. package/dist/client/assets/SettingsDialog-pmJKOaiK.js +9 -0
  28. package/dist/client/assets/{Viewer-Gfy3Ejyo.js → Viewer-BCk8FHrc.js} +3 -3
  29. package/dist/client/assets/{abnfDiagram-N423BO3Z-DdAfHevw.js → abnfDiagram-N423BO3Z-BvfKOanh.js} +1 -1
  30. package/dist/client/assets/{arc-C43uoeEi.js → arc-DB2nIH2Y.js} +1 -1
  31. package/dist/client/assets/{architectureDiagram-T3A2C74G-C7q0hhRO.js → architectureDiagram-T3A2C74G-Bqh4uY3R.js} +1 -1
  32. package/dist/client/assets/base-ui-DIP2rZxz.js +1 -0
  33. package/dist/client/assets/{blockDiagram-VBNYF7ZC-C1x9Iap4.js → blockDiagram-VBNYF7ZC-DMW415Ms.js} +1 -1
  34. package/dist/client/assets/{c4Diagram-5PPSVZJV-BmKaVW6q.js → c4Diagram-5PPSVZJV-BSNPes7l.js} +1 -1
  35. package/dist/client/assets/channel-VcDernYy.js +1 -0
  36. package/dist/client/assets/{checkbox-XfIUFPxh.js → checkbox-Dta4gqy2.js} +1 -1
  37. package/dist/client/assets/{chunk-2GRJ4B5K-kzy_H3BQ.js → chunk-2GRJ4B5K-D-86JbWu.js} +1 -1
  38. package/dist/client/assets/{chunk-2Q5K7J3B-BMj-FT4X.js → chunk-2Q5K7J3B-BNI-SD-k.js} +1 -1
  39. package/dist/client/assets/{chunk-5RXB4S5H-DmPGiCCb.js → chunk-5RXB4S5H-OFFYyML8.js} +1 -1
  40. package/dist/client/assets/{chunk-5VM5RSS4-DYFL8__L.js → chunk-5VM5RSS4-DpE1dtnL.js} +1 -1
  41. package/dist/client/assets/{chunk-6Q2QTUOP-CI98oVdT.js → chunk-6Q2QTUOP-DxAnzBXJ.js} +1 -1
  42. package/dist/client/assets/{chunk-GF5L2VYU-D9JiiMlX.js → chunk-GF5L2VYU-DNrTNRgr.js} +1 -1
  43. package/dist/client/assets/{chunk-JWPE2WC7-D0THYpZl.js → chunk-JWPE2WC7-D-jfKyIh.js} +1 -1
  44. package/dist/client/assets/{chunk-KBJHAD2P-Z1tJfyAr.js → chunk-KBJHAD2P-CIyQl_ts.js} +1 -1
  45. package/dist/client/assets/{chunk-RYQCIY6F-31aS4cD3.js → chunk-RYQCIY6F-CgCYQccM.js} +1 -1
  46. package/dist/client/assets/{chunk-XXDRQBXY-ClWDHmEp.js → chunk-XXDRQBXY-B31oXtqU.js} +1 -1
  47. package/dist/client/assets/classDiagram-JCYQIIEL-CUuEGRCt.js +1 -0
  48. package/dist/client/assets/classDiagram-v2-OCEON4UE-CUuEGRCt.js +1 -0
  49. package/dist/client/assets/{cose-bilkent-JH36ORCC-Btg2MYLh.js → cose-bilkent-JH36ORCC-CrX-LDNw.js} +1 -1
  50. package/dist/client/assets/{cynefin-VYW2F7L2-Cbh4Pk6j.js → cynefin-VYW2F7L2-DnkWlsqW.js} +1 -1
  51. package/dist/client/assets/{cynefinDiagram-MW4NZA55-BBqorl0u.js → cynefinDiagram-MW4NZA55-bUDQ9ElF.js} +1 -1
  52. package/dist/client/assets/{dagre-VZM6K2ZE-DugEItZ0.js → dagre-VZM6K2ZE-BW5Kni4n.js} +1 -1
  53. package/dist/client/assets/{diagram-7IWD3JNH-Biu7dmH8.js → diagram-7IWD3JNH-1EXGwguC.js} +1 -1
  54. package/dist/client/assets/{diagram-B4RE2ZJO-UDm4DXFS.js → diagram-B4RE2ZJO-CzpH5ieN.js} +1 -1
  55. package/dist/client/assets/{diagram-LBJQPF4R-Bcku4gb-.js → diagram-LBJQPF4R-BnKszJ_B.js} +1 -1
  56. package/dist/client/assets/{diagram-Q27KOJAE-DFRjglV-.js → diagram-Q27KOJAE-DbQlD3OM.js} +1 -1
  57. package/dist/client/assets/{diagram-UB23O5K3-CgfMWtd0.js → diagram-UB23O5K3-BqZ-RSlm.js} +1 -1
  58. package/dist/client/assets/{ebnfDiagram-BXEA7PRR-CZzYOqs0.js → ebnfDiagram-BXEA7PRR-B2iPWDvr.js} +1 -1
  59. package/dist/client/assets/{erDiagram-JOGREHBK-Cdlbxgs6.js → erDiagram-JOGREHBK-aMqHrKCk.js} +1 -1
  60. package/dist/client/assets/{flowDiagram-UKHOOZJN-BgImDwpP.js → flowDiagram-UKHOOZJN-ivrTsn4D.js} +1 -1
  61. package/dist/client/assets/{ganttDiagram-PKOTCBZU-SFhtiyL4.js → ganttDiagram-PKOTCBZU-IMfIqkXw.js} +1 -1
  62. package/dist/client/assets/{gitGraphDiagram-DS77QQ5N-Bkm5ueys.js → gitGraphDiagram-DS77QQ5N-BNURRh2N.js} +1 -1
  63. package/dist/client/assets/{index-B5RC4THs.js → index-B3QJsvjR.js} +4 -4
  64. package/dist/client/assets/index-Cx9LaJW8.css +1 -0
  65. package/dist/client/assets/{infoDiagram-6WML65LV-pCYc-VX2.js → infoDiagram-6WML65LV-BKEENkUQ.js} +1 -1
  66. package/dist/client/assets/{ishikawaDiagram-WSZJBQD7-BtNbG3Y6.js → ishikawaDiagram-WSZJBQD7-HrCSmiTr.js} +1 -1
  67. package/dist/client/assets/{journeyDiagram-NVQOT4AX-CPW2qT3y.js → journeyDiagram-NVQOT4AX-CQIuWA6F.js} +1 -1
  68. package/dist/client/assets/{kanban-definition-27J2QSJJ-wD6JXQFs.js → kanban-definition-27J2QSJJ-h4fSAkel.js} +1 -1
  69. package/dist/client/assets/{linear-sj8MOkmS.js → linear-BAdz-uC9.js} +1 -1
  70. package/dist/client/assets/{mermaid.core-CGJtfmwb.js → mermaid.core-vLn7mMZB.js} +4 -4
  71. package/dist/client/assets/{mindmap-definition-FAOFIHXS-BQwLHBVs.js → mindmap-definition-FAOFIHXS-DOrZl827.js} +1 -1
  72. package/dist/client/assets/{pegDiagram-VL7TDLO6-DtDsb-Z8.js → pegDiagram-VL7TDLO6-_Vs7p633.js} +1 -1
  73. package/dist/client/assets/{pieDiagram-7S7Q4E2Y-B3WhqNuS.js → pieDiagram-7S7Q4E2Y-7qbB_Z16.js} +1 -1
  74. package/dist/client/assets/{quadrantDiagram-CIZ2JOQS-CPi38pp_.js → quadrantDiagram-CIZ2JOQS-DNH8SosA.js} +1 -1
  75. package/dist/client/assets/{railroadDiagram-AXF67PYL-Btac44Ux.js → railroadDiagram-AXF67PYL-Ctazrrpa.js} +1 -1
  76. package/dist/client/assets/{render-markdown-hAIWRfn0.js → render-markdown-dvHhHbC0.js} +1 -1
  77. package/dist/client/assets/{requirementDiagram-LRYGKXZP-CHJgDNdg.js → requirementDiagram-LRYGKXZP-BAH8dYer.js} +1 -1
  78. package/dist/client/assets/{sankeyDiagram-W5VNT64P-OYJHfmtd.js → sankeyDiagram-W5VNT64P-CuffrpdF.js} +1 -1
  79. package/dist/client/assets/{sequenceDiagram-SI44F4Z6-9ypa9W08.js → sequenceDiagram-SI44F4Z6-CaO4fJnS.js} +1 -1
  80. package/dist/client/assets/{sizeCapture-X5ZJPWSS-5ZDUTERI.js → sizeCapture-X5ZJPWSS-B_LramBU.js} +1 -1
  81. package/dist/client/assets/{stateDiagram-OKZ733FA-nGHE1hN7.js → stateDiagram-OKZ733FA-bc7zBYHn.js} +1 -1
  82. package/dist/client/assets/stateDiagram-v2-UEYNNEHI-C-UGmA2d.js +1 -0
  83. package/dist/client/assets/{swimlanes-SLNWSIFB-BZFv9Zp8.js → swimlanes-SLNWSIFB-DQzg1IPn.js} +2 -2
  84. package/dist/client/assets/swimlanesDiagram-ULZ7WXOC-DnopIiWa.js +8 -0
  85. package/dist/client/assets/{tanstack-CcfAJoQ7.js → tanstack-BysN2Oew.js} +1 -1
  86. package/dist/client/assets/{timeline-definition-Z64GVDOM-pUIcaCIE.js → timeline-definition-Z64GVDOM-CtbuIB6K.js} +1 -1
  87. package/dist/client/assets/{vennDiagram-T6HMQDX7-D6dEIJmP.js → vennDiagram-T6HMQDX7-pYJ0ZfFS.js} +1 -1
  88. package/dist/client/assets/{viewer-tabs-BjG3oKQ9.js → viewer-tabs-Cnfyd6rg.js} +1 -1
  89. package/dist/client/assets/{wardleyDiagram-T6FBY63Y-DZ8ro_-y.js → wardleyDiagram-T6FBY63Y-DYl_Oi-Y.js} +1 -1
  90. package/dist/client/assets/{xychartDiagram-ELKLHX3M-WJ2Zfmlk.js → xychartDiagram-ELKLHX3M-Cj5YUfP5.js} +1 -1
  91. package/dist/client/index.html +4 -4
  92. package/dist/dev.mjs +2 -1
  93. package/dist/manifest.json +1 -1
  94. package/dist/server.mjs +779 -211
  95. package/dist/utility.mjs +1 -0
  96. package/package.json +1 -1
  97. package/dist/client/assets/App-Dfm5F199.js +0 -74
  98. package/dist/client/assets/FilesView-EfoU7sF-.js +0 -1
  99. package/dist/client/assets/HistoryView-C6T2dsBC.js +0 -1
  100. package/dist/client/assets/LocalRefsDialog--1NiYKYj.js +0 -1
  101. package/dist/client/assets/PullRequestDiff-D6QG5Anx.js +0 -1
  102. package/dist/client/assets/PullRequestViewer-jC3LVmiO.js +0 -2
  103. package/dist/client/assets/QuickOpenDialog-HvslpGQl.js +0 -1
  104. package/dist/client/assets/RepositoryProjectsDialog-Biqv5GO_.js +0 -1
  105. package/dist/client/assets/SettingsDialog-DWAunOQB.js +0 -72
  106. package/dist/client/assets/base-ui-CJ8ZIx3d.js +0 -1
  107. package/dist/client/assets/channel-Diwpee6E.js +0 -1
  108. package/dist/client/assets/classDiagram-JCYQIIEL-BDuo9kiS.js +0 -1
  109. package/dist/client/assets/classDiagram-v2-OCEON4UE-BDuo9kiS.js +0 -1
  110. package/dist/client/assets/index-Dc9xVluy.css +0 -1
  111. package/dist/client/assets/stateDiagram-v2-UEYNNEHI-CkCpE1Yu.js +0 -1
  112. package/dist/client/assets/swimlanesDiagram-ULZ7WXOC-Dxlb7bju.js +0 -8
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/App-Dfm5F199.js","assets/react-rd22PHbN.js","assets/tanstack-CcfAJoQ7.js","assets/base-ui-CJ8ZIx3d.js","assets/PairingPage-DXRyAYHn.js"])))=>i.map(i=>d[i]);
2
- import{r as p,j as v,d as ll}from"./react-rd22PHbN.js";import{Q as cl,g as ul}from"./tanstack-CcfAJoQ7.js";import{a8 as dl,a9 as hl,aa as fl,ab as pl,ac as ml,ad as gl,ae as yl,af as vl}from"./base-ui-CJ8ZIx3d.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();const Br="opentig.theme";function bl(t){try{const e=t?.getItem(Br);return e==="light"||e==="dark"||e==="system"?e:null}catch{return null}}function Dm(t,e=globalThis.localStorage){try{e?.setItem(Br,t)}catch{}}function xl(t,e){return t==="light"?!1:t==="dark"?!0:e}function wl(t={}){const e=t.root??(typeof document>"u"?null:document.documentElement);if(!e)return!1;const n=t.storage??(typeof localStorage>"u"?null:localStorage),s=t.prefersDark??(typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches),i=xl(bl(n),s);return e.classList.toggle("dark",i),e.classList.toggle("light",!i),i}wl();const Tl="modulepreload",Sl=function(t){return"/"+t},ci={},Nr=function(e,n,s){let i=Promise.resolve();if(n&&n.length>0){let d=function(u){return Promise.all(u.map(a=>Promise.resolve(a).then(c=>({status:"fulfilled",value:c}),c=>({status:"rejected",reason:c}))))};document.getElementsByTagName("link");const r=document.querySelector("meta[property=csp-nonce]"),l=r?.nonce||r?.getAttribute("nonce");i=d(n.map(u=>{if(u=Sl(u),u in ci)return;ci[u]=!0;const a=u.endsWith(".css"),c=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${c}`))return;const h=document.createElement("link");if(h.rel=a?"stylesheet":Tl,a||(h.as="script"),h.crossOrigin="",h.href=u,l&&h.setAttribute("nonce",l),document.head.appendChild(h),a)return new Promise((m,f)=>{h.addEventListener("load",m),h.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(r){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=r,window.dispatchEvent(l),!l.defaultPrevented)throw r}return i.then(r=>{for(const l of r||[])l.status==="rejected"&&o(l.reason);return e().catch(o)})};function G(){return G=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var s=arguments[n];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},G.apply(this,arguments)}function kl(t,e){if(t==null)return{};var n={},s=Object.getOwnPropertyNames(t),i,o;for(o=0;o<s.length;o++)i=s[o],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i]);return n}const _r=p.createContext({});function Pl(t){const e=p.useRef(null);return e.current===null&&(e.current=t()),e.current}const Cl=typeof window<"u",Al=Cl?p.useLayoutEffect:p.useEffect,As=p.createContext(null);function Es(t,e){t.indexOf(e)===-1&&t.push(e)}function an(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const At=(t,e,n)=>n>e?e:n<t?t:n;let vn=()=>{};const It={},zr=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Wr=t=>typeof t=="object"&&t!==null,Ur=t=>/^0[^.\s]+$/u.test(t);function Gr(t){let e;return()=>(e===void 0&&(e=t()),e)}const mt=t=>t,De=(...t)=>t.reduce((e,n)=>s=>n(e(s))),Ee=(t,e,n)=>{const s=e-t;return s?(n-t)/s:1};class Rs{constructor(){this.subscriptions=[]}add(e){return Es(this.subscriptions,e),()=>an(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ht=t=>t*1e3,pt=t=>t/1e3,$r=(t,e)=>e?t*(1e3/e):0,Hr=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,El=1e-7,Rl=12;function Ml(t,e,n,s,i){let o,r,l=0;do r=e+(n-e)/2,o=Hr(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>El&&++l<Rl);return r}function Le(t,e,n,s){if(t===e&&n===s)return mt;const i=o=>Ml(o,0,1,t,n);return o=>o===0||o===1?o:Hr(i(o),e,s)}const qr=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Kr=t=>e=>1-t(1-e),Yr=Le(.33,1.53,.69,.99),Ms=Kr(Yr),Xr=qr(Ms),Zr=t=>t>=1?1:(t*=2)<1?.5*Ms(t):.5*(2-Math.pow(2,-10*(t-1))),Vs=t=>1-Math.sin(Math.acos(t)),Qr=Kr(Vs),Jr=qr(Vs),Vl=Le(.42,0,1,1),Dl=Le(0,0,.58,1),to=Le(.42,0,.58,1),Ll=t=>Array.isArray(t)&&typeof t[0]!="number",eo=t=>Array.isArray(t)&&typeof t[0]=="number",jl={linear:mt,easeIn:Vl,easeInOut:to,easeOut:Dl,circIn:Vs,circInOut:Jr,circOut:Qr,backIn:Ms,backInOut:Xr,backOut:Yr,anticipate:Zr},Il=t=>typeof t=="string",ui=t=>{if(eo(t)){vn(t.length===4);const[e,n,s,i]=t;return Le(e,n,s,i)}else if(Il(t))return jl[t];return t},Ue=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ol(t){let e=new Set,n=new Set,s=!1,i=!1;const o=new WeakSet;let r={delta:0,timestamp:0,isProcessing:!1};function l(u){o.has(u)&&(d.schedule(u),t()),u(r)}const d={schedule:(u,a=!1,c=!1)=>{const m=c&&s?e:n;return a&&o.add(u),m.add(u),u},cancel:u=>{n.delete(u),o.delete(u)},process:u=>{if(r=u,s){i=!0;return}s=!0;const a=e;e=n,n=a,e.forEach(l),e.clear(),s=!1,i&&(i=!1,d.process(u))}};return d}const Fl=40;function no(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=Ue.reduce((S,P)=>(S[P]=Ol(o),S),{}),{setup:l,read:d,resolveKeyframes:u,preUpdate:a,update:c,preRender:h,render:m,postRender:f}=r,y=()=>{const S=It.useManualTiming,P=S?i.timestamp:performance.now();n=!1,S||(i.delta=s?1e3/60:Math.max(Math.min(P-i.timestamp,Fl),1)),i.timestamp=P,i.isProcessing=!0,l.process(i),d.process(i),u.process(i),a.process(i),c.process(i),h.process(i),m.process(i),f.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(y))},b=()=>{n=!0,s=!0,i.isProcessing||t(y)};return{schedule:Ue.reduce((S,P)=>{const j=r[P];return S[P]=(B,k=!1,g=!1)=>(n||b(),j.schedule(B,k,g)),S},{}),cancel:S=>{for(let P=0;P<Ue.length;P++)r[Ue[P]].cancel(S)},state:i,steps:r}}const{schedule:z,cancel:Ot,state:it,steps:Vn}=no(typeof requestAnimationFrame<"u"?requestAnimationFrame:mt,!0);let Ze;function Bl(){Ze=void 0}const lt={now:()=>(Ze===void 0&&lt.set(it.isProcessing||It.useManualTiming?it.timestamp:performance.now()),Ze),set:t=>{Ze=t,queueMicrotask(Bl)}},so=t=>e=>typeof e=="string"&&e.startsWith(t),io=so("--"),Nl=so("var(--"),Ds=t=>Nl(t)?_l.test(t.split("/*")[0].trim()):!1,_l=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function di(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const ue={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Re={...ue,transform:t=>At(0,1,t)},Ge={...ue,default:1},ke=t=>Math.round(t*1e5)/1e5,Ls=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function zl(t){return t==null}const Wl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,js=(t,e)=>n=>!!(typeof n=="string"&&Wl.test(n)&&n.startsWith(t)||e&&!zl(n)&&Object.prototype.hasOwnProperty.call(n,e)),ro=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,l]=s.match(Ls);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:l!==void 0?parseFloat(l):1}},Ul=t=>At(0,255,t),Dn={...ue,transform:t=>Math.round(Ul(t))},qt={test:js("rgb","red"),parse:ro("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Dn.transform(t)+", "+Dn.transform(e)+", "+Dn.transform(n)+", "+ke(Re.transform(s))+")"};function Gl(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const ts={test:js("#"),parse:Gl,transform:qt.transform},je=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Mt=je("deg"),Ct=je("%"),V=je("px"),$l=je("vh"),Hl=je("vw"),hi={...Ct,parse:t=>Ct.parse(t)/100,transform:t=>Ct.transform(t*100)},ie={test:js("hsl","hue"),parse:ro("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Ct.transform(ke(e))+", "+Ct.transform(ke(n))+", "+ke(Re.transform(s))+")"},Y={test:t=>qt.test(t)||ts.test(t)||ie.test(t),parse:t=>qt.test(t)?qt.parse(t):ie.test(t)?ie.parse(t):ts.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?qt.transform(t):ie.transform(t),getAnimatableNone:t=>{const e=Y.parse(t);return e.alpha=0,Y.transform(e)}},ql=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Kl(t){return isNaN(t)&&typeof t=="string"&&(t.match(Ls)?.length||0)+(t.match(ql)?.length||0)>0}const oo="number",ao="color",Yl="var",Xl="var(",fi="${}",Zl=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function le(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const l=e.replace(Zl,d=>(Y.test(d)?(s.color.push(o),i.push(ao),n.push(Y.parse(d))):d.startsWith(Xl)?(s.var.push(o),i.push(Yl),n.push(d)):(s.number.push(o),i.push(oo),n.push(parseFloat(d))),++o,fi)).split(fi);return{values:n,split:l,indexes:s,types:i}}function Ql(t){return le(t).values}function lo({split:t,types:e}){const n=t.length;return s=>{let i="";for(let o=0;o<n;o++)if(i+=t[o],s[o]!==void 0){const r=e[o];r===oo?i+=ke(s[o]):r===ao?i+=Y.transform(s[o]):i+=s[o]}return i}}function Jl(t){return lo(le(t))}const tc=t=>typeof t=="number"?0:Y.test(t)?Y.getAnimatableNone(t):t,ec=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:tc(t);function nc(t){const e=le(t);return lo(e)(e.values.map((s,i)=>ec(s,e.split[i])))}const vt={test:Kl,parse:Ql,createTransformer:Jl,getAnimatableNone:nc};function Ln(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function sc({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const l=n<.5?n*(1+e):n+e-n*e,d=2*n-l;i=Ln(d,l,t+1/3),o=Ln(d,l,t),r=Ln(d,l,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function ln(t,e){return n=>n>0?e:t}const _=(t,e,n)=>t+(e-t)*n,jn=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ic=[ts,qt,ie],rc=t=>ic.find(e=>e.test(t));function pi(t){const e=rc(t);if(!e)return!1;let n=e.parse(t);return e===ie&&(n=sc(n)),n}const mi=(t,e)=>{const n=pi(t),s=pi(e);if(!n||!s)return ln(t,e);const i={...n};return o=>(i.red=jn(n.red,s.red,o),i.green=jn(n.green,s.green,o),i.blue=jn(n.blue,s.blue,o),i.alpha=_(n.alpha,s.alpha,o),qt.transform(i))},es=new Set(["none","hidden"]);function oc(t,e){return es.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function ac(t,e){return n=>_(t,e,n)}function Is(t){return typeof t=="number"?ac:typeof t=="string"?Ds(t)?ln:Y.test(t)?mi:uc:Array.isArray(t)?co:typeof t=="object"?Y.test(t)?mi:lc:ln}function co(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>Is(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function lc(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Is(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function cc(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],r=t.indexes[o][s[o]],l=t.values[r]??0;n[i]=l,s[o]++}return n}const uc=(t,e)=>{const n=vt.createTransformer(e),s=le(t),i=le(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?es.has(t)&&!i.values.length||es.has(e)&&!s.values.length?oc(t,e):De(co(cc(s,i),i.values),n):ln(t,e)};function uo(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?_(t,e,n):Is(t)(t,e)}const dc=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>z.update(e,n),stop:()=>Ot(e),now:()=>it.isProcessing?it.timestamp:lt.now()}},ho=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)s+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},cn=2e4;function Os(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<cn;)e+=n,s=t.next(e);return e>=cn?1/0:e}function hc(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Os(s),cn);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:pt(i)}}const $={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function ns(t,e){return t*Math.sqrt(1-e*e)}const fc=12;function pc(t,e,n){let s=n;for(let i=1;i<fc;i++)s=s-t(s)/e(s);return s}const In=.001;function mc({duration:t=$.duration,bounce:e=$.bounce,velocity:n=$.velocity,mass:s=$.mass}){let i,o,r=1-e;r=At($.minDamping,$.maxDamping,r),t=At($.minDuration,$.maxDuration,pt(t)),r<1?(i=u=>{const a=u*r,c=a*t,h=a-n,m=ns(u,r),f=Math.exp(-c);return In-h/m*f},o=u=>{const c=u*r*t,h=c*n+n,m=Math.pow(r,2)*Math.pow(u,2)*t,f=Math.exp(-c),y=ns(Math.pow(u,2),r);return(-i(u)+In>0?-1:1)*((h-m)*f)/y}):(i=u=>{const a=Math.exp(-u*t),c=(u-n)*t+1;return-In+a*c},o=u=>{const a=Math.exp(-u*t),c=(n-u)*(t*t);return a*c});const l=5/t,d=pc(i,o,l);if(t=ht(t),isNaN(d))return{stiffness:$.stiffness,damping:$.damping,duration:t};{const u=Math.pow(d,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}const gc=["duration","bounce"],yc=["stiffness","damping","mass"];function gi(t,e){return e.some(n=>t[n]!==void 0)}function vc(t){let e={velocity:$.velocity,stiffness:$.stiffness,damping:$.damping,mass:$.mass,isResolvedFromDuration:!1,...t};if(!gi(t,yc)&&gi(t,gc))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*At(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:$.mass,stiffness:i,damping:o}}else{const n=mc({...t,velocity:0});e={...e,...n,mass:$.mass},e.isResolvedFromDuration=!0}return e}function un(t=$.visualDuration,e=$.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],l={done:!1,value:o},{stiffness:d,damping:u,mass:a,duration:c,velocity:h,isResolvedFromDuration:m}=vc({...n,velocity:-pt(n.velocity||0)}),f=h||0,y=u/(2*Math.sqrt(d*a)),b=r-o,w=pt(Math.sqrt(d/a)),x=Math.abs(b)<5;s||(s=x?$.restSpeed.granular:$.restSpeed.default),i||(i=x?$.restDelta.granular:$.restDelta.default);let S,P,j,B,k,g;if(y<1)j=ns(w,y),B=(f+y*w*b)/j,S=C=>{const D=Math.exp(-y*w*C);return r-D*(B*Math.sin(j*C)+b*Math.cos(j*C))},k=y*w*B+b*j,g=y*w*b-B*j,P=C=>Math.exp(-y*w*C)*(k*Math.sin(j*C)+g*Math.cos(j*C));else if(y===1){S=D=>r-Math.exp(-w*D)*(b+(f+w*b)*D);const C=f+w*b;P=D=>Math.exp(-w*D)*(w*C*D-f)}else{const C=w*Math.sqrt(y*y-1);S=H=>{const F=Math.exp(-y*w*H),N=Math.min(C*H,300);return r-F*((f+y*w*b)*Math.sinh(N)+C*b*Math.cosh(N))/C};const D=(f+y*w*b)/C,U=y*w*D-b*C,tt=y*w*b-D*C;P=H=>{const F=Math.exp(-y*w*H),N=Math.min(C*H,300);return F*(U*Math.sinh(N)+tt*Math.cosh(N))}}const M={calculatedDuration:m&&c||null,velocity:C=>ht(P(C)),next:C=>{if(!m&&y<1){const U=Math.exp(-y*w*C),tt=Math.sin(j*C),H=Math.cos(j*C),F=r-U*(B*tt+b*H),N=ht(U*(k*tt+g*H));return l.done=Math.abs(N)<=s&&Math.abs(r-F)<=i,l.value=l.done?r:F,l}const D=S(C);if(m)l.done=C>=c;else{const U=ht(P(C));l.done=Math.abs(U)<=s&&Math.abs(r-D)<=i}return l.value=l.done?r:D,l},toString:()=>{const C=Math.min(Os(M),cn),D=ho(U=>M.next(C*U).value,C,30);return C+"ms "+D},toTransition:()=>{}};return M}un.applyToOptions=t=>{const e=hc(t,100,un);return t.ease=e.ease,t.duration=ht(e.duration),t.type="keyframes",t};const bc=5;function fo(t,e,n){const s=Math.max(e-bc,0);return $r(n-t(s),e-s)}function ss({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:l,max:d,restDelta:u=.5,restSpeed:a}){const c=t[0],h={done:!1,value:c},m=g=>l!==void 0&&g<l||d!==void 0&&g>d,f=g=>l===void 0?d:d===void 0||Math.abs(l-g)<Math.abs(d-g)?l:d;let y=n*e;const b=c+y,w=r===void 0?b:r(b);w!==b&&(y=w-c);const x=g=>-y*Math.exp(-g/s),S=g=>w+x(g),P=g=>{const M=x(g),C=S(g);h.done=Math.abs(M)<=u,h.value=h.done?w:C};let j,B;const k=g=>{m(h.value)&&(j=g,B=un({keyframes:[h.value,f(h.value)],velocity:fo(S,g,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:a}))};return k(0),{calculatedDuration:null,next:g=>{let M=!1;return!B&&j===void 0&&(M=!0,P(g),k(g)),j!==void 0&&g>=j?B.next(g-j):(!M&&P(g),h)}}}function xc(t,e,n){const s=[],i=n||It.mix||uo,o=t.length-1;for(let r=0;r<o;r++){let l=i(t[r],t[r+1]);if(e){const d=Array.isArray(e)?e[r]||mt:e;l=De(d,l)}s.push(l)}return s}function wc(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(vn(o===e.length),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const l=xc(e,s,i),d=l.length,u=a=>{if(r&&a<t[0])return e[0];let c=0;if(d>1)for(;c<t.length-2&&!(a<t[c+1]);c++);const h=Ee(t[c],t[c+1],a);return l[c](h)};return n?a=>u(At(t[0],t[o-1],a)):u}function Tc(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Ee(0,e,s);t.push(_(n,1,i))}}function Sc(t){const e=[0];return Tc(e,t.length-1),e}function kc(t,e){return t.map(n=>n*e)}function Pc(t,e){return t.map(()=>e||to).splice(0,t.length-1)}function Pe({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Ll(s)?s.map(ui):ui(s),o={done:!1,value:e[0]},r=kc(n&&n.length===e.length?n:Sc(e),t),l=wc(r,e,{ease:Array.isArray(i)?i:Pc(e,i)});return{calculatedDuration:t,next:d=>(o.value=l(d),o.done=d>=t,o)}}const Cc=t=>t!==null;function bn(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(Cc),l=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!l||s===void 0?o[l]:s}const Ac={decay:ss,inertia:ss,tween:Pe,keyframes:Pe,spring:un};function po(t){typeof t.type=="string"&&(t.type=Ac[t.type])}class Fs{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Ec=t=>t/100;class dn extends Fs{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==lt.now()&&this.tick(lt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;po(e);const{type:n=Pe,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:l}=e;const d=n||Pe;d!==Pe&&typeof l[0]!="number"&&(this.mixKeyframes=De(Ec,uo(l[0],l[1])),l=[0,100]);const u=d({...e,keyframes:l});o==="mirror"&&(this.mirroredGenerator=d({...e,keyframes:[...l].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=Os(u));const{calculatedDuration:a}=u;this.calculatedDuration=a,this.resolvedDuration=a+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:l,calculatedDuration:d}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:a,repeat:c,repeatType:h,repeatDelay:m,type:f,onUpdate:y,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const w=this.currentTime-u*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?w<0:w>i;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let S=this.currentTime,P=s;if(c){const g=Math.min(this.currentTime,i)/l;let M=Math.floor(g),C=g%1;!C&&g>=1&&(C=1),C===1&&M--,M=Math.min(M,c+1),M%2&&(h==="reverse"?(C=1-C,m&&(C-=m/l)):h==="mirror"&&(P=r)),S=At(0,1,C)*l}let j;x?(this.delayState.value=a[0],j=this.delayState):j=P.next(S),o&&!x&&(j.value=o(j.value));let{done:B}=j;!x&&d!==null&&(B=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&B);return k&&f!==ss&&(j.value=bn(a,this.options,b,this.speed)),y&&y(j.value),k&&this.finish(),j}then(e,n){return this.finished.then(e,n)}get duration(){return pt(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+pt(e)}get time(){return pt(this.currentTime)}set time(e){e=ht(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return fo(s=>this.generator.next(s).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(lt.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=pt(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=dc,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(lt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function Rc(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Kt=t=>t*180/Math.PI,is=t=>{const e=Kt(Math.atan2(t[1],t[0]));return rs(e)},Mc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:is,rotateZ:is,skewX:t=>Kt(Math.atan(t[1])),skewY:t=>Kt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},rs=t=>(t=t%360,t<0&&(t+=360),t),yi=is,vi=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),bi=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Vc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:vi,scaleY:bi,scale:t=>(vi(t)+bi(t))/2,rotateX:t=>rs(Kt(Math.atan2(t[6],t[5]))),rotateY:t=>rs(Kt(Math.atan2(-t[2],t[0]))),rotateZ:yi,rotate:yi,skewX:t=>Kt(Math.atan(t[4])),skewY:t=>Kt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function os(t){return t.includes("scale")?1:0}function as(t,e){if(!t||t==="none")return os(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Vc,i=n;else{const l=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Mc,i=l}if(!i)return os(e);const o=s[e],r=i[1].split(",").map(Lc);return typeof o=="function"?o(r):r[o]}const Dc=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return as(n,e)};function Lc(t){return parseFloat(t.trim())}const de=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],he=new Set([...de,"pathRotation"]),xi=t=>t===ue||t===V,jc=new Set(["x","y","z"]),Ic=de.filter(t=>!jc.has(t));function Oc(t){const e=[];return Ic.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const jt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>as(e,"x"),y:(t,{transform:e})=>as(e,"y")};jt.translateX=jt.x;jt.translateY=jt.y;const Yt=new Set;let ls=!1,cs=!1,us=!1;function mo(){if(cs){const t=Array.from(Yt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Oc(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{s.getValue(o)?.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}cs=!1,ls=!1,Yt.forEach(t=>t.complete(us)),Yt.clear()}function go(){Yt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(cs=!0)})}function Fc(){us=!0,go(),mo(),us=!1}class Bs{constructor(e,n,s,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(Yt.add(this),ls||(ls=!0,z.read(go),z.resolveKeyframes(mo))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const o=i?.get(),r=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const l=s.readValue(n,r);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=r),i&&o===void 0&&i.set(e[0])}Rc(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Yt.delete(this)}cancel(){this.state==="scheduled"&&(Yt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Bc=t=>t.startsWith("--");function yo(t,e,n){Bc(e)?t.style.setProperty(e,n):t.style[e]=n}const Nc={};function vo(t,e){const n=Gr(t);return()=>Nc[e]??n()}const _c=vo(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),bo=vo(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Se=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,wi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Se([0,.65,.55,1]),circOut:Se([.55,0,1,.45]),backIn:Se([.31,.01,.66,-.59]),backOut:Se([.33,1.53,.69,.99])};function xo(t,e){if(t)return typeof t=="function"?bo()?ho(t,e):"ease-out":eo(t)?Se(t):Array.isArray(t)?t.map(n=>xo(n,e)||wi.easeOut):wi[t]}function zc(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:l="easeOut",times:d}={},u=void 0){const a={[e]:n};d&&(a.offset=d);const c=xo(l,i);Array.isArray(c)&&(a.easing=c);const h={delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),t.animate(a,h)}function wo(t){return typeof t=="function"&&"applyToOptions"in t}function Wc({type:t,...e}){return wo(t)&&bo()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class To extends Fs{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:l,onComplete:d}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,vn(typeof e.type!="string");const u=Wc(e);this.animation=zc(n,s,i,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const a=bn(i,this.options,l,this.speed);this.updateMotionValue&&this.updateMotionValue(a),yo(n,s,a),this.animation.cancel()}d?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return pt(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+pt(e)}get time(){return pt(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=ht(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:s,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&_c()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),mt):i(this)}}const So={anticipate:Zr,backInOut:Xr,circInOut:Jr};function Uc(t){return t in So}function Gc(t){typeof t.ease=="string"&&Uc(t.ease)&&(t.ease=So[t.ease])}const On=10;class $c extends To{constructor(e){Gc(e),po(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const l=new dn({...r,autoplay:!1}),d=Math.max(On,lt.now()-this.startTime),u=At(0,On,d-On),a=l.sample(d).value,{name:c}=this.options;o&&c&&yo(o,c,a),n.setWithVelocity(l.sample(Math.max(0,d-u)).value,a,u),l.stop()}}const Ti=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(vt.test(t)||t==="0")&&!t.startsWith("url("));function Hc(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function qc(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=Ti(i,e),l=Ti(o,e);return!r||!l?!1:Hc(t)||(n==="spring"||wo(n))&&s}function ds(t){t.duration=0,t.type="keyframes"}const ko=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Kc=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Yc(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&Kc.test(t[e]))return!0;return!1}const Xc=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Zc=Gr(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Qc(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r,keyframes:l}=t,d=e?.owner?.current;if(!(d instanceof HTMLElement)&&!(d instanceof SVGElement))return!1;const{onUpdate:u,transformTemplate:a}=e.owner.getProps();return Zc()&&n&&(ko.has(n)||Xc.has(n)&&Yc(l))&&(n!=="transform"||!a)&&!u&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const Jc=40;class tu extends Fs{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:l,name:d,motionValue:u,element:a,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=lt.now();const h={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:d,motionValue:u,element:a,...c},m=a?.KeyframeResolver||Bs;this.keyframeResolver=new m(l,(f,y,b)=>this.onKeyframesResolved(f,y,h,!b),d,u,a),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:l,delay:d,isHandoff:u,onUpdate:a}=s;this.resolvedAt=lt.now();let c=!0;qc(e,o,r,l)||(c=!1,(It.instantAnimations||!d)&&a?.(bn(e,s,n)),e[0]=e[e.length-1],ds(s),s.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Jc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},f=c&&!u&&Qc(m),y=m.motionValue?.owner?.current;let b;if(f)try{b=new $c({...m,element:y})}catch{b=new dn(m)}else b=new dn(m);b.finished.then(()=>{this.notifyFinished()}).catch(mt),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Fc()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Po(t,e,n,s=0,i=1){const o=Array.from(t).sort((u,a)=>u.sortNodePosition(a)).indexOf(e),r=t.size,l=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:l-o*s}const Si=30,eu=t=>!isNaN(parseFloat(t));class nu{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=lt.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=lt.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=eu(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Rs);const s=this.events[e].add(n);return e==="change"?()=>{s(),z.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=lt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Si)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Si);return $r(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ce(t,e){return new nu(t,e)}function Co(t,e){if(t?.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function Ns(t,e){const n=t?.[e]??t?.default??t;return n!==t?Co(n,t):n}const su={type:"spring",stiffness:500,damping:25,restSpeed:10},iu=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),ru={type:"keyframes",duration:.8},ou={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},au=(t,{keyframes:e})=>e.length>2?ru:he.has(t)?t.startsWith("scale")?iu(e[1]):su:ou,lu=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function cu(t){for(const e in t)if(!lu.has(e))return!0;return!1}const _s=(t,e,n,s={},i,o)=>r=>{const l=Ns(s,t)||{},d=l.delay||s.delay||0;let{elapsed:u=0}=s;u=u-ht(d);const a={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-u,onUpdate:h=>{e.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{r(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:o?void 0:i};cu(l)||Object.assign(a,au(t,a)),a.duration&&(a.duration=ht(a.duration)),a.repeatDelay&&(a.repeatDelay=ht(a.repeatDelay)),a.from!==void 0&&(a.keyframes[0]=a.from);let c=!1;if((a.type===!1||a.duration===0&&!a.repeatDelay)&&(ds(a),a.delay===0&&(c=!0)),(It.instantAnimations||It.skipAnimations||i?.shouldSkipAnimations||l.skipAnimations)&&(c=!0,ds(a),a.delay=0),a.allowFlatten=!l.type&&!l.ease,c&&!o&&e.get()!==void 0){const h=bn(a.keyframes,l);if(h!==void 0){z.update(()=>{a.onUpdate(h),a.onComplete()});return}}return l.isSync?new dn(a):new tu(a)},uu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function du(t){const e=uu.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Ao(t,e,n=1){const[s,i]=du(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return zr(r)?parseFloat(r):r}return Ds(i)?Ao(i,e,n+1):i}function ki(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function zs(t,e,n,s){if(typeof e=="function"){const[i,o]=ki(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=ki(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function Xt(t,e,n){const s=t.getProps();return zs(s,e,n!==void 0?n:s.custom,t)}const Eo=new Set(["width","height","top","left","right","bottom",...de]),hs=t=>Array.isArray(t);function hu(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ce(n))}function fu(t){return hs(t)?t[t.length-1]||0:t}function pu(t,e){const n=Xt(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const l=fu(o[r]);hu(t,r,l)}}const ot=t=>!!(t&&t.getVelocity);function mu(t){return!!(ot(t)&&t.add)}function fs(t,e){const n=t.getValue("willChange");if(mu(n))return n.add(e);if(!n&&It.WillChange){const s=new It.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Ws(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const gu="framerAppearId",Ro="data-"+Ws(gu);function Mo(t){return t.props[Ro]}function yu({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Vo(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o,transitionEnd:r,...l}=e;const d=t.getDefaultTransition();o=o?Co(o,d):d;const u=o?.reduceMotion,a=o?.skipAnimations;s&&(o=s);const c=[],h=i&&t.animationState&&t.animationState.getState()[i],m=o?.path;m&&m.animateVisualElement(t,l,o,n,c);for(const f in l){const y=t.getValue(f,t.latestValues[f]??null),b=l[f];if(b===void 0||h&&yu(h,f))continue;const w={delay:n,...Ns(o||{},f)};a&&(w.skipAnimations=!0);const x=y.get();if(x!==void 0&&!y.isAnimating()&&!Array.isArray(b)&&b===x&&!w.velocity){z.update(()=>y.set(b));continue}let S=!1;if(window.MotionHandoffAnimation){const B=Mo(t);if(B){const k=window.MotionHandoffAnimation(B,f,z);k!==null&&(w.startTime=k,S=!0)}}fs(t,f);const P=u??t.shouldReduceMotion;y.start(_s(f,y,b,P&&Eo.has(f)?{type:!1}:w,t,S));const j=y.animation;j&&c.push(j)}if(r){const f=()=>z.update(()=>{r&&pu(t,r)});c.length?Promise.all(c).then(f):f()}return c}function ps(t,e,n={}){const s=Xt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(Vo(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(d=0)=>{const{delayChildren:u=0,staggerChildren:a,staggerDirection:c}=i;return vu(t,e,d,u,a,c,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[d,u]=l==="beforeChildren"?[o,r]:[r,o];return d().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function vu(t,e,n=0,s=0,i=0,o=1,r){const l=[];for(const d of t.variantChildren)d.notify("AnimationStart",e),l.push(ps(d,e,{...r,delay:n+(typeof s=="function"?0:s)+Po(t.variantChildren,d,s,i,o)}).then(()=>d.notify("AnimationComplete",e)));return Promise.all(l)}function bu(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>ps(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=ps(t,e,n);else{const i=typeof e=="function"?Xt(t,e,n.custom):e;s=Promise.all(Vo(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const xu={test:t=>t==="auto",parse:t=>t},Do=t=>e=>e.test(t),Lo=[ue,V,Ct,Mt,Hl,$l,xu],Pi=t=>Lo.find(Do(t));function wu(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Ur(t):!0}const Tu=new Set(["brightness","contrast","saturate","opacity"]);function Su(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Ls)||[];if(!s)return t;const i=n.replace(s,"");let o=Tu.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const ku=/\b([a-z-]*)\(.*?\)/gu,ms={...vt,getAnimatableNone:t=>{const e=t.match(ku);return e?e.map(Su).join(" "):t}},gs={...vt,getAnimatableNone:t=>{const e=vt.parse(t);return vt.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Ci={...ue,transform:Math.round},Pu={rotate:Mt,pathRotation:Mt,rotateX:Mt,rotateY:Mt,rotateZ:Mt,scale:Ge,scaleX:Ge,scaleY:Ge,scaleZ:Ge,skew:Mt,skewX:Mt,skewY:Mt,distance:V,translateX:V,translateY:V,translateZ:V,x:V,y:V,z:V,perspective:V,transformPerspective:V,opacity:Re,originX:hi,originY:hi,originZ:V},hn={borderWidth:V,borderTopWidth:V,borderRightWidth:V,borderBottomWidth:V,borderLeftWidth:V,borderRadius:V,borderTopLeftRadius:V,borderTopRightRadius:V,borderBottomRightRadius:V,borderBottomLeftRadius:V,width:V,maxWidth:V,height:V,maxHeight:V,top:V,right:V,bottom:V,left:V,inset:V,insetBlock:V,insetBlockStart:V,insetBlockEnd:V,insetInline:V,insetInlineStart:V,insetInlineEnd:V,padding:V,paddingTop:V,paddingRight:V,paddingBottom:V,paddingLeft:V,paddingBlock:V,paddingBlockStart:V,paddingBlockEnd:V,paddingInline:V,paddingInlineStart:V,paddingInlineEnd:V,margin:V,marginTop:V,marginRight:V,marginBottom:V,marginLeft:V,marginBlock:V,marginBlockStart:V,marginBlockEnd:V,marginInline:V,marginInlineStart:V,marginInlineEnd:V,fontSize:V,backgroundPositionX:V,backgroundPositionY:V,...Pu,zIndex:Ci,fillOpacity:Re,strokeOpacity:Re,numOctaves:Ci},Cu={...hn,color:Y,backgroundColor:Y,outlineColor:Y,fill:Y,stroke:Y,borderColor:Y,borderTopColor:Y,borderRightColor:Y,borderBottomColor:Y,borderLeftColor:Y,filter:ms,WebkitFilter:ms,mask:gs,WebkitMask:gs},jo=t=>Cu[t],Au=new Set([ms,gs]);function Io(t,e){let n=jo(t);return Au.has(n)||(n=vt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Eu=new Set(["auto","none","0"]);function Ru(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!Eu.has(o)&&le(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=Io(n,i)}class Mu extends Bs{constructor(e,n,s,i,o){super(e,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let a=0;a<e.length;a++){let c=e[a];if(typeof c=="string"&&(c=c.trim(),Ds(c))){const h=Ao(c,n.current);h!==void 0&&(e[a]=h),a===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Eo.has(s)||e.length!==2)return;const[i,o]=e,r=Pi(i),l=Pi(o),d=di(i),u=di(o);if(d!==u&&jt[s]){this.needsMeasurement=!0;return}if(r!==l)if(xi(r)&&xi(l))for(let a=0;a<e.length;a++){const c=e[a];typeof c=="string"&&(e[a]=parseFloat(c))}else jt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||wu(e[i]))&&s.push(i);s.length&&Ru(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=jt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,r=s[o];s[o]=jt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([l,d])=>{e.getValue(l).set(d)}),this.resolveNoneKeyframes()}}const Us=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function Oo(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(s=>s!=null)}const ys=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Vu(t){return Wr(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:Gs}=no(queueMicrotask,!1),yt={x:!1,y:!1};function Fo(){return yt.x||yt.y}function Du(t){return t==="x"||t==="y"?yt[t]?null:(yt[t]=!0,()=>{yt[t]=!1}):yt.x||yt.y?null:(yt.x=yt.y=!0,()=>{yt.x=yt.y=!1})}function Bo(t,e){const n=Oo(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Lu(t){return!(t.pointerType==="touch"||Fo())}function ju(t,e,n={}){const[s,i,o]=Bo(t,n);return s.forEach(r=>{let l=!1,d=!1,u;const a=()=>{r.removeEventListener("pointerleave",f)},c=b=>{u&&(u(b),u=void 0),a()},h=b=>{l=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),d&&(d=!1,c(b))},m=()=>{l=!0,window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",h,i)},f=b=>{if(b.pointerType!=="touch"){if(l){d=!0;return}c(b)}},y=b=>{if(!Lu(b))return;d=!1;const w=e(r,b);typeof w=="function"&&(u=w,r.addEventListener("pointerleave",f,i))};r.addEventListener("pointerenter",y,i),r.addEventListener("pointerdown",m,i)}),o}const No=(t,e)=>e?t===e?!0:No(t,e.parentElement):!1,$s=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Iu=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ou(t){return Iu.has(t.tagName)||t.isContentEditable===!0}const Fu=new Set(["INPUT","SELECT","TEXTAREA"]);function Bu(t){return Fu.has(t.tagName)||t.isContentEditable===!0}const Qe=new WeakSet;function Ai(t){return e=>{e.key==="Enter"&&t(e)}}function Fn(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Nu=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Ai(()=>{if(Qe.has(n))return;Fn(n,"down");const i=Ai(()=>{Fn(n,"up")}),o=()=>Fn(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Ei(t){return $s(t)&&!Fo()}const Ri=new WeakSet;function _u(t,e,n={}){const[s,i,o]=Bo(t,n),r=l=>{const d=l.currentTarget;if(!Ei(l)||Ri.has(l))return;Qe.add(d),n.stopPropagation&&Ri.add(l);const u=e(d,l),a={...i,capture:!0},c=(f,y)=>{window.removeEventListener("pointerup",h,a),window.removeEventListener("pointercancel",m,a),Qe.has(d)&&Qe.delete(d),Ei(f)&&typeof u=="function"&&u(f,{success:y})},h=f=>{c(f,d===window||d===document||n.useGlobalTarget||No(d,f.target))},m=f=>{c(f,!1)};window.addEventListener("pointerup",h,a),window.addEventListener("pointercancel",m,a)};return s.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",r,i),Vu(l)&&(l.addEventListener("focus",u=>Nu(u,i)),!Ou(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),o}function Hs(t){return Wr(t)&&"ownerSVGElement"in t}const Je=new WeakMap;let tn;const _o=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:Hs(s)&&"getBBox"in s?s.getBBox()[e]:s[n],zu=_o("inline","width","offsetWidth"),Wu=_o("block","height","offsetHeight");function Uu({target:t,borderBoxSize:e}){Je.get(t)?.forEach(n=>{n(t,{get width(){return zu(t,e)},get height(){return Wu(t,e)}})})}function Gu(t){t.forEach(Uu)}function $u(){typeof ResizeObserver>"u"||(tn=new ResizeObserver(Gu))}function Hu(t,e){tn||$u();const n=Oo(t);return n.forEach(s=>{let i=Je.get(s);i||(i=new Set,Je.set(s,i)),i.add(e),tn?.observe(s)}),()=>{n.forEach(s=>{const i=Je.get(s);i?.delete(e),i?.size||tn?.unobserve(s)})}}const en=new Set;let re;function qu(){re=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};en.forEach(e=>e(t))},window.addEventListener("resize",re)}function Ku(t){return en.add(t),re||qu(),()=>{en.delete(t),!en.size&&typeof re=="function"&&(window.removeEventListener("resize",re),re=void 0)}}function Mi(t,e){return typeof t=="function"?Ku(t):Hu(t,e)}function Yu(t){return Hs(t)&&t.tagName==="svg"}const Xu=[...Lo,Y,vt],Zu=t=>Xu.find(Do(t)),Vi=()=>({translate:0,scale:1,origin:0,originPoint:0}),oe=()=>({x:Vi(),y:Vi()}),Di=()=>({min:0,max:0}),Z=()=>({x:Di(),y:Di()}),Qu=new WeakMap;function xn(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Me(t){return typeof t=="string"||Array.isArray(t)}const qs=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ks=["initial",...qs];function wn(t){return xn(t.animate)||Ks.some(e=>Me(t[e]))}function zo(t){return!!(wn(t)||t.variants)}function Ju(t,e,n){for(const s in e){const i=e[s],o=n[s];if(ot(i))t.addValue(s,i);else if(ot(o))t.addValue(s,ce(i,{owner:t}));else if(o!==i)if(t.hasValue(s)){const r=t.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=t.getStaticValue(s);t.addValue(s,ce(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const vs={current:null},Wo={current:!1},td=typeof window<"u";function ed(){if(Wo.current=!0,!!td)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>vs.current=t.matches;t.addEventListener("change",e),e()}else vs.current=!1}const Li=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let fn={};function Uo(t){fn=t}function nd(){return fn}class sd{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:o,blockInitialAnimation:r,visualState:l},d={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Bs,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=lt.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,z.render(this.render,!1,!0))};const{latestValues:u,renderState:a}=l;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=a,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=o,this.options=d,this.blockInitialAnimation=!!r,this.isControllingVariants=wn(n),this.isVariantNode=zo(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in h){const f=h[m];u[m]!==void 0&&ot(f)&&f.set(u[m])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,Qu.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Wo.current||ed(),this.shouldReduceMotion=vs.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Ot(this.notifyUpdate),Ot(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&ko.has(e)&&this.current instanceof HTMLElement){const{factory:r,keyframes:l,times:d,ease:u,duration:a}=n.accelerate,c=new To({element:this.current,name:e,keyframes:l,times:d,ease:u,duration:ht(a)}),h=r(c);this.valueSubscriptions.set(e,()=>{h(),c.cancel()});return}const s=he.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&z.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in fn){const n=fn[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Z()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Li.length;s++){const i=Li[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Ju(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=ce(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(zr(s)||Ur(s))?s=parseFloat(s):!Zu(s)&&vt.test(n)&&(s=Io(e,n)),this.setBaseTarget(e,ot(s)?s.get():s)),ot(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=zs(this.props,n,this.presenceContext?.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!ot(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Rs),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Gs.render(this.render)}}class Go extends sd{constructor(){super(...arguments),this.KeyframeResolver=Mu}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ot(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Ft{constructor(e){this.isMounted=!1,this.node=e}update(){}}function $o({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function id({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function rd(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Bn(t){return t===void 0||t===1}function bs({scale:t,scaleX:e,scaleY:n}){return!Bn(t)||!Bn(e)||!Bn(n)}function Ht(t){return bs(t)||Ho(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Ho(t){return ji(t.x)||ji(t.y)}function ji(t){return t&&t!=="0%"}function pn(t,e,n){const s=t-n,i=e*s;return n+i}function Ii(t,e,n,s,i){return i!==void 0&&(t=pn(t,i,s)),pn(t,n,s)+e}function xs(t,e=0,n=1,s,i){t.min=Ii(t.min,e,n,s,i),t.max=Ii(t.max,e,n,s,i)}function qo(t,{x:e,y:n}){xs(t.x,e.translate,e.scale,e.originPoint),xs(t.y,n.translate,n.scale,n.originPoint)}const Oi=.999999999999,Fi=1.0000000000001;function od(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let l=0;l<i;l++){o=n[l],r=o.projectionDelta;const{visualElement:d}=o.options;d&&d.props.style&&d.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(Pt(t.x,-o.scroll.offset.x),Pt(t.y,-o.scroll.offset.y)),r&&(e.x*=r.x.scale,e.y*=r.y.scale,qo(t,r)),s&&Ht(o.latestValues)&&nn(t,o.latestValues,o.layout?.layoutBox))}e.x<Fi&&e.x>Oi&&(e.x=1),e.y<Fi&&e.y>Oi&&(e.y=1)}function Pt(t,e){t.min+=e,t.max+=e}function Bi(t,e,n,s,i=.5){const o=_(t.min,t.max,i);xs(t,e,n,o,s)}function Ni(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function nn(t,e,n){const s=n??t;Bi(t.x,Ni(e.x,s.x),e.scaleX,e.scale,e.originX),Bi(t.y,Ni(e.y,s.y),e.scaleY,e.scale,e.originY)}function Ko(t,e){return $o(rd(t.getBoundingClientRect(),e))}function ad(t,e,n){const s=Ko(t,n),{scroll:i}=e;return i&&(Pt(s.x,i.offset.x),Pt(s.y,i.offset.y)),s}const ld={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},cd=de.length;function ud(t,e,n){let s="",i=!0;for(let r=0;r<cd;r++){const l=de[r],d=t[l];if(d===void 0)continue;let u=!0;if(typeof d=="number")u=d===(l.startsWith("scale")?1:0);else{const a=parseFloat(d);u=l.startsWith("scale")?a===1:a===0}if(!u||n){const a=ys(d,hn[l]);if(!u){i=!1;const c=ld[l]||l;s+=`${c}(${a}) `}n&&(e[l]=a)}}const o=t.pathRotation;return o&&(i=!1,s+=`rotate(${ys(o,hn.pathRotation)}) `),s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Ys(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,l=!1;for(const d in e){const u=e[d];if(he.has(d)){r=!0;continue}else if(io(d)){i[d]=u;continue}else{const a=ys(u,hn[d]);d.startsWith("origin")?(l=!0,o[d]=a):s[d]=a}}if(e.transform||(r||n?s.transform=ud(e,t.transform,n):s.transform&&(s.transform="none")),l){const{originX:d="50%",originY:u="50%",originZ:a=0}=o;s.transformOrigin=`${d} ${u} ${a}`}}function Yo(t,{style:e,vars:n},s,i){const o=t.style;let r;for(r in e)o[r]=e[r];i?.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function _i(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const xe={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(V.test(t))t=parseFloat(t);else return t;const n=_i(t,e.target.x),s=_i(t,e.target.y);return`${n}% ${s}%`}},dd={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=vt.parse(t);if(i.length>5)return s;const o=vt.createTransformer(t),r=typeof i[0]!="number"?1:0,l=n.x.scale*e.x,d=n.y.scale*e.y;i[0+r]/=l,i[1+r]/=d;const u=_(l,d,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}},ws={borderRadius:{...xe,applyTo:[...Us]},borderTopLeftRadius:xe,borderTopRightRadius:xe,borderBottomLeftRadius:xe,borderBottomRightRadius:xe,boxShadow:dd};function Xo(t,{layout:e,layoutId:n}){return he.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ws[t]||t==="opacity")}function Xs(t,e,n){const s=t.style,i=e?.style,o={};if(!s)return o;for(const r in s)(ot(s[r])||i&&ot(i[r])||Xo(r,t)||n?.getValue(r)?.liveStyle!==void 0)&&(o[r]=s[r]);return o}function hd(t){return window.getComputedStyle(t)}class fd extends Go{constructor(){super(...arguments),this.type="html",this.renderInstance=Yo}mount(e){vn(!!e.style),super.mount(e)}readValueFromInstance(e,n){if(he.has(n))return this.projection?.isProjecting?os(n):Dc(e,n);{const s=hd(e),i=(io(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Ko(e,n)}build(e,n,s){Ys(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Xs(e,n,s)}}const pd={offset:"stroke-dashoffset",array:"stroke-dasharray"},md={offset:"strokeDashoffset",array:"strokeDasharray"};function gd(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?pd:md;t[o.offset]=`${-s}`,t[o.array]=`${e} ${n}`}const yd=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Zo(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...l},d,u,a){if(Ys(t,l,u),d){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:c,style:h}=t;c.transform&&(h.transform=c.transform,delete c.transform),(h.transform||c.transformOrigin)&&(h.transformOrigin=c.transformOrigin??"50% 50%",delete c.transformOrigin),h.transform&&(h.transformBox=a?.transformBox??"fill-box",delete c.transformBox);for(const m of yd)c[m]!==void 0&&(h[m]=c[m],delete c[m]);e!==void 0&&(c.x=e),n!==void 0&&(c.y=n),s!==void 0&&(c.scale=s),i!==void 0&&gd(c,i,o,r,!1)}const Qo=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"]),Jo=t=>typeof t=="string"&&t.toLowerCase()==="svg";function vd(t,e,n,s){Yo(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Qo.has(i)?i:Ws(i),e.attrs[i])}function ta(t,e,n){const s=Xs(t,e,n);for(const i in t)if(ot(t[i])||ot(e[i])){const o=de.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}class bd extends Go{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Z}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(he.has(n)){const s=jo(n);return s&&s.default||0}return n=Qo.has(n)?n:Ws(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return ta(e,n,s)}build(e,n,s){Zo(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){vd(e,n,s,i)}mount(e){this.isSVGTag=Jo(e.tagName),super.mount(e)}}const xd=Ks.length;function ea(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?ea(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<xd;n++){const s=Ks[n],i=t.props[s];(Me(i)||i===!1)&&(e[s]=i)}return e}function na(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const wd=[...qs].reverse(),Td=qs.length;function Sd(t){return e=>Promise.all(e.map(({animation:n,options:s})=>bu(t,n,s)))}function kd(t){let e=Sd(t),n=zi(),s=!0,i=!1;const o=u=>(a,c)=>{const h=Xt(t,c,u==="exit"?t.presenceContext?.custom:void 0);if(h){const{transition:m,transitionEnd:f,...y}=h;a={...a,...y,...f}}return a};function r(u){e=u(t)}function l(u){const{props:a}=t,c=ea(t.parent)||{},h=[],m=new Set;let f={},y=1/0;for(let w=0;w<Td;w++){const x=wd[w],S=n[x],P=a[x]!==void 0?a[x]:c[x],j=Me(P),B=x===u?S.isActive:null;B===!1&&(y=w);let k=P===c[x]&&P!==a[x]&&j;if(k&&(s||i)&&t.manuallyAnimateOnMount&&(k=!1),S.protectedKeys={...f},!S.isActive&&B===null||!P&&!S.prevProp||xn(P)||typeof P=="boolean")continue;if(x==="exit"&&S.isActive&&B!==!0){S.prevResolvedValues&&(f={...f,...S.prevResolvedValues});continue}const g=Pd(S.prevProp,P);let M=g||x===u&&S.isActive&&!k&&j||w>y&&j,C=!1;const D=Array.isArray(P)?P:[P];let U=D.reduce(o(x),{});B===!1&&(U={});const{prevResolvedValues:tt={}}=S,H={...tt,...U},F=W=>{M=!0,m.has(W)&&(C=!0,m.delete(W)),S.needsAnimating[W]=!0;const Q=t.getValue(W);Q&&(Q.liveStyle=!1)};for(const W in H){const Q=U[W],A=tt[W];if(f.hasOwnProperty(W))continue;let dt=!1;hs(Q)&&hs(A)?dt=!na(Q,A)||g:dt=Q!==A,dt?Q!=null?F(W):m.add(W):Q!==void 0&&m.has(W)?F(W):S.protectedKeys[W]=!0}S.prevProp=P,S.prevResolvedValues=U,S.isActive&&(f={...f,...U}),(s||i)&&t.blockInitialAnimation&&(M=!1);const N=k&&g;M&&(!N||C)&&h.push(...D.map(W=>{const Q={type:x};if(typeof W=="string"&&(s||i)&&!N&&t.manuallyAnimateOnMount&&t.parent){const{parent:A}=t,dt=Xt(A,W);if(A.enteringChildren&&dt){const{delayChildren:Qt}=dt.transition||{};Q.delay=Po(A.enteringChildren,t,Qt)}}return{animation:W,options:Q}}))}if(m.size){const w={};if(typeof a.initial!="boolean"){const x=Xt(t,Array.isArray(a.initial)?a.initial[0]:a.initial);x&&x.transition&&(w.transition=x.transition)}m.forEach(x=>{const S=t.getBaseTarget(x),P=t.getValue(x);P&&(P.liveStyle=!0),w[x]=S??null}),h.push({animation:w})}let b=!!h.length;return s&&(a.initial===!1||a.initial===a.animate)&&!t.manuallyAnimateOnMount&&(b=!1),s=!1,i=!1,b?e(h):Promise.resolve()}function d(u,a){if(n[u].isActive===a)return Promise.resolve();t.variantChildren?.forEach(h=>h.animationState?.setActive(u,a)),n[u].isActive=a;const c=l(u);for(const h in n)n[h].protectedKeys={};return c}return{animateChanges:l,setActive:d,setAnimateFunction:r,getState:()=>n,reset:()=>{n=zi(),i=!0}}}function Pd(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!na(e,t):!1}function Wt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function zi(){return{animate:Wt(!0),whileInView:Wt(),whileHover:Wt(),whileTap:Wt(),whileDrag:Wt(),whileFocus:Wt(),exit:Wt()}}function Ts(t,e){t.min=e.min,t.max=e.max}function gt(t,e){Ts(t.x,e.x),Ts(t.y,e.y)}function Wi(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const sa=1e-4,Cd=1-sa,Ad=1+sa,ia=.01,Ed=0-ia,Rd=0+ia;function ct(t){return t.max-t.min}function Md(t,e,n){return Math.abs(t-e)<=n}function Ui(t,e,n,s=.5){t.origin=s,t.originPoint=_(e.min,e.max,t.origin),t.scale=ct(n)/ct(e),t.translate=_(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Cd&&t.scale<=Ad||isNaN(t.scale))&&(t.scale=1),(t.translate>=Ed&&t.translate<=Rd||isNaN(t.translate))&&(t.translate=0)}function Ce(t,e,n,s){Ui(t.x,e.x,n.x,s?s.originX:void 0),Ui(t.y,e.y,n.y,s?s.originY:void 0)}function Gi(t,e,n,s=0){const i=s?_(n.min,n.max,s):n.min;t.min=i+e.min,t.max=t.min+ct(e)}function Vd(t,e,n,s){Gi(t.x,e.x,n.x,s?.x),Gi(t.y,e.y,n.y,s?.y)}function $i(t,e,n,s=0){const i=s?_(n.min,n.max,s):n.min;t.min=e.min-i,t.max=t.min+ct(e)}function mn(t,e,n,s){$i(t.x,e.x,n.x,s?.x),$i(t.y,e.y,n.y,s?.y)}function Hi(t,e,n,s,i){return t-=e,t=pn(t,1/n,s),i!==void 0&&(t=pn(t,1/i,s)),t}function Dd(t,e=0,n=1,s=.5,i,o=t,r=t){if(Ct.test(e)&&(e=parseFloat(e),e=_(r.min,r.max,e/100)-r.min),typeof e!="number")return;let l=_(o.min,o.max,s);t===o&&(l-=e),t.min=Hi(t.min,e,n,l,i),t.max=Hi(t.max,e,n,l,i)}function qi(t,e,[n,s,i],o,r){Dd(t,e[n],e[s],e[i],e.scale,o,r)}const Ld=["x","scaleX","originX"],jd=["y","scaleY","originY"];function Ki(t,e,n,s){qi(t.x,e,Ld,n?n.x:void 0,s?s.x:void 0),qi(t.y,e,jd,n?n.y:void 0,s?s.y:void 0)}function Yi(t){return t.translate===0&&t.scale===1}function ra(t){return Yi(t.x)&&Yi(t.y)}function Xi(t,e){return t.min===e.min&&t.max===e.max}function Id(t,e){return Xi(t.x,e.x)&&Xi(t.y,e.y)}function Zi(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function oa(t,e){return Zi(t.x,e.x)&&Zi(t.y,e.y)}function Qi(t){return ct(t.x)/ct(t.y)}function Ji(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function kt(t){return[t("x"),t("y")]}function Od(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:a,pathRotation:c,rotateX:h,rotateY:m,skewX:f,skewY:y}=n;u&&(s=`perspective(${u}px) ${s}`),a&&(s+=`rotate(${a}deg) `),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotateX(${h}deg) `),m&&(s+=`rotateY(${m}deg) `),f&&(s+=`skewX(${f}deg) `),y&&(s+=`skewY(${y}deg) `)}const l=t.x.scale*e.x,d=t.y.scale*e.y;return(l!==1||d!==1)&&(s+=`scale(${l}, ${d})`),s||"none"}const Fd=Us.length,tr=t=>typeof t=="string"?parseFloat(t):t,er=t=>typeof t=="number"||V.test(t);function Bd(t,e,n,s,i,o){i?(t.opacity=_(0,n.opacity??1,Nd(s)),t.opacityExit=_(e.opacity??1,0,_d(s))):o&&(t.opacity=_(e.opacity??1,n.opacity??1,s));for(let r=0;r<Fd;r++){const l=Us[r];let d=nr(e,l),u=nr(n,l);if(d===void 0&&u===void 0)continue;d||(d=0),u||(u=0),d===0||u===0||er(d)===er(u)?(t[l]=Math.max(_(tr(d),tr(u),s),0),(Ct.test(u)||Ct.test(d))&&(t[l]+="%")):t[l]=u}(e.rotate||n.rotate)&&(t.rotate=_(e.rotate||0,n.rotate||0,s))}function nr(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Nd=aa(0,.5,Qr),_d=aa(.5,.95,mt);function aa(t,e,n){return s=>s<t?0:s>e?1:n(Ee(t,e,s))}function zd(t,e,n){const s=ot(t)?t:ce(t);return s.start(_s("",s,e,n)),s.animation}function Ve(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n,s)}const Wd=(t,e)=>t.depth-e.depth;class Ud{constructor(){this.children=[],this.isDirty=!1}add(e){Es(this.children,e),this.isDirty=!0}remove(e){an(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Wd),this.isDirty=!1,this.children.forEach(e)}}function Gd(t,e){const n=lt.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(Ot(s),t(o-e))};return z.setup(s,!0),()=>Ot(s)}function sn(t){return ot(t)?t.get():t}class $d{constructor(){this.members=[]}add(e){Es(this.members,e);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===e||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(an(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(an(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){for(let n=this.members.indexOf(e)-1;n>=0;n--){const s=this.members[n];if(s.isPresent!==!1&&s.instance?.isConnected!==!1)return this.promote(s),!0}return!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:i}=s.options,{layoutDependency:o}=e.options;(i===void 0||i!==o)&&(e.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.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)}}const rn={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Nn=["","X","Y","Z"],Hd=1e3;let qd=0;function _n(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function la(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Mo(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",z,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&la(s)}function ca({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},l=e?.()){this.id=qd++,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.layoutVersion=0,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(Xd),this.nodes.forEach(nh),this.nodes.forEach(sh),this.nodes.forEach(Zd)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ud)}addEventListener(r,l){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Rs),this.eventHandlers.get(r).add(l)}notifyListeners(r,...l){const d=this.eventHandlers.get(r);d&&d.notify(...l)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=Hs(r)&&!Yu(r),this.instance=r;const{layoutId:l,layout:d,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(d||l)&&(this.isLayoutDirty=!0),t){let a,c=0;const h=()=>this.root.updateBlockedByResize=!1;z.read(()=>{c=window.innerWidth}),t(r,()=>{const m=window.innerWidth;m!==c&&(c=m,this.root.updateBlockedByResize=!0,a&&a(),a=Gd(h,250),rn.hasAnimatedSinceResize&&(rn.hasAnimatedSinceResize=!1,this.nodes.forEach(rr)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||d)&&this.addEventListener("didUpdate",({delta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const f=this.options.transition||u.getDefaultTransition()||lh,{onLayoutAnimationStart:y,onLayoutAnimationComplete:b}=u.getProps(),w=!this.targetLayout||!oa(this.targetLayout,m),x=!c&&h;if(this.options.layoutRoot||this.resumeFrom||x||c&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S={...Ns(f,"layout"),onPlay:y,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(a,x,S.path)}else c||rr(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ot(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ih),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&la(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let a=0;a<this.path.length;a++){const c=this.path[a];c.shouldResetTransform=!0,(typeof c.latestValues.x=="string"||typeof c.latestValues.y=="string")&&(c.isLayoutDirty=!0),c.updateScroll("snapshot"),c.options.layoutRoot&&c.willUpdate(!1)}const{layoutId:l,layout:d}=this.options;if(l===void 0&&!d)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const d=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),d&&this.nodes.forEach(Jd),this.nodes.forEach(sr);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ir);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(th),this.nodes.forEach(eh),this.nodes.forEach(Kd),this.nodes.forEach(Yd)):this.nodes.forEach(ir),this.clearAllSnapshots();const l=lt.now();it.delta=At(0,1e3/60,l-it.timestamp),it.timestamp=l,it.isProcessing=!0,Vn.update.process(it),Vn.preRender.process(it),Vn.render.process(it),it.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Gs.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Qd),this.sharedNodes.forEach(rh)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,z.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){z.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ct(this.snapshot.measuredBox.x)&&!ct(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let d=0;d<this.path.length;d++)this.path[d].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Z()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(l=!1),l&&this.instance){const d=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:d,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!ra(this.projectionDelta),d=this.getTransformTemplate(),u=d?d(this.latestValues,""):void 0,a=u!==this.prevTransformTemplateValue;r&&this.instance&&(l||Ht(this.latestValues)||a)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const l=this.measurePageBox();let d=this.removeElementScroll(l);return r&&(d=this.removeTransform(d)),ch(d),{animationId:this.root.animationId,measuredBox:l,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return Z();const l=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(uh))){const{scroll:u}=this.root;u&&(Pt(l.x,u.offset.x),Pt(l.y,u.offset.y))}return l}removeElementScroll(r){const l=Z();if(gt(l,r),this.scroll?.wasRoot)return l;for(let d=0;d<this.path.length;d++){const u=this.path[d],{scroll:a,options:c}=u;u!==this.root&&a&&c.layoutScroll&&(a.wasRoot&&gt(l,r),Pt(l.x,a.offset.x),Pt(l.y,a.offset.y))}return l}applyTransform(r,l=!1,d){const u=d||Z();gt(u,r);for(let a=0;a<this.path.length;a++){const c=this.path[a];!l&&c.options.layoutScroll&&c.scroll&&c!==c.root&&(Pt(u.x,-c.scroll.offset.x),Pt(u.y,-c.scroll.offset.y)),Ht(c.latestValues)&&nn(u,c.latestValues,c.layout?.layoutBox)}return Ht(this.latestValues)&&nn(u,this.latestValues,this.layout?.layoutBox),u}removeTransform(r){const l=Z();gt(l,r);for(let d=0;d<this.path.length;d++){const u=this.path[d];if(!Ht(u.latestValues))continue;let a;u.instance&&(bs(u.latestValues)&&u.updateSnapshot(),a=Z(),gt(a,u.measurePageBox())),Ki(l,u.latestValues,u.snapshot?.layoutBox,a)}return Ht(this.latestValues)&&Ki(l,this.latestValues),l}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}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!==it.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==l;if(!(r||d&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:a,layoutId:c}=this.options;if(!this.layout||!(a||c))return;this.resolvedRelativeTargetAt=it.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Z(),this.targetWithTransforms=Z()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Vd(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):gt(this.target,this.layout.layoutBox),qo(this.target,this.targetDelta)):gt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||bs(this.parent.latestValues)||Ho(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(r,l,d){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Z(),this.relativeTargetOrigin=Z(),mn(this.relativeTargetOrigin,l,d,this.options.layoutAnchor||void 0),gt(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const r=this.getLead(),l=!!this.resumingFrom||this!==r;let d=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(d=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===it.timestamp&&(d=!1),d)return;const{layout:u,layoutId:a}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||a))return;gt(this.layoutCorrected,this.layout.layoutBox);const c=this.treeScale.x,h=this.treeScale.y;od(this.layoutCorrected,this.treeScale,this.path,l),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=Z());const{target:m}=r;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Wi(this.prevProjectionDelta.x,this.projectionDelta.x),Wi(this.prevProjectionDelta.y,this.projectionDelta.y)),Ce(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==c||this.treeScale.y!==h||!Ji(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ji(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=oe(),this.projectionDelta=oe(),this.projectionDeltaWithTransform=oe()}setAnimationOrigin(r,l=!1,d){const u=this.snapshot,a=u?u.latestValues:{},c={...this.latestValues},h=oe();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const m=Z(),f=u?u.source:void 0,y=this.layout?this.layout.source:void 0,b=f!==y,w=this.getStack(),x=!w||w.members.length<=1,S=!!(b&&!x&&this.options.crossfade===!0&&!this.path.some(ah));this.animationProgress=0;let P;const j=d?.interpolateProjection(r);this.mixTargetDelta=B=>{const k=B/1e3,g=j?.(k);g?(h.x.translate=g.x,h.x.scale=_(r.x.scale,1,k),h.x.origin=r.x.origin,h.x.originPoint=r.x.originPoint,h.y.translate=g.y,h.y.scale=_(r.y.scale,1,k),h.y.origin=r.y.origin,h.y.originPoint=r.y.originPoint):(or(h.x,r.x,k),or(h.y,r.y,k)),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(mn(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),oh(this.relativeTarget,this.relativeTargetOrigin,m,k),P&&Id(this.relativeTarget,P)&&(this.isProjectionDirty=!1),P||(P=Z()),gt(P,this.relativeTarget)),b&&(this.animationValues=c,Bd(c,a,this.latestValues,k,S,x)),g&&g.rotate!==void 0&&(this.animationValues||(this.animationValues=c),this.animationValues.pathRotation=g.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ot(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=z.update(()=>{rn.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ce(0)),this.motionValue.jump(0,!1),this.currentAnimation=zd(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:l=>{this.mixTargetDelta(l),r.onUpdate&&r.onUpdate(l)},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Hd),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:l,target:d,layout:u,latestValues:a}=r;if(!(!l||!d||!u)){if(this!==r&&this.layout&&u&&ua(this.options.animationType,this.layout.layoutBox,u.layoutBox)){d=this.target||Z();const c=ct(this.layout.layoutBox.x);d.x.min=r.target.x.min,d.x.max=d.x.min+c;const h=ct(this.layout.layoutBox.y);d.y.min=r.target.y.min,d.y.max=d.y.min+h}gt(l,d),nn(l,a),Ce(this.projectionDeltaWithTransform,this.layoutCorrected,l,a)}}registerSharedNode(r,l){this.sharedNodes.has(r)||this.sharedNodes.set(r,new $d),this.sharedNodes.get(r).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:l,preserveFollowOpacity:d}={}){const u=this.getStack();u&&u.promote(this,d),r&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let l=!1;const{latestValues:d}=r;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(l=!0),!l)return;const u={};d.z&&_n("z",r,u,this.animationValues);for(let a=0;a<Nn.length;a++)_n(`rotate${Nn[a]}`,r,u,this.animationValues),_n(`skew${Nn[a]}`,r,u,this.animationValues);r.render();for(const a in u)r.setStaticValue(a,u[a]),this.animationValues&&(this.animationValues[a]=u[a]);r.scheduleRender()}applyProjectionStyles(r,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const d=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=sn(l?.pointerEvents)||"",r.transform=d?d(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=sn(l?.pointerEvents)||""),this.hasProjected&&!Ht(this.latestValues)&&(r.transform=d?d({},""):"none",this.hasProjected=!1);return}r.visibility="";const a=u.animationValues||u.latestValues;this.applyTransformsToTarget();let c=Od(this.projectionDeltaWithTransform,this.treeScale,a);d&&(c=d(a,c)),r.transform=c;const{x:h,y:m}=this.projectionDelta;r.transformOrigin=`${h.origin*100}% ${m.origin*100}% 0`,u.animationValues?r.opacity=u===this?a.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:r.opacity=u===this?a.opacity!==void 0?a.opacity:"":a.opacityExit!==void 0?a.opacityExit:0;for(const f in ws){if(a[f]===void 0)continue;const{correct:y,applyTo:b,isCSSVariable:w}=ws[f],x=c==="none"?a[f]:y(a[f],u);if(b){const S=b.length;for(let P=0;P<S;P++)r[b[P]]=x}else w?this.options.visualElement.renderState.vars[f]=x:r[f]=x}this.options.layoutId&&(r.pointerEvents=u===this?sn(l?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(sr),this.root.sharedNodes.clear()}}}function Kd(t){t.updateLayout()}function Yd(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,o=e.source!==t.layout.source;if(i==="size")kt(a=>{const c=o?e.measuredBox[a]:e.layoutBox[a],h=ct(c);c.min=n[a].min,c.max=c.min+h});else if(i==="x"||i==="y"){const a=i==="x"?"y":"x";Ts(o?e.measuredBox[a]:e.layoutBox[a],n[a])}else ua(i,e.layoutBox,n)&&kt(a=>{const c=o?e.measuredBox[a]:e.layoutBox[a],h=ct(n[a]);c.max=c.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[a].max=t.relativeTarget[a].min+h)});const r=oe();Ce(r,n,e.layoutBox);const l=oe();o?Ce(l,t.applyTransform(s,!0),e.measuredBox):Ce(l,n,e.layoutBox);const d=!ra(r);let u=!1;if(!t.resumeFrom){const a=t.getClosestProjectingParent();if(a&&!a.resumeFrom){const{snapshot:c,layout:h}=a;if(c&&h){const m=t.options.layoutAnchor||void 0,f=Z();mn(f,e.layoutBox,c.layoutBox,m);const y=Z();mn(y,n,h.layoutBox,m),oa(f,y)||(u=!0),a.options.layoutRoot&&(t.relativeTarget=y,t.relativeTargetOrigin=f,t.relativeParent=a)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:l,layoutDelta:r,hasLayoutChanged:d,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Xd(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Zd(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Qd(t){t.clearSnapshot()}function sr(t){t.clearMeasurements()}function Jd(t){t.isLayoutDirty=!0,t.updateLayout()}function ir(t){t.isLayoutDirty=!1}function th(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function eh(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function rr(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function nh(t){t.resolveTargetDelta()}function sh(t){t.calcProjection()}function ih(t){t.resetSkewAndRotation()}function rh(t){t.removeLeadSnapshot()}function or(t,e,n){t.translate=_(e.translate,0,n),t.scale=_(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function ar(t,e,n,s){t.min=_(e.min,n.min,s),t.max=_(e.max,n.max,s)}function oh(t,e,n,s){ar(t.x,e.x,n.x,s),ar(t.y,e.y,n.y,s)}function ah(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const lh={duration:.45,ease:[.4,0,.1,1]},lr=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),cr=lr("applewebkit/")&&!lr("chrome/")?Math.round:mt;function ur(t){t.min=cr(t.min),t.max=cr(t.max)}function ch(t){ur(t.x),ur(t.y)}function ua(t,e,n){return t==="position"||t==="preserve-aspect"&&!Md(Qi(e),Qi(n),.2)}function uh(t){return t!==t.root&&t.scroll?.wasRoot}const dh=ca({attachResizeListener:(t,e)=>Ve(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),zn={current:void 0},da=ca({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!zn.current){const t=new dh({});t.mount(window),t.setOptions({layoutScroll:!0}),zn.current=t}return zn.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),ha=p.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function hh(t=!0){const e=p.useContext(As);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=p.useId();p.useEffect(()=>{if(t)return i(o)},[t]);const r=p.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const fa=p.createContext({strict:!1}),dr={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let hr=!1;function fh(){if(hr)return;const t={};for(const e in dr)t[e]={isEnabled:n=>dr[e].some(s=>!!n[s])};Uo(t),hr=!0}function pa(){return fh(),nd()}function ph(t){const e=pa();for(const n in t)e[n]={...e[n],...t[n]};Uo(e)}const mh=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function gn(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||mh.has(t)}let ma=t=>!gn(t);function gh(t){typeof t=="function"&&(ma=e=>e.startsWith("on")?!gn(e):t(e))}try{gh(require("@emotion/is-prop-valid").default)}catch{}function yh(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||ot(t[i])||(ma(i)||n===!0&&gn(i)||!e&&!gn(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const Tn=p.createContext({});function vh(t,e){if(wn(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Me(n)?n:void 0,animate:Me(s)?s:void 0}}return t.inherit!==!1?e:{}}function bh(t){const{initial:e,animate:n}=vh(t,p.useContext(Tn));return p.useMemo(()=>({initial:e,animate:n}),[fr(e),fr(n)])}function fr(t){return Array.isArray(t)?t.join(" "):t}const Zs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ga(t,e,n){for(const s in e)!ot(e[s])&&!Xo(s,n)&&(t[s]=e[s])}function xh({transformTemplate:t},e){return p.useMemo(()=>{const n=Zs();return Ys(n,e,t),Object.assign({},n.vars,n.style)},[e])}function wh(t,e){const n=t.style||{},s={};return ga(s,n,t),Object.assign(s,xh(t,e)),s}function Th(t,e){const n={},s=wh(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const ya=()=>({...Zs(),attrs:{}});function Sh(t,e,n,s){const i=p.useMemo(()=>{const o=ya();return Zo(o,e,Jo(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};ga(o,t.style,t),i.style={...o,...i.style}}return i}const kh=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Qs(t){return typeof t!="string"||t.includes("-")?!1:!!(kh.indexOf(t)>-1||/[A-Z]/u.test(t))}function Ph(t,e,n,{latestValues:s},i,o=!1,r){const d=(r??Qs(t)?Sh:Th)(e,s,i,t),u=yh(e,typeof t=="string",o),a=t!==p.Fragment?{...u,...d,ref:n}:{},{children:c}=e,h=p.useMemo(()=>ot(c)?c.get():c,[c]);return p.createElement(t,{...a,children:h})}function Ch({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:Ah(n,s,i,t),renderState:e()}}function Ah(t,e,n,s){const i={},o=s(t,{});for(const h in o)i[h]=sn(o[h]);let{initial:r,animate:l}=t;const d=wn(t),u=zo(t);e&&u&&!d&&t.inherit!==!1&&(r===void 0&&(r=e.initial),l===void 0&&(l=e.animate));let a=n?n.initial===!1:!1;a=a||r===!1;const c=a?l:r;if(c&&typeof c!="boolean"&&!xn(c)){const h=Array.isArray(c)?c:[c];for(let m=0;m<h.length;m++){const f=zs(t,h[m]);if(f){const{transitionEnd:y,transition:b,...w}=f;for(const x in w){let S=w[x];if(Array.isArray(S)){const P=a?S.length-1:0;S=S[P]}S!==null&&(i[x]=S)}for(const x in y)i[x]=y[x]}}}return i}const va=t=>(e,n)=>{const s=p.useContext(Tn),i=p.useContext(As),o=()=>Ch(t,e,s,i);return n?o():Pl(o)},Eh=va({scrapeMotionValuesFromProps:Xs,createRenderState:Zs}),Rh=va({scrapeMotionValuesFromProps:ta,createRenderState:ya}),Mh=Symbol.for("motionComponentSymbol");function Vh(t,e,n){const s=p.useRef(n);p.useInsertionEffect(()=>{s.current=n});const i=p.useRef(null);return p.useCallback(o=>{o&&t.onMount?.(o),e&&(o?e.mount(o):e.unmount());const r=s.current;if(typeof r=="function")if(o){const l=r(o);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):r(o);else r&&(r.current=o)},[e])}const ba=p.createContext({});function se(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Dh(t,e,n,s,i,o){const{visualElement:r}=p.useContext(Tn),l=p.useContext(fa),d=p.useContext(As),u=p.useContext(ha),a=u.reducedMotion,c=u.skipAnimations,h=p.useRef(null),m=p.useRef(!1);s=s||l.renderer,!h.current&&s&&(h.current=s(t,{visualState:e,parent:r,props:n,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:a,skipAnimations:c,isSVG:o}),m.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const f=h.current,y=p.useContext(ba);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&Lh(h.current,n,i,y);const b=p.useRef(!1);p.useInsertionEffect(()=>{f&&b.current&&f.update(n,d)});const w=n[Ro],x=p.useRef(!!w&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(w)&&window.MotionHasOptimisedAnimation?.(w));return Al(()=>{m.current=!0,f&&(b.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),x.current&&f.animationState&&f.animationState.animateChanges())}),p.useEffect(()=>{f&&(!x.current&&f.animationState&&f.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(w)}),x.current=!1),f.enteringChildren=void 0)}),f}function Lh(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:l,layoutScroll:d,layoutRoot:u,layoutAnchor:a,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:xa(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||l&&se(l),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:d,layoutRoot:u,layoutAnchor:a})}function xa(t){if(t)return t.options.allowProjection!==!1?t.projection:xa(t.parent)}function Wn(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&ph(s);const o=n?n==="svg":Qs(t),r=o?Rh:Eh;function l(u,a){let c;const h={...p.useContext(ha),...u,layoutId:jh(u)},{isStatic:m}=h,f=bh(u),y=r(u,m);if(!m&&typeof window<"u"){Ih();const b=Oh(h);c=b.MeasureLayout,f.visualElement=Dh(t,y,h,i,b.ProjectionNode,o)}return v.jsxs(Tn.Provider,{value:f,children:[c&&f.visualElement?v.jsx(c,{visualElement:f.visualElement,...h}):null,Ph(t,u,Vh(y,f.visualElement,a),y,m,e,o)]})}l.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const d=p.forwardRef(l);return d[Mh]=t,d}function jh({layoutId:t}){const e=p.useContext(_r).id;return e&&t!==void 0?e+"-"+t:t}function Ih(t,e){p.useContext(fa).strict}function Oh(t){const e=pa(),{drag:n,layout:s}=e;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n?.isEnabled(t)||s?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Fh(t,e){if(typeof Proxy>"u")return Wn;const n=new Map,s=(o,r)=>Wn(o,r,t,e),i=(o,r)=>s(o,r);return new Proxy(i,{get:(o,r)=>r==="create"?s:(n.has(r)||n.set(r,Wn(r,void 0,t,e)),n.get(r))})}const Bh=(t,e)=>e.isSVG??Qs(t)?new bd(e):new fd(e,{allowProjection:t!==p.Fragment});class Nh extends Ft{constructor(e){super(e),e.animationState||(e.animationState=kd(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();xn(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let _h=0;class zh extends Ft{constructor(){super(...arguments),this.id=_h++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;if(e&&s===!1){if(this.isExitComplete){const{initial:o,custom:r}=this.node.getProps();if(typeof o=="string"||typeof o=="object"&&o!==null&&!Array.isArray(o)){const l=Xt(this.node,o,r);if(l){const{transition:d,transitionEnd:u,...a}=l;for(const c in a)this.node.getValue(c)?.jump(a[c])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Wh={animation:{Feature:Nh},exit:{Feature:zh}};function Ie(t){return{point:{x:t.pageX,y:t.pageY}}}const Uh=t=>e=>$s(e)&&t(e,Ie(e));function Ae(t,e,n,s){return Ve(t,e,Uh(n),s)}const wa=({current:t})=>t?t.ownerDocument.defaultView:null,pr=(t,e)=>Math.abs(t-e);function Gh(t,e){const n=pr(t.x,e.x),s=pr(t.y,e.y);return Math.sqrt(n**2+s**2)}const mr=new Set(["auto","scroll"]);class Ta{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=f=>{this.handleScroll(f.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=$e(this.lastRawMoveEventInfo,this.transformPagePoint));const f=Un(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,b=Gh(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!b)return;const{point:w}=f,{timestamp:x}=it;this.history.push({...w,timestamp:x});const{onStart:S,onMove:P}=this.handlers;y||(S&&S(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),P&&P(this.lastMoveEvent,f)},this.handlePointerMove=(f,y)=>{this.lastMoveEvent=f,this.lastRawMoveEventInfo=y,this.lastMoveEventInfo=$e(y,this.transformPagePoint),z.update(this.updatePoint,!0)},this.handlePointerUp=(f,y)=>{this.end();const{onEnd:b,onSessionEnd:w,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=Un(f.type==="pointercancel"?this.lastMoveEventInfo:$e(y,this.transformPagePoint),this.history);this.startEvent&&b&&b(f,S),w&&w(f,S)},!$s(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const d=Ie(e),u=$e(d,this.transformPagePoint),{point:a}=u,{timestamp:c}=it;this.history=[{...a,timestamp:c}];const{onSessionStart:h}=n;h&&h(e,Un(u,this.history));const m={passive:!0,capture:!0};this.removeListeners=De(Ae(this.contextWindow,"pointermove",this.handlePointerMove,m),Ae(this.contextWindow,"pointerup",this.handlePointerUp,m),Ae(this.contextWindow,"pointercancel",this.handlePointerUp,m)),l&&this.startScrollTracking(l)}startScrollTracking(e){let n=e.parentElement;for(;n;){const s=getComputedStyle(n);(mr.has(s.overflowX)||mr.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const s=e===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},o={x:i.x-n.x,y:i.y-n.y};o.x===0&&o.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(e,i),z.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ot(this.updatePoint)}}function $e(t,e){return e?{point:e(t.point)}:t}function gr(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Un({point:t},e){return{point:t,delta:gr(t,Sa(e)),offset:gr(t,$h(e)),velocity:Hh(e,.1)}}function $h(t){return t[0]}function Sa(t){return t[t.length-1]}function Hh(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Sa(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>ht(e)));)n--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&i.timestamp-s.timestamp>ht(e)*2&&(s=t[1]);const o=pt(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function qh(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?_(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?_(n,t,s.max):Math.min(t,n)),t}function yr(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Kh(t,{top:e,left:n,bottom:s,right:i}){return{x:yr(t.x,n,i),y:yr(t.y,e,s)}}function vr(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function Yh(t,e){return{x:vr(t.x,e.x),y:vr(t.y,e.y)}}function Xh(t,e){let n=.5;const s=ct(t),i=ct(e);return i>s?n=Ee(e.min,e.max-s,t.min):s>i&&(n=Ee(t.min,t.max-i,e.min)),At(0,1,n)}function Zh(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Ss=.35;function Qh(t=Ss){return t===!1?t=0:t===!0&&(t=Ss),{x:br(t,"left","right"),y:br(t,"top","bottom")}}function br(t,e,n){return{min:xr(t,e),max:xr(t,n)}}function xr(t,e){return typeof t=="number"?t:t[e]||0}const Jh=new WeakMap;class tf{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Z(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=c=>{n&&this.snapToCursor(Ie(c).point),this.stopAnimation()},r=(c,h)=>{const{drag:m,dragPropagation:f,onDragStart:y}=this.getProps();if(m&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Du(m),!this.openDragLock))return;this.latestPointerEvent=c,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),kt(w=>{let x=this.getAxisMotionValue(w).get()||0;if(Ct.test(x)){const{projection:S}=this.visualElement;if(S&&S.layout){const P=S.layout.layoutBox[w];P&&(x=ct(P)*(parseFloat(x)/100))}}this.originPoint[w]=x}),y&&z.update(()=>y(c,h),!1,!0),fs(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},l=(c,h)=>{this.latestPointerEvent=c,this.latestPanInfo=h;const{dragPropagation:m,dragDirectionLock:f,onDirectionLock:y,onDrag:b}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:w}=h;if(f&&this.currentDirection===null){this.currentDirection=nf(w),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",h.point,w),this.updateAxis("y",h.point,w),this.visualElement.render(),b&&z.update(()=>b(c,h),!1,!0)},d=(c,h)=>{this.latestPointerEvent=c,this.latestPanInfo=h,this.stop(c,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:c}=this.getProps();(c||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:a}=this.getProps();this.panSession=new Ta(e,{onSessionStart:o,onStart:r,onMove:l,onSessionEnd:d,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:a,distanceThreshold:s,contextWindow:wa(this.visualElement),element:this.visualElement.current})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!s)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:l}=this.getProps();l&&z.postRender(()=>l(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!He(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=qh(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&se(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=Kh(s.layoutBox,e):this.constraints=!1,this.elastic=Qh(n),i!==this.constraints&&!se(e)&&s&&this.constraints&&!this.hasMutatedConstraints&&kt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Zh(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!se(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const o=ad(s,i.root,this.visualElement.getTransformPagePoint());let r=Yh(i.layout.layoutBox,o);if(n){const l=n(id(r));this.hasMutatedConstraints=!!l,l&&(r=$o(l))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:l}=this.getProps(),d=this.constraints||{},u=kt(a=>{if(!He(a,n,this.currentDirection))return;let c=d&&d[a]||{};(r===!0||r===a)&&(c={min:0,max:0});const h=i?200:1e6,m=i?40:1e7,f={type:"inertia",velocity:s?e[a]:0,bounceStiffness:h,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...c};return this.startAxisValueAnimation(a,f)});return Promise.all(u).then(l)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return fs(this.visualElement,e),s.start(_s(e,s,0,n,this.visualElement,!1))}stopAnimation(){kt(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){kt(n=>{const{drag:s}=this.getProps();if(!He(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:l}=i.layout.layoutBox[n],d=o.get()||0;o.set(e[n]-_(r,l,.5)+d)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!se(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};kt(r=>{const l=this.getAxisMotionValue(r);if(l&&this.constraints!==!1){const d=l.get();i[r]=Xh({min:d,max:d},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),kt(r=>{if(!He(r,e,null))return;const l=this.getAxisMotionValue(r),{min:d,max:u}=this.constraints[r];l.set(_(d,u,i[r]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Jh.set(this.visualElement,this);const e=this.visualElement.current,n=Ae(e,"pointerdown",u=>{const{drag:a,dragListener:c=!0}=this.getProps(),h=u.target,m=h!==e&&Bu(h);a&&c&&!m&&this.start(u)});let s;const i=()=>{const{dragConstraints:u}=this.getProps();se(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),s||(s=ef(e,u.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,r=o.addEventListener("measure",i);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),z.read(i);const l=Ve(window,"resize",()=>this.scalePositionWithinConstraints()),d=o.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:a})=>{this.isDragging&&a&&(kt(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=u[c].translate,h.set(h.get()+u[c].translate))}),this.visualElement.render())}));return()=>{l(),n(),r(),d&&d(),s&&s()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Ss,dragMomentum:l=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:l}}}function wr(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function ef(t,e,n){const s=Mi(t,wr(n)),i=Mi(e,wr(n));return()=>{s(),i()}}function He(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function nf(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class sf extends Ft{constructor(e){super(e),this.removeGroupControls=mt,this.removeListeners=mt,this.controls=new tf(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||mt}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Gn=t=>(e,n)=>{t&&z.update(()=>t(e,n),!1,!0)};class rf extends Ft{constructor(){super(...arguments),this.removePointerDownListener=mt}onPointerDown(e){this.session=new Ta(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:wa(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Gn(e),onStart:Gn(n),onMove:Gn(s),onEnd:(o,r)=>{delete this.session,i&&z.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=Ae(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let $n=!1;class of extends p.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),$n&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),rn.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,e.layoutDependency!==n&&r.setOptions({...r.options,layoutDependency:n}),$n=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||z.postRender(()=>{const l=r.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:s}=e;s&&(s.options.layoutAnchor=n,s.root.didUpdate(),Gs.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;$n=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function ka(t){const[e,n]=hh(),s=p.useContext(_r);return v.jsx(of,{...t,layoutGroup:s,switchLayoutGroup:p.useContext(ba),isPresent:e,safeToRemove:n})}const af={pan:{Feature:rf},drag:{Feature:sf,ProjectionNode:da,MeasureLayout:ka}};function Tr(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=s[i];o&&z.postRender(()=>o(e,Ie(e)))}class lf extends Ft{mount(){const{current:e}=this.node;e&&(this.unmount=ju(e,(n,s)=>(Tr(this.node,s,"Start"),i=>Tr(this.node,i,"End"))))}unmount(){}}class cf extends Ft{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=De(Ve(this.node.current,"focus",()=>this.onFocus()),Ve(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Sr(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&z.postRender(()=>o(e,Ie(e)))}class uf extends Ft{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=_u(e,(i,o)=>(Sr(this.node,o,"Start"),(r,{success:l})=>Sr(this.node,r,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:s?.tap===!1})}unmount(){}}const ks=new WeakMap,Hn=new WeakMap,df=t=>{const e=ks.get(t.target);e&&e(t)},hf=t=>{t.forEach(df)};function ff({root:t,...e}){const n=t||document;Hn.has(n)||Hn.set(n,{});const s=Hn.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(hf,{root:t,...e})),s[i]}function pf(t,e,n){const s=ff(e);return ks.set(t,n),s.observe(t),()=>{ks.delete(t),s.unobserve(t)}}const mf={some:0,all:1};class gf extends Ft{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:mf[i]},l=d=>{const{isIntersecting:u}=d;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:a,onViewportLeave:c}=this.node.getProps(),h=u?a:c;h&&h(d)};this.stopObserver=pf(this.node.current,r,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(yf(e,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function yf({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const vf={inView:{Feature:gf},tap:{Feature:uf},focus:{Feature:cf},hover:{Feature:lf}},bf={layout:{ProjectionNode:da,MeasureLayout:ka}},xf={...Wh,...vf,...af,...bf},wf=Fh(xf,Bh),kr=wf;function Tf(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}Tf(`:root{--sileo-spring-easing:linear(
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/App-BbT5H97Z.js","assets/react-rd22PHbN.js","assets/tanstack-BysN2Oew.js","assets/base-ui-DIP2rZxz.js","assets/PairingPage-cSoKZi8t.js"])))=>i.map(i=>d[i]);
2
+ import{r as p,j as v,d as ll}from"./react-rd22PHbN.js";import{Q as cl,g as ul}from"./tanstack-BysN2Oew.js";import{a8 as dl,a9 as hl,aa as fl,ab as pl,ac as ml,ad as gl,ae as yl,af as vl}from"./base-ui-DIP2rZxz.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();const Br="opentig.theme";function bl(t){try{const e=t?.getItem(Br);return e==="light"||e==="dark"||e==="system"?e:null}catch{return null}}function Dm(t,e=globalThis.localStorage){try{e?.setItem(Br,t)}catch{}}function xl(t,e){return t==="light"?!1:t==="dark"?!0:e}function wl(t={}){const e=t.root??(typeof document>"u"?null:document.documentElement);if(!e)return!1;const n=t.storage??(typeof localStorage>"u"?null:localStorage),s=t.prefersDark??(typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches),i=xl(bl(n),s);return e.classList.toggle("dark",i),e.classList.toggle("light",!i),i}wl();const Tl="modulepreload",Sl=function(t){return"/"+t},ci={},Nr=function(e,n,s){let i=Promise.resolve();if(n&&n.length>0){let d=function(u){return Promise.all(u.map(a=>Promise.resolve(a).then(c=>({status:"fulfilled",value:c}),c=>({status:"rejected",reason:c}))))};document.getElementsByTagName("link");const r=document.querySelector("meta[property=csp-nonce]"),l=r?.nonce||r?.getAttribute("nonce");i=d(n.map(u=>{if(u=Sl(u),u in ci)return;ci[u]=!0;const a=u.endsWith(".css"),c=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${c}`))return;const h=document.createElement("link");if(h.rel=a?"stylesheet":Tl,a||(h.as="script"),h.crossOrigin="",h.href=u,l&&h.setAttribute("nonce",l),document.head.appendChild(h),a)return new Promise((m,f)=>{h.addEventListener("load",m),h.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(r){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=r,window.dispatchEvent(l),!l.defaultPrevented)throw r}return i.then(r=>{for(const l of r||[])l.status==="rejected"&&o(l.reason);return e().catch(o)})};function G(){return G=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var s=arguments[n];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},G.apply(this,arguments)}function kl(t,e){if(t==null)return{};var n={},s=Object.getOwnPropertyNames(t),i,o;for(o=0;o<s.length;o++)i=s[o],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i]);return n}const _r=p.createContext({});function Pl(t){const e=p.useRef(null);return e.current===null&&(e.current=t()),e.current}const Cl=typeof window<"u",Al=Cl?p.useLayoutEffect:p.useEffect,As=p.createContext(null);function Es(t,e){t.indexOf(e)===-1&&t.push(e)}function an(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const At=(t,e,n)=>n>e?e:n<t?t:n;let vn=()=>{};const It={},zr=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Wr=t=>typeof t=="object"&&t!==null,Ur=t=>/^0[^.\s]+$/u.test(t);function Gr(t){let e;return()=>(e===void 0&&(e=t()),e)}const mt=t=>t,De=(...t)=>t.reduce((e,n)=>s=>n(e(s))),Ee=(t,e,n)=>{const s=e-t;return s?(n-t)/s:1};class Rs{constructor(){this.subscriptions=[]}add(e){return Es(this.subscriptions,e),()=>an(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ht=t=>t*1e3,pt=t=>t/1e3,$r=(t,e)=>e?t*(1e3/e):0,Hr=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,El=1e-7,Rl=12;function Ml(t,e,n,s,i){let o,r,l=0;do r=e+(n-e)/2,o=Hr(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>El&&++l<Rl);return r}function Le(t,e,n,s){if(t===e&&n===s)return mt;const i=o=>Ml(o,0,1,t,n);return o=>o===0||o===1?o:Hr(i(o),e,s)}const qr=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Kr=t=>e=>1-t(1-e),Yr=Le(.33,1.53,.69,.99),Ms=Kr(Yr),Xr=qr(Ms),Zr=t=>t>=1?1:(t*=2)<1?.5*Ms(t):.5*(2-Math.pow(2,-10*(t-1))),Vs=t=>1-Math.sin(Math.acos(t)),Qr=Kr(Vs),Jr=qr(Vs),Vl=Le(.42,0,1,1),Dl=Le(0,0,.58,1),to=Le(.42,0,.58,1),Ll=t=>Array.isArray(t)&&typeof t[0]!="number",eo=t=>Array.isArray(t)&&typeof t[0]=="number",jl={linear:mt,easeIn:Vl,easeInOut:to,easeOut:Dl,circIn:Vs,circInOut:Jr,circOut:Qr,backIn:Ms,backInOut:Xr,backOut:Yr,anticipate:Zr},Il=t=>typeof t=="string",ui=t=>{if(eo(t)){vn(t.length===4);const[e,n,s,i]=t;return Le(e,n,s,i)}else if(Il(t))return jl[t];return t},Ue=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ol(t){let e=new Set,n=new Set,s=!1,i=!1;const o=new WeakSet;let r={delta:0,timestamp:0,isProcessing:!1};function l(u){o.has(u)&&(d.schedule(u),t()),u(r)}const d={schedule:(u,a=!1,c=!1)=>{const m=c&&s?e:n;return a&&o.add(u),m.add(u),u},cancel:u=>{n.delete(u),o.delete(u)},process:u=>{if(r=u,s){i=!0;return}s=!0;const a=e;e=n,n=a,e.forEach(l),e.clear(),s=!1,i&&(i=!1,d.process(u))}};return d}const Fl=40;function no(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=Ue.reduce((S,P)=>(S[P]=Ol(o),S),{}),{setup:l,read:d,resolveKeyframes:u,preUpdate:a,update:c,preRender:h,render:m,postRender:f}=r,y=()=>{const S=It.useManualTiming,P=S?i.timestamp:performance.now();n=!1,S||(i.delta=s?1e3/60:Math.max(Math.min(P-i.timestamp,Fl),1)),i.timestamp=P,i.isProcessing=!0,l.process(i),d.process(i),u.process(i),a.process(i),c.process(i),h.process(i),m.process(i),f.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(y))},b=()=>{n=!0,s=!0,i.isProcessing||t(y)};return{schedule:Ue.reduce((S,P)=>{const j=r[P];return S[P]=(B,k=!1,g=!1)=>(n||b(),j.schedule(B,k,g)),S},{}),cancel:S=>{for(let P=0;P<Ue.length;P++)r[Ue[P]].cancel(S)},state:i,steps:r}}const{schedule:z,cancel:Ot,state:it,steps:Vn}=no(typeof requestAnimationFrame<"u"?requestAnimationFrame:mt,!0);let Ze;function Bl(){Ze=void 0}const lt={now:()=>(Ze===void 0&&lt.set(it.isProcessing||It.useManualTiming?it.timestamp:performance.now()),Ze),set:t=>{Ze=t,queueMicrotask(Bl)}},so=t=>e=>typeof e=="string"&&e.startsWith(t),io=so("--"),Nl=so("var(--"),Ds=t=>Nl(t)?_l.test(t.split("/*")[0].trim()):!1,_l=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function di(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const ue={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Re={...ue,transform:t=>At(0,1,t)},Ge={...ue,default:1},ke=t=>Math.round(t*1e5)/1e5,Ls=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function zl(t){return t==null}const Wl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,js=(t,e)=>n=>!!(typeof n=="string"&&Wl.test(n)&&n.startsWith(t)||e&&!zl(n)&&Object.prototype.hasOwnProperty.call(n,e)),ro=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,l]=s.match(Ls);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:l!==void 0?parseFloat(l):1}},Ul=t=>At(0,255,t),Dn={...ue,transform:t=>Math.round(Ul(t))},qt={test:js("rgb","red"),parse:ro("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Dn.transform(t)+", "+Dn.transform(e)+", "+Dn.transform(n)+", "+ke(Re.transform(s))+")"};function Gl(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const ts={test:js("#"),parse:Gl,transform:qt.transform},je=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Mt=je("deg"),Ct=je("%"),V=je("px"),$l=je("vh"),Hl=je("vw"),hi={...Ct,parse:t=>Ct.parse(t)/100,transform:t=>Ct.transform(t*100)},ie={test:js("hsl","hue"),parse:ro("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Ct.transform(ke(e))+", "+Ct.transform(ke(n))+", "+ke(Re.transform(s))+")"},Y={test:t=>qt.test(t)||ts.test(t)||ie.test(t),parse:t=>qt.test(t)?qt.parse(t):ie.test(t)?ie.parse(t):ts.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?qt.transform(t):ie.transform(t),getAnimatableNone:t=>{const e=Y.parse(t);return e.alpha=0,Y.transform(e)}},ql=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Kl(t){return isNaN(t)&&typeof t=="string"&&(t.match(Ls)?.length||0)+(t.match(ql)?.length||0)>0}const oo="number",ao="color",Yl="var",Xl="var(",fi="${}",Zl=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function le(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const l=e.replace(Zl,d=>(Y.test(d)?(s.color.push(o),i.push(ao),n.push(Y.parse(d))):d.startsWith(Xl)?(s.var.push(o),i.push(Yl),n.push(d)):(s.number.push(o),i.push(oo),n.push(parseFloat(d))),++o,fi)).split(fi);return{values:n,split:l,indexes:s,types:i}}function Ql(t){return le(t).values}function lo({split:t,types:e}){const n=t.length;return s=>{let i="";for(let o=0;o<n;o++)if(i+=t[o],s[o]!==void 0){const r=e[o];r===oo?i+=ke(s[o]):r===ao?i+=Y.transform(s[o]):i+=s[o]}return i}}function Jl(t){return lo(le(t))}const tc=t=>typeof t=="number"?0:Y.test(t)?Y.getAnimatableNone(t):t,ec=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:tc(t);function nc(t){const e=le(t);return lo(e)(e.values.map((s,i)=>ec(s,e.split[i])))}const vt={test:Kl,parse:Ql,createTransformer:Jl,getAnimatableNone:nc};function Ln(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function sc({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const l=n<.5?n*(1+e):n+e-n*e,d=2*n-l;i=Ln(d,l,t+1/3),o=Ln(d,l,t),r=Ln(d,l,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function ln(t,e){return n=>n>0?e:t}const _=(t,e,n)=>t+(e-t)*n,jn=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ic=[ts,qt,ie],rc=t=>ic.find(e=>e.test(t));function pi(t){const e=rc(t);if(!e)return!1;let n=e.parse(t);return e===ie&&(n=sc(n)),n}const mi=(t,e)=>{const n=pi(t),s=pi(e);if(!n||!s)return ln(t,e);const i={...n};return o=>(i.red=jn(n.red,s.red,o),i.green=jn(n.green,s.green,o),i.blue=jn(n.blue,s.blue,o),i.alpha=_(n.alpha,s.alpha,o),qt.transform(i))},es=new Set(["none","hidden"]);function oc(t,e){return es.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function ac(t,e){return n=>_(t,e,n)}function Is(t){return typeof t=="number"?ac:typeof t=="string"?Ds(t)?ln:Y.test(t)?mi:uc:Array.isArray(t)?co:typeof t=="object"?Y.test(t)?mi:lc:ln}function co(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>Is(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function lc(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Is(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function cc(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],r=t.indexes[o][s[o]],l=t.values[r]??0;n[i]=l,s[o]++}return n}const uc=(t,e)=>{const n=vt.createTransformer(e),s=le(t),i=le(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?es.has(t)&&!i.values.length||es.has(e)&&!s.values.length?oc(t,e):De(co(cc(s,i),i.values),n):ln(t,e)};function uo(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?_(t,e,n):Is(t)(t,e)}const dc=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>z.update(e,n),stop:()=>Ot(e),now:()=>it.isProcessing?it.timestamp:lt.now()}},ho=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)s+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},cn=2e4;function Os(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<cn;)e+=n,s=t.next(e);return e>=cn?1/0:e}function hc(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Os(s),cn);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:pt(i)}}const $={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function ns(t,e){return t*Math.sqrt(1-e*e)}const fc=12;function pc(t,e,n){let s=n;for(let i=1;i<fc;i++)s=s-t(s)/e(s);return s}const In=.001;function mc({duration:t=$.duration,bounce:e=$.bounce,velocity:n=$.velocity,mass:s=$.mass}){let i,o,r=1-e;r=At($.minDamping,$.maxDamping,r),t=At($.minDuration,$.maxDuration,pt(t)),r<1?(i=u=>{const a=u*r,c=a*t,h=a-n,m=ns(u,r),f=Math.exp(-c);return In-h/m*f},o=u=>{const c=u*r*t,h=c*n+n,m=Math.pow(r,2)*Math.pow(u,2)*t,f=Math.exp(-c),y=ns(Math.pow(u,2),r);return(-i(u)+In>0?-1:1)*((h-m)*f)/y}):(i=u=>{const a=Math.exp(-u*t),c=(u-n)*t+1;return-In+a*c},o=u=>{const a=Math.exp(-u*t),c=(n-u)*(t*t);return a*c});const l=5/t,d=pc(i,o,l);if(t=ht(t),isNaN(d))return{stiffness:$.stiffness,damping:$.damping,duration:t};{const u=Math.pow(d,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}const gc=["duration","bounce"],yc=["stiffness","damping","mass"];function gi(t,e){return e.some(n=>t[n]!==void 0)}function vc(t){let e={velocity:$.velocity,stiffness:$.stiffness,damping:$.damping,mass:$.mass,isResolvedFromDuration:!1,...t};if(!gi(t,yc)&&gi(t,gc))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*At(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:$.mass,stiffness:i,damping:o}}else{const n=mc({...t,velocity:0});e={...e,...n,mass:$.mass},e.isResolvedFromDuration=!0}return e}function un(t=$.visualDuration,e=$.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],l={done:!1,value:o},{stiffness:d,damping:u,mass:a,duration:c,velocity:h,isResolvedFromDuration:m}=vc({...n,velocity:-pt(n.velocity||0)}),f=h||0,y=u/(2*Math.sqrt(d*a)),b=r-o,T=pt(Math.sqrt(d/a)),w=Math.abs(b)<5;s||(s=w?$.restSpeed.granular:$.restSpeed.default),i||(i=w?$.restDelta.granular:$.restDelta.default);let S,P,j,B,k,g;if(y<1)j=ns(T,y),B=(f+y*T*b)/j,S=C=>{const D=Math.exp(-y*T*C);return r-D*(B*Math.sin(j*C)+b*Math.cos(j*C))},k=y*T*B+b*j,g=y*T*b-B*j,P=C=>Math.exp(-y*T*C)*(k*Math.sin(j*C)+g*Math.cos(j*C));else if(y===1){S=D=>r-Math.exp(-T*D)*(b+(f+T*b)*D);const C=f+T*b;P=D=>Math.exp(-T*D)*(T*C*D-f)}else{const C=T*Math.sqrt(y*y-1);S=H=>{const F=Math.exp(-y*T*H),N=Math.min(C*H,300);return r-F*((f+y*T*b)*Math.sinh(N)+C*b*Math.cosh(N))/C};const D=(f+y*T*b)/C,U=y*T*D-b*C,tt=y*T*b-D*C;P=H=>{const F=Math.exp(-y*T*H),N=Math.min(C*H,300);return F*(U*Math.sinh(N)+tt*Math.cosh(N))}}const M={calculatedDuration:m&&c||null,velocity:C=>ht(P(C)),next:C=>{if(!m&&y<1){const U=Math.exp(-y*T*C),tt=Math.sin(j*C),H=Math.cos(j*C),F=r-U*(B*tt+b*H),N=ht(U*(k*tt+g*H));return l.done=Math.abs(N)<=s&&Math.abs(r-F)<=i,l.value=l.done?r:F,l}const D=S(C);if(m)l.done=C>=c;else{const U=ht(P(C));l.done=Math.abs(U)<=s&&Math.abs(r-D)<=i}return l.value=l.done?r:D,l},toString:()=>{const C=Math.min(Os(M),cn),D=ho(U=>M.next(C*U).value,C,30);return C+"ms "+D},toTransition:()=>{}};return M}un.applyToOptions=t=>{const e=hc(t,100,un);return t.ease=e.ease,t.duration=ht(e.duration),t.type="keyframes",t};const bc=5;function fo(t,e,n){const s=Math.max(e-bc,0);return $r(n-t(s),e-s)}function ss({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:l,max:d,restDelta:u=.5,restSpeed:a}){const c=t[0],h={done:!1,value:c},m=g=>l!==void 0&&g<l||d!==void 0&&g>d,f=g=>l===void 0?d:d===void 0||Math.abs(l-g)<Math.abs(d-g)?l:d;let y=n*e;const b=c+y,T=r===void 0?b:r(b);T!==b&&(y=T-c);const w=g=>-y*Math.exp(-g/s),S=g=>T+w(g),P=g=>{const M=w(g),C=S(g);h.done=Math.abs(M)<=u,h.value=h.done?T:C};let j,B;const k=g=>{m(h.value)&&(j=g,B=un({keyframes:[h.value,f(h.value)],velocity:fo(S,g,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:a}))};return k(0),{calculatedDuration:null,next:g=>{let M=!1;return!B&&j===void 0&&(M=!0,P(g),k(g)),j!==void 0&&g>=j?B.next(g-j):(!M&&P(g),h)}}}function xc(t,e,n){const s=[],i=n||It.mix||uo,o=t.length-1;for(let r=0;r<o;r++){let l=i(t[r],t[r+1]);if(e){const d=Array.isArray(e)?e[r]||mt:e;l=De(d,l)}s.push(l)}return s}function wc(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(vn(o===e.length),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const l=xc(e,s,i),d=l.length,u=a=>{if(r&&a<t[0])return e[0];let c=0;if(d>1)for(;c<t.length-2&&!(a<t[c+1]);c++);const h=Ee(t[c],t[c+1],a);return l[c](h)};return n?a=>u(At(t[0],t[o-1],a)):u}function Tc(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Ee(0,e,s);t.push(_(n,1,i))}}function Sc(t){const e=[0];return Tc(e,t.length-1),e}function kc(t,e){return t.map(n=>n*e)}function Pc(t,e){return t.map(()=>e||to).splice(0,t.length-1)}function Pe({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Ll(s)?s.map(ui):ui(s),o={done:!1,value:e[0]},r=kc(n&&n.length===e.length?n:Sc(e),t),l=wc(r,e,{ease:Array.isArray(i)?i:Pc(e,i)});return{calculatedDuration:t,next:d=>(o.value=l(d),o.done=d>=t,o)}}const Cc=t=>t!==null;function bn(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(Cc),l=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!l||s===void 0?o[l]:s}const Ac={decay:ss,inertia:ss,tween:Pe,keyframes:Pe,spring:un};function po(t){typeof t.type=="string"&&(t.type=Ac[t.type])}class Fs{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Ec=t=>t/100;class dn extends Fs{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==lt.now()&&this.tick(lt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;po(e);const{type:n=Pe,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:l}=e;const d=n||Pe;d!==Pe&&typeof l[0]!="number"&&(this.mixKeyframes=De(Ec,uo(l[0],l[1])),l=[0,100]);const u=d({...e,keyframes:l});o==="mirror"&&(this.mirroredGenerator=d({...e,keyframes:[...l].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=Os(u));const{calculatedDuration:a}=u;this.calculatedDuration=a,this.resolvedDuration=a+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:l,calculatedDuration:d}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:a,repeat:c,repeatType:h,repeatDelay:m,type:f,onUpdate:y,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const T=this.currentTime-u*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?T<0:T>i;this.currentTime=Math.max(T,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let S=this.currentTime,P=s;if(c){const g=Math.min(this.currentTime,i)/l;let M=Math.floor(g),C=g%1;!C&&g>=1&&(C=1),C===1&&M--,M=Math.min(M,c+1),M%2&&(h==="reverse"?(C=1-C,m&&(C-=m/l)):h==="mirror"&&(P=r)),S=At(0,1,C)*l}let j;w?(this.delayState.value=a[0],j=this.delayState):j=P.next(S),o&&!w&&(j.value=o(j.value));let{done:B}=j;!w&&d!==null&&(B=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&B);return k&&f!==ss&&(j.value=bn(a,this.options,b,this.speed)),y&&y(j.value),k&&this.finish(),j}then(e,n){return this.finished.then(e,n)}get duration(){return pt(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+pt(e)}get time(){return pt(this.currentTime)}set time(e){e=ht(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return fo(s=>this.generator.next(s).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(lt.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=pt(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=dc,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(lt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function Rc(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Kt=t=>t*180/Math.PI,is=t=>{const e=Kt(Math.atan2(t[1],t[0]));return rs(e)},Mc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:is,rotateZ:is,skewX:t=>Kt(Math.atan(t[1])),skewY:t=>Kt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},rs=t=>(t=t%360,t<0&&(t+=360),t),yi=is,vi=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),bi=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Vc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:vi,scaleY:bi,scale:t=>(vi(t)+bi(t))/2,rotateX:t=>rs(Kt(Math.atan2(t[6],t[5]))),rotateY:t=>rs(Kt(Math.atan2(-t[2],t[0]))),rotateZ:yi,rotate:yi,skewX:t=>Kt(Math.atan(t[4])),skewY:t=>Kt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function os(t){return t.includes("scale")?1:0}function as(t,e){if(!t||t==="none")return os(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Vc,i=n;else{const l=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Mc,i=l}if(!i)return os(e);const o=s[e],r=i[1].split(",").map(Lc);return typeof o=="function"?o(r):r[o]}const Dc=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return as(n,e)};function Lc(t){return parseFloat(t.trim())}const de=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],he=new Set([...de,"pathRotation"]),xi=t=>t===ue||t===V,jc=new Set(["x","y","z"]),Ic=de.filter(t=>!jc.has(t));function Oc(t){const e=[];return Ic.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const jt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>as(e,"x"),y:(t,{transform:e})=>as(e,"y")};jt.translateX=jt.x;jt.translateY=jt.y;const Yt=new Set;let ls=!1,cs=!1,us=!1;function mo(){if(cs){const t=Array.from(Yt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Oc(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{s.getValue(o)?.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}cs=!1,ls=!1,Yt.forEach(t=>t.complete(us)),Yt.clear()}function go(){Yt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(cs=!0)})}function Fc(){us=!0,go(),mo(),us=!1}class Bs{constructor(e,n,s,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(Yt.add(this),ls||(ls=!0,z.read(go),z.resolveKeyframes(mo))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const o=i?.get(),r=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const l=s.readValue(n,r);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=r),i&&o===void 0&&i.set(e[0])}Rc(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Yt.delete(this)}cancel(){this.state==="scheduled"&&(Yt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Bc=t=>t.startsWith("--");function yo(t,e,n){Bc(e)?t.style.setProperty(e,n):t.style[e]=n}const Nc={};function vo(t,e){const n=Gr(t);return()=>Nc[e]??n()}const _c=vo(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),bo=vo(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Se=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,wi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Se([0,.65,.55,1]),circOut:Se([.55,0,1,.45]),backIn:Se([.31,.01,.66,-.59]),backOut:Se([.33,1.53,.69,.99])};function xo(t,e){if(t)return typeof t=="function"?bo()?ho(t,e):"ease-out":eo(t)?Se(t):Array.isArray(t)?t.map(n=>xo(n,e)||wi.easeOut):wi[t]}function zc(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:l="easeOut",times:d}={},u=void 0){const a={[e]:n};d&&(a.offset=d);const c=xo(l,i);Array.isArray(c)&&(a.easing=c);const h={delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),t.animate(a,h)}function wo(t){return typeof t=="function"&&"applyToOptions"in t}function Wc({type:t,...e}){return wo(t)&&bo()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class To extends Fs{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:l,onComplete:d}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,vn(typeof e.type!="string");const u=Wc(e);this.animation=zc(n,s,i,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const a=bn(i,this.options,l,this.speed);this.updateMotionValue&&this.updateMotionValue(a),yo(n,s,a),this.animation.cancel()}d?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return pt(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+pt(e)}get time(){return pt(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=ht(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:s,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&_c()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),mt):i(this)}}const So={anticipate:Zr,backInOut:Xr,circInOut:Jr};function Uc(t){return t in So}function Gc(t){typeof t.ease=="string"&&Uc(t.ease)&&(t.ease=So[t.ease])}const On=10;class $c extends To{constructor(e){Gc(e),po(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const l=new dn({...r,autoplay:!1}),d=Math.max(On,lt.now()-this.startTime),u=At(0,On,d-On),a=l.sample(d).value,{name:c}=this.options;o&&c&&yo(o,c,a),n.setWithVelocity(l.sample(Math.max(0,d-u)).value,a,u),l.stop()}}const Ti=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(vt.test(t)||t==="0")&&!t.startsWith("url("));function Hc(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function qc(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=Ti(i,e),l=Ti(o,e);return!r||!l?!1:Hc(t)||(n==="spring"||wo(n))&&s}function ds(t){t.duration=0,t.type="keyframes"}const ko=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Kc=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Yc(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&Kc.test(t[e]))return!0;return!1}const Xc=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Zc=Gr(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Qc(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r,keyframes:l}=t,d=e?.owner?.current;if(!(d instanceof HTMLElement)&&!(d instanceof SVGElement))return!1;const{onUpdate:u,transformTemplate:a}=e.owner.getProps();return Zc()&&n&&(ko.has(n)||Xc.has(n)&&Yc(l))&&(n!=="transform"||!a)&&!u&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const Jc=40;class tu extends Fs{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:l,name:d,motionValue:u,element:a,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=lt.now();const h={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:d,motionValue:u,element:a,...c},m=a?.KeyframeResolver||Bs;this.keyframeResolver=new m(l,(f,y,b)=>this.onKeyframesResolved(f,y,h,!b),d,u,a),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:l,delay:d,isHandoff:u,onUpdate:a}=s;this.resolvedAt=lt.now();let c=!0;qc(e,o,r,l)||(c=!1,(It.instantAnimations||!d)&&a?.(bn(e,s,n)),e[0]=e[e.length-1],ds(s),s.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Jc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},f=c&&!u&&Qc(m),y=m.motionValue?.owner?.current;let b;if(f)try{b=new $c({...m,element:y})}catch{b=new dn(m)}else b=new dn(m);b.finished.then(()=>{this.notifyFinished()}).catch(mt),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Fc()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Po(t,e,n,s=0,i=1){const o=Array.from(t).sort((u,a)=>u.sortNodePosition(a)).indexOf(e),r=t.size,l=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:l-o*s}const Si=30,eu=t=>!isNaN(parseFloat(t));class nu{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=lt.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=lt.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=eu(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Rs);const s=this.events[e].add(n);return e==="change"?()=>{s(),z.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=lt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Si)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Si);return $r(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ce(t,e){return new nu(t,e)}function Co(t,e){if(t?.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function Ns(t,e){const n=t?.[e]??t?.default??t;return n!==t?Co(n,t):n}const su={type:"spring",stiffness:500,damping:25,restSpeed:10},iu=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),ru={type:"keyframes",duration:.8},ou={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},au=(t,{keyframes:e})=>e.length>2?ru:he.has(t)?t.startsWith("scale")?iu(e[1]):su:ou,lu=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function cu(t){for(const e in t)if(!lu.has(e))return!0;return!1}const _s=(t,e,n,s={},i,o)=>r=>{const l=Ns(s,t)||{},d=l.delay||s.delay||0;let{elapsed:u=0}=s;u=u-ht(d);const a={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-u,onUpdate:h=>{e.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{r(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:o?void 0:i};cu(l)||Object.assign(a,au(t,a)),a.duration&&(a.duration=ht(a.duration)),a.repeatDelay&&(a.repeatDelay=ht(a.repeatDelay)),a.from!==void 0&&(a.keyframes[0]=a.from);let c=!1;if((a.type===!1||a.duration===0&&!a.repeatDelay)&&(ds(a),a.delay===0&&(c=!0)),(It.instantAnimations||It.skipAnimations||i?.shouldSkipAnimations||l.skipAnimations)&&(c=!0,ds(a),a.delay=0),a.allowFlatten=!l.type&&!l.ease,c&&!o&&e.get()!==void 0){const h=bn(a.keyframes,l);if(h!==void 0){z.update(()=>{a.onUpdate(h),a.onComplete()});return}}return l.isSync?new dn(a):new tu(a)},uu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function du(t){const e=uu.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Ao(t,e,n=1){const[s,i]=du(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return zr(r)?parseFloat(r):r}return Ds(i)?Ao(i,e,n+1):i}function ki(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function zs(t,e,n,s){if(typeof e=="function"){const[i,o]=ki(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=ki(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function Xt(t,e,n){const s=t.getProps();return zs(s,e,n!==void 0?n:s.custom,t)}const Eo=new Set(["width","height","top","left","right","bottom",...de]),hs=t=>Array.isArray(t);function hu(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ce(n))}function fu(t){return hs(t)?t[t.length-1]||0:t}function pu(t,e){const n=Xt(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const l=fu(o[r]);hu(t,r,l)}}const ot=t=>!!(t&&t.getVelocity);function mu(t){return!!(ot(t)&&t.add)}function fs(t,e){const n=t.getValue("willChange");if(mu(n))return n.add(e);if(!n&&It.WillChange){const s=new It.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Ws(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const gu="framerAppearId",Ro="data-"+Ws(gu);function Mo(t){return t.props[Ro]}function yu({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Vo(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o,transitionEnd:r,...l}=e;const d=t.getDefaultTransition();o=o?Co(o,d):d;const u=o?.reduceMotion,a=o?.skipAnimations;s&&(o=s);const c=[],h=i&&t.animationState&&t.animationState.getState()[i],m=o?.path;m&&m.animateVisualElement(t,l,o,n,c);for(const f in l){const y=t.getValue(f,t.latestValues[f]??null),b=l[f];if(b===void 0||h&&yu(h,f))continue;const T={delay:n,...Ns(o||{},f)};a&&(T.skipAnimations=!0);const w=y.get();if(w!==void 0&&!y.isAnimating()&&!Array.isArray(b)&&b===w&&!T.velocity){z.update(()=>y.set(b));continue}let S=!1;if(window.MotionHandoffAnimation){const B=Mo(t);if(B){const k=window.MotionHandoffAnimation(B,f,z);k!==null&&(T.startTime=k,S=!0)}}fs(t,f);const P=u??t.shouldReduceMotion;y.start(_s(f,y,b,P&&Eo.has(f)?{type:!1}:T,t,S));const j=y.animation;j&&c.push(j)}if(r){const f=()=>z.update(()=>{r&&pu(t,r)});c.length?Promise.all(c).then(f):f()}return c}function ps(t,e,n={}){const s=Xt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(Vo(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(d=0)=>{const{delayChildren:u=0,staggerChildren:a,staggerDirection:c}=i;return vu(t,e,d,u,a,c,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[d,u]=l==="beforeChildren"?[o,r]:[r,o];return d().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function vu(t,e,n=0,s=0,i=0,o=1,r){const l=[];for(const d of t.variantChildren)d.notify("AnimationStart",e),l.push(ps(d,e,{...r,delay:n+(typeof s=="function"?0:s)+Po(t.variantChildren,d,s,i,o)}).then(()=>d.notify("AnimationComplete",e)));return Promise.all(l)}function bu(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>ps(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=ps(t,e,n);else{const i=typeof e=="function"?Xt(t,e,n.custom):e;s=Promise.all(Vo(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const xu={test:t=>t==="auto",parse:t=>t},Do=t=>e=>e.test(t),Lo=[ue,V,Ct,Mt,Hl,$l,xu],Pi=t=>Lo.find(Do(t));function wu(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Ur(t):!0}const Tu=new Set(["brightness","contrast","saturate","opacity"]);function Su(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Ls)||[];if(!s)return t;const i=n.replace(s,"");let o=Tu.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const ku=/\b([a-z-]*)\(.*?\)/gu,ms={...vt,getAnimatableNone:t=>{const e=t.match(ku);return e?e.map(Su).join(" "):t}},gs={...vt,getAnimatableNone:t=>{const e=vt.parse(t);return vt.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Ci={...ue,transform:Math.round},Pu={rotate:Mt,pathRotation:Mt,rotateX:Mt,rotateY:Mt,rotateZ:Mt,scale:Ge,scaleX:Ge,scaleY:Ge,scaleZ:Ge,skew:Mt,skewX:Mt,skewY:Mt,distance:V,translateX:V,translateY:V,translateZ:V,x:V,y:V,z:V,perspective:V,transformPerspective:V,opacity:Re,originX:hi,originY:hi,originZ:V},hn={borderWidth:V,borderTopWidth:V,borderRightWidth:V,borderBottomWidth:V,borderLeftWidth:V,borderRadius:V,borderTopLeftRadius:V,borderTopRightRadius:V,borderBottomRightRadius:V,borderBottomLeftRadius:V,width:V,maxWidth:V,height:V,maxHeight:V,top:V,right:V,bottom:V,left:V,inset:V,insetBlock:V,insetBlockStart:V,insetBlockEnd:V,insetInline:V,insetInlineStart:V,insetInlineEnd:V,padding:V,paddingTop:V,paddingRight:V,paddingBottom:V,paddingLeft:V,paddingBlock:V,paddingBlockStart:V,paddingBlockEnd:V,paddingInline:V,paddingInlineStart:V,paddingInlineEnd:V,margin:V,marginTop:V,marginRight:V,marginBottom:V,marginLeft:V,marginBlock:V,marginBlockStart:V,marginBlockEnd:V,marginInline:V,marginInlineStart:V,marginInlineEnd:V,fontSize:V,backgroundPositionX:V,backgroundPositionY:V,...Pu,zIndex:Ci,fillOpacity:Re,strokeOpacity:Re,numOctaves:Ci},Cu={...hn,color:Y,backgroundColor:Y,outlineColor:Y,fill:Y,stroke:Y,borderColor:Y,borderTopColor:Y,borderRightColor:Y,borderBottomColor:Y,borderLeftColor:Y,filter:ms,WebkitFilter:ms,mask:gs,WebkitMask:gs},jo=t=>Cu[t],Au=new Set([ms,gs]);function Io(t,e){let n=jo(t);return Au.has(n)||(n=vt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Eu=new Set(["auto","none","0"]);function Ru(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!Eu.has(o)&&le(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=Io(n,i)}class Mu extends Bs{constructor(e,n,s,i,o){super(e,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let a=0;a<e.length;a++){let c=e[a];if(typeof c=="string"&&(c=c.trim(),Ds(c))){const h=Ao(c,n.current);h!==void 0&&(e[a]=h),a===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Eo.has(s)||e.length!==2)return;const[i,o]=e,r=Pi(i),l=Pi(o),d=di(i),u=di(o);if(d!==u&&jt[s]){this.needsMeasurement=!0;return}if(r!==l)if(xi(r)&&xi(l))for(let a=0;a<e.length;a++){const c=e[a];typeof c=="string"&&(e[a]=parseFloat(c))}else jt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||wu(e[i]))&&s.push(i);s.length&&Ru(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=jt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,r=s[o];s[o]=jt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([l,d])=>{e.getValue(l).set(d)}),this.resolveNoneKeyframes()}}const Us=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function Oo(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(s=>s!=null)}const ys=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Vu(t){return Wr(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:Gs}=no(queueMicrotask,!1),yt={x:!1,y:!1};function Fo(){return yt.x||yt.y}function Du(t){return t==="x"||t==="y"?yt[t]?null:(yt[t]=!0,()=>{yt[t]=!1}):yt.x||yt.y?null:(yt.x=yt.y=!0,()=>{yt.x=yt.y=!1})}function Bo(t,e){const n=Oo(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Lu(t){return!(t.pointerType==="touch"||Fo())}function ju(t,e,n={}){const[s,i,o]=Bo(t,n);return s.forEach(r=>{let l=!1,d=!1,u;const a=()=>{r.removeEventListener("pointerleave",f)},c=b=>{u&&(u(b),u=void 0),a()},h=b=>{l=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),d&&(d=!1,c(b))},m=()=>{l=!0,window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",h,i)},f=b=>{if(b.pointerType!=="touch"){if(l){d=!0;return}c(b)}},y=b=>{if(!Lu(b))return;d=!1;const T=e(r,b);typeof T=="function"&&(u=T,r.addEventListener("pointerleave",f,i))};r.addEventListener("pointerenter",y,i),r.addEventListener("pointerdown",m,i)}),o}const No=(t,e)=>e?t===e?!0:No(t,e.parentElement):!1,$s=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Iu=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ou(t){return Iu.has(t.tagName)||t.isContentEditable===!0}const Fu=new Set(["INPUT","SELECT","TEXTAREA"]);function Bu(t){return Fu.has(t.tagName)||t.isContentEditable===!0}const Qe=new WeakSet;function Ai(t){return e=>{e.key==="Enter"&&t(e)}}function Fn(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Nu=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Ai(()=>{if(Qe.has(n))return;Fn(n,"down");const i=Ai(()=>{Fn(n,"up")}),o=()=>Fn(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Ei(t){return $s(t)&&!Fo()}const Ri=new WeakSet;function _u(t,e,n={}){const[s,i,o]=Bo(t,n),r=l=>{const d=l.currentTarget;if(!Ei(l)||Ri.has(l))return;Qe.add(d),n.stopPropagation&&Ri.add(l);const u=e(d,l),a={...i,capture:!0},c=(f,y)=>{window.removeEventListener("pointerup",h,a),window.removeEventListener("pointercancel",m,a),Qe.has(d)&&Qe.delete(d),Ei(f)&&typeof u=="function"&&u(f,{success:y})},h=f=>{c(f,d===window||d===document||n.useGlobalTarget||No(d,f.target))},m=f=>{c(f,!1)};window.addEventListener("pointerup",h,a),window.addEventListener("pointercancel",m,a)};return s.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",r,i),Vu(l)&&(l.addEventListener("focus",u=>Nu(u,i)),!Ou(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),o}function Hs(t){return Wr(t)&&"ownerSVGElement"in t}const Je=new WeakMap;let tn;const _o=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:Hs(s)&&"getBBox"in s?s.getBBox()[e]:s[n],zu=_o("inline","width","offsetWidth"),Wu=_o("block","height","offsetHeight");function Uu({target:t,borderBoxSize:e}){Je.get(t)?.forEach(n=>{n(t,{get width(){return zu(t,e)},get height(){return Wu(t,e)}})})}function Gu(t){t.forEach(Uu)}function $u(){typeof ResizeObserver>"u"||(tn=new ResizeObserver(Gu))}function Hu(t,e){tn||$u();const n=Oo(t);return n.forEach(s=>{let i=Je.get(s);i||(i=new Set,Je.set(s,i)),i.add(e),tn?.observe(s)}),()=>{n.forEach(s=>{const i=Je.get(s);i?.delete(e),i?.size||tn?.unobserve(s)})}}const en=new Set;let re;function qu(){re=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};en.forEach(e=>e(t))},window.addEventListener("resize",re)}function Ku(t){return en.add(t),re||qu(),()=>{en.delete(t),!en.size&&typeof re=="function"&&(window.removeEventListener("resize",re),re=void 0)}}function Mi(t,e){return typeof t=="function"?Ku(t):Hu(t,e)}function Yu(t){return Hs(t)&&t.tagName==="svg"}const Xu=[...Lo,Y,vt],Zu=t=>Xu.find(Do(t)),Vi=()=>({translate:0,scale:1,origin:0,originPoint:0}),oe=()=>({x:Vi(),y:Vi()}),Di=()=>({min:0,max:0}),Z=()=>({x:Di(),y:Di()}),Qu=new WeakMap;function xn(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Me(t){return typeof t=="string"||Array.isArray(t)}const qs=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ks=["initial",...qs];function wn(t){return xn(t.animate)||Ks.some(e=>Me(t[e]))}function zo(t){return!!(wn(t)||t.variants)}function Ju(t,e,n){for(const s in e){const i=e[s],o=n[s];if(ot(i))t.addValue(s,i);else if(ot(o))t.addValue(s,ce(i,{owner:t}));else if(o!==i)if(t.hasValue(s)){const r=t.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=t.getStaticValue(s);t.addValue(s,ce(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const vs={current:null},Wo={current:!1},td=typeof window<"u";function ed(){if(Wo.current=!0,!!td)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>vs.current=t.matches;t.addEventListener("change",e),e()}else vs.current=!1}const Li=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let fn={};function Uo(t){fn=t}function nd(){return fn}class sd{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:o,blockInitialAnimation:r,visualState:l},d={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Bs,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=lt.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,z.render(this.render,!1,!0))};const{latestValues:u,renderState:a}=l;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=a,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=o,this.options=d,this.blockInitialAnimation=!!r,this.isControllingVariants=wn(n),this.isVariantNode=zo(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in h){const f=h[m];u[m]!==void 0&&ot(f)&&f.set(u[m])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,Qu.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Wo.current||ed(),this.shouldReduceMotion=vs.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Ot(this.notifyUpdate),Ot(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&ko.has(e)&&this.current instanceof HTMLElement){const{factory:r,keyframes:l,times:d,ease:u,duration:a}=n.accelerate,c=new To({element:this.current,name:e,keyframes:l,times:d,ease:u,duration:ht(a)}),h=r(c);this.valueSubscriptions.set(e,()=>{h(),c.cancel()});return}const s=he.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&z.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in fn){const n=fn[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Z()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Li.length;s++){const i=Li[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Ju(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=ce(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(zr(s)||Ur(s))?s=parseFloat(s):!Zu(s)&&vt.test(n)&&(s=Io(e,n)),this.setBaseTarget(e,ot(s)?s.get():s)),ot(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=zs(this.props,n,this.presenceContext?.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!ot(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Rs),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Gs.render(this.render)}}class Go extends sd{constructor(){super(...arguments),this.KeyframeResolver=Mu}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ot(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Ft{constructor(e){this.isMounted=!1,this.node=e}update(){}}function $o({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function id({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function rd(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Bn(t){return t===void 0||t===1}function bs({scale:t,scaleX:e,scaleY:n}){return!Bn(t)||!Bn(e)||!Bn(n)}function Ht(t){return bs(t)||Ho(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Ho(t){return ji(t.x)||ji(t.y)}function ji(t){return t&&t!=="0%"}function pn(t,e,n){const s=t-n,i=e*s;return n+i}function Ii(t,e,n,s,i){return i!==void 0&&(t=pn(t,i,s)),pn(t,n,s)+e}function xs(t,e=0,n=1,s,i){t.min=Ii(t.min,e,n,s,i),t.max=Ii(t.max,e,n,s,i)}function qo(t,{x:e,y:n}){xs(t.x,e.translate,e.scale,e.originPoint),xs(t.y,n.translate,n.scale,n.originPoint)}const Oi=.999999999999,Fi=1.0000000000001;function od(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let l=0;l<i;l++){o=n[l],r=o.projectionDelta;const{visualElement:d}=o.options;d&&d.props.style&&d.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(Pt(t.x,-o.scroll.offset.x),Pt(t.y,-o.scroll.offset.y)),r&&(e.x*=r.x.scale,e.y*=r.y.scale,qo(t,r)),s&&Ht(o.latestValues)&&nn(t,o.latestValues,o.layout?.layoutBox))}e.x<Fi&&e.x>Oi&&(e.x=1),e.y<Fi&&e.y>Oi&&(e.y=1)}function Pt(t,e){t.min+=e,t.max+=e}function Bi(t,e,n,s,i=.5){const o=_(t.min,t.max,i);xs(t,e,n,o,s)}function Ni(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function nn(t,e,n){const s=n??t;Bi(t.x,Ni(e.x,s.x),e.scaleX,e.scale,e.originX),Bi(t.y,Ni(e.y,s.y),e.scaleY,e.scale,e.originY)}function Ko(t,e){return $o(rd(t.getBoundingClientRect(),e))}function ad(t,e,n){const s=Ko(t,n),{scroll:i}=e;return i&&(Pt(s.x,i.offset.x),Pt(s.y,i.offset.y)),s}const ld={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},cd=de.length;function ud(t,e,n){let s="",i=!0;for(let r=0;r<cd;r++){const l=de[r],d=t[l];if(d===void 0)continue;let u=!0;if(typeof d=="number")u=d===(l.startsWith("scale")?1:0);else{const a=parseFloat(d);u=l.startsWith("scale")?a===1:a===0}if(!u||n){const a=ys(d,hn[l]);if(!u){i=!1;const c=ld[l]||l;s+=`${c}(${a}) `}n&&(e[l]=a)}}const o=t.pathRotation;return o&&(i=!1,s+=`rotate(${ys(o,hn.pathRotation)}) `),s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Ys(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,l=!1;for(const d in e){const u=e[d];if(he.has(d)){r=!0;continue}else if(io(d)){i[d]=u;continue}else{const a=ys(u,hn[d]);d.startsWith("origin")?(l=!0,o[d]=a):s[d]=a}}if(e.transform||(r||n?s.transform=ud(e,t.transform,n):s.transform&&(s.transform="none")),l){const{originX:d="50%",originY:u="50%",originZ:a=0}=o;s.transformOrigin=`${d} ${u} ${a}`}}function Yo(t,{style:e,vars:n},s,i){const o=t.style;let r;for(r in e)o[r]=e[r];i?.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function _i(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const xe={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(V.test(t))t=parseFloat(t);else return t;const n=_i(t,e.target.x),s=_i(t,e.target.y);return`${n}% ${s}%`}},dd={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=vt.parse(t);if(i.length>5)return s;const o=vt.createTransformer(t),r=typeof i[0]!="number"?1:0,l=n.x.scale*e.x,d=n.y.scale*e.y;i[0+r]/=l,i[1+r]/=d;const u=_(l,d,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}},ws={borderRadius:{...xe,applyTo:[...Us]},borderTopLeftRadius:xe,borderTopRightRadius:xe,borderBottomLeftRadius:xe,borderBottomRightRadius:xe,boxShadow:dd};function Xo(t,{layout:e,layoutId:n}){return he.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ws[t]||t==="opacity")}function Xs(t,e,n){const s=t.style,i=e?.style,o={};if(!s)return o;for(const r in s)(ot(s[r])||i&&ot(i[r])||Xo(r,t)||n?.getValue(r)?.liveStyle!==void 0)&&(o[r]=s[r]);return o}function hd(t){return window.getComputedStyle(t)}class fd extends Go{constructor(){super(...arguments),this.type="html",this.renderInstance=Yo}mount(e){vn(!!e.style),super.mount(e)}readValueFromInstance(e,n){if(he.has(n))return this.projection?.isProjecting?os(n):Dc(e,n);{const s=hd(e),i=(io(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Ko(e,n)}build(e,n,s){Ys(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Xs(e,n,s)}}const pd={offset:"stroke-dashoffset",array:"stroke-dasharray"},md={offset:"strokeDashoffset",array:"strokeDasharray"};function gd(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?pd:md;t[o.offset]=`${-s}`,t[o.array]=`${e} ${n}`}const yd=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Zo(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...l},d,u,a){if(Ys(t,l,u),d){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:c,style:h}=t;c.transform&&(h.transform=c.transform,delete c.transform),(h.transform||c.transformOrigin)&&(h.transformOrigin=c.transformOrigin??"50% 50%",delete c.transformOrigin),h.transform&&(h.transformBox=a?.transformBox??"fill-box",delete c.transformBox);for(const m of yd)c[m]!==void 0&&(h[m]=c[m],delete c[m]);e!==void 0&&(c.x=e),n!==void 0&&(c.y=n),s!==void 0&&(c.scale=s),i!==void 0&&gd(c,i,o,r,!1)}const Qo=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"]),Jo=t=>typeof t=="string"&&t.toLowerCase()==="svg";function vd(t,e,n,s){Yo(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Qo.has(i)?i:Ws(i),e.attrs[i])}function ta(t,e,n){const s=Xs(t,e,n);for(const i in t)if(ot(t[i])||ot(e[i])){const o=de.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}class bd extends Go{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Z}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(he.has(n)){const s=jo(n);return s&&s.default||0}return n=Qo.has(n)?n:Ws(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return ta(e,n,s)}build(e,n,s){Zo(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){vd(e,n,s,i)}mount(e){this.isSVGTag=Jo(e.tagName),super.mount(e)}}const xd=Ks.length;function ea(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?ea(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<xd;n++){const s=Ks[n],i=t.props[s];(Me(i)||i===!1)&&(e[s]=i)}return e}function na(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const wd=[...qs].reverse(),Td=qs.length;function Sd(t){return e=>Promise.all(e.map(({animation:n,options:s})=>bu(t,n,s)))}function kd(t){let e=Sd(t),n=zi(),s=!0,i=!1;const o=u=>(a,c)=>{const h=Xt(t,c,u==="exit"?t.presenceContext?.custom:void 0);if(h){const{transition:m,transitionEnd:f,...y}=h;a={...a,...y,...f}}return a};function r(u){e=u(t)}function l(u){const{props:a}=t,c=ea(t.parent)||{},h=[],m=new Set;let f={},y=1/0;for(let T=0;T<Td;T++){const w=wd[T],S=n[w],P=a[w]!==void 0?a[w]:c[w],j=Me(P),B=w===u?S.isActive:null;B===!1&&(y=T);let k=P===c[w]&&P!==a[w]&&j;if(k&&(s||i)&&t.manuallyAnimateOnMount&&(k=!1),S.protectedKeys={...f},!S.isActive&&B===null||!P&&!S.prevProp||xn(P)||typeof P=="boolean")continue;if(w==="exit"&&S.isActive&&B!==!0){S.prevResolvedValues&&(f={...f,...S.prevResolvedValues});continue}const g=Pd(S.prevProp,P);let M=g||w===u&&S.isActive&&!k&&j||T>y&&j,C=!1;const D=Array.isArray(P)?P:[P];let U=D.reduce(o(w),{});B===!1&&(U={});const{prevResolvedValues:tt={}}=S,H={...tt,...U},F=W=>{M=!0,m.has(W)&&(C=!0,m.delete(W)),S.needsAnimating[W]=!0;const Q=t.getValue(W);Q&&(Q.liveStyle=!1)};for(const W in H){const Q=U[W],A=tt[W];if(f.hasOwnProperty(W))continue;let dt=!1;hs(Q)&&hs(A)?dt=!na(Q,A)||g:dt=Q!==A,dt?Q!=null?F(W):m.add(W):Q!==void 0&&m.has(W)?F(W):S.protectedKeys[W]=!0}S.prevProp=P,S.prevResolvedValues=U,S.isActive&&(f={...f,...U}),(s||i)&&t.blockInitialAnimation&&(M=!1);const N=k&&g;M&&(!N||C)&&h.push(...D.map(W=>{const Q={type:w};if(typeof W=="string"&&(s||i)&&!N&&t.manuallyAnimateOnMount&&t.parent){const{parent:A}=t,dt=Xt(A,W);if(A.enteringChildren&&dt){const{delayChildren:Qt}=dt.transition||{};Q.delay=Po(A.enteringChildren,t,Qt)}}return{animation:W,options:Q}}))}if(m.size){const T={};if(typeof a.initial!="boolean"){const w=Xt(t,Array.isArray(a.initial)?a.initial[0]:a.initial);w&&w.transition&&(T.transition=w.transition)}m.forEach(w=>{const S=t.getBaseTarget(w),P=t.getValue(w);P&&(P.liveStyle=!0),T[w]=S??null}),h.push({animation:T})}let b=!!h.length;return s&&(a.initial===!1||a.initial===a.animate)&&!t.manuallyAnimateOnMount&&(b=!1),s=!1,i=!1,b?e(h):Promise.resolve()}function d(u,a){if(n[u].isActive===a)return Promise.resolve();t.variantChildren?.forEach(h=>h.animationState?.setActive(u,a)),n[u].isActive=a;const c=l(u);for(const h in n)n[h].protectedKeys={};return c}return{animateChanges:l,setActive:d,setAnimateFunction:r,getState:()=>n,reset:()=>{n=zi(),i=!0}}}function Pd(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!na(e,t):!1}function Wt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function zi(){return{animate:Wt(!0),whileInView:Wt(),whileHover:Wt(),whileTap:Wt(),whileDrag:Wt(),whileFocus:Wt(),exit:Wt()}}function Ts(t,e){t.min=e.min,t.max=e.max}function gt(t,e){Ts(t.x,e.x),Ts(t.y,e.y)}function Wi(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const sa=1e-4,Cd=1-sa,Ad=1+sa,ia=.01,Ed=0-ia,Rd=0+ia;function ct(t){return t.max-t.min}function Md(t,e,n){return Math.abs(t-e)<=n}function Ui(t,e,n,s=.5){t.origin=s,t.originPoint=_(e.min,e.max,t.origin),t.scale=ct(n)/ct(e),t.translate=_(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Cd&&t.scale<=Ad||isNaN(t.scale))&&(t.scale=1),(t.translate>=Ed&&t.translate<=Rd||isNaN(t.translate))&&(t.translate=0)}function Ce(t,e,n,s){Ui(t.x,e.x,n.x,s?s.originX:void 0),Ui(t.y,e.y,n.y,s?s.originY:void 0)}function Gi(t,e,n,s=0){const i=s?_(n.min,n.max,s):n.min;t.min=i+e.min,t.max=t.min+ct(e)}function Vd(t,e,n,s){Gi(t.x,e.x,n.x,s?.x),Gi(t.y,e.y,n.y,s?.y)}function $i(t,e,n,s=0){const i=s?_(n.min,n.max,s):n.min;t.min=e.min-i,t.max=t.min+ct(e)}function mn(t,e,n,s){$i(t.x,e.x,n.x,s?.x),$i(t.y,e.y,n.y,s?.y)}function Hi(t,e,n,s,i){return t-=e,t=pn(t,1/n,s),i!==void 0&&(t=pn(t,1/i,s)),t}function Dd(t,e=0,n=1,s=.5,i,o=t,r=t){if(Ct.test(e)&&(e=parseFloat(e),e=_(r.min,r.max,e/100)-r.min),typeof e!="number")return;let l=_(o.min,o.max,s);t===o&&(l-=e),t.min=Hi(t.min,e,n,l,i),t.max=Hi(t.max,e,n,l,i)}function qi(t,e,[n,s,i],o,r){Dd(t,e[n],e[s],e[i],e.scale,o,r)}const Ld=["x","scaleX","originX"],jd=["y","scaleY","originY"];function Ki(t,e,n,s){qi(t.x,e,Ld,n?n.x:void 0,s?s.x:void 0),qi(t.y,e,jd,n?n.y:void 0,s?s.y:void 0)}function Yi(t){return t.translate===0&&t.scale===1}function ra(t){return Yi(t.x)&&Yi(t.y)}function Xi(t,e){return t.min===e.min&&t.max===e.max}function Id(t,e){return Xi(t.x,e.x)&&Xi(t.y,e.y)}function Zi(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function oa(t,e){return Zi(t.x,e.x)&&Zi(t.y,e.y)}function Qi(t){return ct(t.x)/ct(t.y)}function Ji(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function kt(t){return[t("x"),t("y")]}function Od(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:a,pathRotation:c,rotateX:h,rotateY:m,skewX:f,skewY:y}=n;u&&(s=`perspective(${u}px) ${s}`),a&&(s+=`rotate(${a}deg) `),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotateX(${h}deg) `),m&&(s+=`rotateY(${m}deg) `),f&&(s+=`skewX(${f}deg) `),y&&(s+=`skewY(${y}deg) `)}const l=t.x.scale*e.x,d=t.y.scale*e.y;return(l!==1||d!==1)&&(s+=`scale(${l}, ${d})`),s||"none"}const Fd=Us.length,tr=t=>typeof t=="string"?parseFloat(t):t,er=t=>typeof t=="number"||V.test(t);function Bd(t,e,n,s,i,o){i?(t.opacity=_(0,n.opacity??1,Nd(s)),t.opacityExit=_(e.opacity??1,0,_d(s))):o&&(t.opacity=_(e.opacity??1,n.opacity??1,s));for(let r=0;r<Fd;r++){const l=Us[r];let d=nr(e,l),u=nr(n,l);if(d===void 0&&u===void 0)continue;d||(d=0),u||(u=0),d===0||u===0||er(d)===er(u)?(t[l]=Math.max(_(tr(d),tr(u),s),0),(Ct.test(u)||Ct.test(d))&&(t[l]+="%")):t[l]=u}(e.rotate||n.rotate)&&(t.rotate=_(e.rotate||0,n.rotate||0,s))}function nr(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Nd=aa(0,.5,Qr),_d=aa(.5,.95,mt);function aa(t,e,n){return s=>s<t?0:s>e?1:n(Ee(t,e,s))}function zd(t,e,n){const s=ot(t)?t:ce(t);return s.start(_s("",s,e,n)),s.animation}function Ve(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n,s)}const Wd=(t,e)=>t.depth-e.depth;class Ud{constructor(){this.children=[],this.isDirty=!1}add(e){Es(this.children,e),this.isDirty=!0}remove(e){an(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Wd),this.isDirty=!1,this.children.forEach(e)}}function Gd(t,e){const n=lt.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(Ot(s),t(o-e))};return z.setup(s,!0),()=>Ot(s)}function sn(t){return ot(t)?t.get():t}class $d{constructor(){this.members=[]}add(e){Es(this.members,e);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===e||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(an(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(an(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){for(let n=this.members.indexOf(e)-1;n>=0;n--){const s=this.members[n];if(s.isPresent!==!1&&s.instance?.isConnected!==!1)return this.promote(s),!0}return!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:i}=s.options,{layoutDependency:o}=e.options;(i===void 0||i!==o)&&(e.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.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)}}const rn={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Nn=["","X","Y","Z"],Hd=1e3;let qd=0;function _n(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function la(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Mo(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",z,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&la(s)}function ca({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},l=e?.()){this.id=qd++,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.layoutVersion=0,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(Xd),this.nodes.forEach(nh),this.nodes.forEach(sh),this.nodes.forEach(Zd)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ud)}addEventListener(r,l){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Rs),this.eventHandlers.get(r).add(l)}notifyListeners(r,...l){const d=this.eventHandlers.get(r);d&&d.notify(...l)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=Hs(r)&&!Yu(r),this.instance=r;const{layoutId:l,layout:d,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(d||l)&&(this.isLayoutDirty=!0),t){let a,c=0;const h=()=>this.root.updateBlockedByResize=!1;z.read(()=>{c=window.innerWidth}),t(r,()=>{const m=window.innerWidth;m!==c&&(c=m,this.root.updateBlockedByResize=!0,a&&a(),a=Gd(h,250),rn.hasAnimatedSinceResize&&(rn.hasAnimatedSinceResize=!1,this.nodes.forEach(rr)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||d)&&this.addEventListener("didUpdate",({delta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const f=this.options.transition||u.getDefaultTransition()||lh,{onLayoutAnimationStart:y,onLayoutAnimationComplete:b}=u.getProps(),T=!this.targetLayout||!oa(this.targetLayout,m),w=!c&&h;if(this.options.layoutRoot||this.resumeFrom||w||c&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S={...Ns(f,"layout"),onPlay:y,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(a,w,S.path)}else c||rr(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ot(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ih),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&la(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let a=0;a<this.path.length;a++){const c=this.path[a];c.shouldResetTransform=!0,(typeof c.latestValues.x=="string"||typeof c.latestValues.y=="string")&&(c.isLayoutDirty=!0),c.updateScroll("snapshot"),c.options.layoutRoot&&c.willUpdate(!1)}const{layoutId:l,layout:d}=this.options;if(l===void 0&&!d)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const d=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),d&&this.nodes.forEach(Jd),this.nodes.forEach(sr);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ir);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(th),this.nodes.forEach(eh),this.nodes.forEach(Kd),this.nodes.forEach(Yd)):this.nodes.forEach(ir),this.clearAllSnapshots();const l=lt.now();it.delta=At(0,1e3/60,l-it.timestamp),it.timestamp=l,it.isProcessing=!0,Vn.update.process(it),Vn.preRender.process(it),Vn.render.process(it),it.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Gs.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Qd),this.sharedNodes.forEach(rh)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,z.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){z.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ct(this.snapshot.measuredBox.x)&&!ct(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let d=0;d<this.path.length;d++)this.path[d].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Z()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(l=!1),l&&this.instance){const d=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:d,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!ra(this.projectionDelta),d=this.getTransformTemplate(),u=d?d(this.latestValues,""):void 0,a=u!==this.prevTransformTemplateValue;r&&this.instance&&(l||Ht(this.latestValues)||a)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const l=this.measurePageBox();let d=this.removeElementScroll(l);return r&&(d=this.removeTransform(d)),ch(d),{animationId:this.root.animationId,measuredBox:l,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return Z();const l=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(uh))){const{scroll:u}=this.root;u&&(Pt(l.x,u.offset.x),Pt(l.y,u.offset.y))}return l}removeElementScroll(r){const l=Z();if(gt(l,r),this.scroll?.wasRoot)return l;for(let d=0;d<this.path.length;d++){const u=this.path[d],{scroll:a,options:c}=u;u!==this.root&&a&&c.layoutScroll&&(a.wasRoot&&gt(l,r),Pt(l.x,a.offset.x),Pt(l.y,a.offset.y))}return l}applyTransform(r,l=!1,d){const u=d||Z();gt(u,r);for(let a=0;a<this.path.length;a++){const c=this.path[a];!l&&c.options.layoutScroll&&c.scroll&&c!==c.root&&(Pt(u.x,-c.scroll.offset.x),Pt(u.y,-c.scroll.offset.y)),Ht(c.latestValues)&&nn(u,c.latestValues,c.layout?.layoutBox)}return Ht(this.latestValues)&&nn(u,this.latestValues,this.layout?.layoutBox),u}removeTransform(r){const l=Z();gt(l,r);for(let d=0;d<this.path.length;d++){const u=this.path[d];if(!Ht(u.latestValues))continue;let a;u.instance&&(bs(u.latestValues)&&u.updateSnapshot(),a=Z(),gt(a,u.measurePageBox())),Ki(l,u.latestValues,u.snapshot?.layoutBox,a)}return Ht(this.latestValues)&&Ki(l,this.latestValues),l}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}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!==it.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==l;if(!(r||d&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:a,layoutId:c}=this.options;if(!this.layout||!(a||c))return;this.resolvedRelativeTargetAt=it.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Z(),this.targetWithTransforms=Z()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Vd(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):gt(this.target,this.layout.layoutBox),qo(this.target,this.targetDelta)):gt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||bs(this.parent.latestValues)||Ho(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(r,l,d){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Z(),this.relativeTargetOrigin=Z(),mn(this.relativeTargetOrigin,l,d,this.options.layoutAnchor||void 0),gt(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const r=this.getLead(),l=!!this.resumingFrom||this!==r;let d=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(d=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===it.timestamp&&(d=!1),d)return;const{layout:u,layoutId:a}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||a))return;gt(this.layoutCorrected,this.layout.layoutBox);const c=this.treeScale.x,h=this.treeScale.y;od(this.layoutCorrected,this.treeScale,this.path,l),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=Z());const{target:m}=r;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Wi(this.prevProjectionDelta.x,this.projectionDelta.x),Wi(this.prevProjectionDelta.y,this.projectionDelta.y)),Ce(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==c||this.treeScale.y!==h||!Ji(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ji(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=oe(),this.projectionDelta=oe(),this.projectionDeltaWithTransform=oe()}setAnimationOrigin(r,l=!1,d){const u=this.snapshot,a=u?u.latestValues:{},c={...this.latestValues},h=oe();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const m=Z(),f=u?u.source:void 0,y=this.layout?this.layout.source:void 0,b=f!==y,T=this.getStack(),w=!T||T.members.length<=1,S=!!(b&&!w&&this.options.crossfade===!0&&!this.path.some(ah));this.animationProgress=0;let P;const j=d?.interpolateProjection(r);this.mixTargetDelta=B=>{const k=B/1e3,g=j?.(k);g?(h.x.translate=g.x,h.x.scale=_(r.x.scale,1,k),h.x.origin=r.x.origin,h.x.originPoint=r.x.originPoint,h.y.translate=g.y,h.y.scale=_(r.y.scale,1,k),h.y.origin=r.y.origin,h.y.originPoint=r.y.originPoint):(or(h.x,r.x,k),or(h.y,r.y,k)),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(mn(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),oh(this.relativeTarget,this.relativeTargetOrigin,m,k),P&&Id(this.relativeTarget,P)&&(this.isProjectionDirty=!1),P||(P=Z()),gt(P,this.relativeTarget)),b&&(this.animationValues=c,Bd(c,a,this.latestValues,k,S,w)),g&&g.rotate!==void 0&&(this.animationValues||(this.animationValues=c),this.animationValues.pathRotation=g.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ot(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=z.update(()=>{rn.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ce(0)),this.motionValue.jump(0,!1),this.currentAnimation=zd(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:l=>{this.mixTargetDelta(l),r.onUpdate&&r.onUpdate(l)},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Hd),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:l,target:d,layout:u,latestValues:a}=r;if(!(!l||!d||!u)){if(this!==r&&this.layout&&u&&ua(this.options.animationType,this.layout.layoutBox,u.layoutBox)){d=this.target||Z();const c=ct(this.layout.layoutBox.x);d.x.min=r.target.x.min,d.x.max=d.x.min+c;const h=ct(this.layout.layoutBox.y);d.y.min=r.target.y.min,d.y.max=d.y.min+h}gt(l,d),nn(l,a),Ce(this.projectionDeltaWithTransform,this.layoutCorrected,l,a)}}registerSharedNode(r,l){this.sharedNodes.has(r)||this.sharedNodes.set(r,new $d),this.sharedNodes.get(r).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:l,preserveFollowOpacity:d}={}){const u=this.getStack();u&&u.promote(this,d),r&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let l=!1;const{latestValues:d}=r;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(l=!0),!l)return;const u={};d.z&&_n("z",r,u,this.animationValues);for(let a=0;a<Nn.length;a++)_n(`rotate${Nn[a]}`,r,u,this.animationValues),_n(`skew${Nn[a]}`,r,u,this.animationValues);r.render();for(const a in u)r.setStaticValue(a,u[a]),this.animationValues&&(this.animationValues[a]=u[a]);r.scheduleRender()}applyProjectionStyles(r,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const d=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=sn(l?.pointerEvents)||"",r.transform=d?d(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=sn(l?.pointerEvents)||""),this.hasProjected&&!Ht(this.latestValues)&&(r.transform=d?d({},""):"none",this.hasProjected=!1);return}r.visibility="";const a=u.animationValues||u.latestValues;this.applyTransformsToTarget();let c=Od(this.projectionDeltaWithTransform,this.treeScale,a);d&&(c=d(a,c)),r.transform=c;const{x:h,y:m}=this.projectionDelta;r.transformOrigin=`${h.origin*100}% ${m.origin*100}% 0`,u.animationValues?r.opacity=u===this?a.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:r.opacity=u===this?a.opacity!==void 0?a.opacity:"":a.opacityExit!==void 0?a.opacityExit:0;for(const f in ws){if(a[f]===void 0)continue;const{correct:y,applyTo:b,isCSSVariable:T}=ws[f],w=c==="none"?a[f]:y(a[f],u);if(b){const S=b.length;for(let P=0;P<S;P++)r[b[P]]=w}else T?this.options.visualElement.renderState.vars[f]=w:r[f]=w}this.options.layoutId&&(r.pointerEvents=u===this?sn(l?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(sr),this.root.sharedNodes.clear()}}}function Kd(t){t.updateLayout()}function Yd(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,o=e.source!==t.layout.source;if(i==="size")kt(a=>{const c=o?e.measuredBox[a]:e.layoutBox[a],h=ct(c);c.min=n[a].min,c.max=c.min+h});else if(i==="x"||i==="y"){const a=i==="x"?"y":"x";Ts(o?e.measuredBox[a]:e.layoutBox[a],n[a])}else ua(i,e.layoutBox,n)&&kt(a=>{const c=o?e.measuredBox[a]:e.layoutBox[a],h=ct(n[a]);c.max=c.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[a].max=t.relativeTarget[a].min+h)});const r=oe();Ce(r,n,e.layoutBox);const l=oe();o?Ce(l,t.applyTransform(s,!0),e.measuredBox):Ce(l,n,e.layoutBox);const d=!ra(r);let u=!1;if(!t.resumeFrom){const a=t.getClosestProjectingParent();if(a&&!a.resumeFrom){const{snapshot:c,layout:h}=a;if(c&&h){const m=t.options.layoutAnchor||void 0,f=Z();mn(f,e.layoutBox,c.layoutBox,m);const y=Z();mn(y,n,h.layoutBox,m),oa(f,y)||(u=!0),a.options.layoutRoot&&(t.relativeTarget=y,t.relativeTargetOrigin=f,t.relativeParent=a)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:l,layoutDelta:r,hasLayoutChanged:d,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Xd(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Zd(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Qd(t){t.clearSnapshot()}function sr(t){t.clearMeasurements()}function Jd(t){t.isLayoutDirty=!0,t.updateLayout()}function ir(t){t.isLayoutDirty=!1}function th(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function eh(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function rr(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function nh(t){t.resolveTargetDelta()}function sh(t){t.calcProjection()}function ih(t){t.resetSkewAndRotation()}function rh(t){t.removeLeadSnapshot()}function or(t,e,n){t.translate=_(e.translate,0,n),t.scale=_(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function ar(t,e,n,s){t.min=_(e.min,n.min,s),t.max=_(e.max,n.max,s)}function oh(t,e,n,s){ar(t.x,e.x,n.x,s),ar(t.y,e.y,n.y,s)}function ah(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const lh={duration:.45,ease:[.4,0,.1,1]},lr=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),cr=lr("applewebkit/")&&!lr("chrome/")?Math.round:mt;function ur(t){t.min=cr(t.min),t.max=cr(t.max)}function ch(t){ur(t.x),ur(t.y)}function ua(t,e,n){return t==="position"||t==="preserve-aspect"&&!Md(Qi(e),Qi(n),.2)}function uh(t){return t!==t.root&&t.scroll?.wasRoot}const dh=ca({attachResizeListener:(t,e)=>Ve(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),zn={current:void 0},da=ca({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!zn.current){const t=new dh({});t.mount(window),t.setOptions({layoutScroll:!0}),zn.current=t}return zn.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),ha=p.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function hh(t=!0){const e=p.useContext(As);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=p.useId();p.useEffect(()=>{if(t)return i(o)},[t]);const r=p.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const fa=p.createContext({strict:!1}),dr={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let hr=!1;function fh(){if(hr)return;const t={};for(const e in dr)t[e]={isEnabled:n=>dr[e].some(s=>!!n[s])};Uo(t),hr=!0}function pa(){return fh(),nd()}function ph(t){const e=pa();for(const n in t)e[n]={...e[n],...t[n]};Uo(e)}const mh=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function gn(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||mh.has(t)}let ma=t=>!gn(t);function gh(t){typeof t=="function"&&(ma=e=>e.startsWith("on")?!gn(e):t(e))}try{gh(require("@emotion/is-prop-valid").default)}catch{}function yh(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||ot(t[i])||(ma(i)||n===!0&&gn(i)||!e&&!gn(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const Tn=p.createContext({});function vh(t,e){if(wn(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Me(n)?n:void 0,animate:Me(s)?s:void 0}}return t.inherit!==!1?e:{}}function bh(t){const{initial:e,animate:n}=vh(t,p.useContext(Tn));return p.useMemo(()=>({initial:e,animate:n}),[fr(e),fr(n)])}function fr(t){return Array.isArray(t)?t.join(" "):t}const Zs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ga(t,e,n){for(const s in e)!ot(e[s])&&!Xo(s,n)&&(t[s]=e[s])}function xh({transformTemplate:t},e){return p.useMemo(()=>{const n=Zs();return Ys(n,e,t),Object.assign({},n.vars,n.style)},[e])}function wh(t,e){const n=t.style||{},s={};return ga(s,n,t),Object.assign(s,xh(t,e)),s}function Th(t,e){const n={},s=wh(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const ya=()=>({...Zs(),attrs:{}});function Sh(t,e,n,s){const i=p.useMemo(()=>{const o=ya();return Zo(o,e,Jo(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};ga(o,t.style,t),i.style={...o,...i.style}}return i}const kh=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Qs(t){return typeof t!="string"||t.includes("-")?!1:!!(kh.indexOf(t)>-1||/[A-Z]/u.test(t))}function Ph(t,e,n,{latestValues:s},i,o=!1,r){const d=(r??Qs(t)?Sh:Th)(e,s,i,t),u=yh(e,typeof t=="string",o),a=t!==p.Fragment?{...u,...d,ref:n}:{},{children:c}=e,h=p.useMemo(()=>ot(c)?c.get():c,[c]);return p.createElement(t,{...a,children:h})}function Ch({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:Ah(n,s,i,t),renderState:e()}}function Ah(t,e,n,s){const i={},o=s(t,{});for(const h in o)i[h]=sn(o[h]);let{initial:r,animate:l}=t;const d=wn(t),u=zo(t);e&&u&&!d&&t.inherit!==!1&&(r===void 0&&(r=e.initial),l===void 0&&(l=e.animate));let a=n?n.initial===!1:!1;a=a||r===!1;const c=a?l:r;if(c&&typeof c!="boolean"&&!xn(c)){const h=Array.isArray(c)?c:[c];for(let m=0;m<h.length;m++){const f=zs(t,h[m]);if(f){const{transitionEnd:y,transition:b,...T}=f;for(const w in T){let S=T[w];if(Array.isArray(S)){const P=a?S.length-1:0;S=S[P]}S!==null&&(i[w]=S)}for(const w in y)i[w]=y[w]}}}return i}const va=t=>(e,n)=>{const s=p.useContext(Tn),i=p.useContext(As),o=()=>Ch(t,e,s,i);return n?o():Pl(o)},Eh=va({scrapeMotionValuesFromProps:Xs,createRenderState:Zs}),Rh=va({scrapeMotionValuesFromProps:ta,createRenderState:ya}),Mh=Symbol.for("motionComponentSymbol");function Vh(t,e,n){const s=p.useRef(n);p.useInsertionEffect(()=>{s.current=n});const i=p.useRef(null);return p.useCallback(o=>{o&&t.onMount?.(o),e&&(o?e.mount(o):e.unmount());const r=s.current;if(typeof r=="function")if(o){const l=r(o);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):r(o);else r&&(r.current=o)},[e])}const ba=p.createContext({});function se(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Dh(t,e,n,s,i,o){const{visualElement:r}=p.useContext(Tn),l=p.useContext(fa),d=p.useContext(As),u=p.useContext(ha),a=u.reducedMotion,c=u.skipAnimations,h=p.useRef(null),m=p.useRef(!1);s=s||l.renderer,!h.current&&s&&(h.current=s(t,{visualState:e,parent:r,props:n,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:a,skipAnimations:c,isSVG:o}),m.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const f=h.current,y=p.useContext(ba);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&Lh(h.current,n,i,y);const b=p.useRef(!1);p.useInsertionEffect(()=>{f&&b.current&&f.update(n,d)});const T=n[Ro],w=p.useRef(!!T&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(T)&&window.MotionHasOptimisedAnimation?.(T));return Al(()=>{m.current=!0,f&&(b.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),w.current&&f.animationState&&f.animationState.animateChanges())}),p.useEffect(()=>{f&&(!w.current&&f.animationState&&f.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(T)}),w.current=!1),f.enteringChildren=void 0)}),f}function Lh(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:l,layoutScroll:d,layoutRoot:u,layoutAnchor:a,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:xa(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||l&&se(l),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:d,layoutRoot:u,layoutAnchor:a})}function xa(t){if(t)return t.options.allowProjection!==!1?t.projection:xa(t.parent)}function Wn(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&ph(s);const o=n?n==="svg":Qs(t),r=o?Rh:Eh;function l(u,a){let c;const h={...p.useContext(ha),...u,layoutId:jh(u)},{isStatic:m}=h,f=bh(u),y=r(u,m);if(!m&&typeof window<"u"){Ih();const b=Oh(h);c=b.MeasureLayout,f.visualElement=Dh(t,y,h,i,b.ProjectionNode,o)}return v.jsxs(Tn.Provider,{value:f,children:[c&&f.visualElement?v.jsx(c,{visualElement:f.visualElement,...h}):null,Ph(t,u,Vh(y,f.visualElement,a),y,m,e,o)]})}l.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const d=p.forwardRef(l);return d[Mh]=t,d}function jh({layoutId:t}){const e=p.useContext(_r).id;return e&&t!==void 0?e+"-"+t:t}function Ih(t,e){p.useContext(fa).strict}function Oh(t){const e=pa(),{drag:n,layout:s}=e;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n?.isEnabled(t)||s?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Fh(t,e){if(typeof Proxy>"u")return Wn;const n=new Map,s=(o,r)=>Wn(o,r,t,e),i=(o,r)=>s(o,r);return new Proxy(i,{get:(o,r)=>r==="create"?s:(n.has(r)||n.set(r,Wn(r,void 0,t,e)),n.get(r))})}const Bh=(t,e)=>e.isSVG??Qs(t)?new bd(e):new fd(e,{allowProjection:t!==p.Fragment});class Nh extends Ft{constructor(e){super(e),e.animationState||(e.animationState=kd(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();xn(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let _h=0;class zh extends Ft{constructor(){super(...arguments),this.id=_h++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;if(e&&s===!1){if(this.isExitComplete){const{initial:o,custom:r}=this.node.getProps();if(typeof o=="string"||typeof o=="object"&&o!==null&&!Array.isArray(o)){const l=Xt(this.node,o,r);if(l){const{transition:d,transitionEnd:u,...a}=l;for(const c in a)this.node.getValue(c)?.jump(a[c])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Wh={animation:{Feature:Nh},exit:{Feature:zh}};function Ie(t){return{point:{x:t.pageX,y:t.pageY}}}const Uh=t=>e=>$s(e)&&t(e,Ie(e));function Ae(t,e,n,s){return Ve(t,e,Uh(n),s)}const wa=({current:t})=>t?t.ownerDocument.defaultView:null,pr=(t,e)=>Math.abs(t-e);function Gh(t,e){const n=pr(t.x,e.x),s=pr(t.y,e.y);return Math.sqrt(n**2+s**2)}const mr=new Set(["auto","scroll"]);class Ta{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=f=>{this.handleScroll(f.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=$e(this.lastRawMoveEventInfo,this.transformPagePoint));const f=Un(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,b=Gh(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!b)return;const{point:T}=f,{timestamp:w}=it;this.history.push({...T,timestamp:w});const{onStart:S,onMove:P}=this.handlers;y||(S&&S(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),P&&P(this.lastMoveEvent,f)},this.handlePointerMove=(f,y)=>{this.lastMoveEvent=f,this.lastRawMoveEventInfo=y,this.lastMoveEventInfo=$e(y,this.transformPagePoint),z.update(this.updatePoint,!0)},this.handlePointerUp=(f,y)=>{this.end();const{onEnd:b,onSessionEnd:T,resumeAnimation:w}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=Un(f.type==="pointercancel"?this.lastMoveEventInfo:$e(y,this.transformPagePoint),this.history);this.startEvent&&b&&b(f,S),T&&T(f,S)},!$s(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const d=Ie(e),u=$e(d,this.transformPagePoint),{point:a}=u,{timestamp:c}=it;this.history=[{...a,timestamp:c}];const{onSessionStart:h}=n;h&&h(e,Un(u,this.history));const m={passive:!0,capture:!0};this.removeListeners=De(Ae(this.contextWindow,"pointermove",this.handlePointerMove,m),Ae(this.contextWindow,"pointerup",this.handlePointerUp,m),Ae(this.contextWindow,"pointercancel",this.handlePointerUp,m)),l&&this.startScrollTracking(l)}startScrollTracking(e){let n=e.parentElement;for(;n;){const s=getComputedStyle(n);(mr.has(s.overflowX)||mr.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const s=e===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},o={x:i.x-n.x,y:i.y-n.y};o.x===0&&o.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(e,i),z.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ot(this.updatePoint)}}function $e(t,e){return e?{point:e(t.point)}:t}function gr(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Un({point:t},e){return{point:t,delta:gr(t,Sa(e)),offset:gr(t,$h(e)),velocity:Hh(e,.1)}}function $h(t){return t[0]}function Sa(t){return t[t.length-1]}function Hh(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Sa(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>ht(e)));)n--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&i.timestamp-s.timestamp>ht(e)*2&&(s=t[1]);const o=pt(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function qh(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?_(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?_(n,t,s.max):Math.min(t,n)),t}function yr(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Kh(t,{top:e,left:n,bottom:s,right:i}){return{x:yr(t.x,n,i),y:yr(t.y,e,s)}}function vr(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function Yh(t,e){return{x:vr(t.x,e.x),y:vr(t.y,e.y)}}function Xh(t,e){let n=.5;const s=ct(t),i=ct(e);return i>s?n=Ee(e.min,e.max-s,t.min):s>i&&(n=Ee(t.min,t.max-i,e.min)),At(0,1,n)}function Zh(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Ss=.35;function Qh(t=Ss){return t===!1?t=0:t===!0&&(t=Ss),{x:br(t,"left","right"),y:br(t,"top","bottom")}}function br(t,e,n){return{min:xr(t,e),max:xr(t,n)}}function xr(t,e){return typeof t=="number"?t:t[e]||0}const Jh=new WeakMap;class tf{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Z(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=c=>{n&&this.snapToCursor(Ie(c).point),this.stopAnimation()},r=(c,h)=>{const{drag:m,dragPropagation:f,onDragStart:y}=this.getProps();if(m&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Du(m),!this.openDragLock))return;this.latestPointerEvent=c,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),kt(T=>{let w=this.getAxisMotionValue(T).get()||0;if(Ct.test(w)){const{projection:S}=this.visualElement;if(S&&S.layout){const P=S.layout.layoutBox[T];P&&(w=ct(P)*(parseFloat(w)/100))}}this.originPoint[T]=w}),y&&z.update(()=>y(c,h),!1,!0),fs(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},l=(c,h)=>{this.latestPointerEvent=c,this.latestPanInfo=h;const{dragPropagation:m,dragDirectionLock:f,onDirectionLock:y,onDrag:b}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:T}=h;if(f&&this.currentDirection===null){this.currentDirection=nf(T),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",h.point,T),this.updateAxis("y",h.point,T),this.visualElement.render(),b&&z.update(()=>b(c,h),!1,!0)},d=(c,h)=>{this.latestPointerEvent=c,this.latestPanInfo=h,this.stop(c,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:c}=this.getProps();(c||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:a}=this.getProps();this.panSession=new Ta(e,{onSessionStart:o,onStart:r,onMove:l,onSessionEnd:d,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:a,distanceThreshold:s,contextWindow:wa(this.visualElement),element:this.visualElement.current})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!s)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:l}=this.getProps();l&&z.postRender(()=>l(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!He(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=qh(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&se(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=Kh(s.layoutBox,e):this.constraints=!1,this.elastic=Qh(n),i!==this.constraints&&!se(e)&&s&&this.constraints&&!this.hasMutatedConstraints&&kt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Zh(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!se(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const o=ad(s,i.root,this.visualElement.getTransformPagePoint());let r=Yh(i.layout.layoutBox,o);if(n){const l=n(id(r));this.hasMutatedConstraints=!!l,l&&(r=$o(l))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:l}=this.getProps(),d=this.constraints||{},u=kt(a=>{if(!He(a,n,this.currentDirection))return;let c=d&&d[a]||{};(r===!0||r===a)&&(c={min:0,max:0});const h=i?200:1e6,m=i?40:1e7,f={type:"inertia",velocity:s?e[a]:0,bounceStiffness:h,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...c};return this.startAxisValueAnimation(a,f)});return Promise.all(u).then(l)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return fs(this.visualElement,e),s.start(_s(e,s,0,n,this.visualElement,!1))}stopAnimation(){kt(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){kt(n=>{const{drag:s}=this.getProps();if(!He(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:l}=i.layout.layoutBox[n],d=o.get()||0;o.set(e[n]-_(r,l,.5)+d)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!se(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};kt(r=>{const l=this.getAxisMotionValue(r);if(l&&this.constraints!==!1){const d=l.get();i[r]=Xh({min:d,max:d},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),kt(r=>{if(!He(r,e,null))return;const l=this.getAxisMotionValue(r),{min:d,max:u}=this.constraints[r];l.set(_(d,u,i[r]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Jh.set(this.visualElement,this);const e=this.visualElement.current,n=Ae(e,"pointerdown",u=>{const{drag:a,dragListener:c=!0}=this.getProps(),h=u.target,m=h!==e&&Bu(h);a&&c&&!m&&this.start(u)});let s;const i=()=>{const{dragConstraints:u}=this.getProps();se(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),s||(s=ef(e,u.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,r=o.addEventListener("measure",i);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),z.read(i);const l=Ve(window,"resize",()=>this.scalePositionWithinConstraints()),d=o.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:a})=>{this.isDragging&&a&&(kt(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=u[c].translate,h.set(h.get()+u[c].translate))}),this.visualElement.render())}));return()=>{l(),n(),r(),d&&d(),s&&s()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Ss,dragMomentum:l=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:l}}}function wr(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function ef(t,e,n){const s=Mi(t,wr(n)),i=Mi(e,wr(n));return()=>{s(),i()}}function He(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function nf(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class sf extends Ft{constructor(e){super(e),this.removeGroupControls=mt,this.removeListeners=mt,this.controls=new tf(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||mt}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Gn=t=>(e,n)=>{t&&z.update(()=>t(e,n),!1,!0)};class rf extends Ft{constructor(){super(...arguments),this.removePointerDownListener=mt}onPointerDown(e){this.session=new Ta(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:wa(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Gn(e),onStart:Gn(n),onMove:Gn(s),onEnd:(o,r)=>{delete this.session,i&&z.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=Ae(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let $n=!1;class of extends p.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),$n&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),rn.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,e.layoutDependency!==n&&r.setOptions({...r.options,layoutDependency:n}),$n=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||z.postRender(()=>{const l=r.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:s}=e;s&&(s.options.layoutAnchor=n,s.root.didUpdate(),Gs.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;$n=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function ka(t){const[e,n]=hh(),s=p.useContext(_r);return v.jsx(of,{...t,layoutGroup:s,switchLayoutGroup:p.useContext(ba),isPresent:e,safeToRemove:n})}const af={pan:{Feature:rf},drag:{Feature:sf,ProjectionNode:da,MeasureLayout:ka}};function Tr(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=s[i];o&&z.postRender(()=>o(e,Ie(e)))}class lf extends Ft{mount(){const{current:e}=this.node;e&&(this.unmount=ju(e,(n,s)=>(Tr(this.node,s,"Start"),i=>Tr(this.node,i,"End"))))}unmount(){}}class cf extends Ft{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=De(Ve(this.node.current,"focus",()=>this.onFocus()),Ve(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Sr(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&z.postRender(()=>o(e,Ie(e)))}class uf extends Ft{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=_u(e,(i,o)=>(Sr(this.node,o,"Start"),(r,{success:l})=>Sr(this.node,r,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:s?.tap===!1})}unmount(){}}const ks=new WeakMap,Hn=new WeakMap,df=t=>{const e=ks.get(t.target);e&&e(t)},hf=t=>{t.forEach(df)};function ff({root:t,...e}){const n=t||document;Hn.has(n)||Hn.set(n,{});const s=Hn.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(hf,{root:t,...e})),s[i]}function pf(t,e,n){const s=ff(e);return ks.set(t,n),s.observe(t),()=>{ks.delete(t),s.unobserve(t)}}const mf={some:0,all:1};class gf extends Ft{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:mf[i]},l=d=>{const{isIntersecting:u}=d;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:a,onViewportLeave:c}=this.node.getProps(),h=u?a:c;h&&h(d)};this.stopObserver=pf(this.node.current,r,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(yf(e,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function yf({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const vf={inView:{Feature:gf},tap:{Feature:uf},focus:{Feature:cf},hover:{Feature:lf}},bf={layout:{ProjectionNode:da,MeasureLayout:ka}},xf={...Wh,...vf,...af,...bf},wf=Fh(xf,Bh),kr=wf;function Tf(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}Tf(`:root{--sileo-spring-easing:linear(
3
3
  0,
4
4
  0.002 0.6%,
5
5
  0.007 1.2%,
@@ -43,5 +43,5 @@ import{r as p,j as v,d as ll}from"./react-rd22PHbN.js";import{Q as cl,g as ul}fr
43
43
  [data-sileo-badge],[data-sileo-title],[data-sileo-button]
44
44
  )[data-state=info]{--_c:var(--sileo-state-info)}:is(
45
45
  [data-sileo-badge],[data-sileo-title],[data-sileo-button]
46
- )[data-state=action]{--_c:var(--sileo-state-action)}:is([data-sileo-badge],[data-sileo-title])[data-state]{--sileo-tone:var(--_c);--sileo-tone-bg:color-mix(in oklch, var(--_c) 20%, transparent)}[data-sileo-content]{position:absolute;left:0;z-index:10;width:100%;pointer-events:none;opacity:var(--_co, 0)}[data-sileo-content]:not([data-visible=true]){content-visibility:hidden}[data-sileo-toast][data-ready=true] [data-sileo-content]{transition:opacity calc(var(--sileo-duration) * .08) ease calc(var(--sileo-duration) * .04)}[data-sileo-content][data-edge=top]{top:0}[data-sileo-content][data-edge=bottom]{top:var(--sileo-height)}[data-sileo-content][data-visible=true]{pointer-events:auto}[data-sileo-toast][data-ready=true] [data-sileo-content][data-visible=true]{transition:opacity calc(var(--sileo-duration) * .6) ease calc(var(--sileo-duration) * .3)}[data-sileo-description]{width:100%;text-align:left;padding:1rem;font-size:.875rem;line-height:1.25rem;contain:layout style paint;content-visibility:auto}[data-sileo-button]{display:flex;align-items:center;justify-content:center;height:1.75rem;padding:0 .625rem;margin-top:.75rem;border-radius:9999px;border:0;font-size:.75rem;font-weight:500;cursor:pointer;color:var(--sileo-btn-color,currentColor);background-color:var(--sileo-btn-bg,transparent);transition:background-color 150ms ease}[data-sileo-button]:hover{background-color:var(--sileo-btn-bg-hover,transparent)}[data-sileo-button][data-state]{--sileo-btn-color:var(--_c);--sileo-btn-bg:color-mix(in oklch, var(--_c) 15%, transparent);--sileo-btn-bg-hover:color-mix(in oklch, var(--_c) 25%, transparent)}[data-sileo-icon=spin]{animation:sileo-spin 1s linear infinite}@keyframes sileo-spin{to{transform:rotate(360deg)}}@keyframes sileo-header-enter{from{opacity:0;filter:blur(6px)}to{opacity:1;filter:blur(0px)}}@keyframes sileo-header-exit{from{opacity:1;filter:blur(0px)}to{opacity:0;filter:blur(6px)}}[data-sileo-viewport]{position:fixed;z-index:50;display:flex;gap:.75rem;padding:.75rem;pointer-events:none;max-width:calc(100vw - 1.5rem);contain:layout style}[data-sileo-viewport][data-position^=top] [data-sileo-toast]:not([data-ready=true]){margin-bottom:calc(-1 * (var(--sileo-height) + .75rem))}[data-sileo-viewport][data-position^=bottom] [data-sileo-toast]:not([data-ready=true]){margin-top:calc(-1 * (var(--sileo-height) + .75rem))}[data-sileo-viewport][data-position^=top]{top:0;flex-direction:column-reverse}[data-sileo-viewport][data-position^=bottom]{bottom:0;flex-direction:column}[data-sileo-viewport][data-position$=left]{left:0;align-items:flex-start}[data-sileo-viewport][data-position$=right]{right:0;align-items:flex-end}[data-sileo-viewport][data-position$=center]{left:50%;transform:translateX(-50%);align-items:center}@media (prefers-reduced-motion:no-preference){[data-sileo-toast][data-ready=true]:hover,[data-sileo-toast][data-ready=true][data-exiting=true]{will-change:transform,opacity,height}}@media (prefers-reduced-motion:reduce){[data-sileo-viewport],[data-sileo-viewport] *,[data-sileo-viewport] ::after,[data-sileo-viewport] ::before{animation-duration:0s;animation-iteration-count:1;transition-duration:0s}}[data-sileo-viewport][data-theme=dark] [data-sileo-description]{color:rgba(0,0,0,.5)}[data-sileo-viewport][data-theme=light] [data-sileo-description]{color:rgba(255,255,255,.5)}`);const Tt=40,we=350,Sf=16,Pa=600,kf=Pa/1e3,fe=6e3,Pf=fe*.1,Cf=fe*.025,Af=fe-2e3,qn={type:"spring",bounce:.25,duration:kf},Ef=.5,qe=10,Rf=2.25,Mf=200,Vf=Pa*.7,pe=t=>{let{title:e,children:n}=t,s=kl(t,["title","children"]);return v.jsxs("svg",G({},s,{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("title",{children:e}),n]}))},Df=()=>v.jsxs(pe,{title:"Arrow Right",children:[v.jsx("path",{d:"M5 12h14"}),v.jsx("path",{d:"m12 5 7 7-7 7"})]}),Lf=()=>v.jsxs(pe,{title:"Life Buoy",children:[v.jsx("circle",{cx:"12",cy:"12",r:"10"}),v.jsx("path",{d:"m4.93 4.93 4.24 4.24"}),v.jsx("path",{d:"m14.83 9.17 4.24-4.24"}),v.jsx("path",{d:"m14.83 14.83 4.24 4.24"}),v.jsx("path",{d:"m9.17 14.83-4.24 4.24"}),v.jsx("circle",{cx:"12",cy:"12",r:"4"})]}),jf=t=>v.jsx(pe,G({title:"Loader Circle"},t,{children:v.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})),If=()=>v.jsxs(pe,{title:"X",children:[v.jsx("path",{d:"M18 6 6 18"}),v.jsx("path",{d:"m6 6 12 12"})]}),Of=()=>v.jsxs(pe,{title:"Circle Alert",children:[v.jsx("circle",{cx:"12",cy:"12",r:"10"}),v.jsx("line",{x1:"12",x2:"12",y1:"8",y2:"12"}),v.jsx("line",{x1:"12",x2:"12.01",y1:"16",y2:"16"})]}),Ff=()=>v.jsx(pe,{title:"Check",children:v.jsx("path",{d:"M20 6 9 17l-5-5"})}),Pr={success:v.jsx(Ff,{}),loading:v.jsx(jf,{"data-sileo-icon":"spin","aria-hidden":"true"}),error:v.jsx(If,{}),warning:v.jsx(Of,{}),info:v.jsx(Lf,{}),action:v.jsx(Df,{})},Bf=p.memo(function({filterId:e,blur:n}){return v.jsx("defs",{children:v.jsxs("filter",{id:e,x:"-20%",y:"-20%",width:"140%",height:"140%",colorInterpolationFilters:"sRGB",children:[v.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:n,result:"blur"}),v.jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 20 -10",result:"goo"}),v.jsx("feComposite",{in:"SourceGraphic",in2:"goo",operator:"atop"})]})})}),Nf=p.memo(function({id:e,fill:n="#FFFFFF",state:s="success",title:i=s,description:o,position:r="left",expand:l="bottom",className:d,icon:u,styles:a,button:c,roundness:h,exiting:m=!1,autoExpandDelayMs:f,autoCollapseDelayMs:y,canExpand:b,interruptKey:w,refreshKey:x,onMouseEnter:S,onMouseLeave:P,onDismiss:j}){var B,k,g,M,C,D,U,tt;const H=p.useMemo(()=>({title:i,description:o,state:s,icon:u,styles:a,button:c,fill:n}),[i,o,s,u,a,c,n]),[F,N]=p.useState(H),[bt,W]=p.useState(x),[Q,A]=p.useState(!1),[dt,Qt]=p.useState(!1),[Oe,Jt]=p.useState(0),[et,J]=p.useState(0),at=!!F.description||!!F.button,me=F.state==="loading",I=at&&Q&&!me,ge=me?!1:b??(!w||w===e),xt=`${F.state}-${F.title}`,Vt=`sileo-gooey-${e}`,Et=Math.max(0,h??Sf),Nt=Et*Ef,ei=p.useRef(null),ni=p.useRef(null),_t=p.useRef(null),ye=p.useRef(null),ve=p.useRef(null),Dt=p.useRef(null),kn=p.useRef(x),zt=p.useRef(null),[q,si]=p.useState({current:{key:xt,view:F},prev:null}),Pn=p.useRef(null),Fe=p.useRef(null),be=p.useRef(null),Cn=p.useRef(0),Be=p.useRef(null);p.useLayoutEffect(()=>{const L=Pn.current,K=ei.current;if(!L||!K)return;if(Fe.current===null){const ut=getComputedStyle(K);Fe.current=parseFloat(ut.paddingLeft)+parseFloat(ut.paddingRight)}const nt=Fe.current;(()=>{const ut=L.scrollWidth+nt+qe;ut>qe&&Jt(wt=>wt===ut?wt:ut)})(),be.current||(be.current=new ResizeObserver(()=>{cancelAnimationFrame(Cn.current),Cn.current=requestAnimationFrame(()=>{var ut;const wt=Pn.current,al=(ut=Fe.current)!=null?ut:0;if(!wt)return;const Mn=wt.scrollWidth+al+qe;Mn>qe&&Jt(li=>li===Mn?li:Mn)})})),Be.current!==L&&(Be.current&&be.current.unobserve(Be.current),be.current.observe(L),Be.current=L)},[q.current.key]),p.useEffect(()=>()=>{var L;cancelAnimationFrame(Cn.current),(L=be.current)==null||L.disconnect()},[]),p.useLayoutEffect(()=>{if(!at){J(0);return}const L=ni.current;if(!L)return;const K=()=>{const ut=L.scrollHeight;J(wt=>wt===ut?wt:ut)};K();let nt=0;const ft=new ResizeObserver(()=>{cancelAnimationFrame(nt),nt=requestAnimationFrame(K)});return ft.observe(L),()=>{cancelAnimationFrame(nt),ft.disconnect()}},[at]),p.useEffect(()=>{const L=requestAnimationFrame(()=>Qt(!0));return()=>cancelAnimationFrame(L)},[]),p.useLayoutEffect(()=>{si(L=>L.current.key===xt?L.current.view===F?L:G({},L,{current:{key:xt,view:F}}):{prev:L.current,current:{key:xt,view:F}})},[xt,F]),p.useEffect(()=>{if(q.prev)return _t.current&&clearTimeout(_t.current),_t.current=window.setTimeout(()=>{_t.current=null,si(L=>G({},L,{prev:null}))},Vf),()=>{_t.current&&(clearTimeout(_t.current),_t.current=null)}},[q.prev]),p.useEffect(()=>{N(L=>L.fill===n?L:G({},L,{fill:n}))},[n]),p.useEffect(()=>{if(x===void 0){N(H),W(void 0),zt.current=null,kn.current=x;return}kn.current!==x&&(kn.current=x,Dt.current&&(clearTimeout(Dt.current),Dt.current=null),I?(zt.current={key:x,payload:H},A(!1),Dt.current=window.setTimeout(()=>{Dt.current=null;const L=zt.current;L&&(N(L.payload),W(L.key),zt.current=null)},Mf)):(zt.current=null,N(H),W(x)))},[I,x,H]),p.useEffect(()=>{if(!at)return;if(ye.current&&clearTimeout(ye.current),ve.current&&clearTimeout(ve.current),m||!ge){A(!1);return}if(f==null&&y==null)return;const L=f??0,K=y??0;return L>0?ye.current=window.setTimeout(()=>A(!0),L):A(!0),K>0&&(ve.current=window.setTimeout(()=>A(!1),K)),()=>{ye.current&&clearTimeout(ye.current),ve.current&&clearTimeout(ve.current)}},[y,f,at,ge,m,bt]);const An=Tt*Rf,En=at?Math.max(An,Tt+et):An,ii=p.useRef(En);I&&(ii.current=En);const Ne=I?En:ii.current,ri=at?Math.max(Ne,An):Tt,oi=Math.max(0,Ne-Tt),te=Math.max(Oe||Tt,Tt),ai=Tt+Nt*3,_e=r==="right"?we-te:r==="center"?(we-te)/2:0,qa=p.useMemo(()=>({x:_e,width:te,height:I?ai:Tt}),[_e,te,I,ai]),Ka=p.useMemo(()=>({height:I?oi:0,opacity:I?1:0}),[I,oi]),Ya=p.useMemo(()=>I?qn:G({},qn,{bounce:0}),[I]),Xa=p.useMemo(()=>dt?qn:{duration:0},[dt]),Za=`0 0 ${we} ${ri}`,Qa=p.useMemo(()=>({filter:`url(#${Vt})`}),[Vt]),Ja=p.useMemo(()=>({"--_h":`${I?Ne:Tt}px`,"--_pw":`${te}px`,"--_px":`${_e}px`,"--_ht":`translateY(${I?l==="bottom"?3:-3:0}px) scale(${I?.9:1})`,"--_co":`${I?1:0}`}),[I,Ne,te,_e,l]),tl=p.useCallback(L=>{S?.(L),at&&A(!0)},[at,S]),el=p.useCallback(L=>{P?.(L),A(!1)},[P]),nl=p.useCallback(L=>{if(L.propertyName!=="height"&&L.propertyName!=="transform"||I)return;const K=zt.current;K&&(Dt.current&&(clearTimeout(Dt.current),Dt.current=null),N(K.payload),W(K.key),zt.current=null)},[I]),sl=30,il=20,ze=p.useRef(null),ee=p.useRef(null),We=p.useRef(j);We.current=j;const Rn=p.useRef(null);if(!Rn.current){const L={onMove:K=>{const nt=ze.current;if(ee.current===null||!nt)return;const ft=K.clientY-ee.current,ut=ft>0?1:-1,wt=Math.min(Math.abs(ft),il)*ut;nt.style.transform=`translateY(${wt}px)`},onUp:K=>{const nt=ze.current;if(ee.current===null||!nt)return;const ft=K.clientY-ee.current;ee.current=null,nt.style.transform="",nt.removeEventListener("pointermove",L.onMove),nt.removeEventListener("pointerup",L.onUp),Math.abs(ft)>sl&&(We.current==null||We.current.call(We))}};Rn.current=L}const rl=p.useCallback(L=>{var K;L.preventDefault(),L.stopPropagation(),(K=F.button)==null||K.onClick()},[F.button]),ol=p.useCallback(L=>{if(m||!j||L.target.closest("[data-sileo-button]"))return;ee.current=L.clientY,L.currentTarget.setPointerCapture(L.pointerId);const nt=ze.current,ft=Rn.current;nt&&ft&&(nt.addEventListener("pointermove",ft.onMove,{passive:!0}),nt.addEventListener("pointerup",ft.onUp,{passive:!0}))},[m,j]);return v.jsxs("button",{ref:ze,type:"button","data-sileo-toast":!0,"data-ready":dt,"data-expanded":I,"data-exiting":m,"data-edge":l,"data-position":r,"data-state":F.state,className:d,style:Ja,onMouseEnter:tl,onMouseLeave:el,onTransitionEnd:nl,onPointerDown:ol,children:[v.jsx("div",{"data-sileo-canvas":!0,"data-edge":l,style:Qa,children:v.jsxs("svg",{"data-sileo-svg":!0,width:we,height:ri,viewBox:Za,children:[v.jsx("title",{children:"Sileo Notification"}),v.jsx(Bf,{filterId:Vt,blur:Nt}),v.jsx(kr.rect,{"data-sileo-pill":!0,rx:Et,ry:Et,fill:F.fill,initial:!1,animate:qa,transition:Xa}),v.jsx(kr.rect,{"data-sileo-body":!0,y:Tt,width:we,rx:Et,ry:Et,fill:F.fill,initial:!1,animate:Ka,transition:Ya})]})}),v.jsx("div",{ref:ei,"data-sileo-header":!0,"data-edge":l,children:v.jsxs("div",{"data-sileo-header-stack":!0,children:[v.jsxs("div",{ref:Pn,"data-sileo-header-inner":!0,"data-layer":"current",children:[v.jsx("div",{"data-sileo-badge":!0,"data-state":q.current.view.state,className:(g=q.current.view.styles)==null?void 0:g.badge,children:(B=q.current.view.icon)!=null?B:Pr[q.current.view.state]}),v.jsx("span",{"data-sileo-title":!0,"data-state":q.current.view.state,className:(M=q.current.view.styles)==null?void 0:M.title,children:q.current.view.title})]},q.current.key),q.prev&&v.jsxs("div",{"data-sileo-header-inner":!0,"data-layer":"prev","data-exiting":"true",children:[v.jsx("div",{"data-sileo-badge":!0,"data-state":q.prev.view.state,className:(C=q.prev.view.styles)==null?void 0:C.badge,children:(k=q.prev.view.icon)!=null?k:Pr[q.prev.view.state]}),v.jsx("span",{"data-sileo-title":!0,"data-state":q.prev.view.state,className:(D=q.prev.view.styles)==null?void 0:D.title,children:q.prev.view.title})]},q.prev.key)]})}),at&&v.jsx("div",{"data-sileo-content":!0,"data-edge":l,"data-visible":I,children:v.jsxs("div",{ref:ni,"data-sileo-description":!0,className:(U=F.styles)==null?void 0:U.description,children:[F.description,F.button&&v.jsx("a",{href:"#",type:"button","data-sileo-button":!0,"data-state":F.state,className:(tt=F.styles)==null?void 0:tt.button,onClick:rl,children:F.button.title})]})})]})}),_f=t=>t.includes("right")?"right":t.includes("center")?"center":"left",zf=t=>t.startsWith("top")?"bottom":"top",rt={toasts:[],listeners:new Set,position:"top-right",options:void 0,emit(){for(const t of this.listeners)t(this.toasts)},update(t){this.toasts=t(this.toasts),this.emit()}};let Wf=0;const Uf=()=>`${++Wf}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,Cr=t=>`${t.id}:${t.instanceId}`,Ps=t=>{const e=rt.toasts.find(n=>n.id===t);!e||e.exiting||(rt.update(n=>n.map(s=>s.id===t?G({},s,{exiting:!0}):s)),setTimeout(()=>rt.update(n=>n.filter(s=>s.id!==t)),Pf))},Gf=(t,e)=>{var n,s;if(t.autopilot===!1||!e||e<=0)return{};const i=typeof t.autopilot=="object"?t.autopilot:void 0,o=r=>Math.min(e,Math.max(0,r));return{expandDelayMs:o((n=i?.expand)!=null?n:Cf),collapseDelayMs:o((s=i?.collapse)!=null?s:Af)}},Ca=t=>{var e;return G({},rt.options,t,{styles:G({},(e=rt.options)==null?void 0:e.styles,t.styles)})},Aa=(t,e,n)=>{var s,i,o;const r=(s=t.duration)!=null?s:fe,l=Gf(t,r);return G({},t,{id:e,instanceId:Uf(),position:(i=(o=t.position)!=null?o:n)!=null?i:rt.position,autoExpandDelayMs:l.expandDelayMs,autoCollapseDelayMs:l.collapseDelayMs})},Ut=t=>{var e,n;const s=rt.toasts.filter(d=>!d.exiting),i=Ca(t),o=(e=i.id)!=null?e:"sileo-default",r=s.find(d=>d.id===o),l=Aa(i,o,r?.position);return r?rt.update(d=>d.map(u=>u.id===o?l:u)):rt.update(d=>[...d.filter(u=>u.id!==o),l]),{id:o,duration:(n=i.duration)!=null?n:fe}},Kn=(t,e)=>{const n=rt.toasts.find(i=>i.id===t);if(!n)return;const s=Aa(Ca(e),t,n.position);rt.update(i=>i.map(o=>o.id===t?s:o))},Yn={show:t=>Ut(G({},t,{state:t.type})).id,success:t=>Ut(G({},t,{state:"success"})).id,error:t=>Ut(G({},t,{state:"error"})).id,warning:t=>Ut(G({},t,{state:"warning"})).id,info:t=>Ut(G({},t,{state:"info"})).id,action:t=>Ut(G({},t,{state:"action"})).id,promise:(t,e)=>{const{id:n}=Ut(G({},e.loading,{state:"loading",duration:null,position:e.position})),s=typeof t=="function"?t():t;return s.then(i=>{if(e.action){const o=typeof e.action=="function"?e.action(i):e.action;Kn(n,G({},o,{state:"action",id:n}))}else{const o=typeof e.success=="function"?e.success(i):e.success;Kn(n,G({},o,{state:"success",id:n}))}}).catch(i=>{const o=typeof e.error=="function"?e.error(i):e.error;Kn(n,G({},o,{state:"error",id:n}))}),s},dismiss:Ps,clear:t=>rt.update(e=>t?e.filter(n=>n.position!==t):[])},$f={light:"#1a1a1a",dark:"#f2f2f2"};function Hf(t){const[e,n]=p.useState(()=>t==="light"||t==="dark"?t:typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light");return p.useEffect(()=>{if(t==="light"||t==="dark"){n(t);return}const s=window.matchMedia("(prefers-color-scheme: dark)"),i=o=>n(o.matches?"dark":"light");return n(s.matches?"dark":"light"),s.addEventListener("change",i),()=>s.removeEventListener("change",i)},[t]),e}function qf({children:t,position:e="top-right",offset:n,options:s,theme:i}){const o=Hf(i),[r,l]=p.useState(rt.toasts),[d,u]=p.useState(),a=p.useRef(!1),c=p.useRef(new Map),h=p.useRef(r),m=p.useRef(void 0),f=p.useRef(new Map);p.useEffect(()=>{rt.position=e,rt.options=s},[e,s]);const y=p.useCallback(()=>{for(const k of c.current.values())clearTimeout(k);c.current.clear()},[]),b=p.useCallback(k=>{if(!a.current)for(const M of k){var g;if(M.exiting)continue;const C=Cr(M);if(c.current.has(C)||M.duration===null)continue;const D=(g=M.duration)!=null?g:fe;D<=0||c.current.set(C,window.setTimeout(()=>Ps(M.id),D))}},[]);p.useEffect(()=>{const k=g=>l(g);return rt.listeners.add(k),()=>{rt.listeners.delete(k),y()}},[y]),p.useEffect(()=>{h.current=r;const k=new Set(r.map(Cr)),g=new Set(r.map(M=>M.id));for(const[M,C]of c.current)k.has(M)||(clearTimeout(C),c.current.delete(M));for(const M of f.current.keys())g.has(M)||f.current.delete(M);b(r)},[r,b]);const w=p.useRef(null),x=p.useRef(null);w.current=p.useCallback(()=>{a.current||(a.current=!0,y())},[y]),x.current=p.useCallback(()=>{a.current&&(a.current=!1,b(h.current))},[b]);const S=p.useMemo(()=>{for(let k=r.length-1;k>=0;k--)if(!r[k].exiting)return r[k].id},[r]);p.useEffect(()=>{m.current=S,u(S)},[S]);const P=p.useCallback(k=>{let g=f.current.get(k);return g||(g={enter:M=>{u(C=>C===k?C:k),w.current==null||w.current.call(w,M)},leave:M=>{u(C=>C===m.current?C:m.current),x.current==null||x.current.call(x,M)},dismiss:()=>Ps(k)},f.current.set(k,g),g)},[]),j=p.useCallback(k=>{if(n===void 0)return;const g=typeof n=="object"?n:{top:n,right:n,bottom:n,left:n},M={},C=D=>typeof D=="number"?`${D}px`:D;return k.startsWith("top")&&g.top&&(M.top=C(g.top)),k.startsWith("bottom")&&g.bottom&&(M.bottom=C(g.bottom)),k.endsWith("left")&&g.left&&(M.left=C(g.left)),k.endsWith("right")&&g.right&&(M.right=C(g.right)),M},[n]),B=p.useMemo(()=>{const k=new Map;for(const M of r){var g;const C=(g=M.position)!=null?g:e,D=k.get(C);D?D.push(M):k.set(C,[M])}return k},[r,e]);return v.jsxs(v.Fragment,{children:[t,Array.from(B,([k,g])=>{const M=_f(k),C=zf(k);return v.jsx("section",{"data-sileo-viewport":!0,"data-position":k,"data-theme":i?o:void 0,"aria-live":"polite",style:j(k),children:g.map(D=>{var U;const tt=P(D.id);return v.jsx(Nf,{id:D.id,state:D.state,title:D.title,description:D.description,position:M,expand:C,icon:D.icon,fill:(U=D.fill)!=null?U:i?$f[o]:void 0,styles:D.styles,button:D.button,roundness:D.roundness,exiting:D.exiting,autoExpandDelayMs:D.autoExpandDelayMs,autoCollapseDelayMs:D.autoCollapseDelayMs,refreshKey:D.instanceId,canExpand:d===void 0||d===D.id,onMouseEnter:tt.enter,onMouseLeave:tt.leave,onDismiss:tt.dismiss},D.id)})},k)})]})}function Kf(){return p.useEffect(()=>{const t=window.visualViewport;if(!t)return;const e=()=>{if(Math.abs(t.scale-1)>.01)return;document.documentElement.style.setProperty("--mobile-viewport-height",`${t.height}px`),document.documentElement.style.setProperty("--mobile-viewport-top",`${t.offsetTop}px`);const n=document.activeElement,s=n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLElement&&n.isContentEditable;document.documentElement.dataset.mobileKeyboard=String(s&&t.height<document.documentElement.clientHeight-100)};return e(),t.addEventListener("resize",e),t.addEventListener("scroll",e),document.addEventListener("focusin",e),document.addEventListener("focusout",e),()=>{t.removeEventListener("resize",e),t.removeEventListener("scroll",e),document.removeEventListener("focusin",e),document.removeEventListener("focusout",e),delete document.documentElement.dataset.mobileKeyboard}},[]),null}function Yf(){return v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 117.9 128","aria-hidden":"true",children:[v.jsx("path",{fill:"currentColor",d:"m113.9 42.6c-3.7-11.3-10.8-21.2-20.1-28.6-7.4-5.7-16.1-10-25.4-11.5-6.5-0.9-9.4-1.1-15.9-0.3-7.4 0.9-14.3 3.4-20.7 7-15.4 9.1-27.6 26.2-29.8 44.5-0.3 2.9-0.4 5.8-0.2 8.7 0.7 15.5 9.7 33.2 27.2 44.1l3.9 2.2c1.5 1.3 2.9 1.8 5.1 1.3 3.5-0.9 5.1-6.1 0.1-8.6-7.3-3.5-13.7-8.7-18.1-14.6-5-7-9-15.8-9.3-26.9-0.2-10 3.5-21.4 11.6-31.3 4.5-5.2 10.5-9.8 16.4-12.7 10.1-4.9 20.5-6.6 31.2-3.8 13.2 3.5 25.6 13.1 32.3 26.5 2.3 4.9 4.2 10.7 4.9 17.4 0.9 9.9-1.4 19.2-6.9 27.4-4.3 6.5-9.2 11-16.1 15.8l-4.1 2.1c-4.4 2.4-3.2 9.4 2.8 9 1.2 0 2.5-0.8 3.6-1.4 3.9-2 7.5-4.3 10.8-7 9.4-8 17.6-20.3 19.1-36.8 0.6-7.4-0.4-15.6-2.4-22.5z"}),v.jsx("path",{fill:"#2266ea",d:"m88.1 42.8c-3.6 0.3-7.4 2.9-9 7.3-5.5 0.8-14.1 3.6-20.3 12-4.3-6.3-11.6-10.7-19.7-12-1.1-3.8-5-7.5-10.2-7.2-4.1 0.4-8.7 3.8-8.7 9.7 0.2 6 5.7 10.3 11.1 9.3 2.8-0.3 5.2-2 6.6-4.3 6.7 1 14.9 4.7 17.3 14.1v36.7c-3.2 1.5-5.5 4.7-5.5 8.4 0 4.8 3.7 9.3 9.4 9.3s9.5-4.5 9.4-9.1c0.1-3.6-2.3-7.3-5.8-8.7v-36.4c1-5.6 5.9-10.9 13.3-13.3l3.9-1c1.8 2.9 4.9 4.6 8.6 4.5 4.6-0.2 9.3-3.6 9.3-9.5 0-5.6-4.9-10-9.7-9.8z"})]})}function Xf({heading:t,detail:e,busy:n=!0}){return v.jsxs("div",{className:"splash",children:[v.jsx(Yf,{}),v.jsxs("div",{className:"splash-copy",children:[v.jsx("strong",{children:t}),v.jsx("span",{role:"status","aria-live":"polite",children:e??""})]}),n?v.jsx("div",{className:"splash-mark","aria-hidden":"true"}):null]})}function Ea(t){var e,n,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Ea(t[e]))&&(s&&(s+=" "),s+=n)}else for(n in t)t[n]&&(s&&(s+=" "),s+=n);return s}function Ra(){for(var t,e,n=0,s="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Ea(t))&&(s&&(s+=" "),s+=e);return s}const Ar=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Er=Ra,Zf=(t,e)=>n=>{var s;if(e?.variants==null)return Er(t,n?.class,n?.className);const{variants:i,defaultVariants:o}=e,r=Object.keys(i).map(u=>{const a=n?.[u],c=o?.[u];if(a===null)return null;const h=Ar(a)||Ar(c);return i[u][h]}),l=n&&Object.entries(n).reduce((u,a)=>{let[c,h]=a;return h===void 0||(u[c]=h),u},{}),d=e==null||(s=e.compoundVariants)===null||s===void 0?void 0:s.reduce((u,a)=>{let{class:c,className:h,...m}=a;return Object.entries(m).every(f=>{let[y,b]=f;return Array.isArray(b)?b.includes({...o,...l}[y]):{...o,...l}[y]===b})?[...u,c,h]:u},[]);return Er(t,r,d,n?.class,n?.className)},Qf=(t,e)=>{const n=new Array(t.length+e.length);for(let s=0;s<t.length;s++)n[s]=t[s];for(let s=0;s<e.length;s++)n[t.length+s]=e[s];return n},Jf=(t,e)=>({classGroupId:t,validator:e}),Ma=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),yn="-",Rr=[],tp="arbitrary..",ep=t=>{const e=sp(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=t;return{getClassGroupId:r=>{if(r.startsWith("[")&&r.endsWith("]"))return np(r);const l=r.split(yn),d=l[0]===""&&l.length>1?1:0;return Va(l,d,e)},getConflictingClassGroupIds:(r,l)=>{if(l){const d=s[r],u=n[r];return d?u?Qf(u,d):d:u||Rr}return n[r]||Rr}}},Va=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const i=t[e],o=n.nextPart.get(i);if(o){const u=Va(t,e+1,o);if(u)return u}const r=n.validators;if(r===null)return;const l=e===0?t.join(yn):t.slice(e).join(yn),d=r.length;for(let u=0;u<d;u++){const a=r[u];if(a.validator(l))return a.classGroupId}},np=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),s=e.slice(0,n);return s?tp+s:void 0})(),sp=t=>{const{theme:e,classGroups:n}=t;return ip(n,e)},ip=(t,e)=>{const n=Ma();for(const s in t){const i=t[s];Js(i,n,s,e)}return n},Js=(t,e,n,s)=>{const i=t.length;for(let o=0;o<i;o++){const r=t[o];rp(r,e,n,s)}},rp=(t,e,n,s)=>{if(typeof t=="string"){op(t,e,n);return}if(typeof t=="function"){ap(t,e,n,s);return}lp(t,e,n,s)},op=(t,e,n)=>{const s=t===""?e:Da(e,t);s.classGroupId=n},ap=(t,e,n,s)=>{if(cp(t)){Js(t(s),e,n,s);return}e.validators===null&&(e.validators=[]),e.validators.push(Jf(n,t))},lp=(t,e,n,s)=>{const i=Object.entries(t),o=i.length;for(let r=0;r<o;r++){const[l,d]=i[r];Js(d,Da(e,l),n,s)}},Da=(t,e)=>{let n=t;const s=e.split(yn),i=s.length;for(let o=0;o<i;o++){const r=s[o];let l=n.nextPart.get(r);l||(l=Ma(),n.nextPart.set(r,l)),n=l}return n},cp=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,up=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),s=Object.create(null);const i=(o,r)=>{n[o]=r,e++,e>t&&(e=0,s=n,n=Object.create(null))};return{get(o){let r=n[o];if(r!==void 0)return r;if((r=s[o])!==void 0)return i(o,r),r},set(o,r){o in n?n[o]=r:i(o,r)}}},Cs="!",Mr=":",dp=[],Vr=(t,e,n,s,i)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:s,isExternal:i}),hp=t=>{const{prefix:e,experimentalParseClassName:n}=t;let s=i=>{const o=[];let r=0,l=0,d=0,u;const a=i.length;for(let y=0;y<a;y++){const b=i[y];if(r===0&&l===0){if(b===Mr){o.push(i.slice(d,y)),d=y+1;continue}if(b==="/"){u=y;continue}}b==="["?r++:b==="]"?r--:b==="("?l++:b===")"&&l--}const c=o.length===0?i:i.slice(d);let h=c,m=!1;c.endsWith(Cs)?(h=c.slice(0,-1),m=!0):c.startsWith(Cs)&&(h=c.slice(1),m=!0);const f=u&&u>d?u-d:void 0;return Vr(o,m,h,f)};if(e){const i=e+Mr,o=s;s=r=>r.startsWith(i)?o(r.slice(i.length)):Vr(dp,!1,r,void 0,!0)}if(n){const i=s;s=o=>n({className:o,parseClassName:i})}return s},fp=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,s)=>{e.set(n,1e6+s)}),n=>{const s=[];let i=[];for(let o=0;o<n.length;o++){const r=n[o],l=r[0]==="[",d=e.has(r);l||d?(i.length>0&&(i.sort(),s.push(...i),i=[]),s.push(r)):i.push(r)}return i.length>0&&(i.sort(),s.push(...i)),s}},pp=t=>({cache:up(t.cacheSize),parseClassName:hp(t),sortModifiers:fp(t),postfixLookupClassGroupIds:mp(t),...ep(t)}),mp=t=>{const e=Object.create(null),n=t.postfixLookupClassGroups;if(n)for(let s=0;s<n.length;s++)e[n[s]]=!0;return e},gp=/\s+/,yp=(t,e)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:i,sortModifiers:o,postfixLookupClassGroupIds:r}=e,l=[],d=t.trim().split(gp);let u="";for(let a=d.length-1;a>=0;a-=1){const c=d[a],{isExternal:h,modifiers:m,hasImportantModifier:f,baseClassName:y,maybePostfixModifierPosition:b}=n(c);if(h){u=c+(u.length>0?" "+u:u);continue}let w=!!b,x;if(w){const k=y.substring(0,b);x=s(k);const g=x&&r[x]?s(y):void 0;g&&g!==x&&(x=g,w=!1)}else x=s(y);if(!x){if(!w){u=c+(u.length>0?" "+u:u);continue}if(x=s(y),!x){u=c+(u.length>0?" "+u:u);continue}w=!1}const S=m.length===0?"":m.length===1?m[0]:o(m).join(":"),P=f?S+Cs:S,j=P+x;if(l.indexOf(j)>-1)continue;l.push(j);const B=i(x,w);for(let k=0;k<B.length;++k){const g=B[k];l.push(P+g)}u=c+(u.length>0?" "+u:u)}return u},vp=(...t)=>{let e=0,n,s,i="";for(;e<t.length;)(n=t[e++])&&(s=La(n))&&(i&&(i+=" "),i+=s);return i},La=t=>{if(typeof t=="string")return t;let e,n="";for(let s=0;s<t.length;s++)t[s]&&(e=La(t[s]))&&(n&&(n+=" "),n+=e);return n},bp=(t,...e)=>{let n,s,i,o;const r=d=>{const u=e.reduce((a,c)=>c(a),t());return n=pp(u),s=n.cache.get,i=n.cache.set,o=l,l(d)},l=d=>{const u=s(d);if(u)return u;const a=yp(d,n);return i(d,a),a};return o=r,(...d)=>o(vp(...d))},xp=[],X=t=>{const e=n=>n[t]||xp;return e.isThemeGetter=!0,e},ja=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ia=/^\((?:(\w[\w-]*):)?(.+)\)$/i,wp=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Tp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Sp=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,kp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Pp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Cp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Lt=t=>wp.test(t),O=t=>!!t&&!Number.isNaN(Number(t)),St=t=>!!t&&Number.isInteger(Number(t)),Xn=t=>t.endsWith("%")&&O(t.slice(0,-1)),Rt=t=>Tp.test(t),Oa=()=>!0,Ap=t=>Sp.test(t)&&!kp.test(t),ti=()=>!1,Ep=t=>Pp.test(t),Rp=t=>Cp.test(t),Mp=t=>!E(t)&&!R(t),Vp=t=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),Dp=t=>Bt(t,Na,ti),E=t=>ja.test(t),Gt=t=>Bt(t,_a,Ap),Dr=t=>Bt(t,_p,O),Lp=t=>Bt(t,Wa,Oa),jp=t=>Bt(t,za,ti),Lr=t=>Bt(t,Fa,ti),Ip=t=>Bt(t,Ba,Rp),Ke=t=>Bt(t,Ua,Ep),R=t=>Ia.test(t),Te=t=>Zt(t,_a),Op=t=>Zt(t,za),jr=t=>Zt(t,Fa),Fp=t=>Zt(t,Na),Bp=t=>Zt(t,Ba),Ye=t=>Zt(t,Ua,!0),Np=t=>Zt(t,Wa,!0),Bt=(t,e,n)=>{const s=ja.exec(t);return s?s[1]?e(s[1]):n(s[2]):!1},Zt=(t,e,n=!1)=>{const s=Ia.exec(t);return s?s[1]?e(s[1]):n:!1},Fa=t=>t==="position"||t==="percentage",Ba=t=>t==="image"||t==="url",Na=t=>t==="length"||t==="size"||t==="bg-size",_a=t=>t==="length",_p=t=>t==="number",za=t=>t==="family-name",Wa=t=>t==="number"||t==="weight",Ua=t=>t==="shadow",zp=()=>{const t=X("color"),e=X("font"),n=X("text"),s=X("font-weight"),i=X("tracking"),o=X("leading"),r=X("breakpoint"),l=X("container"),d=X("spacing"),u=X("radius"),a=X("shadow"),c=X("inset-shadow"),h=X("text-shadow"),m=X("drop-shadow"),f=X("blur"),y=X("perspective"),b=X("aspect"),w=X("ease"),x=X("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],j=()=>[...P(),R,E],B=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],g=()=>[R,E,d],M=()=>[Lt,"full","auto",...g()],C=()=>[St,"none","subgrid",R,E],D=()=>["auto",{span:["full",St,R,E]},St,R,E],U=()=>[St,"auto",R,E],tt=()=>["auto","min","max","fr",R,E],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...g()],bt=()=>[Lt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...g()],W=()=>[Lt,"screen","full","dvw","lvw","svw","min","max","fit",...g()],Q=()=>[Lt,"screen","full","lh","dvh","lvh","svh","min","max","fit",...g()],A=()=>[t,R,E],dt=()=>[...P(),jr,Lr,{position:[R,E]}],Qt=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Oe=()=>["auto","cover","contain",Fp,Dp,{size:[R,E]}],Jt=()=>[Xn,Te,Gt],et=()=>["","none","full",u,R,E],J=()=>["",O,Te,Gt],at=()=>["solid","dashed","dotted","double"],me=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>[O,Xn,jr,Lr],ge=()=>["","none",f,R,E],xt=()=>["none",O,R,E],Vt=()=>["none",O,R,E],Et=()=>[O,R,E],Nt=()=>[Lt,"full",...g()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Rt],breakpoint:[Rt],color:[Oa],container:[Rt],"drop-shadow":[Rt],ease:["in","out","in-out"],font:[Mp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Rt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Rt],shadow:[Rt],spacing:["px",O],text:[Rt],"text-shadow":[Rt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Lt,E,R,b]}],container:["container"],"container-type":[{"@container":["","normal","size",R,E]}],"container-named":[Vp],columns:[{columns:[O,E,R,l]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:j()}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{"inset-s":M(),start:M()}],end:[{"inset-e":M(),end:M()}],"inset-bs":[{"inset-bs":M()}],"inset-be":[{"inset-be":M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[St,"auto",R,E]}],basis:[{basis:[Lt,"full","auto",l,...g()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[O,Lt,"auto","initial","none",E]}],grow:[{grow:["",O,R,E]}],shrink:[{shrink:["",O,R,E]}],order:[{order:[St,"first","last","none",R,E]}],"grid-cols":[{"grid-cols":C()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":C()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":tt()}],"auto-rows":[{"auto-rows":tt()}],gap:[{gap:g()}],"gap-x":[{"gap-x":g()}],"gap-y":[{"gap-y":g()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:g()}],px:[{px:g()}],py:[{py:g()}],ps:[{ps:g()}],pe:[{pe:g()}],pbs:[{pbs:g()}],pbe:[{pbe:g()}],pt:[{pt:g()}],pr:[{pr:g()}],pb:[{pb:g()}],pl:[{pl:g()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mbs:[{mbs:N()}],mbe:[{mbe:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":g()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":g()}],"space-y-reverse":["space-y-reverse"],size:[{size:bt()}],"inline-size":[{inline:["auto",...W()]}],"min-inline-size":[{"min-inline":["auto",...W()]}],"max-inline-size":[{"max-inline":["none",...W()]}],"block-size":[{block:["auto",...Q()]}],"min-block-size":[{"min-block":["auto",...Q()]}],"max-block-size":[{"max-block":["none",...Q()]}],w:[{w:[l,"screen",...bt()]}],"min-w":[{"min-w":[l,"screen","none",...bt()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[r]},...bt()]}],h:[{h:["screen","lh",...bt()]}],"min-h":[{"min-h":["screen","lh","none",...bt()]}],"max-h":[{"max-h":["screen","lh",...bt()]}],"font-size":[{text:["base",n,Te,Gt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,Np,Lp]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Xn,E]}],"font-family":[{font:[Op,jp,e]}],"font-features":[{"font-features":[E]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,R,E]}],"line-clamp":[{"line-clamp":[O,"none",R,Dr]}],leading:[{leading:[o,...g()]}],"list-image":[{"list-image":["none",R,E]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",R,E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...at(),"wavy"]}],"text-decoration-thickness":[{decoration:[O,"from-font","auto",R,Gt]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[O,"auto",R,E]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:g()}],"tab-size":[{tab:[St,R,E]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",R,E]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",R,E]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:dt()}],"bg-repeat":[{bg:Qt()}],"bg-size":[{bg:Oe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},St,R,E],radial:["",R,E],conic:[St,R,E]},Bp,Ip]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:Jt()}],"gradient-via-pos":[{via:Jt()}],"gradient-to-pos":[{to:Jt()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:et()}],"rounded-s":[{"rounded-s":et()}],"rounded-e":[{"rounded-e":et()}],"rounded-t":[{"rounded-t":et()}],"rounded-r":[{"rounded-r":et()}],"rounded-b":[{"rounded-b":et()}],"rounded-l":[{"rounded-l":et()}],"rounded-ss":[{"rounded-ss":et()}],"rounded-se":[{"rounded-se":et()}],"rounded-ee":[{"rounded-ee":et()}],"rounded-es":[{"rounded-es":et()}],"rounded-tl":[{"rounded-tl":et()}],"rounded-tr":[{"rounded-tr":et()}],"rounded-br":[{"rounded-br":et()}],"rounded-bl":[{"rounded-bl":et()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-bs":[{"border-bs":J()}],"border-w-be":[{"border-be":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...at(),"hidden","none"]}],"divide-style":[{divide:[...at(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...at(),"none","hidden"]}],"outline-offset":[{"outline-offset":[O,R,E]}],"outline-w":[{outline:["",O,Te,Gt]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",a,Ye,Ke]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",c,Ye,Ke]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[O,Gt]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",h,Ye,Ke]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[O,R,E]}],"mix-blend":[{"mix-blend":[...me(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":me()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[O]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[R,E]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":P()}],"mask-image-conic-pos":[{"mask-conic":[O]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:dt()}],"mask-repeat":[{mask:Qt()}],"mask-size":[{mask:Oe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",R,E]}],filter:[{filter:["","none",R,E]}],blur:[{blur:ge()}],brightness:[{brightness:[O,R,E]}],contrast:[{contrast:[O,R,E]}],"drop-shadow":[{"drop-shadow":["","none",m,Ye,Ke]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",O,R,E]}],"hue-rotate":[{"hue-rotate":[O,R,E]}],invert:[{invert:["",O,R,E]}],saturate:[{saturate:[O,R,E]}],sepia:[{sepia:["",O,R,E]}],"backdrop-filter":[{"backdrop-filter":["","none",R,E]}],"backdrop-blur":[{"backdrop-blur":ge()}],"backdrop-brightness":[{"backdrop-brightness":[O,R,E]}],"backdrop-contrast":[{"backdrop-contrast":[O,R,E]}],"backdrop-grayscale":[{"backdrop-grayscale":["",O,R,E]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[O,R,E]}],"backdrop-invert":[{"backdrop-invert":["",O,R,E]}],"backdrop-opacity":[{"backdrop-opacity":[O,R,E]}],"backdrop-saturate":[{"backdrop-saturate":[O,R,E]}],"backdrop-sepia":[{"backdrop-sepia":["",O,R,E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":g()}],"border-spacing-x":[{"border-spacing-x":g()}],"border-spacing-y":[{"border-spacing-y":g()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",R,E]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[O,"initial",R,E]}],ease:[{ease:["linear","initial",w,R,E]}],delay:[{delay:[O,R,E]}],animate:[{animate:["none",x,R,E]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,R,E]}],"perspective-origin":[{"perspective-origin":j()}],rotate:[{rotate:xt()}],"rotate-x":[{"rotate-x":xt()}],"rotate-y":[{"rotate-y":xt()}],"rotate-z":[{"rotate-z":xt()}],scale:[{scale:Vt()}],"scale-x":[{"scale-x":Vt()}],"scale-y":[{"scale-y":Vt()}],"scale-z":[{"scale-z":Vt()}],"scale-3d":["scale-3d"],skew:[{skew:Et()}],"skew-x":[{"skew-x":Et()}],"skew-y":[{"skew-y":Et()}],transform:[{transform:[R,E,"","none","gpu","cpu"]}],"transform-origin":[{origin:j()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Nt()}],"translate-x":[{"translate-x":Nt()}],"translate-y":[{"translate-y":Nt()}],"translate-z":[{"translate-z":Nt()}],"translate-none":["translate-none"],zoom:[{zoom:[St,R,E]}],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",R,E]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":A()}],"scrollbar-track-color":[{"scrollbar-track":A()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":g()}],"scroll-mx":[{"scroll-mx":g()}],"scroll-my":[{"scroll-my":g()}],"scroll-ms":[{"scroll-ms":g()}],"scroll-me":[{"scroll-me":g()}],"scroll-mbs":[{"scroll-mbs":g()}],"scroll-mbe":[{"scroll-mbe":g()}],"scroll-mt":[{"scroll-mt":g()}],"scroll-mr":[{"scroll-mr":g()}],"scroll-mb":[{"scroll-mb":g()}],"scroll-ml":[{"scroll-ml":g()}],"scroll-p":[{"scroll-p":g()}],"scroll-px":[{"scroll-px":g()}],"scroll-py":[{"scroll-py":g()}],"scroll-ps":[{"scroll-ps":g()}],"scroll-pe":[{"scroll-pe":g()}],"scroll-pbs":[{"scroll-pbs":g()}],"scroll-pbe":[{"scroll-pbe":g()}],"scroll-pt":[{"scroll-pt":g()}],"scroll-pr":[{"scroll-pr":g()}],"scroll-pb":[{"scroll-pb":g()}],"scroll-pl":[{"scroll-pl":g()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",R,E]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[O,Te,Gt,Dr]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Wp=bp(zp);function Ga(...t){return Wp(Ra(t))}const Up=Zf("group/button inline-flex cursor-pointer shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-semibold whitespace-nowrap transition-[background-color,border-color,color,box-shadow,opacity,transform] duration-150 outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/25 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-45 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm shadow-primary/15 hover:bg-primary/90 hover:shadow-md hover:shadow-primary/20",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-transparent dark:hover:bg-input/30",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 gap-1.5 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5",xs:"h-6 gap-1 px-2.5 text-xs has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",lg:"h-10 gap-1.5 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-9","icon-xs":"size-6 [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Gp({className:t,variant:e="default",size:n="default",...s}){return v.jsx(dl,{"data-slot":"button","data-size":n,className:Ga(Up({variant:e,size:n,className:t})),...s})}var $p={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};const Hp=(t,e,n,s)=>{const i=p.forwardRef(({color:o="currentColor",size:r=24,stroke:l=2,title:d,className:u,children:a,...c},h)=>p.createElement("svg",{ref:h,...$p[t],width:r,height:r,className:["tabler-icon",`tabler-icon-${e}`,u].join(" "),...t==="filled"?{fill:o}:{strokeWidth:l,stroke:o},...c},[d&&p.createElement("title",{key:"svg-title"},d),...s.map(([m,f])=>p.createElement(m,f)),...Array.isArray(a)?a:[a]]));return i.displayName=`${n}`,i};const qp=[["path",{d:"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]],Kp=Hp("outline","copy","Copy",qp),Yp=new Set(["https:","http:","mailto:"]);function Xp(t){const e=t.startsWith("//")?`https:${t}`:t;let n;try{n=new URL(e)}catch{return null}return Yp.has(n.protocol)?n.toString():null}let ae=null;async function jm(){if(!navigator.clipboard?.readText)throw new Error("Text clipboard access is unavailable.");return navigator.clipboard.readText()}async function Zp(t){if(!navigator.clipboard?.writeText)throw new Error("Text clipboard access is unavailable.");await navigator.clipboard.writeText(t),ae=null}async function Im(t,e){if(!navigator.clipboard?.writeText)throw new Error("Text clipboard access is unavailable.");await navigator.clipboard.writeText(t.join(`\r
47
- `)),ae=e?{paths:[...t],transferId:e}:null}function Om(t){return!ae||!Qp(ae.paths,t)?(ae=null,null):ae.transferId}function Fm(t){const e=Xp(t);if(!e)throw new Error("Only web or mail links can be opened.");window.open(e,"_blank","noopener,noreferrer")}function Qp(t,e){return t.length===e.length&&t.every((n,s)=>n===e[s])}const Jp=600;function Bm({delay:t=Jp,...e}){return v.jsx(hl,{"data-slot":"tooltip-provider",delay:t,...e})}function tm({...t}){return v.jsx(fl,{"data-slot":"tooltip",...t})}function em({...t}){return v.jsx(pl,{"data-slot":"tooltip-trigger",...t})}function nm({className:t,side:e="top",sideOffset:n=4,align:s="center",alignOffset:i=0,anchor:o,children:r,...l}){return v.jsx(ml,{children:v.jsx(gl,{align:s,alignOffset:i,anchor:o,side:e,sideOffset:n,className:"isolate z-50",children:v.jsxs(yl,{"data-slot":"tooltip-content",className:Ga("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-xl bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-lg data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...l,children:[r,v.jsx(vl,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:translate-x-[1.5px] data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:translate-x-[-1.5px] data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:translate-x-[-1.5px] data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:translate-x-[1.5px] data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}function sm({value:t,label:e="Copy",onCopied:n,onError:s}){const[i,o]=p.useState(!1);p.useEffect(()=>{if(!i)return;const l=window.setTimeout(()=>o(!1),2e3);return()=>window.clearTimeout(l)},[i]);const r=async()=>{try{await Zp(t),o(!0),n?.()}catch{o(!1),s?.()}};return v.jsxs(v.Fragment,{children:[v.jsxs(tm,{children:[v.jsxs(em,{render:v.jsx("button",{type:"button",className:"copy-button","aria-label":i?"Copied":e,"data-copy-state":i?"copied":void 0,onClick:()=>{r()}}),children:[v.jsx(Kp,{className:"copy-button-icon","aria-hidden":"true"}),v.jsx("span",{className:"copy-button-check","aria-hidden":"true",children:"✓"})]}),v.jsx(nm,{children:i?"Copied":e})]}),v.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:i?"Copied":""})]})}const $a=document.documentElement.dataset.opentigProfile==="dev",Nm=$a?"OpenTig Dev":"OpenTig";function im(){const t=$a?"npm run pair:web:dev":"opentig pair",[e,n]=p.useState(!1);return v.jsxs("div",{className:"mt-3",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("code",{className:"min-w-0 select-text break-words text-sm",children:t}),v.jsx(sm,{value:t,label:"Copy command",onCopied:()=>n(!1),onError:()=>n(!0)})]}),e&&v.jsx("p",{className:"mt-2 text-sm text-destructive",role:"alert",children:"Could not copy. Select and copy the command manually."})]})}const rm=3600*1e3,om=60*1e3,am=10*1e3;function lm({request:t=fetch,page:e=document,lifecycle:n=window}={}){let s=!1,i=null,o,r;const l=()=>{s||(o=setTimeout(()=>{d()},om))},d=async()=>{if(s||i||e.visibilityState!=="visible")return;clearTimeout(o);const c=new AbortController;i=c,r=setTimeout(()=>c.abort(),am);try{const h=await t("/api/auth/renew",{method:"POST",credentials:"include",cache:"no-store",signal:c.signal});!h.ok&&h.status!==401&&h.status!==403&&l()}catch{l()}finally{clearTimeout(r),i=null}},u=()=>{d()},a=setInterval(u,rm);return e.addEventListener("visibilitychange",u),n.addEventListener("focus",u),n.addEventListener("online",u),u(),()=>{s=!0,clearInterval(a),clearTimeout(o),clearTimeout(r),i?.abort(),e.removeEventListener("visibilitychange",u),n.removeEventListener("focus",u),n.removeEventListener("online",u)}}const T={bootstrap:"app:bootstrap",capabilities:"app:capabilities",preferences:"app:preferences",filesTreeStateUpdate:"app:files-tree-state",openFilesStateUpdate:"app:open-files-state",projectCreate:"projects:create",projectRename:"projects:rename",projectRemove:"projects:remove",projectAssign:"projects:assign",repositoryOpenPath:"repository:open-path",repositoryBrowseDirectories:"repository:browse-directories",repositoryOpenRecent:"repository:open-recent",repositoryRelocateRecent:"repository:relocate-recent",repositoryForget:"repository:forget",repositoryStatus:"repository:status",repositoryFiles:"repository:files",repositoryDirectoryEntries:"repository:directory-entries",repositoryReadFile:"repository:read-file",repositoryGetFavicon:"repository:favicon",repositoryWriteFile:"repository:write-file",repositoryAbsolutePath:"repository:absolute-path",repositoryCopyEntries:"repository:copy-entries",repositoryCutEntries:"repository:cut-entries",repositoryPasteEntries:"repository:paste-entries",repositoryMoveEntry:"repository:move-entry",repositoryDeleteEntry:"repository:delete-entry",repositoryMoveEntries:"repository:move-entries",repositoryDeleteEntries:"repository:delete-entries",repositoryRenameEntry:"repository:rename-entry",repositoryCreateEntry:"repository:create-entry",repositoryFileHistoryState:"repository:file-history-state",repositoryUndoFileOperation:"repository:undo-file-operation",repositoryRedoFileOperation:"repository:redo-file-operation",repositorySearch:"repository:search",repositoryReplaceSearch:"repository:replace-search",diffGet:"diff:get",diffCommit:"diff:commit",diffCommitFile:"diff:commit-file",indexStage:"index:stage",indexUnstage:"index:unstage",indexDiscard:"index:discard",indexStageAll:"index:stage-all",indexUnstageAll:"index:unstage-all",indexPrepareCommitGroup:"index:prepare-commit-group",indexUpdateConflict:"index:update-conflict",indexResolveConflict:"index:resolve-conflict",commitCreate:"commit:create",commitUndoLatest:"commit:undo-latest",commitsList:"commits:list",commitsFiles:"commits:files",commitAuthorship:"commits:authorship",commitSetAuthorship:"commits:set-authorship",branchesList:"refs:branches",branchSwitch:"refs:switch",worktreesList:"refs:worktrees",worktreeSelect:"refs:select-worktree",refsPull:"refs:pull",refsPush:"refs:push",refsFetch:"refs:fetch",localRefsSnapshot:"refs:local-snapshot",branchDetails:"refs:branch-details",worktreeDetails:"refs:worktree-details",branchDelete:"refs:delete-branch",worktreeRemove:"refs:remove-worktree",remoteBranchDetails:"refs:remote-branch-details",trackingBranchCreate:"refs:create-tracking-branch",remoteBranchDelete:"refs:delete-remote-branch",branchesFetch:"refs:fetch-branches",aiStatuses:"ai:statuses",aiGenerateCommitMessage:"ai:generate-commit-message",aiCancelGeneration:"ai:cancel-generation",aiLog:"ai:log",aiClearLog:"ai:clear-log",diagnosticsList:"diagnostics:list",diagnosticsClear:"diagnostics:clear",diagnosticsRecord:"diagnostics:record",githubAccountsStatus:"github:accounts-status",githubRepositoryAccount:"github:repository-account",githubSetRepositoryAccount:"github:set-repository-account",githubStatus:"github:status",githubRepositoryInfo:"github:repository-info",githubPrForBranch:"github:pr-for-branch",githubPrList:"github:pr-list",githubPrView:"github:pr-view",githubPrStack:"github:pr-stack",githubPrDiff:"github:pr-diff",githubPrCommitDiff:"github:pr-commit-diff",githubPrCreate:"github:pr-create",githubPrDraft:"github:pr-draft",githubPrDraftCancel:"github:pr-draft-cancel"},cm=9*6e4,um=cm+3e4,Ir=um+3e4,dm=4,hm={protocolVersion:dm},fm=hm.protocolVersion,Zn=1;class Sn extends Error{}class ne extends Sn{}class Or extends Sn{}class Qn extends Sn{}class Fr extends Sn{}class pm{url;createSocket;requestTimeoutMs;heartbeatMs;reconnectBaseMs;reconnectMaxMs;offlineAfterAttempts;random;pending=new Map;connectionWaiters=new Set;stateListeners=new Set;eventListeners=new Set;reconnectListeners=new Set;socket=null;state="connecting";requestSequence=0;socketGeneration=0;reconnectAttempts=0;reconnectTimer=null;heartbeatTimer=null;awaitingPong=!1;started=!1;stopped=!1;connectedBefore=!1;constructor(e={}){this.url=e.url??gm(),this.createSocket=e.createSocket??(n=>new WebSocket(n)),this.requestTimeoutMs=e.requestTimeoutMs??3e4,this.heartbeatMs=e.heartbeatMs??2e4,this.reconnectBaseMs=e.reconnectBaseMs??250,this.reconnectMaxMs=e.reconnectMaxMs??5e3,this.offlineAfterAttempts=e.offlineAfterAttempts??5,this.random=e.random??Math.random}getState=()=>this.state;subscribeState=e=>(this.stateListeners.add(e),this.start(),()=>this.stateListeners.delete(e));onEvent(e){return this.eventListeners.add(e),this.start(),()=>this.eventListeners.delete(e)}onReconnect(e){return this.reconnectListeners.add(e),()=>this.reconnectListeners.delete(e)}async request(e,n,s={}){const i=s.timeoutMs??this.requestTimeoutMs,o=Date.now();if(this.start(),await this.waitForConnection(i,s.signal),s.signal?.aborted)throw Xe();const r=this.socket;if(!r||r.readyState!==Zn)throw new ne("OpenTig server disconnected.");const l=`${Date.now().toString(36)}-${(++this.requestSequence).toString(36)}`,d=Math.max(1,i-(Date.now()-o));return new Promise((u,a)=>{const c={resolve:u,reject:a,timer:setTimeout(()=>{this.finishPending(l),a(new Fr(`Server request timed out: ${String(e)}`))},d),...s.signal?{signal:s.signal}:{}};s.signal&&(c.abort=()=>{this.finishPending(l),a(Xe())},s.signal.addEventListener("abort",c.abort,{once:!0})),this.pending.set(l,c);try{const h=[...n];for(;h.length>0&&h.at(-1)===void 0;)h.pop();r.send(JSON.stringify({type:"request",id:l,command:e,args:h}))}catch{this.finishPending(l),a(new ne("Could not send request to the OpenTig server."))}})}markIncompatible(){this.stopped=!0,this.clearReconnect(),this.setState("incompatible-version"),this.rejectConnectionWaiters(new Qn("OpenTig server protocol is incompatible.")),this.rejectPending(new Qn("OpenTig server protocol is incompatible.")),this.socket?.close(1e3,"Incompatible protocol")}close(){this.stopped=!0,this.clearReconnect(),this.clearHeartbeat(),this.rejectConnectionWaiters(new ne("OpenTig server connection closed.")),this.rejectPending(new ne("OpenTig server connection closed.")),this.socket?.close(1e3,"Client closing"),this.socket=null}start(){this.started||this.stopped||(this.started=!0,this.connect())}connect(){if(this.stopped)return;this.clearReconnect();const e=++this.socketGeneration;let n;try{n=this.createSocket(this.url)}catch{this.disconnected(e,0);return}this.socket=n,n.onopen=()=>{if(e!==this.socketGeneration||this.stopped)return;const s=this.connectedBefore;if(this.connectedBefore=!0,this.reconnectAttempts=0,this.setState("connected"),this.resolveConnectionWaiters(),this.startHeartbeat(),s)for(const i of this.reconnectListeners)Promise.resolve(i()).catch(()=>{})},n.onmessage=s=>this.message(e,s.data),n.onerror=()=>{},n.onclose=s=>this.disconnected(e,s.code)}message(e,n){if(e!==this.socketGeneration||typeof n!="string")return;let s;try{s=JSON.parse(n)}catch{return}if(s.type==="pong"){this.awaitingPong=!1;return}if(s.type==="event"){for(const o of this.eventListeners)o(s.event);return}if(s.type!=="result")return;const i=this.pending.get(s.id);i&&(this.finishPending(s.id),mm(i,s.result))}disconnected(e,n){if(e!==this.socketGeneration)return;this.socket=null,this.clearHeartbeat();const s=n===1008?new Or("Authentication required."):new ne("OpenTig server disconnected before the request completed.");if(this.rejectPending(s),this.stopped)return;if(n===1008){this.stopped=!0,this.setState("auth-required"),this.rejectConnectionWaiters(s);return}this.reconnectAttempts+=1,this.setState(this.reconnectAttempts>=this.offlineAfterAttempts?"offline":"reconnecting");const i=Math.min(this.reconnectMaxMs,this.reconnectBaseMs*2**(this.reconnectAttempts-1)),o=Math.max(0,Math.round(i*(.5+this.random())));this.reconnectTimer=setTimeout(()=>this.connect(),o)}waitForConnection(e,n){return this.state==="connected"&&this.socket?.readyState===Zn?Promise.resolve():this.state==="auth-required"?Promise.reject(new Or("Authentication required.")):this.state==="incompatible-version"?Promise.reject(new Qn("OpenTig server protocol is incompatible.")):this.stopped?Promise.reject(new ne("OpenTig server connection is closed.")):n?.aborted?Promise.reject(Xe()):new Promise((s,i)=>{const o={resolve:s,reject:i,timer:setTimeout(()=>{this.removeConnectionWaiter(o),i(new Fr("Timed out waiting for the OpenTig server."))},e),...n?{signal:n}:{}};n&&(o.abort=()=>{this.removeConnectionWaiter(o),i(Xe())},n.addEventListener("abort",o.abort,{once:!0})),this.connectionWaiters.add(o)})}resolveConnectionWaiters(){for(const e of[...this.connectionWaiters])this.removeConnectionWaiter(e),e.resolve()}rejectConnectionWaiters(e){for(const n of[...this.connectionWaiters])this.removeConnectionWaiter(n),n.reject(e)}removeConnectionWaiter(e){clearTimeout(e.timer),e.signal&&e.abort&&e.signal.removeEventListener("abort",e.abort),this.connectionWaiters.delete(e)}finishPending(e){const n=this.pending.get(e);n&&(clearTimeout(n.timer),n.signal&&n.abort&&n.signal.removeEventListener("abort",n.abort),this.pending.delete(e))}rejectPending(e){for(const[n,s]of[...this.pending])this.finishPending(n),s.reject(e)}startHeartbeat(){this.clearHeartbeat(),this.heartbeatTimer=setInterval(()=>{const e=this.socket;if(!(!e||e.readyState!==Zn)){if(this.awaitingPong){e.close(4e3,"Heartbeat timeout");return}this.awaitingPong=!0,e.send(JSON.stringify({type:"ping"}))}},this.heartbeatMs)}clearHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=null,this.awaitingPong=!1}clearReconnect(){this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=null}setState(e){if(this.state!==e){this.state=e;for(const n of this.stateListeners)n()}}}function mm(t,e){if(e.ok){t.resolve(e.value);return}const n=new Error(e.error.message);n.detail=e.error,t.reject(n)}function gm(){const t=new URL("/ws",window.location.href);return t.protocol=t.protocol==="https:"?"wss:":"ws:",t.href}function Xe(){return new DOMException("The request was cancelled.","AbortError")}function ym(t={}){const e=t.transport??new pm,n=t.httpOrigin??globalThis.location?.origin??"http://127.0.0.1",s=t.fetch??fetch,i=new Set,o=new Set,r=new Set,l=(a,...c)=>e.request(a,c),u={app:{bootstrap:async()=>{const a=await e.request(T.bootstrap,[]);if(!a.server||a.server.protocolVersion!==fm)throw e.markIncompatible(),new Error("This OpenTig client is incompatible with the server.");return a},capabilities:()=>l(T.capabilities),setPreferences:a=>l(T.preferences,a),setFilesTreeExpandedPaths:(a,c)=>l(T.filesTreeStateUpdate,a,c),setOpenFilesState:(a,c,h,m)=>l(T.openFilesStateUpdate,a,c,h,m)},projects:{create:a=>l(T.projectCreate,a),rename:(a,c)=>l(T.projectRename,a,c),remove:a=>l(T.projectRemove,a),assign:(a,c)=>l(T.projectAssign,a,c)},repository:{openPath:a=>l(T.repositoryOpenPath,a),browseDirectories:a=>a===void 0?l(T.repositoryBrowseDirectories):l(T.repositoryBrowseDirectories,a),openRecent:a=>l(T.repositoryOpenRecent,a),forget:a=>l(T.repositoryForget,a),relocateRecent:(a,c)=>l(T.repositoryRelocateRecent,a,c),getStatus:(a,c)=>l(T.repositoryStatus,a,c),getFiles:a=>l(T.repositoryFiles,a),getDirectoryEntries:(a,c)=>l(T.repositoryDirectoryEntries,a,c),readFile:(a,c,h)=>l(T.repositoryReadFile,a,c,h),readImage:(a,c)=>bm(s,n,a,c),getFavicon:a=>l(T.repositoryGetFavicon,a),writeFile:(a,c,h,m)=>l(T.repositoryWriteFile,a,c,h,m),getAbsolutePath:(a,c)=>l(T.repositoryAbsolutePath,a,c),copyEntries:(a,c)=>l(T.repositoryCopyEntries,a,c),cutEntries:(a,c)=>l(T.repositoryCutEntries,a,c),pasteEntries:(a,c,h,m,f)=>l(T.repositoryPasteEntries,a,c,h,m,f),moveEntry:(a,c,h)=>l(T.repositoryMoveEntry,a,c,h),moveEntries:(a,c,h)=>l(T.repositoryMoveEntries,a,c,h),deleteEntry:(a,c)=>l(T.repositoryDeleteEntry,a,c),deleteEntries:(a,c)=>l(T.repositoryDeleteEntries,a,c),renameEntry:(a,c,h)=>l(T.repositoryRenameEntry,a,c,h),createEntry:(a,c,h,m)=>l(T.repositoryCreateEntry,a,c,h,m),search:(a,c)=>l(T.repositorySearch,a,c),replaceSearch:(a,c)=>l(T.repositoryReplaceSearch,a,c),fileHistoryState:a=>l(T.repositoryFileHistoryState,a),undoFileOperation:a=>l(T.repositoryUndoFileOperation,a),redoFileOperation:a=>l(T.repositoryRedoFileOperation,a)},diff:{get:a=>l(T.diffGet,a),getCommit:(a,c)=>l(T.diffCommit,a,c),getCommitFile:(a,c,h,m)=>l(T.diffCommitFile,a,c,h,m)},index:{stage:(a,c)=>l(T.indexStage,a,c),unstage:(a,c)=>l(T.indexUnstage,a,c),discard:(a,c)=>l(T.indexDiscard,a,c),stageAll:a=>l(T.indexStageAll,a),unstageAll:a=>l(T.indexUnstageAll,a),prepareCommitGroup:a=>l(T.indexPrepareCommitGroup,a),updateConflict:(a,c,h)=>l(T.indexUpdateConflict,a,c,h),resolveConflict:(a,c,h)=>l(T.indexResolveConflict,a,c,h)},commits:{authorship:a=>l(T.commitAuthorship,a),setAuthorship:(a,c)=>l(T.commitSetAuthorship,a,c),create:(a,c)=>l(T.commitCreate,a,c),undoLatest:(a,c)=>l(T.commitUndoLatest,a,c),list:(a,c)=>l(T.commitsList,a,c),files:(a,c)=>l(T.commitsFiles,a,c)},refs:{listBranches:a=>l(T.branchesList,a),switchBranch:(a,c,h)=>l(T.branchSwitch,a,c,h),listWorktrees:a=>l(T.worktreesList,a),selectWorktree:(a,c)=>l(T.worktreeSelect,a,c),pull:a=>l(T.refsPull,a),push:(a,c)=>l(T.refsPush,a,c),fetch:a=>l(T.refsFetch,a),localRefsSnapshot:a=>l(T.localRefsSnapshot,a),branchDetails:a=>l(T.branchDetails,a),remoteBranchDetails:a=>l(T.remoteBranchDetails,a),createTrackingBranch:a=>l(T.trackingBranchCreate,a),deleteRemoteBranch:a=>l(T.remoteBranchDelete,a),fetchBranches:a=>l(T.branchesFetch,a),worktreeDetails:a=>l(T.worktreeDetails,a),deleteBranch:a=>l(T.branchDelete,a),removeWorktree:a=>l(T.worktreeRemove,a)},ai:{statuses:a=>l(T.aiStatuses,a),generateCommitMessage:a=>e.request(T.aiGenerateCommitMessage,[a],{timeoutMs:Ir}),cancelGeneration:a=>l(T.aiCancelGeneration,a),log:()=>l(T.aiLog),clearLog:()=>l(T.aiClearLog)},github:{accountsStatus:a=>e.request(T.githubAccountsStatus,[a],{timeoutMs:9e4}),repositoryAccount:(a,c)=>e.request(T.githubRepositoryAccount,[a,c],{timeoutMs:6e4}),setRepositoryAccount:(a,c)=>l(T.githubSetRepositoryAccount,a,c),status:a=>l(T.githubStatus,a),repositoryInfo:a=>l(T.githubRepositoryInfo,a),findPullRequestForBranch:(a,c)=>l(T.githubPrForBranch,a,c),listPullRequests:(a,c)=>l(T.githubPrList,a,c),getPullRequest:(a,c)=>l(T.githubPrView,a,c),getPullRequestStack:(a,c)=>l(T.githubPrStack,a,c),getPullRequestDiff:(a,c)=>l(T.githubPrDiff,a,c),getPullRequestCommitDiff:(a,c)=>l(T.githubPrCommitDiff,a,c),createPullRequest:a=>l(T.githubPrCreate,a),generateDraft:a=>e.request(T.githubPrDraft,[a],{timeoutMs:Ir}),cancelDraft:a=>l(T.githubPrDraftCancel,a)},diagnostics:{list:()=>l(T.diagnosticsList),clear:()=>l(T.diagnosticsClear),record:a=>l(T.diagnosticsRecord,a)},events:{onGitHubAccountsChanged:a=>Jn(o,a),onRepositoryChanged:a=>Jn(i,a),onActiveRepositoryChanged:a=>Jn(r,a)}};return e.onEvent(a=>vm(a,i,r,o)),e.onReconnect(async()=>{const a=await u.app.bootstrap();for(const c of o)c();if(a.activeRepository){for(const c of r)c(a.activeRepository);for(const c of i)c(a.activeRepository.id,"unknown")}}),{api:u,transport:e}}function Jn(t,e){return t.add(e),()=>t.delete(e)}function vm(t,e,n,s){if(t.type==="repository.changed")for(const i of e)i(t.repositoryId,t.scope);else if(t.type==="repository.active-changed")for(const i of n)i(t.repository);else for(const i of s)i()}async function bm(t,e,n,s){const i=s.split("/").map(encodeURIComponent).join("/"),o=new URL(`/api/image/${encodeURIComponent(n)}/${i}`,e),r=await t(o,{credentials:"include"});if(r.status===413||r.status===415)return r.json();if(!r.ok)throw new Error(r.status===401?"Authentication required.":"Could not load image preview.");const l=r.headers.get("content-type");if(!l?.startsWith("image/"))throw new Error("Server returned an invalid image preview.");const d=new Uint8Array(await r.arrayBuffer());return{status:"ready",path:s,mimeType:l,data:d,size:Number(r.headers.get("content-length")??d.byteLength),mtimeMs:Number(r.headers.get("x-opentig-mtime-ms")??0)}}const on=ym(),st=window.opentigDesktop,$t=on.api,_m={...$t,app:{...$t.app,bootstrap:async()=>{const t=await $t.app.bootstrap();return await st?.app.preferencesChanged(t.preferences),t},capabilities:async()=>{const t=await $t.app.capabilities();return{...t,runtimeMode:st?"desktop":t.runtimeMode,nativePicker:!!st,fileClipboard:!!st,revealInFileManager:!!st}},setPreferences:async t=>{const e=await $t.app.setPreferences(t);return await st?.app.preferencesChanged(e),e},setZoomFactor:t=>{st?st.app.setZoomFactor(t):document.documentElement.style.zoom=String(Math.max(.8,Math.min(1.3,Number(t)||1)))},setTitleBarTheme:t=>st?.app.setTitleBarTheme(t)??Promise.resolve()},clipboard:{readFilePaths:()=>st?.clipboard.readFilePaths()??Promise.resolve([]),readImagePng:()=>st?.clipboard.readImagePng()??Promise.resolve(null)},repository:{...$t.repository,select:async t=>st?st.repository.select(t):window.prompt(t??"Repository path on the OpenTig server")?.trim()||null,selectRelocation:async(t,e)=>st?st.repository.selectRelocation(t,e):window.prompt(`New server path for ${t}`,e)?.trim()||null,revealEntry:async(t,e)=>{if(!st)throw new Error("Reveal in file manager is available only in the desktop app.");const n=await $t.repository.getAbsolutePath(t,e);await st.repository.revealEntry(n)}}},xm={connecting:"Connecting to OpenTig server…",connected:"Server connected",reconnecting:"Reconnecting to OpenTig server…","auth-required":"Authentication required","incompatible-version":"Client and server versions are incompatible",offline:"OpenTig server is offline"};let wm=0;function Tm({children:t}){const e=p.useSyncExternalStore(on.transport.subscribeState,on.transport.getState,on.transport.getState),[n,s]=p.useState(!1),i=p.useRef(null);if(p.useEffect(()=>{if(e==="connected"&&!window.opentigDesktop)return lm()},[e]),p.useEffect(()=>{if(n&&e!=="connected"&&e!=="auth-required"){const o={id:i.current??`server-connection:${++wm}`,title:xm[e],type:e==="connecting"||e==="reconnecting"?"warning":"error",position:"bottom-right",duration:null,autopilot:!1,...e==="incompatible-version"?{button:{title:"Reload",onClick:()=>window.location.reload()}}:{}};i.current=Yn.show(o)}else i.current&&(Yn.dismiss(i.current),i.current=null)},[n,e]),p.useEffect(()=>()=>{i.current&&Yn.dismiss(i.current),i.current=null},[]),p.useEffect(()=>(e==="connected"&&s(!0),document.documentElement.dataset.serverConnection=e,()=>{delete document.documentElement.dataset.serverConnection}),[e]),e==="auth-required"){const o=!!window.opentigDesktop;return v.jsx("main",{className:"access-page flex min-h-dvh items-center justify-center bg-background px-4 py-6 text-foreground",children:v.jsxs("section",{className:"w-full max-w-md rounded-xl border border-border bg-card p-6 shadow-sm",role:"status",children:[v.jsx("h1",{className:"text-lg font-semibold",children:"Authentication required"}),v.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:o?"Restart OpenTig to restore its private desktop session.":v.jsx(v.Fragment,{children:"If Web access is paused, enable it in Settings → Web access and reload to resume your saved session. New browsers and expired or revoked sessions need a pairing code from the desktop app or the command below."})}),!o&&v.jsxs(v.Fragment,{children:[v.jsx(im,{}),v.jsx(Gp,{className:"mt-5",nativeButton:!1,render:v.jsx("a",{href:"/pair"}),children:"Check browser access"})]})]})})}return!n&&(e==="offline"||e==="incompatible-version")?v.jsx(Xf,{heading:e==="offline"?"OpenTig server is offline":"OpenTig cannot continue",detail:e==="offline"?"See the server log for details, then restart OpenTig.":"Client and server versions are incompatible.",busy:!1}):t}function Sm(t,e){return t===e?t:t==="unknown"||e==="unknown"?"unknown":t==="worktree"&&e==="index"||t==="index"&&e==="worktree"?"index":"unknown"}function zm(t,e){return{...t.manual||e.manual?{manual:!0}:{},scope:Sm(t.scope,e.scope),background:t.background&&e.background,view:e.view}}function Wm(t,e){return e!=="diff"&&e!=="conflict"?!1:t==="worktree"||t==="index"||t==="unknown"}function Um(t){return t==="worktree"||t==="index"||t==="unknown"}function km(t,e){const n=t==="unknown";return{status:!0,branches:n||t==="refs"||t==="worktrees",worktrees:n||t==="worktrees",files:e==="files"&&(n||t==="worktree"||t==="index"),history:e==="history"&&(n||t==="refs")}}const Pm=new cl({defaultOptions:{queries:{networkMode:"always",retry:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1,staleTime:0},mutations:{networkMode:"always",retry:!1}}}),Gm={commitAuthorship:t=>["repository",t,"commit-authorship"],githubAccounts:["github","accounts"],githubCliStatus:["github","cli-status"],githubAccount:t=>["repository",t,"github-account"],aiStatuses:t=>["ai","statuses",t],repository:t=>["repository",t],status:t=>["repository",t,"status"],branches:t=>["repository",t,"branches"],worktrees:t=>["repository",t,"worktrees"],files:t=>["repository",t,"files"],fileHistory:t=>["repository",t,"file-history"],history:t=>["repository",t,"history"],githubInfo:t=>["repository",t,"github-info"],pulls:(t,e)=>["repository",t,"pulls",...e],pullRequest:(t,e)=>["repository",t,"pull-request",e],pullRequestStack:(t,e)=>["repository",t,"pull-request-stack",e],pullRequestDiff:(t,e)=>["repository",t,"pull-request-diff",e],pullRequestCommitDiff:(t,e)=>["repository",t,"pull-request-commit-diff",e],search:(t,e)=>["repository",t,"search",e],localRefs:t=>["repository",t,"local-refs"],branchDetails:(t,e)=>["repository",t,"branch-details",e],remoteBranchDetails:(t,e)=>["repository",t,"remote-branch-details",e],branchPullRequest:(t,e)=>["repository",t,"branch-pull-request",e],worktreeDetails:(t,e)=>["repository",t,"worktree-details",e]};function $m(t,e){const n=km(t,e);return["status","branches","worktrees","files","history"].filter(s=>n[s])}async function Hm(t){const e=new Set(["github-account","pulls","pull-request","pull-request-stack","pull-request-diff","pull-request-commit-diff","branch-pull-request"]),n=s=>s.queryKey[0]==="github"||s.queryKey[0]==="repository"&&e.has(String(s.queryKey[2]));await t.cancelQueries({predicate:n}),await t.resetQueries({predicate:n})}const Cm=p.lazy(()=>Nr(()=>import("./App-Dfm5F199.js").then(t=>t.b6),__vite__mapDeps([0,1,2,3]))),Am=p.lazy(()=>Nr(()=>import("./PairingPage-DXRyAYHn.js"),__vite__mapDeps([4,1,2,3])));function Em(){const t=window.location.pathname==="/pair"?v.jsx(Am,{}):v.jsx(Tm,{children:v.jsx(Cm,{})});return v.jsxs(v.Fragment,{children:[v.jsx(Kf,{}),v.jsx(qf,{theme:"light",position:"bottom-right"}),v.jsx(ul,{client:Pm,children:v.jsx(p.Suspense,{fallback:null,children:t})})]})}const Ha=document.getElementById("root");if(!Ha)throw new Error("Root container not found.");ll.createRoot(Ha).render(v.jsx(p.StrictMode,{children:v.jsx(Em,{})}));export{zm as A,Gp as B,Xf as C,Bm as D,Dm as E,km as F,$m as G,Im as H,Kp as I,Om as J,_r as L,ha as M,Yf as O,im as P,Or as S,tm as T,Nr as _,Ga as a,em as b,Hp as c,nm as d,Nm as e,Fm as f,Al as g,As as h,Vu as i,hh as j,Wo as k,ed as l,kr as m,$a as n,_m as o,vs as p,Gm as q,jm as r,Yn as s,Zf as t,Pl as u,Hm as v,Zp as w,on as x,Wm as y,Um as z};
46
+ )[data-state=action]{--_c:var(--sileo-state-action)}:is([data-sileo-badge],[data-sileo-title])[data-state]{--sileo-tone:var(--_c);--sileo-tone-bg:color-mix(in oklch, var(--_c) 20%, transparent)}[data-sileo-content]{position:absolute;left:0;z-index:10;width:100%;pointer-events:none;opacity:var(--_co, 0)}[data-sileo-content]:not([data-visible=true]){content-visibility:hidden}[data-sileo-toast][data-ready=true] [data-sileo-content]{transition:opacity calc(var(--sileo-duration) * .08) ease calc(var(--sileo-duration) * .04)}[data-sileo-content][data-edge=top]{top:0}[data-sileo-content][data-edge=bottom]{top:var(--sileo-height)}[data-sileo-content][data-visible=true]{pointer-events:auto}[data-sileo-toast][data-ready=true] [data-sileo-content][data-visible=true]{transition:opacity calc(var(--sileo-duration) * .6) ease calc(var(--sileo-duration) * .3)}[data-sileo-description]{width:100%;text-align:left;padding:1rem;font-size:.875rem;line-height:1.25rem;contain:layout style paint;content-visibility:auto}[data-sileo-button]{display:flex;align-items:center;justify-content:center;height:1.75rem;padding:0 .625rem;margin-top:.75rem;border-radius:9999px;border:0;font-size:.75rem;font-weight:500;cursor:pointer;color:var(--sileo-btn-color,currentColor);background-color:var(--sileo-btn-bg,transparent);transition:background-color 150ms ease}[data-sileo-button]:hover{background-color:var(--sileo-btn-bg-hover,transparent)}[data-sileo-button][data-state]{--sileo-btn-color:var(--_c);--sileo-btn-bg:color-mix(in oklch, var(--_c) 15%, transparent);--sileo-btn-bg-hover:color-mix(in oklch, var(--_c) 25%, transparent)}[data-sileo-icon=spin]{animation:sileo-spin 1s linear infinite}@keyframes sileo-spin{to{transform:rotate(360deg)}}@keyframes sileo-header-enter{from{opacity:0;filter:blur(6px)}to{opacity:1;filter:blur(0px)}}@keyframes sileo-header-exit{from{opacity:1;filter:blur(0px)}to{opacity:0;filter:blur(6px)}}[data-sileo-viewport]{position:fixed;z-index:50;display:flex;gap:.75rem;padding:.75rem;pointer-events:none;max-width:calc(100vw - 1.5rem);contain:layout style}[data-sileo-viewport][data-position^=top] [data-sileo-toast]:not([data-ready=true]){margin-bottom:calc(-1 * (var(--sileo-height) + .75rem))}[data-sileo-viewport][data-position^=bottom] [data-sileo-toast]:not([data-ready=true]){margin-top:calc(-1 * (var(--sileo-height) + .75rem))}[data-sileo-viewport][data-position^=top]{top:0;flex-direction:column-reverse}[data-sileo-viewport][data-position^=bottom]{bottom:0;flex-direction:column}[data-sileo-viewport][data-position$=left]{left:0;align-items:flex-start}[data-sileo-viewport][data-position$=right]{right:0;align-items:flex-end}[data-sileo-viewport][data-position$=center]{left:50%;transform:translateX(-50%);align-items:center}@media (prefers-reduced-motion:no-preference){[data-sileo-toast][data-ready=true]:hover,[data-sileo-toast][data-ready=true][data-exiting=true]{will-change:transform,opacity,height}}@media (prefers-reduced-motion:reduce){[data-sileo-viewport],[data-sileo-viewport] *,[data-sileo-viewport] ::after,[data-sileo-viewport] ::before{animation-duration:0s;animation-iteration-count:1;transition-duration:0s}}[data-sileo-viewport][data-theme=dark] [data-sileo-description]{color:rgba(0,0,0,.5)}[data-sileo-viewport][data-theme=light] [data-sileo-description]{color:rgba(255,255,255,.5)}`);const Tt=40,we=350,Sf=16,Pa=600,kf=Pa/1e3,fe=6e3,Pf=fe*.1,Cf=fe*.025,Af=fe-2e3,qn={type:"spring",bounce:.25,duration:kf},Ef=.5,qe=10,Rf=2.25,Mf=200,Vf=Pa*.7,pe=t=>{let{title:e,children:n}=t,s=kl(t,["title","children"]);return v.jsxs("svg",G({},s,{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("title",{children:e}),n]}))},Df=()=>v.jsxs(pe,{title:"Arrow Right",children:[v.jsx("path",{d:"M5 12h14"}),v.jsx("path",{d:"m12 5 7 7-7 7"})]}),Lf=()=>v.jsxs(pe,{title:"Life Buoy",children:[v.jsx("circle",{cx:"12",cy:"12",r:"10"}),v.jsx("path",{d:"m4.93 4.93 4.24 4.24"}),v.jsx("path",{d:"m14.83 9.17 4.24-4.24"}),v.jsx("path",{d:"m14.83 14.83 4.24 4.24"}),v.jsx("path",{d:"m9.17 14.83-4.24 4.24"}),v.jsx("circle",{cx:"12",cy:"12",r:"4"})]}),jf=t=>v.jsx(pe,G({title:"Loader Circle"},t,{children:v.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})),If=()=>v.jsxs(pe,{title:"X",children:[v.jsx("path",{d:"M18 6 6 18"}),v.jsx("path",{d:"m6 6 12 12"})]}),Of=()=>v.jsxs(pe,{title:"Circle Alert",children:[v.jsx("circle",{cx:"12",cy:"12",r:"10"}),v.jsx("line",{x1:"12",x2:"12",y1:"8",y2:"12"}),v.jsx("line",{x1:"12",x2:"12.01",y1:"16",y2:"16"})]}),Ff=()=>v.jsx(pe,{title:"Check",children:v.jsx("path",{d:"M20 6 9 17l-5-5"})}),Pr={success:v.jsx(Ff,{}),loading:v.jsx(jf,{"data-sileo-icon":"spin","aria-hidden":"true"}),error:v.jsx(If,{}),warning:v.jsx(Of,{}),info:v.jsx(Lf,{}),action:v.jsx(Df,{})},Bf=p.memo(function({filterId:e,blur:n}){return v.jsx("defs",{children:v.jsxs("filter",{id:e,x:"-20%",y:"-20%",width:"140%",height:"140%",colorInterpolationFilters:"sRGB",children:[v.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:n,result:"blur"}),v.jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 20 -10",result:"goo"}),v.jsx("feComposite",{in:"SourceGraphic",in2:"goo",operator:"atop"})]})})}),Nf=p.memo(function({id:e,fill:n="#FFFFFF",state:s="success",title:i=s,description:o,position:r="left",expand:l="bottom",className:d,icon:u,styles:a,button:c,roundness:h,exiting:m=!1,autoExpandDelayMs:f,autoCollapseDelayMs:y,canExpand:b,interruptKey:T,refreshKey:w,onMouseEnter:S,onMouseLeave:P,onDismiss:j}){var B,k,g,M,C,D,U,tt;const H=p.useMemo(()=>({title:i,description:o,state:s,icon:u,styles:a,button:c,fill:n}),[i,o,s,u,a,c,n]),[F,N]=p.useState(H),[bt,W]=p.useState(w),[Q,A]=p.useState(!1),[dt,Qt]=p.useState(!1),[Oe,Jt]=p.useState(0),[et,J]=p.useState(0),at=!!F.description||!!F.button,me=F.state==="loading",I=at&&Q&&!me,ge=me?!1:b??(!T||T===e),xt=`${F.state}-${F.title}`,Vt=`sileo-gooey-${e}`,Et=Math.max(0,h??Sf),Nt=Et*Ef,ei=p.useRef(null),ni=p.useRef(null),_t=p.useRef(null),ye=p.useRef(null),ve=p.useRef(null),Dt=p.useRef(null),kn=p.useRef(w),zt=p.useRef(null),[q,si]=p.useState({current:{key:xt,view:F},prev:null}),Pn=p.useRef(null),Fe=p.useRef(null),be=p.useRef(null),Cn=p.useRef(0),Be=p.useRef(null);p.useLayoutEffect(()=>{const L=Pn.current,K=ei.current;if(!L||!K)return;if(Fe.current===null){const ut=getComputedStyle(K);Fe.current=parseFloat(ut.paddingLeft)+parseFloat(ut.paddingRight)}const nt=Fe.current;(()=>{const ut=L.scrollWidth+nt+qe;ut>qe&&Jt(wt=>wt===ut?wt:ut)})(),be.current||(be.current=new ResizeObserver(()=>{cancelAnimationFrame(Cn.current),Cn.current=requestAnimationFrame(()=>{var ut;const wt=Pn.current,al=(ut=Fe.current)!=null?ut:0;if(!wt)return;const Mn=wt.scrollWidth+al+qe;Mn>qe&&Jt(li=>li===Mn?li:Mn)})})),Be.current!==L&&(Be.current&&be.current.unobserve(Be.current),be.current.observe(L),Be.current=L)},[q.current.key]),p.useEffect(()=>()=>{var L;cancelAnimationFrame(Cn.current),(L=be.current)==null||L.disconnect()},[]),p.useLayoutEffect(()=>{if(!at){J(0);return}const L=ni.current;if(!L)return;const K=()=>{const ut=L.scrollHeight;J(wt=>wt===ut?wt:ut)};K();let nt=0;const ft=new ResizeObserver(()=>{cancelAnimationFrame(nt),nt=requestAnimationFrame(K)});return ft.observe(L),()=>{cancelAnimationFrame(nt),ft.disconnect()}},[at]),p.useEffect(()=>{const L=requestAnimationFrame(()=>Qt(!0));return()=>cancelAnimationFrame(L)},[]),p.useLayoutEffect(()=>{si(L=>L.current.key===xt?L.current.view===F?L:G({},L,{current:{key:xt,view:F}}):{prev:L.current,current:{key:xt,view:F}})},[xt,F]),p.useEffect(()=>{if(q.prev)return _t.current&&clearTimeout(_t.current),_t.current=window.setTimeout(()=>{_t.current=null,si(L=>G({},L,{prev:null}))},Vf),()=>{_t.current&&(clearTimeout(_t.current),_t.current=null)}},[q.prev]),p.useEffect(()=>{N(L=>L.fill===n?L:G({},L,{fill:n}))},[n]),p.useEffect(()=>{if(w===void 0){N(H),W(void 0),zt.current=null,kn.current=w;return}kn.current!==w&&(kn.current=w,Dt.current&&(clearTimeout(Dt.current),Dt.current=null),I?(zt.current={key:w,payload:H},A(!1),Dt.current=window.setTimeout(()=>{Dt.current=null;const L=zt.current;L&&(N(L.payload),W(L.key),zt.current=null)},Mf)):(zt.current=null,N(H),W(w)))},[I,w,H]),p.useEffect(()=>{if(!at)return;if(ye.current&&clearTimeout(ye.current),ve.current&&clearTimeout(ve.current),m||!ge){A(!1);return}if(f==null&&y==null)return;const L=f??0,K=y??0;return L>0?ye.current=window.setTimeout(()=>A(!0),L):A(!0),K>0&&(ve.current=window.setTimeout(()=>A(!1),K)),()=>{ye.current&&clearTimeout(ye.current),ve.current&&clearTimeout(ve.current)}},[y,f,at,ge,m,bt]);const An=Tt*Rf,En=at?Math.max(An,Tt+et):An,ii=p.useRef(En);I&&(ii.current=En);const Ne=I?En:ii.current,ri=at?Math.max(Ne,An):Tt,oi=Math.max(0,Ne-Tt),te=Math.max(Oe||Tt,Tt),ai=Tt+Nt*3,_e=r==="right"?we-te:r==="center"?(we-te)/2:0,qa=p.useMemo(()=>({x:_e,width:te,height:I?ai:Tt}),[_e,te,I,ai]),Ka=p.useMemo(()=>({height:I?oi:0,opacity:I?1:0}),[I,oi]),Ya=p.useMemo(()=>I?qn:G({},qn,{bounce:0}),[I]),Xa=p.useMemo(()=>dt?qn:{duration:0},[dt]),Za=`0 0 ${we} ${ri}`,Qa=p.useMemo(()=>({filter:`url(#${Vt})`}),[Vt]),Ja=p.useMemo(()=>({"--_h":`${I?Ne:Tt}px`,"--_pw":`${te}px`,"--_px":`${_e}px`,"--_ht":`translateY(${I?l==="bottom"?3:-3:0}px) scale(${I?.9:1})`,"--_co":`${I?1:0}`}),[I,Ne,te,_e,l]),tl=p.useCallback(L=>{S?.(L),at&&A(!0)},[at,S]),el=p.useCallback(L=>{P?.(L),A(!1)},[P]),nl=p.useCallback(L=>{if(L.propertyName!=="height"&&L.propertyName!=="transform"||I)return;const K=zt.current;K&&(Dt.current&&(clearTimeout(Dt.current),Dt.current=null),N(K.payload),W(K.key),zt.current=null)},[I]),sl=30,il=20,ze=p.useRef(null),ee=p.useRef(null),We=p.useRef(j);We.current=j;const Rn=p.useRef(null);if(!Rn.current){const L={onMove:K=>{const nt=ze.current;if(ee.current===null||!nt)return;const ft=K.clientY-ee.current,ut=ft>0?1:-1,wt=Math.min(Math.abs(ft),il)*ut;nt.style.transform=`translateY(${wt}px)`},onUp:K=>{const nt=ze.current;if(ee.current===null||!nt)return;const ft=K.clientY-ee.current;ee.current=null,nt.style.transform="",nt.removeEventListener("pointermove",L.onMove),nt.removeEventListener("pointerup",L.onUp),Math.abs(ft)>sl&&(We.current==null||We.current.call(We))}};Rn.current=L}const rl=p.useCallback(L=>{var K;L.preventDefault(),L.stopPropagation(),(K=F.button)==null||K.onClick()},[F.button]),ol=p.useCallback(L=>{if(m||!j||L.target.closest("[data-sileo-button]"))return;ee.current=L.clientY,L.currentTarget.setPointerCapture(L.pointerId);const nt=ze.current,ft=Rn.current;nt&&ft&&(nt.addEventListener("pointermove",ft.onMove,{passive:!0}),nt.addEventListener("pointerup",ft.onUp,{passive:!0}))},[m,j]);return v.jsxs("button",{ref:ze,type:"button","data-sileo-toast":!0,"data-ready":dt,"data-expanded":I,"data-exiting":m,"data-edge":l,"data-position":r,"data-state":F.state,className:d,style:Ja,onMouseEnter:tl,onMouseLeave:el,onTransitionEnd:nl,onPointerDown:ol,children:[v.jsx("div",{"data-sileo-canvas":!0,"data-edge":l,style:Qa,children:v.jsxs("svg",{"data-sileo-svg":!0,width:we,height:ri,viewBox:Za,children:[v.jsx("title",{children:"Sileo Notification"}),v.jsx(Bf,{filterId:Vt,blur:Nt}),v.jsx(kr.rect,{"data-sileo-pill":!0,rx:Et,ry:Et,fill:F.fill,initial:!1,animate:qa,transition:Xa}),v.jsx(kr.rect,{"data-sileo-body":!0,y:Tt,width:we,rx:Et,ry:Et,fill:F.fill,initial:!1,animate:Ka,transition:Ya})]})}),v.jsx("div",{ref:ei,"data-sileo-header":!0,"data-edge":l,children:v.jsxs("div",{"data-sileo-header-stack":!0,children:[v.jsxs("div",{ref:Pn,"data-sileo-header-inner":!0,"data-layer":"current",children:[v.jsx("div",{"data-sileo-badge":!0,"data-state":q.current.view.state,className:(g=q.current.view.styles)==null?void 0:g.badge,children:(B=q.current.view.icon)!=null?B:Pr[q.current.view.state]}),v.jsx("span",{"data-sileo-title":!0,"data-state":q.current.view.state,className:(M=q.current.view.styles)==null?void 0:M.title,children:q.current.view.title})]},q.current.key),q.prev&&v.jsxs("div",{"data-sileo-header-inner":!0,"data-layer":"prev","data-exiting":"true",children:[v.jsx("div",{"data-sileo-badge":!0,"data-state":q.prev.view.state,className:(C=q.prev.view.styles)==null?void 0:C.badge,children:(k=q.prev.view.icon)!=null?k:Pr[q.prev.view.state]}),v.jsx("span",{"data-sileo-title":!0,"data-state":q.prev.view.state,className:(D=q.prev.view.styles)==null?void 0:D.title,children:q.prev.view.title})]},q.prev.key)]})}),at&&v.jsx("div",{"data-sileo-content":!0,"data-edge":l,"data-visible":I,children:v.jsxs("div",{ref:ni,"data-sileo-description":!0,className:(U=F.styles)==null?void 0:U.description,children:[F.description,F.button&&v.jsx("a",{href:"#",type:"button","data-sileo-button":!0,"data-state":F.state,className:(tt=F.styles)==null?void 0:tt.button,onClick:rl,children:F.button.title})]})})]})}),_f=t=>t.includes("right")?"right":t.includes("center")?"center":"left",zf=t=>t.startsWith("top")?"bottom":"top",rt={toasts:[],listeners:new Set,position:"top-right",options:void 0,emit(){for(const t of this.listeners)t(this.toasts)},update(t){this.toasts=t(this.toasts),this.emit()}};let Wf=0;const Uf=()=>`${++Wf}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,Cr=t=>`${t.id}:${t.instanceId}`,Ps=t=>{const e=rt.toasts.find(n=>n.id===t);!e||e.exiting||(rt.update(n=>n.map(s=>s.id===t?G({},s,{exiting:!0}):s)),setTimeout(()=>rt.update(n=>n.filter(s=>s.id!==t)),Pf))},Gf=(t,e)=>{var n,s;if(t.autopilot===!1||!e||e<=0)return{};const i=typeof t.autopilot=="object"?t.autopilot:void 0,o=r=>Math.min(e,Math.max(0,r));return{expandDelayMs:o((n=i?.expand)!=null?n:Cf),collapseDelayMs:o((s=i?.collapse)!=null?s:Af)}},Ca=t=>{var e;return G({},rt.options,t,{styles:G({},(e=rt.options)==null?void 0:e.styles,t.styles)})},Aa=(t,e,n)=>{var s,i,o;const r=(s=t.duration)!=null?s:fe,l=Gf(t,r);return G({},t,{id:e,instanceId:Uf(),position:(i=(o=t.position)!=null?o:n)!=null?i:rt.position,autoExpandDelayMs:l.expandDelayMs,autoCollapseDelayMs:l.collapseDelayMs})},Ut=t=>{var e,n;const s=rt.toasts.filter(d=>!d.exiting),i=Ca(t),o=(e=i.id)!=null?e:"sileo-default",r=s.find(d=>d.id===o),l=Aa(i,o,r?.position);return r?rt.update(d=>d.map(u=>u.id===o?l:u)):rt.update(d=>[...d.filter(u=>u.id!==o),l]),{id:o,duration:(n=i.duration)!=null?n:fe}},Kn=(t,e)=>{const n=rt.toasts.find(i=>i.id===t);if(!n)return;const s=Aa(Ca(e),t,n.position);rt.update(i=>i.map(o=>o.id===t?s:o))},Yn={show:t=>Ut(G({},t,{state:t.type})).id,success:t=>Ut(G({},t,{state:"success"})).id,error:t=>Ut(G({},t,{state:"error"})).id,warning:t=>Ut(G({},t,{state:"warning"})).id,info:t=>Ut(G({},t,{state:"info"})).id,action:t=>Ut(G({},t,{state:"action"})).id,promise:(t,e)=>{const{id:n}=Ut(G({},e.loading,{state:"loading",duration:null,position:e.position})),s=typeof t=="function"?t():t;return s.then(i=>{if(e.action){const o=typeof e.action=="function"?e.action(i):e.action;Kn(n,G({},o,{state:"action",id:n}))}else{const o=typeof e.success=="function"?e.success(i):e.success;Kn(n,G({},o,{state:"success",id:n}))}}).catch(i=>{const o=typeof e.error=="function"?e.error(i):e.error;Kn(n,G({},o,{state:"error",id:n}))}),s},dismiss:Ps,clear:t=>rt.update(e=>t?e.filter(n=>n.position!==t):[])},$f={light:"#1a1a1a",dark:"#f2f2f2"};function Hf(t){const[e,n]=p.useState(()=>t==="light"||t==="dark"?t:typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light");return p.useEffect(()=>{if(t==="light"||t==="dark"){n(t);return}const s=window.matchMedia("(prefers-color-scheme: dark)"),i=o=>n(o.matches?"dark":"light");return n(s.matches?"dark":"light"),s.addEventListener("change",i),()=>s.removeEventListener("change",i)},[t]),e}function qf({children:t,position:e="top-right",offset:n,options:s,theme:i}){const o=Hf(i),[r,l]=p.useState(rt.toasts),[d,u]=p.useState(),a=p.useRef(!1),c=p.useRef(new Map),h=p.useRef(r),m=p.useRef(void 0),f=p.useRef(new Map);p.useEffect(()=>{rt.position=e,rt.options=s},[e,s]);const y=p.useCallback(()=>{for(const k of c.current.values())clearTimeout(k);c.current.clear()},[]),b=p.useCallback(k=>{if(!a.current)for(const M of k){var g;if(M.exiting)continue;const C=Cr(M);if(c.current.has(C)||M.duration===null)continue;const D=(g=M.duration)!=null?g:fe;D<=0||c.current.set(C,window.setTimeout(()=>Ps(M.id),D))}},[]);p.useEffect(()=>{const k=g=>l(g);return rt.listeners.add(k),()=>{rt.listeners.delete(k),y()}},[y]),p.useEffect(()=>{h.current=r;const k=new Set(r.map(Cr)),g=new Set(r.map(M=>M.id));for(const[M,C]of c.current)k.has(M)||(clearTimeout(C),c.current.delete(M));for(const M of f.current.keys())g.has(M)||f.current.delete(M);b(r)},[r,b]);const T=p.useRef(null),w=p.useRef(null);T.current=p.useCallback(()=>{a.current||(a.current=!0,y())},[y]),w.current=p.useCallback(()=>{a.current&&(a.current=!1,b(h.current))},[b]);const S=p.useMemo(()=>{for(let k=r.length-1;k>=0;k--)if(!r[k].exiting)return r[k].id},[r]);p.useEffect(()=>{m.current=S,u(S)},[S]);const P=p.useCallback(k=>{let g=f.current.get(k);return g||(g={enter:M=>{u(C=>C===k?C:k),T.current==null||T.current.call(T,M)},leave:M=>{u(C=>C===m.current?C:m.current),w.current==null||w.current.call(w,M)},dismiss:()=>Ps(k)},f.current.set(k,g),g)},[]),j=p.useCallback(k=>{if(n===void 0)return;const g=typeof n=="object"?n:{top:n,right:n,bottom:n,left:n},M={},C=D=>typeof D=="number"?`${D}px`:D;return k.startsWith("top")&&g.top&&(M.top=C(g.top)),k.startsWith("bottom")&&g.bottom&&(M.bottom=C(g.bottom)),k.endsWith("left")&&g.left&&(M.left=C(g.left)),k.endsWith("right")&&g.right&&(M.right=C(g.right)),M},[n]),B=p.useMemo(()=>{const k=new Map;for(const M of r){var g;const C=(g=M.position)!=null?g:e,D=k.get(C);D?D.push(M):k.set(C,[M])}return k},[r,e]);return v.jsxs(v.Fragment,{children:[t,Array.from(B,([k,g])=>{const M=_f(k),C=zf(k);return v.jsx("section",{"data-sileo-viewport":!0,"data-position":k,"data-theme":i?o:void 0,"aria-live":"polite",style:j(k),children:g.map(D=>{var U;const tt=P(D.id);return v.jsx(Nf,{id:D.id,state:D.state,title:D.title,description:D.description,position:M,expand:C,icon:D.icon,fill:(U=D.fill)!=null?U:i?$f[o]:void 0,styles:D.styles,button:D.button,roundness:D.roundness,exiting:D.exiting,autoExpandDelayMs:D.autoExpandDelayMs,autoCollapseDelayMs:D.autoCollapseDelayMs,refreshKey:D.instanceId,canExpand:d===void 0||d===D.id,onMouseEnter:tt.enter,onMouseLeave:tt.leave,onDismiss:tt.dismiss},D.id)})},k)})]})}function Kf(){return p.useEffect(()=>{const t=window.visualViewport;if(!t)return;const e=()=>{if(Math.abs(t.scale-1)>.01)return;document.documentElement.style.setProperty("--mobile-viewport-height",`${t.height}px`),document.documentElement.style.setProperty("--mobile-viewport-top",`${t.offsetTop}px`);const n=document.activeElement,s=n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLElement&&n.isContentEditable;document.documentElement.dataset.mobileKeyboard=String(s&&t.height<document.documentElement.clientHeight-100)};return e(),t.addEventListener("resize",e),t.addEventListener("scroll",e),document.addEventListener("focusin",e),document.addEventListener("focusout",e),()=>{t.removeEventListener("resize",e),t.removeEventListener("scroll",e),document.removeEventListener("focusin",e),document.removeEventListener("focusout",e),delete document.documentElement.dataset.mobileKeyboard}},[]),null}function Yf(){return v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 117.9 128","aria-hidden":"true",children:[v.jsx("path",{fill:"currentColor",d:"m113.9 42.6c-3.7-11.3-10.8-21.2-20.1-28.6-7.4-5.7-16.1-10-25.4-11.5-6.5-0.9-9.4-1.1-15.9-0.3-7.4 0.9-14.3 3.4-20.7 7-15.4 9.1-27.6 26.2-29.8 44.5-0.3 2.9-0.4 5.8-0.2 8.7 0.7 15.5 9.7 33.2 27.2 44.1l3.9 2.2c1.5 1.3 2.9 1.8 5.1 1.3 3.5-0.9 5.1-6.1 0.1-8.6-7.3-3.5-13.7-8.7-18.1-14.6-5-7-9-15.8-9.3-26.9-0.2-10 3.5-21.4 11.6-31.3 4.5-5.2 10.5-9.8 16.4-12.7 10.1-4.9 20.5-6.6 31.2-3.8 13.2 3.5 25.6 13.1 32.3 26.5 2.3 4.9 4.2 10.7 4.9 17.4 0.9 9.9-1.4 19.2-6.9 27.4-4.3 6.5-9.2 11-16.1 15.8l-4.1 2.1c-4.4 2.4-3.2 9.4 2.8 9 1.2 0 2.5-0.8 3.6-1.4 3.9-2 7.5-4.3 10.8-7 9.4-8 17.6-20.3 19.1-36.8 0.6-7.4-0.4-15.6-2.4-22.5z"}),v.jsx("path",{fill:"#2266ea",d:"m88.1 42.8c-3.6 0.3-7.4 2.9-9 7.3-5.5 0.8-14.1 3.6-20.3 12-4.3-6.3-11.6-10.7-19.7-12-1.1-3.8-5-7.5-10.2-7.2-4.1 0.4-8.7 3.8-8.7 9.7 0.2 6 5.7 10.3 11.1 9.3 2.8-0.3 5.2-2 6.6-4.3 6.7 1 14.9 4.7 17.3 14.1v36.7c-3.2 1.5-5.5 4.7-5.5 8.4 0 4.8 3.7 9.3 9.4 9.3s9.5-4.5 9.4-9.1c0.1-3.6-2.3-7.3-5.8-8.7v-36.4c1-5.6 5.9-10.9 13.3-13.3l3.9-1c1.8 2.9 4.9 4.6 8.6 4.5 4.6-0.2 9.3-3.6 9.3-9.5 0-5.6-4.9-10-9.7-9.8z"})]})}function Xf({heading:t,detail:e,busy:n=!0}){return v.jsxs("div",{className:"splash",children:[v.jsx(Yf,{}),v.jsxs("div",{className:"splash-copy",children:[v.jsx("strong",{children:t}),v.jsx("span",{role:"status","aria-live":"polite",children:e??""})]}),n?v.jsx("div",{className:"splash-mark","aria-hidden":"true"}):null]})}function Ea(t){var e,n,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Ea(t[e]))&&(s&&(s+=" "),s+=n)}else for(n in t)t[n]&&(s&&(s+=" "),s+=n);return s}function Ra(){for(var t,e,n=0,s="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Ea(t))&&(s&&(s+=" "),s+=e);return s}const Ar=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Er=Ra,Zf=(t,e)=>n=>{var s;if(e?.variants==null)return Er(t,n?.class,n?.className);const{variants:i,defaultVariants:o}=e,r=Object.keys(i).map(u=>{const a=n?.[u],c=o?.[u];if(a===null)return null;const h=Ar(a)||Ar(c);return i[u][h]}),l=n&&Object.entries(n).reduce((u,a)=>{let[c,h]=a;return h===void 0||(u[c]=h),u},{}),d=e==null||(s=e.compoundVariants)===null||s===void 0?void 0:s.reduce((u,a)=>{let{class:c,className:h,...m}=a;return Object.entries(m).every(f=>{let[y,b]=f;return Array.isArray(b)?b.includes({...o,...l}[y]):{...o,...l}[y]===b})?[...u,c,h]:u},[]);return Er(t,r,d,n?.class,n?.className)},Qf=(t,e)=>{const n=new Array(t.length+e.length);for(let s=0;s<t.length;s++)n[s]=t[s];for(let s=0;s<e.length;s++)n[t.length+s]=e[s];return n},Jf=(t,e)=>({classGroupId:t,validator:e}),Ma=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),yn="-",Rr=[],tp="arbitrary..",ep=t=>{const e=sp(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=t;return{getClassGroupId:r=>{if(r.startsWith("[")&&r.endsWith("]"))return np(r);const l=r.split(yn),d=l[0]===""&&l.length>1?1:0;return Va(l,d,e)},getConflictingClassGroupIds:(r,l)=>{if(l){const d=s[r],u=n[r];return d?u?Qf(u,d):d:u||Rr}return n[r]||Rr}}},Va=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const i=t[e],o=n.nextPart.get(i);if(o){const u=Va(t,e+1,o);if(u)return u}const r=n.validators;if(r===null)return;const l=e===0?t.join(yn):t.slice(e).join(yn),d=r.length;for(let u=0;u<d;u++){const a=r[u];if(a.validator(l))return a.classGroupId}},np=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),s=e.slice(0,n);return s?tp+s:void 0})(),sp=t=>{const{theme:e,classGroups:n}=t;return ip(n,e)},ip=(t,e)=>{const n=Ma();for(const s in t){const i=t[s];Js(i,n,s,e)}return n},Js=(t,e,n,s)=>{const i=t.length;for(let o=0;o<i;o++){const r=t[o];rp(r,e,n,s)}},rp=(t,e,n,s)=>{if(typeof t=="string"){op(t,e,n);return}if(typeof t=="function"){ap(t,e,n,s);return}lp(t,e,n,s)},op=(t,e,n)=>{const s=t===""?e:Da(e,t);s.classGroupId=n},ap=(t,e,n,s)=>{if(cp(t)){Js(t(s),e,n,s);return}e.validators===null&&(e.validators=[]),e.validators.push(Jf(n,t))},lp=(t,e,n,s)=>{const i=Object.entries(t),o=i.length;for(let r=0;r<o;r++){const[l,d]=i[r];Js(d,Da(e,l),n,s)}},Da=(t,e)=>{let n=t;const s=e.split(yn),i=s.length;for(let o=0;o<i;o++){const r=s[o];let l=n.nextPart.get(r);l||(l=Ma(),n.nextPart.set(r,l)),n=l}return n},cp=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,up=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),s=Object.create(null);const i=(o,r)=>{n[o]=r,e++,e>t&&(e=0,s=n,n=Object.create(null))};return{get(o){let r=n[o];if(r!==void 0)return r;if((r=s[o])!==void 0)return i(o,r),r},set(o,r){o in n?n[o]=r:i(o,r)}}},Cs="!",Mr=":",dp=[],Vr=(t,e,n,s,i)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:s,isExternal:i}),hp=t=>{const{prefix:e,experimentalParseClassName:n}=t;let s=i=>{const o=[];let r=0,l=0,d=0,u;const a=i.length;for(let y=0;y<a;y++){const b=i[y];if(r===0&&l===0){if(b===Mr){o.push(i.slice(d,y)),d=y+1;continue}if(b==="/"){u=y;continue}}b==="["?r++:b==="]"?r--:b==="("?l++:b===")"&&l--}const c=o.length===0?i:i.slice(d);let h=c,m=!1;c.endsWith(Cs)?(h=c.slice(0,-1),m=!0):c.startsWith(Cs)&&(h=c.slice(1),m=!0);const f=u&&u>d?u-d:void 0;return Vr(o,m,h,f)};if(e){const i=e+Mr,o=s;s=r=>r.startsWith(i)?o(r.slice(i.length)):Vr(dp,!1,r,void 0,!0)}if(n){const i=s;s=o=>n({className:o,parseClassName:i})}return s},fp=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,s)=>{e.set(n,1e6+s)}),n=>{const s=[];let i=[];for(let o=0;o<n.length;o++){const r=n[o],l=r[0]==="[",d=e.has(r);l||d?(i.length>0&&(i.sort(),s.push(...i),i=[]),s.push(r)):i.push(r)}return i.length>0&&(i.sort(),s.push(...i)),s}},pp=t=>({cache:up(t.cacheSize),parseClassName:hp(t),sortModifiers:fp(t),postfixLookupClassGroupIds:mp(t),...ep(t)}),mp=t=>{const e=Object.create(null),n=t.postfixLookupClassGroups;if(n)for(let s=0;s<n.length;s++)e[n[s]]=!0;return e},gp=/\s+/,yp=(t,e)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:i,sortModifiers:o,postfixLookupClassGroupIds:r}=e,l=[],d=t.trim().split(gp);let u="";for(let a=d.length-1;a>=0;a-=1){const c=d[a],{isExternal:h,modifiers:m,hasImportantModifier:f,baseClassName:y,maybePostfixModifierPosition:b}=n(c);if(h){u=c+(u.length>0?" "+u:u);continue}let T=!!b,w;if(T){const k=y.substring(0,b);w=s(k);const g=w&&r[w]?s(y):void 0;g&&g!==w&&(w=g,T=!1)}else w=s(y);if(!w){if(!T){u=c+(u.length>0?" "+u:u);continue}if(w=s(y),!w){u=c+(u.length>0?" "+u:u);continue}T=!1}const S=m.length===0?"":m.length===1?m[0]:o(m).join(":"),P=f?S+Cs:S,j=P+w;if(l.indexOf(j)>-1)continue;l.push(j);const B=i(w,T);for(let k=0;k<B.length;++k){const g=B[k];l.push(P+g)}u=c+(u.length>0?" "+u:u)}return u},vp=(...t)=>{let e=0,n,s,i="";for(;e<t.length;)(n=t[e++])&&(s=La(n))&&(i&&(i+=" "),i+=s);return i},La=t=>{if(typeof t=="string")return t;let e,n="";for(let s=0;s<t.length;s++)t[s]&&(e=La(t[s]))&&(n&&(n+=" "),n+=e);return n},bp=(t,...e)=>{let n,s,i,o;const r=d=>{const u=e.reduce((a,c)=>c(a),t());return n=pp(u),s=n.cache.get,i=n.cache.set,o=l,l(d)},l=d=>{const u=s(d);if(u)return u;const a=yp(d,n);return i(d,a),a};return o=r,(...d)=>o(vp(...d))},xp=[],X=t=>{const e=n=>n[t]||xp;return e.isThemeGetter=!0,e},ja=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ia=/^\((?:(\w[\w-]*):)?(.+)\)$/i,wp=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Tp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Sp=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,kp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Pp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Cp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Lt=t=>wp.test(t),O=t=>!!t&&!Number.isNaN(Number(t)),St=t=>!!t&&Number.isInteger(Number(t)),Xn=t=>t.endsWith("%")&&O(t.slice(0,-1)),Rt=t=>Tp.test(t),Oa=()=>!0,Ap=t=>Sp.test(t)&&!kp.test(t),ti=()=>!1,Ep=t=>Pp.test(t),Rp=t=>Cp.test(t),Mp=t=>!E(t)&&!R(t),Vp=t=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),Dp=t=>Bt(t,Na,ti),E=t=>ja.test(t),Gt=t=>Bt(t,_a,Ap),Dr=t=>Bt(t,_p,O),Lp=t=>Bt(t,Wa,Oa),jp=t=>Bt(t,za,ti),Lr=t=>Bt(t,Fa,ti),Ip=t=>Bt(t,Ba,Rp),Ke=t=>Bt(t,Ua,Ep),R=t=>Ia.test(t),Te=t=>Zt(t,_a),Op=t=>Zt(t,za),jr=t=>Zt(t,Fa),Fp=t=>Zt(t,Na),Bp=t=>Zt(t,Ba),Ye=t=>Zt(t,Ua,!0),Np=t=>Zt(t,Wa,!0),Bt=(t,e,n)=>{const s=ja.exec(t);return s?s[1]?e(s[1]):n(s[2]):!1},Zt=(t,e,n=!1)=>{const s=Ia.exec(t);return s?s[1]?e(s[1]):n:!1},Fa=t=>t==="position"||t==="percentage",Ba=t=>t==="image"||t==="url",Na=t=>t==="length"||t==="size"||t==="bg-size",_a=t=>t==="length",_p=t=>t==="number",za=t=>t==="family-name",Wa=t=>t==="number"||t==="weight",Ua=t=>t==="shadow",zp=()=>{const t=X("color"),e=X("font"),n=X("text"),s=X("font-weight"),i=X("tracking"),o=X("leading"),r=X("breakpoint"),l=X("container"),d=X("spacing"),u=X("radius"),a=X("shadow"),c=X("inset-shadow"),h=X("text-shadow"),m=X("drop-shadow"),f=X("blur"),y=X("perspective"),b=X("aspect"),T=X("ease"),w=X("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],j=()=>[...P(),R,E],B=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],g=()=>[R,E,d],M=()=>[Lt,"full","auto",...g()],C=()=>[St,"none","subgrid",R,E],D=()=>["auto",{span:["full",St,R,E]},St,R,E],U=()=>[St,"auto",R,E],tt=()=>["auto","min","max","fr",R,E],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...g()],bt=()=>[Lt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...g()],W=()=>[Lt,"screen","full","dvw","lvw","svw","min","max","fit",...g()],Q=()=>[Lt,"screen","full","lh","dvh","lvh","svh","min","max","fit",...g()],A=()=>[t,R,E],dt=()=>[...P(),jr,Lr,{position:[R,E]}],Qt=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Oe=()=>["auto","cover","contain",Fp,Dp,{size:[R,E]}],Jt=()=>[Xn,Te,Gt],et=()=>["","none","full",u,R,E],J=()=>["",O,Te,Gt],at=()=>["solid","dashed","dotted","double"],me=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>[O,Xn,jr,Lr],ge=()=>["","none",f,R,E],xt=()=>["none",O,R,E],Vt=()=>["none",O,R,E],Et=()=>[O,R,E],Nt=()=>[Lt,"full",...g()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Rt],breakpoint:[Rt],color:[Oa],container:[Rt],"drop-shadow":[Rt],ease:["in","out","in-out"],font:[Mp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Rt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Rt],shadow:[Rt],spacing:["px",O],text:[Rt],"text-shadow":[Rt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Lt,E,R,b]}],container:["container"],"container-type":[{"@container":["","normal","size",R,E]}],"container-named":[Vp],columns:[{columns:[O,E,R,l]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:j()}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{"inset-s":M(),start:M()}],end:[{"inset-e":M(),end:M()}],"inset-bs":[{"inset-bs":M()}],"inset-be":[{"inset-be":M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[St,"auto",R,E]}],basis:[{basis:[Lt,"full","auto",l,...g()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[O,Lt,"auto","initial","none",E]}],grow:[{grow:["",O,R,E]}],shrink:[{shrink:["",O,R,E]}],order:[{order:[St,"first","last","none",R,E]}],"grid-cols":[{"grid-cols":C()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":C()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":tt()}],"auto-rows":[{"auto-rows":tt()}],gap:[{gap:g()}],"gap-x":[{"gap-x":g()}],"gap-y":[{"gap-y":g()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:g()}],px:[{px:g()}],py:[{py:g()}],ps:[{ps:g()}],pe:[{pe:g()}],pbs:[{pbs:g()}],pbe:[{pbe:g()}],pt:[{pt:g()}],pr:[{pr:g()}],pb:[{pb:g()}],pl:[{pl:g()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mbs:[{mbs:N()}],mbe:[{mbe:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":g()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":g()}],"space-y-reverse":["space-y-reverse"],size:[{size:bt()}],"inline-size":[{inline:["auto",...W()]}],"min-inline-size":[{"min-inline":["auto",...W()]}],"max-inline-size":[{"max-inline":["none",...W()]}],"block-size":[{block:["auto",...Q()]}],"min-block-size":[{"min-block":["auto",...Q()]}],"max-block-size":[{"max-block":["none",...Q()]}],w:[{w:[l,"screen",...bt()]}],"min-w":[{"min-w":[l,"screen","none",...bt()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[r]},...bt()]}],h:[{h:["screen","lh",...bt()]}],"min-h":[{"min-h":["screen","lh","none",...bt()]}],"max-h":[{"max-h":["screen","lh",...bt()]}],"font-size":[{text:["base",n,Te,Gt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,Np,Lp]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Xn,E]}],"font-family":[{font:[Op,jp,e]}],"font-features":[{"font-features":[E]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,R,E]}],"line-clamp":[{"line-clamp":[O,"none",R,Dr]}],leading:[{leading:[o,...g()]}],"list-image":[{"list-image":["none",R,E]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",R,E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...at(),"wavy"]}],"text-decoration-thickness":[{decoration:[O,"from-font","auto",R,Gt]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[O,"auto",R,E]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:g()}],"tab-size":[{tab:[St,R,E]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",R,E]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",R,E]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:dt()}],"bg-repeat":[{bg:Qt()}],"bg-size":[{bg:Oe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},St,R,E],radial:["",R,E],conic:[St,R,E]},Bp,Ip]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:Jt()}],"gradient-via-pos":[{via:Jt()}],"gradient-to-pos":[{to:Jt()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:et()}],"rounded-s":[{"rounded-s":et()}],"rounded-e":[{"rounded-e":et()}],"rounded-t":[{"rounded-t":et()}],"rounded-r":[{"rounded-r":et()}],"rounded-b":[{"rounded-b":et()}],"rounded-l":[{"rounded-l":et()}],"rounded-ss":[{"rounded-ss":et()}],"rounded-se":[{"rounded-se":et()}],"rounded-ee":[{"rounded-ee":et()}],"rounded-es":[{"rounded-es":et()}],"rounded-tl":[{"rounded-tl":et()}],"rounded-tr":[{"rounded-tr":et()}],"rounded-br":[{"rounded-br":et()}],"rounded-bl":[{"rounded-bl":et()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-bs":[{"border-bs":J()}],"border-w-be":[{"border-be":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...at(),"hidden","none"]}],"divide-style":[{divide:[...at(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...at(),"none","hidden"]}],"outline-offset":[{"outline-offset":[O,R,E]}],"outline-w":[{outline:["",O,Te,Gt]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",a,Ye,Ke]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",c,Ye,Ke]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[O,Gt]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",h,Ye,Ke]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[O,R,E]}],"mix-blend":[{"mix-blend":[...me(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":me()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[O]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[R,E]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":P()}],"mask-image-conic-pos":[{"mask-conic":[O]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:dt()}],"mask-repeat":[{mask:Qt()}],"mask-size":[{mask:Oe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",R,E]}],filter:[{filter:["","none",R,E]}],blur:[{blur:ge()}],brightness:[{brightness:[O,R,E]}],contrast:[{contrast:[O,R,E]}],"drop-shadow":[{"drop-shadow":["","none",m,Ye,Ke]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",O,R,E]}],"hue-rotate":[{"hue-rotate":[O,R,E]}],invert:[{invert:["",O,R,E]}],saturate:[{saturate:[O,R,E]}],sepia:[{sepia:["",O,R,E]}],"backdrop-filter":[{"backdrop-filter":["","none",R,E]}],"backdrop-blur":[{"backdrop-blur":ge()}],"backdrop-brightness":[{"backdrop-brightness":[O,R,E]}],"backdrop-contrast":[{"backdrop-contrast":[O,R,E]}],"backdrop-grayscale":[{"backdrop-grayscale":["",O,R,E]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[O,R,E]}],"backdrop-invert":[{"backdrop-invert":["",O,R,E]}],"backdrop-opacity":[{"backdrop-opacity":[O,R,E]}],"backdrop-saturate":[{"backdrop-saturate":[O,R,E]}],"backdrop-sepia":[{"backdrop-sepia":["",O,R,E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":g()}],"border-spacing-x":[{"border-spacing-x":g()}],"border-spacing-y":[{"border-spacing-y":g()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",R,E]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[O,"initial",R,E]}],ease:[{ease:["linear","initial",T,R,E]}],delay:[{delay:[O,R,E]}],animate:[{animate:["none",w,R,E]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,R,E]}],"perspective-origin":[{"perspective-origin":j()}],rotate:[{rotate:xt()}],"rotate-x":[{"rotate-x":xt()}],"rotate-y":[{"rotate-y":xt()}],"rotate-z":[{"rotate-z":xt()}],scale:[{scale:Vt()}],"scale-x":[{"scale-x":Vt()}],"scale-y":[{"scale-y":Vt()}],"scale-z":[{"scale-z":Vt()}],"scale-3d":["scale-3d"],skew:[{skew:Et()}],"skew-x":[{"skew-x":Et()}],"skew-y":[{"skew-y":Et()}],transform:[{transform:[R,E,"","none","gpu","cpu"]}],"transform-origin":[{origin:j()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Nt()}],"translate-x":[{"translate-x":Nt()}],"translate-y":[{"translate-y":Nt()}],"translate-z":[{"translate-z":Nt()}],"translate-none":["translate-none"],zoom:[{zoom:[St,R,E]}],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",R,E]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":A()}],"scrollbar-track-color":[{"scrollbar-track":A()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":g()}],"scroll-mx":[{"scroll-mx":g()}],"scroll-my":[{"scroll-my":g()}],"scroll-ms":[{"scroll-ms":g()}],"scroll-me":[{"scroll-me":g()}],"scroll-mbs":[{"scroll-mbs":g()}],"scroll-mbe":[{"scroll-mbe":g()}],"scroll-mt":[{"scroll-mt":g()}],"scroll-mr":[{"scroll-mr":g()}],"scroll-mb":[{"scroll-mb":g()}],"scroll-ml":[{"scroll-ml":g()}],"scroll-p":[{"scroll-p":g()}],"scroll-px":[{"scroll-px":g()}],"scroll-py":[{"scroll-py":g()}],"scroll-ps":[{"scroll-ps":g()}],"scroll-pe":[{"scroll-pe":g()}],"scroll-pbs":[{"scroll-pbs":g()}],"scroll-pbe":[{"scroll-pbe":g()}],"scroll-pt":[{"scroll-pt":g()}],"scroll-pr":[{"scroll-pr":g()}],"scroll-pb":[{"scroll-pb":g()}],"scroll-pl":[{"scroll-pl":g()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",R,E]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[O,Te,Gt,Dr]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Wp=bp(zp);function Ga(...t){return Wp(Ra(t))}const Up=Zf("group/button inline-flex cursor-pointer shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-semibold whitespace-nowrap transition-[background-color,border-color,color,box-shadow,opacity,transform] duration-150 outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/25 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-45 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm shadow-primary/15 hover:bg-primary/90 hover:shadow-md hover:shadow-primary/20",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-transparent dark:hover:bg-input/30",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 gap-1.5 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5",xs:"h-6 gap-1 px-2.5 text-xs has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",lg:"h-10 gap-1.5 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-9","icon-xs":"size-6 [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Gp({className:t,variant:e="default",size:n="default",...s}){return v.jsx(dl,{"data-slot":"button","data-size":n,className:Ga(Up({variant:e,size:n,className:t})),...s})}var $p={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};const Hp=(t,e,n,s)=>{const i=p.forwardRef(({color:o="currentColor",size:r=24,stroke:l=2,title:d,className:u,children:a,...c},h)=>p.createElement("svg",{ref:h,...$p[t],width:r,height:r,className:["tabler-icon",`tabler-icon-${e}`,u].join(" "),...t==="filled"?{fill:o}:{strokeWidth:l,stroke:o},...c},[d&&p.createElement("title",{key:"svg-title"},d),...s.map(([m,f])=>p.createElement(m,f)),...Array.isArray(a)?a:[a]]));return i.displayName=`${n}`,i};const qp=[["path",{d:"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]],Kp=Hp("outline","copy","Copy",qp),Yp=new Set(["https:","http:","mailto:"]);function Xp(t){const e=t.startsWith("//")?`https:${t}`:t;let n;try{n=new URL(e)}catch{return null}return Yp.has(n.protocol)?n.toString():null}let ae=null;async function jm(){if(!navigator.clipboard?.readText)throw new Error("Text clipboard access is unavailable.");return navigator.clipboard.readText()}async function Zp(t){if(!navigator.clipboard?.writeText)throw new Error("Text clipboard access is unavailable.");await navigator.clipboard.writeText(t),ae=null}async function Im(t,e){if(!navigator.clipboard?.writeText)throw new Error("Text clipboard access is unavailable.");await navigator.clipboard.writeText(t.join(`\r
47
+ `)),ae=e?{paths:[...t],transferId:e}:null}function Om(t){return!ae||!Qp(ae.paths,t)?(ae=null,null):ae.transferId}function Fm(t){const e=Xp(t);if(!e)throw new Error("Only web or mail links can be opened.");window.open(e,"_blank","noopener,noreferrer")}function Qp(t,e){return t.length===e.length&&t.every((n,s)=>n===e[s])}const Jp=600;function Bm({delay:t=Jp,...e}){return v.jsx(hl,{"data-slot":"tooltip-provider",delay:t,...e})}function tm({...t}){return v.jsx(fl,{"data-slot":"tooltip",...t})}function em({...t}){return v.jsx(pl,{"data-slot":"tooltip-trigger",...t})}function nm({className:t,side:e="top",sideOffset:n=4,align:s="center",alignOffset:i=0,anchor:o,children:r,...l}){return v.jsx(ml,{children:v.jsx(gl,{align:s,alignOffset:i,anchor:o,side:e,sideOffset:n,className:"isolate z-50 data-[anchor-hidden]:invisible",children:v.jsxs(yl,{"data-slot":"tooltip-content",className:Ga("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-xl bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-lg data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...l,children:[r,v.jsx(vl,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:translate-x-[1.5px] data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:translate-x-[-1.5px] data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:translate-x-[-1.5px] data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:translate-x-[1.5px] data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}function sm({value:t,label:e="Copy",onCopied:n,onError:s}){const[i,o]=p.useState(!1);p.useEffect(()=>{if(!i)return;const l=window.setTimeout(()=>o(!1),2e3);return()=>window.clearTimeout(l)},[i]);const r=async()=>{try{await Zp(t),o(!0),n?.()}catch{o(!1),s?.()}};return v.jsxs(v.Fragment,{children:[v.jsxs(tm,{children:[v.jsxs(em,{render:v.jsx("button",{type:"button",className:"copy-button","aria-label":i?"Copied":e,"data-copy-state":i?"copied":void 0,onClick:()=>{r()}}),children:[v.jsx(Kp,{className:"copy-button-icon","aria-hidden":"true"}),v.jsx("span",{className:"copy-button-check","aria-hidden":"true",children:"✓"})]}),v.jsx(nm,{children:i?"Copied":e})]}),v.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:i?"Copied":""})]})}const $a=document.documentElement.dataset.opentigProfile==="dev",Nm=$a?"OpenTig Dev":"OpenTig";function im(){const t=$a?"npm run pair:web:dev":"opentig pair",[e,n]=p.useState(!1);return v.jsxs("div",{className:"mt-3",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("code",{className:"min-w-0 select-text break-words text-sm",children:t}),v.jsx(sm,{value:t,label:"Copy command",onCopied:()=>n(!1),onError:()=>n(!0)})]}),e&&v.jsx("p",{className:"mt-2 text-sm text-destructive",role:"alert",children:"Could not copy. Select and copy the command manually."})]})}const rm=3600*1e3,om=60*1e3,am=10*1e3;function lm({request:t=fetch,page:e=document,lifecycle:n=window}={}){let s=!1,i=null,o,r;const l=()=>{s||(o=setTimeout(()=>{d()},om))},d=async()=>{if(s||i||e.visibilityState!=="visible")return;clearTimeout(o);const c=new AbortController;i=c,r=setTimeout(()=>c.abort(),am);try{const h=await t("/api/auth/renew",{method:"POST",credentials:"include",cache:"no-store",signal:c.signal});!h.ok&&h.status!==401&&h.status!==403&&l()}catch{l()}finally{clearTimeout(r),i=null}},u=()=>{d()},a=setInterval(u,rm);return e.addEventListener("visibilitychange",u),n.addEventListener("focus",u),n.addEventListener("online",u),u(),()=>{s=!0,clearInterval(a),clearTimeout(o),clearTimeout(r),i?.abort(),e.removeEventListener("visibilitychange",u),n.removeEventListener("focus",u),n.removeEventListener("online",u)}}const x={bootstrap:"app:bootstrap",capabilities:"app:capabilities",preferences:"app:preferences",filesTreeStateUpdate:"app:files-tree-state",openFilesStateUpdate:"app:open-files-state",projectCreate:"projects:create",projectRename:"projects:rename",projectRemove:"projects:remove",projectAssign:"projects:assign",projectMove:"projects:move",projectMoveRepository:"projects:move-repository",repositoryPreparePath:"repository:prepare-path",repositoryCompleteSetup:"repository:complete-setup",repositoryOpenPath:"repository:open-path",repositoryBrowseDirectories:"repository:browse-directories",repositoryOpenRecent:"repository:open-recent",repositoryRelocateRecent:"repository:relocate-recent",repositoryForget:"repository:forget",repositoryStatus:"repository:status",repositoryFiles:"repository:files",repositoryDirectoryEntries:"repository:directory-entries",repositoryReadFile:"repository:read-file",repositoryGetFavicon:"repository:favicon",repositoryWriteFile:"repository:write-file",repositoryAbsolutePath:"repository:absolute-path",repositoryCopyEntries:"repository:copy-entries",repositoryCutEntries:"repository:cut-entries",repositoryPasteEntries:"repository:paste-entries",repositoryMoveEntry:"repository:move-entry",repositoryDeleteEntry:"repository:delete-entry",repositoryMoveEntries:"repository:move-entries",repositoryDeleteEntries:"repository:delete-entries",repositoryRenameEntry:"repository:rename-entry",repositoryCreateEntry:"repository:create-entry",repositoryFileHistoryState:"repository:file-history-state",repositoryUndoFileOperation:"repository:undo-file-operation",repositoryRedoFileOperation:"repository:redo-file-operation",repositorySearch:"repository:search",repositoryReplaceSearch:"repository:replace-search",diffGet:"diff:get",diffCommit:"diff:commit",diffCommitFile:"diff:commit-file",indexStage:"index:stage",indexUnstage:"index:unstage",indexDiscard:"index:discard",indexStageAll:"index:stage-all",indexUnstageAll:"index:unstage-all",indexPrepareCommitGroup:"index:prepare-commit-group",indexUpdateConflict:"index:update-conflict",indexResolveConflict:"index:resolve-conflict",commitCreate:"commit:create",commitUndoLatest:"commit:undo-latest",commitsList:"commits:list",commitsFiles:"commits:files",commitAuthorship:"commits:authorship",commitSetAuthorship:"commits:set-authorship",branchesList:"refs:branches",branchSwitch:"refs:switch",worktreesList:"refs:worktrees",worktreeSelect:"refs:select-worktree",refsPull:"refs:pull",refsPush:"refs:push",refsPushContext:"refs:push-context",refsFetch:"refs:fetch",localRefsSnapshot:"refs:local-snapshot",branchDetails:"refs:branch-details",worktreeDetails:"refs:worktree-details",branchDelete:"refs:delete-branch",worktreeRemove:"refs:remove-worktree",remoteBranchDetails:"refs:remote-branch-details",trackingBranchCreate:"refs:create-tracking-branch",remoteBranchDelete:"refs:delete-remote-branch",branchesFetch:"refs:fetch-branches",aiStatuses:"ai:statuses",aiGenerateCommitMessage:"ai:generate-commit-message",aiCancelGeneration:"ai:cancel-generation",aiLog:"ai:log",aiClearLog:"ai:clear-log",diagnosticsList:"diagnostics:list",diagnosticsClear:"diagnostics:clear",diagnosticsRecord:"diagnostics:record",githubAccountsStatus:"github:accounts-status",githubSetDefaultAccount:"github:set-default-account",githubRepositoryAccount:"github:repository-account",githubSetRepositoryAccount:"github:set-repository-account",githubStatus:"github:status",githubRepositoryInfo:"github:repository-info",githubPrForBranch:"github:pr-for-branch",githubPrList:"github:pr-list",githubPrView:"github:pr-view",githubPrStack:"github:pr-stack",githubPrDiff:"github:pr-diff",githubPrCommitDiff:"github:pr-commit-diff",githubPrCreate:"github:pr-create",githubPrDraft:"github:pr-draft",githubPrDraftCancel:"github:pr-draft-cancel"},cm=9*6e4,um=cm+3e4,Ir=um+3e4,dm=4,hm={protocolVersion:dm},fm=hm.protocolVersion,Zn=1;class Sn extends Error{}class ne extends Sn{}class Or extends Sn{}class Qn extends Sn{}class Fr extends Sn{}class pm{url;createSocket;requestTimeoutMs;heartbeatMs;reconnectBaseMs;reconnectMaxMs;offlineAfterAttempts;random;pending=new Map;connectionWaiters=new Set;stateListeners=new Set;eventListeners=new Set;reconnectListeners=new Set;socket=null;state="connecting";requestSequence=0;socketGeneration=0;reconnectAttempts=0;reconnectTimer=null;heartbeatTimer=null;awaitingPong=!1;started=!1;stopped=!1;connectedBefore=!1;constructor(e={}){this.url=e.url??gm(),this.createSocket=e.createSocket??(n=>new WebSocket(n)),this.requestTimeoutMs=e.requestTimeoutMs??3e4,this.heartbeatMs=e.heartbeatMs??2e4,this.reconnectBaseMs=e.reconnectBaseMs??250,this.reconnectMaxMs=e.reconnectMaxMs??5e3,this.offlineAfterAttempts=e.offlineAfterAttempts??5,this.random=e.random??Math.random}getState=()=>this.state;subscribeState=e=>(this.stateListeners.add(e),this.start(),()=>this.stateListeners.delete(e));onEvent(e){return this.eventListeners.add(e),this.start(),()=>this.eventListeners.delete(e)}onReconnect(e){return this.reconnectListeners.add(e),()=>this.reconnectListeners.delete(e)}async request(e,n,s={}){const i=s.timeoutMs??this.requestTimeoutMs,o=Date.now();if(this.start(),await this.waitForConnection(i,s.signal),s.signal?.aborted)throw Xe();const r=this.socket;if(!r||r.readyState!==Zn)throw new ne("OpenTig server disconnected.");const l=`${Date.now().toString(36)}-${(++this.requestSequence).toString(36)}`,d=Math.max(1,i-(Date.now()-o));return new Promise((u,a)=>{const c={resolve:u,reject:a,timer:setTimeout(()=>{this.finishPending(l),a(new Fr(`Server request timed out: ${String(e)}`))},d),...s.signal?{signal:s.signal}:{}};s.signal&&(c.abort=()=>{this.finishPending(l),a(Xe())},s.signal.addEventListener("abort",c.abort,{once:!0})),this.pending.set(l,c);try{const h=[...n];for(;h.length>0&&h.at(-1)===void 0;)h.pop();r.send(JSON.stringify({type:"request",id:l,command:e,args:h}))}catch{this.finishPending(l),a(new ne("Could not send request to the OpenTig server."))}})}markIncompatible(){this.stopped=!0,this.clearReconnect(),this.setState("incompatible-version"),this.rejectConnectionWaiters(new Qn("OpenTig server protocol is incompatible.")),this.rejectPending(new Qn("OpenTig server protocol is incompatible.")),this.socket?.close(1e3,"Incompatible protocol")}close(){this.stopped=!0,this.clearReconnect(),this.clearHeartbeat(),this.rejectConnectionWaiters(new ne("OpenTig server connection closed.")),this.rejectPending(new ne("OpenTig server connection closed.")),this.socket?.close(1e3,"Client closing"),this.socket=null}start(){this.started||this.stopped||(this.started=!0,this.connect())}connect(){if(this.stopped)return;this.clearReconnect();const e=++this.socketGeneration;let n;try{n=this.createSocket(this.url)}catch{this.disconnected(e,0);return}this.socket=n,n.onopen=()=>{if(e!==this.socketGeneration||this.stopped)return;const s=this.connectedBefore;if(this.connectedBefore=!0,this.reconnectAttempts=0,this.setState("connected"),this.resolveConnectionWaiters(),this.startHeartbeat(),s)for(const i of this.reconnectListeners)Promise.resolve(i()).catch(()=>{})},n.onmessage=s=>this.message(e,s.data),n.onerror=()=>{},n.onclose=s=>this.disconnected(e,s.code)}message(e,n){if(e!==this.socketGeneration||typeof n!="string")return;let s;try{s=JSON.parse(n)}catch{return}if(s.type==="pong"){this.awaitingPong=!1;return}if(s.type==="event"){for(const o of this.eventListeners)o(s.event);return}if(s.type!=="result")return;const i=this.pending.get(s.id);i&&(this.finishPending(s.id),mm(i,s.result))}disconnected(e,n){if(e!==this.socketGeneration)return;this.socket=null,this.clearHeartbeat();const s=n===1008?new Or("Authentication required."):new ne("OpenTig server disconnected before the request completed.");if(this.rejectPending(s),this.stopped)return;if(n===1008){this.stopped=!0,this.setState("auth-required"),this.rejectConnectionWaiters(s);return}this.reconnectAttempts+=1,this.setState(this.reconnectAttempts>=this.offlineAfterAttempts?"offline":"reconnecting");const i=Math.min(this.reconnectMaxMs,this.reconnectBaseMs*2**(this.reconnectAttempts-1)),o=Math.max(0,Math.round(i*(.5+this.random())));this.reconnectTimer=setTimeout(()=>this.connect(),o)}waitForConnection(e,n){return this.state==="connected"&&this.socket?.readyState===Zn?Promise.resolve():this.state==="auth-required"?Promise.reject(new Or("Authentication required.")):this.state==="incompatible-version"?Promise.reject(new Qn("OpenTig server protocol is incompatible.")):this.stopped?Promise.reject(new ne("OpenTig server connection is closed.")):n?.aborted?Promise.reject(Xe()):new Promise((s,i)=>{const o={resolve:s,reject:i,timer:setTimeout(()=>{this.removeConnectionWaiter(o),i(new Fr("Timed out waiting for the OpenTig server."))},e),...n?{signal:n}:{}};n&&(o.abort=()=>{this.removeConnectionWaiter(o),i(Xe())},n.addEventListener("abort",o.abort,{once:!0})),this.connectionWaiters.add(o)})}resolveConnectionWaiters(){for(const e of[...this.connectionWaiters])this.removeConnectionWaiter(e),e.resolve()}rejectConnectionWaiters(e){for(const n of[...this.connectionWaiters])this.removeConnectionWaiter(n),n.reject(e)}removeConnectionWaiter(e){clearTimeout(e.timer),e.signal&&e.abort&&e.signal.removeEventListener("abort",e.abort),this.connectionWaiters.delete(e)}finishPending(e){const n=this.pending.get(e);n&&(clearTimeout(n.timer),n.signal&&n.abort&&n.signal.removeEventListener("abort",n.abort),this.pending.delete(e))}rejectPending(e){for(const[n,s]of[...this.pending])this.finishPending(n),s.reject(e)}startHeartbeat(){this.clearHeartbeat(),this.heartbeatTimer=setInterval(()=>{const e=this.socket;if(!(!e||e.readyState!==Zn)){if(this.awaitingPong){e.close(4e3,"Heartbeat timeout");return}this.awaitingPong=!0,e.send(JSON.stringify({type:"ping"}))}},this.heartbeatMs)}clearHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=null,this.awaitingPong=!1}clearReconnect(){this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=null}setState(e){if(this.state!==e){this.state=e;for(const n of this.stateListeners)n()}}}function mm(t,e){if(e.ok){t.resolve(e.value);return}const n=new Error(e.error.message);n.detail=e.error,t.reject(n)}function gm(){const t=new URL("/ws",window.location.href);return t.protocol=t.protocol==="https:"?"wss:":"ws:",t.href}function Xe(){return new DOMException("The request was cancelled.","AbortError")}function ym(t={}){const e=t.transport??new pm,n=t.httpOrigin??globalThis.location?.origin??"http://127.0.0.1",s=t.fetch??fetch,i=new Set,o=new Set,r=new Set,l=(a,...c)=>e.request(a,c),u={app:{bootstrap:async()=>{const a=await e.request(x.bootstrap,[]);if(!a.server||a.server.protocolVersion!==fm)throw e.markIncompatible(),new Error("This OpenTig client is incompatible with the server.");return a},capabilities:()=>l(x.capabilities),setPreferences:a=>l(x.preferences,a),setFilesTreeExpandedPaths:(a,c)=>l(x.filesTreeStateUpdate,a,c),setOpenFilesState:(a,c,h,m)=>l(x.openFilesStateUpdate,a,c,h,m)},projects:{create:a=>l(x.projectCreate,a),rename:(a,c)=>l(x.projectRename,a,c),remove:a=>l(x.projectRemove,a),assign:(a,c)=>l(x.projectAssign,a,c),moveProject:(a,c)=>l(x.projectMove,a,c),moveRepository:(a,c)=>l(x.projectMoveRepository,a,c)},repository:{preparePath:a=>l(x.repositoryPreparePath,a),completeSetup:(a,c)=>l(x.repositoryCompleteSetup,a,c),openPath:a=>l(x.repositoryOpenPath,a),browseDirectories:a=>a===void 0?l(x.repositoryBrowseDirectories):l(x.repositoryBrowseDirectories,a),openRecent:a=>l(x.repositoryOpenRecent,a),forget:a=>l(x.repositoryForget,a),relocateRecent:(a,c)=>l(x.repositoryRelocateRecent,a,c),getStatus:(a,c)=>l(x.repositoryStatus,a,c),getFiles:a=>l(x.repositoryFiles,a),getDirectoryEntries:(a,c)=>l(x.repositoryDirectoryEntries,a,c),readFile:(a,c,h)=>l(x.repositoryReadFile,a,c,h),readImage:(a,c)=>bm(s,n,a,c),getFavicon:a=>l(x.repositoryGetFavicon,a),writeFile:(a,c,h,m)=>l(x.repositoryWriteFile,a,c,h,m),getAbsolutePath:(a,c)=>l(x.repositoryAbsolutePath,a,c),copyEntries:(a,c)=>l(x.repositoryCopyEntries,a,c),cutEntries:(a,c)=>l(x.repositoryCutEntries,a,c),pasteEntries:(a,c,h,m,f)=>l(x.repositoryPasteEntries,a,c,h,m,f),moveEntry:(a,c,h)=>l(x.repositoryMoveEntry,a,c,h),moveEntries:(a,c,h)=>l(x.repositoryMoveEntries,a,c,h),deleteEntry:(a,c)=>l(x.repositoryDeleteEntry,a,c),deleteEntries:(a,c)=>l(x.repositoryDeleteEntries,a,c),renameEntry:(a,c,h)=>l(x.repositoryRenameEntry,a,c,h),createEntry:(a,c,h,m)=>l(x.repositoryCreateEntry,a,c,h,m),search:(a,c)=>l(x.repositorySearch,a,c),replaceSearch:(a,c)=>l(x.repositoryReplaceSearch,a,c),fileHistoryState:a=>l(x.repositoryFileHistoryState,a),undoFileOperation:a=>l(x.repositoryUndoFileOperation,a),redoFileOperation:a=>l(x.repositoryRedoFileOperation,a)},diff:{get:a=>l(x.diffGet,a),getCommit:(a,c)=>l(x.diffCommit,a,c),getCommitFile:(a,c,h,m)=>l(x.diffCommitFile,a,c,h,m)},index:{stage:(a,c)=>l(x.indexStage,a,c),unstage:(a,c)=>l(x.indexUnstage,a,c),discard:(a,c)=>l(x.indexDiscard,a,c),stageAll:a=>l(x.indexStageAll,a),unstageAll:a=>l(x.indexUnstageAll,a),prepareCommitGroup:a=>l(x.indexPrepareCommitGroup,a),updateConflict:(a,c,h)=>l(x.indexUpdateConflict,a,c,h),resolveConflict:(a,c,h)=>l(x.indexResolveConflict,a,c,h)},commits:{authorship:a=>l(x.commitAuthorship,a),setAuthorship:(a,c)=>l(x.commitSetAuthorship,a,c),create:(a,c)=>l(x.commitCreate,a,c),undoLatest:(a,c)=>l(x.commitUndoLatest,a,c),list:(a,c)=>l(x.commitsList,a,c),files:(a,c)=>l(x.commitsFiles,a,c)},refs:{listBranches:a=>l(x.branchesList,a),switchBranch:(a,c,h)=>l(x.branchSwitch,a,c,h),listWorktrees:a=>l(x.worktreesList,a),selectWorktree:(a,c)=>l(x.worktreeSelect,a,c),pull:a=>l(x.refsPull,a),pushContext:(a,c)=>l(x.refsPushContext,a,c),push:(a,c,h)=>l(x.refsPush,a,c,h),fetch:a=>l(x.refsFetch,a),localRefsSnapshot:a=>l(x.localRefsSnapshot,a),branchDetails:a=>l(x.branchDetails,a),remoteBranchDetails:a=>l(x.remoteBranchDetails,a),createTrackingBranch:a=>l(x.trackingBranchCreate,a),deleteRemoteBranch:a=>l(x.remoteBranchDelete,a),fetchBranches:a=>l(x.branchesFetch,a),worktreeDetails:a=>l(x.worktreeDetails,a),deleteBranch:a=>l(x.branchDelete,a),removeWorktree:a=>l(x.worktreeRemove,a)},ai:{statuses:a=>l(x.aiStatuses,a),generateCommitMessage:a=>e.request(x.aiGenerateCommitMessage,[a],{timeoutMs:Ir}),cancelGeneration:a=>l(x.aiCancelGeneration,a),log:()=>l(x.aiLog),clearLog:()=>l(x.aiClearLog)},github:{setDefaultAccount:a=>l(x.githubSetDefaultAccount,a),accountsStatus:a=>e.request(x.githubAccountsStatus,[a],{timeoutMs:9e4}),repositoryAccount:(a,c)=>e.request(x.githubRepositoryAccount,[a,c],{timeoutMs:6e4}),setRepositoryAccount:(a,c,h)=>h===void 0?l(x.githubSetRepositoryAccount,a,c):l(x.githubSetRepositoryAccount,a,c,h),status:a=>l(x.githubStatus,a),repositoryInfo:a=>l(x.githubRepositoryInfo,a),findPullRequestForBranch:(a,c)=>l(x.githubPrForBranch,a,c),listPullRequests:(a,c)=>l(x.githubPrList,a,c),getPullRequest:(a,c)=>l(x.githubPrView,a,c),getPullRequestStack:(a,c)=>l(x.githubPrStack,a,c),getPullRequestDiff:(a,c)=>l(x.githubPrDiff,a,c),getPullRequestCommitDiff:(a,c)=>l(x.githubPrCommitDiff,a,c),createPullRequest:a=>l(x.githubPrCreate,a),generateDraft:a=>e.request(x.githubPrDraft,[a],{timeoutMs:Ir}),cancelDraft:a=>l(x.githubPrDraftCancel,a)},diagnostics:{list:()=>l(x.diagnosticsList),clear:()=>l(x.diagnosticsClear),record:a=>l(x.diagnosticsRecord,a)},events:{onGitHubAccountsChanged:a=>Jn(o,a),onRepositoryChanged:a=>Jn(i,a),onActiveRepositoryChanged:a=>Jn(r,a)}};return e.onEvent(a=>vm(a,i,r,o)),e.onReconnect(async()=>{const a=await u.app.bootstrap();for(const c of o)c();if(a.activeRepository){for(const c of r)c(a.activeRepository);for(const c of i)c(a.activeRepository.id,"unknown")}}),{api:u,transport:e}}function Jn(t,e){return t.add(e),()=>t.delete(e)}function vm(t,e,n,s){if(t.type==="repository.changed")for(const i of e)i(t.repositoryId,t.scope);else if(t.type==="repository.active-changed")for(const i of n)i(t.repository);else for(const i of s)i(t.repositoryIds,t.inventoryChanged)}async function bm(t,e,n,s){const i=s.split("/").map(encodeURIComponent).join("/"),o=new URL(`/api/image/${encodeURIComponent(n)}/${i}`,e),r=await t(o,{credentials:"include"});if(r.status===413||r.status===415)return r.json();if(!r.ok)throw new Error(r.status===401?"Authentication required.":"Could not load image preview.");const l=r.headers.get("content-type");if(!l?.startsWith("image/"))throw new Error("Server returned an invalid image preview.");const d=new Uint8Array(await r.arrayBuffer());return{status:"ready",path:s,mimeType:l,data:d,size:Number(r.headers.get("content-length")??d.byteLength),mtimeMs:Number(r.headers.get("x-opentig-mtime-ms")??0)}}const on=ym(),st=window.opentigDesktop,$t=on.api,_m={...$t,app:{...$t.app,bootstrap:async()=>{const t=await $t.app.bootstrap();return await st?.app.preferencesChanged(t.preferences),t},capabilities:async()=>{const t=await $t.app.capabilities();return{...t,runtimeMode:st?"desktop":t.runtimeMode,nativePicker:!!st,fileClipboard:!!st,revealInFileManager:!!st}},setPreferences:async t=>{const e=await $t.app.setPreferences(t);return await st?.app.preferencesChanged(e),e},setZoomFactor:t=>{st?st.app.setZoomFactor(t):document.documentElement.style.zoom=String(Math.max(.8,Math.min(1.3,Number(t)||1)))},setTitleBarTheme:t=>st?.app.setTitleBarTheme(t)??Promise.resolve()},clipboard:{readFilePaths:()=>st?.clipboard.readFilePaths()??Promise.resolve([]),readImagePng:()=>st?.clipboard.readImagePng()??Promise.resolve(null)},repository:{...$t.repository,select:async t=>st?st.repository.select(t):window.prompt(t??"Repository path on the OpenTig server")?.trim()||null,selectRelocation:async(t,e)=>st?st.repository.selectRelocation(t,e):window.prompt(`New server path for ${t}`,e)?.trim()||null,revealEntry:async(t,e)=>{if(!st)throw new Error("Reveal in file manager is available only in the desktop app.");const n=await $t.repository.getAbsolutePath(t,e);await st.repository.revealEntry(n)}}},xm={connecting:"Connecting to OpenTig server…",connected:"Server connected",reconnecting:"Reconnecting to OpenTig server…","auth-required":"Authentication required","incompatible-version":"Client and server versions are incompatible",offline:"OpenTig server is offline"};let wm=0;function Tm({children:t}){const e=p.useSyncExternalStore(on.transport.subscribeState,on.transport.getState,on.transport.getState),[n,s]=p.useState(!1),i=p.useRef(null);if(p.useEffect(()=>{if(e==="connected"&&!window.opentigDesktop)return lm()},[e]),p.useEffect(()=>{if(n&&e!=="connected"&&e!=="auth-required"){const o={id:i.current??`server-connection:${++wm}`,title:xm[e],type:e==="connecting"||e==="reconnecting"?"warning":"error",position:"bottom-right",duration:null,autopilot:!1,...e==="incompatible-version"?{button:{title:"Reload",onClick:()=>window.location.reload()}}:{}};i.current=Yn.show(o)}else i.current&&(Yn.dismiss(i.current),i.current=null)},[n,e]),p.useEffect(()=>()=>{i.current&&Yn.dismiss(i.current),i.current=null},[]),p.useEffect(()=>(e==="connected"&&s(!0),document.documentElement.dataset.serverConnection=e,()=>{delete document.documentElement.dataset.serverConnection}),[e]),e==="auth-required"){const o=!!window.opentigDesktop;return v.jsx("main",{className:"access-page flex min-h-dvh items-center justify-center bg-background px-4 py-6 text-foreground",children:v.jsxs("section",{className:"w-full max-w-md rounded-xl border border-border bg-card p-6 shadow-sm",role:"status",children:[v.jsx("h1",{className:"text-lg font-semibold",children:"Authentication required"}),v.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:o?"Restart OpenTig to restore its private desktop session.":v.jsx(v.Fragment,{children:"If Web access is paused, enable it in Settings → Web access and reload to resume your saved session. New browsers and expired or revoked sessions need a pairing code from the desktop app or the command below."})}),!o&&v.jsxs(v.Fragment,{children:[v.jsx(im,{}),v.jsx(Gp,{className:"mt-5",nativeButton:!1,render:v.jsx("a",{href:"/pair"}),children:"Check browser access"})]})]})})}return!n&&(e==="offline"||e==="incompatible-version")?v.jsx(Xf,{heading:e==="offline"?"OpenTig server is offline":"OpenTig cannot continue",detail:e==="offline"?"See the server log for details, then restart OpenTig.":"Client and server versions are incompatible.",busy:!1}):t}function Sm(t,e){return t===e?t:t==="unknown"||e==="unknown"?"unknown":t==="worktree"&&e==="index"||t==="index"&&e==="worktree"?"index":"unknown"}function zm(t,e){return{...t.manual||e.manual?{manual:!0}:{},scope:Sm(t.scope,e.scope),background:t.background&&e.background,view:e.view}}function Wm(t,e){return e!=="diff"&&e!=="conflict"?!1:t==="worktree"||t==="index"||t==="unknown"}function Um(t){return t==="worktree"||t==="index"||t==="unknown"}function km(t,e){const n=t==="unknown";return{status:!0,branches:n||t==="refs"||t==="worktrees",worktrees:n||t==="worktrees",files:e==="files"&&(n||t==="worktree"||t==="index"),history:e==="history"&&(n||t==="refs")}}const Pm=new cl({defaultOptions:{queries:{networkMode:"always",retry:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1,staleTime:0},mutations:{networkMode:"always",retry:!1}}}),Gm={commitAuthorship:t=>["repository",t,"commit-authorship"],githubAccounts:["github","accounts"],githubCliStatus:["github","cli-status"],githubAccount:t=>["repository",t,"github-account"],aiStatuses:t=>["ai","statuses",t],repository:t=>["repository",t],status:t=>["repository",t,"status"],branches:t=>["repository",t,"branches"],worktrees:t=>["repository",t,"worktrees"],files:t=>["repository",t,"files"],fileHistory:t=>["repository",t,"file-history"],history:t=>["repository",t,"history"],githubInfo:t=>["repository",t,"github-info"],pulls:(t,e)=>["repository",t,"pulls",...e],pullRequest:(t,e)=>["repository",t,"pull-request",e],pullRequestStack:(t,e)=>["repository",t,"pull-request-stack",e],pullRequestDiff:(t,e)=>["repository",t,"pull-request-diff",e],pullRequestCommitDiff:(t,e)=>["repository",t,"pull-request-commit-diff",e],search:(t,e)=>["repository",t,"search",e],localRefs:t=>["repository",t,"local-refs"],branchDetails:(t,e)=>["repository",t,"branch-details",e],remoteBranchDetails:(t,e)=>["repository",t,"remote-branch-details",e],branchPullRequest:(t,e)=>["repository",t,"branch-pull-request",e],worktreeDetails:(t,e)=>["repository",t,"worktree-details",e]};function $m(t,e){const n=km(t,e);return["status","branches","worktrees","files","history"].filter(s=>n[s])}async function Hm(t,e,n=!1){const s=new Set(["push-context","github-account","pulls","pull-request","pull-request-stack","pull-request-diff","pull-request-commit-diff","branch-pull-request"]),i=o=>(!e||n&&o.queryKey[1]==="accounts")&&o.queryKey[0]==="github"||o.queryKey[0]==="repository"&&(!e||e.includes(String(o.queryKey[1])))&&s.has(String(o.queryKey[2]));await t.cancelQueries({predicate:i}),await t.resetQueries({predicate:i})}const Cm=p.lazy(()=>Nr(()=>import("./App-BbT5H97Z.js").then(t=>t.bg),__vite__mapDeps([0,1,2,3]))),Am=p.lazy(()=>Nr(()=>import("./PairingPage-cSoKZi8t.js"),__vite__mapDeps([4,1,2,3])));function Em(){const t=window.location.pathname==="/pair"?v.jsx(Am,{}):v.jsx(Tm,{children:v.jsx(Cm,{})});return v.jsxs(v.Fragment,{children:[v.jsx(Kf,{}),v.jsx(qf,{theme:"light",position:"bottom-right"}),v.jsx(ul,{client:Pm,children:v.jsx(p.Suspense,{fallback:null,children:t})})]})}const Ha=document.getElementById("root");if(!Ha)throw new Error("Root container not found.");ll.createRoot(Ha).render(v.jsx(p.StrictMode,{children:v.jsx(Em,{})}));export{zm as A,Gp as B,Xf as C,Bm as D,Dm as E,km as F,$m as G,Im as H,Kp as I,Om as J,_r as L,ha as M,Yf as O,im as P,Or as S,tm as T,Nr as _,Ga as a,em as b,Hp as c,nm as d,Nm as e,Fm as f,Al as g,As as h,Vu as i,hh as j,Wo as k,ed as l,kr as m,Zf as n,_m as o,vs as p,Gm as q,jm as r,Yn as s,$a as t,Pl as u,Hm as v,Zp as w,on as x,Wm as y,Um as z};