@txnlab/use-wallet-ui-react 0.2.2 → 0.3.0

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.
@@ -1,4 +1,4 @@
1
- "use strict";var ls=e=>{throw TypeError(e)};var Dr=(e,t,n)=>t.has(e)||ls("Cannot "+n);var O=(e,t,n)=>(Dr(e,t,"read from private field"),n?n.call(e):t.get(e)),te=(e,t,n)=>t.has(e)?ls("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),V=(e,t,n,r)=>(Dr(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),se=(e,t,n)=>(Dr(e,t,"access private method"),n);var Zn=(e,t,n,r)=>({set _(o){V(e,t,o,n)},get _(){return O(e,t,r)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("react/jsx-runtime"),S=require("react"),nt=require("react-dom"),dt=require("@txnlab/use-wallet-react");var Nr=typeof document<"u"?document.currentScript:null;function Ri(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const I=Ri(S),Dn=Ri(nt),El=()=>{typeof window>"u"||typeof document>"u"||(typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(()=>{cs()}):setTimeout(cs,0))},cs=()=>{try{if(document.getElementById("wallet-ui-fonts"))return;const t=document.createElement("style");t.id="wallet-ui-fonts";let n="";try{n=new URL("data:font/woff2;base64,d09GMk9UVE8AABnsAAwAAAAAKwgAABmgAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAADag4GhAbnH4cCgZgAFoBNgIkA4IMBAYFihkHIBsuKiMRNnv1IpD99YFNZLqC1f8AB3etT0P+1qLM2Z0ME7eg/IHrzXFQl94QC4tIDIUan3x9cxlPjoNhIgy8yDxCklmIaO0/q2dm9/fOwptHeISoEDS7E/KMupCQcXERLjYsFFIT//09uve8yMsHykwEA5iJZiZYqJUqnTpWClKu6Rme3+Y/GNQl6k4Geo8XLtNdwmrEwsZrYxSijU4XmTgWkS5bly66L/vs70H/lutfWf36tpQJjnUnYMkOMq/DE0JabAh2WX0Crh4dj0/Pz9k/Kgk84Fbu0pmhs3lVUaAiRlqH3U1L3aGiCabBrCaa/eeyJzN/UbcBP8edE5fL/dJJyjrRdIIqXD/hE3kG9WrcuE+/zJxAnfBgTvlj6lRO7f+31putCnEn7GZyToVAOEDh43JiRHXV75m+81KZ9A/2f6eD3OFJJ9kNAAuzhD4ALBdYLhu3Z9UKZ7/bXeHYdJjO5xTvAUnWDZHnp2620fTfZ38HlZlnNONTmrGUGnO9mQihyFAFJ9B1uPmRjEvVB1mZQ55J/eeUP18cc+foBee9yvVZ5eZp4Ds38+Xeczcj97XIi+3PZnJXBz9URtyrsX3nVuyyfbAL7xWevoqL4BpmdNh3MU6CtPaEHv3G2PDfCKhqA0FZFyLEb8zKCycvtDelhXoop1r8f7lYiZ8R89JpXWsWp90gq3Rz14mlZ5feWzq99IMyokwbt+llDpeV7iPLZpd9ZfqT1pm2yZRl+mj+g77T/NKzFmOp510vH68Qr2yv93oV1gh9uu7UCR0PhXm/8BE+C3yO+zz19fQd4Pu3b4bva9GWaxU55VrxFpW7UX4Qf4nAXGFMheMVHlf4bRN1bdyFiNQ5mzqzSMN/u37rf+95UbHwdvenx32pB4+nr1SllZCyfb7XhuS4o6uXjIs78nAh6Pt8qfelwyP5dJdnl0JR3TFlcK2dYtI9r3wXMuAIv6QzC6pngXG0Ixv+PrBCtnjsQGuzbdDaZbv3H9lupJimhvVrrZCNsG4/dep8ZA5AUi/LMdVU2FBTkN+463iGPTYbSJO2WqN85PSBiPPn165qaxs10Gq1D1wHqjb1m0KXbM8QrYjIjSRikl1FT7kTR8MGGTzoskk3bXmXdNIt5pjs/bZfcs80SYZ2XLtEtyjtFb20fxo1yUeUkYbJKe7Mkprafv2rwf/yHAa4d5glQXGOz+u62yRPaFrIJc337jBJbw8N2vH2ILr0LqVx0g7u3XPwUOieNUDwH3dheDCpgZN1fer2EkNAUC8bmojllk1NRIhx3oCITDEuGBIR7/JO/8DlkZkmzmwGRBIMdLC6XcBpBxeMtlRdPWwx+ZPUr5wG7tr+Tu1+Q6oHn2emv5aCeVAPQ2suN6wWyy9Fzy4srGlMB2SjM/TSbpeu67/Mzsk3NyYA9iLJxNu6emnl8oIfYuFsJNWfG1RZx6G5ptDKdD/3E1JkYz+CNid3TMejBtQG9SNO5kZnZMV6eQhVk5oQCsXSiG+bIcgFCIpC4FxBG9DTQwtK+lCFWUoUamk4f0gY8HzDXTSkU5pSqt6nailtqpnE1M0kTCg8AoCLQuChsJIaCKwnhGKHJzsB3ARuG030DR9E7oRHOCgCvsOCQH4B4VwS5uUAXoBoH3y3VwORg6h7ERpyuSwAKFMV9QW/b9fjndGGXLk4rKzL0dvkEV4WZPIQ4p+l1R0ZOSmqMtlnfUSGbNJHMOfnjul01ABuUD3ihDY6Yyo2STICZG9RepFX4cHkXnqxrV+7zbT84zU2ay/4gBCubdoM07gJvttDz2ZruYbXSDj3fBAhK+z/32OTDx3QSiBtCAMbWGOvg9U4OjAliTvDi4OwL3ChXMciUowbs5qFHIhMM27VtYhrEFcTzYyaF1AjeoC1OfcIHxJJYPuueiEUeRgKYnqsbDCktQ0R3EFk/fNgKAaE8hOJtkMFuSOyyMTbM9yPD7vxDajuqcyEo21mhFco9B2nG4/mzXR6DgnowDexn6480IaSRr7Du+uNWDCDoqaydu/q1dYpOaUemWKd8hGSWuyvoWMMao6+odHIDOp1r0GR7/2O6oa7DGsk8JvJk1NSy81JgByaTED7AkTiAI+FiPl+Nef3rS1X/4kF9r/+2brVZiQUrL732L+abhE5G+l3rh5zZCFytXXN2pVd1W3AJo+4L9LmtfWZ6xvHtCCrVrifXzJ4JSHrTNEoU8SBEOtisHede/C8utFmWUu9RpxtPx6NEI5jqf9giDQirI53IlNvv/KHfM931Nak5bp+biVPSk0rr0qswwsPDeeCshV2kQYVUxkG/OEb5pS/DteDSEOFcCiL4fG6sQXoblFkf+NJxjcjFp6RZqecuXwzeTIxD4GPQfpKtZeMqBi4Z3PyJd9YA+tBA8wH8p4aIh1hshpCRh7qmWQRq8MHOXqAC7SDh+Oqx1He9oDnHiqA2+Mm7tkA51t9jxzgbAAPOTjlLFkjKgTZa6BSUiu58BZPdL19MF5/cheutQMXnkRSFX1ziTxgXA/JhrEDItLPqG8XKzovjgwyoRivIVvRD/0h+isHC7f/Zy7HkCU96A2sXAO3rYnQm9yIQjOh7lbSzlfvPD+ULcLrnqI0OeG8QP6vlhU5VfS9Jb3D3iKiulUzAR9NOEeycQh/SStvTUR3i6pdnrQvZzBY9f6ByK6GLZT+KmHD7rSDY0+w5YzIKGOEOhVAZ2SCiUObIc4E4uKUuhEc6qrjO03Ov9ZYx3EDceuW4HRY4zf3ySQCbN9UQBverfsu/BlyTACxiCo1udqxA8gHjplzxkBaAu/Yi8TkeUhfn1ALPC1mZ/SpHFmBfV4ZWKw0U3vcQCe1EaXWfTwKrjMz7Xk7LHJl8bTVM29WtwGZPEJimfecVl4WJwtqWb0j0XGyAPyibWsD/YhBjr7QSTlUl/vwKS/1HkVWcwPAbKFJDvo/AS/JfQdvuk+wH5tzqwJY6yKDCNvnG5Fmzl8/l6n19OZAJjYfm6WziMk2pe5xDljA/hf84L3sAXhfGfS10aG1jXmyrqVdC1+lFt3KiZxjWgjgY+D2W9ynd8WwPaozSKFraiGsEbVY54AxE1QAUDpVZC7whNmmDYkyeu1dg0EKW9cHZHK6PclhyNWLEt3BGxBCTR4ir33hnQK6Fr5urA9q3iIwS2eI+bbfJH/pV5fwZ/jIB7z8gNMv+MFr0ePvhw0CC1xX3Z4jkz8Sb9x/c4qxSzHTtsNbjhzyh+qV6p+preQHBu1encEK2oAR25DPHS/anRJdJLucODPDBgRnfR3sAECjwS5eAg1bFPAXbgCaATCQJN+Zzh08cNbyFmzRrbqpQG1MCzULmrd8I93ZD+15q/AcMGYDhICUn1RszvLkWYVb44a2c00GKGi5143bGWcTrTYdSW9faonuZ9lwZC1CuRF692saFBWKpi+HqJGP1GTxk/xI71bunQLOzX/ZWB/UslUgoTOENXyQwxcGKX2qEyitoAHv81LvVtZS3QgwU+iQAGVpep2YefuaIyjMwnWg7EqIP6iItJrrpn9dR7+HoG4MwqVBXmryB8nejSXf9nBfdshzh+Qm3C4qBcpv+qC6iXVRIfg4GDu0+QeTfPs1vei9oU4JbbenKauG1SMBNDEy3FeHuWWfbXBWAorAHjxDL1kiwoyFXCKT8sggY5laovIVmoSbvisLai8DLLBzGFdwkQuMbjkmt/sllM4SdV7qHQc35dWBOZcuPZExTT+tvKW5miEf1tex1eSRB52pRecb6NiWHsYnF3VPmxxOiDimsKqFt+QFq7CYUT7AR/E6BFmvLZPr61hi8u6bhMw71+3jglO9NbnEAwvo6kKD4t6YjyLgxAt+CN/ygwwicFeXM9w77lqNgR/TFjnhDegjHUq6F7xKK7r/yDkouEWAMdoQTH6ILNhLtzXR5evz7NStsLHiOe6tuRXJG5aDsswm2Y/Nv14BWfuTDG4i64Xu88sJXrXMHUfFJ3NQizAWkQ6zCoPs2l+ULmd70uzCzfEyIq/XqvrCLq/n8cVrQvr5BIeFy0GTfFhSLl6S74m2fb9adS98JQdLY4ajvh7k6IX4wqsl8Dp3ePspzWWtYO3dSHHbAcoce3gx94klF2IT7Sf+IO+v9YiCDBNIOIVYp8s7X1KgqICsvPKTZOy3nqyPjK4LKmbv9rdHHc85E7vYPBuBzFwTDiwiUlHyerM+Sv+qHxaC/YTlWUhk2CTpjLohhMGy+cB6i+C0g/Rg1PwZ+3hdZ8CnGnSgs0zT1yzeYWAgLCCxwIQKO5rQPLNYYCOZh/nqFTuBUgdaJitPbN5gsikpyXrgDYLlQrUrMW311f/e/P1snN0il9sz3SHIHUJN9N5MYuLty6o4Te0tF5IZPSQYMuOc5/I1uZPcliZ+pkWqTKDmNVIlFWp5RLudXtJVtkF0JW7vcWExL8SpGjFGAlveXo3/VfkvhaKlWxPOfxj/Hr6viZ7hvrpHmNofwipBZWASAksh8f/KuSwmlTnzv9tTpd4N6sgQQ5rmRNF/vPwIPDapAwFFL8NrG9xnrhk9rk7WkRBe9vh0wostBobkJyRLDOOZguwS48nauYpGj1AVwaGAY6rRpuOxvqMCSKsSbByPn93JSUTZwM31cItIYOwFC5F47mwAkogYdECIaKgvmlEjCA/pFCNIHqqpVdI9MJWXxrRsNeQeyjrCDOz/Ry9eFnQgVgtO/jrYkQ+EpC9EGJhQ0FKTHxA54Pvkkf2qkeqETH4lmXZo/5Zt+wx3EdiASPKtV0TgFE62sJviGJS0/8kO4ZVUBxydNQQgjq9v5V76JcXj8DcMV/C+NSmpraTyQ/P9lJRrF5NnGHJqqoxFCJerXxTLbKQ7OdBvsJIzce86AH0koU8Zr8IyxeWDG0ezjr6Qgn7QLQZKs1szerxiAWpXtqYlXJcVps3LybNYdMYgJ32cSd58Ej8zL8NUmxY7fO/9qQYVRnxTGBFEbHwMpxbF/zT+rV+MiLDwYBKHTSeK16xC/CHR8sFB4I4PwkHBV4G9vyNeCcbzbUKUb/GBPc5OVSVhtZEsZkNbT3KKbHgxDGXA49zmA8uGNNWD3dBEPILTVprVrY0Aln8qe3Fs5Tupo+PCh1YZ9RVHL0xo1e9R8TvfMYRWUMKejRAUB34h2ggb3JmFGxwY3e3wlCdRjAErXZ83wmcduV39tYL/pvcoQA/4TPQMY1NRE9hg27ghbL3nETPgf2+/Kk6am2tHIDeIH8Pu0aNiotwEa9T+J9rEDwF4g9i7lpoSEfmlR9DR27ed6beAdF3/fUwcEB1XBjtuwy32KFvYo247SJrOtbcj/A3d+Yf7MrctiVDbT7IW5mXWlYNJ2wbhT/ARjJJWMInpU2qaPBKiDNnFRRe1C0fzTj31B+WABwxU4AGdSDkif2zxIxZpD+k+LDXf15/s1e0QT/zqWWDXH30131NzzjiMyMsapYz1a4kzCvIra1NSK3eePJEYdRXIKyHu2SNdx+zv6s5Ivns7Y7wxy1ShH2U3Z8DHlRm4dzcBYyxRc/2v10XufcEPxg2khBHr2ubdXNhcCei2U1OZ/rvXIZBiZRPIR+eeTnUYhyLKbvlns229P4XX6bX9K7ecGh0HfLnwZx/igFVSzeAHfGb5sVs3U9NvXU8LiNMXFSUCwX8TiSpioQuxD+DAHfVHDkdHpjmnby8prqsvRu5qL6dy0l34FxAtLQ0agR5gqaswbW7fuXDvth17jS0bNts2+M9obk6fhnSjg/b6nXNw2+XupOwLLYIpDIZexOG7a5Yy2EHXdyc9CdtORXkH7D0Y3qHR/A7dsrL1/6u92ccb0FbAO4De9fEB9o6Pr3KI82/4b6lV8PDw/FPbtk9WWWPr8MlzD520x2atjPefl+qtLntKlCM5Zca2srK6hrLyHQ0HgTcqhaKW2UO0LFVlpwrr2nvYebIKORoBTTcgzO+AzhHu2ol476sv9IZk6hewYE6tR0knWHX0ey8iyuWIiovQdDqVdC98lVZ490H6YGjt5UjeLCzdOTtFZ2HnaG5Qud5GoMKblaBSY+44Y9Vp3hFCKyBwcWah6GgvioAKqvDWgU9gYSu5P/Z3SQXA/QprfX4EjqSZrl6uk1XexOE5t3PxML/dTBPPR8iBmHbrJQOzGY42hXeg3pT9zYo4rh9Qvh0DFPowheFSG01FEtc1OmzIwRqGET17hfRiEaRuNuK3Hu/Jq4ZfqFSVicA8xOwY8k2NahSgxSmLpBEH7Wwxml2dk/YUQ7OIBuiS17RYvKNT3EErqK8bGAXwkYxAOGVg2mbz/p7StJUVPl22lwhkz2S/hdszBMTv8whOCaq2U1oBfB7jOb4xckvOgrRmJrvYLIXTWJ6ly4/rdBwnkBN76Pgdjf4it9isZx2IpQnWde16sFLOZQRfMC6JAKqLzygxxMs3RkCxGKQGD5JIp1uTQuPNLOKgv4SiR6HHrpT1OGPQGo/VPCBtp9hEWA2QWjBHZjraEwQXG4f5Ql28BOO0kUg2CUogg7ura7RnjuS7YXd4xlEV9is1ZJAKLM2PSUKPogolkBttNmejpeTwzvfV0ZdLGU5trXXbc5Nt69FDqg6e5VjAf9piEvxtQRK048pqveIQCOEtrUldJNOyw1SogFIe1JGVml1wbl5oLGCAB+eK9cVopoJHYZROOB0G+7vFac9MMIC/GsGncf3KDuxnGmBdbmGBHzryT2qSXaXWuXUpY3SpkvmkXc5lqikUTQFXl6VWtVO76vQJYcoxYnrkX2E9yEt4klNgW1ZHN1sWUiAiUXA+7YtsyzAXgI3UGjN29cJgcPj+1wGoCLRpoZFrjn2X1GnRZr16U2AtiBuPQ8IetOJw1DJk82PsJqcG/chiL7H94oGjwsDJLjRdCGReYUVEwzfDnK1Upx6FFobifu3rQ+6ZEkUMcvKFDwQiN8agKsD05AOQomaQzHTDd7AaEE0ZkUMnwQXYLj4y+YFtEe2JWEIW+U0OGBs8tjECY1TVOT9gc8m+dNmnTgEWcfaQdz136VR2cVfb0QBVnE0bgENsyz2GQYNk6b0i75iwNiMsArRYpVKsmivZhrxHYcbn1qWjpnMhb+Fkwl/mRmkMrLBI6x5Pmpplr0yrleWwf3K63SYD7il0LlUr+SJzsdNIP8QptZNyobvZ9IZdmk7ahnItzJnAJadzA/I3FlzDVOJ4EWhWWpahUppNJDb1QXwolfU4Kd2Q2S8Nt68YNIxpzCwr0TW9ckc4MMcya56ZHcm8yilSqzRS2qQqexU9QMrB5mgU6jItWVS4Ol1VtZqqsA+3Cay+KsGgxbqQFM1DfGpDMGt6WqmCMtO9ze1zh7qjw1KdGcEW4yO752bvBMjXEuOMEGALOrSXCZDZZ7hI61jGr6zOCkVR1SQante1L6eW63OxMtbiClDx3vt4h6B+o5oJb78DjnKcvfaC/Y4RjjjuJHbijpmw5+h+naXakmQqcoKZBVhuFW+NtZast0dB7BV5oJYIyKGU4WVOKEFNBRvTKuwtHCQxpcb2Ce9RcUsuj9NVgI5M0hYE0cFpJwjNfCYXPVV4SwJ7Y8tcEOIMoJFmcSEyW6rUGi3kpKPrnpS6rrBRnqfOdckjGjRe0IrXarTJ9RKvRtUql7umpoT/vD19A0MjY1OrLDOzwkpta0y0sHJNzI35ZshccNhj4KDIrGVb2TyJaurH3adYYJqHDAy55lqTNuy4vLuoq6VHpP9SkEB7C7mMVFDAbjhIFzbKLnO+axjcte8EQcPofFeJ8iBzVfeVtZ6hzyYJlQ6JcUdkrddpMYFL55R3NwYFdzBcpR5lRHHNU8/7UnpvubdrdacgT/LFyaHDK4+A5X6PoackNQdnKZGGyMWW2+qAO94W/JfZbLsTHpd9H+Qte0liQb+TnHRcbk/Gvzf472Er+jf1rm8Bvvyt/7eRMWDOX3d3he0cfQdV/HdEaJvNh+o+0+ywP8P9CBnpcI5YnrMNUZTe+LQVB6PhyIKZBtmii/5yeI2AaeBXDy3A3yZHybb1c/Wyzb7MsnoeQhaJseP6YuMEMI/FjkRkmiJp1tSTnYsb7fCDtX4Fpk7iHWtUDEY4k4mwRDOkLRAynmb5Mg3WB7HMHwHuaslWWiYwyCSrppUmkG4ypFRoYrQiFqsipojJbLm/hT9b588ms916XMcpWFnHktgXZEpU9iknOKW8qXMqaHuiMju9UbnkE6Uan6rC3Oeq1PfdgJWqHfTb7RuT8cOTE5MCzyc1UWI0+5Wj06O8vXNHBSvDUZln8VO55Zmv1CydqnAwPaq0cTEHrFRtHa32K/I66+wDu/SwMwpT2AeJlcbj3B7HDzzb8iPAgofLV8FP1136XJzjoLlZWGs2huMHwen9DIYJ3r7Xbq3X7Q57g9sCuZqti5/6z/w846F8NO+YsXBqua79CMRYdendMazwN2SjBH+TZfCYvBpFpF8shoGzh40Gzz2A6AVf7nLrg3reOgpLlmZcnlSA+9MRUKAqNm5pdAkA8q5DwI1cpgWHJjiihnjC8mngikDhHmADBhBlaCFMNHY5CrOHu2FzjPemBgtoGTX0grGZE7CcNjMoVpNU021DLENNTwIc4pDdwQb0IxP1SERWt6mJpmHYW9kmMyEArCUJNEYX6FWtYrhdBLedP2yLOQJ7gZxJ2SAiDCgGooEDOGC6BAva2BZrqlF3hLwbq4Kjd7c50QS/YOT4xnhPnI09uzcNFEIKJnpq0MiRBfiiVaYQKYnJR3nEdcIUXEVtRxFD/fJXJFhkOVIV1ZMC",typeof document>"u"?require("url").pathToFileURL(__filename).href:Nr&&Nr.tagName.toUpperCase()==="SCRIPT"&&Nr.src||new URL("index.cjs",document.baseURI).href).toString()}catch(r){console.warn("Could not resolve font URL. Using fallback styling.",r)}t.textContent=`
1
+ "use strict";var ci=e=>{throw TypeError(e)};var wo=(e,t,n)=>t.has(e)||ci("Cannot "+n);var P=(e,t,n)=>(wo(e,t,"read from private field"),n?n.call(e):t.get(e)),J=(e,t,n)=>t.has(e)?ci("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),q=(e,t,n,r)=>(wo(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),se=(e,t,n)=>(wo(e,t,"access private method"),n);var Rr=(e,t,n,r)=>({set _(o){q(e,t,o,n)},get _(){return P(e,t,r)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("react/jsx-runtime"),O=require("react"),Bt=require("react-dom"),xt=require("@txnlab/use-wallet-react");var xo=typeof document<"u"?document.currentScript:null;function za(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const D=za(O),Bn=za(Bt),du=()=>{typeof window>"u"||typeof document>"u"||(typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(()=>{ui()}):setTimeout(ui,0))},ui=()=>{try{if(document.getElementById("wallet-ui-fonts"))return;const t=document.createElement("style");t.id="wallet-ui-fonts";let n="";try{n=new URL("data:font/woff2;base64,d09GMk9UVE8AABnsAAwAAAAAKwgAABmgAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAADag4GhAbnH4cCgZgAFoBNgIkA4IMBAYFihkHIBsuKiMRNnv1IpD99YFNZLqC1f8AB3etT0P+1qLM2Z0ME7eg/IHrzXFQl94QC4tIDIUan3x9cxlPjoNhIgy8yDxCklmIaO0/q2dm9/fOwptHeISoEDS7E/KMupCQcXERLjYsFFIT//09uve8yMsHykwEA5iJZiZYqJUqnTpWClKu6Rme3+Y/GNQl6k4Geo8XLtNdwmrEwsZrYxSijU4XmTgWkS5bly66L/vs70H/lutfWf36tpQJjnUnYMkOMq/DE0JabAh2WX0Crh4dj0/Pz9k/Kgk84Fbu0pmhs3lVUaAiRlqH3U1L3aGiCabBrCaa/eeyJzN/UbcBP8edE5fL/dJJyjrRdIIqXD/hE3kG9WrcuE+/zJxAnfBgTvlj6lRO7f+31putCnEn7GZyToVAOEDh43JiRHXV75m+81KZ9A/2f6eD3OFJJ9kNAAuzhD4ALBdYLhu3Z9UKZ7/bXeHYdJjO5xTvAUnWDZHnp2620fTfZ38HlZlnNONTmrGUGnO9mQihyFAFJ9B1uPmRjEvVB1mZQ55J/eeUP18cc+foBee9yvVZ5eZp4Ds38+Xeczcj97XIi+3PZnJXBz9URtyrsX3nVuyyfbAL7xWevoqL4BpmdNh3MU6CtPaEHv3G2PDfCKhqA0FZFyLEb8zKCycvtDelhXoop1r8f7lYiZ8R89JpXWsWp90gq3Rz14mlZ5feWzq99IMyokwbt+llDpeV7iPLZpd9ZfqT1pm2yZRl+mj+g77T/NKzFmOp510vH68Qr2yv93oV1gh9uu7UCR0PhXm/8BE+C3yO+zz19fQd4Pu3b4bva9GWaxU55VrxFpW7UX4Qf4nAXGFMheMVHlf4bRN1bdyFiNQ5mzqzSMN/u37rf+95UbHwdvenx32pB4+nr1SllZCyfb7XhuS4o6uXjIs78nAh6Pt8qfelwyP5dJdnl0JR3TFlcK2dYtI9r3wXMuAIv6QzC6pngXG0Ixv+PrBCtnjsQGuzbdDaZbv3H9lupJimhvVrrZCNsG4/dep8ZA5AUi/LMdVU2FBTkN+463iGPTYbSJO2WqN85PSBiPPn165qaxs10Gq1D1wHqjb1m0KXbM8QrYjIjSRikl1FT7kTR8MGGTzoskk3bXmXdNIt5pjs/bZfcs80SYZ2XLtEtyjtFb20fxo1yUeUkYbJKe7Mkprafv2rwf/yHAa4d5glQXGOz+u62yRPaFrIJc337jBJbw8N2vH2ILr0LqVx0g7u3XPwUOieNUDwH3dheDCpgZN1fer2EkNAUC8bmojllk1NRIhx3oCITDEuGBIR7/JO/8DlkZkmzmwGRBIMdLC6XcBpBxeMtlRdPWwx+ZPUr5wG7tr+Tu1+Q6oHn2emv5aCeVAPQ2suN6wWyy9Fzy4srGlMB2SjM/TSbpeu67/Mzsk3NyYA9iLJxNu6emnl8oIfYuFsJNWfG1RZx6G5ptDKdD/3E1JkYz+CNid3TMejBtQG9SNO5kZnZMV6eQhVk5oQCsXSiG+bIcgFCIpC4FxBG9DTQwtK+lCFWUoUamk4f0gY8HzDXTSkU5pSqt6nailtqpnE1M0kTCg8AoCLQuChsJIaCKwnhGKHJzsB3ARuG030DR9E7oRHOCgCvsOCQH4B4VwS5uUAXoBoH3y3VwORg6h7ERpyuSwAKFMV9QW/b9fjndGGXLk4rKzL0dvkEV4WZPIQ4p+l1R0ZOSmqMtlnfUSGbNJHMOfnjul01ABuUD3ihDY6Yyo2STICZG9RepFX4cHkXnqxrV+7zbT84zU2ay/4gBCubdoM07gJvttDz2ZruYbXSDj3fBAhK+z/32OTDx3QSiBtCAMbWGOvg9U4OjAliTvDi4OwL3ChXMciUowbs5qFHIhMM27VtYhrEFcTzYyaF1AjeoC1OfcIHxJJYPuueiEUeRgKYnqsbDCktQ0R3EFk/fNgKAaE8hOJtkMFuSOyyMTbM9yPD7vxDajuqcyEo21mhFco9B2nG4/mzXR6DgnowDexn6480IaSRr7Du+uNWDCDoqaydu/q1dYpOaUemWKd8hGSWuyvoWMMao6+odHIDOp1r0GR7/2O6oa7DGsk8JvJk1NSy81JgByaTED7AkTiAI+FiPl+Nef3rS1X/4kF9r/+2brVZiQUrL732L+abhE5G+l3rh5zZCFytXXN2pVd1W3AJo+4L9LmtfWZ6xvHtCCrVrifXzJ4JSHrTNEoU8SBEOtisHede/C8utFmWUu9RpxtPx6NEI5jqf9giDQirI53IlNvv/KHfM931Nak5bp+biVPSk0rr0qswwsPDeeCshV2kQYVUxkG/OEb5pS/DteDSEOFcCiL4fG6sQXoblFkf+NJxjcjFp6RZqecuXwzeTIxD4GPQfpKtZeMqBi4Z3PyJd9YA+tBA8wH8p4aIh1hshpCRh7qmWQRq8MHOXqAC7SDh+Oqx1He9oDnHiqA2+Mm7tkA51t9jxzgbAAPOTjlLFkjKgTZa6BSUiu58BZPdL19MF5/cheutQMXnkRSFX1ziTxgXA/JhrEDItLPqG8XKzovjgwyoRivIVvRD/0h+isHC7f/Zy7HkCU96A2sXAO3rYnQm9yIQjOh7lbSzlfvPD+ULcLrnqI0OeG8QP6vlhU5VfS9Jb3D3iKiulUzAR9NOEeycQh/SStvTUR3i6pdnrQvZzBY9f6ByK6GLZT+KmHD7rSDY0+w5YzIKGOEOhVAZ2SCiUObIc4E4uKUuhEc6qrjO03Ov9ZYx3EDceuW4HRY4zf3ySQCbN9UQBverfsu/BlyTACxiCo1udqxA8gHjplzxkBaAu/Yi8TkeUhfn1ALPC1mZ/SpHFmBfV4ZWKw0U3vcQCe1EaXWfTwKrjMz7Xk7LHJl8bTVM29WtwGZPEJimfecVl4WJwtqWb0j0XGyAPyibWsD/YhBjr7QSTlUl/vwKS/1HkVWcwPAbKFJDvo/AS/JfQdvuk+wH5tzqwJY6yKDCNvnG5Fmzl8/l6n19OZAJjYfm6WziMk2pe5xDljA/hf84L3sAXhfGfS10aG1jXmyrqVdC1+lFt3KiZxjWgjgY+D2W9ynd8WwPaozSKFraiGsEbVY54AxE1QAUDpVZC7whNmmDYkyeu1dg0EKW9cHZHK6PclhyNWLEt3BGxBCTR4ir33hnQK6Fr5urA9q3iIwS2eI+bbfJH/pV5fwZ/jIB7z8gNMv+MFr0ePvhw0CC1xX3Z4jkz8Sb9x/c4qxSzHTtsNbjhzyh+qV6p+preQHBu1encEK2oAR25DPHS/anRJdJLucODPDBgRnfR3sAECjwS5eAg1bFPAXbgCaATCQJN+Zzh08cNbyFmzRrbqpQG1MCzULmrd8I93ZD+15q/AcMGYDhICUn1RszvLkWYVb44a2c00GKGi5143bGWcTrTYdSW9faonuZ9lwZC1CuRF692saFBWKpi+HqJGP1GTxk/xI71bunQLOzX/ZWB/UslUgoTOENXyQwxcGKX2qEyitoAHv81LvVtZS3QgwU+iQAGVpep2YefuaIyjMwnWg7EqIP6iItJrrpn9dR7+HoG4MwqVBXmryB8nejSXf9nBfdshzh+Qm3C4qBcpv+qC6iXVRIfg4GDu0+QeTfPs1vei9oU4JbbenKauG1SMBNDEy3FeHuWWfbXBWAorAHjxDL1kiwoyFXCKT8sggY5laovIVmoSbvisLai8DLLBzGFdwkQuMbjkmt/sllM4SdV7qHQc35dWBOZcuPZExTT+tvKW5miEf1tex1eSRB52pRecb6NiWHsYnF3VPmxxOiDimsKqFt+QFq7CYUT7AR/E6BFmvLZPr61hi8u6bhMw71+3jglO9NbnEAwvo6kKD4t6YjyLgxAt+CN/ygwwicFeXM9w77lqNgR/TFjnhDegjHUq6F7xKK7r/yDkouEWAMdoQTH6ILNhLtzXR5evz7NStsLHiOe6tuRXJG5aDsswm2Y/Nv14BWfuTDG4i64Xu88sJXrXMHUfFJ3NQizAWkQ6zCoPs2l+ULmd70uzCzfEyIq/XqvrCLq/n8cVrQvr5BIeFy0GTfFhSLl6S74m2fb9adS98JQdLY4ajvh7k6IX4wqsl8Dp3ePspzWWtYO3dSHHbAcoce3gx94klF2IT7Sf+IO+v9YiCDBNIOIVYp8s7X1KgqICsvPKTZOy3nqyPjK4LKmbv9rdHHc85E7vYPBuBzFwTDiwiUlHyerM+Sv+qHxaC/YTlWUhk2CTpjLohhMGy+cB6i+C0g/Rg1PwZ+3hdZ8CnGnSgs0zT1yzeYWAgLCCxwIQKO5rQPLNYYCOZh/nqFTuBUgdaJitPbN5gsikpyXrgDYLlQrUrMW311f/e/P1snN0il9sz3SHIHUJN9N5MYuLty6o4Te0tF5IZPSQYMuOc5/I1uZPcliZ+pkWqTKDmNVIlFWp5RLudXtJVtkF0JW7vcWExL8SpGjFGAlveXo3/VfkvhaKlWxPOfxj/Hr6viZ7hvrpHmNofwipBZWASAksh8f/KuSwmlTnzv9tTpd4N6sgQQ5rmRNF/vPwIPDapAwFFL8NrG9xnrhk9rk7WkRBe9vh0wostBobkJyRLDOOZguwS48nauYpGj1AVwaGAY6rRpuOxvqMCSKsSbByPn93JSUTZwM31cItIYOwFC5F47mwAkogYdECIaKgvmlEjCA/pFCNIHqqpVdI9MJWXxrRsNeQeyjrCDOz/Ry9eFnQgVgtO/jrYkQ+EpC9EGJhQ0FKTHxA54Pvkkf2qkeqETH4lmXZo/5Zt+wx3EdiASPKtV0TgFE62sJviGJS0/8kO4ZVUBxydNQQgjq9v5V76JcXj8DcMV/C+NSmpraTyQ/P9lJRrF5NnGHJqqoxFCJerXxTLbKQ7OdBvsJIzce86AH0koU8Zr8IyxeWDG0ezjr6Qgn7QLQZKs1szerxiAWpXtqYlXJcVps3LybNYdMYgJ32cSd58Ej8zL8NUmxY7fO/9qQYVRnxTGBFEbHwMpxbF/zT+rV+MiLDwYBKHTSeK16xC/CHR8sFB4I4PwkHBV4G9vyNeCcbzbUKUb/GBPc5OVSVhtZEsZkNbT3KKbHgxDGXA49zmA8uGNNWD3dBEPILTVprVrY0Aln8qe3Fs5Tupo+PCh1YZ9RVHL0xo1e9R8TvfMYRWUMKejRAUB34h2ggb3JmFGxwY3e3wlCdRjAErXZ83wmcduV39tYL/pvcoQA/4TPQMY1NRE9hg27ghbL3nETPgf2+/Kk6am2tHIDeIH8Pu0aNiotwEa9T+J9rEDwF4g9i7lpoSEfmlR9DR27ed6beAdF3/fUwcEB1XBjtuwy32KFvYo247SJrOtbcj/A3d+Yf7MrctiVDbT7IW5mXWlYNJ2wbhT/ARjJJWMInpU2qaPBKiDNnFRRe1C0fzTj31B+WABwxU4AGdSDkif2zxIxZpD+k+LDXf15/s1e0QT/zqWWDXH30131NzzjiMyMsapYz1a4kzCvIra1NSK3eePJEYdRXIKyHu2SNdx+zv6s5Ivns7Y7wxy1ShH2U3Z8DHlRm4dzcBYyxRc/2v10XufcEPxg2khBHr2ubdXNhcCei2U1OZ/rvXIZBiZRPIR+eeTnUYhyLKbvlns229P4XX6bX9K7ecGh0HfLnwZx/igFVSzeAHfGb5sVs3U9NvXU8LiNMXFSUCwX8TiSpioQuxD+DAHfVHDkdHpjmnby8prqsvRu5qL6dy0l34FxAtLQ0agR5gqaswbW7fuXDvth17jS0bNts2+M9obk6fhnSjg/b6nXNw2+XupOwLLYIpDIZexOG7a5Yy2EHXdyc9CdtORXkH7D0Y3qHR/A7dsrL1/6u92ccb0FbAO4De9fEB9o6Pr3KI82/4b6lV8PDw/FPbtk9WWWPr8MlzD520x2atjPefl+qtLntKlCM5Zca2srK6hrLyHQ0HgTcqhaKW2UO0LFVlpwrr2nvYebIKORoBTTcgzO+AzhHu2ol476sv9IZk6hewYE6tR0knWHX0ey8iyuWIiovQdDqVdC98lVZ490H6YGjt5UjeLCzdOTtFZ2HnaG5Qud5GoMKblaBSY+44Y9Vp3hFCKyBwcWah6GgvioAKqvDWgU9gYSu5P/Z3SQXA/QprfX4EjqSZrl6uk1XexOE5t3PxML/dTBPPR8iBmHbrJQOzGY42hXeg3pT9zYo4rh9Qvh0DFPowheFSG01FEtc1OmzIwRqGET17hfRiEaRuNuK3Hu/Jq4ZfqFSVicA8xOwY8k2NahSgxSmLpBEH7Wwxml2dk/YUQ7OIBuiS17RYvKNT3EErqK8bGAXwkYxAOGVg2mbz/p7StJUVPl22lwhkz2S/hdszBMTv8whOCaq2U1oBfB7jOb4xckvOgrRmJrvYLIXTWJ6ly4/rdBwnkBN76Pgdjf4it9isZx2IpQnWde16sFLOZQRfMC6JAKqLzygxxMs3RkCxGKQGD5JIp1uTQuPNLOKgv4SiR6HHrpT1OGPQGo/VPCBtp9hEWA2QWjBHZjraEwQXG4f5Ql28BOO0kUg2CUogg7ura7RnjuS7YXd4xlEV9is1ZJAKLM2PSUKPogolkBttNmejpeTwzvfV0ZdLGU5trXXbc5Nt69FDqg6e5VjAf9piEvxtQRK048pqveIQCOEtrUldJNOyw1SogFIe1JGVml1wbl5oLGCAB+eK9cVopoJHYZROOB0G+7vFac9MMIC/GsGncf3KDuxnGmBdbmGBHzryT2qSXaXWuXUpY3SpkvmkXc5lqikUTQFXl6VWtVO76vQJYcoxYnrkX2E9yEt4klNgW1ZHN1sWUiAiUXA+7YtsyzAXgI3UGjN29cJgcPj+1wGoCLRpoZFrjn2X1GnRZr16U2AtiBuPQ8IetOJw1DJk82PsJqcG/chiL7H94oGjwsDJLjRdCGReYUVEwzfDnK1Upx6FFobifu3rQ+6ZEkUMcvKFDwQiN8agKsD05AOQomaQzHTDd7AaEE0ZkUMnwQXYLj4y+YFtEe2JWEIW+U0OGBs8tjECY1TVOT9gc8m+dNmnTgEWcfaQdz136VR2cVfb0QBVnE0bgENsyz2GQYNk6b0i75iwNiMsArRYpVKsmivZhrxHYcbn1qWjpnMhb+Fkwl/mRmkMrLBI6x5Pmpplr0yrleWwf3K63SYD7il0LlUr+SJzsdNIP8QptZNyobvZ9IZdmk7ahnItzJnAJadzA/I3FlzDVOJ4EWhWWpahUppNJDb1QXwolfU4Kd2Q2S8Nt68YNIxpzCwr0TW9ckc4MMcya56ZHcm8yilSqzRS2qQqexU9QMrB5mgU6jItWVS4Ol1VtZqqsA+3Cay+KsGgxbqQFM1DfGpDMGt6WqmCMtO9ze1zh7qjw1KdGcEW4yO752bvBMjXEuOMEGALOrSXCZDZZ7hI61jGr6zOCkVR1SQante1L6eW63OxMtbiClDx3vt4h6B+o5oJb78DjnKcvfaC/Y4RjjjuJHbijpmw5+h+naXakmQqcoKZBVhuFW+NtZast0dB7BV5oJYIyKGU4WVOKEFNBRvTKuwtHCQxpcb2Ce9RcUsuj9NVgI5M0hYE0cFpJwjNfCYXPVV4SwJ7Y8tcEOIMoJFmcSEyW6rUGi3kpKPrnpS6rrBRnqfOdckjGjRe0IrXarTJ9RKvRtUql7umpoT/vD19A0MjY1OrLDOzwkpta0y0sHJNzI35ZshccNhj4KDIrGVb2TyJaurH3adYYJqHDAy55lqTNuy4vLuoq6VHpP9SkEB7C7mMVFDAbjhIFzbKLnO+axjcte8EQcPofFeJ8iBzVfeVtZ6hzyYJlQ6JcUdkrddpMYFL55R3NwYFdzBcpR5lRHHNU8/7UnpvubdrdacgT/LFyaHDK4+A5X6PoackNQdnKZGGyMWW2+qAO94W/JfZbLsTHpd9H+Qte0liQb+TnHRcbk/Gvzf472Er+jf1rm8Bvvyt/7eRMWDOX3d3he0cfQdV/HdEaJvNh+o+0+ywP8P9CBnpcI5YnrMNUZTe+LQVB6PhyIKZBtmii/5yeI2AaeBXDy3A3yZHybb1c/Wyzb7MsnoeQhaJseP6YuMEMI/FjkRkmiJp1tSTnYsb7fCDtX4Fpk7iHWtUDEY4k4mwRDOkLRAynmb5Mg3WB7HMHwHuaslWWiYwyCSrppUmkG4ypFRoYrQiFqsipojJbLm/hT9b588ms916XMcpWFnHktgXZEpU9iknOKW8qXMqaHuiMju9UbnkE6Uan6rC3Oeq1PfdgJWqHfTb7RuT8cOTE5MCzyc1UWI0+5Wj06O8vXNHBSvDUZln8VO55Zmv1CydqnAwPaq0cTEHrFRtHa32K/I66+wDu/SwMwpT2AeJlcbj3B7HDzzb8iPAgofLV8FP1136XJzjoLlZWGs2huMHwen9DIYJ3r7Xbq3X7Q57g9sCuZqti5/6z/w846F8NO+YsXBqua79CMRYdendMazwN2SjBH+TZfCYvBpFpF8shoGzh40Gzz2A6AVf7nLrg3reOgpLlmZcnlSA+9MRUKAqNm5pdAkA8q5DwI1cpgWHJjiihnjC8mngikDhHmADBhBlaCFMNHY5CrOHu2FzjPemBgtoGTX0grGZE7CcNjMoVpNU021DLENNTwIc4pDdwQb0IxP1SERWt6mJpmHYW9kmMyEArCUJNEYX6FWtYrhdBLedP2yLOQJ7gZxJ2SAiDCgGooEDOGC6BAva2BZrqlF3hLwbq4Kjd7c50QS/YOT4xnhPnI09uzcNFEIKJnpq0MiRBfiiVaYQKYnJR3nEdcIUXEVtRxFD/fJXJFhkOVIV1ZMC",typeof document>"u"?require("url").pathToFileURL(__filename).href:xo&&xo.tagName.toUpperCase()==="SCRIPT"&&xo.src||new URL("index.cjs",document.baseURI).href).toString()}catch(r){console.warn("Could not resolve font URL. Using fallback styling.",r)}t.textContent=`
2
2
  @font-face {
3
3
  font-family: 'Aeonik';
4
4
  src: url('${n}') format('woff2');
@@ -10,12 +10,28 @@
10
10
  .wallet-custom-font {
11
11
  font-family: 'Aeonik', system-ui, sans-serif !important;
12
12
  }
13
- `,document.head.appendChild(t),console.log("Wallet UI fonts loaded")}catch(e){console.warn("Failed to load custom fonts, using system fonts instead",e)}},Rl=()=>{typeof window<"u"&&El()};function Ci(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ci(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Cl(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ci(e))&&(r&&(r+=" "),r+=t);return r}const jo="-",Sl=e=>{const t=Al(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(jo);return a[0]===""&&a.length!==1&&a.shift(),Si(a,t)||kl(i)},getConflictingClassGroupIds:(i,a)=>{const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}}},Si=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Si(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(jo);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},us=/^\[(.+)\]$/,kl=e=>{if(us.test(e)){const t=us.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Al=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)no(n[o],r,o,t);return r},no=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:fs(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Ol(o)){no(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{no(i,fs(t,s),n,r)})})},fs=(e,t)=>{let n=e;return t.split(jo).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Ol=e=>e.isThemeGetter,Tl=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},ro="!",oo=":",Fl=oo.length,Pl=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,a=0,l=0,u;for(let g=0;g<o.length;g++){let y=o[g];if(i===0&&a===0){if(y===oo){s.push(o.slice(l,g)),l=g+Fl;continue}if(y==="/"){u=g;continue}}y==="["?i++:y==="]"?i--:y==="("?a++:y===")"&&a--}const d=s.length===0?o:o.substring(l),h=Ml(d),E=h!==d,p=u&&u>l?u-l:void 0;return{modifiers:s,hasImportantModifier:E,baseClassName:h,maybePostfixModifierPosition:p}};if(t){const o=t+oo,s=r;r=i=>i.startsWith(o)?s(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},Ml=e=>e.endsWith(ro)?e.substring(0,e.length-1):e.startsWith(ro)?e.substring(1):e,Il=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let s=[];return r.forEach(i=>{i[0]==="["||t[i]?(o.push(...s.sort(),i),s=[]):s.push(i)}),o.push(...s.sort()),o}},Dl=e=>({cache:Tl(e.cacheSize),parseClassName:Pl(e),sortModifiers:Il(e),...Sl(e)}),Nl=/\s+/,Ll=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(Nl);let l="";for(let u=a.length-1;u>=0;u-=1){const d=a[u],{isExternal:h,modifiers:E,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:y}=n(d);if(h){l=d+(l.length>0?" "+l:l);continue}let T=!!y,D=r(T?g.substring(0,y):g);if(!D){if(!T){l=d+(l.length>0?" "+l:l);continue}if(D=r(g),!D){l=d+(l.length>0?" "+l:l);continue}T=!1}const w=s(E).join(":"),M=p?w+ro:w,L=M+D;if(i.includes(L))continue;i.push(L);const H=o(D,T);for(let j=0;j<H.length;++j){const U=H[j];i.push(M+U)}l=d+(l.length>0?" "+l:l)}return l};function $l(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ki(t))&&(r&&(r+=" "),r+=n);return r}const ki=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ki(e[r]))&&(n&&(n+=" "),n+=t);return n};function jl(e,...t){let n,r,o,s=i;function i(l){const u=t.reduce((d,h)=>h(d),e());return n=Dl(u),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const u=r(l);if(u)return u;const d=Ll(l,n);return o(l,d),d}return function(){return s($l.apply(null,arguments))}}const he=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Ai=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Oi=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Bl=/^\d+\/\d+$/,Hl=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ul=/\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$/,Wl=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ql=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Gl=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_t=e=>Bl.test(e),oe=e=>!!e&&!Number.isNaN(Number(e)),mt=e=>!!e&&Number.isInteger(Number(e)),Lr=e=>e.endsWith("%")&&oe(e.slice(0,-1)),it=e=>Hl.test(e),zl=()=>!0,Vl=e=>Ul.test(e)&&!Wl.test(e),Ti=()=>!1,Ql=e=>ql.test(e),Kl=e=>Gl.test(e),Yl=e=>!Q(e)&&!K(e),Xl=e=>yn(e,Mi,Ti),Q=e=>Ai.test(e),Tt=e=>yn(e,Ii,Vl),$r=e=>yn(e,tc,oe),ds=e=>yn(e,Fi,Ti),_l=e=>yn(e,Pi,Kl),er=e=>yn(e,Di,Ql),K=e=>Oi.test(e),kn=e=>wn(e,Ii),Jl=e=>wn(e,nc),hs=e=>wn(e,Fi),Zl=e=>wn(e,Mi),ec=e=>wn(e,Pi),tr=e=>wn(e,Di,!0),yn=(e,t,n)=>{const r=Ai.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},wn=(e,t,n=!1)=>{const r=Oi.exec(e);return r?r[1]?t(r[1]):n:!1},Fi=e=>e==="position"||e==="percentage",Pi=e=>e==="image"||e==="url",Mi=e=>e==="length"||e==="size"||e==="bg-size",Ii=e=>e==="length",tc=e=>e==="number",nc=e=>e==="family-name",Di=e=>e==="shadow",rc=()=>{const e=he("color"),t=he("font"),n=he("text"),r=he("font-weight"),o=he("tracking"),s=he("leading"),i=he("breakpoint"),a=he("container"),l=he("spacing"),u=he("radius"),d=he("shadow"),h=he("inset-shadow"),E=he("text-shadow"),p=he("drop-shadow"),g=he("blur"),y=he("perspective"),T=he("aspect"),D=he("ease"),w=he("animate"),M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],H=()=>[...L(),K,Q],j=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto","contain","none"],c=()=>[K,Q,l],f=()=>[_t,"full","auto",...c()],b=()=>[mt,"none","subgrid",K,Q],x=()=>["auto",{span:["full",mt,K,Q]},mt,K,Q],R=()=>[mt,"auto",K,Q],k=()=>["auto","min","max","fr",K,Q],A=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],m=()=>["start","end","center","stretch","center-safe","end-safe"],C=()=>["auto",...c()],F=()=>[_t,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...c()],v=()=>[e,K,Q],P=()=>[...L(),hs,ds,{position:[K,Q]}],$=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",Zl,Xl,{size:[K,Q]}],B=()=>[Lr,kn,Tt],_=()=>["","none","full",u,K,Q],q=()=>["",oe,kn,Tt],Y=()=>["solid","dashed","dotted","double"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[oe,Lr,hs,ds],ve=()=>["","none",g,K,Q],Re=()=>["none",oe,K,Q],Ce=()=>["none",oe,K,Q],Z=()=>[oe,K,Q],G=()=>[_t,"full",...c()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[it],breakpoint:[it],color:[zl],container:[it],"drop-shadow":[it],ease:["in","out","in-out"],font:[Yl],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[it],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[it],shadow:[it],spacing:["px",oe],text:[it],"text-shadow":[it],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_t,Q,K,T]}],container:["container"],columns:[{columns:[oe,Q,K,a]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"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:H()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:f()}],"inset-x":[{"inset-x":f()}],"inset-y":[{"inset-y":f()}],start:[{start:f()}],end:[{end:f()}],top:[{top:f()}],right:[{right:f()}],bottom:[{bottom:f()}],left:[{left:f()}],visibility:["visible","invisible","collapse"],z:[{z:[mt,"auto",K,Q]}],basis:[{basis:[_t,"full","auto",a,...c()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[oe,_t,"auto","initial","none",Q]}],grow:[{grow:["",oe,K,Q]}],shrink:[{shrink:["",oe,K,Q]}],order:[{order:[mt,"first","last","none",K,Q]}],"grid-cols":[{"grid-cols":b()}],"col-start-end":[{col:x()}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":b()}],"row-start-end":[{row:x()}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:c()}],"gap-x":[{"gap-x":c()}],"gap-y":[{"gap-y":c()}],"justify-content":[{justify:[...A(),"normal"]}],"justify-items":[{"justify-items":[...m(),"normal"]}],"justify-self":[{"justify-self":["auto",...m()]}],"align-content":[{content:["normal",...A()]}],"align-items":[{items:[...m(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...m(),{baseline:["","last"]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...m(),"baseline"]}],"place-self":[{"place-self":["auto",...m()]}],p:[{p:c()}],px:[{px:c()}],py:[{py:c()}],ps:[{ps:c()}],pe:[{pe:c()}],pt:[{pt:c()}],pr:[{pr:c()}],pb:[{pb:c()}],pl:[{pl:c()}],m:[{m:C()}],mx:[{mx:C()}],my:[{my:C()}],ms:[{ms:C()}],me:[{me:C()}],mt:[{mt:C()}],mr:[{mr:C()}],mb:[{mb:C()}],ml:[{ml:C()}],"space-x":[{"space-x":c()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":c()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[a,"screen",...F()]}],"min-w":[{"min-w":[a,"screen","none",...F()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...F()]}],h:[{h:["screen",...F()]}],"min-h":[{"min-h":["screen","none",...F()]}],"max-h":[{"max-h":["screen",...F()]}],"font-size":[{text:["base",n,kn,Tt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,K,$r]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Lr,Q]}],"font-family":[{font:[Jl,Q,t]}],"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:[o,K,Q]}],"line-clamp":[{"line-clamp":[oe,"none",K,$r]}],leading:[{leading:[s,...c()]}],"list-image":[{"list-image":["none",K,Q]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",K,Q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:v()}],"text-color":[{text:v()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:[oe,"from-font","auto",K,Tt]}],"text-decoration-color":[{decoration:v()}],"underline-offset":[{"underline-offset":[oe,"auto",K,Q]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:c()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",K,Q]}],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",K,Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:$()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},mt,K,Q],radial:["",K,Q],conic:[mt,K,Q]},ec,_l]}],"bg-color":[{bg:v()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:v()}],"gradient-via":[{via:v()}],"gradient-to":[{to:v()}],rounded:[{rounded:_()}],"rounded-s":[{"rounded-s":_()}],"rounded-e":[{"rounded-e":_()}],"rounded-t":[{"rounded-t":_()}],"rounded-r":[{"rounded-r":_()}],"rounded-b":[{"rounded-b":_()}],"rounded-l":[{"rounded-l":_()}],"rounded-ss":[{"rounded-ss":_()}],"rounded-se":[{"rounded-se":_()}],"rounded-ee":[{"rounded-ee":_()}],"rounded-es":[{"rounded-es":_()}],"rounded-tl":[{"rounded-tl":_()}],"rounded-tr":[{"rounded-tr":_()}],"rounded-br":[{"rounded-br":_()}],"rounded-bl":[{"rounded-bl":_()}],"border-w":[{border:q()}],"border-w-x":[{"border-x":q()}],"border-w-y":[{"border-y":q()}],"border-w-s":[{"border-s":q()}],"border-w-e":[{"border-e":q()}],"border-w-t":[{"border-t":q()}],"border-w-r":[{"border-r":q()}],"border-w-b":[{"border-b":q()}],"border-w-l":[{"border-l":q()}],"divide-x":[{"divide-x":q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Y(),"hidden","none"]}],"divide-style":[{divide:[...Y(),"hidden","none"]}],"border-color":[{border:v()}],"border-color-x":[{"border-x":v()}],"border-color-y":[{"border-y":v()}],"border-color-s":[{"border-s":v()}],"border-color-e":[{"border-e":v()}],"border-color-t":[{"border-t":v()}],"border-color-r":[{"border-r":v()}],"border-color-b":[{"border-b":v()}],"border-color-l":[{"border-l":v()}],"divide-color":[{divide:v()}],"outline-style":[{outline:[...Y(),"none","hidden"]}],"outline-offset":[{"outline-offset":[oe,K,Q]}],"outline-w":[{outline:["",oe,kn,Tt]}],"outline-color":[{outline:v()}],shadow:[{shadow:["","none",d,tr,er]}],"shadow-color":[{shadow:v()}],"inset-shadow":[{"inset-shadow":["none",h,tr,er]}],"inset-shadow-color":[{"inset-shadow":v()}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:v()}],"ring-offset-w":[{"ring-offset":[oe,Tt]}],"ring-offset-color":[{"ring-offset":v()}],"inset-ring-w":[{"inset-ring":q()}],"inset-ring-color":[{"inset-ring":v()}],"text-shadow":[{"text-shadow":["none",E,tr,er]}],"text-shadow-color":[{"text-shadow":v()}],opacity:[{opacity:[oe,K,Q]}],"mix-blend":[{"mix-blend":[...J(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":J()}],"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":[oe]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":v()}],"mask-image-linear-to-color":[{"mask-linear-to":v()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":v()}],"mask-image-t-to-color":[{"mask-t-to":v()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":v()}],"mask-image-r-to-color":[{"mask-r-to":v()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":v()}],"mask-image-b-to-color":[{"mask-b-to":v()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":v()}],"mask-image-l-to-color":[{"mask-l-to":v()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":v()}],"mask-image-x-to-color":[{"mask-x-to":v()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":v()}],"mask-image-y-to-color":[{"mask-y-to":v()}],"mask-image-radial":[{"mask-radial":[K,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":v()}],"mask-image-radial-to-color":[{"mask-radial-to":v()}],"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":L()}],"mask-image-conic-pos":[{"mask-conic":[oe]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":v()}],"mask-image-conic-to-color":[{"mask-conic-to":v()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:$()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",K,Q]}],filter:[{filter:["","none",K,Q]}],blur:[{blur:ve()}],brightness:[{brightness:[oe,K,Q]}],contrast:[{contrast:[oe,K,Q]}],"drop-shadow":[{"drop-shadow":["","none",p,tr,er]}],"drop-shadow-color":[{"drop-shadow":v()}],grayscale:[{grayscale:["",oe,K,Q]}],"hue-rotate":[{"hue-rotate":[oe,K,Q]}],invert:[{invert:["",oe,K,Q]}],saturate:[{saturate:[oe,K,Q]}],sepia:[{sepia:["",oe,K,Q]}],"backdrop-filter":[{"backdrop-filter":["","none",K,Q]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[oe,K,Q]}],"backdrop-contrast":[{"backdrop-contrast":[oe,K,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":["",oe,K,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[oe,K,Q]}],"backdrop-invert":[{"backdrop-invert":["",oe,K,Q]}],"backdrop-opacity":[{"backdrop-opacity":[oe,K,Q]}],"backdrop-saturate":[{"backdrop-saturate":[oe,K,Q]}],"backdrop-sepia":[{"backdrop-sepia":["",oe,K,Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":c()}],"border-spacing-x":[{"border-spacing-x":c()}],"border-spacing-y":[{"border-spacing-y":c()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",K,Q]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[oe,"initial",K,Q]}],ease:[{ease:["linear","initial",D,K,Q]}],delay:[{delay:[oe,K,Q]}],animate:[{animate:["none",w,K,Q]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,K,Q]}],"perspective-origin":[{"perspective-origin":H()}],rotate:[{rotate:Re()}],"rotate-x":[{"rotate-x":Re()}],"rotate-y":[{"rotate-y":Re()}],"rotate-z":[{"rotate-z":Re()}],scale:[{scale:Ce()}],"scale-x":[{"scale-x":Ce()}],"scale-y":[{"scale-y":Ce()}],"scale-z":[{"scale-z":Ce()}],"scale-3d":["scale-3d"],skew:[{skew:Z()}],"skew-x":[{"skew-x":Z()}],"skew-y":[{"skew-y":Z()}],transform:[{transform:[K,Q,"","none","gpu","cpu"]}],"transform-origin":[{origin:H()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:G()}],"translate-x":[{"translate-x":G()}],"translate-y":[{"translate-y":G()}],"translate-z":[{"translate-z":G()}],"translate-none":["translate-none"],accent:[{accent:v()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:v()}],"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",K,Q]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":c()}],"scroll-mx":[{"scroll-mx":c()}],"scroll-my":[{"scroll-my":c()}],"scroll-ms":[{"scroll-ms":c()}],"scroll-me":[{"scroll-me":c()}],"scroll-mt":[{"scroll-mt":c()}],"scroll-mr":[{"scroll-mr":c()}],"scroll-mb":[{"scroll-mb":c()}],"scroll-ml":[{"scroll-ml":c()}],"scroll-p":[{"scroll-p":c()}],"scroll-px":[{"scroll-px":c()}],"scroll-py":[{"scroll-py":c()}],"scroll-ps":[{"scroll-ps":c()}],"scroll-pe":[{"scroll-pe":c()}],"scroll-pt":[{"scroll-pt":c()}],"scroll-pr":[{"scroll-pr":c()}],"scroll-pb":[{"scroll-pb":c()}],"scroll-pl":[{"scroll-pl":c()}],"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",K,Q]}],fill:[{fill:["none",...v()]}],"stroke-w":[{stroke:[oe,kn,Tt,$r]}],stroke:[{stroke:["none",...v()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},oc=jl(rc);function en(...e){return oc(Cl(e))}const Bo=S.forwardRef(({className:e="",children:t,style:n,...r},o)=>N.jsx("button",{ref:o,className:en("bg-[#2D2DF1] dark:bg-[#BFBFF9] transition-colors hover:bg-[#2929D9] dark:hover:bg-[#D4D4FA] text-white dark:text-[#001324] font-bold py-2.5 px-4 rounded-xl disabled:opacity-50 wallet-custom-font",e),style:n,...r,type:"button","data-wallet-ui":!0,children:t||"Connect Wallet"}));Bo.displayName="ConnectWalletButton";function Er(){return typeof window<"u"}function At(e){return Ni(e)?(e.nodeName||"").toLowerCase():"#document"}function Le(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ot(e){var t;return(t=(Ni(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ni(e){return Er()?e instanceof Node||e instanceof Le(e).Node:!1}function ce(e){return Er()?e instanceof Element||e instanceof Le(e).Element:!1}function pe(e){return Er()?e instanceof HTMLElement||e instanceof Le(e).HTMLElement:!1}function so(e){return!Er()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Le(e).ShadowRoot}function zn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=qe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function sc(e){return["table","td","th"].includes(At(e))}function Rr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ho(e){const t=Cr(),n=ce(e)?qe(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function ic(e){let t=ht(e);for(;pe(t)&&!ut(t);){if(Ho(t))return t;if(Rr(t))return null;t=ht(t)}return null}function Cr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ut(e){return["html","body","#document"].includes(At(e))}function qe(e){return Le(e).getComputedStyle(e)}function Sr(e){return ce(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ht(e){if(At(e)==="html")return e;const t=e.assignedSlot||e.parentNode||so(e)&&e.host||ot(e);return so(t)?t.host:t}function Li(e){const t=ht(e);return ut(t)?e.ownerDocument?e.ownerDocument.body:e.body:pe(t)&&zn(t)?t:Li(t)}function St(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Li(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Le(o);if(s){const a=io(i);return t.concat(i,i.visualViewport||[],zn(o)?o:[],a&&n?St(a):[])}return t.concat(o,St(o,[],n))}function io(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Pt(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Ie(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&so(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function $i(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function ji(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function ac(e){return e.mozInputSource===0&&e.isTrusted?!0:ao()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function lc(e){return uc()?!1:!ao()&&e.width===0&&e.height===0||ao()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function cc(){return/apple/i.test(navigator.vendor)}function ao(){const e=/android/i;return e.test($i())||e.test(ji())}function uc(){return ji().includes("jsdom/")}function ps(e,t){return["mouse","pen"].includes(e)}function fc(e){return"nativeEvent"in e}function dc(e){return e.matches("html,body")}function De(e){return(e==null?void 0:e.ownerDocument)||document}function jr(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Dt(e){return"composedPath"in e?e.composedPath()[0]:e.target}const hc="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Bi(e){return pe(e)&&e.matches(hc)}function Br(e){e.preventDefault(),e.stopPropagation()}function ms(e){return e?e.getAttribute("role")==="combobox"&&Bi(e):!1}const Vt=Math.min,Ee=Math.max,Nn=Math.round,nr=Math.floor,rt=e=>({x:e,y:e}),pc={left:"right",right:"left",bottom:"top",top:"bottom"},mc={start:"end",end:"start"};function gs(e,t,n){return Ee(e,Vt(t,n))}function xn(e,t){return typeof e=="function"?e(t):e}function kt(e){return e.split("-")[0]}function Vn(e){return e.split("-")[1]}function Hi(e){return e==="x"?"y":"x"}function Ui(e){return e==="y"?"height":"width"}function Qt(e){return["top","bottom"].includes(kt(e))?"y":"x"}function Wi(e){return Hi(Qt(e))}function gc(e,t,n){n===void 0&&(n=!1);const r=Vn(e),o=Wi(e),s=Ui(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=fr(i)),[i,fr(i)]}function bc(e){const t=fr(e);return[lo(e),t,lo(t)]}function lo(e){return e.replace(/start|end/g,t=>mc[t])}function vc(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function yc(e,t,n,r){const o=Vn(e);let s=vc(kt(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(lo)))),s}function fr(e){return e.replace(/left|right|bottom|top/g,t=>pc[t])}function wc(e){return{top:0,right:0,bottom:0,left:0,...e}}function xc(e){return typeof e!="number"?wc(e):{top:e,right:e,bottom:e,left:e}}function dr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}/*!
13
+ `,document.head.appendChild(t),console.log("Wallet UI fonts loaded")}catch(e){console.warn("Failed to load custom fonts, using system fonts instead",e)}},hu=()=>{typeof window<"u"&&du()};function Ga(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ga(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function pu(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ga(e))&&(r&&(r+=" "),r+=t);return r}const $s="-",mu=e=>{const t=vu(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split($s);return a[0]===""&&a.length!==1&&a.shift(),_a(a,t)||gu(i)},getConflictingClassGroupIds:(i,a)=>{const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}}},_a=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?_a(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join($s);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},fi=/^\[(.+)\]$/,gu=e=>{if(fi.test(e)){const t=fi.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},vu=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)_o(n[o],r,o,t);return r},_o=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:di(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(bu(o)){_o(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{_o(i,di(t,s),n,r)})})},di=(e,t)=>{let n=e;return t.split($s).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},bu=e=>e.isThemeGetter,yu=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},Qo="!",Ko=":",wu=Ko.length,xu=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,a=0,l=0,c;for(let x=0;x<o.length;x++){let b=o[x];if(i===0&&a===0){if(b===Ko){s.push(o.slice(l,x)),l=x+wu;continue}if(b==="/"){c=x;continue}}b==="["?i++:b==="]"?i--:b==="("?a++:b===")"&&a--}const d=s.length===0?o:o.substring(l),h=Eu(d),m=h!==d,f=c&&c>l?c-l:void 0;return{modifiers:s,hasImportantModifier:m,baseClassName:h,maybePostfixModifierPosition:f}};if(t){const o=t+Ko,s=r;r=i=>i.startsWith(o)?s(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},Eu=e=>e.endsWith(Qo)?e.substring(0,e.length-1):e.startsWith(Qo)?e.substring(1):e,Ru=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let s=[];return r.forEach(i=>{i[0]==="["||t[i]?(o.push(...s.sort(),i),s=[]):s.push(i)}),o.push(...s.sort()),o}},Cu=e=>({cache:yu(e.cacheSize),parseClassName:xu(e),sortModifiers:Ru(e),...mu(e)}),Su=/\s+/,Ou=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(Su);let l="";for(let c=a.length-1;c>=0;c-=1){const d=a[c],{isExternal:h,modifiers:m,hasImportantModifier:f,baseClassName:x,maybePostfixModifierPosition:b}=n(d);if(h){l=d+(l.length>0?" "+l:l);continue}let E=!!b,$=r(E?x.substring(0,b):x);if(!$){if(!E){l=d+(l.length>0?" "+l:l);continue}if($=r(x),!$){l=d+(l.length>0?" "+l:l);continue}E=!1}const w=s(m).join(":"),T=f?w+Qo:w,N=T+$;if(i.includes(N))continue;i.push(N);const I=o($,E);for(let j=0;j<I.length;++j){const W=I[j];i.push(T+W)}l=d+(l.length>0?" "+l:l)}return l};function Au(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Qa(t))&&(r&&(r+=" "),r+=n);return r}const Qa=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Qa(e[r]))&&(n&&(n+=" "),n+=t);return n};function ku(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((d,h)=>h(d),e());return n=Cu(c),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const d=Ou(l,n);return o(l,d),d}return function(){return s(Au.apply(null,arguments))}}const ve=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Ka=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ya=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Tu=/^\d+\/\d+$/,Fu=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Pu=/\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$/,$u=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Mu=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Du=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,vn=e=>Tu.test(e),oe=e=>!!e&&!Number.isNaN(Number(e)),Ot=e=>!!e&&Number.isInteger(Number(e)),Eo=e=>e.endsWith("%")&&oe(e.slice(0,-1)),gt=e=>Fu.test(e),Iu=()=>!0,Nu=e=>Pu.test(e)&&!$u.test(e),Xa=()=>!1,Lu=e=>Mu.test(e),ju=e=>Du.test(e),Bu=e=>!z(e)&&!G(e),Hu=e=>Vn(e,el,Xa),z=e=>Ka.test(e),Gt=e=>Vn(e,tl,Nu),Ro=e=>Vn(e,zu,oe),hi=e=>Vn(e,Ja,Xa),Wu=e=>Vn(e,Za,ju),Cr=e=>Vn(e,nl,Lu),G=e=>Ya.test(e),Kn=e=>qn(e,tl),Uu=e=>qn(e,Gu),pi=e=>qn(e,Ja),Vu=e=>qn(e,el),qu=e=>qn(e,Za),Sr=e=>qn(e,nl,!0),Vn=(e,t,n)=>{const r=Ka.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},qn=(e,t,n=!1)=>{const r=Ya.exec(e);return r?r[1]?t(r[1]):n:!1},Ja=e=>e==="position"||e==="percentage",Za=e=>e==="image"||e==="url",el=e=>e==="length"||e==="size"||e==="bg-size",tl=e=>e==="length",zu=e=>e==="number",Gu=e=>e==="family-name",nl=e=>e==="shadow",_u=()=>{const e=ve("color"),t=ve("font"),n=ve("text"),r=ve("font-weight"),o=ve("tracking"),s=ve("leading"),i=ve("breakpoint"),a=ve("container"),l=ve("spacing"),c=ve("radius"),d=ve("shadow"),h=ve("inset-shadow"),m=ve("text-shadow"),f=ve("drop-shadow"),x=ve("blur"),b=ve("perspective"),E=ve("aspect"),$=ve("ease"),w=ve("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...N(),G,z],j=()=>["auto","hidden","clip","visible","scroll"],W=()=>["auto","contain","none"],u=()=>[G,z,l],p=()=>[vn,"full","auto",...u()],g=()=>[Ot,"none","subgrid",G,z],S=()=>["auto",{span:["full",Ot,G,z]},Ot,G,z],C=()=>[Ot,"auto",G,z],k=()=>["auto","min","max","fr",G,z],A=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],v=()=>["start","end","center","stretch","center-safe","end-safe"],R=()=>["auto",...u()],F=()=>[vn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...u()],y=()=>[e,G,z],M=()=>[...N(),pi,hi,{position:[G,z]}],B=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",Vu,Hu,{size:[G,z]}],H=()=>[Eo,Kn,Gt],_=()=>["","none","full",c,G,z],ee=()=>["",oe,Kn,Gt],Z=()=>["solid","dashed","dotted","double"],Y=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>[oe,Eo,pi,hi],ae=()=>["","none",x,G,z],ge=()=>["none",oe,G,z],Ee=()=>["none",oe,G,z],Q=()=>[oe,G,z],ne=()=>[vn,"full",...u()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[gt],breakpoint:[gt],color:[Iu],container:[gt],"drop-shadow":[gt],ease:["in","out","in-out"],font:[Bu],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[gt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[gt],shadow:[gt],spacing:["px",oe],text:[gt],"text-shadow":[gt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",vn,z,G,E]}],container:["container"],columns:[{columns:[oe,z,G,a]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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:I()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:W()}],"overscroll-x":[{"overscroll-x":W()}],"overscroll-y":[{"overscroll-y":W()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:p()}],"inset-x":[{"inset-x":p()}],"inset-y":[{"inset-y":p()}],start:[{start:p()}],end:[{end:p()}],top:[{top:p()}],right:[{right:p()}],bottom:[{bottom:p()}],left:[{left:p()}],visibility:["visible","invisible","collapse"],z:[{z:[Ot,"auto",G,z]}],basis:[{basis:[vn,"full","auto",a,...u()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[oe,vn,"auto","initial","none",z]}],grow:[{grow:["",oe,G,z]}],shrink:[{shrink:["",oe,G,z]}],order:[{order:[Ot,"first","last","none",G,z]}],"grid-cols":[{"grid-cols":g()}],"col-start-end":[{col:S()}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":g()}],"row-start-end":[{row:S()}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:u()}],"gap-x":[{"gap-x":u()}],"gap-y":[{"gap-y":u()}],"justify-content":[{justify:[...A(),"normal"]}],"justify-items":[{"justify-items":[...v(),"normal"]}],"justify-self":[{"justify-self":["auto",...v()]}],"align-content":[{content:["normal",...A()]}],"align-items":[{items:[...v(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...v(),{baseline:["","last"]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...v(),"baseline"]}],"place-self":[{"place-self":["auto",...v()]}],p:[{p:u()}],px:[{px:u()}],py:[{py:u()}],ps:[{ps:u()}],pe:[{pe:u()}],pt:[{pt:u()}],pr:[{pr:u()}],pb:[{pb:u()}],pl:[{pl:u()}],m:[{m:R()}],mx:[{mx:R()}],my:[{my:R()}],ms:[{ms:R()}],me:[{me:R()}],mt:[{mt:R()}],mr:[{mr:R()}],mb:[{mb:R()}],ml:[{ml:R()}],"space-x":[{"space-x":u()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":u()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[a,"screen",...F()]}],"min-w":[{"min-w":[a,"screen","none",...F()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",n,Kn,Gt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,G,Ro]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Eo,z]}],"font-family":[{font:[Uu,z,t]}],"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:[o,G,z]}],"line-clamp":[{"line-clamp":[oe,"none",G,Ro]}],leading:[{leading:[s,...u()]}],"list-image":[{"list-image":["none",G,z]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",G,z]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:y()}],"text-color":[{text:y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:[oe,"from-font","auto",G,Gt]}],"text-decoration-color":[{decoration:y()}],"underline-offset":[{"underline-offset":[oe,"auto",G,z]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:u()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",G,z]}],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",G,z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:B()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ot,G,z],radial:["",G,z],conic:[Ot,G,z]},qu,Wu]}],"bg-color":[{bg:y()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:y()}],"gradient-via":[{via:y()}],"gradient-to":[{to:y()}],rounded:[{rounded:_()}],"rounded-s":[{"rounded-s":_()}],"rounded-e":[{"rounded-e":_()}],"rounded-t":[{"rounded-t":_()}],"rounded-r":[{"rounded-r":_()}],"rounded-b":[{"rounded-b":_()}],"rounded-l":[{"rounded-l":_()}],"rounded-ss":[{"rounded-ss":_()}],"rounded-se":[{"rounded-se":_()}],"rounded-ee":[{"rounded-ee":_()}],"rounded-es":[{"rounded-es":_()}],"rounded-tl":[{"rounded-tl":_()}],"rounded-tr":[{"rounded-tr":_()}],"rounded-br":[{"rounded-br":_()}],"rounded-bl":[{"rounded-bl":_()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Z(),"hidden","none"]}],"divide-style":[{divide:[...Z(),"hidden","none"]}],"border-color":[{border:y()}],"border-color-x":[{"border-x":y()}],"border-color-y":[{"border-y":y()}],"border-color-s":[{"border-s":y()}],"border-color-e":[{"border-e":y()}],"border-color-t":[{"border-t":y()}],"border-color-r":[{"border-r":y()}],"border-color-b":[{"border-b":y()}],"border-color-l":[{"border-l":y()}],"divide-color":[{divide:y()}],"outline-style":[{outline:[...Z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[oe,G,z]}],"outline-w":[{outline:["",oe,Kn,Gt]}],"outline-color":[{outline:y()}],shadow:[{shadow:["","none",d,Sr,Cr]}],"shadow-color":[{shadow:y()}],"inset-shadow":[{"inset-shadow":["none",h,Sr,Cr]}],"inset-shadow-color":[{"inset-shadow":y()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:y()}],"ring-offset-w":[{"ring-offset":[oe,Gt]}],"ring-offset-color":[{"ring-offset":y()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":y()}],"text-shadow":[{"text-shadow":["none",m,Sr,Cr]}],"text-shadow-color":[{"text-shadow":y()}],opacity:[{opacity:[oe,G,z]}],"mix-blend":[{"mix-blend":[...Y(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Y()}],"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":[oe]}],"mask-image-linear-from-pos":[{"mask-linear-from":U()}],"mask-image-linear-to-pos":[{"mask-linear-to":U()}],"mask-image-linear-from-color":[{"mask-linear-from":y()}],"mask-image-linear-to-color":[{"mask-linear-to":y()}],"mask-image-t-from-pos":[{"mask-t-from":U()}],"mask-image-t-to-pos":[{"mask-t-to":U()}],"mask-image-t-from-color":[{"mask-t-from":y()}],"mask-image-t-to-color":[{"mask-t-to":y()}],"mask-image-r-from-pos":[{"mask-r-from":U()}],"mask-image-r-to-pos":[{"mask-r-to":U()}],"mask-image-r-from-color":[{"mask-r-from":y()}],"mask-image-r-to-color":[{"mask-r-to":y()}],"mask-image-b-from-pos":[{"mask-b-from":U()}],"mask-image-b-to-pos":[{"mask-b-to":U()}],"mask-image-b-from-color":[{"mask-b-from":y()}],"mask-image-b-to-color":[{"mask-b-to":y()}],"mask-image-l-from-pos":[{"mask-l-from":U()}],"mask-image-l-to-pos":[{"mask-l-to":U()}],"mask-image-l-from-color":[{"mask-l-from":y()}],"mask-image-l-to-color":[{"mask-l-to":y()}],"mask-image-x-from-pos":[{"mask-x-from":U()}],"mask-image-x-to-pos":[{"mask-x-to":U()}],"mask-image-x-from-color":[{"mask-x-from":y()}],"mask-image-x-to-color":[{"mask-x-to":y()}],"mask-image-y-from-pos":[{"mask-y-from":U()}],"mask-image-y-to-pos":[{"mask-y-to":U()}],"mask-image-y-from-color":[{"mask-y-from":y()}],"mask-image-y-to-color":[{"mask-y-to":y()}],"mask-image-radial":[{"mask-radial":[G,z]}],"mask-image-radial-from-pos":[{"mask-radial-from":U()}],"mask-image-radial-to-pos":[{"mask-radial-to":U()}],"mask-image-radial-from-color":[{"mask-radial-from":y()}],"mask-image-radial-to-color":[{"mask-radial-to":y()}],"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":N()}],"mask-image-conic-pos":[{"mask-conic":[oe]}],"mask-image-conic-from-pos":[{"mask-conic-from":U()}],"mask-image-conic-to-pos":[{"mask-conic-to":U()}],"mask-image-conic-from-color":[{"mask-conic-from":y()}],"mask-image-conic-to-color":[{"mask-conic-to":y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:B()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",G,z]}],filter:[{filter:["","none",G,z]}],blur:[{blur:ae()}],brightness:[{brightness:[oe,G,z]}],contrast:[{contrast:[oe,G,z]}],"drop-shadow":[{"drop-shadow":["","none",f,Sr,Cr]}],"drop-shadow-color":[{"drop-shadow":y()}],grayscale:[{grayscale:["",oe,G,z]}],"hue-rotate":[{"hue-rotate":[oe,G,z]}],invert:[{invert:["",oe,G,z]}],saturate:[{saturate:[oe,G,z]}],sepia:[{sepia:["",oe,G,z]}],"backdrop-filter":[{"backdrop-filter":["","none",G,z]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[oe,G,z]}],"backdrop-contrast":[{"backdrop-contrast":[oe,G,z]}],"backdrop-grayscale":[{"backdrop-grayscale":["",oe,G,z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[oe,G,z]}],"backdrop-invert":[{"backdrop-invert":["",oe,G,z]}],"backdrop-opacity":[{"backdrop-opacity":[oe,G,z]}],"backdrop-saturate":[{"backdrop-saturate":[oe,G,z]}],"backdrop-sepia":[{"backdrop-sepia":["",oe,G,z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":u()}],"border-spacing-x":[{"border-spacing-x":u()}],"border-spacing-y":[{"border-spacing-y":u()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",G,z]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[oe,"initial",G,z]}],ease:[{ease:["linear","initial",$,G,z]}],delay:[{delay:[oe,G,z]}],animate:[{animate:["none",w,G,z]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,G,z]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:Ee()}],"scale-x":[{"scale-x":Ee()}],"scale-y":[{"scale-y":Ee()}],"scale-z":[{"scale-z":Ee()}],"scale-3d":["scale-3d"],skew:[{skew:Q()}],"skew-x":[{"skew-x":Q()}],"skew-y":[{"skew-y":Q()}],transform:[{transform:[G,z,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ne()}],"translate-x":[{"translate-x":ne()}],"translate-y":[{"translate-y":ne()}],"translate-z":[{"translate-z":ne()}],"translate-none":["translate-none"],accent:[{accent:y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:y()}],"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",G,z]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":u()}],"scroll-mx":[{"scroll-mx":u()}],"scroll-my":[{"scroll-my":u()}],"scroll-ms":[{"scroll-ms":u()}],"scroll-me":[{"scroll-me":u()}],"scroll-mt":[{"scroll-mt":u()}],"scroll-mr":[{"scroll-mr":u()}],"scroll-mb":[{"scroll-mb":u()}],"scroll-ml":[{"scroll-ml":u()}],"scroll-p":[{"scroll-p":u()}],"scroll-px":[{"scroll-px":u()}],"scroll-py":[{"scroll-py":u()}],"scroll-ps":[{"scroll-ps":u()}],"scroll-pe":[{"scroll-pe":u()}],"scroll-pt":[{"scroll-pt":u()}],"scroll-pr":[{"scroll-pr":u()}],"scroll-pb":[{"scroll-pb":u()}],"scroll-pl":[{"scroll-pl":u()}],"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",G,z]}],fill:[{fill:["none",...y()]}],"stroke-w":[{stroke:[oe,Kn,Gt,Ro]}],stroke:[{stroke:["none",...y()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Qu=ku(_u);function En(...e){return Qu(pu(e))}const Ms=O.forwardRef(({className:e="",children:t,style:n,...r},o)=>L.jsx("button",{ref:o,className:En("bg-[#2D2DF1] dark:bg-[#BFBFF9] transition-colors hover:bg-[#2929D9] dark:hover:bg-[#D4D4FA] text-white dark:text-[#001324] font-bold py-2.5 px-4 rounded-xl cursor-pointer disabled:opacity-50 wallet-custom-font",e),style:n,...r,type:"button",children:t||"Connect Wallet"}));Ms.displayName="ConnectWalletButton";function no(){return typeof window<"u"}function qt(e){return rl(e)?(e.nodeName||"").toLowerCase():"#document"}function Ne(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function dt(e){var t;return(t=(rl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function rl(e){return no()?e instanceof Node||e instanceof Ne(e).Node:!1}function de(e){return no()?e instanceof Element||e instanceof Ne(e).Element:!1}function be(e){return no()?e instanceof HTMLElement||e instanceof Ne(e).HTMLElement:!1}function Yo(e){return!no()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ne(e).ShadowRoot}const Ku=new Set(["inline","contents"]);function pr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ze(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Ku.has(o)}const Yu=new Set(["table","td","th"]);function Xu(e){return Yu.has(qt(e))}const Ju=[":popover-open",":modal"];function ro(e){return Ju.some(t=>{try{return e.matches(t)}catch{return!1}})}const Zu=["transform","translate","scale","rotate","perspective"],ef=["transform","translate","scale","rotate","perspective","filter"],tf=["paint","layout","strict","content"];function Ds(e){const t=oo(),n=de(e)?ze(e):e;return Zu.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||ef.some(r=>(n.willChange||"").includes(r))||tf.some(r=>(n.contain||"").includes(r))}function nf(e){let t=Et(e);for(;be(t)&&!wt(t);){if(Ds(t))return t;if(ro(t))return null;t=Et(t)}return null}function oo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const rf=new Set(["html","body","#document"]);function wt(e){return rf.has(qt(e))}function ze(e){return Ne(e).getComputedStyle(e)}function so(e){return de(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Et(e){if(qt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Yo(e)&&e.host||dt(e);return Yo(t)?t.host:t}function ol(e){const t=Et(e);return wt(t)?e.ownerDocument?e.ownerDocument.body:e.body:be(t)&&pr(t)?t:ol(t)}function Ht(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ol(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Ne(o);if(s){const a=Xo(i);return t.concat(i,i.visualViewport||[],pr(o)?o:[],a&&n?Ht(a):[])}return t.concat(o,Ht(o,[],n))}function Xo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Hr=Math.min,ln=Math.max,Wr=Math.round,Or=Math.floor,lt=e=>({x:e,y:e}),of={left:"right",right:"left",bottom:"top",top:"bottom"},sf={start:"end",end:"start"};function mi(e,t,n){return ln(e,Hr(t,n))}function io(e,t){return typeof e=="function"?e(t):e}function un(e){return e.split("-")[0]}function ao(e){return e.split("-")[1]}function sl(e){return e==="x"?"y":"x"}function il(e){return e==="y"?"height":"width"}const af=new Set(["top","bottom"]);function jt(e){return af.has(un(e))?"y":"x"}function al(e){return sl(jt(e))}function lf(e,t,n){n===void 0&&(n=!1);const r=ao(e),o=al(e),s=il(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Ur(i)),[i,Ur(i)]}function cf(e){const t=Ur(e);return[Jo(e),t,Jo(t)]}function Jo(e){return e.replace(/start|end/g,t=>sf[t])}const gi=["left","right"],vi=["right","left"],uf=["top","bottom"],ff=["bottom","top"];function df(e,t,n){switch(e){case"top":case"bottom":return n?t?vi:gi:t?gi:vi;case"left":case"right":return t?uf:ff;default:return[]}}function hf(e,t,n,r){const o=ao(e);let s=df(un(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Jo)))),s}function Ur(e){return e.replace(/left|right|bottom|top/g,t=>of[t])}function pf(e){return{top:0,right:0,bottom:0,left:0,...e}}function mf(e){return typeof e!="number"?pf(e):{top:e,right:e,bottom:e,left:e}}function Vr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}/*!
14
14
  * tabbable 6.2.0
15
15
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
16
- */var Ec=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],hr=Ec.join(","),qi=typeof Element>"u",bn=qi?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,pr=!qi&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},mr=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=o===""||o==="true",i=s||n&&t&&e(t.parentNode);return i},Rc=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Cc=function(t,n,r){if(mr(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(hr));return n&&bn.call(t,hr)&&o.unshift(t),o=o.filter(r),o},Sc=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!mr(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,u=e(l,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:i,candidates:u})}else{var d=bn.call(i,hr);d&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var h=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),E=!mr(h,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(h&&E){var p=e(h===!0?i.children:h.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:i,candidates:p})}else s.unshift.apply(s,i.children)}}return o},Gi=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},zi=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Rc(t))&&!Gi(t)?0:t.tabIndex},kc=function(t,n){var r=zi(t);return r<0&&n&&!Gi(t)?0:r},Ac=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Vi=function(t){return t.tagName==="INPUT"},Oc=function(t){return Vi(t)&&t.type==="hidden"},Tc=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},Fc=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},Pc=function(t){if(!t.name)return!0;var n=t.form||pr(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=Fc(o,t.form);return!s||s===t},Mc=function(t){return Vi(t)&&t.type==="radio"},Ic=function(t){return Mc(t)&&!Pc(t)},Dc=function(t){var n,r=t&&pr(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,a,l;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var u,d,h;r=pr(o),o=(u=r)===null||u===void 0?void 0:u.host,s=!!((d=o)!==null&&d!==void 0&&(h=d.ownerDocument)!==null&&h!==void 0&&h.contains(o))}}return s},bs=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},Nc=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=bn.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(bn.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,u=pr(t);if(l&&!l.shadowRoot&&o(l)===!0)return bs(t);t.assignedSlot?t=t.assignedSlot:!l&&u!==t.ownerDocument?t=u.host:t=l}t=a}if(Dc(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return bs(t);return!1},Lc=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return bn.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},$c=function(t,n){return!(n.disabled||mr(n)||Oc(n)||Nc(n,t)||Tc(n)||Lc(n))},co=function(t,n){return!(Ic(n)||zi(n)<0||!$c(t,n))},jc=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Bc=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=kc(a,i),u=i?e(o.candidates):a;l===0?i?n.push.apply(n,u):n.push(a):r.push({documentOrder:s,tabIndex:l,item:o,isScope:i,content:u})}),r.sort(Ac).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},kr=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Sc([t],n.includeContainer,{filter:co.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:jc}):r=Cc(t,n.includeContainer,co.bind(null,n)),Bc(r)},Hc=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return bn.call(t,hr)===!1?!1:co(n,t)};function vs(e,t,n){let{reference:r,floating:o}=e;const s=Qt(t),i=Wi(t),a=Ui(i),l=kt(t),u=s==="y",d=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,E=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:h};break;case"left":p={x:r.x-o.width,y:h};break;default:p={x:r.x,y:r.y}}switch(Vn(t)){case"start":p[i]-=E*(n&&u?-1:1);break;case"end":p[i]+=E*(n&&u?-1:1);break}return p}const Uc=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:h}=vs(u,r,l),E=r,p={},g=0;for(let y=0;y<a.length;y++){const{name:T,fn:D}=a[y],{x:w,y:M,data:L,reset:H}=await D({x:d,y:h,initialPlacement:r,placement:E,strategy:o,middlewareData:p,rects:u,platform:i,elements:{reference:e,floating:t}});d=w??d,h=M??h,p={...p,[T]:{...p[T],...L}},H&&g<=50&&(g++,typeof H=="object"&&(H.placement&&(E=H.placement),H.rects&&(u=H.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):H.rects),{x:d,y:h}=vs(u,E,l)),y=-1)}return{x:d,y:h,placement:E,strategy:o,middlewareData:p}};async function Ar(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:E=!1,padding:p=0}=xn(t,e),g=xc(p),T=a[E?h==="floating"?"reference":"floating":h],D=dr(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(T)))==null||n?T:T.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),w=h==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,M=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),L=await(s.isElement==null?void 0:s.isElement(M))?await(s.getScale==null?void 0:s.getScale(M))||{x:1,y:1}:{x:1,y:1},H=dr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:M,strategy:l}):w);return{top:(D.top-H.top+g.top)/L.y,bottom:(H.bottom-D.bottom+g.bottom)/L.y,left:(D.left-H.left+g.left)/L.x,right:(H.right-D.right+g.right)/L.x}}const Wc=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:E,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...T}=xn(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const D=kt(o),w=Qt(a),M=kt(a)===a,L=await(l.isRTL==null?void 0:l.isRTL(u.floating)),H=E||(M||!y?[fr(a)]:bc(a)),j=g!=="none";!E&&j&&H.push(...yc(a,y,g,L));const U=[a,...H],c=await Ar(t,T),f=[];let b=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&f.push(c[D]),h){const A=gc(o,i,L);f.push(c[A[0]],c[A[1]])}if(b=[...b,{placement:o,overflows:f}],!f.every(A=>A<=0)){var x,R;const A=(((x=s.flip)==null?void 0:x.index)||0)+1,m=U[A];if(m)return{data:{index:A,overflows:b},reset:{placement:m}};let C=(R=b.filter(F=>F.overflows[0]<=0).sort((F,v)=>F.overflows[1]-v.overflows[1])[0])==null?void 0:R.placement;if(!C)switch(p){case"bestFit":{var k;const F=(k=b.filter(v=>{if(j){const P=Qt(v.placement);return P===w||P==="y"}return!0}).map(v=>[v.placement,v.overflows.filter(P=>P>0).reduce((P,$)=>P+$,0)]).sort((v,P)=>v[1]-P[1])[0])==null?void 0:k[0];F&&(C=F);break}case"initialPlacement":C=a;break}if(o!==C)return{reset:{placement:C}}}return{}}}};async function qc(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=kt(n),a=Vn(n),l=Qt(n)==="y",u=["left","top"].includes(i)?-1:1,d=s&&l?-1:1,h=xn(t,e);let{mainAxis:E,crossAxis:p,alignmentAxis:g}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof g=="number"&&(p=a==="end"?g*-1:g),l?{x:p*d,y:E*u}:{x:E*u,y:p*d}}const Gc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await qc(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},zc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:T=>{let{x:D,y:w}=T;return{x:D,y:w}}},...l}=xn(e,t),u={x:n,y:r},d=await Ar(t,l),h=Qt(kt(o)),E=Hi(h);let p=u[E],g=u[h];if(s){const T=E==="y"?"top":"left",D=E==="y"?"bottom":"right",w=p+d[T],M=p-d[D];p=gs(w,p,M)}if(i){const T=h==="y"?"top":"left",D=h==="y"?"bottom":"right",w=g+d[T],M=g-d[D];g=gs(w,g,M)}const y=a.fn({...t,[E]:p,[h]:g});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[E]:s,[h]:i}}}}}},Vc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:l=()=>{},...u}=xn(e,t),d=await Ar(t,u),h=kt(o),E=Vn(o),p=Qt(o)==="y",{width:g,height:y}=s.floating;let T,D;h==="top"||h==="bottom"?(T=h,D=E===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(D=h,T=E==="end"?"top":"bottom");const w=y-d.top-d.bottom,M=g-d.left-d.right,L=Vt(y-d[T],w),H=Vt(g-d[D],M),j=!t.middlewareData.shift;let U=L,c=H;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(c=M),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(U=w),j&&!E){const b=Ee(d.left,0),x=Ee(d.right,0),R=Ee(d.top,0),k=Ee(d.bottom,0);p?c=g-2*(b!==0||x!==0?b+x:Ee(d.left,d.right)):U=y-2*(R!==0||k!==0?R+k:Ee(d.top,d.bottom))}await l({...t,availableWidth:c,availableHeight:U});const f=await i.getDimensions(a.floating);return g!==f.width||y!==f.height?{reset:{rects:!0}}:{}}}};function Qi(e){const t=qe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=pe(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Nn(n)!==s||Nn(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Uo(e){return ce(e)?e:e.contextElement}function tn(e){const t=Uo(e);if(!pe(t))return rt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Qi(t);let i=(s?Nn(n.width):n.width)/r,a=(s?Nn(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Qc=rt(0);function Ki(e){const t=Le(e);return!Cr()||!t.visualViewport?Qc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Kc(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Le(e)?!1:t}function Kt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Uo(e);let i=rt(1);t&&(r?ce(r)&&(i=tn(r)):i=tn(e));const a=Kc(s,n,r)?Ki(s):rt(0);let l=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,d=o.width/i.x,h=o.height/i.y;if(s){const E=Le(s),p=r&&ce(r)?Le(r):r;let g=E,y=io(g);for(;y&&r&&p!==g;){const T=tn(y),D=y.getBoundingClientRect(),w=qe(y),M=D.left+(y.clientLeft+parseFloat(w.paddingLeft))*T.x,L=D.top+(y.clientTop+parseFloat(w.paddingTop))*T.y;l*=T.x,u*=T.y,d*=T.x,h*=T.y,l+=M,u+=L,g=Le(y),y=io(g)}}return dr({width:d,height:h,x:l,y:u})}function Wo(e,t){const n=Sr(e).scrollLeft;return t?t.left+n:Kt(ot(e)).left+n}function Yi(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Wo(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function Yc(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=ot(r),a=t?Rr(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=rt(1);const d=rt(0),h=pe(r);if((h||!h&&!s)&&((At(r)!=="body"||zn(i))&&(l=Sr(r)),pe(r))){const p=Kt(r);u=tn(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const E=i&&!h&&!s?Yi(i,l,!0):rt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+E.x,y:n.y*u.y-l.scrollTop*u.y+d.y+E.y}}function Xc(e){return Array.from(e.getClientRects())}function _c(e){const t=ot(e),n=Sr(e),r=e.ownerDocument.body,o=Ee(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Ee(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Wo(e);const a=-n.scrollTop;return qe(r).direction==="rtl"&&(i+=Ee(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function Jc(e,t){const n=Le(e),r=ot(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const u=Cr();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function Zc(e,t){const n=Kt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=pe(e)?tn(e):rt(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,u=r*s.y;return{width:i,height:a,x:l,y:u}}function ys(e,t,n){let r;if(t==="viewport")r=Jc(e,n);else if(t==="document")r=_c(ot(e));else if(ce(t))r=Zc(t,n);else{const o=Ki(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return dr(r)}function Xi(e,t){const n=ht(e);return n===t||!ce(n)||ut(n)?!1:qe(n).position==="fixed"||Xi(n,t)}function eu(e,t){const n=t.get(e);if(n)return n;let r=St(e,[],!1).filter(a=>ce(a)&&At(a)!=="body"),o=null;const s=qe(e).position==="fixed";let i=s?ht(e):e;for(;ce(i)&&!ut(i);){const a=qe(i),l=Ho(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||zn(i)&&!l&&Xi(e,i))?r=r.filter(d=>d!==i):o=a,i=ht(i)}return t.set(e,r),r}function tu(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Rr(t)?[]:eu(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((u,d)=>{const h=ys(t,d,o);return u.top=Ee(h.top,u.top),u.right=Vt(h.right,u.right),u.bottom=Vt(h.bottom,u.bottom),u.left=Ee(h.left,u.left),u},ys(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function nu(e){const{width:t,height:n}=Qi(e);return{width:t,height:n}}function ru(e,t,n){const r=pe(t),o=ot(t),s=n==="fixed",i=Kt(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=rt(0);if(r||!r&&!s)if((At(t)!=="body"||zn(o))&&(a=Sr(t)),r){const E=Kt(t,!0,s,t);l.x=E.x+t.clientLeft,l.y=E.y+t.clientTop}else o&&(l.x=Wo(o));const u=o&&!r&&!s?Yi(o,a):rt(0),d=i.left+a.scrollLeft-l.x-u.x,h=i.top+a.scrollTop-l.y-u.y;return{x:d,y:h,width:i.width,height:i.height}}function Hr(e){return qe(e).position==="static"}function ws(e,t){if(!pe(e)||qe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ot(e)===n&&(n=n.ownerDocument.body),n}function _i(e,t){const n=Le(e);if(Rr(e))return n;if(!pe(e)){let o=ht(e);for(;o&&!ut(o);){if(ce(o)&&!Hr(o))return o;o=ht(o)}return n}let r=ws(e,t);for(;r&&sc(r)&&Hr(r);)r=ws(r,t);return r&&ut(r)&&Hr(r)&&!Ho(r)?n:r||ic(e)||n}const ou=async function(e){const t=this.getOffsetParent||_i,n=this.getDimensions,r=await n(e.floating);return{reference:ru(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function su(e){return qe(e).direction==="rtl"}const iu={convertOffsetParentRelativeRectToViewportRelativeRect:Yc,getDocumentElement:ot,getClippingRect:tu,getOffsetParent:_i,getElementRects:ou,getClientRects:Xc,getDimensions:nu,getScale:tn,isElement:ce,isRTL:su};function Ji(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function au(e,t){let n=null,r;const o=ot(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:d,top:h,width:E,height:p}=u;if(a||t(),!E||!p)return;const g=nr(h),y=nr(o.clientWidth-(d+E)),T=nr(o.clientHeight-(h+p)),D=nr(d),M={rootMargin:-g+"px "+-y+"px "+-T+"px "+-D+"px",threshold:Ee(0,Vt(1,l))||1};let L=!0;function H(j){const U=j[0].intersectionRatio;if(U!==l){if(!L)return i();U?i(!1,U):r=setTimeout(()=>{i(!1,1e-7)},1e3)}U===1&&!Ji(u,e.getBoundingClientRect())&&i(),L=!1}try{n=new IntersectionObserver(H,{...M,root:o.ownerDocument})}catch{n=new IntersectionObserver(H,M)}n.observe(e)}return i(!0),s}function Zi(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Uo(e),d=o||s?[...u?St(u):[],...St(t)]:[];d.forEach(D=>{o&&D.addEventListener("scroll",n,{passive:!0}),s&&D.addEventListener("resize",n)});const h=u&&a?au(u,n):null;let E=-1,p=null;i&&(p=new ResizeObserver(D=>{let[w]=D;w&&w.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(E),E=requestAnimationFrame(()=>{var M;(M=p)==null||M.observe(t)})),n()}),u&&!l&&p.observe(u),p.observe(t));let g,y=l?Kt(e):null;l&&T();function T(){const D=Kt(e);y&&!Ji(y,D)&&n(),y=D,g=requestAnimationFrame(T)}return n(),()=>{var D;d.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),h==null||h(),(D=p)==null||D.disconnect(),p=null,l&&cancelAnimationFrame(g)}}const Ur=Ar,lu=Gc,cu=zc,uu=Wc,fu=Vc,du=(e,t,n)=>{const r=new Map,o={platform:iu,...n},s={...o.platform,_c:r};return Uc(e,t,{...o,platform:s})};var ur=typeof document<"u"?S.useLayoutEffect:S.useEffect;function gr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!gr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!gr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ea(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xs(e,t){const n=ea(e);return Math.round(t*n)/n}function Wr(e){const t=I.useRef(e);return ur(()=>{t.current=e}),t}function ta(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,h]=I.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[E,p]=I.useState(r);gr(E,r)||p(r);const[g,y]=I.useState(null),[T,D]=I.useState(null),w=I.useCallback(v=>{v!==j.current&&(j.current=v,y(v))},[]),M=I.useCallback(v=>{v!==U.current&&(U.current=v,D(v))},[]),L=s||g,H=i||T,j=I.useRef(null),U=I.useRef(null),c=I.useRef(d),f=l!=null,b=Wr(l),x=Wr(o),R=Wr(u),k=I.useCallback(()=>{if(!j.current||!U.current)return;const v={placement:t,strategy:n,middleware:E};x.current&&(v.platform=x.current),du(j.current,U.current,v).then(P=>{const $={...P,isPositioned:R.current!==!1};A.current&&!gr(c.current,$)&&(c.current=$,Dn.flushSync(()=>{h($)}))})},[E,t,n,x,R]);ur(()=>{u===!1&&c.current.isPositioned&&(c.current.isPositioned=!1,h(v=>({...v,isPositioned:!1})))},[u]);const A=I.useRef(!1);ur(()=>(A.current=!0,()=>{A.current=!1}),[]),ur(()=>{if(L&&(j.current=L),H&&(U.current=H),L&&H){if(b.current)return b.current(L,H,k);k()}},[L,H,k,b,f]);const m=I.useMemo(()=>({reference:j,floating:U,setReference:w,setFloating:M}),[w,M]),C=I.useMemo(()=>({reference:L,floating:H}),[L,H]),F=I.useMemo(()=>{const v={position:n,left:0,top:0};if(!C.floating)return v;const P=xs(C.floating,d.x),$=xs(C.floating,d.y);return a?{...v,transform:"translate("+P+"px, "+$+"px)",...ea(C.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:P,top:$}},[n,a,C.floating,d.x,d.y]);return I.useMemo(()=>({...d,update:k,refs:m,elements:C,floatingStyles:F}),[d,k,m,C,F])}const qo=(e,t)=>({...lu(e),options:[e,t]}),na=(e,t)=>({...cu(e),options:[e,t]}),ra=(e,t)=>({...uu(e),options:[e,t]}),hu=(e,t)=>({...fu(e),options:[e,t]});function pu(e){const t=I.useRef(void 0),n=I.useCallback(r=>{const o=e.map(s=>{if(s!=null){if(typeof s=="function"){const i=s,a=i(r);return typeof a=="function"?a:()=>{i(null)}}return s.current=r,()=>{s.current=null}}});return()=>{o.forEach(s=>s==null?void 0:s())}},e);return I.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}const oa={...I},mu=oa.useInsertionEffect,gu=mu||(e=>e());function tt(e){const t=I.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return gu(()=>{t.current=e}),I.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}var Ne=typeof document<"u"?S.useLayoutEffect:S.useEffect;let Es=!1,bu=0;const Rs=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+bu++;function vu(){const[e,t]=I.useState(()=>Es?Rs():void 0);return Ne(()=>{e==null&&t(Rs())},[]),I.useEffect(()=>{Es=!0},[]),e}const yu=oa.useId,vn=yu||vu;let uo;process.env.NODE_ENV!=="production"&&(uo=new Set);function wu(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=uo)!=null&&e.has(o))){var s;(s=uo)==null||s.add(o),console.error(o)}}function xu(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const Eu=I.createContext(null),Ru=I.createContext(null),sa=()=>{var e;return((e=I.useContext(Eu))==null?void 0:e.id)||null},Go=()=>I.useContext(Ru);function Ln(e){return"data-floating-ui-"+e}function qr(e){const t=S.useRef(e);return Ne(()=>{t.current=e}),t}let Cs=0;function Jt(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Cs);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():Cs=requestAnimationFrame(s)}function Ss(e,t){var n;let r=[],o=(n=e.find(s=>s.id===t))==null?void 0:n.parentId;for(;o;){const s=e.find(i=>i.id===o);o=s==null?void 0:s.parentId,s&&(r=r.concat(s))}return r}function Fn(e,t){let n=e.filter(o=>{var s;return o.parentId===t&&((s=o.context)==null?void 0:s.open)}),r=n;for(;r.length;)r=e.filter(o=>{var s;return(s=r)==null?void 0:s.some(i=>{var a;return o.parentId===i.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}let Zt=new WeakMap,rr=new WeakSet,or={},Gr=0;const Cu=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,ia=e=>e&&(e.host||ia(e.parentNode)),Su=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=ia(n);return e.contains(r)?r:null}).filter(n=>n!=null);function ku(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=Su(t,e),a=new Set,l=new Set(i),u=[];or[o]||(or[o]=new WeakMap);const d=or[o];i.forEach(h),E(t),a.clear();function h(p){!p||a.has(p)||(a.add(p),p.parentNode&&h(p.parentNode))}function E(p){!p||l.has(p)||[].forEach.call(p.children,g=>{if(At(g)!=="script")if(a.has(g))E(g);else{const y=s?g.getAttribute(s):null,T=y!==null&&y!=="false",D=Zt.get(g)||0,w=s?D+1:D,M=(d.get(g)||0)+1;Zt.set(g,w),d.set(g,M),u.push(g),w===1&&T&&rr.add(g),M===1&&g.setAttribute(o,""),!T&&s&&g.setAttribute(s,s==="inert"?"":"true")}})}return Gr++,()=>{u.forEach(p=>{const g=Zt.get(p)||0,y=s?g-1:g,T=(d.get(p)||0)-1;Zt.set(p,y),d.set(p,T),y||(!rr.has(p)&&s&&p.removeAttribute(s),rr.delete(p)),T||p.removeAttribute(o)}),Gr--,Gr||(Zt=new WeakMap,Zt=new WeakMap,rr=new WeakSet,or={})}}function ks(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=De(e[0]).body;return ku(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Or=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function aa(e,t){const n=kr(e,Or());t==="prev"&&n.reverse();const r=n.indexOf(Pt(De(e)));return n.slice(r+1)[0]}function la(e){return aa(De(e).body,"next")||e}function ca(e){return aa(De(e).body,"prev")||e}function Pn(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ie(n,r)}function Au(e){kr(e,Or()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function As(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const Tr={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},br=I.forwardRef(function(t,n){const[r,o]=I.useState();Ne(()=>{cc()&&o("button")},[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Ln("focus-guard")]:"",style:Tr};return N.jsx("span",{...t,...s})}),ua=I.createContext(null),Os=Ln("portal");function Ou(e){e===void 0&&(e={});const{id:t,root:n}=e,r=vn(),o=da(),[s,i]=I.useState(null),a=I.useRef(null);return Ne(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),Ne(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const u=document.createElement("div");u.id=r,u.setAttribute(Os,""),l.appendChild(u),a.current=u,i(u)},[t,r]),Ne(()=>{if(n===null||!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!ce(l)&&(l=l.current),l=l||document.body;let u=null;t&&(u=document.createElement("div"),u.id=t,l.appendChild(u));const d=document.createElement("div");d.id=r,d.setAttribute(Os,""),l=u||l,l.appendChild(d),a.current=d,i(d)},[t,n,r,o]),s}function fa(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,s=Ou({id:n,root:r}),[i,a]=I.useState(null),l=I.useRef(null),u=I.useRef(null),d=I.useRef(null),h=I.useRef(null),E=i==null?void 0:i.modal,p=i==null?void 0:i.open,g=!!i&&!i.modal&&i.open&&o&&!!(r||s);return I.useEffect(()=>{if(!s||!o||E)return;function y(T){s&&Pn(T)&&(T.type==="focusin"?As:Au)(s)}return s.addEventListener("focusin",y,!0),s.addEventListener("focusout",y,!0),()=>{s.removeEventListener("focusin",y,!0),s.removeEventListener("focusout",y,!0)}},[s,o,E]),I.useEffect(()=>{s&&(p||As(s))},[p,s]),N.jsxs(ua.Provider,{value:I.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:d,afterInsideRef:h,portalNode:s,setFocusManagerState:a}),[o,s]),children:[g&&s&&N.jsx(br,{"data-type":"outside",ref:l,onFocus:y=>{if(Pn(y,s)){var T;(T=d.current)==null||T.focus()}else{const D=i?i.domReference:null,w=ca(D);w==null||w.focus()}}}),g&&s&&N.jsx("span",{"aria-owns":s.id,style:Tr}),s&&Dn.createPortal(t,s),g&&s&&N.jsx(br,{"data-type":"outside",ref:u,onFocus:y=>{if(Pn(y,s)){var T;(T=h.current)==null||T.focus()}else{const D=i?i.domReference:null,w=la(D);w==null||w.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,y.nativeEvent,"focus-out"))}}})]})}const da=()=>I.useContext(ua),fo="data-floating-ui-focusable";function Ts(e){return e?e.hasAttribute(fo)?e:e.querySelector("["+fo+"]")||e:null}function Fs(e){return I.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const Tu=20;let Mt=[];function Fu(e){Mt=Mt.filter(t=>t.isConnected),e&&At(e)!=="body"&&(Mt.push(e),Mt.length>Tu&&(Mt=Mt.slice(-20)))}function Ps(){return Mt.slice().reverse().find(e=>e.isConnected)}function Pu(e){const t=Or();return Hc(e,t)?e:kr(e,t)[0]||e}const Mu=I.forwardRef(function(t,n){return N.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:Tr})});function ha(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:s=!0,initialFocus:i=0,returnFocus:a=!0,restoreFocus:l=!1,modal:u=!0,visuallyHiddenDismiss:d=!1,closeOnFocusOut:h=!0,outsideElementsInert:E=!1,getInsideElements:p=()=>[]}=e,{open:g,onOpenChange:y,events:T,dataRef:D,elements:{domReference:w,floating:M}}=t,L=tt(()=>{var Z;return(Z=D.current.floatingContext)==null?void 0:Z.nodeId}),H=tt(p),j=typeof i=="number"&&i<0,U=ms(w)&&j,c=Cu(),f=c?s:!0,b=!f||c&&E,x=qr(o),R=qr(i),k=qr(a),A=Go(),m=da(),C=I.useRef(null),F=I.useRef(null),v=I.useRef(!1),P=I.useRef(!1),$=I.useRef(-1),W=m!=null,B=Ts(M),_=tt(function(Z){return Z===void 0&&(Z=B),Z?kr(Z,Or()):[]}),q=tt(Z=>{const G=_(Z);return x.current.map(z=>w&&z==="reference"?w:B&&z==="floating"?B:G).filter(Boolean).flat()});I.useEffect(()=>{if(r||!u)return;function Z(z){if(z.key==="Tab"){Ie(B,Pt(De(B)))&&_().length===0&&!U&&Br(z);const X=q(),ne=Dt(z);x.current[0]==="reference"&&ne===w&&(Br(z),z.shiftKey?Jt(X[X.length-1]):Jt(X[1])),x.current[1]==="floating"&&ne===B&&z.shiftKey&&(Br(z),Jt(X[0]))}}const G=De(B);return G.addEventListener("keydown",Z),()=>{G.removeEventListener("keydown",Z)}},[r,w,B,u,x,U,_,q]),I.useEffect(()=>{if(r||!M)return;function Z(G){const z=Dt(G),ne=_().indexOf(z);ne!==-1&&($.current=ne)}return M.addEventListener("focusin",Z),()=>{M.removeEventListener("focusin",Z)}},[r,M,_]),I.useEffect(()=>{if(r||!h)return;function Z(){P.current=!0,setTimeout(()=>{P.current=!1})}function G(z){const X=z.relatedTarget;queueMicrotask(()=>{const ne=L(),Pe=!(Ie(w,X)||Ie(M,X)||Ie(X,M)||Ie(m==null?void 0:m.portalNode,X)||X!=null&&X.hasAttribute(Ln("focus-guard"))||A&&(Fn(A.nodesRef.current,ne).find(Oe=>{var de,we;return Ie((de=Oe.context)==null?void 0:de.elements.floating,X)||Ie((we=Oe.context)==null?void 0:we.elements.domReference,X)})||Ss(A.nodesRef.current,ne).find(Oe=>{var de,we,Se;return[(de=Oe.context)==null?void 0:de.elements.floating,Ts((we=Oe.context)==null?void 0:we.elements.floating)].includes(X)||((Se=Oe.context)==null?void 0:Se.elements.domReference)===X})));if(l&&Pe&&Pt(De(B))===De(B).body){pe(B)&&B.focus();const Oe=$.current,de=_(),we=de[Oe]||de[de.length-1]||B;pe(we)&&we.focus()}(U||!u)&&X&&Pe&&!P.current&&X!==Ps()&&(v.current=!0,y(!1,z,"focus-out"))})}if(M&&pe(w))return w.addEventListener("focusout",G),w.addEventListener("pointerdown",Z),M.addEventListener("focusout",G),()=>{w.removeEventListener("focusout",G),w.removeEventListener("pointerdown",Z),M.removeEventListener("focusout",G)}},[r,w,M,B,u,A,m,y,h,l,_,U,L]);const Y=I.useRef(null),J=I.useRef(null),ee=Fs([Y,m==null?void 0:m.beforeInsideRef]),ve=Fs([J,m==null?void 0:m.afterInsideRef]);I.useEffect(()=>{var Z,G;if(r||!M)return;const z=Array.from((m==null||(Z=m.portalNode)==null?void 0:Z.querySelectorAll("["+Ln("portal")+"]"))||[]),X=A?Ss(A.nodesRef.current,L()):[],ne=A&&!u?X.map(we=>{var Se;return(Se=we.context)==null?void 0:Se.elements.floating}):[],Pe=(G=X.find(we=>{var Se;return ms(((Se=we.context)==null?void 0:Se.elements.domReference)||null)}))==null||(G=G.context)==null?void 0:G.elements.domReference,Oe=[M,Pe,...z,...ne,...H(),C.current,F.current,Y.current,J.current,m==null?void 0:m.beforeOutsideRef.current,m==null?void 0:m.afterOutsideRef.current,x.current.includes("reference")||U?w:null].filter(we=>we!=null),de=u||U?ks(Oe,!b,b):ks(Oe);return()=>{de()}},[r,w,M,u,x,m,U,f,b,A,L,H]),Ne(()=>{if(r||!pe(B))return;const Z=De(B),G=Pt(Z);queueMicrotask(()=>{const z=q(B),X=R.current,ne=(typeof X=="number"?z[X]:X.current)||B,Pe=Ie(B,G);!j&&!Pe&&g&&Jt(ne,{preventScroll:ne===B})})},[r,g,B,j,q,R]),Ne(()=>{if(r||!B)return;let Z=!1,G=!1;const z=De(B),X=Pt(z);let Pe=D.current.openEvent;Fu(X);function Oe(Se){let{open:_n,reason:Sn,event:Xe,nested:Jn}=Se;if(_n&&(Pe=Xe),Sn==="escape-key"&&(G=!0),["hover","safe-polygon"].includes(Sn)&&Xe.type==="mouseleave"&&(v.current=!0),Sn==="outside-press")if(Jn)v.current=!1,Z=!0;else if(ac(Xe)||lc(Xe))v.current=!1;else{let as=!1;document.createElement("div").focus({get preventScroll(){return as=!0,!1}}),as?(v.current=!1,Z=!0):v.current=!0}}T.on("openchange",Oe);const de=z.createElement("span");de.setAttribute("tabindex","-1"),de.setAttribute("aria-hidden","true"),Object.assign(de.style,Tr),W&&w&&w.insertAdjacentElement("afterend",de);function we(){return typeof k.current=="boolean"?G&&w?w:Ps()||de:k.current.current||de}return()=>{T.off("openchange",Oe);const Se=Pt(z),_n=Ie(M,Se)||A&&Fn(A.nodesRef.current,L()).some(Xe=>{var Jn;return Ie((Jn=Xe.context)==null?void 0:Jn.elements.floating,Se)});(_n||Pe&&["click","mousedown"].includes(Pe.type))&&(G=!0);const Sn=we();queueMicrotask(()=>{const Xe=Pu(Sn);k.current&&!v.current&&pe(Xe)&&(!(Xe!==Se&&Se!==z.body)||_n)&&Xe.focus({preventScroll:Z}),de.remove()})}},[r,M,B,k,D,T,A,W,w,L]),I.useEffect(()=>{queueMicrotask(()=>{v.current=!1})},[r]),Ne(()=>{if(!r&&m)return m.setFocusManagerState({modal:u,closeOnFocusOut:h,open:g,onOpenChange:y,domReference:w}),()=>{m.setFocusManagerState(null)}},[r,m,u,g,y,h,w]),Ne(()=>{if(r||!B||typeof MutationObserver!="function"||j)return;const Z=()=>{const z=B.getAttribute("tabindex"),X=_(),ne=Pt(De(M)),Pe=X.indexOf(ne);Pe!==-1&&($.current=Pe),x.current.includes("floating")||ne!==w&&X.length===0?z!=="0"&&B.setAttribute("tabindex","0"):z!=="-1"&&B.setAttribute("tabindex","-1")};Z();const G=new MutationObserver(Z);return G.observe(B,{childList:!0,subtree:!0,attributes:!0}),()=>{G.disconnect()}},[r,M,B,w,x,_,j]);function Re(Z){return r||!d||!u?null:N.jsx(Mu,{ref:Z==="start"?C:F,onClick:G=>y(!1,G.nativeEvent),children:typeof d=="string"?d:"Dismiss"})}const Ce=!r&&f&&(u?!U:!0)&&(W||u);return N.jsxs(N.Fragment,{children:[Ce&&N.jsx(br,{"data-type":"inside",ref:ee,onFocus:Z=>{if(u){const z=q();Jt(o[0]==="reference"?z[0]:z[z.length-1])}else if(m!=null&&m.preserveTabOrder&&m.portalNode)if(v.current=!1,Pn(Z,m.portalNode)){const z=la(w);z==null||z.focus()}else{var G;(G=m.beforeOutsideRef.current)==null||G.focus()}}}),!U&&Re("start"),n,Re("end"),Ce&&N.jsx(br,{"data-type":"inside",ref:ve,onFocus:Z=>{if(u)Jt(q()[0]);else if(m!=null&&m.preserveTabOrder&&m.portalNode)if(h&&(v.current=!0),Pn(Z,m.portalNode)){const z=ca(w);z==null||z.focus()}else{var G;(G=m.afterOutsideRef.current)==null||G.focus()}}})]})}let sr=0;function Iu(){const e=/iP(hone|ad|od)|iOS/.test($i()),t=document.body.style,r=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",o=window.innerWidth-document.documentElement.clientWidth,s=t.left?parseFloat(t.left):window.scrollX,i=t.top?parseFloat(t.top):window.scrollY;if(t.overflow="hidden",o&&(t[r]=o+"px"),e){var a,l;const u=((a=window.visualViewport)==null?void 0:a.offsetLeft)||0,d=((l=window.visualViewport)==null?void 0:l.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(i-Math.floor(d))+"px",left:-(s-Math.floor(u))+"px",right:"0"})}return()=>{Object.assign(t,{overflow:"",[r]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(s,i))}}let Ms=()=>{};const Du=I.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t;return Ne(()=>{if(r)return sr++,sr===1&&(Ms=Iu()),()=>{sr--,sr===0&&Ms()}},[r]),N.jsx("div",{ref:n,...o,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}})});function Is(e){return pe(e.target)&&e.target.tagName==="BUTTON"}function Nu(e){return pe(e.target)&&e.target.tagName==="A"}function Ds(e){return Bi(e)}function pa(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!0,event:a="click",toggle:l=!0,ignoreMouse:u=!1,keyboardHandlers:d=!0,stickIfOpen:h=!0}=t,E=I.useRef(),p=I.useRef(!1),g=I.useMemo(()=>({onPointerDown(y){E.current=y.pointerType},onMouseDown(y){const T=E.current;y.button===0&&a!=="click"&&(ps(T)&&u||(n&&l&&(!(o.current.openEvent&&h)||o.current.openEvent.type==="mousedown")?r(!1,y.nativeEvent,"click"):(y.preventDefault(),r(!0,y.nativeEvent,"click"))))},onClick(y){const T=E.current;if(a==="mousedown"&&E.current){E.current=void 0;return}ps(T)&&u||(n&&l&&(!(o.current.openEvent&&h)||o.current.openEvent.type==="click")?r(!1,y.nativeEvent,"click"):r(!0,y.nativeEvent,"click"))},onKeyDown(y){E.current=void 0,!(y.defaultPrevented||!d||Is(y))&&(y.key===" "&&!Ds(s)&&(y.preventDefault(),p.current=!0),!Nu(y)&&y.key==="Enter"&&r(!(n&&l),y.nativeEvent,"click"))},onKeyUp(y){y.defaultPrevented||!d||Is(y)||Ds(s)||y.key===" "&&p.current&&(p.current=!1,r(!(n&&l),y.nativeEvent,"click"))}}),[o,s,a,u,d,r,n,h,l]);return I.useMemo(()=>i?{reference:g}:{},[i,g])}const Lu={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},$u={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Ns=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function ma(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:h="pointerdown",ancestorScroll:E=!1,bubbles:p,capture:g}=t,y=Go(),T=tt(typeof l=="function"?l:()=>!1),D=typeof l=="function"?T:l,w=I.useRef(!1),M=I.useRef(!1),{escapeKey:L,outsidePress:H}=Ns(p),{escapeKey:j,outsidePress:U}=Ns(g),c=I.useRef(!1),f=tt(m=>{var C;if(!n||!i||!a||m.key!=="Escape"||c.current)return;const F=(C=s.current.floatingContext)==null?void 0:C.nodeId,v=y?Fn(y.nodesRef.current,F):[];if(!L&&(m.stopPropagation(),v.length>0)){let P=!0;if(v.forEach($=>{var W;if((W=$.context)!=null&&W.open&&!$.context.dataRef.current.__escapeKeyBubbles){P=!1;return}}),!P)return}r(!1,fc(m)?m.nativeEvent:m,"escape-key")}),b=tt(m=>{var C;const F=()=>{var v;f(m),(v=Dt(m))==null||v.removeEventListener("keydown",F)};(C=Dt(m))==null||C.addEventListener("keydown",F)}),x=tt(m=>{var C;const F=w.current;w.current=!1;const v=M.current;if(M.current=!1,u==="click"&&v||F||typeof D=="function"&&!D(m))return;const P=Dt(m),$="["+Ln("inert")+"]",W=De(o.floating).querySelectorAll($);let B=ce(P)?P:null;for(;B&&!ut(B);){const J=ht(B);if(ut(J)||!ce(J))break;B=J}if(W.length&&ce(P)&&!dc(P)&&!Ie(P,o.floating)&&Array.from(W).every(J=>!Ie(B,J)))return;if(pe(P)&&A){const J=ut(P),ee=qe(P),ve=/auto|scroll/,Re=J||ve.test(ee.overflowX),Ce=J||ve.test(ee.overflowY),Z=Re&&P.clientWidth>0&&P.scrollWidth>P.clientWidth,G=Ce&&P.clientHeight>0&&P.scrollHeight>P.clientHeight,z=ee.direction==="rtl",X=G&&(z?m.offsetX<=P.offsetWidth-P.clientWidth:m.offsetX>P.clientWidth),ne=Z&&m.offsetY>P.clientHeight;if(X||ne)return}const _=(C=s.current.floatingContext)==null?void 0:C.nodeId,q=y&&Fn(y.nodesRef.current,_).some(J=>{var ee;return jr(m,(ee=J.context)==null?void 0:ee.elements.floating)});if(jr(m,o.floating)||jr(m,o.domReference)||q)return;const Y=y?Fn(y.nodesRef.current,_):[];if(Y.length>0){let J=!0;if(Y.forEach(ee=>{var ve;if((ve=ee.context)!=null&&ve.open&&!ee.context.dataRef.current.__outsidePressBubbles){J=!1;return}}),!J)return}r(!1,m,"outside-press")}),R=tt(m=>{var C;const F=()=>{var v;x(m),(v=Dt(m))==null||v.removeEventListener(u,F)};(C=Dt(m))==null||C.addEventListener(u,F)});I.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=L,s.current.__outsidePressBubbles=H;let m=-1;function C(W){r(!1,W,"ancestor-scroll")}function F(){window.clearTimeout(m),c.current=!0}function v(){m=window.setTimeout(()=>{c.current=!1},Cr()?5:0)}const P=De(o.floating);a&&(P.addEventListener("keydown",j?b:f,j),P.addEventListener("compositionstart",F),P.addEventListener("compositionend",v)),D&&P.addEventListener(u,U?R:x,U);let $=[];return E&&(ce(o.domReference)&&($=St(o.domReference)),ce(o.floating)&&($=$.concat(St(o.floating))),!ce(o.reference)&&o.reference&&o.reference.contextElement&&($=$.concat(St(o.reference.contextElement)))),$=$.filter(W=>{var B;return W!==((B=P.defaultView)==null?void 0:B.visualViewport)}),$.forEach(W=>{W.addEventListener("scroll",C,{passive:!0})}),()=>{a&&(P.removeEventListener("keydown",j?b:f,j),P.removeEventListener("compositionstart",F),P.removeEventListener("compositionend",v)),D&&P.removeEventListener(u,U?R:x,U),$.forEach(W=>{W.removeEventListener("scroll",C)}),window.clearTimeout(m)}},[s,o,a,D,u,n,r,E,i,L,H,f,j,b,x,U,R]),I.useEffect(()=>{w.current=!1},[D,u]);const k=I.useMemo(()=>({onKeyDown:f,...d&&{[Lu[h]]:m=>{r(!1,m.nativeEvent,"reference-press")},...h!=="click"&&{onClick(m){r(!1,m.nativeEvent,"reference-press")}}}}),[f,r,d,h]),A=I.useMemo(()=>({onKeyDown:f,onMouseDown(){M.current=!0},onMouseUp(){M.current=!0},[$u[u]]:()=>{w.current=!0}}),[f,u]);return I.useMemo(()=>i?{reference:k,floating:A}:{},[i,k,A])}function ju(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=vn(),s=I.useRef({}),[i]=I.useState(()=>xu()),a=sa()!=null;if(process.env.NODE_ENV!=="production"){const p=r.reference;p&&!ce(p)&&wu("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=I.useState(r.reference),d=tt((p,g,y)=>{s.current.openEvent=p?g:void 0,i.emit("openchange",{open:p,event:g,reason:y,nested:a}),n==null||n(p,g,y)}),h=I.useMemo(()=>({setPositionReference:u}),[]),E=I.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return I.useMemo(()=>({dataRef:s,open:t,onOpenChange:d,elements:E,events:i,floatingId:o,refs:h}),[t,d,E,i,o,h])}function ga(e){e===void 0&&(e={});const{nodeId:t}=e,n=ju({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=I.useState(null),[a,l]=I.useState(null),d=(o==null?void 0:o.domReference)||s,h=I.useRef(null),E=Go();Ne(()=>{d&&(h.current=d)},[d]);const p=ta({...e,elements:{...o,...a&&{reference:a}}}),g=I.useCallback(M=>{const L=ce(M)?{getBoundingClientRect:()=>M.getBoundingClientRect(),getClientRects:()=>M.getClientRects(),contextElement:M}:M;l(L),p.refs.setReference(L)},[p.refs]),y=I.useCallback(M=>{(ce(M)||M===null)&&(h.current=M,i(M)),(ce(p.refs.reference.current)||p.refs.reference.current===null||M!==null&&!ce(M))&&p.refs.setReference(M)},[p.refs]),T=I.useMemo(()=>({...p.refs,setReference:y,setPositionReference:g,domReference:h}),[p.refs,y,g]),D=I.useMemo(()=>({...p.elements,domReference:d}),[p.elements,d]),w=I.useMemo(()=>({...p,...r,refs:T,elements:D,nodeId:t}),[p,T,D,t,r]);return Ne(()=>{r.dataRef.current.floatingContext=w;const M=E==null?void 0:E.nodesRef.current.find(L=>L.id===t);M&&(M.context=w)}),I.useMemo(()=>({...p,context:w,refs:T,elements:D}),[p,T,D,w])}const Ls="active",$s="selected";function zr(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[Ls]:i,[$s]:a,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1,[fo]:""},...s,...t.map(i=>{const a=i?i[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[u,d]=l;if(!(o&&[Ls,$s].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof d=="function"){var h;(h=r.get(u))==null||h.push(d),i[u]=function(){for(var E,p=arguments.length,g=new Array(p),y=0;y<p;y++)g[y]=arguments[y];return(E=r.get(u))==null?void 0:E.map(T=>T(...g)).find(T=>T!==void 0)}}}else i[u]=d}),i),{})}}function ba(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=I.useCallback(a=>zr(a,e,"reference"),t),s=I.useCallback(a=>zr(a,e,"floating"),n),i=I.useCallback(a=>zr(a,e,"item"),r);return I.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}const Bu=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Hu(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=Bu.get(i))!=null?n:i,l=vn(),d=sa()!=null,h=I.useMemo(()=>a==="tooltip"||i==="label"?{["aria-"+(i==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&d&&{role:"menuitem"},...i==="select"&&{"aria-autocomplete":"none"},...i==="combobox"&&{"aria-autocomplete":"list"}},[a,o,d,r,l,i]),E=I.useMemo(()=>{const g={id:o,...a&&{role:a}};return a==="tooltip"||i==="label"?g:{...g,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,i]),p=I.useCallback(g=>{let{active:y,selected:T}=g;const D={role:"option",...y&&{id:o+"-option"}};switch(i){case"select":return{...D,"aria-selected":y&&T};case"combobox":return{...D,...y&&{"aria-selected":!0}}}return{}},[o,i]);return I.useMemo(()=>s?{reference:h,floating:E,item:p}:{},[s,h,E,p])}function va({wallets:e,handleWalletClick:t}){return N.jsxs("ul",{className:"space-y-1.5","data-wallet-ui":!0,children:[e.map(n=>N.jsx("li",{children:N.jsxs("button",{onClick:()=>t(n),className:"flex w-full items-center gap-3 py-1.5 px-1.5 text-left text-gray-800 dark:text-[#E9E9FD] transition-colors hover:bg-[#E9E9FD] dark:hover:bg-[#192A39] rounded-xl",children:[N.jsx("div",{className:"flex-shrink-0 h-8 w-8 rounded-md overflow-hidden bg-gray-50 dark:bg-transparent flex items-center justify-center",children:N.jsx("img",{src:n.metadata.icon,alt:`${n.metadata.name} icon`,className:"h-8 w-8 object-contain rounded-md"})}),N.jsx("span",{className:"text-lg font-bold wallet-custom-font",children:n.metadata.name})]})},n.id)),e.length===0&&N.jsx("p",{className:"text-center text-gray-500 dark:text-gray-400",children:"No wallets found."})]})}function ya({children:e}){const[t,n]=S.useState(!1),[r,o]=S.useState(null),{wallets:s,activeAddress:i}=dt.useWallet(),{refs:a,context:l}=ga({open:t,onOpenChange:j=>{j&&i||(j?(n(!0),o("starting"),requestAnimationFrame(()=>{o("entered")})):(o("exiting"),setTimeout(()=>{n(!1),o(null)},150)))}}),u=pa(l),d=ma(l,{outsidePressEvent:"mousedown"}),h=Hu(l,{role:"dialog"}),{getReferenceProps:E,getFloatingProps:p}=ba([u,d,h]),g=vn(),y=vn(),T=async j=>{try{await j.connect(),l.onOpenChange(!1)}catch(U){console.error(`Error connecting to ${j.metadata.name}:`,U),l.onOpenChange(!1)}},D=j=>{i||l.onOpenChange(!0)},w=e||N.jsx(Bo,{}),M=pu([a.setReference,w.ref||null]),L={...E(),ref:M,onClick:D},H=S.cloneElement(w,L);return N.jsxs(N.Fragment,{children:[H,N.jsx(fa,{id:"wallet-dialog-portal",children:t&&N.jsx("div",{"data-wallet-ui":!0,children:N.jsx(Du,{className:"grid place-items-center px-4 z-50 transition-opacity duration-150 ease-in-out bg-black/30 dark:bg-black/50 data-[state=starting]:opacity-0 data-[state=exiting]:opacity-0 data-[state=entered]:opacity-100","data-state":r,lockScroll:!0,children:N.jsx(ha,{context:l,modal:!0,children:N.jsxs("div",{ref:a.setFloating,...p({"aria-labelledby":g,"aria-describedby":y}),"data-state":r,className:"w-full max-w-sm rounded-3xl bg-white dark:bg-[#001324] shadow-xl transform transition-all duration-150 ease-in-out data-[state=starting]:opacity-0 data-[state=starting]:scale-90 data-[state=exiting]:opacity-0 data-[state=exiting]:scale-90 data-[state=entered]:opacity-100 data-[state=entered]:scale-100",style:{marginTop:"-0.5rem"},children:[N.jsxs("div",{className:"relative flex items-center px-6 pt-5 pb-4",children:[N.jsx("h2",{id:g,className:"text-xl font-bold text-gray-900 dark:text-[#E9E9FD] wallet-custom-font",children:"Connect a Wallet"}),N.jsx("button",{onClick:()=>l.onOpenChange(!1),className:"absolute right-4 rounded-full bg-gray-100 dark:bg-[#192A39]/75 p-2 text-gray-500 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-[#192A39] hover:text-gray-700 dark:hover:text-[#D4D4FA]","aria-label":"Close dialog",children:N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:N.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),N.jsx("div",{className:"px-4 pb-3",children:N.jsx(va,{wallets:s,handleWalletClick:T})}),N.jsxs("div",{className:"px-6 py-5 border-t border-gray-200 dark:border-[#192A39] flex items-center justify-between",children:[N.jsx("span",{className:"text-gray-600 dark:text-[#99A1A7] text-sm",children:"Need an Algorand wallet?"}),N.jsx("a",{href:"https://algorand.co/wallets",className:"text-[#2D2DF1]/80 dark:text-[#6C6CF1] font-medium text-sm hover:text-[#2D2DF1] dark:hover:text-[#8080F3]",target:"_blank",rel:"noopener noreferrer",children:"Start here →"})]})]})})})})})]})}var Uu=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Vr=Math.ceil,je=Math.floor,Te="[BigNumber Error] ",js=Te+"Number primitive has more than 15 significant digits: ",Ge=1e14,re=14,Bs=9007199254740991,Qr=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],gt=1e7,Me=1e9;function wa(e){var t,n,r,o=w.prototype={constructor:w,toString:null,valueOf:null},s=new w(1),i=20,a=4,l=-7,u=21,d=-1e7,h=1e7,E=!1,p=1,g=0,y={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},T="0123456789abcdefghijklmnopqrstuvwxyz",D=!0;function w(c,f){var b,x,R,k,A,m,C,F,v=this;if(!(v instanceof w))return new w(c,f);if(f==null){if(c&&c._isBigNumber===!0){v.s=c.s,!c.c||c.e>h?v.c=v.e=null:c.e<d?v.c=[v.e=0]:(v.e=c.e,v.c=c.c.slice());return}if((m=typeof c=="number")&&c*0==0){if(v.s=1/c<0?(c=-c,-1):1,c===~~c){for(k=0,A=c;A>=10;A/=10,k++);k>h?v.c=v.e=null:(v.e=k,v.c=[c]);return}F=String(c)}else{if(!Uu.test(F=String(c)))return r(v,F,m);v.s=F.charCodeAt(0)==45?(F=F.slice(1),-1):1}(k=F.indexOf("."))>-1&&(F=F.replace(".","")),(A=F.search(/e/i))>0?(k<0&&(k=A),k+=+F.slice(A+1),F=F.substring(0,A)):k<0&&(k=F.length)}else{if(ue(f,2,T.length,"Base"),f==10&&D)return v=new w(c),j(v,i+v.e+1,a);if(F=String(c),m=typeof c=="number"){if(c*0!=0)return r(v,F,m,f);if(v.s=1/c<0?(F=F.slice(1),-1):1,w.DEBUG&&F.replace(/^0\.0*|\./,"").length>15)throw Error(js+c)}else v.s=F.charCodeAt(0)===45?(F=F.slice(1),-1):1;for(b=T.slice(0,f),k=A=0,C=F.length;A<C;A++)if(b.indexOf(x=F.charAt(A))<0){if(x=="."){if(A>k){k=C;continue}}else if(!R&&(F==F.toUpperCase()&&(F=F.toLowerCase())||F==F.toLowerCase()&&(F=F.toUpperCase()))){R=!0,A=-1,k=0;continue}return r(v,String(c),m,f)}m=!1,F=n(F,f,10,v.s),(k=F.indexOf("."))>-1?F=F.replace(".",""):k=F.length}for(A=0;F.charCodeAt(A)===48;A++);for(C=F.length;F.charCodeAt(--C)===48;);if(F=F.slice(A,++C)){if(C-=A,m&&w.DEBUG&&C>15&&(c>Bs||c!==je(c)))throw Error(js+v.s*c);if((k=k-A-1)>h)v.c=v.e=null;else if(k<d)v.c=[v.e=0];else{if(v.e=k,v.c=[],A=(k+1)%re,k<0&&(A+=re),A<C){for(A&&v.c.push(+F.slice(0,A)),C-=re;A<C;)v.c.push(+F.slice(A,A+=re));A=re-(F=F.slice(A)).length}else A-=C;for(;A--;F+="0");v.c.push(+F)}}else v.c=[v.e=0]}w.clone=wa,w.ROUND_UP=0,w.ROUND_DOWN=1,w.ROUND_CEIL=2,w.ROUND_FLOOR=3,w.ROUND_HALF_UP=4,w.ROUND_HALF_DOWN=5,w.ROUND_HALF_EVEN=6,w.ROUND_HALF_CEIL=7,w.ROUND_HALF_FLOOR=8,w.EUCLID=9,w.config=w.set=function(c){var f,b;if(c!=null)if(typeof c=="object"){if(c.hasOwnProperty(f="DECIMAL_PLACES")&&(b=c[f],ue(b,0,Me,f),i=b),c.hasOwnProperty(f="ROUNDING_MODE")&&(b=c[f],ue(b,0,8,f),a=b),c.hasOwnProperty(f="EXPONENTIAL_AT")&&(b=c[f],b&&b.pop?(ue(b[0],-1e9,0,f),ue(b[1],0,Me,f),l=b[0],u=b[1]):(ue(b,-1e9,Me,f),l=-(u=b<0?-b:b))),c.hasOwnProperty(f="RANGE"))if(b=c[f],b&&b.pop)ue(b[0],-1e9,-1,f),ue(b[1],1,Me,f),d=b[0],h=b[1];else if(ue(b,-1e9,Me,f),b)d=-(h=b<0?-b:b);else throw Error(Te+f+" cannot be zero: "+b);if(c.hasOwnProperty(f="CRYPTO"))if(b=c[f],b===!!b)if(b)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))E=b;else throw E=!b,Error(Te+"crypto unavailable");else E=b;else throw Error(Te+f+" not true or false: "+b);if(c.hasOwnProperty(f="MODULO_MODE")&&(b=c[f],ue(b,0,9,f),p=b),c.hasOwnProperty(f="POW_PRECISION")&&(b=c[f],ue(b,0,Me,f),g=b),c.hasOwnProperty(f="FORMAT"))if(b=c[f],typeof b=="object")y=b;else throw Error(Te+f+" not an object: "+b);if(c.hasOwnProperty(f="ALPHABET"))if(b=c[f],typeof b=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(b))D=b.slice(0,10)=="0123456789",T=b;else throw Error(Te+f+" invalid: "+b)}else throw Error(Te+"Object expected: "+c);return{DECIMAL_PLACES:i,ROUNDING_MODE:a,EXPONENTIAL_AT:[l,u],RANGE:[d,h],CRYPTO:E,MODULO_MODE:p,POW_PRECISION:g,FORMAT:y,ALPHABET:T}},w.isBigNumber=function(c){if(!c||c._isBigNumber!==!0)return!1;if(!w.DEBUG)return!0;var f,b,x=c.c,R=c.e,k=c.s;e:if({}.toString.call(x)=="[object Array]"){if((k===1||k===-1)&&R>=-1e9&&R<=Me&&R===je(R)){if(x[0]===0){if(R===0&&x.length===1)return!0;break e}if(f=(R+1)%re,f<1&&(f+=re),String(x[0]).length==f){for(f=0;f<x.length;f++)if(b=x[f],b<0||b>=Ge||b!==je(b))break e;if(b!==0)return!0}}}else if(x===null&&R===null&&(k===null||k===1||k===-1))return!0;throw Error(Te+"Invalid BigNumber: "+c)},w.maximum=w.max=function(){return L(arguments,-1)},w.minimum=w.min=function(){return L(arguments,1)},w.random=function(){var c=9007199254740992,f=Math.random()*c&2097151?function(){return je(Math.random()*c)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(b){var x,R,k,A,m,C=0,F=[],v=new w(s);if(b==null?b=i:ue(b,0,Me),A=Vr(b/re),E)if(crypto.getRandomValues){for(x=crypto.getRandomValues(new Uint32Array(A*=2));C<A;)m=x[C]*131072+(x[C+1]>>>11),m>=9e15?(R=crypto.getRandomValues(new Uint32Array(2)),x[C]=R[0],x[C+1]=R[1]):(F.push(m%1e14),C+=2);C=A/2}else if(crypto.randomBytes){for(x=crypto.randomBytes(A*=7);C<A;)m=(x[C]&31)*281474976710656+x[C+1]*1099511627776+x[C+2]*4294967296+x[C+3]*16777216+(x[C+4]<<16)+(x[C+5]<<8)+x[C+6],m>=9e15?crypto.randomBytes(7).copy(x,C):(F.push(m%1e14),C+=7);C=A/7}else throw E=!1,Error(Te+"crypto unavailable");if(!E)for(;C<A;)m=f(),m<9e15&&(F[C++]=m%1e14);for(A=F[--C],b%=re,A&&b&&(m=Qr[re-b],F[C]=je(A/m)*m);F[C]===0;F.pop(),C--);if(C<0)F=[k=0];else{for(k=-1;F[0]===0;F.splice(0,1),k-=re);for(C=1,m=F[0];m>=10;m/=10,C++);C<re&&(k-=re-C)}return v.e=k,v.c=F,v}}(),w.sum=function(){for(var c=1,f=arguments,b=new w(f[0]);c<f.length;)b=b.plus(f[c++]);return b},n=function(){var c="0123456789";function f(b,x,R,k){for(var A,m=[0],C,F=0,v=b.length;F<v;){for(C=m.length;C--;m[C]*=x);for(m[0]+=k.indexOf(b.charAt(F++)),A=0;A<m.length;A++)m[A]>R-1&&(m[A+1]==null&&(m[A+1]=0),m[A+1]+=m[A]/R|0,m[A]%=R)}return m.reverse()}return function(b,x,R,k,A){var m,C,F,v,P,$,W,B,_=b.indexOf("."),q=i,Y=a;for(_>=0&&(v=g,g=0,b=b.replace(".",""),B=new w(x),$=B.pow(b.length-_),g=v,B.c=f(at($e($.c),$.e,"0"),10,R,c),B.e=B.c.length),W=f(b,x,R,A?(m=T,c):(m=c,T)),F=v=W.length;W[--v]==0;W.pop());if(!W[0])return m.charAt(0);if(_<0?--F:($.c=W,$.e=F,$.s=k,$=t($,B,q,Y,R),W=$.c,P=$.r,F=$.e),C=F+q+1,_=W[C],v=R/2,P=P||C<0||W[C+1]!=null,P=Y<4?(_!=null||P)&&(Y==0||Y==($.s<0?3:2)):_>v||_==v&&(Y==4||P||Y==6&&W[C-1]&1||Y==($.s<0?8:7)),C<1||!W[0])b=P?at(m.charAt(1),-q,m.charAt(0)):m.charAt(0);else{if(W.length=C,P)for(--R;++W[--C]>R;)W[C]=0,C||(++F,W=[1].concat(W));for(v=W.length;!W[--v];);for(_=0,b="";_<=v;b+=m.charAt(W[_++]));b=at(b,F,m.charAt(0))}return b}}(),t=function(){function c(x,R,k){var A,m,C,F,v=0,P=x.length,$=R%gt,W=R/gt|0;for(x=x.slice();P--;)C=x[P]%gt,F=x[P]/gt|0,A=W*C+F*$,m=$*C+A%gt*gt+v,v=(m/k|0)+(A/gt|0)+W*F,x[P]=m%k;return v&&(x=[v].concat(x)),x}function f(x,R,k,A){var m,C;if(k!=A)C=k>A?1:-1;else for(m=C=0;m<k;m++)if(x[m]!=R[m]){C=x[m]>R[m]?1:-1;break}return C}function b(x,R,k,A){for(var m=0;k--;)x[k]-=m,m=x[k]<R[k]?1:0,x[k]=m*A+x[k]-R[k];for(;!x[0]&&x.length>1;x.splice(0,1));}return function(x,R,k,A,m){var C,F,v,P,$,W,B,_,q,Y,J,ee,ve,Re,Ce,Z,G,z=x.s==R.s?1:-1,X=x.c,ne=R.c;if(!X||!X[0]||!ne||!ne[0])return new w(!x.s||!R.s||(X?ne&&X[0]==ne[0]:!ne)?NaN:X&&X[0]==0||!ne?z*0:z/0);for(_=new w(z),q=_.c=[],F=x.e-R.e,z=k+F+1,m||(m=Ge,F=Be(x.e/re)-Be(R.e/re),z=z/re|0),v=0;ne[v]==(X[v]||0);v++);if(ne[v]>(X[v]||0)&&F--,z<0)q.push(1),P=!0;else{for(Re=X.length,Z=ne.length,v=0,z+=2,$=je(m/(ne[0]+1)),$>1&&(ne=c(ne,$,m),X=c(X,$,m),Z=ne.length,Re=X.length),ve=Z,Y=X.slice(0,Z),J=Y.length;J<Z;Y[J++]=0);G=ne.slice(),G=[0].concat(G),Ce=ne[0],ne[1]>=m/2&&Ce++;do{if($=0,C=f(ne,Y,Z,J),C<0){if(ee=Y[0],Z!=J&&(ee=ee*m+(Y[1]||0)),$=je(ee/Ce),$>1)for($>=m&&($=m-1),W=c(ne,$,m),B=W.length,J=Y.length;f(W,Y,B,J)==1;)$--,b(W,Z<B?G:ne,B,m),B=W.length,C=1;else $==0&&(C=$=1),W=ne.slice(),B=W.length;if(B<J&&(W=[0].concat(W)),b(Y,W,J,m),J=Y.length,C==-1)for(;f(ne,Y,Z,J)<1;)$++,b(Y,Z<J?G:ne,J,m),J=Y.length}else C===0&&($++,Y=[0]);q[v++]=$,Y[0]?Y[J++]=X[ve]||0:(Y=[X[ve]],J=1)}while((ve++<Re||Y[0]!=null)&&z--);P=Y[0]!=null,q[0]||q.splice(0,1)}if(m==Ge){for(v=1,z=q[0];z>=10;z/=10,v++);j(_,k+(_.e=v+F*re-1)+1,A,P)}else _.e=F,_.r=+P;return _}}();function M(c,f,b,x){var R,k,A,m,C;if(b==null?b=a:ue(b,0,8),!c.c)return c.toString();if(R=c.c[0],A=c.e,f==null)C=$e(c.c),C=x==1||x==2&&(A<=l||A>=u)?ar(C,A):at(C,A,"0");else if(c=j(new w(c),f,b),k=c.e,C=$e(c.c),m=C.length,x==1||x==2&&(f<=k||k<=l)){for(;m<f;C+="0",m++);C=ar(C,k)}else if(f-=A,C=at(C,k,"0"),k+1>m){if(--f>0)for(C+=".";f--;C+="0");}else if(f+=k-m,f>0)for(k+1==m&&(C+=".");f--;C+="0");return c.s<0&&R?"-"+C:C}function L(c,f){for(var b,x,R=1,k=new w(c[0]);R<c.length;R++)x=new w(c[R]),(!x.s||(b=Ft(k,x))===f||b===0&&k.s===f)&&(k=x);return k}function H(c,f,b){for(var x=1,R=f.length;!f[--R];f.pop());for(R=f[0];R>=10;R/=10,x++);return(b=x+b*re-1)>h?c.c=c.e=null:b<d?c.c=[c.e=0]:(c.e=b,c.c=f),c}r=function(){var c=/^(-?)0([xbo])(?=\w[\w.]*$)/i,f=/^([^.]+)\.$/,b=/^\.([^.]+)$/,x=/^-?(Infinity|NaN)$/,R=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(k,A,m,C){var F,v=m?A:A.replace(R,"");if(x.test(v))k.s=isNaN(v)?null:v<0?-1:1;else{if(!m&&(v=v.replace(c,function(P,$,W){return F=(W=W.toLowerCase())=="x"?16:W=="b"?2:8,!C||C==F?$:P}),C&&(F=C,v=v.replace(f,"$1").replace(b,"0.$1")),A!=v))return new w(v,F);if(w.DEBUG)throw Error(Te+"Not a"+(C?" base "+C:"")+" number: "+A);k.s=null}k.c=k.e=null}}();function j(c,f,b,x){var R,k,A,m,C,F,v,P=c.c,$=Qr;if(P){e:{for(R=1,m=P[0];m>=10;m/=10,R++);if(k=f-R,k<0)k+=re,A=f,C=P[F=0],v=je(C/$[R-A-1]%10);else if(F=Vr((k+1)/re),F>=P.length)if(x){for(;P.length<=F;P.push(0));C=v=0,R=1,k%=re,A=k-re+1}else break e;else{for(C=m=P[F],R=1;m>=10;m/=10,R++);k%=re,A=k-re+R,v=A<0?0:je(C/$[R-A-1]%10)}if(x=x||f<0||P[F+1]!=null||(A<0?C:C%$[R-A-1]),x=b<4?(v||x)&&(b==0||b==(c.s<0?3:2)):v>5||v==5&&(b==4||x||b==6&&(k>0?A>0?C/$[R-A]:0:P[F-1])%10&1||b==(c.s<0?8:7)),f<1||!P[0])return P.length=0,x?(f-=c.e+1,P[0]=$[(re-f%re)%re],c.e=-f||0):P[0]=c.e=0,c;if(k==0?(P.length=F,m=1,F--):(P.length=F+1,m=$[re-k],P[F]=A>0?je(C/$[R-A]%$[A])*m:0),x)for(;;)if(F==0){for(k=1,A=P[0];A>=10;A/=10,k++);for(A=P[0]+=m,m=1;A>=10;A/=10,m++);k!=m&&(c.e++,P[0]==Ge&&(P[0]=1));break}else{if(P[F]+=m,P[F]!=Ge)break;P[F--]=0,m=1}for(k=P.length;P[--k]===0;P.pop());}c.e>h?c.c=c.e=null:c.e<d&&(c.c=[c.e=0])}return c}function U(c){var f,b=c.e;return b===null?c.toString():(f=$e(c.c),f=b<=l||b>=u?ar(f,b):at(f,b,"0"),c.s<0?"-"+f:f)}return o.absoluteValue=o.abs=function(){var c=new w(this);return c.s<0&&(c.s=1),c},o.comparedTo=function(c,f){return Ft(this,new w(c,f))},o.decimalPlaces=o.dp=function(c,f){var b,x,R,k=this;if(c!=null)return ue(c,0,Me),f==null?f=a:ue(f,0,8),j(new w(k),c+k.e+1,f);if(!(b=k.c))return null;if(x=((R=b.length-1)-Be(this.e/re))*re,R=b[R])for(;R%10==0;R/=10,x--);return x<0&&(x=0),x},o.dividedBy=o.div=function(c,f){return t(this,new w(c,f),i,a)},o.dividedToIntegerBy=o.idiv=function(c,f){return t(this,new w(c,f),0,1)},o.exponentiatedBy=o.pow=function(c,f){var b,x,R,k,A,m,C,F,v,P=this;if(c=new w(c),c.c&&!c.isInteger())throw Error(Te+"Exponent not an integer: "+U(c));if(f!=null&&(f=new w(f)),m=c.e>14,!P.c||!P.c[0]||P.c[0]==1&&!P.e&&P.c.length==1||!c.c||!c.c[0])return v=new w(Math.pow(+U(P),m?c.s*(2-ir(c)):+U(c))),f?v.mod(f):v;if(C=c.s<0,f){if(f.c?!f.c[0]:!f.s)return new w(NaN);x=!C&&P.isInteger()&&f.isInteger(),x&&(P=P.mod(f))}else{if(c.e>9&&(P.e>0||P.e<-1||(P.e==0?P.c[0]>1||m&&P.c[1]>=24e7:P.c[0]<8e13||m&&P.c[0]<=9999975e7)))return k=P.s<0&&ir(c)?-0:0,P.e>-1&&(k=1/k),new w(C?1/k:k);g&&(k=Vr(g/re+2))}for(m?(b=new w(.5),C&&(c.s=1),F=ir(c)):(R=Math.abs(+U(c)),F=R%2),v=new w(s);;){if(F){if(v=v.times(P),!v.c)break;k?v.c.length>k&&(v.c.length=k):x&&(v=v.mod(f))}if(R){if(R=je(R/2),R===0)break;F=R%2}else if(c=c.times(b),j(c,c.e+1,1),c.e>14)F=ir(c);else{if(R=+U(c),R===0)break;F=R%2}P=P.times(P),k?P.c&&P.c.length>k&&(P.c.length=k):x&&(P=P.mod(f))}return x?v:(C&&(v=s.div(v)),f?v.mod(f):k?j(v,g,a,A):v)},o.integerValue=function(c){var f=new w(this);return c==null?c=a:ue(c,0,8),j(f,f.e+1,c)},o.isEqualTo=o.eq=function(c,f){return Ft(this,new w(c,f))===0},o.isFinite=function(){return!!this.c},o.isGreaterThan=o.gt=function(c,f){return Ft(this,new w(c,f))>0},o.isGreaterThanOrEqualTo=o.gte=function(c,f){return(f=Ft(this,new w(c,f)))===1||f===0},o.isInteger=function(){return!!this.c&&Be(this.e/re)>this.c.length-2},o.isLessThan=o.lt=function(c,f){return Ft(this,new w(c,f))<0},o.isLessThanOrEqualTo=o.lte=function(c,f){return(f=Ft(this,new w(c,f)))===-1||f===0},o.isNaN=function(){return!this.s},o.isNegative=function(){return this.s<0},o.isPositive=function(){return this.s>0},o.isZero=function(){return!!this.c&&this.c[0]==0},o.minus=function(c,f){var b,x,R,k,A=this,m=A.s;if(c=new w(c,f),f=c.s,!m||!f)return new w(NaN);if(m!=f)return c.s=-f,A.plus(c);var C=A.e/re,F=c.e/re,v=A.c,P=c.c;if(!C||!F){if(!v||!P)return v?(c.s=-f,c):new w(P?A:NaN);if(!v[0]||!P[0])return P[0]?(c.s=-f,c):new w(v[0]?A:a==3?-0:0)}if(C=Be(C),F=Be(F),v=v.slice(),m=C-F){for((k=m<0)?(m=-m,R=v):(F=C,R=P),R.reverse(),f=m;f--;R.push(0));R.reverse()}else for(x=(k=(m=v.length)<(f=P.length))?m:f,m=f=0;f<x;f++)if(v[f]!=P[f]){k=v[f]<P[f];break}if(k&&(R=v,v=P,P=R,c.s=-c.s),f=(x=P.length)-(b=v.length),f>0)for(;f--;v[b++]=0);for(f=Ge-1;x>m;){if(v[--x]<P[x]){for(b=x;b&&!v[--b];v[b]=f);--v[b],v[x]+=Ge}v[x]-=P[x]}for(;v[0]==0;v.splice(0,1),--F);return v[0]?H(c,v,F):(c.s=a==3?-1:1,c.c=[c.e=0],c)},o.modulo=o.mod=function(c,f){var b,x,R=this;return c=new w(c,f),!R.c||!c.s||c.c&&!c.c[0]?new w(NaN):!c.c||R.c&&!R.c[0]?new w(R):(p==9?(x=c.s,c.s=1,b=t(R,c,0,3),c.s=x,b.s*=x):b=t(R,c,0,p),c=R.minus(b.times(c)),!c.c[0]&&p==1&&(c.s=R.s),c)},o.multipliedBy=o.times=function(c,f){var b,x,R,k,A,m,C,F,v,P,$,W,B,_,q,Y=this,J=Y.c,ee=(c=new w(c,f)).c;if(!J||!ee||!J[0]||!ee[0])return!Y.s||!c.s||J&&!J[0]&&!ee||ee&&!ee[0]&&!J?c.c=c.e=c.s=null:(c.s*=Y.s,!J||!ee?c.c=c.e=null:(c.c=[0],c.e=0)),c;for(x=Be(Y.e/re)+Be(c.e/re),c.s*=Y.s,C=J.length,P=ee.length,C<P&&(B=J,J=ee,ee=B,R=C,C=P,P=R),R=C+P,B=[];R--;B.push(0));for(_=Ge,q=gt,R=P;--R>=0;){for(b=0,$=ee[R]%q,W=ee[R]/q|0,A=C,k=R+A;k>R;)F=J[--A]%q,v=J[A]/q|0,m=W*F+v*$,F=$*F+m%q*q+B[k]+b,b=(F/_|0)+(m/q|0)+W*v,B[k--]=F%_;B[k]=b}return b?++x:B.splice(0,1),H(c,B,x)},o.negated=function(){var c=new w(this);return c.s=-c.s||null,c},o.plus=function(c,f){var b,x=this,R=x.s;if(c=new w(c,f),f=c.s,!R||!f)return new w(NaN);if(R!=f)return c.s=-f,x.minus(c);var k=x.e/re,A=c.e/re,m=x.c,C=c.c;if(!k||!A){if(!m||!C)return new w(R/0);if(!m[0]||!C[0])return C[0]?c:new w(m[0]?x:R*0)}if(k=Be(k),A=Be(A),m=m.slice(),R=k-A){for(R>0?(A=k,b=C):(R=-R,b=m),b.reverse();R--;b.push(0));b.reverse()}for(R=m.length,f=C.length,R-f<0&&(b=C,C=m,m=b,f=R),R=0;f;)R=(m[--f]=m[f]+C[f]+R)/Ge|0,m[f]=Ge===m[f]?0:m[f]%Ge;return R&&(m=[R].concat(m),++A),H(c,m,A)},o.precision=o.sd=function(c,f){var b,x,R,k=this;if(c!=null&&c!==!!c)return ue(c,1,Me),f==null?f=a:ue(f,0,8),j(new w(k),c,f);if(!(b=k.c))return null;if(R=b.length-1,x=R*re+1,R=b[R]){for(;R%10==0;R/=10,x--);for(R=b[0];R>=10;R/=10,x++);}return c&&k.e+1>x&&(x=k.e+1),x},o.shiftedBy=function(c){return ue(c,-9007199254740991,Bs),this.times("1e"+c)},o.squareRoot=o.sqrt=function(){var c,f,b,x,R,k=this,A=k.c,m=k.s,C=k.e,F=i+4,v=new w("0.5");if(m!==1||!A||!A[0])return new w(!m||m<0&&(!A||A[0])?NaN:A?k:1/0);if(m=Math.sqrt(+U(k)),m==0||m==1/0?(f=$e(A),(f.length+C)%2==0&&(f+="0"),m=Math.sqrt(+f),C=Be((C+1)/2)-(C<0||C%2),m==1/0?f="5e"+C:(f=m.toExponential(),f=f.slice(0,f.indexOf("e")+1)+C),b=new w(f)):b=new w(m+""),b.c[0]){for(C=b.e,m=C+F,m<3&&(m=0);;)if(R=b,b=v.times(R.plus(t(k,R,F,1))),$e(R.c).slice(0,m)===(f=$e(b.c)).slice(0,m))if(b.e<C&&--m,f=f.slice(m-3,m+1),f=="9999"||!x&&f=="4999"){if(!x&&(j(R,R.e+i+2,0),R.times(R).eq(k))){b=R;break}F+=4,m+=4,x=1}else{(!+f||!+f.slice(1)&&f.charAt(0)=="5")&&(j(b,b.e+i+2,1),c=!b.times(b).eq(k));break}}return j(b,b.e+i+1,a,c)},o.toExponential=function(c,f){return c!=null&&(ue(c,0,Me),c++),M(this,c,f,1)},o.toFixed=function(c,f){return c!=null&&(ue(c,0,Me),c=c+this.e+1),M(this,c,f)},o.toFormat=function(c,f,b){var x,R=this;if(b==null)c!=null&&f&&typeof f=="object"?(b=f,f=null):c&&typeof c=="object"?(b=c,c=f=null):b=y;else if(typeof b!="object")throw Error(Te+"Argument not an object: "+b);if(x=R.toFixed(c,f),R.c){var k,A=x.split("."),m=+b.groupSize,C=+b.secondaryGroupSize,F=b.groupSeparator||"",v=A[0],P=A[1],$=R.s<0,W=$?v.slice(1):v,B=W.length;if(C&&(k=m,m=C,C=k,B-=k),m>0&&B>0){for(k=B%m||m,v=W.substr(0,k);k<B;k+=m)v+=F+W.substr(k,m);C>0&&(v+=F+W.slice(k)),$&&(v="-"+v)}x=P?v+(b.decimalSeparator||"")+((C=+b.fractionGroupSize)?P.replace(new RegExp("\\d{"+C+"}\\B","g"),"$&"+(b.fractionGroupSeparator||"")):P):v}return(b.prefix||"")+x+(b.suffix||"")},o.toFraction=function(c){var f,b,x,R,k,A,m,C,F,v,P,$,W=this,B=W.c;if(c!=null&&(m=new w(c),!m.isInteger()&&(m.c||m.s!==1)||m.lt(s)))throw Error(Te+"Argument "+(m.isInteger()?"out of range: ":"not an integer: ")+U(m));if(!B)return new w(W);for(f=new w(s),F=b=new w(s),x=C=new w(s),$=$e(B),k=f.e=$.length-W.e-1,f.c[0]=Qr[(A=k%re)<0?re+A:A],c=!c||m.comparedTo(f)>0?k>0?f:F:m,A=h,h=1/0,m=new w($),C.c[0]=0;v=t(m,f,0,1),R=b.plus(v.times(x)),R.comparedTo(c)!=1;)b=x,x=R,F=C.plus(v.times(R=F)),C=R,f=m.minus(v.times(R=f)),m=R;return R=t(c.minus(b),x,0,1),C=C.plus(R.times(F)),b=b.plus(R.times(x)),C.s=F.s=W.s,k=k*2,P=t(F,x,k,a).minus(W).abs().comparedTo(t(C,b,k,a).minus(W).abs())<1?[F,x]:[C,b],h=A,P},o.toNumber=function(){return+U(this)},o.toPrecision=function(c,f){return c!=null&&ue(c,1,Me),M(this,c,f,2)},o.toString=function(c){var f,b=this,x=b.s,R=b.e;return R===null?x?(f="Infinity",x<0&&(f="-"+f)):f="NaN":(c==null?f=R<=l||R>=u?ar($e(b.c),R):at($e(b.c),R,"0"):c===10&&D?(b=j(new w(b),i+R+1,a),f=at($e(b.c),b.e,"0")):(ue(c,2,T.length,"Base"),f=n(at($e(b.c),R,"0"),10,c,x,!0)),x<0&&b.c[0]&&(f="-"+f)),f},o.valueOf=o.toJSON=function(){return U(this)},o._isBigNumber=!0,o[Symbol.toStringTag]="BigNumber",o[Symbol.for("nodejs.util.inspect.custom")]=o.valueOf,e!=null&&w.set(e),w}function Be(e){var t=e|0;return e>0||e===t?t:t-1}function $e(e){for(var t,n,r=1,o=e.length,s=e[0]+"";r<o;){for(t=e[r++]+"",n=re-t.length;n--;t="0"+t);s+=t}for(o=s.length;s.charCodeAt(--o)===48;);return s.slice(0,o+1||1)}function Ft(e,t){var n,r,o=e.c,s=t.c,i=e.s,a=t.s,l=e.e,u=t.e;if(!i||!a)return null;if(n=o&&!o[0],r=s&&!s[0],n||r)return n?r?0:-a:i;if(i!=a)return i;if(n=i<0,r=l==u,!o||!s)return r?0:!o^n?1:-1;if(!r)return l>u^n?1:-1;for(a=(l=o.length)<(u=s.length)?l:u,i=0;i<a;i++)if(o[i]!=s[i])return o[i]>s[i]^n?1:-1;return l==u?0:l>u^n?1:-1}function ue(e,t,n,r){if(e<t||e>n||e!==je(e))throw Error(Te+(r||"Argument")+(typeof e=="number"?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function ir(e){var t=e.c.length-1;return Be(e.e/re)==t&&e.c[t]%2!=0}function ar(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function at(e,t,n){var r,o;if(t<0){for(o=n+".";++t;o+=n);e=o+e}else if(r=e.length,++t>r){for(o=n,t-=r;--t;o+=n);e+=o}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}wa();const Wu=100000n,qu=(e,t={})=>{const{style:n="decimal",compact:r=!1,fractionDigits:o,adaptiveDecimals:s=!1}=t,i=typeof e=="string"?Number(e):e,a=typeof i=="bigint"?i<0n?-i:i:Math.abs(i),l=r==="auto"?a>=Wu:r,u=typeof i=="bigint"?Number(i):i,d=s&&u!==0&&Math.abs(u)<Math.pow(10,-(o??2)),h=new Intl.NumberFormat("en-US",{style:n,...n==="currency"&&{currency:"USD"},maximumFractionDigits:d?20:o??2,minimumFractionDigits:d?0:o??2});if(!l)return d?h.format(Hs(u)):h.format(i);const E=[{threshold:1e12,suffix:"T",divisor:1e12},{threshold:1e9,suffix:"B",divisor:1e9},{threshold:1e6,suffix:"M",divisor:1e6},{threshold:1e3,suffix:"K",divisor:1e3}].find(p=>a>=p.threshold);if(E){const p=new Intl.NumberFormat("en-US",{style:n,...n==="currency"&&{currency:"USD"},maximumFractionDigits:o??1,minimumFractionDigits:o??1}),g=Number(i)/E.divisor;return p.format(g)+E.suffix}return d?h.format(Hs(u)):h.format(i)};function Hs(e){if(e===0)return 0;const t=e.toExponential().split("e"),n=parseInt(t[1]),r=Math.abs(n);return Number(e.toFixed(r))}function On(e,t=5,n=5){return e?e.length<=t+n?e:`${e.slice(0,t)}...${e.slice(-n)}`:""}var Qn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Yt=typeof window>"u"||"Deno"in globalThis;function Ue(){}function Gu(e,t){return typeof e=="function"?e(t):e}function ho(e){return typeof e=="number"&&e>=0&&e!==1/0}function xa(e,t){return Math.max(e+(t||0)-Date.now(),0)}function nn(e,t){return typeof e=="function"?e(t):e}function Qe(e,t){return typeof e=="function"?e(t):e}function Us(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:i,stale:a}=e;if(i){if(r){if(t.queryHash!==zo(i,t.options))return!1}else if(!jn(t.queryKey,i))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||o&&o!==t.state.fetchStatus||s&&!s(t))}function Ws(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if($n(t.options.mutationKey)!==$n(s))return!1}else if(!jn(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function zo(e,t){return((t==null?void 0:t.queryKeyHashFn)||$n)(e)}function $n(e){return JSON.stringify(e,(t,n)=>go(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function jn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>jn(e[n],t[n])):!1}function po(e,t){if(e===t)return e;const n=qs(e)&&qs(t);if(n||go(e)&&go(t)){const r=n?e:Object.keys(e),o=r.length,s=n?t:Object.keys(t),i=s.length,a=n?[]:{};let l=0;for(let u=0;u<i;u++){const d=n?u:s[u];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,l++):(a[d]=po(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&l++)}return o===i&&l===o?e:a}return t}function mo(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function qs(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function go(e){if(!Gs(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Gs(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Gs(e){return Object.prototype.toString.call(e)==="[object Object]"}function zu(e){return new Promise(t=>{setTimeout(t,e)})}function bo(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return po(e,t)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return po(e,t)}return t}function Vu(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Qu(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var vr=Symbol();function Ea(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===vr&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===vr?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var $t,vt,rn,pi,Ku=(pi=class extends Qn{constructor(){super();te(this,$t);te(this,vt);te(this,rn);V(this,rn,t=>{if(!Yt&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){O(this,vt)||this.setEventListener(O(this,rn))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,vt))==null||t.call(this),V(this,vt,void 0))}setEventListener(t){var n;V(this,rn,t),(n=O(this,vt))==null||n.call(this),V(this,vt,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){O(this,$t)!==t&&(V(this,$t,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof O(this,$t)=="boolean"?O(this,$t):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},$t=new WeakMap,vt=new WeakMap,rn=new WeakMap,pi),Vo=new Ku,on,yt,sn,mi,Yu=(mi=class extends Qn{constructor(){super();te(this,on,!0);te(this,yt);te(this,sn);V(this,sn,t=>{if(!Yt&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){O(this,yt)||this.setEventListener(O(this,sn))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,yt))==null||t.call(this),V(this,yt,void 0))}setEventListener(t){var n;V(this,sn,t),(n=O(this,yt))==null||n.call(this),V(this,yt,t(this.setOnline.bind(this)))}setOnline(t){O(this,on)!==t&&(V(this,on,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return O(this,on)}},on=new WeakMap,yt=new WeakMap,sn=new WeakMap,mi),yr=new Yu;function vo(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function Xu(e){return Math.min(1e3*2**e,3e4)}function Ra(e){return(e??"online")==="online"?yr.isOnline():!0}var Ca=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Kr(e){return e instanceof Ca}function Sa(e){let t=!1,n=0,r=!1,o;const s=vo(),i=y=>{var T;r||(E(new Ca(y)),(T=e.abort)==null||T.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>Vo.isFocused()&&(e.networkMode==="always"||yr.isOnline())&&e.canRun(),d=()=>Ra(e.networkMode)&&e.canRun(),h=y=>{var T;r||(r=!0,(T=e.onSuccess)==null||T.call(e,y),o==null||o(),s.resolve(y))},E=y=>{var T;r||(r=!0,(T=e.onError)==null||T.call(e,y),o==null||o(),s.reject(y))},p=()=>new Promise(y=>{var T;o=D=>{(r||u())&&y(D)},(T=e.onPause)==null||T.call(e)}).then(()=>{var y;o=void 0,r||(y=e.onContinue)==null||y.call(e)}),g=()=>{if(r)return;let y;const T=n===0?e.initialPromise:void 0;try{y=T??e.fn()}catch(D){y=Promise.reject(D)}Promise.resolve(y).then(h).catch(D=>{var j;if(r)return;const w=e.retry??(Yt?0:3),M=e.retryDelay??Xu,L=typeof M=="function"?M(n,D):M,H=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,D);if(t||!H){E(D);return}n++,(j=e.onFail)==null||j.call(e,n,D),zu(L).then(()=>u()?void 0:p()).then(()=>{t?E(D):g()})})};return{promise:s,cancel:i,continue:()=>(o==null||o(),s),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?g():p().then(g),s)}}var _u=e=>setTimeout(e,0);function Ju(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=_u;const s=a=>{t?e.push(a):o(()=>{n(a)})},i=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||i()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}var ye=Ju(),jt,gi,ka=(gi=class{constructor(){te(this,jt)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ho(this.gcTime)&&V(this,jt,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Yt?1/0:5*60*1e3))}clearGcTimeout(){O(this,jt)&&(clearTimeout(O(this,jt)),V(this,jt,void 0))}},jt=new WeakMap,gi),an,ln,He,Bt,xe,Un,Ht,ze,lt,bi,Zu=(bi=class extends ka{constructor(t){super();te(this,ze);te(this,an);te(this,ln);te(this,He);te(this,Bt);te(this,xe);te(this,Un);te(this,Ht);V(this,Ht,!1),V(this,Un,t.defaultOptions),this.setOptions(t.options),this.observers=[],V(this,Bt,t.client),V(this,He,O(this,Bt).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,V(this,an,ef(this.options)),this.state=t.state??O(this,an),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=O(this,xe))==null?void 0:t.promise}setOptions(t){this.options={...O(this,Un),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&O(this,He).remove(this)}setData(t,n){const r=bo(this.state.data,t,this.options);return se(this,ze,lt).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){se(this,ze,lt).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=O(this,xe))==null?void 0:r.promise;return(o=O(this,xe))==null||o.cancel(t),n?n.then(Ue).catch(Ue):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(O(this,an))}isActive(){return this.observers.some(t=>Qe(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===vr||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!xa(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=O(this,xe))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=O(this,xe))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),O(this,He).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(O(this,xe)&&(O(this,Ht)?O(this,xe).cancel({revert:!0}):O(this,xe).cancelRetry()),this.scheduleGc()),O(this,He).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||se(this,ze,lt).call(this,{type:"invalidate"})}fetch(t,n){var l,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(O(this,xe))return O(this,xe).continueRetry(),O(this,xe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(E=>E.options.queryFn);h&&this.setOptions(h.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,o=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(V(this,Ht,!0),r.signal)})},s=()=>{const h=Ea(this.options,n),E={client:O(this,Bt),queryKey:this.queryKey,meta:this.meta};return o(E),V(this,Ht,!1),this.options.persister?this.options.persister(h,E,this):h(E)},i={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:O(this,Bt),state:this.state,fetchFn:s};o(i),(l=this.options.behavior)==null||l.onFetch(i,this),V(this,ln,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=i.fetchOptions)==null?void 0:u.meta))&&se(this,ze,lt).call(this,{type:"fetch",meta:(d=i.fetchOptions)==null?void 0:d.meta});const a=h=>{var E,p,g,y;Kr(h)&&h.silent||se(this,ze,lt).call(this,{type:"error",error:h}),Kr(h)||((p=(E=O(this,He).config).onError)==null||p.call(E,h,this),(y=(g=O(this,He).config).onSettled)==null||y.call(g,this.state.data,h,this)),this.scheduleGc()};return V(this,xe,Sa({initialPromise:n==null?void 0:n.initialPromise,fn:i.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var E,p,g,y;if(h===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(T){a(T);return}(p=(E=O(this,He).config).onSuccess)==null||p.call(E,h,this),(y=(g=O(this,He).config).onSettled)==null||y.call(g,h,this.state.error,this),this.scheduleGc()},onError:a,onFail:(h,E)=>{se(this,ze,lt).call(this,{type:"failed",failureCount:h,error:E})},onPause:()=>{se(this,ze,lt).call(this,{type:"pause"})},onContinue:()=>{se(this,ze,lt).call(this,{type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0})),O(this,xe).start()}},an=new WeakMap,ln=new WeakMap,He=new WeakMap,Bt=new WeakMap,xe=new WeakMap,Un=new WeakMap,Ht=new WeakMap,ze=new WeakSet,lt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Aa(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return Kr(o)&&o.revert&&O(this,ln)?{...O(this,ln),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ye.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),O(this,He).notify({query:this,type:"updated",action:t})})},bi);function Aa(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ra(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ef(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var _e,vi,tf=(vi=class extends Qn{constructor(t={}){super();te(this,_e);this.config=t,V(this,_e,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??zo(o,n);let i=this.get(s);return i||(i=new Zu({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(i)),i}add(t){O(this,_e).has(t.queryHash)||(O(this,_e).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=O(this,_e).get(t.queryHash);n&&(t.destroy(),n===t&&O(this,_e).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ye.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return O(this,_e).get(t)}getAll(){return[...O(this,_e).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Us(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Us(t,r)):n}notify(t){ye.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ye.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ye.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},_e=new WeakMap,vi),Je,ke,Ut,Ze,bt,yi,nf=(yi=class extends ka{constructor(t){super();te(this,Ze);te(this,Je);te(this,ke);te(this,Ut);this.mutationId=t.mutationId,V(this,ke,t.mutationCache),V(this,Je,[]),this.state=t.state||rf(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){O(this,Je).includes(t)||(O(this,Je).push(t),this.clearGcTimeout(),O(this,ke).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){V(this,Je,O(this,Je).filter(n=>n!==t)),this.scheduleGc(),O(this,ke).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){O(this,Je).length||(this.state.status==="pending"?this.scheduleGc():O(this,ke).remove(this))}continue(){var t;return((t=O(this,Ut))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,i,a,l,u,d,h,E,p,g,y,T,D,w,M,L,H,j,U;V(this,Ut,Sa({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(c,f)=>{se(this,Ze,bt).call(this,{type:"failed",failureCount:c,error:f})},onPause:()=>{se(this,Ze,bt).call(this,{type:"pause"})},onContinue:()=>{se(this,Ze,bt).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>O(this,ke).canRun(this)}));const n=this.state.status==="pending",r=!O(this,Ut).canStart();try{if(!n){se(this,Ze,bt).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(o=O(this,ke).config).onMutate)==null?void 0:s.call(o,t,this));const f=await((a=(i=this.options).onMutate)==null?void 0:a.call(i,t));f!==this.state.context&&se(this,Ze,bt).call(this,{type:"pending",context:f,variables:t,isPaused:r})}const c=await O(this,Ut).start();return await((u=(l=O(this,ke).config).onSuccess)==null?void 0:u.call(l,c,t,this.state.context,this)),await((h=(d=this.options).onSuccess)==null?void 0:h.call(d,c,t,this.state.context)),await((p=(E=O(this,ke).config).onSettled)==null?void 0:p.call(E,c,null,this.state.variables,this.state.context,this)),await((y=(g=this.options).onSettled)==null?void 0:y.call(g,c,null,t,this.state.context)),se(this,Ze,bt).call(this,{type:"success",data:c}),c}catch(c){try{throw await((D=(T=O(this,ke).config).onError)==null?void 0:D.call(T,c,t,this.state.context,this)),await((M=(w=this.options).onError)==null?void 0:M.call(w,c,t,this.state.context)),await((H=(L=O(this,ke).config).onSettled)==null?void 0:H.call(L,void 0,c,this.state.variables,this.state.context,this)),await((U=(j=this.options).onSettled)==null?void 0:U.call(j,void 0,c,t,this.state.context)),c}finally{se(this,Ze,bt).call(this,{type:"error",error:c})}}finally{O(this,ke).runNext(this)}}},Je=new WeakMap,ke=new WeakMap,Ut=new WeakMap,Ze=new WeakSet,bt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ye.batch(()=>{O(this,Je).forEach(r=>{r.onMutationUpdate(t)}),O(this,ke).notify({mutation:this,type:"updated",action:t})})},yi);function rf(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ct,Ve,Wn,wi,of=(wi=class extends Qn{constructor(t={}){super();te(this,ct);te(this,Ve);te(this,Wn);this.config=t,V(this,ct,new Set),V(this,Ve,new Map),V(this,Wn,0)}build(t,n,r){const o=new nf({mutationCache:this,mutationId:++Zn(this,Wn)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){O(this,ct).add(t);const n=lr(t);if(typeof n=="string"){const r=O(this,Ve).get(n);r?r.push(t):O(this,Ve).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(O(this,ct).delete(t)){const n=lr(t);if(typeof n=="string"){const r=O(this,Ve).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&O(this,Ve).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=lr(t);if(typeof n=="string"){const r=O(this,Ve).get(n),o=r==null?void 0:r.find(s=>s.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=lr(t);if(typeof n=="string"){const o=(r=O(this,Ve).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ye.batch(()=>{O(this,ct).forEach(t=>{this.notify({type:"removed",mutation:t})}),O(this,ct).clear(),O(this,Ve).clear()})}getAll(){return Array.from(O(this,ct))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Ws(n,r))}findAll(t={}){return this.getAll().filter(n=>Ws(t,n))}notify(t){ye.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ye.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ue))))}},ct=new WeakMap,Ve=new WeakMap,Wn=new WeakMap,wi);function lr(e){var t;return(t=e.options.scope)==null?void 0:t.id}function zs(e){return{onFetch:(t,n)=>{var d,h,E,p,g;const r=t.options,o=(E=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:E.direction,s=((p=t.state.data)==null?void 0:p.pages)||[],i=((g=t.state.data)==null?void 0:g.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let y=!1;const T=M=>{Object.defineProperty(M,"signal",{enumerable:!0,get:()=>(t.signal.aborted?y=!0:t.signal.addEventListener("abort",()=>{y=!0}),t.signal)})},D=Ea(t.options,t.fetchOptions),w=async(M,L,H)=>{if(y)return Promise.reject();if(L==null&&M.pages.length)return Promise.resolve(M);const j={client:t.client,queryKey:t.queryKey,pageParam:L,direction:H?"backward":"forward",meta:t.options.meta};T(j);const U=await D(j),{maxPages:c}=t.options,f=H?Qu:Vu;return{pages:f(M.pages,U,c),pageParams:f(M.pageParams,L,c)}};if(o&&s.length){const M=o==="backward",L=M?sf:Vs,H={pages:s,pageParams:i},j=L(r,H);a=await w(H,j,M)}else{const M=e??s.length;do{const L=l===0?i[0]??r.initialPageParam:Vs(r,a);if(l>0&&L==null)break;a=await w(a,L),l++}while(l<M)}return a};t.options.persister?t.fetchFn=()=>{var y,T;return(T=(y=t.options).persister)==null?void 0:T.call(y,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Vs(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function sf(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var fe,wt,xt,cn,un,Et,fn,dn,xi,af=(xi=class{constructor(e={}){te(this,fe);te(this,wt);te(this,xt);te(this,cn);te(this,un);te(this,Et);te(this,fn);te(this,dn);V(this,fe,e.queryCache||new tf),V(this,wt,e.mutationCache||new of),V(this,xt,e.defaultOptions||{}),V(this,cn,new Map),V(this,un,new Map),V(this,Et,0)}mount(){Zn(this,Et)._++,O(this,Et)===1&&(V(this,fn,Vo.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,fe).onFocus())})),V(this,dn,yr.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,fe).onOnline())})))}unmount(){var e,t;Zn(this,Et)._--,O(this,Et)===0&&((e=O(this,fn))==null||e.call(this),V(this,fn,void 0),(t=O(this,dn))==null||t.call(this),V(this,dn,void 0))}isFetching(e){return O(this,fe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return O(this,wt).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=O(this,fe).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=O(this,fe).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(nn(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return O(this,fe).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=O(this,fe).get(r.queryHash),s=o==null?void 0:o.state.data,i=Gu(t,s);if(i!==void 0)return O(this,fe).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return ye.batch(()=>O(this,fe).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=O(this,fe).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=O(this,fe);ye.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=O(this,fe);return ye.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ye.batch(()=>O(this,fe).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Ue).catch(Ue)}invalidateQueries(e,t={}){return ye.batch(()=>(O(this,fe).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=ye.batch(()=>O(this,fe).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(Ue)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Ue)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=O(this,fe).build(this,t);return n.isStaleByTime(nn(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ue).catch(Ue)}fetchInfiniteQuery(e){return e.behavior=zs(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ue).catch(Ue)}ensureInfiniteQueryData(e){return e.behavior=zs(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return yr.isOnline()?O(this,wt).resumePausedMutations():Promise.resolve()}getQueryCache(){return O(this,fe)}getMutationCache(){return O(this,wt)}getDefaultOptions(){return O(this,xt)}setDefaultOptions(e){V(this,xt,e)}setQueryDefaults(e,t){O(this,cn).set($n(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...O(this,cn).values()],n={};return t.forEach(r=>{jn(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){O(this,un).set($n(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...O(this,un).values()],n={};return t.forEach(r=>{jn(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...O(this,xt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=zo(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===vr&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...O(this,xt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){O(this,fe).clear(),O(this,wt).clear()}},fe=new WeakMap,wt=new WeakMap,xt=new WeakMap,cn=new WeakMap,un=new WeakMap,Et=new WeakMap,fn=new WeakMap,dn=new WeakMap,xi),Fe,ie,qn,Ae,Wt,hn,Rt,et,Gn,pn,mn,qt,Gt,Ct,gn,le,Tn,yo,wo,xo,Eo,Ro,Co,So,Oa,Ei,lf=(Ei=class extends Qn{constructor(t,n){super();te(this,le);te(this,Fe);te(this,ie);te(this,qn);te(this,Ae);te(this,Wt);te(this,hn);te(this,Rt);te(this,et);te(this,Gn);te(this,pn);te(this,mn);te(this,qt);te(this,Gt);te(this,Ct);te(this,gn,new Set);this.options=n,V(this,Fe,t),V(this,et,null),V(this,Rt,vo()),this.options.experimental_prefetchInRender||O(this,Rt).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(O(this,ie).addObserver(this),Qs(O(this,ie),this.options)?se(this,le,Tn).call(this):this.updateResult(),se(this,le,Eo).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ko(O(this,ie),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ko(O(this,ie),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,se(this,le,Ro).call(this),se(this,le,Co).call(this),O(this,ie).removeObserver(this)}setOptions(t){const n=this.options,r=O(this,ie);if(this.options=O(this,Fe).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Qe(this.options.enabled,O(this,ie))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");se(this,le,So).call(this),O(this,ie).setOptions(this.options),n._defaulted&&!mo(this.options,n)&&O(this,Fe).getQueryCache().notify({type:"observerOptionsUpdated",query:O(this,ie),observer:this});const o=this.hasListeners();o&&Ks(O(this,ie),r,this.options,n)&&se(this,le,Tn).call(this),this.updateResult(),o&&(O(this,ie)!==r||Qe(this.options.enabled,O(this,ie))!==Qe(n.enabled,O(this,ie))||nn(this.options.staleTime,O(this,ie))!==nn(n.staleTime,O(this,ie)))&&se(this,le,yo).call(this);const s=se(this,le,wo).call(this);o&&(O(this,ie)!==r||Qe(this.options.enabled,O(this,ie))!==Qe(n.enabled,O(this,ie))||s!==O(this,Ct))&&se(this,le,xo).call(this,s)}getOptimisticResult(t){const n=O(this,Fe).getQueryCache().build(O(this,Fe),t),r=this.createResult(n,t);return uf(this,r)&&(V(this,Ae,r),V(this,hn,this.options),V(this,Wt,O(this,ie).state)),r}getCurrentResult(){return O(this,Ae)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){O(this,gn).add(t)}getCurrentQuery(){return O(this,ie)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=O(this,Fe).defaultQueryOptions(t),r=O(this,Fe).getQueryCache().build(O(this,Fe),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return se(this,le,Tn).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),O(this,Ae)))}createResult(t,n){var c;const r=O(this,ie),o=this.options,s=O(this,Ae),i=O(this,Wt),a=O(this,hn),u=t!==r?t.state:O(this,qn),{state:d}=t;let h={...d},E=!1,p;if(n._optimisticResults){const f=this.hasListeners(),b=!f&&Qs(t,n),x=f&&Ks(t,r,n,o);(b||x)&&(h={...h,...Aa(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:g,errorUpdatedAt:y,status:T}=h;if(n.select&&h.data!==void 0)if(s&&h.data===(i==null?void 0:i.data)&&n.select===O(this,Gn))p=O(this,pn);else try{V(this,Gn,n.select),p=n.select(h.data),p=bo(s==null?void 0:s.data,p,n),V(this,pn,p),V(this,et,null)}catch(f){V(this,et,f)}else p=h.data;if(n.placeholderData!==void 0&&p===void 0&&T==="pending"){let f;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))f=s.data;else if(f=typeof n.placeholderData=="function"?n.placeholderData((c=O(this,mn))==null?void 0:c.state.data,O(this,mn)):n.placeholderData,n.select&&f!==void 0)try{f=n.select(f),V(this,et,null)}catch(b){V(this,et,b)}f!==void 0&&(T="success",p=bo(s==null?void 0:s.data,f,n),E=!0)}O(this,et)&&(g=O(this,et),p=O(this,pn),y=Date.now(),T="error");const D=h.fetchStatus==="fetching",w=T==="pending",M=T==="error",L=w&&D,H=p!==void 0,U={status:T,fetchStatus:h.fetchStatus,isPending:w,isSuccess:T==="success",isError:M,isInitialLoading:L,isLoading:L,data:p,dataUpdatedAt:h.dataUpdatedAt,error:g,errorUpdatedAt:y,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:D,isRefetching:D&&!w,isLoadingError:M&&!H,isPaused:h.fetchStatus==="paused",isPlaceholderData:E,isRefetchError:M&&H,isStale:Qo(t,n),refetch:this.refetch,promise:O(this,Rt)};if(this.options.experimental_prefetchInRender){const f=R=>{U.status==="error"?R.reject(U.error):U.data!==void 0&&R.resolve(U.data)},b=()=>{const R=V(this,Rt,U.promise=vo());f(R)},x=O(this,Rt);switch(x.status){case"pending":t.queryHash===r.queryHash&&f(x);break;case"fulfilled":(U.status==="error"||U.data!==x.value)&&b();break;case"rejected":(U.status!=="error"||U.error!==x.reason)&&b();break}}return U}updateResult(){const t=O(this,Ae),n=this.createResult(O(this,ie),this.options);if(V(this,Wt,O(this,ie).state),V(this,hn,this.options),O(this,Wt).data!==void 0&&V(this,mn,O(this,ie)),mo(n,t))return;V(this,Ae,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,s=typeof o=="function"?o():o;if(s==="all"||!s&&!O(this,gn).size)return!0;const i=new Set(s??O(this,gn));return this.options.throwOnError&&i.add("error"),Object.keys(O(this,Ae)).some(a=>{const l=a;return O(this,Ae)[l]!==t[l]&&i.has(l)})};se(this,le,Oa).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&se(this,le,Eo).call(this)}},Fe=new WeakMap,ie=new WeakMap,qn=new WeakMap,Ae=new WeakMap,Wt=new WeakMap,hn=new WeakMap,Rt=new WeakMap,et=new WeakMap,Gn=new WeakMap,pn=new WeakMap,mn=new WeakMap,qt=new WeakMap,Gt=new WeakMap,Ct=new WeakMap,gn=new WeakMap,le=new WeakSet,Tn=function(t){se(this,le,So).call(this);let n=O(this,ie).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ue)),n},yo=function(){se(this,le,Ro).call(this);const t=nn(this.options.staleTime,O(this,ie));if(Yt||O(this,Ae).isStale||!ho(t))return;const r=xa(O(this,Ae).dataUpdatedAt,t)+1;V(this,qt,setTimeout(()=>{O(this,Ae).isStale||this.updateResult()},r))},wo=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(O(this,ie)):this.options.refetchInterval)??!1},xo=function(t){se(this,le,Co).call(this),V(this,Ct,t),!(Yt||Qe(this.options.enabled,O(this,ie))===!1||!ho(O(this,Ct))||O(this,Ct)===0)&&V(this,Gt,setInterval(()=>{(this.options.refetchIntervalInBackground||Vo.isFocused())&&se(this,le,Tn).call(this)},O(this,Ct)))},Eo=function(){se(this,le,yo).call(this),se(this,le,xo).call(this,se(this,le,wo).call(this))},Ro=function(){O(this,qt)&&(clearTimeout(O(this,qt)),V(this,qt,void 0))},Co=function(){O(this,Gt)&&(clearInterval(O(this,Gt)),V(this,Gt,void 0))},So=function(){const t=O(this,Fe).getQueryCache().build(O(this,Fe),this.options);if(t===O(this,ie))return;const n=O(this,ie);V(this,ie,t),V(this,qn,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Oa=function(t){ye.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(O(this,Ae))}),O(this,Fe).getQueryCache().notify({query:O(this,ie),type:"observerResultsUpdated"})})},Ei);function cf(e,t){return Qe(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Qs(e,t){return cf(e,t)||e.state.data!==void 0&&ko(e,t,t.refetchOnMount)}function ko(e,t,n){if(Qe(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Qo(e,t)}return!1}function Ks(e,t,n,r){return(e!==t||Qe(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Qo(e,n)}function Qo(e,t){return Qe(t.enabled,e)!==!1&&e.isStaleByTime(nn(t.staleTime,e))}function uf(e,t){return!mo(e.getCurrentResult(),t)}var Ta=I.createContext(void 0),Fa=e=>{const t=I.useContext(Ta);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Pa=({client:e,children:t})=>(I.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),N.jsx(Ta.Provider,{value:e,children:t})),ff=I.createContext(!1),df=()=>I.useContext(ff);function hf(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var pf=I.createContext(hf()),mf=()=>I.useContext(pf);function gf(e,t){return typeof e=="function"?e(...t):!!e}function Ys(){}var bf=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},vf=e=>{I.useEffect(()=>{e.clearReset()},[e])},yf=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||gf(n,[e.error,r])),wf=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...n)=>Math.max(t(...n),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},xf=(e,t)=>e.isLoading&&e.isFetching&&!t,Ef=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Xs=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Rf(e,t,n){var h,E,p,g,y;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=Fa(),o=df(),s=mf(),i=r.defaultQueryOptions(e);(E=(h=r.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||E.call(h,i),process.env.NODE_ENV!=="production"&&(i.queryFn||console.error(`[${i.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),i._optimisticResults=o?"isRestoring":"optimistic",wf(i),bf(i,s),vf(s);const a=!r.getQueryCache().get(i.queryHash),[l]=I.useState(()=>new t(r,i)),u=l.getOptimisticResult(i),d=!o&&e.subscribed!==!1;if(I.useSyncExternalStore(I.useCallback(T=>{const D=d?l.subscribe(ye.batchCalls(T)):Ys;return l.updateResult(),D},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),I.useEffect(()=>{l.setOptions(i)},[i,l]),Ef(i,u))throw Xs(i,l,s);if(yf({result:u,errorResetBoundary:s,throwOnError:i.throwOnError,query:r.getQueryCache().get(i.queryHash),suspense:i.suspense}))throw u.error;if((g=(p=r.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||g.call(p,i,u),i.experimental_prefetchInRender&&!Yt&&xf(u,o)){const T=a?Xs(i,l,s):(y=r.getQueryCache().get(i.queryHash))==null?void 0:y.promise;T==null||T.catch(Ys).finally(()=>{l.updateResult()})}return i.notifyOnChangeProps?u:l.trackResult(u)}function Ko(e,t){return Rf(e,lf)}function Yo(e={}){const{activeAddress:t}=dt.useWallet(),{activeNetwork:n}=dt.useNetwork(),{enabled:r=!0,view:o="thumbnail"}=e;return Ko({queryKey:["nfd",t,n,o],queryFn:async({signal:s})=>{if(!t)return null;const l=await fetch(`${n==="testnet"?"https://api.testnet.nf.domains":"https://api.nf.domains"}/nfd/lookup?address=${encodeURIComponent(t)}&view=${o}`,{method:"GET",headers:{Accept:"application/json"},signal:s});if(l.status===404)return null;if(!l.ok)throw new Error(`NFD lookup failed: ${l.statusText}`);return(await l.json())[t]},enabled:r&&!!t,retry:(s,i)=>i instanceof Error&&i.message.includes("404")?!1:s<3,refetchOnWindowFocus:!0})}const Cf="https://ipfs.algonode.dev",Sf=async e=>{if(!e.startsWith("ipfs://"))return e;const t=e.replace("ipfs://",""),n=`https://images.nf.domains/ipfs/${t}`;try{if((await fetch(n,{method:"HEAD"})).ok)return n}catch{console.info(`CID ${t} is not cached on images.nf.domains, trying IPFS gateway...`)}return`${Cf}/ipfs/${t}`};function Xo({nfd:e,alt:t,className:n,size:r=40,fallback:o,lightOnly:s=!1}){var d,h,E,p;const i=((h=(d=e==null?void 0:e.properties)==null?void 0:d.userDefined)==null?void 0:h.avatar)||((p=(E=e==null?void 0:e.properties)==null?void 0:E.verified)==null?void 0:p.avatar)||null,a=t||(e==null?void 0:e.name)||"NFD Avatar",{data:l,isLoading:u}=Ko({queryKey:["nfd-avatar",i],queryFn:async()=>i?i.startsWith("https://")&&!i.includes("/ipfs/")?i:i.startsWith("ipfs://")||i.includes("/ipfs/")?await Sf(i):i:null,enabled:!!i,staleTime:60*60*1e3,gcTime:24*60*60*1e3});return u||!l?o?N.jsx(N.Fragment,{children:o}):N.jsx("div",{className:en("flex items-center justify-center rounded-full",s?"bg-gray-200 dark:bg-gray-200":"bg-gray-200 dark:bg-[#192A39]",n),style:{width:`${r}px`,height:`${r}px`},"aria-label":a,role:"img","data-wallet-ui":!0,children:N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:en("text-gray-400",!s&&"dark:text-gray-500"),style:{width:`${Math.max(r/2,12)}px`,height:`${Math.max(r/2,12)}px`},children:N.jsx("path",{fillRule:"evenodd",d:"M7.5 6a4.5 4.5 0 119 0 4.5 4.5 0 01-9 0zM3.751 20.105a8.25 8.25 0 0116.498 0 .75.75 0 01-.437.695A18.683 18.683 0 0112 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 01-.437-.695z",clipRule:"evenodd"})})}):N.jsx("img",{src:l,alt:a,className:en("rounded-full",n),style:{width:`${r}px`,height:`${r}px`,objectFit:"cover"},loading:"lazy"})}const Fr=S.forwardRef(({className:e="",children:t,style:n,...r},o)=>{var u;const{activeAddress:s}=dt.useWallet(),i=Yo({enabled:!!s}),a=((u=i.data)==null?void 0:u.name)??null;return N.jsx("button",{ref:o,className:en("flex items-center",e),style:n,disabled:!1,...r,type:"button","data-wallet-ui":!0,children:t||N.jsx("div",{className:"flex items-center",children:N.jsxs("div",{className:"flex items-center py-2.5 pl-3 md:pl-3.5 pr-3 bg-[#2D2DF1] dark:bg-[#BFBFF9] text-white dark:text-[#001324] rounded-xl font-bold",children:[s&&N.jsx("div",{className:"mr-1 md:mr-2 h-6 w-6 overflow-hidden",children:N.jsx(Xo,{nfd:i.data,alt:`${a||s} avatar`,size:24,lightOnly:!0})}),N.jsx("span",{className:"hidden md:block max-w-[160px] truncate",children:a||(s?On(s,6,4):"Connect")}),s&&N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 16 16",fill:"none",className:"ml-1.5 mt-0.5","aria-hidden":"true",children:N.jsx("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]})})})});Fr.displayName="ConnectedWalletButton";const Ma=typeof document<"u"?S.useLayoutEffect:()=>{};function kf(e){const t=S.useRef(null);return Ma(()=>{t.current=e},[e]),S.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const Ot=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},Nt=e=>e&&"window"in e&&e.window===e?e:Ot(e).defaultView||window;function Af(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function Of(e){return Af(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let Tf=!1;function _o(){return Tf}function Ia(e,t){if(!_o())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:Of(n)?n=n.host:n=n.parentNode}return!1}const Ao=(e=document)=>{var t;if(!_o())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function Da(e){return _o()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function Ff(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function Pf(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Na(e){let t=null;return()=>(t==null&&(t=e()),t)}const Mf=Na(function(){return Pf(/^Mac/i)}),If=Na(function(){return Ff(/Android/i)});function La(){let e=S.useRef(new Map),t=S.useCallback((o,s,i,a)=>{let l=a!=null&&a.once?(...u)=>{e.current.delete(i),i(...u)}:i;e.current.set(i,{type:s,eventTarget:o,fn:l,options:a}),o.addEventListener(s,l,a)},[]),n=S.useCallback((o,s,i,a)=>{var l;let u=((l=e.current.get(i))===null||l===void 0?void 0:l.fn)||i;o.removeEventListener(s,u,a),e.current.delete(i)},[]),r=S.useCallback(()=>{e.current.forEach((o,s)=>{n(o.eventTarget,o.type,s,o.options)})},[n]);return S.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function Df(e){return e.mozInputSource===0&&e.isTrusted?!0:If()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}class $a{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}}function ja(e){let t=S.useRef({isFocused:!1,observer:null});Ma(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=kf(r=>{e==null||e(r)});return S.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=r.target,s=i=>{t.current.isFocused=!1,o.disabled&&n(new $a("blur",i)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",s,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){var i;(i=t.current.observer)===null||i===void 0||i.disconnect();let a=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let Nf=!1,Kn=null,Oo=new Set,Mn=new Map,Xt=!1,To=!1;const Lf={Tab:!0,Escape:!0};function Jo(e,t){for(let n of Oo)n(e,t)}function $f(e){return!(e.metaKey||!Mf()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function wr(e){Xt=!0,$f(e)&&(Kn="keyboard",Jo("keyboard",e))}function We(e){Kn="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Xt=!0,Jo("pointer",e))}function Ba(e){Df(e)&&(Xt=!0,Kn="virtual")}function Ha(e){e.target===window||e.target===document||Nf||!e.isTrusted||(!Xt&&!To&&(Kn="virtual",Jo("virtual",e)),Xt=!1,To=!1)}function Ua(){Xt=!1,To=!0}function Fo(e){if(typeof window>"u"||Mn.get(Nt(e)))return;const t=Nt(e),n=Ot(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Xt=!0,r.apply(this,arguments)},n.addEventListener("keydown",wr,!0),n.addEventListener("keyup",wr,!0),n.addEventListener("click",Ba,!0),t.addEventListener("focus",Ha,!0),t.addEventListener("blur",Ua,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",We,!0),n.addEventListener("pointermove",We,!0),n.addEventListener("pointerup",We,!0)):(n.addEventListener("mousedown",We,!0),n.addEventListener("mousemove",We,!0),n.addEventListener("mouseup",We,!0)),t.addEventListener("beforeunload",()=>{Wa(e)},{once:!0}),Mn.set(t,{focus:r})}const Wa=(e,t)=>{const n=Nt(e),r=Ot(e);t&&r.removeEventListener("DOMContentLoaded",t),Mn.has(n)&&(n.HTMLElement.prototype.focus=Mn.get(n).focus,r.removeEventListener("keydown",wr,!0),r.removeEventListener("keyup",wr,!0),r.removeEventListener("click",Ba,!0),n.removeEventListener("focus",Ha,!0),n.removeEventListener("blur",Ua,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",We,!0),r.removeEventListener("pointermove",We,!0),r.removeEventListener("pointerup",We,!0)):(r.removeEventListener("mousedown",We,!0),r.removeEventListener("mousemove",We,!0),r.removeEventListener("mouseup",We,!0)),Mn.delete(n))};function jf(e){const t=Ot(e);let n;return t.readyState!=="loading"?Fo(e):(n=()=>{Fo(e)},t.addEventListener("DOMContentLoaded",n)),()=>Wa(e,n)}typeof document<"u"&&jf();function qa(){return Kn!=="pointer"}const Bf=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Hf(e,t,n){let r=Ot(n==null?void 0:n.target);const o=typeof window<"u"?Nt(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,s=typeof window<"u"?Nt(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,i=typeof window<"u"?Nt(n==null?void 0:n.target).HTMLElement:HTMLElement,a=typeof window<"u"?Nt(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof o&&!Bf.has(r.activeElement.type)||r.activeElement instanceof s||r.activeElement instanceof i&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof a&&!Lf[n.key])}function Uf(e,t,n){Fo(),S.useEffect(()=>{let r=(o,s)=>{Hf(!!(n!=null&&n.isTextInput),o,s)&&e(qa())};return Oo.add(r),()=>{Oo.delete(r)}},t)}function Wf(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const s=S.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),o&&o(!1),!0},[r,o]),i=ja(s),a=S.useCallback(l=>{const u=Ot(l.target),d=u?Ao(u):Ao();l.target===l.currentTarget&&d===Da(l.nativeEvent)&&(n&&n(l),o&&o(!0),i(l))},[o,n,i]);return{focusProps:{onFocus:!t&&(n||o||r)?a:void 0,onBlur:!t&&(r||o)?s:void 0}}}function qf(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,s=S.useRef({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:a}=La(),l=S.useCallback(h=>{h.currentTarget.contains(h.target)&&s.current.isFocusWithin&&!h.currentTarget.contains(h.relatedTarget)&&(s.current.isFocusWithin=!1,a(),n&&n(h),o&&o(!1))},[n,o,s,a]),u=ja(l),d=S.useCallback(h=>{if(!h.currentTarget.contains(h.target))return;const E=Ot(h.target),p=Ao(E);if(!s.current.isFocusWithin&&p===Da(h.nativeEvent)){r&&r(h),o&&o(!0),s.current.isFocusWithin=!0,u(h);let g=h.currentTarget;i(E,"focus",y=>{if(s.current.isFocusWithin&&!Ia(g,y.target)){let T=new $a("blur",new E.defaultView.FocusEvent("blur",{relatedTarget:y.target}));T.target=g,T.currentTarget=g,l(T)}},{capture:!0})}},[r,o,u,i,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:d,onBlur:l}}}let xr=!1,Yr=0;function Po(){xr=!0,setTimeout(()=>{xr=!1},50)}function _s(e){e.pointerType==="touch"&&Po()}function Gf(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",_s):document.addEventListener("touchend",Po),Yr++,()=>{Yr--,!(Yr>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",_s):document.removeEventListener("touchend",Po))}}function zf(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[s,i]=S.useState(!1),a=S.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;S.useEffect(Gf,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=La(),{hoverProps:d,triggerHoverEnd:h}=S.useMemo(()=>{let E=(y,T)=>{if(a.pointerType=T,o||T==="touch"||a.isHovered||!y.currentTarget.contains(y.target))return;a.isHovered=!0;let D=y.currentTarget;a.target=D,l(Ot(y.target),"pointerover",w=>{a.isHovered&&a.target&&!Ia(a.target,w.target)&&p(w,w.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:D,pointerType:T}),n&&n(!0),i(!0)},p=(y,T)=>{let D=a.target;a.pointerType="",a.target=null,!(T==="touch"||!a.isHovered||!D)&&(a.isHovered=!1,u(),r&&r({type:"hoverend",target:D,pointerType:T}),n&&n(!1),i(!1))},g={};return typeof PointerEvent<"u"?(g.onPointerEnter=y=>{xr&&y.pointerType==="mouse"||E(y,y.pointerType)},g.onPointerLeave=y=>{!o&&y.currentTarget.contains(y.target)&&p(y,y.pointerType)}):(g.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},g.onMouseEnter=y=>{!a.ignoreEmulatedMouseEvents&&!xr&&E(y,"mouse"),a.ignoreEmulatedMouseEvents=!1},g.onMouseLeave=y=>{!o&&y.currentTarget.contains(y.target)&&p(y,"mouse")}),{hoverProps:g,triggerHoverEnd:p}},[t,n,r,o,a,l,u]);return S.useEffect(()=>{o&&h({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:d,isHovered:s}}function Vf(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=S.useRef({isFocused:!1,isFocusVisible:t||qa()}),[s,i]=S.useState(!1),[a,l]=S.useState(()=>o.current.isFocused&&o.current.isFocusVisible),u=S.useCallback(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),d=S.useCallback(p=>{o.current.isFocused=p,i(p),u()},[u]);Uf(p=>{o.current.isFocusVisible=p,u()},[],{isTextInput:n});let{focusProps:h}=Wf({isDisabled:r,onFocusChange:d}),{focusWithinProps:E}=qf({isDisabled:!r,onFocusWithinChange:d});return{isFocused:s,isFocusVisible:a,focusProps:r?E:h}}var Qf=Object.defineProperty,Kf=(e,t,n)=>t in e?Qf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xr=(e,t,n)=>(Kf(e,typeof t!="symbol"?t+"":t,n),n);let Yf=class{constructor(){Xr(this,"current",this.detect()),Xr(this,"handoffState","pending"),Xr(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},zt=new Yf;function Yn(e){var t,n;return zt.isServer?null:e?"ownerDocument"in e?e.ownerDocument:"current"in e?(n=(t=e.current)==null?void 0:t.ownerDocument)!=null?n:document:null:document}function Ga(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function pt(){let e=[],t={addEventListener(n,r,o,s){return n.addEventListener(r,o,s),t.add(()=>n.removeEventListener(r,o,s))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Ga(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){let r=pt();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function En(){let[e]=S.useState(pt);return S.useEffect(()=>()=>e.dispose(),[e]),e}let be=(e,t)=>{zt.isServer?S.useEffect(e,t):S.useLayoutEffect(e,t)};function Rn(e){let t=S.useRef(e);return be(()=>{t.current=e},[e]),t}let ae=function(e){let t=Rn(e);return S.useCallback((...n)=>t.current(...n),[t])};function Xf(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function _f(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function Jf({disabled:e=!1}={}){let t=S.useRef(null),[n,r]=S.useState(!1),o=En(),s=ae(()=>{t.current=null,r(!1),o.dispose()}),i=ae(a=>{if(o.dispose(),t.current===null){t.current=a.currentTarget,r(!0);{let l=Yn(a.currentTarget);o.addEventListener(l,"pointerup",s,!1),o.addEventListener(l,"pointermove",u=>{if(t.current){let d=Xf(u);r(_f(d,t.current.getBoundingClientRect()))}},!1),o.addEventListener(l,"pointercancel",s,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:i,onPointerUp:s,onClick:s}}}let Zf=S.createContext(void 0);function Zo(){return S.useContext(Zf)}function Js(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function ft(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ft),r}var Mo=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Mo||{}),ed=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(ed||{});function Ke(){let e=nd();return S.useCallback(t=>td({mergeRefs:e,...t}),[e])}function td({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:s=!0,name:i,mergeRefs:a}){a=a??rd;let l=za(t,e);if(s)return cr(l,n,r,i,a);let u=o??0;if(u&2){let{static:d=!1,...h}=l;if(d)return cr(h,n,r,i,a)}if(u&1){let{unmount:d=!0,...h}=l;return ft(d?0:1,{0(){return null},1(){return cr({...h,hidden:!0,style:{display:"none"}},n,r,i,a)}})}return cr(l,n,r,i,a)}function cr(e,t={},n,r,o){let{as:s=n,children:i,refName:a="ref",...l}=_r(e,["unmount","static"]),u=e.ref!==void 0?{[a]:e.ref}:{},d=typeof i=="function"?i(t):i;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let h={};if(t){let E=!1,p=[];for(let[g,y]of Object.entries(t))typeof y=="boolean"&&(E=!0),y===!0&&p.push(g.replace(/([A-Z])/g,T=>`-${T.toLowerCase()}`));if(E){h["data-headlessui-state"]=p.join(" ");for(let g of p)h[`data-${g}`]=""}}if(s===S.Fragment&&(Object.keys(It(l)).length>0||Object.keys(It(h)).length>0))if(!S.isValidElement(d)||Array.isArray(d)&&d.length>1){if(Object.keys(It(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(It(l)).concat(Object.keys(It(h))).map(E=>` - ${E}`).join(`
17
- `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(E=>` - ${E}`).join(`
16
+ */var gf=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],qr=gf.join(","),ll=typeof Element>"u",Hn=ll?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,zr=!ll&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Gr=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=o===""||o==="true",i=s||n&&t&&e(t.parentNode);return i},vf=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},cl=function(t,n,r){if(Gr(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(qr));return n&&Hn.call(t,qr)&&o.unshift(t),o=o.filter(r),o},ul=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!Gr(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{var d=Hn.call(i,qr);d&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var h=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),m=!Gr(h,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(h&&m){var f=e(h===!0?i.children:h.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:i,candidates:f})}else s.unshift.apply(s,i.children)}}return o},fl=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},dl=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||vf(t))&&!fl(t)?0:t.tabIndex},bf=function(t,n){var r=dl(t);return r<0&&n&&!fl(t)?0:r},yf=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},hl=function(t){return t.tagName==="INPUT"},wf=function(t){return hl(t)&&t.type==="hidden"},xf=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},Ef=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},Rf=function(t){if(!t.name)return!0;var n=t.form||zr(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=Ef(o,t.form);return!s||s===t},Cf=function(t){return hl(t)&&t.type==="radio"},Sf=function(t){return Cf(t)&&!Rf(t)},Of=function(t){var n,r=t&&zr(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,a,l;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,d,h;r=zr(o),o=(c=r)===null||c===void 0?void 0:c.host,s=!!((d=o)!==null&&d!==void 0&&(h=d.ownerDocument)!==null&&h!==void 0&&h.contains(o))}}return s},bi=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},Af=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=Hn.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(Hn.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=zr(t);if(l&&!l.shadowRoot&&o(l)===!0)return bi(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(Of(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return bi(t);return!1},kf=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Hn.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Zo=function(t,n){return!(n.disabled||Gr(n)||wf(n)||Af(n,t)||xf(n)||kf(n))},es=function(t,n){return!(Sf(n)||dl(n)<0||!Zo(t,n))},Tf=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Ff=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=bf(a,i),c=i?e(o.candidates):a;l===0?i?n.push.apply(n,c):n.push(a):r.push({documentOrder:s,tabIndex:l,item:o,isScope:i,content:c})}),r.sort(yf).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},lo=function(t,n){n=n||{};var r;return n.getShadowRoot?r=ul([t],n.includeContainer,{filter:es.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Tf}):r=cl(t,n.includeContainer,es.bind(null,n)),Ff(r)},Pf=function(t,n){n=n||{};var r;return n.getShadowRoot?r=ul([t],n.includeContainer,{filter:Zo.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=cl(t,n.includeContainer,Zo.bind(null,n)),r},pl=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Hn.call(t,qr)===!1?!1:es(n,t)};function ml(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function gl(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function $f(){return/apple/i.test(navigator.vendor)}function ts(){const e=/android/i;return e.test(ml())||e.test(gl())}function Mf(){return gl().includes("jsdom/")}const yi="data-floating-ui-focusable",Df="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function yn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function De(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Yo(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Tt(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Co(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function If(e){return e.matches("html,body")}function Ke(e){return(e==null?void 0:e.ownerDocument)||document}function vl(e){return be(e)&&e.matches(Df)}function wi(e){return e?e.getAttribute("role")==="combobox"&&vl(e):!1}function ns(e){return e?e.hasAttribute(yi)?e:e.querySelector("["+yi+"]")||e:null}function Rn(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var s;return o.parentId===t&&(!n||((s=o.context)==null?void 0:s.open))}).flatMap(o=>[o,...Rn(e,o.id,n)])}function xi(e,t){var n;let r=[],o=(n=e.find(s=>s.id===t))==null?void 0:n.parentId;for(;o;){const s=e.find(i=>i.id===o);o=s==null?void 0:s.parentId,s&&(r=r.concat(s))}return r}function So(e){e.preventDefault(),e.stopPropagation()}function Nf(e){return"nativeEvent"in e}function Lf(e){return e.mozInputSource===0&&e.isTrusted?!0:ts()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function jf(e){return Mf()?!1:!ts()&&e.width===0&&e.height===0||ts()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Ei(e,t){return["mouse","pen"].includes(e)}var Bf=typeof document<"u",Hf=function(){},Ie=Bf?O.useLayoutEffect:Hf;const Wf={...D};function Oo(e){const t=D.useRef(e);return Ie(()=>{t.current=e}),t}const Uf=Wf.useInsertionEffect,Vf=Uf||(e=>e());function it(e){const t=D.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Vf(()=>{t.current=e}),D.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const mr=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function bl(e,t){const n=lo(e,mr()),r=n.length;if(r===0)return;const o=yn(Ke(e)),s=n.indexOf(o),i=s===-1?t===1?0:r-1:s+t;return n[i]}function yl(e){return bl(Ke(e).body,1)||e}function wl(e){return bl(Ke(e).body,-1)||e}function er(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!De(n,r)}function qf(e){lo(e,mr()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Ri(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Ci(e,t,n){let{reference:r,floating:o}=e;const s=jt(t),i=al(t),a=il(i),l=un(t),c=s==="y",d=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,m=r[a]/2-o[a]/2;let f;switch(l){case"top":f={x:d,y:r.y-o.height};break;case"bottom":f={x:d,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:h};break;case"left":f={x:r.x-o.width,y:h};break;default:f={x:r.x,y:r.y}}switch(ao(t)){case"start":f[i]-=m*(n&&c?-1:1);break;case"end":f[i]+=m*(n&&c?-1:1);break}return f}const zf=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:h}=Ci(c,r,l),m=r,f={},x=0;for(let b=0;b<a.length;b++){const{name:E,fn:$}=a[b],{x:w,y:T,data:N,reset:I}=await $({x:d,y:h,initialPlacement:r,placement:m,strategy:o,middlewareData:f,rects:c,platform:i,elements:{reference:e,floating:t}});d=w??d,h=T??h,f={...f,[E]:{...f[E],...N}},I&&x<=50&&(x++,typeof I=="object"&&(I.placement&&(m=I.placement),I.rects&&(c=I.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:d,y:h}=Ci(c,m,l)),b=-1)}return{x:d,y:h,placement:m,strategy:o,middlewareData:f}};async function xl(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:m=!1,padding:f=0}=io(t,e),x=mf(f),E=a[m?h==="floating"?"reference":"floating":h],$=Vr(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(E)))==null||n?E:E.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),w=h==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),N=await(s.isElement==null?void 0:s.isElement(T))?await(s.getScale==null?void 0:s.getScale(T))||{x:1,y:1}:{x:1,y:1},I=Vr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:T,strategy:l}):w);return{top:($.top-I.top+x.top)/N.y,bottom:(I.bottom-$.bottom+x.bottom)/N.y,left:($.left-I.left+x.left)/N.x,right:(I.right-$.right+x.right)/N.x}}const Gf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:b=!0,...E}=io(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const $=un(o),w=jt(a),T=un(a)===a,N=await(l.isRTL==null?void 0:l.isRTL(c.floating)),I=m||(T||!b?[Ur(a)]:cf(a)),j=x!=="none";!m&&j&&I.push(...hf(a,b,x,N));const W=[a,...I],u=await xl(t,E),p=[];let g=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&p.push(u[$]),h){const A=lf(o,i,N);p.push(u[A[0]],u[A[1]])}if(g=[...g,{placement:o,overflows:p}],!p.every(A=>A<=0)){var S,C;const A=(((S=s.flip)==null?void 0:S.index)||0)+1,v=W[A];if(v&&(!(h==="alignment"?w!==jt(v):!1)||g.every(y=>y.overflows[0]>0&&jt(y.placement)===w)))return{data:{index:A,overflows:g},reset:{placement:v}};let R=(C=g.filter(F=>F.overflows[0]<=0).sort((F,y)=>F.overflows[1]-y.overflows[1])[0])==null?void 0:C.placement;if(!R)switch(f){case"bestFit":{var k;const F=(k=g.filter(y=>{if(j){const M=jt(y.placement);return M===w||M==="y"}return!0}).map(y=>[y.placement,y.overflows.filter(M=>M>0).reduce((M,B)=>M+B,0)]).sort((y,M)=>y[1]-M[1])[0])==null?void 0:k[0];F&&(R=F);break}case"initialPlacement":R=a;break}if(o!==R)return{reset:{placement:R}}}return{}}}},_f=new Set(["left","top"]);async function Qf(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=un(n),a=ao(n),l=jt(n)==="y",c=_f.has(i)?-1:1,d=s&&l?-1:1,h=io(t,e);let{mainAxis:m,crossAxis:f,alignmentAxis:x}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof x=="number"&&(f=a==="end"?x*-1:x),l?{x:f*d,y:m*c}:{x:m*c,y:f*d}}const Kf=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await Qf(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},Yf=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:E=>{let{x:$,y:w}=E;return{x:$,y:w}}},...l}=io(e,t),c={x:n,y:r},d=await xl(t,l),h=jt(un(o)),m=sl(h);let f=c[m],x=c[h];if(s){const E=m==="y"?"top":"left",$=m==="y"?"bottom":"right",w=f+d[E],T=f-d[$];f=mi(w,f,T)}if(i){const E=h==="y"?"top":"left",$=h==="y"?"bottom":"right",w=x+d[E],T=x-d[$];x=mi(w,x,T)}const b=a.fn({...t,[m]:f,[h]:x});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[m]:s,[h]:i}}}}}};function El(e){const t=ze(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=be(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Wr(n)!==s||Wr(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Is(e){return de(e)?e:e.contextElement}function Cn(e){const t=Is(e);if(!be(t))return lt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=El(t);let i=(s?Wr(n.width):n.width)/r,a=(s?Wr(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Xf=lt(0);function Rl(e){const t=Ne(e);return!oo()||!t.visualViewport?Xf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Jf(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ne(e)?!1:t}function fn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Is(e);let i=lt(1);t&&(r?de(r)&&(i=Cn(r)):i=Cn(e));const a=Jf(s,n,r)?Rl(s):lt(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,d=o.width/i.x,h=o.height/i.y;if(s){const m=Ne(s),f=r&&de(r)?Ne(r):r;let x=m,b=Xo(x);for(;b&&r&&f!==x;){const E=Cn(b),$=b.getBoundingClientRect(),w=ze(b),T=$.left+(b.clientLeft+parseFloat(w.paddingLeft))*E.x,N=$.top+(b.clientTop+parseFloat(w.paddingTop))*E.y;l*=E.x,c*=E.y,d*=E.x,h*=E.y,l+=T,c+=N,x=Ne(b),b=Xo(x)}}return Vr({width:d,height:h,x:l,y:c})}function Ns(e,t){const n=so(e).scrollLeft;return t?t.left+n:fn(dt(e)).left+n}function Cl(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Ns(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function Zf(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=dt(r),a=t?ro(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=lt(1);const d=lt(0),h=be(r);if((h||!h&&!s)&&((qt(r)!=="body"||pr(i))&&(l=so(r)),be(r))){const f=fn(r);c=Cn(r),d.x=f.x+r.clientLeft,d.y=f.y+r.clientTop}const m=i&&!h&&!s?Cl(i,l,!0):lt(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+m.x,y:n.y*c.y-l.scrollTop*c.y+d.y+m.y}}function ed(e){return Array.from(e.getClientRects())}function td(e){const t=dt(e),n=so(e),r=e.ownerDocument.body,o=ln(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=ln(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Ns(e);const a=-n.scrollTop;return ze(r).direction==="rtl"&&(i+=ln(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function nd(e,t){const n=Ne(e),r=dt(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const c=oo();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}const rd=new Set(["absolute","fixed"]);function od(e,t){const n=fn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=be(e)?Cn(e):lt(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function Si(e,t,n){let r;if(t==="viewport")r=nd(e,n);else if(t==="document")r=td(dt(e));else if(de(t))r=od(t,n);else{const o=Rl(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Vr(r)}function Sl(e,t){const n=Et(e);return n===t||!de(n)||wt(n)?!1:ze(n).position==="fixed"||Sl(n,t)}function sd(e,t){const n=t.get(e);if(n)return n;let r=Ht(e,[],!1).filter(a=>de(a)&&qt(a)!=="body"),o=null;const s=ze(e).position==="fixed";let i=s?Et(e):e;for(;de(i)&&!wt(i);){const a=ze(i),l=Ds(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&rd.has(o.position)||pr(i)&&!l&&Sl(e,i))?r=r.filter(d=>d!==i):o=a,i=Et(i)}return t.set(e,r),r}function id(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?ro(t)?[]:sd(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,d)=>{const h=Si(t,d,o);return c.top=ln(h.top,c.top),c.right=Hr(h.right,c.right),c.bottom=Hr(h.bottom,c.bottom),c.left=ln(h.left,c.left),c},Si(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ad(e){const{width:t,height:n}=El(e);return{width:t,height:n}}function ld(e,t,n){const r=be(t),o=dt(t),s=n==="fixed",i=fn(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=lt(0);function c(){l.x=Ns(o)}if(r||!r&&!s)if((qt(t)!=="body"||pr(o))&&(a=so(t)),r){const f=fn(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&c();s&&!r&&o&&c();const d=o&&!r&&!s?Cl(o,a):lt(0),h=i.left+a.scrollLeft-l.x-d.x,m=i.top+a.scrollTop-l.y-d.y;return{x:h,y:m,width:i.width,height:i.height}}function Ao(e){return ze(e).position==="static"}function Oi(e,t){if(!be(e)||ze(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return dt(e)===n&&(n=n.ownerDocument.body),n}function Ol(e,t){const n=Ne(e);if(ro(e))return n;if(!be(e)){let o=Et(e);for(;o&&!wt(o);){if(de(o)&&!Ao(o))return o;o=Et(o)}return n}let r=Oi(e,t);for(;r&&Xu(r)&&Ao(r);)r=Oi(r,t);return r&&wt(r)&&Ao(r)&&!Ds(r)?n:r||nf(e)||n}const cd=async function(e){const t=this.getOffsetParent||Ol,n=this.getDimensions,r=await n(e.floating);return{reference:ld(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ud(e){return ze(e).direction==="rtl"}const fd={convertOffsetParentRelativeRectToViewportRelativeRect:Zf,getDocumentElement:dt,getClippingRect:id,getOffsetParent:Ol,getElementRects:cd,getClientRects:ed,getDimensions:ad,getScale:Cn,isElement:de,isRTL:ud};function Al(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function dd(e,t){let n=null,r;const o=dt(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:d,top:h,width:m,height:f}=c;if(a||t(),!m||!f)return;const x=Or(h),b=Or(o.clientWidth-(d+m)),E=Or(o.clientHeight-(h+f)),$=Or(d),T={rootMargin:-x+"px "+-b+"px "+-E+"px "+-$+"px",threshold:ln(0,Hr(1,l))||1};let N=!0;function I(j){const W=j[0].intersectionRatio;if(W!==l){if(!N)return i();W?i(!1,W):r=setTimeout(()=>{i(!1,1e-7)},1e3)}W===1&&!Al(c,e.getBoundingClientRect())&&i(),N=!1}try{n=new IntersectionObserver(I,{...T,root:o.ownerDocument})}catch{n=new IntersectionObserver(I,T)}n.observe(e)}return i(!0),s}function hd(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Is(e),d=o||s?[...c?Ht(c):[],...Ht(t)]:[];d.forEach($=>{o&&$.addEventListener("scroll",n,{passive:!0}),s&&$.addEventListener("resize",n)});const h=c&&a?dd(c,n):null;let m=-1,f=null;i&&(f=new ResizeObserver($=>{let[w]=$;w&&w.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var T;(T=f)==null||T.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let x,b=l?fn(e):null;l&&E();function E(){const $=fn(e);b&&!Al(b,$)&&n(),b=$,x=requestAnimationFrame(E)}return n(),()=>{var $;d.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),h==null||h(),($=f)==null||$.disconnect(),f=null,l&&cancelAnimationFrame(x)}}const pd=Kf,md=Yf,gd=Gf,vd=(e,t,n)=>{const r=new Map,o={platform:fd,...n},s={...o.platform,_c:r};return zf(e,t,{...o,platform:s})};var bd=typeof document<"u",yd=function(){},jr=bd?O.useLayoutEffect:yd;function _r(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!_r(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!_r(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function kl(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ai(e,t){const n=kl(e);return Math.round(t*n)/n}function ko(e){const t=D.useRef(e);return jr(()=>{t.current=e}),t}function wd(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[d,h]=D.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,f]=D.useState(r);_r(m,r)||f(r);const[x,b]=D.useState(null),[E,$]=D.useState(null),w=D.useCallback(y=>{y!==j.current&&(j.current=y,b(y))},[]),T=D.useCallback(y=>{y!==W.current&&(W.current=y,$(y))},[]),N=s||x,I=i||E,j=D.useRef(null),W=D.useRef(null),u=D.useRef(d),p=l!=null,g=ko(l),S=ko(o),C=ko(c),k=D.useCallback(()=>{if(!j.current||!W.current)return;const y={placement:t,strategy:n,middleware:m};S.current&&(y.platform=S.current),vd(j.current,W.current,y).then(M=>{const B={...M,isPositioned:C.current!==!1};A.current&&!_r(u.current,B)&&(u.current=B,Bn.flushSync(()=>{h(B)}))})},[m,t,n,S,C]);jr(()=>{c===!1&&u.current.isPositioned&&(u.current.isPositioned=!1,h(y=>({...y,isPositioned:!1})))},[c]);const A=D.useRef(!1);jr(()=>(A.current=!0,()=>{A.current=!1}),[]),jr(()=>{if(N&&(j.current=N),I&&(W.current=I),N&&I){if(g.current)return g.current(N,I,k);k()}},[N,I,k,g,p]);const v=D.useMemo(()=>({reference:j,floating:W,setReference:w,setFloating:T}),[w,T]),R=D.useMemo(()=>({reference:N,floating:I}),[N,I]),F=D.useMemo(()=>{const y={position:n,left:0,top:0};if(!R.floating)return y;const M=Ai(R.floating,d.x),B=Ai(R.floating,d.y);return a?{...y,transform:"translate("+M+"px, "+B+"px)",...kl(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:M,top:B}},[n,a,R.floating,d.x,d.y]);return D.useMemo(()=>({...d,update:k,refs:v,elements:R,floatingStyles:F}),[d,k,v,R,F])}const xd=(e,t)=>({...pd(e),options:[e,t]}),Ed=(e,t)=>({...md(e),options:[e,t]}),Rd=(e,t)=>({...gd(e),options:[e,t]});function Cd(e){const t=D.useRef(void 0),n=D.useCallback(r=>{const o=e.map(s=>{if(s!=null){if(typeof s=="function"){const i=s,a=i(r);return typeof a=="function"?a:()=>{i(null)}}return s.current=r,()=>{s.current=null}}});return()=>{o.forEach(s=>s==null?void 0:s())}},e);return D.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}const Sd="data-floating-ui-focusable",ki="active",Ti="selected",Od={...D};let Fi=!1,Ad=0;const Pi=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Ad++;function kd(){const[e,t]=D.useState(()=>Fi?Pi():void 0);return Ie(()=>{e==null&&t(Pi())},[]),D.useEffect(()=>{Fi=!0},[]),e}const Td=Od.useId,Wn=Td||kd;let rs;process.env.NODE_ENV!=="production"&&(rs=new Set);function Fd(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=rs)!=null&&e.has(o))){var s;(s=rs)==null||s.add(o),console.error(o)}}function Pd(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const $d=D.createContext(null),Md=D.createContext(null),Tl=()=>{var e;return((e=D.useContext($d))==null?void 0:e.id)||null},Ls=()=>D.useContext(Md);function rr(e){return"data-floating-ui-"+e}function Dd(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}let $i=0;function bn(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame($i);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():$i=requestAnimationFrame(s)}function Id(e){return(e==null?void 0:e.ownerDocument)||document}const Sn={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Mi(e){return e==="inert"?Sn.inert:e==="aria-hidden"?Sn["aria-hidden"]:Sn.none}let Ar=new WeakSet,kr={},To=0;const Nd=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Fl=e=>e&&(e.host||Fl(e.parentNode)),Ld=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Fl(n);return e.contains(r)?r:null}).filter(n=>n!=null);function jd(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=Ld(t,e),a=new Set,l=new Set(i),c=[];kr[o]||(kr[o]=new WeakMap);const d=kr[o];i.forEach(h),m(t),a.clear();function h(f){!f||a.has(f)||(a.add(f),f.parentNode&&h(f.parentNode))}function m(f){!f||l.has(f)||[].forEach.call(f.children,x=>{if(qt(x)!=="script")if(a.has(x))m(x);else{const b=s?x.getAttribute(s):null,E=b!==null&&b!=="false",$=Mi(s),w=($.get(x)||0)+1,T=(d.get(x)||0)+1;$.set(x,w),d.set(x,T),c.push(x),w===1&&E&&Ar.add(x),T===1&&x.setAttribute(o,""),!E&&s&&x.setAttribute(s,s==="inert"?"":"true")}})}return To++,()=>{c.forEach(f=>{const x=Mi(s),E=(x.get(f)||0)-1,$=(d.get(f)||0)-1;x.set(f,E),d.set(f,$),E||(!Ar.has(f)&&s&&f.removeAttribute(s),Ar.delete(f)),$||f.removeAttribute(o)}),To--,To||(Sn.inert=new WeakMap,Sn["aria-hidden"]=new WeakMap,Sn.none=new WeakMap,Ar=new WeakSet,kr={})}}function Di(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Id(e[0]).body;return jd(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const co={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Qr=D.forwardRef(function(t,n){const[r,o]=D.useState();Ie(()=>{$f()&&o("button")},[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[rr("focus-guard")]:"",style:co};return L.jsx("span",{...t,...s})}),Pl=D.createContext(null),Ii=rr("portal");function Bd(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Wn(),o=Ml(),[s,i]=D.useState(null),a=D.useRef(null);return Ie(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),Ie(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(Ii,""),l.appendChild(c),a.current=c,i(c)},[t,r]),Ie(()=>{if(n===null||!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!de(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const d=document.createElement("div");d.id=r,d.setAttribute(Ii,""),l=c||l,l.appendChild(d),a.current=d,i(d)},[t,n,r,o]),s}function $l(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,s=Bd({id:n,root:r}),[i,a]=D.useState(null),l=D.useRef(null),c=D.useRef(null),d=D.useRef(null),h=D.useRef(null),m=i==null?void 0:i.modal,f=i==null?void 0:i.open,x=!!i&&!i.modal&&i.open&&o&&!!(r||s);return D.useEffect(()=>{if(!s||!o||m)return;function b(E){s&&er(E)&&(E.type==="focusin"?Ri:qf)(s)}return s.addEventListener("focusin",b,!0),s.addEventListener("focusout",b,!0),()=>{s.removeEventListener("focusin",b,!0),s.removeEventListener("focusout",b,!0)}},[s,o,m]),D.useEffect(()=>{s&&(f||Ri(s))},[f,s]),L.jsxs(Pl.Provider,{value:D.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:h,portalNode:s,setFocusManagerState:a}),[o,s]),children:[x&&s&&L.jsx(Qr,{"data-type":"outside",ref:l,onFocus:b=>{if(er(b,s)){var E;(E=d.current)==null||E.focus()}else{const $=i?i.domReference:null,w=wl($);w==null||w.focus()}}}),x&&s&&L.jsx("span",{"aria-owns":s.id,style:co}),s&&Bn.createPortal(t,s),x&&s&&L.jsx(Qr,{"data-type":"outside",ref:c,onFocus:b=>{if(er(b,s)){var E;(E=h.current)==null||E.focus()}else{const $=i?i.domReference:null,w=yl($);w==null||w.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,b.nativeEvent,"focus-out"))}}})]})}const Ml=()=>D.useContext(Pl);function Ni(e){return D.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const Hd=20;let Qt=[];function Wd(e){Qt=Qt.filter(t=>t.isConnected),e&&qt(e)!=="body"&&(Qt.push(e),Qt.length>Hd&&(Qt=Qt.slice(-20)))}function Li(){return Qt.slice().reverse().find(e=>e.isConnected)}function Ud(e){const t=mr();return pl(e,t)?e:lo(e,t)[0]||e}function ji(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=mr(),s=Pf(e,r).filter(a=>{const l=a.getAttribute("data-tabindex")||"";return pl(a,r)||a.hasAttribute("data-tabindex")&&!l.startsWith("-")}),i=e.getAttribute("tabindex");t.current.includes("floating")||s.length===0?i!=="0"&&e.setAttribute("tabindex","0"):(i!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const Vd=D.forwardRef(function(t,n){return L.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:co})});function Dl(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:s=!0,initialFocus:i=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:d=!1,closeOnFocusOut:h=!0,outsideElementsInert:m=!1,getInsideElements:f=()=>[]}=e,{open:x,onOpenChange:b,events:E,dataRef:$,elements:{domReference:w,floating:T}}=t,N=it(()=>{var Q;return(Q=$.current.floatingContext)==null?void 0:Q.nodeId}),I=it(f),j=typeof i=="number"&&i<0,W=wi(w)&&j,u=Nd(),p=u?s:!0,g=!p||u&&m,S=Oo(o),C=Oo(i),k=Oo(a),A=Ls(),v=Ml(),R=D.useRef(null),F=D.useRef(null),y=D.useRef(!1),M=D.useRef(!1),B=D.useRef(-1),V=v!=null,H=ns(T),_=it(function(Q){return Q===void 0&&(Q=H),Q?lo(Q,mr()):[]}),ee=it(Q=>{const ne=_(Q);return S.current.map(X=>w&&X==="reference"?w:H&&X==="floating"?H:ne).filter(Boolean).flat()});D.useEffect(()=>{if(r||!c)return;function Q(X){if(X.key==="Tab"){De(H,yn(Ke(H)))&&_().length===0&&!W&&So(X);const K=ee(),re=Tt(X);S.current[0]==="reference"&&re===w&&(So(X),X.shiftKey?bn(K[K.length-1]):bn(K[1])),S.current[1]==="floating"&&re===H&&X.shiftKey&&(So(X),bn(K[0]))}}const ne=Ke(H);return ne.addEventListener("keydown",Q),()=>{ne.removeEventListener("keydown",Q)}},[r,w,H,c,S,W,_,ee]),D.useEffect(()=>{if(r||!T)return;function Q(ne){const X=Tt(ne),re=_().indexOf(X);re!==-1&&(B.current=re)}return T.addEventListener("focusin",Q),()=>{T.removeEventListener("focusin",Q)}},[r,T,_]),D.useEffect(()=>{if(r||!h)return;function Q(){M.current=!0,setTimeout(()=>{M.current=!1})}function ne(X){const K=X.relatedTarget,re=X.currentTarget,Re=Tt(X);queueMicrotask(()=>{const tt=N(),mt=!(De(w,K)||De(T,K)||De(K,T)||De(v==null?void 0:v.portalNode,K)||K!=null&&K.hasAttribute(rr("focus-guard"))||A&&(Rn(A.nodesRef.current,tt).find(he=>{var me,St;return De((me=he.context)==null?void 0:me.elements.floating,K)||De((St=he.context)==null?void 0:St.elements.domReference,K)})||xi(A.nodesRef.current,tt).find(he=>{var me,St,li;return[(me=he.context)==null?void 0:me.elements.floating,ns((St=he.context)==null?void 0:St.elements.floating)].includes(K)||((li=he.context)==null?void 0:li.elements.domReference)===K})));if(re===w&&H&&ji(H,S),l&&re!==w&&!(Re!=null&&Re.isConnected)&&yn(Ke(H))===Ke(H).body){be(H)&&H.focus();const he=B.current,me=_(),St=me[he]||me[me.length-1]||H;be(St)&&St.focus()}if($.current.insideReactTree){$.current.insideReactTree=!1;return}(W||!c)&&K&&mt&&!M.current&&K!==Li()&&(y.current=!0,b(!1,X,"focus-out"))})}if(T&&be(w))return w.addEventListener("focusout",ne),w.addEventListener("pointerdown",Q),T.addEventListener("focusout",ne),()=>{w.removeEventListener("focusout",ne),w.removeEventListener("pointerdown",Q),T.removeEventListener("focusout",ne)}},[r,w,T,H,c,A,v,b,h,l,_,W,N,S,$]);const Z=D.useRef(null),Y=D.useRef(null),U=Ni([Z,v==null?void 0:v.beforeInsideRef]),ae=Ni([Y,v==null?void 0:v.afterInsideRef]);D.useEffect(()=>{var Q,ne;if(r||!T)return;const X=Array.from((v==null||(Q=v.portalNode)==null?void 0:Q.querySelectorAll("["+rr("portal")+"]"))||[]),K=A?xi(A.nodesRef.current,N()):[],re=A&&!c?K.map(he=>{var me;return(me=he.context)==null?void 0:me.elements.floating}):[],Re=(ne=K.find(he=>{var me;return wi(((me=he.context)==null?void 0:me.elements.domReference)||null)}))==null||(ne=ne.context)==null?void 0:ne.elements.domReference,tt=[T,Re,...X,...re,...I(),R.current,F.current,Z.current,Y.current,v==null?void 0:v.beforeOutsideRef.current,v==null?void 0:v.afterOutsideRef.current,S.current.includes("reference")||W?w:null].filter(he=>he!=null),mt=c||W?Di(tt,!g,g):Di(tt);return()=>{mt()}},[r,w,T,c,S,v,W,p,g,A,N,I]),Ie(()=>{if(r||!be(H))return;const Q=Ke(H),ne=yn(Q);queueMicrotask(()=>{const X=ee(H),K=C.current,re=(typeof K=="number"?X[K]:K.current)||H,Re=De(H,ne);!j&&!Re&&x&&bn(re,{preventScroll:re===H})})},[r,x,H,j,ee,C]),Ie(()=>{if(r||!H)return;const Q=Ke(H),ne=yn(Q);Wd(ne);function X(Re){let{reason:tt,event:mt,nested:he}=Re;if(["hover","safe-polygon"].includes(tt)&&mt.type==="mouseleave"&&(y.current=!0),tt==="outside-press")if(he)y.current=!1;else if(Lf(mt)||jf(mt))y.current=!1;else{let me=!1;document.createElement("div").focus({get preventScroll(){return me=!0,!1}}),me?y.current=!1:y.current=!0}}E.on("openchange",X);const K=Q.createElement("span");K.setAttribute("tabindex","-1"),K.setAttribute("aria-hidden","true"),Object.assign(K.style,co),V&&w&&w.insertAdjacentElement("afterend",K);function re(){if(typeof k.current=="boolean"){const Re=w||Li();return Re&&Re.isConnected?Re:K}return k.current.current||K}return()=>{E.off("openchange",X);const Re=yn(Q),tt=De(T,Re)||A&&Rn(A.nodesRef.current,N(),!1).some(he=>{var me;return De((me=he.context)==null?void 0:me.elements.floating,Re)}),mt=re();queueMicrotask(()=>{const he=Ud(mt);k.current&&!y.current&&be(he)&&(!(he!==Re&&Re!==Q.body)||tt)&&he.focus({preventScroll:!0}),K.remove()})}},[r,T,H,k,$,E,A,V,w,N]),D.useEffect(()=>{queueMicrotask(()=>{y.current=!1})},[r]),Ie(()=>{if(!r&&v)return v.setFocusManagerState({modal:c,closeOnFocusOut:h,open:x,onOpenChange:b,domReference:w}),()=>{v.setFocusManagerState(null)}},[r,v,c,x,b,h,w]),Ie(()=>{r||H&&ji(H,S)},[r,H,S]);function ge(Q){return r||!d||!c?null:L.jsx(Vd,{ref:Q==="start"?R:F,onClick:ne=>b(!1,ne.nativeEvent),children:typeof d=="string"?d:"Dismiss"})}const Ee=!r&&p&&(c?!W:!0)&&(V||c);return L.jsxs(L.Fragment,{children:[Ee&&L.jsx(Qr,{"data-type":"inside",ref:U,onFocus:Q=>{if(c){const X=ee();bn(o[0]==="reference"?X[0]:X[X.length-1])}else if(v!=null&&v.preserveTabOrder&&v.portalNode)if(y.current=!1,er(Q,v.portalNode)){const X=yl(w);X==null||X.focus()}else{var ne;(ne=v.beforeOutsideRef.current)==null||ne.focus()}}}),!W&&ge("start"),n,ge("end"),Ee&&L.jsx(Qr,{"data-type":"inside",ref:ae,onFocus:Q=>{if(c)bn(ee()[0]);else if(v!=null&&v.preserveTabOrder&&v.portalNode)if(h&&(y.current=!0),er(Q,v.portalNode)){const X=wl(w);X==null||X.focus()}else{var ne;(ne=v.afterOutsideRef.current)==null||ne.focus()}}})]})}let Tr=0;const Bi="--floating-ui-scrollbar-width";function qd(){const e=ml(),t=/iP(hone|ad|od)|iOS/.test(e)||e==="MacIntel"&&navigator.maxTouchPoints>1,n=document.body.style,o=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",s=window.innerWidth-document.documentElement.clientWidth,i=n.left?parseFloat(n.left):window.scrollX,a=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(Bi,s+"px"),s&&(n[o]=s+"px"),t){var l,c;const d=((l=window.visualViewport)==null?void 0:l.offsetLeft)||0,h=((c=window.visualViewport)==null?void 0:c.offsetTop)||0;Object.assign(n,{position:"fixed",top:-(a-Math.floor(h))+"px",left:-(i-Math.floor(d))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[o]:""}),n.removeProperty(Bi),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(i,a))}}let Hi=()=>{};const zd=D.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t;return Ie(()=>{if(r)return Tr++,Tr===1&&(Hi=qd()),()=>{Tr--,Tr===0&&Hi()}},[r]),L.jsx("div",{ref:n,...o,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}})});function Wi(e){return be(e.target)&&e.target.tagName==="BUTTON"}function Gd(e){return be(e.target)&&e.target.tagName==="A"}function Ui(e){return vl(e)}function Il(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:d=!0,stickIfOpen:h=!0}=t,m=D.useRef(),f=D.useRef(!1),x=D.useMemo(()=>({onPointerDown(b){m.current=b.pointerType},onMouseDown(b){const E=m.current;b.button===0&&a!=="click"&&(Ei(E)&&c||(n&&l&&(!(o.current.openEvent&&h)||o.current.openEvent.type==="mousedown")?r(!1,b.nativeEvent,"click"):(b.preventDefault(),r(!0,b.nativeEvent,"click"))))},onClick(b){const E=m.current;if(a==="mousedown"&&m.current){m.current=void 0;return}Ei(E)&&c||(n&&l&&(!(o.current.openEvent&&h)||o.current.openEvent.type==="click")?r(!1,b.nativeEvent,"click"):r(!0,b.nativeEvent,"click"))},onKeyDown(b){m.current=void 0,!(b.defaultPrevented||!d||Wi(b))&&(b.key===" "&&!Ui(s)&&(b.preventDefault(),f.current=!0),!Gd(b)&&b.key==="Enter"&&r(!(n&&l),b.nativeEvent,"click"))},onKeyUp(b){b.defaultPrevented||!d||Wi(b)||Ui(s)||b.key===" "&&f.current&&(f.current=!1,r(!(n&&l),b.nativeEvent,"click"))}}),[o,s,a,c,d,r,n,h,l]);return D.useMemo(()=>i?{reference:x}:{},[i,x])}const _d={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Qd={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Vi=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function Nl(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:d=!1,referencePressEvent:h="pointerdown",ancestorScroll:m=!1,bubbles:f,capture:x}=t,b=Ls(),E=it(typeof l=="function"?l:()=>!1),$=typeof l=="function"?E:l,w=D.useRef(!1),{escapeKey:T,outsidePress:N}=Vi(f),{escapeKey:I,outsidePress:j}=Vi(x),W=D.useRef(!1),u=D.useRef(-1),p=it(v=>{var R;if(!n||!i||!a||v.key!=="Escape"||W.current)return;const F=(R=s.current.floatingContext)==null?void 0:R.nodeId,y=b?Rn(b.nodesRef.current,F):[];if(!T&&(v.stopPropagation(),y.length>0)){let M=!0;if(y.forEach(B=>{var V;if((V=B.context)!=null&&V.open&&!B.context.dataRef.current.__escapeKeyBubbles){M=!1;return}}),!M)return}r(!1,Nf(v)?v.nativeEvent:v,"escape-key")}),g=it(v=>{var R;const F=()=>{var y;p(v),(y=Tt(v))==null||y.removeEventListener("keydown",F)};(R=Tt(v))==null||R.addEventListener("keydown",F)}),S=it(v=>{var R;const F=s.current.insideReactTree;s.current.insideReactTree=!1;const y=w.current;if(w.current=!1,c==="click"&&y||F||typeof $=="function"&&!$(v))return;const M=Tt(v),B="["+rr("inert")+"]",V=Ke(o.floating).querySelectorAll(B);let H=de(M)?M:null;for(;H&&!wt(H);){const Y=Et(H);if(wt(Y)||!de(Y))break;H=Y}if(V.length&&de(M)&&!If(M)&&!De(M,o.floating)&&Array.from(V).every(Y=>!De(H,Y)))return;if(be(M)&&A){const Y=wt(M),U=ze(M),ae=/auto|scroll/,ge=Y||ae.test(U.overflowX),Ee=Y||ae.test(U.overflowY),Q=ge&&M.clientWidth>0&&M.scrollWidth>M.clientWidth,ne=Ee&&M.clientHeight>0&&M.scrollHeight>M.clientHeight,X=U.direction==="rtl",K=ne&&(X?v.offsetX<=M.offsetWidth-M.clientWidth:v.offsetX>M.clientWidth),re=Q&&v.offsetY>M.clientHeight;if(K||re)return}const _=(R=s.current.floatingContext)==null?void 0:R.nodeId,ee=b&&Rn(b.nodesRef.current,_).some(Y=>{var U;return Co(v,(U=Y.context)==null?void 0:U.elements.floating)});if(Co(v,o.floating)||Co(v,o.domReference)||ee)return;const Z=b?Rn(b.nodesRef.current,_):[];if(Z.length>0){let Y=!0;if(Z.forEach(U=>{var ae;if((ae=U.context)!=null&&ae.open&&!U.context.dataRef.current.__outsidePressBubbles){Y=!1;return}}),!Y)return}r(!1,v,"outside-press")}),C=it(v=>{var R;const F=()=>{var y;S(v),(y=Tt(v))==null||y.removeEventListener(c,F)};(R=Tt(v))==null||R.addEventListener(c,F)});D.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=T,s.current.__outsidePressBubbles=N;let v=-1;function R(V){r(!1,V,"ancestor-scroll")}function F(){window.clearTimeout(v),W.current=!0}function y(){v=window.setTimeout(()=>{W.current=!1},oo()?5:0)}const M=Ke(o.floating);a&&(M.addEventListener("keydown",I?g:p,I),M.addEventListener("compositionstart",F),M.addEventListener("compositionend",y)),$&&M.addEventListener(c,j?C:S,j);let B=[];return m&&(de(o.domReference)&&(B=Ht(o.domReference)),de(o.floating)&&(B=B.concat(Ht(o.floating))),!de(o.reference)&&o.reference&&o.reference.contextElement&&(B=B.concat(Ht(o.reference.contextElement)))),B=B.filter(V=>{var H;return V!==((H=M.defaultView)==null?void 0:H.visualViewport)}),B.forEach(V=>{V.addEventListener("scroll",R,{passive:!0})}),()=>{a&&(M.removeEventListener("keydown",I?g:p,I),M.removeEventListener("compositionstart",F),M.removeEventListener("compositionend",y)),$&&M.removeEventListener(c,j?C:S,j),B.forEach(V=>{V.removeEventListener("scroll",R)}),window.clearTimeout(v)}},[s,o,a,$,c,n,r,m,i,T,N,p,I,g,S,j,C]),D.useEffect(()=>{s.current.insideReactTree=!1},[s,$,c]);const k=D.useMemo(()=>({onKeyDown:p,...d&&{[_d[h]]:v=>{r(!1,v.nativeEvent,"reference-press")},...h!=="click"&&{onClick(v){r(!1,v.nativeEvent,"reference-press")}}}}),[p,r,d,h]),A=D.useMemo(()=>({onKeyDown:p,onMouseDown(){w.current=!0},onMouseUp(){w.current=!0},[Qd[c]]:()=>{s.current.insideReactTree=!0},onBlurCapture(){b||(Dd(u),s.current.insideReactTree=!0,u.current=window.setTimeout(()=>{s.current.insideReactTree=!1}))}}),[p,c,s,b]);return D.useMemo(()=>i?{reference:k,floating:A}:{},[i,k,A])}function Kd(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Wn(),s=D.useRef({}),[i]=D.useState(()=>Pd()),a=Tl()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!de(f)&&Fd("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=D.useState(r.reference),d=it((f,x,b)=>{s.current.openEvent=f?x:void 0,i.emit("openchange",{open:f,event:x,reason:b,nested:a}),n==null||n(f,x,b)}),h=D.useMemo(()=>({setPositionReference:c}),[]),m=D.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return D.useMemo(()=>({dataRef:s,open:t,onOpenChange:d,elements:m,events:i,floatingId:o,refs:h}),[t,d,m,i,o,h])}function Ll(e){e===void 0&&(e={});const{nodeId:t}=e,n=Kd({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=D.useState(null),[a,l]=D.useState(null),d=(o==null?void 0:o.domReference)||s,h=D.useRef(null),m=Ls();Ie(()=>{d&&(h.current=d)},[d]);const f=wd({...e,elements:{...o,...a&&{reference:a}}}),x=D.useCallback(T=>{const N=de(T)?{getBoundingClientRect:()=>T.getBoundingClientRect(),getClientRects:()=>T.getClientRects(),contextElement:T}:T;l(N),f.refs.setReference(N)},[f.refs]),b=D.useCallback(T=>{(de(T)||T===null)&&(h.current=T,i(T)),(de(f.refs.reference.current)||f.refs.reference.current===null||T!==null&&!de(T))&&f.refs.setReference(T)},[f.refs]),E=D.useMemo(()=>({...f.refs,setReference:b,setPositionReference:x,domReference:h}),[f.refs,b,x]),$=D.useMemo(()=>({...f.elements,domReference:d}),[f.elements,d]),w=D.useMemo(()=>({...f,...r,refs:E,elements:$,nodeId:t}),[f,E,$,t,r]);return Ie(()=>{r.dataRef.current.floatingContext=w;const T=m==null?void 0:m.nodesRef.current.find(N=>N.id===t);T&&(T.context=w)}),D.useMemo(()=>({...f,context:w,refs:E,elements:$}),[f,E,$,w])}function Fo(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[ki]:i,[Ti]:a,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1,[Sd]:""},...s,...t.map(i=>{const a=i?i[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[c,d]=l;if(!(o&&[ki,Ti].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof d=="function"){var h;(h=r.get(c))==null||h.push(d),i[c]=function(){for(var m,f=arguments.length,x=new Array(f),b=0;b<f;b++)x[b]=arguments[b];return(m=r.get(c))==null?void 0:m.map(E=>E(...x)).find(E=>E!==void 0)}}}else i[c]=d}),i),{})}}function jl(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=D.useCallback(a=>Fo(a,e,"reference"),t),s=D.useCallback(a=>Fo(a,e,"floating"),n),i=D.useCallback(a=>Fo(a,e,"item"),r);return D.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}const Yd=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Xd(e,t){var n,r;t===void 0&&(t={});const{open:o,elements:s,floatingId:i}=e,{enabled:a=!0,role:l="dialog"}=t,c=Wn(),d=((n=s.domReference)==null?void 0:n.id)||c,h=D.useMemo(()=>{var w;return((w=ns(s.floating))==null?void 0:w.id)||i},[s.floating,i]),m=(r=Yd.get(l))!=null?r:l,x=Tl()!=null,b=D.useMemo(()=>m==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:o?h:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":m==="alertdialog"?"dialog":m,"aria-controls":o?h:void 0,...m==="listbox"&&{role:"combobox"},...m==="menu"&&{id:d},...m==="menu"&&x&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[m,h,x,o,d,l]),E=D.useMemo(()=>{const w={id:h,...m&&{role:m}};return m==="tooltip"||l==="label"?w:{...w,...m==="menu"&&{"aria-labelledby":d}}},[m,h,d,l]),$=D.useCallback(w=>{let{active:T,selected:N}=w;const I={role:"option",...T&&{id:h+"-fui-option"}};switch(l){case"select":return{...I,"aria-selected":T&&N};case"combobox":return{...I,"aria-selected":N}}return{}},[h,l]);return D.useMemo(()=>a?{reference:b,floating:E,item:$}:{},[a,b,E,$])}function Bl({wallets:e,handleWalletClick:t}){return L.jsxs("ul",{className:"space-y-1.5",children:[e.map(n=>L.jsx("li",{children:L.jsxs("button",{onClick:()=>t(n),className:"flex w-full items-center gap-3 py-1.5 px-1.5 text-left text-gray-800 dark:text-[#E9E9FD] transition-colors hover:bg-[#E9E9FD] dark:hover:bg-[#192A39] rounded-xl",children:[L.jsx("div",{className:"flex-shrink-0 h-8 w-8 rounded-md overflow-hidden bg-gray-50 dark:bg-transparent flex items-center justify-center",children:L.jsx("img",{src:n.metadata.icon,alt:`${n.metadata.name} icon`,className:"h-8 w-8 object-contain rounded-md"})}),L.jsx("span",{className:"text-lg font-bold wallet-custom-font",children:n.metadata.name})]})},n.id)),e.length===0&&L.jsx("p",{className:"text-center text-gray-500 dark:text-gray-400",children:"No wallets found."})]})}function Hl({children:e}){const[t,n]=O.useState(!1),[r,o]=O.useState(null),{wallets:s,activeAddress:i}=xt.useWallet(),{refs:a,context:l}=Ll({open:t,onOpenChange:j=>{j&&i||(j?(n(!0),o("starting"),requestAnimationFrame(()=>{o("entered")})):(o("exiting"),setTimeout(()=>{n(!1),o(null)},150)))}}),c=Il(l),d=Nl(l,{outsidePressEvent:"mousedown"}),h=Xd(l,{role:"dialog"}),{getReferenceProps:m,getFloatingProps:f}=jl([c,d,h]),x=Wn(),b=Wn(),E=async j=>{try{await j.connect(),l.onOpenChange(!1)}catch(W){console.error(`Error connecting to ${j.metadata.name}:`,W),l.onOpenChange(!1)}},$=j=>{i||l.onOpenChange(!0)},w=e||L.jsx(Ms,{}),T=Cd([a.setReference,w.ref||null]),N={...m(),ref:T,onClick:$},I=O.cloneElement(w,N);return L.jsxs(L.Fragment,{children:[I,L.jsx($l,{id:"wallet-dialog-portal",children:t&&L.jsx("div",{"data-wallet-ui":!0,children:L.jsx(zd,{className:"grid place-items-center px-4 z-50 transition-opacity duration-150 ease-in-out bg-black/30 dark:bg-black/50 data-[state=starting]:opacity-0 data-[state=exiting]:opacity-0 data-[state=entered]:opacity-100","data-state":r,lockScroll:!0,children:L.jsx(Dl,{context:l,modal:!0,children:L.jsxs("div",{ref:a.setFloating,...f({"aria-labelledby":x,"aria-describedby":b}),"data-state":r,className:"w-full max-w-sm rounded-3xl bg-white dark:bg-[#001324] shadow-xl transform transition-all duration-150 ease-in-out data-[state=starting]:opacity-0 data-[state=starting]:scale-90 data-[state=exiting]:opacity-0 data-[state=exiting]:scale-90 data-[state=entered]:opacity-100 data-[state=entered]:scale-100",style:{marginTop:"-0.5rem"},children:[L.jsxs("div",{className:"relative flex items-center px-6 pt-5 pb-4",children:[L.jsx("h2",{id:x,className:"text-xl font-bold text-gray-900 dark:text-[#E9E9FD] wallet-custom-font",children:"Connect a Wallet"}),L.jsx("button",{onClick:()=>l.onOpenChange(!1),className:"absolute right-4 rounded-full bg-gray-100 dark:bg-[#192A39]/75 p-2 text-gray-500 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-[#192A39] hover:text-gray-700 dark:hover:text-[#D4D4FA]","aria-label":"Close dialog",children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:L.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),L.jsx("div",{className:"px-4 pb-3",children:L.jsx(Bl,{wallets:s,handleWalletClick:E})}),L.jsxs("div",{className:"px-6 py-5 border-t border-gray-200 dark:border-[#192A39] flex items-center justify-between",children:[L.jsx("span",{className:"text-gray-600 dark:text-[#99A1A7] text-sm",children:"Need an Algorand wallet?"}),L.jsx("a",{href:"https://algorand.co/wallets",className:"text-[#2D2DF1]/80 dark:text-[#6C6CF1] font-medium text-sm hover:text-[#2D2DF1] dark:hover:text-[#8080F3]",target:"_blank",rel:"noopener noreferrer",children:"Start here →"})]})]})})})})})]})}var Jd=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Po=Math.ceil,He=Math.floor,Fe="[BigNumber Error] ",qi=Fe+"Number primitive has more than 15 significant digits: ",Ge=1e14,te=14,zi=9007199254740991,$o=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],At=1e7,Me=1e9;function Wl(e){var t,n,r,o=w.prototype={constructor:w,toString:null,valueOf:null},s=new w(1),i=20,a=4,l=-7,c=21,d=-1e7,h=1e7,m=!1,f=1,x=0,b={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},E="0123456789abcdefghijklmnopqrstuvwxyz",$=!0;function w(u,p){var g,S,C,k,A,v,R,F,y=this;if(!(y instanceof w))return new w(u,p);if(p==null){if(u&&u._isBigNumber===!0){y.s=u.s,!u.c||u.e>h?y.c=y.e=null:u.e<d?y.c=[y.e=0]:(y.e=u.e,y.c=u.c.slice());return}if((v=typeof u=="number")&&u*0==0){if(y.s=1/u<0?(u=-u,-1):1,u===~~u){for(k=0,A=u;A>=10;A/=10,k++);k>h?y.c=y.e=null:(y.e=k,y.c=[u]);return}F=String(u)}else{if(!Jd.test(F=String(u)))return r(y,F,v);y.s=F.charCodeAt(0)==45?(F=F.slice(1),-1):1}(k=F.indexOf("."))>-1&&(F=F.replace(".","")),(A=F.search(/e/i))>0?(k<0&&(k=A),k+=+F.slice(A+1),F=F.substring(0,A)):k<0&&(k=F.length)}else{if(fe(p,2,E.length,"Base"),p==10&&$)return y=new w(u),j(y,i+y.e+1,a);if(F=String(u),v=typeof u=="number"){if(u*0!=0)return r(y,F,v,p);if(y.s=1/u<0?(F=F.slice(1),-1):1,w.DEBUG&&F.replace(/^0\.0*|\./,"").length>15)throw Error(qi+u)}else y.s=F.charCodeAt(0)===45?(F=F.slice(1),-1):1;for(g=E.slice(0,p),k=A=0,R=F.length;A<R;A++)if(g.indexOf(S=F.charAt(A))<0){if(S=="."){if(A>k){k=R;continue}}else if(!C&&(F==F.toUpperCase()&&(F=F.toLowerCase())||F==F.toLowerCase()&&(F=F.toUpperCase()))){C=!0,A=-1,k=0;continue}return r(y,String(u),v,p)}v=!1,F=n(F,p,10,y.s),(k=F.indexOf("."))>-1?F=F.replace(".",""):k=F.length}for(A=0;F.charCodeAt(A)===48;A++);for(R=F.length;F.charCodeAt(--R)===48;);if(F=F.slice(A,++R)){if(R-=A,v&&w.DEBUG&&R>15&&(u>zi||u!==He(u)))throw Error(qi+y.s*u);if((k=k-A-1)>h)y.c=y.e=null;else if(k<d)y.c=[y.e=0];else{if(y.e=k,y.c=[],A=(k+1)%te,k<0&&(A+=te),A<R){for(A&&y.c.push(+F.slice(0,A)),R-=te;A<R;)y.c.push(+F.slice(A,A+=te));A=te-(F=F.slice(A)).length}else A-=R;for(;A--;F+="0");y.c.push(+F)}}else y.c=[y.e=0]}w.clone=Wl,w.ROUND_UP=0,w.ROUND_DOWN=1,w.ROUND_CEIL=2,w.ROUND_FLOOR=3,w.ROUND_HALF_UP=4,w.ROUND_HALF_DOWN=5,w.ROUND_HALF_EVEN=6,w.ROUND_HALF_CEIL=7,w.ROUND_HALF_FLOOR=8,w.EUCLID=9,w.config=w.set=function(u){var p,g;if(u!=null)if(typeof u=="object"){if(u.hasOwnProperty(p="DECIMAL_PLACES")&&(g=u[p],fe(g,0,Me,p),i=g),u.hasOwnProperty(p="ROUNDING_MODE")&&(g=u[p],fe(g,0,8,p),a=g),u.hasOwnProperty(p="EXPONENTIAL_AT")&&(g=u[p],g&&g.pop?(fe(g[0],-1e9,0,p),fe(g[1],0,Me,p),l=g[0],c=g[1]):(fe(g,-1e9,Me,p),l=-(c=g<0?-g:g))),u.hasOwnProperty(p="RANGE"))if(g=u[p],g&&g.pop)fe(g[0],-1e9,-1,p),fe(g[1],1,Me,p),d=g[0],h=g[1];else if(fe(g,-1e9,Me,p),g)d=-(h=g<0?-g:g);else throw Error(Fe+p+" cannot be zero: "+g);if(u.hasOwnProperty(p="CRYPTO"))if(g=u[p],g===!!g)if(g)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))m=g;else throw m=!g,Error(Fe+"crypto unavailable");else m=g;else throw Error(Fe+p+" not true or false: "+g);if(u.hasOwnProperty(p="MODULO_MODE")&&(g=u[p],fe(g,0,9,p),f=g),u.hasOwnProperty(p="POW_PRECISION")&&(g=u[p],fe(g,0,Me,p),x=g),u.hasOwnProperty(p="FORMAT"))if(g=u[p],typeof g=="object")b=g;else throw Error(Fe+p+" not an object: "+g);if(u.hasOwnProperty(p="ALPHABET"))if(g=u[p],typeof g=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(g))$=g.slice(0,10)=="0123456789",E=g;else throw Error(Fe+p+" invalid: "+g)}else throw Error(Fe+"Object expected: "+u);return{DECIMAL_PLACES:i,ROUNDING_MODE:a,EXPONENTIAL_AT:[l,c],RANGE:[d,h],CRYPTO:m,MODULO_MODE:f,POW_PRECISION:x,FORMAT:b,ALPHABET:E}},w.isBigNumber=function(u){if(!u||u._isBigNumber!==!0)return!1;if(!w.DEBUG)return!0;var p,g,S=u.c,C=u.e,k=u.s;e:if({}.toString.call(S)=="[object Array]"){if((k===1||k===-1)&&C>=-1e9&&C<=Me&&C===He(C)){if(S[0]===0){if(C===0&&S.length===1)return!0;break e}if(p=(C+1)%te,p<1&&(p+=te),String(S[0]).length==p){for(p=0;p<S.length;p++)if(g=S[p],g<0||g>=Ge||g!==He(g))break e;if(g!==0)return!0}}}else if(S===null&&C===null&&(k===null||k===1||k===-1))return!0;throw Error(Fe+"Invalid BigNumber: "+u)},w.maximum=w.max=function(){return N(arguments,-1)},w.minimum=w.min=function(){return N(arguments,1)},w.random=function(){var u=9007199254740992,p=Math.random()*u&2097151?function(){return He(Math.random()*u)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(g){var S,C,k,A,v,R=0,F=[],y=new w(s);if(g==null?g=i:fe(g,0,Me),A=Po(g/te),m)if(crypto.getRandomValues){for(S=crypto.getRandomValues(new Uint32Array(A*=2));R<A;)v=S[R]*131072+(S[R+1]>>>11),v>=9e15?(C=crypto.getRandomValues(new Uint32Array(2)),S[R]=C[0],S[R+1]=C[1]):(F.push(v%1e14),R+=2);R=A/2}else if(crypto.randomBytes){for(S=crypto.randomBytes(A*=7);R<A;)v=(S[R]&31)*281474976710656+S[R+1]*1099511627776+S[R+2]*4294967296+S[R+3]*16777216+(S[R+4]<<16)+(S[R+5]<<8)+S[R+6],v>=9e15?crypto.randomBytes(7).copy(S,R):(F.push(v%1e14),R+=7);R=A/7}else throw m=!1,Error(Fe+"crypto unavailable");if(!m)for(;R<A;)v=p(),v<9e15&&(F[R++]=v%1e14);for(A=F[--R],g%=te,A&&g&&(v=$o[te-g],F[R]=He(A/v)*v);F[R]===0;F.pop(),R--);if(R<0)F=[k=0];else{for(k=-1;F[0]===0;F.splice(0,1),k-=te);for(R=1,v=F[0];v>=10;v/=10,R++);R<te&&(k-=te-R)}return y.e=k,y.c=F,y}}(),w.sum=function(){for(var u=1,p=arguments,g=new w(p[0]);u<p.length;)g=g.plus(p[u++]);return g},n=function(){var u="0123456789";function p(g,S,C,k){for(var A,v=[0],R,F=0,y=g.length;F<y;){for(R=v.length;R--;v[R]*=S);for(v[0]+=k.indexOf(g.charAt(F++)),A=0;A<v.length;A++)v[A]>C-1&&(v[A+1]==null&&(v[A+1]=0),v[A+1]+=v[A]/C|0,v[A]%=C)}return v.reverse()}return function(g,S,C,k,A){var v,R,F,y,M,B,V,H,_=g.indexOf("."),ee=i,Z=a;for(_>=0&&(y=x,x=0,g=g.replace(".",""),H=new w(S),B=H.pow(g.length-_),x=y,H.c=p(vt(je(B.c),B.e,"0"),10,C,u),H.e=H.c.length),V=p(g,S,C,A?(v=E,u):(v=u,E)),F=y=V.length;V[--y]==0;V.pop());if(!V[0])return v.charAt(0);if(_<0?--F:(B.c=V,B.e=F,B.s=k,B=t(B,H,ee,Z,C),V=B.c,M=B.r,F=B.e),R=F+ee+1,_=V[R],y=C/2,M=M||R<0||V[R+1]!=null,M=Z<4?(_!=null||M)&&(Z==0||Z==(B.s<0?3:2)):_>y||_==y&&(Z==4||M||Z==6&&V[R-1]&1||Z==(B.s<0?8:7)),R<1||!V[0])g=M?vt(v.charAt(1),-ee,v.charAt(0)):v.charAt(0);else{if(V.length=R,M)for(--C;++V[--R]>C;)V[R]=0,R||(++F,V=[1].concat(V));for(y=V.length;!V[--y];);for(_=0,g="";_<=y;g+=v.charAt(V[_++]));g=vt(g,F,v.charAt(0))}return g}}(),t=function(){function u(S,C,k){var A,v,R,F,y=0,M=S.length,B=C%At,V=C/At|0;for(S=S.slice();M--;)R=S[M]%At,F=S[M]/At|0,A=V*R+F*B,v=B*R+A%At*At+y,y=(v/k|0)+(A/At|0)+V*F,S[M]=v%k;return y&&(S=[y].concat(S)),S}function p(S,C,k,A){var v,R;if(k!=A)R=k>A?1:-1;else for(v=R=0;v<k;v++)if(S[v]!=C[v]){R=S[v]>C[v]?1:-1;break}return R}function g(S,C,k,A){for(var v=0;k--;)S[k]-=v,v=S[k]<C[k]?1:0,S[k]=v*A+S[k]-C[k];for(;!S[0]&&S.length>1;S.splice(0,1));}return function(S,C,k,A,v){var R,F,y,M,B,V,H,_,ee,Z,Y,U,ae,ge,Ee,Q,ne,X=S.s==C.s?1:-1,K=S.c,re=C.c;if(!K||!K[0]||!re||!re[0])return new w(!S.s||!C.s||(K?re&&K[0]==re[0]:!re)?NaN:K&&K[0]==0||!re?X*0:X/0);for(_=new w(X),ee=_.c=[],F=S.e-C.e,X=k+F+1,v||(v=Ge,F=We(S.e/te)-We(C.e/te),X=X/te|0),y=0;re[y]==(K[y]||0);y++);if(re[y]>(K[y]||0)&&F--,X<0)ee.push(1),M=!0;else{for(ge=K.length,Q=re.length,y=0,X+=2,B=He(v/(re[0]+1)),B>1&&(re=u(re,B,v),K=u(K,B,v),Q=re.length,ge=K.length),ae=Q,Z=K.slice(0,Q),Y=Z.length;Y<Q;Z[Y++]=0);ne=re.slice(),ne=[0].concat(ne),Ee=re[0],re[1]>=v/2&&Ee++;do{if(B=0,R=p(re,Z,Q,Y),R<0){if(U=Z[0],Q!=Y&&(U=U*v+(Z[1]||0)),B=He(U/Ee),B>1)for(B>=v&&(B=v-1),V=u(re,B,v),H=V.length,Y=Z.length;p(V,Z,H,Y)==1;)B--,g(V,Q<H?ne:re,H,v),H=V.length,R=1;else B==0&&(R=B=1),V=re.slice(),H=V.length;if(H<Y&&(V=[0].concat(V)),g(Z,V,Y,v),Y=Z.length,R==-1)for(;p(re,Z,Q,Y)<1;)B++,g(Z,Q<Y?ne:re,Y,v),Y=Z.length}else R===0&&(B++,Z=[0]);ee[y++]=B,Z[0]?Z[Y++]=K[ae]||0:(Z=[K[ae]],Y=1)}while((ae++<ge||Z[0]!=null)&&X--);M=Z[0]!=null,ee[0]||ee.splice(0,1)}if(v==Ge){for(y=1,X=ee[0];X>=10;X/=10,y++);j(_,k+(_.e=y+F*te-1)+1,A,M)}else _.e=F,_.r=+M;return _}}();function T(u,p,g,S){var C,k,A,v,R;if(g==null?g=a:fe(g,0,8),!u.c)return u.toString();if(C=u.c[0],A=u.e,p==null)R=je(u.c),R=S==1||S==2&&(A<=l||A>=c)?Pr(R,A):vt(R,A,"0");else if(u=j(new w(u),p,g),k=u.e,R=je(u.c),v=R.length,S==1||S==2&&(p<=k||k<=l)){for(;v<p;R+="0",v++);R=Pr(R,k)}else if(p-=A,R=vt(R,k,"0"),k+1>v){if(--p>0)for(R+=".";p--;R+="0");}else if(p+=k-v,p>0)for(k+1==v&&(R+=".");p--;R+="0");return u.s<0&&C?"-"+R:R}function N(u,p){for(var g,S,C=1,k=new w(u[0]);C<u.length;C++)S=new w(u[C]),(!S.s||(g=_t(k,S))===p||g===0&&k.s===p)&&(k=S);return k}function I(u,p,g){for(var S=1,C=p.length;!p[--C];p.pop());for(C=p[0];C>=10;C/=10,S++);return(g=S+g*te-1)>h?u.c=u.e=null:g<d?u.c=[u.e=0]:(u.e=g,u.c=p),u}r=function(){var u=/^(-?)0([xbo])(?=\w[\w.]*$)/i,p=/^([^.]+)\.$/,g=/^\.([^.]+)$/,S=/^-?(Infinity|NaN)$/,C=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(k,A,v,R){var F,y=v?A:A.replace(C,"");if(S.test(y))k.s=isNaN(y)?null:y<0?-1:1;else{if(!v&&(y=y.replace(u,function(M,B,V){return F=(V=V.toLowerCase())=="x"?16:V=="b"?2:8,!R||R==F?B:M}),R&&(F=R,y=y.replace(p,"$1").replace(g,"0.$1")),A!=y))return new w(y,F);if(w.DEBUG)throw Error(Fe+"Not a"+(R?" base "+R:"")+" number: "+A);k.s=null}k.c=k.e=null}}();function j(u,p,g,S){var C,k,A,v,R,F,y,M=u.c,B=$o;if(M){e:{for(C=1,v=M[0];v>=10;v/=10,C++);if(k=p-C,k<0)k+=te,A=p,R=M[F=0],y=He(R/B[C-A-1]%10);else if(F=Po((k+1)/te),F>=M.length)if(S){for(;M.length<=F;M.push(0));R=y=0,C=1,k%=te,A=k-te+1}else break e;else{for(R=v=M[F],C=1;v>=10;v/=10,C++);k%=te,A=k-te+C,y=A<0?0:He(R/B[C-A-1]%10)}if(S=S||p<0||M[F+1]!=null||(A<0?R:R%B[C-A-1]),S=g<4?(y||S)&&(g==0||g==(u.s<0?3:2)):y>5||y==5&&(g==4||S||g==6&&(k>0?A>0?R/B[C-A]:0:M[F-1])%10&1||g==(u.s<0?8:7)),p<1||!M[0])return M.length=0,S?(p-=u.e+1,M[0]=B[(te-p%te)%te],u.e=-p||0):M[0]=u.e=0,u;if(k==0?(M.length=F,v=1,F--):(M.length=F+1,v=B[te-k],M[F]=A>0?He(R/B[C-A]%B[A])*v:0),S)for(;;)if(F==0){for(k=1,A=M[0];A>=10;A/=10,k++);for(A=M[0]+=v,v=1;A>=10;A/=10,v++);k!=v&&(u.e++,M[0]==Ge&&(M[0]=1));break}else{if(M[F]+=v,M[F]!=Ge)break;M[F--]=0,v=1}for(k=M.length;M[--k]===0;M.pop());}u.e>h?u.c=u.e=null:u.e<d&&(u.c=[u.e=0])}return u}function W(u){var p,g=u.e;return g===null?u.toString():(p=je(u.c),p=g<=l||g>=c?Pr(p,g):vt(p,g,"0"),u.s<0?"-"+p:p)}return o.absoluteValue=o.abs=function(){var u=new w(this);return u.s<0&&(u.s=1),u},o.comparedTo=function(u,p){return _t(this,new w(u,p))},o.decimalPlaces=o.dp=function(u,p){var g,S,C,k=this;if(u!=null)return fe(u,0,Me),p==null?p=a:fe(p,0,8),j(new w(k),u+k.e+1,p);if(!(g=k.c))return null;if(S=((C=g.length-1)-We(this.e/te))*te,C=g[C])for(;C%10==0;C/=10,S--);return S<0&&(S=0),S},o.dividedBy=o.div=function(u,p){return t(this,new w(u,p),i,a)},o.dividedToIntegerBy=o.idiv=function(u,p){return t(this,new w(u,p),0,1)},o.exponentiatedBy=o.pow=function(u,p){var g,S,C,k,A,v,R,F,y,M=this;if(u=new w(u),u.c&&!u.isInteger())throw Error(Fe+"Exponent not an integer: "+W(u));if(p!=null&&(p=new w(p)),v=u.e>14,!M.c||!M.c[0]||M.c[0]==1&&!M.e&&M.c.length==1||!u.c||!u.c[0])return y=new w(Math.pow(+W(M),v?u.s*(2-Fr(u)):+W(u))),p?y.mod(p):y;if(R=u.s<0,p){if(p.c?!p.c[0]:!p.s)return new w(NaN);S=!R&&M.isInteger()&&p.isInteger(),S&&(M=M.mod(p))}else{if(u.e>9&&(M.e>0||M.e<-1||(M.e==0?M.c[0]>1||v&&M.c[1]>=24e7:M.c[0]<8e13||v&&M.c[0]<=9999975e7)))return k=M.s<0&&Fr(u)?-0:0,M.e>-1&&(k=1/k),new w(R?1/k:k);x&&(k=Po(x/te+2))}for(v?(g=new w(.5),R&&(u.s=1),F=Fr(u)):(C=Math.abs(+W(u)),F=C%2),y=new w(s);;){if(F){if(y=y.times(M),!y.c)break;k?y.c.length>k&&(y.c.length=k):S&&(y=y.mod(p))}if(C){if(C=He(C/2),C===0)break;F=C%2}else if(u=u.times(g),j(u,u.e+1,1),u.e>14)F=Fr(u);else{if(C=+W(u),C===0)break;F=C%2}M=M.times(M),k?M.c&&M.c.length>k&&(M.c.length=k):S&&(M=M.mod(p))}return S?y:(R&&(y=s.div(y)),p?y.mod(p):k?j(y,x,a,A):y)},o.integerValue=function(u){var p=new w(this);return u==null?u=a:fe(u,0,8),j(p,p.e+1,u)},o.isEqualTo=o.eq=function(u,p){return _t(this,new w(u,p))===0},o.isFinite=function(){return!!this.c},o.isGreaterThan=o.gt=function(u,p){return _t(this,new w(u,p))>0},o.isGreaterThanOrEqualTo=o.gte=function(u,p){return(p=_t(this,new w(u,p)))===1||p===0},o.isInteger=function(){return!!this.c&&We(this.e/te)>this.c.length-2},o.isLessThan=o.lt=function(u,p){return _t(this,new w(u,p))<0},o.isLessThanOrEqualTo=o.lte=function(u,p){return(p=_t(this,new w(u,p)))===-1||p===0},o.isNaN=function(){return!this.s},o.isNegative=function(){return this.s<0},o.isPositive=function(){return this.s>0},o.isZero=function(){return!!this.c&&this.c[0]==0},o.minus=function(u,p){var g,S,C,k,A=this,v=A.s;if(u=new w(u,p),p=u.s,!v||!p)return new w(NaN);if(v!=p)return u.s=-p,A.plus(u);var R=A.e/te,F=u.e/te,y=A.c,M=u.c;if(!R||!F){if(!y||!M)return y?(u.s=-p,u):new w(M?A:NaN);if(!y[0]||!M[0])return M[0]?(u.s=-p,u):new w(y[0]?A:a==3?-0:0)}if(R=We(R),F=We(F),y=y.slice(),v=R-F){for((k=v<0)?(v=-v,C=y):(F=R,C=M),C.reverse(),p=v;p--;C.push(0));C.reverse()}else for(S=(k=(v=y.length)<(p=M.length))?v:p,v=p=0;p<S;p++)if(y[p]!=M[p]){k=y[p]<M[p];break}if(k&&(C=y,y=M,M=C,u.s=-u.s),p=(S=M.length)-(g=y.length),p>0)for(;p--;y[g++]=0);for(p=Ge-1;S>v;){if(y[--S]<M[S]){for(g=S;g&&!y[--g];y[g]=p);--y[g],y[S]+=Ge}y[S]-=M[S]}for(;y[0]==0;y.splice(0,1),--F);return y[0]?I(u,y,F):(u.s=a==3?-1:1,u.c=[u.e=0],u)},o.modulo=o.mod=function(u,p){var g,S,C=this;return u=new w(u,p),!C.c||!u.s||u.c&&!u.c[0]?new w(NaN):!u.c||C.c&&!C.c[0]?new w(C):(f==9?(S=u.s,u.s=1,g=t(C,u,0,3),u.s=S,g.s*=S):g=t(C,u,0,f),u=C.minus(g.times(u)),!u.c[0]&&f==1&&(u.s=C.s),u)},o.multipliedBy=o.times=function(u,p){var g,S,C,k,A,v,R,F,y,M,B,V,H,_,ee,Z=this,Y=Z.c,U=(u=new w(u,p)).c;if(!Y||!U||!Y[0]||!U[0])return!Z.s||!u.s||Y&&!Y[0]&&!U||U&&!U[0]&&!Y?u.c=u.e=u.s=null:(u.s*=Z.s,!Y||!U?u.c=u.e=null:(u.c=[0],u.e=0)),u;for(S=We(Z.e/te)+We(u.e/te),u.s*=Z.s,R=Y.length,M=U.length,R<M&&(H=Y,Y=U,U=H,C=R,R=M,M=C),C=R+M,H=[];C--;H.push(0));for(_=Ge,ee=At,C=M;--C>=0;){for(g=0,B=U[C]%ee,V=U[C]/ee|0,A=R,k=C+A;k>C;)F=Y[--A]%ee,y=Y[A]/ee|0,v=V*F+y*B,F=B*F+v%ee*ee+H[k]+g,g=(F/_|0)+(v/ee|0)+V*y,H[k--]=F%_;H[k]=g}return g?++S:H.splice(0,1),I(u,H,S)},o.negated=function(){var u=new w(this);return u.s=-u.s||null,u},o.plus=function(u,p){var g,S=this,C=S.s;if(u=new w(u,p),p=u.s,!C||!p)return new w(NaN);if(C!=p)return u.s=-p,S.minus(u);var k=S.e/te,A=u.e/te,v=S.c,R=u.c;if(!k||!A){if(!v||!R)return new w(C/0);if(!v[0]||!R[0])return R[0]?u:new w(v[0]?S:C*0)}if(k=We(k),A=We(A),v=v.slice(),C=k-A){for(C>0?(A=k,g=R):(C=-C,g=v),g.reverse();C--;g.push(0));g.reverse()}for(C=v.length,p=R.length,C-p<0&&(g=R,R=v,v=g,p=C),C=0;p;)C=(v[--p]=v[p]+R[p]+C)/Ge|0,v[p]=Ge===v[p]?0:v[p]%Ge;return C&&(v=[C].concat(v),++A),I(u,v,A)},o.precision=o.sd=function(u,p){var g,S,C,k=this;if(u!=null&&u!==!!u)return fe(u,1,Me),p==null?p=a:fe(p,0,8),j(new w(k),u,p);if(!(g=k.c))return null;if(C=g.length-1,S=C*te+1,C=g[C]){for(;C%10==0;C/=10,S--);for(C=g[0];C>=10;C/=10,S++);}return u&&k.e+1>S&&(S=k.e+1),S},o.shiftedBy=function(u){return fe(u,-9007199254740991,zi),this.times("1e"+u)},o.squareRoot=o.sqrt=function(){var u,p,g,S,C,k=this,A=k.c,v=k.s,R=k.e,F=i+4,y=new w("0.5");if(v!==1||!A||!A[0])return new w(!v||v<0&&(!A||A[0])?NaN:A?k:1/0);if(v=Math.sqrt(+W(k)),v==0||v==1/0?(p=je(A),(p.length+R)%2==0&&(p+="0"),v=Math.sqrt(+p),R=We((R+1)/2)-(R<0||R%2),v==1/0?p="5e"+R:(p=v.toExponential(),p=p.slice(0,p.indexOf("e")+1)+R),g=new w(p)):g=new w(v+""),g.c[0]){for(R=g.e,v=R+F,v<3&&(v=0);;)if(C=g,g=y.times(C.plus(t(k,C,F,1))),je(C.c).slice(0,v)===(p=je(g.c)).slice(0,v))if(g.e<R&&--v,p=p.slice(v-3,v+1),p=="9999"||!S&&p=="4999"){if(!S&&(j(C,C.e+i+2,0),C.times(C).eq(k))){g=C;break}F+=4,v+=4,S=1}else{(!+p||!+p.slice(1)&&p.charAt(0)=="5")&&(j(g,g.e+i+2,1),u=!g.times(g).eq(k));break}}return j(g,g.e+i+1,a,u)},o.toExponential=function(u,p){return u!=null&&(fe(u,0,Me),u++),T(this,u,p,1)},o.toFixed=function(u,p){return u!=null&&(fe(u,0,Me),u=u+this.e+1),T(this,u,p)},o.toFormat=function(u,p,g){var S,C=this;if(g==null)u!=null&&p&&typeof p=="object"?(g=p,p=null):u&&typeof u=="object"?(g=u,u=p=null):g=b;else if(typeof g!="object")throw Error(Fe+"Argument not an object: "+g);if(S=C.toFixed(u,p),C.c){var k,A=S.split("."),v=+g.groupSize,R=+g.secondaryGroupSize,F=g.groupSeparator||"",y=A[0],M=A[1],B=C.s<0,V=B?y.slice(1):y,H=V.length;if(R&&(k=v,v=R,R=k,H-=k),v>0&&H>0){for(k=H%v||v,y=V.substr(0,k);k<H;k+=v)y+=F+V.substr(k,v);R>0&&(y+=F+V.slice(k)),B&&(y="-"+y)}S=M?y+(g.decimalSeparator||"")+((R=+g.fractionGroupSize)?M.replace(new RegExp("\\d{"+R+"}\\B","g"),"$&"+(g.fractionGroupSeparator||"")):M):y}return(g.prefix||"")+S+(g.suffix||"")},o.toFraction=function(u){var p,g,S,C,k,A,v,R,F,y,M,B,V=this,H=V.c;if(u!=null&&(v=new w(u),!v.isInteger()&&(v.c||v.s!==1)||v.lt(s)))throw Error(Fe+"Argument "+(v.isInteger()?"out of range: ":"not an integer: ")+W(v));if(!H)return new w(V);for(p=new w(s),F=g=new w(s),S=R=new w(s),B=je(H),k=p.e=B.length-V.e-1,p.c[0]=$o[(A=k%te)<0?te+A:A],u=!u||v.comparedTo(p)>0?k>0?p:F:v,A=h,h=1/0,v=new w(B),R.c[0]=0;y=t(v,p,0,1),C=g.plus(y.times(S)),C.comparedTo(u)!=1;)g=S,S=C,F=R.plus(y.times(C=F)),R=C,p=v.minus(y.times(C=p)),v=C;return C=t(u.minus(g),S,0,1),R=R.plus(C.times(F)),g=g.plus(C.times(S)),R.s=F.s=V.s,k=k*2,M=t(F,S,k,a).minus(V).abs().comparedTo(t(R,g,k,a).minus(V).abs())<1?[F,S]:[R,g],h=A,M},o.toNumber=function(){return+W(this)},o.toPrecision=function(u,p){return u!=null&&fe(u,1,Me),T(this,u,p,2)},o.toString=function(u){var p,g=this,S=g.s,C=g.e;return C===null?S?(p="Infinity",S<0&&(p="-"+p)):p="NaN":(u==null?p=C<=l||C>=c?Pr(je(g.c),C):vt(je(g.c),C,"0"):u===10&&$?(g=j(new w(g),i+C+1,a),p=vt(je(g.c),g.e,"0")):(fe(u,2,E.length,"Base"),p=n(vt(je(g.c),C,"0"),10,u,S,!0)),S<0&&g.c[0]&&(p="-"+p)),p},o.valueOf=o.toJSON=function(){return W(this)},o._isBigNumber=!0,o[Symbol.toStringTag]="BigNumber",o[Symbol.for("nodejs.util.inspect.custom")]=o.valueOf,e!=null&&w.set(e),w}function We(e){var t=e|0;return e>0||e===t?t:t-1}function je(e){for(var t,n,r=1,o=e.length,s=e[0]+"";r<o;){for(t=e[r++]+"",n=te-t.length;n--;t="0"+t);s+=t}for(o=s.length;s.charCodeAt(--o)===48;);return s.slice(0,o+1||1)}function _t(e,t){var n,r,o=e.c,s=t.c,i=e.s,a=t.s,l=e.e,c=t.e;if(!i||!a)return null;if(n=o&&!o[0],r=s&&!s[0],n||r)return n?r?0:-a:i;if(i!=a)return i;if(n=i<0,r=l==c,!o||!s)return r?0:!o^n?1:-1;if(!r)return l>c^n?1:-1;for(a=(l=o.length)<(c=s.length)?l:c,i=0;i<a;i++)if(o[i]!=s[i])return o[i]>s[i]^n?1:-1;return l==c?0:l>c^n?1:-1}function fe(e,t,n,r){if(e<t||e>n||e!==He(e))throw Error(Fe+(r||"Argument")+(typeof e=="number"?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function Fr(e){var t=e.c.length-1;return We(e.e/te)==t&&e.c[t]%2!=0}function Pr(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function vt(e,t,n){var r,o;if(t<0){for(o=n+".";++t;o+=n);e=o+e}else if(r=e.length,++t>r){for(o=n,t-=r;--t;o+=n);e+=o}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}Wl();const Zd=100000n,eh=(e,t={})=>{const{style:n="decimal",compact:r=!1,fractionDigits:o,adaptiveDecimals:s=!1}=t,i=typeof e=="string"?Number(e):e,a=typeof i=="bigint"?i<0n?-i:i:Math.abs(i),l=r==="auto"?a>=Zd:r,c=typeof i=="bigint"?Number(i):i,d=s&&c!==0&&Math.abs(c)<Math.pow(10,-(o??2)),h=new Intl.NumberFormat("en-US",{style:n,...n==="currency"&&{currency:"USD"},maximumFractionDigits:d?20:o??2,minimumFractionDigits:d?0:o??2});if(!l)return d?h.format(Gi(c)):h.format(i);const m=[{threshold:1e12,suffix:"T",divisor:1e12},{threshold:1e9,suffix:"B",divisor:1e9},{threshold:1e6,suffix:"M",divisor:1e6},{threshold:1e3,suffix:"K",divisor:1e3}].find(f=>a>=f.threshold);if(m){const f=new Intl.NumberFormat("en-US",{style:n,...n==="currency"&&{currency:"USD"},maximumFractionDigits:o??1,minimumFractionDigits:o??1}),x=Number(i)/m.divisor;return f.format(x)+m.suffix}return d?h.format(Gi(c)):h.format(i)};function Gi(e){if(e===0)return 0;const t=e.toExponential().split("e"),n=parseInt(t[1]),r=Math.abs(n);return Number(e.toFixed(r))}function Yn(e,t=5,n=5){return e?e.length<=t+n?e:`${e.slice(0,t)}...${e.slice(-n)}`:""}var gr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},dn=typeof window>"u"||"Deno"in globalThis;function $e(){}function th(e,t){return typeof e=="function"?e(t):e}function os(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ul(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Wt(e,t){return typeof e=="function"?e(t):e}function Ye(e,t){return typeof e=="function"?e(t):e}function _i(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:i,stale:a}=e;if(i){if(r){if(t.queryHash!==js(i,t.options))return!1}else if(!sr(t.queryKey,i))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||o&&o!==t.state.fetchStatus||s&&!s(t))}function Qi(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(or(t.options.mutationKey)!==or(s))return!1}else if(!sr(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function js(e,t){return((t==null?void 0:t.queryKeyHashFn)||or)(e)}function or(e){return JSON.stringify(e,(t,n)=>as(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function sr(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>sr(e[n],t[n])):!1}function ss(e,t){if(e===t)return e;const n=Ki(e)&&Ki(t);if(n||as(e)&&as(t)){const r=n?e:Object.keys(e),o=r.length,s=n?t:Object.keys(t),i=s.length,a=n?[]:{},l=new Set(r);let c=0;for(let d=0;d<i;d++){const h=n?d:s[d];(!n&&l.has(h)||n)&&e[h]===void 0&&t[h]===void 0?(a[h]=void 0,c++):(a[h]=ss(e[h],t[h]),a[h]===e[h]&&e[h]!==void 0&&c++)}return o===i&&c===o?e:a}return t}function is(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Ki(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function as(e){if(!Yi(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Yi(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Yi(e){return Object.prototype.toString.call(e)==="[object Object]"}function nh(e){return new Promise(t=>{setTimeout(t,e)})}function ls(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return ss(e,t)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return ss(e,t)}return t}function rh(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function oh(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Kr=Symbol();function Vl(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Kr&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Kr?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function sh(e,t){return typeof e=="function"?e(...t):!!e}var Jt,Ft,An,Na,ih=(Na=class extends gr{constructor(){super();J(this,Jt);J(this,Ft);J(this,An);q(this,An,t=>{if(!dn&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){P(this,Ft)||this.setEventListener(P(this,An))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,Ft))==null||t.call(this),q(this,Ft,void 0))}setEventListener(t){var n;q(this,An,t),(n=P(this,Ft))==null||n.call(this),q(this,Ft,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){P(this,Jt)!==t&&(q(this,Jt,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof P(this,Jt)=="boolean"?P(this,Jt):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Jt=new WeakMap,Ft=new WeakMap,An=new WeakMap,Na),Bs=new ih,kn,Pt,Tn,La,ah=(La=class extends gr{constructor(){super();J(this,kn,!0);J(this,Pt);J(this,Tn);q(this,Tn,t=>{if(!dn&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){P(this,Pt)||this.setEventListener(P(this,Tn))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,Pt))==null||t.call(this),q(this,Pt,void 0))}setEventListener(t){var n;q(this,Tn,t),(n=P(this,Pt))==null||n.call(this),q(this,Pt,t(this.setOnline.bind(this)))}setOnline(t){P(this,kn)!==t&&(q(this,kn,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return P(this,kn)}},kn=new WeakMap,Pt=new WeakMap,Tn=new WeakMap,La),Yr=new ah;function cs(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function lh(e){return Math.min(1e3*2**e,3e4)}function ql(e){return(e??"online")==="online"?Yr.isOnline():!0}var zl=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Mo(e){return e instanceof zl}function Gl(e){let t=!1,n=0,r=!1,o;const s=cs(),i=b=>{var E;r||(m(new zl(b)),(E=e.abort)==null||E.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>Bs.isFocused()&&(e.networkMode==="always"||Yr.isOnline())&&e.canRun(),d=()=>ql(e.networkMode)&&e.canRun(),h=b=>{var E;r||(r=!0,(E=e.onSuccess)==null||E.call(e,b),o==null||o(),s.resolve(b))},m=b=>{var E;r||(r=!0,(E=e.onError)==null||E.call(e,b),o==null||o(),s.reject(b))},f=()=>new Promise(b=>{var E;o=$=>{(r||c())&&b($)},(E=e.onPause)==null||E.call(e)}).then(()=>{var b;o=void 0,r||(b=e.onContinue)==null||b.call(e)}),x=()=>{if(r)return;let b;const E=n===0?e.initialPromise:void 0;try{b=E??e.fn()}catch($){b=Promise.reject($)}Promise.resolve(b).then(h).catch($=>{var j;if(r)return;const w=e.retry??(dn?0:3),T=e.retryDelay??lh,N=typeof T=="function"?T(n,$):T,I=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,$);if(t||!I){m($);return}n++,(j=e.onFail)==null||j.call(e,n,$),nh(N).then(()=>c()?void 0:f()).then(()=>{t?m($):x()})})};return{promise:s,cancel:i,continue:()=>(o==null||o(),s),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?x():f().then(x),s)}}var ch=e=>setTimeout(e,0);function uh(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=ch;const s=a=>{t?e.push(a):o(()=>{n(a)})},i=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||i()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}var Ce=uh(),Zt,ja,_l=(ja=class{constructor(){J(this,Zt)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),os(this.gcTime)&&q(this,Zt,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(dn?1/0:5*60*1e3))}clearGcTimeout(){P(this,Zt)&&(clearTimeout(P(this,Zt)),q(this,Zt,void 0))}},Zt=new WeakMap,ja),Fn,en,Ue,tn,Se,ur,nn,_e,bt,Ba,fh=(Ba=class extends _l{constructor(t){super();J(this,_e);J(this,Fn);J(this,en);J(this,Ue);J(this,tn);J(this,Se);J(this,ur);J(this,nn);q(this,nn,!1),q(this,ur,t.defaultOptions),this.setOptions(t.options),this.observers=[],q(this,tn,t.client),q(this,Ue,P(this,tn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,q(this,Fn,dh(this.options)),this.state=t.state??P(this,Fn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=P(this,Se))==null?void 0:t.promise}setOptions(t){this.options={...P(this,ur),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&P(this,Ue).remove(this)}setData(t,n){const r=ls(this.state.data,t,this.options);return se(this,_e,bt).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){se(this,_e,bt).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=P(this,Se))==null?void 0:r.promise;return(o=P(this,Se))==null||o.cancel(t),n?n.then($e).catch($e):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(P(this,Fn))}isActive(){return this.observers.some(t=>Ye(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Kr||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Wt(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Ul(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=P(this,Se))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=P(this,Se))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),P(this,Ue).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(P(this,Se)&&(P(this,nn)?P(this,Se).cancel({revert:!0}):P(this,Se).cancelRetry()),this.scheduleGc()),P(this,Ue).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||se(this,_e,bt).call(this,{type:"invalidate"})}fetch(t,n){var c,d,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(P(this,Se))return P(this,Se).continueRetry(),P(this,Se).promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(f=>f.options.queryFn);m&&this.setOptions(m.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,o=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(q(this,nn,!0),r.signal)})},s=()=>{const m=Vl(this.options,n),x=(()=>{const b={client:P(this,tn),queryKey:this.queryKey,meta:this.meta};return o(b),b})();return q(this,nn,!1),this.options.persister?this.options.persister(m,x,this):m(x)},a=(()=>{const m={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:P(this,tn),state:this.state,fetchFn:s};return o(m),m})();(c=this.options.behavior)==null||c.onFetch(a,this),q(this,en,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&se(this,_e,bt).call(this,{type:"fetch",meta:(h=a.fetchOptions)==null?void 0:h.meta});const l=m=>{var f,x,b,E;Mo(m)&&m.silent||se(this,_e,bt).call(this,{type:"error",error:m}),Mo(m)||((x=(f=P(this,Ue).config).onError)==null||x.call(f,m,this),(E=(b=P(this,Ue).config).onSettled)==null||E.call(b,this.state.data,m,this)),this.scheduleGc()};return q(this,Se,Gl({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:m=>{var f,x,b,E;if(m===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(m)}catch($){l($);return}(x=(f=P(this,Ue).config).onSuccess)==null||x.call(f,m,this),(E=(b=P(this,Ue).config).onSettled)==null||E.call(b,m,this.state.error,this),this.scheduleGc()},onError:l,onFail:(m,f)=>{se(this,_e,bt).call(this,{type:"failed",failureCount:m,error:f})},onPause:()=>{se(this,_e,bt).call(this,{type:"pause"})},onContinue:()=>{se(this,_e,bt).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),P(this,Se).start()}},Fn=new WeakMap,en=new WeakMap,Ue=new WeakMap,tn=new WeakMap,Se=new WeakMap,ur=new WeakMap,nn=new WeakMap,_e=new WeakSet,bt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Ql(r.data,this.options),fetchMeta:t.meta??null};case"success":return q(this,en,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return Mo(o)&&o.revert&&P(this,en)?{...P(this,en),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ce.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),P(this,Ue).notify({query:this,type:"updated",action:t})})},Ba);function Ql(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ql(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function dh(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var rt,Ha,hh=(Ha=class extends gr{constructor(t={}){super();J(this,rt);this.config=t,q(this,rt,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??js(o,n);let i=this.get(s);return i||(i=new fh({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(i)),i}add(t){P(this,rt).has(t.queryHash)||(P(this,rt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=P(this,rt).get(t.queryHash);n&&(t.destroy(),n===t&&P(this,rt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ce.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return P(this,rt).get(t)}getAll(){return[...P(this,rt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>_i(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>_i(t,r)):n}notify(t){Ce.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ce.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ce.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},rt=new WeakMap,Ha),ot,ke,rn,st,kt,Wa,ph=(Wa=class extends _l{constructor(t){super();J(this,st);J(this,ot);J(this,ke);J(this,rn);this.mutationId=t.mutationId,q(this,ke,t.mutationCache),q(this,ot,[]),this.state=t.state||mh(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){P(this,ot).includes(t)||(P(this,ot).push(t),this.clearGcTimeout(),P(this,ke).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){q(this,ot,P(this,ot).filter(n=>n!==t)),this.scheduleGc(),P(this,ke).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){P(this,ot).length||(this.state.status==="pending"?this.scheduleGc():P(this,ke).remove(this))}continue(){var t;return((t=P(this,rn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,i,a,l,c,d,h,m,f,x,b,E,$,w,T,N,I,j,W,u;const n=()=>{se(this,st,kt).call(this,{type:"continue"})};q(this,rn,Gl({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(p,g)=>{se(this,st,kt).call(this,{type:"failed",failureCount:p,error:g})},onPause:()=>{se(this,st,kt).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>P(this,ke).canRun(this)}));const r=this.state.status==="pending",o=!P(this,rn).canStart();try{if(r)n();else{se(this,st,kt).call(this,{type:"pending",variables:t,isPaused:o}),await((i=(s=P(this,ke).config).onMutate)==null?void 0:i.call(s,t,this));const g=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));g!==this.state.context&&se(this,st,kt).call(this,{type:"pending",context:g,variables:t,isPaused:o})}const p=await P(this,rn).start();return await((d=(c=P(this,ke).config).onSuccess)==null?void 0:d.call(c,p,t,this.state.context,this)),await((m=(h=this.options).onSuccess)==null?void 0:m.call(h,p,t,this.state.context)),await((x=(f=P(this,ke).config).onSettled)==null?void 0:x.call(f,p,null,this.state.variables,this.state.context,this)),await((E=(b=this.options).onSettled)==null?void 0:E.call(b,p,null,t,this.state.context)),se(this,st,kt).call(this,{type:"success",data:p}),p}catch(p){try{throw await((w=($=P(this,ke).config).onError)==null?void 0:w.call($,p,t,this.state.context,this)),await((N=(T=this.options).onError)==null?void 0:N.call(T,p,t,this.state.context)),await((j=(I=P(this,ke).config).onSettled)==null?void 0:j.call(I,void 0,p,this.state.variables,this.state.context,this)),await((u=(W=this.options).onSettled)==null?void 0:u.call(W,void 0,p,t,this.state.context)),p}finally{se(this,st,kt).call(this,{type:"error",error:p})}}finally{P(this,ke).runNext(this)}}},ot=new WeakMap,ke=new WeakMap,rn=new WeakMap,st=new WeakSet,kt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ce.batch(()=>{P(this,ot).forEach(r=>{r.onMutationUpdate(t)}),P(this,ke).notify({mutation:this,type:"updated",action:t})})},Wa);function mh(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var yt,Qe,fr,Ua,gh=(Ua=class extends gr{constructor(t={}){super();J(this,yt);J(this,Qe);J(this,fr);this.config=t,q(this,yt,new Set),q(this,Qe,new Map),q(this,fr,0)}build(t,n,r){const o=new ph({mutationCache:this,mutationId:++Rr(this,fr)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){P(this,yt).add(t);const n=$r(t);if(typeof n=="string"){const r=P(this,Qe).get(n);r?r.push(t):P(this,Qe).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(P(this,yt).delete(t)){const n=$r(t);if(typeof n=="string"){const r=P(this,Qe).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&P(this,Qe).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=$r(t);if(typeof n=="string"){const r=P(this,Qe).get(n),o=r==null?void 0:r.find(s=>s.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=$r(t);if(typeof n=="string"){const o=(r=P(this,Qe).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ce.batch(()=>{P(this,yt).forEach(t=>{this.notify({type:"removed",mutation:t})}),P(this,yt).clear(),P(this,Qe).clear()})}getAll(){return Array.from(P(this,yt))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Qi(n,r))}findAll(t={}){return this.getAll().filter(n=>Qi(t,n))}notify(t){Ce.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ce.batch(()=>Promise.all(t.map(n=>n.continue().catch($e))))}},yt=new WeakMap,Qe=new WeakMap,fr=new WeakMap,Ua);function $r(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Xi(e){return{onFetch:(t,n)=>{var d,h,m,f,x;const r=t.options,o=(m=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:m.direction,s=((f=t.state.data)==null?void 0:f.pages)||[],i=((x=t.state.data)==null?void 0:x.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let b=!1;const E=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>(t.signal.aborted?b=!0:t.signal.addEventListener("abort",()=>{b=!0}),t.signal)})},$=Vl(t.options,t.fetchOptions),w=async(T,N,I)=>{if(b)return Promise.reject();if(N==null&&T.pages.length)return Promise.resolve(T);const W=(()=>{const S={client:t.client,queryKey:t.queryKey,pageParam:N,direction:I?"backward":"forward",meta:t.options.meta};return E(S),S})(),u=await $(W),{maxPages:p}=t.options,g=I?oh:rh;return{pages:g(T.pages,u,p),pageParams:g(T.pageParams,N,p)}};if(o&&s.length){const T=o==="backward",N=T?vh:Ji,I={pages:s,pageParams:i},j=N(r,I);a=await w(I,j,T)}else{const T=e??s.length;do{const N=l===0?i[0]??r.initialPageParam:Ji(r,a);if(l>0&&N==null)break;a=await w(a,N),l++}while(l<T)}return a};t.options.persister?t.fetchFn=()=>{var b,E;return(E=(b=t.options).persister)==null?void 0:E.call(b,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function Ji(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function vh(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var pe,$t,Mt,Pn,$n,Dt,Mn,Dn,Va,bh=(Va=class{constructor(e={}){J(this,pe);J(this,$t);J(this,Mt);J(this,Pn);J(this,$n);J(this,Dt);J(this,Mn);J(this,Dn);q(this,pe,e.queryCache||new hh),q(this,$t,e.mutationCache||new gh),q(this,Mt,e.defaultOptions||{}),q(this,Pn,new Map),q(this,$n,new Map),q(this,Dt,0)}mount(){Rr(this,Dt)._++,P(this,Dt)===1&&(q(this,Mn,Bs.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,pe).onFocus())})),q(this,Dn,Yr.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,pe).onOnline())})))}unmount(){var e,t;Rr(this,Dt)._--,P(this,Dt)===0&&((e=P(this,Mn))==null||e.call(this),q(this,Mn,void 0),(t=P(this,Dn))==null||t.call(this),q(this,Dn,void 0))}isFetching(e){return P(this,pe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return P(this,$t).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=P(this,pe).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=P(this,pe).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Wt(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return P(this,pe).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=P(this,pe).get(r.queryHash),s=o==null?void 0:o.state.data,i=th(t,s);if(i!==void 0)return P(this,pe).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return Ce.batch(()=>P(this,pe).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=P(this,pe).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=P(this,pe);Ce.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=P(this,pe);return Ce.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ce.batch(()=>P(this,pe).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then($e).catch($e)}invalidateQueries(e,t={}){return Ce.batch(()=>(P(this,pe).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ce.batch(()=>P(this,pe).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch($e)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then($e)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=P(this,pe).build(this,t);return n.isStaleByTime(Wt(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then($e).catch($e)}fetchInfiniteQuery(e){return e.behavior=Xi(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then($e).catch($e)}ensureInfiniteQueryData(e){return e.behavior=Xi(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Yr.isOnline()?P(this,$t).resumePausedMutations():Promise.resolve()}getQueryCache(){return P(this,pe)}getMutationCache(){return P(this,$t)}getDefaultOptions(){return P(this,Mt)}setDefaultOptions(e){q(this,Mt,e)}setQueryDefaults(e,t){P(this,Pn).set(or(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...P(this,Pn).values()],n={};return t.forEach(r=>{sr(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){P(this,$n).set(or(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...P(this,$n).values()],n={};return t.forEach(r=>{sr(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...P(this,Mt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=js(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Kr&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...P(this,Mt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){P(this,pe).clear(),P(this,$t).clear()}},pe=new WeakMap,$t=new WeakMap,Mt=new WeakMap,Pn=new WeakMap,$n=new WeakMap,Dt=new WeakMap,Mn=new WeakMap,Dn=new WeakMap,Va),Pe,ie,dr,Te,on,In,It,Nt,hr,Nn,Ln,sn,an,Lt,jn,le,Xn,us,fs,ds,hs,ps,ms,gs,Kl,qa,yh=(qa=class extends gr{constructor(t,n){super();J(this,le);J(this,Pe);J(this,ie);J(this,dr);J(this,Te);J(this,on);J(this,In);J(this,It);J(this,Nt);J(this,hr);J(this,Nn);J(this,Ln);J(this,sn);J(this,an);J(this,Lt);J(this,jn,new Set);this.options=n,q(this,Pe,t),q(this,Nt,null),q(this,It,cs()),this.options.experimental_prefetchInRender||P(this,It).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(P(this,ie).addObserver(this),Zi(P(this,ie),this.options)?se(this,le,Xn).call(this):this.updateResult(),se(this,le,hs).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return vs(P(this,ie),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return vs(P(this,ie),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,se(this,le,ps).call(this),se(this,le,ms).call(this),P(this,ie).removeObserver(this)}setOptions(t){const n=this.options,r=P(this,ie);if(this.options=P(this,Pe).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ye(this.options.enabled,P(this,ie))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");se(this,le,gs).call(this),P(this,ie).setOptions(this.options),n._defaulted&&!is(this.options,n)&&P(this,Pe).getQueryCache().notify({type:"observerOptionsUpdated",query:P(this,ie),observer:this});const o=this.hasListeners();o&&ea(P(this,ie),r,this.options,n)&&se(this,le,Xn).call(this),this.updateResult(),o&&(P(this,ie)!==r||Ye(this.options.enabled,P(this,ie))!==Ye(n.enabled,P(this,ie))||Wt(this.options.staleTime,P(this,ie))!==Wt(n.staleTime,P(this,ie)))&&se(this,le,us).call(this);const s=se(this,le,fs).call(this);o&&(P(this,ie)!==r||Ye(this.options.enabled,P(this,ie))!==Ye(n.enabled,P(this,ie))||s!==P(this,Lt))&&se(this,le,ds).call(this,s)}getOptimisticResult(t){const n=P(this,Pe).getQueryCache().build(P(this,Pe),t),r=this.createResult(n,t);return xh(this,r)&&(q(this,Te,r),q(this,In,this.options),q(this,on,P(this,ie).state)),r}getCurrentResult(){return P(this,Te)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),Reflect.get(r,o))})}trackProp(t){P(this,jn).add(t)}getCurrentQuery(){return P(this,ie)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=P(this,Pe).defaultQueryOptions(t),r=P(this,Pe).getQueryCache().build(P(this,Pe),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return se(this,le,Xn).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),P(this,Te)))}createResult(t,n){var p;const r=P(this,ie),o=this.options,s=P(this,Te),i=P(this,on),a=P(this,In),c=t!==r?t.state:P(this,dr),{state:d}=t;let h={...d},m=!1,f;if(n._optimisticResults){const g=this.hasListeners(),S=!g&&Zi(t,n),C=g&&ea(t,r,n,o);(S||C)&&(h={...h,...Ql(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:x,errorUpdatedAt:b,status:E}=h;f=h.data;let $=!1;if(n.placeholderData!==void 0&&f===void 0&&E==="pending"){let g;s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(g=s.data,$=!0):g=typeof n.placeholderData=="function"?n.placeholderData((p=P(this,Ln))==null?void 0:p.state.data,P(this,Ln)):n.placeholderData,g!==void 0&&(E="success",f=ls(s==null?void 0:s.data,g,n),m=!0)}if(n.select&&f!==void 0&&!$)if(s&&f===(i==null?void 0:i.data)&&n.select===P(this,hr))f=P(this,Nn);else try{q(this,hr,n.select),f=n.select(f),f=ls(s==null?void 0:s.data,f,n),q(this,Nn,f),q(this,Nt,null)}catch(g){q(this,Nt,g)}P(this,Nt)&&(x=P(this,Nt),f=P(this,Nn),b=Date.now(),E="error");const w=h.fetchStatus==="fetching",T=E==="pending",N=E==="error",I=T&&w,j=f!==void 0,u={status:E,fetchStatus:h.fetchStatus,isPending:T,isSuccess:E==="success",isError:N,isInitialLoading:I,isLoading:I,data:f,dataUpdatedAt:h.dataUpdatedAt,error:x,errorUpdatedAt:b,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:w,isRefetching:w&&!T,isLoadingError:N&&!j,isPaused:h.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:N&&j,isStale:Hs(t,n),refetch:this.refetch,promise:P(this,It)};if(this.options.experimental_prefetchInRender){const g=k=>{u.status==="error"?k.reject(u.error):u.data!==void 0&&k.resolve(u.data)},S=()=>{const k=q(this,It,u.promise=cs());g(k)},C=P(this,It);switch(C.status){case"pending":t.queryHash===r.queryHash&&g(C);break;case"fulfilled":(u.status==="error"||u.data!==C.value)&&S();break;case"rejected":(u.status!=="error"||u.error!==C.reason)&&S();break}}return u}updateResult(){const t=P(this,Te),n=this.createResult(P(this,ie),this.options);if(q(this,on,P(this,ie).state),q(this,In,this.options),P(this,on).data!==void 0&&q(this,Ln,P(this,ie)),is(n,t))return;q(this,Te,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,s=typeof o=="function"?o():o;if(s==="all"||!s&&!P(this,jn).size)return!0;const i=new Set(s??P(this,jn));return this.options.throwOnError&&i.add("error"),Object.keys(P(this,Te)).some(a=>{const l=a;return P(this,Te)[l]!==t[l]&&i.has(l)})};se(this,le,Kl).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&se(this,le,hs).call(this)}},Pe=new WeakMap,ie=new WeakMap,dr=new WeakMap,Te=new WeakMap,on=new WeakMap,In=new WeakMap,It=new WeakMap,Nt=new WeakMap,hr=new WeakMap,Nn=new WeakMap,Ln=new WeakMap,sn=new WeakMap,an=new WeakMap,Lt=new WeakMap,jn=new WeakMap,le=new WeakSet,Xn=function(t){se(this,le,gs).call(this);let n=P(this,ie).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch($e)),n},us=function(){se(this,le,ps).call(this);const t=Wt(this.options.staleTime,P(this,ie));if(dn||P(this,Te).isStale||!os(t))return;const r=Ul(P(this,Te).dataUpdatedAt,t)+1;q(this,sn,setTimeout(()=>{P(this,Te).isStale||this.updateResult()},r))},fs=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(P(this,ie)):this.options.refetchInterval)??!1},ds=function(t){se(this,le,ms).call(this),q(this,Lt,t),!(dn||Ye(this.options.enabled,P(this,ie))===!1||!os(P(this,Lt))||P(this,Lt)===0)&&q(this,an,setInterval(()=>{(this.options.refetchIntervalInBackground||Bs.isFocused())&&se(this,le,Xn).call(this)},P(this,Lt)))},hs=function(){se(this,le,us).call(this),se(this,le,ds).call(this,se(this,le,fs).call(this))},ps=function(){P(this,sn)&&(clearTimeout(P(this,sn)),q(this,sn,void 0))},ms=function(){P(this,an)&&(clearInterval(P(this,an)),q(this,an,void 0))},gs=function(){const t=P(this,Pe).getQueryCache().build(P(this,Pe),this.options);if(t===P(this,ie))return;const n=P(this,ie);q(this,ie,t),q(this,dr,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Kl=function(t){Ce.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(P(this,Te))}),P(this,Pe).getQueryCache().notify({query:P(this,ie),type:"observerResultsUpdated"})})},qa);function wh(e,t){return Ye(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Zi(e,t){return wh(e,t)||e.state.data!==void 0&&vs(e,t,t.refetchOnMount)}function vs(e,t,n){if(Ye(t.enabled,e)!==!1&&Wt(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Hs(e,t)}return!1}function ea(e,t,n,r){return(e!==t||Ye(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Hs(e,n)}function Hs(e,t){return Ye(t.enabled,e)!==!1&&e.isStaleByTime(Wt(t.staleTime,e))}function xh(e,t){return!is(e.getCurrentResult(),t)}var Yl=D.createContext(void 0),Xl=e=>{const t=D.useContext(Yl);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Jl=({client:e,children:t})=>(D.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),L.jsx(Yl.Provider,{value:e,children:t})),Eh=D.createContext(!1),Rh=()=>D.useContext(Eh);function Ch(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Sh=D.createContext(Ch()),Oh=()=>D.useContext(Sh),Ah=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},kh=e=>{D.useEffect(()=>{e.clearReset()},[e])},Th=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||sh(n,[e.error,r])),Fh=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Ph=(e,t)=>e.isLoading&&e.isFetching&&!t,$h=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,ta=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Mh(e,t,n){var h,m,f,x,b;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=Rh(),o=Oh(),s=Xl(),i=s.defaultQueryOptions(e);(m=(h=s.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||m.call(h,i),process.env.NODE_ENV!=="production"&&(i.queryFn||console.error(`[${i.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),i._optimisticResults=r?"isRestoring":"optimistic",Fh(i),Ah(i,o),kh(o);const a=!s.getQueryCache().get(i.queryHash),[l]=D.useState(()=>new t(s,i)),c=l.getOptimisticResult(i),d=!r&&e.subscribed!==!1;if(D.useSyncExternalStore(D.useCallback(E=>{const $=d?l.subscribe(Ce.batchCalls(E)):$e;return l.updateResult(),$},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),D.useEffect(()=>{l.setOptions(i)},[i,l]),$h(i,c))throw ta(i,l,o);if(Th({result:c,errorResetBoundary:o,throwOnError:i.throwOnError,query:s.getQueryCache().get(i.queryHash),suspense:i.suspense}))throw c.error;if((x=(f=s.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||x.call(f,i,c),i.experimental_prefetchInRender&&!dn&&Ph(c,r)){const E=a?ta(i,l,o):(b=s.getQueryCache().get(i.queryHash))==null?void 0:b.promise;E==null||E.catch($e).finally(()=>{l.updateResult()})}return i.notifyOnChangeProps?c:l.trackResult(c)}function Ws(e,t){return Mh(e,yh)}function Us(e={}){const{activeAddress:t}=xt.useWallet(),{activeNetwork:n}=xt.useNetwork(),{enabled:r=!0,view:o="thumbnail"}=e;return Ws({queryKey:["nfd",t,n,o],queryFn:async({signal:s})=>{if(!t)return null;const l=await fetch(`${n==="testnet"?"https://api.testnet.nf.domains":"https://api.nf.domains"}/nfd/lookup?address=${encodeURIComponent(t)}&view=${o}`,{method:"GET",headers:{Accept:"application/json"},signal:s});if(l.status===404)return null;if(!l.ok)throw new Error(`NFD lookup failed: ${l.statusText}`);return(await l.json())[t]},enabled:r&&!!t,retry:(s,i)=>i instanceof Error&&i.message.includes("404")?!1:s<3,refetchOnWindowFocus:!0})}const na="https://ipfs.algonode.dev",Dh=async e=>{if(!e.startsWith("ipfs://"))return e;const t=e.replace("ipfs://",""),n=`https://images.nf.domains/ipfs/${t}`,r=`${na}/ipfs/${t}`,o=s=>s.startsWith("image/");try{const s=await fetch(n,{method:"HEAD"});if(s.ok){const i=s.headers.get("content-type");if(i&&o(i))return n}}catch{console.info(`CID ${t} is not cached on images.nf.domains, trying IPFS gateway...`)}try{const s=await fetch(r,{method:"HEAD"});if(s.ok){const i=s.headers.get("content-type");if(i&&o(i))return r;if(i==="application/json")try{const c=(await(await fetch(r)).json()).image;if(c){if(c.startsWith("ipfs://")){const d=c.replace("ipfs://",""),h=`${na}/ipfs/${d}`,m=await fetch(h,{method:"HEAD"});if(m.ok){const f=m.headers.get("content-type");if(f&&o(f))return h}}else if(c.startsWith("http"))try{const d=await fetch(c,{method:"HEAD"});if(d.ok){const h=d.headers.get("content-type");if(h&&o(h))return c}}catch{console.error("Error checking HTTP image URL")}}}catch{console.error("Error processing JSON metadata")}}}catch{console.error(`Error checking gateway for CID ${t}`)}return r};function Vs({nfd:e,alt:t,className:n,size:r=40,fallback:o,lightOnly:s=!1}){var d,h,m,f;const i=((h=(d=e==null?void 0:e.properties)==null?void 0:d.userDefined)==null?void 0:h.avatar)||((f=(m=e==null?void 0:e.properties)==null?void 0:m.verified)==null?void 0:f.avatar)||null,a=t||(e==null?void 0:e.name)||"NFD Avatar",{data:l,isLoading:c}=Ws({queryKey:["nfd-avatar",i],queryFn:async()=>i?i.startsWith("https://")&&!i.includes("/ipfs/")?i:i.startsWith("ipfs://")||i.includes("/ipfs/")?await Dh(i):i:null,enabled:!!i,staleTime:60*60*1e3,gcTime:24*60*60*1e3});return c||!l?o?L.jsx(L.Fragment,{children:o}):L.jsx("div",{className:En("flex items-center justify-center rounded-full",s?"bg-gray-200 dark:bg-gray-200":"bg-gray-200 dark:bg-[#192A39]",n),style:{width:`${r}px`,height:`${r}px`},"aria-label":a,role:"img",children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:En("text-gray-400",!s&&"dark:text-gray-500"),style:{width:`${Math.max(r/2,12)}px`,height:`${Math.max(r/2,12)}px`},children:L.jsx("path",{fillRule:"evenodd",d:"M7.5 6a4.5 4.5 0 119 0 4.5 4.5 0 01-9 0zM3.751 20.105a8.25 8.25 0 0116.498 0 .75.75 0 01-.437.695A18.683 18.683 0 0112 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 01-.437-.695z",clipRule:"evenodd"})})}):L.jsx("img",{src:l,alt:a,className:En("rounded-full",n),style:{width:`${r}px`,height:`${r}px`,objectFit:"cover"},loading:"lazy"})}const uo=O.forwardRef(({className:e="",children:t,style:n,...r},o)=>{var c;const{activeAddress:s}=xt.useWallet(),i=Us({enabled:!!s}),a=((c=i.data)==null?void 0:c.name)??null;return L.jsx("button",{ref:o,className:En("flex items-center py-2.5 pl-3 md:pl-3.5 pr-3 bg-[#2D2DF1] dark:bg-[#BFBFF9] text-white dark:text-[#001324] rounded-xl cursor-pointer font-bold",e),style:n,disabled:!1,...r,type:"button",children:t||L.jsxs("div",{className:"flex items-center",children:[s&&L.jsx("div",{className:"mr-1 md:mr-2 h-6 w-6 overflow-hidden",children:L.jsx(Vs,{nfd:i.data,alt:`${a||s} avatar`,size:24,lightOnly:!0})}),L.jsx("span",{className:"hidden md:block max-w-[160px] truncate",children:a||(s?Yn(s,6,4):"Connect")}),s&&L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 16 16",fill:"none",className:"ml-1.5 mt-0.5","aria-hidden":"true",children:L.jsx("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]})})});uo.displayName="ConnectedWalletButton";const Zl=typeof document<"u"?O.useLayoutEffect:()=>{};function Ih(e){const t=O.useRef(null);return Zl(()=>{t.current=e},[e]),O.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const zt=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},Yt=e=>e&&"window"in e&&e.window===e?e:zt(e).defaultView||window;function Nh(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function Lh(e){return Nh(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let jh=!1;function qs(){return jh}function ec(e,t){if(!qs())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:Lh(n)?n=n.host:n=n.parentNode}return!1}const bs=(e=document)=>{var t;if(!qs())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function tc(e){return qs()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function fo(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function zs(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Rt(e){if(process.env.NODE_ENV==="test")return e;let t=null;return()=>(t==null&&(t=e()),t)}const Gs=Rt(function(){return zs(/^Mac/i)}),Bh=Rt(function(){return zs(/^iPhone/i)}),Hh=Rt(function(){return zs(/^iPad/i)||Gs()&&navigator.maxTouchPoints>1}),Wh=Rt(function(){return Bh()||Hh()});Rt(function(){return Gs()||Wh()});Rt(function(){return fo(/AppleWebKit/i)&&!Uh()});const Uh=Rt(function(){return fo(/Chrome/i)}),Vh=Rt(function(){return fo(/Android/i)});Rt(function(){return fo(/Firefox/i)});function nc(){let e=O.useRef(new Map),t=O.useCallback((o,s,i,a)=>{let l=a!=null&&a.once?(...c)=>{e.current.delete(i),i(...c)}:i;e.current.set(i,{type:s,eventTarget:o,fn:l,options:a}),o.addEventListener(s,l,a)},[]),n=O.useCallback((o,s,i,a)=>{var l;let c=((l=e.current.get(i))===null||l===void 0?void 0:l.fn)||i;o.removeEventListener(s,c,a),e.current.delete(i)},[]),r=O.useCallback(()=>{e.current.forEach((o,s)=>{n(o.eventTarget,o.type,s,o.options)})},[n]);return O.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function qh(e){return e.mozInputSource===0&&e.isTrusted?!0:Vh()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function rc(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function zh(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function oc(e){let t=O.useRef({isFocused:!1,observer:null});Zl(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=Ih(r=>{e==null||e(r)});return O.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=r.target,s=i=>{if(t.current.isFocused=!1,o.disabled){let a=rc(i);n(a)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",s,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){var i;(i=t.current.observer)===null||i===void 0||i.disconnect();let a=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let Gh=!1,vr=null,ys=new Set,tr=new Map,hn=!1,ws=!1;const _h={Tab:!0,Escape:!0};function _s(e,t){for(let n of ys)n(e,t)}function Qh(e){return!(e.metaKey||!Gs()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Xr(e){hn=!0,Qh(e)&&(vr="keyboard",_s("keyboard",e))}function Ve(e){vr="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(hn=!0,_s("pointer",e))}function sc(e){qh(e)&&(hn=!0,vr="virtual")}function ic(e){e.target===window||e.target===document||Gh||!e.isTrusted||(!hn&&!ws&&(vr="virtual",_s("virtual",e)),hn=!1,ws=!1)}function ac(){hn=!1,ws=!0}function xs(e){if(typeof window>"u"||typeof document>"u"||tr.get(Yt(e)))return;const t=Yt(e),n=zt(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){hn=!0,r.apply(this,arguments)},n.addEventListener("keydown",Xr,!0),n.addEventListener("keyup",Xr,!0),n.addEventListener("click",sc,!0),t.addEventListener("focus",ic,!0),t.addEventListener("blur",ac,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Ve,!0),n.addEventListener("pointermove",Ve,!0),n.addEventListener("pointerup",Ve,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",Ve,!0),n.addEventListener("mousemove",Ve,!0),n.addEventListener("mouseup",Ve,!0)),t.addEventListener("beforeunload",()=>{lc(e)},{once:!0}),tr.set(t,{focus:r})}const lc=(e,t)=>{const n=Yt(e),r=zt(e);t&&r.removeEventListener("DOMContentLoaded",t),tr.has(n)&&(n.HTMLElement.prototype.focus=tr.get(n).focus,r.removeEventListener("keydown",Xr,!0),r.removeEventListener("keyup",Xr,!0),r.removeEventListener("click",sc,!0),n.removeEventListener("focus",ic,!0),n.removeEventListener("blur",ac,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Ve,!0),r.removeEventListener("pointermove",Ve,!0),r.removeEventListener("pointerup",Ve,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",Ve,!0),r.removeEventListener("mousemove",Ve,!0),r.removeEventListener("mouseup",Ve,!0)),tr.delete(n))};function Kh(e){const t=zt(e);let n;return t.readyState!=="loading"?xs(e):(n=()=>{xs(e)},t.addEventListener("DOMContentLoaded",n)),()=>lc(e,n)}typeof document<"u"&&Kh();function cc(){return vr!=="pointer"}const Yh=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Xh(e,t,n){let r=zt(n==null?void 0:n.target);const o=typeof window<"u"?Yt(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,s=typeof window<"u"?Yt(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,i=typeof window<"u"?Yt(n==null?void 0:n.target).HTMLElement:HTMLElement,a=typeof window<"u"?Yt(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof o&&!Yh.has(r.activeElement.type)||r.activeElement instanceof s||r.activeElement instanceof i&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof a&&!_h[n.key])}function Jh(e,t,n){xs(),O.useEffect(()=>{let r=(o,s)=>{Xh(!!(n!=null&&n.isTextInput),o,s)&&e(cc())};return ys.add(r),()=>{ys.delete(r)}},t)}function Zh(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const s=O.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),o&&o(!1),!0},[r,o]),i=oc(s),a=O.useCallback(l=>{const c=zt(l.target),d=c?bs(c):bs();l.target===l.currentTarget&&d===tc(l.nativeEvent)&&(n&&n(l),o&&o(!0),i(l))},[o,n,i]);return{focusProps:{onFocus:!t&&(n||o||r)?a:void 0,onBlur:!t&&(r||o)?s:void 0}}}function ep(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,s=O.useRef({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:a}=nc(),l=O.useCallback(h=>{h.currentTarget.contains(h.target)&&s.current.isFocusWithin&&!h.currentTarget.contains(h.relatedTarget)&&(s.current.isFocusWithin=!1,a(),n&&n(h),o&&o(!1))},[n,o,s,a]),c=oc(l),d=O.useCallback(h=>{if(!h.currentTarget.contains(h.target))return;const m=zt(h.target),f=bs(m);if(!s.current.isFocusWithin&&f===tc(h.nativeEvent)){r&&r(h),o&&o(!0),s.current.isFocusWithin=!0,c(h);let x=h.currentTarget;i(m,"focus",b=>{if(s.current.isFocusWithin&&!ec(x,b.target)){let E=new m.defaultView.FocusEvent("blur",{relatedTarget:b.target});zh(E,x);let $=rc(E);l($)}},{capture:!0})}},[r,o,c,i,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:d,onBlur:l}}}let Jr=!1,Do=0;function Es(){Jr=!0,setTimeout(()=>{Jr=!1},50)}function ra(e){e.pointerType==="touch"&&Es()}function tp(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",ra):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",Es),Do++,()=>{Do--,!(Do>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",ra):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",Es))}}function np(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[s,i]=O.useState(!1),a=O.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;O.useEffect(tp,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=nc(),{hoverProps:d,triggerHoverEnd:h}=O.useMemo(()=>{let m=(b,E)=>{if(a.pointerType=E,o||E==="touch"||a.isHovered||!b.currentTarget.contains(b.target))return;a.isHovered=!0;let $=b.currentTarget;a.target=$,l(zt(b.target),"pointerover",w=>{a.isHovered&&a.target&&!ec(a.target,w.target)&&f(w,w.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:$,pointerType:E}),n&&n(!0),i(!0)},f=(b,E)=>{let $=a.target;a.pointerType="",a.target=null,!(E==="touch"||!a.isHovered||!$)&&(a.isHovered=!1,c(),r&&r({type:"hoverend",target:$,pointerType:E}),n&&n(!1),i(!1))},x={};return typeof PointerEvent<"u"?(x.onPointerEnter=b=>{Jr&&b.pointerType==="mouse"||m(b,b.pointerType)},x.onPointerLeave=b=>{!o&&b.currentTarget.contains(b.target)&&f(b,b.pointerType)}):process.env.NODE_ENV==="test"&&(x.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},x.onMouseEnter=b=>{!a.ignoreEmulatedMouseEvents&&!Jr&&m(b,"mouse"),a.ignoreEmulatedMouseEvents=!1},x.onMouseLeave=b=>{!o&&b.currentTarget.contains(b.target)&&f(b,"mouse")}),{hoverProps:x,triggerHoverEnd:f}},[t,n,r,o,a,l,c]);return O.useEffect(()=>{o&&h({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:d,isHovered:s}}function rp(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=O.useRef({isFocused:!1,isFocusVisible:t||cc()}),[s,i]=O.useState(!1),[a,l]=O.useState(()=>o.current.isFocused&&o.current.isFocusVisible),c=O.useCallback(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),d=O.useCallback(f=>{o.current.isFocused=f,i(f),c()},[c]);Jh(f=>{o.current.isFocusVisible=f,c()},[],{isTextInput:n});let{focusProps:h}=Zh({isDisabled:r,onFocusChange:d}),{focusWithinProps:m}=ep({isDisabled:!r,onFocusWithinChange:d});return{isFocused:s,isFocusVisible:a,focusProps:r?m:h}}var op=Object.defineProperty,sp=(e,t,n)=>t in e?op(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Io=(e,t,n)=>(sp(e,typeof t!="symbol"?t+"":t,n),n);let ip=class{constructor(){Io(this,"current",this.detect()),Io(this,"handoffState","pending"),Io(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},cn=new ip;function br(e){var t,n;return cn.isServer?null:e?"ownerDocument"in e?e.ownerDocument:"current"in e?(n=(t=e.current)==null?void 0:t.ownerDocument)!=null?n:document:null:document}function uc(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Je(){let e=[],t={addEventListener(n,r,o,s){return n.addEventListener(r,o,s),t.add(()=>n.removeEventListener(r,o,s))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return uc(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){let r=Je();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function yr(){let[e]=O.useState(Je);return O.useEffect(()=>()=>e.dispose(),[e]),e}let xe=(e,t)=>{cn.isServer?O.useEffect(e,t):O.useLayoutEffect(e,t)};function zn(e){let t=O.useRef(e);return xe(()=>{t.current=e},[e]),t}let ce=function(e){let t=zn(e);return O.useCallback((...n)=>t.current(...n),[t])};function ap(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function lp(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function cp({disabled:e=!1}={}){let t=O.useRef(null),[n,r]=O.useState(!1),o=yr(),s=ce(()=>{t.current=null,r(!1),o.dispose()}),i=ce(a=>{if(o.dispose(),t.current===null){t.current=a.currentTarget,r(!0);{let l=br(a.currentTarget);o.addEventListener(l,"pointerup",s,!1),o.addEventListener(l,"pointermove",c=>{if(t.current){let d=ap(c);r(lp(d,t.current.getBoundingClientRect()))}},!1),o.addEventListener(l,"pointercancel",s,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:i,onPointerUp:s,onClick:s}}}let up=O.createContext(void 0);function Qs(){return O.useContext(up)}function oa(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function ut(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ut),r}var Rs=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Rs||{}),fp=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(fp||{});function Ze(){let e=hp();return O.useCallback(t=>dp({mergeRefs:e,...t}),[e])}function dp({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:s=!0,name:i,mergeRefs:a}){a=a??pp;let l=fc(t,e);if(s)return Mr(l,n,r,i,a);let c=o??0;if(c&2){let{static:d=!1,...h}=l;if(d)return Mr(h,n,r,i,a)}if(c&1){let{unmount:d=!0,...h}=l;return ut(d?0:1,{0(){return null},1(){return Mr({...h,hidden:!0,style:{display:"none"}},n,r,i,a)}})}return Mr(l,n,r,i,a)}function Mr(e,t={},n,r,o){let{as:s=n,children:i,refName:a="ref",...l}=No(e,["unmount","static"]),c=e.ref!==void 0?{[a]:e.ref}:{},d=typeof i=="function"?i(t):i;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let h={};if(t){let m=!1,f=[];for(let[x,b]of Object.entries(t))typeof b=="boolean"&&(m=!0),b===!0&&f.push(x.replace(/([A-Z])/g,E=>`-${E.toLowerCase()}`));if(m){h["data-headlessui-state"]=f.join(" ");for(let x of f)h[`data-${x}`]=""}}if(s===O.Fragment&&(Object.keys(Kt(l)).length>0||Object.keys(Kt(h)).length>0))if(!O.isValidElement(d)||Array.isArray(d)&&d.length>1){if(Object.keys(Kt(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Kt(l)).concat(Object.keys(Kt(h))).map(m=>` - ${m}`).join(`
17
+ `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(m=>` - ${m}`).join(`
18
18
  `)].join(`
19
- `))}else{let E=d.props,p=E==null?void 0:E.className,g=typeof p=="function"?(...D)=>Js(p(...D),l.className):Js(p,l.className),y=g?{className:g}:{},T=za(d.props,It(_r(l,["ref"])));for(let D in h)D in T&&delete h[D];return S.cloneElement(d,Object.assign({},T,h,u,{ref:o(od(d),u.ref)},y))}return S.createElement(s,Object.assign({},_r(l,["ref"]),s!==S.Fragment&&u,s!==S.Fragment&&h),d)}function nd(){let e=S.useRef([]),t=S.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function rd(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function za(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[o=>{var s;return(s=o==null?void 0:o.preventDefault)==null?void 0:s.call(o)}]);for(let r in n)Object.assign(t,{[r](o,...s){let i=n[r];for(let a of i){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;a(o,...s)}}});return t}function Va(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];for(let r in n)Object.assign(t,{[r](...o){let s=n[r];for(let i of s)i==null||i(...o)}});return t}function Ye(e){var t;return Object.assign(S.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function It(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function _r(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function od(e){return S.version.split(".")[0]>="19"?e.props.ref:e.ref}function sd(e,t,n){let[r,o]=S.useState(n),s=e!==void 0,i=S.useRef(s),a=S.useRef(!1),l=S.useRef(!1);return s&&!i.current&&!a.current?(a.current=!0,i.current=s,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!s&&i.current&&!l.current&&(l.current=!0,i.current=s,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[s?e:r,ae(u=>(s||o(u),t==null?void 0:t(u)))]}function id(e){let[t]=S.useState(e);return t}function Qa(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))Ya(n,Ka(t,r),o);return n}function Ka(e,t){return e?e+"["+t+"]":t}function Ya(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())Ya(e,Ka(t,r.toString()),o);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):Qa(n,t,e)}function ad(e){var t,n;let r=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(r){for(let o of r.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(n=r.requestSubmit)==null||n.call(r)}}let ld="span";var es=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(es||{});function cd(e,t){var n;let{features:r=1,...o}=e,s={ref:t,"aria-hidden":(r&2)===2?!0:(n=o["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return Ke()({ourProps:s,theirProps:o,slot:{},defaultTag:ld,name:"Hidden"})}let Xa=Ye(cd),ud=S.createContext(null);function fd({children:e}){let t=S.useContext(ud);if(!t)return S.createElement(S.Fragment,null,e);let{target:n}=t;return n?nt.createPortal(S.createElement(S.Fragment,null,e),n):null}function dd({data:e,form:t,disabled:n,onReset:r,overrides:o}){let[s,i]=S.useState(null),a=En();return S.useEffect(()=>{if(r&&s)return a.addEventListener(s,"reset",r)},[s,t,r]),S.createElement(fd,null,S.createElement(hd,{setForm:i,formId:t}),Qa(e).map(([l,u])=>S.createElement(Xa,{features:es.Hidden,...It({key:l,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:l,value:u,...o})})))}function hd({setForm:e,formId:t}){return S.useEffect(()=>{if(t){let n=document.getElementById(t);n&&e(n)}},[e,t]),t?null:S.createElement(Xa,{features:es.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:n=>{if(!n)return;let r=n.closest("form");r&&e(r)}})}let pd=S.createContext(void 0);function _a(){return S.useContext(pd)}function md(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&gd(n)?!1:r}function gd(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let Ja=Symbol();function bd(e,t=!0){return Object.assign(e,{[Ja]:t})}function st(...e){let t=S.useRef(e);S.useEffect(()=>{t.current=e},[e]);let n=ae(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[Ja]))?void 0:n}let ts=S.createContext(null);ts.displayName="DescriptionContext";function Za(){let e=S.useContext(ts);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Za),t}return e}function vd(){var e,t;return(t=(e=S.useContext(ts))==null?void 0:e.value)!=null?t:void 0}let yd="p";function wd(e,t){let n=S.useId(),r=Zo(),{id:o=`headlessui-description-${n}`,...s}=e,i=Za(),a=st(t);be(()=>i.register(o),[o,i.register]);let l=r||!1,u=S.useMemo(()=>({...i.slot,disabled:l}),[i.slot,l]),d={ref:a,...i.props,id:o};return Ke()({ourProps:d,theirProps:s,slot:u,defaultTag:yd,name:i.name||"Description"})}let xd=Ye(wd);Object.assign(xd,{});var ge=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(ge||{});let Pr=S.createContext(null);Pr.displayName="LabelContext";function el(){let e=S.useContext(Pr);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,el),t}return e}function tl(e){var t,n,r;let o=(n=(t=S.useContext(Pr))==null?void 0:t.value)!=null?n:void 0;return((r=e==null?void 0:e.length)!=null?r:0)>0?[o,...e].filter(Boolean).join(" "):o}function Ed({inherit:e=!1}={}){let t=tl(),[n,r]=S.useState([]),o=e?[t,...n].filter(Boolean):n;return[o.length>0?o.join(" "):void 0,S.useMemo(()=>function(s){let i=ae(l=>(r(u=>[...u,l]),()=>r(u=>{let d=u.slice(),h=d.indexOf(l);return h!==-1&&d.splice(h,1),d}))),a=S.useMemo(()=>({register:i,slot:s.slot,name:s.name,props:s.props,value:s.value}),[i,s.slot,s.name,s.props,s.value]);return S.createElement(Pr.Provider,{value:a},s.children)},[r])]}let Rd="label";function Cd(e,t){var n;let r=S.useId(),o=el(),s=_a(),i=Zo(),{id:a=`headlessui-label-${r}`,htmlFor:l=s??((n=o.props)==null?void 0:n.htmlFor),passive:u=!1,...d}=e,h=st(t);be(()=>o.register(a),[a,o.register]);let E=ae(T=>{let D=T.currentTarget;if(D instanceof HTMLLabelElement&&T.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(T),D instanceof HTMLLabelElement){let w=document.getElementById(D.htmlFor);if(w){let M=w.getAttribute("disabled");if(M==="true"||M==="")return;let L=w.getAttribute("aria-disabled");if(L==="true"||L==="")return;(w instanceof HTMLInputElement&&(w.type==="radio"||w.type==="checkbox")||w.role==="radio"||w.role==="checkbox"||w.role==="switch")&&w.click(),w.focus({preventScroll:!0})}}}),p=i||!1,g=S.useMemo(()=>({...o.slot,disabled:p}),[o.slot,p]),y={ref:h,...o.props,id:a,htmlFor:l,onClick:E};return u&&("onClick"in y&&(delete y.htmlFor,delete y.onClick),"onClick"in d&&delete d.onClick),Ke()({ourProps:y,theirProps:d,slot:g,defaultTag:l?Rd:"div",name:o.name||"Label"})}let Sd=Ye(Cd),nl=Object.assign(Sd,{});function kd(e,t){return e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&"id"in e&&"id"in t?e.id===t.id:e===t}function Ad(e=kd){return S.useCallback((t,n)=>{if(typeof e=="string"){let r=e;return(t==null?void 0:t[r])===(n==null?void 0:n[r])}return e(t,n)},[e])}function Od(e){if(e===null)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function Td(e,t=!1){let[n,r]=S.useReducer(()=>({}),{}),o=S.useMemo(()=>Od(e),[e,n]);return be(()=>{if(!e)return;let s=new ResizeObserver(r);return s.observe(e),()=>{s.disconnect()}},[e]),t?{width:`${o.width}px`,height:`${o.height}px`}:o}let Fd=class extends Map{constructor(t){super(),this.factory=t}get(t){let n=super.get(t);return n===void 0&&(n=this.factory(t),this.set(t,n)),n}};function rl(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...s){let i=t[o].call(n,...s);i&&(n=i,r.forEach(a=>a()))}}}function ol(e){return S.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}let Pd=new Fd(()=>rl(()=>[],{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(t===-1)return this;let n=this.slice();return n.splice(t,1),n}}));function ns(e,t){let n=Pd.get(t),r=S.useId(),o=ol(n);if(be(()=>{if(e)return n.dispatch("ADD",r),()=>n.dispatch("REMOVE",r)},[n,e]),!e)return!1;let s=o.indexOf(r),i=o.length;return s===-1&&(s=i,i+=1),s===i-1}let Io=new Map,In=new Map;function Zs(e){var t;let n=(t=In.get(e))!=null?t:0;return In.set(e,n+1),n!==0?()=>ei(e):(Io.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>ei(e))}function ei(e){var t;let n=(t=In.get(e))!=null?t:1;if(n===1?In.delete(e):In.set(e,n-1),n!==1)return;let r=Io.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,Io.delete(e))}function Md(e,{allowed:t,disallowed:n}={}){let r=ns(e,"inert-others");be(()=>{var o,s;if(!r)return;let i=pt();for(let l of(o=n==null?void 0:n())!=null?o:[])l&&i.add(Zs(l));let a=(s=t==null?void 0:t())!=null?s:[];for(let l of a){if(!l)continue;let u=Yn(l);if(!u)continue;let d=l.parentElement;for(;d&&d!==u.body;){for(let h of d.children)a.some(E=>h.contains(E))||i.add(Zs(h));d=d.parentElement}}return i.dispose},[r,t,n])}function Id(e,t,n){let r=Rn(o=>{let s=o.getBoundingClientRect();s.x===0&&s.y===0&&s.width===0&&s.height===0&&n()});S.useEffect(()=>{if(!e)return;let o=t===null?null:t instanceof HTMLElement?t:t.current;if(!o)return;let s=pt();if(typeof ResizeObserver<"u"){let i=new ResizeObserver(()=>r.current(o));i.observe(o),s.add(()=>i.disconnect())}if(typeof IntersectionObserver<"u"){let i=new IntersectionObserver(()=>r.current(o));i.observe(o),s.add(()=>i.disconnect())}return()=>s.dispose()},[t,r,e])}let Do=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),Dd=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var No=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(No||{}),Nd=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Nd||{}),Ld=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Ld||{});function sl(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Do)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function $d(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Dd)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var rs=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(rs||{});function il(e,t=0){var n;return e===((n=Yn(e))==null?void 0:n.body)?!1:ft(t,{0(){return e.matches(Do)},1(){let r=e;for(;r!==null;){if(r.matches(Do))return!0;r=r.parentElement}return!1}})}var jd=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(jd||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));let Bd=["textarea","input"].join(",");function Hd(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,Bd))!=null?n:!1}function al(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),s=t(r);if(o===null||s===null)return 0;let i=o.compareDocumentPosition(s);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Ud(e,t){return Wd(sl(),t,{relativeTo:e})}function Wd(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let s=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,i=Array.isArray(e)?n?al(e):e:t&64?$d(e):sl(e);o.length>0&&i.length>1&&(i=i.filter(p=>!o.some(g=>g!=null&&"current"in g?(g==null?void 0:g.current)===p:g===p))),r=r??s.activeElement;let a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,i.indexOf(r))-1;if(t&4)return Math.max(0,i.indexOf(r))+1;if(t&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{},d=0,h=i.length,E;do{if(d>=h||d+h<=0)return 0;let p=l+d;if(t&16)p=(p+h)%h;else{if(p<0)return 3;if(p>=h)return 1}E=i[p],E==null||E.focus(u),d+=a}while(E!==s.activeElement);return t&6&&Hd(E)&&E.select(),2}function ll(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function qd(){return/Android/gi.test(window.navigator.userAgent)}function Gd(){return ll()||qd()}function An(e,t,n,r){let o=Rn(n);S.useEffect(()=>{if(!e)return;function s(i){o.current(i)}return document.addEventListener(t,s,r),()=>document.removeEventListener(t,s,r)},[e,t,r])}function zd(e,t,n,r){let o=Rn(n);S.useEffect(()=>{if(!e)return;function s(i){o.current(i)}return window.addEventListener(t,s,r),()=>window.removeEventListener(t,s,r)},[e,t,r])}const ti=30;function Vd(e,t,n){let r=ns(e,"outside-click"),o=Rn(n),s=S.useCallback(function(l,u){if(l.defaultPrevented)return;let d=u(l);if(d===null||!d.getRootNode().contains(d)||!d.isConnected)return;let h=function E(p){return typeof p=="function"?E(p()):Array.isArray(p)||p instanceof Set?p:[p]}(t);for(let E of h)if(E!==null&&(E.contains(d)||l.composed&&l.composedPath().includes(E)))return;return!il(d,rs.Loose)&&d.tabIndex!==-1&&l.preventDefault(),o.current(l,d)},[o,t]),i=S.useRef(null);An(r,"pointerdown",l=>{var u,d;i.current=((d=(u=l.composedPath)==null?void 0:u.call(l))==null?void 0:d[0])||l.target},!0),An(r,"mousedown",l=>{var u,d;i.current=((d=(u=l.composedPath)==null?void 0:u.call(l))==null?void 0:d[0])||l.target},!0),An(r,"click",l=>{Gd()||i.current&&(s(l,()=>i.current),i.current=null)},!0);let a=S.useRef({x:0,y:0});An(r,"touchstart",l=>{a.current.x=l.touches[0].clientX,a.current.y=l.touches[0].clientY},!0),An(r,"touchend",l=>{let u={x:l.changedTouches[0].clientX,y:l.changedTouches[0].clientY};if(!(Math.abs(u.x-a.current.x)>=ti||Math.abs(u.y-a.current.y)>=ti))return s(l,()=>l.target instanceof HTMLElement?l.target:null)},!0),zd(r,"blur",l=>s(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Lo(...e){return S.useMemo(()=>Yn(...e),[...e])}function Qd(e,t){return S.useMemo(()=>{var n;if(e.type)return e.type;let r=(n=e.as)!=null?n:"button";if(typeof r=="string"&&r.toLowerCase()==="button"||(t==null?void 0:t.tagName)==="BUTTON"&&!t.hasAttribute("type"))return"button"},[e.type,e.as,t])}function Kd(){let e;return{before({doc:t}){var n;let r=t.documentElement,o=(n=t.defaultView)!=null?n:window;e=Math.max(0,o.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),s=Math.max(0,e-o);n.style(r,"paddingRight",`${s}px`)}}}function Yd(){return ll()?{before({doc:e,d:t,meta:n}){function r(o){return n.containers.flatMap(s=>s()).some(s=>s.contains(o))}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let a=pt();a.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>a.dispose()))}let s=(o=window.scrollY)!=null?o:window.pageYOffset,i=null;t.addEventListener(e,"click",a=>{if(a.target instanceof HTMLElement)try{let l=a.target.closest("a");if(!l)return;let{hash:u}=new URL(l.href),d=e.querySelector(u);d&&!r(d)&&(i=d)}catch{}},!0),t.addEventListener(e,"touchstart",a=>{if(a.target instanceof HTMLElement)if(r(a.target)){let l=a.target;for(;l.parentElement&&r(l.parentElement);)l=l.parentElement;t.style(l,"overscrollBehavior","contain")}else t.style(a.target,"touchAction","none")}),t.addEventListener(e,"touchmove",a=>{if(a.target instanceof HTMLElement){if(a.target.tagName==="INPUT")return;if(r(a.target)){let l=a.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&a.preventDefault()}else a.preventDefault()}},{passive:!1}),t.add(()=>{var a;let l=(a=window.scrollY)!=null?a:window.pageYOffset;s!==l&&window.scrollTo(0,s),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}:{}}function Xd(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function _d(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let Lt=rl(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:pt(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:_d(n)},o=[Yd(),Kd(),Xd()];o.forEach(({before:s})=>s==null?void 0:s(r)),o.forEach(({after:s})=>s==null?void 0:s(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Lt.subscribe(()=>{let e=Lt.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&Lt.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Lt.dispatch("TEARDOWN",n)}});function Jd(e,t,n=()=>({containers:[]})){let r=ol(Lt),o=t?r.get(t):void 0,s=o?o.count>0:!1;return be(()=>{if(!(!t||!e))return Lt.dispatch("PUSH",t,n),()=>Lt.dispatch("POP",t,n)},[e,t]),s}function Zd(e,t,n=()=>[document.body]){let r=ns(e,"scroll-lock");Jd(r,t,o=>{var s;return{containers:[...(s=o.containers)!=null?s:[],n]}})}function ni(e){return[e.screenX,e.screenY]}function eh(){let e=S.useRef([-1,-1]);return{wasMoved(t){let n=ni(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=ni(t)}}}function th(e=0){let[t,n]=S.useState(e),r=S.useCallback(l=>n(l),[t]),o=S.useCallback(l=>n(u=>u|l),[t]),s=S.useCallback(l=>(t&l)===l,[t]),i=S.useCallback(l=>n(u=>u&~l),[n]),a=S.useCallback(l=>n(u=>u^l),[n]);return{flags:t,setFlag:r,addFlag:o,hasFlag:s,removeFlag:i,toggleFlag:a}}var ri,oi;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((ri=process==null?void 0:process.env)==null?void 0:ri.NODE_ENV)==="test"&&typeof((oi=Element==null?void 0:Element.prototype)==null?void 0:oi.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
20
- `)),[]});var nh=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(nh||{});function rh(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function oh(e,t,n,r){let[o,s]=S.useState(n),{hasFlag:i,addFlag:a,removeFlag:l}=th(e&&o?3:0),u=S.useRef(!1),d=S.useRef(!1),h=En();return be(()=>{var E;if(e){if(n&&s(!0),!t){n&&a(3);return}return(E=void 0)==null||E.call(r,n),sh(t,{inFlight:u,prepare(){d.current?d.current=!1:d.current=u.current,u.current=!0,!d.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){d.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var p;d.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(u.current=!1,l(7),n||s(!1),(p=void 0)==null||p.call(r,n))}})}},[e,n,t,h]),e?[o,{closed:i(1),enter:i(2),leave:i(4),transition:i(2)||i(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function sh(e,{prepare:t,run:n,done:r,inFlight:o}){let s=pt();return ah(e,{prepare:t,inFlight:o}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(ih(e,r))})}),s.dispose}function ih(e,t){var n,r;let o=pt();if(!e)return o.dispose;let s=!1;o.add(()=>{s=!0});let i=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(a=>a instanceof CSSTransition))!=null?r:[];return i.length===0?(t(),o.dispose):(Promise.allSettled(i.map(a=>a.finished)).then(()=>{s||t()}),o.dispose)}function ah(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.style.transition=r}function lh(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}const cl={...I},ch=cl.useInsertionEffect,uh=ch||(e=>e());function ul(e){const t=I.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return uh(()=>{t.current=e}),I.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}var $o=typeof document<"u"?S.useLayoutEffect:S.useEffect;let si=!1,fh=0;const ii=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+fh++;function dh(){const[e,t]=I.useState(()=>si?ii():void 0);return $o(()=>{e==null&&t(ii())},[]),I.useEffect(()=>{si=!0},[]),e}const hh=cl.useId,ph=hh||dh;let Bn;process.env.NODE_ENV!=="production"&&(Bn=new Set);function mh(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Bn)!=null&&e.has(o))){var s;(s=Bn)==null||s.add(o),console.warn(o)}}function gh(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Bn)!=null&&e.has(o))){var s;(s=Bn)==null||s.add(o),console.error(o)}}function bh(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const vh=I.createContext(null),yh=I.createContext(null),wh=()=>{var e;return((e=I.useContext(vh))==null?void 0:e.id)||null},xh=()=>I.useContext(yh),Eh="data-floating-ui-focusable";function Rh(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=ph(),s=I.useRef({}),[i]=I.useState(()=>bh()),a=wh()!=null;if(process.env.NODE_ENV!=="production"){const p=r.reference;p&&!ce(p)&&gh("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=I.useState(r.reference),d=ul((p,g,y)=>{s.current.openEvent=p?g:void 0,i.emit("openchange",{open:p,event:g,reason:y,nested:a}),n==null||n(p,g,y)}),h=I.useMemo(()=>({setPositionReference:u}),[]),E=I.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return I.useMemo(()=>({dataRef:s,open:t,onOpenChange:d,elements:E,events:i,floatingId:o,refs:h}),[t,d,E,i,o,h])}function Ch(e){e===void 0&&(e={});const{nodeId:t}=e,n=Rh({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=I.useState(null),[a,l]=I.useState(null),d=(o==null?void 0:o.domReference)||s,h=I.useRef(null),E=xh();$o(()=>{d&&(h.current=d)},[d]);const p=ta({...e,elements:{...o,...a&&{reference:a}}}),g=I.useCallback(M=>{const L=ce(M)?{getBoundingClientRect:()=>M.getBoundingClientRect(),contextElement:M}:M;l(L),p.refs.setReference(L)},[p.refs]),y=I.useCallback(M=>{(ce(M)||M===null)&&(h.current=M,i(M)),(ce(p.refs.reference.current)||p.refs.reference.current===null||M!==null&&!ce(M))&&p.refs.setReference(M)},[p.refs]),T=I.useMemo(()=>({...p.refs,setReference:y,setPositionReference:g,domReference:h}),[p.refs,y,g]),D=I.useMemo(()=>({...p.elements,domReference:d}),[p.elements,d]),w=I.useMemo(()=>({...p,...r,refs:T,elements:D,nodeId:t}),[p,T,D,t,r]);return $o(()=>{r.dataRef.current.floatingContext=w;const M=E==null?void 0:E.nodesRef.current.find(L=>L.id===t);M&&(M.context=w)}),I.useMemo(()=>({...p,context:w,refs:T,elements:D}),[p,T,D,w])}const ai="active",li="selected";function Jr(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[ai]:i,[li]:a,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1,[Eh]:""},...s,...t.map(i=>{const a=i?i[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[u,d]=l;if(!(o&&[ai,li].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof d=="function"){var h;(h=r.get(u))==null||h.push(d),i[u]=function(){for(var E,p=arguments.length,g=new Array(p),y=0;y<p;y++)g[y]=arguments[y];return(E=r.get(u))==null?void 0:E.map(T=>T(...g)).find(T=>T!==void 0)}}}else i[u]=d}),i),{})}}function Sh(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=I.useCallback(a=>Jr(a,e,"reference"),t),s=I.useCallback(a=>Jr(a,e,"floating"),n),i=I.useCallback(a=>Jr(a,e,"item"),r);return I.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}function ci(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const kh=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:o,offset:s=0,index:i=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:u,...d}=xn(e,t),{rects:h,elements:{floating:E}}=t,p=n.current[i],g=(u==null?void 0:u.current)||E,y=E.clientTop||g.clientTop,T=E.clientTop!==0,D=g.clientTop!==0,w=E===g;if(process.env.NODE_ENV!=="production"&&(t.placement.startsWith("bottom")||mh('`placement` side must be "bottom" when using the `inner`',"middleware.")),!p)return{};const M={...t,...await qo(-p.offsetTop-E.clientTop-h.reference.height/2-p.offsetHeight/2-s).fn(t)},L=await Ur(ci(M,g.scrollHeight+y+E.clientTop),d),H=await Ur(M,{...d,elementContext:"reference"}),j=Ee(0,L.top),U=M.y+j,b=(g.scrollHeight>g.clientHeight?x=>x:Nn)(Ee(0,g.scrollHeight+(T&&w||D?y*2:0)-j-Ee(0,L.bottom)));if(g.style.maxHeight=b+"px",g.scrollTop=j,o){const x=g.offsetHeight<p.offsetHeight*Vt(a,n.current.length)-1||H.top>=-l||H.bottom>=-l;Dn.flushSync(()=>o(x))}return r&&(r.current=await Ur(ci({...M,y:U},g.offsetHeight+y+E.clientTop),d)),{y:U}}});function Ah(e,t){const{open:n,elements:r}=e,{enabled:o=!0,overflowRef:s,scrollRef:i,onChange:a}=t,l=ul(a),u=I.useRef(!1),d=I.useRef(null),h=I.useRef(null);I.useEffect(()=>{if(!o)return;function p(y){if(y.ctrlKey||!g||s.current==null)return;const T=y.deltaY,D=s.current.top>=-.5,w=s.current.bottom>=-.5,M=g.scrollHeight-g.clientHeight,L=T<0?-1:1,H=T<0?"max":"min";g.scrollHeight<=g.clientHeight||(!D&&T>0||!w&&T<0?(y.preventDefault(),Dn.flushSync(()=>{l(j=>j+Math[H](T,M*L))})):/firefox/i.test(lh())&&(g.scrollTop+=T))}const g=(i==null?void 0:i.current)||r.floating;if(n&&g)return g.addEventListener("wheel",p),requestAnimationFrame(()=>{d.current=g.scrollTop,s.current!=null&&(h.current={...s.current})}),()=>{d.current=null,h.current=null,g.removeEventListener("wheel",p)}},[o,n,r.floating,s,i,l]);const E=I.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const p=(i==null?void 0:i.current)||r.floating;if(!(!s.current||!p||!u.current)){if(d.current!==null){const g=p.scrollTop-d.current;(s.current.bottom<-.5&&g<-1||s.current.top<-.5&&g>1)&&Dn.flushSync(()=>l(y=>y+g))}requestAnimationFrame(()=>{d.current=p.scrollTop})}}}),[r.floating,l,s,i]);return I.useMemo(()=>o?{floating:E}:{},[o,E])}let Cn=S.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Cn.displayName="FloatingContext";let os=S.createContext(null);os.displayName="PlacementContext";function Oh(e){return S.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function Th(){return S.useContext(Cn).setReference}function Fh(){return S.useContext(Cn).getReferenceProps}function Ph(){let{getFloatingProps:e,slot:t}=S.useContext(Cn);return S.useCallback((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}function Mh(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=S.useContext(os),n=S.useMemo(()=>e,[JSON.stringify(e,(o,s)=>{var i;return(i=s==null?void 0:s.outerHTML)!=null?i:s})]);be(()=>{t==null||t(n??null)},[t,n]);let r=S.useContext(Cn);return S.useMemo(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}let ui=4;function Ih({children:e,enabled:t=!0}){let[n,r]=S.useState(null),[o,s]=S.useState(0),i=S.useRef(null),[a,l]=S.useState(null);Dh(a);let u=t&&n!==null&&a!==null,{to:d="bottom",gap:h=0,offset:E=0,padding:p=0,inner:g}=Nh(n,a),[y,T="center"]=d.split(" ");be(()=>{u&&s(0)},[u]);let{refs:D,floatingStyles:w,context:M}=Ch({open:u,placement:y==="selection"?T==="center"?"bottom":`bottom-${T}`:T==="center"?`${y}`:`${y}-${T}`,strategy:"absolute",transform:!1,middleware:[qo({mainAxis:y==="selection"?0:h,crossAxis:E}),na({padding:p}),y!=="selection"&&ra({padding:p}),y==="selection"&&g?kh({...g,padding:p,overflowRef:i,offset:o,minItemsVisible:ui,referenceOverflowThreshold:p,onFallbackChange(x){var R,k;if(!x)return;let A=M.elements.floating;if(!A)return;let m=parseFloat(getComputedStyle(A).scrollPaddingBottom)||0,C=Math.min(ui,A.childElementCount),F=0,v=0;for(let P of(k=(R=M.elements.floating)==null?void 0:R.childNodes)!=null?k:[])if(P instanceof HTMLElement){let $=P.offsetTop,W=$+P.clientHeight+m,B=A.scrollTop,_=B+A.clientHeight;if($>=B&&W<=_)C--;else{v=Math.max(0,Math.min(W,_)-Math.max($,B)),F=P.clientHeight;break}}C>=1&&s(P=>{let $=F*C-v+m;return P>=$?P:$})}}):null,hu({padding:p,apply({availableWidth:x,availableHeight:R,elements:k}){Object.assign(k.floating.style,{overflow:"auto",maxWidth:`${x}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${R}px)`})}})].filter(Boolean),whileElementsMounted:Zi}),[L=y,H=T]=M.placement.split("-");y==="selection"&&(L="selection");let j=S.useMemo(()=>({anchor:[L,H].filter(Boolean).join(" ")}),[L,H]),U=Ah(M,{overflowRef:i,onChange:s}),{getReferenceProps:c,getFloatingProps:f}=Sh([U]),b=ae(x=>{l(x),D.setFloating(x)});return I.createElement(os.Provider,{value:r},I.createElement(Cn.Provider,{value:{setFloating:b,setReference:D.setReference,styles:w,getReferenceProps:c,getFloatingProps:f,slot:j}},e))}function Dh(e){be(()=>{if(!e)return;let t=new MutationObserver(()=>{let n=window.getComputedStyle(e).maxHeight,r=parseFloat(n);if(isNaN(r))return;let o=parseInt(n);isNaN(o)||r!==o&&(e.style.maxHeight=`${Math.ceil(r)}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function Nh(e,t){var n,r,o;let s=Zr((n=e==null?void 0:e.gap)!=null?n:"var(--anchor-gap, 0)",t),i=Zr((r=e==null?void 0:e.offset)!=null?r:"var(--anchor-offset, 0)",t),a=Zr((o=e==null?void 0:e.padding)!=null?o:"var(--anchor-padding, 0)",t);return{...e,gap:s,offset:i,padding:a}}function Zr(e,t,n=void 0){let r=En(),o=ae((l,u)=>{if(l==null)return[n,null];if(typeof l=="number")return[l,null];if(typeof l=="string"){if(!u)return[n,null];let d=fi(l,u);return[d,h=>{let E=fl(l);{let p=E.map(g=>window.getComputedStyle(u).getPropertyValue(g));r.requestAnimationFrame(function g(){r.nextFrame(g);let y=!1;for(let[D,w]of E.entries()){let M=window.getComputedStyle(u).getPropertyValue(w);if(p[D]!==M){p[D]=M,y=!0;break}}if(!y)return;let T=fi(l,u);d!==T&&(h(T),d=T)})}return r.dispose}]}return[n,null]}),s=S.useMemo(()=>o(e,t)[0],[e,t]),[i=s,a]=S.useState();return be(()=>{let[l,u]=o(e,t);if(a(l),!!u)return u(a)},[e,t]),i}function fl(e){let t=/var\((.*)\)/.exec(e);if(t){let n=t[1].indexOf(",");if(n===-1)return[t[1]];let r=t[1].slice(0,n).trim(),o=t[1].slice(n+1).trim();return o?[r,...fl(o)]:[r]}return[]}function fi(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}function Lh(e,t){let[n,r]=S.useState(t);return!e&&n!==t&&r(t),e?n:t}let ss=S.createContext(null);ss.displayName="OpenClosedContext";var Hn=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Hn||{});function $h(){return S.useContext(ss)}function jh({value:e,children:t}){return S.createElement(ss.Provider,{value:e},t)}function Bh(e){throw new Error("Unexpected object: "+e)}var me=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(me||{});function eo(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=r??-1;switch(e.focus){case 0:{for(let s=0;s<n.length;++s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 1:{o===-1&&(o=n.length);for(let s=o-1;s>=0;--s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 2:{for(let s=o+1;s<n.length;++s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 3:{for(let s=n.length-1;s>=0;--s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 4:{for(let s=0;s<n.length;++s)if(t.resolveId(n[s],s,n)===e.id)return s;return r}case 5:return null;default:Bh(e)}}function Hh(e){let t=ae(e),n=S.useRef(!1);S.useEffect(()=>(n.current=!1,()=>{n.current=!0,Ga(()=>{n.current&&t()})}),[t])}function Uh(){let e=typeof document>"u";return"useSyncExternalStore"in I?(t=>t.useSyncExternalStore)(I)(()=>()=>{},()=>!1,()=>!e):!1}function Wh(){let e=Uh(),[t,n]=I.useState(zt.isHandoffComplete);return t&&zt.isHandoffComplete===!1&&n(!1),I.useEffect(()=>{t!==!0&&n(!0)},[t]),I.useEffect(()=>zt.handoff(),[]),e?!1:t}let qh=S.createContext(!1);function Gh(){return S.useContext(qh)}function zh(e){let t=Gh(),n=S.useContext(hl),[r,o]=S.useState(()=>{var s;if(!t&&n!==null)return(s=n.current)!=null?s:null;if(zt.isServer)return null;let i=e==null?void 0:e.getElementById("headlessui-portal-root");if(i)return i;if(e===null)return null;let a=e.createElement("div");return a.setAttribute("id","headlessui-portal-root"),e.body.appendChild(a)});return S.useEffect(()=>{r!==null&&(e!=null&&e.body.contains(r)||e==null||e.body.appendChild(r))},[r,e]),S.useEffect(()=>{t||n!==null&&o(n.current)},[n,o,t]),r}let dl=S.Fragment,Vh=Ye(function(e,t){let{ownerDocument:n=null,...r}=e,o=S.useRef(null),s=st(bd(p=>{o.current=p}),t),i=Lo(o),a=n??i,l=zh(a),[u]=S.useState(()=>{var p;return zt.isServer?null:(p=a==null?void 0:a.createElement("div"))!=null?p:null}),d=S.useContext(Xh),h=Wh();be(()=>{!l||!u||l.contains(u)||(u.setAttribute("data-headlessui-portal",""),l.appendChild(u))},[l,u]),be(()=>{if(u&&d)return d.register(u)},[d,u]),Hh(()=>{var p;!l||!u||(u instanceof Node&&l.contains(u)&&l.removeChild(u),l.childNodes.length<=0&&((p=l.parentElement)==null||p.removeChild(l)))});let E=Ke();return h?!l||!u?null:nt.createPortal(E({ourProps:{ref:s},theirProps:r,slot:{},defaultTag:dl,name:"Portal"}),u):null});function Qh(e,t){let n=st(t),{enabled:r=!0,ownerDocument:o,...s}=e,i=Ke();return r?S.createElement(Vh,{...s,ownerDocument:o,ref:n}):i({ourProps:{ref:n},theirProps:s,slot:{},defaultTag:dl,name:"Portal"})}let Kh=S.Fragment,hl=S.createContext(null);function Yh(e,t){let{target:n,...r}=e,o={ref:st(t)},s=Ke();return S.createElement(hl.Provider,{value:n},s({ourProps:o,theirProps:r,defaultTag:Kh,name:"Popover.Group"}))}let Xh=S.createContext(null),_h=Ye(Qh),Jh=Ye(Yh),Zh=Object.assign(_h,{Group:Jh});function ep(e,t){let n=S.useRef({left:0,top:0});if(be(()=>{if(!t)return;let o=t.getBoundingClientRect();o&&(n.current=o)},[e,t]),t==null||!e||t===document.activeElement)return!1;let r=t.getBoundingClientRect();return r.top!==n.current.top||r.left!==n.current.left}let di=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function hi(e){var t,n;let r=(t=e.innerText)!=null?t:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return r;let s=!1;for(let a of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),s=!0;let i=s?(n=o.innerText)!=null?n:"":r;return di.test(i)&&(i=i.replace(di,"")),i}function tp(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(o=>{let s=document.getElementById(o);if(s){let i=s.getAttribute("aria-label");return typeof i=="string"?i.trim():hi(s).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return hi(e).trim()}function np(e){let t=S.useRef(""),n=S.useRef("");return ae(()=>{let r=e.current;if(!r)return"";let o=r.innerText;if(t.current===o)return n.current;let s=tp(r).trim().toLowerCase();return t.current=o,n.current=s,s})}var rp=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(rp||{}),op=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(op||{}),sp=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(sp||{}),ip=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetOptionsElement=8]="SetOptionsElement",e))(ip||{});function to(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=al(t(e.options.slice()),s=>s.dataRef.current.domRef.current),o=n?r.indexOf(n):null;return o===-1&&(o=null),{options:r,activeOptionIndex:o}}let ap={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1,__demoMode:!1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,r=e.options.findIndex(o=>n(o.dataRef.current.value));return r!==-1&&(t=r),{...e,listboxState:0,activeOptionIndex:t,__demoMode:!1}},2(e,t){var n,r,o,s,i;if(e.dataRef.current.disabled||e.listboxState===1)return e;let a={...e,searchQuery:"",activationTrigger:(n=t.trigger)!=null?n:1,__demoMode:!1};if(t.focus===me.Nothing)return{...a,activeOptionIndex:null};if(t.focus===me.Specific)return{...a,activeOptionIndex:e.options.findIndex(d=>d.id===t.id)};if(t.focus===me.Previous){let d=e.activeOptionIndex;if(d!==null){let h=e.options[d].dataRef.current.domRef,E=eo(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(E!==null){let p=e.options[E].dataRef.current.domRef;if(((r=h.current)==null?void 0:r.previousElementSibling)===p.current||((o=p.current)==null?void 0:o.previousElementSibling)===null)return{...a,activeOptionIndex:E}}}}else if(t.focus===me.Next){let d=e.activeOptionIndex;if(d!==null){let h=e.options[d].dataRef.current.domRef,E=eo(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(E!==null){let p=e.options[E].dataRef.current.domRef;if(((s=h.current)==null?void 0:s.nextElementSibling)===p.current||((i=p.current)==null?void 0:i.nextElementSibling)===null)return{...a,activeOptionIndex:E}}}}let l=to(e),u=eo(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});return{...a,...l,activeOptionIndex:u}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let n=e.searchQuery!==""?0:1,r=e.searchQuery+t.value.toLowerCase(),o=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find(i=>{var a;return!i.dataRef.current.disabled&&((a=i.dataRef.current.textValue)==null?void 0:a.startsWith(r))}),s=o?e.options.indexOf(o):-1;return s===-1||s===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:s,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=to(e,o=>[...o,n]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n)),{...e,...r}},6:(e,t)=>{let n=to(e,r=>{let o=r.findIndex(s=>s.id===t.id);return o!==-1&&r.splice(o,1),r});return{...e,...n,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},is=S.createContext(null);is.displayName="ListboxActionsContext";function Mr(e){let t=S.useContext(is);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Mr),n}return t}let Ir=S.createContext(null);Ir.displayName="ListboxDataContext";function Xn(e){let t=S.useContext(Ir);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Xn),n}return t}function lp(e,t){return ft(t.type,ap,e,t)}let cp=S.Fragment;function up(e,t){var n;let r=Zo(),{value:o,defaultValue:s,form:i,name:a,onChange:l,by:u,invalid:d=!1,disabled:h=r||!1,horizontal:E=!1,multiple:p=!1,__demoMode:g=!1,...y}=e;const T=E?"horizontal":"vertical";let D=st(t),w=id(s),[M=p?[]:void 0,L]=sd(o,l,w),[H,j]=S.useReducer(lp,{dataRef:S.createRef(),listboxState:g?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,buttonElement:null,optionsElement:null,__demoMode:g}),U=S.useRef({static:!1,hold:!1}),c=S.useRef(new Map),f=Ad(u),b=S.useCallback(G=>ft(x.mode,{1:()=>M.some(z=>f(z,G)),0:()=>f(M,G)}),[M]),x=S.useMemo(()=>({...H,value:M,disabled:h,invalid:d,mode:p?1:0,orientation:T,compare:f,isSelected:b,optionsPropsRef:U,listRef:c}),[M,h,d,p,H,c]);be(()=>{H.dataRef.current=x},[x]);let R=x.listboxState===0;Vd(R,[x.buttonElement,x.optionsElement],(G,z)=>{var X;j({type:1}),il(z,rs.Loose)||(G.preventDefault(),(X=x.buttonElement)==null||X.focus())});let k=S.useMemo(()=>({open:x.listboxState===0,disabled:h,invalid:d,value:M}),[x,h,M,d]),A=ae(G=>{let z=x.options.find(X=>X.id===G);z&&W(z.dataRef.current.value)}),m=ae(()=>{if(x.activeOptionIndex!==null){let{dataRef:G,id:z}=x.options[x.activeOptionIndex];W(G.current.value),j({type:2,focus:me.Specific,id:z})}}),C=ae(()=>j({type:0})),F=ae(()=>j({type:1})),v=En(),P=ae((G,z,X)=>{v.dispose(),v.microTask(()=>G===me.Specific?j({type:2,focus:me.Specific,id:z,trigger:X}):j({type:2,focus:G,trigger:X}))}),$=ae((G,z)=>(j({type:5,id:G,dataRef:z}),()=>j({type:6,id:G}))),W=ae(G=>ft(x.mode,{0(){return L==null?void 0:L(G)},1(){let z=x.value.slice(),X=z.findIndex(ne=>f(ne,G));return X===-1?z.push(G):z.splice(X,1),L==null?void 0:L(z)}})),B=ae(G=>j({type:3,value:G})),_=ae(()=>j({type:4})),q=ae(G=>{j({type:7,element:G})}),Y=ae(G=>{j({type:8,element:G})}),J=S.useMemo(()=>({onChange:W,registerOption:$,goToOption:P,closeListbox:F,openListbox:C,selectActiveOption:m,selectOption:A,search:B,clearSearch:_,setButtonElement:q,setOptionsElement:Y}),[]),[ee,ve]=Ed({inherit:!0}),Re={ref:D},Ce=S.useCallback(()=>{if(w!==void 0)return L==null?void 0:L(w)},[L,w]),Z=Ke();return S.createElement(ve,{value:ee,props:{htmlFor:(n=x.buttonElement)==null?void 0:n.id},slot:{open:x.listboxState===0,disabled:h}},S.createElement(Ih,null,S.createElement(is.Provider,{value:J},S.createElement(Ir.Provider,{value:x},S.createElement(jh,{value:ft(x.listboxState,{0:Hn.Open,1:Hn.Closed})},a!=null&&M!=null&&S.createElement(dd,{disabled:h,data:{[a]:M},form:i,onReset:Ce}),Z({ourProps:Re,theirProps:y,slot:k,defaultTag:cp,name:"Listbox"}))))))}let fp="button";function dp(e,t){var n;let r=Xn("Listbox.Button"),o=Mr("Listbox.Button"),s=S.useId(),i=_a(),{id:a=i||`headlessui-listbox-button-${s}`,disabled:l=r.disabled||!1,autoFocus:u=!1,...d}=e,h=st(t,Th(),o.setButtonElement),E=Fh(),p=ae(x=>{switch(x.key){case ge.Enter:ad(x.currentTarget);break;case ge.Space:case ge.ArrowDown:x.preventDefault(),nt.flushSync(()=>o.openListbox()),r.value||o.goToOption(me.First);break;case ge.ArrowUp:x.preventDefault(),nt.flushSync(()=>o.openListbox()),r.value||o.goToOption(me.Last);break}}),g=ae(x=>{switch(x.key){case ge.Space:x.preventDefault();break}}),y=ae(x=>{var R;if(md(x.currentTarget))return x.preventDefault();r.listboxState===0?(nt.flushSync(()=>o.closeListbox()),(R=r.buttonElement)==null||R.focus({preventScroll:!0})):(x.preventDefault(),o.openListbox())}),T=ae(x=>x.preventDefault()),D=tl([a]),w=vd(),{isFocusVisible:M,focusProps:L}=Vf({autoFocus:u}),{isHovered:H,hoverProps:j}=zf({isDisabled:l}),{pressed:U,pressProps:c}=Jf({disabled:l}),f=S.useMemo(()=>({open:r.listboxState===0,active:U||r.listboxState===0,disabled:l,invalid:r.invalid,value:r.value,hover:H,focus:M,autofocus:u}),[r.listboxState,r.value,l,H,M,U,r.invalid,u]),b=Va(E(),{ref:h,id:a,type:Qd(e,r.buttonElement),"aria-haspopup":"listbox","aria-controls":(n=r.optionsElement)==null?void 0:n.id,"aria-expanded":r.listboxState===0,"aria-labelledby":D,"aria-describedby":w,disabled:l||void 0,autoFocus:u,onKeyDown:p,onKeyUp:g,onKeyPress:T,onClick:y},L,j,c);return Ke()({ourProps:b,theirProps:d,slot:f,defaultTag:fp,name:"Listbox.Button"})}let pl=S.createContext(!1),hp="div",pp=Mo.RenderStrategy|Mo.Static;function mp(e,t){var n,r;let o=S.useId(),{id:s=`headlessui-listbox-options-${o}`,anchor:i,portal:a=!1,modal:l=!0,transition:u=!1,...d}=e,h=Oh(i),[E,p]=S.useState(null);h&&(a=!0);let g=Xn("Listbox.Options"),y=Mr("Listbox.Options"),T=Lo(g.buttonElement),D=Lo(g.optionsElement),w=$h(),[M,L]=oh(u,E,w!==null?(w&Hn.Open)===Hn.Open:g.listboxState===0);Id(M,g.buttonElement,y.closeListbox);let H=g.__demoMode?!1:l&&g.listboxState===0;Zd(H,D);let j=g.__demoMode?!1:l&&g.listboxState===0;Md(j,{allowed:S.useCallback(()=>[g.buttonElement,g.optionsElement],[g.buttonElement,g.optionsElement])});let U=g.listboxState!==0,c=ep(U,g.buttonElement)?!1:M,f=M&&g.listboxState===1,b=Lh(f,g.value),x=ae(q=>g.compare(b,q)),R=S.useMemo(()=>{var q;if(h==null||!((q=h==null?void 0:h.to)!=null&&q.includes("selection")))return null;let Y=g.options.findIndex(J=>x(J.dataRef.current.value));return Y===-1&&(Y=0),Y},[h,g.options]),k=(()=>{if(h==null)return;if(R===null)return{...h,inner:void 0};let q=Array.from(g.listRef.current.values());return{...h,inner:{listRef:{current:q},index:R}}})(),[A,m]=Mh(k),C=Ph(),F=st(t,h?A:null,y.setOptionsElement,p),v=En();S.useEffect(()=>{var q;let Y=g.optionsElement;Y&&g.listboxState===0&&Y!==((q=Yn(Y))==null?void 0:q.activeElement)&&(Y==null||Y.focus({preventScroll:!0}))},[g.listboxState,g.optionsElement]);let P=ae(q=>{var Y,J;switch(v.dispose(),q.key){case ge.Space:if(g.searchQuery!=="")return q.preventDefault(),q.stopPropagation(),y.search(q.key);case ge.Enter:if(q.preventDefault(),q.stopPropagation(),g.activeOptionIndex!==null){let{dataRef:ee}=g.options[g.activeOptionIndex];y.onChange(ee.current.value)}g.mode===0&&(nt.flushSync(()=>y.closeListbox()),(Y=g.buttonElement)==null||Y.focus({preventScroll:!0}));break;case ft(g.orientation,{vertical:ge.ArrowDown,horizontal:ge.ArrowRight}):return q.preventDefault(),q.stopPropagation(),y.goToOption(me.Next);case ft(g.orientation,{vertical:ge.ArrowUp,horizontal:ge.ArrowLeft}):return q.preventDefault(),q.stopPropagation(),y.goToOption(me.Previous);case ge.Home:case ge.PageUp:return q.preventDefault(),q.stopPropagation(),y.goToOption(me.First);case ge.End:case ge.PageDown:return q.preventDefault(),q.stopPropagation(),y.goToOption(me.Last);case ge.Escape:q.preventDefault(),q.stopPropagation(),nt.flushSync(()=>y.closeListbox()),(J=g.buttonElement)==null||J.focus({preventScroll:!0});return;case ge.Tab:q.preventDefault(),q.stopPropagation(),nt.flushSync(()=>y.closeListbox()),Ud(g.buttonElement,q.shiftKey?No.Previous:No.Next);break;default:q.key.length===1&&(y.search(q.key),v.setTimeout(()=>y.clearSearch(),350));break}}),$=(n=g.buttonElement)==null?void 0:n.id,W=S.useMemo(()=>({open:g.listboxState===0}),[g.listboxState]),B=Va(h?C():{},{id:s,ref:F,"aria-activedescendant":g.activeOptionIndex===null||(r=g.options[g.activeOptionIndex])==null?void 0:r.id,"aria-multiselectable":g.mode===1?!0:void 0,"aria-labelledby":$,"aria-orientation":g.orientation,onKeyDown:P,role:"listbox",tabIndex:g.listboxState===0?0:void 0,style:{...d.style,...m,"--button-width":Td(g.buttonElement,!0).width},...rh(L)}),_=Ke();return S.createElement(Zh,{enabled:a?e.static||M:!1,ownerDocument:T},S.createElement(Ir.Provider,{value:g.mode===1?g:{...g,isSelected:x}},_({ourProps:B,theirProps:d,slot:W,defaultTag:hp,features:pp,visible:c,name:"Listbox.Options"})))}let gp="div";function bp(e,t){let n=S.useId(),{id:r=`headlessui-listbox-option-${n}`,disabled:o=!1,value:s,...i}=e,a=S.useContext(pl)===!0,l=Xn("Listbox.Option"),u=Mr("Listbox.Option"),d=l.activeOptionIndex!==null?l.options[l.activeOptionIndex].id===r:!1,h=l.isSelected(s),E=S.useRef(null),p=np(E),g=Rn({disabled:o,value:s,domRef:E,get textValue(){return p()}}),y=st(t,E,f=>{f?l.listRef.current.set(r,f):l.listRef.current.delete(r)});be(()=>{if(!l.__demoMode&&l.listboxState===0&&d&&l.activationTrigger!==0)return pt().requestAnimationFrame(()=>{var f,b;(b=(f=E.current)==null?void 0:f.scrollIntoView)==null||b.call(f,{block:"nearest"})})},[E,d,l.__demoMode,l.listboxState,l.activationTrigger,l.activeOptionIndex]),be(()=>{if(!a)return u.registerOption(r,g)},[g,r,a]);let T=ae(f=>{var b;if(o)return f.preventDefault();u.onChange(s),l.mode===0&&(nt.flushSync(()=>u.closeListbox()),(b=l.buttonElement)==null||b.focus({preventScroll:!0}))}),D=ae(()=>{if(o)return u.goToOption(me.Nothing);u.goToOption(me.Specific,r)}),w=eh(),M=ae(f=>{w.update(f),!o&&(d||u.goToOption(me.Specific,r,0))}),L=ae(f=>{w.wasMoved(f)&&(o||d||u.goToOption(me.Specific,r,0))}),H=ae(f=>{w.wasMoved(f)&&(o||d&&u.goToOption(me.Nothing))}),j=S.useMemo(()=>({active:d,focus:d,selected:h,disabled:o,selectedOption:h&&a}),[d,h,o,a]),U=a?{}:{id:r,ref:y,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":h,disabled:void 0,onClick:T,onFocus:D,onPointerEnter:M,onMouseEnter:M,onPointerMove:L,onMouseMove:L,onPointerLeave:H,onMouseLeave:H},c=Ke();return!h&&a?null:c({ourProps:U,theirProps:i,slot:j,defaultTag:gp,name:"Listbox.Option"})}let vp=S.Fragment;function yp(e,t){let{options:n,placeholder:r,...o}=e,s={ref:st(t)},i=Xn("ListboxSelectedOption"),a=S.useMemo(()=>({}),[]),l=i.value===void 0||i.value===null||i.mode===1&&Array.isArray(i.value)&&i.value.length===0,u=Ke();return S.createElement(pl.Provider,{value:!0},u({ourProps:s,theirProps:{...o,children:S.createElement(S.Fragment,null,r&&l?r:n)},slot:a,defaultTag:vp,name:"ListboxSelectedOption"}))}let wp=Ye(up),ml=Ye(dp),xp=nl,gl=Ye(mp),bl=Ye(bp),Ep=Ye(yp),Rp=Object.assign(wp,{Button:ml,Label:xp,Options:gl,Option:bl,SelectedOption:Ep});function vl(e={}){const{activeAddress:t,algodClient:n}=dt.useWallet(),{enabled:r=!0}=e;return Ko({queryKey:["account-info",t],queryFn:async()=>{if(!t||!n)return null;try{return await n.accountInformation(t).do()}catch(o){throw new Error(`Error fetching account information: ${o}`)}},enabled:r&&!!t&&!!n,refetchOnWindowFocus:!0})}const Cp=()=>new af({defaultOptions:{queries:{staleTime:5*60*1e3,gcTime:60*60*1e3,refetchOnWindowFocus:!0,refetchInterval:10*60*1e3,retry:(e,t)=>t instanceof Error&&t.message.includes("404")?!1:e<3}}}),yl=S.createContext(void 0);function Sp({enabled:e,nfdView:t}){const n=Fa(),{activeAddress:r,activeWallet:o,algodClient:s}=dt.useWallet(),{activeNetwork:i}=dt.useNetwork(),a=S.useRef(null);return S.useEffect(()=>{if(!e){a.current=r;return}const l=a.current===null&&r!==null&&o!==null&&o.accounts!==void 0&&o.accounts.length>0&&s!==void 0;if(a.current=r,!l)return;console.log(`[WalletUI] Prefetching data for all accounts in wallet ${o.id}`);const u=o.accounts.map(d=>d.address);if(u.length>0){const h=[];for(let E=0;E<u.length;E+=20)h.push(u.slice(E,E+20));h.forEach(async E=>{const g=i==="testnet"?"https://api.testnet.nf.domains":"https://api.nf.domains",y=new URLSearchParams;E.forEach(T=>{y.append("address",T)}),y.append("view",t);try{const T=await fetch(`${g}/nfd/lookup?${y.toString()}`,{method:"GET",headers:{Accept:"application/json"}});if(!T.ok&&T.status!==404)throw new Error(`NFD prefetch lookup failed: ${T.statusText}`);const D=T.status===404?{}:await T.json();E.forEach(w=>{const M=D[w]||null;n.setQueryData(["nfd",w,i,t],M)})}catch(T){console.error("Error prefetching NFD data:",T)}})}u.forEach(d=>{n.prefetchQuery({queryKey:["account-balance",d],queryFn:async()=>{try{const h=await s.accountInformation(d).do();return Number(h.amount)}catch(h){throw new Error(`Error fetching account balance: ${h}`)}}})})},[r,o,i,t,s,n,e]),null}function kp({children:e,queryClient:t,enablePrefetching:n=!0,prefetchNfdView:r="thumbnail"}){const o=S.useMemo(()=>t||Cp(),[t]),s=S.useMemo(()=>({queryClient:o}),[o]),i=N.jsxs(yl.Provider,{value:s,children:[N.jsx(Sp,{enabled:n,nfdView:r}),e]});return t?i:N.jsx(Pa,{client:o,children:i})}function wl(){const e=S.useContext(yl);if(e===void 0)throw new Error("useWalletUI must be used within a WalletUIProvider");return e}function Ap({className:e,scale:t=.85}){return N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:en("inline-block align-baseline",e),style:{width:`${t}em`,height:`${t}em`},"aria-label":"Algorand",fill:"currentColor","data-wallet-ui":!0,children:N.jsx("path",{d:"M23.98 23.99h-3.75l-2.44-9.07-5.25 9.07H8.34l8.1-14.04-1.3-4.88L4.22 24H.02L13.88 0h3.67l1.61 5.96h3.79l-2.59 4.5 3.62 13.53z"})})}function Op({children:e}){var k;const{activeAddress:t,activeWallet:n}=dt.useWallet(),[r,o]=S.useState(!1),[s,i]=S.useState(!1),[a,l]=S.useState(()=>{const A=localStorage.getItem("uwui:balance-preference");return A?A==="available":!1}),u=Yo({enabled:!!t}),d=((k=u.data)==null?void 0:k.name)??null,{data:h}=vl({enabled:!!t}),E=S.useMemo(()=>!h||h.amount===void 0?null:Number(h.amount)/1e6,[h]),p=S.useMemo(()=>{if(!h||h.amount===void 0||h.minBalance===void 0)return null;const A=Number(h.amount)-Number(h.minBalance);return Math.max(0,A/1e6)},[h]),g=a?p:E,{refs:y,floatingStyles:T,context:D}=ga({open:r,onOpenChange:o,placement:"bottom-end",middleware:[qo(8),ra(),na()],whileElementsMounted:Zi}),w=pa(D),M=ma(D,{outsidePressEvent:"mousedown"}),{getReferenceProps:L,getFloatingProps:H}=ba([w,M]),j=vn(),U=()=>{t&&(navigator.clipboard.writeText(t),i(!0),setTimeout(()=>i(!1),2e3))},c=async()=>{if(n)try{await n.disconnect(),o(!1)}catch(A){console.error("Error disconnecting wallet:",A)}},f=A=>{n&&n.setActiveAccount&&n.setActiveAccount(A)},b=()=>{const A=!a;l(A),localStorage.setItem("uwui:balance-preference",A?"available":"total")},x=e||N.jsx(Fr,{}),R=S.cloneElement(x,L({ref:y.setReference}));return N.jsxs(N.Fragment,{children:[R,r&&N.jsx(fa,{children:N.jsx(ha,{context:D,modal:!1,children:N.jsx("div",{"data-wallet-ui":!0,children:N.jsx("div",{ref:y.setFloating,style:T,...H(),"aria-labelledby":j,className:"z-50 w-80 rounded-xl bg-white dark:bg-[#001324] shadow-xl border border-gray-200 dark:border-[#192A39]",children:N.jsxs("div",{className:"p-4",children:[N.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[N.jsx("div",{className:"h-12 w-12 overflow-hidden",children:N.jsx(Xo,{nfd:u.data,alt:`${d||t} avatar`,size:48})}),N.jsxs("div",{children:[N.jsx("h3",{id:j,className:"text-lg font-bold text-gray-900 dark:text-[#E9E9FD] max-w-[220px] truncate wallet-custom-font",children:d||(t?On(t,6,4):"My Wallet")}),d&&t&&N.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:On(t,6,4)})]})]}),N.jsx("div",{className:"mb-4 bg-gray-50 dark:bg-[#101B29] rounded-lg p-3",children:N.jsxs("div",{className:"flex justify-between items-center",children:[g!==null&&N.jsxs("span",{className:"text-base font-medium text-gray-900 dark:text-white flex items-center gap-1",children:[qu(g,{fractionDigits:4}),N.jsx(Ap,{})]}),N.jsxs("button",{onClick:b,className:"flex items-center gap-1 text-sm text-gray-600 dark:text-gray-400 bg-gray-200 dark:bg-[#192A39] py-1 pl-2.5 pr-2 rounded-md hover:bg-gray-300 dark:hover:bg-[#263A4A] transition-colors focus:outline-none",title:a?"Show total balance":"Show available balance",children:[a?"Available":"Total",N.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"ml-0.5 opacity-80",children:[N.jsx("path",{d:"m17 10-5-5-5 5"}),N.jsx("path",{d:"m17 14-5 5-5-5"})]})]})]})}),n&&n.accounts&&n.accounts.length>1&&N.jsx("div",{className:"mb-4",children:N.jsxs(Rp,{value:t||"",onChange:f,children:[N.jsx(nl,{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Select Account"}),N.jsxs("div",{className:"relative mt-1",children:[N.jsxs(ml,{className:"grid w-full cursor-default grid-cols-1 rounded-lg border border-gray-300 dark:border-[#192A39] bg-white dark:bg-[#101B29] py-2 px-3 text-left text-gray-800 dark:text-gray-300 shadow-sm focus:outline-none focus:ring-2 focus:ring-[#2D2DF1] dark:focus:ring-[#BFBFF9] focus:border-transparent text-sm",children:[N.jsx("span",{className:"col-start-1 row-start-1 truncate pr-8",children:t?On(t,6,4):"Select account"}),N.jsx("span",{className:"col-start-1 row-start-1 self-center justify-self-end",children:N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"text-gray-500 dark:text-gray-400","aria-hidden":"true",children:N.jsx("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),N.jsx(gl,{transition:!0,className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white dark:bg-[#101B29] py-1 shadow-lg ring-1 ring-black/5 dark:ring-[#192A39]/50 focus:outline-none text-sm data-[closed]:data-[leave]:opacity-0 data-[leave]:transition data-[leave]:duration-100 data-[leave]:ease-in",children:n.accounts.map(A=>N.jsxs(bl,{value:A.address,className:"group relative cursor-default select-none py-2 pl-3 pr-9 text-gray-900 dark:text-gray-300 data-[focus]:bg-[#E9E9FD] dark:data-[focus]:bg-[#192A39] data-[focus]:text-gray-900 dark:data-[focus]:text-[#E9E9FD] data-[focus]:outline-none",children:[N.jsx("span",{className:"block truncate font-normal group-data-[selected]:font-medium",children:On(A.address,6,4)}),N.jsx("span",{className:"absolute inset-y-0 right-0 flex items-center pr-3 text-[#2D2DF1] dark:text-[#BFBFF9] group-[&:not([data-selected])]:hidden",children:N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"h-5 w-5","aria-hidden":"true",children:N.jsx("path",{d:"M13.3334 4L6.00008 11.3333L2.66675 8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]},A.address))})]})]})}),N.jsx("div",{className:"border-t border-gray-200 dark:border-[#192A39] mt-2 mb-2"}),n&&N.jsxs("div",{className:"mb-2 flex items-center gap-2 px-1 py-0.5",children:[N.jsx("div",{className:"h-5 w-5 overflow-hidden rounded flex items-center justify-center",children:n.metadata.icon?N.jsx("img",{src:n.metadata.icon,alt:`${n.metadata.name} icon`,className:"max-w-full max-h-full"}):N.jsx("div",{className:"h-5 w-5 rounded-full bg-gray-200 dark:bg-[#192A39] flex items-center justify-center",children:N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3 w-3 text-gray-400",viewBox:"0 0 20 20",fill:"currentColor",children:N.jsx("path",{fillRule:"evenodd",d:"M17 9c0-.55-.45-1-1-1h-4c-.55 0-1 .45-1 1v8c0 .55.45 1 1 1h4c.55 0 1-.45 1-1V9zm-1 0v8h-4V9h4zM8 4c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v13c0 .55.45 1 1 1h4c.55 0 1-.45 1-1V4zM3 3h4v14H3V3z",clipRule:"evenodd"})})})}),N.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:n.metadata.name})]}),N.jsx("div",{className:"border-t border-gray-200 dark:border-[#192A39] mb-3 mt-2"}),N.jsxs("div",{className:"flex gap-2",children:[N.jsx("button",{onClick:U,className:"flex-1 py-2 px-4 bg-gray-100 dark:bg-[#192A39] text-gray-700 dark:text-gray-300 font-medium rounded-xl hover:bg-gray-200 dark:hover:bg-[#263A4A] transition-colors text-sm flex items-center justify-center",title:"Copy address",children:s?N.jsxs(N.Fragment,{children:[N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-green-500 mr-1.5",viewBox:"0 0 20 20",fill:"currentColor",children:N.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),"Copied"]}):N.jsxs(N.Fragment,{children:[N.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-1.5",viewBox:"0 0 20 20",fill:"currentColor",children:[N.jsx("path",{d:"M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z"}),N.jsx("path",{d:"M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z"})]}),"Copy"]})}),N.jsx("button",{onClick:c,className:"flex-1 py-2 px-4 bg-red-100 dark:bg-red-900/40 text-red-700 dark:text-red-300 font-medium rounded-xl hover:bg-red-200 dark:hover:bg-red-800/60 transition-colors text-sm",children:"Disconnect"})]})]})})})})})]})}function xl(e){const{queryClient:t}=wl();return N.jsx(Pa,{client:t,children:N.jsx(Op,{...e})})}function Tp(){const{activeAddress:e}=dt.useWallet();return e?N.jsx(xl,{children:N.jsx(Fr,{})}):N.jsx(ya,{})}Rl();exports.ConnectWalletButton=Bo;exports.ConnectWalletMenu=ya;exports.ConnectedWalletButton=Fr;exports.ConnectedWalletMenu=xl;exports.NfdAvatar=Xo;exports.WalletButton=Tp;exports.WalletList=va;exports.WalletUIProvider=kp;exports.useAccountInfo=vl;exports.useNfd=Yo;exports.useWalletUI=wl;
19
+ `))}else{let m=d.props,f=m==null?void 0:m.className,x=typeof f=="function"?(...$)=>oa(f(...$),l.className):oa(f,l.className),b=x?{className:x}:{},E=fc(d.props,Kt(No(l,["ref"])));for(let $ in h)$ in E&&delete h[$];return O.cloneElement(d,Object.assign({},E,h,c,{ref:o(mp(d),c.ref)},b))}return O.createElement(s,Object.assign({},No(l,["ref"]),s!==O.Fragment&&c,s!==O.Fragment&&h),d)}function hp(){let e=O.useRef([]),t=O.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function pp(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function fc(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[o=>{var s;return(s=o==null?void 0:o.preventDefault)==null?void 0:s.call(o)}]);for(let r in n)Object.assign(t,{[r](o,...s){let i=n[r];for(let a of i){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;a(o,...s)}}});return t}function dc(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];for(let r in n)Object.assign(t,{[r](...o){let s=n[r];for(let i of s)i==null||i(...o)}});return t}function et(e){var t;return Object.assign(O.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Kt(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function No(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function mp(e){return O.version.split(".")[0]>="19"?e.props.ref:e.ref}function gp(e,t,n){let[r,o]=O.useState(n),s=e!==void 0,i=O.useRef(s),a=O.useRef(!1),l=O.useRef(!1);return s&&!i.current&&!a.current?(a.current=!0,i.current=s,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!s&&i.current&&!l.current&&(l.current=!0,i.current=s,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[s?e:r,ce(c=>(s||o(c),t==null?void 0:t(c)))]}function vp(e){let[t]=O.useState(e);return t}function hc(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))mc(n,pc(t,r),o);return n}function pc(e,t){return e?e+"["+t+"]":t}function mc(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())mc(e,pc(t,r.toString()),o);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):hc(n,t,e)}function bp(e){var t,n;let r=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(r){for(let o of r.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(n=r.requestSubmit)==null||n.call(r)}}let yp="span";var Ks=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Ks||{});function wp(e,t){var n;let{features:r=1,...o}=e,s={ref:t,"aria-hidden":(r&2)===2?!0:(n=o["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return Ze()({ourProps:s,theirProps:o,slot:{},defaultTag:yp,name:"Hidden"})}let gc=et(wp),xp=O.createContext(null);function Ep({children:e}){let t=O.useContext(xp);if(!t)return O.createElement(O.Fragment,null,e);let{target:n}=t;return n?Bt.createPortal(O.createElement(O.Fragment,null,e),n):null}function Rp({data:e,form:t,disabled:n,onReset:r,overrides:o}){let[s,i]=O.useState(null),a=yr();return O.useEffect(()=>{if(r&&s)return a.addEventListener(s,"reset",r)},[s,t,r]),O.createElement(Ep,null,O.createElement(Cp,{setForm:i,formId:t}),hc(e).map(([l,c])=>O.createElement(gc,{features:Ks.Hidden,...Kt({key:l,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:l,value:c,...o})})))}function Cp({setForm:e,formId:t}){return O.useEffect(()=>{if(t){let n=document.getElementById(t);n&&e(n)}},[e,t]),t?null:O.createElement(gc,{features:Ks.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:n=>{if(!n)return;let r=n.closest("form");r&&e(r)}})}let Sp=O.createContext(void 0);function vc(){return O.useContext(Sp)}function Ys(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function ho(e){return Ys(e)&&"tagName"in e}function Ct(e){return ho(e)&&"accessKey"in e}function wn(e){return ho(e)&&"tabIndex"in e}function Op(e){return ho(e)&&"style"in e}function Ap(e){return Ct(e)&&e.nodeName==="IFRAME"}function bc(e){return Ct(e)&&e.nodeName==="INPUT"}function sa(e){return Ct(e)&&e.nodeName==="LABEL"}function kp(e){return Ct(e)&&e.nodeName==="FIELDSET"}function yc(e){return Ct(e)&&e.nodeName==="LEGEND"}function Tp(e){return ho(e)?e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}function Fp(e){let t=e.parentElement,n=null;for(;t&&!kp(t);)yc(t)&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&Pp(n)?!1:r}function Pp(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(yc(t))return!1;t=t.previousElementSibling}return!0}let wc=Symbol();function $p(e,t=!0){return Object.assign(e,{[wc]:t})}function ht(...e){let t=O.useRef(e);O.useEffect(()=>{t.current=e},[e]);let n=ce(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[wc]))?void 0:n}let Xs=O.createContext(null);Xs.displayName="DescriptionContext";function xc(){let e=O.useContext(Xs);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,xc),t}return e}function Mp(){var e,t;return(t=(e=O.useContext(Xs))==null?void 0:e.value)!=null?t:void 0}let Dp="p";function Ip(e,t){let n=O.useId(),r=Qs(),{id:o=`headlessui-description-${n}`,...s}=e,i=xc(),a=ht(t);xe(()=>i.register(o),[o,i.register]);let l=r||!1,c=O.useMemo(()=>({...i.slot,disabled:l}),[i.slot,l]),d={ref:a,...i.props,id:o};return Ze()({ourProps:d,theirProps:s,slot:c,defaultTag:Dp,name:i.name||"Description"})}let Np=et(Ip);Object.assign(Np,{});var ye=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(ye||{});let po=O.createContext(null);po.displayName="LabelContext";function Ec(){let e=O.useContext(po);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Ec),t}return e}function Rc(e){var t,n,r;let o=(n=(t=O.useContext(po))==null?void 0:t.value)!=null?n:void 0;return((r=e==null?void 0:e.length)!=null?r:0)>0?[o,...e].filter(Boolean).join(" "):o}function Lp({inherit:e=!1}={}){let t=Rc(),[n,r]=O.useState([]),o=e?[t,...n].filter(Boolean):n;return[o.length>0?o.join(" "):void 0,O.useMemo(()=>function(s){let i=ce(l=>(r(c=>[...c,l]),()=>r(c=>{let d=c.slice(),h=d.indexOf(l);return h!==-1&&d.splice(h,1),d}))),a=O.useMemo(()=>({register:i,slot:s.slot,name:s.name,props:s.props,value:s.value}),[i,s.slot,s.name,s.props,s.value]);return O.createElement(po.Provider,{value:a},s.children)},[r])]}let jp="label";function Bp(e,t){var n;let r=O.useId(),o=Ec(),s=vc(),i=Qs(),{id:a=`headlessui-label-${r}`,htmlFor:l=s??((n=o.props)==null?void 0:n.htmlFor),passive:c=!1,...d}=e,h=ht(t);xe(()=>o.register(a),[a,o.register]);let m=ce(E=>{let $=E.currentTarget;if(!(E.target!==E.currentTarget&&Tp(E.target))&&(sa($)&&E.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(E),sa($))){let w=document.getElementById($.htmlFor);if(w){let T=w.getAttribute("disabled");if(T==="true"||T==="")return;let N=w.getAttribute("aria-disabled");if(N==="true"||N==="")return;(bc(w)&&(w.type==="file"||w.type==="radio"||w.type==="checkbox")||w.role==="radio"||w.role==="checkbox"||w.role==="switch")&&w.click(),w.focus({preventScroll:!0})}}}),f=i||!1,x=O.useMemo(()=>({...o.slot,disabled:f}),[o.slot,f]),b={ref:h,...o.props,id:a,htmlFor:l,onClick:m};return c&&("onClick"in b&&(delete b.htmlFor,delete b.onClick),"onClick"in d&&delete d.onClick),Ze()({ourProps:b,theirProps:d,slot:x,defaultTag:l?jp:"div",name:o.name||"Label"})}let Hp=et(Bp),Cc=Object.assign(Hp,{});function Wp(e,t){return e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&"id"in e&&"id"in t?e.id===t.id:e===t}function Up(e=Wp){return O.useCallback((t,n)=>{if(typeof e=="string"){let r=e;return(t==null?void 0:t[r])===(n==null?void 0:n[r])}return e(t,n)},[e])}function Vp(e){if(e===null)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function qp(e,t=!1){let[n,r]=O.useReducer(()=>({}),{}),o=O.useMemo(()=>Vp(e),[e,n]);return xe(()=>{if(!e)return;let s=new ResizeObserver(r);return s.observe(e),()=>{s.disconnect()}},[e]),t?{width:`${o.width}px`,height:`${o.height}px`}:o}let Sc=class extends Map{constructor(t){super(),this.factory=t}get(t){let n=super.get(t);return n===void 0&&(n=this.factory(t),this.set(t,n)),n}};var zp=Object.defineProperty,Gp=(e,t,n)=>t in e?zp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_p=(e,t,n)=>(Gp(e,t+"",n),n),Oc=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Be=(e,t,n)=>(Oc(e,t,"read from private field"),n?n.call(e):t.get(e)),Lo=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},ia=(e,t,n,r)=>(Oc(e,t,"write to private field"),t.set(e,n),n),nt,Jn,Zn;let Ac=class{constructor(t){Lo(this,nt,{}),Lo(this,Jn,new Sc(()=>new Set)),Lo(this,Zn,new Set),_p(this,"disposables",Je()),ia(this,nt,t)}dispose(){this.disposables.dispose()}get state(){return Be(this,nt)}subscribe(t,n){let r={selector:t,callback:n,current:t(Be(this,nt))};return Be(this,Zn).add(r),this.disposables.add(()=>{Be(this,Zn).delete(r)})}on(t,n){return Be(this,Jn).get(t).add(n),this.disposables.add(()=>{Be(this,Jn).get(t).delete(n)})}send(t){let n=this.reduce(Be(this,nt),t);if(n!==Be(this,nt)){ia(this,nt,n);for(let r of Be(this,Zn)){let o=r.selector(Be(this,nt));kc(r.current,o)||(r.current=o,r.callback(o))}for(let r of Be(this,Jn).get(t.type))r(Be(this,nt),t)}}};nt=new WeakMap,Jn=new WeakMap,Zn=new WeakMap;function kc(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null?!1:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:jo(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size!==t.size?!1:jo(e.entries(),t.entries()):aa(e)&&aa(t)?jo(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function jo(e,t){do{let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}while(!0)}function aa(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function Bo(e){let[t,n]=e(),r=Je();return(...o)=>{t(...o),r.dispose(),r.microTask(n)}}var Qp=Object.defineProperty,Kp=(e,t,n)=>t in e?Qp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,la=(e,t,n)=>(Kp(e,typeof t!="symbol"?t+"":t,n),n),Tc=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(Tc||{});let Yp={0(e,t){let n=t.id,r=e.stack,o=e.stack.indexOf(n);if(o!==-1){let s=e.stack.slice();return s.splice(o,1),s.push(n),r=s,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(r===-1)return e;let o=e.stack.slice();return o.splice(r,1),{...e,stack:o}}},Xp=class Fc extends Ac{constructor(){super(...arguments),la(this,"actions",{push:t=>this.send({type:0,id:t}),pop:t=>this.send({type:1,id:t})}),la(this,"selectors",{isTop:(t,n)=>t.stack[t.stack.length-1]===n,inStack:(t,n)=>t.stack.includes(n)})}static new(){return new Fc({stack:[]})}reduce(t,n){return ut(n.type,Yp,t,n)}};const Js=new Sc(()=>Xp.new());var Dr={exports:{}},Ho={};/**
20
+ * @license React
21
+ * use-sync-external-store-with-selector.production.js
22
+ *
23
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
24
+ *
25
+ * This source code is licensed under the MIT license found in the
26
+ * LICENSE file in the root directory of this source tree.
27
+ */var ca;function Jp(){if(ca)return Ho;ca=1;var e=O;function t(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,s=e.useEffect,i=e.useMemo,a=e.useDebugValue;return Ho.useSyncExternalStoreWithSelector=function(l,c,d,h,m){var f=o(null);if(f.current===null){var x={hasValue:!1,value:null};f.current=x}else x=f.current;f=i(function(){function E(I){if(!$){if($=!0,w=I,I=h(I),m!==void 0&&x.hasValue){var j=x.value;if(m(j,I))return T=j}return T=I}if(j=T,n(w,I))return j;var W=h(I);return m!==void 0&&m(j,W)?(w=I,j):(w=I,T=W)}var $=!1,w,T,N=d===void 0?null:d;return[function(){return E(c())},N===null?void 0:function(){return E(N())}]},[c,d,h,m]);var b=r(l,f[0],f[1]);return s(function(){x.hasValue=!0,x.value=b},[b]),a(b),b},Ho}var Wo={};/**
28
+ * @license React
29
+ * use-sync-external-store-with-selector.development.js
30
+ *
31
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
32
+ *
33
+ * This source code is licensed under the MIT license found in the
34
+ * LICENSE file in the root directory of this source tree.
35
+ */var ua;function Zp(){return ua||(ua=1,process.env.NODE_ENV!=="production"&&function(){function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=O,n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,o=t.useRef,s=t.useEffect,i=t.useMemo,a=t.useDebugValue;Wo.useSyncExternalStoreWithSelector=function(l,c,d,h,m){var f=o(null);if(f.current===null){var x={hasValue:!1,value:null};f.current=x}else x=f.current;f=i(function(){function E(I){if(!$){if($=!0,w=I,I=h(I),m!==void 0&&x.hasValue){var j=x.value;if(m(j,I))return T=j}return T=I}if(j=T,n(w,I))return j;var W=h(I);return m!==void 0&&m(j,W)?(w=I,j):(w=I,T=W)}var $=!1,w,T,N=d===void 0?null:d;return[function(){return E(c())},N===null?void 0:function(){return E(N())}]},[c,d,h,m]);var b=r(l,f[0],f[1]);return s(function(){x.hasValue=!0,x.value=b},[b]),a(b),b},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Wo}var fa;function em(){return fa||(fa=1,process.env.NODE_ENV==="production"?Dr.exports=Jp():Dr.exports=Zp()),Dr.exports}var tm=em();function qe(e,t,n=kc){return tm.useSyncExternalStoreWithSelector(ce(r=>e.subscribe(nm,r)),ce(()=>e.state),ce(()=>e.state),ce(t),n)}function nm(e){return e}function Pc(e,t){let n=O.useId(),r=Js.get(t),[o,s]=qe(r,O.useCallback(i=>[r.selectors.isTop(i,n),r.selectors.inStack(i,n)],[r,n]));return xe(()=>{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),e?s?o:!0:!1}let Cs=new Map,nr=new Map;function da(e){var t;let n=(t=nr.get(e))!=null?t:0;return nr.set(e,n+1),n!==0?()=>ha(e):(Cs.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>ha(e))}function ha(e){var t;let n=(t=nr.get(e))!=null?t:1;if(n===1?nr.delete(e):nr.set(e,n-1),n!==1)return;let r=Cs.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,Cs.delete(e))}function rm(e,{allowed:t,disallowed:n}={}){let r=Pc(e,"inert-others");xe(()=>{var o,s;if(!r)return;let i=Je();for(let l of(o=n==null?void 0:n())!=null?o:[])l&&i.add(da(l));let a=(s=t==null?void 0:t())!=null?s:[];for(let l of a){if(!l)continue;let c=br(l);if(!c)continue;let d=l.parentElement;for(;d&&d!==c.body;){for(let h of d.children)a.some(m=>h.contains(m))||i.add(da(h));d=d.parentElement}}return i.dispose},[r,t,n])}function om(e,t,n){let r=zn(o=>{let s=o.getBoundingClientRect();s.x===0&&s.y===0&&s.width===0&&s.height===0&&n()});O.useEffect(()=>{if(!e)return;let o=t===null?null:Ct(t)?t:t.current;if(!o)return;let s=Je();if(typeof ResizeObserver<"u"){let i=new ResizeObserver(()=>r.current(o));i.observe(o),s.add(()=>i.disconnect())}if(typeof IntersectionObserver<"u"){let i=new IntersectionObserver(()=>r.current(o));i.observe(o),s.add(()=>i.disconnect())}return()=>s.dispose()},[t,r,e])}let Ss=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),sm=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Os=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(Os||{}),im=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(im||{}),am=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(am||{});function $c(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Ss)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function lm(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(sm)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Zs=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Zs||{});function Mc(e,t=0){var n;return e===((n=br(e))==null?void 0:n.body)?!1:ut(t,{0(){return e.matches(Ss)},1(){let r=e;for(;r!==null;){if(r.matches(Ss))return!0;r=r.parentElement}return!1}})}var cm=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(cm||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));let um=["textarea","input"].join(",");function fm(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,um))!=null?n:!1}function Dc(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),s=t(r);if(o===null||s===null)return 0;let i=o.compareDocumentPosition(s);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function dm(e,t){return hm($c(),t,{relativeTo:e})}function hm(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let s=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,i=Array.isArray(e)?n?Dc(e):e:t&64?lm(e):$c(e);o.length>0&&i.length>1&&(i=i.filter(f=>!o.some(x=>x!=null&&"current"in x?(x==null?void 0:x.current)===f:x===f))),r=r??s.activeElement;let a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,i.indexOf(r))-1;if(t&4)return Math.max(0,i.indexOf(r))+1;if(t&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=t&32?{preventScroll:!0}:{},d=0,h=i.length,m;do{if(d>=h||d+h<=0)return 0;let f=l+d;if(t&16)f=(f+h)%h;else{if(f<0)return 3;if(f>=h)return 1}m=i[f],m==null||m.focus(c),d+=a}while(m!==s.activeElement);return t&6&&fm(m)&&m.select(),2}function Ic(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function pm(){return/Android/gi.test(window.navigator.userAgent)}function pa(){return Ic()||pm()}function xn(e,t,n,r){let o=zn(n);O.useEffect(()=>{if(!e)return;function s(i){o.current(i)}return document.addEventListener(t,s,r),()=>document.removeEventListener(t,s,r)},[e,t,r])}function mm(e,t,n,r){let o=zn(n);O.useEffect(()=>{if(!e)return;function s(i){o.current(i)}return window.addEventListener(t,s,r),()=>window.removeEventListener(t,s,r)},[e,t,r])}const ma=30;function gm(e,t,n){let r=zn(n),o=O.useCallback(function(a,l){if(a.defaultPrevented)return;let c=l(a);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let d=function h(m){return typeof m=="function"?h(m()):Array.isArray(m)||m instanceof Set?m:[m]}(t);for(let h of d)if(h!==null&&(h.contains(c)||a.composed&&a.composedPath().includes(h)))return;return!Mc(c,Zs.Loose)&&c.tabIndex!==-1&&a.preventDefault(),r.current(a,c)},[r,t]),s=O.useRef(null);xn(e,"pointerdown",a=>{var l,c;pa()||(s.current=((c=(l=a.composedPath)==null?void 0:l.call(a))==null?void 0:c[0])||a.target)},!0),xn(e,"pointerup",a=>{if(pa()||!s.current)return;let l=s.current;return s.current=null,o(a,()=>l)},!0);let i=O.useRef({x:0,y:0});xn(e,"touchstart",a=>{i.current.x=a.touches[0].clientX,i.current.y=a.touches[0].clientY},!0),xn(e,"touchend",a=>{let l={x:a.changedTouches[0].clientX,y:a.changedTouches[0].clientY};if(!(Math.abs(l.x-i.current.x)>=ma||Math.abs(l.y-i.current.y)>=ma))return o(a,()=>wn(a.target)?a.target:null)},!0),mm(e,"blur",a=>o(a,()=>Ap(window.document.activeElement)?window.document.activeElement:null),!0)}function As(...e){return O.useMemo(()=>br(...e),[...e])}var vm=(e=>(e[e.Ignore=0]="Ignore",e[e.Select=1]="Select",e[e.Close=2]="Close",e))(vm||{});const Ir={Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}},bm=200;function ym(e,{trigger:t,action:n,close:r,select:o}){let s=O.useRef(null);xn(e&&t!==null,"pointerdown",i=>{Ys(i==null?void 0:i.target)&&t!=null&&t.contains(i.target)&&(s.current=new Date)}),xn(e&&t!==null,"pointerup",i=>{if(s.current===null||!wn(i.target))return;let a=n(i),l=new Date().getTime()-s.current.getTime();switch(s.current=null,a.kind){case 0:return;case 1:{l>bm&&(o(a.target),r());break}case 2:{r();break}}},{capture:!0})}function wm(e,t){return O.useMemo(()=>{var n;if(e.type)return e.type;let r=(n=e.as)!=null?n:"button";if(typeof r=="string"&&r.toLowerCase()==="button"||(t==null?void 0:t.tagName)==="BUTTON"&&!t.hasAttribute("type"))return"button"},[e.type,e.as,t])}function xm(e){return O.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function Em(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...s){let i=t[o].call(n,...s);i&&(n=i,r.forEach(a=>a()))}}}function Rm(){let e;return{before({doc:t}){var n;let r=t.documentElement,o=(n=t.defaultView)!=null?n:window;e=Math.max(0,o.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),s=Math.max(0,e-o);n.style(r,"paddingRight",`${s}px`)}}}function Cm(){return Ic()?{before({doc:e,d:t,meta:n}){function r(o){return n.containers.flatMap(s=>s()).some(s=>s.contains(o))}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let a=Je();a.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>a.dispose()))}let s=(o=window.scrollY)!=null?o:window.pageYOffset,i=null;t.addEventListener(e,"click",a=>{if(wn(a.target))try{let l=a.target.closest("a");if(!l)return;let{hash:c}=new URL(l.href),d=e.querySelector(c);wn(d)&&!r(d)&&(i=d)}catch{}},!0),t.addEventListener(e,"touchstart",a=>{if(wn(a.target)&&Op(a.target))if(r(a.target)){let l=a.target;for(;l.parentElement&&r(l.parentElement);)l=l.parentElement;t.style(l,"overscrollBehavior","contain")}else t.style(a.target,"touchAction","none")}),t.addEventListener(e,"touchmove",a=>{if(wn(a.target)){if(bc(a.target))return;if(r(a.target)){let l=a.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&a.preventDefault()}else a.preventDefault()}},{passive:!1}),t.add(()=>{var a;let l=(a=window.scrollY)!=null?a:window.pageYOffset;s!==l&&window.scrollTo(0,s),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}:{}}function Sm(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function Om(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let Xt=Em(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:Je(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:Om(n)},o=[Cm(),Rm(),Sm()];o.forEach(({before:s})=>s==null?void 0:s(r)),o.forEach(({after:s})=>s==null?void 0:s(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Xt.subscribe(()=>{let e=Xt.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&Xt.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Xt.dispatch("TEARDOWN",n)}});function Am(e,t,n=()=>({containers:[]})){let r=xm(Xt),o=t?r.get(t):void 0,s=o?o.count>0:!1;return xe(()=>{if(!(!t||!e))return Xt.dispatch("PUSH",t,n),()=>Xt.dispatch("POP",t,n)},[e,t]),s}function km(e,t,n=()=>[document.body]){let r=Pc(e,"scroll-lock");Am(r,t,o=>{var s;return{containers:[...(s=o.containers)!=null?s:[],n]}})}function ga(e){return[e.screenX,e.screenY]}function Tm(){let e=O.useRef([-1,-1]);return{wasMoved(t){let n=ga(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=ga(t)}}}function Fm(e=0){let[t,n]=O.useState(e),r=O.useCallback(l=>n(l),[t]),o=O.useCallback(l=>n(c=>c|l),[t]),s=O.useCallback(l=>(t&l)===l,[t]),i=O.useCallback(l=>n(c=>c&~l),[n]),a=O.useCallback(l=>n(c=>c^l),[n]);return{flags:t,setFlag:r,addFlag:o,hasFlag:s,removeFlag:i,toggleFlag:a}}var va,ba;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((va=process==null?void 0:process.env)==null?void 0:va.NODE_ENV)==="test"&&typeof((ba=Element==null?void 0:Element.prototype)==null?void 0:ba.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
36
+ `)),[]});var Pm=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(Pm||{});function $m(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function Mm(e,t,n,r){let[o,s]=O.useState(n),{hasFlag:i,addFlag:a,removeFlag:l}=Fm(e&&o?3:0),c=O.useRef(!1),d=O.useRef(!1),h=yr();return xe(()=>{var m;if(e){if(n&&s(!0),!t){n&&a(3);return}return(m=void 0)==null||m.call(r,n),Dm(t,{inFlight:c,prepare(){d.current?d.current=!1:d.current=c.current,c.current=!0,!d.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){d.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var f;d.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(c.current=!1,l(7),n||s(!1),(f=void 0)==null||f.call(r,n))}})}},[e,n,t,h]),e?[o,{closed:i(1),enter:i(2),leave:i(4),transition:i(2)||i(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Dm(e,{prepare:t,run:n,done:r,inFlight:o}){let s=Je();return Nm(e,{prepare:t,inFlight:o}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(Im(e,r))})}),s.dispose}function Im(e,t){var n,r;let o=Je();if(!e)return o.dispose;let s=!1;o.add(()=>{s=!0});let i=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(a=>a instanceof CSSTransition))!=null?r:[];return i.length===0?(t(),o.dispose):(Promise.allSettled(i.map(a=>a.finished)).then(()=>{s||t()}),o.dispose)}function Nm(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.style.transition=r}function mo(){return typeof window<"u"}function Gn(e){return Nc(e)?(e.nodeName||"").toLowerCase():"#document"}function Le(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pt(e){var t;return(t=(Nc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Nc(e){return mo()?e instanceof Node||e instanceof Le(e).Node:!1}function Ae(e){return mo()?e instanceof Element||e instanceof Le(e).Element:!1}function ft(e){return mo()?e instanceof HTMLElement||e instanceof Le(e).HTMLElement:!1}function ya(e){return!mo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Le(e).ShadowRoot}function wr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Xe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Lm(e){return["table","td","th"].includes(Gn(e))}function go(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ei(e){const t=ti(),n=Ae(e)?Xe(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function jm(e){let t=Ut(e);for(;ft(t)&&!Un(t);){if(ei(t))return t;if(go(t))return null;t=Ut(t)}return null}function ti(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Un(e){return["html","body","#document"].includes(Gn(e))}function Xe(e){return Le(e).getComputedStyle(e)}function vo(e){return Ae(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ut(e){if(Gn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ya(e)&&e.host||pt(e);return ya(t)?t.host:t}function Lc(e){const t=Ut(e);return Un(t)?e.ownerDocument?e.ownerDocument.body:e.body:ft(t)&&wr(t)?t:Lc(t)}function ir(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Lc(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Le(o);if(s){const a=ks(i);return t.concat(i,i.visualViewport||[],wr(o)?o:[],a&&n?ir(a):[])}return t.concat(o,ir(o,[],n))}function ks(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Bm(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}const pn=Math.min,Oe=Math.max,ar=Math.round,Nr=Math.floor,ct=e=>({x:e,y:e}),Hm={left:"right",right:"left",bottom:"top",top:"bottom"},Wm={start:"end",end:"start"};function wa(e,t,n){return Oe(e,pn(t,n))}function _n(e,t){return typeof e=="function"?e(t):e}function Vt(e){return e.split("-")[0]}function xr(e){return e.split("-")[1]}function jc(e){return e==="x"?"y":"x"}function Bc(e){return e==="y"?"height":"width"}function mn(e){return["top","bottom"].includes(Vt(e))?"y":"x"}function Hc(e){return jc(mn(e))}function Um(e,t,n){n===void 0&&(n=!1);const r=xr(e),o=Hc(e),s=Bc(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Zr(i)),[i,Zr(i)]}function Vm(e){const t=Zr(e);return[Ts(e),t,Ts(t)]}function Ts(e){return e.replace(/start|end/g,t=>Wm[t])}function qm(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function zm(e,t,n,r){const o=xr(e);let s=qm(Vt(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Ts)))),s}function Zr(e){return e.replace(/left|right|bottom|top/g,t=>Hm[t])}function Gm(e){return{top:0,right:0,bottom:0,left:0,...e}}function _m(e){return typeof e!="number"?Gm(e):{top:e,right:e,bottom:e,left:e}}function eo(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function xa(e,t,n){let{reference:r,floating:o}=e;const s=mn(t),i=Hc(t),a=Bc(i),l=Vt(t),c=s==="y",d=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,m=r[a]/2-o[a]/2;let f;switch(l){case"top":f={x:d,y:r.y-o.height};break;case"bottom":f={x:d,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:h};break;case"left":f={x:r.x-o.width,y:h};break;default:f={x:r.x,y:r.y}}switch(xr(t)){case"start":f[i]-=m*(n&&c?-1:1);break;case"end":f[i]+=m*(n&&c?-1:1);break}return f}const Qm=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:h}=xa(c,r,l),m=r,f={},x=0;for(let b=0;b<a.length;b++){const{name:E,fn:$}=a[b],{x:w,y:T,data:N,reset:I}=await $({x:d,y:h,initialPlacement:r,placement:m,strategy:o,middlewareData:f,rects:c,platform:i,elements:{reference:e,floating:t}});d=w??d,h=T??h,f={...f,[E]:{...f[E],...N}},I&&x<=50&&(x++,typeof I=="object"&&(I.placement&&(m=I.placement),I.rects&&(c=I.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:d,y:h}=xa(c,m,l)),b=-1)}return{x:d,y:h,placement:m,strategy:o,middlewareData:f}};async function bo(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:m=!1,padding:f=0}=_n(t,e),x=_m(f),E=a[m?h==="floating"?"reference":"floating":h],$=eo(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(E)))==null||n?E:E.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),w=h==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),N=await(s.isElement==null?void 0:s.isElement(T))?await(s.getScale==null?void 0:s.getScale(T))||{x:1,y:1}:{x:1,y:1},I=eo(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:T,strategy:l}):w);return{top:($.top-I.top+x.top)/N.y,bottom:(I.bottom-$.bottom+x.bottom)/N.y,left:($.left-I.left+x.left)/N.x,right:(I.right-$.right+x.right)/N.x}}const Km=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:b=!0,...E}=_n(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const $=Vt(o),w=mn(a),T=Vt(a)===a,N=await(l.isRTL==null?void 0:l.isRTL(c.floating)),I=m||(T||!b?[Zr(a)]:Vm(a)),j=x!=="none";!m&&j&&I.push(...zm(a,b,x,N));const W=[a,...I],u=await bo(t,E),p=[];let g=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&p.push(u[$]),h){const A=Um(o,i,N);p.push(u[A[0]],u[A[1]])}if(g=[...g,{placement:o,overflows:p}],!p.every(A=>A<=0)){var S,C;const A=(((S=s.flip)==null?void 0:S.index)||0)+1,v=W[A];if(v)return{data:{index:A,overflows:g},reset:{placement:v}};let R=(C=g.filter(F=>F.overflows[0]<=0).sort((F,y)=>F.overflows[1]-y.overflows[1])[0])==null?void 0:C.placement;if(!R)switch(f){case"bestFit":{var k;const F=(k=g.filter(y=>{if(j){const M=mn(y.placement);return M===w||M==="y"}return!0}).map(y=>[y.placement,y.overflows.filter(M=>M>0).reduce((M,B)=>M+B,0)]).sort((y,M)=>y[1]-M[1])[0])==null?void 0:k[0];F&&(R=F);break}case"initialPlacement":R=a;break}if(o!==R)return{reset:{placement:R}}}return{}}}};async function Ym(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Vt(n),a=xr(n),l=mn(n)==="y",c=["left","top"].includes(i)?-1:1,d=s&&l?-1:1,h=_n(t,e);let{mainAxis:m,crossAxis:f,alignmentAxis:x}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof x=="number"&&(f=a==="end"?x*-1:x),l?{x:f*d,y:m*c}:{x:m*c,y:f*d}}const Xm=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await Ym(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},Jm=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:E=>{let{x:$,y:w}=E;return{x:$,y:w}}},...l}=_n(e,t),c={x:n,y:r},d=await bo(t,l),h=mn(Vt(o)),m=jc(h);let f=c[m],x=c[h];if(s){const E=m==="y"?"top":"left",$=m==="y"?"bottom":"right",w=f+d[E],T=f-d[$];f=wa(w,f,T)}if(i){const E=h==="y"?"top":"left",$=h==="y"?"bottom":"right",w=x+d[E],T=x-d[$];x=wa(w,x,T)}const b=a.fn({...t,[m]:f,[h]:x});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[m]:s,[h]:i}}}}}},Zm=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:l=()=>{},...c}=_n(e,t),d=await bo(t,c),h=Vt(o),m=xr(o),f=mn(o)==="y",{width:x,height:b}=s.floating;let E,$;h==="top"||h==="bottom"?(E=h,$=m===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):($=h,E=m==="end"?"top":"bottom");const w=b-d.top-d.bottom,T=x-d.left-d.right,N=pn(b-d[E],w),I=pn(x-d[$],T),j=!t.middlewareData.shift;let W=N,u=I;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(u=T),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(W=w),j&&!m){const g=Oe(d.left,0),S=Oe(d.right,0),C=Oe(d.top,0),k=Oe(d.bottom,0);f?u=x-2*(g!==0||S!==0?g+S:Oe(d.left,d.right)):W=b-2*(C!==0||k!==0?C+k:Oe(d.top,d.bottom))}await l({...t,availableWidth:u,availableHeight:W});const p=await i.getDimensions(a.floating);return x!==p.width||b!==p.height?{reset:{rects:!0}}:{}}}};function Wc(e){const t=Xe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ft(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=ar(n)!==s||ar(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function ni(e){return Ae(e)?e:e.contextElement}function On(e){const t=ni(e);if(!ft(t))return ct(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Wc(t);let i=(s?ar(n.width):n.width)/r,a=(s?ar(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const eg=ct(0);function Uc(e){const t=Le(e);return!ti()||!t.visualViewport?eg:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tg(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Le(e)?!1:t}function gn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=ni(e);let i=ct(1);t&&(r?Ae(r)&&(i=On(r)):i=On(e));const a=tg(s,n,r)?Uc(s):ct(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,d=o.width/i.x,h=o.height/i.y;if(s){const m=Le(s),f=r&&Ae(r)?Le(r):r;let x=m,b=ks(x);for(;b&&r&&f!==x;){const E=On(b),$=b.getBoundingClientRect(),w=Xe(b),T=$.left+(b.clientLeft+parseFloat(w.paddingLeft))*E.x,N=$.top+(b.clientTop+parseFloat(w.paddingTop))*E.y;l*=E.x,c*=E.y,d*=E.x,h*=E.y,l+=T,c+=N,x=Le(b),b=ks(x)}}return eo({width:d,height:h,x:l,y:c})}function ri(e,t){const n=vo(e).scrollLeft;return t?t.left+n:gn(pt(e)).left+n}function Vc(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:ri(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function ng(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=pt(r),a=t?go(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=ct(1);const d=ct(0),h=ft(r);if((h||!h&&!s)&&((Gn(r)!=="body"||wr(i))&&(l=vo(r)),ft(r))){const f=gn(r);c=On(r),d.x=f.x+r.clientLeft,d.y=f.y+r.clientTop}const m=i&&!h&&!s?Vc(i,l,!0):ct(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+m.x,y:n.y*c.y-l.scrollTop*c.y+d.y+m.y}}function rg(e){return Array.from(e.getClientRects())}function og(e){const t=pt(e),n=vo(e),r=e.ownerDocument.body,o=Oe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Oe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+ri(e);const a=-n.scrollTop;return Xe(r).direction==="rtl"&&(i+=Oe(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function sg(e,t){const n=Le(e),r=pt(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const c=ti();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function ig(e,t){const n=gn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ft(e)?On(e):ct(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function Ea(e,t,n){let r;if(t==="viewport")r=sg(e,n);else if(t==="document")r=og(pt(e));else if(Ae(t))r=ig(t,n);else{const o=Uc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return eo(r)}function qc(e,t){const n=Ut(e);return n===t||!Ae(n)||Un(n)?!1:Xe(n).position==="fixed"||qc(n,t)}function ag(e,t){const n=t.get(e);if(n)return n;let r=ir(e,[],!1).filter(a=>Ae(a)&&Gn(a)!=="body"),o=null;const s=Xe(e).position==="fixed";let i=s?Ut(e):e;for(;Ae(i)&&!Un(i);){const a=Xe(i),l=ei(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||wr(i)&&!l&&qc(e,i))?r=r.filter(d=>d!==i):o=a,i=Ut(i)}return t.set(e,r),r}function lg(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?go(t)?[]:ag(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,d)=>{const h=Ea(t,d,o);return c.top=Oe(h.top,c.top),c.right=pn(h.right,c.right),c.bottom=pn(h.bottom,c.bottom),c.left=Oe(h.left,c.left),c},Ea(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function cg(e){const{width:t,height:n}=Wc(e);return{width:t,height:n}}function ug(e,t,n){const r=ft(t),o=pt(t),s=n==="fixed",i=gn(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=ct(0);if(r||!r&&!s)if((Gn(t)!=="body"||wr(o))&&(a=vo(t)),r){const m=gn(t,!0,s,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else o&&(l.x=ri(o));const c=o&&!r&&!s?Vc(o,a):ct(0),d=i.left+a.scrollLeft-l.x-c.x,h=i.top+a.scrollTop-l.y-c.y;return{x:d,y:h,width:i.width,height:i.height}}function Uo(e){return Xe(e).position==="static"}function Ra(e,t){if(!ft(e)||Xe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return pt(e)===n&&(n=n.ownerDocument.body),n}function zc(e,t){const n=Le(e);if(go(e))return n;if(!ft(e)){let o=Ut(e);for(;o&&!Un(o);){if(Ae(o)&&!Uo(o))return o;o=Ut(o)}return n}let r=Ra(e,t);for(;r&&Lm(r)&&Uo(r);)r=Ra(r,t);return r&&Un(r)&&Uo(r)&&!ei(r)?n:r||jm(e)||n}const fg=async function(e){const t=this.getOffsetParent||zc,n=this.getDimensions,r=await n(e.floating);return{reference:ug(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function dg(e){return Xe(e).direction==="rtl"}const hg={convertOffsetParentRelativeRectToViewportRelativeRect:ng,getDocumentElement:pt,getClippingRect:lg,getOffsetParent:zc,getElementRects:fg,getClientRects:rg,getDimensions:cg,getScale:On,isElement:Ae,isRTL:dg};function Gc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function pg(e,t){let n=null,r;const o=pt(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:d,top:h,width:m,height:f}=c;if(a||t(),!m||!f)return;const x=Nr(h),b=Nr(o.clientWidth-(d+m)),E=Nr(o.clientHeight-(h+f)),$=Nr(d),T={rootMargin:-x+"px "+-b+"px "+-E+"px "+-$+"px",threshold:Oe(0,pn(1,l))||1};let N=!0;function I(j){const W=j[0].intersectionRatio;if(W!==l){if(!N)return i();W?i(!1,W):r=setTimeout(()=>{i(!1,1e-7)},1e3)}W===1&&!Gc(c,e.getBoundingClientRect())&&i(),N=!1}try{n=new IntersectionObserver(I,{...T,root:o.ownerDocument})}catch{n=new IntersectionObserver(I,T)}n.observe(e)}return i(!0),s}function mg(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=ni(e),d=o||s?[...c?ir(c):[],...ir(t)]:[];d.forEach($=>{o&&$.addEventListener("scroll",n,{passive:!0}),s&&$.addEventListener("resize",n)});const h=c&&a?pg(c,n):null;let m=-1,f=null;i&&(f=new ResizeObserver($=>{let[w]=$;w&&w.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var T;(T=f)==null||T.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let x,b=l?gn(e):null;l&&E();function E(){const $=gn(e);b&&!Gc(b,$)&&n(),b=$,x=requestAnimationFrame(E)}return n(),()=>{var $;d.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),h==null||h(),($=f)==null||$.disconnect(),f=null,l&&cancelAnimationFrame(x)}}const Vo=bo,gg=Xm,vg=Jm,bg=Km,yg=Zm,wg=(e,t,n)=>{const r=new Map,o={platform:hg,...n},s={...o.platform,_c:r};return Qm(e,t,{...o,platform:s})};var Br=typeof document<"u"?O.useLayoutEffect:O.useEffect;function to(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!to(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!to(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function _c(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ca(e,t){const n=_c(e);return Math.round(t*n)/n}function qo(e){const t=D.useRef(e);return Br(()=>{t.current=e}),t}function xg(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[d,h]=D.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,f]=D.useState(r);to(m,r)||f(r);const[x,b]=D.useState(null),[E,$]=D.useState(null),w=D.useCallback(y=>{y!==j.current&&(j.current=y,b(y))},[]),T=D.useCallback(y=>{y!==W.current&&(W.current=y,$(y))},[]),N=s||x,I=i||E,j=D.useRef(null),W=D.useRef(null),u=D.useRef(d),p=l!=null,g=qo(l),S=qo(o),C=qo(c),k=D.useCallback(()=>{if(!j.current||!W.current)return;const y={placement:t,strategy:n,middleware:m};S.current&&(y.platform=S.current),wg(j.current,W.current,y).then(M=>{const B={...M,isPositioned:C.current!==!1};A.current&&!to(u.current,B)&&(u.current=B,Bn.flushSync(()=>{h(B)}))})},[m,t,n,S,C]);Br(()=>{c===!1&&u.current.isPositioned&&(u.current.isPositioned=!1,h(y=>({...y,isPositioned:!1})))},[c]);const A=D.useRef(!1);Br(()=>(A.current=!0,()=>{A.current=!1}),[]),Br(()=>{if(N&&(j.current=N),I&&(W.current=I),N&&I){if(g.current)return g.current(N,I,k);k()}},[N,I,k,g,p]);const v=D.useMemo(()=>({reference:j,floating:W,setReference:w,setFloating:T}),[w,T]),R=D.useMemo(()=>({reference:N,floating:I}),[N,I]),F=D.useMemo(()=>{const y={position:n,left:0,top:0};if(!R.floating)return y;const M=Ca(R.floating,d.x),B=Ca(R.floating,d.y);return a?{...y,transform:"translate("+M+"px, "+B+"px)",..._c(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:M,top:B}},[n,a,R.floating,d.x,d.y]);return D.useMemo(()=>({...d,update:k,refs:v,elements:R,floatingStyles:F}),[d,k,v,R,F])}const Qc=(e,t)=>({...gg(e),options:[e,t]}),Eg=(e,t)=>({...vg(e),options:[e,t]}),Rg=(e,t)=>({...bg(e),options:[e,t]}),Cg=(e,t)=>({...yg(e),options:[e,t]}),Kc={...D},Sg=Kc.useInsertionEffect,Og=Sg||(e=>e());function Yc(e){const t=D.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Og(()=>{t.current=e}),D.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}var Fs=typeof document<"u"?O.useLayoutEffect:O.useEffect;let Sa=!1,Ag=0;const Oa=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Ag++;function kg(){const[e,t]=D.useState(()=>Sa?Oa():void 0);return Fs(()=>{e==null&&t(Oa())},[]),D.useEffect(()=>{Sa=!0},[]),e}const Tg=Kc.useId,Fg=Tg||kg;let lr;process.env.NODE_ENV!=="production"&&(lr=new Set);function Pg(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=lr)!=null&&e.has(o))){var s;(s=lr)==null||s.add(o),console.warn(o)}}function $g(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=lr)!=null&&e.has(o))){var s;(s=lr)==null||s.add(o),console.error(o)}}function Mg(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const Dg=D.createContext(null),Ig=D.createContext(null),Ng=()=>{var e;return((e=D.useContext(Dg))==null?void 0:e.id)||null},Lg=()=>D.useContext(Ig),jg="data-floating-ui-focusable";function Bg(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Fg(),s=D.useRef({}),[i]=D.useState(()=>Mg()),a=Ng()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!Ae(f)&&$g("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=D.useState(r.reference),d=Yc((f,x,b)=>{s.current.openEvent=f?x:void 0,i.emit("openchange",{open:f,event:x,reason:b,nested:a}),n==null||n(f,x,b)}),h=D.useMemo(()=>({setPositionReference:c}),[]),m=D.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return D.useMemo(()=>({dataRef:s,open:t,onOpenChange:d,elements:m,events:i,floatingId:o,refs:h}),[t,d,m,i,o,h])}function Hg(e){e===void 0&&(e={});const{nodeId:t}=e,n=Bg({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=D.useState(null),[a,l]=D.useState(null),d=(o==null?void 0:o.domReference)||s,h=D.useRef(null),m=Lg();Fs(()=>{d&&(h.current=d)},[d]);const f=xg({...e,elements:{...o,...a&&{reference:a}}}),x=D.useCallback(T=>{const N=Ae(T)?{getBoundingClientRect:()=>T.getBoundingClientRect(),contextElement:T}:T;l(N),f.refs.setReference(N)},[f.refs]),b=D.useCallback(T=>{(Ae(T)||T===null)&&(h.current=T,i(T)),(Ae(f.refs.reference.current)||f.refs.reference.current===null||T!==null&&!Ae(T))&&f.refs.setReference(T)},[f.refs]),E=D.useMemo(()=>({...f.refs,setReference:b,setPositionReference:x,domReference:h}),[f.refs,b,x]),$=D.useMemo(()=>({...f.elements,domReference:d}),[f.elements,d]),w=D.useMemo(()=>({...f,...r,refs:E,elements:$,nodeId:t}),[f,E,$,t,r]);return Fs(()=>{r.dataRef.current.floatingContext=w;const T=m==null?void 0:m.nodesRef.current.find(N=>N.id===t);T&&(T.context=w)}),D.useMemo(()=>({...f,context:w,refs:E,elements:$}),[f,E,$,w])}const Aa="active",ka="selected";function zo(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[Aa]:i,[ka]:a,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1,[jg]:""},...s,...t.map(i=>{const a=i?i[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[c,d]=l;if(!(o&&[Aa,ka].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof d=="function"){var h;(h=r.get(c))==null||h.push(d),i[c]=function(){for(var m,f=arguments.length,x=new Array(f),b=0;b<f;b++)x[b]=arguments[b];return(m=r.get(c))==null?void 0:m.map(E=>E(...x)).find(E=>E!==void 0)}}}else i[c]=d}),i),{})}}function Wg(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=D.useCallback(a=>zo(a,e,"reference"),t),s=D.useCallback(a=>zo(a,e,"floating"),n),i=D.useCallback(a=>zo(a,e,"item"),r);return D.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}function Ta(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const Ug=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:o,offset:s=0,index:i=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:c,...d}=_n(e,t),{rects:h,elements:{floating:m}}=t,f=n.current[i],x=(c==null?void 0:c.current)||m,b=m.clientTop||x.clientTop,E=m.clientTop!==0,$=x.clientTop!==0,w=m===x;if(process.env.NODE_ENV!=="production"&&(t.placement.startsWith("bottom")||Pg('`placement` side must be "bottom" when using the `inner`',"middleware.")),!f)return{};const T={...t,...await Qc(-f.offsetTop-m.clientTop-h.reference.height/2-f.offsetHeight/2-s).fn(t)},N=await Vo(Ta(T,x.scrollHeight+b+m.clientTop),d),I=await Vo(T,{...d,elementContext:"reference"}),j=Oe(0,N.top),W=T.y+j,g=(x.scrollHeight>x.clientHeight?S=>S:ar)(Oe(0,x.scrollHeight+(E&&w||$?b*2:0)-j-Oe(0,N.bottom)));if(x.style.maxHeight=g+"px",x.scrollTop=j,o){const S=x.offsetHeight<f.offsetHeight*pn(a,n.current.length)-1||I.top>=-l||I.bottom>=-l;Bn.flushSync(()=>o(S))}return r&&(r.current=await Vo(Ta({...T,y:W},x.offsetHeight+b+m.clientTop),d)),{y:W}}});function Vg(e,t){const{open:n,elements:r}=e,{enabled:o=!0,overflowRef:s,scrollRef:i,onChange:a}=t,l=Yc(a),c=D.useRef(!1),d=D.useRef(null),h=D.useRef(null);D.useEffect(()=>{if(!o)return;function f(b){if(b.ctrlKey||!x||s.current==null)return;const E=b.deltaY,$=s.current.top>=-.5,w=s.current.bottom>=-.5,T=x.scrollHeight-x.clientHeight,N=E<0?-1:1,I=E<0?"max":"min";x.scrollHeight<=x.clientHeight||(!$&&E>0||!w&&E<0?(b.preventDefault(),Bn.flushSync(()=>{l(j=>j+Math[I](E,T*N))})):/firefox/i.test(Bm())&&(x.scrollTop+=E))}const x=(i==null?void 0:i.current)||r.floating;if(n&&x)return x.addEventListener("wheel",f),requestAnimationFrame(()=>{d.current=x.scrollTop,s.current!=null&&(h.current={...s.current})}),()=>{d.current=null,h.current=null,x.removeEventListener("wheel",f)}},[o,n,r.floating,s,i,l]);const m=D.useMemo(()=>({onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){const f=(i==null?void 0:i.current)||r.floating;if(!(!s.current||!f||!c.current)){if(d.current!==null){const x=f.scrollTop-d.current;(s.current.bottom<-.5&&x<-1||s.current.top<-.5&&x>1)&&Bn.flushSync(()=>l(b=>b+x))}requestAnimationFrame(()=>{d.current=f.scrollTop})}}}),[r.floating,l,s,i]);return D.useMemo(()=>o?{floating:m}:{},[o,m])}let Qn=O.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Qn.displayName="FloatingContext";let oi=O.createContext(null);oi.displayName="PlacementContext";function qg(e){return O.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function zg(){return O.useContext(Qn).setReference}function Gg(){return O.useContext(Qn).getReferenceProps}function _g(){let{getFloatingProps:e,slot:t}=O.useContext(Qn);return O.useCallback((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}function Qg(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=O.useContext(oi),n=O.useMemo(()=>e,[JSON.stringify(e,(o,s)=>{var i;return(i=s==null?void 0:s.outerHTML)!=null?i:s})]);xe(()=>{t==null||t(n??null)},[t,n]);let r=O.useContext(Qn);return O.useMemo(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}let Fa=4;function Kg({children:e,enabled:t=!0}){let[n,r]=O.useState(null),[o,s]=O.useState(0),i=O.useRef(null),[a,l]=O.useState(null);Yg(a);let c=t&&n!==null&&a!==null,{to:d="bottom",gap:h=0,offset:m=0,padding:f=0,inner:x}=Xg(n,a),[b,E="center"]=d.split(" ");xe(()=>{c&&s(0)},[c]);let{refs:$,floatingStyles:w,context:T}=Hg({open:c,placement:b==="selection"?E==="center"?"bottom":`bottom-${E}`:E==="center"?`${b}`:`${b}-${E}`,strategy:"absolute",transform:!1,middleware:[Qc({mainAxis:b==="selection"?0:h,crossAxis:m}),Eg({padding:f}),b!=="selection"&&Rg({padding:f}),b==="selection"&&x?Ug({...x,padding:f,overflowRef:i,offset:o,minItemsVisible:Fa,referenceOverflowThreshold:f,onFallbackChange(S){var C,k;if(!S)return;let A=T.elements.floating;if(!A)return;let v=parseFloat(getComputedStyle(A).scrollPaddingBottom)||0,R=Math.min(Fa,A.childElementCount),F=0,y=0;for(let M of(k=(C=T.elements.floating)==null?void 0:C.childNodes)!=null?k:[])if(Ct(M)){let B=M.offsetTop,V=B+M.clientHeight+v,H=A.scrollTop,_=H+A.clientHeight;if(B>=H&&V<=_)R--;else{y=Math.max(0,Math.min(V,_)-Math.max(B,H)),F=M.clientHeight;break}}R>=1&&s(M=>{let B=F*R-y+v;return M>=B?M:B})}}):null,Cg({padding:f,apply({availableWidth:S,availableHeight:C,elements:k}){Object.assign(k.floating.style,{overflow:"auto",maxWidth:`${S}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${C}px)`})}})].filter(Boolean),whileElementsMounted:mg}),[N=b,I=E]=T.placement.split("-");b==="selection"&&(N="selection");let j=O.useMemo(()=>({anchor:[N,I].filter(Boolean).join(" ")}),[N,I]),W=Vg(T,{overflowRef:i,onChange:s}),{getReferenceProps:u,getFloatingProps:p}=Wg([W]),g=ce(S=>{l(S),$.setFloating(S)});return D.createElement(oi.Provider,{value:r},D.createElement(Qn.Provider,{value:{setFloating:g,setReference:$.setReference,styles:w,getReferenceProps:u,getFloatingProps:p,slot:j}},e))}function Yg(e){xe(()=>{if(!e)return;let t=new MutationObserver(()=>{let n=window.getComputedStyle(e).maxHeight,r=parseFloat(n);if(isNaN(r))return;let o=parseInt(n);isNaN(o)||r!==o&&(e.style.maxHeight=`${Math.ceil(r)}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function Xg(e,t){var n,r,o;let s=Go((n=e==null?void 0:e.gap)!=null?n:"var(--anchor-gap, 0)",t),i=Go((r=e==null?void 0:e.offset)!=null?r:"var(--anchor-offset, 0)",t),a=Go((o=e==null?void 0:e.padding)!=null?o:"var(--anchor-padding, 0)",t);return{...e,gap:s,offset:i,padding:a}}function Go(e,t,n=void 0){let r=yr(),o=ce((l,c)=>{if(l==null)return[n,null];if(typeof l=="number")return[l,null];if(typeof l=="string"){if(!c)return[n,null];let d=Pa(l,c);return[d,h=>{let m=Xc(l);{let f=m.map(x=>window.getComputedStyle(c).getPropertyValue(x));r.requestAnimationFrame(function x(){r.nextFrame(x);let b=!1;for(let[$,w]of m.entries()){let T=window.getComputedStyle(c).getPropertyValue(w);if(f[$]!==T){f[$]=T,b=!0;break}}if(!b)return;let E=Pa(l,c);d!==E&&(h(E),d=E)})}return r.dispose}]}return[n,null]}),s=O.useMemo(()=>o(e,t)[0],[e,t]),[i=s,a]=O.useState();return xe(()=>{let[l,c]=o(e,t);if(a(l),!!c)return c(a)},[e,t]),i}function Xc(e){let t=/var\((.*)\)/.exec(e);if(t){let n=t[1].indexOf(",");if(n===-1)return[t[1]];let r=t[1].slice(0,n).trim(),o=t[1].slice(n+1).trim();return o?[r,...Xc(o)]:[r]}return[]}function Pa(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}function Jg(e,t){let[n,r]=O.useState(t);return!e&&n!==t&&r(t),e?n:t}let si=O.createContext(null);si.displayName="OpenClosedContext";var cr=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(cr||{});function Zg(){return O.useContext(si)}function ev({value:e,children:t}){return O.createElement(si.Provider,{value:e},t)}function tv(e){throw new Error("Unexpected object: "+e)}var ue=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(ue||{});function Lr(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=r??-1;switch(e.focus){case 0:{for(let s=0;s<n.length;++s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 1:{o===-1&&(o=n.length);for(let s=o-1;s>=0;--s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 2:{for(let s=o+1;s<n.length;++s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 3:{for(let s=n.length-1;s>=0;--s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 4:{for(let s=0;s<n.length;++s)if(t.resolveId(n[s],s,n)===e.id)return s;return r}case 5:return null;default:tv(e)}}function Jc(e){let t=ce(e),n=O.useRef(!1);O.useEffect(()=>(n.current=!1,()=>{n.current=!0,uc(()=>{n.current&&t()})}),[t])}function nv(){let e=typeof document>"u";return"useSyncExternalStore"in D?(t=>t.useSyncExternalStore)(D)(()=>()=>{},()=>!1,()=>!e):!1}function rv(){let e=nv(),[t,n]=D.useState(cn.isHandoffComplete);return t&&cn.isHandoffComplete===!1&&n(!1),D.useEffect(()=>{t!==!0&&n(!0)},[t]),D.useEffect(()=>cn.handoff(),[]),e?!1:t}let ov=O.createContext(!1);function sv(){return O.useContext(ov)}function iv(e){let t=sv(),n=O.useContext(eu),[r,o]=O.useState(()=>{var s;if(!t&&n!==null)return(s=n.current)!=null?s:null;if(cn.isServer)return null;let i=e==null?void 0:e.getElementById("headlessui-portal-root");if(i)return i;if(e===null)return null;let a=e.createElement("div");return a.setAttribute("id","headlessui-portal-root"),e.body.appendChild(a)});return O.useEffect(()=>{r!==null&&(e!=null&&e.body.contains(r)||e==null||e.body.appendChild(r))},[r,e]),O.useEffect(()=>{t||n!==null&&o(n.current)},[n,o,t]),r}let Zc=O.Fragment,av=et(function(e,t){let{ownerDocument:n=null,...r}=e,o=O.useRef(null),s=ht($p(f=>{o.current=f}),t),i=As(o),a=n??i,l=iv(a),[c]=O.useState(()=>{var f;return cn.isServer?null:(f=a==null?void 0:a.createElement("div"))!=null?f:null}),d=O.useContext(fv),h=rv();xe(()=>{!l||!c||l.contains(c)||(c.setAttribute("data-headlessui-portal",""),l.appendChild(c))},[l,c]),xe(()=>{if(c&&d)return d.register(c)},[d,c]),Jc(()=>{var f;!l||!c||(Ys(c)&&l.contains(c)&&l.removeChild(c),l.childNodes.length<=0&&((f=l.parentElement)==null||f.removeChild(l)))});let m=Ze();return h?!l||!c?null:Bt.createPortal(m({ourProps:{ref:s},theirProps:r,slot:{},defaultTag:Zc,name:"Portal"}),c):null});function lv(e,t){let n=ht(t),{enabled:r=!0,ownerDocument:o,...s}=e,i=Ze();return r?O.createElement(av,{...s,ownerDocument:o,ref:n}):i({ourProps:{ref:n},theirProps:s,slot:{},defaultTag:Zc,name:"Portal"})}let cv=O.Fragment,eu=O.createContext(null);function uv(e,t){let{target:n,...r}=e,o={ref:ht(t)},s=Ze();return O.createElement(eu.Provider,{value:n},s({ourProps:o,theirProps:r,defaultTag:cv,name:"Popover.Group"}))}let fv=O.createContext(null),dv=et(lv),hv=et(uv),pv=Object.assign(dv,{Group:hv});function mv(e,t){let n=O.useRef({left:0,top:0});if(xe(()=>{if(!t)return;let o=t.getBoundingClientRect();o&&(n.current=o)},[e,t]),t==null||!e||t===document.activeElement)return!1;let r=t.getBoundingClientRect();return r.top!==n.current.top||r.left!==n.current.left}let $a=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Ma(e){var t,n;let r=(t=e.innerText)!=null?t:"",o=e.cloneNode(!0);if(!Ct(o))return r;let s=!1;for(let a of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),s=!0;let i=s?(n=o.innerText)!=null?n:"":r;return $a.test(i)&&(i=i.replace($a,"")),i}function gv(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(o=>{let s=document.getElementById(o);if(s){let i=s.getAttribute("aria-label");return typeof i=="string"?i.trim():Ma(s).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return Ma(e).trim()}function vv(e){let t=O.useRef(""),n=O.useRef("");return ce(()=>{let r=e.current;if(!r)return"";let o=r.innerText;if(t.current===o)return n.current;let s=gv(r).trim().toLowerCase();return t.current=o,n.current=s,s})}var bv=Object.defineProperty,yv=(e,t,n)=>t in e?bv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Da=(e,t,n)=>(yv(e,typeof t!="symbol"?t+"":t,n),n),we=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(we||{}),at=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(at||{}),Ps=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Ps||{}),tu=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOptions=5]="RegisterOptions",e[e.UnregisterOptions=6]="UnregisterOptions",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetOptionsElement=8]="SetOptionsElement",e[e.SortOptions=9]="SortOptions",e))(tu||{});function Ia(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=Dc(t(e.options.slice()),s=>s.dataRef.current.domRef.current),o=n?r.indexOf(n):null;return o===-1&&(o=null),{options:r,activeOptionIndex:o}}let wv={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,pendingFocus:{focus:ue.Nothing},listboxState:1,__demoMode:!1}},0(e,t){if(e.dataRef.current.disabled||e.listboxState===0)return e;let n=e.activeOptionIndex,{isSelected:r}=e.dataRef.current,o=e.options.findIndex(s=>r(s.dataRef.current.value));return o!==-1&&(n=o),{...e,pendingFocus:t.focus,listboxState:0,activeOptionIndex:n,__demoMode:!1}},2(e,t){var n,r,o,s,i;if(e.dataRef.current.disabled||e.listboxState===1)return e;let a={...e,searchQuery:"",activationTrigger:(n=t.trigger)!=null?n:1,__demoMode:!1};if(t.focus===ue.Nothing)return{...a,activeOptionIndex:null};if(t.focus===ue.Specific)return{...a,activeOptionIndex:e.options.findIndex(d=>d.id===t.id)};if(t.focus===ue.Previous){let d=e.activeOptionIndex;if(d!==null){let h=e.options[d].dataRef.current.domRef,m=Lr(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});if(m!==null){let f=e.options[m].dataRef.current.domRef;if(((r=h.current)==null?void 0:r.previousElementSibling)===f.current||((o=f.current)==null?void 0:o.previousElementSibling)===null)return{...a,activeOptionIndex:m}}}}else if(t.focus===ue.Next){let d=e.activeOptionIndex;if(d!==null){let h=e.options[d].dataRef.current.domRef,m=Lr(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});if(m!==null){let f=e.options[m].dataRef.current.domRef;if(((s=h.current)==null?void 0:s.nextElementSibling)===f.current||((i=f.current)==null?void 0:i.nextElementSibling)===null)return{...a,activeOptionIndex:m}}}}let l=Ia(e),c=Lr(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});return{...a,...l,activeOptionIndex:c}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let n=e.searchQuery!==""?0:1,r=e.searchQuery+t.value.toLowerCase(),o=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find(i=>{var a;return!i.dataRef.current.disabled&&((a=i.dataRef.current.textValue)==null?void 0:a.startsWith(r))}),s=o?e.options.indexOf(o):-1;return s===-1||s===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:s,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,t)=>{let n=e.options.concat(t.options),r=e.activeOptionIndex;if(e.pendingFocus.focus!==ue.Nothing&&(r=Lr(e.pendingFocus,{resolveItems:()=>n,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:o=>o.id,resolveDisabled:o=>o.dataRef.current.disabled})),e.activeOptionIndex===null){let{isSelected:o}=e.dataRef.current;if(o){let s=n.findIndex(i=>o==null?void 0:o(i.dataRef.current.value));s!==-1&&(r=s)}}return{...e,options:n,activeOptionIndex:r,pendingFocus:{focus:ue.Nothing},pendingShouldSort:!0}},6:(e,t)=>{let n=e.options,r=[],o=new Set(t.options);for(let[s,i]of n.entries())if(o.has(i.id)&&(r.push(s),o.delete(i.id),o.size===0))break;if(r.length>0){n=n.slice();for(let s of r.reverse())n.splice(s,1)}return{...e,options:n,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element},9:e=>e.pendingShouldSort?{...e,...Ia(e),pendingShouldSort:!1}:e};class ii extends Ac{constructor(t){super(t),Da(this,"actions",{onChange:n=>{let{onChange:r,compare:o,mode:s,value:i}=this.state.dataRef.current;return ut(s,{0:()=>r==null?void 0:r(n),1:()=>{let a=i.slice(),l=a.findIndex(c=>o(c,n));return l===-1?a.push(n):a.splice(l,1),r==null?void 0:r(a)}})},registerOption:Bo(()=>{let n=[],r=new Set;return[(o,s)=>{r.has(s)||(r.add(s),n.push({id:o,dataRef:s}))},()=>(r.clear(),this.send({type:5,options:n.splice(0)}))]}),unregisterOption:Bo(()=>{let n=[];return[r=>n.push(r),()=>{this.send({type:6,options:n.splice(0)})}]}),goToOption:Bo(()=>{let n=null;return[(r,o)=>{n={type:2,...r,trigger:o}},()=>n&&this.send(n)]}),closeListbox:()=>{this.send({type:1})},openListbox:n=>{this.send({type:0,focus:n})},selectActiveOption:()=>{if(this.state.activeOptionIndex!==null){let{dataRef:n,id:r}=this.state.options[this.state.activeOptionIndex];this.actions.onChange(n.current.value),this.send({type:2,focus:ue.Specific,id:r})}},selectOption:n=>{let r=this.state.options.find(o=>o.id===n);r&&this.actions.onChange(r.dataRef.current.value)},search:n=>{this.send({type:3,value:n})},clearSearch:()=>{this.send({type:4})},setButtonElement:n=>{this.send({type:7,element:n})},setOptionsElement:n=>{this.send({type:8,element:n})}}),Da(this,"selectors",{activeDescendantId(n){var r;let o=n.activeOptionIndex,s=n.options;return o===null||(r=s[o])==null?void 0:r.id},isActive(n,r){var o;let s=n.activeOptionIndex,i=n.options;return s!==null?((o=i[s])==null?void 0:o.id)===r:!1},shouldScrollIntoView(n,r){return n.__demoMode||n.listboxState!==0||n.activationTrigger===0?!1:this.isActive(n,r)}}),this.on(5,()=>{requestAnimationFrame(()=>{this.send({type:9})})});{let n=this.state.id,r=Js.get(null);this.disposables.add(r.on(Tc.Push,o=>{!r.selectors.isTop(o,n)&&this.state.listboxState===0&&this.actions.closeListbox()})),this.on(0,()=>r.actions.push(n)),this.on(1,()=>r.actions.pop(n))}}static new({id:t,__demoMode:n=!1}){return new ii({id:t,dataRef:{current:{}},listboxState:n?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:ue.Nothing},__demoMode:n})}reduce(t,n){return ut(n.type,wv,t,n)}}const nu=O.createContext(null);function ai(e){let t=O.useContext(nu);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ru),n}return t}function ru({id:e,__demoMode:t=!1}){let n=O.useMemo(()=>ii.new({id:e,__demoMode:t}),[]);return Jc(()=>n.dispose()),n}let yo=O.createContext(null);yo.displayName="ListboxDataContext";function Er(e){let t=O.useContext(yo);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Er),n}return t}let xv=O.Fragment;function Ev(e,t){let n=O.useId(),r=Qs(),{value:o,defaultValue:s,form:i,name:a,onChange:l,by:c,invalid:d=!1,disabled:h=r||!1,horizontal:m=!1,multiple:f=!1,__demoMode:x=!1,...b}=e;const E=m?"horizontal":"vertical";let $=ht(t),w=vp(s),[T=f?[]:void 0,N]=gp(o,l,w),I=ru({id:n,__demoMode:x}),j=O.useRef({static:!1,hold:!1}),W=O.useRef(new Map),u=Up(c),p=O.useCallback(H=>ut(g.mode,{[at.Multi]:()=>T.some(_=>u(_,H)),[at.Single]:()=>u(T,H)}),[T]),g=O.useMemo(()=>({value:T,disabled:h,invalid:d,mode:f?at.Multi:at.Single,orientation:E,onChange:N,compare:u,isSelected:p,optionsPropsRef:j,listRef:W}),[T,h,d,f,E,N,u,p,j,W]);xe(()=>{I.state.dataRef.current=g},[g]);let S=qe(I,H=>H.listboxState),C=Js.get(null),k=qe(C,O.useCallback(H=>C.selectors.isTop(H,n),[C,n])),[A,v]=qe(I,H=>[H.buttonElement,H.optionsElement]);gm(k,[A,v],(H,_)=>{I.send({type:tu.CloseListbox}),Mc(_,Zs.Loose)||(H.preventDefault(),A==null||A.focus())});let R=O.useMemo(()=>({open:S===we.Open,disabled:h,invalid:d,value:T}),[S,h,d,T]),[F,y]=Lp({inherit:!0}),M={ref:$},B=O.useCallback(()=>{if(w!==void 0)return N==null?void 0:N(w)},[N,w]),V=Ze();return O.createElement(y,{value:F,props:{htmlFor:A==null?void 0:A.id},slot:{open:S===we.Open,disabled:h}},O.createElement(Kg,null,O.createElement(nu.Provider,{value:I},O.createElement(yo.Provider,{value:g},O.createElement(ev,{value:ut(S,{[we.Open]:cr.Open,[we.Closed]:cr.Closed})},a!=null&&T!=null&&O.createElement(Rp,{disabled:h,data:{[a]:T},form:i,onReset:B}),V({ourProps:M,theirProps:b,slot:R,defaultTag:xv,name:"Listbox"}))))))}let Rv="button";function Cv(e,t){let n=O.useId(),r=vc(),o=Er("Listbox.Button"),s=ai("Listbox.Button"),{id:i=r||`headlessui-listbox-button-${n}`,disabled:a=o.disabled||!1,autoFocus:l=!1,...c}=e,d=ht(t,zg(),s.actions.setButtonElement),h=Gg(),[m,f,x]=qe(s,v=>[v.listboxState,v.buttonElement,v.optionsElement]),b=m===we.Open;ym(b,{trigger:f,action:O.useCallback(v=>{if(f!=null&&f.contains(v.target))return Ir.Ignore;let R=v.target.closest('[role="option"]:not([data-disabled])');return Ct(R)?Ir.Select(R):x!=null&&x.contains(v.target)?Ir.Ignore:Ir.Close},[f,x]),close:s.actions.closeListbox,select:s.actions.selectActiveOption});let E=ce(v=>{switch(v.key){case ye.Enter:bp(v.currentTarget);break;case ye.Space:case ye.ArrowDown:v.preventDefault(),s.actions.openListbox({focus:o.value?ue.Nothing:ue.First});break;case ye.ArrowUp:v.preventDefault(),s.actions.openListbox({focus:o.value?ue.Nothing:ue.Last});break}}),$=ce(v=>{switch(v.key){case ye.Space:v.preventDefault();break}}),w=ce(v=>{var R;if(v.button===0){if(Fp(v.currentTarget))return v.preventDefault();s.state.listboxState===we.Open?(Bt.flushSync(()=>s.actions.closeListbox()),(R=s.state.buttonElement)==null||R.focus({preventScroll:!0})):(v.preventDefault(),s.actions.openListbox({focus:ue.Nothing}))}}),T=ce(v=>v.preventDefault()),N=Rc([i]),I=Mp(),{isFocusVisible:j,focusProps:W}=rp({autoFocus:l}),{isHovered:u,hoverProps:p}=np({isDisabled:a}),{pressed:g,pressProps:S}=cp({disabled:a}),C=O.useMemo(()=>({open:m===we.Open,active:g||m===we.Open,disabled:a,invalid:o.invalid,value:o.value,hover:u,focus:j,autofocus:l}),[m,o.value,a,u,j,g,o.invalid,l]),k=qe(s,v=>v.listboxState===we.Open),A=dc(h(),{ref:d,id:i,type:wm(e,f),"aria-haspopup":"listbox","aria-controls":x==null?void 0:x.id,"aria-expanded":k,"aria-labelledby":N,"aria-describedby":I,disabled:a||void 0,autoFocus:l,onKeyDown:E,onKeyUp:$,onKeyPress:T,onPointerDown:w},W,p,S);return Ze()({ourProps:A,theirProps:c,slot:C,defaultTag:Rv,name:"Listbox.Button"})}let ou=O.createContext(!1),Sv="div",Ov=Rs.RenderStrategy|Rs.Static;function Av(e,t){let n=O.useId(),{id:r=`headlessui-listbox-options-${n}`,anchor:o,portal:s=!1,modal:i=!0,transition:a=!1,...l}=e,c=qg(o),[d,h]=O.useState(null);c&&(s=!0);let m=Er("Listbox.Options"),f=ai("Listbox.Options"),[x,b,E,$]=qe(f,U=>[U.listboxState,U.buttonElement,U.optionsElement,U.__demoMode]),w=As(b),T=As(E),N=Zg(),[I,j]=Mm(a,d,N!==null?(N&cr.Open)===cr.Open:x===we.Open);om(I,b,f.actions.closeListbox);let W=$?!1:i&&x===we.Open;km(W,T);let u=$?!1:i&&x===we.Open;rm(u,{allowed:O.useCallback(()=>[b,E],[b,E])});let p=x!==we.Open,g=mv(p,b)?!1:I,S=I&&x===we.Closed,C=Jg(S,m.value),k=ce(U=>m.compare(C,U)),A=qe(f,U=>{var ae;if(c==null||!((ae=c==null?void 0:c.to)!=null&&ae.includes("selection")))return null;let ge=U.options.findIndex(Ee=>k(Ee.dataRef.current.value));return ge===-1&&(ge=0),ge}),v=(()=>{if(c==null)return;if(A===null)return{...c,inner:void 0};let U=Array.from(m.listRef.current.values());return{...c,inner:{listRef:{current:U},index:A}}})(),[R,F]=Qg(v),y=_g(),M=ht(t,c?R:null,f.actions.setOptionsElement,h),B=yr();O.useEffect(()=>{var U;let ae=E;ae&&x===we.Open&&ae!==((U=br(ae))==null?void 0:U.activeElement)&&(ae==null||ae.focus({preventScroll:!0}))},[x,E]);let V=ce(U=>{var ae,ge;switch(B.dispose(),U.key){case ye.Space:if(f.state.searchQuery!=="")return U.preventDefault(),U.stopPropagation(),f.actions.search(U.key);case ye.Enter:if(U.preventDefault(),U.stopPropagation(),f.state.activeOptionIndex!==null){let{dataRef:Ee}=f.state.options[f.state.activeOptionIndex];f.actions.onChange(Ee.current.value)}m.mode===at.Single&&(Bt.flushSync(()=>f.actions.closeListbox()),(ae=f.state.buttonElement)==null||ae.focus({preventScroll:!0}));break;case ut(m.orientation,{vertical:ye.ArrowDown,horizontal:ye.ArrowRight}):return U.preventDefault(),U.stopPropagation(),f.actions.goToOption({focus:ue.Next});case ut(m.orientation,{vertical:ye.ArrowUp,horizontal:ye.ArrowLeft}):return U.preventDefault(),U.stopPropagation(),f.actions.goToOption({focus:ue.Previous});case ye.Home:case ye.PageUp:return U.preventDefault(),U.stopPropagation(),f.actions.goToOption({focus:ue.First});case ye.End:case ye.PageDown:return U.preventDefault(),U.stopPropagation(),f.actions.goToOption({focus:ue.Last});case ye.Escape:U.preventDefault(),U.stopPropagation(),Bt.flushSync(()=>f.actions.closeListbox()),(ge=f.state.buttonElement)==null||ge.focus({preventScroll:!0});return;case ye.Tab:U.preventDefault(),U.stopPropagation(),Bt.flushSync(()=>f.actions.closeListbox()),dm(f.state.buttonElement,U.shiftKey?Os.Previous:Os.Next);break;default:U.key.length===1&&(f.actions.search(U.key),B.setTimeout(()=>f.actions.clearSearch(),350));break}}),H=qe(f,U=>{var ae;return(ae=U.buttonElement)==null?void 0:ae.id}),_=O.useMemo(()=>({open:x===we.Open}),[x]),ee=dc(c?y():{},{id:r,ref:M,"aria-activedescendant":qe(f,f.selectors.activeDescendantId),"aria-multiselectable":m.mode===at.Multi?!0:void 0,"aria-labelledby":H,"aria-orientation":m.orientation,onKeyDown:V,role:"listbox",tabIndex:x===we.Open?0:void 0,style:{...l.style,...F,"--button-width":qp(b,!0).width},...$m(j)}),Z=Ze(),Y=O.useMemo(()=>m.mode===at.Multi?m:{...m,isSelected:k},[m,k]);return O.createElement(pv,{enabled:s?e.static||I:!1,ownerDocument:w},O.createElement(yo.Provider,{value:Y},Z({ourProps:ee,theirProps:l,slot:_,defaultTag:Sv,features:Ov,visible:g,name:"Listbox.Options"})))}let kv="div";function Tv(e,t){let n=O.useId(),{id:r=`headlessui-listbox-option-${n}`,disabled:o=!1,value:s,...i}=e,a=O.useContext(ou)===!0,l=Er("Listbox.Option"),c=ai("Listbox.Option"),d=qe(c,g=>c.selectors.isActive(g,r)),h=l.isSelected(s),m=O.useRef(null),f=vv(m),x=zn({disabled:o,value:s,domRef:m,get textValue(){return f()}}),b=ht(t,m,g=>{g?l.listRef.current.set(r,g):l.listRef.current.delete(r)}),E=qe(c,g=>c.selectors.shouldScrollIntoView(g,r));xe(()=>{if(E)return Je().requestAnimationFrame(()=>{var g,S;(S=(g=m.current)==null?void 0:g.scrollIntoView)==null||S.call(g,{block:"nearest"})})},[E,m]),xe(()=>{if(!a)return c.actions.registerOption(r,x),()=>c.actions.unregisterOption(r)},[x,r,a]);let $=ce(g=>{var S;if(o)return g.preventDefault();c.actions.onChange(s),l.mode===at.Single&&(Bt.flushSync(()=>c.actions.closeListbox()),(S=c.state.buttonElement)==null||S.focus({preventScroll:!0}))}),w=ce(()=>{if(o)return c.actions.goToOption({focus:ue.Nothing});c.actions.goToOption({focus:ue.Specific,id:r})}),T=Tm(),N=ce(g=>{T.update(g),!o&&(d||c.actions.goToOption({focus:ue.Specific,id:r},Ps.Pointer))}),I=ce(g=>{T.wasMoved(g)&&(o||d||c.actions.goToOption({focus:ue.Specific,id:r},Ps.Pointer))}),j=ce(g=>{T.wasMoved(g)&&(o||d&&c.actions.goToOption({focus:ue.Nothing}))}),W=O.useMemo(()=>({active:d,focus:d,selected:h,disabled:o,selectedOption:h&&a}),[d,h,o,a]),u=a?{}:{id:r,ref:b,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":h,disabled:void 0,onClick:$,onFocus:w,onPointerEnter:N,onMouseEnter:N,onPointerMove:I,onMouseMove:I,onPointerLeave:j,onMouseLeave:j},p=Ze();return!h&&a?null:p({ourProps:u,theirProps:i,slot:W,defaultTag:kv,name:"Listbox.Option"})}let Fv=O.Fragment;function Pv(e,t){let{options:n,placeholder:r,...o}=e,s={ref:ht(t)},i=Er("ListboxSelectedOption"),a=O.useMemo(()=>({}),[]),l=i.value===void 0||i.value===null||i.mode===at.Multi&&Array.isArray(i.value)&&i.value.length===0,c=Ze();return O.createElement(ou.Provider,{value:!0},c({ourProps:s,theirProps:{...o,children:O.createElement(O.Fragment,null,r&&l?r:n)},slot:a,defaultTag:Fv,name:"ListboxSelectedOption"}))}let $v=et(Ev),su=et(Cv),Mv=Cc,iu=et(Av),au=et(Tv),Dv=et(Pv),Iv=Object.assign($v,{Button:su,Label:Mv,Options:iu,Option:au,SelectedOption:Dv});function lu(e={}){const{activeAddress:t,algodClient:n}=xt.useWallet(),{enabled:r=!0}=e;return Ws({queryKey:["account-info",t],queryFn:async()=>{if(!t||!n)return null;try{return await n.accountInformation(t).do()}catch(o){throw new Error(`Error fetching account information: ${o}`)}},enabled:r&&!!t&&!!n,refetchOnWindowFocus:!0})}const Nv=()=>new bh({defaultOptions:{queries:{staleTime:5*60*1e3,gcTime:60*60*1e3,refetchOnWindowFocus:!0,refetchInterval:10*60*1e3,retry:(e,t)=>t instanceof Error&&t.message.includes("404")?!1:e<3}}}),cu=O.createContext(void 0);function Lv({enabled:e,nfdView:t}){const n=Xl(),{activeAddress:r,activeWallet:o,algodClient:s}=xt.useWallet(),{activeNetwork:i}=xt.useNetwork(),a=O.useRef(null);return O.useEffect(()=>{if(!e){a.current=r;return}const l=a.current===null&&r!==null&&o!==null&&o.accounts!==void 0&&o.accounts.length>0&&s!==void 0;if(a.current=r,!l)return;console.log(`[WalletUI] Prefetching data for all accounts in wallet ${o.id}`);const c=o.accounts.map(d=>d.address);if(c.length>0){const h=[];for(let m=0;m<c.length;m+=20)h.push(c.slice(m,m+20));h.forEach(async m=>{const x=i==="testnet"?"https://api.testnet.nf.domains":"https://api.nf.domains",b=new URLSearchParams;m.forEach(E=>{b.append("address",E)}),b.append("view",t);try{const E=await fetch(`${x}/nfd/lookup?${b.toString()}`,{method:"GET",headers:{Accept:"application/json"}});if(!E.ok&&E.status!==404)throw new Error(`NFD prefetch lookup failed: ${E.statusText}`);const $=E.status===404?{}:await E.json();m.forEach(w=>{const T=$[w]||null;n.setQueryData(["nfd",w,i,t],T)})}catch(E){console.error("Error prefetching NFD data:",E)}})}c.forEach(d=>{n.prefetchQuery({queryKey:["account-balance",d],queryFn:async()=>{try{const h=await s.accountInformation(d).do();return Number(h.amount)}catch(h){throw new Error(`Error fetching account balance: ${h}`)}}})})},[r,o,i,t,s,n,e]),null}function jv({children:e,queryClient:t,enablePrefetching:n=!0,prefetchNfdView:r="thumbnail"}){const o=O.useMemo(()=>t||Nv(),[t]),s=O.useMemo(()=>({queryClient:o}),[o]),i=L.jsxs(cu.Provider,{value:s,children:[L.jsx(Lv,{enabled:n,nfdView:r}),e]});return t?i:L.jsx(Jl,{client:o,children:i})}function uu(){const e=O.useContext(cu);if(e===void 0)throw new Error("useWalletUI must be used within a WalletUIProvider");return e}function Bv({className:e,scale:t=.85}){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:En("inline-block align-baseline",e),style:{width:`${t}em`,height:`${t}em`},"aria-label":"Algorand",fill:"currentColor",children:L.jsx("path",{d:"M23.98 23.99h-3.75l-2.44-9.07-5.25 9.07H8.34l8.1-14.04-1.3-4.88L4.22 24H.02L13.88 0h3.67l1.61 5.96h3.79l-2.59 4.5 3.62 13.53z"})})}function Hv({children:e}){var k;const{activeAddress:t,activeWallet:n}=xt.useWallet(),[r,o]=O.useState(!1),[s,i]=O.useState(!1),[a,l]=O.useState(()=>{const A=localStorage.getItem("uwui:balance-preference");return A?A==="available":!1}),c=Us({enabled:!!t}),d=((k=c.data)==null?void 0:k.name)??null,{data:h}=lu({enabled:!!t}),m=O.useMemo(()=>!h||h.amount===void 0?null:Number(h.amount)/1e6,[h]),f=O.useMemo(()=>{if(!h||h.amount===void 0||h.minBalance===void 0)return null;const A=Number(h.amount)-Number(h.minBalance);return Math.max(0,A/1e6)},[h]),x=a?f:m,{refs:b,floatingStyles:E,context:$}=Ll({open:r,onOpenChange:o,placement:"bottom-end",middleware:[xd(8),Rd(),Ed()],whileElementsMounted:hd}),w=Il($),T=Nl($,{outsidePressEvent:"mousedown"}),{getReferenceProps:N,getFloatingProps:I}=jl([w,T]),j=Wn(),W=()=>{t&&(navigator.clipboard.writeText(t),i(!0),setTimeout(()=>i(!1),2e3))},u=async()=>{if(n)try{await n.disconnect(),o(!1)}catch(A){console.error("Error disconnecting wallet:",A)}},p=A=>{n&&n.setActiveAccount&&n.setActiveAccount(A)},g=()=>{const A=!a;l(A),localStorage.setItem("uwui:balance-preference",A?"available":"total")},S=e||L.jsx(uo,{}),C=O.cloneElement(S,N({ref:b.setReference}));return L.jsxs(L.Fragment,{children:[C,r&&L.jsx($l,{children:L.jsx(Dl,{context:$,modal:!1,children:L.jsx("div",{"data-wallet-ui":!0,children:L.jsx("div",{ref:b.setFloating,style:E,...I(),"aria-labelledby":j,className:"z-50 w-80 rounded-xl bg-white dark:bg-[#001324] shadow-xl border border-gray-200 dark:border-[#192A39]",children:L.jsxs("div",{className:"p-4",children:[L.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[L.jsx("div",{className:"h-12 w-12 overflow-hidden",children:L.jsx(Vs,{nfd:c.data,alt:`${d||t} avatar`,size:48})}),L.jsxs("div",{children:[L.jsx("h3",{id:j,className:"text-lg font-bold text-gray-900 dark:text-[#E9E9FD] max-w-[220px] truncate wallet-custom-font",children:d||(t?Yn(t,6,4):"My Wallet")}),d&&t&&L.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:Yn(t,6,4)})]})]}),L.jsx("div",{className:"mb-4 bg-gray-50 dark:bg-[#101B29] rounded-lg p-3",children:L.jsxs("div",{className:"flex justify-between items-center",children:[x!==null&&L.jsxs("span",{className:"text-base font-medium text-gray-900 dark:text-white flex items-center gap-1",children:[eh(x,{fractionDigits:4}),L.jsx(Bv,{})]}),L.jsxs("button",{onClick:g,className:"flex items-center gap-1 text-sm text-gray-600 dark:text-gray-400 bg-gray-200 dark:bg-[#192A39] py-1 pl-2.5 pr-2 rounded-md hover:bg-gray-300 dark:hover:bg-[#263A4A] transition-colors focus:outline-none",title:a?"Show total balance":"Show available balance",children:[a?"Available":"Total",L.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"ml-0.5 opacity-80",children:[L.jsx("path",{d:"m17 10-5-5-5 5"}),L.jsx("path",{d:"m17 14-5 5-5-5"})]})]})]})}),n&&n.accounts&&n.accounts.length>1&&L.jsx("div",{className:"mb-4",children:L.jsxs(Iv,{value:t||"",onChange:p,children:[L.jsx(Cc,{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Select Account"}),L.jsxs("div",{className:"relative mt-1",children:[L.jsxs(su,{className:"grid w-full cursor-default grid-cols-1 rounded-lg border border-gray-300 dark:border-[#192A39] bg-white dark:bg-[#101B29] py-2 px-3 text-left text-gray-800 dark:text-gray-300 shadow-sm focus:outline-none focus:ring-2 focus:ring-[#2D2DF1] dark:focus:ring-[#BFBFF9] focus:border-transparent text-sm",children:[L.jsx("span",{className:"col-start-1 row-start-1 truncate pr-8",children:t?Yn(t,6,4):"Select account"}),L.jsx("span",{className:"col-start-1 row-start-1 self-center justify-self-end",children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"text-gray-500 dark:text-gray-400","aria-hidden":"true",children:L.jsx("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),L.jsx(iu,{transition:!0,className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white dark:bg-[#101B29] py-1 shadow-lg ring-1 ring-black/5 dark:ring-[#192A39]/50 focus:outline-none text-sm data-[closed]:data-[leave]:opacity-0 data-[leave]:transition data-[leave]:duration-100 data-[leave]:ease-in",children:n.accounts.map(A=>L.jsxs(au,{value:A.address,className:"group relative cursor-default select-none py-2 pl-3 pr-9 text-gray-900 dark:text-gray-300 data-[focus]:bg-[#E9E9FD] dark:data-[focus]:bg-[#192A39] data-[focus]:text-gray-900 dark:data-[focus]:text-[#E9E9FD] data-[focus]:outline-none",children:[L.jsx("span",{className:"block truncate font-normal group-data-[selected]:font-medium",children:Yn(A.address,6,4)}),L.jsx("span",{className:"absolute inset-y-0 right-0 flex items-center pr-3 text-[#2D2DF1] dark:text-[#BFBFF9] group-[&:not([data-selected])]:hidden",children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"h-5 w-5","aria-hidden":"true",children:L.jsx("path",{d:"M13.3334 4L6.00008 11.3333L2.66675 8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]},A.address))})]})]})}),L.jsx("div",{className:"border-t border-gray-200 dark:border-[#192A39] mt-2 mb-2"}),n&&L.jsxs("div",{className:"mb-2 flex items-center gap-2 px-1 py-0.5",children:[L.jsx("div",{className:"h-5 w-5 overflow-hidden rounded flex items-center justify-center",children:n.metadata.icon?L.jsx("img",{src:n.metadata.icon,alt:`${n.metadata.name} icon`,className:"max-w-full max-h-full"}):L.jsx("div",{className:"h-5 w-5 rounded-full bg-gray-200 dark:bg-[#192A39] flex items-center justify-center",children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3 w-3 text-gray-400",viewBox:"0 0 20 20",fill:"currentColor",children:L.jsx("path",{fillRule:"evenodd",d:"M17 9c0-.55-.45-1-1-1h-4c-.55 0-1 .45-1 1v8c0 .55.45 1 1 1h4c.55 0 1-.45 1-1V9zm-1 0v8h-4V9h4zM8 4c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v13c0 .55.45 1 1 1h4c.55 0 1-.45 1-1V4zM3 3h4v14H3V3z",clipRule:"evenodd"})})})}),L.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:n.metadata.name})]}),L.jsx("div",{className:"border-t border-gray-200 dark:border-[#192A39] mb-3 mt-2"}),L.jsxs("div",{className:"flex gap-2",children:[L.jsx("button",{onClick:W,className:"flex-1 py-2 px-4 bg-gray-100 dark:bg-[#192A39] text-gray-700 dark:text-gray-300 font-medium rounded-xl hover:bg-gray-200 dark:hover:bg-[#263A4A] transition-colors text-sm flex items-center justify-center",title:"Copy address",children:s?L.jsxs(L.Fragment,{children:[L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-green-500 mr-1.5",viewBox:"0 0 20 20",fill:"currentColor",children:L.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),"Copied"]}):L.jsxs(L.Fragment,{children:[L.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-1.5",viewBox:"0 0 20 20",fill:"currentColor",children:[L.jsx("path",{d:"M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z"}),L.jsx("path",{d:"M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z"})]}),"Copy"]})}),L.jsx("button",{onClick:u,className:"flex-1 py-2 px-4 bg-red-100 dark:bg-red-900/40 text-red-700 dark:text-red-300 font-medium rounded-xl hover:bg-red-200 dark:hover:bg-red-800/60 transition-colors text-sm",children:"Disconnect"})]})]})})})})})]})}function fu(e){const{queryClient:t}=uu();return L.jsx(Jl,{client:t,children:L.jsx(Hv,{...e})})}function Wv(){const{activeAddress:e}=xt.useWallet();return e?L.jsx(fu,{children:L.jsx(uo,{})}):L.jsx(Hl,{})}hu();exports.ConnectWalletButton=Ms;exports.ConnectWalletMenu=Hl;exports.ConnectedWalletButton=uo;exports.ConnectedWalletMenu=fu;exports.NfdAvatar=Vs;exports.WalletButton=Wv;exports.WalletList=Bl;exports.WalletUIProvider=jv;exports.useAccountInfo=lu;exports.useNfd=Us;exports.useWalletUI=uu;
21
37
  //# sourceMappingURL=index.cjs.map