@asabot/core 0.1.0 → 0.2.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.
Files changed (165) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +78 -13
  3. package/asabot.config.example.yaml +47 -29
  4. package/dist/adapters/feishu/adapter.d.ts +19 -0
  5. package/dist/adapters/feishu/adapter.js +621 -0
  6. package/dist/adapters/feishu/api.d.ts +142 -0
  7. package/dist/adapters/feishu/api.js +306 -0
  8. package/dist/adapters/feishu/bot.d.ts +95 -0
  9. package/dist/adapters/feishu/bot.js +539 -0
  10. package/dist/adapters/feishu/cards.d.ts +93 -0
  11. package/dist/adapters/feishu/cards.js +106 -0
  12. package/dist/adapters/feishu/config.d.ts +13 -0
  13. package/dist/adapters/feishu/config.js +36 -0
  14. package/dist/adapters/feishu/events.d.ts +33 -0
  15. package/dist/adapters/feishu/events.js +14 -0
  16. package/dist/adapters/feishu/index.d.ts +8 -0
  17. package/dist/adapters/feishu/index.js +5 -0
  18. package/dist/adapters/feishu/message.d.ts +64 -0
  19. package/dist/adapters/feishu/message.js +197 -0
  20. package/dist/adapters/feishu/transport.d.ts +34 -0
  21. package/dist/adapters/feishu/transport.js +110 -0
  22. package/dist/adapters/index.d.ts +1 -7
  23. package/dist/adapters/index.js +75 -6
  24. package/dist/adapters/loader.d.ts +6 -0
  25. package/dist/adapters/loader.js +73 -0
  26. package/dist/adapters/media-source.d.ts +7 -0
  27. package/dist/adapters/media-source.js +137 -0
  28. package/dist/adapters/onebot11/adapter.d.ts +5 -0
  29. package/dist/adapters/onebot11/adapter.js +23 -11
  30. package/dist/adapters/onebot11/api.d.ts +4 -1
  31. package/dist/adapters/onebot11/api.js +21 -8
  32. package/dist/adapters/onebot11/errors.d.ts +3 -0
  33. package/dist/adapters/onebot11/errors.js +6 -0
  34. package/dist/adapters/virtual/index.js +7 -1
  35. package/dist/adapters/wecom/adapter.d.ts +14 -0
  36. package/dist/adapters/wecom/adapter.js +220 -0
  37. package/dist/adapters/wecom/bot.d.ts +71 -0
  38. package/dist/adapters/wecom/bot.js +312 -0
  39. package/dist/adapters/wecom/cards.d.ts +37 -0
  40. package/dist/adapters/wecom/cards.js +30 -0
  41. package/dist/adapters/wecom/config.d.ts +8 -0
  42. package/dist/adapters/wecom/config.js +10 -0
  43. package/dist/adapters/wecom/events.d.ts +93 -0
  44. package/dist/adapters/wecom/events.js +46 -0
  45. package/dist/adapters/wecom/index.d.ts +7 -0
  46. package/dist/adapters/wecom/index.js +21 -0
  47. package/dist/adapters/wecom/media.d.ts +50 -0
  48. package/dist/adapters/wecom/media.js +149 -0
  49. package/dist/adapters/wecom/message.d.ts +151 -0
  50. package/dist/adapters/wecom/message.js +116 -0
  51. package/dist/adapters/wecom/transport.d.ts +39 -0
  52. package/dist/adapters/wecom/transport.js +116 -0
  53. package/dist/adapters/weixin-clawbot/adapter.d.ts +16 -0
  54. package/dist/adapters/weixin-clawbot/adapter.js +173 -0
  55. package/dist/adapters/weixin-clawbot/bot.d.ts +41 -0
  56. package/dist/adapters/weixin-clawbot/bot.js +254 -0
  57. package/dist/adapters/weixin-clawbot/index.d.ts +2 -0
  58. package/dist/adapters/weixin-clawbot/index.js +19 -0
  59. package/dist/adapters/weixin-clawbot/media.d.ts +57 -0
  60. package/dist/adapters/weixin-clawbot/media.js +196 -0
  61. package/dist/adapters/weixin-clawbot/message.d.ts +12 -0
  62. package/dist/adapters/weixin-clawbot/message.js +79 -0
  63. package/dist/adapters/weixin-clawbot/protocol.d.ts +145 -0
  64. package/dist/adapters/weixin-clawbot/protocol.js +178 -0
  65. package/dist/adapters/weixin-clawbot/setup.d.ts +2 -0
  66. package/dist/adapters/weixin-clawbot/setup.js +121 -0
  67. package/dist/bootstrap.d.ts +5 -0
  68. package/dist/bootstrap.js +5 -20
  69. package/dist/cli.js +9 -3
  70. package/dist/core/adapter.d.ts +69 -3
  71. package/dist/core/adapter.js +11 -1
  72. package/dist/core/app.d.ts +12 -9
  73. package/dist/core/app.js +50 -51
  74. package/dist/core/bot-accounts.d.ts +28 -0
  75. package/dist/core/bot-accounts.js +78 -0
  76. package/dist/core/bot-policies.d.ts +30 -0
  77. package/dist/core/bot-policies.js +112 -0
  78. package/dist/core/bot.d.ts +19 -1
  79. package/dist/core/bot.js +13 -0
  80. package/dist/core/capabilities.d.ts +54 -0
  81. package/dist/core/capabilities.js +25 -0
  82. package/dist/core/config/schema.d.ts +61 -8
  83. package/dist/core/config/schema.js +15 -3
  84. package/dist/core/config/write.js +5 -1
  85. package/dist/core/connections.d.ts +84 -0
  86. package/dist/core/connections.js +326 -0
  87. package/dist/core/delivery.d.ts +53 -0
  88. package/dist/core/delivery.js +115 -0
  89. package/dist/core/dispatch/api.d.ts +3 -1
  90. package/dist/core/dispatch/api.js +12 -5
  91. package/dist/core/dispatch/dispatcher.d.ts +1 -0
  92. package/dist/core/dispatch/dispatcher.js +35 -15
  93. package/dist/core/dispatch/outgoing.d.ts +1 -0
  94. package/dist/core/dispatch/outgoing.js +5 -3
  95. package/dist/core/dispatch/trace.d.ts +2 -0
  96. package/dist/core/dispatch/types.d.ts +6 -0
  97. package/dist/core/dispatch/types.js +1 -2
  98. package/dist/core/errors.d.ts +4 -1
  99. package/dist/core/errors.js +7 -1
  100. package/dist/core/event/session.d.ts +3 -1
  101. package/dist/core/event/session.js +7 -4
  102. package/dist/core/event/types.d.ts +5 -1
  103. package/dist/core/identity.d.ts +18 -0
  104. package/dist/core/identity.js +31 -0
  105. package/dist/core/logger.js +5 -1
  106. package/dist/core/message/types.d.ts +2 -0
  107. package/dist/core/permission.d.ts +2 -1
  108. package/dist/core/permission.js +7 -2
  109. package/dist/core/plugin/context.d.ts +10 -10
  110. package/dist/core/plugin/context.js +20 -18
  111. package/dist/core/plugin/definition.d.ts +5 -0
  112. package/dist/core/plugin/execution.d.ts +3 -0
  113. package/dist/core/plugin/execution.js +3 -0
  114. package/dist/core/plugin/manager.d.ts +18 -4
  115. package/dist/core/plugin/manager.js +137 -45
  116. package/dist/core/plugin/tasks.d.ts +131 -24
  117. package/dist/core/plugin/tasks.js +517 -117
  118. package/dist/core/plugin/types.d.ts +3 -0
  119. package/dist/core/ratelimit.js +6 -1
  120. package/dist/core/storage/index.d.ts +3 -1
  121. package/dist/core/storage/index.js +52 -2
  122. package/dist/core/target.d.ts +24 -6
  123. package/dist/core/target.js +26 -6
  124. package/dist/core/utils/merge.d.ts +3 -0
  125. package/dist/core/utils/merge.js +18 -0
  126. package/dist/core/utils/redact.d.ts +6 -0
  127. package/dist/core/utils/redact.js +76 -0
  128. package/dist/index.d.ts +13 -5
  129. package/dist/index.js +7 -2
  130. package/dist/plugins/admin.js +30 -3
  131. package/dist/plugins/help.js +1 -0
  132. package/dist/plugins/history.d.ts +4 -0
  133. package/dist/plugins/history.js +13 -3
  134. package/dist/plugins/http.js +1 -0
  135. package/dist/plugins/long-message.js +20 -12
  136. package/dist/plugins/status.js +1 -0
  137. package/dist/server/auth.d.ts +5 -1
  138. package/dist/server/auth.js +11 -7
  139. package/dist/server/connection-setups.d.ts +126 -0
  140. package/dist/server/connection-setups.js +188 -0
  141. package/dist/server/groups.d.ts +1 -0
  142. package/dist/server/groups.js +8 -8
  143. package/dist/server/index.d.ts +1 -0
  144. package/dist/server/index.js +229 -29
  145. package/dist/server/schemas.d.ts +6 -2
  146. package/dist/server/settings.d.ts +66 -20
  147. package/dist/server/settings.js +158 -61
  148. package/dist/server/views.d.ts +95 -17
  149. package/dist/server/views.js +48 -13
  150. package/dist/testing/create-test-app.js +2 -2
  151. package/dist/testing/dispatch-fixture.js +2 -1
  152. package/dist/testing/fake-bot.d.ts +2 -1
  153. package/dist/testing/fake-bot.js +4 -1
  154. package/docs/DEPLOY.md +190 -0
  155. package/docs/FEISHU.md +170 -0
  156. package/docs/WECOM.md +107 -0
  157. package/docs/WEIXIN-CLAWBOT.md +56 -0
  158. package/package.json +29 -3
  159. package/web/dist/assets/index-BAbj8e7E.css +2 -0
  160. package/web/dist/assets/index-CMuBy6y5.js +51 -0
  161. package/web/dist/assets/{markdown-CDlgpI7K.js → markdown-MEN1AImu.js} +3 -3
  162. package/web/dist/index.html +2 -2
  163. package/web/dist/plugin-pages/_sdk.js +26 -1
  164. package/web/dist/assets/index-BI5GCpiI.css +0 -2
  165. package/web/dist/assets/index-C-rshHwD.js +0 -51
@@ -1,51 +0,0 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ee(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ee(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),ee(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=ee(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=ee(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ee(N(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return ee(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var te=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function ne(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,te)}catch(e){te(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function re(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else ne(re.bind(null,e))}var ie={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ie,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=re,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=ne,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),p=o(((e,t)=>{t.exports=f()})),m=l(d(),1),h=p(),g=m.createContext(void 0),_=e=>{let t=m.useContext(g);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},v=({client:e,children:t})=>(m.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,h.jsx)(g.Provider,{value:e,children:t})),y={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},b=new class{#e=y;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function x(e){setTimeout(e,0)}var S=typeof window>`u`||`Deno`in globalThis;function C(){}function w(e,t){return typeof e==`function`?e(t):e}function T(e){return typeof e==`number`&&e>=0&&e!==1/0}function E(e,t){return Math.max(e+(t||0)-Date.now(),0)}function D(e,t){return typeof e==`function`?e(t):e}function O(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==A(o,t.options))return!1}else if(!M(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function k(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(j(t.options.mutationKey)!==j(a))return!1}else if(!M(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function A(e,t){return(t?.queryKeyHashFn||j)(e)}function j(e){return JSON.stringify(e,(e,t)=>te(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function M(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!M(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!M(e[r],t[r]))return!1;return!0}return!1}var N=Object.prototype.hasOwnProperty;function ee(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=F(e)&&F(t);if(!r&&!(te(e)&&te(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:N.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=ee(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function P(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n of Object.keys(e))if(!N.call(t,n)||e[n]!==t[n])return!1;return!0}function F(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function te(e){if(!ne(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!ne(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function ne(e){return Object.prototype.toString.call(e)===`[object Object]`}function re(e){return new Promise(t=>{b.setTimeout(t,e)})}function ie(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:ee(e,t)}function ae(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(-n):r}function oe(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,n):r}var se=Symbol();function ce(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===se?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function le(e,t){return typeof e==`function`?e(...t):!!e}var ue=Symbol();function de(e,t,n,r){let i=!1,a;return Object.defineProperties(e,{[ue]:{value:r},signal:{enumerable:!0,get:()=>(a??=t(),i||(i=!0,a.aborted?n():a.addEventListener(`abort`,n,{once:!0})),a)}}),e}var fe=()=>S,I=()=>fe(),L=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(){}},pe=new class extends L{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},me=x;function he(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=me,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var ge=he(),_e=new class extends L{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function ve(e){return Math.min(1e3*2**e,3e4)}function ye(e){return(e??`online`)!==`online`||_e.isOnline()}var be=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function xe(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(C);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new be(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>pe.isFocused()&&(e.networkMode===`always`||_e.isOnline())&&e.canRun(),p=()=>ye(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=t=>new Promise(n=>{r=e=>{(c()||t())&&n(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(I()?0:3),a=e.retryDelay??ve,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);t||!s?h(r):(n++,e.onFail?.(n,r),re(o).then(()=>c()||f()?void 0:g(f)).then(()=>{t?h(r):_()}))})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g(p).then(_),s)}}var Se=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),T(this.gcTime)&&(this.#e=b.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(I()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(b.clearTimeout(this.#e),this.#e=void 0)}};function Ce(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=t,u=e=>{de(e,()=>t.signal,()=>n=!0,l[ue])},d=ce(t.options,t.fetchOptions),f=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return u(e),e})(),o=await d(a),{maxPages:s}=t.options,c=i?oe:ae;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?Te:we,n={pages:a,pageParams:o};s=await f(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]===void 0?r.initialPageParam:o[0]:we(r,s);if(c>0&&e==null)break;s=await f(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function we(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Te(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function Ee(e,t){return t?we(e,t)!=null:!1}function De(e,t){return!t||!e.getPreviousPageParam?!1:Te(e,t)!=null}var Oe=class extends Se{#e;#t;#n;#r;#i;#a;#o;#s;#c;constructor(e){super(),this.#c=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=je(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#s,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=je(this.options);e.data!==void 0&&(this.setState(Ae(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=ie(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(C).catch(C):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>D(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===se||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.state.data!==void 0&&this.getObserversCount()>0&&this.observers.some(e=>D(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!E(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#c||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a&&this.#o)return this.#a.continueRetry(),this.#o}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperties(e,{[ue]:{value:n.signal,enumerable:!0},signal:{enumerable:!0,get:()=>(this.#c=!0,n.signal)}})},i=()=>{let e=ce(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#c=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?Ce(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=xe({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof be&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}),s=(async()=>{try{let e=await o.promise;if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof be){if(e.silent){if(this.#a!==o&&this.#o)return this.#o;throw e}if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0,this.#o=void 0),this.scheduleGc()}})();return this.#o=s,o.start(),s}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...ke(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Ae(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),ge.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function ke(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ye(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Ae(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function je(e){let 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 Me=class extends L{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Pe(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Fe(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Fe(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof D(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!P(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Ie(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||D(this.options.enabled,this.#t)!==D(t.enabled,this.#t)||D(this.options.staleTime,this.#t)!==D(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||D(this.options.enabled,this.#t)!==D(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return P(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch(t).then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(C)),t}#h(e){return!I()&&D(this.options.enabled,this.#t)!==!1&&T(e)}#g(){this.#b();let e=D(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=E(this.#r.dataUpdatedAt,e)+1;this.#u=b.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return D(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=b.setInterval(()=>{(this.options.refetchIntervalInBackground||pe.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(b.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(b.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Pe(e,t),o=i&&Ie(e,n,t,r);(a||o)&&(l={...l,...ke(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=ie(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=ie(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=i?.error===f?i.errorUpdatedAt:Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Le(e,t),refetch:this.refetch,isEnabled:D(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),P(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size||this.options.throwOnError&&this.#r.error!==e.error)return!0;for(let t of n??this.#p)if(this.#r[t]!==e[t])return!0;return!1})();ge.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function Ne(e,t){return D(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||D(t.retryOnMount,e)!==!1)}function Pe(e,t){return Ne(e,t)||e.state.data!==void 0&&Fe(e,t,t.refetchOnMount)}function Fe(e,t,n){if(D(t.enabled,e)!==!1&&D(t.staleTime,e)!==`static`){let r=D(n,e);return r===`always`||r!==!1&&Le(e,t)}return!1}function Ie(e,t,n,r){return(e!==t||D(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Le(e,n)}function Le(e,t){return D(t.enabled,e)!==!1&&e.isStaleByTime(D(t.staleTime,e))}var Re=class extends Me{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Ee(t,n.data),hasPreviousPage:De(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},ze=class extends Se{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Be(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=xe({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}this.state.isPaused&&r.canStart()&&t();let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),ge.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Be(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Ve=class extends L{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new ze({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=He(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=He(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=He(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=He(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){ge.batch(()=>{let e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(e=>{this.notify({type:`removed`,mutation:e})})})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>k(t,e))}findAll(e={}){return this.getAll().filter(t=>k(e,t))}notify(e){ge.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return ge.batch(()=>Promise.all(e.map(e=>e.continue().catch(C))))}};function He(e){return e.options.scope?.id}var Ue=class extends L{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),P(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&j(t.mutationKey)!==j(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Be();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){ge.batch(()=>{let t=this.#r;if(t&&this.hasListeners()){let n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{t.onSuccess?.(e.data,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(e.data,null,n,r,i)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{t.onError?.(e.error,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(void 0,e.error,n,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},We=class extends L{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??A(r,t),a=this.get(i);return a||(a=new Oe({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){ge.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>O(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>O(e,t)):t}notify(e){ge.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ge.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ge.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ge=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new We,this.#t=e.mutationCache||new Ve,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=pe.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=_e.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(D(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=w(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return ge.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;ge.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return ge.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=ge.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(C).catch(C)}invalidateQueries(e,t={}){return ge.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=ge.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n),r=e.state.fetchStatus===`paused`;return(!n.throwOnError||r)&&(t=t.catch(C)),r?Promise.resolve():t}));return Promise.all(r).then(C)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(D(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(D(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(C).catch(C)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(C).catch(C)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return _e.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(j(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{M(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(j(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{M(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=A(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===se&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Ke=m.createContext(!1),qe=()=>m.useContext(Ke);Ke.Provider;function Je(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ye=m.createContext(Je()),Xe=()=>m.useContext(Ye),Ze=(e,t,n)=>{let r=n?.state.status===`error`&&typeof e.throwOnError==`function`?le(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},Qe=e=>{m.useEffect(()=>{e.clearReset()},[e])},$e=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||le(n,[e.error,r])),et=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},tt=(e,t)=>e?.suspense&&t.isPending,nt=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function rt(e,t,n){let r=qe(),i=Xe(),a=_(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,et(o),Ze(o,i,s),Qe(i);let[l]=m.useState(()=>new t(a,o)),u=l.getOptimisticResult(o);m.useEffect(()=>{l.setOptions(o)},[o,l]);let d=!r&&c;if(m.useSyncExternalStore(m.useCallback(e=>{let t=d?l.subscribe(ge.batchCalls(e)):C;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),tt(o,u))throw nt(o,l,i);if($e({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function it(e,t){return rt(e,Me,t)}function at(e,t){let n=_(t),[r]=m.useState(()=>new Ue(n,e));m.useEffect(()=>{r.setOptions(e)},[r,e]);let i=m.useSyncExternalStore(m.useCallback(e=>r.subscribe(ge.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=m.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(C)},[r]);if(i.error&&le(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function ot(e,t){return rt(e,Re,t)}var st=(0,m.createContext)({});function ct(e){let t=(0,m.useRef)(null);return t.current===null&&(t.current=e()),t.current}var lt=typeof window<`u`?m.useLayoutEffect:m.useEffect,ut=(0,m.createContext)(null);function dt(e,t){e.indexOf(t)===-1&&e.push(t)}function ft(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var pt=(e,t,n)=>n>t?t:n<e?e:n,mt={},ht=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),gt=e=>typeof e==`object`&&!!e,_t=e=>/^0[^.\s]+$/u.test(e);function vt(e){let t;return()=>(t===void 0&&(t=e()),t)}var yt=e=>e,bt=(...e)=>e.reduce((e,t)=>n=>t(e(n))),xt=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},St=class{constructor(){this.subscriptions=[]}add(e){return dt(this.subscriptions,e),()=>this.remove(e)}remove(e){ft(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},Ct=e=>e*1e3,wt=e=>e/1e3,Tt=(e,t)=>t?1e3/t*e:0,Et=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e},Dt=(e,t,n)=>e*(3*(1-e)*((1-e)*t+e*n)+e*e);function Ot(e,t,n,r){return e===t&&n===r?yt:i=>{let a=0,o=1,s=i;for(let t=0;;t++){s>=a&&s<=o||(s=(a+o)/2);let r=Dt(s,e,n)-i;if(r*r<1e-28||t===40)break;r>0?o=s:a=s,s-=r*1e-7/(Dt(s+1e-7,e,n)-i-r)}return Dt(s,t,r)}}var kt=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,At=e=>t=>1-e(1-t),jt=Ot(.33,1.53,.69,.99),Mt=At(jt),Nt=kt(Mt),Pt=e=>e>=1?1:(e*=2)<1?.5*Mt(e):.5*(2-2**(-10*(e-1))),Ft=e=>1-Math.sin(Math.acos(e)),It=At(Ft),Lt=kt(Ft),Rt=Ot(.42,0,1,1),zt=Ot(0,0,.58,1),Bt=Ot(.42,0,.58,1),Vt=e=>Array.isArray(e)&&typeof e[0]!=`number`;function Ht(e,t){return Vt(e)?e[Et(0,e.length,t)]:e}var Ut=e=>Array.isArray(e)&&typeof e[0]==`number`,Wt={linear:yt,easeIn:Rt,easeInOut:Bt,easeOut:zt,circIn:Ft,circInOut:Lt,circOut:It,backIn:Mt,backInOut:Nt,backOut:jt,anticipate:Pt},Gt=e=>typeof e==`string`,Kt=e=>{if(Ut(e)){let[t,n,r,i]=e;return Ot(t,n,r,i)}return Gt(e)?Wt[e]:e},qt={delta:0,timestamp:0,isProcessing:!1},Jt;function Yt(){Jt=void 0}var R={now:()=>(Jt===void 0&&R.set(qt.isProcessing||mt.useManualTiming?qt.timestamp:performance.now()),Jt),set:e=>{Jt=e,queueMicrotask(Yt)}},Xt=e=>Math.round(e*1e5)/1e5,Zt=e=>t=>typeof t==`string`&&t.startsWith(e),Qt=Zt(`--`),$t=Zt(`var(--`),en=e=>$t(e)?tn.test(e.split(`/*`)[0].trim()):!1,tn=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function nn(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var rn={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},an={...rn,transform:e=>pt(0,1,e)},on={...rn,default:1},sn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function cn(e){return e==null}var ln=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,un=(e,t)=>n=>!!(typeof n==`string`&&ln.test(n)&&n.startsWith(e)||t&&!cn(n)&&Object.prototype.hasOwnProperty.call(n,t)),dn=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(sn);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},fn=e=>pt(0,255,e),pn={...rn,transform:e=>Math.round(fn(e))},mn={test:un(`rgb`,`red`),parse:dn(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+pn.transform(e)+`, `+pn.transform(t)+`, `+pn.transform(n)+`, `+Xt(an.transform(r))+`)`},hn=(e,t,n)=>{let r=e.substring(1+t*n,1+(t+1)*n);return n>1?r:r+r};function gn(e){let t=e.length>5?2:1,n=hn(e,3,t);return{red:parseInt(hn(e,0,t),16),green:parseInt(hn(e,1,t),16),blue:parseInt(hn(e,2,t),16),alpha:n?parseInt(n,16)/255:1}}var _n={test:un(`#`),parse:gn,transform:mn.transform},vn=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),yn=vn(`deg`),bn=vn(`%`),z=vn(`px`),xn=vn(`vh`),Sn=vn(`vw`),Cn={...bn,parse:e=>bn.parse(e)/100,transform:e=>bn.transform(e*100)},wn={test:un(`hsl`,`hue`),parse:dn(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+bn.transform(Xt(t))+`, `+bn.transform(Xt(n))+`, `+Xt(an.transform(r))+`)`},Tn={test:e=>mn.test(e)||_n.test(e)||wn.test(e),parse:e=>mn.test(e)?mn.parse(e):wn.test(e)?wn.parse(e):_n.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?mn.transform(e):wn.transform(e),getAnimatableNone:e=>{let t=Tn.parse(e);return t.alpha=0,Tn.transform(t)}},En=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Dn=new RegExp(sn.source),On=new RegExp(En.source,`i`);function kn(e){return isNaN(e)&&typeof e==`string`&&(Dn.test(e)||On.test(e))}var An=`number`,jn=`color`,Mn=`var`,Nn=`var(`,Pn="${}",Fn=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)(?![a-z]*\()/giu;function In(e){let t=e.toString();return Dn.test(t)||On.test(t)}function Ln(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Fn,e=>(Tn.test(e)?(r.color.push(a),i.push(jn),n.push(Tn.parse(e))):e.startsWith(Nn)?(r.var.push(a),i.push(Mn),n.push(e)):(r.number.push(a),i.push(An),n.push(parseFloat(e))),++a,Pn)).split(Pn),indexes:r,types:i}}function Rn(e){return Ln(e).values}function zn({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];i+=e===An?Xt(r[a]):e===jn?Tn.transform(r[a]):r[a]}return i}}function Bn(e){return zn(Ln(e))}var Vn=e=>typeof e==`number`?0:Tn.test(e)?Tn.getAnimatableNone(e):e,Hn=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:Vn(e);function Un(e){let t=Ln(e);return zn(t)(t.values.map((e,n)=>Hn(e,t.split[n])))}var Wn={test:kn,parse:Rn,createTransformer:Bn,getAnimatableNone:Un};function Gn(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Kn({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Gn(s,r,e+1/3),a=Gn(s,r,e),o=Gn(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function qn(e,t){return n=>n>0?t:e}var Jn=(e,t,n)=>e+(t-e)*n,Yn=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Xn=[_n,mn,wn],Zn=e=>Xn.find(t=>t.test(e));function Qn(e){let t=Zn(e);if(!t)return!1;let n=t.parse(e);return t===wn&&(n=Kn(n)),n}var $n=(e,t)=>{let n=Qn(e),r=Qn(t);if(!n||!r)return qn(e,t);let i={...n};return e=>(i.red=Yn(n.red,r.red,e),i.green=Yn(n.green,r.green,e),i.blue=Yn(n.blue,r.blue,e),i.alpha=Jn(n.alpha,r.alpha,e),mn.transform(i))},er=new Set([`none`,`hidden`]);function tr(e,t){return er.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function nr(e,t){return n=>Jn(e,t,n)}function rr(e){return typeof e==`number`?nr:typeof e==`string`?en(e)?qn:Tn.test(e)?$n:sr:Array.isArray(e)?ir:typeof e==`object`?Tn.test(e)?$n:ar:qn}function ir(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>rr(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function ar(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=rr(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function or(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var sr=(e,t)=>{let n=Ln(e),r=Ln(t);return n.indexes.var.length===r.indexes.var.length&&n.indexes.color.length===r.indexes.color.length&&n.indexes.number.length>=r.indexes.number.length?er.has(e)&&!r.values.length||er.has(t)&&!n.values.length?tr(e,t):bt(ir(or(n,r),r.values),zn(r)):qn(e,t)},cr=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function lr(e,t){let n=cr.exec(e);if(!n)return;let r=cr.exec(t);if(!r||n[2]!==r[2])return;let i=n[2],a=parseFloat(n[1]),o=parseFloat(r[1]);return e=>Xt(Jn(a,o,e))+i}function ur(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return Jn(e,t,n);if(typeof e==`string`&&typeof t==`string`){let n=lr(e,t);if(n)return n}return rr(e)(e,t)}var dr=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function fr(e){let t=new Set,n=new Set,r=!1,i=!1,a,o=new Set,s={delta:0,timestamp:0,isProcessing:!1};function c(t){o.has(t)&&(n.add(t),e()),(a=t)(s)}let l={schedule:(e,i=!1,s=!1)=>{let c=s&&r,l=c?t:n;return i&&o.add(e),c&&e!==a&&l.delete(e),l.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{if(s=e,r){i=!0;return}r=!0;let o=t;t=n,n=o,t.forEach(c),t.clear(),a=void 0,r=!1,i&&(i=!1,l.process(e))}};return l}var pr=40;function mr(e,t,n={delta:0,timestamp:0,isProcessing:!1}){let r=!1,i=!0,a=()=>r=!0,o=dr.reduce((e,t)=>(e[t]=fr(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=mt.useManualTiming,o=a?n.timestamp:performance.now();r=!1,a||(n.delta=i?1e3/60:Math.max(Math.min(o-n.timestamp,pr),1)),n.timestamp=o,n.isProcessing=!0,s.process(n),c.process(n),l.process(n),u.process(n),d.process(n),f.process(n),p.process(n),m.process(n),n.isProcessing=!1,r&&t&&(i=!1,e(h))},g=()=>{r=!0,i=!0,n.isProcessing||e(h)};return{schedule:dr.reduce((e,t)=>{let n=o[t];return e[t]=(e,t=!1,i=!1)=>(r||g(),n.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<dr.length;t++)o[dr[t]].cancel(e)},state:n,steps:o}}var{schedule:hr,cancel:gr,steps:_r}=mr(typeof requestAnimationFrame<`u`?requestAnimationFrame:yt,!0,qt),vr=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>hr.update(t,e),stop:()=>gr(t),now:()=>qt.isProcessing?qt.timestamp:R.now()}},yr=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},br=2e4;function xr(e,t=50,n=br,r){let i=0,a=e.next(i);for(r?.push(a.value);!a.done&&i<n;)i+=t,a=e.next(i),r?.push(a.value);return i>=n?1/0:i}function Sr(e,t=100,n){let{keyframes:r,velocity:i}=e,a=r&&r[r.length-1]-r[0],o=n({...e,velocity:i&&a?i*t/a:i,keyframes:[0,t]}),s=Math.min(xr(o),br);return{type:`keyframes`,ease:e=>o.next(s*e).value/t,duration:wt(s)}}var Cr=100,wr=10,Tr=1,Er=800,Dr=.3,Or=.3,kr=.01,Ar=2,jr=.005,Mr=.5,Nr=.01,Pr=10,Fr=.05,Ir=e=>e<0?1/Math.max(1+e,Fr):Math.max(1-e,Fr);function Lr(e,t){if(!(e>1))return 1;let n=Math.sqrt(e*e-1),r=e-n,i=e+n,a=2*n*Math.exp(-t)*(1+t);return Br(e=>i*Math.exp(-r*e)-r*Math.exp(-i*e)-a,e=>Math.exp(-i*e)-Math.exp(-r*e),t)/t}function Rr(e,t){return e*Math.sqrt(1-t*t)}var zr=12;function Br(e,t,n){let r=n;for(let n=1;n<zr;n++)r-=e(r)/t(r);return r}var Vr=.001;function Hr({duration:e=Er,bounce:t=Dr}){let n,r,i=Ir(t);e=pt(Nr,Pr,wt(e)),i<1?(n=t=>{let n=t*i,r=n*e,a=Rr(t,i),o=Math.exp(-r);return Vr-n/a*o},r=t=>{let r=t*i*e,a=i*i*t*t*e,o=Math.exp(-r),s=Rr(t*t,i);return(-n(t)+Vr>0?-1:1)*-a*o/s}):(n=t=>-.001+Math.exp(-t*e)*(t*e+1),r=t=>Math.exp(-t*e)*(-t*(e*e)));let a=5/e,o=Br(n,r,a),s=o*Lr(i,o*e),c=s*s;return{stiffness:c,damping:i*2*Math.sqrt(c),duration:Ct(e)}}var Ur=(e,t)=>(t?e>=0:e>0)&&e<1/0;function Wr(e,t){if(Ur(e,t))return e}function Gr(e){let t=Wr(e.stiffness),n=Wr(e.damping,!0),r=Wr(e.mass),i={...e,stiffness:t??Cr,damping:n??wr,mass:r??Tr,isResolvedFromDuration:!1,isTimeDefined:(t??n??r)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(i.isTimeDefined){if(e.visualDuration){let t=Ir(e.bounce||0),n=2*Math.PI/(e.visualDuration*1.2)*Lr(t,2*Math.PI/1.2);i.stiffness=n*n,i.damping=2*t*Math.sqrt(i.stiffness)}else Object.assign(i,Hr(i)),i.isResolvedFromDuration=!0;Ur(i.stiffness)&&Ur(i.damping,!0)||(i.stiffness=Cr,i.damping=wr)}return i}function Kr(e=Or,t=Dr){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},r=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:o,damping:s,mass:c,duration:l,isResolvedFromDuration:u,isTimeDefined:d}=Gr({...n}),f=e=>u?0:-wt(e),p=s/(2*Math.sqrt(o*c)),m=wt(Math.sqrt(o/c)),h=p*m,g={target:i,delta:i-r,velocity:f(n.velocity)||0,restSpeed:0,restDelta:0},_=()=>{let e=Math.abs(g.delta)<5;g.restSpeed=n.restSpeed||(e?kr:Ar),g.restDelta=n.restDelta||(e?jr:Mr)};_();let v,y,b;if(p<1){let e=Rr(m,p),t={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};b=()=>{t.A=(g.velocity+h*g.delta)/e,t.sinC=h*t.A+g.delta*e,t.cosC=h*g.delta-t.A*e};let n=n=>{n!==t.t&&(t.t=n,t.env=Math.exp(-h*n),t.sin=Math.sin(e*n),t.cos=Math.cos(e*n))};v=e=>(n(e),g.target-t.env*(t.A*t.sin+g.delta*t.cos)),y=e=>(n(e),t.env*(t.sinC*t.sin+t.cosC*t.cos))}else if(p===1){v=e=>g.target-Math.exp(-m*e)*(g.delta+(g.velocity+m*g.delta)*e);let e={C:0};b=()=>{e.C=g.velocity+m*g.delta},y=t=>Math.exp(-m*t)*(m*e.C*t-g.velocity)}else{let e=m*Math.sqrt(p*p-1),t=h-e,n=h+e,r=e<1||d?1/0:300/e,i=(e,t)=>Math.exp(t>r?(h-e)*r-h*t:-e*t),a={S:0,F:0};b=()=>{let t=(g.velocity+h*g.delta)/e;a.S=(g.delta+t)/2,a.F=(g.delta-t)/2},v=e=>g.target-a.S*i(t,e)-a.F*i(n,e),y=e=>t*a.S*i(t,e)+n*a.F*i(n,e)}b();let x=u&&l||null,S={calculatedDuration:x,retarget:(e,t)=>{g.target=e[e.length-1],g.delta=g.target-e[0],g.velocity=f(t),n.restSpeed&&n.restDelta||_(),S.calculatedDuration=x,a.done=!1,b()},velocity:e=>Ct(y(e)),next:e=>{let t=v(e);if(u)a.done=e>=l;else{let n=Ct(y(e));a.done=Math.abs(n)<=g.restSpeed&&Math.abs(g.target-t)<=g.restDelta}return a.value=a.done?g.target:t,a},toString:()=>{let e=Math.min(xr(S),br),t=yr(t=>S.next(e*t).value,e,30);return e+`ms `+t}};return S}var qr=Object.assign(Kr,{applyToOptions:e=>{let t=Sr(e,100,Kr);return e.ease=t.ease,e.duration=Ct(t.duration),e.type=`keyframes`,e}});function Jr({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>e<s||e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o?o(g):g;_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>{let t=v(e);f.done=Math.abs(t)<=l,f.value=f.done?_:e?_+t:d},b,x,S=e=>{p(f.value)&&(b=e,x=qr({keyframes:[f.value,m(f.value)],velocity:-v(e)/r*1e3,damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return!x&&b===void 0&&(t=!0,y(e),S(e)),b!==void 0&&e>=b?x.next(e-b):(!t&&y(e),f)}}}function Yr(e,t,n){let r=[],i=mt.mix||ur,a=e.length-1;for(let o=0;o<a;o++){let a=n?.(e[o],e[o+1])||i(e[o],e[o+1]);t&&(a=bt(Array.isArray(t)?t[o]||yt:t,a)),r.push(a)}return r}function Xr(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=Yr(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=xt(e[r],e[r+1],n);return s[r](i)};return n?t=>l(pt(e[0],e[a-1],t)):l}function Zr(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=xt(0,t,r);e.push(Jn(n,1,i))}}function Qr(e){let t=[0];return Zr(t,e.length-1),t}function $r(e,t){return e.map(e=>e*t)}function ei(e,t){return e.map(()=>t||Bt).splice(0,e.length-1)}function ti({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`,mixer:i}){let a=typeof t[0]==`number`?void 0:i,o=Vt(r)?r.map(Kt):Kt(r)||Bt,s={done:!1,value:t[0]},c=-1;if(!a){for(let e=1;e<t.length;e++)if(t[e]!==t[e-1]){if(c>=0){c=-2;break}c=e-1}}if(c>=0){let r=n&&n.length===t.length?n:Qr(t),i=r[c]*e,a=r[c+1]*e,l=t[c],u=t[c+1],d=Array.isArray(o)?o[c]:o,f=(mt.mix||ur)(l,u),p=t.length-2;return{calculatedDuration:e,next:t=>(s.value=c&&t<i?f(0):c<p&&(t>=a||!e)?typeof u==`number`?u:f(1):f(d(t>=a||!e?1:t<=i?0:(t-i)/(a-i))),s.done=t>=e,s)}}let l=Xr($r(n&&n.length===t.length?n:Qr(t),e),t,{ease:Array.isArray(o)?o:ei(t,o),mixer:a});return{calculatedDuration:e,next:t=>(s.value=l(t),s.done=t>=e,s)}}var ni=5;function ri(e,t,n){let r=Math.max(t-ni,0);return Tt(n-e(r),t-r)}function ii(e,t,n=0){return t<=0?n:e.velocity?e.velocity(t):ri(t=>e.next(t).value,t,e.next(t).value)}function ai(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a,o,s=0;for(let t=0;t<e.length;t++){let n=e[t];n!==null&&(s++||(a=n),o=n)}let c=i<0||t&&n!==`loop`&&t%2==1?0:s-1;return!c||r===void 0?c?o:a:r}var oi={decay:Jr,inertia:Jr,tween:ti,keyframes:ti,spring:qr};function si(e){typeof e.type==`string`&&(e.type=oi[e.type])}var ci=40,li=(e,t)=>t-e>ci&&!mt.useManualTiming?t:e;function ui(e,t){return{kind:e,animation:t,timestamp:R.now(),frameTimestamp:qt.timestamp,frameIsProcessing:qt.isProcessing}}function di(e,t,n){let r=globalThis.__MOTION_INSPECT__;if(r)try{r({...ui(`animation-start`,e),options:n?{...t,...n}:t})}catch{}}function fi(e,t){let n=globalThis.__MOTION_INSPECT__;if(n)try{n({...ui(`layout-animation-start`,e),node:t})}catch{}}var pi=class{constructor(){this.isResolved=!1}get finished(){return this._finished||=this.isResolved?Promise.resolve():new Promise(e=>{this._resolve=e}),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(e,t){return this.finished.then(e,t)}},mi=e=>e/100,hi=e=>Math.round(e*1e4)/1e4,gi=class extends pi{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options,t=R.now();e&&e.updatedAt!==t&&this.tick(e.updatedAt=t),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause(),di(this,this.options)}initAnimation(){let{options:e}=this;si(e);let{type:t=ti,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||ti;this.mixKeyframes=void 0,s!==ti&&typeof o[0]!=`number`&&(this.mixKeyframes=bt(mi,e.mixer?.(o[0],o[1])||ur(o[0],o[1])),o=[0,100]);let c=s(o===e.keyframes?e:{...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=xr(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){this.currentTime=this.holdTime??Math.round(e-this.startTime)*this.playbackSpeed}tick(e,t=!1){let{generator:n,totalDuration:r,calculatedDuration:i}=this;if(this.startTime===null)return n.next(0);let{delay:a=0,keyframes:o,type:s,onUpdate:c,finalKeyframe:l}=this.options;this.startTime===this.pendingStartTime&&(this.startTime=li(this.startTime,e)),this.pendingStartTime=void 0,this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let u=this.currentTime-a*(this.playbackSpeed>=0?1:-1),d=this.playbackSpeed>=0?u<0:u>r;this.currentTime=Math.max(u,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let f=this.generate(this.currentTime,d),{done:p}=f;d||(p=this.playbackSpeed>=0?i<1/0?this.currentTime>=r:p:this.currentTime<=0);let m=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&p);return m&&s!==Jr&&(f.value=ai(o,this.options,l,this.speed)),c&&c(f.value),m&&this.finish(),f}at(e){return this.holdTime??hi((e-this.startTime)*this.playbackSpeed)}sampleAt(e,t){let{options:n,totalDuration:r}=this,i=this.at(e)-(n.delay||0);return i>=r&&n.type!==Jr?ai(n.keyframes,n,t?void 0:n.finalKeyframe):this.generate(Math.max(i,0),i<0).value}generate(e,t){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o}=this,{keyframes:s,repeat:c,repeatType:l,repeatDelay:u}=this.options,d=e,f=n;if(c){let t=Math.min(e,r)/o,n=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),i===1&&n--,n=Math.min(n,c+1),n%2&&(l===`reverse`?(i=1-i,u&&(i-=u/o)):l===`mirror`&&(f=a)),d=pt(0,1,i)*o}let p;return t?(this.delayState.value=s[0],p=this.delayState):p=f.next(d),i&&!t&&(p.value=i(p.value)),p}get duration(){return wt(this.calculatedDuration)}get iterationDuration(){return this.duration+wt(this.options.delay??0)}get time(){return wt(this.currentTime)}set time(e){this.state===`finished`&&this.updateFinished(),e=Ct(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){return ii(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(R.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=wt(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=vr,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??(this.pendingStartTime=n):this.startTime=n-this.holdTime/(this.playbackSpeed||1),this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(R.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.driver?.stop(),this.driver=void 0,this.startTime=this.holdTime=null}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}},_i=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function vi(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(sn)||[];if(!r)return e;let i=n.replace(r,``),a=+!!_i.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var yi=/\b([a-z-]*)\(.*?\)/gu,bi={...Wn,getAnimatableNone:e=>{let t=e.match(yi);return t?t.map(vi).join(` `):e}},xi={...Wn,getAnimatableNone:e=>{let t=Wn.parse(e);return Wn.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Si={...rn,transform:Math.round},Ci={rotate:yn,pathRotation:yn,rotateX:yn,rotateY:yn,rotateZ:yn,scale:on,scaleX:on,scaleY:on,scaleZ:on,skew:yn,skewX:yn,skewY:yn,distance:z,translateX:z,translateY:z,translateZ:z,x:z,y:z,z,perspective:z,transformPerspective:z,opacity:an,originX:Cn,originY:Cn,originZ:z},wi={borderWidth:z,borderTopWidth:z,borderRightWidth:z,borderBottomWidth:z,borderLeftWidth:z,borderRadius:z,borderTopLeftRadius:z,borderTopRightRadius:z,borderBottomRightRadius:z,borderBottomLeftRadius:z,width:z,maxWidth:z,height:z,maxHeight:z,top:z,right:z,bottom:z,left:z,inset:z,insetBlock:z,insetBlockStart:z,insetBlockEnd:z,insetInline:z,insetInlineStart:z,insetInlineEnd:z,padding:z,paddingTop:z,paddingRight:z,paddingBottom:z,paddingLeft:z,paddingBlock:z,paddingBlockStart:z,paddingBlockEnd:z,paddingInline:z,paddingInlineStart:z,paddingInlineEnd:z,margin:z,marginTop:z,marginRight:z,marginBottom:z,marginLeft:z,marginBlock:z,marginBlockStart:z,marginBlockEnd:z,marginInline:z,marginInlineStart:z,marginInlineEnd:z,fontSize:z,backgroundPositionX:z,backgroundPositionY:z,...Ci,zIndex:Si,fillOpacity:an,strokeOpacity:an,numOctaves:Si},Ti={...wi,color:Tn,backgroundColor:Tn,outlineColor:Tn,fill:Tn,stroke:Tn,borderColor:Tn,borderTopColor:Tn,borderRightColor:Tn,borderBottomColor:Tn,borderLeftColor:Tn,filter:bi,WebkitFilter:bi,mask:xi,WebkitMask:xi},Ei=e=>Ti[e],Di=new Set([bi,xi]),Oi,ki,Ai;function ji(e,t){if(e===Oi&&t===ki)return Ai;let n=Ei(e);return Di.has(n)||(n=Wn),Ai=n.getAnimatableNone?n.getAnimatableNone(t):void 0,Oi=e,ki=t,Ai}function Mi(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var Ni=e=>e*180/Math.PI,Pi=e=>Ii(Ni(Math.atan2(e[1],e[0]))),Fi={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scaleZ:()=>1,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Pi,rotateZ:Pi,skewX:e=>Ni(Math.atan(e[1])),skewY:e=>Ni(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ii=e=>(e%=360,e<0&&(e+=360),e),Li=Pi,Ri=e=>Math.hypot(e[0],e[1]),zi=e=>Math.hypot(e[4],e[5]),Bi={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ri,scaleY:zi,scaleZ:e=>Math.hypot(e[8],e[9],e[10]),scale:e=>(Ri(e)+zi(e))/2,rotateX:e=>Ii(Ni(Math.atan2(e[6],e[5]))),rotateY:e=>Ii(Ni(Math.atan2(-e[2],e[0]))),rotateZ:Li,rotate:Li,skewX:e=>Ni(Math.atan(e[4])),skewY:e=>Ni(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Vi(e){return+!!e.includes(`scale`)}function Hi(e,t){if(!e||e===`none`)return Vi(t);let n=e.match(/^matrix(3d)?\(([-\d.e\s,]+)\)$/u);if(!n)return Vi(t);let r=(n[1]?Bi:Fi)[t],i=n[2].split(`,`).map(e=>parseFloat(e));return typeof r==`function`?r(i):i[r]}var Ui=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return Hi(n,t)},Wi=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`scaleZ`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Gi=new Set([...Wi,`pathRotation`]),Ki=e=>e===rn||e===z,qi=new Set([`x`,`y`,`z`]),Ji=Wi.filter(e=>!qi.has(e));function Yi(e){let t=[];return Ji.forEach(n=>{let r=e.getValue(n);if(r!==void 0){let e=r.get(),i=+!!n.startsWith(`scale`);if(e===i)return;t.push([n,e]),r.set(i)}}),t}var Xi=new Set([`bottom`,`right`]);function Zi(e,t,n,r,i,a){let o=parseFloat(e);if(!isNaN(o))return o;let{min:s,max:c}=t()[n],l=c-s;return a===`border-box`?l:l-parseFloat(r)-parseFloat(i)}var Qi=({transform:e})=>Hi(e,`x`),$i=({transform:e})=>Hi(e,`y`),ea={width:({width:e,paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r},i)=>Zi(e,i,`x`,t,n,r),height:({height:e,paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r},i)=>Zi(e,i,`y`,t,n,r),top:({top:e})=>parseFloat(e),left:({left:e})=>parseFloat(e),bottom:({top:e},t)=>{let{y:n}=t();return parseFloat(e)+(n.max-n.min)},right:({left:e},t)=>{let{x:n}=t();return parseFloat(e)+(n.max-n.min)},x:Qi,y:$i,translateX:Qi,translateY:$i},ta=new Set,na=!1,B=!1,ra=!1;function ia(){if(B){let e=[],t=new Set,n=new Set;ta.forEach(r=>{r.needsMeasurement&&(e.push(r),t.add(r.element),Xi.has(r.name)&&n.add(r.element))});let r=new Map;n.forEach(e=>{let t=Yi(e);t.length&&(r.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}B=!1,na=!1,ta.forEach(e=>e.complete(ra)),ta.clear()}function aa(){ta.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(B=!0)})}function oa(){ra=!0,aa(),ia(),ra=!1}function sa(e,t,n){if(typeof e==`string`){if(ht(e)||_t(e))return parseFloat(e);if(!Wn.test(e)&&Wn.test(n))return ji(t,n)}return e??void 0}var ca=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(ta.add(this),na||(na=!0,hr.read(aa),hr.resolveKeyframes(ia))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=sa(n.readValue(t,a),t,a);r!==void 0&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}Mi(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ta.delete(this)}cancel(){this.state===`scheduled`&&(ta.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},la=e=>e.startsWith(`--`);function ua(e,t,n){la(t)?e.style.setProperty(t,n):e.style[t]=n}var da={};function fa(e,t){let n=vt(e);return()=>da[t]??n()}var pa=fa(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),ma=fa(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),ha=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ga={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:ha([0,.65,.55,1]),circOut:ha([.55,0,1,.45]),backIn:ha([.31,.01,.66,-.59]),backOut:ha([.33,1.53,.69,.99])};function _a(e,t){if(e)return typeof e==`function`?ma()?yr(e,t):`ease-out`:Ut(e)?ha(e):Array.isArray(e)?e.map(e=>_a(e,t)||ga.easeOut):ga[e]}function va(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=_a(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function ya(e){return typeof e==`function`&&`applyToOptions`in e}function ba({type:e,...t}){return ya(e)&&ma()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var xa=class extends pi{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e;let c=ba(e);this.animation=va(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=this.onFinish=()=>{if(this.animation.onfinish=null,this.finishedTime=this.time,!i){let e=ai(r,this.options,o,this.speed);this.updateMotionValue?.(e),ua(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()},di(this,e,c)}play(){this.isStopped||(this.manualStartTime=null,this.animation.onfinish=this.onFinish,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.isStopped||(this.animation.onfinish=this.onFinish),this.animation.finish?.()}cancel(){this.animation.onfinish=null;try{this.animation.cancel()}catch{}}stop(){this.isStopped||(this.isStopped=!0,this.state!==`idle`&&this.finishedTime===null&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel()))}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return wt(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+wt(e)}get time(){return wt(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ct(e),t&&(this.animation.pause(),this.updateFinished())}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,onAttach:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=this.onFinish=null,e&&pa()?(this.animation.timeline=e,t?.(this.animation),yt):n(this)}},Sa={anticipate:Pt,backInOut:Nt,circInOut:Lt};function Ca(e){return e in Sa}function wa(e){typeof e.ease==`string`&&Ca(e.ease)&&(e.ease=Sa[e.ease])}var Ta=class extends xa{constructor(e){wa(e),si(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}elapsed(){return this.state===`running`?(R.now()-this.startTime)*this.speed:this.time*1e3}sample(e){if(!this.sampler){let{motionValue:e,onUpdate:t,onComplete:n,onPlay:r,onStop:i,element:a,...o}=this.options;this.sampler=new gi({...o,autoplay:!1}),this.sampler.stop()}return this.sampler.sample(Math.max(0,e)).value}liveValue(){let{state:e}=this;if(e===`running`||e===`paused`)return this.sample(this.elapsed())}updateMotionValue(e){let{motionValue:t,element:n,name:r}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let{speed:i}=this,a=this.elapsed(),o=this.state===`running`&&i?pt(0,10,a):0,s=this.sample(a);n&&r&&ua(n,r,s),t.setWithVelocity(this.sample(a-o*Math.sign(i)),s,o/Math.abs(i||1))}},Ea=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(Wn.test(e)||e===`0`)&&!e.startsWith(`url(`));function Da(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Oa(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=Ea(i,t),s=Ea(a,t);return!o||!s?!1:Da(e)||(n===`spring`||ya(n))&&r}function ka(e){e.duration=0,e.type=`keyframes`}var Aa=new Set([`opacity`,`clipPath`,`filter`,`transform`]),ja=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Ma(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&ja.test(e[t]))return!0;return!1}var Na=({mixer:e,keyframes:t})=>e&&typeof t[0]!=`number`&&t.some((n,r)=>r&&e(t[r-1],n)),Pa=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),Fa=()=>!mt.useManualTiming&&Object.hasOwnProperty.call(Element.prototype,`animate`);function Ia(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!n||!(Aa.has(n)||Pa.has(n)))return!1;let c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return Fa()&&(Aa.has(n)||Pa.has(n)&&Ma(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`&&!Na(e)}var La=(e,t)=>t&&typeof e==`number`?t.transform(e):e,Ra={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},za=Wi.length,Ba={},Va=(e,t,n=La(t,Ci[e]))=>(Ba[e]||(Ba[e]=(Ra[e]||e)+`(`))+n+`)`,Ha=(e,t)=>(typeof t==`number`?t:parseFloat(t))===+!!e.startsWith(`scale`);function Ua(e,t,n){let r=``;for(let i=0;i<za;i++){let a=Wi[i],o=e[a];if(o===void 0)continue;let s=n&&(t[a]=La(o,wi[a]));Ha(a,o)||(r+=Va(a,o,s||void 0)+` `)}let i=e.pathRotation;return i&&(r+=Va(`rotate`,i)),r=r.trim(),n?n(t,r):r||`none`}var Wa=new WeakMap,Ga=200,Ka=.001,qa=.1,Ja=.001,Ya=100,Xa=100,Za=new Set([`linear`,`easeIn`,`easeOut`,`easeInOut`]),Qa=e=>Za.has(e),$a=new WeakMap,eo=(e,t)=>{let n=$a.get(e);return n?.[0]!==t&&(n=[t,`linear(`+Qr(Array(t+1)).map(t=>hi(e(t))+` `+hi(t*100)+`%`)+`)`],$a.set(e,n)),n[1]},to=(e,t)=>Math.min(Ga,Math.max(2,Math.ceil((t-e)/10))),no=(e,t)=>Math.abs(e-t)<=Ka,ro=(e,t)=>e-t,io=(e,t,n)=>Qr(Array(n+1)).map(n=>Jn(e,t,n)),ao=e=>e.motionValue.owner,oo=e=>Wa.get(e),so=({state:e})=>e===`idle`||e===`finished`,co=(e,t)=>e.latestValues?e.latestValues[t]:e.getValue(t)?.get(),lo=({name:e,motionValue:t})=>e&&Wi.includes(e)&&t?.owner?.current instanceof HTMLElement&&Fa()&&ma();function uo(e){let t=ao(e),{onUpdate:n,transformTemplate:r}=t.getProps();return!e.isHandoff&&!n&&!e.hasOnUpdate&&!r&&e.type!==`inertia`&&(co(t,`transform`)||`none`)===`none`&&!co(t,`pathRotation`)&&!t.projection?.isProjecting()&&!Na(e)}var fo=class{constructor(e,t,n,r){this.element=e,this.update=t,this.makeDriver=n,this.animation=r}get js(){return this.driver||=this.makeDriver(this.update)}now(){return this.driver||this.makeDriver!==vr?this.js.now():qt.isProcessing?qt.timestamp:R.now()}start(e=!0){let t=oo(this.element);!t||t.isJS?this.js.start(e):t.schedule(!1,!e)}stopJS(){this.driver?.stop()}stop(){this.stopJS();let e=oo(this.element);e&&!e.isFinishing&&e.release(this.animation)}},po,mo=class extends gi{constructor(e){let t=ao(e).current,{driver:n=vr}=e,r,i=uo(e);e.driver=e=>new fo(t,e,n,r),super(e),r=this;let a=this.driver;a&&(a.animation=this),this.canAccelerate=i;let{stop:o}=this;this.stop=()=>{this.isAccelerated()&&this.sync(),o()}}offsets(){let{keyframes:e,times:t}=this.options;return t||(this.offsetsOf!==e&&(this.offsetsOf=e,this.cachedOffsets=Qr(e)),this.cachedOffsets)}get group(){return oo(ao(this.options).current)}get js(){return this.driver?.js}stopJS(){this.driver?.stopJS()}get name(){return this.options.name}timing(){let{startTime:e,speed:t,totalDuration:n}=this,{delay:r=0,repeatType:i}=this.options;return this.holdTime===null?n===1/0?[e+r/t,this.resolvedDuration*(i===`loop`?1:2)/t||1]:[e+(r+n)/t,0]:[1/0,0]}isAccelerated(){let{group:e,state:t}=this;return e?.tracks.has(this)&&!e.isJS&&this.canAccelerate&&(t===`running`||t===`paused`)}liveValue(){return this.isAccelerated()?this.sampleAt(R.now()):void 0}tween(){let{keyframes:e,type:t,repeat:n,delay:r=0}=this.options,i=-1;if(n||t!==ti||this.holdTime!==null)return;for(let t=1;t<e.length;t++)if(e[t]!==e[t-1]){if(i>=0)return;i=t-1}let{ease:a}=this.options;Vt(a)&&(a=a[i]);let o=this.offsets(),s=e=>this.startTime+(r+o[e]*this.totalDuration)/this.speed;if(i>=0){let e=Ut(a)?ha(a):Qa(a)?ga[a]:Kt(a);return[s(i),s(i+1),typeof e==`string`||no(e(0),0)&&no(e(1),1)?e:void 0]}}boundaries(e,t){let{startTime:n,speed:r,resolvedDuration:i,options:a}=this,{delay:o=0,repeat:s=0,repeatDelay:c=0,repeatType:l,type:u}=a,d=(u||ti)===ti?this.offsets():[0,1],f=n+o/r,p=[];if(this.holdTime!==null||!(i>0))return p;for(let n=Math.max(0,Math.floor((e-f)*r/i));n<=s;n++){let a=f+n*i/r;if(a>t)break;for(let o of d){let s=a+(n%2&&l&&l!==`loop`?1-o:o)*(i-c)/r;s>e&&s<t&&p.push(s)}}return p}numberAt(e){return parseFloat(this.sampleAt(e,!0))}sync(){let e=R.now(),t=this.sampleAt(e,!0);this.options.motionValue.setWithVelocity(this.holdTime===null?this.sampleAt(e-10,!0):t,t,10)}play(){this.isStopped||((this.group||_o(ao(this.options))).tracks.add(this),super.play())}pause(){super.pause(),this.isAccelerated()&&this.group.schedule(!1)}complete(){super.complete();let{group:e}=this;e&&!e.isJS&&this.tick(R.now())}get time(){return this.isAccelerated()?wt(pt(0,this.totalDuration,this.at(R.now())-(this.options.delay||0))):super.time}set time(e){(po??=Object.getOwnPropertyDescriptor(gi.prototype,`time`).set).call(this,e)}attachTimeline(e){return this.canAccelerate=!1,this.group?.demote(!0),super.attachTimeline(e)}},ho,go=e=>{ho||queueMicrotask(()=>{let e=ho;ho=void 0,e.forEach(e=>e())}),(ho||=[]).push(e)};function _o(e){let t=e.current,n=new Set,r=new Map,i={},a=[],o=new Map,s=[],c=!1,l=!1,u=!1,d=!1,f=-1/0,p,m=1/0,h,g=e=>{for(let t of n)if(t.name===e)return!0},_=(t,n)=>{let o={};for(let s of t===void 0?Wi:a){let a=r.get(s),c=t===void 0?co(e,s):a?a.sampleAt(n>t&&!a.timing()[1]?n:t):i[s];c!==void 0&&(o[s]=c)}return o},v=(e,t)=>{let n=``;for(let r in e){let i=e[r];t&&Ha(r,i)||(n+=Va(r,i)+` `)}return(t?n.trim():n)||`none`},y=(e,t)=>v(_(e,t)),b=(e=_())=>{t.style.transform=v(e,!0)},x=e=>{e.onfinish=e.oncancel=null,e.cancel()},S=(e=!0)=>{clearTimeout(p),m=1/0,h=void 0,e&&b(),s.forEach(({animation:e})=>x(e)),s=[]},C=(e,n)=>new Animation(new KeyframeEffect(t,e,n)),w=(e,t,n=1/0)=>{let r={animation:e,offset:t,end:n};e.startTime=R.now()+t,n<1/0&&(e.onfinish=()=>{r.isDone=!0,s.some(e=>e.end===1/0)&&(x(e),s=s.filter(e=>e!==r)),P.schedule(!1)}),e.oncancel=()=>s.includes(r)&&P.demote(),s.push(r)},T=(e,t,n)=>{let r=(t,n)=>Math.abs(e(n)-e(t)),i=r(t,n);for(;n-t>.01;){let e=(t+n)/2;r(t,e)>r(e,n)?n=e:t=e}return r(t,n)>i/2?[t,n]:[]},E=(e,t,n,r)=>{let i=to(t,n);if(r.length*4>i)return;let a;for(let r of e){let e=r.numberAt(t),i=(r.numberAt((t+n)/2)-e)/(r.numberAt(n)-e);if(i===i){if(a===void 0)a=i;else if(!no(i,a))return}}let o=io(t,n,i).concat(r).sort(ro),s=e=>xt(t,n,e),c,l;for(let n of e){let e=n.numberAt(t),r=o.map(t=>n.numberAt(t)-e),i=r[r.length-1],a=r.some(e=>Math.abs(e)*Ka>Math.abs(i))?0:i,s=r.map(e=>a?e/a:e);if(a&&!c)c=s,l=t=>(n.numberAt(t)-e)/a;else if(s.some((e,t)=>!no(e,a&&c[t])))return}if(!c||c.every((e,t)=>no(e,s(o[t]))))return`linear`;let u=[],d=(e,t=l(e))=>u.push(hi(t)+` `+hi(s(e)*100)+`%`);return c.forEach((e,t)=>{t&&Math.abs(e-c[t-1])>.2&&T(l,o[t-1],o[t]).forEach(e=>d(e)),d(o[t],e)}),`linear(`+u+`)`},D=(e,t,n,r)=>{let i=[t],a=[],o=n,s=t;for(let r of e){let e=r.tween();if(e?.[2]!==`linear`){let[i,c]=r.timing(),[l,u]=e||[t,c?n:i];o=Math.min(o,l),s=Math.max(s,u),a.push(r)}}o=Math.max(t,o),s=Math.min(n,s);let c=(e,t)=>a.every(n=>!(Math.abs(n.numberAt((e+t)/2)-(n.numberAt(e)+n.numberAt(t))/2)>(n.name.startsWith(`scale`)?Ja:qa))),l=(t,n,r)=>{if(n-t<1||c(t,n))i.push(n);else if(r<4)l(t,(t+n)/2,r+1),l((t+n)/2,n,r+1);else{for(let r of e)i.push(...T(e=>r.numberAt(e),t,n));i.push(n)}},u=s>o?io(o,s,Math.ceil((s-o)/100)):[];u.push(n);for(let e of r)u.push(e,Math.min(e+.01,n));let d=t;for(let e of u.sort(ro))e>d&&l(d,e,0),d=e;return i.sort(ro)},O=e=>{let t;for(let n of e){let e=n.tween();if(!e||t&&(Math.abs(e[0]-t[0])>1||Math.abs(e[1]-t[1])>1))return;t=[e[0],e[1],!t||e[2]===t[2]?e[2]:void 0]}return t},k=(e,t,n,r,i={fill:`both`},a)=>{let o=r?[]:e.flatMap(e=>e.boundaries(t,n)),s=r||E(e,t,n,o),c=s?[t,n]:D(e,t,n,o),l=c.map(e=>y(e,a)),u={transform:l};return s||(u.offset=c.map(e=>xt(t,n,e))),l.every(e=>e===l[0])&&(b(_(t,a)),u=null),C(u,{...i,duration:n-t,easing:s||`linear`})},A=e=>{let t=R.now()+e;t<m&&(clearTimeout(p),m=t,p=setTimeout(()=>{m=1/0,P.schedule(!1)},e))},j=t=>{let c=t,l=0,u=0,d=[],f=[],p=new Set;r.clear(),o=new Map;for(let e of n){r.set(e.name,e);let[n,i]=e.timing(),a=n===1/0;if(o.set(e,[e.at(t),e.speed,a]),!a){if(e.speed<0)return;if(i){if(l){let e=(n-u)/i;if(Math.abs(i-l)>1||Math.abs(e-Math.round(e))*l>1)return}else l=i,u=n;f.push(e)}else p.add(n);d.push(e),c=Math.max(c,n)}}i={},a=Wi.filter(t=>{if(r.has(t))return!0;let n=i[t]=co(e,t);return n!==void 0&&!Ha(t,n)}),S(!1);let m=!l&&O(d);try{if(c>t){let e;if(m&&m[1]>t){let[n,r,i]=m;if(n-t>Xa)return d.forEach(e=>e.sync()),A(h=n-t-Xa),!0;e=typeof i==`string`?i:i?eo(i,to(n,r)):E(d,n,r,[]),e&&w(k(d,n,r,e,{fill:`both`,endDelay:c-r}),n-t,c-n)}e||w(k(d,t,c),0,c-t),p.forEach(e=>e<c-1&&w(C(null,{duration:e-t}),0,e-t))}if(l){let e=u+Math.floor((c-u)/l)*l;w(k(f,e,e+l,void 0,{iterations:1/0,iterationStart:(c-e)/l,fill:`forwards`},c),c-t)}}catch{return}return s.length||S(),!0},M=(e,t)=>{let r,i=0;for(let t of n){let n=o.get(t);if(!n)return!1;let[a,c,l]=n,u=t.at(e),d=t.timing()[0]===1/0;if(l){if(d&&(u===a||!s.length))continue;return!1}let f=(u-a)/c,p=d?0:t.speed/c;if(r===void 0)r=f,i=p;else if(Math.abs(f-r)>1||p!==i)return!1}if(r===void 0)return!0;if(!s.length){if(h===void 0||t&&i)return!1;if(i){let e=(h-r)/i;if(e<1)return!1;A(e)}return!0}for(let{offset:e,end:n,isDone:i}of s){let a=r-e;if(n<1/0&&(i?a<n-1:a<0&&(t||e<=0)||a>=n))return!1}for(let{animation:t,offset:n,isDone:a}of s){if(a)continue;let o=r-n;i&&t.updatePlaybackRate&&t.playState===`running`&&Math.abs(Number(t.currentTime)-o)<20?t.playbackRate!==i&&t.updatePlaybackRate(i):i?(t.playbackRate!==i&&(t.playbackRate=i),t.startTime=e-o/i):(t.startTime=null,t.currentTime=o)}return!0},N=()=>!n.size&&(u=!0,oo(t)===P&&Wa.delete(t),P.isJS||S(),!0),ee=()=>{let t=R.now();if(P.isJS||(P.isFinishing=!0,n.forEach(n=>{let[r,a]=n.timing();n.state===`running`&&n.speed>0&&!a&&r<=t+1&&(n.complete(),i[n.name]=co(e,n.name),o.has(n)||(c=!0))}),P.isFinishing=!1),l=!1,u||(n.forEach(e=>so(e)&&n.delete(e)),N()))return;for(let e of n)if(!e.canAccelerate)return P.demote(!0);P.isJS&&(P.isJS=!1,c=!0,n.forEach(e=>e.stopJS()));let r=c,a=d;if(c=d=!1,r||!M(t,a)){if(a){if(t-f<Ya)return P.demote();f=t}if(!j(t))return P.demote()}else if(h!==void 0&&!a)return;n.forEach(e=>e.timing()[0]===1/0&&e.sync())},P={tracks:n,isJS:!1,isFinishing:!1,schedule(e,t){u||(c||=e,d||=!!t,l||(l=!0,qt.isProcessing?hr.render(ee,!1,!0):go(ee)))},release(e){so(e)&&n.delete(e),N()||P.schedule(!0)},check(){if(!P.isJS){for(let t in i)if(co(e,t)!==i[t]&&!g(t))return P.schedule(!0,!0)}},demote(e){if(!(P.isJS||u))return n.forEach(t=>{t.isAccelerated()&&t.sync(),e||(t.canAccelerate=!1)}),P.isJS=!0,o=new Map,S(),n.forEach(e=>e.state===`running`&&e.js?.start()),!0}};return Wa.set(t,P),P}var vo=class extends pi{constructor(e){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=R.now();let{keyframes:t,name:n,motionValue:r,element:i}=e,a=e;a.autoplay??=!0,a.delay??=0,a.type??=`keyframes`,a.repeat??=0,a.repeatDelay??=0,a.repeatType??=`loop`;let o=i?.KeyframeResolver||ca;this.keyframeResolver=new o(t,(e,t,n)=>this.onKeyframesResolved(e,t,a,!n),n,r,i),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=R.now();let u=Oa(e,i,a,o);u||((mt.instantAnimations||!s)&&l?.(ai(e,n,t)),e[0]=e[e.length-1],ka(n),n.repeat=0);let{onComplete:d}=n;n.finalKeyframe=t,n.keyframes=e,n.onComplete=()=>{d?.(),this.notifyFinished()};let f=u&&!c&&Ia(n),p=!f&&lo(n);r&&(f||p||this.resolvedAt!==this.createdAt)&&(n.startTime??=li(this.createdAt,this.resolvedAt));let m;if(f){n.element=n.motionValue?.owner?.current;try{m=new Ta(n)}catch{m=new gi(n)}}else m=p?new mo(n):new gi(n);this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this._animation.finished:super.finished}then(e,t){return this.finished.finally(e).then(()=>{})}liveValue(){return this._animation?.liveValue?.()}get animation(){return this._animation||(this.keyframeResolver?.resume(),oa()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation?.cancel(),this.keyframeResolver?.cancel()}},yo=class{constructor(e){this.stop=()=>{for(let e of this.animations)e.stop()},this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){for(let t of this.animations)t.time=e}get speed(){return this.getAll(`speed`)}set speed(e){for(let t of this.animations)t.speed=e}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return bo(this.animations,`duration`)}get iterationDuration(){return bo(this.animations,`iterationDuration`)}play(){for(let e of this.animations)e.play()}pause(){for(let e of this.animations)e.pause()}cancel(){for(let e of this.animations)e.cancel()}complete(){for(let e of this.animations)e.complete()}};function bo(e,t){let n=0;for(let r=0;r<e.length;r++){let i=e[r][t];i!==null&&i>n&&(n=i)}return n}var xo=class extends yo{then(e,t){return this.finished.finally(e).then(()=>{})}};function So(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var Co=30,wo=e=>!isNaN(parseFloat(e)),To={current:void 0},Eo=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=R.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.dirty(),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=R.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=wo(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){var n;return e===`change`?this.onChangeSubscribe(t):((n=this.events)[e]||(n[e]=new St)).add(t)}onChangeSubscribe(e){let{events:t}=this;return!t.change&&!this.changeSubscriber?this.changeSubscriber=e:(t.change||(t.change=new St,t.change.add(this.changeSubscriber),this.changeSubscriber=void 0),t.change.add(e)),()=>{this.changeSubscriber===e?this.changeSubscriber=void 0:t.change?.remove(e),this.stopIfUnobserved()}}stopIfUnobserved(){hr.read(()=>{!this.changeSubscriber&&!this.events.change?.getSize()&&this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){t&&(this.updatedAt=R.now(),this.stop()),this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,this.stopPassiveEffect?.()}dirty(){let{current:e,changeSubscriber:t}=this;t?t(e):this.events.change?.notify(e)}addDependent(e){(this.dependents||=new Set).add(e)}removeDependent(e){this.dependents?.delete(e)}get(){To.current?.push(this);let e=this.animation?.liveValue?.();return e===void 0?this.current:e}getCurrent(){return this.current}getPrevious(){return this.prev}getVelocity(){let e=R.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Co)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,Co);return Tt(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return new Promise(t=>this.run(e,t))}run(e,t){this.stop(),this.hasAnimated=!0;let n=!1,r;r=e(()=>{n=!0,this.events.animationComplete?.notify(),this.animation===r&&(this.animation=void 0),t?.()}),n||(this.animation=r),this.events.animationStart?.notify()}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel?.notify()),this.animation=void 0}isAnimating(){return!!this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect?.()}};function Do(e,t){return new Eo(e,t)}function Oo(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function ko(e,t){let n=e?.[t]??e?.default??e;return n===e?n:Oo(n,e)}var Ao={type:`spring`,stiffness:500,damping:25,restSpeed:10},jo=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Mo={type:`keyframes`,duration:.8},No={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Po=(e,{keyframes:t})=>t.length>2?Mo:Gi.has(e)?e.startsWith(`scale`)?jo(t[1]):Ao:No,Fo=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`,`out`,`mixer`]);function Io(e){for(let t in e)if(!Fo.has(t))return!0;return!1}var Lo=(e,t,n,r={},i,a)=>o=>{let s=ko(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=Ct(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i,hasOnUpdate:!!s.onUpdate};Io(s)||Object.assign(u,Po(e,u)),u.duration&&=Ct(u.duration),u.repeatDelay&&=Ct(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(ka(u),u.delay===0&&(d=!0)),(mt.instantAnimations||mt.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,ka(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=ai(u.keyframes,s);if(e!==void 0){hr.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new gi(u):new vo(u)},Ro=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function zo(e){let t=Ro.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Bo(e,t,n=1){let[r,i]=zo(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return ht(e)?parseFloat(e):e}return en(i)?Bo(i,t,n+1):i}function V(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Vo(e,t,n,r){let i=t=>typeof t==`function`?t(n===void 0?e.custom:n,...V(r)):t;return t=i(t),typeof t==`string`&&(t=e.variants&&e.variants[t]),i(t)}function Ho(e,t,n){return Vo(e.getProps(),t,n,e)}var Uo=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,Wo=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Wi]),Go=e=>Array.isArray(e);function Ko(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Do(n))}function qo(e){return Go(e)?e[e.length-1]||0:e}function Jo(e,t){let{transitionEnd:n={},transition:r={},...i}=Ho(e,t)||{};i={...i,...n};for(let t in i)Ko(e,t,qo(i[t]))}var Yo=e=>!!(e&&e.getVelocity);function Xo(e){return!!(Yo(e)&&e.add)}function Zo(e,t){let n=e.getValue(`willChange`);if(Xo(n))return n.add(t);if(!n&&mt.WillChange){let n=new mt.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}var Qo=`data-framer-appear-id`;function $o(e){return e.props[Qo]}var es=typeof window<`u`;function ts({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function ns(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?Oo(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState?.getState()[i],p=a?.path;p&&(p.animateValues?p.animateValues(t=>e.getValue(t,e.latestValues[t]??0),s,a,n,d):p.animateVisualElement?.(e,s,a,n,d));for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&ts(f,t))continue;let o={delay:n,...ko(f?.out[t]||a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){hr.update(()=>r.set(i));continue}let p=!1;if(es&&window.MotionHandoffAnimation){let n=$o(e);if(n){let e=window.MotionHandoffAnimation(n,t,hr);e!==null&&(o.startTime=e,p=!0)}}Zo(e,t);let m=l??e.shouldReduceMotion;r.run(Lo(t,r,i,m&&Wo.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>hr.update(()=>{o&&Jo(e,o)});d.length?Promise.all(d).then(t):t()}return d}function rs(e,t,n={}){let r=Ho(e,t,Uo(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?ns(e,r,n):[]),o=(r=0)=>{let{variantChildren:a}=e,{delayChildren:o=0,staggerChildren:s,staggerDirection:c}=i,l=[];return a?.forEach(e=>{e.notify(`AnimationStart`,t),l.push(rs(e,t,{...n,delay:r+(typeof o==`function`?0:o)+So(a,e,o,s,c)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(l)},{when:s}=i;return s?s===`beforeChildren`?a().then(()=>o()):o().then(a):Promise.all([a(),o(n.delay)])}function is(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>rs(e,t,n))):typeof t==`string`?rs(e,t,n):Promise.all(ns(e,Ho(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var as={test:e=>e===`auto`,parse:e=>e},os=e=>t=>t.test(e),ss=[rn,z,bn,yn,Sn,xn,as],cs=e=>ss.find(os(e));function ls(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||_t(e)}var us=new Set([`auto`,`none`,`0`]);function ds(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!us.has(t)&&In(t)&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]!==i&&(e[r]=ji(n,i))}var fs=class extends ca{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}scheduleResolve(){if(this.canReadNow()&&(this.readKeyframes(),!this.needsMeasurement))return this.complete();super.scheduleResolve()}canReadNow(){let{unresolvedKeyframes:e,element:t,motionValue:n}=this,r=e[0]??n?.get();if(!t?.current||r===void 0)return!1;for(let t=0;t<e.length;t++)if(nn(t?e[t]:r))return!1;return!0}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t?.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),en(r))){let i=Bo(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Wo.has(n)||e.length!==2)return;let[r,i]=e;if(typeof r==`number`&&typeof i==`number`)return;let a=cs(r),o=cs(i);if(nn(r)!==nn(i)&&ea[n])this.needsMeasurement=!0;else if(a!==o){if(Ki(a)&&Ki(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else ea[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||ls(e[t]))&&n.push(t);n.length&&ds(e,n,t)}measure(){let{element:e,name:t}=this;return ea[t](window.getComputedStyle(e.current),()=>e.measureViewportBox())}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e?.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&this.motionValue?.jump(r,!1)}measureEndState(){let{element:e,unresolvedKeyframes:t}=this;if(!e?.current)return;this.motionValue?.jump(this.measuredOrigin,!1);let n=t.length-1,r=t[n];t[n]=this.measure(),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.resolveNoneKeyframes()}},ps=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`],ms=[];function hs(e){gs(e),ms.unshift(e)}function gs(e){ft(ms,e)}function _s(e){return ms.find(t=>t.test(e))}function vs(e,t,n={},r){let i=[],{velocity:a,path:o}=n,s=n.reduceMotion??r?.shouldReduceMotion;o?.animateValues&&r&&(t={...t},o.animateValues(e,t,n,0,i));for(let o in t){if(o===`transition`||o===`transitionEnd`)continue;let c=t[o];if(c===void 0)continue;let l=e(o),u=l.get();u!==void 0&&!l.isAnimating()&&!Array.isArray(c)&&c===u&&!a?hr.update(()=>l.set(c)):(l.run(Lo(o,l,c,s&&Wo.has(o)?{type:!1}:n,r)),l.animation&&i.push(l.animation))}let{transitionEnd:c}=t;if(c){let t=()=>hr.update(()=>{for(let t in c)e(t).set(c[t])});i.length?Promise.all(i).then(t):t()}return i}function ys(e,t,n,r,i){let a,o=!1,s=vs(r=>{let s=a?.[r]??e.get(t,r);if(!s){let c;if(!i){let i=n[r];c=bs(i)??e.read(t,r,i)}s=Do(c,{owner:i}),o?e(t,{[r]:s}):(a||={})[r]=s}return s},n,r,i);return o=!0,a&&e(t,a),s}function bs(e){let t=Array.isArray(e)?e[0]:void 0;return t===null?void 0:t}function xs(e){return gt(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}function Ss(e){return gt(e)&&`ownerSVGElement`in e}var Cs={};function ws(e){return Cs.current?.add(e),e}var Ts=e=>Cs.current?Cs.current.bind(e):e;function Es(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=t?t.current:Cs.current?.root||document,i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var Ds=class{constructor(e=hr.render){this.step=e,this.values=new Map,this.pending=[],this.numPending=0,this.flush=()=>{let{pending:e,numPending:t}=this;this.numPending=0;for(let n=0;n<t;n++)e[n]()}}set(e,t,n,r){if(this.values.get(e)?.onRemove(),r)for(let e of this.values.values())e.value===r&&(n=e.render);let i=()=>n&&this.schedule(n);t.get()!==void 0&&i();let a=t.on(`change`,i),o=()=>{a(),n&&!r&&this.cancel(n),this.values.get(e)?.onRemove===o&&this.values.delete(e)};return this.values.set(e,{value:t,render:r?void 0:n,onRemove:o}),o}get(e){return this.values.get(e)?.value}release(){let e=new Map;return this.values.forEach((t,n)=>{e.set(n,t.value),t.onRemove()}),this.transformKeys=this.transformValues=void 0,e}schedule(e){let{pending:t,numPending:n}=this;for(let r=0;r<n;r++)if(t[r]===e)return;n||this.step(this.flush),t[this.numPending++]=e}cancel(e){let{pending:t}=this;for(let n=0;n<this.numPending;n++)if(t[n]===e){t[n]=t[--this.numPending];return}}};function Os(e,{step:t,...n}={}){let r=new WeakMap;return Object.assign((n,i)=>{let a=r.get(n)??new Ds(t);r.set(n,a);let o=[];for(let t in i){let r=i[t],s=e(n,a,t,r);o.push(s)}return()=>{for(let e of o)e()}},n,{get:(e,t)=>r.get(e)?.get(t),flush:e=>r.get(e)?.flush(),state:e=>r.get(e)})}function ks(e){let t=``,{transformKeys:n=[],transformValues:r={}}=e;for(let e=0;e<n.length;e++){let i=n[e],a=r[i].getCurrent();a!==void 0&&(Ha(i,a)||(t+=(t&&` `)+Va(i,a)))}let i=e.get(`pathRotation`)?.get();return i&&(t+=(t&&` `)+Va(`rotate`,i)),t||`none`}var As=new Set([`originX`,`originY`,`originZ`]),js=(e,t)=>La(e.get(t)?.get(),wi[t]),Ms=(e,t,n,r)=>{let i,a;if(Gi.has(n)){if(n!==`pathRotation`){let e=t.transformKeys??=[];(t.transformValues??={})[n]=r,e.includes(n)||(e.push(n),e.sort((e,t)=>Wi.indexOf(e)-Wi.indexOf(t)))}t.get(`transform`)||(!xs(e)&&!t.get(`transformBox`)&&Ms(e,t,`transformBox`,new Eo(`fill-box`)),t.set(`transform`,new Eo(`none`),()=>{Wa.get(e)?.check(),e.style.transform=ks(t)})),a=t.get(`transform`)}else As.has(n)?(t.get(`transformOrigin`)||t.set(`transformOrigin`,new Eo(``),()=>{let n=js(t,`originX`)??`50%`,r=js(t,`originY`)??`50%`,i=js(t,`originZ`)??0;e.style.transformOrigin=`${n} ${r} ${i}`}),a=t.get(`transformOrigin`)):i=la(n)?()=>{e.style.setProperty(n,r.getCurrent())}:()=>{e.style[n]=La(r.getCurrent(),wi[n])};return t.set(n,r,i,a)},Ns=e=>xs(e)||Ss(e),Ps=(e,t)=>{if(Gi.has(t))return Ui(e,t);let n=getComputedStyle(e),r=la(t)?n.getPropertyValue(t):n[t];return typeof r==`string`&&r.trim()||0},Fs=Os(Ms,{test:Ns,read:Ps});function Is(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}function Ls(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(Gi.has(e))o=!0;else if(Qt(e))i[e]=n;else{let t=La(n,wi[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Ua(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}var Rs={offset:`stroke-dashoffset`,array:`stroke-dasharray`},zs={offset:`strokeDashoffset`,array:`strokeDasharray`};function Bs(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Rs:zs;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Vs=[`transform`,`opacity`,`clipPath`,`filter`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function Hs(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Ls(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;for(let e of Vs)d[e]!==void 0&&(f[e]=d[e],delete d[e]);(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Bs(d,i,a,o,!1)}function Us(e,t){if(!(t in e))return!1;let n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),t)||Object.getOwnPropertyDescriptor(e,t);return n&&typeof n.set==`function`}var Ws=(e,t,n,r,i=n)=>{let a=Us(e,i);!a&&(i.startsWith(`data`)||i.startsWith(`aria`))&&(i=Is(i));let o=wi[n]||wi[i],s=a?()=>{e[i]=La(r.get(),wi[n])}:()=>{let t=La(r.get(),o);t==null?e.removeAttribute(i):e.setAttribute(i,String(t))};return t.set(n,r,s)};function Gs(e,t,n,r){return hr.render(()=>e.setAttribute(`pathLength`,`1`)),n===`pathOffset`?t.set(n,r,()=>{let t=r.get();e.setAttribute(`stroke-dashoffset`,`${-t}`)}):(t.get(`stroke-dasharray`)||t.set(`stroke-dasharray`,new Eo(`1 1`),()=>{let n=t.get(`pathLength`)?.get()??1,r=t.get(`pathSpacing`)?.get();e.setAttribute(`stroke-dasharray`,`${n} ${r??1-Number(n)}`)}),t.set(n,r,void 0,t.get(`stroke-dasharray`)))}var Ks=Os((e,t,n,r)=>n.startsWith(`path`)&&!Gi.has(n)?Gs(e,t,n,r):n.startsWith(`attr`)?Ws(e,t,n,r,qs(n)):n===`d`?t.set(n,r,()=>{let t=r.get()?.replace(/path\(|["')]/g,``);t===void 0?e.removeAttribute(n):e.setAttribute(n,t)}):(Gi.has(n)||As.has(n)||la(n)||n in e.style?Ms:Ws)(e,t,n,r),{test:Ss,read:(e,t)=>Gi.has(t)?wi[t]?.default||0:la(t)||Vs.includes(t)?Ps(e,t)||e.getAttribute(Is(t))||0:(t=qs(t),e.getAttribute(Is(t))??e.getAttribute(t)??void 0)});function qs(e){return e.replace(/^attr([A-Z])/,(e,t)=>t.toLowerCase())}function Js({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Ys({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Xs(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Zs(e){return e===void 0||e===1}function Qs({scale:e,scaleX:t,scaleY:n}){return!Zs(e)||!Zs(t)||!Zs(n)}var $s=[`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skewX`,`skewY`];function ec(e){return Qs(e)||nc(e)||tc(e)}function tc(e){return e.z||e.rotate||e.rotateX||e.rotateY||e.rotateZ||e.skewX||e.skewY}function nc(e){return rc(e.x)||rc(e.y)}function rc(e){return e&&e!==`0%`}function ic(e,t,n){return n+t*(e-n)}function ac(e,t,n,r,i){return i!==void 0&&(e=ic(e,i,r)),ic(e,n,r)+t}function oc(e,t=0,n=1,r,i){e.min=ac(e.min,t,n,r,i),e.max=ac(e.max,t,n,r,i)}function sc(e,{x:t,y:n}){oc(e.x,t.translate,t.scale,t.originPoint),oc(e.y,n.translate,n.scale,n.originPoint)}var cc=.999999999999,lc=1.0000000000001;function uc(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++)a=n[s],o=a.projectionDelta,a.options.visualElement?.props.style?.display!==`contents`&&(r===!0&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(dc(e.x,-a.scroll.offset.x),dc(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,sc(e,o)),r&&(r.path?.[s]||r)!==a&&ec(a.latestValues)&&mc(e,a.latestValues,a.layout?.layoutBox));t.x<lc&&t.x>cc&&(t.x=1),t.y<lc&&t.y>cc&&(t.y=1)}function dc(e,t){e.min+=t,e.max+=t}function fc(e,t,n,r,i=.5){oc(e,t,n,Jn(e.min,e.max,i),r)}function pc(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function mc(e,t,n){let r=n??e;fc(e.x,pc(t.x,r.x),t.scaleX,t.scale,t.originX),fc(e.y,pc(t.y,r.y),t.scaleY,t.scale,t.originY)}function hc(e,t){return Js(Xs(e.getBoundingClientRect(),t))}function gc(e,t,n){let r=hc(e,n),{scroll:i}=t;return i&&(dc(r.x,i.offset.x),dc(r.y,i.offset.y)),r}var _c=()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),vc={},yc=e=>Ss(e)?Ks:Fs,bc=class{constructor(e,t){this.effect=e,this.current=t,this.KeyframeResolver=fs}getValue(e){return this.effect.get(this.current,e)}readValue(e,t){return this.effect.read(this.current,e,t)}render(){this.effect.flush(this.current)}measureViewportBox(){return hc(this.current)}getProps(){return vc}};function xc(e,t,n,r){if(Cs.current?.track(e),r)return vs(e=>r.getValue(e,null),t,n,r);let i=yc(e);return ys(i,e,t,n,new bc(i,e))}var Sc=Os((e,t,n,r)=>t.set(n,r,()=>{e[n]=r.get()}),{test:e=>gt(e),read:(e,t)=>{let n=e[t];return typeof n==`string`||typeof n==`number`?n:void 0}}),{schedule:Cc,cancel:wc}=mr(queueMicrotask,!1);function Tc(e,t,n){let r=Yo(e)?e:Do(e);return r.run(Lo(``,r,t,n)),r.animation}var Ec={},Dc={value:null,addProjectionMetrics:null,countProjection:void 0};function Oc(e,t){let n=R.now();e=Ts(e);let r=({timestamp:i})=>{let a=i-n;a>=t&&(gr(r),e(a-t))};return hr.setup(r,!0),ws(()=>gr(r))}function kc(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Ac(e){return Ss(e)&&e.tagName===`svg`}function jc(e){return Yo(e)?e.get():e}var Mc=e=>typeof e==`number`?e:parseFloat(e),Nc=ps.length,Pc=e=>typeof e==`number`||z.test(e);function Fc(e,t,n,r,i,a){i?(e.opacity=Jn(0,n.opacity??1,Lc(r)),e.opacityExit=Jn(t.opacity??1,0,Rc(r))):a&&(e.opacity=Jn(t.opacity??1,n.opacity??1,r));for(let i=0;i<Nc;i++){let a=ps[i],o=Ic(t,a),s=Ic(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||Pc(o)===Pc(s)?(e[a]=Math.max(Jn(Mc(o),Mc(s),r),0),(bn.test(s)||bn.test(o))&&(e[a]+=`%`)):e[a]=s)}for(let i=0;i<$s.length;i++){let a=$s[i];(t[a]||n[a])&&(e[a]=Jn(t[a]||0,n[a]||0,r))}}function Ic(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Lc=zc(0,.5,It),Rc=zc(.5,.95,yt);function zc(e,t,n){return r=>r<e?0:r>t?1:n(xt(e,t,r))}function Bc(e,t){e.min=t.min,e.max=t.max}function Vc(e,t){Bc(e.x,t.x),Bc(e.y,t.y)}function Hc(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Uc=.9999,Wc=1.0001,Gc=-.01,Kc=.01;function qc(e){return e.max-e.min}function Jc(e,t,n){return Math.abs(e-t)<=n}function Yc(e,t,n,r=.5){e.origin=r,e.originPoint=Jn(t.min,t.max,e.origin),e.scale=qc(n)/qc(t),e.translate=Jn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Uc&&e.scale<=Wc||isNaN(e.scale))&&(e.scale=1),(e.translate>=Gc&&e.translate<=Kc||isNaN(e.translate))&&(e.translate=0)}function Xc(e,t,n,r){Yc(e.x,t.x,n.x,r?.originX),Yc(e.y,t.y,n.y,r?.originY)}function Zc(e,t,n,r=0){e.min=(r?Jn(n.min,n.max,r):n.min)+t.min,e.max=e.min+qc(t)}function Qc(e,t,n,r){Zc(e.x,t.x,n.x,r?.x),Zc(e.y,t.y,n.y,r?.y)}function $c(e,t,n,r=0){let i=r?Jn(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+qc(t)}function el(e,t,n,r){$c(e.x,t.x,n.x,r?.x),$c(e.y,t.y,n.y,r?.y)}function tl(e,t,n,r,i){return e-=t,e=ic(e,1/n,r),i!==void 0&&(e=ic(e,1/i,r)),e}function nl(e,t=0,n=1,r=.5,i,a=e,o=e){if(bn.test(t)&&(t=parseFloat(t),t=Jn(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=Jn(a.min,a.max,r);e===a&&(s-=t),e.min=tl(e.min,t,n,s,i),e.max=tl(e.max,t,n,s,i)}function rl(e,t,[n,r,i],a,o){nl(e,t[n],t[r],t[i],t.scale,a,o)}var il=[`x`,`scaleX`,`originX`],al=[`y`,`scaleY`,`originY`];function ol(e,t,n,r){rl(e.x,t,il,n?.x,r?.x),rl(e.y,t,al,n?.y,r?.y)}var sl=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),cl=sl(`applewebkit/`)&&!sl(`chrome/`)?Math.round:yt;function ll(e){e.min=cl(e.min),e.max=cl(e.max)}function ul(e){ll(e.x),ll(e.y)}var dl=()=>({translate:0,scale:1,origin:0,originPoint:0}),fl=()=>({x:dl(),y:dl()}),pl=()=>({min:0,max:0}),ml=()=>({x:pl(),y:pl()});function hl(e){return e.translate===0&&e.scale===1}function gl(e){return hl(e.x)&&hl(e.y)}function _l(e,t){return e.min===t.min&&e.max===t.max}function vl(e,t){return _l(e.x,t.x)&&_l(e.y,t.y)}function yl(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function bl(e,t){return yl(e.x,t.x)&&yl(e.y,t.y)}function xl(e){return qc(e.x)/qc(e.y)}function Sl(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var Cl=class{constructor(){this.members=[]}add(e){dt(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;r&&r.isConnected!==!1||n.snapshot||(ft(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(ft(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}};function wl(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Tl={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(z.test(e))e=parseFloat(e);else return e}return`${wl(e,t.target.x)}% ${wl(e,t.target.y)}%`}},El={borderRadius:Object.assign({},Tl,{applyTo:ps.slice()}),borderTopLeftRadius:Tl,borderTopRightRadius:Tl,borderBottomLeftRadius:Tl,borderBottomRightRadius:Tl,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=Wn.parse(e);if(i.length>5)return r;let a=Wn.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=Jn(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}}};function Dl(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;(i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `);let s=``;if(n){let{transformPerspective:e}=n;e&&(r=`perspective(${e}px) ${r}`);for(let e=0;e<$s.length;e++){let t=$s[e],r=n[t];r&&(s+=`${t}(${r}deg) `),!e&&n.pathRotation&&(s+=`rotate(${n.pathRotation}deg) `)}}if(s){(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),r+=s;let n=e.x.scale*t.x,i=e.y.scale*t.y;(n!==1||i!==1)&&(r+=`scale(${n}, ${i})`)}else e.x.scale!==1||e.y.scale!==1?r+=`scale(${e.x.scale}, ${e.y.scale})`:r||t.x===1&&t.y===1||(r=`scale(1, 1)`);return r||`none`}function Ol(e){return[e(`x`),e(`y`)]}var kl=(e,t)=>e.depth-t.depth,Al=class{constructor(){this.children=[],this.isDirty=!1}add(e){dt(this.children,e),this.isDirty=!0}remove(e){ft(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(kl),this.isDirty=!1,this.children.forEach(e)}},jl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Ml=[`z`,`skew`,`skewZ`],Nl=1e3,Pl=0;function Fl(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}var Il=e=>e.instance&&Wa.get(e.instance)?.demote()&&e.resetSkewAndRotation();function Ll(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=$o(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,hr,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ll(r)}function Rl(e){if(e)return e.options.allowProjection===!1?Rl(e.parent):e.projection}function zl({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return Object.assign(Ec,{...El,...Ec}),class{static create(e,t,n){let{layoutId:r,layout:i,drag:a,dragConstraints:o,layoutScroll:s,layoutRoot:c,layoutAnchor:l,layoutCrossfade:u}=t,d=e.projection=new this(e.latestValues,t[`data-framer-portal-id`]?void 0:Rl(e.parent));d.setOptions({layoutId:r,layout:i,alwaysMeasureLayout:!!a||o&&kc(o),visualElement:e,animationType:typeof i==`string`?i:`both`,initialPromotionConfig:n,crossfade:u,layoutScroll:s,layoutRoot:c,layoutAnchor:l});let f=d.getStack()?.lead;f&&!d.root.isUpdateBlocked()&&(f.willUpdate(),f.scheduleCheckAfterUnmount())}constructor(e={},n=t?.()){this.id=Pl++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Hl),this.nodes.forEach($l),this.nodes.forEach(eu),this.nodes.forEach(Ul),Dc.countProjection?.()},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Al)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new St),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){this.eventHandlers.get(e)?.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=Ss(t)&&!Ac(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent?.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;hr.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n?.(),n=Oc(i,250),jl.hasAnimatedSinceResize&&(jl.hasAnimatedSinceResize=!1,this.nodes.forEach(Ql)))})}n&&this.root.registerSharedNode(n,this),this.addLayoutListener()}addLayoutListener(){let{layoutId:e,layout:t,visualElement:n,animate:r}=this.options;this.instance&&!this.hasLayoutListener&&r!==!1&&n&&(e||t)&&(this.hasLayoutListener=!0,this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:r,layout:i})=>{if(this.isAnimationBlocked){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||n.getDefaultTransition()||ou,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=n.getProps(),c=!this.targetLayout||!bl(this.targetLayout,i),l=!t&&r;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...ko(a,`layout`),onPlay:o,onComplete:s};(n.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||Ql(this),this.isLead()&&this.options.onExitComplete?.();this.targetLayout=i}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),this.getStack()?.remove(this),this.parent?.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,gr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes?.forEach(tu),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete?.();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ll(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;Il(this),this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,Il(t),(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1),t.isAnimationBlocked&&(t.dragSnapshot||=t.measure(),this.dragAncestor=t)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(Kl),this.nodes.forEach(Gl);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ql);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Yl),this.nodes.forEach(Xl),this.nodes.forEach(Zl),this.nodes.forEach(Bl),this.nodes.forEach(Vl)):this.nodes.forEach(ql),this.clearAllSnapshots();let e=R.now();qt.delta=pt(0,1e3/60,e-qt.timestamp),qt.timestamp=e,qt.isProcessing=!0,_r.update.process(qt),_r.preRender.process(qt),_r.render.process(qt),qt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Cc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Wl),this.sharedNodes.forEach((e,t)=>e.members.length?e.removeLeadSnapshot():this.sharedNodes.delete(t))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,hr.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){hr.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!qc(this.snapshot.measuredBox.x)&&!qc(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected||=ml(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t?.notify(`LayoutMeasure`,this.layout.layoutBox,e?.layoutBox)}updateScroll(e=`measure`){let{scroll:t,instance:i}=this,{animationId:a}=this.root;if(this.options.layoutScroll&&i&&!(t&&t.animationId===a&&t.phase===e)){let o=r(i);this.scroll={animationId:a,phase:e,isRoot:o,offset:n(i),wasRoot:t?t.isRoot:o}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;e&&Il(this);let t=this.projectionDelta&&!gl(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||ec(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),ul(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return ml();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(lu))){let{scroll:e}=this.root;e&&(dc(t.x,e.offset.x),dc(t.y,e.offset.y))}return t}removeElementScroll(e){let t=ml();if(Vc(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&Vc(t,e),dc(t.x,i.offset.x),dc(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n,r,i=0){let a=n||ml();Vc(a,e);for(let e=i;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(dc(a.x,-n.scroll.offset.x),dc(a.y,-n.scroll.offset.y)),ec(n.latestValues)&&mc(a,n.latestValues,n.layout?.layoutBox)}return!r&&ec(this.latestValues)&&mc(a,this.latestValues,this.layout?.layoutBox),a}removeTransform(e){let t=ml();Vc(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!ec(n.latestValues))continue;let r;n.instance&&(Qs(n.latestValues)&&n.updateSnapshot(),r=ml(),Vc(r,n.measurePageBox())),ol(t,n.latestValues,n.snapshot?.layoutBox,r)}return ec(this.latestValues)&&ol(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade},this.addLayoutListener()}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==qt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=qt.timestamp;let a=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=ml(),this.targetWithTransforms=ml()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Qc(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target,!0):Vc(this.target,this.layout.layoutBox),sc(this.target,this.targetDelta)):Vc(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&(!a.resumingFrom==!this.resumingFrom||a.options.layoutRoot&&!a.resumingFrom)&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),Dc.countProjection?.(1))}getClosestProjectingParent(){if(!(!this.parent||Qs(this.parent.latestValues)||nc(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ml(),this.relativeTargetOrigin=ml(),el(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),Vc(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===qt.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent?.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;Vc(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;uc(this.layoutCorrected,this.treeScale,this.path,t&&(e.relativeTarget&&!e.relativeParent.resumingFrom?e.relativeParent:!0)),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=ml());let{target:s}=e;s?(!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Hc(this.prevProjectionDelta.x,this.projectionDelta.x),Hc(this.prevProjectionDelta.y,this.projectionDelta.y)),Xc(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&Sl(this.projectionDelta.x,this.prevProjectionDelta.x)&&Sl(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),Dc.countProjection?.(2)):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){this.options.visualElement?.scheduleRender(),e&&this.getStack()?.scheduleRender(),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=fl(),this.projectionDelta=fl(),this.projectionDeltaWithTransform=fl()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=fl();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=ml(),c=r?.source!==this.layout?.source,l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some(au));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);nu(o.x,e.x,n),nu(o.y,e.y,n),r&&(o.x.translate=r.x,o.y.translate=r.y),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(el(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),iu(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&vl(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=ml(),Vc(f,this.relativeTarget)),c&&(this.animationValues=a,Fc(a,i,this.latestValues,n,d,u)),r?.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(gr(this.pendingAnimation),void 0),this.pendingAnimation=hr.update(()=>{jl.hasAnimatedSinceResize=!0,this.motionValue||=Do(0),this.motionValue.jump(0,!1),this.currentAnimation=Tc(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),fi(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta?.(Nl),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,layout:n,latestValues:r}=e,{target:i}=e;if(t&&i&&n){if(this!==e&&this.layout&&n&&cu(this.options.animationType,this.layout.layoutBox,n.layoutBox)){let{layoutBox:e}=this.layout,t=i;i=this.target||ml(),su(i.x,t.x,e.x),su(i.y,t.y,e.y)}Vc(t,i),mc(t,r),Xc(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Cl),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?.transition,preserveFollowOpacity:n?.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){this.getStack()?.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){return this.getStack()?.relegate(this)||!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let{latestValues:t}=e;if(!tc(t))return;let n={};for(let t=0;t<Ml.length;t++)Fl(Ml[t],e,n,this.animationValues);for(let t=0;t<$s.length;t++)Fl($s[t],e,n,this.animationValues);e.render();for(let t in n)e.setStaticValue(t,n[t]),this.animationValues&&(this.animationValues[t]=n[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;let n=this.getLead();if(!this.isVisible&&n!==this){e.visibility=`hidden`;return}let r=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=jc(t?.pointerEvents)||``,e.transform=r?r(this.latestValues,``):`none`;return}if(!this.projectionDelta||!this.layout||!n.target){(this.options.layoutId||this.needsShow)&&(this.needsShow=!1,e.visibility=``,e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=jc(t?.pointerEvents)||``),this.hasProjected&&!ec(this.latestValues)&&(e.transform=r?r({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=n.animationValues||n.latestValues;this.applyTransformsToTarget();let a=Dl(this.projectionDeltaWithTransform,this.treeScale,i);r&&(a=r(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=n.animationValues?n===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:n===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in Ec){if(i[t]===void 0)continue;let{correct:r,applyTo:o,isCSSVariable:s}=Ec[t],c=a===`none`?i[t]:r(i[t],n);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=n===this?jc(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=this.dragSnapshot=this.dragAncestor=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Gl),this.root.sharedNodes.clear()}}}function Bl(e){e.updateLayout(),Jl(e)}function Vl(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source,o=(r,a)=>{if(i===`size`)Ol(e=>{let t=qc(r[e]);r[e].min=a[e].min,r[e].max=r[e].min+t});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;Bc(r[e],a[e])}else cu(i,t.layoutBox,n)&&Ol(t=>{let n=qc(a[t]);r[t].max=r[t].min+n,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[t].max=e.relativeTarget[t].min+n)})},s=a?t.measuredBox:t.layoutBox;o(s,n);let c=fl();Xc(c,n,t.layoutBox);let l=fl();Xc(l,a?e.applyTransform(r,!0):n,s);let u=!gl(c),d=!1,f=e.getClosestProjectingParent();if((!a||f?.options.layoutRoot&&e.resumeFrom?.path.includes(f))&&f&&!f.resumeFrom){let{snapshot:r,layout:i}=f;if(r&&i){let s=e.options.layoutAnchor||void 0,c=ml();el(c,a?e.resumeFrom.applyTransform(t.layoutBox,!0,void 0,!0,f.depth+1):t.layoutBox,r.layoutBox,s);let l=ml();el(l,n,i.layoutBox,s),a&&o(c,l),bl(c,l)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=c,e.relativeParent=f)}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:l,layoutDelta:c,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else e.isLead()&&e.options.onExitComplete?.();e.options.transition=void 0}function Hl(e){Dc.countProjection?.(0),e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function Ul(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Wl(e){e.clearSnapshot()}function Gl(e){e.clearMeasurements()}function Kl(e){e.isLayoutDirty=!0,e.updateLayout()}function ql(e){e.isLayoutDirty=!1}function Jl(e){let{snapshot:t,dragAncestor:n}=e,r=n?.isAnimationBlocked&&n.layout;if(!t||!r||e.resumeFrom||e.isAnimationBlocked)return;let i=n.dragSnapshot;Ol(e=>dc(t.layoutBox[e],r.layoutBox[e].min-i.layoutBox[e].min))}function Yl(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.dragSnapshot||e.layout,e.isLayoutDirty=!0)}function Xl(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function Zl(e){let{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Ql(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function $l(e){e.resolveTargetDelta()}function eu(e){e.calcProjection()}function tu(e){e.resetSkewAndRotation()}function nu(e,t,n){e.translate=Jn(t.translate,0,n),e.scale=Jn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ru(e,t,n,r){e.min=Jn(t.min,n.min,r),e.max=Jn(t.max,n.max,r)}function iu(e,t,n,r){ru(e.x,t.x,n.x,r),ru(e.y,t.y,n.y,r)}function au(e){return e.animationValues?.opacityExit!==void 0}var ou={duration:.45,ease:[.4,0,.1,1]};function su(e,t,n){e.max=qc(n)+(e.min=t.min)}function cu(e,t,n){return e===`position`||e===`preserve-aspect`&&!Jc(xl(t),xl(n),.2)}function lu(e){return e!==e.root&&e.scroll?.wasRoot}function uu(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var du=zl({attachResizeListener:(e,t)=>uu(e,`resize`,t),measureScroll:_c,checkIsScrollRoot:()=>!0}),fu={current:void 0},pu=zl({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!fu.current){let e=new du({});e.mount(window),e.setOptions({layoutScroll:!0}),fu.current=e}return fu.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),mu=new WeakMap;function hu(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function gu(e){return typeof e==`string`||Array.isArray(e)}var _u=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`whilePinch`,`exit`],vu=[`initial`].concat(_u);function yu(e){if(hu(e.animate))return!0;for(let t=0;t<vu.length;t++)if(gu(e[vu[t]]))return!0;return!1}function bu(e){return!!(yu(e)||e.variants)}function xu(e,t,n){for(let r in t){let i=t[r],a=n[r];if(Yo(i))e.addValue(r,i);else if(Yo(a))e.addValue(r,Do(i,{owner:e}));else if(a!==i){if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Do(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var Su={current:null},Cu={current:!1},wu=typeof window<`u`;function Tu(){if(Cu.current=!0,wu){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>Su.current=e.matches;e.addEventListener(`change`,t),t()}else Su.current=!1}}var Eu=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],Du={};function Ou(e){Du=e}function ku(){return Du}var Au=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=ca,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=R.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,hr.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=yu(t),this.isVariantNode=bu(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&Yo(t)&&t.set(c[e])}}mount(e){let t=this.presenceContext;if(this.hasBeenMounted&&t?.isPresent!==!1&&!t?.keepValuesOnRemount)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];if(this.current=e,mu.set(e,this),this.projection?.instance||this.projection?.mount(e),this.isVariantNode&&!this.isControllingVariants){let e=this;do e=e.props.inherit!==!1&&e.parent;while(e&&!e.isVariantNode);if(e){let{variantChildren:t}=e;t.add(this),this.removeFromVariantTree=()=>t.delete(this)}}this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(Cu.current||Tu(),this.shouldReduceMotion=Su.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection?.unmount(),gr(this.notifyUpdate),gr(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree?.(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),(this.enteringChildren||=new Set).add(e)}removeChild(e){this.children.delete(e),this.enteringChildren?.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.get(e)?.(),t.accelerate&&Aa.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new xa({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:Ct(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=Gi.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&hr.preRender(this.notifyUpdate),n&&(this.projection&&(this.projection.isTransformDirty=!0),Wa.get(this.current)?.check()),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i?.()})}sortNodePosition(e){return!this.current||!e.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in Du){let t=Du[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ml()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){let{transformTemplate:n,onUpdate:r}=this.props;(e.transformTemplate||n)&&this.scheduleRender(),(e.transformTemplate&&!n||e.onUpdate&&!r)&&Wa.get(this.current)?.demote(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<Eu.length;t++){let n=Eu[t];this.propEventSubscriptions[n]?.(),delete this.propEventSubscriptions[n];let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=xu(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue?.()}getProps(){return this.props}getVariant(e){return this.props.variants?.[e]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(e,t){let n=this.values.get(e);if(t!==n){n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t);let r=t.get();r!==void 0&&(this.latestValues[e]=r)}}removeValue(e){this.values.delete(e),this.valueSubscriptions.get(e)?.(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){let n=this.props.values?.[e];return n||(n=this.values.get(e),n===void 0&&t!==void 0&&(n=Do(t??this.getDefaultValue?.(e),{owner:this}),this.addValue(e,n)),n)}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(ht(n)||_t(n))?n=parseFloat(n):typeof n!=`number`&&!Wn.test(n)&&Wn.test(t)&&(n=ji(e,t)),this.setBaseTarget(e,Yo(n)?n.get():n)),Yo(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}on(e,t){return(this.events[e]||(this.events[e]=new St)).add(t)}notify(e,...t){this.events[e]?.notify(...t)}scheduleRenderMicrotask(){Cc.render(this.render)}},ju=class extends Au{constructor(){super(...arguments),this.KeyframeResolver=fs}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;Yo(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function Mu(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function Nu(e,{layout:t,layoutId:n}){return Gi.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Ec[e]||e===`opacity`)}function Pu(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(Yo(r[t])||i&&Yo(i[t])||Nu(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function Fu(e){return window.getComputedStyle(e)}var Iu=class extends ju{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Mu}mount(e){super.mount(e)}readValueFromInstance(e,t){if(Gi.has(t))return this.projection?.isProjecting?Vi(t):Ui(e,t);{let n=Fu(e),r=(Qt(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return hc(e,t)}build(e,t,n){Ls(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Pu(e,t,n)}},Lu=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1;function Ru(e){return{point:{x:e.pageX,y:e.pageY}}}var zu=e=>t=>Lu(t)&&e(t,Ru(t));function Bu(e,t,n,r){return uu(e,t,zu(n),r)}var Vu=new WeakMap,Hu,Uu=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:Ss(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Wu=Uu(`inline`,`width`,`offsetWidth`),Gu=Uu(`block`,`height`,`offsetHeight`);function Ku({target:e,borderBoxSize:t}){Vu.get(e)?.forEach(n=>{n(e,{get width(){return Wu(e,t)},get height(){return Gu(e,t)}})})}function qu(e){e.forEach(Ku)}function Ju(){typeof ResizeObserver<`u`&&(Hu=new ResizeObserver(qu))}function Yu(e,t){Hu||Ju();let n=Es(e);return n.forEach(e=>{let n=Vu.get(e);n||(n=new Set,Vu.set(e,n)),n.add(t),Hu?.observe(e)}),()=>{n.forEach(e=>{let n=Vu.get(e);n?.delete(t),n?.size||Hu?.unobserve(e)})}}var Xu=new Set,Zu;function Qu(){Zu=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Xu.forEach(t=>t(e))},window.addEventListener(`resize`,Zu)}function $u(e){return Xu.add(e),Zu||Qu(),()=>{Xu.delete(e),!Xu.size&&typeof Zu==`function`&&(window.removeEventListener(`resize`,Zu),Zu=void 0)}}function ed(e,t){return ws(typeof e==`function`?$u(e):Yu(e,t))}var td=(e,t)=>Math.abs(e-t);function nd(e,t){let n=td(e.x,t.x),r=td(e.y,t.y);return Math.sqrt(n**2+r**2)}var rd=new Set([`auto`,`scroll`]),H=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o,immediate:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=ad(this.lastRawMoveEventInfo,this.transformPagePoint));let e=sd(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=nd(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:R.now()});let{onStart:i,onMove:a}=this.handlers;t||(i?.(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a?.(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.handleScroll(window),this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=ad(t,this.transformPagePoint),this.hasPendingMove=!0,hr.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i?.(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=sd(e.type===`pointercancel`?this.lastMoveEventInfo:ad(t,this.transformPagePoint),this.history);this.startEvent&&n?.(e,a),r?.(e,a)},!Lu(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=s?0:a,this.contextWindow=r||window;let c=Ru(e),l=ad(c,this.transformPagePoint),{point:u}=l;this.history=[{...u,timestamp:R.now()}];let{onSessionStart:d}=t;d&&d(e,sd(l,this.history));let f={passive:!0,capture:!0};this.removeListeners=bt(Bu(this.contextWindow,`pointermove`,this.handlePointerMove,f),Bu(this.contextWindow,`pointerup`,this.handlePointerUp,f),Bu(this.contextWindow,`pointercancel`,this.handlePointerUp,f)),o&&this.startScrollTracking(o),s&&(this.handlePointerMove(e,c),this.updatePoint())}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(rd.has(e.overflowX)||rd.has(e.overflowY))&&this.scrollPositions.set(t,id(t)),t=t.parentElement}this.scrollPositions.set(window,id(window)),this.removeScrollListeners=bt(uu(window,`scroll`,this.onElementScroll,{capture:!0}),uu(window,`scroll`,this.onWindowScroll,{}))}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=id(e),i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),hr.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),gr(this.updatePoint)}},id=e=>e===window?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop};function ad(e,t){return t?{point:t(e.point)}:e}function od(e,t){return{x:e.x-t.x,y:e.y-t.y}}function sd({point:e},t){return{point:e,delta:od(e,ld(t)),offset:od(e,cd(t)),velocity:ud(t,.1)}}function cd(e){return e[0]}function ld(e){return e[e.length-1]}function ud(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=ld(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ct(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Ct(t)*2&&(r=e[1]);let a=wt(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}var dd=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function fd(e){return dd.has(e.tagName)||e.isContentEditable===!0}var pd=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function md(e){return pd.has(e.tagName)||e.isContentEditable===!0}var hd={x:!1,y:!1};function gd(){return hd.x||hd.y}function _d(e){return e===`x`||e===`y`?hd[e]?null:(hd[e]=!0,()=>{hd[e]=!1}):hd.x||hd.y?null:(hd.x=hd.y=!0,()=>{hd.x=hd.y=!1})}function vd(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Jn(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Jn(n,e,r.max):Math.min(e,n)),e}function yd(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function bd(e,{top:t,left:n,bottom:r,right:i}){return{x:yd(e.x,n,i),y:yd(e.y,t,r)}}function xd(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Sd(e,t){return{x:xd(e.x,t.x),y:xd(e.y,t.y)}}function Cd(e,t){let n=.5,r=qc(e),i=qc(t);return i>r?n=xt(t.min,t.max-r,e.min):r>i&&(n=xt(e.min,e.max-i,t.min)),pt(0,1,n)}function wd(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Td=.35;function Ed(e=Td){return e===!1?e=0:e===!0&&(e=Td),{x:Dd(e,`left`,`right`),y:Dd(e,`top`,`bottom`)}}function Dd(e,t,n){return{min:Od(e,t),max:Od(e,n)}}function Od(e,t){return typeof e==`number`?e:e[t]||0}function kd(e){let t=``;for(let n of e.path){n.scroll=void 0,n.updateScroll();let{scroll:r}=n;n!==e.root&&r&&(t+=r.offset.x+`,`+r.offset.y+`,`)}return t}var Ad=new WeakMap,jd=class{constructor(e,t=()=>e.getProps()){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ml(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e,this.readProps=t}start(e,t={}){if(this.visualElement.presenceContext?.isPresent===!1)return;let n=e=>{t.snapToCursor&&this.snapToCursor(e),this.stopAnimation()},r=(e,t)=>{let{drag:n,dragConstraints:r,dragPropagation:i,onDragStart:a}=this.getProps();if(n&&!i&&(this.openDragLock?.(),this.openDragLock=_d(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints();let{projection:o}=this.visualElement;o&&(o.isAnimationBlocked=!0,o.target=void 0),Ol(e=>{let t=this.getAxisMotionValue(e).get()||0;if(en(t)&&(t=Bo(t,this.visualElement.current)||0),z.test(t))t=parseFloat(t);else if(bn.test(t)){let n=o?.layout?.layoutBox[e];n&&(t=qc(n)*(parseFloat(t)/100))}this.originPoint[e]=t}),this.point=typeof r==`function`&&r(this),a&&hr.update(()=>a(e,t),!1,!0),Zo(this.visualElement,`transform`),this.visualElement.animationState?.setActive(`whileDrag`,!0)},i=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){if(this.currentDirection=Ld(o),this.currentDirection===null)return;i&&i(this.currentDirection)}this.updateAxis(`x`,o),this.updateAxis(`y`,o),this.point&&this.point.move(),this.visualElement.render(),a&&hr.update(()=>a(e,t),!1,!0)},a=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},o=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints||this.point)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:s}=this.getProps();this.panSession=new H(e,{onSessionStart:n,onStart:r,onMove:i,onSessionEnd:a,resumeAnimation:o},{...t,transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,contextWindow:this.visualElement.current?.ownerDocument.defaultView,element:this.visualElement.current})}stop(e,t,n){let r=e||this.latestPointerEvent,i=t||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!r)return;let{velocity:o}=i;this.startAnimation(o,n);let{onDragEnd:s}=this.getProps();s&&hr.postRender(()=>s(r,i))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession(),!this.getProps().dragPropagation&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t?.setActive(`whileDrag`,!1)}endPanSession(){this.panSession?.end(),this.panSession=void 0}updateAxis(e,t){let{drag:n}=this.readProps();if(!t||!Id(e,n,this.currentDirection))return;let r=this.getAxisMotionValue(e),i=this.originPoint[e]+t[e],a=this.constraints&&this.constraints[e];a&&(i=vd(i,a,this.elastic[e])),this.point?this.point[e]=i:r.set(i)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),{projection:n}=this.visualElement,r=n&&(n.layout||n.measure(!1)),i=this.constraints;Md(e)?this.constraints&&this.scroll===kd(n)||(this.constraints=this.resolveRefConstraints()):this.constraints=e&&r&&typeof e==`object`?bd(r.layoutBox,e):!1,this.elastic=Ed(t),i!==this.constraints&&!Md(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&Ol(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=wd(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!Md(e))return!1;let n=Nd(e),{projection:r}=this.visualElement;if(!r||!r.layout)return!1;this.scroll=kd(r);let i=gc(n,r.root,this.visualElement.getTransformPagePoint()),a=Sd(r.layout.layoutBox,r.removeElementScroll(i));if(t){let e=t(Ys(a));this.hasMutatedConstraints=!!e,e&&(a=Js(e))}return a}startAnimation(e,t){let{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),c={bounceStiffness:i?200:1e6,bounceDamping:i?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...a},l=i=>r&&!(this.point&&o)&&Id(i,t||n,this.currentDirection)?e[i]:0;if(this.point&&!o)return this.point.release({x:l(`x`),y:l(`y`)},c).then(s);let u=this.constraints||{},d=Ol(e=>{if(!Id(e,t||n,this.currentDirection))return;let r=u[e]||{};(o===!0||o===e)&&(r={min:0,max:0});let i={type:`inertia`,velocity:l(e),...c,...r};return this.startAxisValueAnimation(e,i)});return Promise.all(d).then(s)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Zo(this.visualElement,e),n.start(Lo(e,n,0,t,this.visualElement,!1))}stopAnimation(){Ol(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.readProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor({clientX:e,clientY:t}){let{drag:n}=this.getProps(),r={x:e,y:t},i=this.visualElement.getTransformPagePoint()?.(r)||r,a=this.visualElement.measureViewportBox();Ol(e=>{if(!Id(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-Jn(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Md(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};Ol(e=>{let t=this.getAxisMotionValue(e).get();i[e]=Cd({min:t,max:t},r[e])});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},``):`none`,n.root?.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ol(t=>{let n=this.getAxisMotionValue(t);if(!Id(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(Jn(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Ad.set(this.visualElement,this);let e=this.visualElement.current,t=Bu(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&md(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps(),r=Md(t)&&Nd(t);r&&(this.constraints=this.resolveRefConstraints(),n||=Fd(e,r,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i.layout||(i.root?.updateScroll(),i.updateLayout()),hr.read(r);let o=uu(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Ol(t=>{if(!Id(t,this.getProps().drag,this.currentDirection))return;let n=this.getAxisMotionValue(t);this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate)}),this.visualElement.render())}));return()=>{o(),t(),a(),s(),n?.()}}getProps(){let e=this.readProps(),{dragElastic:t=Td,dragMomentum:n=!0}=e;return{...e,dragElastic:t,dragMomentum:n}}};function Md(e){return!!e&&typeof e==`object`&&(`current`in e||`nodeType`in e)}var Nd=e=>`current`in e?e.current:e;function Pd(e){let t=!0;return()=>{t?t=!1:e()}}function Fd(e,t,n){let r=ed(e,Pd(n)),i=ed(t,Pd(n));return()=>{r(),i()}}function Id(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Ld(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}function Rd(e,t){let n=Es(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},ws(()=>r.abort())]}function zd(e){return!(e.pointerType===`touch`||gd())}function Bd(e,t,n={}){t=Ts(t);let[r,i,a]=Rd(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{e.pointerType!==`touch`&&(n?r=!0:s(e))};e.addEventListener(`pointerenter`,n=>{if(!zd(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var Vd=(e,t)=>t?e===t||Vd(e,t.parentElement):!1,Hd=new WeakSet;function Ud(e){return t=>{t.key===`Enter`&&e(t)}}function Wd(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Gd=(e,t)=>{let n=!1,r=Ud(()=>{n||Hd.has(e)||(n=!0,Wd(e,`down`))}),i=Ud(()=>{n&&(n=!1,Wd(e,`up`))});e.addEventListener(`keydown`,r,t),e.addEventListener(`keyup`,i,t),e.addEventListener(`blur`,()=>{e.removeEventListener(`keydown`,r),e.removeEventListener(`keyup`,i),n&&Wd(e,`cancel`)},{...t,once:!0})};function Kd(e){return Lu(e)&&!gd()}var qd=new WeakSet,Jd=100,Yd=8,Xd=(e,t,n)=>Math.hypot(e.clientX-t.clientX,e.clientY-t.clientY)>n,Zd=e=>e.preventDefault();function Qd(e,t,n={}){t=Ts(t);let[r,i,a]=Rd(e,n),o=new WeakMap,s=e=>{let r=e.currentTarget;if(!Kd(e)||qd.has(e))return;n.stopPropagation&&qd.add(e);let{count:a=1,countTimeout:s=.3,hold:c=0,repeat:l}=n,u=R.now(),d=Ct(c),f=Ct(s),p=o.get(r);p?.expire(Xd(p.event,e,Jd))?p=void 0:p&&(gr(p.expire),o.delete(r));let m=p?p.count+1:1,h=m>=a,g=h&&(c||l),_=!c,v=0,y;if(Hd.add(r),p)y=p.handlers;else{let n=t(r,e);y=typeof n==`function`?{onComplete:n}:n||{}}h&&_&&y.onActive?.();let b=Ct(l),x=d||b,S=u+x,C=!0,w=()=>{if(i.signal.aborted)return gr(w);let e=Math.min(1-(S-R.now())/x,1);C&&e<1&&(e=0),C=!1,y.onHold?.(e),e<1||(_?y.onRepeat?.(++v):(_=!0,y.onActive?.()),l?(C=!0,S+=x=b):gr(w))},T={...i,capture:!0},E=(t,n)=>{if(Lu(t)){if(window.removeEventListener(`pointerup`,D,T),window.removeEventListener(`pointercancel`,O,T),window.removeEventListener(`pointermove`,k,T),r.removeEventListener(`contextmenu`,Zd),gr(w),Hd.delete(r),gd()&&(n=!1),n&&!h){let n=R.now(),a=e=>{let s=i.signal.aborted;if(s||e===!0||R.now()-n>f)return gr(a),o.delete(r),s||y.onComplete?.(t,{success:!1}),!0};o.set(r,{count:m,event:e,handlers:y,expire:a}),hr.update(a,!0)}else y.onComplete?.(t,{success:n&&_})}},D=e=>{E(e,r===window||r===document||n.useGlobalTarget||Vd(r,e.target))},O=e=>{E(e,!1)},k=t=>{Lu(t)&&((l||!_)&&Xd(e,t,Yd)||a>1&&gd())&&O(t)};window.addEventListener(`pointerup`,D,T),window.addEventListener(`pointercancel`,O,T),(g||a>1)&&window.addEventListener(`pointermove`,k,T),g&&(hr.update(w,!0),r.addEventListener(`contextmenu`,Zd,{...i,passive:!1}))};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,s,i),xs(e)&&(e.addEventListener(`focus`,()=>Gd(e,i),i),!fd(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function $d(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],a=e[2+n],o=e[3+n],s=Xr(i,a,o);return t?s(r):s}var ef=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},tf=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),nf=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function rf(e,t,n,r){Mu(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(tf.has(n)?n:Is(n),t.attrs[n])}function af(e,t,n){let r=Pu(e,t,n);for(let n in e)if(n!==`children`&&(Yo(e[n])||Yo(t[n]))){let t=Wi.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var of=class extends ju{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=ml}getBaseTargetFromProps(e,t){return Gi.has(t)?super.getBaseTargetFromProps(e,t)??Vi(t):e[t]}getDefaultValue(e){return Gi.has(e)?this.latestValues[e]??Vi(e):void 0}readValueFromInstance(e,t){if(Gi.has(t)){let e=Ei(t);return e&&e.default||0}if(Vs.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=tf.has(t)?t:Is(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return af(e,t,n)}build(e,t,n){Hs(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){rf(e,t,n,r)}mount(e){this.isSVGTag=nf(e.tagName),super.mount(e)}};function sf(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var cf=[..._u].reverse(),lf=e=>e?.out===!0?e:e?.out;function uf(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>is(e,t,n))),n=ff(),r=!0,i=!1;function a(a){let{props:o,parent:s,manuallyAnimateOnMount:c}=e,{initial:l}=o,u=r||i,d=[],f=(t=l)=>typeof t!=`boolean`&&Ho(e,Array.isArray(t)?t[0]:t,e.presenceContext?.custom)||void 0,p=new Map,m={},h=1/0,g=e;do g=g.props.inherit!==!1&&g.parent;while(g&&!g.isControllingVariants);let _=u&&lf(f(l??(g&&g.props.initial))?.transition);if(cf.forEach((t,r)=>{let i=n[t],l=o[t],f=g&&g.props[t],v=l===void 0?gu(f)||f===!1?f:void 0:l,y=gu(v),b=t===a?i.isActive:null,x=y&&l===void 0&&!(u&&c);if(i.protectedKeys={...m},!i.isActive&&b===null||!v&&!i.prevProp||hu(v)||typeof v==`boolean`)return;if(b===!1&&(h=r),t===`exit`&&i.isActive&&b!==!0){m={...m,...i.prevResolvedValues};return}let S=df(i.prevProp,v),C=S||y&&(b&&!x||r>h),w=!1,T=Array.isArray(v)?v:[v],E={},D;if(b!==!1)for(let n of T){let{transition:r,transitionEnd:i,...a}=Ho(e,n,Uo(e,t))||{};E={...E,...a,...i},D=lf(r)||D}let{prevResolvedValues:O}=i;for(let t in{...O,...E}){if(t in m)continue;let n=E[t],r=O[t],a=Array.isArray(n)&&Array.isArray(r)?!sf(n,r)||S:n!==r,o;if(a&&n==null)p.has(t)||p.set(t,i.prevOut);else if(a||n!==void 0&&p.has(t)){C=!0,o=p.get(t)||_,p.delete(t)&&(w=!0),i.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)}else i.protectedKeys[t]=!0;i.out[t]=o}if(i.prevProp=v,i.prevResolvedValues=E,i.prevOut=D,i.isActive&&(m={...m,...E}),C&&(!(x&&S)||w))for(let n of T){let r={type:t};if(typeof n==`string`&&u&&c&&s?.enteringChildren){let t=Ho(s,n)?.transition?.delayChildren;r.delay=So(s.enteringChildren,e,t)}d.push({animation:n,options:r})}}),p.size){let t={},n=f(),r=n?.transition;p.forEach((i,a)=>{i&&(r={...r||e.getDefaultTransition(),[a]:i});let s=e.getValue(a);s&&(s.liveStyle=!0);let c=n&&!Array.isArray(l)?n[a]:void 0,u=e.getBaseTargetFromProps(o,a);t[a]=(c===void 0?u!==void 0&&!Yo(u)?u:e.initialValues[a]===void 0?e.baseTarget[a]:void 0:c)??null}),r&&(t.transition=r),d.push({animation:t})}let v=u&&e.blockInitialAnimation||r&&!c&&(o.initial===!1||o.initial===o.animate);return r=i=!1,!v&&d.length?t(d):Promise.resolve()}function o(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=a(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:a,setActive:o,setAnimateFunction:n=>{t=n(e)},getState:()=>n,reset:()=>{n=ff(),i=!0}}}function df(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!sf(t,e):!1}function ff(){let e={};for(let t of _u)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return e}var pf=(0,m.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function mf(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function hf(...e){return t=>{let n=!1,r=e.map(e=>{let r=mf(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():mf(e[t],null)}}}}function gf(...e){return m.useCallback(hf(...e),e)}var _f=e=>{let{width:t,height:n}=e?.getBoundingClientRect()||{};return[t/e?.offsetWidth||1,n/e?.offsetHeight||1]},vf=e=>{let{left:t,top:n}=e.getBoundingClientRect(),r=e;for(;r=r.parentElement||r.parentNode?.host;){let{scrollLeft:e,scrollTop:i}=r;if(e||i){let[a,o]=_f(r);t+=e*a,n+=i*o}if(getComputedStyle(r).position===`fixed`)break}let[i,a]=_f(e.offsetParent);return[t/i,n/a]},yf=class extends m.Component{getSnapshotBeforeUpdate(e){let t=this.props.getElement();if(xs(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=xs(e)&&e.offsetWidth||0,r=xs(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction,a.point=vf(t)}return null}componentDidUpdate(){}render(){return this.props.children}};function bf({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a,popNode:o}){let s=(0,m.useId)(),c=(0,m.useRef)(null),l=(0,m.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:u}=(0,m.useContext)(pf),d=gf(c,a===!1?void 0:e.props?.ref??e?.ref),f=()=>c.current||o?.current?.current,p=e=>{let{width:t,height:i,top:a,left:o,right:c,bottom:u,direction:d}=l.current,f=d===`rtl`,p=n===`left`?f?`right:${c}`:`left:${o}`:f?`left:${o}`:`right:${c}`,m=r===`bottom`?`bottom:${u}`:`top:${a}`;e?.insertRule(`[data-motion-pop-id="${s}"]{position:absolute!important;width:${t}px!important;height:${i}px!important;${p}px!important;${m}px!important}`)};return(0,m.useInsertionEffect)(()=>{let{width:e,height:n}=l.current,r=f();if(t||a===!1||!r||!e||!n)return;r.dataset.motionPopId=s;let o=r.ownerDocument,c=o.createElement(`style`);u&&(c.nonce=u);let d=i??o.head;d.appendChild(c),p(c.sheet);let m=0,h=0;return Cc.setup(()=>{let[e,t]=vf(r);m=l.current.point[0]-e,h=l.current.point[1]-t}),Cc.read(()=>{let{sheet:e}=c;if(!e||!m&&!h)return;let t=l.current;t.left+=m,t.right-=m,t.top+=h,t.bottom-=h,e.deleteRule(0),p(e)}),()=>{r.removeAttribute(`data-motion-pop-id`),d.contains(c)&&d.removeChild(c)}},[t]),(0,h.jsx)(yf,{isPresent:t,getElement:f,sizeRef:l,pop:a,children:a===!1?e:m.cloneElement(e,{ref:d})})}var xf=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=ct(Sf),d=(0,m.useId)(),f=(0,m.useRef)(),p=(0,m.useRef)(n),g=(0,m.useRef)(r);lt(()=>{p.current=n,g.current=r});let _=!0,v=(0,m.useMemo)(()=>(_=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:(e,t)=>(u.set(e,!1),t&&t.parent?.presenceContext?.id!==d&&(f.current=t),()=>{u.delete(e),!p.current&&!u.size&&g.current?.()})}),[n,u,r]);return a&&_&&(v={...v}),(0,m.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),m.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,h.jsx)(bf,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,popNode:f,children:e}),(0,h.jsx)(ut.Provider,{value:v,children:e})};function Sf(){return new Map}function Cf(e=!0){let t=(0,m.useContext)(ut);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,m.useId)();(0,m.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,m.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var wf=e=>e.key||``;function Tf(e){let t=[];return m.Children.forEach(e,e=>{(0,m.isValidElement)(e)&&t.push(e)}),t}var Ef=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=Cf(o),f=(0,m.useMemo)(()=>Tf(e),[e]),p=o&&!u?[]:f.map(wf),g=(0,m.useRef)(!0),_=ct(()=>new Map),v=(0,m.useRef)(new Set),[y,b]=(0,m.useState)(f),[x,S]=(0,m.useState)(f);lt(()=>{o&&!u&&!x.length&&d?.()},[u,o,x.length,d]);let C=(0,m.useRef)();(0,m.useEffect)(()=>()=>{let e=C.current;C.current=void 0,e?.()},[x]),lt(()=>{g.current=!1;for(let e=0;e<x.length;e++){let t=wf(x[e]);p.includes(t)?(_.delete(t),v.current.delete(t)):_.get(t)!==!0&&_.set(t,!1)}},[x,p.length,p.join(`-`)]);let w=[];if(f!==y){let e=[...f],t=0;for(let n of x){let r=p.indexOf(wf(n));r===-1?(e.splice(t++,0,n),w.push(n)):t=r+w.length+1}return w.every(e=>_.get(wf(e)))?e=f:a===`wait`&&(e=w),S(Tf(e)),b(f),null}let{forceRender:T}=(0,m.useContext)(st);return(0,h.jsx)(h.Fragment,{children:x.map(e=>{let m=wf(e),y=o&&!u?!1:f===x||p.includes(m);return(0,h.jsx)(xf,{isPresent:y,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:y?void 0:()=>{if(v.current.has(m))return;if(_.has(m))v.current.add(m),_.set(m,!0);else return;let e=!0;_.forEach(t=>{t||(e=!1)}),e&&(T?.(),b([]),o&&d?.(),C.current=r)},anchorX:s,anchorY:c,children:e},m)})})},Df=(0,m.createContext)({strict:!1}),Of={animation:[`variants`,..._u],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},kf=!1;function Af(){if(kf)return;let e={};for(let t in Of)e[t]={isEnabled:e=>Of[t].some(t=>!!e[t])};Ou(e),kf=!0}function jf(){return Af(),ku()}function Mf(e){let t=jf();for(let n in e)t[n]={...t[n],...e[n]};Ou(t)}function Nf({children:e,...t}){let n=(0,m.useContext)(pf);t={...n,...t},t.transition=Oo(t.transition,n.transition),t.isStatic=ct(()=>t.isStatic);let r=(0,m.useMemo)(()=>t,[JSON.stringify(t.transition),t.transformPagePoint,t.reducedMotion,t.skipAnimations,t.isValidProp]);return(0,h.jsx)(pf.Provider,{value:r,children:e})}var Pf=(0,m.createContext)({});function Ff(e,t){if(yu(e)){let{initial:t,animate:n}=e;return{initial:t===!1||gu(t)?t:void 0,animate:gu(n)?n:void 0}}return e.inherit===!1?{}:t}function If(e){let{initial:t,animate:n}=Ff(e,(0,m.useContext)(Pf));return(0,m.useMemo)(()=>({initial:t,animate:n}),[Lf(t),Lf(n)])}function Lf(e){return Array.isArray(e)?e.join(` `):e}var Rf=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function zf(e,t,n){for(let r in t)!Yo(t[r])&&!Nu(r,n)&&(e[r]=t[r])}function Bf({transformTemplate:e},t){return(0,m.useMemo)(()=>{let n=Rf();return Ls(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Vf(e,t){let n=e.style||{},r={};return zf(r,n,e),Object.assign(r,Bf(e,t)),r}function Hf(e,t){let n={},r=Vf(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var Uf=()=>({...Rf(),attrs:{}});function Wf(e,t,n,r){let i=(0,m.useMemo)(()=>{let n=Uf();return Hs(n,t,nf(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};return zf(t,e.style,e),{...i,style:{...t,...i.style}}}return i}var Gf=new Set(`animate.exit.variants.initial.style.values.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.tap.propagate.ignoreStrict.viewport.pinch`.split(`.`));function Kf(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Gf.has(e)}function qf(e,t){return e.startsWith(`on`)?!Kf(e):t?.(e)??!Kf(e)}function Jf(e,t,n,r){let i={};for(let a in e)a===`values`&&typeof e.values==`object`||Yo(e[a])||(qf(a,r)||n===!0&&Kf(a)||!t&&!Kf(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]);return i}var Yf=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function Xf(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Yf.indexOf(e)>-1||/[A-Z]/u.test(e))}function Zf(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??Xf(e)?Wf:Hf)(t,r,i,e),l=Jf(t,typeof e==`string`,a,s),u=e===m.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,m.useMemo)(()=>Yo(d)?d.get():d,[d]);return(0,m.createElement)(e,{...u,children:f})}function Qf({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:$f(n,r,i,e),renderState:t()}}function $f(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=jc(a[e]);let{initial:o,animate:s}=e,c=yu(e),l=bu(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!hu(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Vo(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var ep=e=>(t,n)=>{let r=(0,m.useContext)(Pf),i=(0,m.useContext)(ut),a=()=>Qf(e,t,r,i);return n?a():ct(a)},tp=ep({scrapeMotionValuesFromProps:Pu,createRenderState:Rf}),np=ep({scrapeMotionValuesFromProps:af,createRenderState:Uf}),rp=Symbol.for(`motionComponentSymbol`);function ip(e,t,n){let r=(0,m.useRef)(n);(0,m.useInsertionEffect)(()=>{r.current=n});let i=(0,m.useRef)(null);return(0,m.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`){if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n)}else a&&(a.current=n)},[t])}var ap=(0,m.createContext)({});function op(e,t,n,r,i,a){let{visualElement:o}=(0,m.useContext)(Pf),s=(0,m.useContext)(Df),c=(0,m.useContext)(ut),l=(0,m.useContext)(pf),u=l.reducedMotion,d=l.skipAnimations,f=(0,m.useRef)(null),p=(0,m.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let h=f.current,g=(0,m.useContext)(ap);h&&!h.projection&&i&&(h.type===`html`||h.type===`svg`)&&i.create(h,n,g),(0,m.useInsertionEffect)(()=>{h&&h.props!==n&&h.update(n,c)});let _=n[Qo],v=(0,m.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return lt(()=>{p.current&&h&&(h.animationState?.animateChanges(),h.enteringChildren=void 0)},[]),lt(()=>{p.current=!0,h&&(window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),v.current&&h.animationState&&h.animationState.animateChanges())}),(0,m.useEffect)(()=>{h&&(!v.current&&h.animationState&&h.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),h.enteringChildren=void 0)}),h}function sp(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Mf(r);let a=n?n===`svg`:Xf(e),o=a?np:tp;function s(n,s){let c,l=cp(n);ct(()=>!!fu.current?.sharedNodes.get(l)?.lead&&n.initial)&&(n={...n,initial:!1});let u={...(0,m.useContext)(pf),...n,layoutId:l},{isStatic:d,isValidProp:f}=u,p=If(n),g=o(n,d);if(!d&&typeof window<`u`){lp(u,r);let t=up(u);p.visualElement=op(e,g,u,i,t.ProjectionNode,a),(t.isEnabled||p.visualElement?.projection?.options.layoutId)&&(c=t.MeasureLayout)}return(0,h.jsxs)(Pf.Provider,{value:p,children:[c&&p.visualElement?(0,h.jsx)(c,{visualElement:p.visualElement,...u}):null,Zf(e,n,ip(g,p.visualElement,s),g,d,t,a,f)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,m.forwardRef)(s);return c[rp]=e,c}function cp({layoutId:e}){let t=(0,m.useContext)(st).id;return t&&e!==void 0?t+`-`+e:e}function lp(e,t){(0,m.useContext)(Df).strict}function up(e){let{drag:t,layout:n}=jf();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:r.MeasureLayout,isEnabled:t?.isEnabled(e)||n?.isEnabled(e),ProjectionNode:r.ProjectionNode}}function dp(e,t){if(typeof Proxy>`u`)return sp;let n=new Map,r=(n,r)=>sp(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,sp(a,void 0,e,t)),n.get(a))})}var fp=(e,t)=>t.isSVG??Xf(e)?new of(t):new Iu(t,{allowProjection:e!==m.Fragment}),pp=class extends ef{constructor(e){super(e),e.animationState||=uf(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();hu(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){this.node.getProps().animate!==this.node.prevProps?.animate&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},mp=0,hp={animation:{Feature:pp},exit:{Feature:class extends ef{constructor(){super(...arguments),this.id=mp++}update(){let{presenceContext:e,animationState:t}=this.node;if(!e||!t)return;let{isPresent:n,onExitComplete:r}=e;if(n===!this.exit)return;if(n){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=Ho(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,t.reset(),t.animateChanges()}else t.setActive(`exit`,!1);this.exit=void 0;return}let i=this.exit=t.setActive(`exit`,!0);r&&i.then(()=>{this.exit===i&&(this.exit=!0,r(this.id))})}mount(){let{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id,this.node)),this.update()}unmount(){}}}},gp=class extends ef{constructor(e){super(e),this.removeGroupControls=yt,this.removeListeners=yt,this.controls=new jd(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yt}update(){let{dragControls:e,drag:t}=this.node.getProps(),{dragControls:n,drag:r}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls))),r&&!t&&this.controls.stop(void 0,void 0,r)}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},_p=e=>(t,n)=>{e&&hr.update(()=>e(t,n),!1,!0)},vp=class extends ef{constructor(){super(...arguments),this.removePointerDownListener=yt}onPointerDown(e){this.session=new H(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:this.node.current?.ownerDocument.defaultView})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:_p(e),onStart:_p(t),onMove:_p(n),onEnd:(e,t)=>{delete this.session,r&&hr.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Bu(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session?.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session?.end()}},yp=!1,bp=({layout:e,layoutDependency:t,layoutAnchor:n})=>({layout:e,layoutDependency:t,layoutAnchor:n,animationType:typeof e==`string`?e:`both`}),xp=(e,t)=>{let{snapshot:n}=e,r=e.getStack();r?.remove(e);let i=r?.lead;if(r?.prevLead===e&&i.resumeFrom===e&&(i.resumeFrom=i.currentAnimation=e.resumingFrom=void 0),e.options.layoutId=t,!t)e.needsShow=!0;else return e.root.registerSharedNode(t,e),()=>{let{resumeFrom:t}=e;t?.isPresent!==!1&&e.getStack().members.includes(t)&&(t.hide(),e.resumeFrom=void 0,e.snapshot=n)}},Sp=class extends m.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group?.add(i),r&&n?.register?.(i),yp&&i.root.didUpdate(),i.options.layoutId!==r&&xp(i,r)?.(),i.addEventListener(`animationComplete`,()=>this.safeToRemove()),i.setOptions({...i.options,...bp(this.props),onExitComplete:()=>this.safeToRemove()})),jl.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,layoutId:n,visualElement:r,drag:i,isPresent:a}=this.props,{projection:o}=r;return o&&(o.isPresent=a,this.takeOver=e.layoutId===n?void 0:(o.willUpdate(),xp(o,n)),o.setOptions({...o.options,...bp(this.props)}),yp=!0,i||e.layoutDependency!==t||t===void 0||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||hr.postRender(()=>{o.getStack()?.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(this.takeOver?.(),e.root.didUpdate(),Cc.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;yp=!0,r&&(r.scheduleCheckAfterUnmount(),t.group?.remove(r),n?.deregister?.(r))}safeToRemove(){this.props.safeToRemove?.()}render(){return null}};function Cp(e){let[t,n]=Cf(),r=(0,m.useContext)(st);return(0,h.jsx)(Sp,{...e,layoutGroup:r,switchLayoutGroup:(0,m.useContext)(ap),isPresent:t,safeToRemove:n})}var wp={pan:{Feature:vp},drag:{Feature:gp,ProjectionNode:pu,MeasureLayout:Cp}};function Tp(e,t,n,r,i){let{props:a}=e,o=`while`+n;!i&&e.animationState&&a[o]&&e.animationState.setActive(o,r===`Start`);let s=a[`on`+n+r];s&&hr.postRender(()=>s(t,Ru(t)))}var Ep=class extends ef{mount(){let{current:e}=this.node;e&&(this.unmount=Bd(e,(e,t)=>(Tp(this.node,t,`Hover`,`Start`),e=>Tp(this.node,e,`Hover`,`End`))))}unmount(){}},Dp=class extends ef{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}e&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=bt(uu(this.node.current,`focus`,()=>this.onFocus()),uu(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Op(e,t,n,r){e.current instanceof HTMLButtonElement&&e.current.disabled||Tp(e,t,`Tap`,n,r)}var kp=class extends ef{constructor(){super(...arguments),this.options={}}mount(){let{current:e}=this.node;e&&(this.update(),this.unmount=Qd(e,(e,t)=>(Op(this.node,t,`Start`),{onComplete:(e,{success:t})=>Op(this.node,e,t?``:`Cancel`),onRepeat:()=>Op(this.node,t,``,!0)}),this.options))}update(){let{options:e,node:t}=this,{globalTapTarget:n,propagate:r,tap:i}=t.props;for(let t in e)delete e[t];Object.assign(e,i,{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}},Ap=new WeakMap,jp=new WeakMap,Mp=e=>{let t=Ap.get(e.target);t&&t(e)},Np=e=>{e.forEach(Mp)};function Pp({root:e,...t}){let n=e||document;jp.has(n)||jp.set(n,{});let r=jp.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Np,{root:e,...t})),r[i]}function Fp(e,t,n){let r=Pp(t);return Ap.set(e,n),r.observe(e),()=>{Ap.delete(e),r.unobserve(e)}}var Ip={some:0,all:1},Lp=class extends ef{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Ip[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=Fp(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(Rp(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Rp({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var zp=dp(Object.assign({},hp,{inView:{Feature:Lp},tap:{Feature:kp},focus:{Feature:Dp},hover:{Feature:Ep}},wp,{layout:{ProjectionNode:pu,MeasureLayout:Cp}}),fp);function Bp(e){let t=ct(()=>Do(e)),{isStatic:n}=(0,m.useContext)(pf);if(n){let[,n]=(0,m.useState)(e);(0,m.useEffect)(()=>t.on(`change`,n),[])}return t}function Vp(e,t){let n=Bp(t()),r=()=>n.set(t());return r(),lt(()=>{let t=()=>hr.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return r(),()=>{n.forEach(e=>e()),gr(r)}}),n}function Hp(e){To.current=[],e();let t=Vp(To.current,e);return To.current=void 0,t}function Up(e,t,n,r){if(typeof e==`function`)return Hp(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return Gp(e,t,n,r);let i=typeof t==`function`?t:$d(t,n,r),a=Array.isArray(e)?Wp(e,i):Wp([e],([e])=>i(e)),o=Array.isArray(e)?void 0:e.accelerate;if(o&&!o.isTransformed&&typeof t!=`function`&&Array.isArray(n)&&r?.clamp!==!1&&!r?.mixer){let e=r?.ease;a.accelerate={...o,times:[0,...t,1],keyframes:[n[0],...n,n[n.length-1]],isTransformed:!0,...e?{ease:Array.isArray(e)?[e[0],...e]:e}:{}}}return a}function Wp(e,t){let n=ct(()=>[]);return Vp(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}function Gp(e,t,n,r){let i=ct(()=>Object.keys(n)),a=ct(()=>({}));for(let o of i)a[o]=Up(e,t,n[o],r);return a}function Kp(e){e.values.forEach(e=>e.stop())}function qp(e,t){[...t].reverse().forEach(n=>{let r=e.getVariant(n);r&&Jo(e,r),e.variantChildren&&e.variantChildren.forEach(e=>{qp(e,t)})})}function Jp(e,t){if(Array.isArray(t))return qp(e,t);if(typeof t==`string`)return qp(e,[t]);Jo(e,t)}function Yp(){let e=new Set,t={subscribe(t){return e.add(t),()=>void e.delete(t)},start(t,n){let r=[];return e.forEach(e=>{r.push(is(e,t,{transitionOverride:n}))}),Promise.all(r)},set(t){return e.forEach(e=>{Jp(e,t)})},stop(){e.forEach(e=>{Kp(e)})},mount(){return()=>{t.stop()}}};return t}function Xp(e){return typeof e==`object`&&!Array.isArray(e)}function Zp(e,t,n,r){return e==null?[]:typeof e==`string`&&Xp(t)?Es(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function Qp(e,t,n){return e*(t+1)+n*t}function $p(e,t){if(t.has(e))return t.get(e);let[,n,r]=e.match(/^(.+?)([+-][\d.]+)$/)||[];return t.has(n)?Math.max(0,t.get(n)+parseFloat(r)):void 0}function em(e,t,n,r){return typeof t==`number`?t:t.startsWith(`-`)||t.startsWith(`+`)?Math.max(0,e+parseFloat(t)):t===`<`?n:t.startsWith(`<`)?Math.max(0,n+parseFloat(t.slice(1))):$p(t,r)??e}function tm(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];i.at>t&&i.at<n&&(ft(e,i),r--)}}function nm(e,t,n,r,i,a){tm(e,i,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:Jn(i,a,r[o]),easing:Ht(n,o)})}function rm(e,t,n=0){let r=t+1+t*n;for(let t=0;t<e.length;t++)e[t]=e[t]/r}function im(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var am=`easeInOut`,om=20;function sm(e,{defaultTransition:t={},...n}={},r,i,a){let o=t.duration||.3,s=new Map,c=new Map,l={},u=new Map,d=0,f=0,p=0,m=(e,n)=>{let a=n,s=e=>typeof e==`number`?n+e:em(f,e,d,u);for(let n=0;n<e.length;n++){let h=e[n];if(typeof h==`string`){u.set(h,f);continue}if(!Array.isArray(h)){let e=h.at===void 0?f:s(h.at);`sequence`in h?(d=f=e,f=m(h.sequence,e),d=e,a=Math.max(a,f)):u.set(h.name,e);continue}let[g,_,v={}]=h;v.at!==void 0&&(f=s(v.at));let y=0,b=(e,n,r,a=0,s=0)=>{let c=um(e),{delay:l=0,times:u=Qr(c),type:d=t.type||`keyframes`,repeat:m,repeatType:h,repeatDelay:g=0,..._}=n,{ease:v=t.ease||`easeOut`,duration:b}=n;r.mixer||=n.mixer;let x=typeof l==`function`?l(a,s):l,S=c.length,C=ya(d)?d:i?.[d||`keyframes`];if(S<=2&&C){let e=100;if(S===2&&pm(c)){let t=c[1]-c[0];e=Math.abs(t)}let n={...t,..._};b!==void 0&&(n.duration=Ct(b));let r=Sr(n,e,C);v=r.ease,b=r.duration}b??=o;let w=f+x;u.length===1&&u[0]===0&&(u[1]=1);let T=u.length-c.length;if(T>0&&Zr(u,T),c.length===1&&c.unshift(null),m&&m<om){let e=b>0?g/b:0;b=Qp(b,m,g);let t=[...c],n=[...u];v=Array.isArray(v)?[...v]:[v];let r=[...v],i=h===`reverse`||h===`mirror`,a=t,o=r;i&&(a=[...t].reverse(),h===`reverse`&&(o=[...r].reverse().map(e=>typeof e==`function`?At(e):e)));for(let s=0;s<m;s++){let l=i&&s%2==0,d=l?a:t,f=l?o:r,p=(s+1)*(1+e);e>0&&(c.push(c[c.length-1]),u.push(p),v.push(`linear`)),c.push(...d);for(let e=0;e<d.length;e++)u.push(n[e]+p),v.push(e===0?`linear`:Ht(f,e-1))}rm(u,m,e)}let E=w+b;nm(r,c,v,u,w,E),y=Math.max(x+b,y),p=Math.max(E,p)};if(Yo(g)){let e=cm(g,c);b(_,v,lm(`default`,e))}else{let e=Zp(g,_,r,l),t=e.length;for(let n=0;n<t;n++){_=_,v=v;let r=e[n],i=cm(r,c);for(let e in _)b(_[e],dm(v,e),lm(e,i),n,t)}}d=f,f+=y,a=Math.max(a,f)}return a};m(e,0),a&&(a.duration=p,a.labels=u);let{type:h,...g}=t;return c.forEach((e,r)=>{for(let i in e){let a=e[i];a.sort(im);let o=[],c=[],l=[];for(let e=0;e<a.length;e++){let{at:t,value:n,easing:r}=a[e];o.push(n),c.push(xt(0,p,t)),l.push(r||`easeOut`)}c[0]!==0&&(c.unshift(0),o.unshift(o[0]),l.unshift(am)),c[c.length-1]!==1&&(c.push(1),o.push(null)),s.has(r)||s.set(r,{keyframes:{},transition:{}});let u=s.get(r);u.keyframes[i]=o,u.transition[i]={...g,duration:p,ease:l,times:c,mixer:a.mixer||t.mixer,...n}}}),s}function cm(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function lm(e,t){return t[e]||(t[e]=[]),t[e]}function um(e){return Array.isArray(e)?e:[e]}function dm(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var fm=e=>typeof e==`number`,pm=e=>e.every(fm);function mm(e,t){return Yo(e)||typeof e==`number`||typeof e==`string`&&!Xp(t)}function hm(e,t,n,r){let i=[];if(mm(e,t))i.push(Tc(e,Xp(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return i;let a=Zp(e,t,r),o=a.length;for(let e=0;e<o;e++){let r=a[e],s={...n};`delay`in s&&typeof s.delay==`function`&&(s.delay=s.delay(e,o)),r instanceof Element?i.push(...xc(r,t,s,mu.get(r))):i.push(...ys(_s(r)??Sc,r,t,s))}}return i}function gm(e,t,n,r){let i=[],a=sm(e.map(e=>{if(Array.isArray(e)&&typeof e[0]==`function`){let t=e[0],n=Do(0);return n.on(`change`,t),e.length===1?[n,[0,1]]:e.length===2?[n,[0,1],e[1]]:[n,e[1],e[2]]}return e}),t,n,{spring:qr},r),o=t?.reduceMotion??t?.defaultTransition?.reduceMotion;return a.forEach(({keyframes:e,transition:t},n)=>{i.push(...hm(n,e,{...t,reduceMotion:o}))}),i}var _m=0;function vm({repeat:e=0,repeatDelay:t=0,repeatType:n=`loop`,delay:r=0},i,a,o){let s=i+t,c=o===void 0;if(c){let t=Math.max(0,a-r);o=s&&t>0?Math.min(e,Math.ceil(t/s-1e-9)-1):0,a=Math.min(t-o*s,i)}return n!==`loop`&&o%2&&(a=i-a),[o,c?a:r+o*s+a]}function ym(e,t){let n=[...e],r=typeof n[0]==`function`?Math.max(1,n.length-1):2;return n[r]={...n[r],at:t},n}var bm=(e,t)=>t===void 0?e:{name:e,at:t};function xm(e){e.pause(),e.time=0,e.stop()}var Sm=class e{constructor(e=[],t={},n){this.options=t,this.entries=[],this.repeatIndex=0,this.prevTime=0,this.markers=[],this.labels=new Map,this.totalDuration=0,this.isDirty=!1,this.isDone=!1,this.isRebuilding=!1,this.playbackSpeed=1,this.motionScope=Cs.current,this.isKilled=!1,this.isWrapped=!1,this.stop=()=>{this.flush(),this.group?.stop()},this.isPaused=t.autoplay===!1,this.newFinished(),e.forEach(e=>this.add(e)),n?(this.isDirty=!1,this.isWrapped=!0,this.group=new xo(n),this.watch()):(this.invalidate(),this.flush())}add(t,n){return t instanceof e&&t.adopt(this),this.push({item:t,at:n})}call(e,t){return this.push({item:e,at:t,marker:{name:`_m`+_m++,time:0,callback:e}})}addPause(e,t){return this.push({item:t||{},at:e,marker:{name:`_m`+_m++,time:0,callback:t,pause:!0}})}move(e,t){return this.entries.forEach(n=>{n.item===e&&(n.at=t)}),this.invalidate()}remove(t){return t instanceof e&&(t.parent=void 0),this.entries=this.entries.filter(e=>e.item!==t),this.invalidate()}clear(){return this.entries=[],this.invalidate()}getLabelTime(e){return this.flush(),this.labels.get(e)}seek(e){return this.time=this.resolve(e),this}playTo(e){let t=this.resolve(e),n=this.iterationDuration,r=this.time,[i]=vm(this.options,n,r),a=vm(this.options,n,t,i)[1],o=Math.abs(this.speed);return this.speed=a<r?-o:o,this.stopAt=t,this.clock||this.invalidate(),this.play(),this}reverse(){return this.speed=-this.speed,this.play(),this}get progress(){return this.duration?this.time/this.duration:0}set progress(e){this.time=e*this.duration}get time(){return this.active()?.time??0}set time(e){this.flush(),this.prevTime=e,this.group&&(this.group.time=e),this.repeatIndex=this.currentRepeat()}get speed(){return this.playbackSpeed}set speed(e){this.playbackSpeed=e,this.group&&(this.group.speed=e)}get duration(){return this.flush(),this.isWrapped?this.group.duration:this.totalDuration}get iterationDuration(){return this.flush(),this.isWrapped?this.group.iterationDuration:this.totalDuration}get state(){return this.active()?.state??`idle`}get startTime(){return this.active()?.startTime??null}play(){this.flush(),this.isPaused=!1,this.group?.play(),this.isDone&&(this.newFinished(),this.watch())}pause(){this.flush(),this.isPaused=!0,this.group?.pause()}cancel(){this.flush(),this.group?.cancel()}complete(){this.flush(),this.group?.complete()}attachTimeline(e){return this.flush(),this.scrollTimeline=e,this.detachScroll=this.group?.attachTimeline(e),()=>{this.scrollTimeline=void 0,this.detachScroll?.()}}then(e,t){return this.finished.then(e,t)}active(){return this.flush(),this.group?.animations.length?this.group:void 0}push(e){return this.entries.push(e),this.invalidate()}invalidate(){return this.parent?this.parent.invalidate():this.isDirty||(this.isDirty=!0,queueMicrotask(()=>this.flush())),this}flush(){this.isDirty&&!this.parent&&!this.isKilled&&this.build()}adopt(e){this.group&&=(xm(this.group),void 0),this.isDirty=!1,this.parent=e}build(){let e=this.isWrapped?this.group.iterationDuration:this.totalDuration;this.isDirty=!1,this.isWrapped=!1;let t=this.group,n=0;t&&(this.isRebuilding=!0,this.scrollTimeline?(this.detachScroll?.(),t.cancel()):(n=t.animations.length?t.time:0,xm(t)),this.isRebuilding=!1);let{defaultTransition:r,onComplete:i,onUpdate:a,onRepeat:o,onReverseComplete:s,autoplay:c,scope:l,...u}=this.options,d={};l?.reduceMotion!==void 0&&(d.reduceMotion=l.reduceMotion),l?.skipAnimations!==void 0&&(d.skipAnimations=l.skipAnimations),Object.assign(d,u);let f=new Map,p={},m=Cs.current;Cs.current=this.motionScope;let h;try{h=gm(this.toSequence(f),{defaultTransition:r,...d},l,p)}finally{Cs.current=m}let g=p.labels,_=d.duration??p.duration,v=p.duration?_/p.duration:1;if(g.forEach((e,t)=>g.set(t,e*v)),this.markers=[],f.forEach((e,t)=>{e.time=g.get(t),g.delete(t),_=Math.max(_,e.time),this.markers.push(e)}),this.markers.sort((e,t)=>e.time-t.time),this.labels=g,this.totalDuration=_,this.clock=this.clockAnimation=void 0,this.markers.length||this.stopAt!==void 0||a||o){let e=this.clock=Do(0);e.on(`change`,t=>e===this.clock&&this.onClock(t)),h.unshift(this.clockAnimation=Tc(e,[0,_],{...d,duration:_,ease:`linear`}))}let y=this.group=new xo(h),{delay:b=0,repeat:x=0,repeatDelay:S=0}=this.options,[C,w]=vm(this.options,e,n);n>b&&(n=vm(this.options,_,Math.min(w,_),C)[1]),this.isDone&&n<b+(x+1)*(_+S)-S&&this.newFinished(),this.scrollTimeline?this.detachScroll=y.attachTimeline(this.scrollTimeline):(y.speed=this.playbackSpeed,this.isPaused&&y.pause(),n&&(y.time=n)),this.repeatIndex=this.currentRepeat(),this.prevTime=n||-1,this.watch()}toSequence(t){return this.entries.map(({item:n,at:r,marker:i})=>i?(t.set(i.name,i),bm(i.name,r)):n instanceof e?{sequence:n.toSequence(t),at:r}:typeof n==`string`?bm(n,r):r===void 0?n:Array.isArray(n)?ym(n,r):{...n,at:r})}resolve(e){return this.flush(),typeof e==`number`?e:$p(e,this.labels)??this.time}currentRepeat(){return vm(this.options,this.totalDuration,this.clockAnimation?.time??0)[0]}onClock(e){let t=this.prevTime;if(this.prevTime=e,this.isRebuilding)return;let{onUpdate:n,onRepeat:r,repeatType:i=`loop`}=this.options;n?.(e);let a=this.currentRepeat(),o=a>this.repeatIndex?1:-1;for(;a!==this.repeatIndex;){let e=this.speed>0==(i===`loop`||!(this.repeatIndex%2)),n=e?this.totalDuration:0;if(this.cross(t,n))return;this.repeatIndex+=o,r?.(),t=i===`loop`?e?-1:1/0:n}this.cross(t,e)}cross(e,t){if(e===t)return;let n=t>e,r=r=>n?r>e&&r<=t:r<e&&r>=t,i=n?this.markers:[...this.markers].reverse();for(let e of i)if(r(e.time)&&(e.callback?.(n?1:-1),e.pause))return this.pauseAt(e.time);if(this.stopAt!==void 0&&r(this.stopAt))return this.pauseAt(this.stopAt),this.stopAt=void 0,!0}pauseAt(e){return this.pause(),this.time=vm(this.options,this.totalDuration,e,this.repeatIndex)[1],!0}watch(){let e=this.group;e.finished.then(()=>{if(e!==this.group||this.isDone)return;this.isDone=!0;let{onComplete:t,onReverseComplete:n}=this.options,r=this.speed<0&&n||t,i=this.resolveFinished;r?.(),i()})}newFinished(){this.isDone=!1,this.finished=new Promise(e=>{this.resolveFinished=e});let{scope:e}=this.options,t=this.motionScope?.add(()=>{this.isKilled=!0,this.stop()});e?.animations.push(this),this.finished.then(()=>{t?.(),e&&ft(e.animations,this)})}};function Cm(e){return Array.isArray(e)&&e.some(e=>Array.isArray(e)||e?.sequence)}function wm(e={}){let{scope:t,reduceMotion:n,skipAnimations:r}=e;function i(e,i,a){let o=Cs.current?.transition,s={};n!==void 0&&(s.reduceMotion=n),r!==void 0&&(s.skipAnimations=r);let c;if(Cm(e)){let r={...s,...i,scope:t};o&&(r.defaultTransition={...o,...r.defaultTransition}),r.reduceMotion=i?.reduceMotion??r.defaultTransition?.reduceMotion??n,c=new Sm(e,r)}else{let{onComplete:n,...r}=a||{},l={...s,...o,...r},{onUpdate:u}=r;c=new Sm([typeof e==`number`||typeof e==`string`&&(typeof i==`string`||Array.isArray(i))?[u||(()=>{}),Array.isArray(i)?i:[e,i],{...l,onUpdate:void 0}]:[e,i,l]],{...s,onComplete:n,scope:t},hm(e,i,l,t))}return c}return i}var Tm=Object.assign(wm(),{addEffect:hs,removeEffect:gs});function Em(){let e=ct(Yp);return lt(e.mount,[]),e}var U=zp,Dm=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Om=o(((e,t)=>{t.exports=Dm()})),km=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),Am=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=km()})),jm=o((e=>{var t=Om(),n=d(),r=Am();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}function p(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&p(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function m(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function h(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function g(e){var t=[null,null],n=m(e);return n===null||_(t,e,n.child,{foundSelf:!1}),t}function _(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&_(e,t,n.child,r))return!0;n=n.sibling}return!1}function v(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var y=null,b=null;function x(e,t,n){return e===n||e===t&&(y=e,!0)}function S(e,t,n){return e===n?(b=e,!1):e===t&&(b!==null&&(y=e),!0)}function C(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function w(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var T=Object.assign,E=Symbol.for(`react.element`),D=Symbol.for(`react.transitional.element`),O=Symbol.for(`react.portal`),k=Symbol.for(`react.fragment`),A=Symbol.for(`react.strict_mode`),j=Symbol.for(`react.profiler`),M=Symbol.for(`react.consumer`),N=Symbol.for(`react.context`),ee=Symbol.for(`react.forward_ref`),P=Symbol.for(`react.suspense`),F=Symbol.for(`react.suspense_list`),te=Symbol.for(`react.memo`),ne=Symbol.for(`react.lazy`),re=Symbol.for(`react.activity`),ie=Symbol.for(`react.legacy_hidden`),ae=Symbol.for(`react.memo_cache_sentinel`),oe=Symbol.for(`react.view_transition`),se=Symbol.for(`react.recoverable`),ce=Symbol.iterator;function le(e){return typeof e!=`object`||!e?null:(e=ce&&e[ce]||e[`@@iterator`],typeof e==`function`?e:null)}var ue=Symbol.for(`react.client.reference`);function de(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ue?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case k:return`Fragment`;case j:return`Profiler`;case A:return`StrictMode`;case P:return`Suspense`;case F:return`SuspenseList`;case re:return`Activity`;case oe:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case O:return`Portal`;case N:return e.displayName||`Context`;case M:return(e._context.displayName||`Context`)+`.Consumer`;case ee:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case te:return t=e.displayName||null,t===null?de(e.type)||`Memo`:t;case ne:t=e._payload,e=e._init;try{return de(e(t))}catch{}}return null}var fe=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pe={pending:!1,data:null,method:null,action:null},me=[],he=-1;function ge(e){return{current:e}}function _e(e){0>he||(e.current=me[he],me[he]=null,he--)}function ve(e,t){he++,me[he]=e.current,e.current=t}var ye=ge(null),be=ge(null),xe=ge(null),Se=ge(null);function Ce(e,t){switch(ve(xe,t),ve(be,e),ve(ye,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?yp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=yp(t),e=bp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}_e(ye),ve(ye,e)}function we(){_e(ye),_e(be),_e(xe)}function Te(e){var t=e.memoizedState;t!==null&&(gh._currentValue=t.memoizedState,ve(Se,e)),t=ye.current;var n=bp(t,e.type);t!==n&&(ve(be,e),ve(ye,n))}function Ee(e){be.current===e&&(_e(ye),_e(be)),Se.current===e&&(_e(Se),gh._currentValue=pe)}var De,Oe;function ke(e){if(De===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);De=t&&t[1]||``,Oe=-1<e.stack.indexOf(`
2
- at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
- `+De+e+Oe}var Ae=!1;function je(e,t){if(!e||Ae)return``;Ae=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
- `),l=s.split(`
5
- `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
- `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Ae=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ke(n):``}function Me(e,t){switch(e.tag){case 26:case 27:case 5:return ke(e.type);case 16:return ke(`Lazy`);case 13:return e.child!==t&&t!==null?ke(`Suspense Fallback`):ke(`Suspense`);case 19:return ke(`SuspenseList`);case 0:case 15:return je(e.type,!1);case 11:return je(e.type.render,!1);case 1:return je(e.type,!0);case 31:return ke(`Activity`);case 30:return ke(`ViewTransition`);default:return``}}function Ne(e){try{var t=``,n=null;do t+=Me(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
- Error generating stack: `+e.message+`
8
- `+e.stack}}var Pe=Object.prototype.hasOwnProperty,Fe=t.unstable_scheduleCallback,Ie=t.unstable_cancelCallback,Le=t.unstable_shouldYield,Re=t.unstable_requestPaint,ze=t.unstable_now,Be=t.unstable_getCurrentPriorityLevel,Ve=t.unstable_ImmediatePriority,He=t.unstable_UserBlockingPriority,Ue=t.unstable_NormalPriority,We=t.unstable_LowPriority,Ge=t.unstable_IdlePriority,Ke=t.log,qe=t.unstable_setDisableYieldValue,Je=null,Ye=null;function Xe(e){if(typeof Ke==`function`&&qe(e),Ye&&typeof Ye.setStrictMode==`function`)try{Ye.setStrictMode(Je,e)}catch{}}var Ze=Math.clz32?Math.clz32:et,Qe=Math.log,$e=Math.LN2;function et(e){return e>>>=0,e===0?32:31-(Qe(e)/$e|0)|0}var tt=256,nt=262144,rt=4194304;function it(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function at(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=it(n))):i=it(o):i=it(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=it(n))):i=it(o)):i=it(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function ot(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function st(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-Ze(n),i=1<<r;t|=e[r],n&=~i}return t}function ct(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function lt(){var e=rt;return rt<<=1,!(rt&62914560)&&(rt=4194304),e}function ut(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function dt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ft(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ze(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&pt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function pt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ze(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function mt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ze(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ht(e,t){var n=t&-t;return n=n&42?1:gt(n),(n&(e.suspendedLanes|t))===0?n:0}function gt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function _t(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function vt(){var e=L.p;return e===0?(e=window.event,e===void 0?32:Mh(e.type)):e}function yt(e,t){var n=L.p;try{return L.p=e,t()}finally{L.p=n}}var bt=Math.random().toString(36).slice(2),xt=`__reactFiber$`+bt,St=`__reactProps$`+bt,Ct=`__reactContainer$`+bt,wt=`__reactEvents$`+bt,Tt=`__reactListeners$`+bt,Et=`__reactHandles$`+bt,Dt=`__reactResources$`+bt,Ot=`__reactMarker$`+bt,kt=`__reactLoad$`+bt;function At(e){delete e[xt],delete e[St],delete e[Tt],delete e[Et]}function jt(e){var t;if(t=e[xt])return t;for(var n=e.parentNode;n;){if(t=n[Ct]||n[xt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=xm(e);e!==null;){if(n=e[xt])return n;e=xm(e)}return t}e=n,n=e.parentNode}return null}function Mt(e){if(e=e[xt]||e[Ct]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Nt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Pt(e){var t=e[Dt];return t||=e[Dt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Ft(e){e[Ot]=!0}function It(e){e[kt]=void 0}var Lt=new Set,Rt={};function zt(e,t){Bt(e,t),Bt(e+`Capture`,t)}function Bt(e,t){for(Rt[e]=t,e=0;e<t.length;e++)Lt.add(t[e])}var Vt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Ht={},Ut={};function Wt(e){return Pe.call(Ut,e)?!0:Pe.call(Ht,e)?!1:Vt.test(e)?Ut[e]=!0:(Ht[e]=!0,!1)}var Gt=!1;function Kt(){var e=Gt;return Gt=!1,e}function qt(e,t,n){if(Wt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function Jt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function Yt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function R(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Xt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Zt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qt(e){if(!e._valueTracker){var t=Xt(e)?`checked`:`value`;e._valueTracker=Zt(e,t,``+e[t])}}function $t(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Xt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var en=/[\n"\\]/g;function tn(e){return e.replace(en,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function nn(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+R(t)):e.value!==``+R(t)&&(e.value=``+R(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):an(e,R(n)):o===`number`&&e.value==t?an(e,R(e.value)):an(e,R(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+R(s):e.removeAttribute(`name`)}function rn(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Qt(e);return}n=n==null?``:``+R(n),t=t==null?n:``+R(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Qt(e)}function an(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function on(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+R(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function sn(e,t,n){t!=null&&(t=``+R(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+R(n)}function cn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(fe(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=R(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Qt(e)}function ln(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var un=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function dn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||un.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function fn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,Gt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(dn(e,a,r),Gt=!0)}else for(var o in t)t.hasOwnProperty(o)&&dn(e,o,t[o])}function pn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var mn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),hn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function gn(e){return hn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function _n(){}var vn=null;function yn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bn=null,z=null;function xn(e){var t=Mt(e);if(t&&(e=t.stateNode)){var n=e[St]||null;a:switch(e=t.stateNode,t.type){case`input`:if(nn(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+tn(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[St]||null;if(!a)throw Error(i(90));nn(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&$t(r)}break a;case`textarea`:sn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&on(e,!!n.multiple,t,!1)}}}var Sn=!1;function Cn(e,t,n){if(Sn)return e(t,n);Sn=!0;try{return e(t)}finally{if(Sn=!1,(bn!==null||z!==null)&&(Gd(),bn&&(t=bn,e=z,z=bn=null,xn(t),e)))for(t=0;t<e.length;t++)xn(e[t])}}function wn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[St]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var Tn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,En=!1;if(Tn)try{var Dn={};Object.defineProperty(Dn,"passive",{get:function(){En=!0}}),window.addEventListener(`test`,Dn,Dn),window.removeEventListener(`test`,Dn,Dn)}catch{En=!1}var On=null,kn=null,An=null;function jn(){if(An)return An;var e,t=kn,n=t.length,r,i=`value`in On?On.value:On.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return An=i.slice(e,1<r?1-r:void 0)}function Mn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Nn(){return!0}function Pn(){return!1}function Fn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Nn:Pn,this.isPropagationStopped=Pn,this}return T(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Nn)},persist:function(){},isPersistent:Nn}),t}var In={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ln=Fn(In),Rn=T({},In,{view:0,detail:0}),zn=Fn(Rn),Bn,Vn,Hn,Un=T({},Rn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:er,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Hn&&(Hn&&e.type===`mousemove`?(Bn=e.screenX-Hn.screenX,Vn=e.screenY-Hn.screenY):Vn=Bn=0,Hn=e),Bn)},movementY:function(e){return`movementY`in e?e.movementY:Vn}}),Wn=Fn(Un),Gn=Fn(T({},Un,{dataTransfer:0})),Kn=Fn(T({},Rn,{relatedTarget:0})),qn=Fn(T({},In,{animationName:0,elapsedTime:0,pseudoElement:0})),Jn=Fn(T({},In,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Yn=Fn(T({},In,{data:0})),Xn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Zn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Qn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function $n(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Qn[e])?!!t[e]:!1}function er(){return $n}var tr=Fn(T({},Rn,{key:function(e){if(e.key){var t=Xn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Mn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Zn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:er,charCode:function(e){return e.type===`keypress`?Mn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Mn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),nr=Fn(T({},Un,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),rr=Fn(T({},In,{submitter:0})),ir=Fn(T({},Rn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:er})),ar=Fn(T({},In,{propertyName:0,elapsedTime:0,pseudoElement:0})),or=Fn(T({},Un,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),sr=Fn(T({},In,{newState:0,oldState:0,source:0})),cr=[9,13,27,32],lr=Tn&&`CompositionEvent`in window,ur=null;Tn&&`documentMode`in document&&(ur=document.documentMode);var dr=Tn&&`TextEvent`in window&&!ur,fr=Tn&&(!lr||ur&&8<ur&&11>=ur),pr=` `,mr=!1;function hr(e,t){switch(e){case`keyup`:return cr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function gr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var _r=!1;function vr(e,t){switch(e){case`compositionend`:return gr(t);case`keypress`:return t.which===32?(mr=!0,pr):null;case`textInput`:return e=t.data,e===pr&&mr?null:e;default:return null}}function yr(e,t){if(_r)return e===`compositionend`||!lr&&hr(e,t)?(e=jn(),An=kn=On=null,_r=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return fr&&t.locale!==`ko`?null:t.data;default:return null}}var br={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function xr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!br[e.type]:t===`textarea`}function Sr(e,t,n,r){bn?z?z.push(r):z=[r]:bn=r,t=np(t,`onChange`),0<t.length&&(n=new Ln(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Cr=null,wr=null;function Tr(e){Jf(e,0)}function Er(e){if($t(Nt(e)))return e}function Dr(e,t){if(e===`change`)return t}var Or=!1;if(Tn){var kr;if(Tn){var Ar=`oninput`in document;if(!Ar){var jr=document.createElement(`div`);jr.setAttribute(`oninput`,`return;`),Ar=typeof jr.oninput==`function`}kr=Ar}else kr=!1;Or=kr&&(!document.documentMode||9<document.documentMode)}function Mr(){Cr&&(Cr.detachEvent(`onpropertychange`,Nr),wr=Cr=null)}function Nr(e){if(e.propertyName===`value`&&Er(wr)){var t=[];Sr(t,wr,e,yn(e)),Cn(Tr,t)}}function Pr(e,t,n){e===`focusin`?(Mr(),Cr=t,wr=n,Cr.attachEvent(`onpropertychange`,Nr)):e===`focusout`&&Mr()}function Fr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Er(wr)}function Ir(e,t){if(e===`click`)return Er(t)}function Lr(e,t){if(e===`input`||e===`change`)return Er(t)}function Rr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var zr=typeof Object.is==`function`?Object.is:Rr;function Br(e,t){if(zr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Pe.call(t,i)||!zr(e[i],t[i]))return!1}return!0}function Vr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Hr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ur(e,t){var n=Hr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Hr(n)}}function Wr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Wr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Vr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vr(e.document)}return t}function Kr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var qr=Tn&&`documentMode`in document&&11>=document.documentMode,Jr=null,Yr=null,Xr=null,Zr=!1;function Qr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Zr||Jr==null||Jr!==Vr(r)||(r=Jr,`selectionStart`in r&&Kr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Xr&&Br(Xr,r)||(Xr=r,r=np(Yr,`onSelect`),0<r.length&&(t=new Ln(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Jr)))}function $r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ei={animationend:$r(`Animation`,`AnimationEnd`),animationiteration:$r(`Animation`,`AnimationIteration`),animationstart:$r(`Animation`,`AnimationStart`),transitionrun:$r(`Transition`,`TransitionRun`),transitionstart:$r(`Transition`,`TransitionStart`),transitioncancel:$r(`Transition`,`TransitionCancel`),transitionend:$r(`Transition`,`TransitionEnd`)},ti={},ni={};Tn&&(ni=document.createElement(`div`).style,`AnimationEvent`in window||(delete ei.animationend.animation,delete ei.animationiteration.animation,delete ei.animationstart.animation),`TransitionEvent`in window||delete ei.transitionend.transition);function ri(e){if(ti[e])return ti[e];if(!ei[e])return e;var t=ei[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ni)return ti[e]=t[n];return e}var ii=ri(`animationend`),ai=ri(`animationiteration`),oi=ri(`animationstart`),si=ri(`transitionrun`),ci=ri(`transitionstart`),li=ri(`transitioncancel`),ui=ri(`transitionend`),di=new Map,fi=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);fi.push(`scrollEnd`);function pi(e,t){di.set(e,t),zt(t,[e])}var mi=0;function hi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Ed.identifierPrefix;var n=mi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function gi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Pd;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function _i(e,t){return e=gi(e),t=gi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var vi=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},yi=[],bi=0,xi=0;function Si(){for(var e=bi,t=xi=bi=0;t<e;){var n=yi[t];yi[t++]=null;var r=yi[t];yi[t++]=null;var i=yi[t];yi[t++]=null;var a=yi[t];if(yi[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Ei(n,i,a)}}function Ci(e,t,n,r){yi[bi++]=e,yi[bi++]=t,yi[bi++]=n,yi[bi++]=r,xi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function wi(e,t,n,r){return Ci(e,t,n,r),Di(e)}function Ti(e,t){return Ci(e,null,null,t),Di(e)}function Ei(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ze(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Di(e){if(50<Fd)throw Fd=0,Id=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Oi={};function ki(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ai(e,t,n,r){return new ki(e,t,n,r)}function ji(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Mi(e,t){var n=e.alternate;return n===null?(n=Ai(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Ni(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Pi(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)ji(r)&&(s=1);else if(typeof r==`string`)s=nh(e,n,ye.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case re:return e=Ai(31,n,t,a),e.elementType=re,e.lanes=o,e;case k:return Fi(n.children,a,o,t);case A:s=8,a|=24;break;case j:return e=Ai(12,n,t,a|2),e.elementType=j,e.lanes=o,e;case P:return e=Ai(13,n,t,a),e.elementType=P,e.lanes=o,e;case F:return e=Ai(19,n,t,a),e.elementType=F,e.lanes=o,e;case ie:case oe:return e=a|32,e=Ai(30,n,t,e),e.elementType=oe,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case N:s=10;break a;case M:s=9;break a;case ee:s=11;break a;case te:s=14;break a;case ne:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Ai(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Fi(e,t,n,r){return e=Ai(7,e,r,t),e.lanes=n,e}function Ii(e,t,n){return e=Ai(6,e,null,t),e.lanes=n,e}function Li(e){var t=Ai(18,null,null,0);return t.stateNode=e,t}function Ri(e,t,n){return t=Ai(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var zi=new WeakMap;function Bi(e,t){if(typeof e==`object`&&e){var n=zi.get(e);return n===void 0?(t={value:e,source:t,stack:Ne(t)},zi.set(e,t),t):n}return{value:e,source:t,stack:Ne(t)}}var Vi=[],Hi=0,Ui=null,Wi=0,Gi=[],Ki=0,qi=null,Ji=1,Yi=``;function Xi(e,t){Vi[Hi++]=Wi,Vi[Hi++]=Ui,Ui=e,Wi=t}function Zi(e,t,n){Gi[Ki++]=Ji,Gi[Ki++]=Yi,Gi[Ki++]=qi,qi=e;var r=Ji;e=Yi;var i=32-Ze(r)-1;r&=~(1<<i),n+=1;var a=32-Ze(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ji=1<<32-Ze(t)+i|n<<i|r,Yi=a+e}else Ji=1<<a|n<<i|r,Yi=e}function Qi(e){e.return!==null&&(Xi(e,1),Zi(e,1,0))}function $i(e){for(;e===Ui;)Ui=Vi[--Hi],Vi[Hi]=null,Wi=Vi[--Hi],Vi[Hi]=null;for(;e===qi;)qi=Gi[--Ki],Gi[Ki]=null,Yi=Gi[--Ki],Gi[Ki]=null,Ji=Gi[--Ki],Gi[Ki]=null}function ea(e,t){Gi[Ki++]=Ji,Gi[Ki++]=Yi,Gi[Ki++]=qi,Ji=t.id,Yi=t.overflow,qi=e}var ta=null,na=null,B=!1,ra=null,ia=!1,aa=Error(i(519));function oa(e){throw fa(Bi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),aa}function sa(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[xt]=e,t[St]=r,n){case`dialog`:Yf(`cancel`,t),Yf(`close`,t);break;case`iframe`:case`object`:case`embed`:Yf(`load`,t);break;case`video`:case`audio`:for(n=0;n<Kf.length;n++)Yf(Kf[n],t);break;case`source`:Yf(`error`,t);break;case`img`:case`image`:case`link`:Yf(`error`,t),Yf(`load`,t);break;case`details`:Yf(`toggle`,t);break;case`input`:Yf(`invalid`,t),rn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Yf(`invalid`,t);break;case`textarea`:Yf(`invalid`,t),cn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||cp(t.textContent,n)?(r.popover!=null&&(Yf(`beforetoggle`,t),Yf(`toggle`,t)),r.onScroll!=null&&Yf(`scroll`,t),r.onScrollEnd!=null&&Yf(`scrollend`,t),r.onClick!=null&&(t.onclick=_n),t=!0):t=!1,t||oa(e,!0)}function ca(e){for(ta=e.return;ta;)switch(ta.tag){case 5:case 31:case 13:ia=!1;return;case 27:case 3:ia=!0;return;default:ta=ta.return}}function la(e){if(e!==ta)return!1;if(!B)return ca(e),B=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Sp(e.type,e.memoizedProps)),n=!n),n&&na&&oa(e),ca(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));na=bm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));na=bm(e)}else t===27?(t=na,jp(e.type)?(e=ym,ym=null,na=e):na=t):na=ta?vm(e.stateNode.nextSibling):null;return!0}function ua(){na=ta=null,B=!1}function da(){var e=ra;return e!==null&&(vd===null?vd=e:vd.push.apply(vd,e),ra=null),e}function fa(e){ra===null?ra=[e]:ra.push(e)}var pa=ge(null),ma=null,ha=null;function ga(e,t,n){ve(pa,t._currentValue),t._currentValue=n}function _a(e){e._currentValue=pa.current,_e(pa)}function va(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ya(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),va(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),va(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),va(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ba(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;zr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Se.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[gh]:e.push(gh))}a=a.return}return e!==null&&ya(t,e,n,r),t.flags|=262144,e!==null}function xa(e){for(e=e.firstContext;e!==null;){if(!zr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Sa(e){ma=e,ha=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ca(e){return Ta(ma,e)}function wa(e,t){return ma===null&&Sa(e),Ta(e,t)}function Ta(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ha===null){if(e===null)throw Error(i(308));ha=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ha=ha.next=t;return n}var Ea=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Da=t.unstable_scheduleCallback,Oa=t.unstable_NormalPriority,ka={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Aa(){return{controller:new Ea,data:new Map,refCount:0}}function ja(e){e.refCount--,e.refCount===0&&Da(Oa,function(){e.controller.abort()})}function Ma(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Na=null;function Pa(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Fa=null,Ia=0,La=0,Ra=null;function za(e,t){if(Fa===null){var n=Fa=[];Ia=0,La=Vf(),Ra={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ia++,t.then(Ba,Ba),t}function Ba(){if(--Ia===0&&(Na=null,Fa!==null)){Ra!==null&&(Ra.status=`fulfilled`);var e=Fa;Fa=null,La=0,Ra=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Va(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ha=I.S;I.S=function(e,t){if(xd=ze(),typeof t==`object`&&t&&typeof t.then==`function`&&za(e,t),Na!==null)for(var n=Df;n!==null;)Ma(n,Na),n=n.next;if(n=e.types,n!==null){for(var r=Df;r!==null;)Ma(r,n),r=r.next;if(La!==0){r=Na,r===null&&(r=Na=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ha!==null&&Ha(e,t)};var Ua=ge(null);function Wa(){var e=Ua.current;return e===null?rd.pooledCache:e}function Ga(e,t){t===null?ve(Ua,Ua.current):ve(Ua,t.pool)}function Ka(){var e=Wa();return e===null?null:{parent:ka._currentValue,pool:e}}var qa=Error(i(460)),Ja=Error(i(474)),Ya=Error(i(542)),Xa={then:function(){}};function Za(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Qa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(_n,_n),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,no(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(_n,_n);else{if(e=rd,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,no(e),e}throw eo=t,qa}}function $a(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(eo=e,qa):e}}var eo=null;function to(){if(eo===null)throw Error(i(459));var e=eo;return eo=null,e}function no(e){if(e===qa||e===Ya)throw Error(i(483))}var ro=null,io=0;function ao(e){var t=io;return io+=1,ro===null&&(ro=[]),Qa(ro,e,t)}function oo(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function so(e,t){throw t.$$typeof===E?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function co(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Mi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Ii(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===k?(e=d(e,t,n.props.children,r,n.key),oo(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ne&&$a(i)===t.type)?(t=a(t,n.props),oo(t,n),t.return=e,t):(t=Pi(n.type,n.key,n.props,null,e.mode,r),oo(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Ri(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Fi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Ii(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case D:return n=Pi(t.type,t.key,t.props,null,e.mode,n),oo(n,t),n.return=e,n;case O:return t=Ri(t,e.mode,n),t.return=e,t;case ne:return t=$a(t),f(e,t,n)}if(fe(t)||le(t))return t=Fi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ao(t),n);if(t.$$typeof===N)return f(e,wa(e,t),n);so(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case D:return n.key===i?l(e,t,n,r):null;case O:return n.key===i?u(e,t,n,r):null;case ne:return n=$a(n),p(e,t,n,r)}if(fe(n)||le(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ao(n),r);if(n.$$typeof===N)return p(e,t,wa(e,n),r);so(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case D:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case O:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ne:return r=$a(r),m(e,t,n,r,i)}if(fe(r)||le(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ao(r),i);if(r.$$typeof===N)return m(e,t,n,wa(t,r),i);so(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),B&&Xi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return B&&Xi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),B&&Xi(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),B&&Xi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return B&&Xi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),B&&Xi(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===k&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case D:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===k){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),oo(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ne&&$a(l)===r.type){n(e,r.sibling),c=a(r,o.props),oo(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===k?(c=Fi(o.props.children,e.mode,c,o.key),oo(c,o),c.return=e,e=c):(c=Pi(o.type,o.key,o.props,null,e.mode,c),oo(c,o),c.return=e,e=c)}return s(e);case O:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Ri(o,e.mode,c),c.return=e,e=c}return s(e);case ne:return o=$a(o),_(e,r,o,c)}if(fe(o))return h(e,r,o,c);if(le(o)){if(l=le(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,ao(o),c);if(o.$$typeof===N)return _(e,r,wa(e,o),c);so(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Ii(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{io=0;var i=_(e,t,n,r);return ro=null,i}catch(t){if(t===qa||t===Ya)throw t;var a=Ai(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var lo=co(!0),uo=co(!1),fo=!1;function po(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function mo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ho(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function go(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,nd&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Di(e),Ei(e,null,n),t}return Ci(e,r,t,n),Di(e)}function _o(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,mt(e,n)}}function vo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var yo=!1;function bo(){if(yo){var e=Ra;if(e!==null)throw e}}function xo(e,t,n,r){yo=!1;var i=e.updateQueue;fo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(id&f)===f:(r&f)===f){f!==0&&f===La&&(yo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=T({},d,f);break a;case 2:fo=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),fd|=o,e.lanes=o,e.memoizedState=d}}function So(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Co(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)So(n[e],t)}var wo=ge(null),To=ge(0);function Eo(e,t){e=ud,ve(To,e),ve(wo,t),ud=e|t.baseLanes}function Do(){ve(To,ud),ve(wo,wo.current)}function Oo(){ud=To.current,_e(wo),_e(To)}var ko=ge(null),Ao=null;function jo(e){var t=e.alternate;ve(Io,Io.current&1),ve(ko,e),Ao===null&&(t===null||wo.current!==null||t.memoizedState!==null)&&(Ao=e)}function Mo(e){ve(Io,Io.current),ve(ko,e),Ao===null&&(Ao=e)}function No(e){e.tag===22?(ve(Io,Io.current),ve(ko,e),Ao===null&&(Ao=e)):Po()}function Po(){ve(Io,Io.current),ve(ko,ko.current)}function Fo(e){_e(ko),Ao===e&&(Ao=null),_e(Io)}var Io=ge(0);function Lo(e,t){ve(ko,ko.current),ve(Io,t)}function Ro(e){_e(Io),_e(ko),Ao===e&&(Ao=null)}function zo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||hm(n)||gm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Bo=0,V=null,Vo=null,Ho=null,Uo=!1,Wo=!1,Go=!1,Ko=0,qo=0,Jo=null,Yo=0;function Xo(){throw Error(i(321))}function Zo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!zr(e[n],t[n]))return!1;return!0}function Qo(e,t,n,r,i,a){return Bo=a,V=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?hc:gc,Go=!1,a=n(r,i),Go=!1,Wo&&(a=es(t,n,r,i)),$o(e),a}function $o(e){I.H=mc;var t=Vo!==null&&Vo.next!==null;if(Bo=0,Ho=Vo=V=null,Uo=!1,qo=0,Jo=null,t)throw Error(i(300));e===null||Nc||(e=e.dependencies,e!==null&&xa(e)&&(Nc=!0))}function es(e,t,n,r){V=e;var a=0;do{if(Wo&&(Jo=null),qo=0,Wo=!1,25<=a)throw Error(i(301));if(a+=1,Ho=Vo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}I.H=_c,o=t(n,r)}while(Wo);return o}function ts(){var e=I.H,t=e.useState()[0];return t=typeof t.then==`function`?cs(t):t,e=e.useState()[0],(Vo===null?null:Vo.memoizedState)!==e&&(V.flags|=1024),t}function ns(){var e=Ko!==0;return Ko=0,e}function rs(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function is(e){if(Uo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Uo=!1}Bo=0,Ho=Vo=V=null,Wo=!1,qo=Ko=0,Jo=null}function as(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ho===null?V.memoizedState=Ho=e:Ho=Ho.next=e,Ho}function os(){if(Vo===null){var e=V.alternate;e=e===null?null:e.memoizedState}else e=Vo.next;var t=Ho===null?V.memoizedState:Ho.next;if(t!==null)Ho=t,Vo=e;else{if(e===null)throw V.alternate===null?Error(i(467)):Error(i(310));Vo=e,e={memoizedState:Vo.memoizedState,baseState:Vo.baseState,baseQueue:Vo.baseQueue,queue:Vo.queue,next:null},Ho===null?V.memoizedState=Ho=e:Ho=Ho.next=e}return Ho}function ss(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function cs(e){var t=qo;return qo+=1,Jo===null&&(Jo=[]),e=Qa(Jo,e,t),t=V,(Ho===null?t.memoizedState:Ho.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?hc:gc),e}function ls(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return cs(e);if(e.$$typeof===se)return;if(e.$$typeof===N)return Ca(e)}throw Error(i(438,String(e)))}function us(e){var t=null,n=V.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=V.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=ss(),V.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ae;return t.index++,n}function ds(e,t){return typeof t==`function`?t(e):t}function fs(e){return ps(os(),Vo,e)}function ps(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Bo&f)===f:(id&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===La&&(d=!0);else if((Bo&p)===p){u=u.next,p===La&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,V.lanes|=p,fd|=p;f=u.action,Go&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,V.lanes|=f,fd|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!zr(o,e.memoizedState)&&(Nc=!0,d&&(n=Ra,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ms(e){var t=os(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);zr(o,t.memoizedState)||(Nc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function hs(e,t,n){var r=V,a=os(),o=B;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!zr((Vo||a).memoizedState,n);if(s&&(a.memoizedState=n,Nc=!0),a=a.queue,Bs(vs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Ho!==null&&!!(Ho.memoizedState.tag&1),Fs(e?9:8,{destroy:void 0},_s.bind(null,r,a,n,t),null),e){if(r.flags|=2048,rd===null)throw Error(i(349));o||Bo&127||gs(r,t,n)}return n}function gs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=V.updateQueue,t===null?(t=ss(),V.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function _s(e,t,n,r){t.value=n,t.getSnapshot=r,ys(t)&&bs(e)}function vs(e,t,n){return n(function(){ys(t)&&bs(e)})}function ys(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!zr(e,n)}catch{return!0}}function bs(e){var t=Ti(e,2);t!==null&&Bd(t,e,2)}function xs(e){var t=as();if(typeof e==`function`){var n=e;if(e=n(),Go){Xe(!0);try{n()}finally{Xe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:e},t}function Ss(e,t,n,r){return e.baseState=n,ps(e,Vo,typeof r==`function`?r:ds)}function Cs(e,t,n,r,a){if(dc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};I.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,ws(t,o)):(o.next=n.next,t.pending=n.next=o)}}function ws(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=I.T,o={};o.types=a===null?null:a.types,I.T=o;try{var s=n(i,r),c=I.S;c!==null&&c(o,s),Ts(e,t,s)}catch(n){Ds(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),I.T=a}}else try{a=n(i,r),Ts(e,t,a)}catch(n){Ds(e,t,n)}}function Ts(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Es(e,t,n)},function(n){return Ds(e,t,n)}):Es(e,t,n)}function Es(e,t,n){t.status=`fulfilled`,t.value=n,Os(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,ws(e,n)))}function Ds(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Os(t),t=t.next;while(t!==r)}e.action=null}function Os(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ks(e,t){return t}function As(e,t){if(B){var n=rd.formState;if(n!==null){a:{var r=V;if(B){if(na){b:{for(var i=na,a=ia;i.nodeType!==8;)if(!a||(i=vm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){na=vm(i.nextSibling),r=i.data===`F!`;break a}}oa(r)}r=!1}r&&(t=n[0])}}return n=as(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ks,lastRenderedState:t},n.queue=r,n=cc.bind(null,V,r),r.dispatch=n,r=xs(!1),a=uc.bind(null,V,!1,r.queue),r=as(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Cs.bind(null,V,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function js(e){return Ms(os(),Vo,e)}function Ms(e,t,n){if(t=ps(e,t,ks)[0],e=fs(ds)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=cs(t)}catch(e){throw e===qa?Ya:e}else r=t;t=os();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(V.flags|=2048,Fs(9,{destroy:void 0},Ns.bind(null,i,n),null)),[r,a,e]}function Ns(e,t){e.action=t}function Ps(e){var t=os(),n=Vo;if(n!==null)return Ms(t,n,e);os(),t=t.memoizedState,n=os();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Fs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=V.updateQueue,t===null&&(t=ss(),V.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Is(){return os().memoizedState}function Ls(e,t,n,r){var i=as();V.flags|=e,i.memoizedState=Fs(1|t,{destroy:void 0},n,r===void 0?null:r)}function Rs(e,t,n,r){var i=os();r=r===void 0?null:r;var a=i.memoizedState.inst;Vo!==null&&r!==null&&Zo(r,Vo.memoizedState.deps)?i.memoizedState=Fs(t,a,n,r):(V.flags|=e,i.memoizedState=Fs(1|t,a,n,r))}function zs(e,t){Ls(8390656,8,e,t)}function Bs(e,t){Rs(2048,8,e,t)}function Vs(e){V.flags|=4;var t=V.updateQueue;if(t===null)t=ss(),V.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Hs(e){var t=os().memoizedState;return Vs({ref:t,nextImpl:e}),function(){if(nd&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Us(e,t){return Rs(4,2,e,t)}function Ws(e,t){return Rs(4,4,e,t)}function Gs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ks(e,t,n){n=n==null?null:n.concat([e]),Rs(4,4,Gs.bind(null,t,e),n)}function qs(){}function Js(e,t){var n=os();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Zo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ys(e,t){var n=os();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Zo(t,r[1]))return r[0];if(r=e(),Go){Xe(!0);try{e()}finally{Xe(!1)}}return n.memoizedState=[r,t],r}function Xs(e,t,n){return n===void 0||Bo&1073741824&&!(id&261930)?e.memoizedState=t:(e.memoizedState=n,e=Rd(),V.lanes|=e,fd|=e,n)}function Zs(e,t,n,r){return zr(n,t)?n:wo.current===null?!(Bo&106)||Bo&1073741824&&!(id&261930)?(Nc=!0,e.memoizedState=n):(e=Rd(),V.lanes|=e,fd|=e,t):(e=Xs(e,n,r),zr(e,t)||(Nc=!0),e)}function Qs(e,t,n,r,i){var a=L.p;L.p=a!==0&&8>a?a:8;var o=I.T,s={};s.types=o===null?null:o.types,I.T=s,uc(e,!1,t,n);try{var c=i(),l=I.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?lc(e,t,Va(c,r),Ld(e)):lc(e,t,r,Ld(e))}catch(n){lc(e,t,{then:function(){},status:`rejected`,reason:n},Ld())}finally{L.p=a,o!==null&&s.types!==null&&(o.types=s.types),I.T=o}}function $s(){}function ec(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=tc(e).queue;Qs(e,a,t,pe,n===null?$s:function(){return nc(e),n(r)})}function tc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:pe,baseState:pe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:pe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function nc(e){var t=tc(e);t.next===null&&(t=e.alternate.memoizedState),lc(e,t.next.queue,{},Ld())}function rc(){return Ca(gh)}function ic(){return os().memoizedState}function ac(){return os().memoizedState}function oc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Ld();e=ho(n);var r=go(t,e,n);r!==null&&(Bd(r,t,n),_o(r,t,n)),t={cache:Aa()},e.payload=t;return}t=t.return}}function sc(e,t,n){var r=Ld();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},dc(e)?fc(t,n):(n=wi(e,t,n,r),n!==null&&(Bd(n,e,r),pc(n,t,r)))}function cc(e,t,n){lc(e,t,n,Ld())}function lc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(dc(e))fc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,zr(s,o))return Ci(e,t,i,0),rd===null&&Si(),!1}catch{}if(n=wi(e,t,i,r),n!==null)return Bd(n,e,r),pc(n,t,r),!0}return!1}function uc(e,t,n,r){if(r={lane:2,revertLane:Vf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},dc(e)){if(t)throw Error(i(479))}else t=wi(e,n,r,2),t!==null&&Bd(t,e,2)}function dc(e){var t=e.alternate;return e===V||t!==null&&t===V}function fc(e,t){Wo=Uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function pc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,mt(e,n)}}var mc={readContext:Ca,use:ls,useCallback:Xo,useContext:Xo,useEffect:Xo,useImperativeHandle:Xo,useLayoutEffect:Xo,useInsertionEffect:Xo,useMemo:Xo,useReducer:Xo,useRef:Xo,useState:Xo,useDebugValue:Xo,useDeferredValue:Xo,useTransition:Xo,useSyncExternalStore:Xo,useId:Xo,useHostTransitionStatus:Xo,useFormState:Xo,useActionState:Xo,useOptimistic:Xo,useMemoCache:Xo,useCacheRefresh:Xo,useEffectEvent:Xo},hc={readContext:Ca,use:ls,useCallback:function(e,t){return as().memoizedState=[e,t===void 0?null:t],e},useContext:Ca,useEffect:zs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Ls(4194308,4,Gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ls(4194308,4,e,t)},useInsertionEffect:function(e,t){Ls(4,2,e,t)},useMemo:function(e,t){var n=as();t=t===void 0?null:t;var r=e();if(Go){Xe(!0);try{e()}finally{Xe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=as();if(n!==void 0){var i=n(t);if(Go){Xe(!0);try{n(t)}finally{Xe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=sc.bind(null,V,e),[r.memoizedState,e]},useRef:function(e){var t=as();return e={current:e},t.memoizedState=e},useState:function(e){e=xs(e);var t=e.queue,n=cc.bind(null,V,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:qs,useDeferredValue:function(e,t){return Xs(as(),e,t)},useTransition:function(){var e=xs(!1);return e=Qs.bind(null,V,e.queue,!0,!1),as().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=V,a=as();if(B){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),rd===null)throw Error(i(349));id&127||gs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,zs(vs.bind(null,r,o,e),[e]),r.flags|=2048,Fs(9,{destroy:void 0},_s.bind(null,r,o,n,t),null),n},useId:function(){var e=as(),t=rd.identifierPrefix;if(B){var n=Yi,r=Ji;n=(r&~(1<<32-Ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Ko++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Yo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:rc,useFormState:As,useActionState:As,useOptimistic:function(e){var t=as();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=uc.bind(null,V,!0,n),n.dispatch=t,[e,t]},useMemoCache:us,useCacheRefresh:function(){return as().memoizedState=oc.bind(null,V)},useEffectEvent:function(e){var t=as(),n={impl:e};return t.memoizedState=n,function(){if(nd&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},gc={readContext:Ca,use:ls,useCallback:Js,useContext:Ca,useEffect:Bs,useImperativeHandle:Ks,useInsertionEffect:Us,useLayoutEffect:Ws,useMemo:Ys,useReducer:fs,useRef:Is,useState:function(){return fs(ds)},useDebugValue:qs,useDeferredValue:function(e,t){return Zs(os(),Vo.memoizedState,e,t)},useTransition:function(){var e=fs(ds)[0],t=os().memoizedState;return[typeof e==`boolean`?e:cs(e),t]},useSyncExternalStore:hs,useId:ic,useHostTransitionStatus:rc,useFormState:js,useActionState:js,useOptimistic:function(e,t){return Ss(os(),Vo,e,t)},useMemoCache:us,useCacheRefresh:ac,useEffectEvent:Hs},_c={readContext:Ca,use:ls,useCallback:Js,useContext:Ca,useEffect:Bs,useImperativeHandle:Ks,useInsertionEffect:Us,useLayoutEffect:Ws,useMemo:Ys,useReducer:ms,useRef:Is,useState:function(){return ms(ds)},useDebugValue:qs,useDeferredValue:function(e,t){var n=os();return Vo===null?Xs(n,e,t):Zs(n,Vo.memoizedState,e,t)},useTransition:function(){var e=ms(ds)[0],t=os().memoizedState;return[typeof e==`boolean`?e:cs(e),t]},useSyncExternalStore:hs,useId:ic,useHostTransitionStatus:rc,useFormState:Ps,useActionState:Ps,useOptimistic:function(e,t){var n=os();return Vo===null?(n.baseState=e,[e,n.queue.dispatch]):Ss(n,Vo,e,t)},useMemoCache:us,useCacheRefresh:ac,useEffectEvent:Hs};function vc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:T({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var yc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ld(),i=ho(r);i.payload=t,n!=null&&(i.callback=n),t=go(e,i,r),t!==null&&(Bd(t,e,r),_o(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ld(),i=ho(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=go(e,i,r),t!==null&&(Bd(t,e,r),_o(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ld(),r=ho(n);r.tag=2,t!=null&&(r.callback=t),t=go(e,r,n),t!==null&&(Bd(t,e,n),_o(t,e,n))}};function bc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Br(n,r)||!Br(i,a):!0}function xc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&yc.enqueueReplaceState(t,t.state,null)}function Sc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=T({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Cc(e){vi(e)}function wc(e){console.error(e)}function Tc(e){vi(e)}function Ec(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Dc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Oc(e,t,n){return n=ho(n),n.tag=3,n.payload={element:null},n.callback=function(){Ec(e,t)},n}function kc(e){return e=ho(e),e.tag=3,e}function Ac(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Dc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Dc(t,n,r),typeof i!=`function`&&(wd===null?wd=new Set([this]):wd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function jc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ba(t,n,a,!0),n=ko.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Ao===null?Qd():n.alternate===null&&dd===0&&(dd=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Xa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),xf(e,r,a)),!1;case 22:return n.flags|=65536,r===Xa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),xf(e,r,a)),!1}throw Error(i(435,n.tag))}return xf(e,r,a),Qd(),!1}if(B)return t=ko.current,t===null?(r!==aa&&(t=Error(i(423),{cause:r}),fa(Bi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Bi(r,n),a=Oc(e.stateNode,r,a),vo(e,a),dd!==4&&(dd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==aa&&(e=Error(i(422),{cause:r}),fa(Bi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Bi(o,n),_d===null?_d=[o]:_d.push(o),dd!==4&&(dd=2),t===null)return!0;r=Bi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Oc(n.stateNode,r,e),vo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(wd===null||!wd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=kc(a),Ac(a,e,n,r),vo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Mc=Error(i(461)),Nc=!1;function Pc(e,t,n,r){t.child=e===null?uo(t,null,n,r):lo(t,e.child,n,r)}function Fc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Sa(t),r=Qo(e,t,n,o,a,i),s=ns(),e!==null&&!Nc?(rs(e,t,i),ll(e,t,i)):(B&&s&&Qi(t),t.flags|=1,Pc(e,t,r,i),t.child)}function Ic(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ji(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Lc(e,t,a,r,i)):(e=Pi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!ul(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Br:n,n(o,r)&&e.ref===t.ref)return ll(e,t,i)}return t.flags|=1,e=Mi(a,r),e.ref=t.ref,e.return=t,t.child=e}function Lc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Br(a,r)&&e.ref===t.ref){if(Nc=!1,t.pendingProps=r=a,ul(e,i))e.flags&131072&&(Nc=!0);else return t.lanes=e.lanes,ll(e,t,i)}}return Gc(e,t,n,r,i)}function Rc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Bc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ga(t,a===null?null:a.cachePool),a===null?Do():Eo(t,a),No(t);else return r=t.lanes=536870912,Bc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ga(t,null),Do(),Po()):(Ga(t,a.cachePool),Eo(t,a),Po(),t.memoizedState=null);return Pc(e,t,i,n),t.child}function zc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Bc(e,t,n,r,i){var a=Wa();return a=a===null?null:{parent:ka._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ga(t,null),Do(),No(t),e!==null&&ba(e,t,r,!0),t.childLanes=i,null}function Vc(e,t){return t=el({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Hc(e,t,n){return lo(t,e.child,null,n),e=Vc(t,t.pendingProps),e.flags|=2,Fo(t),t.memoizedState=null,e}function Uc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(B){if(r.mode===`hidden`)return e=Vc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},zc(null,e);if(Mo(t),(e=na)?(e=mm(e,ia),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:qi===null?null:{id:Ji,overflow:Yi},retryLane:536870912,hydrationErrors:null},n=Li(e),n.return=t,t.child=n,ta=t,na=null)):e=null,e===null)throw oa(t);return t.lanes=536870912,null}return Vc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Mo(t),a){if(t.flags&256)t.flags&=-257,t=Hc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Nc||ba(e,t,n,!1),a=(n&e.childLanes)!==0,Nc||a){if(wo.current===null){if(r=rd,r!==null&&(s=ht(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Ti(e,s),Bd(r,e,s),Mc;Qd()}t=Hc(e,t,n)}else e=o.treeContext,na=vm(s.nextSibling),ta=t,B=!0,ra=null,ia=!1,e!==null&&ea(t,e),t=Vc(t,r),t.flags|=134221824;return t}return e=Mi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Wc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Gc(e,t,n,r,i){return Sa(t),n=Qo(e,t,n,r,void 0,i),r=ns(),e!==null&&!Nc?(rs(e,t,i),ll(e,t,i)):(B&&r&&Qi(t),t.flags|=1,Pc(e,t,n,i),t.child)}function Kc(e,t,n,r,i,a){return Sa(t),t.updateQueue=null,n=es(t,r,n,i),$o(e),r=ns(),e!==null&&!Nc?(rs(e,t,a),ll(e,t,a)):(B&&r&&Qi(t),t.flags|=1,Pc(e,t,n,a),t.child)}function qc(e,t,n,r,i){if(Sa(t),t.stateNode===null){var a=Oi,o=n.contextType;typeof o==`object`&&o&&(a=Ca(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=yc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},po(t),o=n.contextType,a.context=typeof o==`object`&&o?Ca(o):Oi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(vc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&yc.enqueueReplaceState(a,a.state,null),xo(t,r,a,i),bo(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Sc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Oi,typeof u==`object`&&u&&(o=Ca(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&xc(t,a,r,o),fo=!1;var f=t.memoizedState;a.state=f,xo(t,r,a,i),bo(),l=t.memoizedState,s||f!==l||fo?(typeof d==`function`&&(vc(t,n,d,r),l=t.memoizedState),(c=fo||bc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,mo(e,t),o=t.memoizedProps,u=Sc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Oi,typeof l==`object`&&l&&(c=Ca(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&xc(t,a,r,c),fo=!1,f=t.memoizedState,a.state=f,xo(t,r,a,i),bo();var p=t.memoizedState;o!==d||f!==p||fo||e!==null&&e.dependencies!==null&&xa(e.dependencies)?(typeof s==`function`&&(vc(t,n,s,r),p=t.memoizedState),(u=fo||bc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&xa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Wc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=lo(t,e.child,null,i),t.child=lo(t,null,n,i)):Pc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=ll(e,t,i),e}function Jc(e,t,n,r){return ua(),t.flags|=256,Pc(e,t,n,r),t.child}var Yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xc(e){return{baseLanes:e,cachePool:Ka()}}function Zc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=hd),e}function Qc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Io.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(B){if(i?jo(t):Po(),(e=na)?(e=mm(e,ia),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:qi===null?null:{id:Ji,overflow:Yi},retryLane:536870912,hydrationErrors:null},n=Li(e),n.return=t,t.child=n,ta=t,na=null)):e=null,e===null)throw oa(t);return t.lanes=gm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Po(),i=t.mode,a=el({mode:`hidden`,children:a},i),r=Fi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Xc(n),r.childLanes=Zc(e,o,n),t.memoizedState=Yc,zc(null,r)):(jo(t),$c(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return nl(e,t,a,o,r,c,s,n)}return i?(Po(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Mi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Fi(i,a,n,null),i.flags|=2):i=Mi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,zc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Xc(n):(a=i.cachePool,a===null?a=Ka():(s=ka._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Zc(e,o,n),t.memoizedState=Yc,zc(e.child,r)):(jo(t),n=e.child,e=n.sibling,n=Mi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function $c(e,t){return t=el({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function el(e,t){return e=Ai(22,e,null,t),e.lanes=0,e}function tl(e,t,n){return lo(t,e.child,null,n),e=$c(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function nl(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(jo(t),t.flags&=-257,tl(e,t,c)):t.memoizedState===null?(Po(),o=a.fallback,s=t.mode,a=el({mode:`visible`,children:a.children},s),o=Fi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,lo(t,e.child,null,c),a=t.child,a.memoizedState=Xc(c),a.childLanes=Zc(e,r,c),t.memoizedState=Yc,zc(null,a)):(Po(),t.child=e.child,t.flags|=128,null);if(jo(t),gm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,fa({value:a,source:null,stack:null})),tl(e,t,c)}if(Nc||ba(e,t,c,!1),r=(c&e.childLanes)!==0,Nc||r){if(wo.current!==null)return tl(e,t,c);if(r=rd,r!==null&&(a=ht(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Ti(e,a),Bd(r,e,a),Mc;return hm(o)||Qd(),tl(e,t,c)}return hm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,na=vm(o.nextSibling),ta=t,B=!0,ra=null,ia=!1,e!==null&&ea(t,e),t=$c(t,a.children),t.flags|=134221824,t)}function rl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),va(e.return,t,n)}function il(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&zo(n)===null&&(t=e),e=e.sibling}return t}function al(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function ol(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function sl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Io.current;if(t.flags&128)return Lo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Lo(t,o),i===`backwards`&&e!==null?(ol(e),Pc(e,t,r,n),ol(e)):Pc(e,t,r,n),r=B?Wi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rl(e,n,t);else if(e.tag===19)rl(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=il(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,ol(t)),al(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&zo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}al(t,!0,n,null,a,r);break;case`together`:al(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=il(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),al(t,!1,i,n,a,r)}return t.child}function cl(e,t,n){var r=t.pendingProps;return ga(t,t.type,r.value),Pc(e,t,r.children,n),t.child}function ll(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),fd|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(ba(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Mi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Mi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ul(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&xa(e)))}function dl(e,t,n){switch(t.tag){case 3:Ce(t,t.stateNode.containerInfo),ga(t,ka,e.memoizedState.cache),ua();break;case 27:case 5:Te(t);break;case 4:Ce(t,t.stateNode.containerInfo);break;case 10:ga(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Mo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return jo(t),t.flags|=128,null;r=ba(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Qc(e,t,n):(jo(t),e=ll(e,t,n),e===null?null:e.sibling)}jo(t);break;case 19:if(t.flags&128)return sl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(ba(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return sl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Lo(t,Io.current),r)break;return null;case 22:return t.lanes=0,Rc(e,t,n,t.pendingProps);case 24:ga(t,ka,e.memoizedState.cache)}return ll(e,t,n)}function fl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Nc=!0;else{if(!ul(e,n)&&!(t.flags&128))return Nc=!1,dl(e,t,n);Nc=!!(e.flags&131072)}}else Nc=!1,B&&t.flags&1048576&&Zi(t,Wi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=$a(t.elementType),t.type=e,typeof e==`function`)ji(e)?(r=Sc(e,r),t.tag=1,t=qc(null,t,e,r,n)):(t.tag=0,t=Gc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ee){t.tag=11,t=Fc(null,t,e,r,n);break a}if(a===te){t.tag=14,t=Ic(null,t,e,r,n);break a}if(a===N){t.tag=10,t.type=e,t=cl(null,t,n);break a}}throw t=de(e)||e,Error(i(306,t,``))}}return t;case 0:return Gc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Sc(r,t.pendingProps),qc(e,t,r,a,n);case 3:a:{if(Ce(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,mo(e,t),xo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ga(t,ka,r),r!==o.cache&&ya(t,[ka],n,!0),bo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Jc(e,t,r,n);break a}if(r!==a){a=Bi(Error(i(424)),t),fa(a),t=Jc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(na=vm(e.firstChild),ta=t,B=!0,ra=null,ia=!0,n=uo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ua(),r===a){t=ll(e,t,n);break a}Pc(e,t,r,n)}t=t.child}return t;case 26:return Wc(e,t),e===null?(n=Um(t.type,null,t.pendingProps,null))?t.memoizedState=n:B||(t.stateNode=xp(t.type,t.pendingProps,xe.current,t)):t.memoizedState=Um(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Te(t),e===null&&B&&(r=t.stateNode=wm(t.type,t.pendingProps,xe.current),ta=t,ia=!0,a=na,jp(t.type)?(ym=a,na=vm(r.firstChild)):na=a),Pc(e,t,t.pendingProps.children,n),Wc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&B&&((a=r=na)&&(r=fm(r,t.type,t.pendingProps,ia),r===null?a=!1:(t.stateNode=r,ta=t,na=vm(r.firstChild),ia=!1,a=!0)),a||oa(t)),Te(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Sp(a,o)?r=null:s!==null&&Sp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Qo(e,t,ts,null,null,n),gh._currentValue=a),Wc(e,t),Pc(e,t,r,n),t.child;case 6:return e===null&&B&&((e=n=na)&&(n=pm(n,t.pendingProps,ia),n===null?e=!1:(t.stateNode=n,ta=t,na=null,e=!0)),e||oa(t)),null;case 13:return Qc(e,t,n);case 4:return Ce(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=lo(t,null,r,n):Pc(e,t,r,n),t.child;case 11:return Fc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Wc(e,t),Pc(e,t,r,n),t.child;case 8:return Pc(e,t,t.pendingProps.children,n),t.child;case 12:return Pc(e,t,t.pendingProps.children,n),t.child;case 10:return cl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Sa(t),a=Ca(a),r=r(a),t.flags|=1,Pc(e,t,r,n),t.child;case 14:return Ic(e,t,t.type,t.pendingProps,n);case 15:return Lc(e,t,t.type,t.pendingProps,n);case 19:return sl(e,t,n);case 31:return Uc(e,t,n);case 22:return Rc(e,t,n,t.pendingProps);case 24:return Sa(t),r=Ca(ka),e===null?(a=Wa(),a===null&&(a=rd,o=Aa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},po(t),ga(t,ka,a)):((e.lanes&n)!==0&&(mo(e,t),xo(t,null,null,n),bo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ga(t,ka,r),r!==a.cache&&ya(t,[ka],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ga(t,ka,r))),Pc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:B&&Qi(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Wc(e,t),Pc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function pl(e){e.flags|=4}function ml(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?rh(t,r):rh(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Yd())e.flags|=8192;else throw eo=Xa,Ja}}else e.flags&=-16777217}function hl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!ih(t)){if(Yd())e.flags|=8192;else throw eo=Xa,Ja}}function gl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:lt(),e.lanes|=t,gd|=t)}function _l(e,t){if(!B)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function vl(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function yl(e,t,n){var r=t.pendingProps;switch($i(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vl(t),null;case 1:return vl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),_a(ka),we(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(la(t)?pl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,da())),vl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(pl(t),o===null?(vl(t),ml(t,a,null,r,n)):(vl(t),hl(t,o))):o?o===e.memoizedState?(vl(t),t.flags&=-16777217):(pl(t),vl(t),hl(t,o)):(e=e.memoizedProps,e!==r&&pl(t),vl(t),ml(t,a,e,r,n)),null;case 27:if(Ee(t),n=xe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return vl(t),t.subtreeFlags&=-33554433,null}e=ye.current,la(t)?sa(t,e):(e=wm(a,r,n),t.stateNode=e,pl(t))}return vl(t),t.subtreeFlags&=-33554433,null;case 5:if(Ee(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return vl(t),t.subtreeFlags&=-33554433,null}if(o=ye.current,la(t))sa(t,o);else{var s=vp(xe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[xt]=t,o[St]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(dp(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&pl(t)}}return vl(t),t.subtreeFlags&=-33554433,ml(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=xe.current,la(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ta,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[xt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||cp(e.nodeValue,n)),e||oa(t,!0)}else e=vp(e).createTextNode(r),e[xt]=t,t.stateNode=e}return vl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=la(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[xt]=t}else ua(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;vl(t),e=!1}else n=da(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Fo(t),t):(Fo(t),null);if(t.flags&128)throw Error(i(558))}return vl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=la(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[xt]=t}else ua(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;vl(t),a=!1}else a=da(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Fo(t),t):(Fo(t),null)}return Fo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),gl(t,t.updateQueue),vl(t),null);case 4:return we(),e===null&&Qf(t.stateNode.containerInfo),t.flags|=67108864,vl(t),null;case 10:return _a(t.type),vl(t),null;case 19:if(Ro(t),r=t.memoizedState,r===null)return vl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)_l(r,!1);else{if(dd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=zo(e),o!==null){for(t.flags|=128,_l(r,!1),e=o.updateQueue,t.updateQueue=e,gl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ni(n,e),n=n.sibling;return Lo(t,Io.current&1|2),B&&Xi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ze()>Sd&&(t.flags|=128,a=!0,_l(r,!1),t.lanes=4194304)}}else{if(!a){if(e=zo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,gl(t,e),_l(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!B)return vl(t),null}else 2*ze()-r.renderingStartTime>Sd&&n!==536870912&&(t.flags|=128,a=!0,_l(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ze(),e.sibling=null,o=Io.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||B?Lo(t,o):(n=o,ve(ko,t),ve(Io,n),Ao===null&&(Ao=t)),B&&Xi(t,r.treeForkCount),e}return vl(t),null;case 22:case 23:return Fo(t),Oo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(vl(t),t.subtreeFlags&6&&(t.flags|=8192)):vl(t),n=t.updateQueue,n!==null&&gl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&_e(Ua),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),_a(ka),vl(t),null;case 25:return null;case 30:return t.flags|=33554432,vl(t),null}throw Error(i(156,t.tag))}function bl(e,t){switch($i(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _a(ka),we(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ee(t),null;case 31:if(t.memoizedState!==null){if(Fo(t),t.alternate===null)throw Error(i(340));ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Fo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ro(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return we(),null;case 10:return _a(t.type),null;case 22:case 23:return Fo(t),Oo(),e!==null&&_e(Ua),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return _a(ka),null;case 25:return null;default:return null}}function xl(e,t){switch($i(t),t.tag){case 3:_a(ka),we();break;case 26:case 27:case 5:Ee(t);break;case 4:we();break;case 31:t.memoizedState!==null&&Fo(t);break;case 13:Fo(t);break;case 19:Ro(t);break;case 10:_a(t.type);break;case 22:case 23:Fo(t),Oo(),e!==null&&_e(Ua);break;case 24:_a(ka)}}function Sl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){bf(t,t.return,e)}}function Cl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){bf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){bf(t,t.return,e)}}function wl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Co(t,n)}catch(t){bf(e,e.return,t)}}}function Tl(e,t,n){n.props=Sc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){bf(e,t,n)}}function El(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=hi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Up(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Wp(e);p(e.child,!1,sm,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){bf(e,t,n)}}function Dl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){bf(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){bf(e,t,n)}else n.current=null}}function Ol(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)lm(e.stateNode,t[n])}function kl(e){for(var t=e.return;t!==null&&(Ml(t)&&lm(e.stateNode,t.stateNode),!jl(t));)t=t.return}function Al(e){for(var t=e.return;t!==null&&(Ml(t)&&um(e.stateNode,t.stateNode),!jl(t));)t=t.return}function jl(e){return e.tag===5||e.tag===3||e.tag===27}function Ml(e){return e&&e.tag===7&&e.stateNode!==null}function Nl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){bf(e,e.return,t)}}function Pl(e,t,n){try{var r=e.stateNode;pp(r,e.type,n,t),r[St]=t}catch(t){bf(e,e.return,t)}}function Fl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&jp(e.type)||e.tag===4}function Il(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Fl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&jp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ll(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=_n)),Ol(e,r),Gt=!0;else if(i!==4&&(i===27&&(Ol(e,r),r=null,jp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Ll(e,t,n,r),e=e.sibling;e!==null;)Ll(e,t,n,r),e=e.sibling}function Rl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Ol(e,r),Gt=!0;else if(i!==4&&(i===27&&(Ol(e,r),r=null,jp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Rl(e,t,n,r),e=e.sibling;e!==null;)Rl(e,t,n,r),e=e.sibling}function zl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);dp(t,r,n),t[xt]=e,t[St]=n}catch(t){bf(e,e.return,t)}}var Bl=!1,Vl=null;function Hl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Bl=!0)}var Ul=null;function Wl(){var e=Ul;return Ul=null,e}var Gl=0;function Kl(e,t,n,r,i){return Gl=0,ql(e.child,t,n,r,i)}function ql(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Lp(o);r.push(s),s.view&&(a=!0)}else a||Lp(o).view&&(a=!0);Bl=!0,Pp(o,Gl===0?t:t+`_`+Gl,n),Gl++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||ql(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function Jl(e,t){for(;e!==null;)e.tag===5?Fp(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||Jl(e.child,t),e=e.sibling}function Yl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Yl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=_i(t.default,t.share),t!==`none`&&(Kl(e,n,t,null,!1)||Jl(e.child,!1))}e=e.sibling}}function Xl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=hi(r,n),a=_i(r.default,n.paired?r.share:r.enter);a===`none`?Yl(e):Kl(e,i,a,null,!1)?(Yl(e),n.paired||t||zd(e,r.onEnter)):Jl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Xl(e,t),e=e.sibling;else Yl(e)}function Zl(e){if(Vl!==null&&Vl.size!==0){var t=Vl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=_i(n.default,n.share);if(a!==`none`&&(Kl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,zd(e,n.onShare)):Jl(e.child,!1)),t.delete(r),t.size===0)break}}}Zl(e)}e=e.sibling}}}function Ql(e){if(e.tag===30){var t=e.memoizedProps,n=hi(t,e.stateNode),r=Vl===null?void 0:Vl.get(n),i=_i(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Kl(e,n,i,null,!1)?r===void 0?zd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Vl.delete(n),zd(e,t.onShare)):Jl(e.child,!1)),Vl!==null&&Zl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Ql(e),e=e.sibling;else Vl!==null&&Zl(e)}function $l(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=hi(t,e.stateNode);t=_i(t.default,t.update),e.flags&=-5,t!==`none`&&Kl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&$l(e);e=e.sibling}}function eu(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Jl(e.child,!1))}eu(e)}e=e.sibling}}function tu(e){if(e.tag===30)e.stateNode.paired=null,Jl(e.child,!1),eu(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)tu(e),e=e.sibling;else eu(e)}function nu(e){for(e=e.child;e!==null;)e.tag===30?Jl(e.child,!1):e.subtreeFlags&33554432&&nu(e),e=e.sibling}function ru(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Gl<a.length){var l=a[Gl],u=Lp(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Pp(c,Gl===0?n:n+`_`+Gl,i),s&&e.flags&4||(Ul===null&&(Ul=[]),Ul.push(c,Gl===0?r:r+`_`+Gl,t.memoizedProps)),Gl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:ru(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function iu(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=hi(n,r),a=_i(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Rp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Gl=0,i=ru(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||zd(e,n.onUpdate))}else e.subtreeFlags&33554432&&iu(e,t);e=e.sibling}}var au=!1,ou=!1,su=!1,cu=!1,lu=typeof WeakSet==`function`?WeakSet:Set,uu=null,du=!1,fu=!1,pu=!1,mu=!1;function hu(e,t,n){if(e=e.containerInfo,gp=Th,e=Gr(e),Kr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(_p={focusedElem:e,selectionRange:r},Th=!1,n=(n&335544064)===n,uu=t,t=n?9270:1024;uu!==null;){if(e=uu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Ql(r[a]);if(e.alternate===null&&e.flags&2)n&&Hl(e),gu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Ql(r),gu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Hl(e),gu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,uu=r):(n&&$l(e),gu(n))}}Vl=null}function gu(e){for(;uu!==null;){var t=uu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=Sc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){bf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)dm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:dm(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=hi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=_i(a.default,a.update),a!==`none`&&Kl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,uu=r;break}uu=t.return}}function _u(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Lu(e,n),r&4&&Sl(5,n);break;case 1:if(Lu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){bf(n,n.return,e)}else{var i=Sc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){bf(n,n.return,e)}}}r&64&&wl(n),r&512&&El(n,n.return);break;case 3:if(Lu(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Co(e,t)}catch(e){bf(n,n.return,e)}}break;case 27:t===null&&r&4&&zl(n);case 26:case 5:Lu(e,n),t===null&&r&4&&Nl(n),r&512&&El(n,n.return);break;case 12:Lu(e,n);break;case 31:Lu(e,n),r&4&&Eu(e,n);break;case 13:Lu(e,n),r&4&&Du(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=wf.bind(null,n),_m(e,n))));break;case 22:if(r=n.memoizedState!==null||au,!r){var a=t!==null&&t.memoizedState!==null||ou;t=au,i=ou,au=r,(ou=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),zu(e,n,r)):Lu(e,n),au=t,ou=i}break;case 30:Lu(e,n),r&512&&El(n,n.return);break;case 7:r&512&&El(n,n.return);default:Lu(e,n)}}function vu(e,t){for(e=e.child;e!==null;)yu(e,t),e=e.sibling}function yu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){bf(e,e.return,t)}bu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Gt=!0}catch(t){bf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Np(s,!0):Np(e.stateNode,!1)}catch(t){bf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&vu(e,t);break;default:vu(e,t)}}function bu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:yu(n,r);break a;case 22:n.memoizedState===null&&bu(n,r);break a;default:bu(n,r)}}e=e.sibling}}function xu(e){var t=e.alternate;t!==null&&(e.alternate=null,xu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&At(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Su=null,Cu=!1;function wu(e,t,n){for(n=n.child;n!==null;)Tu(e,t,n),n=n.sibling}function Tu(e,t,n){if(Ye&&typeof Ye.onCommitFiberUnmount==`function`)try{Ye.onCommitFiberUnmount(Je,n)}catch{}switch(n.tag){case 26:ou||Dl(n,t),wu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!ou&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ou||Dl(n,t),Al(n);var r=Su,i=Cu;jp(n.type)&&(Su=n.stateNode,Cu=!1),wu(e,t,n),Tm(n.stateNode,n.type,n.memoizedProps),Su=r,Cu=i;break;case 5:ou||Dl(n,t),Al(n);case 6:if(n.tag===6&&Al(n),r=Su,i=Cu,Su=null,wu(e,t,n),Su=r,Cu=i,Su!==null){if(Cu)try{(Su.nodeType===9?Su.body:Su.nodeName===`HTML`?Su.ownerDocument.body:Su).removeChild(n.stateNode),Gt=!0}catch(e){bf(n,t,e)}else try{Su.removeChild(n.stateNode),Gt=!0}catch(e){bf(n,t,e)}}break;case 18:Su!==null&&(Cu?(e=Su,Mp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Zh(e)):Mp(Su,n.stateNode));break;case 4:r=Su,i=Cu,Su=n.stateNode.containerInfo,Cu=!0,wu(e,t,n),Su=r,Cu=i;break;case 0:case 11:case 14:case 15:Cl(2,n,t),ou||Cl(4,n,t),wu(e,t,n);break;case 1:ou||(Dl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Tl(n,t,r)),wu(e,t,n);break;case 21:wu(e,t,n);break;case 22:ou=(r=ou)||n.memoizedState!==null,wu(e,t,n),ou=r;break;case 30:Dl(n,t),wu(e,t,n);break;case 7:ou||Dl(n,t),wu(e,t,n);break;default:wu(e,t,n)}}function Eu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Zh(e)}catch(e){bf(t,t.return,e)}}}function Du(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Zh(e)}catch(e){bf(t,t.return,e)}}function Ou(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new lu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new lu),t;default:throw Error(i(435,e.tag))}}function ku(e,t){var n=Ou(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Tf.bind(null,e,t);t.then(r,r)}})}function Au(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(jp(l.type)){Su=l.stateNode,Cu=!1;break a}break;case 5:Su=l.stateNode,Cu=!1;break a;case 3:case 4:Su=l.stateNode.containerInfo,Cu=!0;break a}l=l.return}if(Su===null)throw Error(i(160));Tu(s,c,o),Su=null,Cu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Mu(t,e,n),t=t.sibling}var ju=null;function Mu(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Au(t,e,n),Nu(e),a&4&&(Cl(3,e,e.return),Sl(3,e),Cl(5,e,e.return));break;case 1:Au(t,e,n),Nu(e),a&512&&(ou||r===null||Dl(r,r.return)),a&64&&au&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=ju,Au(t,e,n),Nu(e),a&512&&(ou||r===null||Dl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(au)e.stateNode=xp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[Ot]||r[xt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),dp(r,t,n),r[xt]=e,Ft(r),t=r;break a;case`link`:if(o=eh(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),dp(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=eh(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),dp(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[xt]=e,Ft(r),t=r}e.stateNode=t}}else au||th(o,e.type,e.stateNode)}else e.stateNode=W(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Pl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||ou||t.parentNode.removeChild(t)):a.count--,n===null?au||th(o,e.type,e.stateNode):W(o,n,e.memoizedProps))}break;case 27:Au(t,e,n),Nu(e),a&512&&(ou||r===null||Dl(r,r.return)),r!==null&&a&4&&Pl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=su,su=!1,Au(t,e,n),su=o,Nu(e),a&512&&(ou||r===null||Dl(r,r.return)),e.flags&32){t=e.stateNode;try{ln(t,``),Gt=!0}catch(t){bf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Pl(e,t,r===null?t:r.memoizedProps)),a&1024&&(cu=!0);break;case 6:if(Au(t,e,n),Nu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Gt=!0}catch(t){bf(e,e.return,t)}}break;case 3:if(Gt=!1,$m=null,o=ju,ju=km(t.containerInfo),Au(t,e,n),ju=o,Nu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Zh(t.containerInfo)}catch(t){bf(e,e.return,t)}cu&&(cu=!1,Pu(e)),Gt=!1;break;case 4:a=su,su=au,r=Kt(),o=ju,ju=km(e.stateNode.containerInfo),Au(t,e,n),Nu(e),ju=o,Gt&&fu&&(pu=!0),Gt=r,su=a;break;case 12:Au(t,e,n),Nu(e);break;case 31:Au(t,e,n),Nu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ku(e,t)));break;case 13:Au(t,e,n),Nu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(bd=ze()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ku(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=au,l=ou,u=su;au=c||o,su=u||o,ou=l||s,Au(t,e,n),ou=l,su=u,au=c,Nu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||au||ou||(t=s||ou,n=au,r=ou,au=o||au,ou=t,Ru(e,2),au=n,ou=r),!o&&su||vu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,ku(e,n))));break;case 19:Au(t,e,n),Nu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ku(e,t)));break;case 30:a&512&&(ou||r===null||Dl(r,r.return)),a=Kt(),o=fu,s=(n&335544064)===n,c=e.memoizedProps,fu=s&&_i(c.default,c.update)!==`none`,Au(t,e,n),Nu(e),s&&r!==null&&Gt&&(e.flags|=4),fu=o,Gt=a;break;case 21:break;case 7:a&512&&(ou||r===null||Dl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Au(t,e,n),Nu(e)}}function Nu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Fl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Ml(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(jl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Rl(e,Il(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(ln(l,``),n.flags&=-33),Rl(e,Il(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Ll(e,Il(e),u,s);break;default:throw Error(i(161))}}catch(t){bf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Pu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Pu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Th=!0,t.reset(),Th=!1),e=e.sibling}}function Fu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Iu(t,e),t=t.sibling;else iu(t,!1)}function Iu(e,t){var n=e.alternate;if(n===null)Xl(e,!1);else switch(e.tag){case 3:if(mu=du=!1,Wl(),Fu(t,e),!du&&!pu){if(e=Ul,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Fp(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),mu=!0}Ul=null;break;case 5:Fu(t,e);break;case 4:r=du,du=!1,Fu(t,e),du&&(pu=!0),du=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Fu(t,e):Xl(e,!1));break;case 30:r=du,i=Wl(),du=!1,Fu(t,e),du&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=hi(a,o),o=hi(n.memoizedProps,o);var s=_i(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Gl=0,t=ru(e,n,t,o,s,a,!0),Gl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(zd(e,e.memoizedProps.onUpdate),Ul=i):i!==null&&(i.push.apply(i,Ul),Ul=i),du=e.flags&32?!0:r;break;default:Fu(t,e)}}function Lu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)_u(e,t.alternate,t),t=t.sibling}function Ru(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:Cl(4,n,n.return),Ru(n,r);break;case 1:Dl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Tl(n,n.return,i),Ru(n,r);break;case 27:r&2&&Tm(n.stateNode,n.type,n.memoizedProps);case 5:Dl(n,n.return),n.tag!==5&&n.tag!==27||Al(n),Ru(n,r);break;case 6:Al(n);break;case 26:Dl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||ou||i.parentNode.removeChild(i),Ru(n,r);break;case 22:n.memoizedState===null&&Ru(n,r);break;case 30:Dl(n,n.return),Ru(n,r);break;case 7:Dl(n,n.return);default:Ru(n,r)}e=e.sibling}}function zu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:zu(i,a,n),Sl(4,a);break;case 1:if(zu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){bf(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)So(l[i],c)}catch(e){bf(r,r.return,e)}}s&&o&64&&wl(a),El(a,a.return);break;case 27:n&2&&zl(a);case 5:a.tag!==5&&a.tag!==27||kl(a),zu(i,a,n),s&&r===null&&o&4&&Nl(a),El(a,a.return);break;case 6:kl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||au||th(km(c.ownerDocument),a.type,c),zu(i,a,n),s&&r===null&&o&4&&Nl(a),El(a,a.return);break;case 12:zu(i,a,n);break;case 31:zu(i,a,n),s&&o&4&&Eu(i,a);break;case 13:zu(i,a,n),s&&o&4&&Du(i,a);break;case 22:a.memoizedState===null&&zu(i,a,n),El(a,a.return);break;case 30:zu(i,a,n),El(a,a.return);break;case 7:El(a,a.return);default:zu(i,a,n)}t=t.sibling}}function Bu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ja(n))}function Vu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ja(e))}function Hu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Uu(e,t,n,r),t=t.sibling;else i&&nu(t)}function Uu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&tu(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Hu(e,t,n,r),a&2048&&Sl(9,t);break;case 1:Hu(e,t,n,r);break;case 3:Hu(e,t,n,r),i&&mu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&ja(a)));break;case 12:if(a&2048){Hu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){bf(t,t.return,e)}}else Hu(e,t,n,r);break;case 31:Hu(e,t,n,r);break;case 13:Hu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&tu(t),o._visibility&2?Hu(e,t,n,r):(o._visibility|=2,Wu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&tu(s),o._visibility&2?Hu(e,t,n,r):Gu(e,t)),a&2048&&Bu(s,t);break;case 24:Hu(e,t,n,r),a&2048&&Vu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Jl(a.child,!0),Jl(t.child,!0))),Hu(e,t,n,r);break;default:Hu(e,t,n,r)}}function Wu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Wu(a,o,s,c,i),Sl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Wu(a,o,s,c,i)):u._visibility&2?Wu(a,o,s,c,i):Gu(a,o),i&&l&2048&&Bu(o.alternate,o);break;case 24:Wu(a,o,s,c,i),i&&l&2048&&Vu(o.alternate,o);break;default:Wu(a,o,s,c,i)}t=t.sibling}}function Gu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Gu(n,r),i&2048&&Bu(r.alternate,r);break;case 24:Gu(n,r),i&2048&&Vu(r.alternate,r);break;default:Gu(n,r)}t=t.sibling}}var Ku=8192;function qu(e,t,n){if(e.subtreeFlags&Ku)for(e=e.child;e!==null;)Ju(e,t,n),e=e.sibling}function Ju(e,t,n){switch(e.tag){case 26:qu(e,t,n),e.flags&Ku&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&oh(n,e)):sh(n,ju,e.memoizedState,e.memoizedProps));break;case 5:qu(e,t,n),e.flags&Ku&&(e=e.stateNode,(t&335544128)===t&&oh(n,e));break;case 3:case 4:var r=ju;ju=km(e.stateNode.containerInfo),qu(e,t,n),ju=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ku,Ku=16777216,qu(e,t,n),Ku=r):qu(e,t,n));break;case 30:if((e.flags&Ku)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Vl===null&&(Vl=new Map),Vl.set(r,i)}qu(e,t,n);break;default:qu(e,t,n)}}function Yu(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Xu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];uu=r,$u(r,e)}Yu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Zu(e),e=e.sibling}function Zu(e){switch(e.tag){case 0:case 11:case 15:Xu(e),e.flags&2048&&Cl(9,e,e.return);break;case 3:Xu(e);break;case 12:Xu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Qu(e)):Xu(e);break;default:Xu(e)}}function Qu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];uu=r,$u(r,e)}Yu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Cl(8,t,t.return),Qu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Qu(t));break;default:Qu(t)}e=e.sibling}}function $u(e,t){for(;uu!==null;){var n=uu;switch(n.tag){case 0:case 11:case 15:Cl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ja(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,uu=r;else a:for(n=e;uu!==null;){r=uu;var i=r.sibling,a=r.return;if(xu(r),r===n){uu=null;break a}if(i!==null){i.return=a,uu=i;break a}uu=a}}}var ed={getCacheForType:function(e){var t=Ca(ka),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ca(ka).controller.signal}},td=typeof WeakMap==`function`?WeakMap:Map,nd=0,rd=null,H=null,id=0,ad=0,od=null,sd=!1,cd=!1,ld=!1,ud=0,dd=0,fd=0,pd=0,md=0,hd=0,gd=0,_d=null,vd=null,yd=!1,bd=0,xd=0,Sd=1/0,Cd=null,wd=null,Td=0,Ed=null,Dd=null,Od=0,kd=0,Ad=null,jd=null,Md=null,Nd=null,Pd=null,Fd=0,Id=null;function Ld(){return nd&2&&id!==0?id&-id:I.T===null?vt():Vf()}function Rd(){if(hd===0){if(!(id&536870912)||B){var e=nt;nt<<=1,!(nt&3932160)&&(nt=262144),hd=e}else hd=536870912}return e=ko.current,e!==null&&(e.flags|=32),hd}function zd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Up(hi(e.memoizedProps,n))),Nd===null&&(Nd=[]),Nd.push(t.bind(null,r))}}function Bd(e,t,n){(e===rd&&(ad===2||ad===9)||e.cancelPendingCommit!==null)&&(qd(e,0),Wd(e,id,hd,!1)),dt(e,n),nd&2&&e===rd||(e===rd&&(!(nd&2)&&(pd|=n),dd===4&&Wd(e,id,hd,!1)),Nf(e))}function Vd(e,t,n){if(nd&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||ot(e,t),a=r?tf(e,t):$d(e,t,!0),o=r;do{if(a===0){cd&&!r&&Wd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Ud(n))a=$d(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=_d;var l=c.current.memoizedState.isDehydrated;if(l&&(qd(c,s).flags|=256),s=$d(c,s,!1),s!==2&&s!==6){if(ld&&!l){c.errorRecoveryDisabledLanes|=o,pd|=o,a=4;break a}o=vd,vd=a,o!==null&&(vd===null?vd=o:vd.push.apply(vd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){qd(e,0),Wd(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Wd(r,t,hd,!sd);break a;case 2:vd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=bd+300-ze(),10<a)){if(Wd(r,t,hd,!sd),at(r,0,!0)!==0)break a;Od=t,r.timeoutHandle=Tp(Hd.bind(null,r,n,vd,Cd,yd,t,hd,pd,gd,sd,o,`Throttled`,-0,0),a);break a}Hd(r,n,vd,Cd,yd,t,hd,pd,gd,sd,o,null,-0,0)}break}}while(1);Nf(e)}function Hd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:_n},Vl=null,Ju(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=dh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?bd-ze():(a&4194048)===a?xd-ze():0,m=lh(d,m),m!==null)?(Od=a,e.cancelPendingCommit=m(lf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Wd(e,a,o,!l)):lf(e,t,a,n,r,i,o,s,c,l,u,d)}function Ud(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!zr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Wd(e,t,n,r){t=st(e,t),t&=~md,t&=~pd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ze(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&pt(e,n,t)}function Gd(){return nd&6?!0:(Pf(0,!1),!1)}function Kd(){if(H!==null){if(ad===0)var e=H.return;else e=H,ha=ma=null,is(e),ro=null,io=0,e=H;for(;e!==null;)xl(e.alternate,e),e=e.return;H=null}}function qd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,Ep(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Od=0,Kd(),rd=e,H=n=Mi(e.current,null),id=t,ad=0,od=null,sd=!1,cd=ot(e,t),ld=!1,gd=hd=md=pd=fd=dd=0,vd=_d=null,yd=!1,ud=st(e,t),Si(),n}function Jd(e,t){V=null,I.H=mc,t===qa||t===Ya?(t=to(),ad=3):t===Ja?(t=to(),ad=4):ad=t===Mc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,od=t,H===null&&(dd=1,Ec(e,Bi(t,e.current)))}function Yd(){var e=ko.current;return e===null?!0:(id&4194048)===id?Ao===null:(id&62914560)===id||id&536870912?e===Ao:!1}function Xd(){var e=I.H;return I.H=mc,e===null?mc:e}function Zd(){var e=I.A;return I.A=ed,e}function Qd(){dd=4,sd||(id&4194048)!==id&&ko.current!==null||(cd=!0),!(fd&134217727)&&!(pd&134217727)||rd===null||Wd(rd,id,hd,!1)}function $d(e,t,n){var r=nd;nd|=2;var i=Xd(),a=Zd();(rd!==e||id!==t)&&(Cd=null,qd(e,t)),t=!1;var o=dd;a:do try{if(ad!==0&&H!==null){var s=H,c=od;switch(ad){case 8:Kd(),o=6;break a;case 3:case 2:case 9:case 6:ko.current===null&&(t=!0);var l=ad;if(ad=0,od=null,of(e,s,c,l),n&&cd){o=0;break a}break;default:l=ad,ad=0,od=null,of(e,s,c,l)}}ef(),o=dd;break}catch(t){Jd(e,t)}while(1);return t&&e.shellSuspendCounter++,ha=ma=null,nd=r,I.H=i,I.A=a,H===null&&(rd=null,id=0,Si()),o}function ef(){for(;H!==null;)rf(H)}function tf(e,t){var n=nd;nd|=2;var r=Xd(),a=Zd();rd!==e||id!==t?(Cd=null,Sd=ze()+500,qd(e,t)):cd=ot(e,t);a:do try{if(ad!==0&&H!==null){t=H;var o=od;b:switch(ad){case 1:ad=0,od=null,of(e,t,o,1);break;case 2:case 9:if(Za(o)){ad=0,od=null,af(t);break}t=function(){ad!==2&&ad!==9||rd!==e||(ad=7),Nf(e)},o.then(t,t);break a;case 3:ad=7;break a;case 4:ad=5;break a;case 7:Za(o)?(ad=0,od=null,af(t)):(ad=0,od=null,of(e,t,o,7));break;case 5:var s=null;switch(H.tag){case 26:s=H.memoizedState;case 5:case 27:var c=H;if(s?ih(s):c.stateNode.complete){ad=0,od=null;var l=c.sibling;if(l!==null)H=l;else{var u=c.return;u===null?H=null:(H=u,sf(u))}break b}}ad=0,od=null,of(e,t,o,5);break;case 6:ad=0,od=null,of(e,t,o,6);break;case 8:Kd(),dd=6;break a;default:throw Error(i(462))}}nf();break}catch(t){Jd(e,t)}while(1);return ha=ma=null,I.H=r,I.A=a,nd=n,H===null?(rd=null,id=0,Si(),dd):0}function nf(){for(;H!==null&&!Le();)rf(H)}function rf(e){var t=fl(e.alternate,e,ud);e.memoizedProps=e.pendingProps,t===null?sf(e):H=t}function af(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Kc(n,t,t.pendingProps,t.type,void 0,id);break;case 11:t=Kc(n,t,t.pendingProps,t.type.render,t.ref,id);break;case 5:is(t);var r=t;r===ta&&(B?(ca(r),r.tag===5&&r.stateNode!=null&&(na=r.stateNode)):(ca(r),B=!0));default:xl(n,t),t=H=Ni(t,ud),t=fl(n,t,ud)}e.memoizedProps=e.pendingProps,t===null?sf(e):H=t}function of(e,t,n,r){ha=ma=null,is(t),ro=null,io=0;var i=t.return;try{if(jc(e,i,t,n,id)){dd=1,Ec(e,Bi(n,e.current)),H=null;return}}catch(t){if(i!==null)throw H=i,t;dd=1,Ec(e,Bi(n,e.current)),H=null;return}t.flags&32768?(B||r===1?e=!0:cd||id&536870912?e=!1:(sd=e=!0,(r===2||r===9||r===3||r===6)&&(r=ko.current,r!==null&&r.tag===13&&(r.flags|=16384))),cf(t,e)):sf(t)}function sf(e){var t=e;do{if(t.flags&32768){cf(t,sd);return}e=t.return;var n=yl(t.alternate,t,ud);if(n!==null){H=n;return}if(t=t.sibling,t!==null){H=t;return}H=t=e}while(t!==null);dd===0&&(dd=5)}function cf(e,t){do{var n=bl(e.alternate,e);if(n!==null){n.flags&=32767,H=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){H=e;return}H=e=n}while(e!==null);dd=6,H=null}function lf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do _f();while(Td!==0);if(nd&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===rd&&(H=rd=null,id=0),Dd=t,Ed=e,Od=n,Ad=a,jd=r,uf(e,t,n,s,c,l,f)}}function uf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(kd=s,s|=xi,ft(e,n,s,r,i,a),Nd=null,(n&335544064)===n?(Pd=Pa(e),r=10262):(Pd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,Ef(Ue,function(){return vf(),null})):(e.callbackNode=null,e.callbackPriority=0),Bl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=I.T,I.T=null,i=L.p,L.p=2,a=nd,nd|=4;try{hu(e,t,n)}finally{nd=a,L.p=i,I.T=r}}Td=1,Bl?Md=Vp(o,e.containerInfo,Pd,pf,mf,ff,hf,vf,df,null,null):(pf(),mf(),hf())}function df(e){if(Td!==0){var t=Ed.onRecoverableError;t(e,{componentStack:null})}}function ff(){Td===3&&(Td=0,Iu(Dd,Ed),Td=4)}function pf(){if(Td===1){Td=0;var e=Ed,t=Dd,n=Od,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=I.T,I.T=null;var i=L.p;L.p=2;var a=nd;nd|=4;try{fu=pu=!1,Mu(t,e,n),n=_p;var o=Gr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Wr(s.ownerDocument.documentElement,s)){if(c!==null&&Kr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Ur(s,h),v=Ur(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}Th=!!gp,_p=gp=null}finally{nd=a,L.p=i,I.T=r}}e.current=t,Td=2}}function mf(){if(Td===2){Td=0;var e=Ed,t=Dd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=I.T,I.T=null;var r=L.p;L.p=2;var i=nd;nd|=4;try{_u(e,t.alternate,t)}finally{nd=i,L.p=r,I.T=n}}Td=3}}function hf(){if(Td===4||Td===3){Td=0;var e=Md;Md=null,Re();var t=Ed,n=Dd,r=Od,i=jd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?Td=5:(Td=0,Dd=Ed=null,gf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(wd=null),_t(r),n=n.stateNode,Ye&&typeof Ye.onCommitFiberRoot==`function`)try{Ye.onCommitFiberRoot(Je,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=I.T,a=L.p,L.p=2,I.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{I.T=n,L.p=a}}if(i=Nd,o=Pd,Pd=null,i!==null&&(Nd=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);Od&3&&_f(),Nf(t),a=t.pendingLanes,r&261930&&a&42?t===Id?Fd++:(Fd=0,Id=t):(Fd=0,Id=null),Pf(0,!1)}}function gf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ja(t)))}function _f(){return Md!==null&&(Md.skipTransition(),Md=null),pf(),mf(),hf(),vf()}function vf(){if(Td!==5)return!1;var e=Ed,t=kd;kd=0;var n=_t(Od),r=I.T,a=L.p;try{L.p=32>n?32:n,I.T=null,n=Ad,Ad=null;var o=Ed,s=Od;if(Td=0,Dd=Ed=null,Od=0,nd&6)throw Error(i(331));var c=nd;if(nd|=4,Zu(o.current),Uu(o,o.current,s,n),nd=c,Pf(0,!1),Ye&&typeof Ye.onPostCommitFiberRoot==`function`)try{Ye.onPostCommitFiberRoot(Je,o)}catch{}return!0}finally{L.p=a,I.T=r,gf(e,t)}}function yf(e,t,n){t=Bi(n,t),t=Oc(e.stateNode,t,2),e=go(e,t,2),e!==null&&(dt(e,2),Nf(e))}function bf(e,t,n){if(e.tag===3)yf(e,e,n);else for(;t!==null;){if(t.tag===3){yf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(wd===null||!wd.has(r))){e=Bi(n,e),n=kc(2),r=go(t,n,2),r!==null&&(Ac(n,r,t,e),dt(r,2),Nf(r));break}}t=t.return}}function xf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new td;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(ld=!0,i.add(n),e=Sf.bind(null,e,t,n),t.then(e,e))}function Sf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,rd===e&&(id&n)===n&&(dd===4||dd===3&&(id&62914560)===id&&300>ze()-bd?nd&2?md|=n:qd(e,0):md|=n,gd===id&&(gd=0)),Nf(e)}function Cf(e,t){t===0&&(t=lt()),e=Ti(e,t),e!==null&&(dt(e,t),Nf(e))}function wf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Cf(e,n)}function Tf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Cf(e,n)}function Ef(e,t){return Fe(e,t)}var Df=null,Of=null,kf=!1,Af=!1,jf=!1,Mf=0;function Nf(e){e!==Of&&e.next===null&&(Of===null?Df=Of=e:Of=Of.next=e),Af=!0,kf||(kf=!0,Bf())}function Pf(e,t){if(!jf&&Af){jf=!0;do for(var n=!1,r=Df;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ze(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,zf(r,a))}else a=id,a=at(r,r===rd?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ot(r,a)||(n=!0,zf(r,a))}r=r.next}while(n);jf=!1}}function Ff(){If()}function If(){Af=kf=!1;var e=0;Mf!==0&&wp()&&(e=Mf);for(var t=ze(),n=null,r=Df;r!==null;){var i=r.next,a=Lf(r,t);a===0?(r.next=null,n===null?Df=i:n.next=i,i===null&&(Of=n)):(n=r,(e!==0||a&3)&&(Af=!0)),r=i}Td!==0&&Td!==5||Pf(e,!1),Mf!==0&&(Mf=0)}function Lf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ze(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ct(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=rd,n=id,n=at(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(ad===2||ad===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ie(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ot(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ie(r),_t(n)){case 2:case 8:n=He;break;case 32:n=Ue;break;case 268435456:n=Ge;break;default:n=Ue}return r=Rf.bind(null,e),n=Fe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ie(r),e.callbackPriority=2,e.callbackNode=null,2}function Rf(e,t){if(Td!==0&&Td!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(_f()&&e.callbackNode!==n)return null;var r=id;return r=at(e,e===rd?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Vd(e,r,t),Lf(e,ze()),e.callbackNode!=null&&e.callbackNode===n?Rf.bind(null,e):null)}function zf(e,t){if(_f())return null;Vd(e,t,!0)}function Bf(){kp(function(){nd&6?Fe(Ve,Ff):If()})}function Vf(){if(Mf===0){var e=La;e===0&&(e=tt,tt<<=1,!(tt&261888)&&(tt=256)),Mf=e}return Mf}function Hf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:gn(e)}function Uf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Hf((i[St]||null).action),o=r.submitter;o&&(t=(t=o[St]||null)?Hf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Ln(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Mf!==0){var e=new FormData(i,o);ec(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),ec(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Wf=0;Wf<fi.length;Wf++){var Gf=fi[Wf];pi(Gf.toLowerCase(),`on`+(Gf[0].toUpperCase()+Gf.slice(1)))}pi(ii,`onAnimationEnd`),pi(ai,`onAnimationIteration`),pi(oi,`onAnimationStart`),pi(`dblclick`,`onDoubleClick`),pi(`focusin`,`onFocus`),pi(`focusout`,`onBlur`),pi(si,`onTransitionRun`),pi(ci,`onTransitionStart`),pi(li,`onTransitionCancel`),pi(ui,`onTransitionEnd`),Bt(`onMouseEnter`,[`mouseout`,`mouseover`]),Bt(`onMouseLeave`,[`mouseout`,`mouseover`]),Bt(`onPointerEnter`,[`pointerout`,`pointerover`]),Bt(`onPointerLeave`,[`pointerout`,`pointerover`]),zt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),zt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),zt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),zt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),zt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),zt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Kf=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),qf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Kf));function Jf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){vi(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){vi(e)}i.currentTarget=null,a=c}}}}function Yf(e,t){var n=t[wt];n===void 0&&(n=t[wt]=new Set);var r=e+`__bubble`;n.has(r)||($f(t,e,2,!1),n.add(r))}function Xf(e,t,n){var r=0;t&&(r|=4),$f(n,e,r,t)}var Zf=`_reactListening`+Math.random().toString(36).slice(2);function Qf(e){if(!e[Zf]){e[Zf]=!0,Lt.forEach(function(t){t!==`selectionchange`&&(qf.has(t)||Xf(t,!1,e),Xf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Zf]||(t[Zf]=!0,Xf(`selectionchange`,!1,t))}}function $f(e,t,n,r){switch(Mh(t)){case 2:var i=Eh;break;case 8:i=Dh;break;default:i=Oh}n=i.bind(null,t,n,e),i=void 0,!En||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function ep(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=jt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}Cn(function(){var r=a,i=yn(n),s=[];a:{var c=di.get(e);if(c!==void 0){var l=Ln,u=e;switch(e){case`keypress`:if(Mn(n)===0)break a;case`keydown`:case`keyup`:l=tr;break;case`focusin`:u=`focus`,l=Kn;break;case`focusout`:u=`blur`,l=Kn;break;case`beforeblur`:case`afterblur`:l=Kn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Wn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Gn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=ir;break;case ii:case ai:case oi:l=qn;break;case ui:l=ar;break;case`scroll`:case`scrollend`:l=zn;break;case`wheel`:l=or;break;case`copy`:case`cut`:case`paste`:l=Jn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=nr;break;case`submit`:l=rr;break;case`toggle`:case`beforetoggle`:l=sr}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=wn(m,p),g!=null&&d.push(tp(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==vn&&(u=n.relatedTarget||n.fromElement)&&(jt(u)||u[Ct]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?jt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Wn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=nr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Nt(c),h=l==null?u:Nt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,jt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?w(c,l,rp):null,c!==null&&ip(s,u,c,d,!1),l!==null&&f!==null&&ip(s,f,l,d,!0)))}a:{if(c=r?Nt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Dr;else if(xr(c)){if(Or)_=Lr;else{_=Fr;var v=Pr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&pn(r.elementType)&&(_=Dr):_=Ir;if(_&&=_(e,r)){Sr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Nt(r):window,e){case`focusin`:(xr(v)||v.contentEditable===`true`)&&(Jr=v,Yr=r,Xr=null);break;case`focusout`:Xr=Yr=Jr=null;break;case`mousedown`:Zr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Zr=!1,Qr(s,n,i);break;case`selectionchange`:if(qr)break;case`keydown`:case`keyup`:Qr(s,n,i)}var y;if(lr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else _r?hr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(fr&&n.locale!==`ko`&&(_r||b!==`onCompositionStart`?b===`onCompositionEnd`&&_r&&(y=jn()):(On=i,kn=`value`in On?On.value:On.textContent,_r=!0)),v=np(r,b),0<v.length&&(b=new Yn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=gr(n),y!==null&&(b.data=y)))),(y=dr?vr(e,n):yr(e,n))&&(b=np(r,`onBeforeInput`),0<b.length&&(v=new Yn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Uf(s,e,r,n,i)}Jf(s,t)})}function tp(e,t,n){return{instance:e,listener:t,currentTarget:n}}function np(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=wn(e,n),i!=null&&r.unshift(tp(e,i,a)),i=wn(e,t),i!=null&&r.push(tp(e,i,a))),e.tag===3)return r;e=e.return}return[]}function rp(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ip(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=wn(n,a),l!=null&&o.unshift(tp(n,l,c))):i||(l=wn(n,a),l!=null&&o.push(tp(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var ap=/\r\n?/g,op=/\u0000|\uFFFD/g;function sp(e){return(typeof e==`string`?e:``+e).replace(ap,`
9
- `).replace(op,``)}function cp(e,t){return t=sp(t),sp(e)===t}function lp(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||ln(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&ln(e,``+r);else return;break;case`className`:Jt(e,`class`,r);break;case`tabIndex`:Jt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Jt(e,n,r);break;case`style`:fn(e,r,o);return;case`data`:if(t!==`object`){Jt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=gn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&lp(e,t,`name`,a.name,a,null),lp(e,t,`formEncType`,a.formEncType,a,null),lp(e,t,`formMethod`,a.formMethod,a,null),lp(e,t,`formTarget`,a.formTarget,a,null)):(lp(e,t,`encType`,a.encType,a,null),lp(e,t,`method`,a.method,a,null),lp(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=gn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=_n);return;case`onScroll`:r!=null&&Yf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Yf(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=gn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Yf(`beforetoggle`,e),Yf(`toggle`,e),qt(e,`popover`,r);break;case`xlinkActuate`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:qt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=mn.get(n)||n,qt(e,n,r);else return}Gt=!0}function up(e,t,n,r,a,o){switch(n){case`style`:fn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)ln(e,r);else if(typeof r==`number`||typeof r==`bigint`)ln(e,``+r);else return;break;case`onScroll`:r!=null&&Yf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Yf(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=_n);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Rt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[St]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Gt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):qt(e,n,r)}return}Gt=!0}function dp(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Yf(`error`,e),Yf(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:lp(e,t,o,s,n,null)}}a&&lp(e,t,`srcSet`,n.srcSet,n,null),r&&lp(e,t,`src`,n.src,n,null);return;case`input`:Yf(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:lp(e,t,r,d,n,null)}}rn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Yf(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:lp(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&on(e,!!r,n,!0):on(e,!!r,t,!1);return;case`textarea`:for(s in Yf(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:lp(e,t,s,c,n,null)}cn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:lp(e,t,l,r,n,null)}return;case`dialog`:Yf(`beforetoggle`,e),Yf(`toggle`,e),Yf(`cancel`,e),Yf(`close`,e);break;case`iframe`:case`object`:Yf(`load`,e);break;case`video`:case`audio`:for(r=0;r<Kf.length;r++)Yf(Kf[r],e);break;case`image`:Yf(`error`,e),Yf(`load`,e);break;case`details`:Yf(`toggle`,e);break;case`embed`:case`source`:case`link`:Yf(`error`,e),Yf(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:lp(e,t,u,r,n,null)}return;default:if(pn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&up(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&lp(e,t,c,r,n,null))}var fp={};function pp(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||lp(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(Gt=!0),o=m;break;case`name`:m!==f&&(Gt=!0),a=m;break;case`checked`:m!==f&&(Gt=!0),u=m;break;case`defaultChecked`:m!==f&&(Gt=!0),d=m;break;case`value`:m!==f&&(Gt=!0),s=m;break;case`defaultValue`:m!==f&&(Gt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&lp(e,t,p,m,r,f)}}nn(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||lp(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(Gt=!0),p=o;break;case`defaultValue`:o!==l&&(Gt=!0),c=o;break;case`multiple`:o!==l&&(Gt=!0),s=o;default:o!==l&&lp(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?on(e,!!n,n?[]:``,!1):on(e,!!n,t,!0)):on(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:lp(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(Gt=!0),p=a;break;case`defaultValue`:a!==o&&(Gt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&lp(e,t,s,a,r,o)}sn(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:lp(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(Gt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:lp(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&lp(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:lp(e,t,u,p,r,m)}return;default:if(pn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&up(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||up(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&lp(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||lp(e,t,f,p,r,m)}function mp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function hp(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&mp(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&mp(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var gp=null,_p=null;function vp(e){return e.nodeType===9?e:e.ownerDocument}function yp(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function bp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function xp(e,t,n,r){return n=vp(n).createElement(e),n[xt]=r,n[St]=t,dp(n,e,t),Ft(n),n}function Sp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Cp=null;function wp(){var e=window.event;return e&&e.type===`popstate`?e!==Cp&&(Cp=e,!0):(Cp=null,!1)}var Tp=typeof setTimeout==`function`?setTimeout:void 0,Ep=typeof clearTimeout==`function`?clearTimeout:void 0,Dp=typeof Promise==`function`?Promise:void 0,Op=typeof requestAnimationFrame==`function`?requestAnimationFrame:Tp,kp=typeof queueMicrotask==`function`?queueMicrotask:Dp===void 0?Tp:function(e){return Dp.resolve(null).then(e).catch(Ap)};function Ap(e){setTimeout(function(){throw e})}function jp(e){return e===`head`}function Mp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Zh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Em(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Em(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Ot]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Em(e.ownerDocument.body)}n=i}while(n);Zh(t)}function Np(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Pp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Fp(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Ip(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Lp(e){return Ip(e.getBoundingClientRect(),getComputedStyle(e),e)}function Rp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Ip(t,n,e)}function zp(e){return e.documentElement.clientHeight}function Bp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Vp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(zp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=ah(f),u>ch){s.length=o;break}f=new Promise(Bp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Hp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Hp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:T({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Hp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Hp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Up(e){return{name:e,group:new Hp(`group`,e),imagePair:new Hp(`image-pair`,e),old:new Hp(`old`,e),new:new Hp(`new`,e)}}function Wp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Wp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Yp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=qp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),p(this._fragmentFiber.child,!1,Gp,e,s,r)}this._eventListeners=a}};function Gp(e,t,n,r){return v(e).addEventListener(t,n,r),!1}Wp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Yp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=qp(i.optionsOrUseCapture),p(this._fragmentFiber.child,!1,Kp,e,n,i),r.splice(t,1),a!==null&&a()}};function Kp(e,t,n,r){return v(e).removeEventListener(t,n,r),!1}function qp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Jp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Yp(e,t,n,r){if(e.length===0)return-1;r=Jp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Jp(a.optionsOrUseCapture)===r)return i}return-1}Wp.prototype.dispatchEvent=function(e){var t=m(this._fragmentFiber);if(t===null)return!0;t=v(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,qp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,qp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Wp.prototype.focus=function(e){p(this._fragmentFiber.child,!0,Xp,e,void 0,void 0)};function Xp(e,t){return e.tag!==6&&(e=v(e),Sm(e,t))}Wp.prototype.focusLast=function(e){var t=[];p(this._fragmentFiber.child,!0,Zp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Xp(t[n],e);n--);};function Zp(e,t){return t.push(e),!1}Wp.prototype.blur=function(){var e=m(this._fragmentFiber);e!==null&&(e=v(e),e=vp(e).activeElement,e!==null&&p(this._fragmentFiber.child,!1,Qp,e,void 0,void 0))};function Qp(e,t){return e.tag!==6&&(e=v(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Wp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),p(this._fragmentFiber.child,!1,$p,e,void 0,void 0)};function $p(e,t){return e.tag===6||(e=v(e),t.observe(e)),!1}Wp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),p(this._fragmentFiber.child,!1,em,e,void 0,void 0);for(var n=t=0;n<tm.length;n++){var r=tm[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):tm[t++]=r}tm.length=t}};function em(e,t){return e.tag===6||(e=v(e),t.unobserve(e)),!1}var tm=[],nm=!1;function rm(e,t,n){tm.push({fragmentInstance:e,observer:t,instance:n}),nm||(nm=!0,Cm(function(){nm=!1;var e=tm;tm=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Wp.prototype.getClientRects=function(){var e=[];return p(this._fragmentFiber.child,!1,im,e,void 0,void 0),e};function im(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=v(e),t.push.apply(t,e.getClientRects());return!1}Wp.prototype.getRootNode=function(e){var t=m(this._fragmentFiber);return t===null?this:v(t).getRootNode(e)},Wp.prototype.compareDocumentPosition=function(e){var t=m(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];p(this._fragmentFiber.child,!1,Zp,n,void 0,void 0);var r=v(t);if(n.length===0){if(n=r,h(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=g(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=v(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=v(n[0]),i=v(n[n.length-1]);var a=h(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||am(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function am(e,t,n,r,i){var a=jt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=m(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=w(n,a,C),t===null?t=!1:(p(t,!0,x,a,n),a=y,y=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=w(r,a,C),t===null?t=!1:(p(t,!0,S,a,r),a=y,b=y=null,t=a!==null)),t):!1}function om(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Wp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];p(this._fragmentFiber.child,!1,Zp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=g(this._fragmentFiber);if(r=n?r[1]||r[0]||m(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=v(r),om(e,n);return}if(r=v(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=v(a),om(a,n)):v(a).scrollIntoView(e),r+=n?-1:1}};function sm(e,t){return e=v(e),cm(e,t),!1}function cm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function lm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,qp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<tm.length;i++){var a=tm[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(tm[r++]=a)}tm.length=r,n.observe(e)}),cm(e,t))}function um(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,qp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?rm(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function dm(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:dm(n),At(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function fm(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[Ot])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=vm(e.nextSibling),e===null)break}return null}function pm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=vm(e.nextSibling),e===null))return null;return e}function mm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=vm(e.nextSibling),e===null))return null;return e}function hm(e){return e.data===`$?`||e.data===`$~`}function gm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function _m(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function vm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var ym=null;function bm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return vm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function xm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function Sm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function Cm(e){Op(function(){Op(function(t){return e(t)})})}function wm(e,t,n){switch(t=vp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Tm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&lp(e,t,r,null,fp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===_n&&(e.onclick=null),At(e)}function Em(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);At(e)}var U=new Map,Dm=new Set;function km(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var jm=L.d;L.d={f:Mm,r:Nm,D:Im,C:Lm,L:Rm,m:zm,X:Vm,S:Bm,M:Hm};function Mm(){var e=jm.f(),t=Gd();return e||t}function Nm(e){var t=Mt(e);t!==null&&t.tag===5&&t.type===`form`?nc(t):jm.r(e)}var Pm=typeof document>`u`?null:document;function Fm(e,t,n){var r=Pm;if(r&&typeof t==`string`&&t){var i=tn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Dm.has(i)||(Dm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),dp(t,`link`,e),Ft(t),r.head.appendChild(t)))}}function Im(e){jm.D(e),Fm(`dns-prefetch`,e,null)}function Lm(e,t){jm.C(e,t),Fm(`preconnect`,e,t)}function Rm(e,t,n){jm.L(e,t,n);var r=Pm;if(r&&e&&t){var i=`link[rel="preload"][as="`+tn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+tn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+tn(n.imageSizes)+`"]`)):i+=`[href="`+tn(e)+`"]`;var a=i;switch(t){case`style`:a=Wm(e);break;case`script`:a=Jm(e)}if(!(U.has(a)||(e=T({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),U.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Gm(a))||t===`script`&&r.querySelector(Ym(a))))){var o=r.createElement(`link`);dp(o,`link`,e),t===`style`&&(o[kt]=!0,o.onload=o.onerror=function(){It(o)}),Ft(o),r.head.appendChild(o)}}}function zm(e,t){jm.m(e,t);var n=Pm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+tn(r)+`"][href="`+tn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Jm(e)}if(!U.has(a)&&(e=T({rel:`modulepreload`,href:e},t),U.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ym(a)))return}r=n.createElement(`link`),dp(r,`link`,e),Ft(r),n.head.appendChild(r)}}}function Bm(e,t,n){jm.S(e,t,n);var r=Pm;if(r&&e){var i=Pt(r).hoistableStyles,a=Wm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Gm(a)))s.loading=5;else{e=T({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=U.get(a))&&Zm(e,n);var c=o=r.createElement(`link`);Ft(c),dp(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Xm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Vm(e,t){jm.X(e,t);var n=Pm;if(n&&e){var r=Pt(n).hoistableScripts,i=Jm(e),a=r.get(i);a||(a=n.querySelector(Ym(i)),a||(e=T({src:e,async:!0},t),(t=U.get(i))&&Qm(e,t),a=n.createElement(`script`),Ft(a),dp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Hm(e,t){jm.M(e,t);var n=Pm;if(n&&e){var r=Pt(n).hoistableScripts,i=Jm(e),a=r.get(i);a||(a=n.querySelector(Ym(i)),a||(e=T({src:e,async:!0,type:`module`},t),(t=U.get(i))&&Qm(e,t),a=n.createElement(`script`),Ft(a),dp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Um(e,t,n,r){var a=(a=xe.current)?km(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Wm(n.href),t=Pt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Wm(n.href);var o=Pt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Gm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=U.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},U.set(e,o)),qm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Jm(n),t=Pt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Wm(e){return`href="`+tn(e)+`"`}function Gm(e){return`link[rel="stylesheet"][`+e+`]`}function Km(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function qm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[kt]){r.loading=1;return}}else t=e.createElement(`link`),t[kt]=!0,t.onload=t.onerror=It.bind(null,t),dp(t,`link`,n),Ft(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Jm(e){return`[src="`+tn(e)+`"]`}function Ym(e){return`script[async]`+e}function W(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+tn(n.href)+`"]`);if(r)return t.instance=r,Ft(r),r;var a=T({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ft(r),dp(r,`style`,a),Xm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Wm(n.href);var o=e.querySelector(Gm(a));if(o)return t.state.loading|=4,t.instance=o,Ft(o),o;r=Km(n),(a=U.get(a))&&Zm(r,a),o=(e.ownerDocument||e).createElement(`link`),Ft(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),dp(o,`link`,r),t.state.loading|=4,Xm(o,n.precedence,e),t.instance=o;case`script`:return o=Jm(n.src),(a=e.querySelector(Ym(o)))?(t.instance=a,Ft(a),a):(r=n,(a=U.get(o))&&(r=T({},n),Qm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Ft(a),dp(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Xm(r,n.precedence,e));return t.instance}function Xm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Zm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Qm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var $m=null;function eh(e,t,n){if($m===null){var r=new Map,i=$m=new Map;i.set(n,r)}else i=$m,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Ot]||a[xt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function th(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function nh(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function rh(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function ih(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function ah(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function oh(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=ah(t),e.suspenseyImages.push(t)),e=fh.bind(e),t.decode().then(e,e))}function sh(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Wm(r.href),a=t.querySelector(Gm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=dh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ft(a);return}a=t.ownerDocument||t,r=Km(r),(i=U.get(i))&&Zm(r,i),a=a.createElement(`link`),Ft(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),dp(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=dh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var ch=0;function lh(e,t){return e.stylesheets&&e.count===0&&mh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&mh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&ch===0&&(ch=62500*hp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&mh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>ch?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function uh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)mh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function dh(){this.count--,uh(this)}function fh(){this.imgCount--,uh(this)}var ph=null;function mh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ph=new Map,t.forEach(hh,e),ph=null,dh.call(e))}function hh(e,t){if(!(t.state.loading&4)){var n=ph.get(e);if(n)var r=n.get(null);else{n=new Map,ph.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=dh.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var gh={$$typeof:N,Provider:null,Consumer:null,_currentValue:pe,_currentValue2:pe,_threadCount:0};function _h(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ut(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ut(0),this.hiddenUpdates=ut(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function vh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new _h(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Ai(3,null,null,t),e.current=a,a.stateNode=e,t=Aa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},po(a),e}function yh(e){return e?(e=Oi,e):Oi}function bh(e,t,n,r,i,a){i=yh(i),r.context===null?r.context=i:r.pendingContext=i,r=ho(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=go(e,r,t),n!==null&&(Bd(n,e,t),_o(n,e,t))}function xh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Sh(e,t){xh(e,t),(e=e.alternate)&&xh(e,t)}function Ch(e){if(e.tag===13||e.tag===31){var t=Ti(e,67108864);t!==null&&Bd(t,e,67108864),Sh(e,67108864)}}function wh(e){if(e.tag===13||e.tag===31){var t=Ld();t=gt(t);var n=Ti(e,t);n!==null&&Bd(n,e,t),Sh(e,t)}}var Th=!0;function Eh(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=2,Oh(e,t,n,r)}finally{L.p=a,I.T=i}}function Dh(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=8,Oh(e,t,n,r)}finally{L.p=a,I.T=i}}function Oh(e,t,n,r){if(Th){var i=kh(r);if(i===null)ep(e,t,r,Ah,n),Vh(e,r);else if(Uh(i,e,t,n,r))r.stopPropagation();else if(Vh(e,r),t&4&&-1<Bh.indexOf(e)){for(;i!==null;){var a=Mt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=it(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ze(o);s.entanglements[1]|=c,o&=~c}Nf(a),!(nd&6)&&(Sd=ze()+500,Pf(0,!1))}}break;case 31:case 13:s=Ti(a,2),s!==null&&Bd(s,a,2),Gd(),Sh(a,2)}if(a=kh(r),a===null&&ep(e,t,r,Ah,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else ep(e,t,r,null,n)}}function kh(e){return e=yn(e),jh(e)}var Ah=null;function jh(e){if(Ah=null,e=jt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ah=e,null}function Mh(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Be()){case Ve:return 2;case He:return 8;case Ue:case We:return 32;case Ge:return 268435456;default:return 32}default:return 32}}var Nh=!1,Ph=null,Fh=null,Ih=null,Lh=new Map,Rh=new Map,zh=[],Bh=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Vh(e,t){switch(e){case`focusin`:case`focusout`:Ph=null;break;case`dragenter`:case`dragleave`:Fh=null;break;case`mouseover`:case`mouseout`:Ih=null;break;case`pointerover`:case`pointerout`:Lh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Rh.delete(t.pointerId)}}function Hh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Mt(t),t!==null&&Ch(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Uh(e,t,n,r,i){switch(t){case`focusin`:return Ph=Hh(Ph,e,t,n,r,i),!0;case`dragenter`:return Fh=Hh(Fh,e,t,n,r,i),!0;case`mouseover`:return Ih=Hh(Ih,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Lh.set(a,Hh(Lh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Rh.set(a,Hh(Rh.get(a)||null,e,t,n,r,i)),!0}return!1}function Wh(e){var t=jt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,yt(e.priority,function(){wh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,yt(e.priority,function(){wh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Gh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=kh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);vn=r,n.target.dispatchEvent(r),vn=null}else return t=Mt(n),t!==null&&Ch(t),e.blockedOn=n,!1;t.shift()}return!0}function Kh(e,t,n){Gh(e)&&n.delete(t)}function qh(){Nh=!1,Ph!==null&&Gh(Ph)&&(Ph=null),Fh!==null&&Gh(Fh)&&(Fh=null),Ih!==null&&Gh(Ih)&&(Ih=null),Lh.forEach(Kh),Rh.forEach(Kh)}function Jh(e,n){e.blockedOn===n&&(e.blockedOn=null,Nh||(Nh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,qh)))}var Yh=null;function Xh(e){Yh!==e&&(Yh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Yh===e&&(Yh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(jh(r||n)===null)continue;break}var a=Mt(n);a!==null&&(e.splice(t,3),t-=3,ec(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Zh(e){function t(t){return Jh(t,e)}Ph!==null&&Jh(Ph,e),Fh!==null&&Jh(Fh,e),Ih!==null&&Jh(Ih,e),Lh.forEach(t),Rh.forEach(t);for(var n=0;n<zh.length;n++){var r=zh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<zh.length&&(n=zh[0],n.blockedOn===null);)Wh(n),n.blockedOn===null&&zh.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[St]||null;if(typeof a==`function`)o||Xh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[St]||null)s=o.formAction;else if(jh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Xh(n)}}}function Qh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function $h(e){this._internalRoot=e}eg.prototype.render=$h.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;bh(n,Ld(),e,t,null,null)},eg.prototype.unmount=$h.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;bh(e.current,2,null,e,null,null),Gd(),t[Ct]=null}};function eg(e){this._internalRoot=e}eg.prototype.unstable_scheduleHydration=function(e){if(e){var t=vt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<zh.length&&t!==0&&t<zh[n].priority;n++);zh.splice(n,0,e),n===0&&Wh(e)}};var tg=n.version;if(tg!==`19.3.1`)throw Error(i(527,tg,`19.3.1`));L.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var G={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:I,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var ng=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ng.isDisabled&&ng.supportsFiber)try{Je=ng.inject(G),Ye=ng}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Cc,s=wc,c=Tc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=vh(e,1,!1,null,null,n,r,null,o,s,c,Qh),e[Ct]=t.current,Qf(e),new $h(t)}})),Mm=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=jm()}))(),Nm=l(Am(),1);function Pm(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var Fm=e=>{switch(e){case`success`:return Rm;case`info`:return Bm;case`warning`:return zm;case`error`:return Vm;default:return null}},Im=Array(12).fill(0),Lm=({visible:e,className:t})=>m.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},m.createElement(`div`,{className:`sonner-spinner`},Im.map((e,t)=>m.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),Rm=m.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},m.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),zm=m.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},m.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),Bm=m.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},m.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),Vm=m.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},m.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),Hm=m.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`},m.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),m.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),Um=()=>{let[e,t]=m.useState(document.hidden);return m.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),e},Wm=1,Gm=100,Km=e=>typeof e?.id==`number`||e?.id?.length>0?e.id:Wm++,qm=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),this.getActiveToasts().forEach(t=>e(t)),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e],this.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-Gm;e<=0||(this.toasts=this.toasts.filter(t=>e>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),e--,!1):!0))},this.create=e=>{let{message:t,...n}=e,r=Km(e),i=this.pendingDismissals.get(r);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(r),this.dismissedToasts.delete(r));let a=this.dismissedToasts.has(r),o=e.dismissible===void 0||e.dismissible;return a&&(this.dismissedToasts.delete(r),this.toasts=this.toasts.filter(e=>e.id!==r)),!a&&this.toasts.find(e=>e.id===r)?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:o,title:t}):n):this.addToast({title:t,...n,dismissible:o,id:r}),r},this.dismiss=e=>{if(e==null)return this.getActiveToasts().forEach(e=>{this.dismissedToasts.add(e.id),this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);let t=this.pendingDismissals.get(e);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})),e},this.message=(e,t)=>this.create({...t,message:e,type:void 0}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],m.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(Ym(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!m.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!m.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!m.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!m.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=Km(t);return this.create({...t,jsx:e(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},Jm=(e,t)=>qm.message(e,t),Ym=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,W=Object.assign(Jm,{success:qm.success,info:qm.info,warning:qm.warning,error:qm.error,custom:qm.custom,message:qm.message,promise:qm.promise,dismiss:qm.dismiss,loading:qm.loading},{getHistory:()=>qm.toasts,getToasts:()=>qm.getActiveToasts()});Pm(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function Xm(e){return e.label!==void 0}var Zm=3,Qm=`24px`,$m=`16px`,eh=4e3,th=356,nh=14,rh=45,ih=200;function ah(...e){return e.filter(Boolean).join(` `)}function oh(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var sh=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:h,cancelButtonStyle:g,actionButtonStyle:_,className:v=``,descriptionClassName:y=``,duration:b,position:x,gap:S,expandByDefault:C,classNames:w,icons:T,closeButtonAriaLabel:E=`Close toast`}=e,[D,O]=m.useState(null),[k,A]=m.useState(null),[j,M]=m.useState(!1),[N,ee]=m.useState(!1),[P,F]=m.useState(!1),[te,ne]=m.useState(!1),[re,ie]=m.useState(!1),[ae,oe]=m.useState(0),[se,ce]=m.useState(0),le=m.useRef(n.duration||b||eh),ue=m.useRef(null),de=m.useRef(null),fe=c===0,I=c+1<=o,L=n.type,pe=L??`default`,me=n.dismissible!==!1,he=n.className||``,ge=n.descriptionClassName||``,_e=m.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),ve=m.useMemo(()=>n.closeButton??p,[n.closeButton,p]),ye=m.useMemo(()=>n.duration||b||eh,[n.duration,b]),be=m.useRef(0),xe=m.useRef(0),Se=m.useRef(0),Ce=m.useRef(null),[we,Te]=x.split(`-`),Ee=m.useMemo(()=>s.reduce((e,t,n)=>n>=_e?e:e+t.height,0),[s,_e]),De=Um(),Oe=m.useMemo(()=>e.swipeDirections??oh(x),[e.swipeDirections,x]),ke=n.invert||t,Ae=L===`loading`;xe.current=m.useMemo(()=>_e*S+Ee,[_e,Ee]),m.useEffect(()=>{le.current=ye},[ye]),m.useEffect(()=>{M(!0)},[]),m.useEffect(()=>{let e=de.current;if(e){let t=e.getBoundingClientRect().height;return ce(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),m.useLayoutEffect(()=>{if(!j)return;let e=de.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,ce(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[j,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let je=m.useCallback(()=>{ee(!0),oe(xe.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},ih)},[n,d,a,xe]);m.useEffect(()=>{if(n.promise&&L===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||De?(()=>{if(Se.current<be.current){let e=new Date().getTime()-be.current;le.current-=e}Se.current=new Date().getTime()})():le.current!==1/0&&(be.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),je()},le.current)),()=>clearTimeout(e)},[u,i,n,L,De,je]),m.useEffect(()=>{n.delete&&(je(),n.onDismiss==null||n.onDismiss.call(n,n))},[je,n.delete]);function Me(){return T?.loading?m.createElement(`div`,{className:ah(w?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":L===`loading`},T.loading):m.createElement(Lm,{className:ah(w?.loader,n?.classNames?.loader),visible:L===`loading`})}let Ne=n.icon||T?.[L]||Fm(L);return m.createElement(`li`,{tabIndex:0,ref:de,className:ah(v,he,w?.toast,n?.classNames?.toast,w?.[pe],n?.classNames?.[pe]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":j,"data-promise":!!n.promise,"data-swiped":re,"data-removed":N,"data-visible":I,"data-y-position":we,"data-x-position":Te,"data-index":c,"data-front":fe,"data-swiping":P,"data-dismissible":me,"data-type":L,"data-invert":ke,"data-swipe-out":te,"data-swipe-direction":k,"data-expanded":!!(u||C&&j),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${N?ae:xe.current}px`,"--initial-height":C?`auto`:`${se}px`,...h,...n.style},onDragEnd:()=>{F(!1),O(null),Ce.current=null},onPointerDown:e=>{e.button!==2&&!Ae&&me&&(ue.current=new Date,oe(xe.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(F(!0),Ce.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{if(te||!me)return;Ce.current=null;let e=Number(de.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(de.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-ue.current?.getTime(),i=D===`x`?e:t,a=Math.abs(i)/r;if((D===`x`?Oe.includes(e>0?`right`:`left`):Oe.includes(t>0?`bottom`:`top`))&&(Math.abs(i)>=rh||a>.11))oe(xe.current),n.onDismiss==null||n.onDismiss.call(n,n),A(D===`x`?e>0?`right`:`left`:t>0?`down`:`up`),je(),ne(!0);else{var o,s;(o=de.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=de.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`),ie(!1),F(!1),O(null)}},onPointerMove:e=>{var t,n;if(!Ce.current||!me||window.getSelection()?.toString().length>0)return;let r=e.clientY-Ce.current.y,i=e.clientX-Ce.current.x;!D&&(Math.abs(i)>1||Math.abs(r)>1)&&O(Math.abs(i)>Math.abs(r)?`x`:`y`);let a={x:0,y:0},o=e=>1/(1.5+Math.abs(e)/20);if(D===`y`){if(Oe.includes(`top`)||Oe.includes(`bottom`)){if(Oe.includes(`top`)&&r<0||Oe.includes(`bottom`)&&r>0)a.y=r;else{let e=r*o(r);a.y=Math.abs(e)<Math.abs(r)?e:r}}}else if(D===`x`&&(Oe.includes(`left`)||Oe.includes(`right`))){if(Oe.includes(`left`)&&i<0||Oe.includes(`right`)&&i>0)a.x=i;else{let e=i*o(i);a.x=Math.abs(e)<Math.abs(i)?e:i}}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&ie(!0),(t=de.current)==null||t.style.setProperty(`--swipe-amount-x`,`${a.x}px`),(n=de.current)==null||n.style.setProperty(`--swipe-amount-y`,`${a.y}px`)}},ve&&!n.jsx&&L!==`loading`?m.createElement(`button`,{"aria-label":E,"data-disabled":Ae,"data-close-button":!0,onClick:Ae||!me?()=>{}:()=>{je(),n.onDismiss==null||n.onDismiss.call(n,n)},className:ah(w?.closeButton,n?.classNames?.closeButton)},T?.close??Hm):null,(L||n.icon||n.promise)&&n.icon!==null&&(T?.[L]!==null||n.icon)?m.createElement(`div`,{"data-icon":``,className:ah(w?.icon,n?.classNames?.icon)},L===`loading`?n.icon||Me():n.promise?Me():null,L===`loading`?null:Ne):null,m.createElement(`div`,{"data-content":``,className:ah(w?.content,n?.classNames?.content)},m.createElement(`div`,{"data-title":``,className:ah(w?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?m.createElement(`div`,{"data-description":``,className:ah(y,ge,w?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),m.isValidElement(n.cancel)?n.cancel:n.cancel&&Xm(n.cancel)?m.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||g,onClick:e=>{Xm(n.cancel)&&me&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),je())},className:ah(w?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,m.isValidElement(n.action)?n.action:n.action&&Xm(n.action)?m.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||_,onClick:e=>{Xm(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),e.defaultPrevented||je())},className:ah(w?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function ch(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function lh(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?$m:Qm;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var uh=m.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:h,visibleToasts:g=Zm,toastOptions:_,dir:v=ch(),gap:y=nh,icons:b,customAriaLabel:x,containerAriaLabel:S=`Notifications`}=e,[C,w]=m.useState([]),T=m.useMemo(()=>n?C.filter(e=>e.toasterId===n):C.filter(e=>!e.toasterId),[C,n]),E=m.useMemo(()=>Array.from(new Set([i].concat(T.filter(e=>e.position).map(e=>e.position)))),[T,i]),[D,O]=m.useState([]),[k,A]=m.useState(!1),[j,M]=m.useState(!1),[N,ee]=m.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),P=m.useRef(null),F=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),te=m.useRef(null),ne=m.useRef(!1),re=m.useCallback(e=>{w(t=>(t.find(t=>t.id===e.id)?.delete||qm.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return m.useEffect(()=>qm.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{w(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{Nm.flushSync(()=>{w(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),m.useEffect(()=>{if(d!==`system`){ee(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?ee(`dark`):ee(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{ee(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{ee(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),m.useEffect(()=>{C.length<=1&&A(!1)},[C]),m.useEffect(()=>{let e=e=>{if(a.length>0&&a.every(t=>e[t]||e.code===t)){var t;A(!0),(t=P.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===P.current||P.current?.contains(document.activeElement))&&A(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),m.useEffect(()=>{if(P.current)return()=>{te.current&&(te.current.focus({preventScroll:!0}),te.current=null,ne.current=!1)}},[P.current]),m.createElement(`section`,{ref:t,"aria-label":x??`${S} ${F}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},E.map((t,n)=>{let[i,a]=t.split(`-`);return T.length?m.createElement(`ol`,{key:t,dir:v===`auto`?ch():v,tabIndex:-1,ref:P,className:c,"data-sonner-toaster":!0,"data-sonner-theme":N,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${D[0]?.height||0}px`,"--width":`${th}px`,"--gap":`${y}px`,...h,...lh(l,u)},onBlur:e=>{ne.current&&!e.currentTarget.contains(e.relatedTarget)&&(ne.current=!1,te.current&&=(te.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||ne.current||(ne.current=!0,te.current=e.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{j||A(!1)},onDragEnd:()=>A(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||M(!0)},onPointerUp:()=>M(!1)},T.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>m.createElement(sh,{key:n.id,icons:b,index:i,toast:n,defaultRichColors:f,duration:_?.duration??p,className:_?.className,descriptionClassName:_?.descriptionClassName,invert:r,visibleToasts:g,closeButton:_?.closeButton??s,interacting:j,position:t,style:_?.style,unstyled:_?.unstyled,classNames:_?.classNames,cancelButtonStyle:_?.cancelButtonStyle,actionButtonStyle:_?.actionButtonStyle,closeButtonAriaLabel:_?.closeButtonAriaLabel,removeToast:re,toasts:T.filter(e=>e.position==n.position),heights:D.filter(e=>e.position==n.position),setHeights:O,expandByDefault:o,gap:y,expanded:k,swipeDirections:e.swipeDirections}))):null}))});function dh(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=dh(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function fh(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=dh(e))&&(r&&(r+=` `),r+=t);return r}var ph=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},mh=(e,t)=>({classGroupId:e,validator:t}),hh=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),gh=`-`,_h=[],vh=`arbitrary..`,yh=e=>{let t=Sh(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return xh(e);let n=e.split(gh);return bh(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?ph(i,t):t:i||_h}return n[e]||_h}}},bh=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=bh(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(gh):e.slice(t).join(gh),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},xh=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?vh+r:void 0})(),Sh=e=>{let{theme:t,classGroups:n}=e;return Ch(n,t)},Ch=(e,t)=>{let n=hh();for(let r in e){let i=e[r];wh(i,n,r,t)}return n},wh=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Th(i,t,n,r)}},Th=(e,t,n,r)=>{typeof e==`string`?Eh(e,t,n):typeof e==`function`?Dh(e,t,n,r):Oh(e,t,n,r)},Eh=(e,t,n)=>{let r=e===``?t:kh(t,e);r.classGroupId=n},Dh=(e,t,n,r)=>{Ah(e)?wh(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(mh(n,e)))},Oh=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];wh(o,kh(t,a),n,r)}},kh=(e,t)=>{let n=e,r=t.split(gh),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=hh(),n.nextPart.set(t,i)),n=i}return n},Ah=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,jh=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Mh=`!`,Nh=`:`,Ph=[],Fh=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Ih=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Nh){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Mh)?(c=s.slice(0,-1),l=!0):s.startsWith(Mh)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Fh(t,l,c,u)};if(t){let e=t+Nh,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Fh(Ph,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Lh=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Rh=e=>({cache:jh(e.cacheSize),parseClassName:Ih(e),sortModifiers:Lh(e),postfixLookupClassGroupIds:zh(e),...yh(e)}),zh=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},Bh=/\s+/,Vh=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Bh),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h||(g=r(p),!g)){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Mh:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Hh=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Uh(n))&&(i&&(i+=` `),i+=r);return i},Uh=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Uh(e[r]))&&(n&&(n+=` `),n+=t);return n},Wh=(e,...t)=>{let n,r,i,a,o=o=>(n=Rh(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Vh(e,n);return i(e,a),a};return a=o,(...e)=>a(Hh(...e))},Gh=[],Kh=e=>{let t=t=>t[e]||Gh;return t.isThemeGetter=!0,t.themeKey=e,t},qh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Jh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Yh=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Xh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Zh=/\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$/,Qh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,$h=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,eg=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,tg=e=>Yh.test(e),G=e=>!!e&&!Number.isNaN(Number(e)),ng=e=>!!e&&Number.isInteger(Number(e)),rg=e=>e.endsWith(`%`)&&G(e.slice(0,-1)),ig=e=>Xh.test(e),ag=()=>!0,og=e=>Zh.test(e)&&!Qh.test(e),sg=()=>!1,cg=e=>$h.test(e),lg=e=>eg.test(e),ug=e=>!K(e)&&!q(e),dg=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),fg=e=>Dg(e,jg,sg),K=e=>qh.test(e),pg=e=>Dg(e,Mg,og),mg=e=>Dg(e,Ng,G),hg=e=>Dg(e,Fg,ag),gg=e=>Dg(e,Pg,sg),_g=e=>Dg(e,kg,sg),vg=e=>Dg(e,Ag,lg),yg=e=>Dg(e,Ig,cg),q=e=>Jh.test(e),bg=e=>Og(e,Mg),xg=e=>Og(e,Pg),Sg=e=>Og(e,kg),Cg=e=>Og(e,jg),wg=e=>Og(e,Ag),Tg=e=>Og(e,Ig,!0),Eg=e=>Og(e,Fg,!0),Dg=(e,t,n)=>{let r=qh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Og=(e,t,n=!1)=>{let r=Jh.exec(e);return r?r[1]?t(r[1]):n:!1},kg=e=>e===`position`||e===`percentage`,Ag=e=>e===`image`||e===`url`,jg=e=>e===`length`||e===`size`||e===`bg-size`,Mg=e=>e===`length`,Ng=e=>e===`number`,Pg=e=>e===`family-name`,Fg=e=>e===`number`||e===`weight`,Ig=e=>e===`shadow`,Lg=Wh(()=>{let e=Kh(`color`),t=Kh(`font`),n=Kh(`text`),r=Kh(`font-weight`),i=Kh(`tracking`),a=Kh(`leading`),o=Kh(`breakpoint`),s=Kh(`container`),c=Kh(`spacing`),l=Kh(`radius`),u=Kh(`shadow`),d=Kh(`inset-shadow`),f=Kh(`text-shadow`),p=Kh(`drop-shadow`),m=Kh(`blur`),h=Kh(`perspective`),g=Kh(`aspect`),_=Kh(`ease`),v=Kh(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),q,K],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[q,K,c],T=()=>[tg,`full`,`auto`,...w()],E=()=>[ng,`none`,`subgrid`,q,K],D=()=>[`auto`,{span:[`full`,ng,q,K]},ng,q,K],O=()=>[ng,`auto`,q,K],k=()=>[`auto`,`min`,`max`,`fr`,q,K],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[tg,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ee=()=>[s,tg,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],P=()=>[tg,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],F=()=>[e,q,K],te=()=>[...b(),Sg,_g,{position:[q,K]}],ne=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],re=()=>[`auto`,`cover`,`contain`,Cg,fg,{size:[q,K]}],ie=()=>[rg,bg,pg],ae=()=>[``,`none`,`full`,l,q,K],oe=()=>[``,G,bg,pg],se=()=>[`solid`,`dashed`,`dotted`,`double`],ce=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],le=()=>[G,rg,Sg,_g],ue=()=>[``,`none`,m,q,K],de=()=>[`none`,G,q,K],fe=()=>[`none`,G,q,K],I=()=>[G,q,K],L=()=>[tg,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[ig],breakpoint:[ig],color:[ag],container:[ig],"drop-shadow":[ig],ease:[`in`,`out`,`in-out`],font:[ug],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[ig],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[ig],shadow:[ig],spacing:[`px`,G],text:[ig],"text-shadow":[ig],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,tg,K,q,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,q,K]}],"container-named":[dg],columns:[{columns:[G,`auto`,K,q,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[ng,`auto`,q,K]}],basis:[{basis:[tg,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[G,tg,`auto`,`initial`,`none`,K]}],grow:[{grow:[``,G,q,K]}],shrink:[{shrink:[``,G,q,K]}],order:[{order:[ng,`first`,`last`,`none`,q,K]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...ee()]}],"min-inline-size":[{"min-inline":[`auto`,...ee()]}],"max-inline-size":[{"max-inline":[`none`,...ee()]}],"block-size":[{block:[`auto`,...P()]}],"min-block-size":[{"min-block":[`auto`,...P()]}],"max-block-size":[{"max-block":[`none`,...P()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...N()]}],"font-size":[{text:[`base`,n,bg,pg]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Eg,hg]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,rg,K]}],"font-family":[{font:[xg,gg,t]}],"font-features":[{"font-features":[K]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,q,K]}],"line-clamp":[{"line-clamp":[G,`none`,q,mg]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,q,K]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,q,K]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...se(),`wavy`]}],"text-decoration-thickness":[{decoration:[G,`from-font`,`auto`,q,pg]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[G,`auto`,q,K]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[ng,q,K]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,q,K]}],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`,q,K]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:re()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},ng,q,K],radial:[``,q,K],conic:[``,ng,q,K]},wg,vg]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:oe()}],"border-w-x":[{"border-x":oe()}],"border-w-y":[{"border-y":oe()}],"border-w-s":[{"border-s":oe()}],"border-w-e":[{"border-e":oe()}],"border-w-bs":[{"border-bs":oe()}],"border-w-be":[{"border-be":oe()}],"border-w-t":[{"border-t":oe()}],"border-w-r":[{"border-r":oe()}],"border-w-b":[{"border-b":oe()}],"border-w-l":[{"border-l":oe()}],"divide-x":[{"divide-x":oe()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":oe()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...se(),`hidden`,`none`]}],"divide-style":[{divide:[...se(),`hidden`,`none`]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...se(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[G,q,K]}],"outline-w":[{outline:[``,G,bg,pg]}],"outline-color":[{outline:F()}],shadow:[{shadow:[``,`inner`,`none`,u,Tg,yg]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":[`none`,d,Tg,yg]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:oe()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[G,pg]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":oe()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":[`none`,f,Tg,yg]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[G,q,K]}],"mix-blend":[{"mix-blend":[...ce(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ce()}],"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":[G]}],"mask-image-linear-from-pos":[{"mask-linear-from":le()}],"mask-image-linear-to-pos":[{"mask-linear-to":le()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":le()}],"mask-image-t-to-pos":[{"mask-t-to":le()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":le()}],"mask-image-r-to-pos":[{"mask-r-to":le()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":le()}],"mask-image-b-to-pos":[{"mask-b-to":le()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":le()}],"mask-image-l-to-pos":[{"mask-l-to":le()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":le()}],"mask-image-x-to-pos":[{"mask-x-to":le()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":le()}],"mask-image-y-to-pos":[{"mask-y-to":le()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[q,K]}],"mask-image-radial-from-pos":[{"mask-radial-from":le()}],"mask-image-radial-to-pos":[{"mask-radial-to":le()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"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":b()}],"mask-image-conic-pos":[{"mask-conic":[G]}],"mask-image-conic-from-pos":[{"mask-conic-from":le()}],"mask-image-conic-to-pos":[{"mask-conic-to":le()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,q,K]}],filter:[{filter:[``,`none`,q,K]}],blur:[{blur:ue()}],brightness:[{brightness:[G,q,K]}],contrast:[{contrast:[G,q,K]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Tg,yg]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:[``,G,q,K]}],"hue-rotate":[{"hue-rotate":[G,q,K]}],invert:[{invert:[``,G,q,K]}],saturate:[{saturate:[G,q,K]}],sepia:[{sepia:[``,G,q,K]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,q,K]}],"backdrop-blur":[{"backdrop-blur":ue()}],"backdrop-brightness":[{"backdrop-brightness":[G,q,K]}],"backdrop-contrast":[{"backdrop-contrast":[G,q,K]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,G,q,K]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[G,q,K]}],"backdrop-invert":[{"backdrop-invert":[``,G,q,K]}],"backdrop-opacity":[{"backdrop-opacity":[G,q,K]}],"backdrop-saturate":[{"backdrop-saturate":[G,q,K]}],"backdrop-sepia":[{"backdrop-sepia":[``,G,q,K]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,q,K]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[G,`initial`,q,K]}],ease:[{ease:[`linear`,`initial`,_,q,K]}],delay:[{delay:[G,q,K]}],animate:[{animate:[`none`,v,q,K]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,q,K]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:fe()}],"scale-x":[{"scale-x":fe()}],"scale-y":[{"scale-y":fe()}],"scale-z":[{"scale-z":fe()}],"scale-3d":[`scale-3d`],skew:[{skew:I()}],"skew-x":[{"skew-x":I()}],"skew-y":[{"skew-y":I()}],transform:[{transform:[q,K,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:L()}],"translate-x":[{"translate-x":L()}],"translate-y":[{"translate-y":L()}],"translate-z":[{"translate-z":L()}],"translate-none":[`translate-none`],zoom:[{zoom:[ng,q,K]}],accent:[{accent:F()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:F()}],"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`,q,K]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":F()}],"scrollbar-track-color":[{"scrollbar-track":F()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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`,q,K]}],fill:[{fill:[`none`,...F()]}],"stroke-w":[{stroke:[G,bg,pg,mg]}],stroke:[{stroke:[`none`,...F()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function J(...e){return Lg(fh(e))}function Rg(e){let t=e,n=new Set;return{get:()=>t,set(e){t=typeof e==`function`?e(t):e;for(let e of n)e()},subscribe(e){return n.add(e),()=>n.delete(e)}}}function zg({className:e}){let t=(0,m.useId)();return(0,h.jsxs)(`svg`,{viewBox:`0 0 32 32`,className:J(`size-7`,e),"aria-hidden":!0,children:[(0,h.jsx)(`defs`,{children:(0,h.jsxs)(`linearGradient`,{id:t,x1:`0`,y1:`0`,x2:`1`,y2:`1`,children:[(0,h.jsx)(`stop`,{offset:`0`,stopColor:`#8b7ffa`}),(0,h.jsx)(`stop`,{offset:`1`,stopColor:`#5b4cf0`})]})}),(0,h.jsx)(`rect`,{width:`32`,height:`32`,rx:`9`,fill:`url(#${t})`}),(0,h.jsx)(`rect`,{x:`0.5`,y:`0.5`,width:`31`,height:`31`,rx:`8.5`,fill:`none`,stroke:`white`,strokeOpacity:`0.18`}),(0,h.jsx)(`path`,{d:`M10 21.5 16 9l6 12.5M12.6 17h6.8`,stroke:`white`,strokeWidth:`2.6`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}var Bg=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function Vg(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:Bg(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var Hg=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},Ug=e=>{let t=Hg(e);return t.charAt(0).toUpperCase()+t.slice(1)},Wg=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Gg={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function Kg(e){return e!=null}function qg(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Gg.width,a=e.size??e.height??Gg.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?Wg(...c):Wg(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Gg[`stroke-width`])*Number(e.size??e.width??Gg.width)/Number(t.size??t.width??Gg.width):t.strokeWidth??Gg[`stroke-width`];return[`svg`,{...Object.entries(Gg).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Kg(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Kg(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Kg(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function Jg(e,t={}){return qg(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var Yg=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Xg=(0,m.createContext)({}),Zg=()=>(0,m.useContext)(Xg),Qg=(0,m.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:y=``}=Zg()??{},b=!!c||Yg(d),[x,S,C=[]]=Jg(u,{color:e??v,width:n??t??p,height:r??t??p,strokeWidth:i??h,absoluteStrokeWidth:a??g,nonScalingStroke:o??_,className:Wg(y,s),hasA11yProp:b,attributes:d});return(0,m.createElement)(x,{ref:f,...S},[...C.map(([e,t])=>(0,m.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function Y(e,t=[],n=[]){let r=typeof e==`string`?Vg(e,t,n):e,i=(0,m.forwardRef)(({className:e,...t},n)=>(0,m.createElement)(Qg,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=Ug(r.name)),i}var $g={name:`app-window`,size:24,node:[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]};$g.node;var e_=Y($g),t_={name:`arrow-down-left`,size:24,node:[[`path`,{d:`M17 7 7 17`,key:`15tmo1`}],[`path`,{d:`M17 17H7V7`,key:`1org7z`}]]};t_.node;var n_=Y(t_),r_={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]};r_.node;var i_=Y(r_),a_={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};a_.node;var o_=Y(a_),s_={name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]};s_.node;var c_=Y(s_),l_={name:`arrow-up-right`,size:24,node:[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]};l_.node;var u_=Y(l_),d_={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};d_.node;var f_=Y(d_),p_={name:`at-sign`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8`,key:`7n84p3`}]]};p_.node;var m_=Y(p_),h_={name:`ban`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M4.929 4.929 19.07 19.071`,key:`196cmz`}]]};h_.node;var g_=Y(h_),__={name:`bell-ring`,size:24,node:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M22 8c0-2.3-.8-4.3-2-6`,key:`5bb3ad`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}],[`path`,{d:`M4 2C2.8 3.7 2 5.7 2 8`,key:`tap9e0`}]]};__.node;var v_=Y(__),y_={name:`book-open`,size:24,node:[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]};y_.node;var b_=Y(y_),x_={name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]};x_.node;var S_=Y(x_),C_={name:`braces`,size:24,node:[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]],aliases:[`curly-braces`]};C_.node;var w_=Y(C_),T_={name:`cable`,size:24,node:[[`path`,{d:`M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z`,key:`trhst0`}],[`path`,{d:`M17 21v-2`,key:`ds4u3f`}],[`path`,{d:`M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10`,key:`1mo9zo`}],[`path`,{d:`M21 21v-2`,key:`eo0ou`}],[`path`,{d:`M3 5V3`,key:`1k5hjh`}],[`path`,{d:`M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z`,key:`1dd30t`}],[`path`,{d:`M7 5V3`,key:`1t1388`}]]};T_.node;var E_=Y(T_),D_={name:`calendar`,size:24,node:[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]};D_.node;var O_=Y(D_),k_={name:`chart-column`,size:24,node:[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]],aliases:[`bar-chart-3`]};k_.node;var A_=Y(k_),j_={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};j_.node;var M_=Y(j_),N_={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};N_.node;var P_=Y(N_),F_={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};F_.node;var I_=Y(F_),L_={name:`circle-arrow-up`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 12-4-4-4 4`,key:`177agl`}],[`path`,{d:`M12 16V8`,key:`1sbj14`}]],aliases:[`arrow-up-circle`]};L_.node;var R_=Y(L_),z_={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};z_.node;var B_=Y(z_),V_={name:`coins`,size:24,node:[[`path`,{d:`M13.744 17.736a6 6 0 1 1-7.48-7.48`,key:`bq4yh3`}],[`path`,{d:`M15 6h1v4`,key:`11y1tn`}],[`path`,{d:`m6.134 14.768.866-.5 2 3.464`,key:`17snzx`}],[`circle`,{cx:`16`,cy:`8`,r:`6`,key:`14bfc9`}]]};V_.node;var H_=Y(V_),U_={name:`compass`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]};U_.node;var W_=Y(U_),G_={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};G_.node;var K_=Y(G_),q_={name:`corner-down-left`,size:24,node:[[`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`,key:`6o5b7l`}],[`path`,{d:`m9 10-5 5 5 5`,key:`1kshq7`}]]};q_.node;var J_=Y(q_),Y_={name:`cpu`,size:24,node:[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]};Y_.node;var X_=Y(Y_),Z_={name:`crown`,size:24,node:[[`path`,{d:`M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z`,key:`1vdc57`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]};Z_.node;var Q_=Y(Z_),$_={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};$_.node;var ev=Y($_),tv={name:`eighth-notes`,size:24,node:[[`path`,{d:`M21 16V3a1 1 0 0 0-1.28-.96l-10 2.917a1 1 0 0 0-.72.96V19`,key:`uy6ho8`}],[`circle`,{cx:`18`,cy:`16`,r:`3`,key:`1hluhg`}],[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}]],aliases:[`music`]};tv.node;var nv=Y(tv),rv={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};rv.node;var iv=Y(rv),av={name:`eraser`,size:24,node:[[`path`,{d:`M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21`,key:`g5wo59`}],[`path`,{d:`m5.082 11.09 8.828 8.828`,key:`1wx5vj`}]]};av.node;var ov=Y(av),sv={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};sv.node;var cv=Y(sv),lv={name:`file-up`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`m15 15-3-3-3 3`,key:`15xj92`}]]};lv.node;var uv=Y(lv),dv={name:`flask-conical`,size:24,node:[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]};dv.node;var fv=Y(dv),pv={name:`gamepad-2`,size:24,node:[[`line`,{x1:`6`,x2:`10`,y1:`11`,y2:`11`,key:`1gktln`}],[`line`,{x1:`8`,x2:`8`,y1:`9`,y2:`13`,key:`qnk9ow`}],[`line`,{x1:`15`,x2:`15.01`,y1:`12`,y2:`12`,key:`krot7o`}],[`line`,{x1:`18`,x2:`18.01`,y1:`10`,y2:`10`,key:`1lcuu1`}],[`path`,{d:`M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z`,key:`mfqc10`}]]};pv.node;var mv=Y(pv),hv={name:`gift`,size:24,node:[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8`,key:`1sqzm4`}],[`path`,{d:`M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5`,key:`kc0143`}],[`rect`,{x:`3`,y:`7`,width:`18`,height:`4`,rx:`1`,key:`1hberx`}]]};hv.node;var gv=Y(hv),_v={name:`hand`,size:24,node:[[`path`,{d:`M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2`,key:`1fvzgz`}],[`path`,{d:`M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2`,key:`1kc0my`}],[`path`,{d:`M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8`,key:`10h0bg`}],[`path`,{d:`M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15`,key:`1s1gnw`}]]};_v.node;var vv=Y(_v),yv={name:`image-plus`,size:24,node:[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]};yv.node;var bv=Y(yv),xv={name:`image`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]};xv.node;var Sv=Y(xv),Cv={name:`inbox`,size:24,node:[[`polyline`,{points:`22 12 16 12 14 15 10 15 8 12 2 12`,key:`o97t9d`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}]]};Cv.node;var wv=Y(Cv),Tv={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};Tv.node;var Ev=Y(Tv),Dv={name:`layout-dashboard`,size:24,node:[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]};Dv.node;var Ov=Y(Dv),kv={name:`link-2`,size:24,node:[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]};kv.node;var Av=Y(kv),jv={name:`list-checks`,size:24,node:[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]};jv.node;var Mv=Y(jv),Nv={name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]};Nv.node;var Pv=Y(Nv),Fv={name:`log-in`,size:24,node:[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]};Fv.node;var Iv=Y(Fv),Lv={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};Lv.node;var Rv=Y(Lv),zv={name:`menu`,size:24,node:[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]};zv.node;var Bv=Y(zv),Vv={name:`message-square-reply`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`m10 8-3 3 3 3`,key:`fp6dz7`}],[`path`,{d:`M17 14v-1a2 2 0 0 0-2-2H7`,key:`1tkjnz`}]]};Vv.node;var Hv=Y(Vv),Uv={name:`messages-square`,size:24,node:[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]};Uv.node;var Wv=Y(Uv),Gv={name:`mic-off`,size:24,node:[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M15 9.34V5a3 3 0 0 0-5.68-1.33`,key:`1gzdoj`}],[`path`,{d:`M16.95 16.95A7 7 0 0 1 5 12v-2`,key:`cqa7eg`}],[`path`,{d:`M18.89 13.23A7 7 0 0 0 19 12v-2`,key:`16hl24`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v3a3 3 0 0 0 5.12 2.12`,key:`r2i35w`}]]};Gv.node;var Kv=Y(Gv),qv={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};qv.node;var Jv=Y(qv),Yv={name:`monitor`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]};Yv.node;var Xv=Y(Yv),Zv={name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]};Zv.node;var Qv=Y(Zv),$v={name:`package-search`,size:24,node:[[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`path`,{d:`M20.27 18.27 22 20`,key:`er2am`}],[`path`,{d:`M21 10.498V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l.98-.559`,key:`tok1h1`}],[`path`,{d:`M3.29 7 12 12l8.71-5`,key:`19ckod`}],[`path`,{d:`m7.5 4.27 8.997 5.148`,key:`9yrvtv`}],[`circle`,{cx:`18.5`,cy:`16.5`,r:`2.5`,key:`ke13xx`}]]};$v.node;var ey=Y($v),ty={name:`package`,size:24,node:[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]};ty.node;var ny=Y(ty),ry={name:`paperclip`,size:24,node:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]};ry.node;var iy=Y(ry),ay={name:`pause`,size:24,node:[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]};ay.node;var oy=Y(ay),sy={name:`pencil-line`,size:24,node:[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]};sy.node;var cy=Y(sy),ly={name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]};ly.node;var uy=Y(ly),dy={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};dy.node;var fy=Y(dy),py={name:`puzzle`,size:24,node:[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]};py.node;var my=Y(py),hy={name:`radio`,size:24,node:[[`path`,{d:`M16.247 7.761a6 6 0 0 1 0 8.478`,key:`1fwjs5`}],[`path`,{d:`M19.075 4.933a10 10 0 0 1 0 14.134`,key:`ehdyv1`}],[`path`,{d:`M4.925 19.067a10 10 0 0 1 0-14.134`,key:`1q22gi`}],[`path`,{d:`M7.753 16.239a6 6 0 0 1 0-8.478`,key:`r2q7qm`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]};hy.node;var gy=Y(hy),_y={name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]};_y.node;var vy=Y(_y),yy={name:`reply`,size:24,node:[[`path`,{d:`M20 18v-2a4 4 0 0 0-4-4H4`,key:`5vmcpk`}],[`path`,{d:`m9 17-5-5 5-5`,key:`nvlc11`}]]};yy.node;var by=Y(yy),xy={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};xy.node;var Sy=Y(xy),Cy={name:`rotate-cw`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]};Cy.node;var wy=Y(Cy),Ty={name:`scale`,size:24,node:[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`path`,{d:`m19 8 3 8a5 5 0 0 1-6 0zV7`,key:`zcdpyk`}],[`path`,{d:`M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1`,key:`1yorad`}],[`path`,{d:`m5 8 3 8a5 5 0 0 1-6 0zV7`,key:`eua70x`}],[`path`,{d:`M7 21h10`,key:`1b0cd5`}]]};Ty.node;var Ey=Y(Ty),Dy={name:`scroll-text`,size:24,node:[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]};Dy.node;var Oy=Y(Dy),ky={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};ky.node;var Ay=Y(ky),jy={name:`send`,size:24,node:[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]};jy.node;var My=Y(jy),Ny={name:`settings-2`,size:24,node:[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]};Ny.node;var Py=Y(Ny),Fy={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};Fy.node;var Iy=Y(Fy),Ly={name:`share-2`,size:24,node:[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]};Ly.node;var Ry=Y(Ly),zy={name:`shield-check`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]};zy.node;var By=Y(zy),Vy={name:`shield-exclamation-point`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]],aliases:[`shield-alert`]};Vy.node;var Hy=Y(Vy),Uy={name:`shield`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]};Uy.node;var Wy=Y(Uy),Gy={name:`sliders-horizontal`,size:24,node:[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]};Gy.node;var Ky=Y(Gy),qy={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};qy.node;var Jy=Y(qy),Yy={name:`square-terminal`,size:24,node:[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]],aliases:[`terminal-square`]};Yy.node;var Xy=Y(Yy),Zy={name:`star`,size:24,node:[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]};Zy.node;var Qy=Y(Zy),$y={name:`store`,size:24,node:[[`path`,{d:`M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5`,key:`slp6dd`}],[`path`,{d:`M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244`,key:`o0xfot`}],[`path`,{d:`M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05`,key:`wn3emo`}]]};$y.node;var eb=Y($y),tb={name:`sun`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]};tb.node;var nb=Y(tb),rb={name:`terminal`,size:24,node:[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]};rb.node;var ib=Y(rb),ab={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};ab.node;var ob=Y(ab),sb={name:`triangle-exclamation-point`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`,`triangle-alert`]};sb.node;var cb=Y(sb),lb={name:`trophy`,size:24,node:[[`path`,{d:`M10 14.66V17a1 1 0 0 1-1 1 2 2 0 0 0-2 2v2`,key:`pwuv1l`}],[`path`,{d:`M14 14.66V17a1 1 0 0 0 1 1 2 2 0 0 1 2 2v2`,key:`1y54w1`}],[`path`,{d:`M17.916 10H19.5A2.5 2.5 0 0 0 22 7.5V5a1 1 0 0 0-1-1h-3`,key:`e30mpu`}],[`path`,{d:`M4 22h16`,key:`57wxv0`}],[`path`,{d:`M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z`,key:`1mhfuq`}],[`path`,{d:`M6.084 10H4.5A2.5 2.5 0 0 1 2 7.5V5a1 1 0 0 1 1-1h3`,key:`i0yafy`}]]};lb.node;var ub=Y(lb),db={name:`undo-2`,size:24,node:[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]};db.node;var fb=Y(db),pb={name:`user-plus`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`19`,x2:`19`,y1:`8`,y2:`14`,key:`1bvyxn`}],[`line`,{x1:`22`,x2:`16`,y1:`11`,y2:`11`,key:`1shjgl`}]]};pb.node;var mb=Y(pb),hb={name:`user`,size:24,node:[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]};hb.node;var gb=Y(hb),_b={name:`users`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]};_b.node;var vb=Y(_b),yb={name:`workflow`,size:24,node:[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]};yb.node;var bb=Y(yb),xb={name:`wrench`,size:24,node:[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]};xb.node;var Sb=Y(xb),Cb={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Cb.node;var wb=Y(Cb),Tb=class extends Error{status;code;issues;constructor(e,t,n,r=[]){super(n),this.name=`ApiError`,this.status=e,this.code=t,this.issues=r}},Eb=()=>{};function Db(e){Eb=e}async function Ob(e,t,n){let r;try{r=await fetch(`/api/panel${t}`,{method:e,credentials:`same-origin`,headers:n===void 0?void 0:{"Content-Type":`application/json`},body:n===void 0?void 0:JSON.stringify(n)})}catch{throw new Tb(0,`network`,`无法连接到 AsaBot,请确认服务正在运行`)}if(r.status===401&&t!==`/login`&&t!==`/setup`&&Eb(),!r.ok){let e=(await r.json().catch(()=>null))?.error;throw new Tb(r.status,e?.code??`http`,e?.message??`请求失败(HTTP ${r.status})`,e?.issues)}if(r.status!==204)return await r.json()}var kb=encodeURIComponent,X={session:()=>Ob(`GET`,`/session`),setup:e=>Ob(`POST`,`/setup`,e),login:e=>Ob(`POST`,`/login`,{password:e}),logout:()=>Ob(`POST`,`/logout`,{}),overview:()=>Ob(`GET`,`/overview`),stats:e=>Ob(`GET`,`/stats/messages?range=${e}`),bots:()=>Ob(`GET`,`/bots`),botGroups:e=>Ob(`GET`,`/bots/${kb(e.platform)}/${kb(e.selfId)}/groups`),send:e=>Ob(`POST`,`/send`,e),groups:(e=!1)=>Ob(`GET`,`/groups${e?`?refresh=1`:``}`),group:e=>Ob(`GET`,`/groups/${kb(e)}`),plugins:()=>Ob(`GET`,`/plugins`),pluginAction:(e,t)=>Ob(`POST`,`/plugins/${kb(e)}/${t}`,{}),pluginConfig:(e,t)=>Ob(`PUT`,`/plugins/${kb(e)}/config`,{config:t}),pluginGroups:e=>Ob(`GET`,`/plugins/${kb(e)}/groups`),setPluginGroup:(e,t,n)=>Ob(`PUT`,`/plugins/${kb(e)}/groups/${kb(t)}`,n),rescanPlugins:()=>Ob(`POST`,`/plugins/rescan`,{}),uploadPlugin:e=>Ob(`POST`,`/plugins/upload`,e),uninstallPlugin:(e,t)=>Ob(`POST`,`/plugins/${kb(e)}/uninstall`,{purge:t}),searchPackages:(e,t,n=0)=>Ob(`GET`,`/packages/search?q=${kb(e)}&sort=${t}&from=${n}`),packageInfo:e=>Ob(`GET`,`/packages/info?name=${kb(e)}`),installPackage:e=>Ob(`POST`,`/packages/install`,e),updatePackage:e=>Ob(`POST`,`/packages/update`,{name:e}),uninstallPackage:(e,t)=>Ob(`POST`,`/packages/uninstall`,{name:e,purge:t}),packageOperations:()=>Ob(`GET`,`/packages/operations`),commands:()=>Ob(`GET`,`/commands`),setCommandOverride:(e,t)=>Ob(`PUT`,`/commands/override`,{path:e,override:t}),setCommandGroup:(e,t,n)=>Ob(`PUT`,`/commands/groups`,{path:e,groupKey:t,enabled:n}),acl:()=>Ob(`GET`,`/acl`),addAcl:e=>Ob(`POST`,`/acl`,e),removeAcl:e=>Ob(`DELETE`,`/acl`,e),settings:()=>Ob(`GET`,`/settings`),updateSettings:e=>Ob(`PUT`,`/settings`,e),logs:(e=500,t)=>Ob(`GET`,`/logs?limit=${e}&level=10${t===void 0?``:`&eventId=${kb(t)}`}`),logLevel:()=>Ob(`GET`,`/logs/level`),setLogLevel:e=>Ob(`PUT`,`/logs/level`,{level:e}),playground:e=>Ob(`POST`,`/playground`,e),playgroundEvent:e=>Ob(`POST`,`/playground/event`,e),ext:(e,t,n,r)=>Ob(t,`/ext/${kb(e)}${n}`,r)},Ab={type:`spring`,stiffness:420,damping:34,mass:.8},Z={type:`spring`,stiffness:260,damping:30},jb={type:`spring`,stiffness:600,damping:38},Mb={animate:{transition:{staggerChildren:.035,delayChildren:.04}}},Nb={initial:{opacity:0,y:10,scale:.985},animate:{opacity:1,y:0,scale:1,transition:Z}},Pb=60,Fb=0,Ib=e=>({...e,seq:++Fb}),Lb=(0,m.createContext)(null),Rb=e=>`${e.platform}:${e.selfId}`;function zb(e,t){if(!e)return e;let n=e.findIndex(e=>Rb(e)===Rb(t));return n===-1?[...e,t]:e.map((e,r)=>r===n?t:e)}function Bb(e,t,n,r){switch(e.type){case`hello`:t.setQueryData([`overview`],e.overview),t.setQueryData([`bots`],e.overview.bots);break;case`bot`:t.setQueryData([`bots`],t=>zb(t,e.bot)),t.setQueryData([`overview`],t=>t&&{...t,bots:zb(t.bots,e.bot)??t.bots});break;case`plugin`:{let n=t.getQueryData([`plugins`]);n?.some(t=>t.name===e.plugin.name)?t.setQueryData([`plugins`],n.map(t=>t.name===e.plugin.name?e.plugin:t)):t.invalidateQueries({queryKey:[`plugins`]}),t.invalidateQueries({queryKey:[`overview`]}),t.invalidateQueries({queryKey:[`commands`]});break}case`message`:{let{type:r,...i}=e;n.messages.set(e=>[i,...e].slice(0,Pb)),t.setQueryData([`overview`],e=>e&&{...e,today:{received:e.today.received+ +(i.direction===`in`),sent:e.today.sent+ +(i.direction===`out`)}});break}case`stats`:t.setQueryData([`stats`,`1h`],t=>t&&[...t.filter(t=>t.t!==e.point.t),e.point].sort((e,t)=>e.t-t.t).slice(-60));break;case`package`:{let r=e.operation;n.operations.set(e=>[r,...e.filter(e=>e.id!==r.id)].sort((e,t)=>t.startedAt-e.startedAt).slice(0,20)),(r.status===`succeeded`||r.status===`failed`)&&(t.invalidateQueries({queryKey:[`plugins`]}),t.invalidateQueries({queryKey:[`overview`]}),t.invalidateQueries({queryKey:[`commands`]}),t.invalidateQueries({queryKey:[`packageSearch`]}));break}case`plugin-event`:for(let t of Vb)t(e);break;case`log`:r?r.push(e.record):n.logs.set(t=>[...t,Ib(e.record)].slice(-2e3))}}var Vb=new Set;function Hb(e){return Vb.add(e),()=>Vb.delete(e)}function Ub({children:e}){let t=_(),n=Gb();return(0,m.useEffect)(()=>{let e,r,i=0,a=!1,o=()=>{n.connection.set(`connecting`);let s=window.location.protocol===`https:`?`wss`:`ws`,c=new WebSocket(`${s}://${window.location.host}/api/panel/ws`);e=c;let l=[];c.onopen=()=>{i=0,n.connection.set(`open`),X.logs(500).then(e=>{let t=e.at(-1)?.time??0,r=(l??[]).filter(e=>e.time>t);n.logs.set([...e,...r].slice(-2e3).map(Ib))}).catch(()=>{n.logs.set(e=>[...e,...(l??[]).map(Ib)].slice(-2e3))}).finally(()=>{l=null}),X.packageOperations().then(e=>n.operations.set(e)).catch(e=>console.warn(`Failed to load package operations`,e)),t.invalidateQueries()},c.onmessage=e=>{Bb(JSON.parse(String(e.data)),t,n,l)},c.onclose=()=>{if(a)return;n.connection.set(`closed`);let e=Math.min(15e3,1e3*2**i);i+=1,r=window.setTimeout(o,e)}};return o(),()=>{a=!0,window.clearTimeout(r),e?.close()}},[t,n]),(0,h.jsx)(Lb,{value:n,children:e})}var Wb;function Gb(){return Wb??={connection:Rg(`connecting`),logs:Rg([]),messages:Rg([]),operations:Rg([])},Wb}function Kb(){let e=(0,m.useContext)(Lb);if(!e)throw Error(`Realtime hooks must be used inside RealtimeProvider`);return e}function qb(e){return(0,m.useSyncExternalStore)(e.subscribe,e.get)}var Jb=()=>qb(Kb().connection),Yb=()=>qb(Kb().logs),Xb=()=>qb(Kb().messages),Zb=()=>qb(Kb().operations),Qb=()=>{let{operations:e}=Kb();return t=>e.set(e=>[t,...e.filter(e=>e.id!==t.id)].slice(0,20))},$b=()=>{let{logs:e}=Kb();return()=>e.set([])},ex=new Set;function tx(e){return ex.add(e),window.addEventListener(`popstate`,e),()=>{ex.delete(e),window.removeEventListener(`popstate`,e)}}function nx(e){if(e!==window.location.pathname){window.history.pushState(null,``,e);for(let e of ex)e()}}function rx(){return(0,m.useSyncExternalStore)(tx,()=>window.location.pathname)}function ix({to:e,onClick:t,...n}){return(0,h.jsx)(`a`,{...n,href:e,onClick:n=>{t?.(n),n.defaultPrevented||n.button!==0||n.metaKey||n.ctrlKey||n.shiftKey||(n.preventDefault(),nx(e))}})}function ax(e,t){e.removeQueries({predicate:e=>e.queryKey[0]!==`session`}),e.setQueryData([`session`],{authenticated:t})}var ox=`asabot-theme`,sx=()=>window.matchMedia(`(prefers-color-scheme: dark)`),cx=(0,m.createContext)(null);function lx(e){return e===`system`?sx().matches?`dark`:`light`:e}function ux({children:e}){let[t,n]=(0,m.useState)(()=>localStorage.getItem(ox)??`system`),[r,i]=(0,m.useState)(()=>lx(t));(0,m.useEffect)(()=>{let e=()=>{let e=lx(t);i(e),document.documentElement.classList.toggle(`dark`,e===`dark`)};if(e(),t!==`system`)return;let n=sx();return n.addEventListener(`change`,e),()=>n.removeEventListener(`change`,e)},[t]);let a=(0,m.useCallback)(e=>{localStorage.setItem(ox,e),n(e)},[]);return(0,h.jsx)(cx,{value:{preference:t,resolved:r,setPreference:a},children:e})}function dx(){let e=(0,m.useContext)(cx);if(!e)throw Error(`useTheme must be used inside ThemeProvider`);return e}var fx=Rg(!1),px=Rg(null);function mx(){return(0,m.useSyncExternalStore)(fx.subscribe,fx.get)}function hx(){return(0,m.useSyncExternalStore)(px.subscribe,px.get)}function gx({className:e,...t}){return(0,h.jsx)(`div`,{className:J(`card`,e),...t})}function _x({title:e,description:t,action:n,className:r}){return(0,h.jsxs)(`div`,{className:J(`flex items-start justify-between gap-4 px-5 pt-4 pb-3`,r),children:[(0,h.jsxs)(`div`,{className:`min-w-0`,children:[(0,h.jsx)(`h3`,{className:`text-[13.5px] font-semibold tracking-[-0.01em] text-fg`,children:e}),t&&(0,h.jsx)(`p`,{className:`mt-0.5 text-[12.5px] text-fg-3`,children:t})]}),n&&(0,h.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:n})]})}var vx={neutral:`bg-surface-2 text-fg-2 border-border`,accent:`bg-accent-soft text-accent-soft-fg border-transparent`,success:`bg-success-soft text-success border-transparent`,warning:`bg-warning-soft text-warning border-transparent`,danger:`bg-danger-soft text-danger border-transparent`,info:`bg-info-soft text-info border-transparent`};function yx({tone:e=`neutral`,dot:t=!1,pulse:n=!1,className:r,children:i}){return(0,h.jsxs)(`span`,{className:J(`inline-flex h-[22px] items-center gap-1.5 rounded-md border px-2 text-[11.5px] font-medium whitespace-nowrap`,vx[e],r),children:[t&&(0,h.jsx)(xx,{tone:e,pulse:n}),i]})}var bx={neutral:`bg-fg-3`,accent:`bg-accent`,success:`bg-success`,warning:`bg-warning`,danger:`bg-danger`,info:`bg-info`};function xx({tone:e,pulse:t=!1,className:n}){return(0,h.jsxs)(`span`,{className:J(`relative inline-flex size-1.5 shrink-0`,n),children:[t&&(0,h.jsx)(`span`,{className:J(`absolute inset-0 rounded-full motion-safe:animate-pulse-soft`,bx[e])}),(0,h.jsx)(`span`,{className:J(`relative inline-flex size-full rounded-full`,bx[e])})]})}function Sx({children:e,className:t}){return(0,h.jsx)(`kbd`,{className:J(`inline-flex h-5 min-w-5 items-center justify-center rounded-[5px] border border-border bg-surface-2 px-1 font-sans text-[11px] font-medium text-fg-3`,t),children:e})}function Cx({className:e}){return(0,h.jsxs)(`svg`,{className:J(`size-4 animate-spin`,e),viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:[(0,h.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`,stroke:`currentColor`,strokeOpacity:`0.2`,strokeWidth:`3`}),(0,h.jsx)(`path`,{d:`M21 12a9 9 0 0 0-9-9`,stroke:`currentColor`,strokeWidth:`3`,strokeLinecap:`round`})]})}function wx({className:e}){return(0,h.jsx)(`div`,{className:J(`skeleton`,e)})}function Tx({icon:e,title:t,description:n,action:r,className:i}){return(0,h.jsxs)(U.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:Z,className:J(`flex flex-col items-center justify-center px-6 py-14 text-center`,i),children:[(0,h.jsx)(`div`,{className:`mb-4 flex size-11 items-center justify-center rounded-xl border border-border bg-surface-2 text-fg-3 [&>svg]:size-5`,children:e}),(0,h.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:t}),n&&(0,h.jsx)(`p`,{className:`mt-1 max-w-sm text-[13px] leading-relaxed text-fg-3`,children:n}),r&&(0,h.jsx)(`div`,{className:`mt-5`,children:r})]})}function Ex({error:e,onRetry:t,retrying:n=!1,className:r}){return(0,h.jsx)(Tx,{icon:(0,h.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,className:`text-danger`,children:[(0,h.jsx)(`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`}),(0,h.jsx)(`path`,{d:`M12 9v4`}),(0,h.jsx)(`path`,{d:`M12 17h.01`})]}),title:`加载失败`,description:e.message,className:r,action:(0,h.jsxs)(`button`,{type:`button`,onClick:t,disabled:n,className:`inline-flex h-8 cursor-pointer items-center gap-1.5 rounded-lg border border-border bg-surface px-3 text-[12.5px] font-medium text-fg shadow-card transition-colors hover:bg-surface-2 disabled:cursor-wait disabled:opacity-60`,children:[n&&(0,h.jsx)(Cx,{className:`size-3.5`}),`重试`]})})}function Dx({title:e,description:t,actions:n}){return(0,h.jsxs)(`div`,{className:`mb-6 flex flex-wrap items-end justify-between gap-4`,children:[(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`h1`,{className:`text-[22px] font-semibold tracking-[-0.025em] text-fg`,children:e}),t&&(0,h.jsx)(`p`,{className:`mt-1 text-[13.5px] text-fg-3`,children:t})]}),n&&(0,h.jsx)(`div`,{className:`flex items-center gap-2`,children:n})]})}var Ox={primary:`bg-accent text-accent-fg shadow-[0_1px_2px_rgb(0_0_0/0.12),inset_0_1px_0_rgb(255_255_255/0.16)] hover:bg-accent-hover`,secondary:`bg-surface text-fg border border-border shadow-card hover:bg-surface-2 hover:border-border-strong`,ghost:`text-fg-2 hover:text-fg hover:bg-surface-2`,soft:`bg-accent-soft text-accent-soft-fg hover:brightness-[0.97] dark:hover:brightness-125`,danger:`bg-danger text-white shadow-[0_1px_2px_rgb(0_0_0/0.12)] hover:brightness-105`,"danger-ghost":`text-danger hover:bg-danger-soft`},kx={sm:`h-7 gap-1.5 rounded-lg px-2.5 text-[12.5px]`,md:`h-9 gap-2 rounded-[10px] px-3.5 text-[13.5px]`,lg:`h-10 gap-2 rounded-xl px-4 text-sm`,icon:`size-8 rounded-lg`,"icon-sm":`size-7 rounded-md`},Q=(0,m.forwardRef)(function({variant:e=`secondary`,size:t=`md`,loading:n=!1,disabled:r,className:i,children:a,...o},s){return(0,h.jsxs)(U.button,{ref:s,whileTap:r||n?void 0:{scale:.97},transition:jb,disabled:r||n,className:J(`relative inline-flex shrink-0 cursor-pointer select-none items-center justify-center font-medium whitespace-nowrap`,`transition-[background-color,border-color,color,filter,box-shadow] duration-150`,`disabled:cursor-not-allowed disabled:opacity-50`,Ox[e],kx[t],i),...o,children:[(0,h.jsx)(`span`,{className:J(`inline-flex items-center gap-[inherit]`,n&&`opacity-0`),children:a}),n&&(0,h.jsx)(`span`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,h.jsx)(Cx,{className:`size-4`})})]})}),Ax=Object.defineProperty,jx=(e,t)=>Ax(e,`name`,{value:t,configurable:!0}),Mx=!!(typeof window<`u`&&window.document&&window.document.createElement);function $(e,t,{checkForDefaultPrevented:n=!0}={}){return jx(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}jx($,`composeEventHandlers`);function Nx(e){if(!Mx)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}jx(Nx,`getOwnerWindow`);function Px(e){if(!Mx)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}jx(Px,`getOwnerDocument`);function Fx(e,t=!1){let{activeElement:n}=Px(e);if(!n?.nodeName)return null;if(Ix(n)&&n.contentDocument)return Fx(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=Px(n).getElementById(e);if(t)return t}}return n}jx(Fx,`getActiveElement`);function Ix(e){return e.tagName===`IFRAME`}jx(Ix,`isFrame`);var Lx=Object.defineProperty,Rx=(e,t)=>Lx(e,`name`,{value:t,configurable:!0});function zx(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Rx(zx,`setRef`);function Bx(...e){return t=>{let n=!1,r=e.map(e=>{let r=zx(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():zx(e[t],null)}}}}Rx(Bx,`composeRefs`);function Vx(...e){return m.useCallback(Bx(...e),e)}Rx(Vx,`useComposedRefs`);var Hx=Object.defineProperty,Ux=(e,t)=>Hx(e,`name`,{value:t,configurable:!0});function Wx(e,t){let n=m.createContext(t);n.displayName=e+`Context`;let r=Ux(e=>{let{children:t,...r}=e,i=m.useMemo(()=>r,Object.values(r));return(0,h.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=m.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return Ux(i,`useContext`),[r,i]}Ux(Wx,`createContext`);function Gx(e,t=[]){let n=[];function r(t,r){let i=m.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=Ux(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=m.useMemo(()=>o,Object.values(o));return(0,h.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=m.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return Ux(s,`useContext`),[o,s]}Ux(r,`createContext`);let i=Ux(()=>{let t=n.map(e=>m.createContext(e));return Ux(function(n){let r=n?.[e]||t;return m.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,Kx(i,...t)]}Ux(Gx,`createContextScope`);function Kx(...e){let t=e[0];if(e.length===1)return t;let n=Ux(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return Ux(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}Ux(Kx,`composeContextScopes`);var qx=globalThis?.document?m.useLayoutEffect:()=>{},Jx=Object.defineProperty,Yx=(e,t)=>Jx(e,`name`,{value:t,configurable:!0}),Xx=m.useId||(()=>void 0),Zx=0;function Qx(e){let[t,n]=m.useState(Xx());return qx(()=>{e||n(e=>e??String(Zx++))},[e]),e||(t?`radix-${t}`:``)}Yx(Qx,`useId`);var $x=Object.defineProperty,eS=(e,t)=>$x(e,`name`,{value:t,configurable:!0}),tS=m.useEffectEvent,nS=m.useInsertionEffect;function rS(e){if(typeof tS==`function`)return tS(e);let t=m.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof nS==`function`?nS(()=>{t.current=e}):qx(()=>{t.current=e}),m.useMemo(()=>((...e)=>t.current?.(...e)),[])}eS(rS,`useEffectEvent`);var iS=Object.defineProperty,aS=(e,t)=>iS(e,`name`,{value:t,configurable:!0}),oS=m.useInsertionEffect||qx;function sS({prop:e,defaultProp:t,onChange:n=aS(()=>{},`onChange`),caller:r}){let[i,a,o]=cS({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,m.useCallback(t=>{if(s){let n=lS(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}aS(sS,`useControllableState`);function cS({defaultProp:e,onChange:t}){let[n,r]=m.useState(e),i=m.useRef(n),a=m.useRef(t);return oS(()=>{a.current=t},[t]),m.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}aS(cS,`useUncontrolledState`);function lS(e){return typeof e==`function`}aS(lS,`isFunction`);var uS=Symbol(`RADIX:SYNC_STATE`);function dS(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=rS(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=m.useReducer((t,n)=>{if(n.type===uS)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,h=m.useRef(p);m.useEffect(()=>{h.current!==p&&(h.current=p,c||l(p))},[p,h,c]);let g=m.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return m.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:uS,state:i})},[i,d.state,c]),[g,f]}aS(dS,`useControllableStateReducer`);var fS=Object.defineProperty,pS=(e,t)=>fS(e,`name`,{value:t,configurable:!0});function mS(e){let t=m.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];r=wS(r),m.Children.forEach(r,e=>{if(bS(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;for(;SS(n)&&typeof OS==`function`;)n=OS(n._payload);a=_S(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=m.cloneElement(a,void 0,s):!o&&m.Children.count(r)===1&&m.isValidElement(r)&&(a=r);let c=a?yS(a):void 0,l=Vx(n,c);if(!a){if(r||r===0)throw Error(o?DS(e):ES(e));return r}let u=vS(i,a.props??{});return a.type!==m.Fragment&&(u.ref=n?l:c),m.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}pS(mS,`createSlot`);var hS=Symbol.for(`radix.slottable`);function gS(e){let t=pS(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=hS,t}pS(gS,`createSlottable`);var _S=pS((e,t)=>`child`in e.props?m.isValidElement(t)?m.cloneElement(t,void 0,e.props.children(t.props.children)):null:m.isValidElement(t)?t:null,`getSlottableElementFromSlottable`);function vS(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=TS(a,i))}return{...e,...n}}pS(vS,`mergeProps`);function yS(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}pS(yS,`getElementRef`);function bS(e){return m.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===hS}pS(bS,`isSlottable`);var xS=Symbol.for(`react.lazy`);function SS(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===xS&&`_payload`in e&&CS(e._payload)}pS(SS,`isLazyComponent`);function CS(e){return typeof e==`object`&&!!e&&`then`in e}pS(CS,`isPromiseLike`);function wS(e){let t=e;for(;SS(t)&&typeof OS==`function`;)t=OS(t._payload);return t}pS(wS,`useUnwrappedLazy`);function TS(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}pS(TS,`concatAriaDescribedby`);var ES=pS(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),DS=pS(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),OS=m.use,kS=Object.defineProperty,AS=(e,t)=>kS(e,`name`,{value:t,configurable:!0}),jS=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=mS(`Primitive.${t}`),r=m.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,h.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function MS(e,t){e&&Nm.flushSync(()=>e.dispatchEvent(t))}AS(MS,`dispatchDiscreteCustomEvent`);var NS=Object.defineProperty,PS=(e,t)=>NS(e,`name`,{value:t,configurable:!0}),FS=m.useInsertionEffect;function IS(e){let t=m.useRef(e);return typeof FS==`function`?FS(()=>{t.current=e}):qx(()=>{t.current=e}),m.useMemo(()=>((...e)=>t.current?.(...e)),[])}PS(IS,`useCallbackRef`);var LS=Object.defineProperty,RS=(e,t)=>LS(e,`name`,{value:t,configurable:!0}),zS=`dismissableLayer.update`,BS=`dismissableLayer.pointerDownOutside`,VS=`dismissableLayer.focusOutside`,HS,US=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),WS=m.forwardRef(RS(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=m.useContext(US),[d,f]=m.useState(null),p=d?.ownerDocument??globalThis?.document,[,g]=m.useState({}),_=Vx(t,f),v=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=y?v.indexOf(y):-1,x=d?v.indexOf(d):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,C=x>=b,w=m.useRef(!1),T=qS(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:w,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:m.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return C&&!t},[u.branches,C])}),E=JS(e=>{if(r&&w.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),D=d?x===v.length-1:!1,O=IS(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return m.useEffect(()=>{if(D)return p.addEventListener(`keydown`,O,{capture:!0}),()=>p.removeEventListener(`keydown`,O,{capture:!0})},[p,D,O]),m.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(HS=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),YS(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=HS))}},[d,p,n,u]),m.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),YS())},[d,u]),m.useEffect(()=>{let e=RS(()=>g({}),`handleUpdate`);return document.addEventListener(zS,e),()=>document.removeEventListener(zS,e)},[]),(0,h.jsx)(jS.div,{...l,ref:_,style:{pointerEvents:S?C?`auto`:`none`:void 0,...e.style},onFocusCapture:$(e.onFocusCapture,E.onFocusCapture),onBlurCapture:$(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:$(e.onPointerDownCapture,T.onPointerDownCapture)})},`DismissableLayer`));function GS(){let e=m.useContext(US),[t,n]=m.useState(null);return m.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}RS(GS,`useDismissableLayerSurface`);var KS=RS(()=>!0,`IS_TRUE`);function qS(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=KS}=t,s=IS(e),c=m.useRef(!1),l=m.useRef(!1),u=m.useRef(new Map),d=m.useRef(()=>{});return m.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}RS(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}RS(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}RS(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}RS(p,`handleInteractionBubble`);let m=RS(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||XS(BS,s,p,{discrete:!0})};if(RS(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:RS(()=>c.current=!0,`onPointerDownCapture`)}}RS(qS,`usePointerDownOutside`);function JS(e,t=globalThis?.document){let n=IS(e),r=m.useRef(!1);return m.useEffect(()=>{let e=RS(e=>{e.target&&!r.current&&XS(VS,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:RS(()=>r.current=!0,`onFocusCapture`),onBlurCapture:RS(()=>r.current=!1,`onBlurCapture`)}}RS(JS,`useFocusOutside`);function YS(){let e=new CustomEvent(zS);document.dispatchEvent(e)}RS(YS,`dispatchUpdate`);function XS(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?MS(i,a):i.dispatchEvent(a)}RS(XS,`handleAndDispatchCustomEvent`);var ZS=Object.defineProperty,QS=(e,t)=>ZS(e,`name`,{value:t,configurable:!0}),$S=`focusScope.autoFocusOnMount`,eC=`focusScope.autoFocusOnUnmount`,tC={bubbles:!1,cancelable:!0},nC=m.forwardRef(QS(function(e,t){let{loop:n=!1,trapped:r=!1,branches:i,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[c,l]=m.useState(null),u=IS(a),d=IS(o),f=m.useRef(null),p=Vx(t,l),g=m.useRef(i);m.useEffect(()=>{g.current=i});let _=m.useCallback(e=>e?c?.contains(e)?!0:!!g.current?.some(t=>t.contains(e)):!1,[c]),v=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(r){let e=function(e){if(v.paused||!c)return;let t=e.target;_(t)?f.current=t:pC(f.current,{select:!0})},t=function(e){if(v.paused||!c)return;let t=e.relatedTarget;t!==null&&(_(t)||pC(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&pC(c)};QS(e,`handleFocusIn`),QS(t,`handleFocusOut`),QS(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,c,v.paused,_]),m.useEffect(()=>{if(c){mC.add(v);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent($S,tC);c.addEventListener($S,u),c.dispatchEvent(t),t.defaultPrevented||(sC(_C(lC(c)),{select:!0}),document.activeElement===e&&pC(c))}return()=>{c.removeEventListener($S,u);let t=c.ownerDocument,n=CustomEvent;setTimeout(()=>{let r=new n(eC,tC);c.addEventListener(eC,d),c.dispatchEvent(r),r.defaultPrevented||pC(e??t.body,{select:!0}),c.removeEventListener(eC,d),mC.remove(v)},0)}}},[c,u,d,v]);let y=m.useCallback(e=>{if(!n&&!r||v.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=cC(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&pC(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&pC(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,v.paused]);return(0,h.jsx)(jS.div,{tabIndex:-1,...s,ref:p,onKeyDown:y})},`FocusScope`)),rC=m.createContext(null);function iC({registry:e,children:t}){return e?(0,h.jsx)(rC.Provider,{value:e,children:t}):t}QS(iC,`FocusScopeBranchProvider`);function aC(){let[e,t]=m.useState([]);return{nodes:e,registry:m.useMemo(()=>({add:QS(e=>t(t=>t.includes(e)?t:[...t,e]),`add`),remove:QS(e=>t(t=>t.filter(t=>t!==e)),`remove`)}),[])}}QS(aC,`useFocusScopeBranchRegistry`);function oC(e){let t=m.useContext(rC);m.useEffect(()=>{if(e&&t)return t.add(e),()=>t.remove(e)},[e,t])}QS(oC,`useFocusScopeBranch`);function sC(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(pC(r,{select:t}),document.activeElement!==n)return}QS(sC,`focusFirst`);function cC(e){let t=lC(e);return[uC(t,e),uC(t.reverse(),e)]}QS(cC,`getTabbableEdges`);function lC(e){let t=[],n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:QS(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}QS(lC,`getTabbableCandidates`);function uC(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):dC(r,{upTo:t})))return r}QS(uC,`findVisible`);function dC(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}QS(dC,`isHidden`);function fC(e){return e.tagName===`INPUT`&&typeof e.select==`function`}QS(fC,`isSelectableInput`);function pC(e,{select:t=!1}={}){if(e&&e.focus){let n=(e.ownerDocument??document).activeElement;e.focus({preventScroll:!0}),e!==n&&fC(e)&&t&&e.select()}}QS(pC,`focus`);var mC=hC();function hC(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=gC(e,t),e.unshift(t)},remove(t){e=gC(e,t),e[0]?.resume()}}}QS(hC,`createFocusScopesStack`);function gC(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}QS(gC,`arrayRemove`);function _C(e){return e.filter(e=>e.tagName!==`A`)}QS(_C,`removeLinks`);var vC=Object.defineProperty,yC=m.forwardRef(((e,t)=>vC(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=m.useState(!1);qx(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?Nm.createPortal((0,h.jsx)(jS.div,{...r,ref:t}),o):null},`Portal`)),bC=Object.defineProperty,xC=(e,t)=>bC(e,`name`,{value:t,configurable:!0});function SC(e,t){return m.useReducer((e,n)=>t[e][n]??e,e)}xC(SC,`useStateMachine`);var CC=xC(e=>{let{present:t,children:n}=e,r=wC(t),i=typeof n==`function`?n({present:r.isPresent}):m.Children.only(n),a=EC(r.ref,OC(i));return typeof n==`function`||r.isPresent?m.cloneElement(i,{ref:a}):null},`Presence`);function wC(e){let[t,n]=m.useState(),r=m.useRef(null),i=m.useRef(e),a=m.useRef(`none`),o=m.useRef(void 0),[s,c]=SC(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return m.useEffect(()=>{s===`mounted`?(a.current=o.current??DC(r.current),o.current=void 0):a.current=`none`},[s]),qx(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=DC(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),qx(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=xC(a=>{let o=DC(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=xC(e=>{e.target===t&&(a.current=DC(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:m.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=DC(t)}else r.current=null;n(e)},[])}}xC(wC,`usePresence`);function TC(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}xC(TC,`setRef`);function EC(...e){let t=m.useRef(e);return t.current=e,m.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=TC(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():TC(n[e],null)}}},[])}xC(EC,`useStableComposedRefs`);function DC(e){return e?.animationName||`none`}xC(DC,`getAnimationName`);function OC(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}xC(OC,`getElementRef`);var kC=Object.defineProperty,AC=(e,t)=>kC(e,`name`,{value:t,configurable:!0}),jC=0,MC=null;function NC(e){return PC(),e.children}AC(NC,`FocusGuards`);function PC(){m.useEffect(()=>{MC||={start:FC(),end:FC()};let{start:e,end:t}=MC;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),jC++,()=>{jC===1&&(MC?.start.remove(),MC?.end.remove(),MC=null),jC=Math.max(0,jC-1)}},[])}AC(PC,`useFocusGuards`);function FC(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}AC(FC,`createFocusGuard`);var IC=function(){return IC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},IC.apply(this,arguments)};function LC(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function RC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var zC=`right-scroll-bar-position`,BC=`width-before-scroll-bar`,VC=`with-scroll-bars-hidden`,HC=`--removed-body-scroll-bar-size`;function UC(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function WC(e,t){var n=(0,m.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var GC=typeof window<`u`?m.useLayoutEffect:m.useEffect,KC=new WeakMap;function qC(e,t){var n=WC(t||null,function(t){return e.forEach(function(e){return UC(e,t)})});return GC(function(){var t=KC.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||UC(e,null)}),i.forEach(function(e){r.has(e)||UC(e,a)})}KC.set(n,e)},[e]),n}function JC(e){return e}function YC(e,t){t===void 0&&(t=JC);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function XC(e){e===void 0&&(e={});var t=YC(null);return t.options=IC({async:!0,ssr:!1},e),t}var ZC=function(e){var t=e.sideCar,n=LC(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return m.createElement(r,IC({},n))};ZC.isSideCarExport=!0;function QC(e,t){return e.useMedium(t),ZC}var $C=XC(),ew=function(){},tw=m.forwardRef(function(e,t){var n=m.useRef(null),r=m.useState({onScrollCapture:ew,onWheelCapture:ew,onTouchMoveCapture:ew}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=LC(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=qC([n,t]),w=IC(IC({},x),i);return m.createElement(m.Fragment,null,u&&m.createElement(S,{sideCar:$C,removeScrollBar:l,shards:d,noRelative:p,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?m.cloneElement(m.Children.only(s),IC(IC({},w),{ref:C})):m.createElement(y,IC({},w,{className:c,ref:C}),s))});tw.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},tw.classNames={fullWidth:BC,zeroRight:zC};var nw=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function rw(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=nw();return t&&e.setAttribute(`nonce`,t),e}function iw(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function aw(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var ow=function(){var e=0,t=null;return{add:function(n){e==0&&(t=rw())&&(iw(t,n),aw(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},sw=function(){var e=ow();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},cw=function(){var e=sw();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},lw={left:0,top:0,right:0,gap:0},uw=function(e){return parseInt(e||``,10)||0},dw=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[uw(n),uw(r),uw(i)]},fw=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return lw;var t=dw(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},pw=cw(),mw=`data-scroll-locked`,hw=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
10
- .${VC} {
11
- overflow: hidden ${r};
12
- padding-right: ${s}px ${r};
13
- }
14
- body[${mw}] {
15
- overflow: hidden ${r};
16
- overscroll-behavior: contain;
17
- ${[t&&`position: relative ${r};`,n===`margin`&&`
18
- padding-left: ${i}px;
19
- padding-top: ${a}px;
20
- padding-right: ${o}px;
21
- margin-left:0;
22
- margin-top:0;
23
- margin-right: ${s}px ${r};
24
- `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
25
- }
26
-
27
- .${zC} {
28
- right: ${s}px ${r};
29
- }
30
-
31
- .${BC} {
32
- margin-right: ${s}px ${r};
33
- }
34
-
35
- .${zC} .${zC} {
36
- right: 0 ${r};
37
- }
38
-
39
- .${BC} .${BC} {
40
- margin-right: 0 ${r};
41
- }
42
-
43
- body[${mw}] {
44
- ${HC}: ${s}px;
45
- }
46
- `},gw=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},_w=function(){m.useEffect(function(){return document.body.setAttribute(mw,(gw()+1).toString()),function(){var e=gw()-1;e<=0?document.body.removeAttribute(mw):document.body.setAttribute(mw,e.toString())}},[])},vw=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;_w();var a=m.useMemo(function(){return fw(i)},[i]);return m.createElement(pw,{styles:hw(a,!t,i,n?``:`!important`)})},yw=!1;if(typeof window<`u`)try{var bw=Object.defineProperty({},"passive",{get:function(){return yw=!0,!0}});window.addEventListener(`test`,bw,bw),window.removeEventListener(`test`,bw,bw)}catch{yw=!1}var xw=yw?{passive:!1}:!1,Sw=function(e){return e.tagName===`TEXTAREA`},Cw=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Sw(e)&&n[t]===`visible`)},ww=function(e){return Cw(e,`overflowY`)},Tw=function(e){return Cw(e,`overflowX`)},Ew=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),kw(e,r)){var i=Aw(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Dw=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Ow=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},kw=function(e,t){return e===`v`?ww(t):Tw(t)},Aw=function(e,t){return e===`v`?Dw(t):Ow(t)},jw=function(e,t){return e===`h`&&t===`rtl`?-1:1},Mw=function(e,t,n,r,i){var a=jw(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Aw(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&kw(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Nw=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Pw=function(e){return[e.deltaX,e.deltaY]},Fw=function(e){return e&&`current`in e?e.current:e},Iw=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Lw=function(e){return`
47
- .block-interactivity-${e} {pointer-events: none;}
48
- .allow-interactivity-${e} {pointer-events: all;}
49
- `},Rw=0,zw=[];function Bw(e){var t=m.useRef([]),n=m.useRef([0,0]),r=m.useRef(),i=m.useState(Rw++)[0],a=m.useState(cw)[0],o=m.useRef(e);m.useEffect(function(){o.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=RC([e.lockRef.current],(e.shards||[]).map(Fw),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=m.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Nw(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Ew(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Ew(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Mw(h,t,e,h===`h`?s:c,!0)},[]),c=m.useCallback(function(e){var n=e;if(zw.length&&zw[zw.length-1]===a){var r=`deltaY`in n?Pw(n):Nw(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Iw(e.delta,r)})[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var c=(o.current.shards||[]).map(Fw).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=m.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Vw(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=m.useCallback(function(e){n.current=Nw(e),r.current=void 0},[]),d=m.useCallback(function(t){l(t.type,Pw(t),t.target,s(t,e.lockRef.current))},[]),f=m.useCallback(function(t){l(t.type,Nw(t),t.target,s(t,e.lockRef.current))},[]);m.useEffect(function(){return zw.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,xw),document.addEventListener(`touchmove`,c,xw),document.addEventListener(`touchstart`,u,xw),function(){zw=zw.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,xw),document.removeEventListener(`touchmove`,c,xw),document.removeEventListener(`touchstart`,u,xw)}},[]);var p=e.removeScrollBar,h=e.inert;return m.createElement(m.Fragment,null,h?m.createElement(a,{styles:Lw(i)}):null,p?m.createElement(vw,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Vw(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Hw=QC($C,Bw),Uw=m.forwardRef(function(e,t){return m.createElement(tw,IC({},e,{ref:t,sideCar:Hw}))});Uw.classNames=tw.classNames;var Ww=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Gw=new WeakMap,Kw=new WeakMap,qw={},Jw=0,Yw=function(e){return e&&(e.host||Yw(e.parentNode))},Xw=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Yw(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Zw=function(e,t,n,r){var i=Xw(t,Array.isArray(e)?e:[e]);qw[n]||(qw[n]=new WeakMap);var a=qw[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Gw.get(e)||0)+1,l=(a.get(e)||0)+1;Gw.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Kw.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Jw++,function(){o.forEach(function(e){var t=Gw.get(e)-1,i=a.get(e)-1;Gw.set(e,t),a.set(e,i),t||(Kw.has(e)||e.removeAttribute(r),Kw.delete(e)),i||e.removeAttribute(n)}),Jw--,Jw||(Gw=new WeakMap,Gw=new WeakMap,Kw=new WeakMap,qw={})}},Qw=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Ww(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Zw(r,i,n,`aria-hidden`)):function(){return null}},$w=Object.defineProperty,eT=(e,t)=>$w(e,`name`,{value:t,configurable:!0}),tT=`Dialog`,[nT,rT]=Gx(tT),[iT,aT]=nT(tT),oT=eT(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=m.useRef(null),c=m.useRef(null),{nodes:l,registry:u}=aC(),[d,f]=sS({prop:r,defaultProp:i??!1,onChange:a,caller:tT}),[p,g]=m.useState(0),[_,v]=m.useState(0);return(0,h.jsx)(iT,{scope:t,triggerRef:s,contentRef:c,contentId:Qx(),titleId:Qx(),descriptionId:Qx(),titlePresent:p>0,descriptionPresent:_>0,setTitleCount:g,setDescriptionCount:v,open:d,onOpenChange:f,onOpenToggle:m.useCallback(()=>f(e=>!e),[f]),modal:o,branchNodes:l,branchRegistry:u,children:n})},`Dialog`),sT=`DialogPortal`,[cT,lT]=nT(sT,{forceMount:void 0}),uT=eT(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=aT(sT,t);return(0,h.jsx)(cT,{scope:t,forceMount:n,children:m.Children.map(r,e=>(0,h.jsx)(CC,{present:n||a.open,children:(0,h.jsx)(yC,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),dT=`DialogOverlay`,fT=m.forwardRef(eT(function(e,t){let n=lT(dT,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=aT(dT,e.__scopeDialog);return a.modal?(0,h.jsx)(CC,{present:r||a.open,children:(0,h.jsx)(mT,{...i,ref:t})}):null},`DialogOverlay`)),pT=mS(`DialogOverlay.RemoveScroll`),mT=m.forwardRef(eT(function(e,t){let{__scopeDialog:n,...r}=e,i=aT(dT,n),a=Vx(t,GS());return(0,h.jsx)(Uw,{as:pT,allowPinchZoom:!0,shards:m.useMemo(()=>[i.contentRef,...i.branchNodes.map(e=>({current:e}))],[i.contentRef,i.branchNodes]),children:(0,h.jsx)(jS.div,{"data-state":wT(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),hT=`DialogContent`,gT=m.forwardRef(eT(function(e,t){let n=lT(hT,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=aT(hT,e.__scopeDialog);return(0,h.jsx)(CC,{present:r||a.open,children:a.modal?(0,h.jsx)(_T,{...i,ref:t}):(0,h.jsx)(vT,{...i,ref:t})})},`DialogContent`)),_T=m.forwardRef(eT(function(e,t){let n=aT(hT,e.__scopeDialog),r=m.useRef(null),i=Vx(t,n.contentRef,r);return m.useEffect(()=>{let e=r.current;if(e)return Qw(e)},[]),(0,h.jsx)(yT,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:$(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:$(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:$(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),vT=m.forwardRef(eT(function(e,t){let n=aT(hT,e.__scopeDialog),r=m.useRef(!1),i=m.useRef(!1);return(0,h.jsx)(yT,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),yT=m.forwardRef(eT(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,"aria-describedby":o,children:s,...c}=e,l=aT(hT,n);return PC(),(0,h.jsx)(iC,{registry:l.branchRegistry,children:(0,h.jsx)(nC,{asChild:!0,loop:!0,trapped:r,branches:l.branchNodes,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,h.jsx)(WS,{role:`dialog`,id:l.contentId,"aria-labelledby":l.titlePresent?l.titleId:void 0,"aria-describedby":l.descriptionPresent?CT(o,l.descriptionId):o,"data-state":wT(l.open),...c,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1),children:s})})})},`DialogContentImpl`)),bT=m.forwardRef(eT(function(e,t){let{__scopeDialog:n,...r}=e,i=aT(`DialogTitle`,n),{setTitleCount:a}=i;return qx(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,h.jsx)(jS.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),xT=`DialogClose`,ST=m.forwardRef(eT(function(e,t){let{__scopeDialog:n,...r}=e,i=aT(xT,n);return(0,h.jsx)(jS.button,{type:`button`,...r,ref:t,onClick:$(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function CT(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}eT(CT,`concatAriaDescribedby`);function wT(e){return e?`open`:`closed`}eT(wT,`getState`);function TT(){return(0,h.jsx)(fT,{asChild:!0,forceMount:!0,children:(0,h.jsx)(U.div,{className:`fixed inset-0 z-40 bg-overlay backdrop-blur-[3px]`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2}})})}function ET({open:e,onOpenChange:t,title:n,description:r,children:i,footer:a,className:o}){return(0,h.jsx)(oT,{open:e,onOpenChange:t,children:(0,h.jsx)(Ef,{children:e&&(0,h.jsxs)(uT,{forceMount:!0,children:[(0,h.jsx)(TT,{}),(0,h.jsx)(`div`,{className:`pointer-events-none fixed inset-0 z-50 flex items-center justify-center p-4`,children:(0,h.jsx)(gT,{asChild:!0,forceMount:!0,"aria-describedby":void 0,children:(0,h.jsxs)(U.div,{initial:{opacity:0,scale:.96,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.97,y:6},transition:Ab,className:J(`pointer-events-auto w-full max-w-md rounded-2xl border border-border bg-surface shadow-pop outline-none`,o),children:[(0,h.jsxs)(`div`,{className:`flex items-start justify-between gap-4 px-5 pt-5`,children:[(0,h.jsxs)(`div`,{children:[(0,h.jsx)(bT,{className:`text-[15px] font-semibold tracking-[-0.01em] text-fg`,children:n}),r&&(0,h.jsx)(`p`,{className:`mt-1 text-[13px] leading-relaxed text-fg-3`,children:r})]}),(0,h.jsx)(ST,{asChild:!0,children:(0,h.jsx)(Q,{variant:`ghost`,size:`icon-sm`,"aria-label":`关闭`,children:(0,h.jsx)(wb,{className:`size-4`})})})]}),i&&(0,h.jsx)(`div`,{className:`px-5 pt-4 pb-1`,children:i}),a&&(0,h.jsx)(`div`,{className:`flex justify-end gap-2 px-5 pt-3 pb-5`,children:a})]})})})]})})})}function DT({open:e,onOpenChange:t,title:n,subtitle:r,headerExtra:i,children:a,className:o}){return(0,h.jsx)(oT,{open:e,onOpenChange:t,children:(0,h.jsx)(Ef,{children:e&&(0,h.jsxs)(uT,{forceMount:!0,children:[(0,h.jsx)(TT,{}),(0,h.jsx)(gT,{asChild:!0,forceMount:!0,"aria-describedby":void 0,children:(0,h.jsxs)(U.aside,{initial:{x:`100%`,opacity:.6},animate:{x:0,opacity:1},exit:{x:`100%`,opacity:.6},transition:Z,className:J(`fixed inset-y-2 right-2 z-50 flex w-[min(560px,calc(100vw-1rem))] flex-col overflow-hidden rounded-2xl border border-border bg-surface shadow-pop outline-none`,o),children:[(0,h.jsxs)(`div`,{className:`flex items-start justify-between gap-4 border-b border-border px-6 pt-5 pb-4`,children:[(0,h.jsxs)(`div`,{className:`min-w-0`,children:[(0,h.jsx)(bT,{className:`truncate text-[17px] font-semibold tracking-[-0.02em] text-fg`,children:n}),r&&(0,h.jsx)(`div`,{className:`mt-1 text-[13px] text-fg-3`,children:r})]}),(0,h.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[i,(0,h.jsx)(ST,{asChild:!0,children:(0,h.jsx)(Q,{variant:`ghost`,size:`icon`,"aria-label":`关闭`,children:(0,h.jsx)(wb,{className:`size-4`})})})]})]}),(0,h.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:a})]})})]})})})}var OT=`w-full rounded-[10px] border border-border bg-surface text-[13.5px] text-fg placeholder:text-fg-3 shadow-[inset_0_1px_1px_rgb(0_0_0/0.02)] transition-[border-color,box-shadow] duration-150 outline-none hover:border-border-strong focus:border-accent focus:shadow-[0_0_0_3px_var(--ring)] disabled:cursor-not-allowed disabled:opacity-60 aria-[invalid=true]:border-danger aria-[invalid=true]:focus:shadow-[0_0_0_3px_var(--danger-soft)]`,kT=(0,m.forwardRef)(function({className:e,icon:t,...n},r){return t?(0,h.jsxs)(`div`,{className:J(`relative`,e),children:[(0,h.jsx)(`span`,{className:`pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-fg-3 [&>svg]:size-4`,children:t}),(0,h.jsx)(`input`,{ref:r,className:J(OT,`h-9 pr-3 pl-9`),...n})]}):(0,h.jsx)(`input`,{ref:r,className:J(OT,`h-9 px-3`,e),...n})}),AT=(0,m.forwardRef)(function({className:e,...t},n){return(0,h.jsx)(`textarea`,{ref:n,className:J(OT,`min-h-20 resize-y px-3 py-2 leading-relaxed`,e),...t})});function jT({label:e,hint:t,error:n,required:r,htmlFor:i,children:a,className:o}){return(0,h.jsxs)(`div`,{className:J(`space-y-1.5`,o),children:[(0,h.jsxs)(`label`,{htmlFor:i,className:`flex items-center gap-1 text-[12.5px] font-medium text-fg-2`,children:[e,r&&(0,h.jsx)(`span`,{className:`text-danger`,children:`*`})]}),a,n?(0,h.jsx)(`p`,{className:`text-[12px] text-danger`,children:n}):t&&(0,h.jsx)(`p`,{className:`text-[12px] leading-relaxed text-fg-3`,children:t})]})}var MT=Object.defineProperty,NT=(e,t)=>MT(e,`name`,{value:t,configurable:!0});function PT(e){let t=e+`CollectionProvider`,[n,r]=Gx(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=NT(e=>{let{scope:t,children:n}=e,r=m.useRef(null),a=m.useRef(new Map).current;return(0,h.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=mS(s),l=m.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Vx(t,a(s,n).collectionRef);return(0,h.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=mS(u),p=m.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=m.useRef(null),s=Vx(t,o),c=a(u,n);return m.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,h.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function g(t){let n=a(e+`CollectionConsumer`,t);return m.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return NT(g,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},g,r]}NT(PT,`createCollection`);var FT=new WeakMap,IT=class e extends Map{static{NT(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],FT.set(this,!0)}set(e,t){return FT.get(this)&&!this.has(e)&&this.#e.push(e),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=r?this.size:this.size+1,a=zT(e),o=a>=0?Math.min(a,i-1):Math.max(i+a,0);if(r?this.#e.indexOf(t)===o:o===this.size)return this.set(t,n),this;let s=this.#e.filter(e=>e!==t);s.splice(o,0,t);let c=s.map(e=>[e,e===t?n:this.get(e)]);this.clear();for(let[e,t]of c)this.set(e,t);return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<r?r-1:r;return this.insert(a,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<=r?r:r+1;return this.insert(a,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=LT(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=LT(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return LT(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=0,a=n;for(let e of this)a=i===0&&!r?e:Reflect.apply(t,this,[a,e,i,this]),i++;return a}reduceRight(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=n;for(let e=this.size-1;e>=0;e--){let n=this.entryAt(e);i=e===this.size-1&&!r?n:Reflect.apply(t,this,[i,n,e,this])}return i}sort(e){if(typeof e!=`function`)throw TypeError(`OrderedDict.sort requires a compare function`);let t=[...this.entries()].sort(e);this.clear();for(let[e,n]of t)this.set(e,n);return this}toSorted(t){if(typeof t!=`function`)throw TypeError(`OrderedDict.toSorted requires a compare function`);let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e;for(let e of this.#e.slice(t,n))r.set(e,this.get(e));return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function LT(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=RT(e,t);return n===-1?void 0:e[n]}NT(LT,`at`);function RT(e,t){let n=e.length,r=zT(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}NT(RT,`toSafeIndex`);function zT(e){return e!==e||e===0?0:Math.trunc(e)}NT(zT,`toSafeInteger`);function BT(e){let t=e+`CollectionProvider`,[n,r]=Gx(t),[i,a]=n(t);i.displayName=e+`CollectionStableContextProvider`;let[o,s]=n(t);o.displayName=e+`CollectionStatefulContextProvider`;let c=NT(({state:e,...t})=>e?(0,h.jsx)(u,{...t,state:e}):(0,h.jsx)(l,{...t}),`CollectionProvider`);c.displayName=t;let l=NT(e=>{let t=y();return(0,h.jsx)(u,{...e,state:t})},`CollectionInit`);l.displayName=e+`CollectionInit`;let u=NT(e=>{let{scope:t,children:n,state:r}=e,a=m.useRef(null),[s,c]=m.useState(null),l=Vx(a,c),[u,d]=r,f=m.useRef(new IT),p=m.useCallback(()=>{let e=f.current;return UT(e)||e.sort(WT),e},[]);return m.useEffect(()=>{if(!s)return;let e=GT(()=>{d(e=>{let t=e.toSorted(WT);return t.some(([t],n)=>e.keyAt(n)!==t)?t:e})});return e.observe(s,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[s,d]),(0,h.jsx)(i,{scope:t,collectionElementRef:l,collectionElementRefObject:a,getCollection:p,setCollection:d,registryRef:f,children:(0,h.jsx)(o,{scope:t,collectionElement:s,collection:u,children:n})})},`CollectionProviderImpl`);u.displayName=e+`CollectionProviderImpl`;let d=e+`CollectionSlot`,f=mS(d),p=m.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Vx(t,a(d,n).collectionElementRef);return(0,h.jsx)(f,{ref:i,children:r})});p.displayName=d;let g=e+`CollectionItemSlot`,_=mS(g),v=m.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=m.useRef(null),{setCollection:s,registryRef:c}=a(g,n),l=m.useRef(i);VT(l.current,i)||(l.current=i);let u=l.current,d=Vx(t,m.useCallback(e=>{let t=c.current;e?t.set(e,{...l.current,element:e}):o.current&&t.delete(o.current)},[c]),o);qx(()=>{let e=o.current,t=c.current;e&&t.has(e)&&t.set(e,{...u,element:e})},[u,c]);let f=m.useRef(null);return m.useEffect(()=>{let e=o.current,t=f.current;((t?.element??null)!==e||e&&t?.itemData!==u)&&(f.current=e?{element:e,itemData:u}:null,s(n=>{let r=new IT(n);return t&&t.element!==e&&r.delete(t.element),e&&r.set(e,{...u,element:e}),r.sort(WT)}))}),m.useEffect(()=>()=>{let e=f.current;f.current=null,e&&s(t=>{if(!t.has(e.element))return t;let n=new IT(t);return n.delete(e.element),n})},[s]),(0,h.jsx)(_,{"data-radix-collection-item":``,ref:d,children:r})});v.displayName=g;function y(){return m.useState(new IT)}NT(y,`useInitCollection`);function b(t){let{collection:n}=s(e+`CollectionConsumer`,t);return n}NT(b,`useCollection`);function x(t){let{getCollection:n}=a(e+`CollectionConsumer`,t);return n}return NT(x,`useGetCollection`),[{Provider:c,Slot:p,ItemSlot:v},{createCollectionScope:r,useCollection:b,useGetCollection:x,useInitCollection:y}]}NT(BT,`createCollection`);function VT(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}NT(VT,`shallowEqual`);function HT(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}NT(HT,`isElementPreceding`);function UT(e){let t;for(let n of e.keys()){if(t){let e=t.compareDocumentPosition(n);if(!(e&Node.DOCUMENT_POSITION_DISCONNECTED)&&e&Node.DOCUMENT_POSITION_PRECEDING)return!1}t=n}return!0}NT(UT,`isInDocumentOrder`);function WT(e,t){return!e[1].element||!t[1].element?0:HT(e[1].element,t[1].element)?-1:1}NT(WT,`sortByDocumentPosition`);function GT(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}NT(GT,`getChildListObserver`);var KT=Object.defineProperty,qT=(e,t)=>KT(e,`name`,{value:t,configurable:!0}),JT={LTR:`ltr`,RTL:`rtl`},YT=m.createContext(void 0);function XT(e){let t=m.useContext(YT);return e||t||JT.LTR}qT(XT,`useDirection`);var ZT=[`top`,`right`,`bottom`,`left`],QT=Math.min,$T=Math.max,eE=Math.round,tE=Math.floor,nE=e=>({x:e,y:e}),rE={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function iE(e,t,n){return $T(e,QT(t,n))}function aE(e,t){return typeof e==`function`?e(t):e}function oE(e){return e.split(`-`)[0]}function sE(e){return e.split(`-`)[1]}function cE(e){return e===`x`?`y`:`x`}function lE(e){return e===`y`?`height`:`width`}function uE(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function dE(e){return cE(uE(e))}function fE(e,t,n){n===void 0&&(n=!1);let r=sE(e),i=dE(e),a=lE(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=xE(o)),[o,xE(o)]}function pE(e){let t=xE(e);return[mE(e),t,mE(t)]}function mE(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var hE=[`left`,`right`],gE=[`right`,`left`],_E=[`top`,`bottom`],vE=[`bottom`,`top`];function yE(e,t,n){switch(e){case`top`:case`bottom`:return n?t?gE:hE:t?hE:gE;case`left`:case`right`:return t?_E:vE;default:return[]}}function bE(e,t,n,r){let i=sE(e),a=yE(oE(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(mE)))),a}function xE(e){let t=oE(e);return rE[t]+e.slice(t.length)}function SE(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function CE(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:SE(e)}function wE(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function TE(e,t,n){let{reference:r,floating:i}=e,a=uE(t),o=dE(t),s=lE(o),c=oE(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=sE(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function EE(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=aE(t,e),p=CE(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=wE(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=wE(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var DE=50,OE=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:EE},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=TE(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<DE&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=TE(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},kE=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=aE(e,t)||{};if(l==null)return{};let d=CE(u),f={x:n,y:r},p=dE(i),m=lE(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;C&&await(o.isElement==null?void 0:o.isElement(S))||(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=QT(d[_],T),D=QT(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=iE(E,k,O),j=!c.arrow&&sE(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,M=j?k<E?k-E:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),AE=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=aE(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=oE(r),_=uE(o),v=oE(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[xE(o)]:pE(o)),x=p!==`none`;!d&&x&&b.push(...bE(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=fE(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===uE(t)||T.every(e=>uE(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=uE(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function jE(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ME(e){return ZT.some(t=>e[t]>=0)}var NE=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=aE(e,t);switch(i){case`referenceHidden`:{let e=jE(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ME(e)}}}case`escaped`:{let e=jE(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:ME(e)}}}default:return{}}}}},PE=new Set([`left`,`top`]);async function FE(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=oE(n),s=sE(n),c=uE(n)===`y`,l=PE.has(o)?-1:1,u=a&&c?-1:1,d=aE(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var IE=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await FE(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},LE=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=aE(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=uE(i),p=cE(f),m=u[p],h=u[f],g=(e,t)=>iE(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},RE=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=aE(e,t),u={x:n,y:r},d=uE(i),f=cE(d),p=u[f],m=u[d],h=aE(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=PE.has(oE(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},zE=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=aE(e,t),c=await i.detectOverflow(t,s),l=oE(n),u=sE(n),d=uE(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=QT(p-c[m],g),y=QT(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*$T(c.left,c.right):S=p-2*$T(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function BE(){return typeof window<`u`}function VE(e){return WE(e)?(e.nodeName||``).toLowerCase():`#document`}function HE(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function UE(e){return((WE(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function WE(e){return BE()?e instanceof Node||e instanceof HE(e).Node:!1}function GE(e){return BE()?e instanceof Element||e instanceof HE(e).Element:!1}function KE(e){return BE()?e instanceof HTMLElement||e instanceof HE(e).HTMLElement:!1}function qE(e){return!BE()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof HE(e).ShadowRoot}function JE(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=aD(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function YE(e){return/^(table|td|th)$/.test(VE(e))}function XE(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var ZE=/transform|translate|scale|rotate|perspective|filter/,QE=/paint|layout|strict|content/,$E=e=>!!e&&e!==`none`,eD;function tD(e){let t=GE(e)?aD(e):e;return $E(t.transform)||$E(t.translate)||$E(t.scale)||$E(t.rotate)||$E(t.perspective)||!rD()&&($E(t.backdropFilter)||$E(t.filter))||ZE.test(t.willChange||``)||QE.test(t.contain||``)}function nD(e){let t=sD(e);for(;KE(t)&&!iD(t);){if(tD(t))return t;if(XE(t))return null;t=sD(t)}return null}function rD(){return eD??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),eD}function iD(e){return/^(html|body|#document)$/.test(VE(e))}function aD(e){return HE(e).getComputedStyle(e)}function oD(e){return GE(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function sD(e){if(VE(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||qE(e)&&e.host||UE(e);return qE(t)?t.host:t}function cD(e){let t=sD(e);return iD(t)?(e.ownerDocument||e).body:KE(t)&&JE(t)?t:cD(t)}function lD(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=cD(e),i=r===e.ownerDocument?.body,a=HE(r);if(i){let e=uD(a);return t.concat(a,a.visualViewport||[],JE(r)?r:[],e&&n?lD(e):[])}return t.concat(r,lD(r,[],n))}function uD(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function dD(e){let t=aD(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=KE(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=eE(n)!==a||eE(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function fD(e){return GE(e)?e:e.contextElement}function pD(e){let t=fD(e);if(!KE(t))return nE(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=dD(t),o=(a?eE(n.width):n.width)/r,s=(a?eE(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var mD=nE(0);function hD(e){let t=HE(e);return!rD()||!t.visualViewport?mD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function gD(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===HE(e)}function _D(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=fD(e),o=nE(1);t&&(r?GE(r)&&(o=pD(r)):o=pD(e));let s=gD(a,n,r)?hD(a):nE(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=HE(a),t=GE(r)?HE(r):r,n=e,i=uD(n);for(;i&&t!==n;){let e=pD(i),t=i.getBoundingClientRect(),r=aD(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=HE(i),i=uD(n)}}return wE({width:u,height:d,x:c,y:l})}function vD(e,t){let n=oD(e).scrollLeft;return t?t.left+n:_D(UE(e)).left+n}function yD(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-vD(e,n),y:n.top+t.scrollTop}}function bD(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=UE(r),s=t?XE(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=nE(1),u=nE(0),d=KE(r);if((d||!a)&&((VE(r)!==`body`||JE(o))&&(c=oD(r)),d)){let e=_D(r);l=pD(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?yD(o,c):nE(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function xD(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function SD(e){let t=oD(e),n=e.ownerDocument.body,r=$T(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=$T(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+vD(e),o=-t.scrollTop;return aD(n).direction===`rtl`&&(a+=$T(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var CD=25;function wD(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=HE(e),a=UE(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!rD()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(vD(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=CD&&(s-=o)}return{width:s,height:c,x:l,y:u}}function TD(e,t){let n=_D(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=pD(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function ED(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=wD(e,n,t);else if(t===`document`)r=SD(UE(e));else if(GE(t))r=TD(t,n);else{let n=hD(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return wE(r)}function DD(e,t){let n=t.get(e);if(n)return n;let r=lD(e,[],!1).filter(e=>GE(e)&&VE(e)!==`body`),i=null,a=aD(e).position===`fixed`,o=a?sD(e):e;for(;GE(o)&&!iD(o);){let e=aD(o),t=tD(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=sD(o)}return t.set(e,r),r}function OD(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?XE(t)?[]:DD(t,this._c):[].concat(n),r],o=ED(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=ED(t,a[e],i);s=$T(n.top,s),c=QT(n.right,c),l=QT(n.bottom,l),u=$T(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function kD(e){let{width:t,height:n}=dD(e);return{width:t,height:n}}function AD(e,t,n){let r=KE(t),i=UE(t),a=n===`fixed`,o=_D(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=nE(0);if((r||!a)&&((VE(t)!==`body`||JE(i))&&(s=oD(t)),r)){let e=_D(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=vD(i));let l=i&&!r&&!a?yD(i,s):nE(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function jD(e){return aD(e).position===`static`}function MD(e,t){if(!KE(e)||aD(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return UE(e)===n&&(n=n.ownerDocument.body),n}function ND(e,t){let n=HE(e);if(XE(e))return n;if(!KE(e)){let t=sD(e);for(;t&&!iD(t);){if(GE(t)&&!jD(t))return t;t=sD(t)}return n}let r=MD(e,t);for(;r&&YE(r)&&jD(r);)r=MD(r,t);return r&&iD(r)&&jD(r)&&!tD(r)?n:r||nD(e)||n}var PD=async function(e){let t=this.getOffsetParent||ND,n=this.getDimensions,r=await n(e.floating);return{reference:AD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function FD(e){return aD(e).direction===`rtl`}var ID={convertOffsetParentRelativeRectToViewportRelativeRect:bD,getDocumentElement:UE,getClippingRect:OD,getOffsetParent:ND,getElementRects:PD,getClientRects:xD,getDimensions:kD,getScale:pD,isElement:GE,isRTL:FD};function LD(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function RD(e,t,n){let r=null,i,a=UE(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=tE(d),h=tE(a.clientWidth-(u+f)),g=tE(a.clientHeight-(d+p)),_=tE(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:$T(0,QT(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!LD(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=HE(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function zD(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=fD(e),u=i||a?[...l?lD(l):[],...t?lD(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?RD(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?_D(e):null;c&&g();function g(){let t=_D(e);h&&!LD(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var BD=IE,VD=LE,HD=AE,UD=zE,WD=NE,GD=kE,KD=RE,qD=(e,t,n)=>{let r=new Map,i=n??{},a={...ID,...i.platform,_c:r};return OE(e,t,{...i,platform:a})},JD=typeof document<`u`?m.useLayoutEffect:function(){};function YD(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,i;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(!YD(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!YD(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function XD(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ZD(e,t){let n=XD(e);return Math.round(t*n)/n}function QD(e){let t=m.useRef(e);return JD(()=>{t.current=e}),t}function $D(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=m.useState(r);YD(f,r)||p(r);let[h,g]=m.useState(null),[_,v]=m.useState(null),y=m.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=m.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=m.useRef(null),w=m.useRef(null),T=m.useRef(u),E=c!=null,D=QD(c),O=QD(i),k=QD(l),A=m.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),qD(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!YD(T.current,t)&&(T.current=t,Nm.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);JD(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=m.useRef(!1);JD(()=>(j.current=!0,()=>{j.current=!1}),[]),JD(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=m.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=m.useMemo(()=>({reference:x,floating:S}),[x,S]),ee=m.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=ZD(N.floating,u.x),r=ZD(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...XD(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return m.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:ee}),[u,A,M,N,ee])}var eO=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:GD({element:r.current,padding:i}).fn(n):r?GD({element:r,padding:i}).fn(n):{}}}},tO=(e,t)=>{let n=BD(e);return{name:n.name,fn:n.fn,options:[e,t]}},nO=(e,t)=>{let n=VD(e);return{name:n.name,fn:n.fn,options:[e,t]}},rO=(e,t)=>({fn:KD(e).fn,options:[e,t]}),iO=(e,t)=>{let n=HD(e);return{name:n.name,fn:n.fn,options:[e,t]}},aO=(e,t)=>{let n=UD(e);return{name:n.name,fn:n.fn,options:[e,t]}},oO=(e,t)=>{let n=WD(e);return{name:n.name,fn:n.fn,options:[e,t]}},sO=(e,t)=>{let n=eO(e);return{name:n.name,fn:n.fn,options:[e,t]}},cO=Object.defineProperty,lO=(e,t)=>cO(e,`name`,{value:t,configurable:!0});function uO(e){let[t,n]=m.useState(void 0);return qx(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=0,r=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let i=r[0];window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{let t,r;if(`borderBoxSize`in i){let e=i.borderBoxSize,n=Array.isArray(e)?e[0]:e;t=n.inlineSize,r=n.blockSize}else t=e.offsetWidth,r=e.offsetHeight;n({width:t,height:r})})});return r.observe(e,{box:`border-box`}),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}n(void 0)},[e]),t}lO(uO,`useSize`);var dO=Object.defineProperty,fO=(e,t)=>dO(e,`name`,{value:t,configurable:!0}),pO={Partial:`partial`,Always:`always`},mO={Optimized:`optimized`,Always:`always`},hO=`Popper`,[gO,_O]=Gx(hO),[vO,yO]=gO(hO),bO=fO(e=>{let{__scopePopper:t,children:n}=e,[r,i]=m.useState(null),[a,o]=m.useState(void 0);return(0,h.jsx)(vO,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),xO=`PopperAnchor`,SO=m.forwardRef(fO(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=yO(xO,n),o=m.useRef(null),s=a.onAnchorChange,c=Vx(t,m.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=m.useRef(null);m.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&kO(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,h.jsx)(jS.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),CO=`PopperContent`,[wO,TO]=gO(CO),EO=m.forwardRef(fO(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=pO.Partial,hideWhenDetached:f=!1,updatePositionStrategy:p=mO.Optimized,onPlaced:g,..._}=e,v=yO(CO,n),[y,b]=m.useState(null),x=Vx(t,b),[S,C]=m.useState(null),w=uO(S),T=w?.width??0,E=w?.height??0,D=r+(a===`center`?``:`-`+a),O=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(l)?l:[l],A=k.length>0,j={padding:O,boundary:k.filter(DO),altBoundary:A},{refs:M,floatingStyles:N,placement:ee,isPositioned:P,middlewareData:F}=$D({strategy:`fixed`,placement:D,whileElementsMounted:fO((...e)=>zD(...e,{animationFrame:p===mO.Always}),`whileElementsMounted`),elements:{reference:v.anchor},middleware:[tO({mainAxis:i+E,alignmentAxis:o}),c&&nO({mainAxis:!0,crossAxis:!1,...d===pO.Partial?{limiter:rO()}:{},...j}),c&&iO({...j}),aO({...j,apply:fO(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),S&&sO({element:S,padding:s}),OO({arrowWidth:T,arrowHeight:E}),f&&oO(A?{strategy:`referenceHidden`,...j}:{strategy:`referenceHidden`,padding:j.padding,altBoundary:j.altBoundary})]}),te=v.setPlacementState;qx(()=>(te(ee),()=>{te(void 0)}),[ee,te]);let[ne,re]=kO(ee),ie=IS(g);qx(()=>{P&&ie?.()},[P,ie]);let ae=F.arrow?.x,oe=F.arrow?.y,se=F.arrow?.centerOffset!==0,[ce,le]=m.useState();return qx(()=>{y&&le(window.getComputedStyle(y).zIndex)},[y]),(0,h.jsx)(`div`,{ref:M.setFloating,"data-radix-popper-content-wrapper":``,style:{...N,transform:P?N.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ce,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(` `),...F.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,h.jsx)(wO,{scope:n,placedSide:ne,placedAlign:re,onArrowChange:C,arrowX:ae,arrowY:oe,shouldHideArrow:se,children:(0,h.jsx)(jS.div,{"data-side":ne,"data-align":re,..._,ref:x,style:{..._.style,animation:P?_.style?.animation:`none`}})})})},`PopperContent`));function DO(e){return e!==null}fO(DO,`isNotNull`);var OO=fO(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=kO(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function kO(e){let[t,n=`center`]=e.split(`-`);return[t,n]}fO(kO,`getSideAndAlignFromPlacement`);var AO=Object.defineProperty,jO=(e,t)=>AO(e,`name`,{value:t,configurable:!0}),MO=!1;function NO(){let[e,t]=m.useState(MO);return m.useEffect(()=>{MO||(MO=!0,t(!0))},[]),e}jO(NO,`useIsHydrated`);var PO=m.useSyncExternalStore;function FO(){return()=>{}}jO(FO,`subscribe`);function IO(){return PO(FO,()=>!0,()=>!1)}jO(IO,`useIsHydratedModern`);var LO=typeof PO==`function`?IO:NO,RO=Object.defineProperty,zO=(e,t)=>RO(e,`name`,{value:t,configurable:!0}),BO=`rovingFocusGroup.onEntryFocus`,VO={bubbles:!1,cancelable:!0},HO=`RovingFocusGroup`,[UO,WO,GO]=PT(HO),[KO,qO]=Gx(HO,[GO]),JO={Vertical:`vertical`,Horizontal:`horizontal`},YO={LTR:`ltr`,RTL:`rtl`},[XO,ZO]=KO(HO),QO=m.forwardRef(zO(function(e,t){return(0,h.jsx)(UO.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,h.jsx)(UO.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,h.jsx)($O,{...e,ref:t})})})},`RovingFocusGroup`)),$O=m.forwardRef(zO(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=m.useRef(null),p=Vx(t,f),g=XT(a),[_,v]=sS({prop:o,defaultProp:s??null,onChange:c,caller:HO}),[y,b]=m.useState(!1),x=IS(l),S=WO(n),C=m.useRef(!1),[w,T]=m.useState(0);return m.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(BO,x),()=>e.removeEventListener(BO,x)},[x]),(0,h.jsx)(XO,{scope:n,orientation:r,dir:g,loop:i,currentTabStopId:_,onItemFocus:m.useCallback(e=>v(e),[v]),onItemShiftTab:m.useCallback(()=>b(!0),[]),onFocusableItemAdd:m.useCallback(()=>T(e=>e+1),[]),onFocusableItemRemove:m.useCallback(()=>T(e=>e-1),[]),children:(0,h.jsx)(jS.div,{tabIndex:y||w===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:$(e.onMouseDown,()=>{C.current=!0}),onFocus:$(e.onFocus,e=>{let t=!C.current;if(e.target===e.currentTarget&&t&&!y){let t=new CustomEvent(BO,VO);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=S().filter(e=>e.focusable);ak([e.find(e=>e.active),e.find(e=>e.id===_),...e].filter(Boolean).map(e=>e.ref.current),u)}}C.current=!1}),onBlur:$(e.onBlur,()=>b(!1))})})},`RovingFocusGroupImpl`)),ek=`RovingFocusGroupItem`,tk=m.forwardRef(zO(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Qx(),l=a||c,u=ZO(ek,n),d=u.currentTabStopId===l,f=WO(n),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:_}=u,v=LO();return qx(()=>{if(v&&r)return p(),()=>g()},[v,r,p,g]),m.useEffect(()=>{if(!v&&r)return p(),()=>g()},[v,r,p,g]),(0,h.jsx)(UO.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,h.jsx)(jS.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:$(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:$(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:$(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=ik(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?ok(n,r+1):n.slice(r+1)}setTimeout(()=>ak(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:_!=null}):o})})},`RovingFocusGroupItem`)),nk={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function rk(e,t){return t===YO.RTL?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}zO(rk,`getDirectionAwareKey`);function ik(e,t,n){let r=rk(e.key,n);if(!(t===JO.Vertical&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===JO.Horizontal&&[`ArrowUp`,`ArrowDown`].includes(r)))return nk[r]}zO(ik,`getFocusIntent`);function ak(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}zO(ak,`focusFirst`);function ok(e,t){return e.map((n,r)=>e[(t+r)%e.length])}zO(ok,`wrapArray`);var sk=Object.defineProperty,ck=(e,t)=>sk(e,`name`,{value:t,configurable:!0}),lk=[`Enter`,` `],uk=[`ArrowDown`,`PageUp`,`Home`],dk=[`ArrowUp`,`PageDown`,`End`],fk=[...uk,...dk];[...lk],[...lk];var pk=`Menu`,[mk,hk,gk]=PT(pk),[_k,vk]=Gx(pk,[gk,_O,qO]),yk=_O(),bk=qO(),[xk,Sk]=_k(pk),[Ck,wk]=_k(pk),Tk=ck(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=yk(t),[c,l]=m.useState(null),u=m.useRef(!1),d=IS(a),f=XT(i);return m.useEffect(()=>{let e=ck(()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=ck(()=>u.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),m.useEffect(()=>{if(!n)return;let e=ck(()=>d(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,h.jsx)(bO,{...s,children:(0,h.jsx)(xk,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,h.jsx)(Ck,{scope:t,onClose:m.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})},`Menu`),Ek=m.forwardRef(ck(function(e,t){let{__scopeMenu:n,...r}=e,i=yk(n);return(0,h.jsx)(SO,{...i,...r,ref:t})},`MenuAnchor`)),Dk=`MenuPortal`,[Ok,kk]=_k(Dk,{forceMount:void 0}),Ak=ck(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Sk(Dk,t);return(0,h.jsx)(Ok,{scope:t,forceMount:n,children:(0,h.jsx)(CC,{present:n||a.open,children:(0,h.jsx)(yC,{asChild:!0,container:i,children:r})})})},`MenuPortal`),jk=`MenuContent`,[Mk,Nk]=_k(jk),Pk=m.forwardRef(ck(function(e,t){let n=kk(jk,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Sk(jk,e.__scopeMenu),o=wk(jk,e.__scopeMenu);return(0,h.jsx)(mk.Provider,{scope:e.__scopeMenu,children:(0,h.jsx)(CC,{present:r||a.open,children:(0,h.jsx)(mk.Slot,{scope:e.__scopeMenu,children:o.modal?(0,h.jsx)(Fk,{...i,ref:t}):(0,h.jsx)(Ik,{...i,ref:t})})})})},`MenuContent`)),Fk=m.forwardRef(ck(function(e,t){let n=Sk(jk,e.__scopeMenu),r=m.useRef(null),i=Vx(t,r);return m.useEffect(()=>{let e=r.current;if(e)return Qw(e)},[]),(0,h.jsx)(Rk,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:$(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),Ik=m.forwardRef(ck(function(e,t){let n=Sk(jk,e.__scopeMenu);return(0,h.jsx)(Rk,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),Lk=mS(`MenuContent.ScrollLock`),Rk=m.forwardRef(ck(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:g,..._}=e,v=Sk(jk,n),y=wk(jk,n),b=yk(n),x=bk(n),S=hk(n),[C,w]=m.useState(null),T=m.useRef(null),[E,D]=m.useState(null);oC(E);let{nodes:O,registry:k}=aC(),A=!!(i||g),j=Vx(t,T,v.onContentChange,D),M=m.useRef(0),N=m.useRef(``),ee=m.useRef(0),P=m.useRef(null),F=m.useRef(`right`),te=m.useRef(0),ne=m.useMemo(()=>g?[T,...O.map(e=>({current:e}))]:[],[T,O,g]),re=g?Uw:m.Fragment,ie=g?{as:Lk,allowPinchZoom:!0,shards:ne}:void 0,ae=ck(e=>{let t=N.current+e,n=S().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=tA(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;function s(e){N.current=e,window.clearTimeout(M.current),e!==``&&(M.current=window.setTimeout(()=>s(``),1e3))}ck(s,`updateSearch`),s(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);m.useEffect(()=>()=>window.clearTimeout(M.current),[]),PC();let oe=m.useCallback(e=>F.current===P.current?.side&&rA(e,P.current?.area),[]);return(0,h.jsx)(Mk,{scope:n,searchRef:N,onItemEnter:m.useCallback(e=>{oe(e)&&e.preventDefault()},[oe]),onItemLeave:m.useCallback(e=>{oe(e)||(T.current?.focus(),w(null))},[oe]),onTriggerLeave:m.useCallback(e=>{oe(e)&&e.preventDefault()},[oe]),pointerGraceTimerRef:ee,onPointerGraceIntentChange:m.useCallback(e=>{P.current=e},[]),children:(0,h.jsx)(iC,{registry:A?k:null,children:(0,h.jsx)(re,{...ie,children:(0,h.jsx)(nC,{asChild:!0,trapped:i,branches:O,onMountAutoFocus:$(a,e=>{e.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,h.jsx)(WS,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,h.jsx)(QO,{asChild:!0,...x,dir:y.dir,orientation:`vertical`,loop:r,currentTabStopId:C,onCurrentTabStopIdChange:w,onEntryFocus:$(c,e=>{y.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,h.jsx)(EO,{role:`menu`,"aria-orientation":`vertical`,"data-state":Xk(v.open),"data-radix-menu-content":``,dir:y.dir,...b,..._,ref:j,style:{outline:`none`,..._.style},onKeyDown:$(_.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&ae(e.key));let i=T.current;if(e.target!==i||!fk.includes(e.key))return;e.preventDefault();let a=S().filter(e=>!e.disabled).map(e=>e.ref.current);dk.includes(e.key)&&a.reverse(),$k(a)}),onBlur:$(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(M.current),N.current=``)}),onPointerMove:$(e.onPointerMove,iA(e=>{let t=e.target,n=te.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>te.current?`right`:`left`;F.current=t,te.current=e.clientX}}))})})})})})})})},`MenuContentImpl`)),zk=`MenuItem`,Bk=`menu.itemSelect`,Vk=m.forwardRef(ck(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=m.useRef(null),o=wk(zk,e.__scopeMenu),s=Nk(zk,e.__scopeMenu),c=Vx(t,a),l=m.useRef(!1),u=ck(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Bk,{bubbles:!0,cancelable:!0});e.addEventListener(Bk,e=>r?.(e),{once:!0}),MS(e,t),t.defaultPrevented?l.current=!1:o.onClose()}},`handleSelect`);return(0,h.jsx)(Hk,{...i,ref:c,disabled:n,onClick:$(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:$(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:$(e.onKeyDown,e=>{n||e.target!==e.currentTarget||(s.searchRef.current===``||e.key!==` `)&&lk.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),Hk=m.forwardRef(ck(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Nk(zk,n),s=bk(n),c=m.useRef(null),l=Vx(t,c),[u,d]=m.useState(!1),[f,p]=m.useState(``);return m.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,h.jsx)(mk.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,h.jsx)(tk,{asChild:!0,...s,focusable:!r,children:(0,h.jsx)(jS.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:$(e.onPointerMove,iA(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:$(e.onPointerLeave,iA(e=>o.onItemLeave(e))),onFocus:$(e.onFocus,()=>d(!0)),onBlur:$(e.onBlur,()=>d(!1))})})})},`MenuItemImpl`)),[Uk,Wk]=_k(`MenuRadioGroup`,{value:void 0,onValueChange:ck(()=>{},`onValueChange`)}),[Gk,Kk]=_k(`MenuItemIndicator`,{checked:!1}),qk=m.forwardRef(ck(function(e,t){let{__scopeMenu:n,...r}=e;return(0,h.jsx)(jS.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})},`MenuSeparator`)),[Jk,Yk]=_k(`MenuSub`);function Xk(e){return e?`open`:`closed`}ck(Xk,`getOpenState`);function Zk(e){return e===`indeterminate`}ck(Zk,`isIndeterminate`);function Qk(e){return Zk(e)?`indeterminate`:e?`checked`:`unchecked`}ck(Qk,`getCheckedState`);function $k(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}ck($k,`focusFirst`);function eA(e,t){return e.map((n,r)=>e[(t+r)%e.length])}ck(eA,`wrapArray`);function tA(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=eA(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}ck(tA,`getNextMatch`);function nA(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}ck(nA,`isPointInPolygon`);function rA(e,t){return t?nA({x:e.clientX,y:e.clientY},t):!1}ck(rA,`isPointerInGraceArea`);function iA(e){return t=>t.pointerType===`mouse`?e(t):void 0}ck(iA,`whenMouse`);var aA=Object.defineProperty,oA=(e,t)=>aA(e,`name`,{value:t,configurable:!0}),sA=`DropdownMenu`,[cA,lA]=Gx(sA,[vk]),uA=vk(),[dA,fA]=cA(sA),pA=oA(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=uA(t),l=m.useRef(null),[u,d]=sS({prop:i,defaultProp:a??!1,onChange:o,caller:sA});return(0,h.jsx)(dA,{scope:t,triggerId:Qx(),triggerRef:l,contentId:Qx(),open:u,onOpenChange:d,onOpenToggle:m.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,h.jsx)(Tk,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})},`DropdownMenu`),mA=`DropdownMenuTrigger`,hA=m.forwardRef(oA(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=fA(mA,n),o=uA(n),s=Vx(t,a.triggerRef);return(0,h.jsx)(Ek,{asChild:!0,...o,children:(0,h.jsx)(jS.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:$(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:$(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),gA=oA(e=>{let{__scopeDropdownMenu:t,...n}=e,r=uA(t);return(0,h.jsx)(Ak,{...r,...n})},`DropdownMenuPortal`),_A=`DropdownMenuContent`,vA=m.forwardRef(oA(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=fA(_A,n),a=uA(n),o=m.useRef(!1);return(0,h.jsx)(Pk,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:$(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:$(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),yA=m.forwardRef(oA(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=uA(n);return(0,h.jsx)(Vk,{...i,...r,ref:t})},`DropdownMenuItem`)),bA=m.forwardRef(oA(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=uA(n);return(0,h.jsx)(qk,{...i,...r,ref:t})},`DropdownMenuSeparator`)),xA=Object.defineProperty,SA=(e,t)=>xA(e,`name`,{value:t,configurable:!0}),CA={Automatic:`automatic`,Manual:`manual`},wA=`Tabs`,[TA,EA]=Gx(wA,[qO]),DA=qO(),[OA,kA]=TA(wA),AA=m.forwardRef(SA(function(e,t){let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=CA.Automatic,...l}=e,u=XT(s),[d,f]=sS({prop:r,onChange:i,defaultProp:a??``,caller:wA});return(0,h.jsx)(OA,{scope:n,baseId:Qx(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,h.jsx)(jS.div,{dir:u,"data-orientation":o,...l,ref:t})})},`Tabs`)),jA=`TabsList`,MA=m.forwardRef(SA(function(e,t){let{__scopeTabs:n,loop:r=!0,...i}=e,a=kA(jA,n),o=DA(n);return(0,h.jsx)(QO,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,h.jsx)(jS.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})},`TabsList`)),NA=`TabsTrigger`,PA=m.forwardRef(SA(function(e,t){let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=kA(NA,n),s=DA(n),c=LA(o.baseId,r),l=RA(o.baseId,r),u=r===o.value;return(0,h.jsx)(tk,{asChild:!0,...s,focusable:!i,active:u,children:(0,h.jsx)(jS.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:$(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?(e.currentTarget.focus(),o.onValueChange(r)):e.preventDefault()}),onKeyDown:$(e.onKeyDown,e=>{i||e.target!==e.currentTarget||[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:$(e.onFocus,()=>{let e=o.activationMode!==CA.Manual;!u&&!i&&e&&o.onValueChange(r)})})})},`TabsTrigger`)),FA=`TabsContent`,IA=m.forwardRef(SA(function(e,t){let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=kA(FA,n),c=LA(s.baseId,r),l=RA(s.baseId,r),u=r===s.value,d=m.useRef(u);return m.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,h.jsx)(CC,{present:i||u,children:({present:n})=>(0,h.jsx)(jS.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})},`TabsContent`));function LA(e,t){return`${e}-trigger-${t}`}SA(LA,`makeTriggerId`);function RA(e,t){return`${e}-content-${t}`}SA(RA,`makeContentId`);var zA=Object.defineProperty,BA=(e,t)=>zA(e,`name`,{value:t,configurable:!0}),VA=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),HA=m.forwardRef(BA(function(e,t){return(0,h.jsx)(jS.span,{...e,ref:t,style:{...VA,...e.style}})},`VisuallyHidden`)),UA=Object.defineProperty,WA=(e,t)=>UA(e,`name`,{value:t,configurable:!0}),[GA,KA]=Gx(`Tooltip`,[_O]),qA=_O(),JA=`TooltipProvider`,YA=700,XA=`tooltip.open`,[ZA,QA]=GA(JA),$A=WA(e=>{let{__scopeTooltip:t,delayDuration:n=YA,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=m.useRef(!0),s=m.useRef(!1),c=m.useRef(0);return m.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,h.jsx)(ZA,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:m.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:m.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:m.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),ej=`Tooltip`,[tj,nj]=GA(ej),rj=WA(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=QA(ej,e.__scopeTooltip),l=qA(t),[u,d]=m.useState(null),[f,p]=m.useState(void 0),g=Qx(),_=m.useRef(0),v=o??c.disableHoverableContent,y=s??c.delayDuration,b=m.useRef(!1),[x,S]=sS({prop:r,defaultProp:i??!1,onChange:WA(e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(XA))):c.onClose(),a?.(e)},`onChange`),caller:ej}),C=m.useMemo(()=>x?b.current?`delayed-open`:`instant-open`:`closed`,[x]),w=m.useCallback(()=>{window.clearTimeout(_.current),_.current=0,b.current=!1,S(!0)},[S]),T=m.useCallback(()=>{window.clearTimeout(_.current),_.current=0,S(!1)},[S]),E=m.useCallback(()=>{window.clearTimeout(_.current),_.current=window.setTimeout(()=>{b.current=!0,S(!0),_.current=0},y)},[y,S]);m.useEffect(()=>()=>{_.current&&=(window.clearTimeout(_.current),0)},[]);let D=f??g;return(0,h.jsx)(bO,{...l,children:(0,h.jsx)(tj,{scope:t,contentId:D,setContentId:p,open:x,stateAttribute:C,trigger:u,onTriggerChange:d,onTriggerEnter:m.useCallback(()=>{c.isOpenDelayedRef.current?E():w()},[c.isOpenDelayedRef,E,w]),onTriggerLeave:m.useCallback(()=>{v?T():(window.clearTimeout(_.current),_.current=0)},[T,v]),onOpen:w,onClose:T,disableHoverableContent:v,children:n})})},`Tooltip`),ij=`TooltipTrigger`,aj=m.forwardRef(WA(function(e,t){let{__scopeTooltip:n,"aria-describedby":r,...i}=e,a=nj(ij,n),o=QA(ij,n),s=qA(n),c=Vx(t,m.useRef(null),a.onTriggerChange),l=m.useRef(!1),u=m.useRef(!1),d=m.useCallback(()=>l.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener(`pointerup`,d),[d]),(0,h.jsx)(SO,{asChild:!0,...s,children:(0,h.jsx)(jS.button,{"aria-describedby":a.open?xj(r,a.contentId):r,"data-state":a.stateAttribute,...i,ref:c,onPointerMove:$(e.onPointerMove,e=>{e.pointerType!==`touch`&&!u.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),u.current=!0)}),onPointerLeave:$(e.onPointerLeave,()=>{a.onTriggerLeave(),u.current=!1}),onPointerDown:$(e.onPointerDown,()=>{a.open&&a.onClose(),l.current=!0,document.addEventListener(`pointerup`,d,{once:!0})}),onFocus:$(e.onFocus,()=>{l.current||a.onOpen()}),onBlur:$(e.onBlur,a.onClose),onClick:$(e.onClick,a.onClose)})})},`TooltipTrigger`)),oj=`TooltipPortal`,[sj,cj]=GA(oj,{forceMount:void 0}),lj=WA(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=nj(oj,t);return(0,h.jsx)(sj,{scope:t,forceMount:n,children:(0,h.jsx)(CC,{present:n||a.open,children:(0,h.jsx)(yC,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),uj=`TooltipContent`,dj=m.forwardRef(WA(function(e,t){let n=cj(uj,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=nj(uj,e.__scopeTooltip);return(0,h.jsx)(CC,{present:r||o.open,children:o.disableHoverableContent?(0,h.jsx)(mj,{side:i,...a,ref:t}):(0,h.jsx)(fj,{side:i,...a,ref:t})})},`TooltipContent`)),fj=m.forwardRef(WA(function(e,t){let n=nj(uj,e.__scopeTooltip),r=QA(uj,e.__scopeTooltip),i=m.useRef(null),a=Vx(t,i),[o,s]=m.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=m.useCallback(()=>{s(null),d(!1)},[d]),p=m.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=gj(r,hj(r,n.getBoundingClientRect())),a=_j(t.getBoundingClientRect()),o=yj([...i,...a]);s(o),d(!0)},[d]);return m.useEffect(()=>()=>f(),[f]),m.useEffect(()=>{if(c&&u){let e=WA(e=>p(e,u),`handleTriggerLeave`),t=WA(e=>p(e,c),`handleContentLeave`);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),m.useEffect(()=>{if(o){let e=WA(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!vj(n,o);r?f():i&&(f(),l())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,h.jsx)(mj,{...e,ref:a})},`TooltipContentHoverable`)),pj=gS(`TooltipContent`),mj=m.forwardRef(WA(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=nj(uj,n),u=qA(n),{onClose:d}=l,[f,p]=m.useState(null),g=Vx(t,p);oC(f),m.useEffect(()=>(document.addEventListener(XA,d),()=>document.removeEventListener(XA,d)),[d]),m.useEffect(()=>{if(l.trigger){let e=WA(e=>{e.target instanceof Node&&e.target.contains(l.trigger)&&d()},`handleScroll`);return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[l.trigger,d]);let{setContentId:_}=l;return qx(()=>(_(a),()=>{_(void 0)}),[a,_]),(0,h.jsx)(WS,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,h.jsxs)(EO,{"data-state":l.stateAttribute,role:i?void 0:`tooltip`,id:i?void 0:l.contentId,...u,...c,ref:g,style:{...c.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,h.jsx)(pj,{children:r}),i?(0,h.jsx)(HA,{id:l.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`));function hj(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}WA(hj,`getExitSideFromRect`);function gj(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}WA(gj,`getPaddedExitPoints`);function _j(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}WA(_j,`getPointsFromRect`);function vj(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}WA(vj,`isPointInPolygon`);function yj(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),bj(t)}WA(yj,`getHull`);function bj(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}WA(bj,`getHullPresorted`);function xj(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}WA(xj,`concatAriaDescribedby`);function Sj({content:e,children:t,side:n=`top`}){return(0,h.jsxs)(rj,{delayDuration:250,children:[(0,h.jsx)(aj,{asChild:!0,children:t}),(0,h.jsx)(lj,{children:(0,h.jsx)(dj,{side:n,sideOffset:6,className:`z-50 rounded-lg bg-fg px-2.5 py-1.5 text-[12px] font-medium text-bg shadow-pop data-[state=delayed-open]:animate-[pop-in_140ms_cubic-bezier(0.16,1,0.3,1)]`,children:e})})]})}var Cj=$A;function wj({value:e,onChange:t,options:n,size:r=`md`,className:i}){let a=(0,m.useId)();return(0,h.jsx)(`fieldset`,{className:J(`m-0 inline-flex min-w-0 items-center rounded-[10px] border border-border bg-surface-2 p-0.5`,r===`sm`?`h-7`:`h-9`,i),children:n.map(n=>{let i=n.value===e;return(0,h.jsxs)(`button`,{type:`button`,"aria-pressed":i,onClick:()=>t(n.value),className:J(`relative h-full cursor-pointer rounded-lg px-3 font-medium transition-colors duration-150`,r===`sm`?`text-[12px]`:`text-[13px]`,i?`text-fg`:`text-fg-3 hover:text-fg-2`),children:[i&&(0,h.jsx)(U.span,{layoutId:`segmented-${a}`,transition:Ab,className:`absolute inset-0 rounded-lg border border-border bg-surface shadow-card`}),(0,h.jsx)(`span`,{className:`relative`,children:n.label})]},n.value)})})}function Tj({value:e,onChange:t,tabs:n,className:r}){let i=(0,m.useId)();return(0,h.jsx)(`div`,{role:`tablist`,className:J(`flex gap-5 border-b border-border`,r),children:n.map(n=>{let r=n.value===e;return(0,h.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":r,onClick:()=>t(n.value),className:J(`relative -mb-px flex h-10 cursor-pointer items-center gap-1.5 text-[13.5px] font-medium transition-colors`,r?`text-fg`:`text-fg-3 hover:text-fg-2`),children:[n.label,r&&(0,h.jsx)(U.span,{layoutId:`page-tab-${i}`,transition:Ab,className:`absolute inset-x-0 bottom-0 h-[2px] rounded-full bg-accent`})]},n.value)})})}function Ej({value:e,onChange:t,tabs:n,children:r,className:i}){let a=(0,m.useId)();return(0,h.jsxs)(AA,{value:e,onValueChange:e=>t(e),className:i,children:[(0,h.jsx)(MA,{className:`flex gap-1 border-b border-border px-6`,children:n.map(t=>(0,h.jsxs)(PA,{value:t.value,className:J(`relative -mb-px flex h-10 cursor-pointer items-center gap-1.5 px-2 text-[13px] font-medium transition-colors outline-none`,t.value===e?`text-fg`:`text-fg-3 hover:text-fg-2`),children:[t.label,t.count!==void 0&&(0,h.jsx)(`span`,{className:`rounded-full bg-surface-2 px-1.5 text-[11px] text-fg-3 tabular`,children:t.count}),t.value===e&&(0,h.jsx)(U.span,{layoutId:`tab-${a}`,transition:Ab,className:`absolute inset-x-1 bottom-0 h-[2px] rounded-full bg-accent`})]},t.value))}),r]})}var Dj=IA;function Oj({trigger:e,children:t,align:n=`end`}){return(0,h.jsxs)(pA,{children:[(0,h.jsx)(hA,{asChild:!0,children:e}),(0,h.jsx)(gA,{children:(0,h.jsx)(vA,{align:n,sideOffset:6,className:`z-50 min-w-44 rounded-xl border border-border bg-surface p-1 shadow-pop data-[state=open]:animate-[pop-in_150ms_cubic-bezier(0.16,1,0.3,1)]`,children:t})})]})}function kj({icon:e,children:t,onSelect:n,danger:r=!1,disabled:i=!1}){return(0,h.jsxs)(yA,{disabled:i,onSelect:n,className:J(`flex h-8 cursor-pointer items-center gap-2 rounded-lg px-2.5 text-[13px] outline-none select-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 [&>svg]:size-3.5`,r?`text-danger data-[highlighted]:bg-danger-soft`:`text-fg-2 data-[highlighted]:bg-surface-2 data-[highlighted]:text-fg`),children:[e,t]})}var Aj=()=>(0,h.jsx)(bA,{className:`my-1 h-px bg-border`});function jj({value:e,format:t,className:n}){let r=Bp(0),i=Up(r,e=>t?t(e):Math.round(e).toLocaleString(`zh-CN`));return(0,m.useEffect)(()=>{let t=Tm(r,e,{...jb,stiffness:120,damping:24});return()=>t.stop()},[r,e]),(0,h.jsx)(U.span,{className:J(`tabular`,n),children:i})}function Mj(){let e=it({queryKey:[`bots`],queryFn:X.bots});return[...new Set((e.data??[]).map(e=>e.platform))]}function Nj(e){return/^\S+$/.test(e.trim())}var Pj={onebot11:`OneBot 11`,virtual:`虚拟适配器`};function Fj(e){return Pj[e]??e}var Ij=(e,t)=>e.list===t.list&&e.subject===t.subject&&e.key===t.key;function Lj(){let e=_(),t=it({queryKey:[`acl`],queryFn:X.acl}),[n,r]=(0,m.useState)(null),i=at({mutationFn:X.addAcl,onSuccess:(t,n)=>{e.setQueryData([`acl`],(e=[])=>[...e.filter(e=>!Ij(e,n)),n]),r(null),W.success(`已添加`)}}),a=at({mutationFn:X.removeAcl,onSuccess:(t,n)=>{e.setQueryData([`acl`],(e=[])=>e.filter(e=>!Ij(e,n))),W(`已移除`,{description:n.key,action:{label:`撤销`,onClick:()=>i.mutate(n)}})}});return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Dx,{title:`访问控制`,description:`超管始终不受限制。用户和群两个维度分别生效:某一维度的白名单为空时,不限制这个维度。`}),(0,h.jsx)(`div`,{className:`grid gap-3 lg:grid-cols-2`,children:[{list:`block`,title:`屏蔽名单`,description:`名单中的用户或群发来的事件一律忽略`,icon:g_},{list:`allow`,title:`白名单`,description:`非空时,只有名单中的用户(或群)能使用机器人`,icon:B_}].map(({list:e,title:n,description:i,icon:o})=>{let s=t.data?.filter(t=>t.list===e)??[];return(0,h.jsxs)(gx,{className:`flex flex-col`,children:[(0,h.jsx)(_x,{title:(0,h.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,h.jsx)(o,{className:e===`block`?`size-4 text-danger`:`size-4 text-success`}),n]}),description:i,action:(0,h.jsxs)(Q,{size:`sm`,onClick:()=>r(e),children:[(0,h.jsx)(fy,{className:`size-3.5`}),`添加`]})}),(0,h.jsx)(`div`,{className:`flex-1 px-2 pb-2`,children:t.error&&!t.data?(0,h.jsx)(Ex,{error:t.error,onRetry:()=>void t.refetch(),retrying:t.isFetching,className:`py-8`}):t.isPending?(0,h.jsxs)(`div`,{className:`space-y-2 px-3 pb-2`,children:[(0,h.jsx)(wx,{className:`h-11`}),(0,h.jsx)(wx,{className:`h-11`})]}):s.length===0?(0,h.jsx)(Tx,{icon:(0,h.jsx)(By,{}),title:`名单为空`,className:`py-10`}):(0,h.jsx)(`ul`,{children:(0,h.jsx)(Ef,{initial:!1,children:s.map(e=>{let[t,...n]=e.key.split(`:`);return(0,h.jsxs)(U.li,{layout:!0,initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:8,transition:{duration:.15}},transition:Z,className:`group flex items-center gap-3 rounded-xl px-3 py-2.5 hover:bg-surface-2/70`,children:[(0,h.jsx)(`span`,{className:`flex size-8 items-center justify-center rounded-lg bg-surface-2 text-fg-3`,children:e.subject===`user`?(0,h.jsx)(gb,{className:`size-4`}):(0,h.jsx)(vb,{className:`size-4`})}),(0,h.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,h.jsx)(`div`,{className:`font-mono text-[13px] text-fg`,children:n.join(`:`)}),(0,h.jsxs)(`div`,{className:`text-[11.5px] text-fg-3`,children:[e.subject===`user`?`用户`:`群`,` · `,t]})]}),(0,h.jsx)(Q,{variant:`danger-ghost`,size:`icon-sm`,"aria-label":`移除`,className:`opacity-0 transition-opacity group-hover:opacity-100 focus-visible:opacity-100`,onClick:()=>a.mutate(e),children:(0,h.jsx)(ob,{className:`size-3.5`})})]},`${e.subject}:${e.key}`)})})})})]},e)})}),(0,h.jsx)(Rj,{list:n,pending:i.isPending,onClose:()=>r(null),onSubmit:e=>i.mutate(e)})]})}function Rj({list:e,pending:t,onClose:n,onSubmit:r}){let[i,a]=(0,m.useState)(`user`),[o,s]=(0,m.useState)(``),c=Mj(),[l,u]=(0,m.useState)(``),d=l||c[0]||``,f=Nj(o)&&d.trim().length>0,p=t=>{t.preventDefault(),e&&f&&(r({list:e,subject:i,key:`${d.trim()}:${o.trim()}`}),s(``))};return(0,h.jsx)(ET,{open:e!==null,onOpenChange:e=>!e&&n(),title:e===`block`?`添加到屏蔽名单`:`添加到白名单`,description:e===`allow`?`注意:白名单非空后,不在名单里的用户(或群)将无法使用机器人。`:void 0,footer:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Q,{variant:`ghost`,onClick:n,children:`取消`}),(0,h.jsx)(Q,{variant:e===`block`?`danger`:`primary`,loading:t,disabled:!f,onClick:p,children:`添加`})]}),children:(0,h.jsxs)(`form`,{onSubmit:p,className:`space-y-4`,children:[(0,h.jsx)(wj,{value:i,onChange:a,options:[{value:`user`,label:`用户`},{value:`group`,label:`群`}]}),(0,h.jsxs)(`div`,{className:`grid grid-cols-[1fr_120px] gap-3`,children:[(0,h.jsx)(jT,{label:i===`user`?`用户 ID`:`群 ID`,htmlFor:`acl-id`,children:(0,h.jsx)(kT,{id:`acl-id`,autoFocus:!0,value:o,onChange:e=>s(e.target.value),className:`font-mono`})}),(0,h.jsx)(jT,{label:`平台`,htmlFor:`acl-platform`,children:(0,h.jsx)(kT,{id:`acl-platform`,value:d,placeholder:`平台`,onChange:e=>u(e.target.value),className:`font-mono`})})]})]})})}var zj=[`bg-[#efedff] text-[#5245de] dark:bg-[#8b7ffa]/15 dark:text-[#b4acff]`,`bg-[#e2f5ef] text-[#0e8a6c] dark:bg-[#2bbd95]/15 dark:text-[#5fd6b3]`,`bg-[#fdeef4] text-[#c2457a] dark:bg-[#f2a5c8]/15 dark:text-[#f2a5c8]`,`bg-[#e7effd] text-[#2f6fd6] dark:bg-[#5f9cf3]/15 dark:text-[#8ab8f7]`,`bg-[#fcf0d9] text-[#a76a05] dark:bg-[#e9a43a]/15 dark:text-[#f0bf70]`];function Bj(e){let t=0;for(let n of e)t=t*31+n.charCodeAt(0)>>>0;return t}function Vj({id:e,name:t,src:n,size:r=32,className:i}){let[a,o]=(0,m.useState)(!1),s=(t?.trim()||e).slice(0,1).toUpperCase();return(0,h.jsxs)(`span`,{className:J(`relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full font-medium select-none`,zj[Bj(e)%zj.length],i),style:{width:r,height:r,fontSize:r*.4},children:[n&&!a?(0,h.jsx)(`img`,{src:n,alt:``,loading:`lazy`,referrerPolicy:`no-referrer`,className:`size-full object-cover`,onError:()=>o(!0)}):s,(0,h.jsx)(`span`,{className:`absolute inset-0 rounded-full ring-1 ring-black/5 ring-inset dark:ring-white/10`})]})}var Hj={text:`文本`,at:`提及`,face:`表情`,image:`图片`,audio:`语音`,video:`视频`,file:`文件`,reply:`引用`,forward:`合并转发`,markdown:`Markdown`,button:`按钮`},Uj={bold:`粗体`,italic:`斜体`,underline:`下划线`,strike:`删除线`,code:`代码`,spoiler:`剧透`},Wj={sendPrivate:`私聊发送`,sendGroup:`群聊发送`,sendForward:`发送合并转发`,getForward:`读取合并转发`,deleteMessage:`撤回消息`,getMessage:`读取消息`,getSelf:`账号信息`,getGroupList:`群列表`,getGroupMember:`群成员信息`,getGroupMembers:`群成员列表`,getFriendList:`好友列表`,muteMember:`禁言`,kickMember:`踢出群`,setMemberCard:`修改群名片`,call:`平台 API 透传`};function Gj(e,t){let n=new Set(t),r=Object.entries(e).map(([e,t])=>({key:e,label:t,supported:n.has(e)})),i=t.filter(t=>!(t in e)).map(e=>({key:e,label:e.endsWith(`:*`)?`${e.slice(0,-2)} 专属段`:e,supported:!0}));return[...r,...i]}function Kj(e){return{segments:Gj(Hj,e.segments),styles:Gj(Uj,e.textStyles),actions:Gj(Wj,e.actions)}}var qj=new Intl.NumberFormat(`zh-CN`);function Jj(e){return qj.format(Math.round(e))}function Yj(e){if(e<1024)return`${e} B`;let t=[`KB`,`MB`,`GB`],n=e/1024,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n.toFixed(n>=100?0:1)} ${t[r]}`}function Xj(e){let t=Math.max(0,Math.floor(e/1e3)),n=Math.floor(t/86400),r=Math.floor(t%86400/3600),i=Math.floor(t%3600/60);return n>0?`${n} 天 ${r} 小时`:r>0?`${r} 小时 ${i} 分`:i>0?`${i} 分 ${t%60} 秒`:`${t} 秒`}function Zj(e,t=!0){return new Date(e).toLocaleTimeString(`zh-CN`,{hour:`2-digit`,minute:`2-digit`,...t?{second:`2-digit`}:{},hour12:!1})}function Qj(e,t=Date.now()){let n=Math.max(0,t-e);return n<1e4?`刚刚`:n<6e4?`${Math.floor(n/1e3)} 秒前`:n<36e5?`${Math.floor(n/6e4)} 分钟前`:n<864e5?`${Math.floor(n/36e5)} 小时前`:new Date(e).toLocaleDateString(`zh-CN`)}var $j=[{value:10,name:`trace`},{value:20,name:`debug`},{value:30,name:`info`},{value:40,name:`warn`},{value:50,name:`error`},{value:60,name:`fatal`}];function eM(e){return[...$j].reverse().find(t=>e>=t.value)?.name??`trace`}var tM={trace:`text-fg-3 bg-surface-2`,debug:`text-fg-3 bg-surface-2`,info:`text-info bg-info-soft`,warn:`text-warning bg-warning-soft`,error:`text-danger bg-danger-soft`,fatal:`text-white bg-danger`};function nM(e){if(typeof e==`string`)return e;if(e<=0)return`0s`;let t=[[`d`,864e5],[`h`,36e5],[`m`,6e4],[`s`,1e3],[`ms`,1]],n=e,r=``;for(let[e,i]of t){let t=Math.floor(n/i);t>0&&(r+=`${t}${e}`,n-=t*i)}return r}var rM={online:{label:`在线`,tone:`success`},connecting:{label:`连接中`,tone:`warning`},offline:{label:`离线`,tone:`danger`}};function iM(){let e=it({queryKey:[`bots`],queryFn:X.bots}),[t,n]=(0,m.useState)(null);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Dx,{title:`机器人`,description:`已连接的账号、群列表,以及以机器人身份发送消息`}),e.error&&!e.data?(0,h.jsx)(gx,{children:(0,h.jsx)(Ex,{error:e.error,onRetry:()=>void e.refetch(),retrying:e.isFetching})}):e.data?e.data.length===0?(0,h.jsx)(gx,{children:(0,h.jsx)(Tx,{icon:(0,h.jsx)(gy,{}),title:`还没有机器人连接`,description:`在配置文件的 adapters 段配置适配器。以 OneBot 11 为例:可以填写正向 WS 地址让 AsaBot 主动连接,也可以开启反向 WS,让 OneBot 实现连过来。`})}):(0,h.jsx)(U.div,{variants:Mb,initial:`initial`,animate:`animate`,className:`space-y-3`,children:e.data.map(e=>(0,h.jsx)(U.div,{variants:Nb,children:(0,h.jsx)(aM,{bot:e,onSend:t=>n({bot:e,...t?{target:t}:{}})})},`${e.platform}:${e.selfId}`))}):(0,h.jsx)(wx,{className:`h-48 rounded-xl`}),(0,h.jsx)(lM,{state:t,onClose:()=>n(null)})]})}function aM({bot:e,onSend:t}){let[n,r]=(0,m.useState)(null),i=e=>r(n===e?null:e),a=rM[e.status];return(0,h.jsxs)(gx,{className:`overflow-hidden`,children:[(0,h.jsxs)(`div`,{className:`flex flex-wrap items-center gap-4 p-5`,children:[(0,h.jsxs)(`div`,{className:`relative`,children:[(0,h.jsx)(Vj,{id:e.selfId,name:e.nickname,src:e.avatar,size:48}),(0,h.jsx)(`span`,{className:`absolute -right-0.5 -bottom-0.5 rounded-full border-2 border-surface`,children:(0,h.jsx)(`span`,{className:`block size-2.5 rounded-full ${e.status===`online`?`bg-success`:e.status===`connecting`?`bg-warning`:`bg-danger`}`})})]}),(0,h.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,h.jsx)(`span`,{className:`text-[15px] font-semibold tracking-[-0.01em]`,children:e.nickname??e.selfId}),(0,h.jsx)(yx,{tone:a.tone,dot:!0,pulse:e.status===`online`,children:a.label})]}),(0,h.jsxs)(`div`,{className:`mt-1 flex flex-wrap items-center gap-x-4 gap-y-1 text-[12.5px] text-fg-3`,children:[(0,h.jsx)(`span`,{className:`font-mono`,children:e.selfId}),(0,h.jsx)(`span`,{children:e.platform}),(0,h.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,h.jsx)(Av,{className:`size-3.5`}),e.connection,e.url&&(0,h.jsx)(`span`,{className:`font-mono`,children:e.url})]})]})]}),(0,h.jsxs)(`div`,{className:`flex gap-2`,children:[(0,h.jsxs)(Q,{disabled:e.status!==`online`,onClick:()=>t(),children:[(0,h.jsx)(My,{className:`size-3.5`}),`发消息`]}),(0,h.jsxs)(Q,{variant:`ghost`,disabled:e.status!==`online`,onClick:()=>i(`groups`),children:[(0,h.jsx)(vb,{className:`size-3.5`}),`群列表`,(0,h.jsx)(U.span,{animate:{rotate:n===`groups`?180:0},transition:Z,children:(0,h.jsx)(P_,{className:`size-3.5`})})]}),(0,h.jsxs)(Q,{variant:`ghost`,onClick:()=>i(`capabilities`),children:[(0,h.jsx)(Jy,{className:`size-3.5`}),`能力`,(0,h.jsx)(U.span,{animate:{rotate:n===`capabilities`?180:0},transition:Z,children:(0,h.jsx)(P_,{className:`size-3.5`})})]})]})]}),(0,h.jsx)(Ef,{initial:!1,mode:`wait`,children:n!==null&&(0,h.jsx)(U.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:Z,className:`overflow-hidden`,children:n===`groups`?(0,h.jsx)(cM,{bot:e,onSend:e=>t({type:`group`,id:e})}):(0,h.jsx)(oM,{bot:e})},n)})]})}function oM({bot:e}){let{segments:t,styles:n,actions:r}=Kj(e.capabilities);return(0,h.jsxs)(`div`,{className:`space-y-4 border-t border-border bg-surface-2/40 px-5 py-4`,children:[(0,h.jsxs)(`p`,{className:`text-[12.5px] leading-relaxed text-fg-3`,children:[`平台不支持的消息内容会在发送前自动降级,例如图片变成“[图片]”、Markdown 变成纯文本;插件可以用`,` `,(0,h.jsx)(`code`,{className:`font-mono text-[12px]`,children:`supports(bot, …)`}),` 提前判断。`]}),(0,h.jsx)(sM,{title:`消息内容`,rows:t}),(0,h.jsx)(sM,{title:`文本样式`,rows:n}),(0,h.jsx)(sM,{title:`操作`,rows:r})]})}function sM({title:e,rows:t}){return(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`div`,{className:`mb-2 text-[12px] font-medium text-fg-2`,children:e}),(0,h.jsx)(`ul`,{className:`flex flex-wrap gap-1.5`,children:t.map(e=>(0,h.jsxs)(`li`,{title:e.key,className:J(`flex items-center gap-1 rounded-md border px-2 py-0.5 text-[12px]`,e.supported?`border-border bg-surface text-fg`:`border-dashed border-border text-fg-3 line-through decoration-fg-3/50`),children:[e.supported?(0,h.jsx)(M_,{className:`size-3 text-success`}):(0,h.jsx)(Jv,{className:`size-3 text-fg-3`}),e.label]},e.key))})]})}function cM({bot:e,onSend:t}){let n=it({queryKey:[`bot-groups`,e.platform,e.selfId],queryFn:()=>X.botGroups(e)}),[r,i]=(0,m.useState)(``),a=(0,m.useMemo)(()=>{let e=r.trim().toLowerCase();return(n.data??[]).filter(t=>!e||t.groupName.toLowerCase().includes(e)||t.groupId.includes(e))},[n.data,r]);return(0,h.jsxs)(`div`,{className:`border-t border-border bg-surface-2/40 px-5 py-4`,children:[(0,h.jsxs)(`div`,{className:`mb-3 flex items-center justify-between gap-3`,children:[(0,h.jsx)(`span`,{className:`text-[12.5px] text-fg-3`,children:n.data?`共 ${n.data.length} 个群`:`加载中…`}),(0,h.jsx)(kT,{icon:(0,h.jsx)(Ay,{}),placeholder:`搜索群名或群号`,value:r,onChange:e=>i(e.target.value),className:`w-56`})]}),n.isPending?(0,h.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:[(0,h.jsx)(wx,{className:`h-14`}),(0,h.jsx)(wx,{className:`h-14`})]}):n.error?(0,h.jsx)(`p`,{className:`text-[13px] text-danger`,children:n.error.message}):(0,h.jsx)(U.ul,{variants:Mb,initial:`initial`,animate:`animate`,className:`grid max-h-80 gap-2 overflow-y-auto sm:grid-cols-2`,children:a.map(e=>(0,h.jsxs)(U.li,{variants:Nb,className:`group flex items-center gap-3 rounded-xl border border-border bg-surface px-3 py-2.5`,children:[(0,h.jsx)(`span`,{className:`flex size-8 items-center justify-center rounded-lg bg-surface-2 text-[12px] font-medium text-fg-2`,children:e.groupName.slice(0,1)}),(0,h.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,h.jsx)(`div`,{className:`truncate text-[13px] font-medium`,children:e.groupName}),(0,h.jsxs)(`div`,{className:`font-mono text-[11.5px] text-fg-3`,children:[e.groupId,e.memberCount!==void 0&&` · ${Jj(e.memberCount)} 人`]})]}),(0,h.jsx)(Q,{variant:`ghost`,size:`icon-sm`,"aria-label":`向 ${e.groupName} 发送消息`,className:`opacity-0 group-hover:opacity-100`,onClick:()=>t(e.groupId),children:(0,h.jsx)(My,{className:`size-3.5`})})]},e.groupId))})]})}function lM({state:e,onClose:t}){let[n,r]=(0,m.useState)(`group`),[i,a]=(0,m.useState)(``),[o,s]=(0,m.useState)(``),[c,l]=(0,m.useState)(e);e!==c&&(l(e),e?.target&&(r(e.target.type),a(e.target.id)));let u=at({mutationFn:X.send,onSuccess:()=>{W.success(`已发送`),s(``),t()}}),d=Nj(i)&&o.trim().length>0,f=t=>{t?.preventDefault(),e&&d&&u.mutate({target:{platform:e.bot.platform,selfId:e.bot.selfId,type:n,id:i.trim()},message:o})};return(0,h.jsx)(ET,{open:e!==null,onOpenChange:e=>!e&&t(),title:`发送消息`,description:e?`以 ${e.bot.nickname??e.bot.selfId} 的身份发送`:void 0,footer:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Q,{variant:`ghost`,onClick:t,children:`取消`}),(0,h.jsxs)(Q,{variant:`primary`,loading:u.isPending,disabled:!d,onClick:()=>f(),children:[(0,h.jsx)(My,{className:`size-3.5`}),`发送`]})]}),children:(0,h.jsxs)(`form`,{onSubmit:f,className:`space-y-4`,children:[(0,h.jsx)(wj,{value:n,onChange:r,options:[{value:`group`,label:`群聊`},{value:`private`,label:`私聊`}]}),(0,h.jsx)(jT,{label:n===`group`?`群 ID`:`用户 ID`,htmlFor:`send-id`,children:(0,h.jsx)(kT,{id:`send-id`,value:i,onChange:e=>a(e.target.value),className:`font-mono`})}),(0,h.jsx)(jT,{label:`内容`,htmlFor:`send-text`,hint:`按纯文本发送`,children:(0,h.jsx)(AT,{id:`send-text`,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&f()}})})]})})}var uM=Object.defineProperty,dM=(e,t)=>uM(e,`name`,{value:t,configurable:!0});function fM(e,[t,n]){return Math.min(n,Math.max(t,e))}dM(fM,`clamp`);var pM=Object.defineProperty,mM=(e,t)=>pM(e,`name`,{value:t,configurable:!0}),hM={ItemAligned:`item-aligned`,Popper:`popper`},gM={LTR:`ltr`,RTL:`rtl`},_M=[` `,`Enter`,`ArrowUp`,`ArrowDown`],vM=[` `,`Enter`],yM=`Select`,[bM,xM,SM]=PT(yM),[CM,wM]=Gx(yM,[SM,_O]),TM=_O(),[EM,DM]=CM(yM),[OM,kM]=CM(yM);function AM(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:g,internal_do_not_use_render:_}=e,v=TM(t),[y,b]=m.useState(null),[x,S]=m.useState(null),[C,w]=m.useState(!1),T=XT(l),[E,D]=sS({prop:r,defaultProp:i??!1,onChange:a,caller:yM}),[O,k]=sS({prop:o,defaultProp:s,onChange:c,caller:yM}),A=m.useRef(null),j=m.useRef(!1),[M,N]=m.useState(null),ee=mM(e=>{N({value:e,hasConsumerStoppedPropagation:j.current}),k(e)},`handleUserSelect`),P=m.useRef(O);m.useEffect(()=>{let e=g?y?.ownerDocument.getElementById(g):y?.form;if(e instanceof HTMLFormElement){let t=mM(()=>k(P.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[g,y,k]);let F=!y||!!g||!!y.closest(`form`),[te,ne]=m.useState(new Set),re=Qx(),ie=Array.from(te).map(e=>e.props.value).join(`;`),ae=m.useCallback(e=>{ne(t=>new Set(t).add(e))},[]),oe=m.useCallback(e=>{ne(t=>{let n=new Set(t);return n.delete(e),n})},[]),se={required:p,trigger:y,onTriggerChange:b,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:C,onValueNodeHasChildrenChange:w,contentId:re,value:O,onValueChange:k,hasConsumerStoppedPropagationRef:j,userSelection:M,onUserSelect:ee,open:E,onOpenChange:D,dir:T,triggerPointerDownPosRef:A,disabled:f,name:u,autoComplete:d,form:g,nativeOptions:te,nativeSelectKey:ie,isFormControl:F};return(0,h.jsx)(bO,{...v,children:(0,h.jsx)(EM,{scope:t,...se,children:(0,h.jsx)(bM.Provider,{scope:t,children:(0,h.jsx)(OM,{scope:t,onNativeOptionAdd:ae,onNativeOptionRemove:oe,children:fN(_)?_(se):n})})})})}mM(AM,`SelectProvider`);var jM=mM(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,h.jsx)(AM,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,h.jsxs)(h.Fragment,{children:[n,e?(0,h.jsx)(dN,{__scopeSelect:t}):null]})})},`Select`),MM=`SelectTrigger`,NM=m.forwardRef(mM(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=TM(n),o=DM(MM,n),s=o.disabled||r,c=Vx(t,o.onTriggerChange),l=xM(n),u=m.useRef(`touch`),[d,f,p]=mN(e=>{let t=l().filter(e=>!e.disabled),n=hN(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onUserSelect(n.value)}),g=mM(e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,h.jsx)(SO,{asChild:!0,...a,children:(0,h.jsx)(jS.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":pN(o.value)?``:void 0,...i,ref:c,onClick:$(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&g(e)}),onPointerDown:$(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(g(e),e.preventDefault())}),onKeyDown:$(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&(o.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),f(e.key)),t&&e.key===` `||_M.includes(e.key)&&(g(),e.preventDefault())})})})},`SelectTrigger`)),PM=`SelectValue`,FM=m.forwardRef(mM(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=DM(PM,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=Vx(t,c.onValueNodeChange);qx(()=>{l(u)},[l,u]);let f=pN(c.value);return(0,h.jsx)(jS.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,h.jsx)(m.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),IM=m.forwardRef(mM(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,h.jsx)(jS.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[LM,RM]=CM(`SelectPortal`,{forceMount:void 0}),zM=mM(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,h.jsx)(LM,{scope:e.__scopeSelect,forceMount:n,children:(0,h.jsx)(yC,{asChild:!0,...r})})},`SelectPortal`),BM=`SelectContent`,VM=m.forwardRef(mM(function(e,t){let n=RM(BM,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=DM(BM,e.__scopeSelect),[o,s]=m.useState();return qx(()=>{s(new DocumentFragment)},[]),(0,h.jsx)(CC,{present:r||a.open,children:({present:e})=>e?(0,h.jsx)(qM,{...i,ref:t}):(0,h.jsx)(HM,{...i,fragment:o})})},`SelectContent`)),HM=m.forwardRef(mM(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?Nm.createPortal((0,h.jsx)(WM,{scope:n,children:(0,h.jsx)(bM.Slot,{scope:n,children:(0,h.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),UM=10,[WM,GM]=CM(BM),KM=mS(`SelectContent.RemoveScroll`),qM=m.forwardRef(mM(function(e,t){let{__scopeSelect:n}=e,{position:r=hM.ItemAligned,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:g,hideWhenDetached:_,avoidCollisions:v,...y}=e,b=DM(BM,n),[x,S]=m.useState(null),[C,w]=m.useState(null),T=Vx(t,S),[E,D]=m.useState(null),[O,k]=m.useState(null),A=xM(n),[j,M]=m.useState(!1),N=m.useRef(!1),ee=m.useRef(!1),P=m.useRef(!1);m.useEffect(()=>{if(x)return Qw(x)},[x]),PC();let F=m.useCallback(e=>{let[t,...n]=A().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&C&&(C.scrollTop=0),n===r&&C&&(C.scrollTop=C.scrollHeight),n?.focus(),document.activeElement!==i))return},[A,C]),te=m.useCallback(()=>F([E,x]),[F,E,x]);m.useEffect(()=>{j&&te()},[j,te]);let{onOpenChange:ne,triggerPointerDownPosRef:re}=b;m.useEffect(()=>{if(x){let e={x:0,y:0},t=mM(t=>{e={x:Math.abs(Math.round(t.pageX)-(re.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(re.current?.y??0))}},`handlePointerMove`),n=mM(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(x)||ne(!1),document.removeEventListener(`pointermove`,t),re.current=null},`handlePointerUp`);return re.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[x,ne,re]),m.useEffect(()=>{let e=mM(()=>ne(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[ne]);let[ie,ae]=mN(e=>{let t=A().filter(e=>!e.disabled),n=hN(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),oe=m.useCallback((e,t,n)=>{let r=!ee.current;r&&(ee.current=!0);let i=!N.current&&!n;b.value!==void 0&&b.value===t||i?(D(e),i&&(N.current=!0)):r&&D(e)},[b.value]),se=m.useCallback(()=>x?.focus(),[x]),ce=m.useCallback((e,t,n)=>{if(!e)return;let r=!P.current;r&&(P.current=!0);let i=!N.current&&!n;(b.value!==void 0&&b.value===t||i||r)&&k(e)},[b.value]),le=r===hM.Popper?YM:JM,ue=le===YM?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:g,hideWhenDetached:_,avoidCollisions:v}:{};return(0,h.jsx)(WM,{scope:n,content:x,viewport:C,onViewportChange:w,itemRefCallback:oe,selectedItem:E,onItemLeave:se,itemTextRefCallback:ce,focusSelectedItem:te,selectedItemText:O,position:r,isPositioned:j,searchRef:ie,children:(0,h.jsx)(Uw,{as:KM,allowPinchZoom:!0,children:(0,h.jsx)(nC,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:$(i,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,h.jsx)(WS,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,h.jsx)(le,{role:`listbox`,id:b.contentId,"data-state":b.open?`open`:`closed`,dir:b.dir,onContextMenu:e=>e.preventDefault(),...y,...ue,onPlaced:()=>M(!0),ref:T,style:{display:`flex`,flexDirection:`column`,outline:`none`,...y.style},onKeyDown:$(y.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ae(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=A().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>F(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),JM=m.forwardRef(mM(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=DM(BM,n),o=GM(BM,n),[s,c]=m.useState(null),[l,u]=m.useState(null),d=Vx(t,u),f=xM(n),p=m.useRef(!1),g=m.useRef(!0),{viewport:_,selectedItem:v,selectedItemText:y,focusSelectedItem:b}=o,x=m.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&_&&v&&y){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=y.getBoundingClientRect();if(a.dir!==gM.RTL){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-UM,d=fM(a,[UM,Math.max(UM,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-UM,d=fM(a,[UM,Math.max(UM,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-UM*2,u=_.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),h=parseInt(d.paddingTop,10),g=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+h+u+b+g,S=Math.min(v.offsetHeight*5,x),C=window.getComputedStyle(_),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-UM,D=c-E,O=v.offsetHeight/2,k=v.offsetTop+O,A=m+h+k,j=x-A;if(A<=E){let e=o.length>0&&v===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-_.offsetTop-_.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+g);s.style.height=n+`px`}else{let e=o.length>0&&v===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+_.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,_.scrollTop=A-E+_.offsetTop}s.style.margin=`${UM}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,_,v,y,a.dir,r]);qx(()=>x(),[x]);let[S,C]=m.useState();qx(()=>{l&&C(window.getComputedStyle(l).zIndex)},[l]);let w=m.useCallback(e=>{e&&g.current===!0&&(x(),b?.(),g.current=!1)},[x,b]);return(0,h.jsx)(XM,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:w,children:(0,h.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:S},children:(0,h.jsx)(jS.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),YM=m.forwardRef(mM(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=UM,...a}=e,o=TM(n);return(0,h.jsx)(EO,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[XM,ZM]=CM(BM,{}),QM=`SelectViewport`,$M=m.forwardRef(mM(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=GM(QM,n),o=ZM(QM,n),s=Vx(t,a.onViewportChange),c=m.useRef(0);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,h.jsx)(bM.Slot,{scope:n,children:(0,h.jsx)(jS.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:$(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-UM*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[eN,tN]=CM(`SelectGroup`),nN=`SelectItem`,[rN,iN]=CM(nN),aN=m.forwardRef(mM(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=DM(nN,n),c=GM(nN,n),l=s.value===r,[u,d]=m.useState(a??``),[f,p]=m.useState(!1),g=Vx(t,IS(e=>c.itemRefCallback?.(e,r,i))),_=Qx(),v=m.useRef(`touch`);function y(e){s.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),s.onUserSelect(r),s.onOpenChange(!1)}return mM(y,`handleSelect`),(0,h.jsx)(rN,{scope:n,value:r,disabled:i,textId:_,isSelected:l,onItemTextChange:m.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,h.jsx)(bM.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,h.jsx)(jS.div,{role:`option`,"aria-labelledby":_,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:g,onFocus:$(o.onFocus,()=>p(!0)),onBlur:$(o.onBlur,()=>p(!1)),onClick:$(o.onClick,e=>{i||v.current!==`mouse`&&y(e)}),onPointerUp:$(o.onPointerUp,e=>{i||v.current===`mouse`&&y(e)}),onPointerDown:$(o.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:$(o.onPointerMove,e=>{v.current=e.pointerType,i?c.onItemLeave?.():v.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:$(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:$(o.onKeyDown,e=>{i||e.target!==e.currentTarget||(c.searchRef?.current===``||e.key!==` `)&&(vM.includes(e.key)&&y(e),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),oN=`SelectItemText`,sN=m.forwardRef(mM(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=DM(oN,n),s=GM(oN,n),c=iN(oN,n),l=kM(oN,n),[u,d]=m.useState(null),f=IS(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=Vx(t,d,c.onItemTextChange,f),g=u?.textContent,_=m.useMemo(()=>(0,h.jsx)(`option`,{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=l;return qx(()=>(v(_),()=>y(_)),[v,y,_]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(jS.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!pN(o.value)?Nm.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),cN=`SelectItemIndicator`,lN=m.forwardRef(mM(function(e,t){let{__scopeSelect:n,...r}=e;return iN(cN,n).isSelected?(0,h.jsx)(jS.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),uN=`SelectBubbleInput`,dN=m.forwardRef(mM(function({__scopeSelect:e,...t},n){let r=DM(uN,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u,userSelection:d}=r,{nativeOptions:f,nativeSelectKey:p}=r,g=m.useRef(null),_=Vx(n,g),v=i??``,y=m.useRef(v),b=m.useRef(d),x=m.useRef(!1),S=Array.from(f).some(e=>(e.props.value??``)===``);return m.useEffect(()=>{let e=g.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set,r=d!==null&&d!==b.current;b.current=d;let i=y.current!==v;y.current=v;let a=r&&i;if(r&&!i&&d.value!==v&&!d.hasConsumerStoppedPropagation&&n){x.current=!0;try{n.call(e,d.value),e.dispatchEvent(new Event(`change`,{bubbles:!0}))}finally{x.current=!1,n.call(e,v)}return}let o=a&&!d.hasConsumerStoppedPropagation;if(i&&n){let t=new Event(`change`,{bubbles:o});n.call(e,v),e.dispatchEvent(t)}},[v,d]),(0,h.jsxs)(jS.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>{x.current||a(e.target.value)},...t,style:{...VA,...t.style},ref:_,defaultValue:v,children:[pN(i)&&!S?(0,h.jsx)(`option`,{value:``}):null,Array.from(f)]},p)},`SelectBubbleInput`));function fN(e){return typeof e==`function`}mM(fN,`isFunction`);function pN(e){return e===``||e===void 0}mM(pN,`shouldShowPlaceholder`);function mN(e){let t=IS(e),n=m.useRef(``),r=m.useRef(0),i=m.useCallback(e=>{let i=n.current+e;t(i);function a(e){n.current=e,window.clearTimeout(r.current),e!==``&&(r.current=window.setTimeout(()=>a(``),1e3))}mM(a,`updateSearch`),a(i)},[t]),a=m.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}mM(mN,`useTypeaheadSearch`);function hN(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=gN(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}mM(hN,`findNextItem`);function gN(e,t){return e.map((n,r)=>e[(t+r)%e.length])}mM(gN,`wrapArray`);function _N({value:e,onValueChange:t,options:n,placeholder:r,className:i,"aria-label":a}){return(0,h.jsxs)(jM,{value:e??``,onValueChange:e=>t(e),children:[(0,h.jsxs)(NM,{"aria-label":a,className:J(`inline-flex h-9 min-w-32 cursor-pointer items-center justify-between gap-2 rounded-[10px] border border-border bg-surface px-3 text-[13.5px] text-fg shadow-card outline-none transition-[border-color,box-shadow] hover:border-border-strong focus-visible:border-accent focus-visible:shadow-[0_0_0_3px_var(--ring)] data-[placeholder]:text-fg-3`,i),children:[(0,h.jsx)(FM,{placeholder:r}),(0,h.jsx)(IM,{children:(0,h.jsx)(P_,{className:`size-3.5 text-fg-3`})})]}),(0,h.jsx)(zM,{children:(0,h.jsx)(VM,{position:`popper`,sideOffset:6,className:`z-50 max-h-72 min-w-[var(--radix-select-trigger-width)] overflow-hidden rounded-xl border border-border bg-surface p-1 shadow-pop data-[state=open]:animate-[pop-in_160ms_cubic-bezier(0.16,1,0.3,1)]`,children:(0,h.jsx)($M,{children:n.map(e=>(0,h.jsxs)(aN,{value:e.value,className:`relative flex h-8 cursor-pointer items-center rounded-lg pr-8 pl-2.5 text-[13px] text-fg-2 outline-none select-none data-[highlighted]:bg-surface-2 data-[highlighted]:text-fg data-[state=checked]:text-fg`,children:[(0,h.jsx)(sN,{children:e.label}),(0,h.jsx)(lN,{className:`absolute right-2.5`,children:(0,h.jsx)(M_,{className:`size-3.5 text-accent`,strokeWidth:2.5})})]},e.value))})})})]})}var vN=Object.defineProperty,yN=(e,t)=>vN(e,`name`,{value:t,configurable:!0}),bN=`Switch`,[xN,SN]=Gx(bN),[CN,wN]=xN(bN);function TN(e){let{__scopeSwitch:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=sS({prop:n,defaultProp:i??!1,onChange:c,caller:bN}),[g,_]=m.useState(null),[v,y]=m.useState(null),[b,x]=m.useState(null),S={checked:f,setChecked:p,disabled:a,control:g,setControl:_,name:s,form:o,value:u,userClick:b,onUserClick:x,required:l,defaultChecked:i,isFormControl:!g||!!o||!!g.closest(`form`),bubbleInput:v,setBubbleInput:y};return(0,h.jsx)(CN,{scope:t,...S,children:NN(d)?d(S):r})}yN(TN,`SwitchProvider`);var EN=`SwitchTrigger`,DN=m.forwardRef(yN(function({__scopeSwitch:e,onClick:t,...n},r){let{control:i,form:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,onUserClick:f,isFormControl:p,bubbleInput:g}=wN(EN,e),_=Vx(r,u),v=m.useRef(c);return m.useEffect(()=>{let e=a?i?.ownerDocument.getElementById(a):i?.form;if(e instanceof HTMLFormElement){let t=yN(()=>d(v.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[i,a,d]),(0,h.jsx)(jS.button,{type:`button`,role:`switch`,"aria-checked":c,"aria-required":l,"data-state":PN(c),"data-disabled":s?``:void 0,disabled:s,value:o,...n,ref:_,onClick:$(t,e=>{let t=e.isPropagationStopped();f({requestedChecked:!c,hasConsumerStoppedPropagation:t}),d(e=>!e),g&&p&&(t||e.stopPropagation())})})},`SwitchTrigger`)),ON=m.forwardRef(yN(function(e,t){let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,h.jsx)(TN,{__scopeSwitch:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(DN,{...d,ref:t,__scopeSwitch:n}),e&&(0,h.jsx)(MN,{__scopeSwitch:n})]})})},`Switch`)),kN=`SwitchThumb`,AN=m.forwardRef(yN(function(e,t){let{__scopeSwitch:n,...r}=e,i=wN(kN,n);return(0,h.jsx)(jS.span,{"data-state":PN(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})},`SwitchThumb`)),jN=`SwitchBubbleInput`,MN=m.forwardRef(yN(function({__scopeSwitch:e,onClick:t,...n},r){let{control:i,userClick:a,checked:o,defaultChecked:s,required:c,disabled:l,name:u,value:d,form:f,bubbleInput:p,setBubbleInput:g}=wN(jN,e),_=Vx(r,g),v=uO(i),y=m.useRef(!1),b=m.useRef(o),x=m.useRef(a),S=m.useRef(null);m.useEffect(()=>{let e=p;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set;if(!n)return;let r=b.current!==o;b.current=o;let i=a!==null&&a!==x.current;if(x.current=a,i)S.current=r?null:a,r&&n.call(e,o),e.dispatchEvent(new Event(`click`,{bubbles:!a.hasConsumerStoppedPropagation}));else if(r){let t=S.current;S.current=null;let r=t?.requestedChecked===o;y.current=!0,n.call(e,o),e.dispatchEvent(new Event(`click`,{bubbles:!(r&&t.hasConsumerStoppedPropagation)})),y.current=!1}},[p,o,a]);let C=m.useRef(o);return(0,h.jsx)(jS.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:s??C.current,required:c,disabled:l,name:u,value:d,form:f,...n,tabIndex:-1,ref:_,onClick:$(t,e=>{y.current&&e.stopPropagation()}),style:{...n.style,...v,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`SwitchBubbleInput`));function NN(e){return typeof e==`function`}yN(NN,`isFunction`);function PN(e){return e?`checked`:`unchecked`}yN(PN,`getState`);function FN({id:e,checked:t,onCheckedChange:n,disabled:r,className:i,"aria-label":a}){return(0,h.jsx)(ON,{id:e,checked:t,onCheckedChange:n,disabled:r,"aria-label":a,className:J(`relative inline-flex h-[22px] w-[38px] shrink-0 cursor-pointer items-center rounded-full p-[2px] transition-colors duration-200`,`disabled:cursor-not-allowed disabled:opacity-50`,t?`bg-accent`:`bg-surface-3 shadow-[inset_0_0_0_1px_var(--border-strong)]`,i),children:(0,h.jsx)(AN,{asChild:!0,children:(0,h.jsx)(U.span,{layout:!0,transition:jb,className:J(`block size-[18px] rounded-full bg-white shadow-[0_1px_3px_rgb(0_0_0/0.25),0_0_0_0.5px_rgb(0_0_0/0.04)]`,t?`ml-auto`:`ml-0`)})})})}var IN=new Set([`string`,`number`,`integer`,`boolean`]),LN=new Set([`accessToken`,`token`,`password`,`apiToken`]);function RN(e){return Array.isArray(e.type)?e.type.find(e=>e!==`null`):e.type===void 0&&e.anyOf?.every(e=>IN.has(RN(e)??``))?`scalar`:e.type}function zN(e){if(e.oneOf?.length&&e.oneOf.every(e=>e.const!==void 0))return e.oneOf.map(e=>({value:e.const,label:e.title??String(e.const)}))}function BN(e){let t=RN(e);if(e.enum||e.const!==void 0||zN(e)||t===`scalar`||IN.has(t??``))return!0;if(t===`array`){let t=e.items?RN(e.items):void 0;return t===`object`?BN(e.items):t===`string`||t===`number`||t===`integer`}return t===`object`&&Object.values(e.properties??{}).every(BN)}function VN(e){if(e.const!==void 0)return e.const;if(e.default!==void 0)return e.default;if(RN(e)===`object`)return Object.fromEntries(Object.entries(e.properties??{}).map(([e,t])=>[e,VN(t)]))}function HN(e,t,n){if(t.length===0)return n;let[r,...i]=t;if(Array.isArray(e)){let t=[...e];return t[Number(r)]=HN(t[Number(r)],i,n),t}let a=e&&typeof e==`object`?e:{};return{...a,[r]:HN(a[r],i,n)}}function UN(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e.replace(/\[(\d+)\]/g,`.$1`),t]))}function WN(e){let t=e.default;if(t!==void 0&&t!==``&&typeof t!=`object`)return`默认 ${String(t)}`}function GN(e,t){return t.reduce((e,t)=>e&&typeof e==`object`?e[t]:void 0,e)}function KN({schema:e,value:t,issues:n,saving:r,onSubmit:i,note:a=`保存后写回配置文件并重载插件`,submitLabel:o=`保存并重载`}){let s=(0,m.useMemo)(()=>UN(n),[n]),c=(0,m.useMemo)(()=>t??VN(e),[e,t]),l=(0,m.useMemo)(()=>BN(e),[e]),[u,d]=(0,m.useState)(c),[f,p]=(0,m.useState)(!l),[g,_]=(0,m.useState)(()=>JSON.stringify(c,null,2)),[v,y]=(0,m.useState)(null);(0,m.useEffect)(()=>{d(c),_(JSON.stringify(c,null,2))},[c]);let b=f?g!==JSON.stringify(c,null,2):JSON.stringify(u)!==JSON.stringify(c);return(0,h.jsxs)(`div`,{children:[(0,h.jsxs)(`div`,{className:`mb-4 flex items-center justify-between`,children:[(0,h.jsx)(`p`,{className:`text-[12.5px] text-fg-3`,children:a}),l&&(0,h.jsxs)(Q,{variant:`ghost`,size:`sm`,onClick:()=>{if(!f)_(JSON.stringify(u,null,2));else try{d(JSON.parse(g)),y(null)}catch{y(`JSON 有误,无法切回表单`);return}p(!f)},children:[(0,h.jsx)(w_,{className:`size-3.5`}),f?`表单`:`JSON`]})]}),(0,h.jsx)(Ef,{mode:`wait`,initial:!1,children:f?(0,h.jsxs)(U.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},children:[(0,h.jsx)(AT,{value:g,onChange:e=>_(e.target.value),spellCheck:!1,className:`min-h-64 font-mono text-[12.5px]`,"aria-invalid":v!==null}),v&&(0,h.jsx)(`p`,{className:`mt-1.5 text-[12px] text-danger`,children:v}),Object.keys(s).length>0&&(0,h.jsx)(`ul`,{className:`mt-3 space-y-1 rounded-xl bg-danger-soft px-3 py-2.5 text-[12.5px] text-danger`,children:Object.entries(s).map(([e,t])=>(0,h.jsxs)(`li`,{children:[(0,h.jsx)(`span`,{className:`font-mono`,children:e||`(根)`}),`:`,t]},e))})]},`json`):(0,h.jsx)(U.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:`space-y-5`,children:(0,h.jsx)(qN,{schema:e,value:u,path:[],issues:s,onChange:(e,t)=>d(n=>HN(n,e,t))})},`form`)}),(0,h.jsx)(Ef,{children:b&&(0,h.jsxs)(U.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},exit:{opacity:0,y:12},transition:Z,className:`sticky bottom-0 mt-6 -mx-6 flex items-center justify-between gap-3 border-t border-border bg-surface/90 px-6 py-3 backdrop-blur`,children:[(0,h.jsx)(`span`,{className:`text-[12.5px] text-fg-3`,children:`有未保存的修改`}),(0,h.jsxs)(`div`,{className:`flex gap-2`,children:[(0,h.jsxs)(Q,{variant:`ghost`,size:`sm`,onClick:()=>{d(c),_(JSON.stringify(c,null,2)),y(null)},children:[(0,h.jsx)(Sy,{className:`size-3.5`}),`还原`]}),(0,h.jsx)(Q,{variant:`primary`,size:`sm`,loading:r,onClick:()=>{if(!f)return i(u);let e;try{e=JSON.parse(g)}catch{y(`不是合法的 JSON`);return}y(null),i(e)},children:o})]})]})})]})}function qN({schema:e,value:t,path:n,issues:r,onChange:i}){let a=Object.entries(e.properties??{});return a.length===0?(0,h.jsx)(`p`,{className:`text-[13px] text-fg-3`,children:`这个插件没有可配置项。`}):(0,h.jsx)(h.Fragment,{children:a.map(([a,o])=>{let s=[...n,a],c=`field-${s.join(`-`)}`,l=o.title??a,u=e.required?.includes(a)&&o.default===void 0,d=r[s.join(`.`)],f=GN(t,[a]),p=RN(o);if(o.const!==void 0)return null;if(p===`array`&&o.items&&RN(o.items)===`object`){let e=o.items;return(0,h.jsx)(jT,{label:l,hint:o.description,error:d,htmlFor:c,children:(0,h.jsx)(YN,{schema:e,value:Array.isArray(f)?f:[],path:s,issues:r,onChange:i})},a)}return p===`object`&&!o.enum?(0,h.jsxs)(`fieldset`,{className:`space-y-4 rounded-xl border border-border p-4`,children:[(0,h.jsx)(`legend`,{className:`px-1 text-[12.5px] font-medium text-fg-2`,children:l}),(0,h.jsx)(qN,{schema:o,value:f,path:s,issues:r,onChange:i})]},a):p===`boolean`?(0,h.jsxs)(`div`,{className:`flex items-start justify-between gap-4 rounded-xl border border-border px-4 py-3`,children:[(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`label`,{htmlFor:c,className:`text-[13px] font-medium text-fg`,children:l}),o.description&&(0,h.jsx)(`p`,{className:`mt-0.5 text-[12px] text-fg-3`,children:o.description}),d&&(0,h.jsx)(`p`,{className:`mt-0.5 text-[12px] text-danger`,children:d})]}),(0,h.jsx)(FN,{"aria-label":l,checked:f===!0,onCheckedChange:e=>i(s,e)})]},a):(0,h.jsx)(jT,{label:l,hint:o.description,error:d,required:u,htmlFor:c,children:(0,h.jsx)(JN,{id:c,schema:o,value:f,secret:LN.has(a),invalid:!!d,onChange:e=>i(s,e)})},a)})})}function JN({id:e,schema:t,value:n,secret:r=!1,invalid:i,onChange:a}){let o=RN(t);if(o===`scalar`){let r=t.anyOf?.some(e=>RN(e)===`number`||RN(e)===`integer`);return(0,h.jsx)(kT,{id:e,value:n===void 0?``:String(n),placeholder:WN(t),"aria-invalid":i,onChange:e=>{let t=e.target.value.trim();a(t===``?void 0:r&&/^-?\d+(?:\.\d+)?$/.test(t)?Number(t):t)},className:`font-mono`})}let s=zN(t);if(s)return(0,h.jsx)(_N,{"aria-label":e,className:`w-full`,value:n===void 0?void 0:String(n),onValueChange:e=>a(s.find(t=>String(t.value)===e)?.value),options:s.map(e=>({value:String(e.value),label:e.label}))});if(t.enum)return(0,h.jsx)(_N,{"aria-label":e,className:`w-full`,value:n===void 0?void 0:String(n),onValueChange:e=>a(t.enum?.find(t=>String(t)===e)),options:t.enum.map(e=>({value:String(e),label:String(e)}))});if(o===`number`||o===`integer`)return(0,h.jsx)(kT,{id:e,type:`number`,inputMode:o===`integer`?`numeric`:`decimal`,step:o===`integer`?1:`any`,min:t.minimum,max:t.maximum,value:typeof n==`number`?n:``,placeholder:WN(t),"aria-invalid":i,onChange:e=>a(e.target.value===``?void 0:Number(e.target.value)),className:`tabular`});if(o===`array`)return(0,h.jsx)(XN,{id:e,itemType:t.items?RN(t.items):`string`,value:Array.isArray(n)?n:[],onChange:a});let c=typeof n==`string`?n:``,l=r&&!c.startsWith("${");return(0,h.jsx)(kT,{id:e,type:l?`password`:`text`,autoComplete:r?`off`:void 0,value:c,placeholder:WN(t),"aria-invalid":i,onFocus:r?e=>e.target.select():void 0,onChange:e=>a(e.target.value),className:J(r&&`font-mono`)})}function YN({schema:e,value:t,path:n,issues:r,onChange:i}){let[a,o]=(0,m.useState)(()=>t.map(()=>crypto.randomUUID())),s=t.map((e,t)=>a[t]??`item-${t}`);return(0,h.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,h.jsx)(Ef,{initial:!1,children:t.map((a,c)=>(0,h.jsxs)(U.div,{layout:!0,initial:{opacity:0,y:-6},animate:{opacity:1,y:0},exit:{opacity:0,scale:.97},transition:Z,className:`rounded-xl border border-border bg-surface-2/40 p-4`,children:[(0,h.jsxs)(`div`,{className:`mb-3 flex items-center justify-between`,children:[(0,h.jsxs)(`span`,{className:`text-[12px] font-medium text-fg-3 tabular`,children:[`#`,c+1]}),(0,h.jsx)(Q,{variant:`ghost`,size:`icon-sm`,"aria-label":`删除第 ${c+1} 项`,onClick:()=>{o(s.filter((e,t)=>t!==c)),i(n,t.filter((e,t)=>t!==c))},children:(0,h.jsx)(ob,{className:`size-3.5`})})]}),(0,h.jsx)(`div`,{className:`space-y-4`,children:(0,h.jsx)(qN,{schema:e,value:a,path:[...n,String(c)],issues:r,onChange:i})})]},s[c]))}),(0,h.jsxs)(Q,{variant:`secondary`,size:`sm`,onClick:()=>{o([...s,crypto.randomUUID()]),i(n,[...t,VN(e)])},children:[(0,h.jsx)(fy,{className:`size-3.5`}),`添加一项`]})]})}function XN({id:e,itemType:t,value:n,onChange:r}){let[i,a]=(0,m.useState)(``),o=t===`number`||t===`integer`,s=()=>{let e=i.trim();if(!e)return;let t=o?Number(e):e;o&&Number.isNaN(t)||(n.includes(t)||r([...n,t]),a(``))};return(0,h.jsx)(`div`,{className:`rounded-[10px] border border-border bg-surface p-1.5 transition-colors focus-within:border-accent focus-within:shadow-[0_0_0_3px_var(--ring)]`,children:(0,h.jsxs)(`div`,{className:`flex flex-wrap gap-1.5`,children:[(0,h.jsx)(Ef,{initial:!1,children:n.map((e,t)=>(0,h.jsxs)(U.span,{layout:!0,initial:{opacity:0,scale:.85},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.85},transition:Z,className:`inline-flex h-7 items-center gap-1 rounded-lg bg-surface-2 pr-1 pl-2.5 font-mono text-[12.5px] text-fg`,children:[String(e),(0,h.jsx)(`button`,{type:`button`,"aria-label":`移除 ${String(e)}`,onClick:()=>r(n.filter((e,n)=>n!==t)),className:`flex size-5 cursor-pointer items-center justify-center rounded-md text-fg-3 hover:bg-surface-3 hover:text-fg`,children:(0,h.jsx)(wb,{className:`size-3`})})]},String(e)))}),(0,h.jsxs)(`div`,{className:`flex min-w-32 flex-1 items-center`,children:[(0,h.jsx)(`input`,{id:e,value:i,inputMode:o?`numeric`:void 0,placeholder:n.length===0?`输入后按回车添加`:``,onChange:e=>a(e.target.value),onKeyDown:e=>{e.key===`Enter`?(e.preventDefault(),s()):e.key===`Backspace`&&!i&&n.length>0&&r(n.slice(0,-1))},className:`h-7 flex-1 bg-transparent px-1.5 text-[13px] outline-none placeholder:text-fg-3`}),(0,h.jsx)(`button`,{type:`button`,"aria-label":`添加`,onClick:s,className:J(`flex size-7 cursor-pointer items-center justify-center rounded-md text-fg-3 hover:bg-surface-2 hover:text-fg`,!i&&`invisible`),children:(0,h.jsx)(fy,{className:`size-3.5`})})]})]})})}function ZN(e){return`/groups/${encodeURIComponent(e)}`}function QN(e){let t=e.indexOf(`:`);return{platform:e.slice(0,t),groupId:e.slice(t+1)}}var $N={everyone:`所有人`,"group.admin":`群管理员`,"group.owner":`群主`,superuser:`超管`},eP={user:`每个用户`,group:`每个群`,global:`全局`};function tP(e){let t=e.override??{};return{enabled:t.enabled!==!1,hidden:t.hidden??e.hidden,aliases:[...e.aliases,...t.aliases??[]],permission:t.permission===void 0?e.permission?`插件限定`:void 0:t.permission===`everyone`?void 0:$N[t.permission],cooldown:t.cooldown===void 0||t.cooldown===!1?void 0:`${nM(t.cooldown.duration)} / ${eP[t.cooldown.scope??`user`]}`,modified:e.override!==void 0&&Object.keys(e.override).length>0}}function nP(){let e=_();return at({mutationFn:({path:e,override:t})=>X.setCommandOverride(e,t),meta:{silent:!0},onSuccess:t=>{e.setQueryData([`commands`],(e=[])=>e.map(e=>e.path===t.path?t:e)),e.invalidateQueries({queryKey:[`plugins`]})}})}function rP(){let e=it({queryKey:[`commands`],queryFn:X.commands}),[t,n]=(0,m.useState)(``),[r,i]=(0,m.useState)(!1),[a,o]=(0,m.useState)(null),s=(0,m.useMemo)(()=>{let n=t.trim().toLowerCase(),i=(e.data??[]).filter(e=>{let t=tP(e);return(r||!t.hidden)&&(!n||e.path.toLowerCase().includes(n)||e.description.toLowerCase().includes(n)||t.aliases.some(e=>e.toLowerCase().includes(n)))}),a=new Map;for(let e of i)a.set(e.owner,[...a.get(e.owner)??[],e]);return[...a.entries()].sort(([e],[t])=>e.localeCompare(t))},[e.data,t,r]),c=e.data?.find(e=>e.path===a);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Dx,{title:`命令`,description:`所有插件注册的命令。可以停用命令,或者修改别名、权限和冷却,不需要改插件代码`}),(0,h.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center gap-3`,children:[(0,h.jsx)(kT,{icon:(0,h.jsx)(Ay,{}),placeholder:`搜索命令、别名或说明`,value:t,onChange:e=>n(e.target.value),className:`w-72`}),(0,h.jsxs)(`div`,{className:`ml-auto flex items-center gap-2 text-[13px] text-fg-2`,children:[(0,h.jsx)(FN,{id:`show-hidden`,checked:r,onCheckedChange:i}),(0,h.jsx)(`label`,{htmlFor:`show-hidden`,className:`cursor-pointer`,children:`显示隐藏命令`})]})]}),e.error&&!e.data?(0,h.jsx)(gx,{children:(0,h.jsx)(Ex,{error:e.error,onRetry:()=>void e.refetch(),retrying:e.isFetching})}):e.data?s.length===0?(0,h.jsx)(gx,{children:(0,h.jsx)(Tx,{icon:(0,h.jsx)(Xy,{}),title:`没有匹配的命令`})}):(0,h.jsx)(U.div,{variants:Mb,initial:`initial`,animate:`animate`,className:`space-y-4`,children:s.map(([e,t])=>(0,h.jsx)(U.div,{variants:Nb,children:(0,h.jsxs)(gx,{className:`overflow-hidden`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border bg-surface-2/50 px-5 py-2.5`,children:[(0,h.jsx)(`span`,{className:`text-[13px] font-semibold`,children:e}),(0,h.jsxs)(`span`,{className:`text-[12px] text-fg-3`,children:[t.length,` 条`]})]}),(0,h.jsx)(`ul`,{className:`divide-y divide-border`,children:t.map(e=>(0,h.jsx)(iP,{command:e,onEdit:()=>o(e.path)},e.path))})]})},e))}):(0,h.jsx)(wx,{className:`h-80 rounded-xl`}),(0,h.jsx)(sP,{command:c,onClose:()=>o(null)})]})}function iP({command:e,onEdit:t}){let[n,r]=(0,m.useState)(!1),i=tP(e),a=nP(),o=e.options.length>0||e.examples.length>0;return(0,h.jsxs)(`li`,{className:J(`transition-opacity`,!i.enabled&&`opacity-60`),children:[(0,h.jsxs)(`div`,{className:`group flex items-center gap-3 px-5 py-3`,children:[(0,h.jsxs)(`button`,{type:`button`,onClick:()=>o&&r(!n),className:J(`flex min-w-0 flex-1 items-center gap-3 text-left`,o&&`cursor-pointer`),children:[(0,h.jsx)(U.span,{animate:{rotate:n?90:0},transition:Z,className:J(`text-fg-3`,!o&&`invisible`),children:(0,h.jsx)(I_,{className:`size-3.5`})}),(0,h.jsx)(`code`,{className:J(`shrink-0 font-mono text-[13px] font-medium`,i.enabled?`text-fg`:`text-fg-3 line-through`),children:e.usage}),(0,h.jsx)(`span`,{className:`truncate text-[13px] text-fg-3`,children:e.description})]}),(0,h.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1.5`,children:[e.overrideIssues.length>0&&(0,h.jsx)(`span`,{title:e.overrideIssues.join(`
50
- `),children:(0,h.jsxs)(yx,{tone:`danger`,children:[(0,h.jsx)(cb,{className:`size-3`}),`覆盖有冲突`]})}),i.modified&&(0,h.jsx)(yx,{tone:`accent`,children:`已修改`}),i.aliases.slice(0,2).map(e=>(0,h.jsx)(yx,{children:e},e)),i.aliases.length>2&&(0,h.jsxs)(yx,{children:[`+`,i.aliases.length-2]}),i.permission&&(0,h.jsx)(yx,{tone:`warning`,children:i.permission}),i.cooldown&&(0,h.jsxs)(yx,{tone:`info`,children:[`冷却 `,i.cooldown]}),e.scope!==`all`&&(0,h.jsx)(yx,{tone:`info`,children:e.scope===`group`?`群聊`:`私聊`}),e.disabledGroups.length>0&&(0,h.jsxs)(yx,{children:[e.disabledGroups.length,` 个群停用`]}),i.hidden&&(0,h.jsx)(yx,{children:`隐藏`}),(0,h.jsxs)(`div`,{className:`ml-1 flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100`,children:[(0,h.jsxs)(Q,{variant:`ghost`,size:`sm`,onClick:t,children:[(0,h.jsx)(cy,{className:`size-3.5`}),`编辑`]}),(0,h.jsxs)(Q,{variant:`soft`,size:`sm`,disabled:!i.enabled,onClick:()=>{px.set(`/${e.path} `),nx(`/playground`)},children:[(0,h.jsx)(fv,{className:`size-3.5`}),`试用`]})]}),(0,h.jsx)(FN,{"aria-label":`启用 /${e.path}`,checked:i.enabled,disabled:a.isPending,onCheckedChange:t=>{let{enabled:n,...r}=e.override??{},i=t?r:{...r,enabled:!1};a.mutate({path:e.path,override:Object.keys(i).length>0?i:null},{onSuccess:()=>W.success(t?`已启用 /${e.path}`:`已停用 /${e.path}`),onError:e=>W.error(e.message)})},className:`ml-2`})]})]}),(0,h.jsx)(Ef,{initial:!1,children:n&&(0,h.jsx)(U.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:Z,className:`overflow-hidden`,children:(0,h.jsxs)(`div`,{className:`grid gap-4 px-5 pb-4 pl-12 sm:grid-cols-2`,children:[e.options.length>0&&(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`div`,{className:`mb-2 text-[11.5px] font-medium tracking-wide text-fg-3`,children:`选项`}),(0,h.jsx)(`ul`,{className:`space-y-1.5`,children:e.options.map(e=>(0,h.jsxs)(`li`,{className:`text-[12.5px]`,children:[(0,h.jsx)(`code`,{className:`font-mono text-fg`,children:e.flags.join(`, `)}),e.description&&(0,h.jsx)(`span`,{className:`ml-2 text-fg-3`,children:e.description}),e.default!==void 0&&(0,h.jsxs)(`span`,{className:`ml-2 text-fg-3`,children:[`(默认 `,JSON.stringify(e.default),`)`]})]},e.flags.join(`,`)))})]}),e.examples.length>0&&(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`div`,{className:`mb-2 text-[11.5px] font-medium tracking-wide text-fg-3`,children:`示例`}),(0,h.jsx)(`ul`,{className:`space-y-1.5`,children:e.examples.map(e=>(0,h.jsx)(`li`,{children:(0,h.jsx)(`code`,{className:`rounded-md bg-surface-2 px-1.5 py-0.5 font-mono text-[12.5px] text-fg`,children:e})},e))})]})]})})})]})}function aP(e){let t=e.override??{},n=t.cooldown;return{enabled:t.enabled!==!1,aliases:t.aliases??[],permission:t.permission??`default`,cooldownMode:n===void 0?`default`:n===!1?`off`:`custom`,cooldownDuration:n?nM(n.duration):`10s`,cooldownScope:n?n.scope??`user`:`user`,hidden:t.hidden===void 0?`default`:t.hidden?`yes`:`no`}}function oP(e){let t={};return e.enabled||(t.enabled=!1),e.aliases.length>0&&(t.aliases=e.aliases),e.permission!=="default"&&(t.permission=e.permission),e.cooldownMode===`off`&&(t.cooldown=!1),e.cooldownMode===`custom`&&(t.cooldown={duration:e.cooldownDuration.trim(),scope:e.cooldownScope}),e.hidden!=="default"&&(t.hidden=e.hidden===`yes`),Object.keys(t).length>0?t:null}function sP({command:e,onClose:t}){let[n,r]=(0,m.useState)(null),[i,a]=(0,m.useState)(void 0);e!==i&&(a(e),r(e?aP(e):null));let o=nP(),s=_(),c=at({mutationFn:({path:e,groupKey:t})=>X.setCommandGroup(e,t,!0),onSuccess:()=>void s.invalidateQueries({queryKey:[`commands`]})}),l=e=>r(t=>t&&{...t,...e}),u=n?.cooldownMode!==`custom`||n.cooldownDuration.trim().length>0,d=n=>{e&&o.mutate({path:e.path,override:n},{onSuccess:e=>{e.overrideIssues.length>0?W.warning(e.overrideIssues.join(`;`)):W.success(n===null?`已恢复插件默认设置`:`已保存`),t()},onError:e=>W.error(e instanceof Tb&&e.issues.length>0?e.issues.map(e=>e.message).join(`;`):e.message)})};return(0,h.jsx)(ET,{open:e!==void 0,onOpenChange:e=>!e&&t(),title:e?`/${e.path}`:``,description:`这里的设置覆盖插件自己的声明,保存后立即生效,不需要重载插件`,footer:(0,h.jsxs)(h.Fragment,{children:[e?.override&&(0,h.jsxs)(Q,{variant:`ghost`,className:`mr-auto`,onClick:()=>d(null),disabled:o.isPending,children:[(0,h.jsx)(Sy,{className:`size-3.5`}),`恢复默认`]}),(0,h.jsx)(Q,{variant:`ghost`,onClick:t,children:`取消`}),(0,h.jsx)(Q,{variant:`primary`,loading:o.isPending,disabled:!n||!u,onClick:()=>n&&d(oP(n)),children:`保存`})]}),children:e&&n&&(0,h.jsxs)(`div`,{className:`space-y-5`,children:[(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-4 rounded-xl border border-border px-4 py-3`,children:[(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`div`,{className:`text-[13px] font-medium`,children:`启用`}),(0,h.jsx)(`p`,{className:`mt-0.5 text-[12px] text-fg-3`,children:`停用后对所有人(包括超管)都不可用,消息交给其他处理器。`})]}),(0,h.jsx)(FN,{checked:n.enabled,onCheckedChange:e=>l({enabled:e})})]}),(0,h.jsx)(jT,{label:`追加别名`,htmlFor:`override-aliases`,hint:e.aliases.length>0?`插件自带:${e.aliases.join(`、`)}。别名是完整路径,例如“重载插件”或“plugin rl”`:`别名是完整路径,例如“重载插件”或“plugin rl”`,children:(0,h.jsx)(XN,{id:`override-aliases`,value:n.aliases,onChange:e=>l({aliases:e.map(String)})})}),(0,h.jsx)(jT,{label:`权限`,htmlFor:`override-permission`,hint:e.permission?`插件为这条命令声明了权限规则`:`插件没有限制权限`,children:(0,h.jsx)(_N,{"aria-label":`权限`,value:n.permission,onValueChange:e=>l({permission:e}),options:[{value:`default`,label:`插件默认`},{value:`everyone`,label:`所有人`},{value:`group.admin`,label:`群管理员(含群主)`},{value:`group.owner`,label:`群主`},{value:`superuser`,label:`仅超管`}]})}),(0,h.jsx)(jT,{label:`冷却`,htmlFor:`override-cooldown`,hint:`超管不受冷却限制`,children:(0,h.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,h.jsx)(wj,{value:n.cooldownMode,onChange:e=>l({cooldownMode:e}),options:[{value:`default`,label:`插件默认`},{value:`off`,label:`取消冷却`},{value:`custom`,label:`自定义`}]}),n.cooldownMode===`custom`&&(0,h.jsxs)(`div`,{className:`flex gap-2`,children:[(0,h.jsx)(kT,{id:`override-cooldown`,placeholder:`例如 30s、5m`,value:n.cooldownDuration,onChange:e=>l({cooldownDuration:e.target.value}),className:`w-36 font-mono`}),(0,h.jsx)(_N,{"aria-label":`冷却范围`,value:n.cooldownScope,onValueChange:e=>l({cooldownScope:e}),options:Object.keys(eP).map(e=>({value:e,label:eP[e]}))})]})]})}),(0,h.jsx)(jT,{label:`在帮助中`,htmlFor:`override-hidden`,children:(0,h.jsx)(wj,{value:n.hidden,onChange:e=>l({hidden:e}),options:[{value:`default`,label:e.hidden?`插件默认(隐藏)`:`插件默认(显示)`},{value:`no`,label:`显示`},{value:`yes`,label:`隐藏`}]})}),e.disabledGroups.length>0&&(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`div`,{className:`mb-2 text-[13px] font-medium`,children:`已在这些群停用`}),(0,h.jsx)(`ul`,{className:`divide-y divide-border rounded-xl border border-border`,children:e.disabledGroups.map(t=>{let{platform:n,groupId:r}=QN(t);return(0,h.jsxs)(`li`,{className:`flex items-center justify-between px-3.5 py-2`,children:[(0,h.jsxs)(ix,{to:ZN(t),className:`min-w-0 hover:underline`,children:[(0,h.jsx)(`span`,{className:`font-mono text-[12.5px]`,children:r}),(0,h.jsx)(`span`,{className:`ml-2 text-[11.5px] text-fg-3`,children:n})]}),(0,h.jsx)(Q,{variant:`ghost`,size:`sm`,loading:c.isPending&&c.variables?.groupKey===t,onClick:()=>c.mutate({path:e.path,groupKey:t}),children:`恢复`})]},t)})})]}),e.overrideIssues.length>0&&(0,h.jsx)(`div`,{className:`rounded-xl bg-danger-soft px-4 py-3 text-[12.5px] text-danger`,children:e.overrideIssues.map(e=>(0,h.jsx)(`div`,{children:e},e))})]})})}function cP(e){let t=/^\/groups\/(.+)$/.exec(e);return t?decodeURIComponent(t[1]):null}function lP(){let e=_(),t=cP(rx()),n=it({queryKey:[`groups`],queryFn:()=>X.groups()}),r=at({mutationFn:()=>X.groups(!0),onSuccess:t=>e.setQueryData([`groups`],t)}),[i,a]=(0,m.useState)(``),[o,s]=(0,m.useState)(``),c=Mj(),[l,u]=(0,m.useState)(``),d=l||c[0]||``,f=(0,m.useMemo)(()=>{let e=i.trim().toLowerCase();return(n.data??[]).filter(t=>!e||t.groupId.toLowerCase().includes(e)||t.name?.toLowerCase().includes(e)).sort((e,t)=>uP(t)-uP(e)||(e.name??e.groupId).localeCompare(t.name??t.groupId))},[n.data,i]);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Dx,{title:`群组`,description:`按群设置插件开关、配置覆盖、命令开关和访问控制。列表来自在线机器人的群,以及设置过规则的群`,actions:(0,h.jsxs)(Q,{variant:`secondary`,loading:r.isPending,onClick:()=>r.mutate(),children:[(0,h.jsx)(vy,{className:`size-3.5`}),`刷新群列表`]})}),(0,h.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center gap-3`,children:[(0,h.jsx)(kT,{icon:(0,h.jsx)(Ay,{}),placeholder:`搜索群名或群 ID`,value:i,onChange:e=>a(e.target.value),className:`w-72`}),(0,h.jsxs)(`form`,{className:`ml-auto flex gap-2`,onSubmit:e=>{e.preventDefault();let t=o.trim();if(!Nj(t))return W.error(`请输入群 ID`);if(!d)return W.error(`没有已连接的平台,无法确定群所属的平台`);s(``),nx(ZN(`${d}:${t}`))},children:[c.length>1&&(0,h.jsx)(_N,{"aria-label":`平台`,value:d,onValueChange:u,options:c.map(e=>({value:e,label:Fj(e)}))}),(0,h.jsx)(kT,{icon:(0,h.jsx)(vb,{}),placeholder:`按群 ID 打开`,value:o,onChange:e=>s(e.target.value),className:`w-44`}),(0,h.jsx)(Q,{type:`submit`,variant:`secondary`,size:`icon`,"aria-label":`打开`,children:(0,h.jsx)(fy,{className:`size-4`})})]})]}),n.error&&!n.data?(0,h.jsx)(gx,{children:(0,h.jsx)(Ex,{error:n.error,onRetry:()=>void n.refetch(),retrying:n.isFetching})}):n.data?f.length===0?(0,h.jsx)(gx,{children:(0,h.jsx)(Tx,{icon:(0,h.jsx)(vb,{}),title:i?`没有匹配的群`:`还没有群`,description:i?void 0:`机器人上线后会列出它所在的群;也可以在右上角按群 ID 直接打开。`})}):(0,h.jsx)(gx,{className:`overflow-hidden`,children:(0,h.jsx)(U.ul,{variants:Mb,initial:`initial`,animate:`animate`,className:`divide-y divide-border`,children:f.map(e=>(0,h.jsx)(U.li,{variants:Nb,children:(0,h.jsx)(dP,{group:e})},e.groupKey))})}):(0,h.jsx)(wx,{className:`h-72 rounded-xl`}),(0,h.jsx)(fP,{groupKey:t,known:n.data,onClose:()=>nx(`/groups`)})]})}function uP(e){return e.rules.plugins+e.rules.configs+e.rules.commands+ +!!e.access}function dP({group:e}){let t=e.name??e.groupId;return(0,h.jsxs)(`button`,{type:`button`,onClick:()=>nx(ZN(e.groupKey)),className:`group flex w-full cursor-pointer items-center gap-3 px-5 py-3 text-left transition-colors hover:bg-surface-2/60`,children:[(0,h.jsx)(`span`,{className:`flex size-9 shrink-0 items-center justify-center rounded-[10px] bg-surface-2 text-[13px] font-medium text-fg-2`,children:t.slice(0,1)}),(0,h.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,h.jsx)(`div`,{className:`truncate text-[13.5px] font-medium`,children:t}),(0,h.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-2 text-[11.5px] text-fg-3`,children:[(0,h.jsx)(`span`,{className:`font-mono`,children:e.groupId}),(0,h.jsx)(`span`,{children:Fj(e.platform)}),e.bots.length>0?(0,h.jsxs)(`span`,{children:[e.bots.length,` 个机器人在群内`]}):(0,h.jsx)(`span`,{children:`机器人不在群内`})]})]}),(0,h.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1.5`,children:[e.access===`block`&&(0,h.jsx)(yx,{tone:`danger`,children:`已屏蔽`}),e.access===`allow`&&(0,h.jsx)(yx,{tone:`success`,children:`白名单`}),e.rules.plugins>0&&(0,h.jsxs)(yx,{children:[e.rules.plugins,` 个插件开关`]}),e.rules.configs>0&&(0,h.jsxs)(yx,{tone:`accent`,children:[e.rules.configs,` 个配置覆盖`]}),e.rules.commands>0&&(0,h.jsxs)(yx,{children:[e.rules.commands,` 条命令停用`]}),(0,h.jsx)(I_,{className:`size-4 text-fg-3 transition-transform group-hover:translate-x-0.5`})]})]})}function fP({groupKey:e,known:t,onClose:n}){let[r,i]=(0,m.useState)(`plugins`),a=it({queryKey:[`group`,e],queryFn:()=>X.group(e),enabled:e!==null}),o=a.data?.group??t?.find(t=>t.groupKey===e);return(0,h.jsx)(DT,{open:e!==null,onOpenChange:e=>!e&&n(),title:o?.name??o?.groupId??e??``,subtitle:o?(0,h.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,h.jsx)(`span`,{className:`font-mono`,children:o.groupId}),(0,h.jsx)(`span`,{children:Fj(o.platform)})]}):void 0,children:e!==null&&(a.error&&!a.data?(0,h.jsx)(Ex,{error:a.error,onRetry:()=>void a.refetch(),retrying:a.isFetching,className:`py-16`}):a.data?(0,h.jsx)(Ej,{value:r,onChange:i,className:`flex h-full flex-col`,tabs:[{value:`plugins`,label:`插件`,count:a.data.plugins.length},{value:`commands`,label:`命令`,count:a.data.commands.length},{value:`access`,label:`访问控制`}],children:(0,h.jsx)(Ef,{mode:`wait`,initial:!1,children:(0,h.jsxs)(U.div,{initial:{opacity:0,x:8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.16},className:`px-6 py-5`,children:[(0,h.jsx)(Dj,{value:`plugins`,forceMount:!0,hidden:r!==`plugins`,children:r===`plugins`&&(0,h.jsx)(mP,{detail:a.data,groupKey:e})}),(0,h.jsx)(Dj,{value:`commands`,forceMount:!0,hidden:r!==`commands`,children:r===`commands`&&(0,h.jsx)(_P,{detail:a.data,groupKey:e})}),(0,h.jsx)(Dj,{value:`access`,forceMount:!0,hidden:r!==`access`,children:r===`access`&&(0,h.jsx)(vP,{group:a.data.group})})]},r)})}):(0,h.jsxs)(`div`,{className:`space-y-3 p-6`,children:[(0,h.jsx)(wx,{className:`h-10`}),(0,h.jsx)(wx,{className:`h-40`})]}))})}function pP(e){let t=_();return()=>{t.invalidateQueries({queryKey:[`group`,e]}),t.invalidateQueries({queryKey:[`groups`]}),t.invalidateQueries({queryKey:[`pluginGroups`]}),t.invalidateQueries({queryKey:[`commands`]})}}function mP({detail:e,groupKey:t}){let n=it({queryKey:[`plugins`],queryFn:X.plugins}),[r,i]=(0,m.useState)(null),a=pP(t),o=_(),s=at({mutationFn:({name:e,enabled:n})=>X.setPluginGroup(e,t,{enabled:n}),onMutate:({name:e,enabled:n})=>{o.setQueryData([`group`,t],t=>t&&{...t,plugins:t.plugins.map(t=>t.name===e?{...t,enabled:n}:t)})},onSettled:a});return e.plugins.length===0?(0,h.jsx)(Tx,{icon:(0,h.jsx)(Py,{}),title:`没有已加载的插件`,className:`py-10`}):(0,h.jsxs)(`div`,{className:`space-y-4`,children:[(0,h.jsxs)(`p`,{className:`text-[13px] leading-relaxed text-fg-3`,children:[`关闭后,插件在这个群的命令、监听器和中间件都会被跳过。配置覆盖只替换你修改过的顶层配置项,其余沿用全局配置;只有通过`,` `,(0,h.jsx)(`code`,{className:`font-mono text-[12px]`,children:`ctx.configFor`}),` 读取配置的插件代码会按群生效。`]}),(0,h.jsx)(`ul`,{className:`space-y-2`,children:e.plugins.map(e=>{let a=n.data?.find(t=>t.name===e.name),o=r===e.name;return(0,h.jsxs)(`li`,{className:`overflow-hidden rounded-xl border border-border`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-3 px-4 py-3`,children:[(0,h.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,h.jsx)(`span`,{className:`text-[13.5px] font-medium`,children:e.name}),e.override&&(0,h.jsx)(yx,{tone:`accent`,children:`配置已覆盖`})]}),a?.description&&(0,h.jsx)(`div`,{className:`mt-0.5 truncate text-[12px] text-fg-3`,children:a.description})]}),e.configurable&&(0,h.jsxs)(Q,{variant:`ghost`,size:`sm`,onClick:()=>i(o?null:e.name),children:[(0,h.jsx)(Py,{className:`size-3.5`}),`配置`,(0,h.jsx)(U.span,{animate:{rotate:o?90:0},transition:Z,children:(0,h.jsx)(I_,{className:`size-3.5`})})]}),(0,h.jsx)(FN,{"aria-label":`在这个群启用 ${e.name}`,checked:e.enabled,onCheckedChange:t=>s.mutate({name:e.name,enabled:t})})]}),(0,h.jsx)(Ef,{initial:!1,children:o&&a&&(0,h.jsx)(U.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:Z,className:`overflow-hidden`,children:(0,h.jsx)(`div`,{className:`border-t border-border bg-surface-2/40 px-4 py-4`,children:(0,h.jsx)(gP,{plugin:a,groupKey:t,override:e.override})})})})]},e.name)})})]})}var hP=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function gP({plugin:e,groupKey:t,override:n}){let r=pP(t),[i,a]=(0,m.useState)({}),o=e.config??{},s=(0,m.useMemo)(()=>({...o,...n}),[o,n]),c=at({mutationFn:n=>X.setPluginGroup(e.name,t,{config:n}),meta:{silent:!0},onSuccess:(e,t)=>{a({}),W.success(t===null?`已清除这个群的配置覆盖`:`已保存这个群的配置覆盖`),r()},onError:e=>{e instanceof Tb&&e.status===400?a(Object.fromEntries(e.issues.map(e=>[e.path.replace(/^(?:plugins\.[^.]+\.)?config\.?/,``),e.message]))):W.error(e.message)}});return e.configSchema?(0,h.jsxs)(`div`,{className:`space-y-3`,children:[n&&(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-lg bg-accent-soft px-3 py-2 text-[12.5px] text-accent-soft-fg`,children:[(0,h.jsxs)(`span`,{children:[`已覆盖:`,Object.keys(n).join(`、`)]}),(0,h.jsxs)(Q,{variant:`ghost`,size:`sm`,loading:c.isPending,onClick:()=>c.mutate(null),children:[(0,h.jsx)(fb,{className:`size-3.5`}),`全部恢复为全局配置`]})]}),(0,h.jsx)(KN,{schema:e.configSchema,value:s,issues:i,saving:c.isPending,note:`只保存与全局配置不同的顶层配置项,立即生效,不重载插件`,submitLabel:`保存覆盖`,onSubmit:e=>{let t=Object.fromEntries(Object.entries(e??{}).filter(([e,t])=>!hP(t,o[e])));c.mutate(Object.keys(t).length>0?t:null)}})]}):null}function _P({detail:e,groupKey:t}){let n=pP(t),r=_(),[i,a]=(0,m.useState)(``),o=at({mutationFn:({path:e,enabled:n})=>X.setCommandGroup(e,t,n),onMutate:({path:e,enabled:n})=>{r.setQueryData([`group`,t],t=>t&&{...t,commands:t.commands.map(t=>t.path===e?{...t,enabled:n}:t)})},onSettled:n}),s=i.trim().toLowerCase(),c=e.commands.filter(e=>!s||e.path.toLowerCase().includes(s));return e.commands.length===0?(0,h.jsx)(Tx,{icon:(0,h.jsx)(Xy,{}),title:`没有已注册的命令`,className:`py-10`}):(0,h.jsxs)(`div`,{className:`space-y-4`,children:[(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,h.jsx)(`p`,{className:`text-[13px] text-fg-3`,children:`在这个群停用的命令等于不存在,消息会交给其他处理器。`}),(0,h.jsx)(kT,{icon:(0,h.jsx)(Ay,{}),placeholder:`搜索命令`,value:i,onChange:e=>a(e.target.value),className:`w-44`})]}),(0,h.jsx)(`ul`,{className:`divide-y divide-border rounded-xl border border-border`,children:c.map(e=>(0,h.jsxs)(`li`,{className:J(`flex items-center gap-3 px-4 py-2.5 transition-opacity`,!e.enabled&&`opacity-60`),children:[(0,h.jsxs)(`code`,{className:J(`font-mono text-[13px]`,!e.enabled&&`line-through`),children:[`/`,e.path]}),(0,h.jsx)(`span`,{className:`text-[12px] text-fg-3`,children:e.owner}),(0,h.jsx)(FN,{"aria-label":`在这个群启用 /${e.path}`,checked:e.enabled,onCheckedChange:t=>o.mutate({path:e.path,enabled:t}),className:`ml-auto`})]},e.path))})]})}function vP({group:e}){let t=_(),n=pP(e.groupKey),r=t=>({list:t,subject:`group`,key:e.groupKey}),i=at({mutationFn:async({add:e,remove:t})=>{t&&await X.removeAcl(t),e&&await X.addAcl(e)},onSuccess:()=>{t.invalidateQueries({queryKey:[`acl`]}),n()}}),a=e.access;return(0,h.jsxs)(`div`,{className:`space-y-3`,children:[[{list:`block`,title:`屏蔽这个群`,description:`这个群发来的所有事件都会被忽略(超管除外)。`,icon:(0,h.jsx)(g_,{className:`size-4`})},{list:`allow`,title:`加入白名单`,description:`群白名单非空时,只有名单中的群能使用机器人;私聊不受影响。`,icon:(0,h.jsx)(B_,{className:`size-4`})}].map(e=>{let t=a===e.list;return(0,h.jsxs)(`div`,{className:J(`flex items-center gap-4 rounded-xl border px-4 py-3.5 transition-colors`,t?e.list===`block`?`border-danger/40 bg-danger-soft/40`:`border-success/40 bg-success-soft/40`:`border-border`),children:[(0,h.jsx)(`span`,{className:J(e.list===`block`?`text-danger`:`text-success`),children:e.icon}),(0,h.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,h.jsx)(`div`,{className:`text-[13.5px] font-medium`,children:e.title}),(0,h.jsx)(`p`,{className:`mt-0.5 text-[12px] text-fg-3`,children:e.description})]}),(0,h.jsx)(Q,{variant:t?`ghost`:`secondary`,size:`sm`,loading:i.isPending&&i.variables?.add?.list===e.list,onClick:()=>i.mutate(t?{remove:r(e.list)}:{add:r(e.list),...a?{remove:r(a)}:{}}),children:t?`取消`:e.list===`block`?`屏蔽`:`加入`})]},e.list)}),(0,h.jsxs)(`p`,{className:`flex items-center gap-1.5 pt-1 text-[12px] text-fg-3`,children:[(0,h.jsx)(By,{className:`size-3.5`}),`完整的名单在“访问控制”页面管理。`]})]})}var yP=`modulepreload`,bP=function(e){return`/`+e},xP={},SP=function(e){return e.pathname.endsWith(`.css`)},CP=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},wP=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=bP(t,n);let r=s(t),i=SP(r);return CP(xP,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:yP,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{let i=a=>{t.removeEventListener(`load`,i),t.removeEventListener(`error`,i),a.type===`error`?n(Error(`Unable to preload CSS for ${r}`)):e(a)};t.addEventListener(`load`,i),t.addEventListener(`error`,i)})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},TP=(0,m.lazy)(()=>wP(()=>import(`./markdown-CDlgpI7K.js`).then(e=>({default:e.Markdown})),[])),EP={bold:`font-semibold`,italic:`italic`,underline:`underline`,strike:`line-through`,code:`rounded bg-surface-3/70 px-1 font-mono text-[0.92em]`,spoiler:`rounded bg-fg-3/60 text-transparent transition-colors hover:bg-transparent hover:text-inherit`};function DP({children:e,icon:t}){return(0,h.jsxs)(`span`,{className:`mx-0.5 inline-flex items-center gap-1 rounded-md bg-surface-3/60 px-1.5 text-[0.92em] text-fg-2`,children:[t,e]})}function OP(e){let t=String(e.data.url??e.data.file??``);if(/^https?:\/\//i.test(t))return t;if(t.startsWith(`base64://`)&&!/\[\d+ bytes\]$/.test(t))return`data:image/png;base64,${t.slice(9)}`}function kP({message:e,renderReply:t}){return(0,h.jsx)(h.Fragment,{children:e.map((e,n)=>{let r=`${e.type}-${n}`,i=e.data;switch(e.type){case`text`:{let e=Array.isArray(i.style)?i.style:[];return(0,h.jsx)(`span`,{className:J(e.map(e=>EP[e])),children:String(i.text)},r)}case`markdown`:return(0,h.jsx)(m.Suspense,{fallback:(0,h.jsx)(`span`,{className:`whitespace-pre-wrap`,children:String(i.content)}),children:(0,h.jsx)(TP,{className:`markdown-compact`,children:String(i.content)})},r);case`button`:{let e=String(i.label),t=String(i.value);return i.kind===`link`&&/^https?:\/\//i.test(t)?(0,h.jsx)(`a`,{href:t,target:`_blank`,rel:`noopener noreferrer`,className:`mx-0.5 my-0.5 inline-flex rounded-lg border border-border bg-surface px-2.5 py-0.5 text-[0.92em] font-medium text-accent hover:border-border-strong`,children:e},r):(0,h.jsx)(`span`,{title:t,className:`mx-0.5 my-0.5 inline-flex rounded-lg border border-border bg-surface px-2.5 py-0.5 text-[0.92em] font-medium text-fg`,children:e},r)}case`at`:return(0,h.jsxs)(`span`,{className:`mx-0.5 rounded bg-accent-soft px-1 text-accent-soft-fg`,children:[`@`,i.id===`all`?`全体成员`:String(i.id)]},r);case`image`:{let t=OP(e);return t?(0,h.jsx)(`img`,{src:t,alt:String(i.summary??`图片`),referrerPolicy:`no-referrer`,className:`my-1 block max-h-60 max-w-full rounded-lg`},r):(0,h.jsx)(DP,{children:`图片`},r)}case`face`:return(0,h.jsx)(DP,{children:`表情`},r);case`audio`:return(0,h.jsx)(DP,{children:`语音`},r);case`video`:return(0,h.jsx)(DP,{children:`视频`},r);case`file`:return(0,h.jsx)(DP,{icon:(0,h.jsx)(iy,{className:`size-3`}),children:String(i.name??`文件`)},r);case`forward`:return(0,h.jsx)(DP,{icon:(0,h.jsx)(Ry,{className:`size-3`}),children:`合并转发`},r);case`reply`:return(0,h.jsx)(`span`,{className:`mb-1 block`,children:t?t(String(i.id)):(0,h.jsx)(DP,{icon:(0,h.jsx)(by,{className:`size-3`}),children:`回复`})},r);default:return(0,h.jsx)(DP,{children:e.type},r)}})})}var AP={filter:`访问过滤`,observer:`监听器`,middleware:`中间件`,prompt:`对话等待`,command:`命令`,matcher:`匹配器`,suggest:`相似命令提示`},jP={handled:{label:`已处理`,tone:`success`},passed:{label:`放行`,tone:`neutral`},blocked:{label:`已拦截`,tone:`danger`},denied:{label:`权限不足`,tone:`warning`},cooldown:{label:`冷却中`,tone:`warning`},invalid:{label:`参数错误`,tone:`warning`},error:{label:`出错`,tone:`danger`},timeout:{label:`超时`,tone:`danger`}},MP={neutral:`bg-fg-3`,accent:`bg-accent`,success:`bg-success`,warning:`bg-warning`,danger:`bg-danger`,info:`bg-info`};function NP(e,t){let n=new Map;return e.map(e=>{let r=t(e),i=n.get(r)??0;return n.set(r,i+1),`${r}#${i}`})}function PP(e){return e<1?`<1 ms`:e<1e3?`${Math.round(e)} ms`:`${(e/1e3).toFixed(1)} s`}function FP({trace:e,logs:t}){let n=NP(e.steps,e=>`${e.stage}|${e.plugin??``}|${e.command??``}`),r=NP(t??[],e=>`${e.time}|${e.msg}`);return(0,h.jsxs)(`div`,{className:`space-y-3 text-[12.5px]`,children:[(0,h.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1 text-fg-3`,children:[(0,h.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 font-medium text-fg-2`,children:[(0,h.jsx)(bb,{className:`size-3.5`}),`处理链`]}),(0,h.jsx)(`span`,{className:`font-mono`,children:e.name}),(0,h.jsxs)(`span`,{children:[`耗时 `,PP(e.duration)]}),e.sent.length>0&&(0,h.jsxs)(`span`,{children:[`发出 `,e.sent.length,` 条消息`]})]}),e.steps.length===0?(0,h.jsx)(`p`,{className:`text-fg-3`,children:`没有任何处理器处理这条消息。`}):(0,h.jsx)(`ol`,{className:`relative space-y-2 pl-4 before:absolute before:top-1.5 before:bottom-1.5 before:left-[3px] before:w-px before:bg-border`,children:e.steps.map((e,t)=>{let r=jP[e.outcome];return(0,h.jsxs)(`li`,{className:`relative`,children:[(0,h.jsx)(`span`,{className:J(`absolute top-[7px] -left-4 size-[7px] rounded-full ring-2 ring-surface`,MP[r.tone])}),(0,h.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,h.jsx)(`span`,{className:`text-fg-2`,children:AP[e.stage]}),e.plugin&&(0,h.jsx)(`span`,{className:`rounded bg-accent-soft px-1.5 text-[11.5px] leading-[18px] text-accent-soft-fg`,children:e.plugin}),e.command&&(0,h.jsxs)(`code`,{className:`font-mono text-fg`,children:[`/`,e.command]}),(0,h.jsx)(yx,{tone:r.tone,children:r.label}),(0,h.jsx)(`span`,{className:`ml-auto text-fg-3 tabular`,children:PP(e.duration)})]}),e.error&&(0,h.jsx)(`p`,{className:`mt-1 break-words text-danger`,children:e.error})]},n[t])})}),t&&t.length>0&&(0,h.jsxs)(`div`,{children:[(0,h.jsxs)(`div`,{className:`mb-1.5 flex items-center gap-1.5 font-medium text-fg-2`,children:[(0,h.jsx)(Oy,{className:`size-3.5`}),`日志`]}),(0,h.jsx)(`ul`,{className:`space-y-1 rounded-lg bg-surface-2/60 px-3 py-2 font-mono text-[11.5px]`,children:t.map((e,t)=>{let n=eM(e.level);return(0,h.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,h.jsx)(`span`,{className:`shrink-0 text-fg-3 tabular`,children:Zj(e.time)}),(0,h.jsx)(`span`,{className:J(`w-11 shrink-0 rounded px-1 text-center text-[10.5px] leading-[17px] uppercase`,tM[n]),children:n}),e.plugin&&(0,h.jsx)(`span`,{className:`shrink-0 text-accent-soft-fg`,children:e.plugin}),(0,h.jsx)(`span`,{className:J(`min-w-0 break-words`,e.level>=50?`text-danger`:`text-fg`),children:e.msg})]},r[t])})})]})]})}function IP({eventId:e}){let t=it({queryKey:[`trace`,e],queryFn:()=>X.ext(`history`,`GET`,`/traces/${encodeURIComponent(e)}`),retry:!1,staleTime:1/0}),n=it({queryKey:[`logs`,`event`,e],queryFn:()=>X.logs(200,e),staleTime:3e4});return t.isPending?(0,h.jsx)(wx,{className:`h-20`}):t.error?(0,h.jsx)(`p`,{className:`text-[12.5px] text-fg-3`,children:t.error instanceof Tb&&t.error.status===404?`这条消息没有处理记录(可能早于记录开始,或已被清理)。`:`无法加载处理记录:${t.error.message}`}):(0,h.jsx)(FP,{trace:t.data,logs:n.data})}var LP=50;function RP(){let e=it({queryKey:[`groups`],queryFn:()=>X.groups()});return(0,m.useMemo)(()=>new Map((e.data??[]).flatMap(e=>e.name?[[e.groupKey,e.name]]:[])),[e.data])}function zP(e,t){if(e.type===`group`)return t.get(`${e.platform}:${e.id}`)??`群 ${e.id}`;let n=e.last.direction===`in`?e.last.nickname:void 0;return n?`${n}(私聊)`:`私聊 ${e.id}`}function BP(){let e=_(),t=RP(),[n,r]=(0,m.useState)(null),[i,a]=(0,m.useState)(``),[o,s]=(0,m.useState)(``),c=(0,m.useDeferredValue)(o.trim()),l=Xb(),u=it({queryKey:[`history`,`channels`],queryFn:()=>X.ext(`history`,`GET`,`/channels`)}),d=ot({queryKey:[`history`,`messages`,n,c],initialPageParam:void 0,queryFn:({pageParam:e})=>{let t=new URLSearchParams({limit:String(LP)});return n&&t.set(`channel`,n),c&&t.set(`q`,c),e!==void 0&&t.set(`before`,String(e)),X.ext(`history`,`GET`,`/messages?${t}`)},getNextPageParam:e=>e.more?e.items.at(-1)?.id:void 0}),f=l[0]?.time;(0,m.useEffect)(()=>{if(f===void 0)return;let t=window.setTimeout(()=>{e.invalidateQueries({queryKey:[`history`,`channels`]}),e.invalidateQueries({queryKey:[`history`,`messages`]})},600);return()=>window.clearTimeout(t)},[f,e]);let p=(0,m.useMemo)(()=>{let e=i.trim().toLowerCase();return(u.data??[]).filter(n=>!e||n.id.toLowerCase().includes(e)||zP(n,t).toLowerCase().includes(e))},[u.data,i,t]),g=u.data?.find(e=>e.channel===n),v=(0,m.useMemo)(()=>(d.data?.pages.flatMap(e=>e.items)??[]).toReversed(),[d.data]),y=(0,m.useRef)(null),b=(0,m.useRef)(null),x=d.data?.pages.length??0;(0,m.useLayoutEffect)(()=>{let e=y.current;if(!e||v.length===0)return;let t=b.current;!t||t.atBottom?e.scrollTop=e.scrollHeight:x>t.pages&&(e.scrollTop=e.scrollHeight-t.fromBottom)},[v,x]);let S=()=>{let e=y.current;if(!e)return;let t=e.scrollHeight-e.scrollTop;b.current={pages:x,fromBottom:t,atBottom:t-e.clientHeight<40}},C=e=>{b.current=null,r(e)};return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Dx,{title:`消息记录`,description:`history 插件记录的收发消息,以及每条消息经过了哪些插件处理`,actions:(0,h.jsxs)(Q,{variant:`secondary`,onClick:()=>{let e=n?`?channel=${encodeURIComponent(n)}`:``;window.location.href=`/api/panel/ext/history/export${e}`},children:[(0,h.jsx)(ev,{className:`size-3.5`}),n?`导出这个会话`:`导出全部`]})}),(0,h.jsxs)(`div`,{className:`grid gap-3 lg:grid-cols-[300px_1fr]`,children:[(0,h.jsxs)(gx,{className:`flex h-[calc(100dvh-190px)] min-h-[480px] flex-col overflow-hidden`,children:[(0,h.jsx)(`div`,{className:`border-b border-border p-3`,children:(0,h.jsx)(kT,{icon:(0,h.jsx)(Ay,{}),placeholder:`筛选会话`,value:i,onChange:e=>a(e.target.value)})}),(0,h.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-1.5`,children:[(0,h.jsx)(VP,{active:n===null,onClick:()=>C(null),title:`全部会话`,subtitle:u.data?`${u.data.length} 个会话`:void 0,icon:(0,h.jsx)(wv,{className:`size-4`})}),u.error&&!u.data?(0,h.jsx)(Ex,{error:u.error,onRetry:()=>void u.refetch(),retrying:u.isFetching,className:`py-8`}):u.data?p.map(e=>(0,h.jsx)(VP,{active:n===e.channel,onClick:()=>C(e.channel),title:zP(e,t),subtitle:`${e.last.direction===`out`?`机器人:`:e.last.nickname?`${e.last.nickname}:`:``}${e.last.text||`[非文本消息]`}`,time:e.last.time,icon:e.type===`group`?(0,h.jsx)(`span`,{className:`text-[12px] font-medium`,children:zP(e,t).slice(0,1)}):(0,h.jsx)(Vj,{id:e.id,name:e.last.nickname,size:32})},e.channel)):(0,h.jsxs)(`div`,{className:`space-y-1.5 p-1.5`,children:[(0,h.jsx)(wx,{className:`h-12`}),(0,h.jsx)(wx,{className:`h-12`}),(0,h.jsx)(wx,{className:`h-12`})]})]})]}),(0,h.jsxs)(gx,{className:`flex h-[calc(100dvh-190px)] min-h-[480px] flex-col overflow-hidden`,children:[(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-border px-5 py-3`,children:[(0,h.jsxs)(`div`,{className:`min-w-0 leading-tight`,children:[(0,h.jsx)(`div`,{className:`truncate text-[13.5px] font-semibold`,children:g?zP(g,t):`全部会话`}),(0,h.jsx)(`div`,{className:`text-[11.5px] text-fg-3`,children:g?`${Fj(g.platform)} · 机器人 ${g.selfId} · 共 ${g.count} 条`:`所有会话的消息按时间排列`})]}),(0,h.jsx)(kT,{icon:(0,h.jsx)(Ay,{}),placeholder:`搜索消息内容`,value:o,onChange:e=>{b.current=null,s(e.target.value)},className:`w-56`})]}),(0,h.jsx)(`div`,{ref:y,onScroll:S,className:`flex-1 overflow-y-auto px-5 py-4`,children:d.error&&!d.data?(0,h.jsx)(Ex,{error:d.error,onRetry:()=>void d.refetch(),retrying:d.isFetching}):d.data?v.length===0?(0,h.jsx)(Tx,{icon:(0,h.jsx)(Wv,{}),title:c?`没有匹配的消息`:`还没有消息记录`,description:c?void 0:`机器人收发消息后会出现在这里。`}):(0,h.jsxs)(`div`,{className:`space-y-1`,children:[d.hasNextPage&&(0,h.jsx)(`div`,{className:`flex justify-center pb-2`,children:(0,h.jsx)(Q,{variant:`ghost`,size:`sm`,loading:d.isFetchingNextPage,onClick:()=>void d.fetchNextPage(),children:`加载更早的消息`})}),v.map(e=>(0,h.jsx)(HP,{message:e,showChannel:n===null,names:t},e.id))]}):(0,h.jsxs)(`div`,{className:`space-y-3`,children:[(0,h.jsx)(wx,{className:`h-14`}),(0,h.jsx)(wx,{className:`h-14`}),(0,h.jsx)(wx,{className:`h-14`})]})})]})]})]})}function VP({active:e,onClick:t,title:n,subtitle:r,time:i,icon:a}){return(0,h.jsxs)(`button`,{type:`button`,onClick:t,className:J(`relative flex w-full cursor-pointer items-center gap-2.5 rounded-[10px] px-2.5 py-2 text-left transition-colors`,e?`text-fg`:`text-fg-2 hover:bg-surface-2/70`),children:[e&&(0,h.jsx)(U.span,{layoutId:`history-channel`,transition:Z,className:`absolute inset-0 rounded-[10px] bg-accent-soft`}),(0,h.jsx)(`span`,{className:`relative flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-[9px] bg-surface-2 text-fg-2`,children:a}),(0,h.jsxs)(`span`,{className:`relative min-w-0 flex-1`,children:[(0,h.jsxs)(`span`,{className:`flex items-center justify-between gap-2`,children:[(0,h.jsx)(`span`,{className:`truncate text-[13px] font-medium`,children:n}),i!==void 0&&(0,h.jsx)(`span`,{className:`shrink-0 text-[11px] text-fg-3`,children:Qj(i)})]}),r&&(0,h.jsx)(`span`,{className:`block truncate text-[12px] text-fg-3`,children:r})]})]})}function HP({message:e,showChannel:t,names:n}){let[r,i]=(0,m.useState)(!1),a=e.direction===`out`,o=e.direction===`in`&&e.eventId!==void 0,[,,s,...c]=e.channel.split(`:`),l=s===`group`?n.get(`${e.platform}:${c.join(`:`)}`)??`群 ${c.join(`:`)}`:`私聊`;return(0,h.jsxs)(`div`,{className:J(`group rounded-xl px-2 py-2 transition-colors`,r?`bg-surface-2/60`:`hover:bg-surface-2/40`),children:[(0,h.jsxs)(`div`,{className:`flex gap-3`,children:[a?(0,h.jsx)(zg,{className:`size-8 shrink-0`}):(0,h.jsx)(Vj,{id:e.userId??`?`,name:e.nickname,size:32}),(0,h.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,h.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-2 text-[12px]`,children:[(0,h.jsx)(`span`,{className:J(`font-medium`,a?`text-accent`:`text-fg`),children:a?`机器人`:e.nickname??e.userId}),!a&&e.nickname&&(0,h.jsx)(`span`,{className:`font-mono text-fg-3`,children:e.userId}),t&&(0,h.jsx)(`span`,{className:`text-fg-3`,children:l}),(0,h.jsx)(`span`,{className:`text-fg-3 tabular`,children:Zj(e.time)}),o&&(0,h.jsxs)(`button`,{type:`button`,onClick:()=>i(!r),className:J(`ml-auto inline-flex cursor-pointer items-center gap-1 rounded-md px-1.5 text-[11.5px] transition-opacity`,r?`text-accent`:`text-fg-3 opacity-0 group-hover:opacity-100 hover:text-fg-2`),children:[(0,h.jsx)(bb,{className:`size-3`}),`处理链`,(0,h.jsx)(U.span,{animate:{rotate:r?180:0},transition:Z,children:(0,h.jsx)(P_,{className:`size-3`})})]})]}),(0,h.jsx)(`div`,{className:`mt-0.5 text-[13.5px] leading-relaxed break-words whitespace-pre-wrap text-fg`,children:(0,h.jsx)(kP,{message:e.message})})]})]}),(0,h.jsx)(Ef,{initial:!1,children:r&&e.eventId&&(0,h.jsx)(U.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:Z,className:`overflow-hidden`,children:(0,h.jsx)(`div`,{className:`mt-2 ml-11 rounded-xl border border-border bg-surface px-4 py-3`,children:(0,h.jsx)(IP,{eventId:e.eventId})})})})]})}var UP=[{value:`trace`,label:`Trace`},{value:`debug`,label:`Debug`},{value:`info`,label:`Info`},{value:`warn`,label:`Warn`},{value:`error`,label:`Error`}],WP=new Set([`time`,`level`,`msg`,`plugin`,`eventId`,`pid`,`hostname`,`seq`]);function GP(){let e=Yb(),t=$b(),[n,r]=(0,m.useState)(`10`),[i,a]=(0,m.useState)(`*`),[o,s]=(0,m.useState)(``),[c,l]=(0,m.useState)(null),[u,d]=(0,m.useState)(!1),[f,p]=(0,m.useState)(null),[g,_]=(0,m.useState)(!0),v=(0,m.useRef)(null),y=u&&f?f:e,b=(0,m.useMemo)(()=>[...new Set(e.map(e=>e.plugin).filter(e=>!!e))].sort(),[e]),x=(0,m.useMemo)(()=>{let e=o.trim().toLowerCase(),t=Number(n);return y.filter(n=>n.level>=t&&(c===null||n.eventId===c)&&(i===`*`||(i===`-`?!n.plugin:n.plugin===i))&&(!e||n.msg.toLowerCase().includes(e)||JSON.stringify(n).toLowerCase().includes(e))).slice(-600)},[y,n,i,o,c]);return(0,m.useEffect)(()=>{let e=v.current;e&&g&&x.length>0&&(e.scrollTop=e.scrollHeight)},[x,g]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Dx,{title:`日志`,description:`实时日志,保留最近 2000 条`,actions:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(KP,{}),(0,h.jsxs)(Q,{variant:u?`primary`:`secondary`,onClick:()=>{p(u?null:e),d(!u)},children:[u?(0,h.jsx)(uy,{className:`size-3.5`}):(0,h.jsx)(oy,{className:`size-3.5`}),u?`继续`:`暂停`]}),(0,h.jsxs)(Q,{variant:`ghost`,onClick:t,children:[(0,h.jsx)(ov,{className:`size-3.5`}),`清空`]})]})}),(0,h.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center gap-2`,children:[(0,h.jsx)(wj,{value:n,onChange:r,options:[{value:`10`,label:`全部`},{value:`30`,label:`Info+`},{value:`40`,label:`Warn+`},{value:`50`,label:`Error`}]}),(0,h.jsx)(_N,{"aria-label":`按插件过滤`,value:i,onValueChange:a,options:[{value:`*`,label:`全部来源`},{value:`-`,label:`框架`},...b.map(e=>({value:e,label:e}))]}),c!==null&&(0,h.jsxs)(`span`,{className:`inline-flex h-8 items-center gap-1.5 rounded-lg border border-accent/30 bg-accent-soft py-0 pr-1 pl-2.5 text-[12.5px] text-accent-soft-fg`,children:[(0,h.jsx)(bb,{className:`size-3.5`}),`只看事件 `,(0,h.jsx)(`span`,{className:`font-mono`,children:c.slice(0,8)}),(0,h.jsx)(`button`,{type:`button`,"aria-label":`取消按事件过滤`,onClick:()=>l(null),className:`flex size-6 cursor-pointer items-center justify-center rounded-md hover:bg-accent/10`,children:(0,h.jsx)(wb,{className:`size-3.5`})})]}),(0,h.jsx)(kT,{icon:(0,h.jsx)(Ay,{}),placeholder:`搜索日志内容`,value:o,onChange:e=>s(e.target.value),className:`ml-auto w-64`})]}),(0,h.jsxs)(gx,{className:`relative overflow-hidden`,children:[(0,h.jsx)(`div`,{ref:v,onScroll:e=>{let t=e.currentTarget;_(t.scrollHeight-t.scrollTop-t.clientHeight<40)},className:`h-[calc(100vh-270px)] min-h-[360px] overflow-y-auto py-1.5 font-mono text-[12.5px]`,children:x.length===0?(0,h.jsx)(Tx,{icon:(0,h.jsx)(Oy,{}),title:y.length===0?`暂无日志`:`没有匹配的日志`,className:`h-full`}):x.map(e=>(0,h.jsx)(qP,{record:e,onEvent:l},e.seq))}),(0,h.jsx)(Ef,{children:!g&&(0,h.jsx)(U.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:8},transition:Z,className:`absolute right-4 bottom-4`,children:(0,h.jsxs)(Q,{variant:`secondary`,size:`sm`,className:`shadow-pop`,onClick:()=>{_(!0),v.current?.scrollTo({top:v.current.scrollHeight,behavior:`smooth`})},children:[(0,h.jsx)(i_,{className:`size-3.5`}),`最新`]})})}),u&&(0,h.jsx)(`div`,{className:`absolute top-3 right-4 rounded-md bg-warning-soft px-2 py-0.5 font-sans text-[11.5px] font-medium text-warning`,children:`已暂停`})]})]})}function KP(){let e=_(),t=it({queryKey:[`log-level`],queryFn:X.logLevel}),n=at({mutationFn:X.setLogLevel,onSuccess:t=>{e.setQueryData([`log-level`],t),W.success(`记录级别已调整为 ${t.level}`,{description:`仅本次运行有效,重启后恢复为配置文件中的 log.level`})}});return t.error?null:(0,h.jsxs)(`div`,{className:`mr-1 flex items-center gap-2`,children:[(0,h.jsx)(`span`,{className:`text-[12.5px] text-fg-3`,children:`记录级别`}),(0,h.jsx)(_N,{"aria-label":`记录级别`,value:t.data?.level,onValueChange:e=>n.mutate(e),options:UP,placeholder:`…`,className:`min-w-24`})]})}var qP=(0,m.memo)(function({record:e,onEvent:t}){let[n,r]=(0,m.useState)(!1),i=eM(e.level),a=Object.fromEntries(Object.entries(e).filter(([e])=>!WP.has(e))),o=Object.keys(a).length>0;return(0,h.jsxs)(`div`,{className:J(`group relative [content-visibility:auto] [contain-intrinsic-size:auto_28px]`,n&&`bg-surface-2/60`),children:[(0,h.jsxs)(`button`,{type:`button`,onClick:()=>o&&r(!n),className:J(`flex w-full items-start gap-3 px-4 py-[5px] text-left transition-colors hover:bg-surface-2/60`,o&&`cursor-pointer`),children:[(0,h.jsx)(`span`,{className:`shrink-0 text-fg-3 tabular`,children:Zj(e.time)}),(0,h.jsx)(`span`,{className:J(`w-12 shrink-0 rounded px-1 text-center text-[11px] leading-[18px] font-medium uppercase`,tM[i]),children:i}),e.plugin&&(0,h.jsx)(`span`,{className:`shrink-0 rounded bg-accent-soft px-1.5 text-[11.5px] leading-[18px] text-accent-soft-fg`,children:e.plugin}),(0,h.jsx)(`span`,{className:J(`min-w-0 flex-1 break-words whitespace-pre-wrap`,e.level>=50?`text-danger`:`text-fg`),children:e.msg})]}),e.eventId&&(0,h.jsxs)(`button`,{type:`button`,title:`只看这次事件处理产生的日志`,onClick:()=>t(e.eventId),className:`absolute top-[5px] right-4 cursor-pointer rounded bg-surface-2 px-1.5 font-mono text-[11px] leading-[18px] text-fg-3 opacity-0 transition-opacity group-hover:opacity-100 hover:text-fg-2 focus-visible:opacity-100`,children:[`事件 `,e.eventId.slice(0,8)]}),(0,h.jsx)(Ef,{initial:!1,children:n&&(0,h.jsx)(U.pre,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:Z,className:`overflow-hidden px-4 pl-[170px] text-[12px] leading-relaxed text-fg-2`,children:(0,h.jsx)(`code`,{className:`block pb-2`,children:JSON.stringify(a,null,2)})})})]})});function JP(){return(0,h.jsx)(gx,{className:`mt-10`,children:(0,h.jsx)(Tx,{icon:(0,h.jsx)(W_,{}),title:`页面不存在`,description:`这个地址没有对应的页面。`,action:(0,h.jsx)(Q,{variant:`primary`,onClick:()=>nx(`/`),children:`回到概览`})})})}var YP=232,XP={top:14,right:12,bottom:26,left:40},ZP=[{key:`received`,label:`收到`,color:`var(--series-in)`},{key:`sent`,label:`发出`,color:`var(--series-out)`}];function QP(e){let t=e[0];if(!t)return``;let n=[],r=[];for(let i=1;i<e.length;i++){let[a,o]=e[i-1]??t,[s,c]=e[i]??t;r.push(s-a),n.push((c-o)/(s-a))}let i=e.map((e,t)=>{let i=n[t-1],a=n[t];if(i===void 0)return a??0;if(a===void 0||i*a<=0)return a===void 0?i:0;let o=r[t-1]??0,s=r[t]??0;return 3*(o+s)/((2*s+o)/i+(s+2*o)/a)}),a=`M${t[0]},${t[1]}`;for(let n=1;n<e.length;n++){let[r,o]=e[n-1]??t,[s,c]=e[n]??t,l=(s-r)/3;a+=`C${r+l},${o+l*(i[n-1]??0)},${s-l},${c-l*(i[n]??0)},${s},${c}`}return a}function $P(e){let t=Math.max(1,e)/4,n=10**Math.floor(Math.log10(t)),r=t/n,i=Math.max(1,(r<=1?1:r<=2?2:r<=5?5:10)*n);return{max:i*4,step:i}}function eF({points:e,range:t,dimmed:n=!1}){let r=(0,m.useRef)(null),[i,a]=(0,m.useState)(0),[o,s]=(0,m.useState)(null);(0,m.useLayoutEffect)(()=>{let e=r.current;if(!e)return;let t=new ResizeObserver(([e])=>a(e?.contentRect.width??0));return t.observe(e),()=>t.disconnect()},[]);let c=(0,m.useMemo)(()=>{if(i===0||e.length===0)return null;let n=i-XP.left-XP.right,r=YP-XP.top-XP.bottom,{max:a,step:o}=$P(Math.max(...e.map(e=>Math.max(e.received,e.sent)))),s=e.length>1?n/(e.length-1):0,c=e=>XP.left+e*s,l=e=>XP.top+r-e/a*r,u=Object.fromEntries(ZP.map(t=>{let n=QP(e.map((e,n)=>[c(n),l(e[t.key])])),r=`${n}L${c(e.length-1)},${l(0)}L${c(0)},${l(0)}Z`;return[t.key,{line:n,area:r}]})),d=[0,1,2,3,4].map(e=>({value:e*o,y:l(e*o)})),f=t===`1h`?15:24;return{x:c,y:l,lines:u,ticks:d,xLabels:e.map((e,t)=>({index:t,t:e.t})).filter(({t:e,index:n})=>t===`1h`?new Date(e).getMinutes()%15==0:n%f===0),innerHeight:r,step:s}},[e,t,i]),l=t=>{if(!c||e.length===0)return;let n=t.currentTarget.getBoundingClientRect(),r=t.clientX-n.left,i=c.step===0?0:Math.round(r/c.step);s(Math.max(0,Math.min(e.length-1,i)))},u=o===null?null:e[o],d={received:e.reduce((e,t)=>e+t.received,0),sent:e.reduce((e,t)=>e+t.sent,0)},f=d.received===0&&d.sent===0;return(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`div`,{className:`mb-3 flex items-center gap-5 px-5`,children:ZP.map(e=>(0,h.jsxs)(`div`,{className:`flex items-center gap-2 text-[12.5px] text-fg-2`,children:[(0,h.jsx)(`span`,{className:`h-[2px] w-3.5 rounded-full`,style:{background:e.color}}),e.label,(0,h.jsx)(`span`,{className:`font-medium text-fg tabular`,children:Jj(d[e.key])})]},e.key))}),(0,h.jsxs)(`div`,{ref:r,className:J(`relative transition-opacity duration-300`,n&&`opacity-50`),style:{height:YP},children:[c&&(0,h.jsxs)(`svg`,{width:i,height:YP,className:`block overflow-visible`,role:`img`,"aria-label":`消息趋势图`,children:[(0,h.jsx)(`defs`,{children:ZP.map(e=>(0,h.jsxs)(`linearGradient`,{id:`fill-${e.key}`,x1:`0`,x2:`0`,y1:`0`,y2:`1`,children:[(0,h.jsx)(`stop`,{offset:`0%`,stopColor:e.color,stopOpacity:.14}),(0,h.jsx)(`stop`,{offset:`100%`,stopColor:e.color,stopOpacity:.01})]},e.key))}),c.ticks.map(e=>(0,h.jsxs)(`g`,{children:[(0,h.jsx)(`line`,{x1:XP.left,x2:i-XP.right,y1:e.y,y2:e.y,stroke:`var(--border)`,strokeWidth:1}),(0,h.jsx)(`text`,{x:XP.left-10,y:e.y,dy:`0.32em`,textAnchor:`end`,className:`fill-fg-3 text-[11px] tabular`,children:Jj(e.value)})]},e.value)),c.xLabels.map(({index:e,t})=>(0,h.jsx)(`text`,{x:c.x(e),y:226,textAnchor:`middle`,className:`fill-fg-3 text-[11px] tabular`,children:Zj(t,!1)},t)),ZP.map(e=>(0,h.jsx)(U.path,{d:c.lines[e.key].area,fill:`url(#fill-${e.key})`,initial:{opacity:0},animate:{opacity:1,d:c.lines[e.key].area},transition:Z},`${e.key}-area`)),ZP.map(e=>(0,h.jsx)(U.path,{d:c.lines[e.key].line,fill:`none`,stroke:e.color,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,initial:{pathLength:0},animate:{pathLength:1,d:c.lines[e.key].line},transition:{pathLength:{duration:1.1,ease:[.16,1,.3,1]},d:Z}},`${e.key}-line`)),u&&o!==null&&(0,h.jsxs)(`g`,{pointerEvents:`none`,children:[(0,h.jsx)(`line`,{x1:c.x(o),x2:c.x(o),y1:XP.top,y2:XP.top+c.innerHeight,stroke:`var(--border-strong)`,strokeWidth:1}),ZP.map(e=>(0,h.jsx)(U.circle,{initial:!1,animate:{cx:c.x(o),cy:c.y(u[e.key])},transition:{type:`spring`,stiffness:700,damping:40},r:4,fill:e.color,stroke:`var(--surface)`,strokeWidth:2},e.key))]}),(0,h.jsx)(`rect`,{x:XP.left,y:XP.top,width:Math.max(0,i-XP.left-XP.right),height:c.innerHeight,fill:`transparent`,onPointerMove:l,onPointerLeave:()=>s(null)})]}),(0,h.jsx)(Ef,{children:u&&o!==null&&c&&(0,h.jsxs)(U.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0,x:Math.min(Math.max(c.x(o)-70,0),i-150)},exit:{opacity:0},transition:{type:`spring`,stiffness:600,damping:40},className:`pointer-events-none absolute top-1 left-0 w-[150px] rounded-xl border border-border bg-surface/95 px-3 py-2.5 shadow-pop backdrop-blur`,children:[(0,h.jsxs)(`div`,{className:`mb-1.5 text-[11.5px] text-fg-3 tabular`,children:[Zj(u.t,!1),t===`24h`&&` – ${Zj(u.t+9e5,!1)}`]}),ZP.map(e=>(0,h.jsxs)(`div`,{className:`flex items-center gap-2 text-[12.5px]`,children:[(0,h.jsx)(`span`,{className:`h-[2px] w-3 rounded-full`,style:{background:e.color}}),(0,h.jsx)(`span`,{className:`font-semibold text-fg tabular`,children:Jj(u[e.key])}),(0,h.jsx)(`span`,{className:`text-fg-3`,children:e.label})]},e.key))]})}),f&&c&&(0,h.jsx)(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center pb-6 text-[12.5px] text-fg-3`,children:`这段时间还没有消息`}),(0,h.jsxs)(`table`,{className:`sr-only`,children:[(0,h.jsx)(`caption`,{children:`每个时间段收到和发出的消息数`}),(0,h.jsx)(`thead`,{children:(0,h.jsxs)(`tr`,{children:[(0,h.jsx)(`th`,{children:`时间`}),(0,h.jsx)(`th`,{children:`收到`}),(0,h.jsx)(`th`,{children:`发出`})]})}),(0,h.jsx)(`tbody`,{children:e.map(e=>(0,h.jsxs)(`tr`,{children:[(0,h.jsx)(`td`,{children:Zj(e.t,!1)}),(0,h.jsx)(`td`,{children:e.received}),(0,h.jsx)(`td`,{children:e.sent})]},e.t))})]})]})]})}function tF(){let e=it({queryKey:[`overview`],queryFn:X.overview,refetchInterval:6e4}),[t,n]=(0,m.useState)(`1h`),r=it({queryKey:[`stats`,t],queryFn:()=>X.stats(t),refetchInterval:t===`24h`&&3e5,placeholderData:e=>e}),i=e.data,a=i?.bots.filter(e=>e.status===`online`).length??0;return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Dx,{title:`概览`,description:new Date().toLocaleDateString(`zh-CN`,{month:`long`,day:`numeric`,weekday:`long`})}),e.error&&!e.data&&(0,h.jsx)(gx,{className:`mb-3`,children:(0,h.jsx)(Ex,{error:e.error,onRetry:()=>void e.refetch(),retrying:e.isFetching,className:`py-8`})}),(0,h.jsxs)(U.div,{variants:Mb,initial:`initial`,animate:`animate`,className:`grid grid-cols-2 gap-3 lg:grid-cols-4`,children:[(0,h.jsx)(nF,{icon:(0,h.jsx)(S_,{}),label:`在线机器人`,loading:!i,value:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(jj,{value:a}),(0,h.jsxs)(`span`,{className:`text-fg-3`,children:[` / `,i?.bots.length??0]})]}),footer:i&&i.bots.length===0?`尚未配置连接`:a===i?.bots.length?(0,h.jsx)(`span`,{className:`text-success`,children:`全部在线`}):(0,h.jsxs)(`span`,{className:`text-warning`,children:[(i?.bots.length??0)-a,` 个离线`]})}),(0,h.jsx)(nF,{icon:(0,h.jsx)(n_,{}),label:`今日收到`,loading:!i,value:(0,h.jsx)(jj,{value:i?.today.received??0}),footer:`条消息`}),(0,h.jsx)(nF,{icon:(0,h.jsx)(u_,{}),label:`今日发出`,loading:!i,value:(0,h.jsx)(jj,{value:i?.today.sent??0}),footer:`条消息`}),(0,h.jsx)(nF,{icon:(0,h.jsx)(my,{}),label:`运行中插件`,loading:!i,value:(0,h.jsx)(jj,{value:i?.plugins.active??0}),footer:i&&i.plugins.failed>0?(0,h.jsxs)(ix,{to:`/plugins`,className:`text-danger hover:underline`,children:[i.plugins.failed,` 个加载失败`]}):`${i?.plugins.disabled??0} 个已停用`})]}),(0,h.jsxs)(`div`,{className:`mt-3 grid gap-3 lg:grid-cols-3`,children:[(0,h.jsx)(U.div,{className:`lg:col-span-2`,initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{...Z,delay:.12},children:(0,h.jsxs)(gx,{className:`h-full pb-3`,children:[(0,h.jsx)(_x,{title:`消息趋势`,description:t===`1h`?`最近一小时,按分钟统计`:`最近 24 小时,每 15 分钟统计`,action:(0,h.jsx)(wj,{size:`sm`,value:t,onChange:n,options:[{value:`1h`,label:`1 小时`},{value:`24h`,label:`24 小时`}]})}),r.error&&!r.data?(0,h.jsx)(Ex,{error:r.error,onRetry:()=>void r.refetch(),retrying:r.isFetching,className:`py-12`}):r.data?(0,h.jsx)(eF,{points:r.data,range:t,dimmed:r.isPlaceholderData}):(0,h.jsx)(`div`,{className:`px-5 pt-8 pb-4`,children:(0,h.jsx)(wx,{className:`h-[232px] w-full`})})]})}),(0,h.jsx)(U.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{...Z,delay:.16},children:(0,h.jsx)(aF,{bots:i?.bots})})]}),(0,h.jsxs)(`div`,{className:`mt-3 grid gap-3 lg:grid-cols-3`,children:[(0,h.jsx)(U.div,{className:`lg:col-span-2`,initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{...Z,delay:.2},children:(0,h.jsx)(oF,{})}),(0,h.jsx)(U.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{...Z,delay:.24},children:(0,h.jsx)(sF,{startedAt:i?.startedAt,rss:i?.memory.rss,heap:i?.memory.heapUsed,node:i?.node,version:i?.version})})]})]})}function nF({icon:e,label:t,value:n,footer:r,loading:i}){return(0,h.jsx)(U.div,{variants:Nb,whileHover:{y:-2},transition:Z,children:(0,h.jsxs)(gx,{className:`group relative overflow-hidden px-5 pt-4 pb-4`,children:[(0,h.jsxs)(`div`,{className:`flex items-center justify-between text-[12.5px] text-fg-3`,children:[t,(0,h.jsx)(`span`,{className:`flex size-7 items-center justify-center rounded-lg bg-surface-2 text-fg-3 transition-colors group-hover:bg-accent-soft group-hover:text-accent-soft-fg [&>svg]:size-3.5`,children:e})]}),i?(0,h.jsx)(wx,{className:`mt-2 h-8 w-20`}):(0,h.jsx)(`div`,{className:`mt-1.5 text-[28px] leading-9 font-semibold tracking-[-0.03em] text-fg`,children:n}),(0,h.jsx)(`div`,{className:`mt-1 text-[12px] text-fg-3`,children:r})]})})}function rF(e){return e.status===`online`?`success`:e.status===`connecting`?`warning`:`danger`}var iF={online:`在线`,connecting:`连接中`,offline:`离线`};function aF({bots:e}){return(0,h.jsxs)(gx,{className:`flex h-full flex-col`,children:[(0,h.jsx)(_x,{title:`机器人`,description:`账号与连接状态`,action:(0,h.jsx)(ix,{to:`/bots`,className:`text-[12.5px] text-fg-3 hover:text-fg`,children:`查看`})}),(0,h.jsx)(`div`,{className:`px-2 pb-3`,children:e?e.length===0?(0,h.jsx)(Tx,{icon:(0,h.jsx)(gy,{}),title:`还没有连接`,description:`在配置文件的 adapters 段配置一个适配器,例如 OneBot 11 的正向或反向 WS。`,className:`py-8`}):(0,h.jsx)(`ul`,{children:e.map(e=>(0,h.jsxs)(`li`,{className:`flex items-center gap-3 rounded-xl px-3 py-2.5 transition-colors hover:bg-surface-2/70`,children:[(0,h.jsx)(Vj,{id:e.selfId,name:e.nickname,src:e.avatar,size:34}),(0,h.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,h.jsx)(`div`,{className:`truncate text-[13.5px] font-medium`,children:e.nickname??e.selfId}),(0,h.jsxs)(`div`,{className:`truncate font-mono text-[11.5px] text-fg-3`,children:[e.selfId,` · `,e.connection]})]}),(0,h.jsx)(yx,{tone:rF(e),dot:!0,pulse:e.status===`online`,children:iF[e.status]})]},`${e.platform}:${e.selfId}`))}):(0,h.jsxs)(`div`,{className:`space-y-2 px-3`,children:[(0,h.jsx)(wx,{className:`h-12`}),(0,h.jsx)(wx,{className:`h-12`})]})}),(0,h.jsxs)(`div`,{className:`mt-auto border-t border-border px-2 py-2`,children:[(0,h.jsx)(`div`,{className:`px-3 pt-1 pb-1.5 text-[11.5px] font-medium text-fg-3`,children:`快捷入口`}),[{to:`/playground`,icon:(0,h.jsx)(fv,{}),label:`在调试台试用插件`},{to:`/plugins`,icon:(0,h.jsx)(my,{}),label:`管理插件与配置`},{to:`/logs`,icon:(0,h.jsx)(Oy,{}),label:`查看实时日志`}].map(e=>(0,h.jsxs)(ix,{to:e.to,className:`group flex h-9 items-center gap-2.5 rounded-lg px-3 text-[13px] text-fg-2 transition-colors hover:bg-surface-2/70 hover:text-fg [&>svg:first-child]:size-3.5 [&>svg:first-child]:text-fg-3`,children:[e.icon,(0,h.jsx)(`span`,{className:`flex-1`,children:e.label}),(0,h.jsx)(I_,{className:`size-3.5 text-fg-3 transition-transform group-hover:translate-x-0.5`})]},e.to))]})]})}function oF(){let e=Xb(),[,t]=(0,m.useState)(0);return(0,m.useEffect)(()=>{let e=window.setInterval(()=>t(e=>e+1),15e3);return()=>window.clearInterval(e)},[]),(0,h.jsxs)(gx,{className:`h-full`,children:[(0,h.jsx)(_x,{title:`实时消息`,description:`机器人收到和发出的消息`,action:(0,h.jsxs)(`span`,{className:`flex items-center gap-1.5 text-[12px] text-fg-3`,children:[(0,h.jsxs)(`span`,{className:`relative flex size-1.5`,children:[(0,h.jsx)(`span`,{className:`absolute inset-0 rounded-full bg-success motion-safe:animate-pulse-soft`}),(0,h.jsx)(`span`,{className:`relative size-full rounded-full bg-success`})]}),`实时`]})}),(0,h.jsx)(`div`,{className:`h-[316px] overflow-hidden px-2 pb-2 [mask-image:linear-gradient(to_bottom,black_85%,transparent)]`,children:e.length===0?(0,h.jsx)(Tx,{icon:(0,h.jsx)(Wv,{}),title:`等待消息中`,description:`有人和机器人说话时,消息会出现在这里。`,className:`py-12`}):(0,h.jsx)(`ul`,{children:(0,h.jsx)(Ef,{initial:!1,children:e.slice(0,14).map(e=>(0,h.jsxs)(U.li,{layout:!0,initial:{opacity:0,y:-14,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0},transition:Z,className:`flex items-start gap-3 rounded-xl px-3 py-2`,children:[(0,h.jsx)(Vj,{id:e.direction===`out`?e.selfId:e.userId??`?`,name:e.direction===`out`?`Bot`:e.nickname,src:e.avatar,size:28}),(0,h.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-2 text-[12px]`,children:[(0,h.jsx)(`span`,{className:`font-medium text-fg`,children:e.direction===`out`?`机器人`:e.nickname??e.userId}),(0,h.jsx)(`span`,{className:J(`rounded px-1 text-[10.5px] font-medium`,e.direction===`out`?`bg-success-soft text-success`:`bg-accent-soft text-accent-soft-fg`),children:e.direction===`out`?`发出`:`收到`}),(0,h.jsx)(`span`,{className:`truncate text-fg-3`,children:e.channel.type===`group`?`群 ${e.channel.id}`:`私聊`}),(0,h.jsx)(`span`,{className:`ml-auto shrink-0 text-fg-3 tabular`,children:Qj(e.time)})]}),(0,h.jsx)(`p`,{className:`mt-0.5 truncate text-[13px] text-fg-2`,children:e.preview||`[非文本消息]`})]})]},`${e.time}-${e.direction}-${e.preview}-${e.userId??``}`))})})})]})}function sF({startedAt:e,rss:t,heap:n,node:r,version:i}){let[a,o]=(0,m.useState)(Date.now());(0,m.useEffect)(()=>{let e=window.setInterval(()=>o(Date.now()),1e3);return()=>window.clearInterval(e)},[]);let s=[{label:`已运行`,value:e?Xj(a-e):`—`},{label:`内存(RSS)`,value:t?Yj(t):`—`},{label:`JS 堆`,value:n?Yj(n):`—`},{label:`Node.js`,value:r??`—`},{label:`AsaBot`,value:i?`v${i}`:`—`}];return(0,h.jsxs)(gx,{className:`h-full`,children:[(0,h.jsx)(_x,{title:`系统`,description:`运行环境`,action:(0,h.jsx)(X_,{className:`size-4 text-fg-3`})}),(0,h.jsx)(`dl`,{className:`space-y-0.5 px-5 pb-4`,children:s.map(e=>(0,h.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border py-2.5 last:border-0`,children:[(0,h.jsx)(`dt`,{className:`text-[13px] text-fg-3`,children:e.label}),(0,h.jsx)(`dd`,{className:`text-[13px] font-medium text-fg tabular`,children:e.value})]},e.label))})]})}var cF={segments:[`text`],textStyles:[]},lF=1572864,uF=[{name:`notice.member.join`,label:`加入群聊`,icon:(0,h.jsx)(Iv,{}),group:!0},{name:`notice.member.leave`,label:`退出群聊`,icon:(0,h.jsx)(Rv,{}),group:!0},{name:`notice.member.mute`,label:`被禁言 10 分钟`,icon:(0,h.jsx)(Kv,{}),group:!0},{name:`notice.poke`,label:`戳一戳机器人`,icon:(0,h.jsx)(vv,{})},{name:`notice.message.recall`,label:`撤回上一条消息`,icon:(0,h.jsx)(ob,{})},{name:`request.friend`,label:`申请加好友`,icon:(0,h.jsx)(mb,{})},{name:`request.group.join`,label:`申请加群`,icon:(0,h.jsx)(vb,{}),group:!0},{name:`request.group.invite`,label:`邀请机器人进群`,icon:(0,h.jsx)(v_,{}),group:!0}],dF=0;function fF(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result).replace(/^data:[^;]+;base64,/,``)),r.onerror=()=>n(r.error),r.readAsDataURL(e)})}function pF(){let e=hx(),t=it({queryKey:[`commands`],queryFn:X.commands}),[n,r]=(0,m.useState)(`10001`),[i,a]=(0,m.useState)(`测试用户`),[o,s]=(0,m.useState)(`member`),[c,l]=(0,m.useState)(!1),[u,d]=(0,m.useState)(!1),[f,p]=(0,m.useState)(`group`),[g,_]=(0,m.useState)(`10000`),[v,y]=(0,m.useState)(``),[b,x]=(0,m.useState)(null),[S,C]=(0,m.useState)([]),[w,T]=(0,m.useState)(``),[E,D]=(0,m.useState)(null),[O,k]=(0,m.useState)([]),A=(0,m.useRef)(null),j=(0,m.useRef)(null),M=(0,m.useRef)(null);(0,m.useEffect)(()=>{e!==null&&(y(e),px.set(null),A.current?.focus())},[e]),(0,m.useEffect)(()=>{O.length>0&&M.current?.scrollTo({top:M.current.scrollHeight,behavior:`smooth`})},[O]);let N=()=>({id:n,nickname:i,role:f===`group`?o:void 0,superuser:c}),ee=u?cF:void 0,P=(e,t)=>{let n=Date.now();k(r=>[...r.map(n=>n.id===e?{...n,...t.incoming?{messageId:t.incoming.messageId}:{},traces:t.traces,logs:t.logs}:n),...t.replies.map(e=>({id:dF++,from:`bot`,time:n,message:e.message,text:e.text,messageId:e.messageId})),...t.actions.map(e=>({id:dF++,from:`system`,time:n,text:`机器人执行了 ${e.action}${Object.keys(e.params).length>0?` ${JSON.stringify(e.params)}`:``}`})),...t.replies.length===0&&t.actions.length===0?[{id:dF++,from:`system`,time:n,text:`没有回复`}]:[]])},F=e=>k(t=>[...t,{id:dF++,from:`system`,time:Date.now(),text:`出错了:${e.message}`}]),te=at({mutationFn:({message:e})=>X.playground({message:e,user:N(),group:f===`group`?g:null,capabilities:ee}),meta:{silent:!0},onSuccess:(e,{sourceId:t})=>P(t,e),onError:F}),ne=at({mutationFn:({name:e,fields:t})=>X.playgroundEvent({name:e,fields:t,user:N(),group:f===`group`?g:null,capabilities:ee}),meta:{silent:!0},onSuccess:(e,{sourceId:t})=>P(t,e),onError:F}),re=te.isPending||ne.isPending,ie=(e=v)=>{let t=e.trim();if(!t&&!b||re)return;let n=[...E?.messageId?[{type:`reply`,data:{id:E.messageId}}]:[],...S.flatMap(e=>[{type:`at`,data:{id:e}},{type:`text`,data:{text:` `}}]),...t?[{type:`text`,data:{text:t}}]:[],...b?[{type:`image`,data:{file:`base64://${b}`}}]:[]],r=dF++;k(e=>[...e,{id:r,from:`user`,time:Date.now(),message:n,text:t}]),y(``),x(null),C([]),D(null),te.mutate({sourceId:r,message:n})},ae=e=>{if(re)return;let t=[...O].reverse().find(e=>e.from===`user`&&e.messageId);if(e.name===`notice.message.recall`&&!t)return W.error(`还没有可以撤回的消息`);let n=e.name===`notice.member.mute`?{duration:6e5}:e.name===`notice.poke`?{targetId:`playground`}:e.name===`notice.message.recall`?{messageId:t?.messageId}:e.name.startsWith(`request.`)?{comment:`来自调试台的测试请求`}:void 0,r=dF++;k(t=>[...t,{id:r,from:`system`,time:Date.now(),text:`模拟事件:${e.label}`}]),ne.mutate({sourceId:r,name:e.name,...n?{fields:n}:{}})},oe=e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),ie())},se=async e=>{if(e){if(!e.type.startsWith(`image/`))return W.error(`只能附加图片`);if(e.size>lF)return W.error(`图片不能超过 1.5 MB`);x(await fF(e))}},ce=e=>O.find(t=>t.messageId===e),le=(t.data??[]).filter(e=>!e.hidden).slice(0,8),ue=(v.trim().length>0||b!==null)&&!re;return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Dx,{title:`调试台`,description:`模拟用户给机器人发消息或触发事件,走真实的插件和命令,但不会发到任何聊天平台`}),(0,h.jsxs)(`div`,{className:`grid gap-3 lg:grid-cols-[300px_1fr]`,children:[(0,h.jsxs)(`div`,{className:`space-y-3`,children:[(0,h.jsxs)(gx,{children:[(0,h.jsx)(_x,{title:`身份`,description:`以谁的身份发言`}),(0,h.jsxs)(`div`,{className:`space-y-4 px-5 pb-5`,children:[(0,h.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,h.jsx)(jT,{label:`用户 ID`,htmlFor:`pg-user`,children:(0,h.jsx)(kT,{id:`pg-user`,value:n,onChange:e=>r(e.target.value),className:`font-mono`})}),(0,h.jsx)(jT,{label:`昵称`,htmlFor:`pg-nick`,children:(0,h.jsx)(kT,{id:`pg-nick`,value:i,onChange:e=>a(e.target.value)})})]}),(0,h.jsx)(Ef,{initial:!1,children:f===`group`&&(0,h.jsx)(U.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:Z,className:`overflow-hidden`,children:(0,h.jsx)(jT,{label:`群角色`,children:(0,h.jsx)(wj,{className:`w-full [&>button]:flex-1`,value:o,onChange:s,options:[{value:`member`,label:(0,h.jsx)(gF,{icon:(0,h.jsx)(gb,{className:`size-3`}),text:`成员`})},{value:`admin`,label:(0,h.jsx)(gF,{icon:(0,h.jsx)(Wy,{className:`size-3`}),text:`管理员`})},{value:`owner`,label:(0,h.jsx)(gF,{icon:(0,h.jsx)(Q_,{className:`size-3`}),text:`群主`})}]})})})}),(0,h.jsx)(mF,{id:`pg-superuser`,title:`超管`,description:`仅在调试台内生效`,checked:c,onChange:l})]})]}),(0,h.jsxs)(gx,{children:[(0,h.jsx)(_x,{title:`会话`,description:`消息发在哪里`}),(0,h.jsxs)(`div`,{className:`space-y-4 px-5 pb-5`,children:[(0,h.jsx)(wj,{className:`w-full [&>button]:flex-1`,value:f,onChange:p,options:[{value:`group`,label:`群聊`},{value:`private`,label:`私聊`}]}),(0,h.jsx)(Ef,{initial:!1,children:f===`group`&&(0,h.jsx)(U.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:Z,className:`overflow-hidden`,children:(0,h.jsx)(jT,{label:`群号`,htmlFor:`pg-group`,hint:`群开关、白名单按这个群号判断`,children:(0,h.jsx)(kT,{id:`pg-group`,value:g,onChange:e=>_(e.target.value),className:`font-mono`})})})}),(0,h.jsx)(mF,{id:`pg-plain`,title:`模拟纯文本平台`,description:`图片、Markdown、按钮等会按平台能力降级`,checked:u,onChange:d})]})]})]}),(0,h.jsxs)(gx,{className:`flex h-[calc(100dvh-200px)] min-h-[520px] flex-col overflow-hidden`,children:[(0,h.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border px-5 py-3`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,h.jsx)(zg,{className:`size-6`}),(0,h.jsxs)(`div`,{className:`leading-tight`,children:[(0,h.jsx)(`div`,{className:`text-[13.5px] font-semibold`,children:`AsaBot`}),(0,h.jsxs)(`div`,{className:`text-[11.5px] text-fg-3`,children:[f===`group`?`群 ${g}`:`与 ${i} 私聊`,u&&` · 纯文本平台`]})]})]}),(0,h.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,h.jsx)(Oj,{trigger:(0,h.jsxs)(Q,{variant:`ghost`,size:`sm`,disabled:re,children:[(0,h.jsx)(v_,{className:`size-3.5`}),`模拟事件`]}),children:uF.map((e,t)=>(0,h.jsxs)(`div`,{children:[t===3&&(0,h.jsx)(Aj,{}),(0,h.jsx)(kj,{icon:e.icon,disabled:e.group&&f!==`group`,onSelect:()=>ae(e),children:e.label})]},e.name))}),(0,h.jsxs)(Q,{variant:`ghost`,size:`sm`,disabled:O.length===0,onClick:()=>k([]),children:[(0,h.jsx)(ov,{className:`size-3.5`}),`清空`]})]})]}),(0,h.jsxs)(`div`,{ref:M,className:`flex-1 space-y-3 overflow-y-auto px-5 py-5`,children:[O.length===0?(0,h.jsx)(_F,{suggestions:le.map(e=>`/${e.path}`),onPick:e=>ie(e)}):(0,h.jsx)(Ef,{initial:!1,children:O.map(e=>(0,h.jsx)(yF,{entry:e,userId:n,nickname:i,onQuote:e.messageId?()=>D(e):void 0,renderReply:e=>(0,h.jsx)(vF,{entry:ce(e)})},e.id))}),(0,h.jsx)(Ef,{children:re&&(0,h.jsx)(bF,{},`typing`)})]}),(0,h.jsxs)(`div`,{className:`border-t border-border p-3`,children:[le.length>0&&O.length>0&&(0,h.jsx)(`div`,{className:`mb-2 flex gap-1.5 overflow-x-auto pb-1`,children:le.map(e=>(0,h.jsxs)(`button`,{type:`button`,onClick:()=>{y(`/${e.path} `),A.current?.focus()},className:`shrink-0 cursor-pointer rounded-lg border border-border bg-surface px-2 py-1 font-mono text-[12px] text-fg-2 transition-colors hover:border-border-strong hover:text-fg`,children:[`/`,e.path]},e.path))}),(0,h.jsx)(Ef,{initial:!1,children:(E||S.length>0||b)&&(0,h.jsx)(U.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:Z,className:`overflow-hidden`,children:(0,h.jsxs)(`div`,{className:`mb-2 flex flex-wrap items-center gap-1.5`,children:[E&&(0,h.jsxs)(hF,{icon:(0,h.jsx)(by,{className:`size-3`}),onRemove:()=>D(null),children:[`回复:`,E.text?.slice(0,24)||`[消息]`]}),S.map(e=>(0,h.jsx)(hF,{icon:(0,h.jsx)(m_,{className:`size-3`}),onRemove:()=>C(t=>t.filter(t=>t!==e)),children:e===`playground`?`机器人`:e},e)),b&&(0,h.jsxs)(hF,{onRemove:()=>x(null),children:[(0,h.jsx)(`img`,{src:`data:image/*;base64,${b}`,alt:`附图`,className:`h-6 rounded`}),`图片`]})]})})}),(0,h.jsxs)(`div`,{className:`flex items-end gap-1.5 rounded-xl border border-border bg-surface-2/50 p-1.5 transition-[border-color,box-shadow] focus-within:border-accent focus-within:shadow-[0_0_0_3px_var(--ring)]`,children:[(0,h.jsxs)(Oj,{align:`start`,trigger:(0,h.jsx)(Q,{variant:`ghost`,size:`icon`,"aria-label":`提及`,className:`size-9 rounded-[10px]`,children:(0,h.jsx)(m_,{className:`size-4`})}),children:[(0,h.jsx)(kj,{icon:(0,h.jsx)(Jy,{}),onSelect:()=>C(e=>[...new Set([...e,`playground`])]),children:`提及机器人`}),(0,h.jsx)(Aj,{}),(0,h.jsxs)(`form`,{className:`flex gap-1 p-1`,onSubmit:e=>{e.preventDefault();let t=w.trim();t&&(C(e=>[...new Set([...e,t])]),T(``))},children:[(0,h.jsx)(kT,{placeholder:`用户 ID`,value:w,onChange:e=>T(e.target.value),onKeyDown:e=>e.stopPropagation(),className:`h-8 w-32 font-mono`}),(0,h.jsx)(Q,{type:`submit`,size:`sm`,variant:`secondary`,children:`添加`})]})]}),(0,h.jsx)(Q,{variant:`ghost`,size:`icon`,"aria-label":`附加图片`,className:`size-9 rounded-[10px]`,onClick:()=>j.current?.click(),children:(0,h.jsx)(bv,{className:`size-4`})}),(0,h.jsx)(`input`,{ref:j,type:`file`,accept:`image/*`,className:`hidden`,onChange:e=>{se(e.target.files?.[0]),e.target.value=``}}),(0,h.jsx)(`textarea`,{ref:A,rows:1,value:v,placeholder:`输入消息,回车发送,Shift + 回车换行;可以直接粘贴图片`,onChange:e=>y(e.target.value),onKeyDown:oe,onPaste:e=>{let t=[...e.clipboardData.files].find(e=>e.type.startsWith(`image/`));t&&(e.preventDefault(),se(t))},className:`max-h-36 min-h-9 flex-1 resize-none bg-transparent px-2 py-2 text-[13.5px] leading-5 outline-none [field-sizing:content] placeholder:text-fg-3`}),(0,h.jsx)(Q,{variant:`primary`,size:`icon`,"aria-label":`发送`,disabled:!ue,loading:te.isPending,onClick:()=>ie(),className:`size-9 rounded-[10px]`,children:(0,h.jsx)(f_,{className:`size-4`})})]})]})]})]})]})}function mF({id:e,title:t,description:n,checked:r,onChange:i}){return(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-xl border border-border px-3.5 py-2.5`,children:[(0,h.jsxs)(`label`,{htmlFor:e,className:`cursor-pointer`,children:[(0,h.jsx)(`span`,{className:`block text-[13px] font-medium`,children:t}),(0,h.jsx)(`span`,{className:`text-[12px] text-fg-3`,children:n})]}),(0,h.jsx)(FN,{id:e,checked:r,onCheckedChange:i})]})}function hF({icon:e,children:t,onRemove:n}){return(0,h.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-lg border border-border bg-surface py-0.5 pr-1 pl-2 text-[12px] text-fg-2`,children:[e,t,(0,h.jsx)(`button`,{type:`button`,"aria-label":`移除`,onClick:n,className:`flex size-5 cursor-pointer items-center justify-center rounded-md text-fg-3 hover:bg-surface-2 hover:text-fg`,children:(0,h.jsx)(wb,{className:`size-3`})})]})}function gF({icon:e,text:t}){return(0,h.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[e,t]})}function _F({suggestions:e,onPick:t}){return(0,h.jsxs)(U.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:Z,className:`flex h-full flex-col items-center justify-center text-center`,children:[(0,h.jsx)(`div`,{className:`mb-4 flex size-12 items-center justify-center rounded-2xl bg-accent-soft text-accent-soft-fg`,children:(0,h.jsx)(fv,{className:`size-5`})}),(0,h.jsx)(`p`,{className:`text-[14px] font-medium`,children:`试试和机器人说点什么`}),(0,h.jsx)(`p`,{className:`mt-1 max-w-sm text-[13px] leading-relaxed text-fg-3`,children:`多轮对话(比如猜数)也可以:机器人提问后,直接继续发消息回答即可。右上角可以模拟入群、戳一戳、好友申请等事件。`}),e.length>0&&(0,h.jsx)(`div`,{className:`mt-5 flex max-w-md flex-wrap justify-center gap-2`,children:e.slice(0,6).map((e,n)=>(0,h.jsxs)(U.button,{type:`button`,initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{...Z,delay:.05+n*.04},whileHover:{y:-2},onClick:()=>t(e),className:`flex cursor-pointer items-center gap-1.5 rounded-xl border border-border bg-surface px-3 py-1.5 font-mono text-[12.5px] text-fg-2 shadow-card hover:border-border-strong hover:text-fg`,children:[(0,h.jsx)(Jy,{className:`size-3 text-accent`}),e]},e))})]})}function vF({entry:e}){return(0,h.jsxs)(`span`,{className:`inline-flex max-w-full items-center gap-1.5 rounded-lg border-l-2 border-current/40 bg-black/5 px-2 py-0.5 text-[12px] opacity-80 dark:bg-white/10`,children:[(0,h.jsx)(Hv,{className:`size-3 shrink-0`}),(0,h.jsx)(`span`,{className:`truncate`,children:e?e.text||`[消息]`:`一条消息`})]})}function yF({entry:e,userId:t,nickname:n,onQuote:r,renderReply:i}){let[a,o]=(0,m.useState)(!1),s=e.traces??[],c=s.length>0&&(0,h.jsxs)(`button`,{type:`button`,onClick:()=>o(!a),className:J(`inline-flex cursor-pointer items-center gap-1 rounded-md px-1 text-[11px] transition-colors`,a?`text-accent`:`text-fg-3 hover:text-fg-2`),children:[(0,h.jsx)(bb,{className:`size-3`}),`处理链`]}),l=(0,h.jsx)(Ef,{initial:!1,children:a&&(0,h.jsx)(U.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:Z,className:`w-full overflow-hidden`,children:(0,h.jsx)(`div`,{className:`mt-1 space-y-4 rounded-xl border border-border bg-surface px-4 py-3 text-left`,children:s.map(t=>(0,h.jsx)(FP,{trace:t,logs:(e.logs??[]).filter(e=>e.eventId===t.eventId)},t.eventId))})})});if(e.from===`system`)return(0,h.jsxs)(U.div,{layout:!0,initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:Z,className:`flex flex-col items-center gap-1`,children:[(0,h.jsxs)(`span`,{className:`flex items-center gap-2 rounded-full bg-surface-2 px-3 py-1 text-[12px] text-fg-3`,children:[e.text,c]}),(0,h.jsx)(`div`,{className:`w-full max-w-xl`,children:l})]});let u=e.from===`user`;return(0,h.jsxs)(U.div,{layout:!0,initial:{opacity:0,y:10,scale:.96,x:u?10:-10},animate:{opacity:1,y:0,scale:1,x:0},transition:Ab,className:J(`group flex items-start gap-2.5`,u&&`flex-row-reverse`),children:[u?(0,h.jsx)(Vj,{id:t,name:n,size:28}):(0,h.jsx)(zg,{className:`size-7 shrink-0`}),(0,h.jsxs)(`div`,{className:J(`flex max-w-[72%] flex-col gap-1`,u?`items-end`:`items-start`),children:[(0,h.jsx)(`div`,{className:J(`rounded-2xl px-3.5 py-2 text-[13.5px] leading-relaxed break-words whitespace-pre-wrap`,u?`rounded-tr-md bg-accent text-accent-fg`:`rounded-tl-md border border-border bg-surface-2 text-fg`),children:e.message?(0,h.jsx)(kP,{message:e.message,renderReply:i}):e.text}),(0,h.jsxs)(`div`,{className:J(`flex items-center gap-1.5 px-1`,u&&`flex-row-reverse`),children:[(0,h.jsx)(`span`,{className:`text-[11px] text-fg-3 tabular`,children:Zj(e.time,!1)}),r&&(0,h.jsxs)(`button`,{type:`button`,onClick:r,className:`inline-flex cursor-pointer items-center gap-1 rounded-md px-1 text-[11px] text-fg-3 opacity-0 transition-opacity group-hover:opacity-100 hover:text-fg-2`,children:[(0,h.jsx)(by,{className:`size-3`}),`引用`]}),c]}),l]})]})}function bF(){return(0,h.jsxs)(U.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0},transition:Z,className:`flex items-end gap-2.5`,children:[(0,h.jsx)(zg,{className:`size-7 shrink-0`}),(0,h.jsx)(`div`,{className:`flex gap-1 rounded-2xl rounded-bl-md border border-border bg-surface-2 px-3.5 py-3`,children:[0,1,2].map(e=>(0,h.jsx)(U.span,{className:`size-1.5 rounded-full bg-fg-3`,animate:{y:[0,-4,0],opacity:[.5,1,.5]},transition:{duration:.9,repeat:1/0,delay:e*.15,ease:`easeInOut`}},e))})]})}var xF=[`bg`,`surface`,`surface-2`,`surface-3`,`border`,`border-strong`,`fg`,`fg-2`,`fg-3`,`accent`,`accent-hover`,`accent-fg`,`accent-soft`,`accent-soft-fg`,`success`,`success-soft`,`warning`,`warning-soft`,`danger`,`danger-soft`,`info`,`info-soft`,`ring`,`shadow-card`];function SF(){let e=getComputedStyle(document.documentElement);return Object.fromEntries(xF.map(t=>[t,e.getPropertyValue(`--${t}`).trim()]))}async function CF(e,t,n,r){let i=`/api/panel/ext/${encodeURIComponent(e)}`,a=new URL(i+t,window.location.origin);if(a.origin!==window.location.origin||!(a.pathname===i||a.pathname.startsWith(`${i}/`)))return{status:400,body:{error:{code:`BAD_REQUEST`,message:`Path escapes the plugin routes`}}};let o=/^(GET|POST|PUT|PATCH|DELETE)$/.test(n)?n:`GET`,s=o!==`GET`&&r!==void 0;try{let e=await fetch(a,{method:o,credentials:`same-origin`,headers:s?{"Content-Type":`application/json`}:void 0,body:s?JSON.stringify(r):void 0}),t=await e.text(),n=t;try{n=t?JSON.parse(t):void 0}catch{}return{status:e.status,body:n}}catch{return{status:0,body:void 0}}}function wF(){let e=rx(),t=decodeURIComponent(e.slice(7)),n=it({queryKey:[`plugins`],queryFn:X.plugins}),r=n.data?.find(e=>e.name===t),i=(0,m.useRef)(null),{resolved:a}=dx(),[o,s]=(0,m.useState)(null),c=o===t,l=r?.state===`active`&&r.page!==void 0;if((0,m.useEffect)(()=>{r?.page&&(document.title=`${r.page.title} · AsaBot`)},[r?.page]),(0,m.useEffect)(()=>{if(!l)return;let e=e=>i.current?.contentWindow?.postMessage({asabot:1,...e},`*`),n=n=>{if(!i.current||n.source!==i.current.contentWindow)return;let r=n.data;if(r?.asabot===1){if(r.kind===`ready`)e({kind:`theme`,mode:document.documentElement.classList.contains(`dark`)?`dark`:`light`,tokens:SF()});else if(r.kind===`toast`){let e=String(r.text).slice(0,300);r.level===`error`?W.error(e):r.level===`success`?W.success(e):W(e)}else r.kind===`fetch`&&typeof r.id==`number`&&typeof r.path==`string`&&CF(t,r.path.startsWith(`/`)?r.path:`/${r.path}`,String(r.method??`GET`).toUpperCase(),r.body).then(t=>e({id:r.id,...t}))}};window.addEventListener(`message`,n);let r=Hb(n=>{n.plugin===t&&e({kind:`event`,topic:n.topic,data:n.data})});return()=>{window.removeEventListener(`message`,n),r()}},[l,t]),(0,m.useEffect)(()=>{c&&i.current?.contentWindow?.postMessage({asabot:1,kind:`theme`,mode:a,tokens:SF()},`*`)},[a,c]),n.error&&!n.data)return(0,h.jsx)(gx,{children:(0,h.jsx)(Ex,{error:n.error,onRetry:()=>void n.refetch(),retrying:n.isFetching})});if(!n.data)return(0,h.jsx)(wx,{className:`h-[70vh] rounded-xl`});if(!l||!r?.page)return(0,h.jsx)(gx,{children:(0,h.jsx)(Tx,{icon:(0,h.jsx)(e_,{}),title:`这个插件页面不可用`,description:r?r.state===`active`?`插件没有提供页面。`:`插件当前没有运行,启用后页面会出现在侧边栏。`:`没有名为 ${t} 的插件。`})});let u=`/plugin-pages/${encodeURIComponent(t)}/`;return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Dx,{title:r.page.title,description:(0,h.jsxs)(h.Fragment,{children:[`由插件 `,(0,h.jsx)(`span`,{className:`font-medium text-fg-2`,children:r.name}),` 提供`]})}),(0,h.jsxs)(gx,{className:`relative overflow-hidden`,children:[!c&&(0,h.jsx)(wx,{className:`absolute inset-0 rounded-none`}),(0,h.jsx)(`iframe`,{ref:i,title:r.page.title,src:u,sandbox:`allow-scripts allow-forms allow-popups`,onLoad:()=>s(t),className:`block h-[calc(100dvh-190px)] min-h-[480px] w-full border-0 bg-transparent`},t)]})]})}var TF=(0,m.lazy)(()=>wP(()=>import(`./markdown-CDlgpI7K.js`).then(e=>({default:e.Markdown})),[]));function EF(e,t){if(!e.installed)return`安装`;let n=e.versions.findIndex(e=>e.version===t),r=e.versions.findIndex(t=>t.version===e.installed);return r===-1?`切换到`:n<r?`升级到`:`降级到`}var DF=[{value:`relevance`,label:`相关度`},{value:`updated`,label:`最近更新`},{value:`name`,label:`名称`}];function OF(e,t){let[n,r]=(0,m.useState)(e);return(0,m.useEffect)(()=>{let n=window.setTimeout(()=>r(e),t);return()=>window.clearTimeout(n)},[e,t]),n}function kF(){let[e,t]=(0,m.useState)(``),[n,r]=(0,m.useState)(`relevance`),i=OF(e.trim(),350),[a,o]=(0,m.useState)(null),[s,c]=(0,m.useState)(null),l=ot({queryKey:[`packageSearch`,i,n],queryFn:({pageParam:e})=>X.searchPackages(i,n,e),initialPageParam:0,getNextPageParam:(e,t)=>{let n=t.reduce((e,t)=>e+t.items.length,0);return e.items.length>0&&n<e.total?n:void 0},placeholderData:e=>e,retry:!1}),u=l.data?.pages.flatMap(e=>e.items),d=l.data?.pages[0]?.total;return(0,h.jsxs)(`div`,{children:[(0,h.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center gap-3`,children:[(0,h.jsx)(kT,{icon:(0,h.jsx)(Ay,{}),placeholder:`搜索插件包(带有 asabot-plugin 关键词的 npm 包)`,value:e,onChange:e=>t(e.target.value),className:`w-full max-w-md`}),d!==void 0&&(0,h.jsxs)(`span`,{className:`text-[12.5px] text-fg-3`,children:[`共 `,d,` 个结果`]}),(0,h.jsx)(wj,{value:n,onChange:r,options:DF,size:`sm`,className:`ml-auto`})]}),l.isPending?(0,h.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[`a`,`b`,`c`,`d`].map(e=>(0,h.jsx)(wx,{className:`h-[132px] rounded-xl`},e))}):l.error&&!u?(0,h.jsx)(gx,{children:(0,h.jsx)(Tx,{icon:(0,h.jsx)(ey,{}),title:`无法连接插件源`,description:`${l.error.message}。可以在配置的 packages.registry 中换成可访问的镜像。`})}):!u||u.length===0?(0,h.jsx)(gx,{children:(0,h.jsx)(Tx,{icon:(0,h.jsx)(ey,{}),title:`没有找到插件包`,description:`换个关键词试试。`})}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(U.div,{variants:Mb,initial:`initial`,animate:`animate`,className:J(`grid gap-3 sm:grid-cols-2 transition-opacity`,l.isPlaceholderData&&`opacity-60`),children:u.map(e=>(0,h.jsx)(AF,{item:e,onOpen:()=>o(e.name),onInstall:()=>c({name:e.name,version:e.version,description:e.description,verb:`安装`})},e.name))},`${i}:${n}`),l.hasNextPage&&(0,h.jsx)(`div`,{className:`mt-4 flex justify-center`,children:(0,h.jsxs)(Q,{variant:`secondary`,loading:l.isFetchingNextPage,onClick:()=>void l.fetchNextPage(),children:[`加载更多`,(0,h.jsxs)(`span`,{className:`text-fg-3 tabular`,children:[u.length,` / `,d]})]})})]}),(0,h.jsx)(PF,{name:a,onClose:()=>o(null),onInstall:c}),(0,h.jsx)(FF,{target:s,onClose:()=>c(null)})]})}function AF({item:e,onOpen:t,onInstall:n}){let r=e.installed&&e.installedVersion!==e.version;return(0,h.jsx)(U.div,{variants:Nb,whileHover:{y:-2},transition:Z,children:(0,h.jsxs)(gx,{className:`flex h-full cursor-pointer flex-col p-4 transition-[border-color] hover:border-border-strong`,onClick:t,children:[(0,h.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,h.jsxs)(`div`,{className:`min-w-0`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,h.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),t()},className:`cursor-pointer truncate rounded font-mono text-[13.5px] font-semibold outline-none focus-visible:shadow-[0_0_0_3px_var(--ring)]`,children:e.name}),(0,h.jsxs)(`span`,{className:`font-mono text-[11px] text-fg-3`,children:[`v`,e.version]})]}),(0,h.jsx)(`div`,{className:`mt-0.5 text-[11.5px] text-fg-3`,children:[e.author,e.date&&Qj(Date.parse(e.date))].filter(Boolean).join(` · `)})]}),e.installed?(0,h.jsx)(yx,{tone:r?`info`:`success`,dot:!0,children:r?`已安装 v${e.installedVersion}`:`已安装`}):(0,h.jsxs)(Q,{size:`sm`,variant:`primary`,onClick:e=>{e.stopPropagation(),n()},children:[(0,h.jsx)(ev,{className:`size-3.5`}),`安装`]})]}),(0,h.jsx)(`p`,{className:`mt-3 line-clamp-2 min-h-[38px] text-[13px] leading-relaxed text-fg-2`,children:e.description||`没有描述`}),(0,h.jsx)(`div`,{className:`mt-auto pt-3`,children:(0,h.jsx)(jF,{links:e.links})})]})})}function jF({links:e}){return(0,h.jsx)(`div`,{className:`flex gap-3 text-[12px]`,children:[[`npm`,e.npm],[`主页`,e.homepage],[`源码`,e.repository]].filter(e=>!!e[1]).map(([e,t])=>(0,h.jsxs)(`a`,{href:t,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>e.stopPropagation(),className:`inline-flex items-center gap-1 text-fg-3 transition-colors hover:text-fg`,children:[e,(0,h.jsx)(cv,{className:`size-3`})]},e))})}function MF(e){return e.versions.find(e=>e.compatible&&!e.deprecated)?.version??e.versions[0]?.version}function NF(e,t){return(0,h.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,h.jsxs)(`span`,{className:`font-mono`,children:[`v`,e.version]}),e.version===t.latest&&(0,h.jsx)(`span`,{className:`text-[11px] text-accent-soft-fg`,children:`最新`}),e.version===t.installed&&(0,h.jsx)(`span`,{className:`text-[11px] text-success`,children:`已安装`}),!e.compatible&&(0,h.jsx)(`span`,{className:`text-[11px] text-danger`,children:`不兼容`}),e.deprecated&&(0,h.jsx)(`span`,{className:`text-[11px] text-warning`,children:`已弃用`})]})}function PF({name:e,onClose:t,onInstall:n}){let[r,i]=(0,m.useState)(e);(0,m.useEffect)(()=>{e!==null&&i(e)},[e]);let a=it({queryKey:[`packageInfo`,r],queryFn:()=>X.packageInfo(r),enabled:r!==null,staleTime:3e5,retry:!1}),[o,s]=(0,m.useState)(),c=a.data,l=o?.name===r?o.version:c&&MF(c),u=c?.versions.find(e=>e.version===l);return(0,h.jsx)(DT,{open:e!==null,onOpenChange:e=>!e&&t(),title:(0,h.jsx)(`span`,{className:`font-mono`,children:r}),subtitle:c?.description??(a.isPending?`加载中…`:void 0),children:a.error&&!c?(0,h.jsx)(Ex,{error:a.error,onRetry:()=>void a.refetch(),retrying:a.isFetching}):!c||!l?(0,h.jsxs)(`div`,{className:`space-y-3 p-6`,children:[(0,h.jsx)(wx,{className:`h-10 w-full rounded-xl`}),(0,h.jsx)(wx,{className:`h-4 w-3/4`}),(0,h.jsx)(wx,{className:`h-4 w-2/3`}),(0,h.jsx)(wx,{className:`h-40 w-full rounded-xl`})]}):(0,h.jsxs)(`div`,{children:[(0,h.jsxs)(`div`,{className:`space-y-3 border-b border-border px-6 py-4`,children:[(0,h.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,h.jsx)(_N,{"aria-label":`选择版本`,value:l,onValueChange:e=>s({name:c.name,version:e}),options:c.versions.map(e=>({value:e.version,label:NF(e,c)})),className:`min-w-48`}),(0,h.jsxs)(Q,{variant:`primary`,disabled:l===c.installed,onClick:()=>n({name:c.name,version:l,description:c.description,installed:c.installed,verb:EF(c,l)}),children:[c.installed?(0,h.jsx)(R_,{className:`size-3.5`}):(0,h.jsx)(ev,{className:`size-3.5`}),l===c.installed?`已安装此版本`:`${EF(c,l)} v${l}`]})]}),(0,h.jsx)(Ef,{initial:!1,children:u&&(!u.compatible||u.deprecated)&&(0,h.jsx)(U.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:Z,className:`overflow-hidden`,children:(0,h.jsxs)(`div`,{className:`space-y-1 rounded-xl bg-warning-soft px-3.5 py-2.5 text-[12.5px] leading-relaxed text-warning`,children:[!u.compatible&&(0,h.jsxs)(`p`,{className:`flex gap-2`,children:[(0,h.jsx)(cb,{className:`mt-0.5 size-3.5 shrink-0`}),u.peerRange?`这个版本要求 asabot ${u.peerRange},与当前框架版本不兼容。`:`这个版本没有声明支持的 asabot 版本。`]}),u.deprecated&&(0,h.jsxs)(`p`,{className:`flex gap-2`,children:[(0,h.jsx)(cb,{className:`mt-0.5 size-3.5 shrink-0`}),`已弃用:`,u.deprecated]})]})},l)}),(0,h.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-4 gap-y-1.5 text-[12px] text-fg-3`,children:[c.license&&(0,h.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,h.jsx)(Ey,{className:`size-3.5`}),c.license]}),u?.date&&(0,h.jsxs)(`span`,{children:[`发布于 `,Qj(Date.parse(u.date))]}),(0,h.jsx)(jF,{links:c.links})]})]}),c.readme?.trim()?(0,h.jsx)(m.Suspense,{fallback:(0,h.jsxs)(`div`,{className:`space-y-2.5 px-6 py-5`,children:[(0,h.jsx)(wx,{className:`h-5 w-1/2`}),(0,h.jsx)(wx,{className:`h-4 w-full`}),(0,h.jsx)(wx,{className:`h-4 w-5/6`})]}),children:(0,h.jsx)(TF,{className:`px-6 py-5`,children:c.readme})}):(0,h.jsx)(Tx,{icon:(0,h.jsx)(b_,{}),title:`没有 README`,description:`这个插件包没有提供说明文档。`})]})})}function FF({target:e,onClose:t}){let n=Qb(),[r,i]=(0,m.useState)(!1),[a,o]=(0,m.useState)(null),s=()=>{i(!1),o(null)},c=at({mutationFn:e=>X.installPackage({name:e.name,version:e.version,force:r}),meta:{silent:!0},onSuccess:e=>{n(e),s(),t()},onError:e=>{e instanceof Tb&&e.status===409?o(e.message):W.error(e.message)}});return(0,h.jsx)(ET,{open:e!==null,onOpenChange:e=>{e||(s(),t())},title:`${e?.verb===`安装`?`安装`:`更换版本`} ${e?.name??``}`,description:e?.installed?`从 v${e.installed} ${e.verb} v${e.version}。`:e?.description,footer:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Q,{variant:`ghost`,onClick:t,children:`取消`}),(0,h.jsxs)(Q,{variant:`primary`,loading:c.isPending,disabled:a!==null&&!r,onClick:()=>e&&c.mutate(e),children:[(0,h.jsx)(ev,{className:`size-3.5`}),e?.verb,` v`,e?.version]})]}),children:(0,h.jsxs)(`div`,{className:`space-y-3`,children:[(0,h.jsxs)(`div`,{className:`flex gap-2.5 rounded-xl bg-warning-soft px-3.5 py-3 text-[12.5px] leading-relaxed text-warning`,children:[(0,h.jsx)(Hy,{className:`mt-0.5 size-4 shrink-0`}),`插件与框架运行在同一进程中,拥有完整权限。只安装你信任的插件包。`]}),(0,h.jsx)(Ef,{children:a&&(0,h.jsx)(U.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:Z,className:`overflow-hidden`,children:(0,h.jsxs)(`div`,{className:`space-y-3 rounded-xl border border-danger/30 bg-danger-soft px-3.5 py-3`,children:[(0,h.jsx)(`p`,{className:`text-[12.5px] text-danger`,children:a}),(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,h.jsx)(`label`,{htmlFor:`force-install`,className:`cursor-pointer text-[12.5px] text-fg-2`,children:`忽略版本要求,强制安装`}),(0,h.jsx)(FN,{id:`force-install`,checked:r,onCheckedChange:i})]})]})})})]})})}var IF=2097152;async function LF(e){let t=new Uint8Array(await e.arrayBuffer()),n=``;for(let e=0;e<t.length;e+=32768)n+=String.fromCharCode(...t.subarray(e,e+32768));return btoa(n)}function RF(e){let t=e.package;return!!(t?.latest&&t.latest!==t.version)}function zF({open:e,onOpenChange:t}){let n=_(),r=(0,m.useRef)(null),[i,a]=(0,m.useState)(null),[o,s]=(0,m.useState)(!1),[c,l]=(0,m.useState)(!1),u=at({mutationFn:async({file:e,overwrite:t})=>X.uploadPlugin({filename:e.name,content:await LF(e),overwrite:t}),meta:{silent:!0},onSuccess:e=>{n.invalidateQueries({queryKey:[`plugins`]}),n.invalidateQueries({queryKey:[`commands`]}),e.state===`failed`?W.error(`${e.name} 已上传,但加载失败`,{description:e.error}):W.success(`已安装 ${e.name}`),d()},onError:e=>{e instanceof Tb&&e.status===409?l(!0):W.error(e.message)}}),d=()=>{t(!1),a(null),l(!1)},f=e=>{if(e){if(!/\.(ts|js|zip)$/i.test(e.name))return W.error(`只支持 .ts、.js 或 .zip 文件`);if(e.size>IF)return W.error(`文件不能超过 2 MB`);a(e),l(!1)}};return(0,h.jsxs)(ET,{open:e,onOpenChange:e=>e?t(!0):d(),title:`上传插件`,description:`单个 .ts / .js 插件文件,或包含 index.ts 的 .zip 包。上传后立即加载。`,footer:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Q,{variant:`ghost`,onClick:d,children:`取消`}),(0,h.jsx)(Q,{variant:c?`danger`:`primary`,disabled:!i,loading:u.isPending,onClick:()=>i&&u.mutate({file:i,overwrite:c}),children:c?`覆盖并重载`:`上传`})]}),children:[(0,h.jsx)(`input`,{ref:r,type:`file`,accept:`.ts,.js,.zip`,className:`hidden`,onChange:e=>f(e.target.files?.[0])}),(0,h.jsxs)(U.button,{type:`button`,onClick:()=>r.current?.click(),onDragOver:e=>{e.preventDefault(),s(!0)},onDragLeave:()=>s(!1),onDrop:e=>{e.preventDefault(),s(!1),f(e.dataTransfer.files[0])},animate:{scale:o?1.015:1},transition:Ab,className:J(`flex w-full cursor-pointer flex-col items-center justify-center rounded-xl border border-dashed px-6 py-9 text-center transition-colors`,o?`border-accent bg-accent-soft`:`border-border-strong bg-surface-2/50 hover:bg-surface-2`),children:[(0,h.jsx)(U.span,{animate:{y:o?-4:0},transition:Ab,className:`mb-3 flex size-10 items-center justify-center rounded-xl bg-surface text-accent shadow-card`,children:(0,h.jsx)(uv,{className:`size-5`})}),i?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`span`,{className:`font-mono text-[13px] text-fg`,children:i.name}),(0,h.jsxs)(`span`,{className:`mt-1 text-[12px] text-fg-3`,children:[(i.size/1024).toFixed(1),` KB · 点击更换`]})]}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`span`,{className:`text-[13.5px] font-medium text-fg`,children:`拖拽文件到这里,或点击选择`}),(0,h.jsx)(`span`,{className:`mt-1 text-[12px] text-fg-3`,children:`最大 2 MB`})]})]}),(0,h.jsx)(Ef,{children:c&&(0,h.jsx)(U.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:Z,className:`overflow-hidden`,children:(0,h.jsxs)(`div`,{className:`mt-3 flex gap-2 rounded-lg bg-warning-soft px-3 py-2.5 text-[12.5px] text-warning`,children:[(0,h.jsx)(cb,{className:`mt-px size-4 shrink-0`}),`已存在同名插件。覆盖会替换原有文件并重新加载插件。`]})})})]})}function BF({plugin:e,onClose:t}){let n=_(),r=Qb(),[i,a]=(0,m.useState)(!1),o=at({mutationFn:async e=>e.source===`package`&&e.package?(r(await X.uninstallPackage(e.package.name,i)),`queued`):(await X.uninstallPlugin(e.name,i),`done`),onSuccess:(e,r)=>{e===`done`&&(W.success(`已卸载 ${r.name}`),n.invalidateQueries({queryKey:[`plugins`]}),n.invalidateQueries({queryKey:[`commands`]})),a(!1),t()}});return(0,h.jsx)(ET,{open:e!==null,onOpenChange:e=>!e&&t(),title:`卸载 ${e?.name??``}`,description:e?.source===`package`?`将通过 npm 卸载插件包 ${e.package?.name??``}。`:`将删除插件目录中的插件文件。依赖它的插件会被停用。`,footer:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Q,{variant:`ghost`,onClick:t,children:`取消`}),(0,h.jsxs)(Q,{variant:`danger`,loading:o.isPending,onClick:()=>e&&o.mutate(e),children:[(0,h.jsx)(ob,{className:`size-3.5`}),`卸载`]})]}),children:(0,h.jsxs)(`div`,{className:`flex items-start justify-between gap-4 rounded-xl border border-border px-4 py-3`,children:[(0,h.jsxs)(`label`,{htmlFor:`purge`,className:`cursor-pointer`,children:[(0,h.jsx)(`span`,{className:`block text-[13px] font-medium`,children:`同时清理数据`}),(0,h.jsx)(`span`,{className:`mt-0.5 block text-[12px] leading-relaxed text-fg-3`,children:`删除它的配置、存储的数据、数据表和数据目录。不清理的话,重新安装后可以继续使用原来的数据。`})]}),(0,h.jsx)(FN,{id:`purge`,checked:i,onCheckedChange:a})]})})}var VF={install:`安装`,update:`升级`,uninstall:`卸载`};function HF(){let e=Zb(),[t,n]=(0,m.useState)(new Set),[r,i]=(0,m.useState)(Date.now());(0,m.useEffect)(()=>{let e=window.setInterval(()=>i(Date.now()),2e3);return()=>window.clearInterval(e)},[]);let a=e.filter(e=>!t.has(e.id)&&(e.status===`queued`||e.status===`running`||r-(e.finishedAt??r)<(e.status===`failed`?6e4:8e3)));return(0,h.jsx)(`div`,{className:`pointer-events-none fixed right-4 bottom-4 z-40 flex w-[360px] max-w-[calc(100vw-2rem)] flex-col gap-2`,children:(0,h.jsx)(Ef,{initial:!1,children:a.map(e=>(0,h.jsx)(UF,{operation:e,onDismiss:()=>n(t=>new Set(t).add(e.id))},e.id))})})}function UF({operation:e,onDismiss:t}){let[n,r]=(0,m.useState)(e.status===`failed`),i=(0,m.useRef)(null),a=e.status===`queued`||e.status===`running`;return(0,m.useEffect)(()=>{e.status===`failed`&&r(!0)},[e.status]),(0,m.useEffect)(()=>{n&&e.log.length>0&&i.current?.scrollTo({top:i.current.scrollHeight})},[n,e.log.length]),(0,h.jsxs)(U.div,{layout:!0,initial:{opacity:0,y:16,scale:.97},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,x:24,transition:{duration:.18}},transition:Ab,className:`pointer-events-auto overflow-hidden rounded-xl border border-border bg-surface shadow-pop`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-3 px-3.5 py-3`,children:[(0,h.jsx)(`span`,{className:J(`flex size-7 shrink-0 items-center justify-center rounded-lg`,a&&`bg-accent-soft text-accent-soft-fg`,e.status===`succeeded`&&`bg-success-soft text-success`,e.status===`failed`&&`bg-danger-soft text-danger`),children:a?(0,h.jsx)(Cx,{className:`size-3.5`}):e.status===`succeeded`?(0,h.jsx)(M_,{className:`size-3.5`,strokeWidth:2.5}):(0,h.jsx)(wb,{className:`size-3.5`,strokeWidth:2.5})}),(0,h.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,h.jsxs)(`div`,{className:`truncate text-[13px] font-medium`,children:[VF[e.kind],` `,(0,h.jsx)(`span`,{className:`font-mono`,children:e.name})]}),(0,h.jsx)(`div`,{className:`truncate text-[12px] text-fg-3`,children:e.status===`queued`?`排队中…`:e.status===`running`?e.log.at(-1)??`正在执行 npm…`:e.status===`succeeded`?`完成${e.plugin?`,插件 ${e.plugin.name} 已${e.kind===`uninstall`?`移除`:`加载`}`:``}`:e.error??`失败`})]}),e.log.length>0&&(0,h.jsx)(Q,{variant:`ghost`,size:`icon-sm`,"aria-label":`查看日志`,onClick:()=>r(!n),children:(0,h.jsx)(U.span,{animate:{rotate:n?180:0},transition:Z,children:(0,h.jsx)(P_,{className:`size-3.5`})})}),!a&&(0,h.jsx)(Q,{variant:`ghost`,size:`icon-sm`,"aria-label":`关闭`,onClick:t,children:(0,h.jsx)(wb,{className:`size-3.5`})})]}),a&&(0,h.jsx)(`div`,{className:`h-0.5 overflow-hidden bg-surface-2`,children:(0,h.jsx)(U.div,{className:`h-full w-1/3 rounded-full bg-accent`,animate:{x:[`-100%`,`300%`]},transition:{duration:1.4,repeat:1/0,ease:`easeInOut`}})}),(0,h.jsx)(Ef,{initial:!1,children:n&&(0,h.jsx)(U.div,{initial:{height:0},animate:{height:`auto`},exit:{height:0},transition:Z,className:`overflow-hidden border-t border-border`,children:(0,h.jsx)(`pre`,{ref:i,className:`max-h-48 overflow-y-auto bg-surface-2/60 px-3.5 py-2.5 font-mono text-[11.5px] leading-relaxed whitespace-pre-wrap text-fg-2`,children:e.log.join(`
51
- `)})})})]})}function WF({plugin:e,size:t=`sm`}){let n=at({mutationFn:()=>X.updatePackage(e.package?.name??e.name),onSuccess:Qb()});return RF(e)?(0,h.jsxs)(Q,{variant:`soft`,size:t,loading:n.isPending,onClick:()=>n.mutate(),children:[(0,h.jsx)(R_,{className:`size-3.5`}),`升级到 v`,e.package?.latest]}):null}var GF={active:{label:`运行中`,tone:`success`},loading:{label:`加载中`,tone:`warning`},failed:{label:`加载失败`,tone:`danger`},disabled:{label:`已停用`,tone:`neutral`}};function KF(e){return e.source===`builtin`?`内置`:e.source===`package`?`npm · ${e.package?.name??e.name}`:`本地文件`}var qF=[`a`,`b`,`c`,`d`,`e`,`f`];function JF(){let e=_(),t=t=>e.setQueryData([`plugins`],e=>e?.map(e=>e.name===t.name?t:e));return{action:at({mutationFn:({name:e,action:t})=>X.pluginAction(e,t),onMutate:({name:t,action:n})=>{n!==`reload`&&e.setQueryData([`plugins`],e=>e?.map(e=>e.name===t?{...e,enabled:n===`enable`}:e))},onSuccess:(n,{action:r})=>{t(n),e.invalidateQueries({queryKey:[`overview`]}),r===`reload`?W.success(`已重载 ${n.name}`):n.state===`failed`&&W.error(`${n.name} 启用失败`,{description:n.error})},onError:()=>void e.invalidateQueries({queryKey:[`plugins`]})}),update:t}}function YF(){let e=it({queryKey:[`plugins`],queryFn:X.plugins}),[t,n]=(0,m.useState)(`all`),[r,i]=(0,m.useState)(``),[a,o]=(0,m.useState)(null),[s,c]=(0,m.useState)(`installed`),[l,u]=(0,m.useState)(!1),[d,f]=(0,m.useState)(null),{action:p}=JF(),g=_(),v=at({mutationFn:X.rescanPlugins,onSuccess:({added:e,removed:t,plugins:n})=>{g.setQueryData([`plugins`],n),g.invalidateQueries({queryKey:[`commands`]}),W.success(e.length===0&&t.length===0?`没有发现变化`:[e.length>0&&`新增 ${e.join(`、`)}`,t.length>0&&`移除 ${t.join(`、`)}`].filter(Boolean).join(`;`))}}),y=(0,m.useMemo)(()=>{let n=r.trim().toLowerCase();return(e.data??[]).filter(e=>(t===`all`||e.state===t)&&(!n||e.name.toLowerCase().includes(n)||e.description?.toLowerCase().includes(n)))},[e.data,t,r]),b=(0,m.useMemo)(()=>{let t=e.data;if(t)return{all:t.length,active:t.filter(e=>e.state===`active`).length,disabled:t.filter(e=>e.state===`disabled`).length,failed:t.filter(e=>e.state===`failed`).length}},[e.data]),x=e.data?.find(e=>e.name===a);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Dx,{title:`插件`,description:b?`共 ${b.all} 个插件,${b.active} 个正在运行`:`管理插件的启停、配置和群开关`,actions:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Sj,{content:`发现插件目录中新增或删除的插件`,children:(0,h.jsxs)(Q,{loading:!1,onClick:()=>v.mutate(),disabled:v.isPending,children:[(0,h.jsx)(U.span,{animate:v.isPending?{rotate:360}:{rotate:0},transition:v.isPending?{duration:.9,repeat:1/0,ease:`linear`}:Z,className:`inline-flex`,children:(0,h.jsx)(vy,{className:`size-3.5`})}),`重新扫描`]})}),(0,h.jsxs)(Q,{variant:`primary`,onClick:()=>u(!0),children:[(0,h.jsx)(uv,{className:`size-3.5`}),`上传插件`]})]})}),(0,h.jsx)(Tj,{className:`mb-5`,value:s,onChange:c,tabs:[{value:`installed`,label:(0,h.jsxs)(h.Fragment,{children:[`已安装 `,(0,h.jsx)(XF,{n:b?.all})]})},{value:`market`,label:(0,h.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,h.jsx)(eb,{className:`size-3.5`}),`插件市场`]})}]}),(0,h.jsx)(Ef,{mode:`wait`,initial:!1,children:s===`market`?(0,h.jsx)(U.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:Z,children:(0,h.jsx)(kF,{})},`market`):(0,h.jsxs)(U.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:Z,children:[(0,h.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center gap-2`,children:[(0,h.jsx)(wj,{value:t,onChange:n,options:[{value:`all`,label:(0,h.jsxs)(h.Fragment,{children:[`全部 `,(0,h.jsx)(XF,{n:b?.all})]})},{value:`active`,label:(0,h.jsxs)(h.Fragment,{children:[`运行中 `,(0,h.jsx)(XF,{n:b?.active})]})},{value:`disabled`,label:(0,h.jsxs)(h.Fragment,{children:[`已停用 `,(0,h.jsx)(XF,{n:b?.disabled})]})},{value:`failed`,label:(0,h.jsxs)(h.Fragment,{children:[`失败 `,(0,h.jsx)(XF,{n:b?.failed})]})}]}),(0,h.jsx)(kT,{icon:(0,h.jsx)(Ay,{}),placeholder:`搜索插件`,value:r,onChange:e=>i(e.target.value),className:`ml-auto w-56`})]}),e.error&&!e.data?(0,h.jsx)(gx,{children:(0,h.jsx)(Ex,{error:e.error,onRetry:()=>void e.refetch(),retrying:e.isFetching})}):e.data?y.length===0?(0,h.jsx)(gx,{children:(0,h.jsx)(Tx,{icon:(0,h.jsx)(my,{}),title:r||t!==`all`?`没有符合条件的插件`:`还没有插件`,description:`上传插件、从插件市场安装,或把插件文件放进插件目录后点“重新扫描”。`})}):(0,h.jsx)(U.div,{variants:Mb,initial:`initial`,animate:`animate`,className:`grid gap-3 sm:grid-cols-2 xl:grid-cols-3`,children:y.map(e=>(0,h.jsx)(ZF,{plugin:e,onOpen:()=>o(e.name),onToggle:t=>p.mutate({name:e.name,action:t?`enable`:`disable`}),onReload:()=>p.mutate({name:e.name,action:`reload`}),onUninstall:()=>f(e)},e.name))},t):(0,h.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2 xl:grid-cols-3`,children:qF.map(e=>(0,h.jsx)(wx,{className:`h-[150px] rounded-xl`},e))})]},`installed`)}),(0,h.jsx)(QF,{plugin:x,open:x!==void 0,onOpenChange:e=>!e&&o(null),onUninstall:e=>f(e)}),(0,h.jsx)(zF,{open:l,onOpenChange:u}),(0,h.jsx)(BF,{plugin:d,onClose:()=>{d&&d.name===a&&o(null),f(null)}})]})}function XF({n:e}){return e===void 0?null:(0,h.jsx)(`span`,{className:`ml-0.5 text-fg-3 tabular`,children:e})}function ZF({plugin:e,onOpen:t,onToggle:n,onReload:r,onUninstall:i}){let a=GF[e.state],o=e.commands.filter(e=>!e.hidden).length;return(0,h.jsx)(U.div,{variants:Nb,layout:!0,whileHover:{y:-2},transition:Z,children:(0,h.jsxs)(gx,{role:`button`,tabIndex:0,onClick:e=>{e.target.closest(`[data-card-control]`)||t()},onKeyDown:e=>e.key===`Enter`&&e.target===e.currentTarget&&t(),className:`group flex h-full cursor-pointer flex-col p-4 transition-[border-color,box-shadow] hover:border-border-strong hover:shadow-pop`,children:[(0,h.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,h.jsx)(`div`,{className:J(`flex size-9 shrink-0 items-center justify-center rounded-[10px] border border-border transition-colors`,e.state===`active`?`bg-accent-soft text-accent-soft-fg`:`bg-surface-2 text-fg-3`),children:(0,h.jsx)(ny,{className:`size-4`})}),(0,h.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,h.jsx)(`span`,{className:`truncate text-[14px] font-semibold tracking-[-0.01em]`,children:e.name}),e.version&&(0,h.jsxs)(`span`,{className:`font-mono text-[11px] text-fg-3`,children:[`v`,e.version]})]}),(0,h.jsx)(`div`,{className:`truncate text-[11.5px] text-fg-3`,children:KF(e)})]}),(0,h.jsxs)(`div`,{className:`flex items-center gap-1`,"data-card-control":!0,children:[(0,h.jsxs)(Oj,{trigger:(0,h.jsx)(Q,{variant:`ghost`,size:`icon-sm`,"aria-label":`更多操作`,className:`opacity-0 transition-opacity group-hover:opacity-100 data-[state=open]:opacity-100`,children:(0,h.jsx)(iv,{className:`size-4`})}),children:[(0,h.jsx)(kj,{icon:(0,h.jsx)(wy,{}),onSelect:r,children:`重载`}),(0,h.jsx)(kj,{icon:(0,h.jsx)(Py,{}),onSelect:t,children:`详情与配置`}),e.removable&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Aj,{}),(0,h.jsx)(kj,{icon:(0,h.jsx)(ob,{}),danger:!0,onSelect:i,children:`卸载`})]})]}),(0,h.jsx)(FN,{"aria-label":`启用 ${e.name}`,checked:e.enabled,onCheckedChange:n})]})]}),(0,h.jsx)(Ef,{mode:`wait`,initial:!1,children:e.state===`failed`&&e.error?(0,h.jsxs)(U.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:Z,className:`mt-3 flex min-h-[38px] gap-2 rounded-lg bg-danger-soft px-2.5 py-1.5 text-[12px] leading-relaxed text-danger`,children:[(0,h.jsx)(cb,{className:`mt-[3px] size-3.5 shrink-0`}),(0,h.jsx)(`span`,{className:`line-clamp-2 break-all`,children:e.error})]},`error`):(0,h.jsx)(U.p,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:`mt-3 line-clamp-2 min-h-[38px] text-[13px] leading-relaxed text-fg-2`,children:e.description||`没有描述`},`description`)}),(0,h.jsxs)(`div`,{className:`mt-auto flex items-center gap-2 pt-3`,children:[(0,h.jsx)(yx,{tone:a.tone,dot:!0,pulse:e.state===`loading`,children:a.label}),(0,h.jsxs)(`span`,{className:`flex items-center gap-1 text-[12px] text-fg-3`,children:[(0,h.jsx)(Xy,{className:`size-3.5`}),o,` 条命令`]}),RF(e)&&(0,h.jsxs)(`span`,{className:`ml-auto inline-flex items-center gap-1 text-[12px] text-info`,children:[(0,h.jsx)(R_,{className:`size-3.5`}),`v`,e.package?.latest]})]})]})})}function QF({plugin:e,open:t,onOpenChange:n,onUninstall:r}){let[i,a]=(0,m.useState)(`overview`),{action:o}=JF();return(0,h.jsx)(DT,{open:t,onOpenChange:e=>{n(e),e||a(`overview`)},title:e&&(0,h.jsxs)(`span`,{className:`flex items-center gap-2`,children:[e.name,(0,h.jsx)(yx,{tone:GF[e.state].tone,dot:!0,children:GF[e.state].label})]}),subtitle:e?.description,headerExtra:e&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Sj,{content:`重载插件`,children:(0,h.jsx)(Q,{variant:`ghost`,size:`icon`,"aria-label":`重载插件`,loading:o.isPending&&o.variables?.action===`reload`,onClick:()=>o.mutate({name:e.name,action:`reload`}),children:(0,h.jsx)(wy,{className:`size-4`})})}),(0,h.jsx)(FN,{"aria-label":`启用插件`,checked:e.enabled,onCheckedChange:t=>o.mutate({name:e.name,action:t?`enable`:`disable`})})]}),children:e&&(0,h.jsx)(Ej,{value:i,onChange:a,className:`flex h-full flex-col`,tabs:[{value:`overview`,label:`概览`},{value:`config`,label:`配置`},{value:`commands`,label:`命令`,count:e.commands.length},{value:`groups`,label:`群开关`}],children:(0,h.jsx)(Ef,{mode:`wait`,initial:!1,children:(0,h.jsxs)(U.div,{initial:{opacity:0,x:8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.16},className:`px-6 py-5`,children:[(0,h.jsx)(Dj,{value:`overview`,forceMount:!0,hidden:i!==`overview`,children:i===`overview`&&(0,h.jsx)(eI,{plugin:e,onUninstall:()=>r(e)})}),(0,h.jsx)(Dj,{value:`config`,forceMount:!0,hidden:i!==`config`,children:i===`config`&&(0,h.jsx)(nI,{plugin:e})}),(0,h.jsx)(Dj,{value:`commands`,forceMount:!0,hidden:i!==`commands`,children:i===`commands`&&(0,h.jsx)(iI,{plugin:e})}),(0,h.jsx)(Dj,{value:`groups`,forceMount:!0,hidden:i!==`groups`,children:i===`groups`&&(0,h.jsx)(aI,{plugin:e})})]},i)})})})}function $F({label:e,children:t}){return(0,h.jsxs)(`div`,{className:`flex items-start justify-between gap-6 border-b border-border py-3 last:border-0`,children:[(0,h.jsx)(`dt`,{className:`shrink-0 text-[13px] text-fg-3`,children:e}),(0,h.jsx)(`dd`,{className:`min-w-0 text-right text-[13px] break-all text-fg`,children:t})]})}function eI({plugin:e,onUninstall:t}){return(0,h.jsxs)(`div`,{className:`space-y-5`,children:[e.state===`failed`&&e.error&&(0,h.jsxs)(`div`,{className:`flex gap-2.5 rounded-xl bg-danger-soft px-3.5 py-3 text-[13px] text-danger`,children:[(0,h.jsx)(cb,{className:`mt-0.5 size-4 shrink-0`}),(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`div`,{className:`font-medium`,children:`加载失败`}),(0,h.jsx)(`p`,{className:`mt-0.5 leading-relaxed break-all`,children:e.error})]})]}),(0,h.jsxs)(`dl`,{children:[(0,h.jsx)($F,{label:`状态`,children:GF[e.state].label}),(0,h.jsx)($F,{label:`全局开关`,children:e.enabled?`已启用`:`已停用`}),(0,h.jsx)($F,{label:`版本`,children:e.version?(0,h.jsxs)(`span`,{className:`font-mono`,children:[`v`,e.version]}):`—`}),(0,h.jsx)($F,{label:`来源`,children:e.source===`builtin`?`内置插件`:e.source===`package`?`npm 插件包`:`本地文件`}),e.package&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)($F,{label:`包名`,children:(0,h.jsx)(`span`,{className:`font-mono`,children:e.package.name})}),(0,h.jsxs)($F,{label:`已安装版本`,children:[(0,h.jsxs)(`span`,{className:`font-mono`,children:[`v`,e.package.version]}),e.package.latest&&e.package.latest!==e.package.version&&(0,h.jsxs)(`span`,{className:`ml-2 text-info`,children:[`最新 v`,e.package.latest]})]}),e.package.peerRange&&(0,h.jsxs)($F,{label:`要求框架版本`,children:[(0,h.jsx)(`span`,{className:J(`font-mono`,!e.package.compatible&&`text-danger`),children:e.package.peerRange}),!e.package.compatible&&(0,h.jsx)(`span`,{className:`ml-2 text-danger`,children:`与当前版本不兼容`})]})]}),e.path&&(0,h.jsx)($F,{label:`文件`,children:(0,h.jsx)(`span`,{className:`font-mono text-[12px] text-fg-2`,children:e.path})}),(0,h.jsxs)($F,{label:`命令`,children:[e.commands.length,` 条`]}),(0,h.jsx)($F,{label:`可配置`,children:e.configSchema?`是`:`否`}),e.provides.length>0&&(0,h.jsx)($F,{label:`提供服务`,children:(0,h.jsx)(rI,{services:e.provides.map(e=>({name:e,optional:!1}))})}),e.inject.length>0&&(0,h.jsx)($F,{label:`依赖服务`,children:(0,h.jsx)(rI,{services:e.inject})})]}),RF(e)&&(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-xl bg-info-soft px-4 py-3`,children:[(0,h.jsxs)(`span`,{className:`text-[13px] text-info`,children:[`有新版本 v`,e.package?.latest,` 可用`]}),(0,h.jsx)(WF,{plugin:e})]}),e.removable&&(0,h.jsx)(`div`,{className:`rounded-xl border border-danger/25 px-4 py-3.5`,children:(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`div`,{className:`text-[13px] font-medium text-fg`,children:`卸载插件`}),(0,h.jsxs)(`p`,{className:`mt-0.5 text-[12px] text-fg-3`,children:[e.source===`package`?`通过 npm 卸载这个插件包。`:`删除插件目录中的插件文件。`,`可以选择同时清理数据。`]})]}),(0,h.jsxs)(Q,{variant:`danger-ghost`,size:`sm`,onClick:t,children:[(0,h.jsx)(ob,{className:`size-3.5`}),`卸载`]})]})})]})}function tI(e,t){if(!(t instanceof Tb))return{};let n=[`plugins.${e}.config.`,`plugins.${e}.config`,`config.`,`config`];return Object.fromEntries(t.issues.map(e=>{let t=n.find(t=>e.path.startsWith(t));return[t?e.path.slice(t.length):e.path,e.message]}))}function nI({plugin:e}){let{update:t}=JF(),n=at({mutationFn:t=>X.pluginConfig(e.name,t),meta:{silent:!0},onSuccess:e=>{t(e),W.success(`配置已保存,插件已重载`)},onError:e=>{e instanceof Tb&&e.status===400||W.error(e.message)}});return e.configSchema?(0,h.jsx)(KN,{schema:e.configSchema,value:e.config,issues:n.error?tI(e.name,n.error):{},saving:n.isPending,onSubmit:e=>n.mutate(e)}):(0,h.jsx)(Tx,{icon:(0,h.jsx)(Py,{}),title:`没有可配置项`,description:`插件没有声明 config schema。`,className:`py-10`})}function rI({services:e}){return(0,h.jsx)(`span`,{className:`inline-flex flex-wrap justify-end gap-1.5`,children:e.map(({name:e,optional:t})=>(0,h.jsx)(`span`,{title:t?`可选:缺失时插件照常运行`:void 0,children:(0,h.jsxs)(yx,{className:`font-mono`,children:[e,t&&(0,h.jsx)(`span`,{className:`font-sans text-fg-3`,children:`可选`})]})},e))})}function iI({plugin:e}){return e.commands.length===0?(0,h.jsx)(Tx,{icon:(0,h.jsx)(Xy,{}),title:`这个插件没有注册命令`,className:`py-10`}):(0,h.jsx)(`ul`,{className:`space-y-2`,children:e.commands.map(e=>(0,h.jsx)(`li`,{className:`group rounded-xl border border-border px-3.5 py-3`,children:(0,h.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,h.jsxs)(`div`,{className:`min-w-0`,children:[(0,h.jsx)(`code`,{className:`font-mono text-[13px] font-medium text-fg`,children:e.usage}),e.description&&(0,h.jsx)(`p`,{className:`mt-1 text-[12.5px] text-fg-3`,children:e.description}),(0,h.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:[e.aliases.map(e=>(0,h.jsxs)(yx,{children:[`别名 `,e]},e)),e.permission&&(0,h.jsx)(yx,{tone:`warning`,children:`需要权限`}),e.scope!==`all`&&(0,h.jsx)(yx,{tone:`info`,children:e.scope===`group`?`仅群聊`:`仅私聊`}),e.hidden&&(0,h.jsx)(yx,{children:`隐藏`})]})]}),(0,h.jsxs)(Q,{variant:`soft`,size:`sm`,className:`opacity-0 transition-opacity group-hover:opacity-100`,onClick:()=>{px.set(`/${e.path} `),nx(`/playground`)},children:[(0,h.jsx)(fv,{className:`size-3.5`}),`试用`]})]})},e.path))})}function aI({plugin:e}){let t=_(),n=it({queryKey:[`pluginGroups`,e.name],queryFn:()=>X.pluginGroups(e.name)}),[r,i]=(0,m.useState)(``),a=Mj(),[o,s]=(0,m.useState)(``),c=o||a[0]||``,l=at({mutationFn:({groupKey:t,enabled:n})=>X.setPluginGroup(e.name,t,{enabled:n}),onMutate:({groupKey:n,enabled:r})=>{t.setQueryData([`pluginGroups`,e.name],(e=[])=>e.some(e=>e.groupKey===n)?e.map(e=>e.groupKey===n?{...e,enabled:r}:e):[...e,{groupKey:n,enabled:r}])},onSettled:()=>{t.invalidateQueries({queryKey:[`pluginGroups`,e.name]}),t.invalidateQueries({queryKey:[`groups`]})}});return(0,h.jsxs)(`div`,{className:`space-y-5`,children:[(0,h.jsxs)(`p`,{className:`text-[13px] leading-relaxed text-fg-3`,children:[`默认在所有群生效。在这里关闭后,插件在该群的命令、监听器和中间件都会被跳过;私聊不受影响。`,e.configSchema&&`按群覆盖配置请到“群组”页面中打开对应的群。`]}),(0,h.jsxs)(`form`,{className:`flex gap-2`,onSubmit:e=>{e.preventDefault();let t=r.trim();if(!Nj(t))return W.error(`请输入群 ID`);if(!c)return W.error(`没有已连接的平台,无法确定群所属的平台`);l.mutate({groupKey:`${c}:${t}`,enabled:!1}),i(``)},children:[a.length>1&&(0,h.jsx)(_N,{"aria-label":`平台`,value:c,onValueChange:s,options:a.map(e=>({value:e,label:e}))}),(0,h.jsx)(kT,{icon:(0,h.jsx)(vb,{}),placeholder:`群 ID`,value:r,onChange:e=>i(e.target.value),className:`flex-1`}),(0,h.jsxs)(Q,{type:`submit`,variant:`secondary`,children:[(0,h.jsx)(fy,{className:`size-4`}),`在该群关闭`]})]}),n.error&&!n.data?(0,h.jsx)(Ex,{error:n.error,onRetry:()=>void n.refetch(),retrying:n.isFetching,className:`py-8`}):n.isPending?(0,h.jsx)(wx,{className:`h-24`}):(n.data??[]).length===0?(0,h.jsx)(Tx,{icon:(0,h.jsx)(vb,{}),title:`没有单独设置的群`,description:`当前在所有群都生效。`,className:`py-8`}):(0,h.jsx)(`ul`,{className:`divide-y divide-border rounded-xl border border-border`,children:(0,h.jsx)(Ef,{initial:!1,children:n.data?.map(e=>(0,h.jsxs)(U.li,{layout:!0,initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:Z,className:`flex items-center justify-between px-4 py-3`,children:[(0,h.jsxs)(`div`,{className:`min-w-0`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,h.jsx)(`span`,{className:`font-mono text-[13px] text-fg`,children:e.groupKey.split(`:`).slice(1).join(`:`)}),e.config!==void 0&&(0,h.jsx)(ix,{to:ZN(e.groupKey),children:(0,h.jsx)(yx,{tone:`accent`,children:`配置已覆盖`})})]}),(0,h.jsx)(`div`,{className:`text-[11.5px] text-fg-3`,children:e.groupKey.split(`:`)[0]})]}),(0,h.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,h.jsx)(`span`,{className:J(`text-[12.5px]`,e.enabled===!1?`text-fg-3`:`text-success`),children:e.enabled===!1?`已关闭`:`已开启`}),(0,h.jsx)(FN,{"aria-label":`${e.groupKey} 开关`,checked:e.enabled!==!1,onCheckedChange:t=>l.mutate({groupKey:e.groupKey,enabled:t})})]})]},e.groupKey))})})]})}var oI={type:`object`,properties:{superusers:{type:`array`,items:{type:`string`},title:`超级用户`,description:`拥有全部权限、不受冷却限制的用户 ID`},timezone:{type:`string`,title:`时区`,description:`IANA 时区名称,例如 Asia/Shanghai。用于定时任务和“今日”统计,重启后生效`}}},sI={type:`object`,properties:{prefixes:{type:`array`,items:{type:`string`},title:`命令前缀`,description:`消息以其中任一前缀开头时识别为命令`},mentionAsPrefix:{type:`boolean`,title:`@机器人时可省略前缀`,description:`群聊中 @机器人 后可以直接写命令名`},privateRequirePrefix:{type:`boolean`,title:`私聊也需要前缀`,description:`关闭时私聊可以直接写命令名`},replyOnError:{type:`boolean`,title:`出错时回复`,description:`命令处理出错时回复一条简短提示`},replyOnDenied:{type:`boolean`,title:`拒绝时回复`,description:`权限不足或冷却中时回复提示`},suggest:{type:`string`,title:`相似命令提示`,description:`命令写错时回复“你是不是想用 /xxx?”,只提示不执行`,oneOf:[{const:`direct`,title:`私聊和 @机器人 时`},{const:`always`,title:`所有带前缀的消息`},{const:`off`,title:`关闭`}]}}},cI={timezone:`时区`};function lI(e,t){return e instanceof Tb?Object.fromEntries(e.issues.filter(e=>e.path.startsWith(t)).map(e=>[e.path.slice(t.length).replace(/^\./,``),e.message])):{}}function uI(){let e=_(),t=it({queryKey:[`settings`],queryFn:X.settings}),[n,r]=(0,m.useState)(null),i=at({mutationFn:({input:e})=>X.updateSettings(e),meta:{silent:!0},onSuccess:(t,{input:n,message:i})=>{e.setQueryData([`settings`],t),n.adapters&&(e.invalidateQueries({queryKey:[`bots`]}),e.invalidateQueries({queryKey:[`overview`]})),r(null),W.success(i)},onError:e=>{e instanceof Tb&&e.status===400||W.error(e.message)}}),a=e=>i.variables?.section===e?i.error:null,o=e=>i.isPending&&i.variables?.section===e;return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Dx,{title:`设置`,description:`框架的核心配置,保存后写回配置文件`}),t.error&&!t.data?(0,h.jsx)(gx,{children:(0,h.jsx)(Ex,{error:t.error,onRetry:()=>void t.refetch(),retrying:t.isFetching})}):t.data?(0,h.jsxs)(U.div,{variants:Mb,initial:`initial`,animate:`animate`,className:`max-w-3xl space-y-3`,children:[(0,h.jsx)(Ef,{initial:!1,children:t.data.restartRequired.length>0&&(0,h.jsx)(U.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:Z,className:`overflow-hidden`,children:(0,h.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-xl bg-warning-soft px-4 py-3 text-[13px] text-warning`,children:[(0,h.jsx)(wy,{className:`size-4 shrink-0`}),`以下修改已写入配置文件,重启 AsaBot 后生效:`,t.data.restartRequired.map(e=>cI[e]??e).join(`、`)]})})}),(0,h.jsx)(dI,{icon:(0,h.jsx)(Ky,{}),title:`基本`,description:`超级用户与时区`,children:(0,h.jsx)(KN,{schema:oI,value:{superusers:t.data.superusers,timezone:t.data.timezone},issues:lI(a(`basic`),``),saving:o(`basic`),note:`超级用户立即生效,时区在重启后生效`,submitLabel:`保存`,onSubmit:e=>i.mutate({section:`basic`,input:e,message:`基本设置已保存`})})}),(0,h.jsx)(dI,{icon:(0,h.jsx)(Xy,{}),title:`命令`,description:`命令的触发方式与回复行为`,children:(0,h.jsx)(KN,{schema:sI,value:t.data.command,issues:lI(a(`command`),`command`),saving:o(`command`),note:`保存后立即生效`,submitLabel:`保存`,onSubmit:e=>i.mutate({section:`command`,input:{command:e},message:`命令设置已保存`})})}),Object.entries(t.data.adapters).map(([e,t])=>(0,h.jsx)(dI,{icon:(0,h.jsx)(E_,{}),title:Fj(e),description:(0,h.jsxs)(h.Fragment,{children:[`连接协议 · `,(0,h.jsxs)(`span`,{className:`font-mono`,children:[`adapters.`,e]})]}),action:(0,h.jsxs)(Q,{variant:`ghost`,size:`sm`,onClick:()=>r(e),children:[(0,h.jsx)(ob,{className:`size-3.5`}),`移除`]}),children:(0,h.jsx)(KN,{schema:t.schema,value:t.value,issues:lI(a(`adapter:${e}`),`adapters.${e}`),saving:o(`adapter:${e}`),note:`保存后按新配置重新连接,机器人会短暂离线`,submitLabel:`保存并重连`,onSubmit:t=>i.mutate({section:`adapter:${e}`,input:{adapters:{[e]:t}},message:`${Fj(e)} 已按新配置重新连接`})})},e)),(0,h.jsx)(fI,{settings:t.data,pending:i.isPending,onAdd:e=>i.mutate({section:`adapter:${e}`,input:{adapters:{[e]:{}}},message:`已添加 ${Fj(e)}`})})]}):(0,h.jsxs)(`div`,{className:`max-w-3xl space-y-3`,children:[(0,h.jsx)(wx,{className:`h-56 rounded-xl`}),(0,h.jsx)(wx,{className:`h-72 rounded-xl`})]}),(0,h.jsx)(ET,{open:n!==null,onOpenChange:e=>!e&&r(null),title:`移除 ${n?Fj(n):``}`,description:`这个协议下的所有机器人会断开连接并注销,相应配置会从配置文件中删除。`,footer:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Q,{variant:`ghost`,onClick:()=>r(null),children:`取消`}),(0,h.jsxs)(Q,{variant:`danger`,loading:i.isPending&&i.variables?.section===`adapter:${n}`,onClick:()=>n&&i.mutate({section:`adapter:${n}`,input:{adapters:{[n]:null}},message:`已移除 ${Fj(n)}`}),children:[(0,h.jsx)(ob,{className:`size-3.5`}),`移除`]})]})})]})}function dI({icon:e,title:t,description:n,action:r,children:i}){return(0,h.jsx)(U.div,{variants:Nb,children:(0,h.jsxs)(gx,{children:[(0,h.jsxs)(`div`,{className:`flex items-start justify-between gap-4 px-6 pt-5 pb-1`,children:[(0,h.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,h.jsx)(`div`,{className:`flex size-8 shrink-0 items-center justify-center rounded-lg border border-border bg-surface-2 text-fg-2 [&>svg]:size-4`,children:e}),(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`h2`,{className:`text-[14px] font-semibold tracking-[-0.01em] text-fg`,children:t}),(0,h.jsx)(`p`,{className:`mt-0.5 text-[12.5px] text-fg-3`,children:n})]})]}),r]}),(0,h.jsx)(`div`,{className:`px-6 pt-4 pb-6`,children:i})]})})}function fI({settings:e,pending:t,onAdd:n}){let r=e.available.filter(t=>!(t in e.adapters)),[i,a]=(0,m.useState)();if(r.length===0)return null;let o=i&&r.includes(i)?i:r[0];return(0,h.jsx)(U.div,{variants:Nb,children:(0,h.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 rounded-xl border border-dashed border-border-strong px-5 py-4`,children:[(0,h.jsxs)(`div`,{className:`mr-auto`,children:[(0,h.jsx)(`p`,{className:`text-[13.5px] font-medium text-fg`,children:`添加连接协议`}),(0,h.jsx)(`p`,{className:`mt-0.5 text-[12.5px] text-fg-3`,children:`以默认配置创建,保存后再在上面的表单中填写连接信息`})]}),(0,h.jsx)(_N,{"aria-label":`连接协议`,value:o,onValueChange:a,options:r.map(e=>({value:e,label:Fj(e)})),className:`min-w-36`}),(0,h.jsxs)(Q,{variant:`secondary`,loading:t,onClick:()=>o&&n(o),children:[(0,h.jsx)(fy,{className:`size-3.5`}),`添加`]})]})})}var pI=1,mI=.9,hI=.8,gI=.17,_I=.1,vI=.999,yI=.9999,bI=.99,xI=/[\\\/_+.#"@\[\(\{&]/,SI=/[\\\/_+.#"@\[\(\{&]/g,CI=/[\s-]/,wI=/[\s-]/g;function TI(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?pI:bI;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=TI(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=pI:xI.test(e.charAt(l-1))?(d*=hI,p=e.slice(i,l-1).match(SI),p&&i>0&&(d*=vI**+p.length)):CI.test(e.charAt(l-1))?(d*=mI,m=e.slice(i,l-1).match(wI),m&&i>0&&(d*=vI**+m.length)):(d*=gI,i>0&&(d*=vI**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=yI)),(d<_I&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=TI(e,t,n,r,l+1,a+2,o),f*_I>d&&(d=f*_I)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function EI(e){return e.toLowerCase().replace(wI,` `)}function DI(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,TI(e,t,EI(e),EI(t),0,0,{})}var OI=`[cmdk-group=""]`,kI=`[cmdk-group-items=""]`,AI=`[cmdk-group-heading=""]`,jI=`[cmdk-item=""]`,MI=`${jI}:not([aria-disabled="true"])`,NI=`cmdk-item-select`,PI=`data-value`,FI=(e,t,n)=>DI(e,t,n),II=m.createContext(void 0),LI=()=>m.useContext(II),RI=m.createContext(void 0),zI=()=>m.useContext(RI),BI=m.createContext(void 0),VI=m.forwardRef((e,t)=>{let n=tL(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=tL(()=>new Set),i=tL(()=>new Map),a=tL(()=>new Map),o=tL(()=>new Set),s=$I(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:h,disablePointerSelection:g=!1,vimBindings:_=!0,...v}=e,y=Qx(),b=Qx(),x=Qx(),S=m.useRef(null),C=iL();eL(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,w.emit()}},[u]),eL(()=>{C(6,A)},[]);let w=m.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)k(),D(),C(1,O);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(x);e?e.focus():(i=document.getElementById(y))==null||i.focus()}if(C(7,()=>{n.current.selectedItemId=j()?.id,w.emit()}),r||C(5,A),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}w.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),T=m.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,E(t,r)),C(2,()=>{D(),w.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),C(3,()=>{k(),D(),n.current.value||O(),w.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=j();C(4,()=>{k(),t?.getAttribute(`id`)===e&&O(),w.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:y,inputId:x,labelId:b,listInnerRef:S}),[]);function E(e,t){let r=s.current?.filter??FI;return e?r(e,n.current.search,t):0}function D(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=S.current;M().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(kI);t?t.appendChild(e.parentElement===t?e:e.closest(`${kI} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${kI} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${OI}[${PI}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function O(){let e=M().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(PI);w.setState(`value`,e||void 0)}function k(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=E(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function A(){var e;let t=j();t&&(t.parentElement?.firstChild===t&&((e=t.closest(OI)?.querySelector(AI))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function j(){return S.current?.querySelector(`${jI}[aria-selected="true"]`)}function M(){return Array.from(S.current?.querySelectorAll(MI)||[])}function N(e){let t=M()[e];t&&w.setState(`value`,t.getAttribute(PI))}function ee(e){var t;let n=j(),r=M(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&w.setState(`value`,a.getAttribute(PI))}function P(e){let t=j()?.closest(OI),n;for(;t&&!n;)t=e>0?ZI(t,OI):QI(t,OI),n=t?.querySelector(MI);n?w.setState(`value`,n.getAttribute(PI)):ee(e)}let F=()=>N(M().length-1),te=e=>{e.preventDefault(),e.metaKey?F():e.altKey?P(1):ee(1)},ne=e=>{e.preventDefault(),e.metaKey?N(0):e.altKey?P(-1):ee(-1)};return m.createElement(jS.div,{ref:t,tabIndex:-1,...v,"cmdk-root":``,onKeyDown:e=>{var t;(t=v.onKeyDown)==null||t.call(v,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:_&&e.ctrlKey&&te(e);break;case`ArrowDown`:te(e);break;case`p`:case`k`:_&&e.ctrlKey&&ne(e);break;case`ArrowUp`:ne(e);break;case`Home`:e.preventDefault(),N(0);break;case`End`:e.preventDefault(),F();break;case`Enter`:{e.preventDefault();let t=j();if(t){let e=new Event(NI);t.dispatchEvent(e)}}}}},m.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:sL},c),oL(e,e=>m.createElement(RI.Provider,{value:w},m.createElement(II.Provider,{value:T},e))))}),HI=m.forwardRef((e,t)=>{let n=Qx(),r=m.useRef(null),i=m.useContext(BI),a=LI(),o=$I(e),s=o.current?.forceMount??i?.forceMount;eL(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=rL(n,r,[e.value,e.children,r],e.keywords),l=zI(),u=nL(e=>e.value&&e.value===c.current),d=nL(e=>s||a.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);m.useEffect(()=>{let t=r.current;if(t&&!e.disabled)return t.addEventListener(NI,f),()=>t.removeEventListener(NI,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:h,value:g,onSelect:_,forceMount:v,keywords:y,...b}=e;return m.createElement(jS.div,{ref:Bx(r,t),...b,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!h,"aria-selected":!!u,"data-disabled":!!h,"data-selected":!!u,onPointerMove:h||a.getDisablePointerSelection()?void 0:p,onClick:h?void 0:f},e.children)}),UI=m.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=Qx(),s=m.useRef(null),c=m.useRef(null),l=Qx(),u=LI(),d=nL(e=>i||u.filter()===!1?!0:!e.search||e.filtered.groups.has(o));eL(()=>u.group(o),[]),rL(o,s,[e.value,e.heading,c]);let f=m.useMemo(()=>({id:o,forceMount:i}),[i]);return m.createElement(jS.div,{ref:Bx(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:!d||void 0},n&&m.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),oL(e,e=>m.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},m.createElement(BI.Provider,{value:f},e))))}),WI=m.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=m.useRef(null),a=nL(e=>!e.search);return!n&&!a?null:m.createElement(jS.div,{ref:Bx(i,t),...r,"cmdk-separator":``,role:`separator`})}),GI=m.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=zI(),o=nL(e=>e.search),s=nL(e=>e.selectedItemId),c=LI();return m.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),m.createElement(jS.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),KI=m.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=m.useRef(null),o=m.useRef(null),s=nL(e=>e.selectedItemId),c=LI();return m.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),m.createElement(jS.div,{ref:Bx(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},oL(e,e=>m.createElement(`div`,{ref:Bx(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),qI=m.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return m.createElement(oT,{open:n,onOpenChange:r},m.createElement(uT,{container:o},m.createElement(fT,{"cmdk-overlay":``,className:i}),m.createElement(gT,{"aria-label":e.label,"cmdk-dialog":``,className:a},m.createElement(VI,{ref:t,...s}))))}),JI=m.forwardRef((e,t)=>nL(e=>e.filtered.count===0)?m.createElement(jS.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),YI=m.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return m.createElement(jS.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},oL(e,e=>m.createElement(`div`,{"aria-hidden":!0},e)))}),XI=Object.assign(VI,{List:KI,Item:HI,Input:GI,Group:UI,Separator:WI,Dialog:qI,Empty:JI,Loading:YI});function ZI(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function QI(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function $I(e){let t=m.useRef(e);return eL(()=>{t.current=e}),t}var eL=typeof window>`u`?m.useEffect:m.useLayoutEffect;function tL(e){let t=m.useRef();return t.current===void 0&&(t.current=e()),t}function nL(e){let t=zI(),n=()=>e(t.snapshot());return m.useSyncExternalStore(t.subscribe,n,n)}function rL(e,t,n,r=[]){let i=m.useRef(),a=LI();return eL(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(PI,s),i.current=s}),i}var iL=()=>{let[e,t]=m.useState(),n=tL(()=>new Map);return eL(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function aL(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function oL({asChild:e,children:t},n){return e&&m.isValidElement(t)?m.cloneElement(aL(t),{ref:t.ref},n(t.props.children)):n(t)}var sL={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},cL=[{label:`工作区`,items:[{to:`/`,label:`概览`,icon:Ov},{to:`/plugins`,label:`插件`,icon:my},{to:`/commands`,label:`命令`,icon:Xy},{to:`/groups`,label:`群组`,icon:vb},{to:`/bots`,label:`机器人`,icon:S_},{to:`/playground`,label:`调试台`,icon:fv}]},{label:`运维`,items:[{to:`/logs`,label:`日志`,icon:Oy},{to:`/acl`,label:`访问控制`,icon:By},{to:`/settings`,label:`设置`,icon:Iy}]}],lL=[{to:`/history`,label:`消息记录`,icon:Wv,plugin:`history`,group:`运维`}],uL={"app-window":e_,"bar-chart":A_,calendar:O_,coins:H_,gamepad:mv,gift:gv,image:Sv,"list-checks":Mv,music:nv,sparkles:Jy,star:Qy,trophy:ub,users:vb,wrench:Sb};function dL(e){return`/pages/${encodeURIComponent(e)}`}function fL(e){return e.filter(e=>e.page&&e.state===`active`).map(e=>({to:dL(e.name),label:e.page?.title??e.name,icon:uL[e.page?.icon??``]??e_}))}function pL(){let e=mx(),t=_(),{setPreference:n}=dx(),r=it({queryKey:[`plugins`],queryFn:X.plugins,enabled:e}),i=it({queryKey:[`commands`],queryFn:X.commands,enabled:e}),a=at({mutationFn:e=>X.pluginAction(e,`reload`),onSuccess:e=>{W.success(`已重载 ${e.name}`),t.invalidateQueries({queryKey:[`plugins`]})}}),o=()=>fx.set(!1),s=e=>{o(),e()};return(0,h.jsx)(oT,{open:e,onOpenChange:fx.set,children:(0,h.jsx)(Ef,{children:e&&(0,h.jsxs)(uT,{forceMount:!0,children:[(0,h.jsx)(fT,{asChild:!0,forceMount:!0,children:(0,h.jsx)(U.div,{className:`fixed inset-0 z-40 bg-overlay backdrop-blur-[3px]`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.18}})}),(0,h.jsx)(`div`,{className:`pointer-events-none fixed inset-0 z-50 flex justify-center px-4 pt-[14vh]`,children:(0,h.jsx)(gT,{asChild:!0,forceMount:!0,"aria-describedby":void 0,children:(0,h.jsxs)(U.div,{initial:{opacity:0,scale:.97,y:-8},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.98,y:-4},transition:Ab,className:`pointer-events-auto h-fit w-full max-w-[580px] overflow-hidden rounded-2xl border border-border bg-surface shadow-pop outline-none`,children:[(0,h.jsx)(bT,{className:`sr-only`,children:`命令面板`}),(0,h.jsxs)(XI,{loop:!0,className:`[&_[cmdk-group-heading]]:px-3 [&_[cmdk-group-heading]]:pt-3 [&_[cmdk-group-heading]]:pb-1.5 [&_[cmdk-group-heading]]:text-[11px] [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-fg-3`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-2.5 border-b border-border px-4`,children:[(0,h.jsx)(Ay,{className:`size-4 text-fg-3`}),(0,h.jsx)(XI.Input,{autoFocus:!0,placeholder:`输入页面、插件或命令…`,className:`h-13 flex-1 bg-transparent text-[14.5px] text-fg outline-none placeholder:text-fg-3`}),(0,h.jsx)(Sx,{children:`Esc`})]}),(0,h.jsxs)(XI.List,{className:`max-h-[min(420px,60vh)] overflow-y-auto overscroll-contain p-1.5 [&_[cmdk-list-sizer]]:transition-[height]`,children:[(0,h.jsx)(XI.Empty,{className:`py-10 text-center text-[13px] text-fg-3`,children:`没有匹配的结果`}),(0,h.jsx)(XI.Group,{heading:`跳转`,children:cL.flatMap(e=>e.items.map(e=>(0,h.jsx)(mL,{value:`page ${e.label} ${e.to}`,icon:(0,h.jsx)(e.icon,{className:`size-4`}),onSelect:()=>s(()=>nx(e.to)),children:e.label},e.to)))}),i.data&&i.data.length>0&&(0,h.jsx)(XI.Group,{heading:`在调试台中试用命令`,children:i.data.filter(e=>!e.hidden).map(e=>(0,h.jsxs)(mL,{value:`command ${e.path} ${e.aliases.join(` `)} ${e.description}`,icon:(0,h.jsx)(fv,{className:`size-4`}),hint:e.owner,onSelect:()=>s(()=>{px.set(`/${e.path} `),nx(`/playground`)}),children:[(0,h.jsx)(`span`,{className:`font-mono text-[12.5px]`,children:e.usage}),e.description&&(0,h.jsx)(`span`,{className:`ml-2 text-fg-3`,children:e.description})]},`${e.owner}:${e.path}`))}),r.data&&r.data.length>0&&(0,h.jsx)(XI.Group,{heading:`重载插件`,children:r.data.map(e=>(0,h.jsxs)(mL,{value:`reload ${e.name} ${e.description??``}`,icon:(0,h.jsx)(wy,{className:`size-4`}),onSelect:()=>s(()=>a.mutate(e.name)),children:[`重载 `,e.name]},e.name))}),(0,h.jsxs)(XI.Group,{heading:`偏好`,children:[(0,h.jsx)(mL,{value:`theme light 浅色`,icon:(0,h.jsx)(nb,{className:`size-4`}),onSelect:()=>s(()=>n(`light`)),children:`切换到浅色主题`}),(0,h.jsx)(mL,{value:`theme dark 深色`,icon:(0,h.jsx)(Qv,{className:`size-4`}),onSelect:()=>s(()=>n(`dark`)),children:`切换到深色主题`}),(0,h.jsx)(mL,{value:`theme system 跟随系统`,icon:(0,h.jsx)(Xv,{className:`size-4`}),onSelect:()=>s(()=>n(`system`)),children:`主题跟随系统`}),(0,h.jsx)(mL,{value:`logout 退出登录`,icon:(0,h.jsx)(Rv,{className:`size-4`}),onSelect:()=>s(()=>{X.logout().finally(()=>{ax(t,!1)})}),children:`退出登录`})]})]}),(0,h.jsxs)(`div`,{className:`flex items-center gap-3 border-t border-border bg-surface-2/60 px-4 py-2 text-[11.5px] text-fg-3`,children:[(0,h.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,h.jsx)(Sx,{children:`↑`}),(0,h.jsx)(Sx,{children:`↓`}),`选择`]}),(0,h.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,h.jsx)(Sx,{children:(0,h.jsx)(J_,{className:`size-3`})}),`执行`]})]})]})]})})})]})})})}function mL({value:e,icon:t,hint:n,onSelect:r,children:i}){return(0,h.jsxs)(XI.Item,{value:e,onSelect:r,className:`group flex h-10 cursor-pointer items-center gap-3 rounded-[10px] px-3 text-[13.5px] text-fg-2 select-none data-[selected=true]:bg-surface-2 data-[selected=true]:text-fg`,children:[(0,h.jsx)(`span`,{className:`text-fg-3 group-data-[selected=true]:text-accent`,children:t}),(0,h.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:i}),n&&(0,h.jsx)(`span`,{className:`text-[11.5px] text-fg-3`,children:n})]})}var hL={"/":tF,"/plugins":YF,"/commands":rP,"/groups":lP,"/history":BP,"/bots":iM,"/playground":pF,"/logs":GP,"/acl":Lj,"/settings":uI};function gL(e){let t=hL[e];return t?{key:e,Page:t}:e.startsWith(`/groups/`)?{key:`/groups`,Page:lP}:e.startsWith(`/pages/`)?{key:e,Page:wF}:{key:e,Page:JP}}function _L(){let e=it({queryKey:[`plugins`],queryFn:X.plugins}),t=new Set((e.data??[]).filter(e=>e.state===`active`).map(e=>e.name)),n=fL(e.data??[]);return[...cL.map(e=>({...e,items:[...e.items,...lL.filter(n=>n.group===e.label&&t.has(n.plugin))]})),...n.length>0?[{label:`插件页面`,items:n}]:[]]}function vL(){let e=rx(),[t,n]=(0,m.useState)(!1),r=_L(),{key:i,Page:a}=gL(e),o=r.flatMap(e=>e.items).find(e=>e.to===i);return(0,m.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),fx.set(e=>!e))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,m.useEffect)(()=>{document.title=o?`${o.label} · AsaBot`:`AsaBot 控制台`},[o]),(0,h.jsxs)(`div`,{className:`relative flex h-full`,children:[(0,h.jsx)(`div`,{className:`pointer-events-none fixed inset-x-0 top-0 h-[420px] bg-[radial-gradient(ellipse_70%_60%_at_60%_-10%,var(--bg-glow),transparent_70%)]`}),(0,h.jsx)(`aside`,{className:`relative z-10 hidden w-[236px] shrink-0 lg:block`,children:(0,h.jsx)(yL,{path:i,groups:r})}),(0,h.jsx)(Ef,{children:t&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(U.div,{className:`fixed inset-0 z-40 bg-overlay backdrop-blur-[2px] lg:hidden`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>n(!1)}),(0,h.jsx)(U.aside,{className:`fixed inset-y-0 left-0 z-50 w-[260px] border-r border-border bg-bg lg:hidden`,initial:{x:-280},animate:{x:0},exit:{x:-280},transition:Z,children:(0,h.jsx)(yL,{path:i,groups:r,onNavigate:()=>n(!1)})})]})}),(0,h.jsxs)(`div`,{className:`relative z-0 flex min-w-0 flex-1 flex-col`,children:[(0,h.jsxs)(`header`,{className:`flex h-14 items-center gap-3 px-4 lg:hidden`,children:[(0,h.jsx)(Q,{variant:`ghost`,size:`icon`,"aria-label":`打开导航`,onClick:()=>n(!0),children:(0,h.jsx)(Bv,{className:`size-4.5`})}),(0,h.jsx)(zg,{className:`size-6`}),(0,h.jsx)(`span`,{className:`font-semibold tracking-tight`,children:`AsaBot`})]}),(0,h.jsx)(`main`,{className:`min-h-0 flex-1 overflow-y-auto [scrollbar-gutter:stable]`,children:(0,h.jsx)(Ef,{mode:`wait`,initial:!1,children:(0,h.jsx)(U.div,{initial:{opacity:0,y:10,filter:`blur(3px)`},animate:{opacity:1,y:0,filter:`blur(0px)`},exit:{opacity:0,y:-6,filter:`blur(2px)`,transition:{duration:.12}},transition:Z,className:`mx-auto w-full max-w-[1180px] px-5 py-7 lg:px-10 lg:py-9`,children:(0,h.jsx)(a,{})},i)})})]}),(0,h.jsx)(pL,{}),(0,h.jsx)(HF,{})]})}function yL({path:e,groups:t,onNavigate:n}){let r=it({queryKey:[`overview`],queryFn:X.overview});return(0,h.jsxs)(`div`,{className:`flex h-full flex-col px-3 pt-4 pb-3`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-2.5 px-2 pb-5`,children:[(0,h.jsx)(zg,{}),(0,h.jsxs)(`div`,{className:`leading-tight`,children:[(0,h.jsx)(`div`,{className:`text-[14.5px] font-semibold tracking-[-0.02em]`,children:`AsaBot`}),(0,h.jsx)(`div`,{className:`text-[11.5px] text-fg-3`,children:r.data?`v${r.data.version}`:`控制台`})]})]}),(0,h.jsxs)(`button`,{type:`button`,onClick:()=>fx.set(!0),className:`group mb-5 flex h-9 cursor-pointer items-center gap-2 rounded-[10px] border border-border bg-surface px-2.5 text-[13px] text-fg-3 shadow-card transition-colors hover:border-border-strong hover:text-fg-2`,children:[(0,h.jsx)(Ay,{className:`size-3.5`}),(0,h.jsx)(`span`,{className:`flex-1 text-left`,children:`搜索或跳转…`}),(0,h.jsx)(Sx,{children:navigator.platform.includes(`Mac`)?`⌘`:`Ctrl`}),(0,h.jsx)(Sx,{children:`K`})]}),(0,h.jsx)(`nav`,{className:`flex-1 space-y-5 overflow-y-auto`,children:t.map(t=>(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`div`,{className:`mb-1 px-2.5 text-[11px] font-medium tracking-wide text-fg-3`,children:t.label}),(0,h.jsx)(`ul`,{className:`space-y-0.5`,children:t.items.map(t=>(0,h.jsx)(`li`,{children:(0,h.jsx)(bL,{item:t,active:t.to===e,onNavigate:n})},t.to))})]},t.label))}),(0,h.jsxs)(`div`,{className:`space-y-2 border-t border-border pt-3`,children:[(0,h.jsx)(xL,{}),(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-2 px-1`,children:[(0,h.jsx)(SL,{}),(0,h.jsx)(CL,{})]})]})]})}function bL({item:e,active:t,onNavigate:n}){let r=e.icon;return(0,h.jsxs)(ix,{to:e.to,onClick:n,className:J(`relative flex h-8 items-center gap-2.5 rounded-lg px-2.5 text-[13.5px] font-medium transition-colors duration-150`,t?`text-fg`:`text-fg-2 hover:bg-surface-2/70 hover:text-fg`),children:[t&&(0,h.jsx)(U.span,{layoutId:`nav-active`,transition:Ab,className:`absolute inset-0 rounded-lg border border-border bg-surface shadow-card`}),(0,h.jsx)(r,{className:J(`relative size-4 transition-colors`,t?`text-accent`:`text-fg-3`)}),(0,h.jsx)(`span`,{className:`relative`,children:e.label})]})}function xL(){let e=Jb();return(0,h.jsxs)(`div`,{className:`flex h-8 items-center gap-2 rounded-lg px-2.5 text-[12.5px] text-fg-3`,children:[(0,h.jsx)(xx,{tone:e===`open`?`success`:e===`connecting`?`warning`:`danger`,pulse:e===`open`}),(0,h.jsx)(Ef,{mode:`wait`,initial:!1,children:(0,h.jsx)(U.span,{initial:{opacity:0,y:3},animate:{opacity:1,y:0},exit:{opacity:0,y:-3},transition:{duration:.15},children:{open:`实时连接正常`,connecting:`正在连接…`,closed:`连接已断开,重试中`}[e]},e)})]})}function SL(){let{preference:e,setPreference:t}=dx();return(0,h.jsx)(`fieldset`,{"aria-label":`主题`,className:`m-0 inline-flex h-8 min-w-0 items-center rounded-lg border border-border bg-surface-2 p-0.5`,children:[{value:`light`,icon:(0,h.jsx)(nb,{className:`size-3.5`}),label:`浅色`},{value:`system`,icon:(0,h.jsx)(Xv,{className:`size-3.5`}),label:`跟随系统`},{value:`dark`,icon:(0,h.jsx)(Qv,{className:`size-3.5`}),label:`深色`}].map(n=>(0,h.jsx)(Sj,{content:n.label,children:(0,h.jsxs)(`button`,{type:`button`,"aria-pressed":e===n.value,"aria-label":n.label,onClick:()=>t(n.value),className:J(`relative flex h-full w-7 cursor-pointer items-center justify-center rounded-md transition-colors`,e===n.value?`text-fg`:`text-fg-3 hover:text-fg-2`),children:[e===n.value&&(0,h.jsx)(U.span,{layoutId:`theme-active`,transition:Ab,className:`absolute inset-0 rounded-md border border-border bg-surface shadow-card`}),(0,h.jsx)(`span`,{className:`relative`,children:n.icon})]})},n.value))})}function CL(){let e=_(),t=at({mutationFn:X.logout,onSettled:()=>{ax(e,!1)}});return(0,h.jsx)(Sj,{content:`退出登录`,children:(0,h.jsx)(Q,{variant:`ghost`,size:`icon`,"aria-label":`退出登录`,loading:t.isPending,onClick:()=>t.mutate(),children:(0,h.jsx)(Rv,{className:`size-4`})})})}function wL({onSuccess:e}){let[t,n]=(0,m.useState)(``),[r,i]=(0,m.useState)(null),a=Em(),o=at({mutationFn:X.login,meta:{silent:!0},onSuccess:e,onError:e=>{i(e instanceof Tb&&e.status===401?`密码不正确`:e instanceof Tb&&e.status===429?`尝试次数过多,请稍后再试`:e.message),a.start({x:[0,-8,7,-5,3,0],transition:{duration:.42}})}}),s=e=>{e.preventDefault(),t&&(i(null),o.mutate(t))};return(0,h.jsxs)(U.div,{className:`relative flex h-full items-center justify-center overflow-hidden px-4`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{duration:.2}},children:[(0,h.jsx)(TL,{}),(0,h.jsxs)(U.div,{className:`relative w-full max-w-[380px]`,initial:{opacity:0,y:16,scale:.98},animate:{opacity:1,y:0,scale:1},transition:{...Z,delay:.05},children:[(0,h.jsxs)(`div`,{className:`mb-8 flex flex-col items-center text-center`,children:[(0,h.jsx)(U.div,{initial:{scale:.6,rotate:-12,opacity:0},animate:{scale:1,rotate:0,opacity:1},transition:{...Ab,delay:.12},className:`mb-5 rounded-[14px] shadow-[0_8px_24px_-6px_rgb(109_94_245/0.5)]`,children:(0,h.jsx)(zg,{className:`size-12`})}),(0,h.jsx)(`h1`,{className:`text-[22px] font-semibold tracking-[-0.03em]`,children:`欢迎回到 AsaBot`}),(0,h.jsx)(`p`,{className:`mt-1.5 text-[13.5px] text-fg-3`,children:`输入面板密码以继续`})]}),(0,h.jsxs)(U.form,{animate:a,onSubmit:s,className:`card space-y-4 p-6`,children:[(0,h.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,h.jsx)(`label`,{htmlFor:`password`,className:`text-[12.5px] font-medium text-fg-2`,children:`面板密码`}),(0,h.jsx)(kT,{id:`password`,type:`password`,autoFocus:!0,autoComplete:`current-password`,icon:(0,h.jsx)(Ev,{}),placeholder:`server.panelPassword`,value:t,"aria-invalid":r!==null,onChange:e=>{n(e.target.value),i(null)}}),(0,h.jsx)(U.p,{initial:!1,animate:{height:r?`auto`:0,opacity:+!!r},transition:Z,className:`overflow-hidden text-[12.5px] text-danger`,children:r??` `})]}),(0,h.jsxs)(Q,{type:`submit`,variant:`primary`,size:`lg`,className:`w-full`,loading:o.isPending,disabled:!t,children:[`登录`,(0,h.jsx)(c_,{className:`size-4`})]})]}),(0,h.jsxs)(`p`,{className:`mt-6 text-center text-[12px] leading-relaxed text-fg-3`,children:[`密码来自配置文件中的 `,(0,h.jsx)(`code`,{className:`font-mono`,children:`server.panelPassword`})]})]})]})}function TL(){return(0,h.jsxs)(`div`,{className:`pointer-events-none absolute inset-0`,"aria-hidden":!0,children:[(0,h.jsx)(`div`,{className:`absolute inset-0 bg-[linear-gradient(to_right,var(--border)_1px,transparent_1px),linear-gradient(to_bottom,var(--border)_1px,transparent_1px)] bg-[size:44px_44px] opacity-50 [mask-image:radial-gradient(ellipse_55%_50%_at_50%_45%,black,transparent)]`}),(0,h.jsx)(U.div,{className:`absolute top-[12%] left-[18%] size-[420px] rounded-full bg-[#8b7ffa] opacity-[0.16] blur-[110px] dark:opacity-[0.14]`,animate:{x:[0,60,-20,0],y:[0,30,60,0]},transition:{duration:22,repeat:1/0,ease:`easeInOut`}}),(0,h.jsx)(U.div,{className:`absolute right-[14%] bottom-[10%] size-[380px] rounded-full bg-[#2bbd95] opacity-[0.12] blur-[110px] dark:opacity-[0.1]`,animate:{x:[0,-50,20,0],y:[0,-40,-10,0]},transition:{duration:26,repeat:1/0,ease:`easeInOut`}}),(0,h.jsx)(U.div,{className:`absolute top-[40%] right-[30%] size-[260px] rounded-full bg-[#f2a5c8] opacity-[0.1] blur-[100px] dark:opacity-[0.07]`,animate:{x:[0,40,-30,0],y:[0,-30,20,0]},transition:{duration:30,repeat:1/0,ease:`easeInOut`}})]})}var EL=[{title:`验证设置码`,description:`确认你能访问运行 AsaBot 的机器`},{title:`设置面板密码`,description:`之后用它登录管理面板`},{title:`超级用户`,description:`拥有全部权限的账号,可以稍后修改`},{title:`连接 OneBot`,description:`可以跳过,之后在设置中添加`}];function DL(e){let t=e.toUpperCase().replace(/[^A-Z0-9]/g,``).slice(0,8);return t.length>4?`${t.slice(0,4)}-${t.slice(4)}`:t}var OL=/^wss?:\/\/\S+$/i;function kL(){let e=_(),[t,n]=(0,m.useState)(0),[r,i]=(0,m.useState)(1),[a,o]=(0,m.useState)(``),[s,c]=(0,m.useState)(``),[l,u]=(0,m.useState)(``),[d,f]=(0,m.useState)([]),[p,g]=(0,m.useState)(`forward`),[v,y]=(0,m.useState)(``),[b,x]=(0,m.useState)(``),[S,C]=(0,m.useState)({}),w=Em(),T=e=>{i(e>t?1:-1),n(e)},E=(e,n)=>{C(n),e!==t&&T(e),w.start({x:[0,-8,7,-5,3,0],transition:{duration:.42}})},D=at({mutationFn:e=>X.setup(e),meta:{silent:!0},onSuccess:()=>{W.success(`设置完成,欢迎使用 AsaBot`),ax(e,!0)},onError:e=>{if(e instanceof Tb&&e.status===401)E(0,{code:`设置码不正确,请对照控制台输出`});else if(e instanceof Tb&&e.status===429)E(0,{code:`尝试次数过多,请稍后再试`});else if(e instanceof Tb&&e.issues.length>0){let t=e.issues[0],n=t.path.startsWith(`password`)?1:t.path.startsWith(`superusers`)?2:3;E(n,{[n===1?`password`:n===3?`url`:`superusers`]:t.message})}else W.error(e.message)}}),O=()=>t===0&&!/^[A-Z0-9]{4}-[A-Z0-9]{4}$/.test(a)?{code:`设置码是 8 位字符,形如 ABCD-EFGH`}:t===1&&s.length<8?{password:`至少 8 个字符`}:t===1&&s.includes("${")?{password:"密码不能包含 ${"}:t===1&&l!==s?{confirm:`两次输入的密码不一致`}:t===3&&p===`forward`&&!OL.test(v.trim())?{url:`请填写 ws:// 或 wss:// 开头的地址`}:{},k=e=>{e.preventDefault();let n=O();if(Object.keys(n).length>0)return E(t,n);if(C({}),t<EL.length-1)return T(t+1);let r=p===`forward`?{connections:[{type:`forward`,url:v.trim(),...b?{accessToken:b}:{}}]}:p===`reverse`?{reverse:{enabled:!0,accessToken:b}}:void 0;D.mutate({code:a,password:s,superusers:d,...r?{adapters:{onebot11:r}}:{}})},A=`${window.location.protocol===`https:`?`wss`:`ws`}://${window.location.host}/onebot/v11/ws`,j=EL[t];return(0,h.jsxs)(U.div,{className:`relative flex h-full items-center justify-center overflow-hidden px-4`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{duration:.2}},children:[(0,h.jsx)(TL,{}),(0,h.jsxs)(U.div,{className:`relative w-full max-w-[440px]`,initial:{opacity:0,y:16,scale:.98},animate:{opacity:1,y:0,scale:1},transition:{...Z,delay:.05},children:[(0,h.jsxs)(`div`,{className:`mb-7 flex flex-col items-center text-center`,children:[(0,h.jsx)(U.div,{initial:{scale:.6,rotate:-12,opacity:0},animate:{scale:1,rotate:0,opacity:1},transition:{...Ab,delay:.12},className:`mb-5 rounded-[14px] shadow-[0_8px_24px_-6px_rgb(109_94_245/0.5)]`,children:(0,h.jsx)(zg,{className:`size-12`})}),(0,h.jsx)(`h1`,{className:`text-[22px] font-semibold tracking-[-0.03em]`,children:`初始化 AsaBot`}),(0,h.jsx)(`p`,{className:`mt-1.5 text-[13.5px] text-fg-3`,children:`只需几步,完成后进入管理面板`})]}),(0,h.jsxs)(U.form,{animate:w,onSubmit:k,className:`card overflow-hidden`,children:[(0,h.jsx)(`div`,{className:`flex gap-1.5 px-6 pt-5`,children:EL.map((e,n)=>(0,h.jsx)(`div`,{className:`h-1 flex-1 overflow-hidden rounded-full bg-surface-3`,children:(0,h.jsx)(U.div,{className:`h-full rounded-full bg-accent`,initial:!1,animate:{width:n<=t?`100%`:`0%`},transition:Z})},e.title))}),(0,h.jsxs)(`div`,{className:`px-6 pt-5`,children:[(0,h.jsxs)(`p`,{className:`text-[11.5px] font-medium text-fg-3 tabular`,children:[`第 `,t+1,` 步,共 `,EL.length,` 步`]}),(0,h.jsx)(`h2`,{className:`mt-1 text-[16px] font-semibold tracking-[-0.015em]`,children:j.title}),(0,h.jsx)(`p`,{className:`mt-0.5 text-[12.5px] text-fg-3`,children:j.description})]}),(0,h.jsx)(`div`,{className:`relative min-h-[196px] px-6 pt-5 pb-2`,children:(0,h.jsx)(Ef,{mode:`wait`,initial:!1,custom:r,children:(0,h.jsxs)(U.div,{custom:r,initial:{opacity:0,x:r*24},animate:{opacity:1,x:0},exit:{opacity:0,x:r*-24},transition:{...Z,opacity:{duration:.15}},className:`space-y-4`,children:[t===0&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(AL,{icon:(0,h.jsx)(ib,{}),children:[`设置码在 AsaBot 启动时打印在控制台。Docker 部署可以用`,` `,(0,h.jsx)(`code`,{className:`font-mono text-[12px]`,children:`docker compose logs asabot`}),` 查看。`]}),(0,h.jsx)(jT,{label:`设置码`,error:S.code,htmlFor:`setup-code`,children:(0,h.jsx)(kT,{id:`setup-code`,autoFocus:!0,autoComplete:`off`,icon:(0,h.jsx)(Ev,{}),placeholder:`ABCD-EFGH`,value:a,"aria-invalid":!!S.code,onChange:e=>{o(DL(e.target.value)),C({})},className:`font-mono tracking-[0.12em]`})})]}),t===1&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(jT,{label:`面板密码`,error:S.password,hint:`至少 8 个字符`,htmlFor:`setup-password`,children:(0,h.jsx)(kT,{id:`setup-password`,type:`password`,autoFocus:!0,autoComplete:`new-password`,icon:(0,h.jsx)(Pv,{}),value:s,"aria-invalid":!!S.password,onChange:e=>{c(e.target.value),C({})}})}),(0,h.jsx)(jT,{label:`确认密码`,error:S.confirm,htmlFor:`setup-confirm`,children:(0,h.jsx)(kT,{id:`setup-confirm`,type:`password`,autoComplete:`new-password`,icon:(0,h.jsx)(Pv,{}),value:l,"aria-invalid":!!S.confirm,onChange:e=>{u(e.target.value),C({})}})})]}),t===2&&(0,h.jsx)(jT,{label:`超级用户 ID`,error:S.superusers,hint:`输入后按回车添加。超级用户可以在聊天中管理插件和访问控制`,htmlFor:`setup-superusers`,children:(0,h.jsx)(XN,{id:`setup-superusers`,value:d,onChange:e=>f(e)})}),t===3&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`div`,{children:(0,h.jsx)(wj,{value:p,onChange:e=>{g(e),C({})},className:`w-full [&>button]:flex-1`,options:[{value:`forward`,label:`正向 WS`},{value:`reverse`,label:`反向 WS`},{value:`later`,label:`稍后配置`}]})}),p===`forward`&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(jT,{label:`OneBot 实现的 WebSocket 地址`,error:S.url,hint:`AsaBot 主动连接这个地址,例如 NapCat 的 WebSocket 服务器`,htmlFor:`setup-url`,children:(0,h.jsx)(kT,{id:`setup-url`,icon:(0,h.jsx)(Av,{}),placeholder:`ws://127.0.0.1:3001`,value:v,"aria-invalid":!!S.url,onChange:e=>{y(e.target.value),C({})},className:`font-mono`})}),(0,h.jsx)(jL,{value:b,onChange:x})]}),p===`reverse`&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(jT,{label:`在 OneBot 实现中填写这个地址`,hint:`由 OneBot 实现主动连接 AsaBot`,children:(0,h.jsx)(ML,{value:A})}),(0,h.jsx)(jL,{value:b,onChange:x})]}),p===`later`&&(0,h.jsx)(AL,{icon:(0,h.jsx)(Av,{}),children:`完成后在「设置」页面添加连接。没有连接时,仍然可以在调试台里试用插件。`})]})]},t)})}),(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-t border-border px-6 py-4`,children:[(0,h.jsxs)(Q,{type:`button`,variant:`ghost`,onClick:()=>T(t-1),className:J(t===0&&`invisible`),children:[(0,h.jsx)(o_,{className:`size-4`}),`上一步`]}),(0,h.jsx)(Q,{type:`submit`,variant:`primary`,loading:D.isPending,children:t===EL.length-1?(0,h.jsxs)(h.Fragment,{children:[`完成设置`,(0,h.jsx)(M_,{className:`size-4`})]}):(0,h.jsxs)(h.Fragment,{children:[`下一步`,(0,h.jsx)(c_,{className:`size-4`})]})})]})]})]})]})}function AL({icon:e,children:t}){return(0,h.jsxs)(`div`,{className:`flex gap-2.5 rounded-xl bg-surface-2 px-3.5 py-3 text-[12.5px] leading-relaxed text-fg-2 [&>svg]:mt-0.5 [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-fg-3`,children:[e,(0,h.jsx)(`p`,{children:t})]})}function jL({value:e,onChange:t}){return(0,h.jsx)(jT,{label:`访问令牌`,hint:`与 OneBot 实现中配置的 token 一致;没有设置可以留空`,htmlFor:`setup-token`,children:(0,h.jsx)(kT,{id:`setup-token`,type:`password`,autoComplete:`off`,icon:(0,h.jsx)(Ev,{}),value:e,onChange:e=>t(e.target.value),className:`font-mono`})})}function ML({value:e}){let[t,n]=(0,m.useState)(!1);return(0,h.jsxs)(`div`,{className:`flex h-9 items-center gap-2 rounded-[10px] border border-border bg-surface-2 pr-1 pl-3`,children:[(0,h.jsx)(`code`,{className:`min-w-0 flex-1 truncate font-mono text-[12.5px] text-fg`,children:e}),(0,h.jsx)(Q,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":`复制地址`,onClick:()=>void navigator.clipboard.writeText(e).then(()=>{n(!0),window.setTimeout(()=>n(!1),1500)},()=>W.error(`无法访问剪贴板,请手动复制`)),children:t?(0,h.jsx)(M_,{className:`size-3.5 text-success`}):(0,h.jsx)(K_,{className:`size-3.5`})})]})}function NL(){let e=_(),t=it({queryKey:[`session`],queryFn:X.session,staleTime:1/0});(0,m.useEffect)(()=>{Db(()=>{e.setQueryData([`session`],{authenticated:!1})})},[e]);let n=t.isPending?`splash`:t.error?`error`:t.data?.authenticated?`app`:t.data?.setup?`setup`:`login`;return(0,h.jsxs)(Ef,{mode:`wait`,children:[n===`splash`&&(0,h.jsx)(U.div,{className:`flex h-full items-center justify-center`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:(0,h.jsx)(U.div,{animate:{scale:[1,1.06,1]},transition:{duration:1.6,repeat:1/0},children:(0,h.jsx)(zg,{className:`size-10`})})},`splash`),n===`error`&&(0,h.jsx)(PL,{error:t.error,onRetry:()=>void t.refetch()},`error`),n===`setup`&&(0,h.jsx)(kL,{},`setup`),n===`login`&&(0,h.jsx)(wL,{onSuccess:()=>{ax(e,!0)}},`login`),n===`app`&&(0,h.jsx)(U.div,{className:`h-full`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:Z,children:(0,h.jsx)(Ub,{children:(0,h.jsx)(vL,{})})},`app`)]})}function PL({error:e,onRetry:t}){let n=e instanceof Tb&&e.status===404;return(0,h.jsx)(U.div,{className:`flex h-full items-center justify-center p-6`,initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0},transition:Z,children:(0,h.jsxs)(`div`,{className:`card max-w-md p-8 text-center`,children:[(0,h.jsx)(zg,{className:`mx-auto mb-5 size-10`}),(0,h.jsx)(`h1`,{className:`text-lg font-semibold tracking-tight`,children:n?`面板未启用`:`无法连接到 AsaBot`}),(0,h.jsx)(`p`,{className:`mt-2 text-[13.5px] leading-relaxed text-fg-3`,children:n?(0,h.jsxs)(h.Fragment,{children:[`在配置文件中设置`,` `,(0,h.jsx)(`code`,{className:`rounded bg-surface-2 px-1 font-mono text-[12.5px]`,children:`server.panelPassword`}),` `,`后重启 AsaBot。`]}):e?.message??`请确认 AsaBot 正在运行。`}),(0,h.jsx)(`button`,{type:`button`,onClick:t,className:`mt-6 cursor-pointer text-[13px] font-medium text-accent hover:underline`,children:`重试`})]})})}var FL=new Ge({defaultOptions:{queries:{staleTime:15e3,refetchOnWindowFocus:!1,retry:(e,t)=>!(t instanceof Tb&&t.status>0&&t.status<500)&&e<2}},mutationCache:new Ve({onError:(e,t,n,r)=>{r.meta?.silent||W.error(e instanceof Error?e.message:`操作失败`)}})});function IL(){let{resolved:e}=dx();return(0,h.jsx)(uh,{theme:e,position:`top-right`,gap:10,toastOptions:{classNames:{toast:`!rounded-xl !border-border !bg-surface !text-fg !shadow-pop !font-sans !text-[13px]`,description:`!text-fg-3`}}})}var LL=document.getElementById(`root`);if(!LL)throw Error(`#root missing from index.html`);(0,Mm.createRoot)(LL).render((0,h.jsx)(m.StrictMode,{children:(0,h.jsx)(ux,{children:(0,h.jsx)(v,{client:FL,children:(0,h.jsx)(Nf,{reducedMotion:`user`,children:(0,h.jsxs)(Cj,{children:[(0,h.jsx)(NL,{}),(0,h.jsx)(IL,{})]})})})})}));export{o as a,d as i,J as n,s as o,p as r,l as s,Y as t};